mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 15:17:09 +00:00
113 lines
381 KiB
JavaScript
113 lines
381 KiB
JavaScript
var _u=Object.defineProperty,vu=Object.defineProperties;var wu=Object.getOwnPropertyDescriptors;var $r=Object.getOwnPropertySymbols;var ls=Object.prototype.hasOwnProperty,cs=Object.prototype.propertyIsEnumerable;var as=(e,t,n)=>t in e?_u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,q=(e,t)=>{for(var n in t||(t={}))ls.call(t,n)&&as(e,n,t[n]);if($r)for(var n of $r(t))cs.call(t,n)&&as(e,n,t[n]);return e},_e=(e,t)=>vu(e,wu(t));var Gi=e=>typeof e=="symbol"?e:e+"",us=(e,t)=>{var n={};for(var r in e)ls.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$r)for(var r of $r(e))t.indexOf(r)<0&&cs.call(e,r)&&(n[r]=e[r]);return n};const yu=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 o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}};yu();var U,nr,za,ds,ja,oi={},Mo=[],bu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Ft(e,t){for(var n in t)e[n]=t[n];return e}function Va(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,n){var r,i,o,s=arguments,a={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>3)for(n=[n],o=3;o<arguments.length;o++)n.push(s[o]);if(n!=null&&(a.children=n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return rr(e,a,r,i,null)}function rr(e,t,n,r,i){var o={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(o),o}function xu(){return{current:null}}function te(e){return e.children}function _t(e,t){this.props=e,this.context=t}function lr(e,t){if(t==null)return e.__?lr(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"?lr(e):null}function Ha(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 Ha(e)}}function so(e){(!e.__d&&(e.__d=!0)&&nr.push(e)&&!si.__r++||ds!==U.debounceRendering)&&((ds=U.debounceRendering)||za)(si)}function si(){for(var e;si.__r=nr.length;)e=nr.sort(function(t,n){return t.__v.__b-n.__v.__b}),nr=[],e.some(function(t){var n,r,i,o,s,a;t.__d&&(s=(o=(n=t).__v).__e,(a=n.__P)&&(r=[],(i=Ft({},o)).__v=o.__v+1,Oo(a,o,i,n.__n,a.ownerSVGElement!==void 0,o.__h!=null?[s]:null,r,s==null?lr(o):s,o.__h),Wa(r,o),o.__e!=s&&Ha(o)))})}function Ua(e,t,n,r,i,o,s,a,l,u){var c,d,f,p,m,v,g,_=r&&r.__k||Mo,x=_.length;for(n.__k=[],c=0;c<t.length;c++)if((p=n.__k[c]=(p=t[c])==null||typeof p=="boolean"?null:typeof p=="string"||typeof p=="number"||typeof p=="bigint"?rr(null,p,null,null,p):Array.isArray(p)?rr(te,{children:p},null,null,null):p.__b>0?rr(p.type,p.props,p.key,null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(f=_[c])===null||f&&p.key==f.key&&p.type===f.type)_[c]=void 0;else for(d=0;d<x;d++){if((f=_[d])&&p.key==f.key&&p.type===f.type){_[d]=void 0;break}f=null}Oo(e,p,f=f||oi,i,o,s,a,l,u),m=p.__e,(d=p.ref)&&f.ref!=d&&(g||(g=[]),f.ref&&g.push(f.ref,null,p),g.push(d,p.__c||m,p)),m!=null?(v==null&&(v=m),typeof p.type=="function"&&p.__k!=null&&p.__k===f.__k?p.__d=l=Ga(p,l,e):l=Ya(e,p,f,_,m,l),u||n.type!=="option"?typeof n.type=="function"&&(n.__d=l):e.value=""):l&&f.__e==l&&l.parentNode!=e&&(l=lr(f))}for(n.__e=v,c=x;c--;)_[c]!=null&&(typeof n.type=="function"&&_[c].__e!=null&&_[c].__e==n.__d&&(n.__d=lr(r,c+1)),Za(_[c],_[c]));if(g)for(c=0;c<g.length;c++)qa(g[c],g[++c],g[++c])}function Ga(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"?Ga(i,t,n):Ya(n,i,i,e.__k,i.__e,t));return t}function vt(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){vt(n,t)}):t.push(e)),t}function Ya(e,t,n,r,i,o){var s,a,l;if(t.__d!==void 0)s=t.__d,t.__d=void 0;else if(n==null||i!=o||i.parentNode==null)e:if(o==null||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<r.length;l+=2)if(a==i)break e;e.insertBefore(i,o),s=o}return s!==void 0?s:i.nextSibling}function Au(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||ai(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||ai(e,o,t[o],n[o],r)}function hs(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||bu.test(t)?n:n+"px"}function ai(e,t,n,r,i){var o;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||hs(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||hs(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?ps:fs,o):e.removeEventListener(t,o?ps:fs,o);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 fs(e){this.l[e.type+!1](U.event?U.event(e):e)}function ps(e){this.l[e.type+!0](U.event?U.event(e):e)}function Oo(e,t,n,r,i,o,s,a,l){var u,c,d,f,p,m,v,g,_,x,w,b=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(u=U.__b)&&u(t);try{e:if(typeof b=="function"){if(g=t.props,_=(u=b.contextType)&&r[u.__c],x=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,x):(t.__c=c=new _t(g,x),c.constructor=b,c.render=Su),_&&_.sub(c),c.props=g,c.state||(c.state={}),c.context=x,c.__n=r,d=c.__d=!0,c.__h=[]),c.__s==null&&(c.__s=c.state),b.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Ft({},c.__s)),Ft(c.__s,b.getDerivedStateFromProps(g,c.__s))),f=c.props,p=c.state,d)b.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(b.getDerivedStateFromProps==null&&g!==f&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(g,x),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(g,c.__s,x)===!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&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(g,c.__s,x),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(f,p,m)})}c.context=x,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=Ft(Ft({},r),c.getChildContext())),d||c.getSnapshotBeforeUpdate==null||(m=c.getSnapshotBeforeUpdate(f,p)),w=u!=null&&u.type===te&&u.key==null?u.props.children:u,Ua(e,Array.isArray(w)?w:[w],t,n,r,i,o,s,a,l),c.base=t.__e,t.__h=null,c.__h.length&&s.push(c),v&&(c.__E=c.__=null),c.__e=!1}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=ku(n.__e,t,n,r,i,o,s,l);(u=U.diffed)&&u(t)}catch(A){t.__v=null,(l||o!=null)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),U.__e(A,t,n)}}function Wa(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 ku(e,t,n,r,i,o,s,a){var l,u,c,d,f=n.props,p=t.props,m=t.type,v=0;if(m==="svg"&&(i=!0),o!=null){for(;v<o.length;v++)if((l=o[v])&&(l===e||(m?l.localName==m:l.nodeType==3))){e=l,o[v]=null;break}}if(e==null){if(m===null)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,p.is&&p),o=null,a=!1}if(m===null)f===p||a&&e.data===p||(e.data=p);else{if(o=o&&Mo.slice.call(e.childNodes),u=(f=n.props||oi).dangerouslySetInnerHTML,c=p.dangerouslySetInnerHTML,!a){if(o!=null)for(f={},d=0;d<e.attributes.length;d++)f[e.attributes[d].name]=e.attributes[d].value;(c||u)&&(c&&(u&&c.__html==u.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(Au(e,p,f,i,a),c)t.__k=[];else if(v=t.props.children,Ua(e,Array.isArray(v)?v:[v],t,n,r,i&&m!=="foreignObject",o,s,e.firstChild,a),o!=null)for(v=o.length;v--;)o[v]!=null&&Va(o[v]);a||("value"in p&&(v=p.value)!==void 0&&(v!==e.value||m==="progress"&&!v)&&ai(e,"value",v,f.value,!1),"checked"in p&&(v=p.checked)!==void 0&&v!==e.checked&&ai(e,"checked",v,f.checked,!1))}return e}function qa(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){U.__e(r,n)}}function Za(e,t,n){var r,i,o;if(U.unmount&&U.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||qa(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(s){U.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Za(r[o],t,n);i!=null&&Va(i)}function Su(e,t,n){return this.constructor(e,n)}function Ln(e,t,n){var r,i,o;U.__&&U.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],Oo(t,e=(!r&&n||t).__k=h(te,null,[e]),i||oi,oi,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?Mo.slice.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),Wa(o,e)}function Xa(e,t){Ln(e,t,Xa)}function Ja(e,t,n){var r,i,o,s=arguments,a=Ft({},e.props);for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>3)for(n=[n],o=3;o<arguments.length;o++)n.push(s[o]);return n!=null&&(a.children=n),rr(e.type,a,r||e.key,i||e.ref,null)}function hn(e,t){var n={__c:t="__cC"+ja++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(so)},this.sub=function(s){i.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),a&&a.call(s)}}),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(o){e=o}throw e},__v:0},_t.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ft({},this.state),typeof e=="function"&&(e=e(Ft({},n),this.props)),e&&Ft(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),so(this))},_t.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),so(this))},_t.prototype.render=te,nr=[],za=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,si.__r=0,ja=0;var Eu={};function Ka(e,t){for(var n in t)e[n]=t[n];return e}function Qa(e,t,n){var r=/(?:\?([^#]*))?(#.*)?$/,i=e.match(r),o={},s;if(i&&i[1])for(var a=i[1].split("&"),l=0;l<a.length;l++){var u=a[l].split("=");o[decodeURIComponent(u[0])]=decodeURIComponent(u.slice(1).join("="))}e=ao(e.replace(r,"")),t=ao(t||"");for(var c=Math.max(e.length,t.length),d=0;d<c;d++)if(t[d]&&t[d].charAt(0)===":"){var f=t[d].replace(/(^:|[+*?]+$)/g,""),p=(t[d].match(/[+*?]+$/)||Eu)[0]||"",m=~p.indexOf("+"),v=~p.indexOf("*"),g=e[d]||"";if(!g&&!v&&(p.indexOf("?")<0||m)){s=!1;break}if(o[f]=decodeURIComponent(g),m||v){o[f]=e.slice(d).map(decodeURIComponent).join("/");break}}else if(t[d]!==e[d]){s=!1;break}return n.default!==!0&&s===!1?!1:o}function Cu(e,t){return e.rank<t.rank?1:e.rank>t.rank?-1:e.index-t.index}function Iu(e,t){return e.index=t,e.rank=Nu(e),e.props}function ao(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function Mu(e){return e.charAt(0)==":"?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}function Ou(e){return ao(e).map(Mu).join("")}function Nu(e){return e.props.default?0:Ou(e.props.path)}var it=null,tn=[],lo=[],Tu={};function Lu(e,t){t===void 0&&(t="push"),it&&it[t]?it[t](e):typeof history!="undefined"&&history[t+"State"]&&history[t+"State"](null,null,e)}function Rn(){var e;return it&&it.location?e=it.location:it&&it.getCurrentLocation?e=it.getCurrentLocation():e=typeof location!="undefined"?location:Tu,""+(e.pathname||"")+(e.search||"")}function Zt(e,t){return t===void 0&&(t=!1),typeof e!="string"&&e.url&&(t=e.replace,e=e.url),Ru(e)&&Lu(e,t?"replace":"push"),el(e)}function Ru(e){for(var t=tn.length;t--;)if(tn[t].canRoute(e))return!0;return!1}function el(e){for(var t=!1,n=0;n<tn.length;n++)tn[n].routeTo(e)===!0&&(t=!0);for(var r=lo.length;r--;)lo[r](e);return t}function tl(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 Zt(t)}}function Pu(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button!==0))return tl(e.currentTarget||e.target||this),nl(e)}function nl(e){return e&&(e.stopImmediatePropagation&&e.stopImmediatePropagation(),e.stopPropagation&&e.stopPropagation(),e.preventDefault()),!1}function $u(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(tl(t))return nl(e)}while(t=t.parentNode)}}var ms=!1;function Du(){ms||(typeof addEventListener=="function"&&(it||addEventListener("popstate",function(){el(Rn())}),addEventListener("click",$u)),ms=!0)}var jt=function(e){function t(n){e.call(this,n),n.history&&(it=n.history),this.state={url:n.url||Rn()},Du()}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=vt(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(){tn.push(this),this.updating=!0},t.prototype.componentDidMount=function(){var r=this;it&&(this.unlisten=it.listen(function(i){r.routeTo(""+(i.pathname||"")+(i.search||""))})),this.updating=!1},t.prototype.componentWillUnmount=function(){typeof this.unlisten=="function"&&this.unlisten(),tn.splice(tn.indexOf(this),1)},t.prototype.componentWillUpdate=function(){this.updating=!0},t.prototype.componentDidUpdate=function(){this.updating=!1},t.prototype.getMatchingChildren=function(r,i,o){return r.filter(Iu).sort(Cu).map(function(s){var a=Qa(i,s.props.path,s.props);if(a){if(o!==!1){var l={url:i,matches:a};return Ka(l,a),delete l.ref,delete l.key,Ja(s,l)}return s}}).filter(Boolean)},t.prototype.render=function(r,i){var o=r.children,s=r.onChange,a=i.url,l=this.getMatchingChildren(vt(o),a,!0),u=l[0]||null,c=this.previousUrl;return a!==c&&(this.previousUrl=a,typeof s=="function"&&s({router:this,url:a,previous:c,active:l,current:u})),u},t}(_t),rl=function(e){return h("a",Ka({onClick:Pu},e))},Bu=function(e){return h(e.component,e)};jt.subscribers=lo;jt.getCurrentUrl=Rn;jt.route=Zt;jt.Router=jt;jt.Route=Bu;jt.Link=rl;jt.exec=Qa;var ve;(e=>{const t="Site",n="Generator";function l(C,y,E){ga("send","event",C,y,E)}function u(C,y){ga("set",`dimension${C}`,y)}function c(C){ga("set","page",C),ga("send","pageview")}e.pageview=c;function d(C,y){l(n,C,y)}e.generatorEvent=d;function f(C){return C==="menu"?"Menu":"Hotkey"}function p(C){u(4,C),gtag("set",{locale:C})}e.setLocale=p;function m(C,y){p(y),l(t,"set-language",y),gtag("event","change_locale",{prev_locale:C})}e.changeLocale=m;function v(C){u(1,C),gtag("set",{theme:C})}e.setTheme=v;function g(C,y){v(y),l(t,"set-theme",y),gtag("event","change_theme",{prev_theme:C})}e.changeTheme=g;function _(C){u(3,C),gtag("set",{version:C})}e.setVersion=_;function x(C,y){_(y),l(n,"set-version",y),gtag("event","change_version",{prev_version:C})}e.changeVersion=x;function w(C){u(6,C),gtag("event","use_generator",{file_type:C})}e.setGenerator=w;function b(C){u(7,C),gtag("set",{prefers_color_scheme:C})}e.setPrefersColorScheme=b;function A(C,y,E){l(n,"reset"),gtag("event","reset_generator",{file_type:C,history:y,method:E})}e.resetGenerator=A;function S(C,y,E){l(n,"undo",f(E)),gtag("event","undo_generator",{file_type:C,history:y,method:E})}e.undoGenerator=S;function I(C,y,E){l(n,"undo",f(E)),gtag("event","redo_generator",{file_type:C,history:y,method:E})}e.redoGenerator=I;function k(C,y,E,R){l(n,"save-project-file",f(R)),gtag("event","save_project_file",{file_type:C,project_size:y,projects_count:E,method:R})}e.saveProjectFile=k;function M(C,y){l(n,"load-preset",y),gtag("event","load_generator_preset",{file_type:C,file_name:y})}e.loadPreset=M;function N(C,y){gtag("event","open_generator_preset",{file_type:C,file_name:y})}e.openPreset=N;function L(C,y,E,R,j,Y){gtag("event","create_generator_snippet",{file_type:C,snippet_id:y,version:E,data_size:R,compressed_size:j,compression_rate:Y})}e.createSnippet=L;function $(C,y,E){gtag("event","open_generator_snippet",{file_type:C,snippet_id:y,version:E})}e.openSnippet=$;function K(C,y){l(n,"copy"),gtag("event","copy_generator_output",{file_type:C,method:y})}e.copyOutput=K;function ae(C,y){l(n,"download"),gtag("event","download_generator_output",{file_type:C,method:y})}e.downloadOutput=ae;function le(C,y){l(n,"toggle-output","visible"),gtag("event","show_generator_output",{file_type:C,method:y})}e.showOutput=le;function T(C,y){l(n,"toggle-output","hidden"),gtag("event","hide_generator_output",{file_type:C,method:y})}e.hideOutput=T;function D(C,y){l(n,"toggle-preview","visible"),gtag("event","show_generator_preview",{file_type:C,method:y})}e.showPreview=D;function V(C,y){l(n,"toggle-preview","hidden"),gtag("event","hide_generator_preview",{file_type:C,method:y})}e.hidePreview=V})(ve||(ve={}));var fn,ze,gs,Pn=0,co=[],_s=U.__b,vs=U.__r,ws=U.diffed,ys=U.__c,bs=U.unmount;function Hn(e,t){U.__h&&U.__h(ze,e,Pn||t),Pn=0;var n=ze.__H||(ze.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function B(e){return Pn=1,il(al,e)}function il(e,t,n){var r=Hn(fn++,2);return r.t=e,r.__c||(r.__=[n?n(t):al(void 0,t),function(i){var o=r.t(r.__[0],i);r.__[0]!==o&&(r.__=[o,r.__[1]],r.__c.setState({}))}],r.__c=ze),r.__}function Q(e,t){var n=Hn(fn++,3);!U.__s&&No(n.__H,t)&&(n.__=e,n.__H=t,ze.__H.__h.push(n))}function ol(e,t){var n=Hn(fn++,4);!U.__s&&No(n.__H,t)&&(n.__=e,n.__H=t,ze.__h.push(n))}function me(e){return Pn=5,ke(function(){return{current:e}},[])}function Fu(e,t,n){Pn=6,ol(function(){typeof e=="function"?e(t()):e&&(e.current=t())},n==null?n:n.concat(e))}function ke(e,t){var n=Hn(fn++,7);return No(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ee(e,t){return Pn=8,ke(function(){return e},t)}function pn(e){var t=ze.context[e.__c],n=Hn(fn++,9);return n.__c=e,t?(n.__==null&&(n.__=!0,t.sub(ze)),t.props.value):e.__}function zu(e,t){U.useDebugValue&&U.useDebugValue(t?t(e):e)}function sl(e){var t=Hn(fn++,10),n=B();return t.__=e,ze.componentDidCatch||(ze.componentDidCatch=function(r){t.__&&t.__(r),n[1](r)}),[n[0],function(){n[1](void 0)}]}function ju(){co.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(Yr),e.__H.__h.forEach(uo),e.__H.__h=[]}catch(t){e.__H.__h=[],U.__e(t,e.__v)}}),co=[]}U.__b=function(e){ze=null,_s&&_s(e)},U.__r=function(e){vs&&vs(e),fn=0;var t=(ze=e.__c).__H;t&&(t.__h.forEach(Yr),t.__h.forEach(uo),t.__h=[])},U.diffed=function(e){ws&&ws(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(co.push(t)!==1&&gs===U.requestAnimationFrame||((gs=U.requestAnimationFrame)||function(n){var r,i=function(){clearTimeout(o),xs&&cancelAnimationFrame(r),setTimeout(n)},o=setTimeout(i,100);xs&&(r=requestAnimationFrame(i))})(ju)),ze=void 0},U.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Yr),n.__h=n.__h.filter(function(r){return!r.__||uo(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],U.__e(r,n.__v)}}),ys&&ys(e,t)},U.unmount=function(e){bs&&bs(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Yr)}catch(n){U.__e(n,t.__v)}};var xs=typeof requestAnimationFrame=="function";function Yr(e){var t=ze;typeof e.__c=="function"&&e.__c(),ze=t}function uo(e){var t=ze;e.__c=e.__(),ze=t}function No(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function al(e,t){return typeof t=="function"?t(e):t}function br({type:e,id:t}){return Q(()=>{var n;(n=document.getElementById("ad-placeholder"))==null||n.remove(),"ethicalads"in window&ðicalads.load()},[]),h("div",{"data-ea-publisher":"misode-github-io","data-ea-type":e,class:"ad dark flat",id:t})}function Z({icon:e,label:t,active:n,class:r,tooltip:i,tooltipLoc:o,onClick:s}){return h("div",{class:`btn${n?" active":""}${r?` ${r}`:""}${i?` tooltipped tip-${o!=null?o:"sw"}`:""}${n?" tip-shown":""}`,onClick:s,"aria-label":i},e&&re[e],t&&h("span",null,t))}var Dr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function ll(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 O={},Mt={},St={};Object.defineProperty(St,"__esModule",{value:!0});St.ModelPath=St.Path=St.relativePath=void 0;function Vu(e,t){return t.reduce((n,r)=>r==="pop"?n.pop():n.push(r.push),e)}St.relativePath=Vu;class Rt{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 Rt(this.modelArr.slice(t,n),this.contextArr)}shift(){return new Rt(this.modelArr.slice(1),this.contextArr)}pop(){return new Rt(this.modelArr.slice(0,-1),this.contextArr)}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Rt([...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 Rt([...this.modelArr],[...this.contextArr,n])}copy(){return new Rt([...this.modelArr],[...this.contextArr])}getArray(){return this.modelArr}withModel(t){return new Pt(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)}}St.Path=Rt;class Pt extends Rt{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 Pt(this.model,super.slice(t,n))}shift(){return new Pt(this.model,super.shift())}pop(){return new Pt(this.model,super.pop())}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Pt(this.model,super.modelPush(t))}contextPush(t){return new Pt(this.model,super.contextPush(t))}copy(){return new Pt(this.model,super.copy())}}St.ModelPath=Pt;var Un={};Object.defineProperty(Un,"__esModule",{value:!0});Un.Errors=void 0;class Hu{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}}Un.Errors=Hu;var Et={};Object.defineProperty(Et,"__esModule",{value:!0});Et.hexId=Et.quoteString=Et.escapeString=void 0;function cl(e){return e.replace(/(\\|")/g,"\\$1")}Et.escapeString=cl;function Uu(e){return`"${cl(e)}"`}Et.quoteString=Uu;const Gu=e=>("0"+e.toString(16)).substr(-2);function Yu(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,Gu).join("")}Et.hexId=Yu;Object.defineProperty(Mt,"__esModule",{value:!0});Mt.DataModel=void 0;const Wu=St,As=Un,Yi=Et;class To{constructor(t,n){var r,i,o,s;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=(o=n==null?void 0:n.wrapLists)!==null&&o!==void 0?o:!1,this.schema=t;const a=(s=n==null?void 0:n.initialData)!==null&&s!==void 0?s:t.default();this.data=this.wrapLists?To.wrapLists(a):a,this.listeners=[],this.errors=new As.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(o=>{(i[o]===void 0||typeof i[o]=="string"||typeof i[o]=="number")&&(this.wrapLists&&typeof o=="number"?i[o]={node:{},id:(0,Yi.hexId)()}:i[o]={}),this.wrapLists&&typeof o=="number"?i=i[o].node:i=i[o]}),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,Yi.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 Wu.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 As.Errors;i.add(t,n,r),this.listeners.forEach(o=>{o.errors&&o.errors(i)})}static wrapLists(t){if(Array.isArray(t)){const n=t.map(r=>({node:this.wrapLists(r),id:(0,Yi.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}}Mt.DataModel=To;var Gt={};(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:o=>o,suggest:()=>[],validate:(o,s)=>s,validationOption:()=>{},hook(o,s,...a){return o.base({node:this},s,...a)},canUpdate:()=>!1,update:()=>[]};const t=(o,s)=>q(q({},o),typeof s=="function"?s(o):s);e.Mod=t;const n=(o,s)=>(0,e.Mod)(s,{enabled:a=>a.push(o).get()!==void 0});e.Has=n;function r(o){return _e(q({},o),{optional:()=>!0})}e.Opt=r;function i(o){return _e(q({},o),{keep:()=>!0})}e.Keep=i})(Gt);var Si={};Object.defineProperty(Si,"__esModule",{value:!0});Si.BooleanNode=void 0;const qu=Mt,Zu=Gt,Xu=()=>_e(q({},Zu.Base),{type:()=>"boolean",default:()=>!1,suggest:()=>["false","true"],validate(e,t,n,r){return r.loose&&typeof t!="boolean"&&(t=r.wrapLists?qu.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)}});Si.BooleanNode=Xu;var ul={},xr={};Object.defineProperty(xr,"__esModule",{value:!0});xr.ListNode=void 0;const Ju=Mt,Ku=Gt,Qu=(e,t)=>{var n,r;const i=(n=t==null?void 0:t.minLength)!==null&&n!==void 0?n:0,o=(r=t==null?void 0:t.maxLength)!==null&&r!==void 0?r:1/0,s=(t==null?void 0:t.minLength)&&(t==null?void 0:t.maxLength);return _e(q({},Ku.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?Ju.DataModel.wrapLists(this.default()):this.default()),Array.isArray(l))s&&(l.length<i||l.length>o)?i===o?u.add(a,"error.invalid_list_range.exact",l.length,i):u.add(a,"error.invalid_list_range.between",l.length,i,o):l.length<i?u.add(a,"error.invalid_list_range.smaller",l.length,i):l.length>o&&u.add(a,"error.invalid_list_range.larger",l.length,o);else return u.add(a,"error.expected_list"),l;const d=l.map((f,p)=>{const m=e.validate(a.push(p),c.wrapLists?f.node:f,u,c);return c.wrapLists?{node:m,id:f.id}:m});for(const f of Object.getOwnPropertySymbols(l))d[f]=l[f];return d},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)}})};xr.ListNode=Qu;var Ar={};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.SwitchNode=void 0;const ed=Gt,td=e=>_e(q({},ed.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(o=>o.match(t)).map(o=>o.node.suggest(t,n)).reduce((o,s)=>o.concat(s))},validate(t,n,r,i){let o=this.activeCase(t);return o===void 0?n:o.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=(o,s)=>{var a,l;return((a=s.priority)!==null&&a!==void 0?a:0)-((l=o.priority)!==null&&l!==void 0?l:0)},i=e.filter(o=>o.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)}});Ar.SwitchNode=td;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectOrPreset=e.StringOrList=e.ObjectOrList=e.ChoiceNode=void 0;const t=xr,n=Ar,r=(s,a)=>{const l=(c,d)=>{if(c.match)return c.match(d);switch(c.type){case"list":return Array.isArray(d);case"object":return typeof d=="object"&&!Array.isArray(d);default:return typeof d===c.type}},u=(0,n.SwitchNode)(s.map(c=>({type:c.type,priority:c.priority,match:d=>l(c,d.get()),node:c.node})));return _e(q({},u),{validate(c,d,f,p){let m=u.activeCase(c,!0);return m.node.optional()?d:m.node.validate(c,d,f,p)},hook(c,d,...f){var p;return((p=c.choice)!==null&&p!==void 0?p:c.base).call(c,{node:this,choices:s,config:a!=null?a:{},switchNode:u},d,...f)}})};e.ChoiceNode=r;const i=s=>(a,l)=>(0,e.ChoiceNode)([{type:s,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 o=(s,a,l)=>(0,e.ChoiceNode)([{type:"string",priority:1,node:s,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=o})(ul);var Ei={};Object.defineProperty(Ei,"__esModule",{value:!0});Ei.MapNode=void 0;const nd=Gt,rd=Mt,id=(e,t,n)=>_e(q({},nd.Base),{type:()=>"map",default:()=>({}),navigate(r,i){const o=i+1;return r.getArray().length<=o?this:t.navigate(r,o)},pathPush(r,i){return r.modelPush(i)},suggest:r=>e.suggest(r,""),validate(r,i,o,s){if(s.loose&&typeof i!="object"&&(i=s.wrapLists?rd.DataModel.wrapLists(this.default()):this.default()),i===null||typeof i!="object")return o.add(r,"error.expected_object"),i;const a={};Object.keys(i).forEach(l=>{e.validate(r,l,o,s),a[l]=t.validate(r.push(l),i[l],o,s)});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,...o){var s;return((s=r.map)!==null&&s!==void 0?s:r.base).call(r,{node:this,keys:e,children:t,config:n!=null?n:{}},i,...o)}});Ei.MapNode=id;var dl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberEnum=e.NumberNode=void 0;const t=O,n=Mt,r=Gt,i=s=>{var a,l,u;const c=s!=null&&s.color?!0:(a=s==null?void 0:s.integer)!==null&&a!==void 0?a:!1,d=s!=null&&s.color?0:(l=s==null?void 0:s.min)!==null&&l!==void 0?l:-1/0,f=s!=null&&s.color?16777215:(u=s==null?void 0:s.max)!==null&&u!==void 0?u:1/0,p=(s==null?void 0:s.min)!==void 0&&(s==null?void 0:s.max)!==void 0;return _e(q({},r.Base),{type:()=>"number",default:()=>d>0?d:0,validate(m,v,g,_){return _.loose&&typeof v!="number"&&(v=_.wrapLists?n.DataModel.wrapLists(this.default()):this.default()),typeof v!="number"?g.add(m,"error.expected_number"):c&&!Number.isInteger(v)?g.add(m,"error.expected_integer"):p&&(v<d||v>f)?g.add(m,"error.invalid_number_range.between",v,d,f):v<d?g.add(m,"error.invalid_number_range.smaller",v,d):v>f&&g.add(m,"error.invalid_number_range.larger",v,f),v},hook(m,v,...g){var _;return((_=m.number)!==null&&_!==void 0?_:m.base).call(m,{node:this,integer:c,min:d,max:f,between:p,config:s!=null?s:{}},v,...g)}})};e.NumberNode=i;const o=({integer:s,values:a})=>(0,t.Mod)((0,e.NumberNode)({integer:s}),l=>({validate:(u,c,d,f)=>(c=l.validate(u,c,d,f),a.includes(c)||d.add(u,"error.invalid_number_enum",a.join(", ")),c)}));e.NumberEnum=o})(dl);var hl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectNode=e.Case=e.Switch=void 0;const t=Gt,n=St,r=Un,i=Et,o=Mt;e.Switch=Symbol("switch"),e.Case=Symbol("case");const s=(a,l)=>{var m,v;const g=a,{[m=e.Switch]:u,[v=e.Case]:c}=g,d=us(g,[Gi(m),Gi(v)]),f=_=>{if(u===void 0)return d;const x=(0,n.relativePath)(_,u).get(),w=c[x];return q(q({},d),w)},p=(_,x)=>{var w;const b=u?(0,n.relativePath)(_,u).get():void 0,A=u?(w=c[b])!==null&&w!==void 0?w:{}:{},S=Object.keys(A),I=l!=null&&l.context?new n.ModelPath(_.getModel(),new n.Path(_.getArray(),[l.context])):_;return(!(l!=null&&l.disableSwitchContext)&&b&&S.includes(x)?I.contextPush(b):I).push(x)};return _e(q({},t.Base),{type:()=>"object",category:()=>l==null?void 0:l.category,default:()=>({}),keep(){return this.optional()},navigate(_,x){const w=x+1,b=_.getArray();if(b.length<=w)return this;const S=f(_.slice(0,w))[b[w]];return S==null?void 0:S.navigate(_,w)},pathPush(_,x){return p(_,x.toString())},suggest(_,x){const w=f(_),b=Object.keys(typeof x=="object"?x:{});return Object.keys(w).filter(A=>w[A].enabled(_)).filter(A=>!b.includes(A)).map(i.quoteString)},validate(_,x,w,b){if(b.loose&&typeof x!="object"&&(x=b.wrapLists?o.DataModel.wrapLists(this.default()):this.default()),typeof x!="object"||x===null)return w.add(_,"error.expected_object"),x;let A=d;if(u){const N=(0,n.relativePath)(_,u);let L=N.get();if(_.equals(N.pop())){const $=N.last();L=d[$].validate(_.push($),x[$],new r.Errors,b)}A=q(q({},A),c[L])}const S=Object.keys(A),I=S.filter(N=>!A[N].optional()),k=new Set([...I,...Object.keys(x)]),M={};k.forEach(N=>{if(S.includes(N)){if(!A[N].enabled(_))return;const L=A[N].validate(_.push(N),x[N],w,b);!A[N].keep()&&A[N].optional()&&(L===void 0||Array.isArray(L)&&L.length===0||L.constructor===Object&&Object.keys(L).length===0)?delete M[N]:(M[N]=L,_.getModel().set(_.push(N),L,!0))}else M[N]=x[N]});for(const N of Object.getOwnPropertySymbols(x))M[N]=x[N];return M},hook(_,x,...w){var b;return((b=_.object)!==null&&b!==void 0?b:_.base).call(_,{node:this,fields:d,config:l!=null?l:{},filter:u,cases:c,getActiveFields:f,getChildModelPath:p},x,...w)}})};e.ObjectNode=s})(hl);var Ci={};Object.defineProperty(Ci,"__esModule",{value:!0});Ci.Reference=void 0;const od=(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,o){return e.get(t).validate.bind(this)(n,r,i,o)},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)}});Ci.Reference=od;var Ii={};Object.defineProperty(Ii,"__esModule",{value:!0});Ii.StringNode=void 0;const sd=Gt,ad=Et,ld=Mt,ks=e=>!!(e!=null&&e.enum),Ss=e=>!!(e!=null&&e.validator),cd=(e,t)=>{const n=()=>{var r,i,o,s;if(ks(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?(o=e==null?void 0:e.get(`tag/${a}`).map(l=>`#${l}`))!==null&&o!==void 0?o:[]:[],...(s=e==null?void 0:e.get(a))!==null&&s!==void 0?s:[]]}return t.params.pool}return[]};return _e(q({},sd.Base),{type:()=>"string",default:()=>"",validate(r,i,o,s){if(s.loose&&typeof i!="string"&&(i=(s.wrapLists?ld.DataModel.wrapLists(this.default()):this.default())||void 0),typeof i!="string")return o.add(r,"error.expected_string"),i;if(Ss(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 o.add(r,"error.disallowed_tag_prefix"),i;if(!t.params.allowTag&&!t.params.requireTag)return o.add(r,"error.disallowed_tag"),i;l=l.slice(1)}else if(t.params.requireTag)return o.add(r,"error.expected_tag"),i;if(!l.match(/^(?:[_\-a-z0-9.]*:)?[_\-a-z0-9/.]*$/g))return o.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("#")||typeof i=="string"&&i.includes(":")&&!i.startsWith("minecraft:")||t.params.isDefinition||t.params.allowUnknown))return i}if(ks(t)&&t.additional)return i;const a=n();return a.length>0&&!a.includes(i)&&o.add(r,"error.invalid_enum_option",i),i},suggest:()=>n().map(ad.quoteString),validationOption(){return Ss(t)?t:void 0},hook(r,i,...o){var s;return((s=r.string)!==null&&s!==void 0?s:r.base).call(r,{node:this,getValues:n,config:t},i,...o)}})};Ii.StringNode=cd;var fl={};Object.defineProperty(fl,"__esModule",{value:!0});var $n={};Object.defineProperty($n,"__esModule",{value:!0});$n.CollectionRegistry=$n.SchemaRegistry=void 0;class ud{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}}$n.SchemaRegistry=ud;class dd{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:[]}}$n.CollectionRegistry=dd;var pl={};Object.defineProperty(pl,"__esModule",{value:!0});(function(e){var t=Dr&&Dr.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=Dr&&Dr.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(Mt,e),n(St,e),n(Un,e),n(Gt,e),n(Si,e),n(ul,e),n(xr,e),n(Ei,e),n(dl,e),n(hl,e),n(Ci,e),n(Ii,e),n(Ar,e),n(fl,e),n($n,e),n(pl,e)})(O);var Oe={},kr={},ht={};function ml(e){return typeof e=="undefined"||e===null}function hd(e){return typeof e=="object"&&e!==null}function fd(e){return Array.isArray(e)?e:ml(e)?[]:[e]}function pd(e,t){var n,r,i,o;if(t)for(o=Object.keys(t),n=0,r=o.length;n<r;n+=1)i=o[n],e[i]=t[i];return e}function md(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function gd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}ht.isNothing=ml;ht.isObject=hd;ht.toArray=fd;ht.repeat=md;ht.isNegativeZero=gd;ht.extend=pd;function cr(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||""}cr.prototype=Object.create(Error.prototype);cr.prototype.constructor=cr;cr.prototype.toString=function(t){var n=this.name+": ";return n+=this.reason||"(unknown reason)",!t&&this.mark&&(n+=" "+this.mark.toString()),n};var Sr=cr,Es=ht;function Lo(e,t,n,r,i){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=i}Lo.prototype.getSnippet=function(t,n){var r,i,o,s,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(o="",s=this.position;s<this.buffer.length&&`\0\r
|
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>n/2-1){o=" ... ",s-=5;break}return a=this.buffer.slice(i,s),Es.repeat(" ",t)+r+a+o+`
|
|
`+Es.repeat(" ",t+this.position-i+r.length)+"^"};Lo.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 _d=Lo,Cs=Sr,vd=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],wd=["scalar","sequence","mapping"];function yd(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function bd(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(vd.indexOf(n)===-1)throw new Cs('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=yd(t.styleAliases||null),wd.indexOf(this.kind)===-1)throw new Cs('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Be=bd,Is=ht,Wr=Sr,xd=Be;function ho(e,t,n){var r=[];return e.include.forEach(function(i){n=ho(i,t,n)}),e[t].forEach(function(i){n.forEach(function(o,s){o.tag===i.tag&&o.kind===i.kind&&r.push(s)}),n.push(i)}),n.filter(function(i,o){return r.indexOf(o)===-1})}function Ad(){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 kn(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 Wr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=ho(this,"implicit",[]),this.compiledExplicit=ho(this,"explicit",[]),this.compiledTypeMap=Ad(this.compiledImplicit,this.compiledExplicit)}kn.DEFAULT=null;kn.create=function(){var t,n;switch(arguments.length){case 1:t=kn.DEFAULT,n=arguments[0];break;case 2:t=arguments[0],n=arguments[1];break;default:throw new Wr("Wrong number of arguments for Schema.create function")}if(t=Is.toArray(t),n=Is.toArray(n),!t.every(function(r){return r instanceof kn}))throw new Wr("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!n.every(function(r){return r instanceof xd}))throw new Wr("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new kn({include:t,explicit:n})};var Gn=kn,kd=Be,Sd=new kd("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Ed=Be,Cd=new Ed("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Id=Be,Md=new Id("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Od=Gn,Ro=new Od({explicit:[Sd,Cd,Md]}),Nd=Be;function Td(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Ld(){return null}function Rd(e){return e===null}var Pd=new Nd("tag:yaml.org,2002:null",{kind:"scalar",resolve:Td,construct:Ld,predicate:Rd,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),$d=Be;function Dd(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 Bd(e){return e==="true"||e==="True"||e==="TRUE"}function Fd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var zd=new $d("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Dd,construct:Bd,predicate:Fd,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"}),jd=ht,Vd=Be;function Hd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Ud(e){return 48<=e&&e<=55}function Gd(e){return 48<=e&&e<=57}function Yd(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(!Hd(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}for(;n<t;n++)if(i=e[n],i!=="_"){if(!Ud(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(!Gd(e.charCodeAt(n)))return!1;r=!0}return!r||i==="_"?!1:i!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(n))}function Wd(e){var t=e,n=1,r,i,o=[];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(s){o.unshift(parseInt(s,10))}),t=0,i=1,o.forEach(function(s){t+=s*i,i*=60}),n*t):n*parseInt(t,10)}function qd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!jd.isNegativeZero(e)}var Zd=new Vd("tag:yaml.org,2002:int",{kind:"scalar",resolve:Yd,construct:Wd,predicate:qd,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"]}}),gl=ht,Xd=Be,Jd=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 Kd(e){return!(e===null||!Jd.test(e)||e[e.length-1]==="_")}function Qd(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(o){i.unshift(parseFloat(o,10))}),t=0,r=1,i.forEach(function(o){t+=o*r,r*=60}),n*t):n*parseFloat(t,10)}var eh=/^[-+]?[0-9]+e/;function th(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(gl.isNegativeZero(e))return"-0.0";return n=e.toString(10),eh.test(n)?n.replace("e",".e"):n}function nh(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||gl.isNegativeZero(e))}var rh=new Xd("tag:yaml.org,2002:float",{kind:"scalar",resolve:Kd,construct:Qd,predicate:nh,represent:th,defaultStyle:"lowercase"}),ih=Gn,_l=new ih({include:[Ro],implicit:[Pd,zd,Zd,rh]}),oh=Gn,vl=new oh({include:[_l]}),sh=Be,wl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),yl=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 ah(e){return e===null?!1:wl.exec(e)!==null||yl.exec(e)!==null}function lh(e){var t,n,r,i,o,s,a,l=0,u=null,c,d,f;if(t=wl.exec(e),t===null&&(t=yl.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(o=+t[4],s=+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],d=+(t[11]||0),u=(c*60+d)*6e4,t[9]==="-"&&(u=-u)),f=new Date(Date.UTC(n,r,i,o,s,a,l)),u&&f.setTime(f.getTime()-u),f}function ch(e){return e.toISOString()}var uh=new sh("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ah,construct:lh,instanceOf:Date,represent:ch}),dh=Be;function hh(e){return e==="<<"||e===null}var fh=new dh("tag:yaml.org,2002:merge",{kind:"scalar",resolve:hh}),en;try{var ph=ll;en=ph("buffer").Buffer}catch{}var mh=Be,Po=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
\r`;function gh(e){if(e===null)return!1;var t,n,r=0,i=e.length,o=Po;for(n=0;n<i;n++)if(t=o.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function _h(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=Po,s=0,a=[];for(t=0;t<i;t++)t%4===0&&t&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|o.indexOf(r.charAt(t));return n=i%4*6,n===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):n===18?(a.push(s>>10&255),a.push(s>>2&255)):n===12&&a.push(s>>4&255),en?en.from?en.from(a):new en(a):a}function vh(e){var t="",n=0,r,i,o=e.length,s=Po;for(r=0;r<o;r++)r%3===0&&r&&(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]),n=(n<<8)+e[r];return i=o%3,i===0?(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]):i===2?(t+=s[n>>10&63],t+=s[n>>4&63],t+=s[n<<2&63],t+=s[64]):i===1&&(t+=s[n>>2&63],t+=s[n<<4&63],t+=s[64],t+=s[64]),t}function wh(e){return en&&en.isBuffer(e)}var yh=new mh("tag:yaml.org,2002:binary",{kind:"scalar",resolve:gh,construct:_h,predicate:wh,represent:vh}),bh=Be,xh=Object.prototype.hasOwnProperty,Ah=Object.prototype.toString;function kh(e){if(e===null)return!0;var t=[],n,r,i,o,s,a=e;for(n=0,r=a.length;n<r;n+=1){if(i=a[n],s=!1,Ah.call(i)!=="[object Object]")return!1;for(o in i)if(xh.call(i,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function Sh(e){return e!==null?e:[]}var Eh=new bh("tag:yaml.org,2002:omap",{kind:"sequence",resolve:kh,construct:Sh}),Ch=Be,Ih=Object.prototype.toString;function Mh(e){if(e===null)return!0;var t,n,r,i,o,s=e;for(o=new Array(s.length),t=0,n=s.length;t<n;t+=1){if(r=s[t],Ih.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;o[t]=[i[0],r[i[0]]]}return!0}function Oh(e){if(e===null)return[];var t,n,r,i,o,s=e;for(o=new Array(s.length),t=0,n=s.length;t<n;t+=1)r=s[t],i=Object.keys(r),o[t]=[i[0],r[i[0]]];return o}var Nh=new Ch("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Mh,construct:Oh}),Th=Be,Lh=Object.prototype.hasOwnProperty;function Rh(e){if(e===null)return!0;var t,n=e;for(t in n)if(Lh.call(n,t)&&n[t]!==null)return!1;return!0}function Ph(e){return e!==null?e:{}}var $h=new Th("tag:yaml.org,2002:set",{kind:"mapping",resolve:Rh,construct:Ph}),Dh=Gn,Er=new Dh({include:[vl],implicit:[uh,fh],explicit:[yh,Eh,Nh,$h]}),Bh=Be;function Fh(){return!0}function zh(){}function jh(){return""}function Vh(e){return typeof e=="undefined"}var Hh=new Bh("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:Fh,construct:zh,predicate:Vh,represent:jh}),Uh=Be;function Gh(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 Yh(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 Wh(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function qh(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var Zh=new Uh("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:Gh,construct:Yh,predicate:qh,represent:Wh}),li;try{var Xh=ll;li=Xh("esprima")}catch{typeof window!="undefined"&&(li=window.esprima)}var Jh=Be;function Kh(e){if(e===null)return!1;try{var t="("+e+")",n=li.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 Qh(e){var t="("+e+")",n=li.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(o){r.push(o.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 ef(e){return e.toString()}function tf(e){return Object.prototype.toString.call(e)==="[object Function]"}var nf=new Jh("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:Kh,construct:Qh,predicate:tf,represent:ef}),Ms=Gn,Mi=Ms.DEFAULT=new Ms({include:[Er],explicit:[Hh,Zh,nf]}),Dt=ht,bl=Sr,rf=_d,xl=Er,of=Mi,Xt=Object.prototype.hasOwnProperty,ci=1,Al=2,kl=3,ui=4,Wi=1,sf=2,Os=3,af=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,lf=/[\x85\u2028\u2029]/,cf=/[,\[\]\{\}]/,Sl=/^(?:!|!!|![a-z\-]+!)$/i,El=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ns(e){return Object.prototype.toString.call(e)}function Ct(e){return e===10||e===13}function nn(e){return e===9||e===32}function Qe(e){return e===9||e===32||e===10||e===13}function Sn(e){return e===44||e===91||e===93||e===123||e===125}function uf(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function df(e){return e===120?2:e===117?4:e===85?8:0}function hf(e){return 48<=e&&e<=57?e-48:-1}function Ts(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 ff(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var Cl=new Array(256),Il=new Array(256);for(var wn=0;wn<256;wn++)Cl[wn]=Ts(wn)?1:0,Il[wn]=Ts(wn);function pf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||of,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 Ml(e,t){return new bl(t,new rf(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function X(e,t){throw Ml(e,t)}function di(e,t){e.onWarning&&e.onWarning.call(null,Ml(e,t))}var Ls={YAML:function(t,n,r){var i,o,s;t.version!==null&&X(t,"duplication of %YAML directive"),r.length!==1&&X(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&X(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&X(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&di(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,o;r.length!==2&&X(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],Sl.test(i)||X(t,"ill-formed tag handle (first argument) of the TAG directive"),Xt.call(t.tagMap,i)&&X(t,'there is a previously declared suffix for "'+i+'" tag handle'),El.test(o)||X(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=o}};function qt(e,t,n,r){var i,o,s,a;if(t<n){if(a=e.input.slice(t,n),r)for(i=0,o=a.length;i<o;i+=1)s=a.charCodeAt(i),s===9||32<=s&&s<=1114111||X(e,"expected valid JSON character");else af.test(a)&&X(e,"the stream contains non-printable characters");e.result+=a}}function Rs(e,t,n,r){var i,o,s,a;for(Dt.isObject(n)||X(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),s=0,a=i.length;s<a;s+=1)o=i[s],Xt.call(t,o)||(t[o]=n[o],r[o]=!0)}function En(e,t,n,r,i,o,s,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])&&X(e,"nested arrays are not supported inside keys"),typeof i=="object"&&Ns(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&Ns(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,u=o.length;l<u;l+=1)Rs(e,t,o[l],n);else Rs(e,t,o,n);else!e.json&&!Xt.call(n,i)&&Xt.call(t,i)&&(e.line=s||e.line,e.position=a||e.position,X(e,"duplicated mapping key")),t[i]=o,delete n[i];return t}function $o(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++):X(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function Ne(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;nn(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(Ct(i))for($o(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&&di(e,"deficient indentation"),r}function Oi(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 Do(e,t){t===1?e.result+=" ":t>1&&(e.result+=Dt.repeat(`
|
|
`,t-1))}function mf(e,t,n){var r,i,o,s,a,l,u,c,d=e.kind,f=e.result,p;if(p=e.input.charCodeAt(e.position),Qe(p)||Sn(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),Qe(i)||n&&Sn(i)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,a=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),Qe(i)||n&&Sn(i))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),Qe(r))break}else{if(e.position===e.lineStart&&Oi(e)||n&&Sn(p))break;if(Ct(p))if(l=e.line,u=e.lineStart,c=e.lineIndent,Ne(e,!1,-1),e.lineIndent>=t){a=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=u,e.lineIndent=c;break}}a&&(qt(e,o,s,!1),Do(e,e.line-l),o=s=e.position,a=!1),nn(p)||(s=e.position+1),p=e.input.charCodeAt(++e.position)}return qt(e,o,s,!1),e.result?!0:(e.kind=d,e.result=f,!1)}function gf(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(qt(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 Ct(n)?(qt(e,r,i,!0),Do(e,Ne(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Oi(e)?X(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);X(e,"unexpected end of the stream within a single quoted scalar")}function _f(e,t){var n,r,i,o,s,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 qt(e,n,e.position,!0),e.position++,!0;if(a===92){if(qt(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),Ct(a))Ne(e,!1,t);else if(a<256&&Cl[a])e.result+=Il[a],e.position++;else if((s=df(a))>0){for(i=s,o=0;i>0;i--)a=e.input.charCodeAt(++e.position),(s=uf(a))>=0?o=(o<<4)+s:X(e,"expected hexadecimal character");e.result+=ff(o),e.position++}else X(e,"unknown escape sequence");n=r=e.position}else Ct(a)?(qt(e,n,r,!0),Do(e,Ne(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Oi(e)?X(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}X(e,"unexpected end of the stream within a double quoted scalar")}function vf(e,t){var n=!0,r,i=e.tag,o,s=e.anchor,a,l,u,c,d,f={},p,m,v,g;if(g=e.input.charCodeAt(e.position),g===91)l=93,d=!1,o=[];else if(g===123)l=125,d=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),g=e.input.charCodeAt(++e.position);g!==0;){if(Ne(e,!0,t),g=e.input.charCodeAt(e.position),g===l)return e.position++,e.tag=i,e.anchor=s,e.kind=d?"mapping":"sequence",e.result=o,!0;n||X(e,"missed comma between flow collection entries"),m=p=v=null,u=c=!1,g===63&&(a=e.input.charCodeAt(e.position+1),Qe(a)&&(u=c=!0,e.position++,Ne(e,!0,t))),r=e.line,Dn(e,t,ci,!1,!0),m=e.tag,p=e.result,Ne(e,!0,t),g=e.input.charCodeAt(e.position),(c||e.line===r)&&g===58&&(u=!0,g=e.input.charCodeAt(++e.position),Ne(e,!0,t),Dn(e,t,ci,!1,!0),v=e.result),d?En(e,o,f,m,p,v):u?o.push(En(e,null,f,m,p,v)):o.push(p),Ne(e,!0,t),g=e.input.charCodeAt(e.position),g===44?(n=!0,g=e.input.charCodeAt(++e.position)):n=!1}X(e,"unexpected end of the stream within a flow collection")}function wf(e,t){var n,r,i=Wi,o=!1,s=!1,a=t,l=0,u=!1,c,d;if(d=e.input.charCodeAt(e.position),d===124)r=!1;else if(d===62)r=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Wi===i?i=d===43?Os:sf:X(e,"repeat of a chomping mode identifier");else if((c=hf(d))>=0)c===0?X(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?X(e,"repeat of an indentation width identifier"):(a=t+c-1,s=!0);else break;if(nn(d)){do d=e.input.charCodeAt(++e.position);while(nn(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Ct(d)&&d!==0)}for(;d!==0;){for($o(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!s||e.lineIndent<a)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>a&&(a=e.lineIndent),Ct(d)){l++;continue}if(e.lineIndent<a){i===Os?e.result+=Dt.repeat(`
|
|
`,o?1+l:l):i===Wi&&o&&(e.result+=`
|
|
`);break}for(r?nn(d)?(u=!0,e.result+=Dt.repeat(`
|
|
`,o?1+l:l)):u?(u=!1,e.result+=Dt.repeat(`
|
|
`,l+1)):l===0?o&&(e.result+=" "):e.result+=Dt.repeat(`
|
|
`,l):e.result+=Dt.repeat(`
|
|
`,o?1+l:l),o=!0,s=!0,l=0,n=e.position;!Ct(d)&&d!==0;)d=e.input.charCodeAt(++e.position);qt(e,n,e.position,!1)}return!0}function Ps(e,t){var n,r=e.tag,i=e.anchor,o=[],s,a=!1,l;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&!(l!==45||(s=e.input.charCodeAt(e.position+1),!Qe(s)));){if(a=!0,e.position++,Ne(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(n=e.line,Dn(e,t,kl,!1,!0),o.push(e.result),Ne(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&l!==0)X(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=o,!0):!1}function yf(e,t,n){var r,i,o,s,a=e.tag,l=e.anchor,u={},c={},d=null,f=null,p=null,m=!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),o=e.line,s=e.position,(g===63||g===58)&&Qe(r))g===63?(m&&(En(e,u,c,d,f,null),d=f=p=null),v=!0,m=!0,i=!0):m?(m=!1,i=!0):X(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(Dn(e,n,Al,!1,!0))if(e.line===o){for(g=e.input.charCodeAt(e.position);nn(g);)g=e.input.charCodeAt(++e.position);if(g===58)g=e.input.charCodeAt(++e.position),Qe(g)||X(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(En(e,u,c,d,f,null),d=f=p=null),v=!0,m=!1,i=!1,d=e.tag,f=e.result;else if(v)X(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=a,e.anchor=l,!0}else if(v)X(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===o||e.lineIndent>t)&&(Dn(e,t,ui,!0,i)&&(m?f=e.result:p=e.result),m||(En(e,u,c,d,f,p,o,s),d=f=p=null),Ne(e,!0,-1),g=e.input.charCodeAt(e.position)),e.lineIndent>t&&g!==0)X(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&En(e,u,c,d,f,null),v&&(e.tag=a,e.anchor=l,e.kind="mapping",e.result=u),v}function bf(e){var t,n=!1,r=!1,i,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&X(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(n=!0,s=e.input.charCodeAt(++e.position)):s===33?(r=!0,i="!!",s=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):X(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Qe(s);)s===33&&(r?X(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),Sl.test(i)||X(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),cf.test(o)&&X(e,"tag suffix cannot contain flow indicator characters")}return o&&!El.test(o)&&X(e,"tag name cannot contain such characters: "+o),n?e.tag=o:Xt.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:X(e,'undeclared tag handle "'+i+'"'),!0}function xf(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&X(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Qe(n)&&!Sn(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&X(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Af(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)&&!Sn(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&X(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),Xt.call(e.anchorMap,n)||X(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Ne(e,!0,-1),!0}function Dn(e,t,n,r,i){var o,s,a,l=1,u=!1,c=!1,d,f,p,m,v;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=a=ui===n||kl===n,r&&Ne(e,!0,-1)&&(u=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;bf(e)||xf(e);)Ne(e,!0,-1)?(u=!0,a=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):a=!1;if(a&&(a=u||i),(l===1||ui===n)&&(ci===n||Al===n?m=t:m=t+1,v=e.position-e.lineStart,l===1?a&&(Ps(e,v)||yf(e,v,m))||vf(e,m)?c=!0:(s&&wf(e,m)||gf(e,m)||_f(e,m)?c=!0:Af(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&X(e,"alias node should not have any properties")):mf(e,m,ci===n)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=a&&Ps(e,v))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&X(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,f=e.implicitTypes.length;d<f;d+=1)if(p=e.implicitTypes[d],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else Xt.call(e.typeMap[e.kind||"fallback"],e.tag)?(p=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&p.kind!==e.kind&&X(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result)?(e.result=p.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):X(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):X(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}function kf(e){var t=e.position,n,r,i,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(s=e.input.charCodeAt(e.position))!==0&&(Ne(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),n=e.position;s!==0&&!Qe(s);)s=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&X(e,"directive name must not be less than one character in length");s!==0;){for(;nn(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!Ct(s));break}if(Ct(s))break;for(n=e.position;s!==0&&!Qe(s);)s=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}s!==0&&$o(e),Xt.call(Ls,r)?Ls[r](e,r,i):di(e,'unknown document directive "'+r+'"')}if(Ne(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,Ne(e,!0,-1)):o&&X(e,"directives end mark is expected"),Dn(e,e.lineIndent-1,ui,!1,!0),Ne(e,!0,-1),e.checkLineBreaks&&lf.test(e.input.slice(t,e.position))&&di(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Oi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ne(e,!0,-1));return}if(e.position<e.length-1)X(e,"end of the stream or a document separator is expected");else return}function Ol(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 pf(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,X(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;)kf(n);return n.documents}function Nl(e,t,n){t!==null&&typeof t=="object"&&typeof n=="undefined"&&(n=t,t=null);var r=Ol(e,n);if(typeof t!="function")return r;for(var i=0,o=r.length;i<o;i+=1)t(r[i])}function Tl(e,t){var n=Ol(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new bl("expected a single document in the stream, but found more")}}function Sf(e,t,n){return typeof t=="object"&&t!==null&&typeof n=="undefined"&&(n=t,t=null),Nl(e,t,Dt.extend({schema:xl},n))}function Ef(e,t){return Tl(e,Dt.extend({schema:xl},t))}kr.loadAll=Nl;kr.load=Tl;kr.safeLoadAll=Sf;kr.safeLoad=Ef;var Bo={},Cr=ht,Ir=Sr,Cf=Mi,If=Er,Ll=Object.prototype.toString,Rl=Object.prototype.hasOwnProperty,Mf=9,ur=10,Of=13,Nf=32,Tf=33,Lf=34,Pl=35,Rf=37,Pf=38,$f=39,Df=42,$l=44,Bf=45,Dl=58,Ff=61,zf=62,jf=63,Vf=64,Bl=91,Fl=93,Hf=96,zl=123,Uf=124,jl=125,He={};He[0]="\\0";He[7]="\\a";He[8]="\\b";He[9]="\\t";He[10]="\\n";He[11]="\\v";He[12]="\\f";He[13]="\\r";He[27]="\\e";He[34]='\\"';He[92]="\\\\";He[133]="\\N";He[160]="\\_";He[8232]="\\L";He[8233]="\\P";var Gf=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Yf(e,t){var n,r,i,o,s,a,l;if(t===null)return{};for(n={},r=Object.keys(t),i=0,o=r.length;i<o;i+=1)s=r[i],a=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&Rl.call(l.styleAliases,a)&&(a=l.styleAliases[a]),n[s]=a;return n}function $s(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 Ir("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+Cr.repeat("0",r-t.length)+t}function Wf(e){this.schema=e.schema||Cf,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Cr.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Yf(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 Ds(e,t){for(var n=Cr.repeat(" ",t),r=0,i=-1,o="",s,a=e.length;r<a;)i=e.indexOf(`
|
|
`,r),i===-1?(s=e.slice(r),r=a):(s=e.slice(r,i+1),r=i+1),s.length&&s!==`
|
|
`&&(o+=n),o+=s;return o}function fo(e,t){return`
|
|
`+Cr.repeat(" ",e.indent*t)}function qf(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 Fo(e){return e===Nf||e===Mf}function Bn(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 Zf(e){return Bn(e)&&!Fo(e)&&e!==65279&&e!==Of&&e!==ur}function Bs(e,t){return Bn(e)&&e!==65279&&e!==$l&&e!==Bl&&e!==Fl&&e!==zl&&e!==jl&&e!==Dl&&(e!==Pl||t&&Zf(t))}function Xf(e){return Bn(e)&&e!==65279&&!Fo(e)&&e!==Bf&&e!==jf&&e!==Dl&&e!==$l&&e!==Bl&&e!==Fl&&e!==zl&&e!==jl&&e!==Pl&&e!==Pf&&e!==Df&&e!==Tf&&e!==Uf&&e!==Ff&&e!==zf&&e!==$f&&e!==Lf&&e!==Rf&&e!==Vf&&e!==Hf}function Vl(e){var t=/^\n* /;return t.test(e)}var Hl=1,Ul=2,Gl=3,Yl=4,qr=5;function Jf(e,t,n,r,i){var o,s,a,l=!1,u=!1,c=r!==-1,d=-1,f=Xf(e.charCodeAt(0))&&!Fo(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),!Bn(s))return qr;a=o>0?e.charCodeAt(o-1):null,f=f&&Bs(s,a)}else{for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),s===ur)l=!0,c&&(u=u||o-d-1>r&&e[d+1]!==" ",d=o);else if(!Bn(s))return qr;a=o>0?e.charCodeAt(o-1):null,f=f&&Bs(s,a)}u=u||c&&o-d-1>r&&e[d+1]!==" "}return!l&&!u?f&&!i(e)?Hl:Ul:n>9&&Vl(e)?qr:u?Yl:Gl}function Kf(e,t,n,r){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&Gf.indexOf(t)!==-1)return"'"+t+"'";var i=e.indent*Math.max(1,n),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),s=r||e.flowLevel>-1&&n>=e.flowLevel;function a(l){return qf(e,l)}switch(Jf(t,s,e.indent,o,a)){case Hl:return t;case Ul:return"'"+t.replace(/'/g,"''")+"'";case Gl:return"|"+Fs(t,e.indent)+zs(Ds(t,i));case Yl:return">"+Fs(t,e.indent)+zs(Ds(Qf(t,o),i));case qr:return'"'+e0(t)+'"';default:throw new Ir("impossible error: invalid scalar style")}}()}function Fs(e,t){var n=Vl(e)?String(t):"",r=e[e.length-1]===`
|
|
`,i=r&&(e[e.length-2]===`
|
|
`||e===`
|
|
`),o=i?"+":r?"":"-";return n+o+`
|
|
`}function zs(e){return e[e.length-1]===`
|
|
`?e.slice(0,-1):e}function Qf(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var u=e.indexOf(`
|
|
`);return u=u!==-1?u:e.length,n.lastIndex=u,js(e.slice(0,u),t)}(),i=e[0]===`
|
|
`||e[0]===" ",o,s;s=n.exec(e);){var a=s[1],l=s[2];o=l[0]===" ",r+=a+(!i&&!o&&l!==""?`
|
|
`:"")+js(l,t),i=o}return r}function js(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,o,s=0,a=0,l="";r=n.exec(e);)a=r.index,a-i>t&&(o=s>i?s:a,l+=`
|
|
`+e.slice(i,o),i=o+1),s=a;return l+=`
|
|
`,e.length-i>t&&s>i?l+=e.slice(i,s)+`
|
|
`+e.slice(s+1):l+=e.slice(i),l.slice(1)}function e0(e){for(var t="",n,r,i,o=0;o<e.length;o++){if(n=e.charCodeAt(o),n>=55296&&n<=56319&&(r=e.charCodeAt(o+1),r>=56320&&r<=57343)){t+=$s((n-55296)*1024+r-56320+65536),o++;continue}i=He[n],t+=!i&&Bn(n)?e[o]:i||$s(n)}return t}function t0(e,t,n){var r="",i=e.tag,o,s;for(o=0,s=n.length;o<s;o+=1)sn(e,t,n[o],!1,!1)&&(o!==0&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function n0(e,t,n,r){var i="",o=e.tag,s,a;for(s=0,a=n.length;s<a;s+=1)sn(e,t+1,n[s],!0,!0)&&((!r||s!==0)&&(i+=fo(e,t)),e.dump&&ur===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function r0(e,t,n){var r="",i=e.tag,o=Object.keys(n),s,a,l,u,c;for(s=0,a=o.length;s<a;s+=1)c="",s!==0&&(c+=", "),e.condenseFlow&&(c+='"'),l=o[s],u=n[l],sn(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),sn(e,t,u,!1,!1)&&(c+=e.dump,r+=c));e.tag=i,e.dump="{"+r+"}"}function i0(e,t,n,r){var i="",o=e.tag,s=Object.keys(n),a,l,u,c,d,f;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Ir("sortKeys must be a boolean or a function");for(a=0,l=s.length;a<l;a+=1)f="",(!r||a!==0)&&(f+=fo(e,t)),u=s[a],c=n[u],sn(e,t+1,u,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&ur===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,d&&(f+=fo(e,t)),sn(e,t+1,c,!0,d)&&(e.dump&&ur===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,i+=f));e.tag=o,e.dump=i||"{}"}function Vs(e,t,n){var r,i,o,s,a,l;for(i=n?e.explicitTypes:e.implicitTypes,o=0,s=i.length;o<s;o+=1)if(a=i[o],(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,Ll.call(a.represent)==="[object Function]")r=a.represent(t,l);else if(Rl.call(a.represent,l))r=a.represent[l](t,l);else throw new Ir("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function sn(e,t,n,r,i,o){e.tag=null,e.dump=n,Vs(e,n,!1)||Vs(e,n,!0);var s=Ll.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var a=s==="[object Object]"||s==="[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),s==="[object Object]")r&&Object.keys(e.dump).length!==0?(i0(e,t,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(r0(e,t,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump));else if(s==="[object Array]"){var c=e.noArrayIndent&&t>0?t-1:t;r&&e.dump.length!==0?(n0(e,c,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(t0(e,c,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump))}else if(s==="[object String]")e.tag!=="?"&&Kf(e,e.dump,t,o);else{if(e.skipInvalid)return!1;throw new Ir("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function o0(e,t){var n=[],r=[],i,o;for(po(e,n,r),i=0,o=r.length;i<o;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(o)}function po(e,t,n){var r,i,o;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,o=e.length;i<o;i+=1)po(e[i],t,n);else for(r=Object.keys(e),i=0,o=r.length;i<o;i+=1)po(e[r[i]],t,n)}function Wl(e,t){t=t||{};var n=new Wf(t);return n.noRefs||o0(e,n),sn(n,0,e,!0,!0)?n.dump+`
|
|
`:""}function s0(e,t){return Wl(e,Cr.extend({schema:If},t))}Bo.dump=Wl;Bo.safeDump=s0;var Ni=kr,ql=Bo;function Ti(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}Oe.Type=Be;Oe.Schema=Gn;Oe.FAILSAFE_SCHEMA=Ro;Oe.JSON_SCHEMA=_l;Oe.CORE_SCHEMA=vl;Oe.DEFAULT_SAFE_SCHEMA=Er;Oe.DEFAULT_FULL_SCHEMA=Mi;Oe.load=Ni.load;Oe.loadAll=Ni.loadAll;Oe.safeLoad=Ni.safeLoad;Oe.safeLoadAll=Ni.safeLoadAll;Oe.dump=ql.dump;Oe.safeDump=ql.safeDump;Oe.YAMLException=Sr;Oe.MINIMAL_SCHEMA=Ro;Oe.SAFE_SCHEMA=Er;Oe.DEFAULT_SCHEMA=Mi;Oe.scan=Ti("scan");Oe.parse=Ti("parse");Oe.compose=Ti("compose");Oe.addConstructor=Ti("addConstructor");var a0=Oe,mo=a0,l0=c0;function In(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function c0(e){if(e=e||{},e.circles)return u0(e);return e.proto?r:n;function t(i,o){for(var s=Object.keys(i),a=new Array(s.length),l=0;l<s.length;l++){var u=s[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]=In(c):a[u]=o(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 o={};for(var s in i)if(Object.hasOwnProperty.call(i,s)!==!1){var a=i[s];typeof a!="object"||a===null?o[s]=a:a instanceof Date?o[s]=new Date(a):a instanceof Map?o[s]=new Map(t(Array.from(a),n)):a instanceof Set?o[s]=new Set(t(Array.from(a),n)):ArrayBuffer.isView(a)?o[s]=In(a):o[s]=n(a)}return o}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 o={};for(var s in i){var a=i[s];typeof a!="object"||a===null?o[s]=a:a instanceof Date?o[s]=new Date(a):a instanceof Map?o[s]=new Map(t(Array.from(a),r)):a instanceof Set?o[s]=new Set(t(Array.from(a),r)):ArrayBuffer.isView(a)?o[s]=In(a):o[s]=r(a)}return o}}function u0(e){var t=[],n=[];return e.proto?o:i;function r(s,a){for(var l=Object.keys(s),u=new Array(l.length),c=0;c<l.length;c++){var d=l[c],f=s[d];if(typeof f!="object"||f===null)u[d]=f;else if(f instanceof Date)u[d]=new Date(f);else if(ArrayBuffer.isView(f))u[d]=In(f);else{var p=t.indexOf(f);p!==-1?u[d]=n[p]:u[d]=a(f)}}return u}function i(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return r(s,i);if(s instanceof Map)return new Map(r(Array.from(s),i));if(s instanceof Set)return new Set(r(Array.from(s),i));var a={};t.push(s),n.push(a);for(var l in s)if(Object.hasOwnProperty.call(s,l)!==!1){var u=s[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]=In(u);else{var c=t.indexOf(u);c!==-1?a[l]=n[c]:a[l]=i(u)}}return t.pop(),n.pop(),a}function o(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return r(s,o);if(s instanceof Map)return new Map(r(Array.from(s),o));if(s instanceof Set)return new Set(r(Array.from(s),o));var a={};t.push(s),n.push(a);for(var l in s){var u=s[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),o));else if(u instanceof Set)a[l]=new Set(r(Array.from(u),o));else if(ArrayBuffer.isView(u))a[l]=In(u);else{var c=t.indexOf(u);c!==-1?a[l]=n[c]:a[l]=o(u)}}return t.pop(),n.pop(),a}}var de=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":"tag/block","url":"tags/block","category":"tags","path":"tags/blocks","schema":"block_tag"},{"id":"tag/entity_type","url":"tags/entity-type","category":"tags","path":"tags/entity_types","schema":"entity_type_tag"},{"id":"tag/fluid","url":"tags/fluid","category":"tags","path":"tags/fluids","schema":"fluid_tag"},{"id":"tag/game_event","url":"tags/game-event","category":"tags","path":"tags/game_events","schema":"game_event_tag","minVersion":"1.17"},{"id":"tag/item","url":"tags/item","category":"tags","path":"tags/items","schema":"item_tag"},{"id":"tag/worldgen/biome","url":"tags/biome","category":"tags","path":"tags/worldgen/biome","schema":"biome_tag","minVersion":"1.18.2"},{"id":"block_definition","url":"assets/blockstate","path":"blockstates","category":"assets","schema":"block_definition"},{"id":"model","url":"assets/model","path":"models","category":"assets","schema":"model"},{"id":"block_growth","url":"partners/immersive-weathering/block-growth","path":"block_growths","category":"partners","partner":"immersive_weathering","schema":"immersive_weathering:block_growth","minVersion":"1.18.2"}]}');function mn(e){return typeof e=="object"&&e!==null}function Zr(e){return e.toString(16).padStart(2,"0")}function rn(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,Zr).join("")}function Vt(){return BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))}function d0(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function Zl(e){const t=Math.floor(Math.random()*4294967296)-2147483648,n=e.get(new O.Path(["dimensions"]));e.set(new O.Path(["seed"]),t,!0),mn(n)&&Object.keys(n).forEach(r=>{e.set(new O.Path(["dimensions",r,"generator","seed"]),t,!0),e.set(new O.Path(["dimensions",r,"generator","biome_source","seed"]),t,!0)}),e.set(new O.Path(["placement","salt"]),Math.abs(t),!0),e.set(new O.Path(["generator","seed"]),t,!0),e.set(new O.Path(["generator","biome_source","seed"]),t)}function Xl(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(31,t)+e.charCodeAt(n)|0;return t}function It(e){return`/${e}/`.replaceAll("//","/")}function h0(e){const t=e.indexOf("?");return t>=0&&(e=e.slice(0,t)),It(e)}function Jl(e){const t=h0(e).replace(/^\//,"").replace(/\/$/,"");return de.generators.find(n=>n.url===t)}function Kl({path:e,search:t,hash:n,replace:r}){const i=(e!==void 0?It(e):location.pathname)+(t!==void 0?t.startsWith("?")||t.length===0?t:"?"+t:location.search)+(n!==void 0?n.startsWith("#")?n:"#"+n:location.hash);Zt(i,r)}function f0(e){const t=mo.load(e.substring(3,e.indexOf("---",3)));return mn(t)?t:{}}function p0(e,t){var r;let n=0;for(;;){const i=e.indexOf("{#",n);if(i<0)break;const o=m0(e,i+2),s=e.indexOf("#[",i+1);let a="";if(s>=0&&s<o){const l=e.indexOf("]",s+2);e.substring(s+2,l)===t&&(a=e.substring(l+1,o).trim())}else{const l=e.substring(i+2,o),u=de.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(o+2),n=i}return e}function m0(e,t){let n=0,r=0;for(;r++<1e3;){const i=e.indexOf("#}",t),o=e.indexOf("{#",t);if(i<0)return console.warn("Missing closing bracket"),e.length;if(o<0){if(n===0)return i;n-=1,t=i+2}else if(o<i)n+=1,t=o+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 zo(e){const t=Math.abs(Xl(e));return[t%256,(t>>8)%256,(t>>16)%256]}function g0(e){if(!Array.isArray(e)||e.length!==3)return"#000000";const[t,n,r]=e;return"#"+Zr(t)+Zr(n)+Zr(r)}function _0(e){if(typeof e!="string")return[0,0,0];const t=parseInt(e.startsWith("#")?e.slice(1):e,16),n=t>>16&255,r=t>>8&255,i=t&255;return[n,r,i]}function qn(e){return e*e}function ot(e,t,n){return Math.max(e,Math.min(t,n))}function qi(e,t,n){return n<0?e:n>1?t:Xr(n,e,t)}function Xr(e,t,n){return t+e*(n-t)}function v0(e,t,n,r,i,o){return Xr(t,Xr(e,n,r),Xr(e,i,o))}function ut(e){return e instanceof Error?e.message:`${e}`}const Li=l0();function an(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(!an(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 o=i[r];if(!an(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}class w0{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 Jr({icon:e,label:t,large:n,larger:r,doSelect:i,value:o,placeholder:s,dataList:a,onChange:l}){const u=l===void 0?()=>{}:f=>{const p=f.target.value;l==null||l(p)},c=me(null);Q(()=>{i&&c.current&&c.current.select()},[i]);const d=a&&rn();return h("div",{class:`btn btn-input ${n?"large-input":""} ${r?"larger-input":""}`,onClick:f=>f.stopPropagation()},e&&re[e],t&&h("span",null,t),h("input",{ref:c,type:"text",value:o,onChange:u,placeholder:s,list:d}),a&&h("datalist",{id:d},a.map(f=>h("option",{value:f}))))}function Kn({cooldown:e,invert:t,initial:n}={}){const[r,i]=B(n),o=me(void 0);return[r,()=>{i(!t),o.current!==void 0&&clearTimeout(o.current),o.current=setTimeout(()=>{i(!!t)},e!=null?e:2e3)}]}const go=Symbol("async-cancel");function y0(e,t=[],n={loading:!1}){const[r,i]=B(n),o=me(!1),s=me(0);Q(()=>(o.current=!0,()=>o.current=!1),[]);const a=Ee((...l)=>{const u=++s.current;return r.loading||i(c=>_e(q({},c),{loading:!0})),e(...l).then(c=>(o.current&&u===s.current&&c!==go&&i({value:c,loading:!1}),c),c=>{o.current&&u===s.current&&i({error:c,loading:!1})})},t);return[r,a]}function Mr(e,t=[],n={loading:!0}){const[r,i]=y0(e,t,n);return Q(()=>{i()},[i]),_e(q({},r),{refresh:i})}function Or({size:e,draw:t,onDrag:n,onHover:r,onLeave:i},o){const s=me(null),a=me(),l=me(),u=me([0,0]),c=me(!1);Q(()=>{if(!s.current)return;const p=_=>{a.current=[_.offsetX,_.offsetY]},m=_=>{if(a.current===void 0){if(!s.current)return;const b=_.offsetX/s.current.clientWidth,A=_.offsetY/s.current.clientHeight;r==null||r(b,A);return}if(!n)return;const x=_.offsetX-a.current[0],w=_.offsetY-a.current[1];x===0&&w===0||(u.current=[u.current[0]+x,u.current[1]+w],c.current||(l.current&&cancelAnimationFrame(l.current),l.current=requestAnimationFrame(async()=>{if(!s.current)return;c.current=!0;const b=u.current[0]/s.current.clientWidth,A=u.current[1]/s.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 s.current.addEventListener("mousedown",p),s.current.addEventListener("mousemove",m),s.current.addEventListener("mouseleave",g),document.body.addEventListener("mouseup",v),()=>{var _,x,w;(_=s.current)==null||_.removeEventListener("mousedown",p),(x=s.current)==null||x.removeEventListener("mousemove",m),(w=s.current)==null||w.removeEventListener("mouseleave",g),document.body.removeEventListener("mouseup",v)}},[...o!=null?o:[],s.current]);const d=me(),f=me(0);return d.current=async()=>{if(!s.current)return;const p=s.current.getContext("2d"),m=e();s.current.width=m[0],s.current.height=m[1];const v=p.getImageData(0,0,m[0],m[1]),g=f.current+=1;try{await t(v)}catch(_){throw _}g===f.current&&p.putImageData(v,0,0)},{canvas:s,redraw:d.current}}function jo(){const[e,t]=B(!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 b0(){const[e,t]=B(window.location.hash),n=Ee(()=>{t(window.location.hash)},[]);Q(()=>(window.addEventListener("hashchange",n),window.addEventListener("replacestate",n),()=>{window.removeEventListener("hashchange",n),window.removeEventListener("replacestate",n)}),[]);const r=Ee(i=>{i!==e&&Kl({hash:i})},[e]);return[e,r]}function x0(e,t,n,r){const i=Ee(()=>{const l=localStorage.getItem(e);return l===null?t:n===void 0?l:n(l)},[]),[o,s]=B(i()),a=Ee(l=>{l==null?(localStorage.removeItem(e),s(t)):r!==void 0?(localStorage.setItem(e,r(l)),s(l)):(localStorage.setItem(e,l),s(l))},[]);return[o,a]}function Hs(e){const[t,n]=B(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 Ri(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 Us=(e,t)=>{var n;return(n=new URLSearchParams(e).get(t))!=null?n:void 0};function ln(e){const t=window.location,[n,r]=B(Us(t.search,e));Q(()=>{const o=()=>{r(Us(t.search,e))};return window.addEventListener("popstate",o),window.addEventListener("pushstate",o),window.addEventListener("replacestate",o),()=>{window.removeEventListener("popstate",o),window.removeEventListener("pushstate",o),window.removeEventListener("replacestate",o)}},[]);const i=Ee((o,s)=>{if(o!==n){r(o);const a=new URLSearchParams(t.search);o===void 0||o.length===0?a.delete(e):a.set(e,o),Kl({search:a.toString().replaceAll("%7C","|"),replace:s})}},[n]);return[n,i]}function et(e){const{icon:t,label:n,relative:r,tooltip:i,tooltipLoc:o,children:s}=e,[a,l]=jo();return h("div",q({class:`btn-menu${r===!1?" no-relative":""}`},e),h(Z,{icon:t,label:n,tooltip:i,tooltipLoc:o,onClick:l}),a&&h("div",{class:"btn-group"},s))}const A0="modulepreload",Gs={},k0="/",se=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${k0}${r}`,r in Gs)return;Gs[r]=!0;const i=r.endsWith(".css"),o=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${o}`))return;const s=document.createElement("link");if(s.rel=i?"stylesheet":A0,i||(s.as="script",s.crossOrigin=""),s.href=r,document.head.appendChild(s),i)return new Promise((a,l)=>{s.addEventListener("load",a),s.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},re={alert:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8z"})),download:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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"}),h("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"}),h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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"}),h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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 Mn({error:e,onDismiss:t}){const[n,r]=B(!1),[i,o]=B(void 0);Q(()=>{if(e instanceof Error){const a=e.stack.split(`
|
|
`).map(l=>l.replace(/^(\s+)at (?:async )?(https?:.*)/,"$1at ($2)"));o(a.join(`
|
|
`)),se(()=>import("./sourcemapped-stacktrace.81a5e506.js").then(function(l){return l.s}),[]).then(({mapStackTrace:l})=>{l(a.join(`
|
|
`),u=>{const c=u.map(d=>d.replace(/..\/..\/src\//,"src/")).join(`
|
|
`);o(c)})})}},[e]);const s=ke(()=>{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 h("div",{class:"error"},t&&h("div",{class:"error-dismiss",onClick:t},re.x),h("h3",null,e instanceof Error?e.message:e,i&&h("span",{onClick:()=>r(!n)},re.info)),i&&n&&h("pre",null,i),h("p",null,"If you think this is a bug, you can report it ",h("a",{href:s,target:"_blank"},"on GitHub")))}function S0({label:e,value:t,onChange:n}){const r=rn();return h("label",{class:"checkbox"},h("input",{id:r,type:"checkbox",checked:t,onClick:()=>n(!t)}),e)}function Vo(e,t,n){const r=i=>{const o=i.onChange&&(a=>{var u;const l=a.target.value;(u=i.onChange)==null||u.call(i,n(l))}),s=i.onEnter&&(a=>{var l;if(a.key==="Enter"){const u=a.target.value;(l=i.onEnter)==null||l.call(i,n(u))}});return h("input",_e(q({},i),{type:t,onChange:o,onKeyDown:s}))};return r.displayName=e,r}const cn=Vo("TextInput","text",e=>e),E0=Vo("NumberInput","number",e=>Number(e)),Ys=Vo("RangeInput","range",e=>Number(e));function Ws({values:e,onSelect:t,searchPlaceholder:n,noResults:r}){const[i,o]=B(""),s=ke(()=>{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 h(te,null,h(Jr,{icon:"search",large:!0,value:i,onChange:o,doSelect:1,placeholder:n!=null?n:"Search"}),h("div",{class:"result-list"},s.map(a=>h(Z,{key:a,label:a,onClick:()=>t==null?void 0:t(a)})),s.length===0&&h(Z,{label:r!=null?r:"No results"})))}const Ho="https://raw.githubusercontent.com/misode/technical-changes/main";let Zi=null;async function Ql(){if(!Zi){const e=await(await fetch(`${Ho}/index.json`)).json();Zi=(await Promise.all(e.map((t,n)=>C0(ec(t),n)))).flat().map(t=>_e(q({},t),{tags:[t.group,...t.tags]}))}return Zi}async function C0(e,t){const n=await(await fetch(`${Ho}/${e}/index.json`)).json();return(await Promise.all(n.map((r,i)=>I0(e,ec(r),t,i)))).flat()}async function I0(e,t,n,r){const i=await(await fetch(`${Ho}/${e}/${t}.md`)).text();return M0(i).map(o=>q({version:t,group:e,order:n*1e3+r},o))}function M0(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 ec(e){return typeof e=="string"?e:mn(e)?e.id:"unknown"}const Zn="https://www.minecraft.net/article/",O0=new Map(Object.entries({"1.16-pre2":"minecraft-1-16-pre-release-1","1.16-pre4":"minecraft-1-16-pre-release-3","1.16-pre5":"minecraft-1-16-pre-release-3","1.16-pre7":"minecraft-1-16-pre-release-6","1.16-pre8":"minecraft-1-16-pre-release-6","1.16-rc1":"minecraft-1-16-release-candidate",1.16:"nether-update-java","1.16.2-pre3":"minecraft-1-16-2-pre-release-2","1.16.2-rc1":"minecraft-1-16-2-pre-release-2","1.16.2-rc2":"minecraft-1-16-2-pre-release-2","1.17-pre3":"minecraft-1-17-pre-release-2","1.17-pre4":"minecraft-1-17-pre-release-2","1.17-pre5":"minecraft-1-17-pre-release-2","1.17.1-pre3":"minecraft-1-17-1-pre-release-2",1.17:"caves---cliffs--part-i-out-today-java","1.18-pre3":"minecraft-1-18-pre-release-2","1.18-pre4":"minecraft-1-18-pre-release-2","1.18-pre5":"minecraft-1-18-pre-release-2","1.18-pre7":"minecraft-1-18-pre-release-6","1.18-pre8":"minecraft-1-18-pre-release-6",1.18:"caves---cliffs--part-ii-out-today-java","1.18.2-pre3":"minecraft-1-18-2-pre-release-2"}));function N0(e){const t=O0.get(e);if(t)return Zn+t;let n;if((n=e.match(/^(\d\dw\d\d)[a-z]$/))&&n[1])return Zn+"minecraft-snapshot-"+n[1]+"a";if((n=e.match(/^(\d+\.\d+(?:\.\d+)?)-pre([0-9]+)$/))&&n[1]&&n[2])return Zn+"minecraft-"+n[1].replaceAll(".","-")+"-pre-release-"+n[2];if((n=e.match(/^(\d+\.\d+(?:\.\d+)?)-rc[0-9]+$/))&&n[1])return Zn+"minecraft-"+n[1].replaceAll(".","-")+"-release-candidate-1";if(e.match(/^\d+\.\d+\.\d+$/))return Zn+"minecraft-java-edition-"+e.replaceAll(".","-")}const On="misode-v2",qs="cached_latest_version",Zs="misode_cache_patch",Xi="1.19-pre3",Cn="https://raw.githubusercontent.com/misode/mcmeta";function Jt(e,t){return`${Cn}/${e.dynamic?t:`${e.ref}-${t}`}`}async function Pi(e){await F0(),e.dynamic&&(localStorage.getItem(qs)!==Xi&&(await nc(t=>t.startsWith(`${Cn}/summary/`)||t.startsWith(`${Cn}/data/`)||t.startsWith(`${Cn}/assets/`)||t.startsWith(`${Cn}/registries/`)),localStorage.setItem(qs,Xi)),e.ref=Xi)}async function T0(e,t,n){const r=de.versions.find(i=>i.id===e);if(!r){console.error(`[fetchData] Unknown version ${r} in ${JSON.stringify(de.versions)}`);return}await Pi(r),await Promise.all([L0(r,t),R0(r,n)])}async function L0(e,t){console.debug(`[fetchRegistries] ${e.id}`);try{const n=await Fn(`${Jt(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:",ut(n))}}async function R0(e,t){console.debug(`[fetchBlockStateMap] ${e.id}`);try{const n=await Fn(`${Jt(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:",ut(n))}}async function tc(e,t,n){console.debug(`[fetchPreset] ${e} ${t} ${n}`);const r=de.versions.find(i=>i.id===e);try{let i;if(n.startsWith("immersive_weathering:"))i=`https://raw.githubusercontent.com/AstralOrdana/Immersive-Weathering/main/src/main/resources/data/immersive_weathering/block_growths/${n.slice(21)}.json`;else{const s=["blockstates","models"].includes(t)?"assets":"data";i=`${Jt(r,s)}/${s}/minecraft/${t}/${n}.json`}return await(await fetch(i)).json()}catch(i){throw new Error(`Error occurred while fetching ${t} preset ${n}: ${ut(i)}`)}}async function P0(e,t){console.debug(`[fetchAllPresets] ${e} ${t}`);const n=de.versions.find(r=>r.id===e);await Pi(n);try{const r=await Fn(`${Jt(n,"registries")}/${t}/data.min.json`);return new Map(await Promise.all(r.map(async i=>[i,await Fn(`${Jt(n,"data")}/data/minecraft/${t}/${i}.json`)])))}catch(r){throw new Error(`Error occurred while fetching all ${t} presets: ${ut(r)}`)}}async function $0(e){const t=de.versions.find(n=>n.id===e);await Pi(t);try{const n=`${Jt(t,"summary")}/sounds/data.min.json`;return await Fn(n)}catch(n){throw new Error(`Error occurred while fetching sounds for ${t}: ${ut(n)}`)}}function D0(e,t){const n=de.versions.find(r=>r.id===e);return`${Jt(n,"assets")}/assets/minecraft/sounds/${t}.ogg`}async function B0(){const e=de.versions[de.versions.length-1];await Pi(e);try{return Fn(`${Jt(e,"summary")}/versions/data.min.json`)}catch(t){throw new Error(`Error occured while fetching versions: ${ut(t)}`)}}async function Fn(e,t=n=>n){try{const n=await caches.open(On);console.debug(`[getData] Opened cache ${On} ${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),o=t(await i.json());return await n.put(e,new Response(JSON.stringify(o))),o}catch(n){console.warn(`[getData] Failed to open cache ${On}: ${ut(n)}`),console.debug(`[getData] fetching data ${e}`);const r=await fetch(e);return t(await r.json())}}async function nc(e){try{const t=await caches.open(On);console.debug(`[deleteMatching] Opened cache ${On}`);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 ${On}: ${ut(t)}`)}}const Xs=[async()=>{["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")},async()=>{await nc(e=>e.startsWith(`${Cn}/1.18.2-summary/`))}];async function F0(){var t;const e=parseInt((t=localStorage.getItem(Zs))!=null?t:"0");for(let n=e+1;n<=Xs.length;n+=1){const r=Xs[n-1];r&&await r(),localStorage.setItem(Zs,n.toFixed())}}const Ie="immersive_weathering";function z0(e,t){const n=O.Reference.bind(void 0,e),r=O.StringNode.bind(void 0,t),i=o=>O.ChoiceNode([{type:"string",node:r({validator:"resource",params:{pool:o,allowTag:!0}}),change:s=>{if(Array.isArray(s)&&typeof s[0]=="string"&&!s[0].startsWith("#"))return s[0]}},{type:"list",node:O.ListNode(r({validator:"resource",params:{pool:o}})),change:s=>typeof s=="string"&&!s.startsWith("#")?[s]:[]}],{choiceContext:"tag"});e.register(`${Ie}:block_growth`,O.ObjectNode({area_condition:n(`${Ie}:area_condition`),position_predicates:O.Opt(O.ListNode(n(`${Ie}:position_test`))),growth_chance:O.NumberNode({min:0,max:1}),growth_for_face:O.ListNode(O.ObjectNode({direction:O.Opt(r({enum:"direction"})),weight:O.Opt(O.NumberNode({integer:!0})),growth:O.ListNode(O.ObjectNode({data:n(`${Ie}:block_pair`),weight:O.NumberNode({integer:!0})}))},{category:"pool"})),owners:O.ListNode(r({validator:"resource",params:{pool:"block"}})),replacing_target:n(`${Ie}:rule_test`),target_self:O.Opt(O.BooleanNode()),destroy_target:O.Opt(O.BooleanNode())},{context:`${Ie}.block_growth`})),e.register(`${Ie}:area_condition`,O.ObjectNode({type:r({enum:["generate_if_not_too_many","neighbor_based_generation"]}),[O.Switch]:[{push:"type"}],[O.Case]:{generate_if_not_too_many:{radiusX:O.NumberNode({integer:!0}),radiusY:O.NumberNode({integer:!0}),radiusZ:O.NumberNode({integer:!0}),requiredAmount:O.NumberNode({integer:!0}),yOffset:O.Opt(O.NumberNode({integer:!0})),must_have:O.Opt(n(`${Ie}:rule_test`)),must_not_have:O.Opt(n(`${Ie}:rule_test`)),includes:O.Opt(i("block"))},neighbor_based_generation:{must_have:n(`${Ie}:rule_test`),must_not_have:O.Opt(n(`${Ie}:rule_test`)),required_amount:O.Opt(O.NumberNode({integer:!0})),directions:O.ListNode(r({enum:"direction"}))}}},{context:`${Ie}.area_condition`})),e.register(`${Ie}:block_pair`,O.ObjectNode({block:n(`${Ie}:block_state`),above_block:O.Opt(n(`${Ie}:block_state`))},{context:`${Ie}.block_pair`})),e.register(`${Ie}:block_state`,O.ObjectNode({Name:r({validator:"resource",params:{pool:"block"}}),Properties:O.Opt(O.MapNode(r(),r()))},{context:"block_state"})),e.register(`${Ie}:position_test`,O.ObjectNode({predicate_type:r({enum:["biome_match","day_test","nand","precipitation_test","temperature_range"]}),[O.Switch]:[{push:"predicate_type"}],[O.Case]:{biome_match:{biomes:i("$worldgen/biome")},day_test:{day:O.BooleanNode()},nand:{predicates:O.ListNode(n(`${Ie}:position_test`))},precipitation_test:{precipitation:r({enum:["none","rain","snow"]})},temperature_range:{min:O.NumberNode(),max:O.NumberNode(),use_local_pos:O.Opt(O.BooleanNode())}}},{context:`${Ie}.position_test`,category:"predicate"})),t.register(`${Ie}:rule_test`,[...t.get("rule_test"),"immersive_weathering:block_set_match","immersive_weathering:fluid_match","immersive_weathering:tree_log"]),e.register(`${Ie}:rule_test`,O.ObjectNode({predicate_type:r({validator:"resource",params:{pool:`${Ie}:rule_test`}}),[O.Switch]:[{push:"predicate_type"}],[O.Case]:{"minecraft:block_match":{block:r({validator:"resource",params:{pool:"block"}})},"minecraft:blockstate_match":{block_state:n("block_state")},"minecraft:random_block_match":{block:r({validator:"resource",params:{pool:"block"}}),probability:O.NumberNode({min:0,max:1})},"minecraft:random_blockstate_match":{block_state:n("block_state"),probability:O.NumberNode({min:0,max:1})},"minecraft:tag_match":{tag:r({validator:"resource",params:{pool:"$tag/block"}})},"immersive_weathering:block_set_match":{blocks:i("block"),probability:O.Opt(O.NumberNode({min:0,max:1}))},"immersive_weathering:fluid_match":{fluid:r({validator:"resource",params:{pool:"fluid"}})}}},{context:"rule_test",disableSwitchContext:!0})),t.register("block_growth",["immersive_weathering:brain_coral","immersive_weathering:bubble_coral","immersive_weathering:cracked_mud_rivers","immersive_weathering:crimson_nylium","immersive_weathering:cryosol","immersive_weathering:farmland_rare_weeds","immersive_weathering:farmland_weeds","immersive_weathering:fire_coral","immersive_weathering:fire_soot","immersive_weathering:fluvisol","immersive_weathering:grass_base","immersive_weathering:grass_block_badlands","immersive_weathering:grass_block_bamboo_jungle","immersive_weathering:grass_block_birch_forest","immersive_weathering:grass_block_dark_forest","immersive_weathering:grass_block_flower_forest","immersive_weathering:grass_block_forest","immersive_weathering:grass_block_jungle","immersive_weathering:grass_block_lush_caves","immersive_weathering:grass_block_old_growth_spruce","immersive_weathering:grass_block_plains","immersive_weathering:grass_block_sunflower_plains","immersive_weathering:grass_block_swamp","immersive_weathering:grass_block_taiga","immersive_weathering:grass_block_wooded_badlands","immersive_weathering:hanging_roots","immersive_weathering:horn_coral","immersive_weathering:humus","immersive_weathering:icicle_growth","immersive_weathering:large_fern","immersive_weathering:magma","immersive_weathering:mycelium","immersive_weathering:podzol","immersive_weathering:red_sand_weathering","immersive_weathering:rooted_dirt","immersive_weathering:rooted_grass","immersive_weathering:sand_weathering","immersive_weathering:sapling","immersive_weathering:sapling_nether","immersive_weathering:silt","immersive_weathering:tall_grass","immersive_weathering:tall_seagrass","immersive_weathering:tube_coral","immersive_weathering:vertisol","immersive_weathering:warped_nylium"])}function j0(e,t){z0(e,t)}const rc=["1.15","1.16","1.17","1.18","1.18.2","1.19"],yn={},bn={},V0={1.15:()=>se(()=>import("./index.95bfc13d.js").then(function(e){return e.i}),[]),1.16:()=>se(()=>import("./index.f66a1ad8.js").then(function(e){return e.i}),[]),1.17:()=>se(()=>import("./index.f2d04a92.js").then(function(e){return e.i}),[]),1.18:()=>se(()=>import("./index.f1738cde.js").then(function(e){return e.i}),[]),"1.18.2":()=>se(()=>import("./index.e708692a.js").then(function(e){return e.i}),[]),1.19:()=>se(()=>import("./index.0dfcb7cf.js").then(function(e){return e.i}),[])};let ic,oc,Kr;async function Uo(e){return yn[e]||(yn[e]=(async()=>{try{const t=await V0[e](),n=t.getCollections(),r={};await T0(e,n,r);const i=t.getSchemas(n);return j0(i,n),yn[e]={collections:n,schemas:i,blockStates:r},yn[e]}catch(t){throw new Error(`Cannot get version "${e}": ${ut(t)}`)}})()),yn[e]}async function H0(e,t){var n;if(!bn[t]||bn[t].version!==e){const r=await Uo(e);ic=O.Reference(r.schemas,"configured_decorator"),oc=O.ChoiceNode([{type:"string",node:O.StringNode(r.collections,{validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:O.Reference(r.schemas,"configured_feature")}],{choiceContext:"feature"});const i=(n=de.generators.find(o=>o.id===t))==null?void 0:n.schema;if(!i)throw new Error(`Cannot find model ${t}`);try{const o=r.schemas.get(i),s=new O.DataModel(o,{wrapLists:!0});bn[t]?s.reset(bn[t].model.data,!1):(s.validate(!0),s.history=[JSON.stringify(s.data)]),bn[t]={model:s,version:e}}catch(o){const s=new Error(`Cannot get generator "${t}" for version "${e}": ${ut(o)}`);throw o instanceof Error&&(s.stack=o.stack),s}}return bn[t].model}async function U0(e){const t=await Uo(e);return Kr=t.collections,t.collections}async function G0(e){return(await Uo(e)).blockStates}function qe(e,t,n){const r=de.versions.findIndex(s=>s.id===e),i=t?de.versions.findIndex(s=>s.id===t):0,o=n?de.versions.findIndex(s=>s.id===n):de.versions.length-1;return i<=r&&r<=o}var sc={exports:{}};(function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function s(l,u){if(!o[l]){o[l]={};for(var c=0;c<l.length;c++)o[l][l.charAt(c)]=c}return o[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 s(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),d=0,f=u.length;d<f;d++){var p=u.charCodeAt(d);c[d*2]=p>>>8,c[d*2+1]=p%256}return c},decompressFromUint8Array:function(l){if(l==null)return a.decompress(l);for(var u=new Array(l.length/2),c=0,d=u.length;c<d;c++)u[c]=l[c*2]*256+l[c*2+1];var f=[];return u.forEach(function(p){f.push(n(p))}),a.decompress(f.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 s(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 d,f,p={},m={},v="",g="",_="",x=2,w=3,b=2,A=[],S=0,I=0,k;for(k=0;k<l.length;k+=1)if(v=l.charAt(k),Object.prototype.hasOwnProperty.call(p,v)||(p[v]=w++,m[v]=!0),g=_+v,Object.prototype.hasOwnProperty.call(p,g))_=g;else{if(Object.prototype.hasOwnProperty.call(m,_)){if(_.charCodeAt(0)<256){for(d=0;d<b;d++)S=S<<1,I==u-1?(I=0,A.push(c(S)),S=0):I++;for(f=_.charCodeAt(0),d=0;d<8;d++)S=S<<1|f&1,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=f>>1}else{for(f=1,d=0;d<b;d++)S=S<<1|f,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=0;for(f=_.charCodeAt(0),d=0;d<16;d++)S=S<<1|f&1,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=f>>1}x--,x==0&&(x=Math.pow(2,b),b++),delete m[_]}else for(f=p[_],d=0;d<b;d++)S=S<<1|f&1,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=f>>1;x--,x==0&&(x=Math.pow(2,b),b++),p[g]=w++,_=String(v)}if(_!==""){if(Object.prototype.hasOwnProperty.call(m,_)){if(_.charCodeAt(0)<256){for(d=0;d<b;d++)S=S<<1,I==u-1?(I=0,A.push(c(S)),S=0):I++;for(f=_.charCodeAt(0),d=0;d<8;d++)S=S<<1|f&1,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=f>>1}else{for(f=1,d=0;d<b;d++)S=S<<1|f,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=0;for(f=_.charCodeAt(0),d=0;d<16;d++)S=S<<1|f&1,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=f>>1}x--,x==0&&(x=Math.pow(2,b),b++),delete m[_]}else for(f=p[_],d=0;d<b;d++)S=S<<1|f&1,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=f>>1;x--,x==0&&(x=Math.pow(2,b),b++)}for(f=2,d=0;d<b;d++)S=S<<1|f&1,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=f>>1;for(;;)if(S=S<<1,I==u-1){A.push(c(S));break}else I++;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 d=[],f=4,p=4,m=3,v="",g=[],_,x,w,b,A,S,I,k={val:c(0),position:u,index:1};for(_=0;_<3;_+=1)d[_]=_;for(w=0,A=Math.pow(2,2),S=1;S!=A;)b=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),w|=(b>0?1:0)*S,S<<=1;switch(w){case 0:for(w=0,A=Math.pow(2,8),S=1;S!=A;)b=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),w|=(b>0?1:0)*S,S<<=1;I=n(w);break;case 1:for(w=0,A=Math.pow(2,16),S=1;S!=A;)b=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),w|=(b>0?1:0)*S,S<<=1;I=n(w);break;case 2:return""}for(d[3]=I,x=I,g.push(I);;){if(k.index>l)return"";for(w=0,A=Math.pow(2,m),S=1;S!=A;)b=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),w|=(b>0?1:0)*S,S<<=1;switch(I=w){case 0:for(w=0,A=Math.pow(2,8),S=1;S!=A;)b=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),w|=(b>0?1:0)*S,S<<=1;d[p++]=n(w),I=p-1,f--;break;case 1:for(w=0,A=Math.pow(2,16),S=1;S!=A;)b=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),w|=(b>0?1:0)*S,S<<=1;d[p++]=n(w),I=p-1,f--;break;case 2:return g.join("")}if(f==0&&(f=Math.pow(2,m),m++),d[I])v=d[I];else if(I===p)v=x+x.charAt(0);else return null;g.push(v),d[p++]=x+v.charAt(0),f--,x=v,f==0&&(f=Math.pow(2,m),m++)}}};return a}();e!=null&&(e.exports=t)})(sc);var ac=sc.exports;const Y0="https://z15g7can.directus.app/items",Js=new Map;async function W0(e,t,n,r){try{const i=JSON.stringify(n),o=ac.compressToBase64(i);console.log("Compression rate",i.length/i.length);const s=JSON.stringify({data:o,type:e,version:t,show_preview:r});let a=Js.get(s);if(!a){const l=await lc("/snippets",s);Js.set(s,l.id),a=l.id}return{id:a,length:i.length,compressed:o.length,rate:i.length/o.length}}catch(i){throw i instanceof Error&&(i.message=`Error creating share link: ${i.message}`),i}}async function q0(e){var t;try{const n=await lc(`/snippets/${e}`);return _e(q({},n),{data:JSON.parse((t=ac.decompressFromBase64(n.data))!=null?t:"{}")})}catch(n){throw n instanceof Error&&(n.message=`Error loading shared content: ${n.message}`),n}}async function lc(e,t){var i,o,s;const r=await(await fetch(Y0+e,t?{method:"post",headers:{"Content-Type":"application/json"},body:t}:void 0)).json();if(r.data)return r.data;throw new Error((s=(o=(i=r.errors)==null?void 0:i[0])==null?void 0:o.message)!=null?s:"Unknown error")}var cc=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","generate_new_uuid":"Generate new UUID","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","tag/block":"Block Tag","tag/entity_type":"Entity Type Tag","tag/fluid":"Fluid Tag","tag/game_event":"Game Event Tag","tag/item":"Item Tag","tag/worldgen/biome":"Biome Tag","tags":"Tags","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.partners":"Partners","title.project":"%0% Project","title.sounds":"Sound Explorer","title.versions":"Versions Explorer","partner.immersive_weathering":"Immersive Weathering","partner.immersive_weathering.block_growth":"Block Growth","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.article":"Article","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"}'),Z0=Object.freeze(Object.defineProperty({__proto__:null,default:cc},Symbol.toStringTag,{value:"Module"})),De;(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 w;return(w=localStorage.getItem(e.ID_LANGUAGE))!=null?w:"en"}e.getLanguage=t;function n(){var w;return(w=localStorage.getItem(e.ID_THEME))!=null?w:"dark"}e.getTheme=n;function r(){const w=localStorage.getItem(e.ID_VERSION);return w&&rc.includes(w)?w:"1.18.2"}e.getVersion=r;function i(){var w;return(w=localStorage.getItem(e.ID_INDENT))!=null?w:"2_spaces"}e.getIndent=i;function o(){var w;return(w=localStorage.getItem(e.ID_FORMAT))!=null?w:"json"}e.getFormat=o;function s(){return localStorage.getItem(e.ID_HIGHLIGHTING)!=="false"}e.getHighlighting=s;function a(){var w;return(w=localStorage.getItem(e.ID_SOUNDS_VERSION))!=null?w:"latest"}e.getSoundsVersion=a;function l(){const w=localStorage.getItem(e.ID_PROJECTS);return w?JSON.parse(w):[dr]}e.getProjects=l;function u(w){var A;return JSON.parse((A=localStorage.getItem(e.ID_BACKUPS))!=null?A:"{}")[w]}e.getBackup=u;function c(w){w&&localStorage.setItem(e.ID_LANGUAGE,w)}e.setLanguage=c;function d(w){w&&localStorage.setItem(e.ID_THEME,w)}e.setTheme=d;function f(w){w&&localStorage.setItem(e.ID_VERSION,w)}e.setVersion=f;function p(w){w&&localStorage.setItem(e.ID_INDENT,w)}e.setIndent=p;function m(w){w&&localStorage.setItem(e.ID_FORMAT,w)}e.setFormat=m;function v(w){w!==void 0&&localStorage.setItem(e.ID_HIGHLIGHTING,w.toString())}e.setHighlighting=v;function g(w){w&&localStorage.setItem(e.ID_SOUNDS_VERSION,w)}e.setSoundsVersion=g;function _(w){w&&localStorage.setItem(e.ID_PROJECTS,JSON.stringify(w))}e.setProjects=_;function x(w,b){var S;const A=JSON.parse((S=localStorage.getItem(e.ID_BACKUPS))!=null?S:"{}");b===void 0?delete A[w]:A[w]=b,localStorage.setItem(e.ID_BACKUPS,JSON.stringify(A))}e.setBackup=x})(De||(De={}));function X0(e){switch(e){case"../../../node_modules/@mcschema/locales/src/cs.json":return se(()=>import("./cs.967a01eb.js"),[]);case"../../../node_modules/@mcschema/locales/src/de.json":return se(()=>import("./de.489974c1.js"),[]);case"../../../node_modules/@mcschema/locales/src/en.json":return se(()=>import("./en.2779b822.js"),[]);case"../../../node_modules/@mcschema/locales/src/es.json":return se(()=>import("./es.6b3597bc.js"),[]);case"../../../node_modules/@mcschema/locales/src/fr.json":return se(()=>import("./fr.e316b1e2.js"),[]);case"../../../node_modules/@mcschema/locales/src/it.json":return se(()=>import("./it.7ff123cd.js"),[]);case"../../../node_modules/@mcschema/locales/src/ja.json":return se(()=>import("./ja.3170354d.js"),[]);case"../../../node_modules/@mcschema/locales/src/pl.json":return se(()=>import("./pl.ae1f6791.js"),[]);case"../../../node_modules/@mcschema/locales/src/pt.json":return se(()=>import("./pt.31e14993.js"),[]);case"../../../node_modules/@mcschema/locales/src/ru.json":return se(()=>import("./ru.1298edc9.js"),[]);case"../../../node_modules/@mcschema/locales/src/sk.json":return se(()=>import("./sk.d4265232.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-cn.json":return se(()=>import("./zh-cn.4129665a.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-tw.json":return se(()=>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 J0(e){switch(e){case"../../locales/de.json":return se(()=>import("./de.a269acce.js"),[]);case"../../locales/en.json":return se(()=>Promise.resolve().then(function(){return Z0}),void 0);case"../../locales/es.json":return se(()=>import("./es.833a9774.js"),[]);case"../../locales/fr.json":return se(()=>import("./fr.f5531eea.js"),[]);case"../../locales/it.json":return se(()=>import("./it.fd9a8268.js"),[]);case"../../locales/ja.json":return se(()=>import("./ja.167de97b.js"),[]);case"../../locales/pl.json":return se(()=>import("./pl.3a9fb38c.js"),[]);case"../../locales/pt.json":return se(()=>import("./pt.1a04bd2d.js"),[]);case"../../locales/ru.json":return se(()=>import("./ru.578070fe.js"),[]);case"../../locales/sk.json":return se(()=>import("./sk.96bbf351.js"),[]);case"../../locales/zh-cn.json":return se(()=>import("./zh-cn.e3c47b68.js"),[]);case"../../locales/zh-tw.json":return se(()=>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 uc=hn({lang:"none",locale:e=>e,changeLocale:()=>{}}),ir={fallback:cc};function ue(e,t,...n){var i,o,s,a,l;const r=(l=(a=(s=(i=ir[e])==null?void 0:i[t])!=null?s:(o=ir.en)==null?void 0:o[t])!=null?a:ir.fallback[t])!=null?l:t;return K0(r,n)}function K0(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 Ji(e){if(ir[e])return;const t=de.languages.find(o=>o.code===e);if(!t)return;const n=await J0(`../../locales/${e}.json`),r=t.schemas!==!1&&await X0(`../../../node_modules/@mcschema/locales/src/${e}.json`);let i={default:{}};e==="en"&&(i=await se(()=>import("./en.321d8b56.js"),[])),ir[e]=q(q(q({},n.default),r.default),i.default)}function Ce(){return pn(uc)}function Q0({children:e}){const[t,n]=B("none"),r=Ee((s,...a)=>ue(t,s,...a),[t]),i=Ee(async s=>{await Ji(s),ve.changeLocale(t,s),De.setLanguage(s),n(s)},[t]);Q(()=>{(async()=>{const s=De.getLanguage();ve.setLocale(s),await Promise.all([Ji("en"),...s!=="en"?[Ji(s)]:[]]),n(s)})()},[]);const o={lang:t,locale:r,changeLocale:i};return h(uc.Provider,{value:o},e)}const dr={name:"Drafts",namespace:"draft",files:[]},dc=hn({projects:[dr],project:dr,changeProject:()=>{},updateProject:()=>{},updateFile:()=>!1,openFile:()=>{},closeFile:()=>{}});function hc(){return pn(dc)}function ep({children:e}){const[t,n]=B(De.getProjects()),[r,i]=B(dr.name),o=ke(()=>{var v;return(v=t.find(g=>g.name===r))!=null?v:dr},[t,r]),[s,a]=B(void 0),l=ke(()=>{if(!!s)return o.files.find(v=>v.type===s[0]&&v.id===s[1])},[o,s]),u=Ee(v=>{De.setProjects(v),n(v)},[]),c=Ee(v=>{u(t.map(g=>g.name===r?q(q({},g),v):g))},[t,r]),d=Ee((v,g,_)=>{var x;if(!_.id)c({files:o.files.filter(w=>w.type!==v||w.id!==g)});else{const w=_.id.includes(":")?_.id:`${o.namespace}:${_.id}`,b=o.files.some(A=>A.type===v&&A.id===w);if(g){if((l==null?void 0:l.id)===g&&g!==w&&b)return!1;c({files:o.files.map(A=>A.type===v&&A.id===g?_e(q(q({},A),_),{id:w}):A)}),(l==null?void 0:l.id)===g&&a([v,w])}else{if(b)return!1;c({files:[...o.files,{type:v,id:w,data:(x=_.data)!=null?x:{}}]}),a([v,w])}}return!0},[c,o,l]),f=Ee((v,g)=>{const _=de.generators.find(x=>x.id===v||x.path===v);if(!_)throw new Error(`Cannot find generator of type ${v}`);a([_.id,g]),Zt(It(_.url))},[]),p=Ee(()=>{a(void 0)},[]),m={projects:t,project:o,file:l,changeProject:i,updateProject:c,updateFile:d,openFile:f,closeFile:p};return h(dc.Provider,{value:m},e)}function tp(e){var i;const[t,n]=e.id.includes(":")?e.id.split(":"):["minecraft",e.id];if(e.type==="pack_mcmeta")return"pack.mcmeta";const r=de.generators.find(o=>o.id===e.type);if(!r){console.error(`Cannot find generator of type ${e.type}`);return}return`data/${t}/${(i=r.path)!=null?i:r.id}/${n}`}const fc=hn({biomeColors:{},setBiomeColor:()=>{}});function pc(){return pn(fc)}function np({children:e}){const[t,n]=x0("misode_biome_colors",{},JSON.parse,JSON.stringify),r=Ee((o,s)=>{n(_e(q({},t),{[o]:s}))},[t]),i={biomeColors:t,setBiomeColor:r};return h(fc.Provider,{value:i},e)}const mc=hn({theme:"dark",actualTheme:"dark",changeTheme:()=>{}});function gc(){return pn(mc)}function rp({children:e}){const[t,n]=B(De.getTheme()),r=Hs("(prefers-color-scheme: light)"),i=Hs("(prefers-color-scheme: dark)");Q(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const o=Ee(a=>{ve.changeTheme(t,a),De.setTheme(a),n(a)},[t]);Q(()=>{ve.setPrefersColorScheme(r?"light":i?"dark":"none")},[r,i]),Q(()=>{ve.setTheme(t)},[]);const s={theme:t,actualTheme:t==="light"||t!=="dark"&&r?"light":"dark",changeTheme:o};return h(mc.Provider,{value:s},e)}const ip=3,_c=hn({title:"",changeTitle:()=>{}});function dt(e,t,n){const r=pn(_c);return Q(()=>{e&&r.changeTitle(e,t,n)},[e,t,n]),r}function op({children:e}){const{locale:t}=Ce(),[n,r]=B(t("title.home")),i=Ee((s,a,l)=>{let u=de.versions;a!==void 0&&(u=de.versions.filter(d=>a==null?void 0:a.includes(d.id)));let c="";l&&(c=` - ${l}`),(a==null?void 0:a.length)!==0&&(c=` - Minecraft ${u.map(f=>f.id).slice(-ip).join(", ")}`),document.title=s+c,r(s)},[]),o={title:n,changeTitle:i};return h(_c.Provider,{value:o},e)}const sp="version",vc=hn({version:"1.18.2",changeVersion:()=>{},changeTargetVersion:()=>{}});function Yn(){return pn(vc)}function ap({children:e}){const[t,n]=B(De.getVersion()),[r,i]=ln(sp);Q(()=>{rc.includes(r)&&t!==r&&(ve.setVersion(r),n(r))},[t,r]);const o=Ee((a,l=!0,u=!1)=>{(u||r)&&i(a,!0),l&&(ve.changeVersion(t,a),De.setVersion(a)),n(a)},[t,r]);Q(()=>{ve.setVersion(t)},[]);const s={version:t,changeVersion:o,changeTargetVersion:i};return h(vc.Provider,{value:s},e)}let ie,wc=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});wc.decode();let Br=null;function lp(){return(Br===null||Br.buffer!==ie.memory.buffer)&&(Br=new Uint8Array(ie.memory.buffer)),Br}function cp(e,t){return wc.decode(lp().subarray(e,e+t))}const _o=new Uint32Array(2),up=new BigInt64Array(_o.buffer);let Fr=null;function hr(){return(Fr===null||Fr.buffer!==ie.memory.buffer)&&(Fr=new Int32Array(ie.memory.buffer)),Fr}let zr=null;function yc(){return(zr===null||zr.buffer!==ie.memory.buffer)&&(zr=new Float64Array(ie.memory.buffer)),zr}function dp(e,t){return yc().subarray(e/8,e/8+t)}let Me=0;function Le(e,t){const n=t(e.length*8);return yc().set(e,n/8),Me=e.length,n}let jr=null;function hp(){return(jr===null||jr.buffer!==ie.memory.buffer)&&(jr=new Uint32Array(ie.memory.buffer)),jr}function fp(e,t){const n=t(e.length*4);return hp().set(e,n/4),Me=e.length,n}function pp(e,t,n,r,i,o,s,a,l,u,c,d,f,p){var m=Le(e,ie.__wbindgen_malloc),v=Me,g=Le(t,ie.__wbindgen_malloc),_=Me,x=Le(n,ie.__wbindgen_malloc),w=Me,b=Le(r,ie.__wbindgen_malloc),A=Me,S=Le(i,ie.__wbindgen_malloc),I=Me,k=Le(o,ie.__wbindgen_malloc),M=Me,N=Le(s,ie.__wbindgen_malloc),L=Me,$=Le(a,ie.__wbindgen_malloc),K=Me,ae=Le(l,ie.__wbindgen_malloc),le=Me,T=Le(u,ie.__wbindgen_malloc),D=Me,V=Le(c,ie.__wbindgen_malloc),C=Me,y=Le(d,ie.__wbindgen_malloc),E=Me,R=Le(f,ie.__wbindgen_malloc),j=Me,Y=fp(p,ie.__wbindgen_malloc),he=Me,Ue=ie.biome_parameters(m,v,g,_,x,w,b,A,S,I,k,M,N,L,$,K,ae,le,T,D,V,C,y,E,R,j,Y,he);return $i.__wrap(Ue)}function mp(e,t,n,r,i,o,s,a,l,u,c,d,f){up[0]=e;const p=_o[0],m=_o[1];var v=Le(n,ie.__wbindgen_malloc),g=Me,_=Le(i,ie.__wbindgen_malloc),x=Me,w=Le(s,ie.__wbindgen_malloc),b=Me,A=Le(l,ie.__wbindgen_malloc),S=Me,I=Le(c,ie.__wbindgen_malloc),k=Me,M=Le(f,ie.__wbindgen_malloc),N=Me,L=ie.climate_sampler(p,m,t,v,g,r,_,x,o,w,b,a,A,S,u,I,k,d,M,N);return Nr.__wrap(L)}function vo(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`);return e.ptr}function gp(e,t){return hr().subarray(e/4,e/4+t)}function Ks(e,t,n,r,i,o,s,a,l,u,c){try{const m=ie.__wbindgen_add_to_stack_pointer(-16);vo(e,$i),vo(t,Nr),ie.multi_noise(m,e.ptr,t.ptr,n,r,i,o,s,a,l,u,c);var d=hr()[m/4+0],f=hr()[m/4+1],p=gp(d,f).slice();return ie.__wbindgen_free(d,f*4),p}finally{ie.__wbindgen_add_to_stack_pointer(16)}}function Qs(e,t,n,r,i,o,s,a,l,u){try{const p=ie.__wbindgen_add_to_stack_pointer(-16);vo(e,Nr),ie.climate_noise(p,e.ptr,t,n,r,i,o,s,a,l,u);var c=hr()[p/4+0],d=hr()[p/4+1],f=dp(c,d).slice();return ie.__wbindgen_free(c,d*8),f}finally{ie.__wbindgen_add_to_stack_pointer(16)}}class $i{static __wrap(t){const n=Object.create($i.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();ie.__wbg_parameterlist_free(t)}}class Nr{static __wrap(t){const n=Object.create(Nr.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();ie.__wbg_sampler_free(t)}}async function _p(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 bc(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,o){throw new Error(cp(i,o))},(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:n,module:r}=await _p(await e,t);return ie=n.exports,bc.__wbindgen_wasm_module=r,ie}var ea="/assets/deepslate_rs_bg.4990c219.wasm",xc={exports:{}},Ac={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,o=0;i<n.length;i++,o+=8)r[o>>>5]|=n[i]<<24-o%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 o=n[i]<<16|n[i+1]<<8|n[i+2],s=0;s<4;s++)i*8+s*6<=n.length*8?r.push(e.charAt(o>>>6*(3-s)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],i=0,o=0;i<n.length;o=++i%4)o!=0&&r.push((e.indexOf(n.charAt(i-1))&Math.pow(2,-2*o+8)-1)<<o*2|e.indexOf(n.charAt(i))>>>6-o*2);return r}};Ac.exports=t})();var wo={utf8:{stringToBytes:function(e){return wo.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(wo.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("")}}},ta=wo;/*!
|
|
* Determine if an object is a Buffer
|
|
*
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
* @license MIT
|
|
*/var vp=function(e){return e!=null&&(kc(e)||wp(e)||!!e._isBuffer)};function kc(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function wp(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&kc(e.slice(0,0))}(function(){var e=Ac.exports,t=ta.utf8,n=vp,r=ta.bin,i=function(o,s){o.constructor==String?s&&s.encoding==="binary"?o=r.stringToBytes(o):o=t.stringToBytes(o):n(o)?o=Array.prototype.slice.call(o,0):!Array.isArray(o)&&o.constructor!==Uint8Array&&(o=o.toString());for(var a=e.bytesToWords(o),l=o.length*8,u=1732584193,c=-271733879,d=-1732584194,f=271733878,p=0;p<a.length;p++)a[p]=(a[p]<<8|a[p]>>>24)&16711935|(a[p]<<24|a[p]>>>8)&4278255360;a[l>>>5]|=128<<l%32,a[(l+64>>>9<<4)+14]=l;for(var m=i._ff,v=i._gg,g=i._hh,_=i._ii,p=0;p<a.length;p+=16){var x=u,w=c,b=d,A=f;u=m(u,c,d,f,a[p+0],7,-680876936),f=m(f,u,c,d,a[p+1],12,-389564586),d=m(d,f,u,c,a[p+2],17,606105819),c=m(c,d,f,u,a[p+3],22,-1044525330),u=m(u,c,d,f,a[p+4],7,-176418897),f=m(f,u,c,d,a[p+5],12,1200080426),d=m(d,f,u,c,a[p+6],17,-1473231341),c=m(c,d,f,u,a[p+7],22,-45705983),u=m(u,c,d,f,a[p+8],7,1770035416),f=m(f,u,c,d,a[p+9],12,-1958414417),d=m(d,f,u,c,a[p+10],17,-42063),c=m(c,d,f,u,a[p+11],22,-1990404162),u=m(u,c,d,f,a[p+12],7,1804603682),f=m(f,u,c,d,a[p+13],12,-40341101),d=m(d,f,u,c,a[p+14],17,-1502002290),c=m(c,d,f,u,a[p+15],22,1236535329),u=v(u,c,d,f,a[p+1],5,-165796510),f=v(f,u,c,d,a[p+6],9,-1069501632),d=v(d,f,u,c,a[p+11],14,643717713),c=v(c,d,f,u,a[p+0],20,-373897302),u=v(u,c,d,f,a[p+5],5,-701558691),f=v(f,u,c,d,a[p+10],9,38016083),d=v(d,f,u,c,a[p+15],14,-660478335),c=v(c,d,f,u,a[p+4],20,-405537848),u=v(u,c,d,f,a[p+9],5,568446438),f=v(f,u,c,d,a[p+14],9,-1019803690),d=v(d,f,u,c,a[p+3],14,-187363961),c=v(c,d,f,u,a[p+8],20,1163531501),u=v(u,c,d,f,a[p+13],5,-1444681467),f=v(f,u,c,d,a[p+2],9,-51403784),d=v(d,f,u,c,a[p+7],14,1735328473),c=v(c,d,f,u,a[p+12],20,-1926607734),u=g(u,c,d,f,a[p+5],4,-378558),f=g(f,u,c,d,a[p+8],11,-2022574463),d=g(d,f,u,c,a[p+11],16,1839030562),c=g(c,d,f,u,a[p+14],23,-35309556),u=g(u,c,d,f,a[p+1],4,-1530992060),f=g(f,u,c,d,a[p+4],11,1272893353),d=g(d,f,u,c,a[p+7],16,-155497632),c=g(c,d,f,u,a[p+10],23,-1094730640),u=g(u,c,d,f,a[p+13],4,681279174),f=g(f,u,c,d,a[p+0],11,-358537222),d=g(d,f,u,c,a[p+3],16,-722521979),c=g(c,d,f,u,a[p+6],23,76029189),u=g(u,c,d,f,a[p+9],4,-640364487),f=g(f,u,c,d,a[p+12],11,-421815835),d=g(d,f,u,c,a[p+15],16,530742520),c=g(c,d,f,u,a[p+2],23,-995338651),u=_(u,c,d,f,a[p+0],6,-198630844),f=_(f,u,c,d,a[p+7],10,1126891415),d=_(d,f,u,c,a[p+14],15,-1416354905),c=_(c,d,f,u,a[p+5],21,-57434055),u=_(u,c,d,f,a[p+12],6,1700485571),f=_(f,u,c,d,a[p+3],10,-1894986606),d=_(d,f,u,c,a[p+10],15,-1051523),c=_(c,d,f,u,a[p+1],21,-2054922799),u=_(u,c,d,f,a[p+8],6,1873313359),f=_(f,u,c,d,a[p+15],10,-30611744),d=_(d,f,u,c,a[p+6],15,-1560198380),c=_(c,d,f,u,a[p+13],21,1309151649),u=_(u,c,d,f,a[p+4],6,-145523070),f=_(f,u,c,d,a[p+11],10,-1120210379),d=_(d,f,u,c,a[p+2],15,718787259),c=_(c,d,f,u,a[p+9],21,-343485551),u=u+x>>>0,c=c+w>>>0,d=d+b>>>0,f=f+A>>>0}return e.endian([u,c,d,f])};i._ff=function(o,s,a,l,u,c,d){var f=o+(s&a|~s&l)+(u>>>0)+d;return(f<<c|f>>>32-c)+s},i._gg=function(o,s,a,l,u,c,d){var f=o+(s&l|a&~l)+(u>>>0)+d;return(f<<c|f>>>32-c)+s},i._hh=function(o,s,a,l,u,c,d){var f=o+(s^a^l)+(u>>>0)+d;return(f<<c|f>>>32-c)+s},i._ii=function(o,s,a,l,u,c,d){var f=o+(a^(s|~l))+(u>>>0)+d;return(f<<c|f>>>32-c)+s},i._blocksize=16,i._digestsize=16,xc.exports=function(o,s){if(o==null)throw new Error("Illegal argument "+o);var a=e.wordsToBytes(i(o,s));return s&&s.asBytes?a:s&&s.asString?r.bytesToString(a):e.bytesToHex(a)}})();var Sc=xc.exports,P;(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 o(c){return typeof c=="object"&&c!==null?c:void 0}e.readObject=o;function s(c,d){if(!!Array.isArray(c))return c.map(f=>d(f))}e.readArray=s;function a(c,d){var p;const f=(p=o(c))!=null?p:{};return Object.fromEntries(Object.entries(f).map(([m,v])=>[m,d(v)]))}e.readMap=a;function l(c,d,f){const p=d(c);return p?f(p):void 0}e.compose=l;function u(c,d){return typeof c!="string"?d[0]:d.includes(c)?c:d[0]}e.readEnum=u})(P||(P={}));function or(e){let t=null;return()=>(t==null&&(t=e()),t)}function Tr(e,t,n){const r=e.get(t);if(r)return r;const i=n(t);return e.set(t,i),i}function Tt(e){return e*e}function fr(e,t,n){return Math.max(t,Math.min(n,e))}function zt(e,t,n){return t+e*(n-t)}function hi(e,t,n,r,i,o){return zt(t,zt(e,n,r),zt(e,i,o))}function Ec(e,t,n,r,i,o,s,a,l,u,c){return zt(n,hi(e,t,r,i,o,s),hi(e,t,a,l,u,c))}function sr(e,t,n){return e===0?t():e===1?n():t()+e*(n()-t())}function yo(e,t,n,r,i,o){return sr(t,()=>sr(e,n,r),()=>sr(e,i,o))}function Cc(e,t,n,r,i,o,s,a,l,u,c){return sr(n,()=>yo(e,t,r,i,o,s),()=>yo(e,t,a,l,u,c))}function Di(e,t,n){return n<0?e:n>1?t:zt(n,e,t)}function Go(e,t,n){return(e-t)/(n-t)}function Qr(e){return e*e*e*(e*(e*6-15)+10)}function pr(e,t,n,r,i){return zt(Go(e,t,n),r,i)}function Bi(e,t,n,r,i){return Di(r,i,Go(e,t,n))}function Ic(e,t,n){let r=t-e;for(;r>0;){const i=Math.floor(r/2),o=e+i;if(n(o)){r=i;continue}e=o+1,r-=i+1}return e}function Yo(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 fi(e,t,n,r,i,o,s,a){return BigInt(e)<<BigInt(56)|BigInt(t)<<BigInt(48)|BigInt(n)<<BigInt(40)|BigInt(r)<<BigInt(32)|BigInt(i)<<BigInt(24)|BigInt(o)<<BigInt(16)|BigInt(s)<<BigInt(8)|BigInt(a)}function yp(e){return(e&e-1)===0}function bp(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 pi;(function(e){function t(n){return typeof n=="object"&&n!==null&&"minValue"in n&&"maxValue"in n}e.is=t})(pi||(pi={}));var mi;(function(e){function t(i,o){var u,c,d,f;if(typeof i=="number")return new n(i);const s=(u=P.readObject(i))!=null?u:{},a=new r(o(s.coordinate)),l=(c=P.readArray(s.points,p=>{var m;return(m=P.readObject(p))!=null?m:{}}))!=null?c:[];if(l.length===0)return new n(0);for(const p of l){const m=(d=P.readNumber(p.location))!=null?d:0,v=t(p.value,o),g=(f=P.readNumber(p.derivative))!=null?f:0;a.addPoint(m,v,g)}return a}e.fromJson=t;class n{constructor(o){this.value=o}compute(){return this.value}min(){return this.value}max(){return this.value}mapAll(){return this}calculateMinMax(){}}e.Constant=n;class r{constructor(o,s=[],a=[],l=[]){this.coordinate=o,this.locations=s,this.values=a,this.derivatives=l,this.calculatedMin=Number.NEGATIVE_INFINITY,this.calculatedMax=Number.POSITIVE_INFINITY}compute(o){const s=this.coordinate.compute(o),a=Ic(0,this.locations.length,w=>s<this.locations[w])-1,l=this.locations.length-1;if(a<0)return this.values[0].compute(o)+this.derivatives[0]*(s-this.locations[0]);if(a===l)return this.values[l].compute(o)+this.derivatives[l]*(s-this.locations[l]);const u=this.locations[a],c=this.locations[a+1],d=this.derivatives[a],f=this.derivatives[a+1],p=(s-u)/(c-u),m=this.values[a].compute(o),v=this.values[a+1].compute(o),g=d*(c-u)-(v-m),_=-f*(c-u)+(v-m);return zt(p,m,v)+p*(1-p)*zt(p,g,_)}min(){return this.calculatedMin}max(){return this.calculatedMax}mapAll(o){return new r(o(this.coordinate),this.locations,this.values.map(s=>s.mapAll(o)),this.derivatives)}addPoint(o,s,a=0){return this.locations.push(o),this.values.push(typeof s=="number"?new e.Constant(s):s),this.derivatives.push(a),this}calculateMinMax(){if(!pi.is(this.coordinate))return;const o=this.locations.length-1;var s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;const l=this.coordinate.minValue(),u=this.coordinate.maxValue();for(const d of this.values)d.calculateMinMax();if(l<this.locations[0]){const d=r.linearExtend(l,this.locations,this.values[0].min(),this.derivatives,0),f=r.linearExtend(l,this.locations,this.values[0].max(),this.derivatives,0);s=Math.min(s,Math.min(d,f)),a=Math.max(a,Math.max(d,f))}if(u>this.locations[o]){const d=r.linearExtend(u,this.locations,this.values[o].min(),this.derivatives,o),f=r.linearExtend(u,this.locations,this.values[o].max(),this.derivatives,o);s=Math.min(s,Math.min(d,f)),a=Math.max(a,Math.max(d,f))}for(const d of this.values)s=Math.min(s,d.min()),a=Math.max(a,d.max());for(var c=0;c<o;++c){const d=this.locations[c],p=this.locations[c+1]-d,m=this.values[c],v=this.values[c+1],g=m.min(),_=m.max(),x=v.min(),w=v.max(),b=this.derivatives[c],A=this.derivatives[c+1];if(b!==0||A!==0){const S=b*p,I=A*p,k=Math.min(g,x),M=Math.max(_,w),N=S-w+g,L=S-x+_,$=-I+x-_,K=-I+w-g,ae=Math.min(N,$),le=Math.max(L,K);s=Math.min(s,k+.25*ae),a=Math.max(a,M+.25*le)}}this.calculatedMin=s,this.calculatedMax=a}static linearExtend(o,s,a,l,u){const c=l[u];return c==0?a:a+c*(o-s[u])}}e.MultiPoint=r})(mi||(mi={}));const At=class{constructor(e){this.seed=BigInt(0),this.setSeed(e)}fork(){return new At(this.nextLong())}forkPositional(){return new Mc(this.nextLong())}setSeed(e){this.seed=e^At.MULTIPLIER&At.MODULUS_MASK}advance(){this.seed=this.seed*At.MULTIPLIER+At.INCREMENT&At.MODULUS_MASK}consume(e){for(let t=0;t<e;t+=1)this.advance()}next(e){this.advance();const t=Number(this.seed>>BigInt(At.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)*At.FLOAT_MULTIPLIER}nextDouble(){const e=this.next(30);return this.advance(),e*At.DOUBLE_MULTIPLIER}};let tt=At;tt.MODULUS_BITS=48;tt.MODULUS_MASK=BigInt("281474976710655");tt.MULTIPLIER=BigInt("25214903917");tt.INCREMENT=BigInt("11");tt.FLOAT_MULTIPLIER=1/Math.pow(2,24);tt.DOUBLE_MULTIPLIER=1/Math.pow(2,30);class Mc{constructor(t){this.seed=t}at(t,n,r){const i=Yo(t,n,r);return new tt(i^this.seed)}fromHashOf(t){const n=Sc(t,{asBytes:!0}),r=fi(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]);return new tt(r^this.seed)}seedKey(){return[this.seed,BigInt(0)]}}const ee=class{constructor(e){this.seed=[BigInt(0),BigInt(0)],this.seed=e}static create(e){return new ee(ee.upgradeSeedTo128bit(e))}static mixStafford13(e){return e=(e^e>>ee.BIGINT_30)*ee.STAFFORD_1&ee.MAX_ULONG,e=(e^e>>ee.BIGINT_27)*ee.STAFFORD_2&ee.MAX_ULONG,(e^e>>ee.BIGINT_31)&ee.MAX_ULONG}static upgradeSeedTo128bit(e){e<0&&(e+=ee.POW2_60);const t=e^ee.SILVER_RATIO_64,n=t+ee.GOLDEN_RATIO_64&ee.MAX_ULONG;return[ee.mixStafford13(t),ee.mixStafford13(n)]}static rotateLeft(e,t){return e<<t&ee.MAX_ULONG|e>>ee.BIGINT_64-t}setSeed(e){this.seed=ee.upgradeSeedTo128bit(e)}fork(){return new ee([this.next(),this.next()])}forkPositional(){return new Oc(this.next(),this.next())}next(){const e=this.seed[0];let t=this.seed[1];const n=ee.rotateLeft(e+t&ee.MAX_ULONG,ee.BIGINT_17)+e&ee.MAX_ULONG;return t^=e,this.seed=[ee.rotateLeft(e,ee.BIGINT_49)^t^t<<ee.BIGINT_21&ee.MAX_ULONG,ee.rotateLeft(t,ee.BIGINT_28)],n}nextLong(){let e=this.next();return e>ee.POW2_63&&(e-=ee.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=ee.rotateLeft(t,ee.BIGINT_49)^n^n<<ee.BIGINT_21,n=ee.rotateLeft(n,ee.BIGINT_28);this.seed=[t,n]}nextBits(e){return this.next()>>BigInt(64-e)}nextInt(e){let t=this.next()&ee.MAX_UINT;if(e){const n=BigInt(e);let r=t*n,i=r&ee.MAX_UINT;if(i<n){const s=((~n&ee.MAX_UINT)+ee.BIGINT_1)%n;for(;i<s;)t=this.next()&ee.MAX_UINT,r=t*n,i=r&ee.MAX_UINT}const o=r>>ee.BIGINT_32;return Number(o)}else{let n=Number(t);return n>=2147483648&&(n-=4294967296),n}}nextFloat(){return Number(this.nextBits(24))*ee.FLOAT_MULTIPLIER}nextDouble(){return Number(this.nextBits(53))*ee.DOUBLE_MULTIPLIER}parityConfigString(){return"seedLo: "+this.seed[0]+", seedHi: "+this.seed[1]}};let Se=ee;Se.SILVER_RATIO_64=BigInt("7640891576956012809");Se.GOLDEN_RATIO_64=BigInt("-7046029254386353131");Se.FLOAT_MULTIPLIER=1/Math.pow(2,24);Se.DOUBLE_MULTIPLIER=11102230246251565e-32;Se.BIGINT_1=BigInt(1);Se.BIGINT_17=BigInt(17);Se.BIGINT_21=BigInt(21);Se.BIGINT_27=BigInt(27);Se.BIGINT_28=BigInt(28);Se.BIGINT_30=BigInt(30);Se.BIGINT_31=BigInt(31);Se.BIGINT_32=BigInt(32);Se.BIGINT_49=BigInt(49);Se.BIGINT_64=BigInt(64);Se.STAFFORD_1=BigInt("-4658895280553007687");Se.STAFFORD_2=BigInt("-7723592293110705685");Se.MAX_ULONG=BigInt("0xFFFFFFFFFFFFFFFF");Se.POW2_60=BigInt("0x10000000000000000");Se.POW2_63=BigInt("0x8000000000000000");Se.MAX_UINT=BigInt(4294967295);class Oc{constructor(t,n){this.seedLo=t,this.seedHi=n}at(t,n,r){const o=Yo(t,n,r)^this.seedLo;return new Se([o,this.seedHi])}fromHashOf(t){const n=Sc(t,{asBytes:!0}),r=fi(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),i=fi(n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]);return new Se([r^this.seedLo,i^this.seedHi])}seedKey(){return[this.seedLo,this.seedHi]}}const Lt=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 o=(e+t)*Lt.F2,s=Math.floor(e+o),a=s-(n=(s+(r=Math.floor(t+o)))*Lt.G2),l=e-a;let u,c;l>(i=t-(r-n))?(u=1,c=0):(u=0,c=1);const d=l-u+Lt.G2,f=i-c+Lt.G2,p=l-1+2*Lt.G2,m=i-1+2*Lt.G2,v=s&255,g=r&255,_=this.P(v+this.P(g))%12,x=this.P(v+u+this.P(g+c))%12,w=this.P(v+1+this.P(g+1))%12,b=this.getCornerNoise3D(_,l,i,0,.5),A=this.getCornerNoise3D(x,d,f,0,.5),S=this.getCornerNoise3D(w,p,m,0,.5);return 70*(b+A+S)}sample(e,t,n){const r=(e+t+n)*.3333333333333333,i=Math.floor(e+r),o=Math.floor(t+r),s=Math.floor(n+r),a=(i+o+s)*.16666666666666666,l=e-(i-a),u=t-(o-a),c=n-(s-a);let d,f,p,m,v,g;l>=u?u>=c?(d=1,f=0,p=0,m=1,v=1,g=0):l>=c?(d=1,f=0,p=0,m=1,v=0,g=1):(d=0,f=0,p=1,m=1,v=0,g=1):u<c?(d=0,f=0,p=1,m=0,v=1,g=1):l<c?(d=0,f=1,p=0,m=0,v=1,g=1):(d=0,f=1,p=0,m=1,v=1,g=0);const _=l-d+.16666666666666666,x=u-f+.16666666666666666,w=c-p+.16666666666666666,b=l-m+.3333333333333333,A=u-v+.3333333333333333,S=c-g+.3333333333333333,I=l-.5,k=u-.5,M=c-.5,N=i&255,L=o&255,$=s&255,K=this.P(N+this.P(L+this.P($)))%12,ae=this.P(N+d+this.P(L+f+this.P($+p)))%12,le=this.P(N+m+this.P(L+v+this.P($+g)))%12,T=this.P(N+1+this.P(L+1+this.P($+1)))%12,D=this.getCornerNoise3D(K,l,u,c,.6),V=this.getCornerNoise3D(ae,_,x,w,.6),C=this.getCornerNoise3D(le,b,A,S,.6),y=this.getCornerNoise3D(T,I,k,M,.6);return 32*(D+V+C+y)}P(e){return this.p[e&255]}getCornerNoise3D(e,t,n,r,i){let o,s=i-t*t-n*n-r*r;return s<0?o=0:(s*=s,o=s*s*Lt.gradDot(e,t,n,r)),o}static gradDot(e,t,n,r){const i=Lt.GRADIENT[e&15];return i[0]*t+i[1]*n+i[2]*r}};let Je=Lt;Je.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]];Je.F2=.5*(Math.sqrt(3)-1);Je.G2=(3-Math.sqrt(3))/6;class bo{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,o=0){const s=t+this.xo,a=n+this.yo,l=r+this.zo,u=Math.floor(s),c=Math.floor(a),d=Math.floor(l),f=s-u,p=a-c,m=l-d;let v=0;if(i!==0){const g=o>=0&&o<p?o:p;v=Math.floor(g/i+1e-7)*i}return this.sampleAndLerp(u,c,d,f,p-v,m,p)}sampleAndLerp(t,n,r,i,o,s,a){const l=this.P(t),u=this.P(t+1),c=this.P(l+n),d=this.P(l+n+1),f=this.P(u+n),p=this.P(u+n+1),m=Je.gradDot(this.P(c+r),i,o,s),v=Je.gradDot(this.P(f+r),i-1,o,s),g=Je.gradDot(this.P(d+r),i,o-1,s),_=Je.gradDot(this.P(p+r),i-1,o-1,s),x=Je.gradDot(this.P(c+r+1),i,o,s-1),w=Je.gradDot(this.P(f+r+1),i-1,o,s-1),b=Je.gradDot(this.P(d+r+1),i,o-1,s-1),A=Je.gradDot(this.P(p+r+1),i-1,o-1,s-1),S=Qr(i),I=Qr(a),k=Qr(s);return Ec(S,I,k,m,v,g,_,x,w,b,A)}P(t){return this.p[t&255]&255}}class ye{constructor(t,n,r){if(t instanceof Se){const i=t.forkPositional();this.noiseLevels=Array(r.length);for(let o=0;o<r.length;o++)if(r[o]!==0){const s=n+o;this.noiseLevels[o]=new bo(i.fromHashOf("octave_"+s))}}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 bo(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,o=0,s=!1){let a=0,l=this.lowestFreqInputFactor,u=this.lowestFreqValueFactor;for(let c=0;c<this.noiseLevels.length;c+=1){const d=this.noiseLevels[c];d&&(a+=this.amplitudes[c]*u*d.sample(ye.wrap(t*l),s?-d.yo:ye.wrap(n*l),ye.wrap(r*l),i*l,o*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 Nc{constructor(t,n,r,i,o,s){this.xzScale=n,this.yScale=r,this.xzFactor=i,this.yFactor=o,this.smearScaleMultiplier=s,this.minLimitNoise=new ye(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.maxLimitNoise=new ye(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.mainNoise=new ye(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,o=n*this.yMultiplier,s=r*this.xzMultiplier,a=i/this.xzFactor,l=o/this.yFactor,u=s/this.xzFactor,c=this.yMultiplier*this.smearScaleMultiplier,d=c/this.yFactor;let f,p=0,m=1;for(let _=0;_<8;_+=1){if(f=this.mainNoise.getOctaveNoise(_),f){const x=ye.wrap(a*m),w=ye.wrap(l*m),b=ye.wrap(u*m);p+=f.sample(x,w,b,d*m,l*m)/m}m/=2}p=(p/10+1)/2,m=1;let v=0,g=0;for(let _=0;_<16;_+=1){const x=ye.wrap(i*m),w=ye.wrap(o*m),b=ye.wrap(s*m),A=c*m;p<1&&(f=this.minLimitNoise.getOctaveNoise(_))&&(v+=f.sample(x,w,b,A,o*m)/m),p>0&&(f=this.maxLimitNoise.getOctaveNoise(_))&&(g+=f.sample(x,w,b,A,o*m)/m),m/=2}return Di(v/512,g/512,p)/128}}const ei=class{constructor(e,{firstOctave:t,amplitudes:n}){this.first=new ye(e,t,n),this.second=new ye(e,t,n);let r=1/0,i=-1/0;for(let s=0;s<n.length;s+=1)n[s]!==0&&(r=Math.min(r,s),i=Math.max(i,s));const o=.1*(1+1/(i-r+1));this.valueFactor=1/6/o,this.maxValue=(this.first.maxValue+this.second.maxValue)*this.valueFactor}sample(e,t,n){const r=e*ei.INPUT_FACTOR,i=t*ei.INPUT_FACTOR,o=n*ei.INPUT_FACTOR;return(this.first.sample(e,t,n)+this.second.sample(r,i,o))*this.valueFactor}};let Lr=ei;Lr.INPUT_FACTOR=1.0181268882175227;var zn;(function(e){function t(r,i){return{firstOctave:r,amplitudes:i}}e.create=t;function n(r){var o,s,a;const i=(o=P.readObject(r))!=null?o:{};return{firstOctave:(s=P.readInt(i.firstOctave))!=null?s:0,amplitudes:(a=P.readArray(i.amplitudes,l=>{var u;return(u=P.readNumber(l))!=null?u:0}))!=null?a:[]}}e.fromJson=n})(zn||(zn={}));class xp{constructor(t,n){const r=n[n.length-1],o=-n[0]+r+1,s=new Set(n),a=new Je(t);this.noiseLevels=Array(o),r>=0&&r<o&&s.has(0)&&(this.noiseLevels[r]=a);for(let l=r+1;l<o;l+=1)l>=0&&s.has(r-l)?this.noiseLevels[l]=new Je(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,o)-1)}sample(t,n,r){let i=0,o=this.highestFreqInputFactor,s=this.highestFreqValueFactor;for(let a=0;a<this.noiseLevels.length;a+=1){const l=this.noiseLevels[a];l&&(i+=s*l.sample2D(t*o+(r?l.xo:0),n*o+(r?l.yo:0))),o/=2,s*=2}return i}}var ct;(function(e){e.UP="up",e.DOWN="down",e.NORTH="north",e.EAST="east",e.SOUTH="south",e.WEST="west"})(ct||(ct={}));const Ap={[ct.UP]:[0,1,0],[ct.DOWN]:[0,-1,0],[ct.NORTH]:[0,0,-1],[ct.EAST]:[1,0,0],[ct.SOUTH]:[0,0,1],[ct.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})(ct||(ct={}));var Ke;(function(e){function t(s,a,l){return[s,a,l]}e.create=t,e.ZERO=e.create(0,0,0);function n(s,a,l,u){return[s[0]+a,s[1]+l,s[2]+u]}e.offset=n;function r(s,a){return e.offset(s,...ct.normal(a))}e.towards=r;function i(s,a){return s===a?!0:s[0]===a[0]&&s[1]===a[1]&&s[2]===a[2]}e.equals=i;function o(s){return s[0]*s[0]+s[1]*s[1]+s[2]*s[2]}e.magnitude=o})(Ke||(Ke={}));function Nn(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 Vr(e,t,n,r){const i=Nn(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 Tc(e,t){try{return e()}catch{return t}}const ti=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 ti(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 ti(n,r)}return new ti(this.DEFAULT_NAMESPACE,e)}};let be=ti;be.DEFAULT_NAMESPACE="minecraft";be.SEPARATOR=":";const kt=class{constructor(e,t={}){this.properties=t,this.name=typeof e=="string"?be.parse(e):e}getName(){return this.name}getProperties(){return this.properties}getProperty(e){return this.properties[e]}isFluid(){return this.is(kt.WATER)||this.is(kt.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=be.parse(Nn(e.value,"Name","string")),n=Tc(()=>Nn(e.value,"Properties","compound"),{}),r=Object.keys(n).reduce((i,o)=>_e(q({},i),{[o]:Nn(n,o,"string")}),{});return new kt(t,r)}static fromJson(e){var i,o;const t=(i=P.readObject(e))!=null?i:{},n=be.parse((o=P.readString(t.Name))!=null?o:kt.STONE.name.toString()),r=P.readMap(t.Properties,s=>{var a;return(a=P.readString(s))!=null?a:""});return new kt(n,r)}};let ge=kt;ge.AIR=new kt(be.create("air"));ge.STONE=new kt(be.create("stone"));ge.WATER=new kt(be.create("water"),{level:"0"});ge.LAVA=new kt(be.create("lava"),{level:"0"});const ar=class{constructor(e){this.minY=e,this.storage=Array(ar.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(o=>o.equals(r));i===-1&&(i=this.palette.length,this.palette.push(r)),this.storage[this.index(e,t,n)]=i}};let Fi=ar;Fi.WIDTH=16;Fi.SIZE=ar.WIDTH*ar.WIDTH*ar.WIDTH;class kp{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 s;const[n,r,i]=t,o=this.sections[this.getSectionIndex(r)];return(s=o==null?void 0:o.getBlockState(n&15,r&15,i&15))!=null?s:ge.AIR}setBlockState(t,n){const[r,i,o]=t,s=this.getSectionIndex(i);let a=this.sections[s];if(a===null){if(n.equals(ge.AIR))return;a=this.getOrCreateSection(s)}a.setBlockState(r&15,i&15,o&15,n)}getOrCreateSection(t){return this.sections[t]==null&&(this.sections[t]=new Fi(this.minSection+t)),this.sections[t]}}var We;(function(e){function t(c,d){return[c,d]}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 o(c[0],c[1])}e.toLong=i;function o(c,d){return BigInt(c&4294967295)|BigInt(d&4294967295)<<BigInt(32)}e.asLong=o;function s(c){return c[0]<<4}e.minBlockX=s;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})(We||(We={}));var un;(function(e){function t(i,o){return s=>typeof s=="string"?r(i,be.parse(s)):n(o(s))}e.parser=t;function n(i){return{value:()=>i,key:()=>{}}}e.direct=n;function r(i,o){return{value:()=>i.getOrThrow(o),key:()=>o}}e.reference=r})(un||(un={}));const Wo=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),un.reference(this,e)}keys(){return[...this.storage.keys()].map(e=>be.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 Wo(this.key,this.parser)}};let gi=Wo;gi.REGISTRY=new Wo(be.create("root"));class qo{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 o=new ge(n,r);let s=this.palette.findIndex(a=>a.equals(o));return s===-1&&(s=this.palette.length,this.palette.push(o)),this.blocks.push({pos:t,state:s,nbt:i}),this.blocksMap[t[0]*this.size[1]*this.size[2]+t[1]*this.size[2]+t[2]]={pos:t,state:s,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=Vr(t.value,"size","int",3),r=Vr(t.value,"palette","compound").map(o=>ge.fromNbt({name:"",value:o})),i=Vr(t.value,"blocks","compound").map(o=>{const s=Vr(o,"pos","int",3),a=Nn(o,"state","int"),l=Tc(()=>Nn(o,"nbt","compound"),void 0);return{pos:s,state:a,nbt:l}});return new qo(n,r,i)}}var dn;(function(e){e.NOISE=t("worldgen/noise"),e.DENSITY_FUNCTION=t("worldgen/density_function");function t(n){const r=new gi(be.create(n));return gi.REGISTRY.register(r.key,r),r}})(dn||(dn={}));class ce{minValue(){return-this.maxValue()}mapAll(t){return t.map(this)}}(function(e){function t(C,y,E){return{x:C,y,z:E}}e.context=t;class n extends e{constructor(y){super(),this.input=y}compute(y){return this.transform(y,this.input.compute(y))}}const r=un.parser(dn.NOISE,zn.fromJson);function i(C,y=i){var j,Y,he,Ue,ft,Ge,Ye,Re,yt,pt,st,Te,Kt,Ot,J,Fe,Ae,fe,bt,nt;if(typeof C=="string")return new a(un.reference(dn.DENSITY_FUNCTION,be.parse(C)));if(typeof C=="number")return new s(C);const E=(j=P.readObject(C))!=null?j:{},R=(Y=P.readString(E.type))==null?void 0:Y.replace(/^minecraft:/,"");switch(R){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((he=P.readNumber(E.xz_scale))!=null?he:1,(Ue=P.readNumber(E.y_scale))!=null?Ue:1,(ft=P.readNumber(E.xz_factor))!=null?ft:80,(Ge=P.readNumber(E.y_factor))!=null?Ge:160,(Ye=P.readNumber(E.smear_scale_multiplier))!=null?Ye:8);case"flat_cache":return new d(y(E.argument));case"interpolated":return new v(y(E.argument));case"cache_2d":return new p(y(E.argument));case"cache_once":return new m(y(E.argument));case"cache_all_in_cell":return new f(y(E.argument));case"noise":return new g((Re=P.readNumber(E.xz_scale))!=null?Re:1,(yt=P.readNumber(E.y_scale))!=null?yt:1,r(E.noise));case"end_islands":return new _;case"weird_scaled_sampler":return new b(y(E.input),P.readEnum(E.rarity_value_mapper,x),r(E.noise));case"shifted_noise":return new A(y(E.shift_x),y(E.shift_y),y(E.shift_z),(pt=P.readNumber(E.xz_scale))!=null?pt:1,(st=P.readNumber(E.y_scale))!=null?st:1,r(E.noise));case"range_choice":return new S(y(E.input),(Te=P.readNumber(E.min_inclusive))!=null?Te:0,(Kt=P.readNumber(E.max_exclusive))!=null?Kt:1,y(E.when_in_range),y(E.when_out_of_range));case"shift_a":return new k(r(E.argument));case"shift_b":return new M(r(E.argument));case"shift":return new N(r(E.argument));case"blend_density":return new L(y(E.argument));case"clamp":return new $(y(E.input),(Ot=P.readNumber(E.min))!=null?Ot:0,(J=P.readNumber(E.max))!=null?J:1);case"abs":case"square":case"cube":case"half_negative":case"quarter_negative":case"squeeze":return new ae(R,y(E.argument));case"add":case"mul":case"min":case"max":return new T(P.readEnum(R,le),y(E.argument1),y(E.argument2));case"spline":return new D(mi.fromJson(E.spline,y));case"constant":return new s((Fe=P.readNumber(E.argument))!=null?Fe:0);case"y_clamped_gradient":return new V((Ae=P.readInt(E.from_y))!=null?Ae:-4064,(fe=P.readInt(E.to_y))!=null?fe:4062,(bt=P.readNumber(E.from_value))!=null?bt:-4064,(nt=P.readNumber(E.to_value))!=null?nt:4062)}return s.ZERO}e.fromJson=i;const o=class extends e{constructor(C){super(),this.value=C}compute(){return this.value}minValue(){return this.value}maxValue(){return this.value}};let s=o;s.ZERO=new o(0),s.ONE=new o(1),e.Constant=s;class a extends e{constructor(y){super(),this.holder=y}compute(y){return this.holder.value().compute(y)}minValue(){return this.holder.value().minValue()}maxValue(){return this.holder.value().maxValue()}}e.HolderHolder=a;class l extends e.Constant{constructor(y,E,R){super(y),this.min=E,this.max=R}minValue(){return this.min}maxValue(){return this.max}}e.ConstantMinMax=l;class u extends e{constructor(y,E,R,j,Y,he){super(),this.xzScale=y,this.yScale=E,this.xzFactor=R,this.yFactor=j,this.smearScaleMultiplier=Y,this.blendedNoise=he}compute(y){var E,R;return(R=(E=this.blendedNoise)==null?void 0:E.sample(y.x,y.y,y.z))!=null?R:0}maxValue(){var y,E;return(E=(y=this.blendedNoise)==null?void 0:y.maxValue)!=null?E:0}}e.OldBlendedNoise=u;class c extends e{constructor(y){super(),this.wrapped=y}minValue(){return this.wrapped.minValue()}maxValue(){return this.wrapped.maxValue()}}class d extends c{constructor(y){super(y),this.lastValue=0}compute(y){const E=y.x>>2,R=y.z>>2;return(this.lastQuartX!==E||this.lastQuartZ!==R)&&(this.lastValue=this.wrapped.compute(e.context(E<<2,0,R<<2)),this.lastQuartX=E,this.lastQuartZ=R),this.lastValue}mapAll(y){return y.map(new d(this.wrapped.mapAll(y)))}}e.FlatCache=d;class f extends c{constructor(y){super(y)}compute(y){return this.wrapped.compute(y)}mapAll(y){return y.map(new f(this.wrapped.mapAll(y)))}}e.CacheAllInCell=f;class p extends c{constructor(y){super(y),this.lastValue=0}compute(y){const E=y.x,R=y.z;return(this.lastBlockX!==E||this.lastBlockZ!==R)&&(this.lastValue=this.wrapped.compute(y),this.lastBlockX=E,this.lastBlockZ=R),this.lastValue}mapAll(y){return y.map(new p(this.wrapped.mapAll(y)))}}e.Cache2D=p;class m extends c{constructor(y){super(y),this.lastValue=0}compute(y){const E=y.x,R=y.y,j=y.z;return(this.lastBlockX!==E||this.lastBlockY!==R||this.lastBlockZ!==j)&&(this.lastValue=this.wrapped.compute(y),this.lastBlockX=E,this.lastBlockY=R,this.lastBlockZ=j),this.lastValue}mapAll(y){return y.map(new m(this.wrapped.mapAll(y)))}}e.CacheOnce=m;class v extends c{constructor(y,E=4,R=4){super(y),this.cellWidth=E,this.cellHeight=R,this.values=new Map}compute({x:y,y:E,z:R}){const j=this.cellWidth,Y=this.cellHeight,he=(y%j+j)%j/j,Ue=(E%Y+Y)%Y/Y,ft=(R%j+j)%j/j,Ge=Math.floor(y/j)*j,Ye=Math.floor(E/Y)*Y,Re=Math.floor(R/j)*j;return Cc(he,Ue,ft,()=>this.computeCorner(Ge,Ye,Re),()=>this.computeCorner(Ge+j,Ye,Re),()=>this.computeCorner(Ge,Ye+Y,Re),()=>this.computeCorner(Ge+j,Ye+Y,Re),()=>this.computeCorner(Ge,Ye,Re+j),()=>this.computeCorner(Ge+j,Ye,Re+j),()=>this.computeCorner(Ge,Ye+Y,Re+j),()=>this.computeCorner(Ge+j,Ye+Y,Re+j))}computeCorner(y,E,R){return Tr(this.values,`${y} ${E} ${R}`,()=>this.wrapped.compute(e.context(y,E,R)))}mapAll(y){return y.map(new v(this.wrapped.mapAll(y)))}withCellSize(y,E){return new v(this.wrapped,y,E)}}e.Interpolated=v;class g extends e{constructor(y,E,R,j){super(),this.xzScale=y,this.yScale=E,this.noiseData=R,this.noise=j}compute(y){var E,R;return(R=(E=this.noise)==null?void 0:E.sample(y.x*this.xzScale,y.y*this.yScale,y.z*this.xzScale))!=null?R:0}maxValue(){var y,E;return(E=(y=this.noise)==null?void 0:y.maxValue)!=null?E:2}}e.Noise=g;class _ extends e{compute(){return 0}minValue(){return-.84375}maxValue(){return .5625}}const x=["type_1","type_2"],w=class extends n{constructor(C,y,E,R){super(C),this.rarityValueMapper=y,this.noiseData=E,this.noise=R,this.mapper=w.ValueMapper[this.rarityValueMapper]}transform(C,y){if(!this.noise)return 0;const E=this.mapper(y);return E*Math.abs(this.noise.sample(C.x/E,C.y/E,C.z/E))}mapAll(C){return C.map(new w(this.input.mapAll(C),this.rarityValueMapper,this.noiseData,this.noise))}minValue(){return 0}maxValue(){return this.rarityValueMapper==="type_1"?2:3}static rarityValueMapper1(C){return C<-.5?.75:C<0?1:C<.5?1.5:2}static rarityValueMapper2(C){return C<-.75?.5:C<-.5?.75:C<.5?1:C<.75?2:3}};let b=w;b.ValueMapper={type_1:w.rarityValueMapper1,type_2:w.rarityValueMapper2},e.WeirdScaledSampler=b;class A extends g{constructor(y,E,R,j,Y,he,Ue){super(j,Y,he,Ue),this.shiftX=y,this.shiftY=E,this.shiftZ=R}compute(y){var Y,he;const E=y.x*this.xzScale+this.shiftX.compute(y),R=y.y*this.yScale+this.shiftY.compute(y),j=y.z*this.xzScale+this.shiftZ.compute(y);return(he=(Y=this.noise)==null?void 0:Y.sample(E,R,j))!=null?he:0}mapAll(y){return y.map(new A(this.shiftX.mapAll(y),this.shiftY.mapAll(y),this.shiftZ.mapAll(y),this.xzScale,this.yScale,this.noiseData,this.noise))}}e.ShiftedNoise=A;class S extends e{constructor(y,E,R,j,Y){super(),this.input=y,this.minInclusive=E,this.maxExclusive=R,this.whenInRange=j,this.whenOutOfRange=Y}compute(y){const E=this.input.compute(y);return this.minInclusive<=E&&E<this.maxExclusive?this.whenInRange.compute(y):this.whenOutOfRange.compute(y)}mapAll(y){return y.map(new S(this.input.mapAll(y),this.minInclusive,this.maxExclusive,this.whenInRange.mapAll(y),this.whenOutOfRange.mapAll(y)))}minValue(){return Math.min(this.whenInRange.minValue(),this.whenOutOfRange.minValue())}maxValue(){return Math.max(this.whenInRange.maxValue(),this.whenOutOfRange.maxValue())}}e.RangeChoice=S;class I extends e{constructor(y,E){super(),this.noiseData=y,this.offsetNoise=E}compute(y){var E,R;return(R=(E=this.offsetNoise)==null?void 0:E.sample(y.x*.25,y.y*.25,y.z*.25))!=null?R:0}maxValue(){var y,E;return((E=(y=this.offsetNoise)==null?void 0:y.maxValue)!=null?E:2)*4}}e.ShiftNoise=I;class k extends I{constructor(y,E){super(y,E)}compute(y){return super.compute(e.context(y.x,0,y.z))}withNewNoise(y){return new k(this.noiseData,y)}}e.ShiftA=k;class M extends I{constructor(y,E){super(y,E)}compute(y){return super.compute(e.context(y.z,y.x,0))}withNewNoise(y){return new M(this.noiseData,y)}}e.ShiftB=M;class N extends I{constructor(y,E){super(y,E)}withNewNoise(y){return new N(this.noiseData,y)}}e.Shift=N;class L extends n{constructor(y){super(y)}transform(y,E){return E}mapAll(y){return y.map(new L(this.input.mapAll(y)))}minValue(){return-1/0}maxValue(){return 1/0}}e.BlendDensity=L;class $ extends n{constructor(y,E,R){super(y),this.min=E,this.max=R}transform(y,E){return fr(E,this.min,this.max)}mapAll(y){return y.map(new $(this.input.mapAll(y),this.min,this.max))}minValue(){return this.min}maxValue(){return this.max}}e.Clamp=$;const K=class extends n{constructor(C,y,E,R){super(y),this.type=C,this.min=E,this.max=R,this.transformer=K.MappedTypes[this.type]}transform(C,y){return this.transformer(y)}mapAll(C){return C.map(new K(this.type,this.input.mapAll(C)))}minValue(){var C;return(C=this.min)!=null?C:-1/0}maxValue(){var C;return(C=this.max)!=null?C:1/0}withMinMax(){const C=this.input.minValue();let y=this.transformer(C),E=this.transformer(this.input.maxValue());return(this.type==="abs"||this.type==="square")&&(E=Math.max(y,E),y=Math.max(0,C)),new K(this.type,this.input,y,E)}};let ae=K;ae.MappedTypes={abs:C=>Math.abs(C),square:C=>C*C,cube:C=>C*C*C,half_negative:C=>C>0?C:C*.5,quarter_negative:C=>C>0?C:C*.25,squeeze:C=>{const y=fr(C,-1,1);return y/2-y*y*y/24}},e.Mapped=ae;const le=["add","mul","min","max"];class T extends e{constructor(y,E,R,j,Y){super(),this.type=y,this.argument1=E,this.argument2=R,this.min=j,this.max=Y}compute(y){const E=this.argument1.compute(y);switch(this.type){case"add":return E+this.argument2.compute(y);case"mul":return E===0?0:E*this.argument2.compute(y);case"min":return E<this.argument2.minValue()?E:Math.min(E,this.argument2.compute(y));case"max":return E>this.argument2.maxValue()?E:Math.max(E,this.argument2.compute(y))}}mapAll(y){return y.map(new T(this.type,this.argument1.mapAll(y),this.argument2.mapAll(y)))}minValue(){var y;return(y=this.min)!=null?y:-1/0}maxValue(){var y;return(y=this.max)!=null?y:1/0}withMinMax(){const y=this.argument1.minValue(),E=this.argument2.minValue(),R=this.argument1.maxValue(),j=this.argument2.maxValue();(this.type==="min"||this.type==="max")&&(y>=j||E>=R)&&console.warn(`Creating a ${this.type} function between two non-overlapping inputs`);let Y,he;switch(this.type){case"add":Y=y+E,he=R+j;break;case"mul":Y=y>0&&E>0?y*E||0:R<0&&j<0?R*j||0:Math.min(y*j||0,E*R||0),he=y>0&&E>0?R*j||0:R<0&&j<0?y*E||0:Math.max(y*E||0,R*j||0);break;case"min":Y=Math.min(y,E),he=Math.min(R,j);break;case"max":Y=Math.max(y,E),he=Math.max(R,j);break}return new T(this.type,this.argument1,this.argument2,Y,he)}}e.Ap2=T;class D extends e{constructor(y){super(),this.spline=y}compute(y){return this.spline.compute(y)}mapAll(y){const E=this.spline.mapAll(R=>R instanceof e?R.mapAll(y):R);return E.calculateMinMax(),y.map(new D(E))}minValue(){return this.spline.min()}maxValue(){return this.spline.max()}}e.Spline=D;class V extends e{constructor(y,E,R,j){super(),this.fromY=y,this.toY=E,this.fromValue=R,this.toValue=j}compute(y){return Bi(y.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=V})(ce||(ce={}));class mr{constructor(t,n){this.level=t,this.type=n}at(t){return t<this.level?this.type:ge.AIR}}var _i;(function(e){function t(n){return{compute({x:r,y:i,z:o},s){if(!(s>0))return n(r,i,o).at(i)}}}e.createDisabled=t})(_i||(_i={}));const mt=class{constructor(e,t,n,r,i,o,s,a,l,u){this.noiseChunk=e,this.barrierNoise=n,this.fluidLevelFloodednessNoise=r,this.fluidLevelSpreadNoise=i,this.lavaNoise=o,this.random=s,this.globalFluidPicker=u,this.minGridX=this.gridX(We.minBlockX(t))-1,this.gridSizeX=this.gridX(We.maxBlockX(t))+1-this.minGridX+1,this.minGridY=this.gridY(a)-1,this.minGridZ=this.gridZ(We.minBlockZ(t))-1,this.gridSizeZ=this.gridZ(We.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(Ke.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),o=this.gridY(t+1),s=this.gridZ(n-5);let a=Number.MAX_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,c=Ke.ZERO,d=Ke.ZERO,f=Ke.ZERO;for(let b=0;b<=1;b+=1)for(let A=-1;A<=1;A+=1)for(let S=0;S<=1;S+=1){const I=this.getLocation(i+b,o+A,s+S),k=Ke.magnitude(I);a>=k?(f=d,d=c,c=I,u=l,l=a,a=k):l>=k?(f=d,d=I,u=l,l=k):u>=k&&(f=I,u=k)}const p=this.getStatus(c),m=this.getStatus(d),v=this.getStatus(f),g=mt.similarity(a,l),_=mt.similarity(a,u),x=mt.similarity(l,u);let w;if(p.at(t).is(ge.WATER)&&this.globalFluidPicker(e,t-1,n).at(t-1).is(ge.LAVA))w=1;else if(g>-1){const b=or(()=>this.barrierNoise.compute(ce.context(e,t*.5,n))),A=this.calculatePressure(t,p,m,b),S=this.calculatePressure(t,p,v,b),I=this.calculatePressure(t,m,v,b),k=Math.max(A,S*Math.max(0,_),I*Math.max(x));w=Math.max(0,2*Math.max(0,g)*k)}else w=0;if(r+w<=0)return p.at(t)}}}static similarity(e,t){return 1-Math.abs(t-e)/25}calculatePressure(e,t,n,r){const i=t.at(e),o=n.at(e);if(i.is(ge.LAVA)&&o.is(ge.WATER)||i.is(ge.WATER)&&o.is(ge.LAVA))return 1;const s=Math.abs(t.level-n.level);if(s===0)return 0;const a=(t.level+n.level)/2,l=e+.5-a,u=s/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)),o=this.aquiferCache[i];if(o!==void 0)return o;const s=this.computeStatus(t,n,r);return this.aquiferCache[i]=s,s}computeStatus(e,t,n){const r=this.globalFluidPicker(e,t,n);let i=Number.MAX_SAFE_INTEGER,o=!1;for(const[p,m]of mt.SURFACE_SAMPLING){const v=e+(m<<4),g=n+(m<<4),_=this.noiseChunk.getPreliminarySurfaceLevel(v,g);i=Math.min(i,_);const x=p===0&&m===0;if(x&&t-12>_+8)return r;if(x||t+12>_+8){const w=this.globalFluidPicker(v,_+8,g);if(!w.at(_+8).is(ge.AIR)){if(x)return w;o=!0}}}const s=o?Bi(i+8-t,0,64,1,0):0,a=fr(this.fluidLevelFloodednessNoise.compute(ce.context(e,t*.67,n)),-1,1);if(a>pr(s,1,0,-.3,.8))return r;if(a<=pr(s,1,0,-.8,.4))return new mr(Number.MIN_SAFE_INTEGER,r.type);const l=Math.floor(t/40),u=this.fluidLevelSpreadNoise.compute(ce.context(Math.floor(e/16),l,Math.floor(n/16))),c=l*40+20+Math.floor(u/3)*3,d=Math.min(i,c),f=this.getFluidType(e,t,n,r.type,c);return new mr(d,f)}getFluidType(e,t,n,r,i){if(i<=-10){const o=this.lavaNoise.compute(ce.context(Math.floor(e/64),Math.floor(t/40),Math.floor(n/64)));if(Math.abs(o)>.3)return ge.LAVA}return r}getLocation(e,t,n){const r=this.getIndex(e,t,n),i=this.aquiferLocationCache[r];if(Ke.equals(i,Ke.ZERO))return i;const o=this.random.at(e,t,n),s=Ke.create(e*mt.X_SPACING+o.nextInt(10),t*mt.Y_SPACING+o.nextInt(9),n*mt.Z_SPACING+o.nextInt(10));return this.aquiferLocationCache[r]=s,s}getIndex(e,t,n){const r=e-this.minGridX,i=t-this.minGridY,o=n-this.minGridZ,s=(i*this.gridSizeZ+o)*this.gridSizeX+r;if(s<0||s>=this.gridSize)throw new Error(`Invalid aquifer index at ${e} ${t} ${n}: 0 <= ${s} < ${this.gridSize}`);return s}gridX(e){return Math.floor(e/mt.X_SPACING)}gridY(e){return Math.floor(e/mt.Y_SPACING)}gridZ(e){return Math.floor(e/mt.Z_SPACING)}};let Rr=mt;Rr.X_SPACING=16;Rr.Y_SPACING=12;Rr.Z_SPACING=16;Rr.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 gr;(function(e){function n(v,g,_,x,w,b){return new a(v,g,_,x,w,b)}e.target=n;function r(v,g,_,x,w,b,A){return new s(i(v),i(g),i(_),i(x),i(w),i(b),A)}e.parameters=r;function i(v,g){return typeof v=="number"?new o(v,g!=null?g:v):v}e.param=i;class o{constructor(g,_){this.min=g,this.max=_}distance(g){const _=(typeof g=="number"?g:g.min)-this.max,x=this.min-(typeof g=="number"?g:g.max);return _>0?_:Math.max(x,0)}union(g){return new o(Math.min(this.min,g.min),Math.max(this.max,g.max))}static fromJson(g){var w;if(typeof g=="number")return new o(g,g);const[_,x]=(w=P.readArray(g,b=>P.readNumber(b)))!=null?w:[];return new o(_!=null?_:0,x!=null?x:0)}}e.Param=o;class s{constructor(g,_,x,w,b,A,S){this.temperature=g,this.humidity=_,this.continentalness=x,this.erosion=w,this.depth=b,this.weirdness=A,this.offset=S}fittness(g){return Tt(this.temperature.distance(g.temperature))+Tt(this.humidity.distance(g.humidity))+Tt(this.continentalness.distance(g.continentalness))+Tt(this.erosion.distance(g.erosion))+Tt(this.depth.distance(g.depth))+Tt(this.weirdness.distance(g.weirdness))+Tt(this.offset-g.offset)}space(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,new o(this.offset,this.offset)]}static fromJson(g){var x,w;const _=(x=P.readObject(g))!=null?x:{};return new s(o.fromJson(_.temperature),o.fromJson(_.humidity),o.fromJson(_.continentalness),o.fromJson(_.erosion),o.fromJson(_.depth),o.fromJson(_.weirdness),(w=P.readInt(_.offset))!=null?w:0)}}e.ParamPoint=s;class a{constructor(g,_,x,w,b,A){this.temperature=g,this.humidity=_,this.continentalness=x,this.erosion=w,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 d(g)}find(g){return this.index.search(g,(_,x)=>_.distance(x))}}e.Parameters=l;class u{constructor(g,_,x,w,b,A){this.temperature=g,this.humidity=_,this.continentalness=x,this.erosion=w,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,_,x){const w=ce.context(g<<2,_<<2,x<<2);return e.target(this.temperature.compute(w),this.humidity.compute(w),this.continentalness.compute(w),this.erosion.compute(w),this.depth.compute(w),this.weirdness.compute(w))}}e.Sampler=u;const c=class{constructor(v){this.root=c.build(v.map(([g,_])=>new m(g,_)))}static build(v){if(v.length===1)return v[0];if(v.length<=c.CHILDREN_PER_NODE){const w=v.map(b=>{let A=0;for(let S=0;S<7;S+=1){const I=b.space[S];A+=Math.abs((I.min+I.max)/2)}return{key:A,node:b}}).sort((b,A)=>b.key-A.key).map(({node:b})=>b);return new p(w)}let g=1/0,_=-1,x=[];for(let w=0;w<7;++w){v=c.sort(v,w,!1),x=c.bucketize(v);let b=0;for(const A of x)b+=c.area(A.space);g>b&&(g=b,_=w)}return v=c.sort(v,_,!1),x=c.bucketize(v),x=c.sort(x,_,!0),new p(x.map(w=>c.build(w.children)))}static sort(v,g,_){return v.map(x=>{const w=x.space[g],b=(w.min+w.max)/2;return{key:_?Math.abs(b):b,node:x}}).sort((x,w)=>x.key-w.key).map(({node:x})=>x)}static bucketize(v){const g=[];let _=[];const x=Math.pow(10,Math.floor(Math.log(v.length-.01)/Math.log(10)));for(const w of v)_.push(w),!(_.length<x)&&(g.push(new p(_)),_=[]);return _.length!==0&&g.push(new p(_)),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 d=c;d.CHILDREN_PER_NODE=10,e.RTree=d;class f{constructor(g){this.space=g}distance(g){let _=0;for(let x=0;x<7;x+=1)_+=Tt(this.space[x].distance(g[x]));return _}}e.RNode=f;class p extends f{constructor(g){super(p.buildSpace(g)),this.children=g}static buildSpace(g){let _=[...Array(7)].map(()=>new o(1/0,-1/0));for(const x of g)_=[...Array(7)].map((w,b)=>_[b].union(x.space[b]));return _}search(g,_){let x=1/0,w=null;for(const b of this.children){const A=_(b,g);if(x<=A)continue;const S=b.search(g,_),I=b==S?A:_(S,g);x<=I||(x=I,w=S)}return w}}e.RSubTree=p;class m extends f{constructor(g,_){super(g.space()),this.thing=_}search(){return this}}e.RLeaf=m})(gr||(gr={}));class _r{constructor(t){this.biome=t}getBiome(){return this.biome}static fromJson(t){var i,o;const n=(i=P.readObject(t))!=null?i:{},r=be.parse((o=P.readString(n.biome))!=null?o:"minecraft:the_void");return new _r(r)}}class Zo{constructor(t){this.parameters=t}getBiome(t,n,r,i){const o=i.sample(t,n,r);return this.parameters.find(o)}static fromJson(t){var o,s;const n=(o=P.readObject(t))!=null?o:{},i=((s=P.readArray(n.biomes,a=>{var l;return(u=>{var c;return{biome:be.parse((c=P.readString(u.biome))!=null?c:"minecraft:the_void"),parameters:gr.ParamPoint.fromJson(u.parameters)}})((l=P.readObject(a))!=null?l:{})}))!=null?s:[]).map(a=>[a.parameters,()=>a.biome]);return new Zo(new gr.Parameters(i))}}var gt;(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,o,s){return dn.NOISE.register(be.create(i),zn.create(o,s))}const n=new Map;function r(i,o){var c;const s=(c=o.key())==null?void 0:c.toString();if(!s)throw new Error("Cannot instantiate noise from direct holder");const a=i.seedKey(),l=n.get(s);if(l&&l[0]===a[0]&&l[1]===a[1])return l[2];const u=new Lr(i.fromHashOf(s),o.value());return n.set(s,[a[0],a[1],u]),u}e.instantiate=r})(gt||(gt={}));var Ve;(function(e){function t(s){var l,u,c,d,f;const a=(l=P.readObject(s))!=null?l:{};return{minY:(u=P.readInt(a.min_y))!=null?u:0,height:(c=P.readInt(a.height))!=null?c:256,xzSize:(d=P.readInt(a.size_horizontal))!=null?d:1,ySize:(f=P.readInt(a.size_vertical))!=null?f:1}}e.fromJson=t;function n(s){return s.ySize<<2}e.cellHeight=n;function r(s){return s.xzSize<<2}e.cellWidth=r;function i(s){return s.height/n(s)}e.cellCountY=i;function o(s){return Math.floor(s.minY/n(s))}e.minCellY=o})(Ve||(Ve={}));var xo;(function(e){function t(r){var o,s,a,l;const i=(o=P.readObject(r))!=null?o:{};return{target:(s=P.readNumber(i.target))!=null?s:0,size:(a=P.readInt(i.size))!=null?a:0,offset:(l=P.readInt(i.offset))!=null?l:0}}e.fromJson=t;function n(r,i,o){if(r.size<=0)return i;const s=(o-r.offset)/r.size;return Di(r.target,i,s)}e.apply=n})(xo||(xo={}));var jn;(function(e){const t=a=>un.parser(dn.DENSITY_FUNCTION,ce.fromJson)(a).value();function n(a){var u;const l=(u=P.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 q({barrier:ce.Constant.ZERO,fluidLevelFloodedness:ce.Constant.ZERO,fluidLevelSpread:ce.Constant.ZERO,lava:ce.Constant.ZERO,temperature:ce.Constant.ZERO,vegetation:ce.Constant.ZERO,continents:ce.Constant.ZERO,erosion:ce.Constant.ZERO,depth:ce.Constant.ZERO,ridges:ce.Constant.ZERO,initialDensityWithoutJaggedness:ce.Constant.ZERO,finalDensity:ce.Constant.ZERO,veinToggle:ce.Constant.ZERO,veinRidged:ce.Constant.ZERO,veinGap:ce.Constant.ZERO},a)}e.create=r;function i(a,l,u,c=!1){const d=(c?new tt(u):Se.create(u)).forkPositional(),f=new o(d,l);return _e(q({},f.mapAll(a)),{aquiferPositionalRandomFactory:d.fromHashOf(be.create("aquifer").toString()).forkPositional(),oreVeinsPositionalRandomFactory:d.fromHashOf(be.create("ore").toString()).forkPositional()})}e.withSettings=i;class o{constructor(l,u){this.random=l,this.settings=u,this.mapped=new Map}map(l){if(l instanceof ce.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 ce.Interpolated)return l.withCellSize(Ve.cellWidth(this.settings),Ve.cellHeight(this.settings));if(l instanceof ce.ShiftedNoise){const u=gt.instantiate(this.random,l.noiseData);return new ce.ShiftedNoise(l.shiftX,l.shiftY,l.shiftZ,l.xzScale,l.yScale,l.noiseData,u)}return l instanceof ce.Noise?new ce.Noise(l.xzScale,l.yScale,l.noiseData,gt.instantiate(this.random,l.noiseData)):l instanceof ce.ShiftNoise?l.withNewNoise(gt.instantiate(this.random,l.noiseData)):l instanceof ce.WeirdScaledSampler?new ce.WeirdScaledSampler(l.input,l.rarityValueMapper,l.noiseData,gt.instantiate(this.random,l.noiseData)):l instanceof ce.OldBlendedNoise?new ce.OldBlendedNoise(l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier,new Nc(this.random.fromHashOf(be.create("terrain").toString()),l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier)):l instanceof ce.Mapped||l instanceof ce.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=o;function s(a,l,u,c){const d=Ve.minCellY(a)+Ve.cellCountY(a),f=Ve.minCellY(a),p=Ve.cellHeight(a);for(let m=d;m>=f;m-=1){const v=m*p;if(fr(l.compute(ce.context(u,v,c)),-64,64)>=.390625)return v}return Number.MAX_SAFE_INTEGER}e.computePreliminarySurfaceLevelScanning=s})(jn||(jn={}));class Lc{constructor(t,n,r,i,o,s,a,l,u){this.cellCountXZ=t,this.cellCountY=n,this.cellNoiseMinY=r,this.router=i,this.minX=o,this.minZ=s,this.settings=a,this.preliminarySurfaceLevel=new Map,this.cellWidth=Ve.cellWidth(a),this.cellHeight=Ve.cellHeight(a),this.firstCellX=Math.floor(o/this.cellWidth),this.firstCellZ=Math.floor(s/this.cellWidth),this.firstNoiseX=o>>2,this.firstNoiseZ=s>>2,this.noiseSizeXZ=t*this.cellWidth>>2,this.aquifer=_i.createDisabled(u);const c=this.router.finalDensity;this.materialRule=vi.fromList([d=>this.aquifer.compute(d,c.compute(d))]),this.initialDensityWithoutJaggedness=this.router.initialDensityWithoutJaggedness}getFinalState(t,n,r){return this.materialRule({x:t,y:n,z:r})}getPreliminarySurfaceLevel(t,n){return Tr(this.preliminarySurfaceLevel,We.asLong(t,n),()=>jn.computePreliminarySurfaceLevelScanning(this.settings,this.initialDensityWithoutJaggedness,t<<2,n<<2))}getAquifer(){return this.aquifer}}var vi;(function(e){function t(n){return r=>{for(const i of n){const o=i(r);if(o)return o}}}e.fromList=t})(vi||(vi={}));var Tn;(function(e){function t(o){var a,l,u,c;const s=(a=P.readObject(o))!=null?a:{};return s.absolute!==void 0?n((l=P.readNumber(s.absolute))!=null?l:0):s.above_bottom!==void 0?r((u=P.readNumber(s.above_bottom))!=null?u:0):s.below_top!==void 0?i((c=P.readNumber(s.below_top))!=null?c:0):()=>0}e.fromJson=t;function n(o){return()=>o}function r(o){return s=>s.minY+o}function i(o){return s=>s.maxY-o}})(Tn||(Tn={}));var wi;(function(e){function t(n,r){return{minY:n,height:r,maxY:n+r-1}}e.create=t})(wi||(wi={}));class Rc{constructor(t,n,r){this.rule=t,this.defaultBlock=n,this.random=Se.create(r).forkPositional(),this.surfaceNoise=gt.instantiate(this.random,gt.SURFACE),this.surfaceSecondaryNoise=gt.instantiate(this.random,gt.SURFACE_SECONDARY),this.positionalRandoms=new Map}buildSurface(t,n,r,i){const o=We.minBlockX(t.pos),s=We.minBlockZ(t.pos),a=new Pc(this,t,n,r,i),l=this.rule(a);for(let u=0;u<16;u+=1){const c=o+u;for(let d=0;d<1;d+=1){const f=s+d;a.updateXZ(c,f);let p=0,m=Number.MIN_SAFE_INTEGER,v=Number.MAX_SAFE_INTEGER;for(let g=t.maxY;g>=t.minY;g-=1){const _=Ke.create(c,g,f),x=t.getBlockState(_);if(x.equals(ge.AIR)){p=0,m=Number.MIN_SAFE_INTEGER;continue}if(x.isFluid()){m===Number.MIN_SAFE_INTEGER&&(m=g+1);continue}if(v>=g){v=Number.MIN_SAFE_INTEGER;for(let A=g-1;A>=t.minY;A-=1){const S=t.getBlockState(Ke.create(c,A,f));if(S.equals(ge.AIR)||S.isFluid()){v=A+1;break}}}p+=1;const w=g-v+1;if(!x.equals(this.defaultBlock))continue;a.updateY(p,w,m,g);const b=l(c,g,f);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 Tr(this.positionalRandoms,t,()=>this.random.fromHashOf(t))}}class Pc{constructor(t,n,r,i,o){this.system=t,this.chunk=n,this.noiseChunk=r,this.context=i,this.getBiome=o,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=or(()=>this.system.getSurfaceSecondary(t,n)),this.minSurfaceLevel=or(()=>this.calculateMinSurfaceLevel(t,n))}updateY(t,n,r,i){this.blockY=i,this.stoneDepthAbove=t,this.stoneDepthBelow=n,this.waterHeight=r,this.biome=or(()=>this.getBiome(Ke.create(this.blockX,this.blockY,this.blockZ)))}calculateMinSurfaceLevel(t,n){const r=t>>4,i=n>>4,o=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i<<4),s=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(hi((t&15)/16,(n&15)/16,o,s,a,l))+this.surfaceDepth-8}}var yi;(function(e){e.NOOP=()=>()=>{};function t(o){var l,u,c;const s=(l=P.readObject(o))!=null?l:{};switch((u=P.readString(s.type))==null?void 0:u.replace(/^minecraft:/,"")){case"block":return n(ge.fromJson(s.result_state));case"sequence":return r((c=P.readArray(s.sequence,e.fromJson))!=null?c:[]);case"condition":return i(bi.fromJson(s.if_true),e.fromJson(s.then_run))}return e.NOOP}e.fromJson=t;function n(o){return()=>()=>o}e.block=n;function r(o){return s=>{const a=o.map(l=>l(s));return(l,u,c)=>{for(const d of a){const f=d(l,u,c);if(f)return f}}}}e.sequence=r;function i(o,s){return a=>(l,u,c)=>{if(o(a))return s(a)(l,u,c)}}e.condition=i})(yi||(yi={}));var bi;(function(e){e.FALSE=()=>!1,e.TRUE=()=>!0;function t(u){var f,p,m,v,g,_,x,w,b,A,S,I;const c=(f=P.readObject(u))!=null?f:{};switch((p=P.readString(c.type))==null?void 0:p.replace(/^minecraft:/,"")){case"above_preliminary_surface":return n();case"biome":return r((m=P.readArray(c.biome_is,k=>{var M;return(M=P.readString(k))!=null?M:""}))!=null?m:[]);case"not":return i(e.fromJson(c.invert));case"stone_depth":return o((v=P.readInt(c.offset))!=null?v:0,(g=P.readBoolean(c.add_surface_depth))!=null?g:!1,(_=P.readInt(c.secondary_depth_range))!=null?_:0,P.readString(c.surface_type)==="ceiling");case"vertical_gradient":return s((x=P.readString(c.random_name))!=null?x:"",Tn.fromJson(c.true_at_and_below),Tn.fromJson(c.false_at_and_above));case"water":return a((w=P.readInt(c.offset))!=null?w:0,(b=P.readInt(c.surface_depth_multiplier))!=null?b:0,(A=P.readBoolean(c.add_surface_depth))!=null?A:!1);case"y_above":return l(Tn.fromJson(c.anchor),(S=P.readInt(c.surface_depth_multiplier))!=null?S:0,(I=P.readBoolean(c.add_surface_depth))!=null?I:!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 d=>c.has(d.biome())}e.biome=r;function i(u){return c=>!u(c)}e.not=i;function o(u,c,d,f){return p=>{const m=f?p.stoneDepthBelow:p.stoneDepthAbove,v=c?p.surfaceDepth:0,g=d===0?0:pr(p.surfaceSecondary(),-1,1,0,d);return m<=1+u+v+g}}e.stoneDepth=o;function s(u,c,d){return f=>{const p=c(f.context),m=d(f.context);if(f.blockY<=p)return!0;if(f.blockY>=m)return!1;const v=f.system.getRandom(u),g=pr(f.blockY,p,m,1,0);return v.nextFloat()<g}}e.verticalGradient=s;function a(u,c,d){return f=>{if(f.waterHeight===Number.MIN_SAFE_INTEGER)return!0;const p=d?f.stoneDepthAbove:0;return f.blockY+p>=f.waterHeight+u+f.surfaceDepth*c}}e.water=a;function l(u,c,d){return f=>{const p=d?f.stoneDepthAbove:0;return f.blockY+p>=u(f.context)+f.surfaceDepth*c}}e.yAbove=l})(bi||(bi={}));class Sp{constructor(t,n,r){this.biomeSource=n,this.settings=r,this.router=jn.withSettings(r.noiseRouter,r.noise,t,r.legacyRandomSource),this.noiseChunkCache=new Map,this.surfaceSystem=new Rc(r.surfaceRule,r.defaultBlock,t);const i=new mr(-54,ge.LAVA),o=new mr(r.seaLevel,r.defaultFluid);this.globalFluidPicker=(s,a,l)=>a<Math.min(-54,r.seaLevel)?i:o}fill(t,n=!1){var p;const r=Math.max(t.minY,this.settings.noise.minY),i=Math.min(t.maxY,this.settings.noise.minY+this.settings.noise.height),o=Ve.cellWidth(this.settings.noise),s=Ve.cellHeight(this.settings.noise),a=Math.floor(16/o),l=Math.floor(r/s),u=Math.floor((i-r)/s),c=We.minBlockX(t.pos),d=We.minBlockZ(t.pos),f=this.getNoiseChunk(t);for(let m=0;m<a;m+=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 x=s-1;x>=0;x-=1){const w=(l+_)*s+x,b=w&15,A=t.getSectionIndex(w);t.getSectionIndex(g.minBlockY)!==A&&(g=t.getOrCreateSection(A));for(let S=0;S<o;S+=1){const I=c+m*o+S,k=I&15;for(let M=0;M<(n?1:o);M+=1){const N=d+v*o+M,L=N&15,$=(p=f.getFinalState(I,w,N))!=null?p:this.settings.defaultBlock;g.setBlockState(k,b,L,$)}}}}}buildSurface(t,n="minecraft:plains"){const r=this.getNoiseChunk(t),i=wi.create(this.settings.noise.minY,this.settings.noise.height);this.surfaceSystem.buildSurface(t,r,i,()=>n)}getNoiseChunk(t){return Tr(this.noiseChunkCache,We.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=Ve.cellWidth(this.settings.noise),o=Ve.cellHeight(this.settings.noise),s=Math.floor(16/i),a=Math.floor(n/o),l=Math.floor((r-n)/o),u=We.minBlockX(t.pos),c=We.minBlockZ(t.pos);return new Lc(s,l,a,this.router,u,c,this.settings.noise,this.settings.aquifersEnabled,this.globalFluidPicker)})}}var Ao;(function(e){function t(n){var i,o,s,a,l,u;const r=(i=P.readObject(n))!=null?i:{};return{surfaceRule:yi.fromJson(r.surface_rule),noise:Ve.fromJson(r.noise),defaultBlock:ge.fromJson(r.default_block),defaultFluid:ge.fromJson(r.default_fluid),noiseRouter:jn.fromJson(r.noise_router),seaLevel:(o=P.readInt(r.sea_level))!=null?o:0,disableMobGeneration:(s=P.readBoolean(r.disable_mob_generation))!=null?s:!1,aquifersEnabled:(a=P.readBoolean(r.aquifers_enabled))!=null?a:!1,oreVeinsEnabled:(l=P.readBoolean(r.ore_veins_enabled))!=null?l:!1,legacyRandomSource:(u=P.readBoolean(r.legacy_random_source))!=null?u:!1}}e.fromJson=t})(Ao||(Ao={}));var na=Object.freeze(Object.defineProperty({__proto__:null,get Aquifer(){return _i},BlendedNoise:Nc,get BlockPos(){return Ke},BlockState:ge,Chunk:kp,get ChunkPos(){return We},ChunkSection:Fi,get Climate(){return gr},get CubicSpline(){return mi},get DensityFunction(){return ce},get Direction(){return ct},FixedBiome:_r,FluidStatus:mr,get Holder(){return un},Identifier:be,ImprovedNoise:bo,get Json(){return P},LegacyPositionalRandom:Mc,LegacyRandom:tt,get MaterialRule(){return vi},get MinMaxNumberFunction(){return pi},MultiNoise:Zo,NoiseAquifer:Rr,NoiseChunk:Lc,NoiseChunkGenerator:Sp,get NoiseGeneratorSettings(){return Ao},get NoiseParameters(){return zn},get NoiseRouter(){return jn},get NoiseSettings(){return Ve},get NoiseSlideSettings(){return xo},get Noises(){return gt},NormalNoise:Lr,PerlinNoise:ye,PerlinSimplexNoise:xp,Registry:gi,SimplexNoise:Je,Structure:qo,get SurfaceCondition(){return bi},SurfaceContext:Pc,get SurfaceRule(){return yi},SurfaceSystem:Rc,get VerticalAnchor(){return Tn},get WorldgenContext(){return wi},get WorldgenRegistries(){return dn},XoroshiroPositionalRandom:Oc,XoroshiroRandom:Se,binarySearch:Ic,clamp:fr,clampedLerp:Di,clampedMap:Bi,computeIfAbsent:Tr,getSeed:Yo,inverseLerp:Go,isPowerOfTwo:yp,lazy:or,lazyLerp:sr,lazyLerp2:yo,lazyLerp3:Cc,lerp:zt,lerp2:hi,lerp3:Ec,longfromBytes:fi,map:pr,smoothstep:Qr,square:Tt,upperPowerOfTwo:bp},Symbol.toStringTag,{value:"Module"}));let ra=!1;async function Ep(){ra||(await bc(ea),ra=!0,console.debug(`Loaded deepslate-rs from "${ea}"`))}const Cp={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 ia,oa;async function Ip(e,t,n){var m,v,g;const{biomeSource:r}=await $c(e,n),i=t.data,o=-Math.round(n.offset[0])-100+n.res/2,s=-Math.round(n.offset[1])-100+n.res/2,a=t.width*4/n.res,l=4/n.res,u=[o*n.scale,(200+o)*n.scale,n.res*n.scale],c=[s*n.scale,(200+s)*n.scale,n.res*n.scale],d=n.layers.has("biomes")?(m=r.getBiomes)==null?void 0:m.call(r,...u,64,65,1,...c):void 0,f=[...n.layers].filter(_=>_!=="biomes"),p=f.length===0||(v=r.getClimates)==null?void 0:v.call(r,...u,64,65,1,...c);for(let _=0;_<200;_+=n.res)for(let x=0;x<200;x+=n.res){const w=x*a+_*l,b=_/n.res*200/n.res+x/n.res,A=(_+o)*n.scale,S=(x+s)*n.scale;let I=[50,50,50];if(n.layers.has("biomes")){const k=(g=d==null?void 0:d[b])!=null?g:r.getBiome(A,64,S);I=Np(k.toString(),n.biomeColors)}else if(p&&f[0]){const k=p[b][f[0]],[M,N]=Cp[f[0]],L=(k-M)/(N-M)*256;I=[L,L,L]}i[w]=I[0],i[w+1]=I[1],i[w+2]=I[2],i[w+3]=255}}async function Mp(e,t,n,r){var a;const{biomeSource:i}=await $c(e,r),[o,s]=Tp([t,n],r);return q({biome:i.getBiome(o,64,s).toString()},(a=i.getClimate)==null?void 0:a.call(i,o,64,s))}async function $c(e,t){const n=[e,t.octaves,`${t.seed}`,t.version];return an(n,ia)||(ia=Li(n),oa=await Op(e,t)),{biomeSource:oa}}async function Op(e,t){var n,r,i,o,s;switch((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,"")){case"fixed":return new _r(be.parse(e.biome));case"checkerboard":const a=((r=e.scale)!=null?r:2)+2,l=(o=(i=e.biomes)==null?void 0:i.length)!=null?o:0;return{getBiome(u,c,d){var p;const f=(((u>>a)+(d>>a))%l+l)%l;return be.parse((p=e.biomes)==null?void 0:p[f].node)}};case"multi_noise":switch((s=e.preset)==null?void 0:s.replace(/^minecraft:/,"")){case"nether":e=qe(t.version,"1.18")?Rp:Lp;break;case"overworld":e=qe(t.version,"1.18")?await Pp():e;break}if(e=O.DataModel.unwrapLists(e),qe(t.version,"1.18")){await Ep();const u=new w0,c=L=>typeof L=="number"?[L,L]:L,[d,f,p,m,v,g,_,x,w,b,A,S,I,k]=[[],[],[],[],[],[],[],[],[],[],[],[],[],[]];for(const L of e.biomes){const{temperature:$,humidity:K,continentalness:ae,erosion:le,weirdness:T,depth:D,offset:V}=L.parameters;d.push(c($)[0]),f.push(c($)[1]),p.push(c(K)[0]),m.push(c(K)[1]),v.push(c(ae)[0]),g.push(c(ae)[1]),_.push(c(le)[0]),x.push(c(le)[1]),w.push(c(T)[0]),b.push(c(T)[1]),A.push(c(D)[0]),S.push(c(D)[1]),I.push(V),k.push(u.getOrPut(L.biome,Math.floor(Math.random()*2147483647)))}const M=pp(new Float64Array(d),new Float64Array(f),new Float64Array(p),new Float64Array(m),new Float64Array(v),new Float64Array(g),new Float64Array(_),new Float64Array(x),new Float64Array(w),new Float64Array(b),new Float64Array(A),new Float64Array(S),new Float64Array(I),new Int32Array(k)),N=mp(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(L,$,K){var le;const ae=Ks(M,N,L,L+1,1,$,$+1,1,K,K+1,1);return be.parse((le=u.getA(ae[0]))!=null?le:"unknown")},getBiomes(L,$,K,ae,le,T,D,V,C){return[...Ks(M,N,L,$,K,ae,le,T,D,V,C)].map(E=>{var R;return be.parse((R=u.getA(E))!=null?R:"unknown")})},getClimate(L,$,K){const ae=Qs(N,L,L+1,1,$,$+1,1,K,K+1,1),[le,T,D,V,C]=ae.slice(0,5);return{temperature:le,humidity:T,continentalness:D,erosion:V,weirdness:C}},getClimates(L,$,K,ae,le,T,D,V,C){const y=Qs(N,L,$,K,ae,le,T,D,V,C),E=[];for(let R=0;R<y.length;R+=7){const[j,Y,he,Ue,ft]=y.slice(R,R+5);E.push({temperature:j,humidity:Y,continentalness:he,erosion:Ue,weirdness:ft})}return E}}}else{const u=["altitude","temperature","humidity","weirdness"].map((c,d)=>{var p;const f=e[`${c}_noise`];return f.firstOctave=ot((p=f.firstOctave)!=null?p:-7,-100,-1),new Lr(new tt(t.seed+BigInt(d)),f)});return!Array.isArray(e.biomes)||e.biomes.length===0?new _r(be.create("unknown")):{getBiome(c,d,f){const p=u.map(g=>g.sample(c,f,0));let m=1/0,v="";for(const{biome:g,parameters:_}of e.biomes){const x=qn(_.altitude-p[0])+qn(_.temperature-p[1])+qn(_.humidity-p[2])+qn(_.weirdness-p[3])+qn(_.offset);x<m&&(m=x,v=g)}return be.parse(v)}}}}throw new Error("Unknown biome source")}function Np(e,t){var r;if(!e)return[128,128,128];const n=(r=t[e])!=null?r:Dc[e];return n===void 0?zo(e):n}function Tp([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 Dc={"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]},Lp={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}}]},Rp={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 Pp(){return(await tc("1.18","dimension","overworld")).generator.biome_source}const Qt=[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],sa=[[255,77,54],[59,118,255],[91,207,25],[217,32,245],[255,209,41],[52,204,209]];function $p(e,t,n){const r=new tt(n.seed),i={placements:[],features:[],random:r,biomeInfoNoise:new ye(r.fork(),0,[1]),seaLevel:63,version:n.version,nextFloat:()=>r.nextFloat(),nextInt:s=>r.nextInt(s),nextGaussian:()=>Math.sqrt(-2*Math.log(1-r.nextFloat()))*Math.cos(2*Math.PI*r.nextFloat()),sampleInt(s){return Dp(s,this)}};for(let s=0;s<n.size[0]/16;s+=1)for(let a=0;a<n.size[2]/16;a+=1)qe(n.version,void 0,"1.17")?An([s*16,0,a*16],O.DataModel.unwrapLists(e),i):jp([s*16,0,a*16],O.DataModel.unwrapLists(e.placement),i);const o=t.data;t.data.fill(255);for(const[s,a]of i.placements){if(s[0]<0||s[1]<0||s[2]<0||s[0]>=n.size[0]||s[1]>=n.size[1]||s[2]>=n.size[2])continue;const l=s[2]*(t.width*4)+s[0]*4,u=a<sa.length?sa[a]:zo(i.features[a]);o[l]=ot(50,205,u[0]),o[l+1]=ot(50,205,u[1]),o[l+2]=ot(50,205,u[2]),o[l+3]=255}for(let s=0;s<n.size[0];s+=1)for(let a=0;a<n.size[2];a+=1){if((Math.floor(s/16)+Math.floor(a/16))%2===0)continue;const l=a*(t.width*4)+s*4;for(let u=0;u<3;u+=1)o[l+u]=.85*o[l+u]}}function Vn(e){return e.startsWith("minecraft:")?e.slice(10):e}function lt(e,t){return[[e[0],t,e[2]]]}function Dp(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(Vn(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 ot(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(ot(e.value.min_inclusive,e.value.max_inclusive,i));case"weighted_list":const o=e.distribution.reduce((a,l)=>a+l.weight,0);let s=t.nextInt(o);for(const a of e.distribution)if(s-=a.weight,s<0)return t.sampleInt(a.data);return 0}return 1}function xt(e,t){if(!mn(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 Bp(e,t){var n,r,i,o;if(!mn(e))throw new Error("Invalid height provider");if(typeof e.type!="string")return xt(e);switch(Vn(e.type)){case"constant":return xt(e.value);case"uniform":{const s=xt(e.min_inclusive),a=xt(e.max_inclusive);return s+t.nextInt(a-s+1)}case"biased_to_bottom":{const s=xt(e.min_inclusive),a=xt(e.max_inclusive),l=t.nextInt(a-s-((n=e.inner)!=null?n:1)+1);return s+t.nextInt(l+((r=e.inner)!=null?r:1))}case"very_biased_to_bottom":{const s=xt(e.min_inclusive),a=xt(e.max_inclusive),l=(i=e.inner)!=null?i:1,u=s+l+t.nextInt(a-s-l+1),c=s+t.nextInt(u-s);return s+t.nextInt(c-s+l)}case"trapezoid":{const s=xt(e.min_inclusive),a=xt(e.max_inclusive),l=(o=e.plateau)!=null?o:0;if(l>=a-s)return s+t.nextInt(a-s+1);const u=(a-s-l)/2,c=a-s-u;return s+t.nextInt(c+1)+t.nextInt(u+1)}default:throw new Error(`Invalid height provider ${e.type}`)}}function aa(e,t){const n=t.features.indexOf(e);return n!=-1?n:(t.features.push(e),t.features.length-1)}function An(e,t,n){var o;if(typeof t=="string"){n.placements.push([e,aa(t,n)]);return}const r=Vn((o=t==null?void 0:t.type)!=null?o:"no_op"),i=Fp[r];i?i(t.config,e,n):n.placements.push([e,aa(JSON.stringify(t),n)])}function ko(e,t,n){var o;const r=Vn((o=t==null?void 0:t.type)!=null?o:"nope"),i=zp[r];return i?i(t==null?void 0:t.config,e,n):[e]}const Fp={decorated:(e,t,n)=>{ko(t,e==null?void 0:e.decorator,n).forEach(i=>An(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;An(t,r,n)},random_selector:(e,t,n)=>{var r,i;for(const o of(r=e==null?void 0:e.features)!=null?r:[])if(n.nextFloat()<((i=o==null?void 0:o.chance)!=null?i:0)){An(t,o.feature,n);return}An(t,e==null?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var i,o,s;const r=(s=e==null?void 0:e.features)==null?void 0:s[n.nextInt((o=(i=e==null?void 0:e.features)==null?void 0:i.length)!=null?o:0)];An(t,r,n)}},zp={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,o;let r=(i=e==null?void 0:e.count)!=null?i:1;return n.nextFloat()<e.extra_chance&&(r+=(o=e.extra_count)!=null?o: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 s;const r=Math.max(1,e.noise_factor),i=n.biomeInfoNoise.sample(t[0]/r,0,t[2]/r),o=Math.max(0,Math.ceil((i+((s=e.noise_offset)!=null?s:0))*e.noise_to_count_ratio));return new Array(o).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map((r,i)=>{const o=Math.floor(i/4)*4+1+n.nextInt(3)+t[0],s=Math.max(n.seaLevel,Qt[ot(0,63,o)]),a=Math.floor(i%4)*4+1+n.nextInt(3)+t[2];return[o,s,a]}),decorated:(e,t,n)=>ko(t,e==null?void 0:e.outer,n).flatMap(r=>ko(r,e==null?void 0:e.inner,n)),depth_average:(e,t,n)=>{var i,o,s,a;const r=n.nextInt((i=e==null?void 0:e.spread)!=null?i:0)+n.nextInt((o=e==null?void 0:e.spread)!=null?o:0)-((s=e.spread)!=null?s:0)+((a=e==null?void 0:e.baseline)!=null?a:0);return lt(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,Qt[ot(0,63,t[0])]);return lt(t,r)},heightmap_spread_double:(e,t,n)=>{const r=Math.max(n.seaLevel,Qt[ot(0,63,t[0])]);return lt(t,n.nextInt(r*2))},heightmap_world_surface:(e,t,n)=>{const r=Math.max(n.seaLevel,Qt[ot(0,63,t[0])]);return lt(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 o=n.nextInt(n.nextInt(248)+8);if(o<n.seaLevel||n.nextInt(((i=e==null?void 0:e.chance)!=null?i:1)/8)==0){const s=n.nextInt(16)+t[0],a=n.nextInt(16)+t[2];return[[s,o,a]]}}return[]},nope:(e,t)=>[t],range:(e,t,n)=>{var i,o,s;const r=n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0);return lt(t,r)},range_biased:(e,t,n)=>{var i,o,s;const r=n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0));return lt(t,r)},range_very_biased:(e,t,n)=>{var i,o,s,a;const r=n.nextInt(n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0))+((a=e==null?void 0:e.bottom_offset)!=null?a:0));return lt(t,r)},spread_32_above:(e,t,n)=>{const r=n.nextInt(t[1]+32);return lt(t,r)},top_solid_heightmap:(e,t)=>{const n=Qt[ot(0,63,t[0])];return lt(t,n)},magma:(e,t,n)=>{const r=n.nextInt(t[1]+32);return lt(t,r)},square:(e,t,n)=>[[t[0]+n.nextInt(16),t[1],t[2]+n.nextInt(16)]],surface_relative_threshold:(e,t)=>{var o,s;const n=Qt[ot(0,63,t[0])],r=n+((o=e==null?void 0:e.min_inclusive)!=null?o:-1/0),i=n+((s=e==null?void 0:e.max_inclusive)!=null?s: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 jp(e,t,n){var i;let r=[e];for(const o of t)!la[Vn((i=o==null?void 0:o.type)!=null?i:"nope")]||(r=r.flatMap(a=>la[Vn(o.type)](o,a,n)));for(const o of r)n.placements.push([o,0])}const la={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)=>lt(t,Bp(e,n)),heightmap:({},e,t)=>{const n=Math.max(t.seaLevel,Qt[ot(0,63,e[0])]);return lt(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 o=Math.max(1,t),s=i.biomeInfoNoise.sample(r[0]/o,0,r[2]/o),a=Math.max(0,Math.ceil((s+(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 s=i.biomeInfoNoise.sample(r[0]/200,0,r[2]/200)<e?t:n;return new Array(s).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]:[]};class Vp{constructor(){this.d=na,this.deepslateCache=new Map,this.Z=0,this.chunksCache=[]}async loadVersion(t){if(this.loadedVersion!==t)return(this.loadingVersion!==t||!this.loadingPromise)&&(this.loadingVersion=t,this.loadingPromise=this.doLoadVersion(t)),this.loadingPromise}async doLoadVersion(t){const n=this.deepslateCache.get(t);if(n)this.d=n;else{if(qe(t,"1.19")?this.d=na:qe(t,"1.18.2")?this.d=await se(()=>import("./deepslate.esm.71b28738.js"),["assets/deepslate.esm.71b28738.js","assets/vec3.7a0b0b73.js"]):this.d=await se(()=>import("./deepslate.esm.1f59e136.js"),["assets/deepslate.esm.1f59e136.js","assets/vec3.7a0b0b73.js"]),this.d.WorldgenRegistries){const r=[["worldgen/noise","NOISE",this.d.NoiseParameters],["worldgen/density_function","DENSITY_FUNCTION",this.d.DensityFunction]];await Promise.all(r.map(async([i,o,s])=>{const a=await P0(t,i),l=new this.d.Registry(this.d.Identifier.create(i));for(const[u,c]of a.entries())l.register(this.d.Identifier.parse(u),s.fromJson(c));this.d.WorldgenRegistries[o].assign(l)}))}this.deepslateCache.set(t,this.d)}this.loadedVersion=t,this.loadingVersion=void 0}loadChunkGenerator(t,n,r="unknown"){if(!this.loadedVersion)throw new Error("No deepslate version loaded");const i=[t,`${n}`,r];if(!an(this.cacheState,i)){const o=new this.d.FixedBiome(qe(this.loadedVersion,"1.18.2")?this.d.Identifier.parse(r):r);console.log(this.d);const s=this.d.NoiseGeneratorSettings.fromJson(O.DataModel.unwrapLists(t)),a=new this.d.NoiseChunkGenerator(n,o,s);this.settingsCache=s.noise,this.generatorCache=a,this.chunksCache=[],this.cacheState=Li(i)}}generateChunks(t,n,r="unknown"){if(t=Math.floor(t),!this.settingsCache)throw new Error("Tried to generate chunks before settings are loaded");const i=this.settingsCache.minY,o=this.settingsCache.height;return[...Array(Math.ceil(n/16)+1)].map((s,a)=>{const l=(t>>4)+a,u=this.chunksCache.find(d=>d.pos[0]===l);if(u)return u;const c=new this.d.Chunk(i,o,this.d.ChunkPos.create(l,this.Z>>4));if(!this.generatorCache)throw new Error("Tried to generate chunks before generator is loaded");return this.generatorCache.fill(c,!0),this.generatorCache.buildSurface(c,r),this.chunksCache.push(c),c})}loadDensityFunction(t,n){const r=this.d.XoroshiroRandom.create(n).forkPositional(),i=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=i,this.d.DensityFunction.fromJson(t).mapAll(new this.d.NoiseRouter.Visitor(r,i))}getNoiseSettings(){if(!this.settingsCache)throw new Error("Tried to access noise settings when they are not loaded");return this.settingsCache}getBlockState(t,n){t=Math.floor(t),n=Math.floor(n);const r=this.chunksCache.find(i=>this.d.ChunkPos.minBlockX(i.pos)<=t&&this.d.ChunkPos.maxBlockX(i.pos)>=t);return r==null?void 0:r.getBlockState(this.d.BlockPos.create(t,n,this.Z))}}class Hp{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 tt(t);this.minLimitPerlinNoise=new ye(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.maxLimitPerlinNoise=new ye(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.mainPerlinNoise=new ye(n,-7,[1,1,1,1,1,1,1,1]),this.depthNoise=new ye(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])}reset(t,n,r,i,o){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(o).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,o=this.fillNoiseColumn(r),s=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]=v0(u,i,o[a],o[a+1],s[a],s[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,o=684.412*this.settings.sampling.y_scale,s=i/this.settings.sampling.xz_factor,a=o/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,o,s,a);const p=((1-u*2/this.chunkCountY+l)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;c+=p*(p>0?4:1),this.settings.top_slide.size>0&&(c=qi(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=qi(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,o,s,a){let l=0,u=0,c=0,d=1;for(let f=0;f<16;f+=1){const p=ye.wrap(t*i*d),m=ye.wrap(n*o*d),v=ye.wrap(r*i*d),g=o*d,_=this.minLimitPerlinNoise.getOctaveNoise(f);_&&(l+=_.sample(p,m,v,g,n*g)/d);const x=this.maxLimitPerlinNoise.getOctaveNoise(f);if(x&&(u+=x.sample(p,m,v,g,n*g)/d),f<8){const w=this.mainPerlinNoise.getOctaveNoise(f);w&&(c+=w.sample(ye.wrap(t*s*d),ye.wrap(n*a*d),ye.wrap(r*s*d),a*d,n*a*d)/d)}d/=2}return qi(l/512,u/512,(c/10+1)/2)}}const Up={"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]},Bt=new Vp;async function Gp(e,t,n){var s,a,l,u;if(qe(n.version,"1.18")){await Bt.loadVersion(n.version),Bt.loadChunkGenerator(e,n.seed,n.biome),Bt.generateChunks(-n.offset,n.width,n.biome);const c=Bt.getNoiseSettings(),d=t.data;for(let f=0;f<n.width;f+=1)for(let p=0;p<c.height;p+=1){const m=f*4+(c.height-p-1)*4*t.width,v=(s=Bt.getBlockState(f-n.offset,p+c.minY))!=null?s:ge.AIR,g=(a=Up[v.getName().toString()])!=null?a:[0,0,0];d[m]=g[0],d[m+1]=g[1],d[m+2]=g[2],d[m+3]=255}return}const r=new Hp(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,o=t.width*4;for(let c=0;c<n.width;c+=1){const d=r.iterateNoiseColumn(c-n.offset).reverse();for(let f=0;f<e.noise.height;f+=1){const p=f*o+c*4,m=qp(d,f);i[p]=m,i[p+1]=m,i[p+2]=m,i[p+3]=255}}}function Yp(e,t){return Bt.getBlockState(e,t)}async function Wp(e,t,n){await Bt.loadVersion(n.version);const r=Bt.loadDensityFunction(e,n.seed),i=Bt.getNoiseSettings(),o=Array(n.width*i.height);let s=1/0,a=-1/0;for(let u=0;u<n.width;u+=1)for(let c=0;c<i.height;c+=1){const d=u+(i.height-c-1)*n.width,f=r.compute(ce.context(u-n.offset,c,0));s=Math.min(s,f),a=Math.max(a,f),o[d]=f}const l=t.data;for(let u=0;u<n.width*i.height;u+=1){const c=Math.floor(Bi(o[u],s,a,0,256));l[4*u]=c,l[4*u+1]=c,l[4*u+2]=c,l[4*u+3]=255}}function qp(e,t){return e[t]>0?0:e[t+1]>0?150:255}function Zp(e,t,n){const r=new tt(n.seed),i=zn.fromJson(O.DataModel.unwrapLists(e)),o=new Lr(r,i),s=-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 d=u*4+c*4*256,f=(u+s)*n.scale,p=(c+a)*n.scale,m=(o.sample(f,p,0)+1)*128;l[d]=m,l[d+1]=m,l[d+2]=m,l[d+3]=255}}const Xp=["biomes","temperature","humidity","continentalness","erosion","weirdness"],Jp=({model:e,data:t,shown:n,version:r})=>{var I,k;const{locale:i}=Ce(),[o]=B(Vt()),[s,a]=B(2),[l,u]=B(void 0),[c,d]=B(new Set(["biomes"])),{biomeColors:f}=pc(),p=me([0,0]),m=me(1),v=me(),g=BigInt((I=e.get(new O.Path(["generator","seed"])))!=null?I:o),_=ke(()=>{if(!!n)return Qp(e.get(new O.Path(["generator","settings"])))},[n]),x=n?Kp(t,_):"",w=(k=t.type)==null?void 0:k.replace(/^minecraft:/,""),{canvas:b,redraw:A}=Or({size(){return[200/m.current,200/m.current]},async draw(M){const N={octaves:_,biomeColors:f,layers:c,offset:p.current,scale:s,seed:g,res:m.current,version:r};await Ip(t,M,N),m.current===4&&(clearTimeout(v.current),v.current=setTimeout(()=>{m.current=1,A()},150))},async onDrag(M,N){p.current[0]=p.current[0]+M*200,p.current[1]=p.current[1]+N*200,clearTimeout(v.current),m.current=w==="multi_noise"?4:1,A()},async onHover(M,N){const L={octaves:_,biomeColors:f,layers:c,offset:p.current,scale:s,seed:o,res:1,version:r},$=await Mp(t,Math.floor(M*200),Math.floor(N*200),L);u($)},onLeave(){u(void 0)}},[r,x,s,o,c,f]);Q(()=>{n&&(m.current=w==="multi_noise"?4:1,A())},[r,x,s,o,c,n,f]);const S=M=>{p.current[0]=p.current[0]*s/M,p.current[1]=p.current[1]*s/M,a(M)};return h(te,null,h("div",{class:"controls preview-controls"},l&&h(Z,{label:l.biome,class:"no-pointer"}),w==="multi_noise"&&h(et,{icon:"stack",tooltip:i("configure_layers")},Xp.map(M=>{const N=c.has(M);return h(Z,{label:i(`layer.${M}`),active:N,tooltip:i(N?"enabled":"disabled"),onClick:L=>{d(new Set([M])),L.stopPropagation()}})})),(w==="multi_noise"||w==="checkerboard")&&h(te,null,h(Z,{icon:"dash",tooltip:i("zoom_out"),onClick:()=>S(s*1.5)}),h(Z,{icon:"plus",tooltip:i("zoom_in"),onClick:()=>S(s/1.5)})),w==="multi_noise"&&h(Z,{icon:"sync",tooltip:i("generate_new_seed"),onClick:()=>Zl(e)})),(l==null?void 0:l.temperature)!==void 0&&h("div",{class:"controls secondary-controls"},h(Z,{class:"no-pointer",label:Object.entries(l).filter(([M])=>M!=="biome").map(([M,N])=>`${M[0].toUpperCase()}: ${N.toFixed(2)}`).join(" ")})),h("canvas",{ref:b,width:"200",height:"200"}))};function Kp(e,t){return JSON.stringify([e,t])}function Qp(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"large_biomes":return{temperature:{firstOctave:-12,amplitudes:[1.5,0,1,0,0,0]},humidity:{firstOctave:-10,amplitudes:[1,1,0,0,0,0]},continentalness:{firstOctave:-11,amplitudes:[1,1,2,2,2,1,1,1,1]},erosion:{firstOctave:-11,amplitudes:[1,1,0,1,1]},weirdness:{firstOctave:-7,amplitudes:[1,2,1,0,0,0]},shift:{firstOctave:-3,amplitudes:[1,1,1,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 e1=({data:e,version:t,shown:n})=>{const{locale:r}=Ce(),[i,o]=B(4),[s,a]=B(Vt()),l=JSON.stringify(e),{canvas:u,redraw:c}=Or({size(){return[i*16,i*16]},async draw(d){$p(e,d,{seed:s,version:t,size:[i*16,128,i*16]})}},[t,l,s]);return Q(()=>{n&&c()},[t,l,i,s,n]),h(te,null,h("div",{class:"controls preview-controls"},h(Z,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>o(Math.min(16,i+1))}),h(Z,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>o(Math.max(1,i-1))}),h(Z,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>a(Vt())})),h("canvas",{ref:u,width:"64",height:"64"}))},t1=({data:e,shown:t,version:n})=>{var g,_;const{locale:r}=Ce(),[i,o]=B(Vt()),[s,a]=B(!1),[l,u]=B(void 0),c=me(0),d=me(void 0),f=JSON.stringify([e]),p=(_=(g=e==null?void 0:e.noise)==null?void 0:g.height)!=null?_:256,{canvas:m,redraw:v}=Or({size(){return[p,p]},async draw(x){const w={offset:c.current,width:x.width,seed:i,version:n};await Wp(e,x,w)},async onDrag(x){c.current+=x*p,v()},async onHover(x,w){var S,I;const b=Math.floor(x*p-c.current),A=p-Math.max(1,Math.ceil(w*p))+((I=(S=e==null?void 0:e.noise)==null?void 0:S.min_y)!=null?I:0);u(`X=${b} Y=${A}`)},onLeave(){u(void 0)}},[n,f,i]);return Q(()=>{d.current&&clearInterval(d.current),t&&(v(),s&&(d.current=setInterval(()=>{c.current-=8,v()},100)))},[n,f,i,t,s]),h(te,null,h("div",{class:"controls preview-controls"},l&&h(Z,{label:l,class:"no-pointer"}),h(et,{icon:"gear",tooltip:r("terrain_settings")},h(Z,{icon:s?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>a(!s)})),h(Z,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>o(Vt())})),h("canvas",{ref:m,width:p,height:p}))},n1=({data:e,shown:t,version:n})=>{const{locale:r}=Ce(),[i,o]=B(Vt()),[s,a]=B(2),l=me([0,0]),u=JSON.stringify([e]),{canvas:c,redraw:d}=Or({size(){return[256,256]},async draw(p){const m={offset:l.current,scale:s,seed:i,version:n};Zp(e,p,m)},async onDrag(p,m){l.current[0]=l.current[0]+p*256,l.current[1]=l.current[1]+m*256,d()}},[n,u,s,i]);Q(()=>{t&&d()},[n,u,s,i,t]);const f=p=>{l.current[0]=l.current[0]*s/p,l.current[1]=l.current[1]*s/p,a(p)};return h(te,null,h("div",{class:"controls preview-controls"},h(Z,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>f(s*1.5)}),h(Z,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>f(s/1.5)}),h(Z,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>o(Vt())})),h("canvas",{ref:c,width:"256",height:"256"}))},r1=({data:e,shown:t,version:n})=>{var I,k;const{locale:r}=Ce(),[i,o]=B(Vt()),[s,a]=B("minecraft:plains"),[l,u]=B(.2),[c,d]=B(.1),[f,p]=B(!1),[m,v]=B(void 0),g=me(0),_=me(void 0),x=JSON.stringify([e,l,c]),w=(k=(I=e==null?void 0:e.noise)==null?void 0:I.height)!=null?k:256,{canvas:b,redraw:A}=Or({size(){return[w,w]},async draw(M){const N={biome:s,biomeDepth:c,biomeScale:l,offset:g.current,width:M.width,seed:i,version:n};await Gp(e,M,N)},async onDrag(M){g.current+=M*w,A()},async onHover(M,N){var ae,le;const L=Math.floor(M*w-g.current),$=w-Math.max(1,Math.ceil(N*w))+((le=(ae=e==null?void 0:e.noise)==null?void 0:ae.min_y)!=null?le:0),K=Yp(L,$);v(K?`Y=${$} (${K.getName().path})`:`Y=${$}`)},onLeave(){v(void 0)}},[x,i]);Q(()=>{_.current&&clearInterval(_.current),t&&(async()=>{try{await A(),f&&(_.current=setInterval(()=>{g.current-=8,A()},100))}catch(M){throw M}})()},[n,x,i,t,s,l,c,f]);const S=ke(()=>{var M;return(M=Kr==null?void 0:Kr.get("worldgen/biome"))!=null?M:[]},[n]);return h(te,null,h("div",{class:"controls preview-controls"},m&&h(Z,{label:m,class:"no-pointer"}),h(et,{icon:"gear",tooltip:r("terrain_settings")},qe(n,void 0,"1.17")?h(te,null,h(Jr,{label:r("preview.scale"),value:`${l}`,onChange:M=>u(Number(M))}),h(Jr,{label:r("preview.depth"),value:`${c}`,onChange:M=>d(Number(M))})):h(Jr,{label:r("preview.biome"),value:s,onChange:a,dataList:S,larger:!0}),h(Z,{icon:f?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>p(!f)})),h(Z,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>o(Vt())})),h("canvas",{ref:b,width:w,height:w}))},i1=["dimension","worldgen/density_function","worldgen/noise","worldgen/noise_settings","worldgen/configured_feature","worldgen/placed_feature"];function o1({model:e,version:t,id:n,shown:r}){var o;const[,i]=B(0);if(Ri(e,()=>{i(s=>s+1)}),!e)return h(te,null);if(n==="dimension"&&((o=e.get(new O.Path(["generator","type"])))==null?void 0:o.endsWith("noise"))){const s=e.get(new O.Path(["generator","biome_source"]));if(s)return h(Jp,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/density_function"){const s=e.get(new O.Path([]));if(s)return h(t1,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/noise"){const s=e.get(new O.Path([]));if(s)return h(n1,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/noise_settings"){const s=e.get(new O.Path([]));if(s)return h(r1,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/placed_feature"||n==="worldgen/configured_feature"&&qe(t,"1.16","1.17")){const s=e.get(new O.Path([]));if(s)return h(e1,{model:e,version:t,shown:r,data:s})}return h(te,null)}function ni(e,t){return e.schema.hook(s1,new O.ModelPath(e),e.data,{blockStates:t})}const s1={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((o,s)=>e.hook(this,t.push(s),o.node,r));for(const o of Object.getOwnPropertySymbols(n))i[o]=n[o];return i},map({children:e,config:t},n,r,i){var a,l;if(r===void 0)return;const o=((a=t.validation)==null?void 0:a.validator)==="block_state_map"?(l=i.blockStates)==null?void 0:l[O.relativePath(n,t.validation.params.id).get()]:null,s={};Object.keys(r).forEach(u=>{var c;o&&!Object.keys((c=o.properties)!=null?c:{}).includes(u)||(s[u]=e.hook(this,n.push(u),r[u],i))});for(const u of Object.getOwnPropertySymbols(r))s[u]=r[u];return s},object({getActiveFields:e},t,n,r){if(n==null||typeof n!="object")return n;const i={},o=e(t);Object.keys(o).filter(s=>o[s].enabled(t)).forEach(s=>{const a=o[s].hook(this,t.push(s),n[s],r);a!=null&&(i[s]=a)});for(const s of Object.getOwnPropertySymbols(n))i[s]=n[s];return i}},Ki={"2_spaces":2,"4_spaces":4,tabs:" ",minified:void 0};let Xn=null;const Qi={json:{parse:async e=>{try{return JSON.parse(e)}catch{return Xn=await se(()=>import("./index.f46d6480.js").then(function(n){return n.i}),[]),Xn.parse(e)}},stringify:(e,t)=>(Xn!=null?Xn:JSON).stringify(e,null,t)+`
|
|
`},yaml:{parse:async e=>mo.load(e),stringify:(e,t)=>mo.dump(e,{flowLevel:t===void 0?0:-1,indent:typeof t=="string"?4:t})}};function a1({name:e,model:t,blockStates:n,doCopy:r,doDownload:i,doImport:o,copySuccess:s,onError:a}){const{locale:l}=Ce(),[u,c]=B(De.getIndent()),[d,f]=B(De.getFormat()),[p,m]=B(De.getHighlighting()),[v,g]=B(!1),_=me(null),x=me(()=>{}),w=me(async()=>{}),b=me(null),A=me(),S=Ee((N,L)=>{const $=ni(N,L);return Qi[d].stringify($,Ki[u])},[u,d]);Q(()=>{x.current=()=>{if(!!A.current&&!(!t||!n))try{const N=S(t,n);A.current.setValue(N)}catch(N){N instanceof Error?(N.message=`Error getting JSON output: ${N.message}`,a(N)):a(`Error getting JSON output: ${ut(N)}`),console.error(N),A.current.setValue("")}},w.current=async()=>{if(!A.current)return;const N=A.current.getValue();if(N.length!==0)try{const L=await Qi[d].parse(N);t==null||t.reset(O.DataModel.wrapLists(L),!1)}catch(L){L instanceof Error?(L.message=`Error importing: ${L.message}`,a(L)):a(`Error importing: ${ut(L)}`),console.error(L)}}},[t,n,u,d,p]),Q(()=>{p?(g(!1),A.current={getValue(){return""},setValue(){},configure(){},select(){}},se(()=>import("./index.8ac52a74.js").then(function(N){return N.i}),[]).then(async N=>{await Promise.all([se(()=>import("./json.c327d69b.js").then(function($){return $.j}),[]),se(()=>import("./yaml.e8f3b9ab.js"),[])]);const L=N.edit("editor");L.setOptions({fontSize:14,showFoldWidgets:!1,highlightSelectedWord:!1}),L.$blockScrolling=1/0,L.on("blur",()=>w.current()),L.getSession().setMode("ace/mode/json"),A.current={getValue(){return L.getSession().getValue()},setValue($){L.getSession().setValue($)},configure($,K){L.setOption("useSoftTabs",$!=="tabs"),L.setOption("tabSize",$==="tabs"?4:Ki[$]),L.getSession().setMode(`ace/mode/${K}`)},select(){L.selectAll()}},g(!0)})):A.current={getValue(){return b.current?b.current.value:""},setValue(N){!b.current||(b.current.value=N)},configure(){},select(){}}},[p]),Ri(t,()=>{!x.current||x.current()}),Q(()=>{!x.current||t&&x.current()},[t]),Q(()=>{!A.current||!x.current||(!p||v)&&(A.current.configure(u,d),x.current())},[u,d,p,v]),Q(()=>{r&&t&&n&&navigator.clipboard.writeText(S(t,n)).then(()=>{s()})},[r]),Q(()=>{if(i&&t&&n&&_.current){const N=encodeURIComponent(S(t,n));_.current.setAttribute("href",`data:text/json;charset=utf-8,${N}`),_.current.setAttribute("download",`${e}.${d}`),_.current.click()}},[i]),Q(()=>{o&&A.current&&(A.current.setValue(""),A.current.select())},[o]);const I=N=>{De.setIndent(N),c(N)},k=N=>{De.setFormat(N),f(N)},M=N=>{De.setHighlighting(N),m(N)};return h(te,null,h("div",{class:"controls source-controls"},h(et,{icon:"gear",tooltip:l("output_settings"),"data-cy":"source-controls"},Object.entries(Ki).map(([N])=>h(Z,{label:l(`indentation.${N}`),active:u===N,onClick:()=>I(N)})),h("hr",null),Object.keys(Qi).map(N=>h(Z,{label:l(`format.${N}`),active:d===N,onClick:()=>k(N)})),h("hr",null),h(Z,{icon:p?"square_fill":"square",label:l("highlighting"),onClick:()=>M(!p)}))),p?h("pre",{id:"editor",class:"source"}):h("textarea",{ref:b,class:"source",spellcheck:!1,autocorrect:"off",onBlur:w.current}),h("a",{ref:_,style:"display: none;"}))}function Bc(e,t){for(var n in t)e[n]=t[n];return e}function So(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 Eo(e){this.props=e}function Fc(e,t){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!s:So(this.props,i)}function r(i){return this.shouldComponentUpdate=n,h(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Eo.prototype=new _t).isPureReactComponent=!0,Eo.prototype.shouldComponentUpdate=function(e,t){return So(this.props,e)||So(this.state,t)};var ca=U.__b;U.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ca&&ca(e)};var l1=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function c1(e){function t(n,r){var i=Bc({},n);return delete i.ref,e(i,(r=n.ref||r)&&(typeof r!="object"||"current"in r)?r:null)}return t.$$typeof=l1,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var ua=function(e,t){return e==null?null:vt(vt(e).map(t))},u1={map:ua,forEach:ua,count:function(e){return e?vt(e).length:0},only:function(e){var t=vt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:vt},d1=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)}d1(e,t,n)};var da=U.unmount;function ri(){this.__u=0,this.t=null,this.__b=null}function zc(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function h1(e){var t,n,r;function i(o){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return h(n,o)}return i.displayName="Lazy",i.__f=!0,i}function Qn(){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),da&&da(e)},(ri.prototype=new _t).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=zc(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__e){var u=r.state.__e;r.__v.__k[0]=function d(f,p,m){return f&&(f.__v=null,f.__k=f.__k&&f.__k.map(function(v){return d(v,p,m)}),f.__c&&f.__c.__P===p&&(f.__e&&m.insertBefore(f.__e,f.__d),f.__c.__e=!0,f.__c.__P=m)),f}(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(s,s)},ri.prototype.componentWillUnmount=function(){this.t=[]},ri.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 o(s,a,l){return s&&(s.__c&&s.__c.__H&&(s.__c.__H.__.forEach(function(u){typeof u.__c=="function"&&u.__c()}),s.__c.__H=null),(s=Bc({},s)).__c!=null&&(s.__c.__P===l&&(s.__c.__P=a),s.__c=null),s.__k=s.__k&&s.__k.map(function(u){return o(u,a,l)})),s}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__e&&h(te,null,e.fallback);return i&&(i.__h=null),[h(te,null,t.__e?null:e.children),i]};var ha=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 f1(e){return this.getChildContext=function(){return e.context},e.children}function p1(e){var t=this,n=e.i;t.componentWillUnmount=function(){Ln(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)}}),Ln(h(f1,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function m1(e,t){return h(p1,{__v:e,i:t})}(Qn.prototype=new _t).__e=function(e){var t=this,n=zc(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),ha(t,e,r)):i()};n?n(o):o()}},Qn.prototype.render=function(e){this.u=null,this.o=new Map;var t=vt(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},Qn.prototype.componentDidUpdate=Qn.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){ha(e,n,t)})};var jc=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,g1=/^(?: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]/,_1=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function v1(e,t,n){return t.__k==null&&(t.textContent=""),Ln(e,t),typeof n=="function"&&n(),e?e.__c:null}function w1(e,t,n){return Xa(e,t),typeof n=="function"&&n(),e?e.__c:null}_t.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(_t.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var fa=U.event;function y1(){}function b1(){return this.cancelBubble}function x1(){return this.defaultPrevented}U.event=function(e){return fa&&(e=fa(e)),e.persist=y1,e.isPropagationStopped=b1,e.isDefaultPrevented=x1,e.nativeEvent=e};var Vc,pa={configurable:!0,get:function(){return this.class}},ma=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 o=n[i];i==="value"&&"defaultValue"in n&&o==null||(i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&o===!0?o="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!_1(n.type)?i="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():g1.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():o===null&&(o=void 0),r[i]=o)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=vt(n.children).forEach(function(s){s.props.selected=r.value.indexOf(s.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=vt(n.children).forEach(function(s){s.props.selected=r.multiple?r.defaultValue.indexOf(s.props.value)!=-1:r.defaultValue==s.props.value})),e.props=r}t&&n.class!=n.className&&(pa.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",pa)),e.$$typeof=jc,ma&&ma(e)};var _a=U.__r;U.__r=function(e){_a&&_a(e),Vc=e.__c};var A1={ReactCurrentDispatcher:{current:{readContext:function(e){return Vc.__n[e.__c].props.value}}}};typeof performance=="object"&&typeof performance.now=="function"&&performance.now.bind(performance);function k1(e){return h.bind(null,e)}function Hc(e){return!!e&&e.$$typeof===jc}function S1(e){return Hc(e)?Ja.apply(null,arguments):e}function E1(e){return!!e.__k&&(Ln(null,e),!0)}function C1(e){return e&&(e.base||e.nodeType===1&&e)||null}var I1=function(e,t){return e(t)},Co={useState:B,useReducer:il,useEffect:Q,useLayoutEffect:ol,useRef:me,useImperativeHandle:Fu,useMemo:ke,useCallback:Ee,useContext:pn,useDebugValue:zu,version:"16.8.0",Children:u1,render:v1,hydrate:w1,unmountComponentAtNode:E1,createPortal:m1,createElement:h,createContext:hn,createFactory:k1,cloneElement:S1,createRef:xu,Fragment:te,isValidElement:Hc,findDOMNode:C1,Component:_t,PureComponent:Eo,memo:Fc,forwardRef:c1,unstable_batchedUpdates:I1,StrictMode:te,Suspense:ri,SuspenseList:Qn,lazy:h1,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:A1};class Uc extends O.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 M1=["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"],O1=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],N1=["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"],T1=["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","immersive_weathering.area_condition.type","immersive_weathering.block_growth.growth_for_face.entry.direction","immersive_weathering.position_test.predicate_type"],L1=["function.set_nbt.tag","advancement.display.icon.nbt","text_component_object.nbt","entity.nbt","block.nbt","item.nbt"],R1=["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"],va=["noise_settings.surface_rule","noise_settings.noise.terrain_shaper"],P1=["density_function.argument","density_function.argument1","density_function.argument2","density_function.input","density_function.when_in_range","density_function.when_out_of_range"],$1=e=>de.generators.find(t=>t.id===e.replace(/^\$/,"")),D1=new O.DataModel(O.MapNode(O.StringNode(),O.StringNode()),{historyMax:0});function B1({model:e,lang:t,version:n,blockStates:r}){var l;const i=new O.ModelPath(e),[o,s,a]=e.schema.hook(Gc,i,Li(e.data),t,n,r,{});return(l=s==null?void 0:s.props)!=null&&l.children.some(u=>u)?h("div",{class:`node ${e.schema.type(i)}-node`,"data-category":e.schema.category(i)},h("div",{class:"node-header"},o,s),h("div",{class:"node-body"},a)):a}const Gc={base(){return[null,null,null]},boolean(e,t,n,r,i,o,s){return[null,h(F1,q({},_e(q({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:s}))),null]},choice({choices:e,config:t,switchNode:n},r,i,o,s,a,l){const u=n.activeCase(r,!0),c=t!=null&&t.context?new O.ModelPath(r.getModel(),new O.Path(r.getArray(),[t.context])):r,[d,f,p]=u.node.hook(this,c,i,o,s,a,l);if(e.length===1)return[d,f,p];const m=t!=null&&t.choiceContext?new O.Path([],[t.choiceContext]):t!=null&&t.context?new O.Path([],[t.context]):r,v=_=>{var A;const x=(A=e.find(S=>S.type===_))!=null?A:u,w=x.node.default(),b=x.change?x.change(O.DataModel.unwrapLists(i)):t.choiceContext==="feature"&&(w==null?void 0:w.type)==="minecraft:decorated"?w.config.feature:w;r.model.set(r,O.DataModel.wrapLists(b))},g=h("select",{value:u.type,onChange:_=>v(_.target.value)},e.map(_=>h("option",{value:_.type},xi(o,m.contextPush(_.type)))));return[d,h(te,null,g,f),p]},list({children:e,config:t},n,r,i,o,s,a){const{expand:l,collapse:u,isToggled:c}=eo(),[d,f]=B(50),p=n.getContext().join(".");if(R1.includes(p)){const x=h(te,null,[...Array(t.maxLength)].map((b,A)=>h(er,{lang:i,path:n.modelPush(A)})),h("div",{class:"fixed-list"})),w=h(te,null,[...Array(t.maxLength)].map((b,A)=>{var I;return e.hook(this,n.modelPush(A),(I=r==null?void 0:r[A])==null?void 0:I.node,i,o,s,a)[1]}));return[x,w,null]}const m=()=>{Array.isArray(r)||(r=[]);const x=O.DataModel.wrapLists(e.default());n.model.set(n,[{node:x,id:rn()},...r])},v=()=>{Array.isArray(r)||(r=[]);const x=O.DataModel.wrapLists(e.default());n.model.set(n,[...r,{node:x,id:rn()}])},g=h("button",{class:"add tooltipped tip-se","aria-label":ue(i,"add_top"),onClick:m},re.plus_circle),_=h(te,null,r&&Array.isArray(r)&&r.map(({node:x,id:w},b)=>{if(b===d)return h("div",{class:"node node-header"},h("label",null,ue(i,"entries_hidden",`${r.length-d}`)),h("button",{onClick:()=>f(Math.min(d+50,r.length))},ue(i,"entries_hidden.more","50")),h("button",{onClick:()=>f(r.length)},ue(i,"entries_hidden.all")));if(b>d)return null;const A=n.push(b).contextPush("entry"),S=e.type(A)==="object",I=c(w);if(S&&(I===!1||I===void 0&&r.length>20))return h("div",{class:"node node-header","data-category":e.category(A)},h(er,{lang:i,path:A,nested:!0}),h("button",{class:"toggle tooltipped tip-se","aria-label":`${ue(i,"expand")}
|
|
${ue(i,"expand_all","Ctrl")}`,onClick:l(w)},re.chevron_right),h("label",null,xi(i,A,`${b}`)),h(wa,{key:w,path:A,value:x,schema:e}));const k=()=>A.set(void 0),M=()=>{const $=[...n.get()];[$[b-1],$[b]]=[$[b],$[b-1]],n.model.set(n,$)},N=()=>{const $=[...n.get()];[$[b+1],$[b]]=[$[b],$[b+1]],n.model.set(n,$)};return h(to,{key:w,path:A,schema:e,value:x,lang:i,version:o,states:s,actions:[{icon:"duplicate",label:"duplicate",onSelect:()=>{const $=[...n.get()];$.splice(b,0,{id:rn(),node:Li(x)}),n.model.set(n,$)}}],ctx:_e(q({},a),{index:(b===0?1:0)+(b===r.length-1?2:0)})},S&&h("button",{class:"toggle tooltipped tip-se","aria-label":`${ue(i,"collapse")}
|
|
${ue(i,"collapse_all","Ctrl")}`,onClick:u(w)},re.chevron_down),h("button",{class:"remove tooltipped tip-se","aria-label":ue(i,"remove"),onClick:k},re.trashcan),r.length>1&&h("div",{class:"node-move"},h("button",{class:"move tooltipped tip-se","aria-label":ue(i,"move_up"),onClick:M,disabled:b===0},re.chevron_up),h("button",{class:"move tooltipped tip-se","aria-label":ue(i,"move_down"),onClick:N,disabled:b===r.length-1},re.chevron_down)))}),r&&r.length>0&&r.length<=d&&h("div",{class:"node node-header"},h("button",{class:"add tooltipped tip-se","aria-label":ue(i,"add_bottom"),onClick:v},re.plus_circle)));return[null,g,_]},map({children:e,keys:t,config:n},r,i,o,s,a,l){var x,w,b,A,S;const{expand:u,collapse:c,isToggled:d}=eo(),f=new O.ModelPath(D1,new O.Path([H1(r.toString())])),p=()=>{const I=f.get();r.model.set(r.push(I),O.DataModel.wrapLists(e.default()))},m=((x=n.validation)==null?void 0:x.validator)==="block_state_map"?a==null?void 0:a[O.relativePath(r,n.validation.params.id).get()]:null,v=m!=null&&m.properties?O.StringNode(null,{enum:Object.keys((w=m.properties)!=null?w:{})}):t;if(m&&r.last()==="Properties"){typeof i!="object"&&(i={});const I=Object.entries((b=m.properties)!=null?b:{}).map(([k,M])=>[k,O.StringNode(null,{enum:M})]);return Object.entries((A=m.properties)!=null?A:{}).forEach(([k,M])=>{typeof i[k]!="string"?r.model.errors.add(r.push(k),"error.expected_string"):M.includes(i[k])||r.model.errors.add(r.push(k),"error.invalid_enum_option",i[k])}),O.ObjectNode(Object.fromEntries(I)).hook(this,r,i,o,s,a,l)}const g=h(te,null,v.hook(this,f,(S=f.get())!=null?S:"",o,s,a,l)[1],h("button",{class:"add tooltipped tip-se","aria-label":ue(o,"add"),onClick:p},re.plus_circle)),_=h(te,null,typeof i=="object"&&Object.entries(i).map(([I,k])=>{var ae,le,T,D;const M=r.modelPush(I),N=e.type(M)==="object",L=d(I);if(N&&(L===!1||L===void 0&&i.length>20))return h("div",{class:"node node-header","data-category":e.category(M)},h(er,{lang:o,path:M,nested:!0}),h("button",{class:"toggle tooltipped tip-se","aria-label":`${ue(o,"expand")}
|
|
${ue(o,"expand_all","Ctrl")}`,onClick:u(I)},re.chevron_right),h("label",null,I),h(wa,{key:I,path:M,value:k,schema:e}));const $=m?O.StringNode(null,{enum:(le=(ae=m.properties)==null?void 0:ae[I])!=null?le:[]}):e;((T=m==null?void 0:m.properties)==null?void 0:T[I])&&typeof k=="string"&&!((D=m.properties)!=null&&D[I].includes(k))&&r.model.errors.add(M,"error.invalid_enum_option",k);const K=()=>M.set(void 0);return h(to,{key:I,schema:$,path:M,value:k,lang:o,version:s,states:a,ctx:l,label:I},N&&h("button",{class:"toggle tooltipped tip-se","aria-label":`${ue(o,"collapse")}
|
|
${ue(o,"collapse_all","Ctrl")}`,onClick:c(I)},re.chevron_down),h("button",{class:"remove tooltipped tip-se","aria-label":ue(o,"remove"),onClick:K},re.trashcan))}));return[null,g,_]},number(e,t,n,r,i,o,s){return[null,h(z1,q({},_e(q({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:s}))),null]},object({node:e,config:t,getActiveFields:n,getChildModelPath:r},i,o,s,a,l,u){var x;const{expand:c,collapse:d,isToggled:f}=eo();if(i.getArray().length==0&&U1(t.context,o)){const{wrapper:w,fields:b}=G1(n(i),i,o);o=w.data,n=()=>b,r=(A,S)=>new O.ModelPath(w,new O.Path(A.getArray(),["feature"])).push(S)}let p=null,m=null;if(e.optional())if(o===void 0){const w=()=>i.set(O.DataModel.wrapLists(e.default()));m=h("button",{class:"collapse closed tooltipped tip-se","aria-label":ue(s,"expand"),onClick:w},re.plus_circle)}else{const w=()=>i.set(void 0);m=h("button",{class:"collapse open tooltipped tip-se","aria-label":ue(s,"remove"),onClick:w},re.trashcan)}const v=i.getContext().join(".");if(P1.includes(v)||va.includes(v)){const w=f(""),b=va.includes(v)?w:!w;if(p=h(te,null,h("button",{class:"toggle tooltipped tip-se","aria-label":ue(s,b?"collapse":"expand"),onClick:w?d(""):c("")},b?re.chevron_down:re.chevron_right)),!b)return[p,m,null]}const g=typeof o=="object"&&o!==null&&((x=e.default())==null?void 0:x.pools)?_e(q({},u),{loot:o==null?void 0:o.type}):u,_=h(te,null,typeof o=="object"&&o!==null&&!(e.optional()&&o===void 0)&&Object.entries(n(i)).filter(([w,b])=>b.enabled(i)).map(([w,b])=>{const A=r(i,w),S=A.getContext().join(".");if(O1.includes(S))return null;const[I,k,M]=b.hook(this,A,o[w],s,a,l,g),N=b.type(A)==="object"&&N1.includes(S),L=T1.includes(S);return N||L?(p=h(te,null,p,h(er,{lang:s,path:A}),h(Yc,{lang:s,path:A}),I),m=h(te,null,m,k),N?M:null):h(to,{key:w,schema:b,path:A,value:o[w],lang:s,version:a,states:l,ctx:g})}));return[p,m,_]},string(e,t,n,r,i,o,s){return[null,h(j1,q({},_e(q({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:s}))),null]}};function wa({path:e,value:t}){var r,i,o,s,a;switch(e.getContext().join(".")){case"loot_table.pools.entry":return h("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 h("label",null,(a=(o=t==null?void 0:t.name)==null?void 0:o.replace(/^minecraft:/,""))!=null?a:(s=t==null?void 0:t.type)==null?void 0:s.replace(/^minecraft:/,""))}for(const l of Object.values(t!=null?t:{}))if(typeof l=="string")return h("label",null,l.replace(/^minecraft:/,""));return null}function eo(){const[e,t]=B(new Map),[n,r]=B(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 F1({path:e,node:t,value:n,lang:r}){const i=o=>{e.model.set(e,t.optional()&&n===o?void 0:o)};return h(te,null,h("button",{class:n===!1?"selected":"",onClick:()=>i(!1)},ue(r,"false")),h("button",{class:n===!0?"selected":"",onClick:()=>i(!0)},ue(r,"true")))}function z1({path:e,config:t,integer:n,value:r,lang:i}){var a;const o=l=>{const u=l.target.value,c=n?parseInt(u):parseFloat(u);e.model.set(e,c)},s=l=>{const u=l.target.value,c=parseInt(u.slice(1),16);e.model.set(e,c)};return h(te,null,h("input",{type:"text",value:r!=null?r:"",onBlur:o,onKeyDown:l=>{l.key==="Enter"&&o(l)}}),(t==null?void 0:t.color)&&h("input",{type:"color",value:"#"+((a=r==null?void 0:r.toString(16).padStart(6,"0"))!=null?a:"000000"),onChange:s}),["dimension.generator.seed","dimension.generator.biome_source.seed","world_settings.seed","structure_placement.salt"].includes(e.getContext().join("."))&&h("button",{onClick:()=>Zl(e.model),class:"tooltipped tip-se","aria-label":ue(i,"generate_new_seed")},re.sync))}function j1({path:e,getValues:t,config:n,node:r,value:i,lang:o,version:s,states:a}){var f,p,m;const l=v=>{v.stopPropagation();const g=v.target.value;g!==i&&e.model.set(e,g.length===0?void 0:g)},u=t(),c=e.getContext().join("."),d=!Jn(n)&&(n==null?void 0:n.validator)==="resource"&&typeof n.params.pool=="string"?n.params.pool:void 0;if(L1.includes(c))return h("textarea",{value:i!=null?i:"",onBlur:l});if(Jn(n)&&!n.additional||M1.includes(c)){let v=new O.Path([]);return Jn(n)&&typeof n.enum=="string"?v=v.contextPush(n.enum):d?v=v.contextPush(d):Jn(n)&&(v=e),h("select",{value:i!=null?i:"",onChange:l},r.optional()&&h("option",{value:""},ue(o,"unset")),u.map(g=>h("option",{value:g},xi(o,v.contextPush(g.replace(/^minecraft:/,""))))))}else if(!Jn(n)&&(n==null?void 0:n.validator)==="block_state_key"){const v=a==null?void 0:a[O.relativePath(e,n.params.id).get()],g=Object.keys((f=v==null?void 0:v.properties)!=null?f:{});return h("select",{value:i!=null?i:"",onChange:l},g.map(_=>h("option",null,_)))}else{const{biomeColors:v,setBiomeColor:g}=pc(),_=typeof i=="string"?i.includes(":")?i:"minecraft:"+i:"unknown",x=rn(),w=d?$1(d):void 0;return h(te,null,h("input",{value:i!=null?i:"",onBlur:l,onKeyDown:b=>{b.key==="Enter"&&l(b)},list:u.length>0?x:""}),u.length>0&&h("datalist",{id:x},u.map(b=>h("option",{value:b}))),["generator_biome.biome"].includes(c)&&h("input",{type:"color",value:g0((m=(p=v[_])!=null?p:Dc[_])!=null?m:zo(_)),onChange:b=>g(_,_0(b.currentTarget.value))}),["attribute_modifier.id","text_component_object.hoverEvent.show_entity.contents.id"].includes(c)&&h("button",{onClick:()=>e.set(d0()),class:"tooltipped tip-se","aria-label":ue(o,"generate_new_uuid")},re.sync),w&&u.includes(i)&&i.startsWith("minecraft:")&&h("a",{href:`/${w.url}/?version=${s}&preset=${i.replace(/^minecraft:/,"")}`,class:"tooltipped tip-se","aria-label":ue(o,"follow_reference")},re.link_external))}}function V1({label:e,schema:t,path:n,value:r,lang:i,version:o,states:s,ctx:a,actions:l,children:u}){var b;const c=t.type(n),d=t.category(n),f=n.getContext().join("."),[p,m]=jo(),v=A=>{A.preventDefault(),m()},g=_e(q({},a),{depth:((b=a.depth)!=null?b:0)+1});delete g.index;const[_,x,w]=t.hook(Gc,n,r,i,o,s,g);return h("div",{class:`node ${c}-node`,"data-category":d},h("div",{class:"node-header",onContextMenu:v},h(er,{lang:i,path:n}),h(Yc,{lang:i,path:n}),u,_,h("label",null,e!=null?e:xi(i,n,`${n.last()}`),p&&h("div",{class:"node-menu"},l==null?void 0:l.map(A=>{var S;return h("div",{key:A.label,class:"menu-item"},h(Z,{icon:A.icon,tooltip:ue(i,A.label),tooltipLoc:"se",onClick:()=>A.onSelect()}),h("span",null,(S=A.description)!=null?S:ue(i,A.label)))}),h("div",{class:"menu-item"},h(Z,{icon:"clippy",tooltip:ue(i,"copy_context"),tooltipLoc:"se",onClick:()=>navigator.clipboard.writeText(f)}),h("span",null,f)))),x),w&&h("div",{class:"node-body"},w))}const to=Fc(V1,(e,t)=>e.schema===t.schema&&e.lang===t.lang&&e.path.equals(t.path)&&an(e.ctx,t.ctx)&&an(e.value,t.value));function Jn(e){return!!(e!=null&&e.enum)}function H1(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 xi(e,t,...n){const r=t.getContext();for(let i=0;i<r.length;i+=1){const o=r.slice(i).join("."),s=ue(e,o,...n);if(o!==s)return s}return r[r.length-1]}function er({lang:e,path:t,nested:n}){var o;t.model instanceof Uc&&(t=t.model.map(t).withModel(t.model));const r=n?t.model.errors.getAll().filter(s=>s.path.startsWith(t)):t.model.errors.get(t,!0);if(r.length===0)return null;const i=ue(e,r[0].error,...(o=r[0].params)!=null?o:[]);return Wc("node-error","issue_opened",i)}function Yc({lang:e,path:t}){const n=t.contextPush("help").getContext().join("."),r=ue(e,n);return r===n?null:Wc("node-help","info",r)}const Wc=(e,t,n)=>{const[r,i]=jo();return h("div",{class:`node-icon ${e}${r?" show":""}`,onClick:i},re[t],h("span",{class:"icon-popup"},n))};function U1(e,t){var n;return e==="feature"&&((n=t==null?void 0:t.type)==null?void 0:n.replace(/^minecraft:/,""))==="decorated"&&mn(t==null?void 0:t.config)}function G1(e,t,n){const r=[],i=tr(n,r),o={type:e.type,config:O.ObjectNode({decorators:O.ListNode(ic),feature:oc},{context:"feature.decorated"})},s=O.ObjectNode(o,{context:"feature"}),a=new O.Path(["config","feature"]),l=new O.Path(["config","decorators"]),u=t.getModel(),c=new Uc(s,d=>{if(d.startsWith(a))return new O.Path([...[...Array(r.length-1)].flatMap(()=>["config","feature"]),...d.modelArr]);if(d.startsWith(l)){if(d.modelArr.length===2)return new O.Path([]);const f=d.modelArr[2];if(typeof f=="number")return new O.Path([...[...Array(f)].flatMap(()=>["config","feature"]),"config","decorator",...d.modelArr.slice(3)])}return d},d=>{if(d.equals(l)){const f=[];return tr(u.data,f),f}return u.get(c.map(d))},(d,f,p)=>{if(d.startsWith(a)){const m=[];tr(u.data,m);const v=new O.Path([...[...Array(m.length-1)].flatMap(()=>["config","feature"]),...d.modelArr]);return u.set(v,f,p)}else if(d.startsWith(l)){const m=d.modelArr[2];if(d.modelArr.length===2){const v=c.get(a);return u.set(new O.Path,Io(v,f),p)}else if(typeof m=="number")if(d.modelArr.length===3&&f===void 0){const v=c.get(a),g=[];tr(u.data,g),g.splice(m,1);const _=Io(v,g);return u.set(new O.Path,_,p)}else{const v=new O.Path([...[...Array(m)].flatMap(()=>["config","feature"]),"config","decorator",...d.modelArr.slice(3)]);return u.set(v,f,p)}}u.set(d,f,p)});return c.data={type:u.data.type,config:{decorators:r,feature:i}},c.errors=u.errors,{fields:o,wrapper:c}}function tr(e,t){var n,r;return((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,""))!=="decorated"||!mn(e==null?void 0:e.config)?e:(t.push({id:t.length,node:e.config.decorator}),tr((r=e.config.feature)!=null?r:"",t))}function Io(e,t){return t.length===0?e:{type:"minecraft:decorated",config:{decorator:t.shift().node,feature:Io(e,t)}}}function Y1({version:e,model:t,blockStates:n,onError:r}){const{lang:i}=Ce();if(!t||!n||i==="none")return h(te,null);const[o]=sl(a=>{r(`Error rendering the tree: ${a.message}`),console.error(a)});if(o)return h(te,null);const[,s]=B(0);return Ri(t,()=>{s(a=>a+1)}),h("div",{class:"tree","data-cy":"tree"},h(B1,{model:t,lang:i,version:e,blockStates:n}))}var W1=Object.defineProperty,q1=Object.defineProperties,Z1=Object.getOwnPropertyDescriptors,ya=Object.getOwnPropertySymbols,X1=Object.prototype.hasOwnProperty,J1=Object.prototype.propertyIsEnumerable,ba=(e,t,n)=>t in e?W1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qc=(e,t)=>{for(var n in t||(t={}))X1.call(t,n)&&ba(e,n,t[n]);if(ya)for(var n of ya(t))J1.call(t,n)&&ba(e,n,t[n]);return e};const xa="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function Hr(e){return`[giscus] An error occurred. Error message: "${e}".`}function Aa(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function K1(){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 Q1(e){const[t,n]=B(""),r=function({repo:s,repoId:a,category:l="",categoryId:u="",mapping:c,term:d="",theme:f="light",reactionsEnabled:p="1",emitMetadata:m="0",inputPosition:v="bottom",lang:g="en",session:_,origin:x}){const w=new URL(location.href);w.searchParams.delete("giscus");const b=w.toString(),A={origin:x=x||b,session:_,theme:f,reactionsEnabled:p,emitMetadata:m,inputPosition:v,repo:s,repoId:a,category:l,categoryId:u,description:Aa("description")};switch(c){case"url":A.term=b;break;case"title":A.term=document.title;break;case"og:title":A.term=Aa("title");break;case"specific":A.term=d;break;case"number":A.number=d;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=qc({},e),q1(i,Z1({session:t}))));var i;const o=me(null);return Q(()=>{const s=location.href,a=new URL(s),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(`${Hr(c==null?void 0:c.message)} Session has been cleared.`)}},[]),Q(K1,[]),Q(()=>{const s=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 d=c.giscus.error;if(d.includes("Bad credentials")||d.includes("Invalid state value")){if(localStorage.getItem("giscus-session")!==null)return localStorage.removeItem("giscus-session"),a(),void console.warn(`${Hr(d)} Session has been cleared.`);console.error(`${Hr(d)} No session is stored initially. ${xa}`)}d.includes("Discussion not found")?console.warn(`[giscus] ${d}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${Hr(d)} ${xa}`)}}(()=>n(""),o.current);return window.addEventListener("message",s),()=>window.removeEventListener("message",s)},[]),Co.createElement("div",{className:"giscus"},Co.createElement("iframe",{className:"giscus-frame",title:"Comments",scrolling:"no",src:r,ref:o}))}function em(e){const[t,n]=B(!1);return Q(()=>n(!0),[]),t?Co.createElement(Q1,qc({},e)):null}function Xo({term:e}){const{actualTheme:t}=gc(),n=t==="light"?"-burn":"",r=`${location.protocol}//${location.host}/assets/giscus${n}.css`;return h("div",{class:"giscus-container"},h(em,{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 Zc(){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 Wn=Zc();function tm(e){Wn=e}const nm=/[&<>"']/,rm=/[&<>"']/g,im=/[<>"']|&(?!#?\w+;)/,om=/[<>"']|&(?!#?\w+;)/g,sm={"&":"&","<":"<",">":">",'"':""","'":"'"},ka=e=>sm[e];function $e(e,t){if(t){if(nm.test(e))return e.replace(rm,ka)}else if(im.test(e))return e.replace(om,ka);return e}const am=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Xc(e){return e.replace(am,(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 lm=/(^|[^\[])\^/g;function xe(e,t){e=e.source||e,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(lm,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const cm=/[^\w:]/g,um=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Sa(e,t,n){if(e){let r;try{r=decodeURIComponent(Xc(n)).replace(cm,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!um.test(n)&&(n=pm(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Ur={},dm=/^[^:]+:\/*[^/]*$/,hm=/^([^:]+:)[\s\S]*$/,fm=/^([^:]+:\/*[^/]*)[\s\S]*$/;function pm(e,t){Ur[" "+e]||(dm.test(e)?Ur[" "+e]=e+"/":Ur[" "+e]=ii(e,"/",!0)),e=Ur[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(hm,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(fm,"$1")+t:e+t}const Ai={exec:function(){}};function wt(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 Ea(e,t){const n=e.replace(/\|/g,(o,s,a)=>{let l=!1,u=s;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 ii(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o===t&&!n)i++;else if(o!==t&&n)i++;else break}return e.substr(0,r-i)}function mm(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 Jc(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 Ca(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function Ia(e,t,n,r){const i=t.href,o=t.title?$e(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const a={type:"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s,[])};return r.state.inLink=!1,a}else return{type:"image",raw:n,href:i,title:o,text:$e(s)}}function gm(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
|
|
`).map(i=>{const o=i.match(/^\s+/);if(o===null)return i;const[s]=o;return s.length>=r.length?i.slice(r.length):i}).join(`
|
|
`)}class Jo{constructor(t){this.options=t||Wn}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:ii(r,`
|
|
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=gm(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 o=ii(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.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,o,s,a,l,u,c,d,f,p,m,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 x=new RegExp(`^( {0,3}${v})((?: [^\\n]*)?(?:\\n|$))`);for(;t&&(m=!1,!(!(n=x.exec(t))||this.rules.block.hr.test(t)));){if(r=n[0],t=t.substring(r.length),c=n[2].split(`
|
|
`,1)[0],d=t.split(`
|
|
`,1)[0],this.options.pedantic?(s=2,p=c.trimLeft()):(s=n[2].search(/[^ ]/),s=s>4?1:s,p=c.slice(s),s+=n[1].length),l=!1,!c&&/^ *$/.test(d)&&(r+=d+`
|
|
`,t=t.substring(d.length+1),m=!0),!m){const b=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;t&&(f=t.split(`
|
|
`,1)[0],c=f,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c));){if(c.search(/[^ ]/)>=s||!c.trim())p+=`
|
|
`+c.slice(s);else if(!l)p+=`
|
|
`+c;else break;!l&&!c.trim()&&(l=!0),r+=f+`
|
|
`,t=t.substring(f.length+1)}}_.loose||(u?_.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(p),i&&(o=i[0]!=="[ ] ",p=p.replace(/^\[[ xX]\] +/,""))),_.items.push({type:"list_item",raw:r,task:!!i,checked:o,loose:!1,text:p}),_.raw+=r}_.items[_.items.length-1].raw=r.trimRight(),_.items[_.items.length-1].text=p.trimRight(),_.raw=_.raw.trimRight();const w=_.items.length;for(a=0;a<w;a++){this.lexer.state.top=!1,_.items[a].tokens=this.lexer.blockTokens(_.items[a].text,[]);const b=_.items[a].tokens.filter(S=>S.type==="space"),A=b.every(S=>{const I=S.raw.split("");let k=0;for(const M of I)if(M===`
|
|
`&&(k+=1),k>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]):$e(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:Ea(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,o,s,a,l;for(o=0;o<i;o++)/^ *-+: *$/.test(r.align[o])?r.align[o]="right":/^ *:-+: *$/.test(r.align[o])?r.align[o]="center":/^ *:-+ *$/.test(r.align[o])?r.align[o]="left":r.align[o]=null;for(i=r.rows.length,o=0;o<i;o++)r.rows[o]=Ea(r.rows[o],r.header.length).map(u=>({text:u}));for(i=r.header.length,s=0;s<i;s++)r.header[s].tokens=[],this.lexer.inlineTokens(r.header[s].text,r.header[s].tokens);for(i=r.rows.length,s=0;s<i;s++)for(l=r.rows[s],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:$e(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]):$e(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 s=ii(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=mm(n[2],"()");if(s>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let i=n[2],o="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);s&&(i=s[1],o=s[3])}else o=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)),Ia(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:o&&o.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 o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return Ia(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 o=i[1]||i[2]||"";if(!o||o&&(r===""||this.rules.inline.punctuation.exec(r))){const s=i[0].length-1;let a,l,u=s,c=0;const d=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+s);(i=d.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])&&s%3&&!((s+l)%3)){c+=l;continue}if(u-=l,u>0)continue;if(l=Math.min(l,l+u+c),Math.min(s,l)%2){const p=t.slice(1,s+i.index+l);return{type:"em",raw:t.slice(0,s+i.index+l+1),text:p,tokens:this.lexer.inlineTokens(p,[])}}const f=t.slice(2,s+i.index+l-1);return{type:"strong",raw:t.slice(0,s+i.index+l+1),text:f,tokens:this.lexer.inlineTokens(f,[])}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),o=/^ /.test(r)&&/ $/.test(r);return i&&o&&(r=r.substring(1,r.length-1)),r=$e(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,o;return r[2]==="@"?(i=$e(this.options.mangle?n(r[1]):r[1]),o="mailto:"+i):(i=$e(r[1]),o=i),{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let i,o;if(r[2]==="@")i=$e(this.options.mangle?n(r[0]):r[0]),o="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(s!==r[0]);i=$e(r[0]),r[1]==="www."?o="http://"+i:o=i}return{type:"link",raw:r[0],text:i,href:o,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]):$e(r[0]):r[0]:i=$e(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:Ai,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=xe(W.def).replace("label",W._label).replace("title",W._title).getRegex();W.bullet=/(?:[*+-]|\d{1,9}[.)])/;W.listItemStart=xe(/^( *)(bull) */).replace("bull",W.bullet).getRegex();W.list=xe(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=xe(W.html,"i").replace("comment",W._comment).replace("tag",W._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();W.paragraph=xe(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=xe(W.blockquote).replace("paragraph",W.paragraph).getRegex();W.normal=wt({},W);W.gfm=wt({},W.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});W.gfm.table=xe(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=xe(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=wt({},W.normal,{html:xe(`^ *(?: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:Ai,paragraph:xe(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:Ai,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:Ai,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};z._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";z.punctuation=xe(z.punctuation).replace(/punctuation/g,z._punctuation).getRegex();z.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;z.escapedEmSt=/\\\*|\\_/g;z._comment=xe(W._comment).replace("(?:-->|$)","-->").getRegex();z.emStrong.lDelim=xe(z.emStrong.lDelim).replace(/punct/g,z._punctuation).getRegex();z.emStrong.rDelimAst=xe(z.emStrong.rDelimAst,"g").replace(/punct/g,z._punctuation).getRegex();z.emStrong.rDelimUnd=xe(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=xe(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=xe(z.tag).replace("comment",z._comment).replace("attribute",z._attribute).getRegex();z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;z._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;z.link=xe(z.link).replace("label",z._label).replace("href",z._href).replace("title",z._title).getRegex();z.reflink=xe(z.reflink).replace("label",z._label).replace("ref",W._label).getRegex();z.nolink=xe(z.nolink).replace("ref",W._label).getRegex();z.reflinkSearch=xe(z.reflinkSearch,"g").replace("reflink",z.reflink).replace("nolink",z.nolink).getRegex();z.normal=wt({},z);z.pedantic=wt({},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:xe(/^!?\[(label)\]\((.*?)\)/).replace("label",z._label).getRegex(),reflink:xe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z._label).getRegex()});z.gfm=wt({},z.normal,{escape:xe(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=xe(z.gfm.url,"i").replace("email",z.gfm._extended_email).getRegex();z.breaks=wt({},z.gfm,{br:xe(z.br).replace("{2,}","*").getRegex(),text:xe(z.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function _m(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 Ma(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 Ht{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Wn,this.options.tokenizer=this.options.tokenizer||new Jo,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 Ht(n).lex(t)}static lexInline(t,n){return new Ht(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,o,s;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(o=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&&(o=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){i=n[n.length-1],s&&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),s=o.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,o,s=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(s))!=null;)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+Ca("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+Ca("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,a.index)+"++"+s.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,s,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,Ma)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,Ma))){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=t.slice(1);let f;this.options.extensions.startInline.forEach(function(p){f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(o=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(o,_m)){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 Ko{constructor(t){this.options=t||Wn}code(t,n,r){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const o=this.options.highlight(t,i);o!=null&&o!==t&&(r=!0,t=o)}return t=t.replace(/\n$/,"")+`
|
|
`,i?'<pre><code class="'+this.options.langPrefix+$e(i,!0)+'">'+(r?t:$e(t,!0))+`</code></pre>
|
|
`:"<pre><code>"+(r?t:$e(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",o=n&&r!==1?' start="'+r+'"':"";return"<"+i+o+`>
|
|
`+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=Sa(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='<a href="'+$e(t)+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(t,n,r){if(t=Sa(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 Kc{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 Qc{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 Ut{constructor(t){this.options=t||Wn,this.options.renderer=this.options.renderer||new Ko,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Kc,this.slugger=new Qc}static parse(t,n){return new Ut(n).parse(t)}static parseInline(t,n){return new Ut(n).parseInline(t)}parse(t,n=!0){let r="",i,o,s,a,l,u,c,d,f,p,m,v,g,_,x,w,b,A,S;const I=t.length;for(i=0;i<I;i++){if(p=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[p.type]&&(S=this.options.extensions.renderers[p.type].call({parser:this},p),S!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(p.type))){r+=S||"";continue}switch(p.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{r+=this.renderer.heading(this.parseInline(p.tokens),p.depth,Xc(this.parseInline(p.tokens,this.textRenderer)),this.slugger);continue}case"code":{r+=this.renderer.code(p.text,p.lang,p.escaped);continue}case"table":{for(d="",c="",a=p.header.length,o=0;o<a;o++)c+=this.renderer.tablecell(this.parseInline(p.header[o].tokens),{header:!0,align:p.align[o]});for(d+=this.renderer.tablerow(c),f="",a=p.rows.length,o=0;o<a;o++){for(u=p.rows[o],c="",l=u.length,s=0;s<l;s++)c+=this.renderer.tablecell(this.parseInline(u[s].tokens),{header:!1,align:p.align[s]});f+=this.renderer.tablerow(c)}r+=this.renderer.table(d,f);continue}case"blockquote":{f=this.parse(p.tokens),r+=this.renderer.blockquote(f);continue}case"list":{for(m=p.ordered,v=p.start,g=p.loose,a=p.items.length,f="",o=0;o<a;o++)x=p.items[o],w=x.checked,b=x.task,_="",x.task&&(A=this.renderer.checkbox(w),g?x.tokens.length>0&&x.tokens[0].type==="paragraph"?(x.tokens[0].text=A+" "+x.tokens[0].text,x.tokens[0].tokens&&x.tokens[0].tokens.length>0&&x.tokens[0].tokens[0].type==="text"&&(x.tokens[0].tokens[0].text=A+" "+x.tokens[0].tokens[0].text)):x.tokens.unshift({type:"text",text:A}):_+=A),_+=this.parse(x.tokens,g),f+=this.renderer.listitem(_,b,w);r+=this.renderer.list(f,m,v);continue}case"html":{r+=this.renderer.html(p.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(p.tokens));continue}case"text":{for(f=p.tokens?this.parseInline(p.tokens):p.text;i+1<I&&t[i+1].type==="text";)p=t[++i],f+=`
|
|
`+(p.tokens?this.parseInline(p.tokens):p.text);r+=n?this.renderer.paragraph(f):f;continue}default:{const k='Token with "'+p.type+'" type was not found.';if(this.options.silent){console.error(k);return}else throw new Error(k)}}}return r}parseInline(t,n){n=n||this.renderer;let r="",i,o,s;const a=t.length;for(i=0;i<a;i++){if(o=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]&&(s=this.options.extensions.renderers[o.type].call({parser:this},o),s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type))){r+=s||"";continue}switch(o.type){case"escape":{r+=n.text(o.text);break}case"html":{r+=n.html(o.text);break}case"link":{r+=n.link(o.href,o.title,this.parseInline(o.tokens,n));break}case"image":{r+=n.image(o.href,o.title,o.text);break}case"strong":{r+=n.strong(this.parseInline(o.tokens,n));break}case"em":{r+=n.em(this.parseInline(o.tokens,n));break}case"codespan":{r+=n.codespan(o.text);break}case"br":{r+=n.br();break}case"del":{r+=n.del(this.parseInline(o.tokens,n));break}case"text":{r+=n.text(o.text);break}default:{const l='Token with "'+o.type+'" type was not found.';if(this.options.silent){console.error(l);return}else throw new Error(l)}}}return r}}function ne(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=wt({},ne.defaults,t||{}),Jc(t),n){const r=t.highlight;let i;try{i=Ht.lex(e,t)}catch(a){return n(a)}const o=function(a){let l;if(!a)try{t.walkTokens&&ne.walkTokens(i,t.walkTokens),l=Ut.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 o();let s=0;ne.walkTokens(i,function(a){a.type==="code"&&(s++,setTimeout(()=>{r(a.text,a.lang,function(l,u){if(l)return o(l);u!=null&&u!==a.text&&(a.text=u,a.escaped=!0),s--,s===0&&o()})},0))}),s===0&&o();return}try{const r=Ht.lex(e,t);return t.walkTokens&&ne.walkTokens(r,t.walkTokens),Ut.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>"+$e(r.message+"",!0)+"</pre>";throw r}}ne.options=ne.setOptions=function(e){return wt(ne.defaults,e),tm(ne.defaults),ne};ne.getDefaults=Zc;ne.defaults=Wn;ne.use=function(...e){const t=wt({},...e),n=ne.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach(i=>{if(i.extensions&&(r=!0,i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){const s=n.renderers?n.renderers[o.name]:null;s?n.renderers[o.name]=function(...a){let l=o.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:n.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");n[o.level]?n[o.level].unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}o.childTokens&&(n.childTokens[o.name]=o.childTokens)})),i.renderer){const o=ne.defaults.renderer||new Ko;for(const s in i.renderer){const a=o[s];o[s]=(...l)=>{let u=i.renderer[s].apply(o,l);return u===!1&&(u=a.apply(o,l)),u}}t.renderer=o}if(i.tokenizer){const o=ne.defaults.tokenizer||new Jo;for(const s in i.tokenizer){const a=o[s];o[s]=(...l)=>{let u=i.tokenizer[s].apply(o,l);return u===!1&&(u=a.apply(o,l)),u}}t.tokenizer=o}if(i.walkTokens){const o=ne.defaults.walkTokens;t.walkTokens=function(s){i.walkTokens.call(this,s),o&&o.call(this,s)}}r&&(t.extensions=n),ne.setOptions(t)})};ne.walkTokens=function(e,t){for(const n of e)switch(t.call(ne,n),n.type){case"table":{for(const r of n.header)ne.walkTokens(r.tokens,t);for(const r of n.rows)for(const i of r)ne.walkTokens(i.tokens,t);break}case"list":{ne.walkTokens(n.items,t);break}default:ne.defaults.extensions&&ne.defaults.extensions.childTokens&&ne.defaults.extensions.childTokens[n.type]?ne.defaults.extensions.childTokens[n.type].forEach(function(r){ne.walkTokens(n[r],t)}):n.tokens&&ne.walkTokens(n.tokens,t)}};ne.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=wt({},ne.defaults,t||{}),Jc(t);try{const n=Ht.lexInline(e,t);return t.walkTokens&&ne.walkTokens(n,t.walkTokens),Ut.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>"+$e(n.message+"",!0)+"</pre>";throw n}};ne.Parser=Ut;ne.parser=Ut.parse;ne.Renderer=Ko;ne.TextRenderer=Kc;ne.Lexer=Ht;ne.lexer=Ht.lex;ne.Tokenizer=Jo;ne.Slugger=Qc;ne.parse=ne;Ut.parse;Ht.lex;function vm({change:e,activeTags:t,toggleTag:n}){return h("div",{class:"changelog-entry"},h("div",{class:"changelog-version"},h("a",{href:`/versions/?id=${e.version}`},e.version),h("a",{href:`/versions/?id=${e.group}`},e.group)),h("div",{class:"changelog-tags"},e.tags.map(r=>h(Pr,{label:r,onClick:n?()=>n(r):void 0,active:t==null?void 0:t.includes(r)}))),h("div",{class:"changelog-content",dangerouslySetInnerHTML:{__html:ne(e.content)}}))}const wm="tags",no="|";function eu(){const[e,t]=ln(wm),n=ke(()=>{var i;return(i=e==null?void 0:e.split(no))!=null?i:[]},[e]);return[n,(i,o)=>{o===!1||n.includes(i)&&o!==!0?t(n.filter(s=>s!==i).join(no),!0):t([...n,i].sort().join(no),!0)}]}function Pr({label:e,active:t,onClick:n}){const r=e==="breaking"?5:Xl(e)%360;return h("div",{class:`changelog-tag${t?" active":""}${n?" clickable":""}`,style:`--tint: ${r}`,onClick:n},e==="breaking"&&re.alert,e)}const ym="search";function tu({changes:e,defaultOrder:t}){const{locale:n}=Ce(),[r,i]=ln(ym),[o,s]=eu(),a=ke(()=>{const d=(r!=null?r:"").split(" ").map(f=>f.trim().toLowerCase()).filter(f=>f.length>0);return d.length===0&&o.length===0?e:e==null?void 0:e.filter(f=>{if(!o.every(m=>f.tags.includes(m)))return!1;const p=f.tags.join(" ")+" "+f.content.toLowerCase();return d.every(m=>m.startsWith("!")?m.length===1||!p.includes(m.slice(1)):p.includes(m))})},[e,r,o]),[l,u]=B(t==="desc"),c=ke(()=>a==null?void 0:a.sort((d,f)=>l?f.order-d.order:d.order-f.order),[a,l]);return h(te,null,h("div",{class:"changelog-query"},h(cn,{class:"btn btn-input changelog-search",list:"sound-list",placeholder:n("changelog.search"),value:r,onChange:d=>i(d,!0)}),h(Z,{icon:l?"sort_desc":"sort_asc",label:l?"Newest first":"Oldest first",onClick:()=>u(!l)})),o.length>0&&h("div",{class:"changelog-tags"},o.map(d=>h(Pr,{label:d,onClick:()=>s(d)}))),h("div",{class:"changelog-list"},c===void 0?h("span",{class:"note"},n("loading")):c.length===0?h("span",{class:"note"},n("changelog.no_results")):c.map(d=>h(vm,{change:d,activeTags:o,toggleTag:s}))))}function bm({id:e,version:t}){var u,c;const{locale:n}=Ce(),[r,i]=B("changelog"),[o,s]=B(void 0);Q(()=>{Ql().then(d=>s(d.map(f=>_e(q({},f),{tags:f.tags.filter(p=>p!==f.group)})))).catch(d=>console.error(d))},[]);const a=ke(()=>o==null?void 0:o.filter(d=>d.version===e||d.group===e),[e,o]),l=t&&N0(t.id);return h(te,null,h("div",{class:"version-detail"},h("h2",null,(u=t==null?void 0:t.name)!=null?u:e),h("div",{class:"version-info"},t?h(te,null,h($t,{label:n("versions.released"),value:nu(t)}),h($t,{label:n("versions.release_target"),value:t.release_target,link:t.id!==t.release_target?`/versions/?id=${t.release_target}`:void 0}),h($t,{label:n("versions.data_version"),value:t.data_version}),h($t,{label:n("versions.protocol_version"),value:t.protocol_version}),h($t,{label:n("versions.data_pack_format"),value:t.data_pack_version}),h($t,{label:n("versions.resource_pack_format"),value:t.resource_pack_version})):((c=a==null?void 0:a.length)!=null?c:0>1)?h("p",null,"This version is not released yet."):h("p",null,"This version does not exist. Only versions since 1.14 are tracked, or it may be too recent.")),h("div",{class:"version-tabs"},h("span",{class:r==="changelog"?"selected":"",onClick:()=>i("changelog")},n("versions.technical_changes")),h("span",{class:r==="discussion"?"selected":"",onClick:()=>i("discussion")},n("versions.discussion")),l&&h("a",{href:l,target:"_blank"},n("versions.article"),re.link_external)),h("div",{class:"version-tab"},r==="changelog"&&h(tu,{changes:a,defaultOrder:"asc"}),r==="discussion"&&h(Xo,{term:`version/${e}/`}))))}function nu(e){return new Date(e.release_time).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}function xm({version:e,link:t}){const{locale:n}=Ce();return h("a",{class:"version-entry",href:t},h("span",{class:"version-id"},e.id),h($t,{label:n("versions.released"),value:nu(e),compact:!0}),h($t,{label:n("versions.data_version"),value:e.data_version,optional:!0}),h($t,{label:n("versions.pack_format"),value:e.data_pack_version,optional:!0}))}const Am="search";function km({versions:e,link:t}){const{locale:n}=Ce(),[r,i]=B(!0),[o,s]=ln(Am),a=ke(()=>e.filter(l=>l.type==="snapshot"&&!r?!1:l.id.includes(o!=null?o:"")),[e,r,o]);return h(te,null,h("div",{class:"versions-controls"},h(cn,{class:"btn btn-input version-search",placeholder:n("versions.search"),value:o,onChange:s}),h(S0,{label:"Include snapshots",value:r,onChange:i})),h("div",{class:"version-list"},a.map(l=>h(xm,{version:l,link:t==null?void 0:t(l.id)})),a.length===0&&h("span",null,n("versions.no_results"))))}function $t({label:e,value:t,link:n,compact:r,optional:i}){return h("div",{class:`version-metadata${i?" version-metadata-hide":""}`},h("span",{class:r?"version-metadata-hide":void 0},e,": "),h("span",{class:"version-metadata-value"},t),n&&h("a",{href:n,class:"version-metadata-link"},re.link_external))}function Sm({title:e,link:t,versions:n,tags:r,activeTags:i,toggleTag:o}){const s=a=>l=>{o&&o(a),l.preventDefault(),l.stopImmediatePropagation()};return h("a",{class:"guide-card",href:t},h("span",{class:"guide-versions"},n.join(" \u2022 ")),h("h3",null,e),h("div",{class:"guide-tags"},r.sort().map(a=>h(Pr,{label:a,onClick:s(a),active:i==null?void 0:i.includes(a)}))))}const Oa={system:"device_desktop",dark:"moon",light:"sun"};function Em(){const{lang:e,locale:t,changeLocale:n}=Ce(),{theme:r,changeTheme:i}=gc(),{version:o}=Yn(),{title:s}=dt(),a=Jl(Rn());return h("header",null,h("div",{class:"title"},h(rl,{class:"home-link",href:"/","aria-label":t("home"),"data-cy":"home-link"},ru.home),h("h1",null,s),a&&h(et,{icon:"chevron_down",tooltip:t("switch_generator"),"data-cy":"generator-switcher"},de.generators.filter(l=>l.category===(a==null?void 0:a.category)&&qe(o,l.minVersion)).map(l=>h(Z,{label:t(l.partner?`partner.${l.partner}.${l.id}`:l.id),active:l.id===a.id,onClick:()=>Zt(It(l.url))})))),h("nav",null,h("ul",null,h("li",{"data-cy":"language-switcher"},h(et,{icon:"globe",tooltip:t("language")},de.languages.map(({code:l,name:u})=>h(Z,{label:u,active:l===e,onClick:()=>n(l)})))),h("li",{"data-cy":"theme-switcher"},h(et,{icon:Oa[r],tooltip:t("theme")},Object.entries(Oa).map(([l,u])=>h(Z,{icon:u,label:t(`theme.${l}`),active:l===r,onClick:()=>i(l)})))),h("li",{class:"dimmed"},h("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",class:"tooltipped tip-sw","aria-label":t("github")},re.mark_github)))))}const ru={home:h("svg",{width:"32",height:"28",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("rect",{width:"26",height:"6",rx:"3",fill:"#7CB45C"}),h("rect",{x:"8",width:"18",height:"6",rx:"3",fill:"#4BA041"}),h("rect",{y:"11",width:"32",height:"6",rx:"3",fill:"#AAA8A8"}),h("rect",{x:"11",y:"11",width:"21",height:"6",rx:"3",fill:"#91908F"}),h("rect",{x:"11",y:"22",width:"21",height:"6",rx:"3",fill:"#70B5C3"}),h("rect",{x:"17",y:"22",width:"15",height:"6",rx:"3",fill:"#4D989B"})),report:h("svg",{width:"30",height:"36",viewBox:"0 0 30 36",xmlns:"http://www.w3.org/2000/svg"},h("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"}),h("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"}),h("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"}),h("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"}),h("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"}),h("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:h("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},h("circle",{cx:"10",cy:"10",r:"10",fill:"#451475"}),h("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 Cm({howler:e,sounds:t,sound:n,delay:r,pitch:i,volume:o,onEdit:s,onDelete:a,delayedPlay:l}){const{locale:u}=Ce(),{version:c}=Yn(),[d,f]=B(!0),[p,m]=B(!1),[v,g]=B(!1),_=me([]),x=`playsound minecraft:${n} master @s ~ ~ ~ ${o} ${i}`;Q(()=>{var N,L,$;const M=t[n];g(((L=(N=M==null?void 0:M.sounds)==null?void 0:N.length)!=null?L:0)===0),_.current.forEach(K=>K.stop()),_.current=(($=M==null?void 0:M.sounds)!=null?$:[]).map(K=>{const ae=typeof K=="string"?K:K.name,le=D0(c,ae),T=e({src:[le],format:["ogg"],volume:o,rate:i});T.on("end",()=>{m(!1)});const D=()=>{d&&_.current.every(V=>V.state()==="loaded")&&f(!1)};return T.state()==="loaded"?setTimeout(()=>D()):T.on("load",()=>{D()}),T}),f(!0)},[n,t]),Q(()=>{_.current.forEach(M=>M.rate(i))},[i]),Q(()=>{_.current.forEach(M=>M.volume(o))},[o]);const w=()=>{if(d||v)return;b();const M=Math.floor(Math.random()*_.current.length);_.current[M].play(),m(!0)},b=()=>{_.current.forEach(M=>M.stop())};Q(()=>{l&&setTimeout(()=>w(),r*50)},[l]),Q(()=>()=>b(),[]);const[A,S]=B(!1),I=me(void 0),k=()=>{navigator.clipboard.writeText(x),S(!0),I.current!==void 0&&clearTimeout(I.current),I.current=setTimeout(()=>{S(!1)},2e3)};return h("div",{class:`sound-config${d?" loading":p?" playing":""}${v?" invalid":""}`},h(Z,{class:"play",icon:v?"alert":d?"sync":"play",label:u("sounds.play"),onClick:w,tooltip:u(v?"sounds.unknown_sound":d?"sounds.loading_sound":"sounds.play_sound"),tooltipLoc:"se"}),h(cn,{class:"btn btn-input sound",list:"sound-list",spellcheck:!1,value:n,onChange:M=>s({sound:M})}),h("label",{class:"delay-label"},u("sounds.delay"),": "),h(E0,{class:"btn btn-input delay",min:0,value:r,onChange:M=>s({delay:M})}),h("label",{class:"pitch-label"},u("sounds.pitch"),": "),h(Ys,{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:M=>s({pitch:M})}),h("label",{class:"volume-label"},u("sounds.volume"),": "),h(Ys,{class:"volume tooltipped tip-s",min:0,max:1,step:.01,"aria-label":o.toFixed(2),style:`--x: ${o*100}%`,value:o,onChange:M=>s({volume:M})}),h(Z,{class:`copy${A?" active":""}`,icon:A?"check":"terminal",label:u("copy"),tooltip:u(A?"copied":"sounds.copy_command"),onClick:k}),h(Z,{class:"remove",icon:"trashcan",tooltip:u("sounds.remove_sound"),onClick:()=>{a(),b()}}))}function je({title:e,desc:t,link:n,icon:r,children:i}){const o=h(te,null,h("div",{class:"tool-head"},r&&ru[r],h("div",null,h("h3",null,e),h("p",null,t))),i&&h("div",{class:"tool-body"},i));return n?h("a",{class:"tool-card",href:n},o):h("div",{class:"tool-card"},o)}const Na="/";function iu({entries:e,onSelect:t,indent:n}){const r=ke(()=>{var u;const l={};for(const c of e){const d=c.indexOf(Na);if(d>=0){const f=c.slice(0,d);((u=l[f])!=null?u:l[f]=[]).push(c.slice(d+1))}}return Object.entries(l)},e),i=ke(()=>e.filter(l=>!l.includes(Na)),e),[o,s]=B(new Set),a=l=>{o.has(l)?o.delete(l):o.add(l),s(new Set(o))};return h("div",{class:"tree-view",style:`--indent: ${n!=null?n:0};`},r.map(([l,u])=>h("div",null,h(Ta,{icon:o.has(l)?"chevron_right":"chevron_down",key:l,label:l,onClick:()=>a(l)}),!o.has(l)&&h(iu,{entries:u,onSelect:c=>t(`${l}/${c}`),indent:(n!=null?n:0)+1}))),i.map(l=>h(Ta,{icon:"file",key:l,label:l,onClick:()=>t(l)})))}function Ta({icon:e,label:t,onClick:n}){return h("div",{class:"entry",onClick:n},re[e],t)}function ro({category:e}){const{locale:t}=Ce();return dt(t("title.generator_category",t(e))),h("main",null,h("div",{class:"category"},de.generators.filter(n=>n.category===e).map(n=>h(je,{title:t(n.id),link:It(n.url)}))))}function Im({}){const{locale:e}=Ce();dt(e("title.changelog"));const{value:t,error:n}=Mr(Ql,[]);return h("main",null,h(br,{type:"text",id:"changelog"}),n&&h(Mn,{error:n}),h("div",{class:"changelog"},h(tu,{changes:t,defaultOrder:"desc"})))}const io="share";function Mm({}){var ss;const{locale:e}=Ce(),{version:t,changeVersion:n,changeTargetVersion:r}=Yn(),{projects:i,project:o,file:s,updateFile:a,openFile:l,closeFile:u}=hc(),[c,d]=B(null),[f,p]=sl();if(f)return f.message=`Something went wrong rendering the generator: ${f.message}`,h("main",null,h(Mn,{error:f,onDismiss:p}));const m=Jl(Rn());if(!m)return h("main",null,h(Mn,{error:`Cannot find generator "${Rn()}"`}));const v=ke(()=>de.versions.filter(G=>qe(G.id,m.minVersion,m.maxVersion)).map(G=>G.id).reverse(),[m.minVersion,m.maxVersion]);dt(e("title.generator",e(m.partner?`partner.${m.partner}.${m.id}`:m.id)),v),qe(t,m.minVersion)||d(`The minimum version for this generator is ${m.minVersion}`),qe(t,void 0,m.maxVersion)||d(`This generator is not available in versions above ${m.maxVersion}`);const[g,_]=ln("preset"),[x,w]=ln(io),b=me(!1),A=ke(()=>De.getBackup(m.id),[m.id]),S=()=>{A!==void 0&&(k==null||k.reset(O.DataModel.wrapLists(A),!1))},{value:I}=Mr(async()=>{let G;if(g&&x)return w(void 0),go;if(g)G=await Ge(g);else if(x){const Ze=await q0(x);let Xe=!1;if(Ze.version&&Ze.version!==t&&(n(Ze.version,!1),Xe=!0),Ze.type&&Ze.type!==m.id){const Yt=de.generators.find(gu=>gu.id===Ze.type);Yt&&(Zt(`${It(Yt.url)}?${io}=${Ze.id}`),Xe=!0)}if(Xe)return go;Ze.show_preview&&!at&&(Vi(!0),Ae(!1)),ve.openSnippet(m.id,x,t),G=Ze.data}const[we,Nt]=await Promise.all([H0(t,m.id),G0(t)]);return G&&(b.current=!0,we.reset(O.DataModel.wrapLists(G),!1)),ve.setGenerator(m.id),{model:we,blockStates:Nt}},[m.id,t,x,g]),k=I==null?void 0:I.model,M=I==null?void 0:I.blockStates,[N,L]=B(!1);Ri(k,()=>{b.current||(_(void 0,!0),w(void 0,!0)),b.current=!1,De.setBackup(m.id,O.DataModel.unwrapLists(k==null?void 0:k.data)),d(null),L(!0)},[m.id,_,w]);const[$,K]=B(""),[ae,le]=Kn(),[T,D]=Kn(),V=()=>{if($!==(s==null?void 0:s.id)&&$&&k&&M){const G=ni(k,M);a(m.id,s==null?void 0:s.id,{id:$,data:G})?le():(D(),s&&K(s==null?void 0:s.id))}else s&&K(s==null?void 0:s.id)},C=()=>{s&&a(m.id,s.id,{})};Q(()=>{s&&K(s.id)},[s]),Q(()=>{var G;k&&(K((G=s==null?void 0:s.id)!=null?G:""),s&&m.id===s.type&&k.reset(O.DataModel.wrapLists(s.data)),L(!1))},[s,k]);const y=()=>{var G;ve.resetGenerator(m.id,(G=k==null?void 0:k.historyIndex)!=null?G:1,"menu"),k==null||k.reset(O.DataModel.wrapLists(k.schema.default()),!0)},E=G=>{var we;G.stopPropagation(),ve.undoGenerator(m.id,(we=k==null?void 0:k.historyIndex)!=null?we:1,"menu"),k==null||k.undo()},R=G=>{var we;G.stopPropagation(),ve.redoGenerator(m.id,(we=k==null?void 0:k.historyIndex)!=null?we:1,"menu"),k==null||k.redo()},j=G=>{var we,Nt;G.ctrlKey&&G.key==="z"?(ve.undoGenerator(m.id,(we=k==null?void 0:k.historyIndex)!=null?we:1,"hotkey"),k==null||k.undo()):G.ctrlKey&&G.key==="y"&&(ve.redoGenerator(m.id,(Nt=k==null?void 0:k.historyIndex)!=null?Nt:1,"hotkey"),k==null||k.redo())},Y=G=>{if(G.ctrlKey&&G.key==="s"&&(G.preventDefault(),k&&M&&s)){ve.saveProjectFile(m.id,o.files.length,i.length,"hotkey");const we=ni(k,M);a(m.id,s==null?void 0:s.id,{id:s==null?void 0:s.id,data:we}),L(!1),le()}};Q(()=>(document.addEventListener("keyup",j),document.addEventListener("keydown",Y),()=>{document.removeEventListener("keyup",j),document.removeEventListener("keydown",Y)}),[k,M,s]);const[he,Ue]=B([]);Q(()=>{U0(t).then(G=>{Ue(G.get(m.id).map(we=>we.startsWith("minecraft:")?we.slice(10):we))}).catch(G=>{console.error(G),d(G)})},[t,m.id]);const ft=G=>{ve.loadPreset(m.id,G),w(void 0,!0),r(t,!0),_(G)},Ge=async G=>{var we,Nt,Ze;try{const Xe=await tc(t,(we=m.path)!=null?we:m.id,G),Yt=k==null?void 0:k.get(new O.Path(["generator","seed"]));return((Nt=Xe==null?void 0:Xe.generator)==null?void 0:Nt.seed)!==void 0&&Yt!==void 0&&(Xe.generator.seed=Yt,((Ze=Xe.generator.biome_source)==null?void 0:Ze.seed)!==void 0&&(Xe.generator.biome_source.seed=Yt)),Xe}catch{d(`Cannot load preset ${G} in ${t}`),_(void 0,!0)}},Ye=G=>{w(void 0,!0),n(G)},[Re,yt]=B(void 0),[pt,st]=B(!1),[Te,Kt]=Kn({cooldown:3e3}),Ot=()=>{if(pt){st(!1);return}if(g)yt(`${location.origin}/${m.url}/?version=${t}&preset=${g}`),st(!0),J();else if(k&&M){const G=ni(k,M);an(G,k.schema.default())?(yt(`${location.origin}/${m.url}/?version=${t}`),st(!0)):W0(m.id,t,G,at).then(({id:we,length:Nt,compressed:Ze,rate:Xe})=>{ve.createSnippet(m.id,we,t,Nt,Ze,Xe);const Yt=`${location.origin}/${m.url}/?${io}=${we}`;yt(Yt),st(!0)}).catch(we=>{we instanceof Error&&d(we)})}},J=()=>{navigator.clipboard.writeText(Re!=null?Re:""),Kt()};Q(()=>{Te||(yt(void 0),st(!1))},[Te]);const[Fe,Ae]=B(window.innerWidth>820),[fe,bt]=B(0),[nt,_n]=B(0),[vn,F]=B(0),H=()=>{ve.copyOutput(m.id,"menu"),bt(fe+1)},oe=()=>{ve.downloadOutput(m.id,"menu"),_n(nt+1)},pe=()=>{ve.generatorEvent("import"),Ae(!0),F(vn+1)},Pe=()=>{Fe?ve.hideOutput(m.id,"menu"):ve.showOutput(m.id,"menu"),Ae(!Fe),bt(0),_n(0),F(0)},[rt,ji]=Kn(),[at,Vi]=B(!1),Hi=i1.includes(m.id)&&!(m.id==="worldgen/configured_feature"&&qe(t,"1.18"));at&&!Hi&&Vi(!1);let Ui=2;Hi&&(Ui+=1),Fe&&(Ui+=2);const mu=()=>{Fe?ve.hidePreview(m.id,"menu"):ve.showPreview(m.id,"menu"),Vi(!at),!at&&Fe&&Ae(!1)};return h(te,null,h("main",{class:at?"has-preview":""},!m.partner&&h(br,{id:"data-pack-generator",type:"text"}),h("div",{class:"controls"},h("div",{class:`project-controls ${s&&"has-file"}`},h("div",{class:"btn-row"},h(et,{icon:"repo",label:o.name,relative:!1},h(Z,{icon:"arrow_left",label:e("project.go_to"),onClick:()=>Zt("/project")}),s&&h(Z,{icon:"file",label:e("project.new_file"),onClick:u}),A!==void 0&&h(Z,{icon:"history",label:e("restore_backup"),onClick:S}),h(Ws,{searchPlaceholder:e(o.name==="Drafts"?"project.search_drafts":"project.search"),noResults:e("project.no_files"),values:o.files.filter(G=>G.type===m.id).map(G=>G.id),onSelect:G=>l(m.id,G)})),h(cn,{class:"btn btn-input",placeholder:e("project.unsaved_file"),value:$,onChange:K,onEnter:V,onBlur:V}),s&&h(Z,{icon:"trashcan",tooltip:e("project.delete_file"),onClick:C})),N?h("div",{class:"status-icon"},re.dot_fill):ae?h("div",{class:"status-icon active"},re.check):T&&h("div",{class:"status-icon danger"},re.x)),h("div",{class:"generator-controls"},h(Z,{icon:"upload",label:e("import"),onClick:pe}),h(et,{icon:"archive",label:e("presets"),relative:!1},h(Ws,{searchPlaceholder:e("search"),noResults:e("no_presets"),values:he,onSelect:ft})),h(et,{icon:"tag",label:t,tooltip:e("switch_version"),"data-cy":"version-switcher"},v.map(G=>h(Z,{label:G,active:G===t,onClick:()=>Ye(G)}))),h(et,{icon:"kebab_horizontal",tooltip:e("more")},h(Z,{icon:"history",label:e("reset"),onClick:y}),h(Z,{icon:"arrow_left",label:e("undo"),onClick:E}),h(Z,{icon:"arrow_right",label:e("redo"),onClick:R})))),c&&h(Mn,{error:c,onDismiss:()=>d(null)}),h(Y1,{model:k,version:t,blockStates:M,onError:d})),h("div",{class:"popup-actions",style:`--offset: -${8+Ui*50}px;`},h("div",{class:`popup-action action-preview${Hi?" shown":""} tooltipped tip-nw`,"aria-label":e(at?"hide_preview":"show_preview"),onClick:mu},at?re.x_circle:re.play),h("div",{class:"popup-action action-share shown tooltipped tip-nw","aria-label":e("share"),onClick:Ot},re.link),h("div",{class:`popup-action action-download${Fe?" shown":""} tooltipped tip-nw`,"aria-label":e("download"),onClick:oe},re.download),h("div",{class:`popup-action action-copy${Fe?" shown":""}${rt?" active":""} tooltipped tip-nw`,"aria-label":e(rt?"copied":"copy"),onClick:H},rt?re.check:re.clippy),h("div",{class:"popup-action action-code shown tooltipped tip-nw","aria-label":e(Fe?"hide_output":"show_output"),onClick:Pe},Fe?re.chevron_right:re.code)),h("div",{class:`popup-preview${at?" shown":""}`},h(o1,{model:k,version:t,id:m.id,shown:at,onError:d})),h("div",{class:`popup-source${Fe?" shown":""}`},h(a1,{model:k,blockStates:M,doCopy:fe,doDownload:nt,doImport:vn,name:(ss=m.schema)!=null?ss:"data",copySuccess:ji,onError:d})),h("div",{class:`popup-share${pt?" shown":""}`},h(cn,{value:Re,readonly:!0}),h(Z,{icon:Te?"check":"clippy",onClick:J,tooltip:e(Te?"copied":"copy_share"),tooltipLoc:"nw",active:Te,showTooltip:Te})))}var Qo={exports:{}};function es(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)&&es(n)}),e}Qo.exports=es;Qo.exports.default=es;var Om=Qo.exports;class La{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function ou(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Wt(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 Nm="</span>",Ra=e=>!!e.kind,Tm=(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 Lm{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=ou(t)}openNode(t){if(!Ra(t))return;let n=t.kind;t.sublanguage?n=`language-${n}`:n=Tm(n,{prefix:this.classPrefix}),this.span(n)}closeNode(t){!Ra(t)||(this.buffer+=Nm)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}class ts{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=>{ts._collapse(n)})))}}class Rm extends ts{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 Lm(this,this.options).value()}finalize(){return!0}}function vr(e){return e?typeof e=="string"?e:e.source:null}function su(e){return gn("(?=",e,")")}function Pm(e){return gn("(?:",e,")*")}function $m(e){return gn("(?:",e,")?")}function gn(...e){return e.map(n=>vr(n)).join("")}function Dm(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function ns(...e){const t=Dm(e);return"("+(t.capture?"":"?:")+e.map(r=>vr(r)).join("|")+")"}function au(e){return new RegExp(e.toString()+"|").exec("").length-1}function Bm(e,t){const n=e&&e.exec(t);return n&&n.index===0}const Fm=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function rs(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let o=vr(r),s="";for(;o.length>0;){const a=Fm.exec(o);if(!a){s+=o;break}s+=o.substring(0,a.index),o=o.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?s+="\\"+String(Number(a[1])+i):(s+=a[0],a[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}const zm=/\b\B/,lu="[a-zA-Z]\\w*",is="[a-zA-Z_]\\w*",cu="\\b\\d+(\\.\\d+)?",uu="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",du="\\b(0b[01]+)",jm="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Vm=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=gn(t,/.*\b/,e.binary,/\b.*/)),Wt({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},wr={begin:"\\\\[\\s\\S]",relevance:0},Hm={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[wr]},Um={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[wr]},Gm={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/},zi=function(e,t,n={}){const r=Wt({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=ns("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:gn(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Ym=zi("//","$"),Wm=zi("/\\*","\\*/"),qm=zi("#","$"),Zm={scope:"number",begin:cu,relevance:0},Xm={scope:"number",begin:uu,relevance:0},Jm={scope:"number",begin:du,relevance:0},Km={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[wr,{begin:/\[/,end:/\]/,relevance:0,contains:[wr]}]}]},Qm={scope:"title",begin:lu,relevance:0},eg={scope:"title",begin:is,relevance:0},tg={begin:"\\.\\s*"+is,relevance:0},ng=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 Gr=Object.freeze({__proto__:null,MATCH_NOTHING_RE:zm,IDENT_RE:lu,UNDERSCORE_IDENT_RE:is,NUMBER_RE:cu,C_NUMBER_RE:uu,BINARY_NUMBER_RE:du,RE_STARTERS_RE:jm,SHEBANG:Vm,BACKSLASH_ESCAPE:wr,APOS_STRING_MODE:Hm,QUOTE_STRING_MODE:Um,PHRASAL_WORDS_MODE:Gm,COMMENT:zi,C_LINE_COMMENT_MODE:Ym,C_BLOCK_COMMENT_MODE:Wm,HASH_COMMENT_MODE:qm,NUMBER_MODE:Zm,C_NUMBER_MODE:Xm,BINARY_NUMBER_MODE:Jm,REGEXP_MODE:Km,TITLE_MODE:Qm,UNDERSCORE_TITLE_MODE:eg,METHOD_GUARD:tg,END_SAME_AS_BEGIN:ng});function rg(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function ig(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function og(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=rg,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function sg(e,t){!Array.isArray(e.illegal)||(e.illegal=ns(...e.illegal))}function ag(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 lg(e,t){e.relevance===void 0&&(e.relevance=1)}const cg=(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=gn(n.beforeMatch,su(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},ug=["of","and","for","in","not","or","if","then","parent","list","value"],dg="keyword";function hu(e,t,n=dg){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(o){Object.assign(r,hu(e[o],t,o))}),r;function i(o,s){t&&(s=s.map(a=>a.toLowerCase())),s.forEach(function(a){const l=a.split("|");r[l[0]]=[o,hg(l[0],l[1])]})}}function hg(e,t){return t?Number(t):fg(e)?0:1}function fg(e){return ug.includes(e.toLowerCase())}const Pa={},on=e=>{console.error(e)},$a=(e,...t)=>{console.log(`WARN: ${e}`,...t)},xn=(e,t)=>{Pa[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Pa[`${e}/${t}`]=!0)},ki=new Error;function fu(e,t,{key:n}){let r=0;const i=e[n],o={},s={};for(let a=1;a<=t.length;a++)s[a+r]=i[a],o[a+r]=!0,r+=au(t[a-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function pg(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw on("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ki;if(typeof e.beginScope!="object"||e.beginScope===null)throw on("beginScope must be object"),ki;fu(e,e.begin,{key:"beginScope"}),e.begin=rs(e.begin,{joinWith:""})}}function mg(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw on("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ki;if(typeof e.endScope!="object"||e.endScope===null)throw on("endScope must be object"),ki;fu(e,e.end,{key:"endScope"}),e.end=rs(e.end,{joinWith:""})}}function gg(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function _g(e){gg(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),pg(e),mg(e)}function vg(e){function t(s,a){return new RegExp(vr(s),"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+=au(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=t(rs(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((d,f)=>f>0&&d!==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(s){const a=new r;return s.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),s.terminatorEnd&&a.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&a.addRule(s.illegal,{type:"illegal"}),a}function o(s,a){const l=s;if(s.isCompiled)return l;[ig,ag,_g,cg].forEach(c=>c(s,a)),e.compilerExtensions.forEach(c=>c(s,a)),s.__beforeBegin=null,[og,sg,lg].forEach(c=>c(s,a)),s.isCompiled=!0;let u=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),u=s.keywords.$pattern,delete s.keywords.$pattern),u=u||/\w+/,s.keywords&&(s.keywords=hu(s.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),a&&(s.begin||(s.begin=/\B|\b/),l.beginRe=t(l.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(l.endRe=t(l.end)),l.terminatorEnd=vr(l.end)||"",s.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(s.end?"|":"")+a.terminatorEnd)),s.illegal&&(l.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(c){return wg(c==="self"?s:c)})),s.contains.forEach(function(c){o(c,l)}),s.starts&&o(s.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=Wt(e.classNameAliases||{}),o(e)}function pu(e){return e?e.endsWithParent||pu(e.starts):!1}function wg(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Wt(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:pu(e)?Wt(e,{starts:e.starts?Wt(e.starts):null}):Object.isFrozen(e)?Wt(e):e}var yg="11.5.1";class bg extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const oo=ou,Da=Wt,Ba=Symbol("nomatch"),xg=7,Ag=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={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:Rm};function l(T){return a.noHighlightRe.test(T)}function u(T){let D=T.className+" ";D+=T.parentNode?T.parentNode.className:"";const V=a.languageDetectRe.exec(D);if(V){const C=M(V[1]);return C||($a(o.replace("{}",V[1])),$a("Falling back to no-highlight mode for this block.",T)),C?V[1]:"no-highlight"}return D.split(/\s+/).find(C=>l(C)||M(C))}function c(T,D,V){let C="",y="";typeof D=="object"?(C=T,V=D.ignoreIllegals,y=D.language):(xn("10.7.0","highlight(lang, code, ...args) has been deprecated."),xn("10.7.0",`Please use highlight(code, options) instead.
|
|
https://github.com/highlightjs/highlight.js/issues/2277`),y=T,C=D),V===void 0&&(V=!0);const E={code:C,language:y};ae("before:highlight",E);const R=E.result?E.result:d(E.language,E.code,V);return R.code=E.code,ae("after:highlight",R),R}function d(T,D,V,C){const y=Object.create(null);function E(F,H){return F.keywords[H]}function R(){if(!J.keywords){Ae.addText(fe);return}let F=0;J.keywordPatternRe.lastIndex=0;let H=J.keywordPatternRe.exec(fe),oe="";for(;H;){oe+=fe.substring(F,H.index);const pe=Te.case_insensitive?H[0].toLowerCase():H[0],Pe=E(J,pe);if(Pe){const[rt,ji]=Pe;if(Ae.addText(oe),oe="",y[pe]=(y[pe]||0)+1,y[pe]<=xg&&(bt+=ji),rt.startsWith("_"))oe+=H[0];else{const at=Te.classNameAliases[rt]||rt;Ae.addKeyword(H[0],at)}}else oe+=H[0];F=J.keywordPatternRe.lastIndex,H=J.keywordPatternRe.exec(fe)}oe+=fe.substr(F),Ae.addText(oe)}function j(){if(fe==="")return;let F=null;if(typeof J.subLanguage=="string"){if(!t[J.subLanguage]){Ae.addText(fe);return}F=d(J.subLanguage,fe,!0,Fe[J.subLanguage]),Fe[J.subLanguage]=F._top}else F=p(fe,J.subLanguage.length?J.subLanguage:null);J.relevance>0&&(bt+=F.relevance),Ae.addSublanguage(F._emitter,F.language)}function Y(){J.subLanguage!=null?j():R(),fe=""}function he(F,H){let oe=1;const pe=H.length-1;for(;oe<=pe;){if(!F._emit[oe]){oe++;continue}const Pe=Te.classNameAliases[F[oe]]||F[oe],rt=H[oe];Pe?Ae.addKeyword(rt,Pe):(fe=rt,R(),fe=""),oe++}}function Ue(F,H){return F.scope&&typeof F.scope=="string"&&Ae.openNode(Te.classNameAliases[F.scope]||F.scope),F.beginScope&&(F.beginScope._wrap?(Ae.addKeyword(fe,Te.classNameAliases[F.beginScope._wrap]||F.beginScope._wrap),fe=""):F.beginScope._multi&&(he(F.beginScope,H),fe="")),J=Object.create(F,{parent:{value:J}}),J}function ft(F,H,oe){let pe=Bm(F.endRe,oe);if(pe){if(F["on:end"]){const Pe=new La(F);F["on:end"](H,Pe),Pe.isMatchIgnored&&(pe=!1)}if(pe){for(;F.endsParent&&F.parent;)F=F.parent;return F}}if(F.endsWithParent)return ft(F.parent,H,oe)}function Ge(F){return J.matcher.regexIndex===0?(fe+=F[0],1):(vn=!0,0)}function Ye(F){const H=F[0],oe=F.rule,pe=new La(oe),Pe=[oe.__beforeBegin,oe["on:begin"]];for(const rt of Pe)if(!!rt&&(rt(F,pe),pe.isMatchIgnored))return Ge(H);return oe.skip?fe+=H:(oe.excludeBegin&&(fe+=H),Y(),!oe.returnBegin&&!oe.excludeBegin&&(fe=H)),Ue(oe,F),oe.returnBegin?0:H.length}function Re(F){const H=F[0],oe=D.substr(F.index),pe=ft(J,F,oe);if(!pe)return Ba;const Pe=J;J.endScope&&J.endScope._wrap?(Y(),Ae.addKeyword(H,J.endScope._wrap)):J.endScope&&J.endScope._multi?(Y(),he(J.endScope,F)):Pe.skip?fe+=H:(Pe.returnEnd||Pe.excludeEnd||(fe+=H),Y(),Pe.excludeEnd&&(fe=H));do J.scope&&Ae.closeNode(),!J.skip&&!J.subLanguage&&(bt+=J.relevance),J=J.parent;while(J!==pe.parent);return pe.starts&&Ue(pe.starts,F),Pe.returnEnd?0:H.length}function yt(){const F=[];for(let H=J;H!==Te;H=H.parent)H.scope&&F.unshift(H.scope);F.forEach(H=>Ae.openNode(H))}let pt={};function st(F,H){const oe=H&&H[0];if(fe+=F,oe==null)return Y(),0;if(pt.type==="begin"&&H.type==="end"&&pt.index===H.index&&oe===""){if(fe+=D.slice(H.index,H.index+1),!i){const pe=new Error(`0 width match regex (${T})`);throw pe.languageName=T,pe.badRule=pt.rule,pe}return 1}if(pt=H,H.type==="begin")return Ye(H);if(H.type==="illegal"&&!V){const pe=new Error('Illegal lexeme "'+oe+'" for mode "'+(J.scope||"<unnamed>")+'"');throw pe.mode=J,pe}else if(H.type==="end"){const pe=Re(H);if(pe!==Ba)return pe}if(H.type==="illegal"&&oe==="")return 1;if(_n>1e5&&_n>H.index*3)throw new Error("potential infinite loop, way more iterations than matches");return fe+=oe,oe.length}const Te=M(T);if(!Te)throw on(o.replace("{}",T)),new Error('Unknown language: "'+T+'"');const Kt=vg(Te);let Ot="",J=C||Kt;const Fe={},Ae=new a.__emitter(a);yt();let fe="",bt=0,nt=0,_n=0,vn=!1;try{for(J.matcher.considerAll();;){_n++,vn?vn=!1:J.matcher.considerAll(),J.matcher.lastIndex=nt;const F=J.matcher.exec(D);if(!F)break;const H=D.substring(nt,F.index),oe=st(H,F);nt=F.index+oe}return st(D.substr(nt)),Ae.closeAllNodes(),Ae.finalize(),Ot=Ae.toHTML(),{language:T,value:Ot,relevance:bt,illegal:!1,_emitter:Ae,_top:J}}catch(F){if(F.message&&F.message.includes("Illegal"))return{language:T,value:oo(D),illegal:!0,relevance:0,_illegalBy:{message:F.message,index:nt,context:D.slice(nt-100,nt+100),mode:F.mode,resultSoFar:Ot},_emitter:Ae};if(i)return{language:T,value:oo(D),illegal:!1,relevance:0,errorRaised:F,_emitter:Ae,_top:J};throw F}}function f(T){const D={value:oo(T),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return D._emitter.addText(T),D}function p(T,D){D=D||a.languages||Object.keys(t);const V=f(T),C=D.filter(M).filter(L).map(Y=>d(Y,T,!1));C.unshift(V);const y=C.sort((Y,he)=>{if(Y.relevance!==he.relevance)return he.relevance-Y.relevance;if(Y.language&&he.language){if(M(Y.language).supersetOf===he.language)return 1;if(M(he.language).supersetOf===Y.language)return-1}return 0}),[E,R]=y,j=E;return j.secondBest=R,j}function m(T,D,V){const C=D&&n[D]||V;T.classList.add("hljs"),T.classList.add(`language-${C}`)}function v(T){let D=null;const V=u(T);if(l(V))return;if(ae("before:highlightElement",{el:T,language:V}),T.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(T)),a.throwUnescapedHTML))throw new bg("One of your code blocks includes unescaped HTML.",T.innerHTML);D=T;const C=D.textContent,y=V?c(C,{language:V,ignoreIllegals:!0}):p(C);T.innerHTML=y.value,m(T,V,y.language),T.result={language:y.language,re:y.relevance,relevance:y.relevance},y.secondBest&&(T.secondBest={language:y.secondBest.language,relevance:y.secondBest.relevance}),ae("after:highlightElement",{el:T,result:y,text:C})}function g(T){a=Da(a,T)}const _=()=>{b(),xn("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function x(){b(),xn("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let w=!1;function b(){if(document.readyState==="loading"){w=!0;return}document.querySelectorAll(a.cssSelector).forEach(v)}function A(){w&&b()}typeof window!="undefined"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function S(T,D){let V=null;try{V=D(e)}catch(C){if(on("Language definition for '{}' could not be registered.".replace("{}",T)),i)on(C);else throw C;V=s}V.name||(V.name=T),t[T]=V,V.rawDefinition=D.bind(null,e),V.aliases&&N(V.aliases,{languageName:T})}function I(T){delete t[T];for(const D of Object.keys(n))n[D]===T&&delete n[D]}function k(){return Object.keys(t)}function M(T){return T=(T||"").toLowerCase(),t[T]||t[n[T]]}function N(T,{languageName:D}){typeof T=="string"&&(T=[T]),T.forEach(V=>{n[V.toLowerCase()]=D})}function L(T){const D=M(T);return D&&!D.disableAutodetect}function $(T){T["before:highlightBlock"]&&!T["before:highlightElement"]&&(T["before:highlightElement"]=D=>{T["before:highlightBlock"](Object.assign({block:D.el},D))}),T["after:highlightBlock"]&&!T["after:highlightElement"]&&(T["after:highlightElement"]=D=>{T["after:highlightBlock"](Object.assign({block:D.el},D))})}function K(T){$(T),r.push(T)}function ae(T,D){const V=T;r.forEach(function(C){C[V]&&C[V](D)})}function le(T){return xn("10.7.0","highlightBlock will be removed entirely in v12.0"),xn("10.7.0","Please use highlightElement now."),v(T)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:b,highlightElement:v,highlightBlock:le,configure:g,initHighlighting:_,initHighlightingOnLoad:x,registerLanguage:S,unregisterLanguage:I,listLanguages:k,getLanguage:M,registerAliases:N,autoDetection:L,inherit:Da,addPlugin:K}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=yg,e.regex={concat:gn,lookahead:su,either:ns,optional:$m,anyNumberOfTimes:Pm};for(const T in Gr)typeof Gr[T]=="object"&&Om(Gr[T]);return Object.assign(e,Gr),e};var yr=Ag({}),kg=yr;yr.HighlightJS=yr;yr.default=yr;var os=kg;function Sg(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 Eg='<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>';os.registerLanguage("json",Sg);ne.use({highlight:(e,t)=>{if(t!=="")return os.highlight(e,{language:t}).value}});function Cg({id:e}){const{locale:t}=Ce(),{version:n,changeVersion:r}=Yn(),{changeTitle:i}=dt(),{value:o,refresh:s}=Mr(async()=>await(await fetch(`../../guides/${e}.md`)).text(),[e]),a=ke(()=>{if(!o)return;const b=f0(o);return i(b==null?void 0:b.title,b==null?void 0:b.versions),b},[o]),l=ke(()=>{var A;const b=de.versions.map(S=>S.id);return(A=a==null?void 0:a.versions)==null?void 0:A.sort((S,I)=>b.indexOf(I)-b.indexOf(S))},[a==null?void 0:a.versions]),u=ke(()=>!l||l.includes(n)?n:l[0],[n,a==null?void 0:a.versions]),c=ke(()=>{if(!o)return;const b=[];let A=!1;ne.use({extensions:[{name:"styledCode",level:"inline",start(k){var M,N;return(N=(M=k.match(/\b[fsnj]`/))==null?void 0:M.index)!=null?N:-1},tokenizer(k){const M=k.match(/^([fsnj])`([^`]+)`/);if(M)return{type:"styledCode",raw:M[0],prefix:M[1],text:M[2]}},renderer(k){let M=k.text,N={f:"hljs-attr",s:"hljs-string",n:"hljs-number"}[k.prefix];return k.prefix==="j"&&(M=os.highlight("json",k.text).value,N="language-json"),`<code${N?` class="${N}"`:""}>${M}</code>`}}],walkTokens(k){k.type==="heading"&&b.push(k)},renderer:{link(k,M,N){if(k===null)return N;const L=M?` title="${M}"`:"",$=k!=null&&k.match(/^https?:\/\//)?' target="_blank"':"";return`<a href="${k}"${L}${$}>${N}</a>`},heading(k,M,N,L){let $="";A||($=`<ol class="guide-toc">${b.filter(le=>le.depth===2).map(le=>{var V,C;const T=L.slug((C=(V=le.raw.match(/^#+ (.*)/))==null?void 0:V[1])!=null?C:"",{dryrun:!0}),D=le.text.replaceAll("`","");return`<li><a href="#${T}">${D}</a></li>`}).join("")}</ol>`,A=!0);const K=L.slug(N),ae=`<span id="guide-${K}" href="?version=${n}#${K}">${Eg}</span>`;return`${$}<h${M}>${ae}${k}</h${M}>`}}});const S=o.substring(o.indexOf("---",3)+3),I=p0(S,u);return ne(I,{version:"1.19"})},[u,o]),[d,f]=b0(),p=Ee(()=>{if(!c)return;const b=document.querySelector(`[id=guide-${d.slice(1)}]`);if(b){const A=b.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:A-68,behavior:"smooth"})}},[c,d]);Q(()=>{p()},[c===void 0,d]);const m=Ee(b=>{if(!(b.target instanceof HTMLSpanElement))return;const A="#"+b.target.id.replace(/^guide-/,"");r(n,!1,!0),f(A),A===d&&p()},[p,d,n]),[v,g]=Kn(),_=Ee(()=>{const b=`${location.origin}/guides/${e}/?version=${n}`;navigator.clipboard.writeText(b),g()},[e,n]),x=Ee(b=>{Zt(`/guides/?tags=${b}`)},[]),[w]=B(window.innerWidth>600);return h("main",null,h("div",{class:"guide"},h("div",{class:"navigation"},h("a",{class:"btn btn-link",href:"/guides/"},re.arrow_left,t("guides.all")),h(Z,{icon:v?"check":"link",label:t("share"),onClick:_,active:v,tooltip:t(v?"copied":"copy_share"),class:"guide-share"}),l&&h(et,{icon:"tag",label:u,tooltip:t("switch_version")},l.map(b=>h(Z,{label:b,active:b===u,onClick:()=>r(b)})))),(a==null?void 0:a.tags)&&a.tags.length>0&&h("div",{class:"guide-tags"},a.tags.map(b=>h(Pr,{label:b,active:!0,onClick:()=>x(b)}))),c&&h(te,null,h(br,{id:"guide",type:w?"image":"text"}),h("div",{class:"guide-content",dangerouslySetInnerHTML:{__html:c},onClick:m}),h(Xo,null))))}function Ig({}){const{locale:e}=Ce(),{version:t,changeVersion:n}=Yn();dt(e("title.guides"));const[r,i]=B(""),[o,s]=eu(),[a,l]=B(!1),u=ke(()=>a===!1?[{id:"adding-custom-structures",title:"Adding custom structures",versions:["1.18.2","1.19"],tags:["worldgen","structures"]},{id:"density-functions",title:"Density function types and their configuration",versions:["1.18.2","1.19"],tags:["worldgen","noise","density"]},{id:"feature-order-cycle",title:"How to fix feature order cycles",versions:["1.18","1.18.2","1.19"],tags:["worldgen","biomes","features"]},{id:"noise-router",title:"How terrain is generated using the noise router",versions:["1.18.2","1.19"],tags:["worldgen","noise","density"]}]:[{id:"adding-custom-structures",title:"Adding custom structures",versions:["1.18.2","1.19"],tags:["worldgen","structures"]},{id:"density-functions",title:"Density function types and their configuration",versions:["1.18.2","1.19"],tags:["worldgen","noise","density"]},{id:"feature-order-cycle",title:"How to fix feature order cycles",versions:["1.18","1.18.2","1.19"],tags:["worldgen","biomes","features"]},{id:"noise-router",title:"How terrain is generated using the noise router",versions:["1.18.2","1.19"],tags:["worldgen","noise","density"]}].filter(d=>{var f;return(f=d.versions)==null?void 0:f.includes(t)}),[t,a]),c=ke(()=>{const d=r.split(" ").map(f=>f.trim().toLowerCase()).filter(f=>f.length>0);return u.filter(f=>{var m;if(!o.every(v=>{var g;return(g=f.tags)==null?void 0:g.includes(v)}))return!1;const p=((m=f.tags)==null?void 0:m.join(" "))+" "+f.title.toLowerCase();return d.every(v=>v.startsWith("!")?v.length===1||!p.includes(v.slice(1)):p.includes(v))})},[u,r,o]);return h("main",null,h("div",{class:"guides"},h("div",{class:"changelog-query"},h(cn,{class:"btn btn-input changelog-search",placeholder:e("guides.search"),value:r,onChange:i}),h(et,{icon:"tag",label:a?t:e("any_version"),tooltip:e("switch_version")},h(Z,{label:e("any_version"),active:!a,onClick:()=>l(!a)}),de.versions.slice().reverse().map(d=>h(Z,{label:d.id,active:a&&d.id===t,onClick:()=>{n(d.id),l(!0)}})))),o.length>0&&h("div",{class:"changelog-tags"},o.map(d=>h(Pr,{label:d,onClick:()=>s(d)}))),u.length===0?h(te,null,h("span",{class:"note"},e("guides.no_results.version"))):c.length===0?h(te,null,h("span",{class:"note"},e("guides.no_results.query"))):c.map(d=>{var f,p;return h(Sm,{title:d.title,link:`/guides/${d.id}/`,tags:(f=d.tags)!=null?f:[],versions:(p=d.versions)!=null?p:[],activeTags:o,toggleTag:s})})))}function Mg({}){const{locale:e}=Ce();return dt(e("title.home")),h("main",null,h("div",{class:"home"},h(je,{title:"Data packs"},de.generators.filter(t=>!t.category).map(t=>h(je,{title:e(t.id),link:It(t.url)})),h(je,{title:e("tags"),link:"/tags/"}),h(je,{title:e("worldgen"),link:"/worldgen/"})),h(je,{title:"Resource packs"},de.generators.filter(t=>t.category==="assets").map(t=>h(je,{title:e(t.id),link:It(t.url)}))),h(je,{title:"Partners",link:"/partners/"}),h(je,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/",desc:"Analyse your performance reports"}),h(je,{title:"Minecraft Sounds",icon:"sounds",link:"/sounds/",desc:"Browse through and mix all the vanilla sounds"}),h(je,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/",desc:"Convert your data packs from 1.16 to 1.17 to 1.18"}),h(je,{title:"Technical Changelog",link:"/changelog/"}),h(je,{title:"Minecraft Versions",link:"/versions/"}),h(je,{title:"Data Pack Guides",link:"/guides/"}),h(Xo,null)))}const Og=[...new Set(de.generators.filter(e=>e.partner!==void 0).map(e=>e.partner))];function Ng({}){const{locale:e}=Ce();return dt(e("title.partners")),h("main",null,h("div",{class:"category"},Og.map(t=>h(je,{title:e(`partner.${t}`)},de.generators.filter(n=>n.partner===t).map(n=>h(je,{title:e(`partner.${t}.${n.id}`),link:It(n.url)}))))))}function Tg({}){const{locale:e}=Ce(),{project:t,openFile:n}=hc();dt(e("title.project",t.name));const r=ke(()=>t.files.flatMap(o=>{const s=tp(o);return s?[s]:[]}),t.files),i=Ee(o=>{const[,s,a,...l]=o.split("/");n(a,`${s}:${l}`)},[n]);return h("main",null,h(br,{id:"data-pack-project",type:"text"}),h("div",{class:"project"},h("h2",null,t.name),h("div",{class:"file-view"},h(iu,{entries:r,onSelect:i}))))}function Lg({}){const{locale:e}=Ce(),{version:t,changeVersion:n}=Yn();dt(e("title.sounds"));const[r,i]=B(void 0);Q(()=>{(async()=>{const b=await se(()=>import("./howler.f9c46e56.js").then(function(A){return A.h}),[]);i(()=>A=>new b.Howl(A))})()},[]);const{value:o,error:s}=Mr(async()=>await $0(t),[t]),a=ke(()=>Object.keys(o!=null?o:{}),[o]),[l,u]=B(""),[c,d]=B([]),f=()=>{d([{id:rn(),sound:l,delay:0,pitch:1,volume:1},...c])},p=b=>A=>{d(c.map(S=>S.id===b?q(q({},S),A):S))},m=b=>()=>{d(c.filter(A=>A.id!==b))},[v,g]=B(0),_=()=>{g(v+1)},x=me(null),w=()=>{if(!x.current)return;const b=c.some(S=>S.delay>0),A=c.sort((S,I)=>S.delay-I.delay).map(S=>`${b?`execute if score @s delay matches ${S.delay} run `:""}playsound minecraft:${S.sound} master @s ~ ~ ~ ${S.volume} ${S.pitch}`).join(`
|
|
`);x.current.setAttribute("href","data:text/plain;charset=utf-8,"+A+"%0A"),x.current.setAttribute("download","sounds.mcfunction"),x.current.click()};return h("main",null,s&&h(Mn,{error:s}),a.length>0&&h(te,null,h("div",{class:"controls sounds-controls"},h("div",{class:"sound-search-group"},h(cn,{class:"btn btn-input sound-search",list:"sound-list",placeholder:e("sounds.search"),value:l,onChange:u,onEnter:f}),h(Z,{icon:"plus",tooltip:e("sounds.add_sound"),class:"add-sound",onClick:f})),c.length>1&&h(Z,{icon:"play",label:e("sounds.play_all"),class:"play-all-sounds",onClick:_}),h("div",{class:"spacer"}),h(Z,{icon:"download",label:e("download"),tooltip:e("sounds.download_function"),tooltipLoc:"se",class:"download-sounds",onClick:w}),h(et,{icon:"tag",label:t,tooltip:e("switch_version")},de.versions.slice().reverse().map(b=>h(Z,{label:b.id,active:b.id===t,onClick:()=>n(b.id)})))),h("div",{class:"sounds"},o&&r&&c.map(b=>h(Cm,_e(q({key:b.id},b),{howler:r,sounds:o,delayedPlay:v,onEdit:p(b.id),onDelete:m(b.id)})))),h("a",{ref:x,style:"display: none;"}),h("datalist",{id:"sound-list"},a.map(b=>h("option",{key:b,value:b})))))}function Rg({}){const{locale:e}=Ce();dt(e("title.versions"));const{value:t,error:n}=Mr(B0,[]),[r]=ln("id"),i=(t!=null?t:[]).find(a=>a.id===r);dt(i?`Minecraft ${i.name}`:"Versions Explorer",i?[]:void 0,i?"Changes and metadata":void 0);const o=i&&Fa(t!=null?t:[],i,-1),s=i&&Fa(t!=null?t:[],i,1);return h("main",null,h(br,{type:"text",id:"versions"}),n&&h(Mn,{error:n}),h("div",{class:"versions"},r?h(te,null,h("div",{class:"navigation"},h("a",{class:"btn btn-link",href:"/versions/"},re.three_bars,e("versions.all")),h("a",q({class:"btn btn-link"},s?{href:`/versions/?id=${s.id}`}:{disabled:!0}),re.arrow_left,e("versions.previous")),h("a",q({class:"btn btn-link"},o?{href:`/versions/?id=${o.id}`}:{disabled:!0}),e("versions.next"),re.arrow_right)),h(bm,{id:r,version:i})):h(km,{versions:t!=null?t:[],link:a=>`/versions/?id=${a}`})))}function Fa(e,t,n){const i=e.findIndex(o=>o.id===t.id)+n;if(!(i<0||i>=e.length))return e[i]}function Pg(){return h(te,null,h(Em,null),h(jt,{onChange:t=>{window.dispatchEvent(new CustomEvent("replacestate")),setTimeout(()=>ve.pageview(It(t.url)))}},h(Mg,{path:"/"}),h(ro,{path:"/worldgen",category:"worldgen"}),h(ro,{path:"/tags",category:"tags"}),h(ro,{path:"/assets",category:"assets"}),h(Ng,{path:"/partners"}),h(Lg,{path:"/sounds"}),h(Im,{path:"/changelog"}),h(Rg,{path:"/versions"}),h(Tg,{path:"/project"}),h(Ig,{path:"/guides/"}),h(Cg,{path:"/guides/:id"}),h(Mm,{default:!0})))}function $g(){return h(np,null,h(Q0,null,h(rp,null,h(ap,null,h(op,null,h(ep,null,h(Pg,null)))))))}Ln(h($g,null),document.body);export{Dr as c,Sc as e,O as l};
|
|
//# sourceMappingURL=index.d3a4b758.js.map
|