diff --git a/404.html b/404.html index 0e2b3300..82cb7fe7 100644 --- a/404.html +++ b/404.html @@ -20,7 +20,7 @@ 404 - + diff --git a/advancement/index.html b/advancement/index.html index e2766307..3b2881c0 100644 --- a/advancement/index.html +++ b/advancement/index.html @@ -20,7 +20,7 @@ Advancement Generator Minecraft 1.16, 1.17, 1.18 - + diff --git a/assets/fr.9d9f5128.js b/assets/fr.9d9f5128.js deleted file mode 100644 index 9d757439..00000000 --- a/assets/fr.9d9f5128.js +++ /dev/null @@ -1,2 +0,0 @@ -var e=JSON.parse('{"add":"Ajouter","add_bottom":"Ajouter au bas","add_top":"Ajouter au haut","advancement":"Progrès","collapse":"Réduire","collapse_all":"Maintenir %0% pour tout réduire","copy":"Copier","copied":"Copié!","copy_context":"Copier le contexte","dimension_type":"Type de dimension","dimension":"Dimension","download":"Télécharger","duplicate":"Dupliquer","entries_hidden":"%0% saisies cachées","entries_hidden.more":"Montrer %0% plus","entries_hidden.all":"Tout montrer","expand":"Étendre","expand_all":"Maintenir %0% pour tout étendre","feature.decorated.decorators":"Decorateurs","feature.decorated.decorators.entry":"Decorateur","fields":"Champs","generate_new_seed":"Générer une nouvelle graine","github":"GitHub","hide_output":"Cacher les résultats JSON","hide_preview":"Cacher l\'aperçu","home":"Accueil","import":"Importer","indentation.2_spaces":"2 espaces","indentation.4_spaces":"4 espaces","indentation.tabs":"Tabulations","item_modifier":"Modificateur d\'objet","language":"Langage","loot_table":"Table de butin","more":"Plus","move_down":"Descendre","move_up":"Monter","not_found.description":"La page que vous recherchez n\'existe pas.","no_presets":"Aucun préréglage","output_settings":"Paramètres de résultats JSON","predicate":"Prédicat","recipe":"Recette","redo":"Refaire","reset":"Réinitialiser","settings":"Paramètres","settings.fields.description":"Personnaliser les paramètres avancés des champs","settings.fields.path":"Contexte","settings.fields.name":"Nom","share":"Partager","theme":"Thème","theme.dark":"Sombre","theme.light":"Clair","theme.system":"Système","title.generator":"%0% Generateur","title.generator_category":"%0% Generateurs","title.home":"Generators de Pack de Données","presets":"Préréglages","preview":"Visualiser","preview.scale":"Échelle","preview.depth":"Profondeur","preview.factor":"Facteur","preview.offset":"Décalage","preview.peaks":"Pics","preview.width":"Largeur","remove":"Enlever","search":"Chercher","show_output":"Montrer le résolutat JSON","show_preview":"Montrer l\'aperçu","source_placeholder":"Coller le contenu JSON ici","switch_generator":"Changer de générateur","terrain_settings":"Paramètres du terrain","undo":"Annuler","world":"Paramètres du monde","worldgen/biome":"Biome","worldgen/configured_carver":"Sculpteur","worldgen/configured_feature":"Fonctionnalité","worldgen/noise_settings":"Paramètres de bruit","worldgen/processor_list":"Liste des processeurs","worldgen/configured_structure_feature":"Caractéristique de structure","worldgen/configured_surface_builder":"Constructeur de surface","worldgen/template_pool":"Groupe de modèles","zoom_in":"Agrandir","zoom_out":"Réduire"}');export default e; -//# sourceMappingURL=fr.9d9f5128.js.map diff --git a/assets/fr.9d9f5128.js.map b/assets/fr.9d9f5128.js.map deleted file mode 100644 index 4faf9acc..00000000 --- a/assets/fr.9d9f5128.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fr.9d9f5128.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/assets/fr.f5531eea.js b/assets/fr.f5531eea.js new file mode 100644 index 00000000..d43cb7dc --- /dev/null +++ b/assets/fr.f5531eea.js @@ -0,0 +1,2 @@ +var e=JSON.parse('{"add":"Ajouter","add_bottom":"Ajouter au bas","add_top":"Ajouter au haut","advancement":"Progrès","collapse":"Réduire","collapse_all":"Maintenir %0% pour tout réduire","copied":"Copié !","copy":"Copier","copy_context":"Copier le contexte","dimension":"Dimension","dimension_type":"Type de dimension","download":"Télécharger","duplicate":"Dupliquer","entries_hidden":"%0% saisies cachées","entries_hidden.all":"Tout montrer","entries_hidden.more":"Montrer %0% plus","expand":"Étendre","expand_all":"Maintenir %0% pour tout étendre","feature.decorated.decorators":"Decorateurs","feature.decorated.decorators.entry":"Decorateur","fields":"Champs","generate_new_seed":"Générer une nouvelle graine","github":"GitHub","hide_output":"Cacher les résultats JSON","hide_preview":"Cacher l\'aperçu","home":"Accueil","import":"Importer","indentation.2_spaces":"2 espaces","indentation.4_spaces":"4 espaces","indentation.tabs":"Tabulations","item_modifier":"Modificateur d\'objet","language":"Langage","loot_table":"Table de butin","more":"Plus","move_down":"Descendre","move_up":"Monter","no_presets":"Aucun préréglage","not_found.description":"La page que vous recherchez n\'existe pas.","output_settings":"Paramètres de résultats JSON","predicate":"Prédicat","presets":"Préréglages","preview":"Visualiser","preview.depth":"Profondeur","preview.factor":"Facteur","preview.offset":"Décalage","preview.peaks":"Pics","preview.scale":"Échelle","preview.width":"Largeur","recipe":"Recette","redo":"Refaire","remove":"Enlever","reset":"Réinitialiser","search":"Chercher","settings":"Paramètres","settings.fields.description":"Personnaliser les paramètres avancés des champs","settings.fields.name":"Nom","settings.fields.path":"Contexte","share":"Partager","show_output":"Montrer le résolutat JSON","show_preview":"Montrer l\'aperçu","source_placeholder":"Coller le contenu JSON ici","switch_generator":"Changer de générateur","terrain_settings":"Paramètres du terrain","theme":"Thème","theme.dark":"Sombre","theme.light":"Clair","theme.system":"Système","title.generator":"%0% Generateur","title.generator_category":"%0% Generateurs","title.home":"Generators de Pack de Données","undo":"Annuler","world":"Paramètres du monde","worldgen":"Générateur de monde","worldgen/biome":"Biome","worldgen/configured_carver":"Sculpteur","worldgen/configured_feature":"Fonctionnalité","worldgen/configured_structure_feature":"Caractéristique de structure","worldgen/configured_surface_builder":"Constructeur de surface","worldgen/noise_settings":"Paramètres de bruit","worldgen/processor_list":"Liste des processeurs","worldgen/template_pool":"Groupe de modèles","zoom_in":"Agrandir","zoom_out":"Réduire"}');export default e; +//# sourceMappingURL=fr.f5531eea.js.map diff --git a/assets/fr.f5531eea.js.map b/assets/fr.f5531eea.js.map new file mode 100644 index 00000000..10a2859b --- /dev/null +++ b/assets/fr.f5531eea.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fr.f5531eea.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/assets/index.3fb19d8f.js b/assets/index.f1ae53c2.js similarity index 99% rename from assets/index.3fb19d8f.js rename to assets/index.f1ae53c2.js index eef86157..6be8dd2d 100644 --- a/assets/index.3fb19d8f.js +++ b/assets/index.f1ae53c2.js @@ -1,2 +1,2 @@ -var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,i=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,s=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&i(e,n,t[n]);if(o)for(var n of o(t))a.call(t,n)&&i(e,n,t[n]);return e},l=(e,o)=>t(e,n(o));import{y as c,a as d,s as u,l as h,r as m,b as p,j as g,c as f,d as v,e as _,C as w,M as y,_ as b,X as x,W as k,R as C,f as M,N as A,g as z,I as E,h as I,A as V,i as j,q as $,k as O,L,m as S,n as P,o as D,p as N}from"./vendor.7b8e2117.js";var T,B=JSON.parse('{"languages":[{"code":"de","name":"Deutsch"},{"code":"en","name":"English"},{"code":"fr","name":"Français"},{"code":"it","name":"Italiano"},{"code":"ja","name":"日本語"},{"code":"pl","name":"Polski"},{"code":"pt","name":"Português"},{"code":"ru","name":"Русский"},{"code":"sk","name":"Slovenčina","schemas":false},{"code":"zh-cn","name":"简体中文"},{"code":"zh-tw","name":"正體中文"}],"versions":[{"id":"1.15","latest":"1.15.2","refs":{"mcdata_master":"13355f7"}},{"id":"1.16","latest":"1.16.5","refs":{"mcdata_master":"1.16.4","vanilla_datapack_data":"1.16.4-data","vanilla_datapack_summary":"1.16.4-summary"}},{"id":"1.17","latest":"1.17.1","refs":{"mcdata_master":"1.17.1","vanilla_datapack_data":"1.17.1-data","vanilla_datapack_summary":"1.17.1-summary"}},{"id":"1.18","refs":{"mcdata_master":"master","vanilla_datapack_data":"data","vanilla_datapack_summary":"summary"},"dynamic":true}],"generators":[{"id":"loot_table","url":"loot-table","path":"loot_tables","schema":"loot_table","maxVersion":"1.17"},{"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":"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/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"},{"id":"worldgen/configured_surface_builder","url":"worldgen/surface-builder","category":"worldgen","schema":"configured_surface_builder","minVersion":"1.16"},{"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"}],"registries":[{"id":"advancement","dynamic":true},{"id":"attribute","minVersion":"1.16"},{"id":"block"},{"id":"block_predicate_type","minVersion":"1.18"},{"id":"dimension","dynamic":true},{"id":"dimension_type","dynamic":true},{"id":"enchantment"},{"id":"entity_type"},{"id":"fluid"},{"id":"function","dynamic":true},{"id":"float_provider_type","minVersion":"1.17"},{"id":"item"},{"id":"int_provider_type","minVersion":"1.17"},{"id":"height_provider_type","minVersion":"1.17"},{"id":"loot_condition_type","minVersion":"1.16"},{"id":"loot_condition_type","minVersion":"1.16"},{"id":"loot_function_type","minVersion":"1.16"},{"id":"loot_nbt_provider_type","minVersion":"1.17"},{"id":"loot_number_provider_type","minVersion":"1.17"},{"id":"loot_pool_entry_type","minVersion":"1.16"},{"id":"loot_score_provider_type","minVersion":"1.17"},{"id":"loot_table","dynamic":true},{"id":"mob_effect"},{"id":"pos_rule_test","minVersion":"1.16"},{"id":"potion","minVersion":"1.15"},{"id":"predicate","dynamic":true},{"id":"recipe","dynamic":true},{"id":"recipe_serializer"},{"id":"rule_test","minVersion":"1.16"},{"id":"sound_event"},{"id":"stat_type"},{"id":"structure","dynamic":true},{"id":"tag/block","dynamic":true},{"id":"tag/entity_type","dynamic":true},{"id":"tag/fluid","dynamic":true},{"id":"tag/function","dynamic":true},{"id":"tag/item","dynamic":true},{"id":"worldgen/biome","dynamic":true},{"id":"worldgen/block_state_provider_type","minVersion":"1.16"},{"id":"worldgen/block_placer_type","minVersion":"1.16","maxVersion":"1.17"},{"id":"worldgen/biome_source","minVersion":"1.16"},{"id":"worldgen/carver","minVersion":"1.16"},{"id":"worldgen/chunk_generator","minVersion":"1.16"},{"id":"worldgen/configured_carver","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_decorator","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_feature","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_structure_feature","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_surface_builder","minVersion":"1.16","dynamic":true},{"id":"worldgen/decorator","minVersion":"1.16"},{"id":"worldgen/feature","minVersion":"1.16"},{"id":"worldgen/feature_size_type","minVersion":"1.16"},{"id":"worldgen/foliage_placer_type","minVersion":"1.16"},{"id":"worldgen/noise_settings","minVersion":"1.16","dynamic":true},{"id":"worldgen/processor_list","minVersion":"1.16","dynamic":true},{"id":"worldgen/structure_feature","minVersion":"1.16"},{"id":"worldgen/structure_pool_element","minVersion":"1.16"},{"id":"worldgen/structure_processor","minVersion":"1.16"},{"id":"worldgen/surface_builder","minVersion":"1.16"},{"id":"worldgen/template_pool","minVersion":"1.16","dynamic":true},{"id":"worldgen/tree_decorator_type","minVersion":"1.16"},{"id":"worldgen/trunk_placer_type","minVersion":"1.16"},{"id":"biome","maxVersion":"1.15"},{"id":"worldgen/biome","minVersion":"1.16","path":"processed/reports/biomes"}]}');function H({type:e,id:t}){return c((()=>{var e;null==(e=document.getElementById("ad-placeholder"))||e.remove(),"ethicalads"in window&ðicalads.load()}),[]),d("div",{"data-ea-publisher":"misode-github-io","data-ea-type":e,class:"ad dark flat",id:t})}function R({icon:e,label:t,active:n,class:o,tooltip:r,tooltipLoc:a,onClick:i}){return d("div",{class:`btn${n?" active":""}${o?` ${o}`:""}${r?` tooltipped tip-${null!=a?a:"sw"}`:""}`,onClick:i,"aria-label":r},e&&Y[e],t&&d("span",null,t))}function F({icon:e,label:t,large:n,doSelect:o,value:r,placeholder:a,onChange:i}){const s=void 0===i?()=>{}:e=>{const t=e.target.value;null==i||i(t)},l=u(null);return c((()=>{o&&l.current&&l.current.select()}),[o]),d("div",{class:"btn btn-input "+(n?"large-input":""),onClick:e=>e.stopPropagation()},e&&Y[e],t&&d("span",null,t),d("input",{ref:l,type:"text",value:r,onChange:s,placeholder:a}))}function J({size:e,draw:t,onDrag:n,onHover:o,onLeave:r},a){const i=u(null),s=u(),l=u(),d=u([0,0]),h=u(!1);c((()=>{const e=e=>{s.current=[e.offsetX,e.offsetY]},t=e=>{if(void 0===s.current){const t=e.offsetX/i.current.clientWidth,n=e.offsetY/i.current.clientHeight;return void(null==o||o(t,n))}if(!n)return;const t=e.offsetX-s.current[0],r=e.offsetY-s.current[1];0===t&&0===r||(d.current=[d.current[0]+t,d.current[1]+r],h.current||(cancelAnimationFrame(l.current),l.current=requestAnimationFrame((async()=>{h.current=!0;const e=d.current[0]/i.current.clientWidth,t=d.current[1]/i.current.clientHeight;d.current=[0,0],await(null==n?void 0:n(e,t)),h.current=!1})))),s.current=[e.offsetX,e.offsetY]},a=()=>{s.current=void 0},c=()=>{null==r||r()};return i.current.addEventListener("mousedown",e),i.current.addEventListener("mousemove",t),i.current.addEventListener("mouseleave",c),document.body.addEventListener("mouseup",a),()=>{var n,o,r;null==(n=i.current)||n.removeEventListener("mousedown",e),null==(o=i.current)||o.removeEventListener("mousemove",t),null==(r=i.current)||r.removeEventListener("mouseleave",c),document.body.removeEventListener("mouseup",a)}}),[...null!=a?a:[],i.current]);const m=u(),p=u(0);return m.current=async()=>{const n=i.current.getContext("2d"),o=e();i.current.width=o[0],i.current.height=o[1];const r=n.getImageData(0,0,o[0],o[1]),a=p.current+=1;await t(r),a===p.current&&n.putImageData(r,0,0)},{canvas:i,redraw:m.current}}function W(){const[e,t]=h(!1),n=()=>{t(!1)};return c((()=>(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 G(e,t){const n={invalidated(){e&&t(e)}};c((()=>(null==e||e.addListener(n),()=>{null==e||e.removeListener(n)})),[e])}function U({icon:e,label:t,relative:n,tooltip:o,children:r}){const[a,i]=W();return d("div",{class:"btn-menu"+(!1===n?" no-relative":"")},d(R,l(s({},{icon:e,label:t,tooltip:o}),{onClick:i})),a&&d("div",{class:"btn-group"},r))}!function(e){const t="Site",n="Generator";function o(e,t,n){ga("send","event",e,t,n)}function r(e,t){ga("set",`dimension${e}`,t)}e.pageview=function(e){ga("set","page",e),ga("send","pageview")},e.setLanguage=function(e){r(4,e),o(t,"set-language",e)},e.setTheme=function(e){r(1,e),o(t,"set-theme",e)},e.setVersion=function(e){r(3,e),o(n,"set-version",e)},e.setPreview=function(e){r(5,e),o(n,"set-preview",e)},e.generatorEvent=function(e,t){o(n,e,t)}}(T||(T={}));const Y={alert:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),download:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"}),d("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"}),d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),gear:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),mark_github:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),search:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),sun:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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 Z({error:e,onDismiss:t}){return d("div",{class:"error"},t&&d("div",{class:"error-dismiss",onClick:t},Y.x),d("h3",null,e),d("p",null,"If you think this is a bug, you can report it ",d("a",{href:"https://github.com/misode/misode.github.io/issues/new",target:"_blank"},"on GitHub")))}function K(e,t,n){const o=e=>{const o=e.onChange&&(t=>{var o;const r=t.target.value;null==(o=e.onChange)||o.call(e,n(r))}),r=e.onEnter&&(t=>{var o;if("Enter"===t.key){const r=t.target.value;null==(o=e.onEnter)||o.call(e,n(r))}});return d("input",s(s({},e),{type:t,onChange:o,onKeyDown:r}))};return o.displayName=e,o}const X=K("TextInput","text",(e=>e)),q=K("NumberInput","number",(e=>Number(e))),Q=K("RangeInput","range",(e=>Number(e)));let ee;const te={},ne=function(e,t){if(!t)return e();if(void 0===ee){const e=document.createElement("link").relList;ee=e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"}return Promise.all(t.map((e=>{if(e in te)return;te[e]=!0;const t=e.endsWith(".css"),n=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${n}`))return;const o=document.createElement("link");return o.rel=t?"stylesheet":ee,t||(o.as="script",o.crossOrigin=""),o.href=e,document.head.appendChild(o),t?new Promise(((e,t)=>{o.addEventListener("load",e),o.addEventListener("error",t)})):void 0}))).then((()=>e()))};var oe=JSON.parse('{"add":"Add","add_bottom":"Add to bottom","add_top":"Add to top","advancement":"Advancement","collapse":"Collapse","collapse_all":"Hold %0% to collapse all","copy":"Copy","copied":"Copied!","copy_context":"Copy context","dimension_type":"Dimension Type","dimension":"Dimension","download":"Download","duplicate":"Duplicate","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","fields":"Fields","generate_new_seed":"Generate new seed","github":"GitHub","hide_output":"Hide JSON output","hide_preview":"Hide preview","home":"Home","import":"Import","indentation.2_spaces":"2 spaces","indentation.4_spaces":"4 spaces","indentation.tabs":"Tabs","item_modifier":"Item Modifier","language":"Language","loot_table":"Loot Table","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":"JSON output settings","predicate":"Predicate","recipe":"Recipe","redo":"Redo","reset":"Reset","settings":"Settings","settings.fields.description":"Customize advanced field settings","settings.fields.path":"Context","settings.fields.name":"Name","share":"Share","theme":"Theme","theme.dark":"Dark","theme.light":"Light","theme.system":"System","title.generator":"%0% Generator","title.generator_category":"%0% Generators","title.home":"Data Pack Generators","title.sounds":"Sound Explorer","presets":"Presets","preview":"Visualize","preview.scale":"Scale","preview.depth":"Depth","preview.factor":"Factor","preview.offset":"Offset","preview.peaks":"Peaks","preview.width":"Width","remove":"Remove","search":"Search","show_output":"Show JSON 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 JSON content here","switch_generator":"Switch generator","terrain_settings":"Terrain settings","undo":"Undo","world":"World Settings","worldgen":"Worldgen","worldgen/biome":"Biome","worldgen/configured_carver":"Carver","worldgen/configured_feature":"Feature","worldgen/noise_settings":"Noise Settings","worldgen/processor_list":"Processor List","worldgen/configured_structure_feature":"Structure Feature","worldgen/configured_surface_builder":"Surface Builder","worldgen/template_pool":"Template Pool","zoom_in":"Zoom in","zoom_out":"Zoom out"}'),re=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:oe});const ae={fallback:oe};function ie(e,t,...n){var o,r,a,i,s;return function(e,t){return e.replace(/%\d+%/g,(e=>{const n=parseInt(e.slice(1,-1));return void 0!==(null==t?void 0:t[n])?t[n]:e}))}(null!=(s=null!=(i=null!=(a=null==(o=ae[e])?void 0:o[t])?a:null==(r=ae.en)?void 0:r[t])?i:ae.fallback[t])?s:t,n)}async function se(e){const t=B.languages.find((t=>t.code===e));if(!t)return;const n=await function(e){switch(e){case"../locales/de.json":return ne((()=>import("./de.1d005dc8.js")),void 0);case"../locales/en.json":return ne((()=>Promise.resolve().then((function(){return re}))),void 0);case"../locales/es.json":return ne((()=>import("./es.d3abba45.js")),void 0);case"../locales/fr.json":return ne((()=>import("./fr.9d9f5128.js")),void 0);case"../locales/it.json":return ne((()=>import("./it.fd9a8268.js")),void 0);case"../locales/ja.json":return ne((()=>import("./ja.8c79487c.js")),void 0);case"../locales/pl.json":return ne((()=>import("./pl.3a9fb38c.js")),void 0);case"../locales/pt.json":return ne((()=>import("./pt.689bba1d.js")),void 0);case"../locales/ru.json":return ne((()=>import("./ru.6f24253b.js")),void 0);case"../locales/sk.json":return ne((()=>import("./sk.69c71daa.js")),void 0);case"../locales/zh-cn.json":return ne((()=>import("./zh-cn.0d8d64ad.js")),void 0);case"../locales/zh-tw.json":return ne((()=>import("./zh-tw.59e068b2.js")),void 0);default:return Promise.reject(new Error("Unknown variable dynamic import: "+e))}}(`../locales/${e}.json`),o=!1!==t.schemas&&await function(e){switch(e){case"../../node_modules/@mcschema/locales/src/de.json":return ne((()=>import("./de.f9c3209c.js")),void 0);case"../../node_modules/@mcschema/locales/src/en.json":return ne((()=>import("./en.c831bdaf.js")),void 0);case"../../node_modules/@mcschema/locales/src/es.json":return ne((()=>import("./es.c83d9c73.js")),void 0);case"../../node_modules/@mcschema/locales/src/fr.json":return ne((()=>import("./fr.9b3a1c69.js")),void 0);case"../../node_modules/@mcschema/locales/src/it.json":return ne((()=>import("./it.7ff123cd.js")),void 0);case"../../node_modules/@mcschema/locales/src/ja.json":return ne((()=>import("./ja.4ae430b9.js")),void 0);case"../../node_modules/@mcschema/locales/src/pl.json":return ne((()=>import("./pl.01cb20df.js")),void 0);case"../../node_modules/@mcschema/locales/src/pt.json":return ne((()=>import("./pt.31e14993.js")),void 0);case"../../node_modules/@mcschema/locales/src/ru.json":return ne((()=>import("./ru.92df5b59.js")),void 0);case"../../node_modules/@mcschema/locales/src/zh-cn.json":return ne((()=>import("./zh-cn.7cd3f35b.js")),void 0);case"../../node_modules/@mcschema/locales/src/zh-tw.json":return ne((()=>import("./zh-tw.bae62b5e.js")),void 0);default:return Promise.reject(new Error("Unknown variable dynamic import: "+e))}}(`../../node_modules/@mcschema/locales/src/${e}.json`);ae[e]=s(s({},n.default),o.default)}function le(e){return"object"==typeof e&&null!==e}const ce=e=>("0"+e.toString(16)).substr(-2);function de(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,ce).join("")}function ue(){return BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))}function he(e){const t=Math.floor(4294967296*Math.random())-2147483648,n=e.get(new p.Path(["dimensions"]));e.set(new p.Path(["seed"]),t,!0),"object"==typeof n&&null!==n&&Object.keys(n).forEach((n=>{e.set(new p.Path(["dimensions",n,"generator","seed"]),t,!0),e.set(new p.Path(["dimensions",n,"generator","biome_source","seed"]),t,!0)})),e.set(new p.Path(["generator","seed"]),t,!0),e.set(new p.Path(["generator","biome_source","seed"]),t)}function me(e){return`/${e}/`.replaceAll("//","/")}function pe(e){const t=e.replace(/^\//,"").replace(/\/$/,"");return B.generators.find((e=>e.url===t))}function ge(e){const t=Math.abs(function(e){let t=0;for(let n=0;n>8)%256,(t>>16)%256]}function fe(e){return e*e}function ve(e,t,n){return Math.max(e,Math.min(t,n))}function _e(e,t,n){return n<0?e:n>1?t:we(n,e,t)}function we(e,t,n){return t+e*(n-t)}function ye(e){return e instanceof Error?e.message:`${e}`}const be=m();function xe(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;let n,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=0;o{try{const t=Ae[e].getCollections(),n={};await async function(e,t,n){const o=B.versions.find((t=>t.id===e));if(!o)return void console.error(`[fetchData] Unknown version ${o} in ${JSON.stringify(B.versions)}`);console.debug(`[fetchData] ${JSON.stringify(o)}`),o.dynamic&&await Promise.all(Oe.filter((e=>localStorage.getItem(`cached_${e.id}`)!==e.hash)).map((async e=>{console.debug(`[deleteMatching] ${e.id} '${localStorage.getItem(`cached_${e.id}`)}' < '${e.hash}' ${e.url}/${o.refs[e.id]}`),await async function(e){try{const t=await caches.open("misode-v1");console.debug("[deleteMatching] Opened cache misode-v1");const n=[];for(const o of await t.keys())e(o.url)&&n.push(t.delete(o));console.debug(`[deleteMatching] Removing ${n.length} cache objects...`),await Promise.all(n)}catch(t){console.warn(`[deleteMatching] Failed to open cache misode-v1: ${ye(t)}`)}}((t=>t.startsWith(`${e.url}/${o.refs[e.id]}`))),console.debug(`[deleteMatching] Done! ${e.id} ${e.hash} '${localStorage.getItem(`cached_${e.id}`)}'`),localStorage.setItem(`cached_${e.id}`,e.hash),console.debug(`[deleteMatching] Set! ${e.id} ${e.hash} '${localStorage.getItem(`cached_${e.id}`)}'`)})));await Promise.all([Le(o,t),Se(o,n),Pe(o,t)])}(e,t,n);const o=Ae[e].getSchemas(t);return Ce[e]={collections:t,schemas:o,blockStates:n},Ce[e]}catch(t){throw new Error(`Cannot get version "${e}": ${ye(t)}`)}})()),Ce[e]}function Ve(e,t,n){const o=B.versions.findIndex((t=>t.id===e)),r=t?B.versions.findIndex((e=>e.id===t)):0,a=n?B.versions.findIndex((e=>e.id===n)):B.versions.length-1;return r<=o&&o<=a}["1.15","1.16","1.17"].forEach((e=>localStorage.removeItem(`cache_${e}`)));const je="https://raw.githubusercontent.com/Arcensoth/mcdata",$e="https://raw.githubusercontent.com/SPGoding/vanilla-datapack",Oe=[{id:"mcdata_master",hash:"73e1d6160d2d99e387ee8fd94616e91a34823cce",url:je},{id:"vanilla_datapack_summary",hash:"acb5c750f739201a651d54d33f0711c20c6c11ec",url:$e}];async function Le(e,t){console.debug(`[fetchRegistries] ${e.id}`);const n=B.registries.filter((e=>!e.dynamic)).filter((t=>Ve(e.id,t.minVersion,t.maxVersion)));if(Ve(e.id,void 0,"1.15")){const r=`${je}/${e.refs.mcdata_master}/generated/reports/registries.json`;try{const e=await Te(r,(e=>{const t={};return Object.keys(e).forEach((n=>{t[n.slice(10)]=Object.keys(e[n].entries)})),t}));n.forEach((n=>{var o;t.register(n.id,null!=(o=e[n.id])?o:[])}))}catch(o){console.warn("Error occurred while fetching registries:",ye(o))}}else await Promise.all(n.map((async n=>{try{const o=n.path?`${je}/${e.refs.mcdata_master}/${n.path}/data.min.json`:`${je}/${e.refs.mcdata_master}/processed/reports/registries/${n.id}/data.min.json`;t.register(n.id,await Te(o,(e=>e.values)))}catch(o){console.warn(`Error occurred while fetching registry ${n.id}:`,ye(o))}})))}async function Se(e,t){if(console.debug(`[fetchBlockStateMap] ${e.id}`),Ve(e.id,void 0,"1.16")){const o=Ve(e.id,void 0,"1.15")?`${je}/${e.refs.mcdata_master}/generated/reports/blocks.json`:`${je}/${e.refs.mcdata_master}/processed/reports/blocks/data.min.json`;try{const e=await Te(o,(e=>{const t={};return Object.keys(e).forEach((n=>{t[n]={properties:e[n].properties,default:e[n].states.find((e=>e.default)).properties}})),t}));Object.assign(t,e)}catch(n){console.warn("Error occurred while fetching block state map:",ye(n))}}else{const o=`${je}/${e.refs.mcdata_master}/processed/reports/blocks/simplified/data.min.json`;try{const e=await Te(o);Object.assign(t,e)}catch(n){console.warn("Error occurred while fetching block state map:",ye(n))}}}async function Pe(e,t){console.debug(`[fetchDynamicRegistries] ${e.id}`);const n=B.registries.filter((e=>e.dynamic)).filter((t=>Ve(e.id,t.minVersion,t.maxVersion)));if(Ve(e.id,"1.16")){const r=`${$e}/${e.refs.vanilla_datapack_summary}/summary/flattened.min.json`;try{const e=await Te(r);n.forEach((n=>{t.register(n.id,e[n.id])}))}catch(o){console.warn("Error occurred while fetching dynamic registries:",ye(o))}}}async function De(e,t,n){console.debug(`[fetchPreset] ${t} ${n}`);const o=B.versions.find((t=>t.id===e));try{const e=`${$e}/${o.refs.vanilla_datapack_data}/data/minecraft/${t}/${n}.json`,r=await fetch(e);return await r.json()}catch(r){console.warn(`Error occurred while fetching ${t} preset ${n}:`,ye(r))}}function Ne(e){return`https://misode-cors-anywhere.herokuapp.com/https://resources.download.minecraft.net/${e.slice(0,2)}/${e}`}async function Te(e,t=(e=>e)){try{const n=await caches.open("misode-v1");console.debug(`[getData] Opened cache misode-v1 ${e}`);const o=await n.match(e);if(o&&o.ok)return console.debug(`[getData] Retrieving cached data ${e}`),await o.json();console.debug(`[getData] fetching data ${e}`);const r=await fetch(e),a=t(await r.json());return await n.put(e,new Response(JSON.stringify(a))),a}catch(n){console.warn(`[getData] Failed to open cache misode-v1: ${ye(n)}`),console.debug(`[getData] fetching data ${e}`);const o=await fetch(e);return t(await o.json())}}let Be,He,Re;async function Fe(e,t){const n=[e,t.octaves,`${t.seed}`,t.version];if(!xe(n,Be)){Be=be(n),He=await async function(e,t){var n,o,r,a,i;switch(null==(n=null==e?void 0:e.type)?void 0:n.replace(/^minecraft:/,"")){case"fixed":return new C(e.biome);case"checkerboard":const n=(null!=(o=e.scale)?o:2)+2,s=null!=(a=null==(r=e.biomes)?void 0:r.length)?a:0;return{getBiome(t,o,r){var a;const i=(((t>>n)+(r>>n))%s+s)%s;return null==(a=e.biomes)?void 0:a[i].node}};case"multi_noise":switch(null==(i=e.preset)?void 0:i.replace(/^minecraft:/,"")){case"nether":e="1.18"===t.version?Ue:Ge;break;case"overworld":e="1.18"===t.version?await async function(){return(await De("1.18","dimension","overworld")).generator.biome_source}():e}if(e=p.DataModel.unwrapLists(e),"1.18"===t.version)return b.fromJson(e);{const n=["altitude","temperature","humidity","weirdness"].map(((n,o)=>{var r;const a=e[`${n}_noise`];return a.firstOctave=ve(null!=(r=a.firstOctave)?r:-7,-100,-1),new x(new k(t.seed+BigInt(o)),a)}));return Array.isArray(e.biomes)&&0!==e.biomes.length?{getBiome(t,o,r){const a=n.map((e=>e.sample(t,r,0)));let i=1/0,s="";for(const{biome:n,parameters:l}of e.biomes){const e=fe(l.altitude-a[0])+fe(l.temperature-a[1])+fe(l.humidity-a[2])+fe(l.weirdness-a[3])+fe(l.offset);eo.nextFloat(),nextInt:e=>o.nextInt(e),sampleInt(e){return Qe(e,this)}};for(let i=0;i=n.size[0]||i[1]>=n.size[1]||i[2]>=n.size[2])continue;const e=i[2]*(4*t.width)+4*i[0],o=s{nt(t,null==e?void 0:e.decorator,n).forEach((t=>tt(t,null==e?void 0:e.feature,n)))},random_boolean_selector:(e,t,n)=>{tt(t,n.nextFloat()<.5?null==e?void 0:e.feature_true:null==e?void 0:e.feature_false,n)},random_selector:(e,t,n)=>{var o,r;for(const a of null!=(o=null==e?void 0:e.features)?o:[])if(n.nextFloat()<(null!=(r=null==a?void 0:a.chance)?r:0))return void tt(t,a.feature,n);tt(t,null==e?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var o,r,a;tt(t,null==(a=null==e?void 0:e.features)?void 0:a[n.nextInt(null!=(r=null==(o=null==e?void 0:e.features)?void 0:o.length)?r:0)],n)}},rt={chance:(e,t,n)=>{var o;return n.nextFloat()<1/(null!=(o=null==e?void 0:e.chance)?o:1)?[t]:[]},count:(e,t,n)=>{var o;return new Array(n.sampleInt(null!=(o=null==e?void 0:e.count)?o:1)).fill(t)},count_extra:(e,t,n)=>{var o,r;let a=null!=(o=null==e?void 0:e.count)?o:1;return n.nextFloat(){var o;return new Array(n.sampleInt(null!=(o=null==e?void 0:e.count)?o:1)).fill(t).map((e=>[e[0]+n.nextInt(16),e[1],e[2]+n.nextInt(16)]))},count_noise:(e,t,n)=>{const o=n.biomeInfoNoise.sample(t[0]/200,0,t[2]/200){var o;const r=Math.max(1,e.noise_factor),a=n.biomeInfoNoise.sample(t[0]/r,0,t[2]/r),i=Math.max(0,Math.ceil((a+(null!=(o=e.noise_offset)?o:0))*e.noise_to_count_ratio));return new Array(i).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map(((e,o)=>{const r=4*Math.floor(o/4)+1+n.nextInt(3)+t[0];return[r,Math.max(n.seaLevel,Ye[ve(0,63,r)]),4*Math.floor(o%4)+1+n.nextInt(3)+t[2]]})),decorated:(e,t,n)=>nt(t,null==e?void 0:e.outer,n).flatMap((t=>nt(t,null==e?void 0:e.inner,n))),depth_average:(e,t,n)=>{var o,r,a,i;return qe(t,n.nextInt(null!=(o=null==e?void 0:e.spread)?o:0)+n.nextInt(null!=(r=null==e?void 0:e.spread)?r:0)-(null!=(a=e.spread)?a:0)+(null!=(i=null==e?void 0:e.baseline)?i:0))},emerald_ore:(e,t,n)=>{const o=3+n.nextInt(6);return[...new Array(o)].map((()=>[t[0]+n.nextInt(16),4+n.nextInt(28),t[2]+n.nextInt(16)]))},fire:(e,t,n)=>{const o=1+n.nextInt(n.nextInt(n.sampleInt(null==e?void 0:e.count)));return[...new Array(o)].map((()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)]))},glowstone:(e,t,n)=>{const o=n.nextInt(1+n.nextInt(n.sampleInt(null==e?void 0:e.count)));return[...new Array(o)].map((()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)]))},heightmap:(e,t,n)=>qe(t,Math.max(n.seaLevel,Ye[ve(0,63,t[0])])),heightmap_spread_double:(e,t,n)=>{const o=Math.max(n.seaLevel,Ye[ve(0,63,t[0])]);return qe(t,n.nextInt(2*o))},heightmap_world_surface:(e,t,n)=>qe(t,Math.max(n.seaLevel,Ye[ve(0,63,t[0])])),iceberg:(e,t,n)=>[[t[0]+4+n.nextInt(8),t[1],t[2]+4+n.nextInt(8)]],lava_lake:(e,t,n)=>{var o,r;if(0===n.nextInt((null!=(o=e.chance)?o:1)/10)){const o=n.nextInt(n.nextInt(248)+8);if(o[t],range:(e,t,n)=>{var o,r,a;return qe(t,n.nextInt((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0))+(null!=(a=null==e?void 0:e.bottom_offset)?a:0))},range_biased:(e,t,n)=>{var o,r,a;return qe(t,n.nextInt(n.nextInt((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0))+(null!=(a=null==e?void 0:e.bottom_offset)?a:0)))},range_very_biased:(e,t,n)=>{var o,r,a,i;return qe(t,n.nextInt(n.nextInt(n.nextInt((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0))+(null!=(a=null==e?void 0:e.bottom_offset)?a:0))+(null!=(i=null==e?void 0:e.bottom_offset)?i:0)))},spread_32_above:(e,t,n)=>qe(t,n.nextInt(t[1]+32)),top_solid_heightmap:(e,t)=>qe(t,Ye[ve(0,63,t[0])]),magma:(e,t,n)=>qe(t,n.nextInt(t[1]+32)),square:(e,t,n)=>[[t[0]+n.nextInt(16),t[1],t[2]+n.nextInt(16)]],surface_relative_threshold:(e,t)=>{var n,o;const r=Ye[ve(0,63,t[0])],a=r+(null!=(n=null==e?void 0:e.min_inclusive)?n:-1/0),i=r+(null!=(o=null==e?void 0:e.max_inclusive)?o:1/0);return t[1]i?[t]:[]},water_lake:(e,t,n)=>{var o;return 0===n.nextInt(null!=(o=e.chance)?o:1)?[[t[0]+n.nextInt(16),n.nextInt(256),t[2]+n.nextInt(16)]]:[]}};class at{constructor(e){this.settings={},this.chunkWidth=4,this.chunkHeight=4,this.chunkCountY=32,this.biomeDepth=.1,this.biomeScale=.2,this.noiseColumnCache=[],this.xOffset=0;const t=new k(e);this.minLimitPerlinNoise=new M(t,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.maxLimitPerlinNoise=new M(t,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.mainPerlinNoise=new M(t,-7,[1,1,1,1,1,1,1,1]),this.depthNoise=new M(t,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])}reset(e,t,n,o,r){this.settings=e,this.chunkWidth=4*e.size_horizontal,this.chunkHeight=4*e.size_vertical,this.chunkCountY=Math.floor(e.height/this.chunkHeight),e.amplified&&t>0&&(t=1+2*t,n=1+4*n),this.biomeDepth=.265625*(.5*t-.125),this.biomeScale=96/(.9*n+.1),this.noiseColumnCache=Array(r).fill(null),this.xOffset=o}iterateNoiseColumn(e){const t=Array(this.chunkCountY*this.chunkHeight),n=Math.floor(e/this.chunkWidth),o=Math.floor(e%this.chunkWidth)/this.chunkWidth,r=this.fillNoiseColumn(n),a=this.fillNoiseColumn(n+1);for(let h=this.chunkCountY-1;h>=0;h-=1)for(let e=this.chunkHeight;e>=0;e-=1){const n=e/this.chunkHeight;t[h*this.chunkHeight+e]=(i=n,s=o,l=r[h],c=r[h+1],d=a[h],u=a[h+1],we(s,we(i,l,c),we(i,d,u)))}var i,s,l,c,d,u;return t}fillNoiseColumn(e){const t=this.noiseColumnCache[e-this.xOffset];if(t)return t;const n=Array(this.chunkCountY+1),o=684.412*this.settings.sampling.xz_scale,r=684.412*this.settings.sampling.y_scale,a=o/this.settings.sampling.xz_factor,i=r/this.settings.sampling.y_factor,s=this.settings.random_density_offset?this.getRandomDensity(e):0;for(let l=0;l<=this.chunkCountY;l+=1){let t=this.sampleAndClampNoise(e,l,this.mainPerlinNoise.getOctaveNoise(0).zo,o,r,a,i);const c=((1-2*l/this.chunkCountY+s)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;t+=c*(c>0?4:1),this.settings.top_slide.size>0&&(t=_e(this.settings.top_slide.target,t,(this.chunkCountY-l-this.settings.top_slide.offset)/this.settings.top_slide.size)),this.settings.bottom_slide.size>0&&(t=_e(this.settings.bottom_slide.target,t,(l-this.settings.bottom_slide.offset)/this.settings.bottom_slide.size)),n[l]=t}return this.noiseColumnCache[e-this.xOffset]=n,n}getRandomDensity(e){const t=this.depthNoise.sample(200*e,10,this.depthNoise.getOctaveNoise(0).zo,1,0,!0),n=24.575625*(t<0?.3*-t:t)-2;return n<0?.009486607142857142*n:.006640625*Math.min(n,1)}sampleAndClampNoise(e,t,n,o,r,a,i){let s=0,l=0,c=0,d=1;for(let u=0;u<16;u+=1){const h=M.wrap(e*o*d),m=M.wrap(t*r*d),p=M.wrap(n*o*d),g=r*d,f=this.minLimitPerlinNoise.getOctaveNoise(u);f&&(s+=f.sample(h,m,p,g,t*g)/d);const v=this.maxLimitPerlinNoise.getOctaveNoise(u);if(v&&(l+=v.sample(h,m,p,g,t*g)/d),u<8){const o=this.mainPerlinNoise.getOctaveNoise(u);o&&(c+=o.sample(M.wrap(e*a*d),M.wrap(t*i*d),M.wrap(n*a*d),i*d,t*i*d)/d)}d/=2}return _e(s/512,l/512,(c/10+1)/2)}}const it={"minecraft:air":[150,160,170],"minecraft:water":[20,80,170],"minecraft:lava":[200,100,0],"minecraft:stone":[50,50,50],"minecraft:netherrack":[100,40,40],"minecraft:end_stone":[200,200,140]};let st,lt,ct=[];function dt(e,t,n){var o;if(Ve(n.version,"1.18")){const{settings:r,generator:a}=function(e,t){const n=w.fromJson(p.DataModel.unwrapLists(e));n.noise.bottomSlide.target*=128,n.noise.topSlide.target*=128;const o={factor:t.biomeFactor,offset:t.biomeOffset,peaks:t.biomePeaks,nearWater:!1},r=[e,o,`${t.seed}`];if(!xe(r,st)){st=be(r),ct=[];const e=new C("unknown");lt=new A(t.seed,e,n,o)}return{settings:n,generator:lt}}(e,n),i=new ht(-n.offset,n.width,r.noise.minY,r.noise.height);i.fill(a);const s=t.data;for(let e=0;e0?0:e[t+1]>0?150:255}class ht{constructor(e,t,n,o){this.minX=e,this.filled=[],this.chunks=[...Array(Math.ceil(t/16)+1)].map(((t,r)=>{const a=(e>>4)+r,i=ct.find((e=>e.pos[0]===a));return i?(this.filled[r]=!0,i):new z(n,o,E.create(a,0))}))}fill(e){this.chunks.forEach(((t,n)=>{this.filled[n]||(e.fill(t),this.filled[n]=!0,ct.push(t))}))}getBlockState(e){const t=(e[0]>>4)-(this.minX>>4);return this.chunks[t].getBlockState(e)}}const mt=({model:e,data:t,shown:n,lang:o,version:r})=>{var a;const[i,s]=h(2),[l,m]=h(void 0),g=u([0,0]),f=u(1),v=u(void 0),_=BigInt(e.get(new p.Path(["generator","seed"]))),y=function(e){if("string"==typeof e)switch(e.replace(/^minecraft:/,"")){case"overworld":case"amplified":return{temperature:{firstOctave:-9,amplitudes:[1.5,0,1,0,0,0]},humidity:{firstOctave:-7,amplitudes:[1,1,0,0,0,0]},continentalness:{firstOctave:-9,amplitudes:[1,1,2,2,2,1,1,1,1]},erosion:{firstOctave:-9,amplitudes:[1,1,0,1,1]},weirdness:{firstOctave:-7,amplitudes:[1,2,1,0,0,0]},shift:{firstOctave:-3,amplitudes:[1,1,1,0]}};case"end":case"floating_islands":return{temperature:{firstOctave:0,amplitudes:[0]},humidity:{firstOctave:0,amplitudes:[0]},continentalness:{firstOctave:0,amplitudes:[0]},erosion:{firstOctave:0,amplitudes:[0]},weirdness:{firstOctave:0,amplitudes:[0]},shift:{firstOctave:0,amplitudes:[0]}};default:return{temperature:{firstOctave:-7,amplitudes:[1,1]},humidity:{firstOctave:-7,amplitudes:[1,1]},continentalness:{firstOctave:-7,amplitudes:[1,1]},erosion:{firstOctave:-7,amplitudes:[1,1]},weirdness:{firstOctave:-7,amplitudes:[1,1]},shift:{firstOctave:0,amplitudes:[0]}}}return w.fromJson(e).octaves}(e.get(new p.Path(["generator","settings"]))),b=n?function(e,t){return JSON.stringify([e,t])}(t,y):"",x=null==(a=t.type)?void 0:a.replace(/^minecraft:/,""),{canvas:k,redraw:C}=J({size:()=>[200/f.current,200/f.current],async draw(e){const n={octaves:y,biomeColors:{},offset:g.current,scale:i,seed:_,res:f.current,version:r};await async function(e,t,n){const{biomeSource:o,climateSampler:r}=await Fe(e,n),a=t.data,i=-n.offset[0]-100+n.res/2,s=-n.offset[1]-100+n.res/2,l=4*t.width/n.res,c=4/n.res;for(let d=0;d<200;d+=n.res)for(let e=0;e<200;e+=n.res){const t=e*l+d*c,u=(d+i)*n.scale,h=(e+s)*n.scale,m=Je(o.getBiome(u,64,h,r),n.biomeColors);a[t]=m[0],a[t+1]=m[1],a[t+2]=m[2],a[t+3]=255}}(t,e,n),4===f.current&&(clearTimeout(v.current),v.current=setTimeout((()=>{f.current=1,C()}),150))},async onDrag(e,t){g.current[0]=g.current[0]+200*e,g.current[1]=g.current[1]+200*t,clearTimeout(v.current),f.current="multi_noise"===x?4:1,C()},async onHover(e,n){const o={octaves:y,biomeColors:{},offset:g.current,scale:i,seed:_,res:1,version:r},a=await async function(e,t,n,o){const{biomeSource:r,climateSampler:a}=await Fe(e,o),[i,s]=function([e,t],n){return[(e-n.offset[0]-100+n.res/2)*n.scale,(t-n.offset[1]-100+n.res/2)*n.scale]}([t,n],o);return r.getBiome(i,64,s,a)}(t,Math.floor(200*e),Math.floor(200*n),o);m(a)},onLeave(){m(void 0)}},[b,i,_]);c((()=>{n&&(f.current="multi_noise"===x?4:1,C())}),[b,i,_,n]);const M=e=>{g.current[0]=g.current[0]*i/e,g.current[1]=g.current[1]*i/e,s(e)};return d(I,null,d("div",{class:"controls"},l&&d(R,{label:l,class:"no-pointer"}),("multi_noise"===x||"checkerboard"===x)&&d(I,null,d(R,{icon:"dash",tooltip:ie(o,"zoom_out"),onClick:()=>M(1.5*i)}),d(R,{icon:"plus",tooltip:ie(o,"zoom_in"),onClick:()=>M(i/1.5)})),"multi_noise"===x&&d(R,{icon:"sync",tooltip:ie(o,"generate_new_seed"),onClick:()=>he(e)})),d("canvas",{ref:k,width:"200",height:"200"}))};const pt=({data:e,version:t,shown:n,lang:o})=>{const[r,a]=h(4),[i,s]=h(ue()),{canvas:l,redraw:u}=J({size:()=>[16*r,16*r],async draw(n){Ke(e,n,{seed:i,version:t,size:[16*r,128,16*r]})}}),m=JSON.stringify(e);return c((()=>{n&&u()}),[m,r,i,n]),d(I,null,d("div",{class:"controls"},d(R,{icon:"dash",tooltip:ie(o,"zoom_out"),onClick:()=>a(Math.min(16,r+1))}),d(R,{icon:"plus",tooltip:ie(o,"zoom_in"),onClick:()=>a(Math.max(1,r-1))}),d(R,{icon:"sync",tooltip:ie(o,"generate_new_seed"),onClick:()=>s(ue())})),d("canvas",{ref:l,width:"64",height:"64"}))},gt=({lang:e,data:t,shown:n,version:o})=>{var r,a;const i=ie.bind(null,e),[s,l]=h(ue()),[m,p]=h(.2),[g,f]=h(.1),[v,_]=h(0),[w,y]=h(void 0),b=u(0),x=JSON.stringify([t,m,g,v]),k=Ve(o,"1.18");c((()=>{p(k?600:.2),f(k?.05:.1)}),[k]);const C=null!=(a=null==(r=null==t?void 0:t.noise)?void 0:r.height)?a:256,{canvas:M,redraw:A}=J({size:()=>[C,C],async draw(e){const n={biomeOffset:g,biomeFactor:m,biomePeaks:v,offset:b.current,width:e.width,seed:s,version:o};dt(t,e,n)},async onDrag(e){b.current+=e*C,A()},async onHover(e,n){var o,r;const a=C-Math.max(1,Math.ceil(n*C))+(null!=(r=null==(o=null==t?void 0:t.noise)?void 0:o.min_y)?r:0);y(`${a}`)},onLeave(){y(void 0)}},[x,s]);return c((()=>{n&&A()}),[x,s,n]),d(I,null,d("div",{class:"controls"},w&&d(R,{label:`Y = ${w}`,class:"no-pointer"}),d(U,{icon:"gear",tooltip:ie(e,"terrain_settings")},k?d(I,null,d(F,{label:i("preview.factor"),value:`${m}`,onChange:e=>p(Number(e))}),d(F,{label:i("preview.offset"),value:`${g}`,onChange:e=>f(Number(e))}),d(F,{label:i("preview.peaks"),value:`${v}`,onChange:e=>_(Number(e))})):d(I,null,d(F,{label:i("preview.scale"),value:`${m}`,onChange:e=>p(Number(e))}),d(F,{label:i("preview.depth"),value:`${g}`,onChange:e=>f(Number(e))}))),d(R,{icon:"sync",tooltip:ie(e,"generate_new_seed"),onClick:()=>l(ue())})),d("canvas",{ref:M,width:C,height:C}))},ft=["dimension","worldgen/noise_settings","worldgen/configured_feature"];function vt({lang:e,model:t,version:n,id:o,shown:r}){var a;const[,i]=h(0);if(G(t,(()=>{i((e=>e+1))})),"dimension"===o&&(null==(a=null==t?void 0:t.get(new p.Path(["generator","type"])))?void 0:a.endsWith("noise"))){const o=t.get(new p.Path(["generator","biome_source"]));if(o)return d(mt,s({},{lang:e,model:t,version:n,shown:r,data:o}))}if("worldgen/noise_settings"===o&&t){const o=t.get(new p.Path([]));if(o)return d(gt,s({},{lang:e,model:t,version:n,shown:r,data:o}))}if("worldgen/configured_feature"===o&&t){const o=t.get(new p.Path([]));if(o)return d(pt,s({},{lang:e,model:t,version:n,shown:r,data:o}))}return d(I,null)}const _t={base:({},e,t)=>t,choice({switchNode:e},t,n,o){return e.hook(this,t,n,o)},list({children:e},t,n,o){return Array.isArray(n)?n.map(((n,r)=>e.hook(this,t.push(r),n.node,o))):n},map({children:e,config:t},n,o,r){var a,i;if(void 0===o)return;const s="block_state_map"===(null==(a=t.validation)?void 0:a.validator)?null==(i=r.blockStates)?void 0:i[p.relativePath(n,t.validation.params.id).get()]:null,l={};return Object.keys(o).forEach((t=>{var a;s&&!Object.keys(null!=(a=s.properties)?a:{}).includes(t)||(l[t]=e.hook(this,n.push(t),o[t],r))})),l},object({getActiveFields:e},t,n,o){if(null==n||"object"!=typeof n)return n;const r={},a=e(t);return Object.keys(a).filter((e=>a[e].enabled(t))).forEach((e=>{r[e]=a[e].hook(this,t.push(e),n[e],o)})),r}};var wt,yt;(yt=wt||(wt={})).ID_LANGUAGE="language",yt.ID_THEME="theme",yt.ID_VERSION="schema_version",yt.ID_INDENT="indentation",yt.ID_SOUNDS_VERSION="minecraft_sounds_version",yt.getLanguage=function(){var e;return null!=(e=localStorage.getItem(yt.ID_LANGUAGE))?e:"en"},yt.getTheme=function(){var e;return null!=(e=localStorage.getItem(yt.ID_THEME))?e:"dark"},yt.getVersion=function(){const e=localStorage.getItem(yt.ID_VERSION);return e&&ke.includes(e)?e:"1.17"},yt.getIndent=function(){var e;return null!=(e=localStorage.getItem(yt.ID_INDENT))?e:"2_spaces"},yt.getSoundsVersion=function(){var e;return null!=(e=localStorage.getItem(yt.ID_SOUNDS_VERSION))?e:"latest"},yt.setLanguage=function(e){e&&localStorage.setItem(yt.ID_LANGUAGE,e)},yt.setTheme=function(e){e&&localStorage.setItem(yt.ID_THEME,e)},yt.setVersion=function(e){e&&localStorage.setItem(yt.ID_VERSION,e)},yt.setIndent=function(e){e&&localStorage.setItem(yt.ID_INDENT,e)},yt.setSoundsVersion=function(e){e&&localStorage.setItem(yt.ID_SOUNDS_VERSION,e)};const bt={"2_spaces":2,"4_spaces":4,tabs:"\t"};function xt({lang:e,name:t,model:n,blockStates:o,doCopy:r,doDownload:a,doImport:i,copySuccess:s,onError:l}){const m=ie.bind(null,e),[g,f]=h(wt.getIndent()),v=u(null),_=u(null),w=u(),y=V(((e,t)=>{const n=e.schema.hook(_t,new p.ModelPath(e),e.data,{blockStates:t});return JSON.stringify(n,null,bt[g])+"\n"}),[g]);c((()=>{w.current=()=>{if(n&&o)try{const e=y(n,o);e.length>=1e4?v.current.value=e.slice(0,1e4)+"\n\nOutput is too large to display (+10000 chars)\nExport to view complete output\n\n":v.current.value=e}catch(e){l(`Error getting JSON output: ${ye(e)}`),console.error(e),v.current.value=""}}})),G(n,(()=>{w.current()})),c((()=>{n&&w.current()}),[n]),c((()=>{w.current()}),[g]);c((()=>{r&&n&&o&&navigator.clipboard.writeText(y(n,o)).then((()=>{s()}))}),[r]),c((()=>{if(a&&v.current&&_.current){const e=encodeURIComponent(v.current.value);_.current.setAttribute("href",`data:text/json;charset=utf-8,${e}`),_.current.setAttribute("download",`${t}.json`),_.current.click()}}),[a]),c((()=>{i&&v.current&&(v.current.value="",v.current.select())}),[i]);return d(I,null,d("div",{class:"controls"},d(U,{icon:"gear",tooltip:m("output_settings")},Object.entries(bt).map((([e])=>d(R,{label:m(`indentation.${e}`),active:g===e,onClick:()=>{return t=e,wt.setIndent(t),void f(t);var t}}))))),d("textarea",{ref:v,class:"source",onBlur:()=>{try{const e=JSON.parse(v.current.value);null==n||n.reset(p.DataModel.wrapLists(e),!1)}catch(e){l(`Error importing: ${ye(e)}`),console.error(e)}},spellcheck:!1,autocorrect:"off",placeholder:m("source_placeholder")}),d("a",{ref:_,style:"display: none;"}))}class kt extends p.DataModel{constructor(e,t,n,o){super(e),this.mapper=t,this.getter=n,this.setter=o}map(e){return this.mapper(e)}get(e){return this.getter(e)}set(e,t,n){return this.setter(e,t,n)}}const Ct=["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"],Mt=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],At=["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"],zt=["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"],Et=["function.set_nbt.tag","advancement.display.icon.nbt","text_component_object.nbt","entity.nbt","block.nbt","item.nbt"],It=["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"],Vt=new p.DataModel(p.MapNode(p.StringNode(),p.StringNode()),{historyMax:0});function jt({model:e,lang:t,blockStates:n}){var o;const r=new p.ModelPath(e),[a,i,s]=e.schema.hook($t,r,be(e.data),t,n,{});return(null==(o=null==i?void 0:i.props)?void 0:o.children.some((e=>e)))?d("div",{class:`node ${e.schema.type(r)}-node`,"data-category":e.schema.category(r)},d("div",{class:"node-header"},a,i),d("div",{class:"node-body"},s)):s}const $t={base:()=>[null,null,null],boolean:(e,t,n,o,r,a)=>[null,d(St,s({},l(s({},e),{path:t,value:n,lang:o,states:r,ctx:a}))),null],choice({choices:e,config:t,switchNode:n},o,r,a,i,s){const l=n.activeCase(o,!0),c=(null==t?void 0:t.context)?new p.ModelPath(o.getModel(),new p.Path(o.getArray(),[t.context])):o,[u,h,m]=l.node.hook(this,c,r,a,i,s);if(1===e.length)return[u,h,m];const g=(null==t?void 0:t.choiceContext)?new p.Path([],[t.choiceContext]):(null==t?void 0:t.context)?new p.Path([],[t.context]):o,f=d("select",{value:l.type,onChange:n=>(n=>{var a,i,s;const c=null!=(a=e.find((e=>e.type===n)))?a:l,d=c.change?c.change(p.DataModel.unwrapLists(r)):"feature"===t.choiceContext?null==(s=null==(i=c.node.default())?void 0:i.config)?void 0:s.feature:c.node.default();o.model.set(o,p.DataModel.wrapLists(d))})(n.target.value)},e.map((e=>d("option",{value:e.type},Ht(a,g.contextPush(e.type))))));return[u,d(I,null,f,h),m]},list({children:e,config:t},n,o,r,a,i){const{expand:c,collapse:u,isToggled:m}=Lt(),[g,f]=h(50),v=n.getContext().join(".");if(It.includes(v)){return[d(I,null,[...Array(t.maxLength)].map(((e,t)=>d(Rt,{lang:r,path:n.modelPush(t)}))),d("div",{class:"fixed-list"})),d(I,null,[...Array(t.maxLength)].map(((t,s)=>{var l;return e.hook(this,n.modelPush(s),null==(l=null==o?void 0:o[s])?void 0:l.node,r,a,i)[1]}))),null]}return[null,d("button",{class:"add tooltipped tip-se","aria-label":ie(r,"add_top"),onClick:()=>{Array.isArray(o)||(o=[]);const t=p.DataModel.wrapLists(e.default());n.model.set(n,[{node:t,id:de()},...o])}},Y.plus_circle),d(I,null,o&&Array.isArray(o)&&o.map((({node:t,id:h},p)=>{if(p===g)return d("div",{class:"node node-header"},d("label",null,ie(r,"entries_hidden",""+(o.length-g))),d("button",{onClick:()=>f(Math.min(g+50,o.length))},ie(r,"entries_hidden.more","50")),d("button",{onClick:()=>f(o.length)},ie(r,"entries_hidden.all")));if(p>g)return null;const v=n.push(p).contextPush("entry"),_="object"===e.type(v),w=m(h);if(_&&(!1===w||void 0===w&&o.length>20))return d("div",{class:"node node-header","data-category":e.category(v)},d(Rt,{lang:r,path:v,nested:!0}),d("button",{class:"toggle tooltipped tip-se","aria-label":`${ie(r,"expand")}\n${ie(r,"expand_all","Ctrl")}`,onClick:c(h)},Y.chevron_right),d("label",null,Ht(r,v,`${p}`)),d(Ot,{key:h,path:v,value:t,schema:e}));return d(Nt,l(s({key:h,path:v,schema:e,value:t},{lang:r,states:a,actions:[{icon:"duplicate",label:"duplicate",onSelect:()=>{const e=[...n.get()];e.splice(p,0,{id:de(),node:be(t)}),n.model.set(n,e)}}]}),{ctx:l(s({},i),{index:(0===p?1:0)+(p===o.length-1?2:0)})}),_&&d("button",{class:"toggle tooltipped tip-se","aria-label":`${ie(r,"collapse")}\n${ie(r,"collapse_all","Ctrl")}`,onClick:u(h)},Y.chevron_down),d("button",{class:"remove tooltipped tip-se","aria-label":ie(r,"remove"),onClick:()=>v.set(void 0)},Y.trashcan),o.length>1&&d("div",{class:"node-move"},d("button",{class:"move tooltipped tip-se","aria-label":ie(r,"move_up"),onClick:()=>{const e=[...n.get()];[e[p-1],e[p]]=[e[p],e[p-1]],n.model.set(n,e)},disabled:0===p},Y.chevron_up),d("button",{class:"move tooltipped tip-se","aria-label":ie(r,"move_down"),onClick:()=>{const e=[...n.get()];[e[p+1],e[p]]=[e[p],e[p+1]],n.model.set(n,e)},disabled:p===o.length-1},Y.chevron_down)))})),o&&o.length>0&&o.length<=g&&d("div",{class:"node node-header"},d("button",{class:"add tooltipped tip-se","aria-label":ie(r,"add_bottom"),onClick:()=>{Array.isArray(o)||(o=[]);const t=p.DataModel.wrapLists(e.default());n.model.set(n,[...o,{node:t,id:de()}])}},Y.plus_circle)))]},map({children:e,keys:t,config:n},o,r,a,i,c){var u,h,m,g,f;const{expand:v,collapse:_,isToggled:w}=Lt(),y=new p.ModelPath(Vt,new p.Path([Bt(o.toString())])),b="block_state_map"===(null==(u=n.validation)?void 0:u.validator)?null==i?void 0:i[p.relativePath(o,n.validation.params.id).get()]:null,x=(null==b?void 0:b.properties)?p.StringNode(null,{enum:Object.keys(null!=(h=b.properties)?h:{})}):t;if(b&&"Properties"===o.last()){"object"!=typeof r&&(r={});const e=Object.entries(null!=(m=b.properties)?m:{}).map((([e,t])=>[e,p.StringNode(null,{enum:t})]));return Object.entries(null!=(g=b.properties)?g:{}).forEach((([e,t])=>{"string"!=typeof r[e]?o.model.errors.add(o.push(e),"error.expected_string"):t.includes(r[e])||o.model.errors.add(o.push(e),"error.invalid_enum_option",r[e])})),p.ObjectNode(Object.fromEntries(e)).hook(this,o,r,a,i,c)}return[null,d(I,null,x.hook(this,y,null!=(f=y.get())?f:"",a,i,c)[1],d("button",{class:"add tooltipped tip-se","aria-label":ie(a,"add"),onClick:()=>{const t=y.get();o.model.set(o.push(t),p.DataModel.wrapLists(e.default()))}},Y.plus_circle)),d(I,null,"object"==typeof r&&Object.entries(r).map((([t,n])=>{var u,h,m,g;const f=o.modelPush(t),y="object"===e.type(f),x=w(t);if(y&&(!1===x||void 0===x&&r.length>20))return d("div",{class:"node node-header","data-category":e.category(f)},d(Rt,{lang:a,path:f,nested:!0}),d("button",{class:"toggle tooltipped tip-se","aria-label":`${ie(a,"expand")}\n${ie(a,"expand_all","Ctrl")}`,onClick:v(t)},Y.chevron_right),d("label",null,t),d(Ot,{key:t,path:f,value:n,schema:e}));const k=b?p.StringNode(null,{enum:null!=(h=null==(u=b.properties)?void 0:u[t])?h:[]}):e;(null==(m=null==b?void 0:b.properties)?void 0:m[t])&&"string"==typeof n&&!(null==(g=b.properties)?void 0:g[t].includes(n))&&o.model.errors.add(f,"error.invalid_enum_option",n);return d(Nt,l(s({key:t,schema:k,path:f,value:n},{lang:a,states:i,ctx:c}),{label:t}),y&&d("button",{class:"toggle tooltipped tip-se","aria-label":`${ie(a,"collapse")}\n${ie(a,"collapse_all","Ctrl")}`,onClick:_(t)},Y.chevron_down),d("button",{class:"remove tooltipped tip-se","aria-label":ie(a,"remove"),onClick:()=>f.set(void 0)},Y.trashcan))})))]},number:(e,t,n,o,r,a)=>[null,d(Pt,s({},l(s({},e),{path:t,value:n,lang:o,states:r,ctx:a}))),null],object({node:e,config:t,getActiveFields:n,getChildModelPath:o},r,a,i,c,u){var h;if(0==r.getArray().length&&function(e,t){var n;return"feature"===e&&"decorated"===(null==(n=null==t?void 0:t.type)?void 0:n.replace(/^minecraft:/,""))&&le(null==t?void 0:t.config)}(t.context,a)){const{wrapper:e,fields:t}=function(e,t,n){const o=[],r=Wt(n,o),a={type:e.type,config:p.ObjectNode({decorators:p.ListNode(ze),feature:Ee},{context:"feature.decorated"})},i=p.ObjectNode(a,{context:"feature"}),s=new p.Path(["config","feature"]),l=new p.Path(["config","decorators"]),c=t.getModel(),d=new kt(i,(e=>{if(e.startsWith(s))return new p.Path([...[...Array(o.length-1)].flatMap((()=>["config","feature"])),...e.modelArr]);if(e.startsWith(l)){if(2===e.modelArr.length)return new p.Path([]);const t=e.modelArr[2];if("number"==typeof t)return new p.Path([...[...Array(t)].flatMap((()=>["config","feature"])),"config","decorator",...e.modelArr.slice(3)])}return e}),(e=>{if(e.equals(l)){const e=[];return Wt(c.data,e),e}return c.get(d.map(e))}),((e,t,n)=>{if(e.startsWith(s)){const o=[];Wt(c.data,o);const r=new p.Path([...[...Array(o.length-1)].flatMap((()=>["config","feature"])),...e.modelArr]);return c.set(r,t,n)}if(e.startsWith(l)){const o=e.modelArr[2];if(2===e.modelArr.length){const e=d.get(s);return c.set(new p.Path,Gt(e,t),n)}if("number"==typeof o){if(3===e.modelArr.length&&void 0===t){const e=d.get(s),t=[];Wt(c.data,t),t.splice(o,1);const r=Gt(e,t);return c.set(new p.Path,r,n)}{const r=new p.Path([...[...Array(o)].flatMap((()=>["config","feature"])),"config","decorator",...e.modelArr.slice(3)]);return c.set(r,t,n)}}}c.set(e,t,n)}));return d.data={type:c.data.type,config:{decorators:o,feature:r}},d.errors=c.errors,{fields:a,wrapper:d}}(n(r),r,a);a=e.data,n=()=>t,o=(t,n)=>new p.ModelPath(e,new p.Path(t.getArray(),["feature"])).push(n)}let m=null,g=null;if(e.optional())if(void 0===a){const t=()=>r.set(p.DataModel.wrapLists(e.default()));g=d("button",{class:"collapse closed tooltipped tip-se","aria-label":ie(i,"expand"),onClick:t},Y.plus_circle)}else{const e=()=>r.set(void 0);g=d("button",{class:"collapse open tooltipped tip-se","aria-label":ie(i,"remove"),onClick:e},Y.trashcan)}const f="object"==typeof a&&null!==a&&(null==(h=e.default())?void 0:h.pools)?l(s({},u),{loot:null==a?void 0:a.type}):u,v=d(I,null,"object"==typeof a&&null!==a&&!(e.optional()&&void 0===a)&&Object.entries(n(r)).filter((([e,t])=>t.enabled(r))).map((([e,t])=>{var n,l,u;const h=o(r,e),p=h.getContext().join(".");if(Mt.includes(p))return null;const[v,_,w]=t.hook(this,h,a[e],i,c,f);if(!(v||_||(null!=(u=null==(l=null==(n=null==w?void 0:w.props)?void 0:n.children)?void 0:l.length)?u:0)>0))return null;const y="object"===t.type(h)&&At.includes(p),b=zt.includes(p);return y||b?(m=d(I,null,m,d(Rt,{lang:i,path:h}),d(Ft,{lang:i,path:h}),v),g=d(I,null,g,_),y?w:null):d(Nt,s({key:e,schema:t,path:h,value:a[e]},{lang:i,states:c,ctx:f}))})));return[m,g,v]},string:(e,t,n,o,r,a)=>[null,d(Dt,s({},l(s({},e),{path:t,value:n,lang:o,states:r,ctx:a}))),null]};function Ot({path:e,value:t}){var n,o,r,a,i;switch(e.getContext().join(".")){case"loot_table.pools.entry":return d("label",null,null!=(o=null==(n=null==t?void 0:t.entries)?void 0:n.length)?o:0," entries");case"function.set_contents.entries.entry":case"loot_pool.entries.entry":return d("label",null,null!=(i=null==(r=null==t?void 0:t.name)?void 0:r.replace(/^minecraft:/,""))?i:null==(a=null==t?void 0:t.type)?void 0:a.replace(/^minecraft:/,""))}for(const s of Object.values(null!=t?t:{}))if("string"==typeof s)return d("label",null,s.replace(/^minecraft:/,""));return null}function Lt(){const[e,t]=h(new Map),[n,o]=h(void 0);return{expand:e=>n=>{n.ctrlKey?(t(new Map),o(!0)):t((t=>new Map(t.set(e,!0))))},collapse:e=>n=>{n.ctrlKey?(t(new Map),o(!1)):t((t=>new Map(t.set(e,!1))))},isToggled:t=>{var o;return null!=(o=null==e?void 0:e.get(t))?o:n}}}function St({path:e,node:t,value:n,lang:o}){const r=o=>{e.model.set(e,t.optional()&&n===o?void 0:o)};return d(I,null,d("button",{class:!1===n?"selected":"",onClick:()=>r(!1)},ie(o,"false")),d("button",{class:!0===n?"selected":"",onClick:()=>r(!0)},ie(o,"true")))}function Pt({path:e,config:t,integer:n,value:o,lang:r}){var a;const i=t=>{const o=t.target.value,r=n?parseInt(o):parseFloat(o);e.model.set(e,r)};return d(I,null,d("input",{type:"text",value:null!=o?o:"",onBlur:i,onKeyDown:e=>{"Enter"===e.key&&i(e)}}),(null==t?void 0:t.color)&&d("input",{type:"color",value:"#"+(null!=(a=null==o?void 0:o.toString(16).padStart(6,"0"))?a:"000000"),onChange:t=>{const n=t.target.value,o=parseInt(n.slice(1),16);e.model.set(e,o)}}),["dimension.generator.seed","dimension.generator.biome_source.seed","world_settings.seed"].includes(e.getContext().join("."))&&d("button",{onClick:()=>he(e.model),class:"tooltipped tip-se","aria-label":ie(r,"generate_new_seed")},Y.sync))}function Dt({path:e,getValues:t,config:n,node:o,value:r,lang:a,states:i}){var s;const l=t=>{t.stopPropagation();const n=t.target.value;n!==r&&e.model.set(e,0===n.length?void 0:n)},c=t(),u=e.getContext().join(".");if(Et.includes(u))return d("textarea",{value:null!=r?r:"",onBlur:l});if(Tt(n)&&!n.additional||Ct.includes(u)){let e=new p.Path([]);return Tt(n)&&"string"==typeof n.enum?e=e.contextPush(n.enum):Tt(n)||"resource"!==(null==n?void 0:n.validator)||"string"!=typeof n.params.pool||(e=e.contextPush(n.params.pool)),d("select",{value:null!=r?r:"",onChange:l},o.optional()&&d("option",{value:""},ie(a,"unset")),c.map((t=>d("option",{value:t},Ht(a,e.contextPush(t.replace(/^minecraft:/,"")))))))}if(Tt(n)||"block_state_key"!==(null==n?void 0:n.validator)){const e=de();return d(I,null,d("input",{value:null!=r?r:"",onBlur:l,onKeyDown:e=>{"Enter"===e.key&&l(e)},list:c.length>0?e:""}),c.length>0&&d("datalist",{id:e},c.map((e=>d("option",{value:e})))))}{const t=null==i?void 0:i[p.relativePath(e,n.params.id).get()],o=Object.keys(null!=(s=null==t?void 0:t.properties)?s:{});return d("select",{value:null!=r?r:"",onChange:l},o.map((e=>d("option",null,e))))}}const Nt=j((function({label:e,schema:t,path:n,value:o,lang:r,states:a,ctx:i,actions:l,children:c}){const u=t.type(n),h=t.category(n),m=n.getContext().join("."),[p,g]=W(),f=s({},i);delete f.index;const[v,_,w]=t.hook($t,n,o,r,a,f);return d("div",{class:`node ${u}-node`,"data-category":h},d("div",{class:"node-header",onContextMenu:e=>{e.preventDefault(),g()}},d(Rt,{lang:r,path:n}),d(Ft,{lang:r,path:n}),c,v,d("label",null,null!=e?e:Ht(r,n,`${n.last()}`),p&&d("div",{class:"node-menu"},null==l?void 0:l.map((e=>{var t;return d("div",{key:e.label,class:"menu-item"},d(R,{icon:e.icon,tooltip:ie(r,e.label),tooltipLoc:"se",onClick:()=>e.onSelect()}),d("span",null,null!=(t=e.description)?t:ie(r,e.label)))})),d("div",{class:"menu-item"},d(R,{icon:"clippy",tooltip:ie(r,"copy_context"),tooltipLoc:"se",onClick:()=>navigator.clipboard.writeText(m)}),d("span",null,m)))),_),w&&d("div",{class:"node-body"},w))}),((e,t)=>e.schema===t.schema&&e.lang===t.lang&&e.path.equals(t.path)&&xe(e.ctx,t.ctx)&&xe(e.value,t.value)));function Tt(e){return!!(null==e?void 0:e.enum)}function Bt(e){var t,n=0;for(t=0;te.path.startsWith(t))):t.model.errors.get(t,!0);if(0===r.length)return null;const a=ie(e,r[0].error,...null!=(o=r[0].params)?o:[]);return Jt("node-error","issue_opened",a)}function Ft({lang:e,path:t}){const n=t.contextPush("help").getContext().join("."),o=ie(e,n);return o===n?null:Jt("node-help","info",o)}const Jt=(e,t,n)=>{const[o,r]=W();return d("div",{class:`node-icon ${e}${o?" show":""}`,onClick:r},Y[t],d("span",{class:"icon-popup"},n))};function Wt(e,t){var n,o;return"decorated"!==(null==(n=null==e?void 0:e.type)?void 0:n.replace(/^minecraft:/,""))?e:le(null==e?void 0:e.config)?(t.push({id:t.length,node:e.config.decorator}),Wt(null!=(o=e.config.feature)?o:"",t)):e}function Gt(e,t){return 0===t.length?e:{type:"minecraft:decorated",config:{decorator:t.shift().node,feature:Gt(e,t)}}}function Ut({lang:e,model:t,blockStates:n,onError:o}){if(!t||!n||"none"===e)return d(I,null);const[r]=$((e=>{o(`Error rendering the tree: ${e.message}`),console.error(e)}));if(r)return d(I,null);const[,a]=h(0);return G(t,(()=>{a((e=>e+1))})),d("div",{class:"tree"},d(jt,s({},{model:t,lang:e,blockStates:n})))}const Yt={system:"device_desktop",dark:"moon",light:"sun"};function Zt({lang:e,title:t,version:n,theme:o,changeTheme:r,language:a,changeLanguage:i}){const s=ie.bind(null,e),l=pe(O());return d("header",null,d("div",{class:"title"},d(L,{class:"home-link",href:"/","aria-label":s("home")},Kt.home),d("h2",null,t),l&&d(U,{icon:"chevron_down",tooltip:s("switch_generator")},B.generators.filter((e=>e.category===(null==l?void 0:l.category)&&Ve(n,e.minVersion))).map((e=>d(R,{label:s(e.id),active:e.id===l.id,onClick:()=>S(me(e.url))}))))),d("nav",null,d("ul",null,d("li",null,d(U,{icon:"globe",tooltip:s("language")},B.languages.map((({code:e,name:t})=>d(R,{label:t,active:e===a,onClick:()=>i(e)}))))),d("li",null,d(U,{icon:Yt[o],tooltip:s("theme")},Object.entries(Yt).map((([e,t])=>d(R,{icon:t,label:s(`theme.${e}`),active:e===o,onClick:()=>r(e)}))))),d("li",{class:"dimmed"},d("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",class:"tooltipped tip-sw","aria-label":s("github")},Y.mark_github)))))}const Kt={home:d("svg",{width:"32",height:"28",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("rect",{width:"26",height:"6",rx:"3",fill:"#7CB45C"}),d("rect",{x:"8",width:"18",height:"6",rx:"3",fill:"#4BA041"}),d("rect",{y:"11",width:"32",height:"6",rx:"3",fill:"#AAA8A8"}),d("rect",{x:"11",y:"11",width:"21",height:"6",rx:"3",fill:"#91908F"}),d("rect",{x:"11",y:"22",width:"21",height:"6",rx:"3",fill:"#70B5C3"}),d("rect",{x:"17",y:"22",width:"15",height:"6",rx:"3",fill:"#4D989B"})),report:d("svg",{width:"30",height:"36",viewBox:"0 0 30 36",xmlns:"http://www.w3.org/2000/svg"},d("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"}),d("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"}),d("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"}),d("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"}),d("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"}),d("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:d("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},d("circle",{cx:"10",cy:"10",r:"10",fill:"#451475"}),d("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 Xt({lang:e,assets:t,sounds:n,sound:o,delay:r,pitch:a,volume:i,onEdit:s,onDelete:l,delayedPlay:m}){const p=ie.bind(null,e),[g,f]=h(!0),[v,_]=h(!1),[w,y]=h(!1),b=u([]),x=`playsound minecraft:${o} master @s ~ ~ ~ ${i} ${a}`;c((()=>{var e,r,s;const l=n[o];y(0===(null!=(r=null==(e=null==l?void 0:l.sounds)?void 0:e.length)?r:0)),b.current.forEach((e=>e.stop())),b.current=(null!=(s=null==l?void 0:l.sounds)?s:[]).map((e=>{const n="string"==typeof e?e:e.name,o=Ne(t[`minecraft/sounds/${n}.ogg`].hash),r=new P.Howl({src:[o],format:["ogg"],volume:i,rate:a});r.on("end",(()=>{_(!1)}));const s=()=>{g&&b.current.every((e=>"loaded"===e.state()))&&f(!1)};return"loaded"===r.state()?setTimeout((()=>s())):r.on("load",(()=>{s()})),r})),f(!0)}),[o,n]),c((()=>{b.current.forEach((e=>e.rate(a)))}),[a]),c((()=>{b.current.forEach((e=>e.volume(i)))}),[i]);const k=()=>{if(g||w)return;C();const e=Math.floor(Math.random()*b.current.length);b.current[e].play(),_(!0)},C=()=>{b.current.forEach((e=>e.stop()))};c((()=>{m&&setTimeout((()=>k()),50*r)}),[m]),c((()=>()=>C()),[]);const[M,A]=h(!1),z=u(void 0);return d("div",{class:`sound-config${g?" loading":v?" playing":""}${w?" invalid":""}`},d(R,{class:"play",icon:w?"alert":g?"sync":"play",label:p("sounds.play"),onClick:k,tooltip:p(w?"sounds.unknown_sound":g?"sounds.loading_sound":"sounds.play_sound"),tooltipLoc:"se"}),d(X,{class:"btn btn-input sound",list:"sound-list",spellcheck:!1,value:o,onChange:e=>s({sound:e})}),d("label",{class:"delay-label"},p("sounds.delay"),": "),d(q,{class:"btn btn-input delay",min:0,value:r,onChange:e=>s({delay:e})}),d("label",{class:"pitch-label"},p("sounds.pitch"),": "),d(Q,{class:"pitch tooltipped tip-s",min:.5,max:2,step:.01,"aria-label":a.toFixed(2),style:`--x: ${100/1.5*(a-.5)}%`,value:a,onChange:e=>s({pitch:e})}),d("label",{class:"volume-label"},p("sounds.volume"),": "),d(Q,{class:"volume tooltipped tip-s",min:0,max:1,step:.01,"aria-label":i.toFixed(2),style:`--x: ${100*i}%`,value:i,onChange:e=>s({volume:e})}),d(R,{class:"copy"+(M?" active":""),icon:M?"check":"terminal",label:p("copy"),tooltip:p(M?"copied":"sounds.copy_command"),onClick:()=>{navigator.clipboard.writeText(x),A(!0),void 0!==z.current&&clearTimeout(z.current),z.current=setTimeout((()=>{A(!1)}),2e3)}}),d(R,{class:"remove",icon:"trashcan",tooltip:p("sounds.remove_sound"),onClick:()=>{l(),C()}}))}function qt({title:e,link:t,icon:n,children:o}){return d("a",{class:"tool-card",href:t},n&&Kt[n],d("div",null,d("h3",null,e),o))}function Qt({lang:e,changeTitle:t,version:n,changeVersion:o}){var r;const a=ie.bind(null,e),[i,m]=h(null),[g,f]=$();if(g)return d("main",null,d(Z,{error:`Something went wrong rendering the generator: ${g.message}`,onDismiss:f}));const v=pe(O());if(!v)return d("main",null,d(Z,{error:`Cannot find generator "${O()}"`}));c((()=>{m(null)}),[v.id,n]);const _=B.versions.filter((e=>Ve(e.id,v.minVersion))).map((e=>e.id));t(a("title.generator",a(v.id)),_),Ve(n,v.minVersion)||m(`The minimum version for this generator is ${v.minVersion}`);const[w,y]=h(null),[b,x]=h(null);c((()=>{y(null),async function(e){return(await Ie(e)).blockStates}(n).then((e=>x(e))),async function(e,t){var n;if(!Me[t]||Me[t].version!==e){const r=await Ie(e);ze=p.Reference(r.schemas,"configured_decorator"),Ee=p.ChoiceNode([{type:"string",node:p.StringNode(r.collections,{validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:p.Reference(r.schemas,"configured_feature")}],{choiceContext:"feature"});const a=null==(n=B.generators.find((e=>e.id===t)))?void 0:n.schema;if(!a)throw new Error(`Cannot find model ${t}`);try{const n=r.schemas.get(a),o=new p.DataModel(n,{wrapLists:!0});Me[t]?o.reset(Me[t].model.data,!1):(o.validate(!0),o.history=[JSON.stringify(o.data)]),Me[t]={model:o,version:e}}catch(o){throw new Error(`Cannot get generator "${t}" for version "${e}": ${ye(o)}`)}}return Me[t].model}(n,v.id).then((e=>y(e))).catch((e=>{console.error(e),m(ye(e))}))}),[n,v.id]),G(w,(()=>{m(null)}));const k=e=>{e.ctrlKey&&"z"===e.key?(T.generatorEvent("undo","Hotkey"),null==w||w.undo()):e.ctrlKey&&"y"===e.key&&(T.generatorEvent("redo","Hotkey"),null==w||w.redo())};c((()=>(document.addEventListener("keyup",k),()=>{document.removeEventListener("keyup",k)})),[w]);const[C,M]=h(""),[A,z]=h([]);c((()=>{(async function(e){return(await Ie(e)).collections})(n).then((e=>{const t=(null!=C?C:"").trim().split(" "),n=e.get(v.id).map((e=>e.slice(10))).filter((e=>t.every((t=>e.includes(t)))));n&&z(n)})).catch((e=>{console.error(e),m(e.message)}))}),[n,v.id,C]);const[E,V]=h(window.innerWidth>820),[j,L]=h(0),[S,P]=h(0),[D,N]=h(0),[J,W]=h(!1),K=u(void 0),[X,q]=h(!1),Q=ft.includes(v.id);X&&!Q&&q(!1);let ee=1;Q&&(ee+=1),E&&(ee+=2);return d(I,null,d("main",{class:X?"has-preview":""},d(H,{id:"data-pack-generator",type:"text"}),d("div",{class:"controls"},d(R,{icon:"upload",label:a("import"),onClick:()=>{T.generatorEvent("import"),V(!0),N(D+1)}}),d(U,{icon:"archive",label:a("presets"),relative:!1},d(F,{icon:"search",large:!0,value:C,onChange:M,doSelect:1,placeholder:a("search")}),d("div",{class:"result-list"},A.map((e=>d(R,{label:e,onClick:()=>{return t=e,T.generatorEvent("load-preset",t),void De(n,null!=(o=v.path)?o:v.id,t).then((e=>{var t,n;const o=null==w?void 0:w.get(new p.Path(["generator","seed"]));void 0!==(null==(t=null==e?void 0:e.generator)?void 0:t.seed)&&void 0!==o&&(e.generator.seed=o,void 0!==(null==(n=e.generator.biome_source)?void 0:n.seed)&&(e.generator.biome_source.seed=o)),null==w||w.reset(p.DataModel.wrapLists(e),!1)}));var t,o}})))),0===A.length&&d(R,{label:a("no_presets")})),d(U,{icon:"tag",label:n},_.reverse().map((e=>d(R,{label:e,active:e===n,onClick:()=>o(e)})))),d(U,{icon:"kebab_horizontal",tooltip:a("more")},d(R,{icon:"history",label:a("reset"),onClick:()=>{T.generatorEvent("reset"),null==w||w.reset(p.DataModel.wrapLists(w.schema.default()),!0)}}),d(R,{icon:"arrow_left",label:a("undo"),onClick:e=>{e.stopPropagation(),T.generatorEvent("undo","Menu"),null==w||w.undo()}}),d(R,{icon:"arrow_right",label:a("redo"),onClick:e=>{e.stopPropagation(),T.generatorEvent("redo","Menu"),null==w||w.redo()}}))),i&&d(Z,{error:i,onDismiss:()=>m(null)}),d(Ut,l(s({},{lang:e,model:w,version:n,blockStates:b}),{onError:m}))),d("div",{class:"popup-actions",style:`--offset: -${8+50*ee}px;`},d("div",{class:`popup-action action-preview${Q?" shown":""} tooltipped tip-nw`,"aria-label":a(X?"hide_preview":"show_preview"),onClick:()=>{T.generatorEvent("toggle-preview",X?"hidden":"visible"),q(!X)}},X?Y.x_circle:Y.play),d("div",{class:`popup-action action-download${E?" shown":""} tooltipped tip-nw`,"aria-label":a("download"),onClick:()=>{T.generatorEvent("download"),P(S+1)}},Y.download),d("div",{class:`popup-action action-copy${E?" shown":""}${J?" active":""} tooltipped tip-nw`,"aria-label":a(J?"copied":"copy"),onClick:()=>{T.generatorEvent("copy"),L(j+1)}},J?Y.check:Y.clippy),d("div",{class:"popup-action action-code shown tooltipped tip-nw","aria-label":a(E?"hide_output":"show_output"),onClick:()=>{T.generatorEvent("toggle-output",E?"hidden":"visible"),V(!E),L(0),P(0),N(0)}},E?Y.chevron_right:Y.code)),d("div",{class:"popup-preview"+(X?" shown":"")},d(vt,l(s({},{lang:e,model:w,version:n,id:v.id}),{shown:X,onError:m}))),d("div",{class:"popup-source"+(E?" shown":"")},d(xt,l(s({},{lang:e,model:w,blockStates:b,doCopy:j,doDownload:S,doImport:D}),{name:null!=(r=v.schema)?r:"data",copySuccess:()=>{W(!0),void 0!==K.current&&clearTimeout(K.current),K.current=setTimeout((()=>{W(!1)}),2e3)},onError:m}))))}function en({lang:e,changeTitle:t}){const n=ie.bind(null,e);return t(n("title.home")),d("main",null,d("div",{class:"home"},B.generators.filter((e=>!e.category)).map((e=>d(qt,{title:n(e.id),link:me(e.url)}))),d(qt,{title:n("worldgen"),link:"/worldgen/"}),d("hr",null),d(qt,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/"},d("p",null,"Analyse your performance reports")),d(qt,{title:"Minecraft Sounds",icon:"sounds",link:"/sounds/"},d("p",null,"Browse through and mix all the vanilla sounds")),d(qt,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/"},d("p",null,"Convert your 1.16 data packs to 1.17"))))}let tn=null;const nn={},on={};async function rn(){return tn||(tn=async function(){try{const e=await fetch("https://launchermeta.mojang.com/mc/game/version_manifest.json");return await e.json()}catch(e){throw new Error(`Error occurred while fetching version manifest: ${ye(e)}`)}}()),tn}async function an(e){return nn[e]||(nn[e]=(async()=>{const t=await rn();return await async function(e,t){var n;const o=B.versions.find((t=>t.id===e)),r=null!=(n=null==o?void 0:o.latest)?n:t.latest.snapshot;try{const e=await Te(t.versions.find((e=>e.id===r)).url);return(await Te(e.assetIndex.url)).objects}catch(a){throw new Error(`Error occurred while fetching assets for ${o}: ${ye(a)}`)}}(e,t)})()),nn[e]}async function sn(e){return on[e]||(on[e]=(async()=>{const t=await an(e);return await async function(e,t){try{const e=t["minecraft/sounds.json"].hash;return await Te(Ne(e))}catch(n){throw new Error(`Error occurred while fetching sounds for ${e}: ${ye(n)}`)}}(e,t)})()),on[e]}function ln({lang:e,changeTitle:t,version:n,changeVersion:o}){const r=ie.bind(null,e),[a,i]=h(null);t(r("title.sounds"));const[m,p]=h({}),[g,f]=h({}),v=Object.keys(null!=g?g:{});c((()=>{an(n).then((e=>(p(e),sn(n)))).then((e=>{e&&f(e)})).catch((e=>{console.error(e),i(ye(e))}))}),[n]);const[_,w]=h(""),[y,b]=h([]),x=()=>{b([{id:de(),sound:_,delay:0,pitch:1,volume:1},...y])},k=e=>()=>{b(y.filter((t=>t.id!==e)))},[C,M]=h(0),A=u(null);return d("main",null,d(H,{type:"text",id:"sounds"}),a&&d(Z,{error:a,onDismiss:()=>i(null)}),v.length>0&&d(I,null,d("div",{class:"controls sounds-controls"},d("div",{class:"sound-search-group"},d(X,{class:"btn btn-input sound-search",list:"sound-list",placeholder:r("sounds.search"),value:_,onChange:w,onEnter:x}),d(R,{icon:"plus",tooltip:r("sounds.add_sound"),class:"add-sound",onClick:x})),y.length>1&&d(R,{icon:"play",label:r("sounds.play_all"),class:"play-all-sounds",onClick:()=>{M(C+1)}}),d("div",{class:"spacer"}),d(R,{icon:"download",label:r("download"),tooltip:r("sounds.download_function"),class:"download-sounds",onClick:()=>{const e=y.some((e=>e.delay>0)),t=y.sort(((e,t)=>e.delay-t.delay)).map((t=>`${e?`execute if score @s delay matches ${t.delay} run `:""}playsound minecraft:${t.sound} master @s ~ ~ ~ ${t.volume} ${t.pitch}`)).join("\n");A.current.setAttribute("href","data:text/plain;charset=utf-8,"+t+"%0A"),A.current.setAttribute("download","sounds.mcfunction"),A.current.click()}}),d(U,{icon:"tag",label:n},B.versions.reverse().map((e=>d(R,{label:e.id,active:e.id===n,onClick:()=>o(e.id)}))))),d("div",{class:"sounds"},y.map((t=>{return d(Xt,l(s(s({key:t.id},t),{lang:e,assets:m,sounds:g,delayedPlay:C}),{onEdit:(n=t.id,e=>{b(y.map((t=>t.id===n?s(s({},t),e):t)))}),onDelete:k(t.id)}));var n}))),d("a",{ref:A,style:"display: none;"})),d("datalist",{id:"sound-list"},v.map((e=>d("option",{key:e,value:e})))))}function cn({lang:e,changeTitle:t}){const n=ie.bind(null,e);return t(n("title.generator_category",n("worldgen"))),d("main",null,d("div",{class:"home"},B.generators.filter((e=>"worldgen"===e.category)).map((e=>d(qt,{title:n(e.id),link:me(e.url)})))))}function dn(){const[e,t]=h("none");c((()=>{(async()=>{const e=wt.getLanguage();await Promise.all([se("en"),..."en"!==e?[se(e)]:[]]),t(e)})()}),[]);const[n,o]=h(wt.getTheme());c((()=>{document.documentElement.setAttribute("data-theme",n)}),[n]);const[r,a]=h(wt.getVersion()),i=e=>{T.setVersion(e),wt.setVersion(e),a(e)},[l,u]=h(ie(e,"title.home")),m=(e,t)=>{null!=t||(t=B.versions.map((e=>e.id))),t.splice(0,t.length-3),document.title=`${e} Minecraft ${t.join(", ")}`,u(e)};return d(I,null,d(Zt,s({},{lang:e,title:l,version:r,theme:n,language:e,changeLanguage:async e=>{ae[e]||await se(e),T.setLanguage(e),wt.setLanguage(e),t(e)},changeTheme:e=>{T.setTheme(e),wt.setTheme(e),o(e)}})),d(N,{onChange:e=>{setTimeout((()=>T.pageview(me(e.url))))}},d(en,s({path:"/"},{lang:e,changeTitle:m})),d(cn,s({path:"/worldgen"},{lang:e,changeTitle:m})),d(ln,s({path:"/sounds"},{lang:e,version:r,changeTitle:m,changeVersion:i})),d(Qt,s({default:!0},{lang:e,version:r,changeTitle:m,changeVersion:i}))))}D(d(dn,null),document.body); -//# sourceMappingURL=index.3fb19d8f.js.map +var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,i=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,s=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&i(e,n,t[n]);if(o)for(var n of o(t))a.call(t,n)&&i(e,n,t[n]);return e},l=(e,o)=>t(e,n(o));import{y as c,a as d,s as u,l as h,r as m,b as p,j as g,c as f,d as v,e as _,C as w,M as y,_ as b,X as x,W as k,R as C,f as M,N as A,g as z,I as E,h as I,A as V,i as j,q as $,k as O,L,m as S,n as P,o as D,p as N}from"./vendor.7b8e2117.js";var T,B=JSON.parse('{"languages":[{"code":"de","name":"Deutsch"},{"code":"en","name":"English"},{"code":"fr","name":"Français"},{"code":"it","name":"Italiano"},{"code":"ja","name":"日本語"},{"code":"pl","name":"Polski"},{"code":"pt","name":"Português"},{"code":"ru","name":"Русский"},{"code":"sk","name":"Slovenčina","schemas":false},{"code":"zh-cn","name":"简体中文"},{"code":"zh-tw","name":"正體中文"}],"versions":[{"id":"1.15","latest":"1.15.2","refs":{"mcdata_master":"13355f7"}},{"id":"1.16","latest":"1.16.5","refs":{"mcdata_master":"1.16.4","vanilla_datapack_data":"1.16.4-data","vanilla_datapack_summary":"1.16.4-summary"}},{"id":"1.17","latest":"1.17.1","refs":{"mcdata_master":"1.17.1","vanilla_datapack_data":"1.17.1-data","vanilla_datapack_summary":"1.17.1-summary"}},{"id":"1.18","refs":{"mcdata_master":"master","vanilla_datapack_data":"data","vanilla_datapack_summary":"summary"},"dynamic":true}],"generators":[{"id":"loot_table","url":"loot-table","path":"loot_tables","schema":"loot_table","maxVersion":"1.17"},{"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":"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/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"},{"id":"worldgen/configured_surface_builder","url":"worldgen/surface-builder","category":"worldgen","schema":"configured_surface_builder","minVersion":"1.16"},{"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"}],"registries":[{"id":"advancement","dynamic":true},{"id":"attribute","minVersion":"1.16"},{"id":"block"},{"id":"block_predicate_type","minVersion":"1.18"},{"id":"dimension","dynamic":true},{"id":"dimension_type","dynamic":true},{"id":"enchantment"},{"id":"entity_type"},{"id":"fluid"},{"id":"function","dynamic":true},{"id":"float_provider_type","minVersion":"1.17"},{"id":"item"},{"id":"int_provider_type","minVersion":"1.17"},{"id":"height_provider_type","minVersion":"1.17"},{"id":"loot_condition_type","minVersion":"1.16"},{"id":"loot_condition_type","minVersion":"1.16"},{"id":"loot_function_type","minVersion":"1.16"},{"id":"loot_nbt_provider_type","minVersion":"1.17"},{"id":"loot_number_provider_type","minVersion":"1.17"},{"id":"loot_pool_entry_type","minVersion":"1.16"},{"id":"loot_score_provider_type","minVersion":"1.17"},{"id":"loot_table","dynamic":true},{"id":"mob_effect"},{"id":"pos_rule_test","minVersion":"1.16"},{"id":"potion","minVersion":"1.15"},{"id":"predicate","dynamic":true},{"id":"recipe","dynamic":true},{"id":"recipe_serializer"},{"id":"rule_test","minVersion":"1.16"},{"id":"sound_event"},{"id":"stat_type"},{"id":"structure","dynamic":true},{"id":"tag/block","dynamic":true},{"id":"tag/entity_type","dynamic":true},{"id":"tag/fluid","dynamic":true},{"id":"tag/function","dynamic":true},{"id":"tag/item","dynamic":true},{"id":"worldgen/biome","dynamic":true},{"id":"worldgen/block_state_provider_type","minVersion":"1.16"},{"id":"worldgen/block_placer_type","minVersion":"1.16","maxVersion":"1.17"},{"id":"worldgen/biome_source","minVersion":"1.16"},{"id":"worldgen/carver","minVersion":"1.16"},{"id":"worldgen/chunk_generator","minVersion":"1.16"},{"id":"worldgen/configured_carver","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_decorator","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_feature","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_structure_feature","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_surface_builder","minVersion":"1.16","dynamic":true},{"id":"worldgen/decorator","minVersion":"1.16"},{"id":"worldgen/feature","minVersion":"1.16"},{"id":"worldgen/feature_size_type","minVersion":"1.16"},{"id":"worldgen/foliage_placer_type","minVersion":"1.16"},{"id":"worldgen/noise_settings","minVersion":"1.16","dynamic":true},{"id":"worldgen/processor_list","minVersion":"1.16","dynamic":true},{"id":"worldgen/structure_feature","minVersion":"1.16"},{"id":"worldgen/structure_pool_element","minVersion":"1.16"},{"id":"worldgen/structure_processor","minVersion":"1.16"},{"id":"worldgen/surface_builder","minVersion":"1.16"},{"id":"worldgen/template_pool","minVersion":"1.16","dynamic":true},{"id":"worldgen/tree_decorator_type","minVersion":"1.16"},{"id":"worldgen/trunk_placer_type","minVersion":"1.16"},{"id":"biome","maxVersion":"1.15"},{"id":"worldgen/biome","minVersion":"1.16","path":"processed/reports/biomes"}]}');function H({type:e,id:t}){return c((()=>{var e;null==(e=document.getElementById("ad-placeholder"))||e.remove(),"ethicalads"in window&ðicalads.load()}),[]),d("div",{"data-ea-publisher":"misode-github-io","data-ea-type":e,class:"ad dark flat",id:t})}function R({icon:e,label:t,active:n,class:o,tooltip:r,tooltipLoc:a,onClick:i}){return d("div",{class:`btn${n?" active":""}${o?` ${o}`:""}${r?` tooltipped tip-${null!=a?a:"sw"}`:""}`,onClick:i,"aria-label":r},e&&Y[e],t&&d("span",null,t))}function F({icon:e,label:t,large:n,doSelect:o,value:r,placeholder:a,onChange:i}){const s=void 0===i?()=>{}:e=>{const t=e.target.value;null==i||i(t)},l=u(null);return c((()=>{o&&l.current&&l.current.select()}),[o]),d("div",{class:"btn btn-input "+(n?"large-input":""),onClick:e=>e.stopPropagation()},e&&Y[e],t&&d("span",null,t),d("input",{ref:l,type:"text",value:r,onChange:s,placeholder:a}))}function J({size:e,draw:t,onDrag:n,onHover:o,onLeave:r},a){const i=u(null),s=u(),l=u(),d=u([0,0]),h=u(!1);c((()=>{const e=e=>{s.current=[e.offsetX,e.offsetY]},t=e=>{if(void 0===s.current){const t=e.offsetX/i.current.clientWidth,n=e.offsetY/i.current.clientHeight;return void(null==o||o(t,n))}if(!n)return;const t=e.offsetX-s.current[0],r=e.offsetY-s.current[1];0===t&&0===r||(d.current=[d.current[0]+t,d.current[1]+r],h.current||(cancelAnimationFrame(l.current),l.current=requestAnimationFrame((async()=>{h.current=!0;const e=d.current[0]/i.current.clientWidth,t=d.current[1]/i.current.clientHeight;d.current=[0,0],await(null==n?void 0:n(e,t)),h.current=!1})))),s.current=[e.offsetX,e.offsetY]},a=()=>{s.current=void 0},c=()=>{null==r||r()};return i.current.addEventListener("mousedown",e),i.current.addEventListener("mousemove",t),i.current.addEventListener("mouseleave",c),document.body.addEventListener("mouseup",a),()=>{var n,o,r;null==(n=i.current)||n.removeEventListener("mousedown",e),null==(o=i.current)||o.removeEventListener("mousemove",t),null==(r=i.current)||r.removeEventListener("mouseleave",c),document.body.removeEventListener("mouseup",a)}}),[...null!=a?a:[],i.current]);const m=u(),p=u(0);return m.current=async()=>{const n=i.current.getContext("2d"),o=e();i.current.width=o[0],i.current.height=o[1];const r=n.getImageData(0,0,o[0],o[1]),a=p.current+=1;await t(r),a===p.current&&n.putImageData(r,0,0)},{canvas:i,redraw:m.current}}function W(){const[e,t]=h(!1),n=()=>{t(!1)};return c((()=>(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 G(e,t){const n={invalidated(){e&&t(e)}};c((()=>(null==e||e.addListener(n),()=>{null==e||e.removeListener(n)})),[e])}function U({icon:e,label:t,relative:n,tooltip:o,children:r}){const[a,i]=W();return d("div",{class:"btn-menu"+(!1===n?" no-relative":"")},d(R,l(s({},{icon:e,label:t,tooltip:o}),{onClick:i})),a&&d("div",{class:"btn-group"},r))}!function(e){const t="Site",n="Generator";function o(e,t,n){ga("send","event",e,t,n)}function r(e,t){ga("set",`dimension${e}`,t)}e.pageview=function(e){ga("set","page",e),ga("send","pageview")},e.setLanguage=function(e){r(4,e),o(t,"set-language",e)},e.setTheme=function(e){r(1,e),o(t,"set-theme",e)},e.setVersion=function(e){r(3,e),o(n,"set-version",e)},e.setPreview=function(e){r(5,e),o(n,"set-preview",e)},e.generatorEvent=function(e,t){o(n,e,t)}}(T||(T={}));const Y={alert:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),download:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"}),d("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"}),d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),gear:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),mark_github:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),search:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),sun:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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 Z({error:e,onDismiss:t}){return d("div",{class:"error"},t&&d("div",{class:"error-dismiss",onClick:t},Y.x),d("h3",null,e),d("p",null,"If you think this is a bug, you can report it ",d("a",{href:"https://github.com/misode/misode.github.io/issues/new",target:"_blank"},"on GitHub")))}function K(e,t,n){const o=e=>{const o=e.onChange&&(t=>{var o;const r=t.target.value;null==(o=e.onChange)||o.call(e,n(r))}),r=e.onEnter&&(t=>{var o;if("Enter"===t.key){const r=t.target.value;null==(o=e.onEnter)||o.call(e,n(r))}});return d("input",s(s({},e),{type:t,onChange:o,onKeyDown:r}))};return o.displayName=e,o}const X=K("TextInput","text",(e=>e)),q=K("NumberInput","number",(e=>Number(e))),Q=K("RangeInput","range",(e=>Number(e)));let ee;const te={},ne=function(e,t){if(!t)return e();if(void 0===ee){const e=document.createElement("link").relList;ee=e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"}return Promise.all(t.map((e=>{if(e in te)return;te[e]=!0;const t=e.endsWith(".css"),n=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${n}`))return;const o=document.createElement("link");return o.rel=t?"stylesheet":ee,t||(o.as="script",o.crossOrigin=""),o.href=e,document.head.appendChild(o),t?new Promise(((e,t)=>{o.addEventListener("load",e),o.addEventListener("error",t)})):void 0}))).then((()=>e()))};var oe=JSON.parse('{"add":"Add","add_bottom":"Add to bottom","add_top":"Add to top","advancement":"Advancement","collapse":"Collapse","collapse_all":"Hold %0% to collapse all","copy":"Copy","copied":"Copied!","copy_context":"Copy context","dimension_type":"Dimension Type","dimension":"Dimension","download":"Download","duplicate":"Duplicate","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","fields":"Fields","generate_new_seed":"Generate new seed","github":"GitHub","hide_output":"Hide JSON output","hide_preview":"Hide preview","home":"Home","import":"Import","indentation.2_spaces":"2 spaces","indentation.4_spaces":"4 spaces","indentation.tabs":"Tabs","item_modifier":"Item Modifier","language":"Language","loot_table":"Loot Table","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":"JSON output settings","predicate":"Predicate","recipe":"Recipe","redo":"Redo","reset":"Reset","settings":"Settings","settings.fields.description":"Customize advanced field settings","settings.fields.path":"Context","settings.fields.name":"Name","share":"Share","theme":"Theme","theme.dark":"Dark","theme.light":"Light","theme.system":"System","title.generator":"%0% Generator","title.generator_category":"%0% Generators","title.home":"Data Pack Generators","title.sounds":"Sound Explorer","presets":"Presets","preview":"Visualize","preview.scale":"Scale","preview.depth":"Depth","preview.factor":"Factor","preview.offset":"Offset","preview.peaks":"Peaks","preview.width":"Width","remove":"Remove","search":"Search","show_output":"Show JSON 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 JSON content here","switch_generator":"Switch generator","terrain_settings":"Terrain settings","undo":"Undo","world":"World Settings","worldgen":"Worldgen","worldgen/biome":"Biome","worldgen/configured_carver":"Carver","worldgen/configured_feature":"Feature","worldgen/noise_settings":"Noise Settings","worldgen/processor_list":"Processor List","worldgen/configured_structure_feature":"Structure Feature","worldgen/configured_surface_builder":"Surface Builder","worldgen/template_pool":"Template Pool","zoom_in":"Zoom in","zoom_out":"Zoom out"}'),re=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:oe});const ae={fallback:oe};function ie(e,t,...n){var o,r,a,i,s;return function(e,t){return e.replace(/%\d+%/g,(e=>{const n=parseInt(e.slice(1,-1));return void 0!==(null==t?void 0:t[n])?t[n]:e}))}(null!=(s=null!=(i=null!=(a=null==(o=ae[e])?void 0:o[t])?a:null==(r=ae.en)?void 0:r[t])?i:ae.fallback[t])?s:t,n)}async function se(e){const t=B.languages.find((t=>t.code===e));if(!t)return;const n=await function(e){switch(e){case"../locales/de.json":return ne((()=>import("./de.1d005dc8.js")),void 0);case"../locales/en.json":return ne((()=>Promise.resolve().then((function(){return re}))),void 0);case"../locales/es.json":return ne((()=>import("./es.d3abba45.js")),void 0);case"../locales/fr.json":return ne((()=>import("./fr.f5531eea.js")),void 0);case"../locales/it.json":return ne((()=>import("./it.fd9a8268.js")),void 0);case"../locales/ja.json":return ne((()=>import("./ja.8c79487c.js")),void 0);case"../locales/pl.json":return ne((()=>import("./pl.3a9fb38c.js")),void 0);case"../locales/pt.json":return ne((()=>import("./pt.689bba1d.js")),void 0);case"../locales/ru.json":return ne((()=>import("./ru.6f24253b.js")),void 0);case"../locales/sk.json":return ne((()=>import("./sk.69c71daa.js")),void 0);case"../locales/zh-cn.json":return ne((()=>import("./zh-cn.0d8d64ad.js")),void 0);case"../locales/zh-tw.json":return ne((()=>import("./zh-tw.59e068b2.js")),void 0);default:return Promise.reject(new Error("Unknown variable dynamic import: "+e))}}(`../locales/${e}.json`),o=!1!==t.schemas&&await function(e){switch(e){case"../../node_modules/@mcschema/locales/src/de.json":return ne((()=>import("./de.f9c3209c.js")),void 0);case"../../node_modules/@mcschema/locales/src/en.json":return ne((()=>import("./en.c831bdaf.js")),void 0);case"../../node_modules/@mcschema/locales/src/es.json":return ne((()=>import("./es.c83d9c73.js")),void 0);case"../../node_modules/@mcschema/locales/src/fr.json":return ne((()=>import("./fr.9b3a1c69.js")),void 0);case"../../node_modules/@mcschema/locales/src/it.json":return ne((()=>import("./it.7ff123cd.js")),void 0);case"../../node_modules/@mcschema/locales/src/ja.json":return ne((()=>import("./ja.4ae430b9.js")),void 0);case"../../node_modules/@mcschema/locales/src/pl.json":return ne((()=>import("./pl.01cb20df.js")),void 0);case"../../node_modules/@mcschema/locales/src/pt.json":return ne((()=>import("./pt.31e14993.js")),void 0);case"../../node_modules/@mcschema/locales/src/ru.json":return ne((()=>import("./ru.92df5b59.js")),void 0);case"../../node_modules/@mcschema/locales/src/zh-cn.json":return ne((()=>import("./zh-cn.7cd3f35b.js")),void 0);case"../../node_modules/@mcschema/locales/src/zh-tw.json":return ne((()=>import("./zh-tw.bae62b5e.js")),void 0);default:return Promise.reject(new Error("Unknown variable dynamic import: "+e))}}(`../../node_modules/@mcschema/locales/src/${e}.json`);ae[e]=s(s({},n.default),o.default)}function le(e){return"object"==typeof e&&null!==e}const ce=e=>("0"+e.toString(16)).substr(-2);function de(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,ce).join("")}function ue(){return BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))}function he(e){const t=Math.floor(4294967296*Math.random())-2147483648,n=e.get(new p.Path(["dimensions"]));e.set(new p.Path(["seed"]),t,!0),"object"==typeof n&&null!==n&&Object.keys(n).forEach((n=>{e.set(new p.Path(["dimensions",n,"generator","seed"]),t,!0),e.set(new p.Path(["dimensions",n,"generator","biome_source","seed"]),t,!0)})),e.set(new p.Path(["generator","seed"]),t,!0),e.set(new p.Path(["generator","biome_source","seed"]),t)}function me(e){return`/${e}/`.replaceAll("//","/")}function pe(e){const t=e.replace(/^\//,"").replace(/\/$/,"");return B.generators.find((e=>e.url===t))}function ge(e){const t=Math.abs(function(e){let t=0;for(let n=0;n>8)%256,(t>>16)%256]}function fe(e){return e*e}function ve(e,t,n){return Math.max(e,Math.min(t,n))}function _e(e,t,n){return n<0?e:n>1?t:we(n,e,t)}function we(e,t,n){return t+e*(n-t)}function ye(e){return e instanceof Error?e.message:`${e}`}const be=m();function xe(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;let n,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=0;o{try{const t=Ae[e].getCollections(),n={};await async function(e,t,n){const o=B.versions.find((t=>t.id===e));if(!o)return void console.error(`[fetchData] Unknown version ${o} in ${JSON.stringify(B.versions)}`);console.debug(`[fetchData] ${JSON.stringify(o)}`),o.dynamic&&await Promise.all(Oe.filter((e=>localStorage.getItem(`cached_${e.id}`)!==e.hash)).map((async e=>{console.debug(`[deleteMatching] ${e.id} '${localStorage.getItem(`cached_${e.id}`)}' < '${e.hash}' ${e.url}/${o.refs[e.id]}`),await async function(e){try{const t=await caches.open("misode-v1");console.debug("[deleteMatching] Opened cache misode-v1");const n=[];for(const o of await t.keys())e(o.url)&&n.push(t.delete(o));console.debug(`[deleteMatching] Removing ${n.length} cache objects...`),await Promise.all(n)}catch(t){console.warn(`[deleteMatching] Failed to open cache misode-v1: ${ye(t)}`)}}((t=>t.startsWith(`${e.url}/${o.refs[e.id]}`))),console.debug(`[deleteMatching] Done! ${e.id} ${e.hash} '${localStorage.getItem(`cached_${e.id}`)}'`),localStorage.setItem(`cached_${e.id}`,e.hash),console.debug(`[deleteMatching] Set! ${e.id} ${e.hash} '${localStorage.getItem(`cached_${e.id}`)}'`)})));await Promise.all([Le(o,t),Se(o,n),Pe(o,t)])}(e,t,n);const o=Ae[e].getSchemas(t);return Ce[e]={collections:t,schemas:o,blockStates:n},Ce[e]}catch(t){throw new Error(`Cannot get version "${e}": ${ye(t)}`)}})()),Ce[e]}function Ve(e,t,n){const o=B.versions.findIndex((t=>t.id===e)),r=t?B.versions.findIndex((e=>e.id===t)):0,a=n?B.versions.findIndex((e=>e.id===n)):B.versions.length-1;return r<=o&&o<=a}["1.15","1.16","1.17"].forEach((e=>localStorage.removeItem(`cache_${e}`)));const je="https://raw.githubusercontent.com/Arcensoth/mcdata",$e="https://raw.githubusercontent.com/SPGoding/vanilla-datapack",Oe=[{id:"mcdata_master",hash:"73e1d6160d2d99e387ee8fd94616e91a34823cce",url:je},{id:"vanilla_datapack_summary",hash:"acb5c750f739201a651d54d33f0711c20c6c11ec",url:$e}];async function Le(e,t){console.debug(`[fetchRegistries] ${e.id}`);const n=B.registries.filter((e=>!e.dynamic)).filter((t=>Ve(e.id,t.minVersion,t.maxVersion)));if(Ve(e.id,void 0,"1.15")){const r=`${je}/${e.refs.mcdata_master}/generated/reports/registries.json`;try{const e=await Te(r,(e=>{const t={};return Object.keys(e).forEach((n=>{t[n.slice(10)]=Object.keys(e[n].entries)})),t}));n.forEach((n=>{var o;t.register(n.id,null!=(o=e[n.id])?o:[])}))}catch(o){console.warn("Error occurred while fetching registries:",ye(o))}}else await Promise.all(n.map((async n=>{try{const o=n.path?`${je}/${e.refs.mcdata_master}/${n.path}/data.min.json`:`${je}/${e.refs.mcdata_master}/processed/reports/registries/${n.id}/data.min.json`;t.register(n.id,await Te(o,(e=>e.values)))}catch(o){console.warn(`Error occurred while fetching registry ${n.id}:`,ye(o))}})))}async function Se(e,t){if(console.debug(`[fetchBlockStateMap] ${e.id}`),Ve(e.id,void 0,"1.16")){const o=Ve(e.id,void 0,"1.15")?`${je}/${e.refs.mcdata_master}/generated/reports/blocks.json`:`${je}/${e.refs.mcdata_master}/processed/reports/blocks/data.min.json`;try{const e=await Te(o,(e=>{const t={};return Object.keys(e).forEach((n=>{t[n]={properties:e[n].properties,default:e[n].states.find((e=>e.default)).properties}})),t}));Object.assign(t,e)}catch(n){console.warn("Error occurred while fetching block state map:",ye(n))}}else{const o=`${je}/${e.refs.mcdata_master}/processed/reports/blocks/simplified/data.min.json`;try{const e=await Te(o);Object.assign(t,e)}catch(n){console.warn("Error occurred while fetching block state map:",ye(n))}}}async function Pe(e,t){console.debug(`[fetchDynamicRegistries] ${e.id}`);const n=B.registries.filter((e=>e.dynamic)).filter((t=>Ve(e.id,t.minVersion,t.maxVersion)));if(Ve(e.id,"1.16")){const r=`${$e}/${e.refs.vanilla_datapack_summary}/summary/flattened.min.json`;try{const e=await Te(r);n.forEach((n=>{t.register(n.id,e[n.id])}))}catch(o){console.warn("Error occurred while fetching dynamic registries:",ye(o))}}}async function De(e,t,n){console.debug(`[fetchPreset] ${t} ${n}`);const o=B.versions.find((t=>t.id===e));try{const e=`${$e}/${o.refs.vanilla_datapack_data}/data/minecraft/${t}/${n}.json`,r=await fetch(e);return await r.json()}catch(r){console.warn(`Error occurred while fetching ${t} preset ${n}:`,ye(r))}}function Ne(e){return`https://misode-cors-anywhere.herokuapp.com/https://resources.download.minecraft.net/${e.slice(0,2)}/${e}`}async function Te(e,t=(e=>e)){try{const n=await caches.open("misode-v1");console.debug(`[getData] Opened cache misode-v1 ${e}`);const o=await n.match(e);if(o&&o.ok)return console.debug(`[getData] Retrieving cached data ${e}`),await o.json();console.debug(`[getData] fetching data ${e}`);const r=await fetch(e),a=t(await r.json());return await n.put(e,new Response(JSON.stringify(a))),a}catch(n){console.warn(`[getData] Failed to open cache misode-v1: ${ye(n)}`),console.debug(`[getData] fetching data ${e}`);const o=await fetch(e);return t(await o.json())}}let Be,He,Re;async function Fe(e,t){const n=[e,t.octaves,`${t.seed}`,t.version];if(!xe(n,Be)){Be=be(n),He=await async function(e,t){var n,o,r,a,i;switch(null==(n=null==e?void 0:e.type)?void 0:n.replace(/^minecraft:/,"")){case"fixed":return new C(e.biome);case"checkerboard":const n=(null!=(o=e.scale)?o:2)+2,s=null!=(a=null==(r=e.biomes)?void 0:r.length)?a:0;return{getBiome(t,o,r){var a;const i=(((t>>n)+(r>>n))%s+s)%s;return null==(a=e.biomes)?void 0:a[i].node}};case"multi_noise":switch(null==(i=e.preset)?void 0:i.replace(/^minecraft:/,"")){case"nether":e="1.18"===t.version?Ue:Ge;break;case"overworld":e="1.18"===t.version?await async function(){return(await De("1.18","dimension","overworld")).generator.biome_source}():e}if(e=p.DataModel.unwrapLists(e),"1.18"===t.version)return b.fromJson(e);{const n=["altitude","temperature","humidity","weirdness"].map(((n,o)=>{var r;const a=e[`${n}_noise`];return a.firstOctave=ve(null!=(r=a.firstOctave)?r:-7,-100,-1),new x(new k(t.seed+BigInt(o)),a)}));return Array.isArray(e.biomes)&&0!==e.biomes.length?{getBiome(t,o,r){const a=n.map((e=>e.sample(t,r,0)));let i=1/0,s="";for(const{biome:n,parameters:l}of e.biomes){const e=fe(l.altitude-a[0])+fe(l.temperature-a[1])+fe(l.humidity-a[2])+fe(l.weirdness-a[3])+fe(l.offset);eo.nextFloat(),nextInt:e=>o.nextInt(e),sampleInt(e){return Qe(e,this)}};for(let i=0;i=n.size[0]||i[1]>=n.size[1]||i[2]>=n.size[2])continue;const e=i[2]*(4*t.width)+4*i[0],o=s{nt(t,null==e?void 0:e.decorator,n).forEach((t=>tt(t,null==e?void 0:e.feature,n)))},random_boolean_selector:(e,t,n)=>{tt(t,n.nextFloat()<.5?null==e?void 0:e.feature_true:null==e?void 0:e.feature_false,n)},random_selector:(e,t,n)=>{var o,r;for(const a of null!=(o=null==e?void 0:e.features)?o:[])if(n.nextFloat()<(null!=(r=null==a?void 0:a.chance)?r:0))return void tt(t,a.feature,n);tt(t,null==e?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var o,r,a;tt(t,null==(a=null==e?void 0:e.features)?void 0:a[n.nextInt(null!=(r=null==(o=null==e?void 0:e.features)?void 0:o.length)?r:0)],n)}},rt={chance:(e,t,n)=>{var o;return n.nextFloat()<1/(null!=(o=null==e?void 0:e.chance)?o:1)?[t]:[]},count:(e,t,n)=>{var o;return new Array(n.sampleInt(null!=(o=null==e?void 0:e.count)?o:1)).fill(t)},count_extra:(e,t,n)=>{var o,r;let a=null!=(o=null==e?void 0:e.count)?o:1;return n.nextFloat(){var o;return new Array(n.sampleInt(null!=(o=null==e?void 0:e.count)?o:1)).fill(t).map((e=>[e[0]+n.nextInt(16),e[1],e[2]+n.nextInt(16)]))},count_noise:(e,t,n)=>{const o=n.biomeInfoNoise.sample(t[0]/200,0,t[2]/200){var o;const r=Math.max(1,e.noise_factor),a=n.biomeInfoNoise.sample(t[0]/r,0,t[2]/r),i=Math.max(0,Math.ceil((a+(null!=(o=e.noise_offset)?o:0))*e.noise_to_count_ratio));return new Array(i).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map(((e,o)=>{const r=4*Math.floor(o/4)+1+n.nextInt(3)+t[0];return[r,Math.max(n.seaLevel,Ye[ve(0,63,r)]),4*Math.floor(o%4)+1+n.nextInt(3)+t[2]]})),decorated:(e,t,n)=>nt(t,null==e?void 0:e.outer,n).flatMap((t=>nt(t,null==e?void 0:e.inner,n))),depth_average:(e,t,n)=>{var o,r,a,i;return qe(t,n.nextInt(null!=(o=null==e?void 0:e.spread)?o:0)+n.nextInt(null!=(r=null==e?void 0:e.spread)?r:0)-(null!=(a=e.spread)?a:0)+(null!=(i=null==e?void 0:e.baseline)?i:0))},emerald_ore:(e,t,n)=>{const o=3+n.nextInt(6);return[...new Array(o)].map((()=>[t[0]+n.nextInt(16),4+n.nextInt(28),t[2]+n.nextInt(16)]))},fire:(e,t,n)=>{const o=1+n.nextInt(n.nextInt(n.sampleInt(null==e?void 0:e.count)));return[...new Array(o)].map((()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)]))},glowstone:(e,t,n)=>{const o=n.nextInt(1+n.nextInt(n.sampleInt(null==e?void 0:e.count)));return[...new Array(o)].map((()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)]))},heightmap:(e,t,n)=>qe(t,Math.max(n.seaLevel,Ye[ve(0,63,t[0])])),heightmap_spread_double:(e,t,n)=>{const o=Math.max(n.seaLevel,Ye[ve(0,63,t[0])]);return qe(t,n.nextInt(2*o))},heightmap_world_surface:(e,t,n)=>qe(t,Math.max(n.seaLevel,Ye[ve(0,63,t[0])])),iceberg:(e,t,n)=>[[t[0]+4+n.nextInt(8),t[1],t[2]+4+n.nextInt(8)]],lava_lake:(e,t,n)=>{var o,r;if(0===n.nextInt((null!=(o=e.chance)?o:1)/10)){const o=n.nextInt(n.nextInt(248)+8);if(o[t],range:(e,t,n)=>{var o,r,a;return qe(t,n.nextInt((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0))+(null!=(a=null==e?void 0:e.bottom_offset)?a:0))},range_biased:(e,t,n)=>{var o,r,a;return qe(t,n.nextInt(n.nextInt((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0))+(null!=(a=null==e?void 0:e.bottom_offset)?a:0)))},range_very_biased:(e,t,n)=>{var o,r,a,i;return qe(t,n.nextInt(n.nextInt(n.nextInt((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0))+(null!=(a=null==e?void 0:e.bottom_offset)?a:0))+(null!=(i=null==e?void 0:e.bottom_offset)?i:0)))},spread_32_above:(e,t,n)=>qe(t,n.nextInt(t[1]+32)),top_solid_heightmap:(e,t)=>qe(t,Ye[ve(0,63,t[0])]),magma:(e,t,n)=>qe(t,n.nextInt(t[1]+32)),square:(e,t,n)=>[[t[0]+n.nextInt(16),t[1],t[2]+n.nextInt(16)]],surface_relative_threshold:(e,t)=>{var n,o;const r=Ye[ve(0,63,t[0])],a=r+(null!=(n=null==e?void 0:e.min_inclusive)?n:-1/0),i=r+(null!=(o=null==e?void 0:e.max_inclusive)?o:1/0);return t[1]i?[t]:[]},water_lake:(e,t,n)=>{var o;return 0===n.nextInt(null!=(o=e.chance)?o:1)?[[t[0]+n.nextInt(16),n.nextInt(256),t[2]+n.nextInt(16)]]:[]}};class at{constructor(e){this.settings={},this.chunkWidth=4,this.chunkHeight=4,this.chunkCountY=32,this.biomeDepth=.1,this.biomeScale=.2,this.noiseColumnCache=[],this.xOffset=0;const t=new k(e);this.minLimitPerlinNoise=new M(t,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.maxLimitPerlinNoise=new M(t,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.mainPerlinNoise=new M(t,-7,[1,1,1,1,1,1,1,1]),this.depthNoise=new M(t,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])}reset(e,t,n,o,r){this.settings=e,this.chunkWidth=4*e.size_horizontal,this.chunkHeight=4*e.size_vertical,this.chunkCountY=Math.floor(e.height/this.chunkHeight),e.amplified&&t>0&&(t=1+2*t,n=1+4*n),this.biomeDepth=.265625*(.5*t-.125),this.biomeScale=96/(.9*n+.1),this.noiseColumnCache=Array(r).fill(null),this.xOffset=o}iterateNoiseColumn(e){const t=Array(this.chunkCountY*this.chunkHeight),n=Math.floor(e/this.chunkWidth),o=Math.floor(e%this.chunkWidth)/this.chunkWidth,r=this.fillNoiseColumn(n),a=this.fillNoiseColumn(n+1);for(let h=this.chunkCountY-1;h>=0;h-=1)for(let e=this.chunkHeight;e>=0;e-=1){const n=e/this.chunkHeight;t[h*this.chunkHeight+e]=(i=n,s=o,l=r[h],c=r[h+1],d=a[h],u=a[h+1],we(s,we(i,l,c),we(i,d,u)))}var i,s,l,c,d,u;return t}fillNoiseColumn(e){const t=this.noiseColumnCache[e-this.xOffset];if(t)return t;const n=Array(this.chunkCountY+1),o=684.412*this.settings.sampling.xz_scale,r=684.412*this.settings.sampling.y_scale,a=o/this.settings.sampling.xz_factor,i=r/this.settings.sampling.y_factor,s=this.settings.random_density_offset?this.getRandomDensity(e):0;for(let l=0;l<=this.chunkCountY;l+=1){let t=this.sampleAndClampNoise(e,l,this.mainPerlinNoise.getOctaveNoise(0).zo,o,r,a,i);const c=((1-2*l/this.chunkCountY+s)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;t+=c*(c>0?4:1),this.settings.top_slide.size>0&&(t=_e(this.settings.top_slide.target,t,(this.chunkCountY-l-this.settings.top_slide.offset)/this.settings.top_slide.size)),this.settings.bottom_slide.size>0&&(t=_e(this.settings.bottom_slide.target,t,(l-this.settings.bottom_slide.offset)/this.settings.bottom_slide.size)),n[l]=t}return this.noiseColumnCache[e-this.xOffset]=n,n}getRandomDensity(e){const t=this.depthNoise.sample(200*e,10,this.depthNoise.getOctaveNoise(0).zo,1,0,!0),n=24.575625*(t<0?.3*-t:t)-2;return n<0?.009486607142857142*n:.006640625*Math.min(n,1)}sampleAndClampNoise(e,t,n,o,r,a,i){let s=0,l=0,c=0,d=1;for(let u=0;u<16;u+=1){const h=M.wrap(e*o*d),m=M.wrap(t*r*d),p=M.wrap(n*o*d),g=r*d,f=this.minLimitPerlinNoise.getOctaveNoise(u);f&&(s+=f.sample(h,m,p,g,t*g)/d);const v=this.maxLimitPerlinNoise.getOctaveNoise(u);if(v&&(l+=v.sample(h,m,p,g,t*g)/d),u<8){const o=this.mainPerlinNoise.getOctaveNoise(u);o&&(c+=o.sample(M.wrap(e*a*d),M.wrap(t*i*d),M.wrap(n*a*d),i*d,t*i*d)/d)}d/=2}return _e(s/512,l/512,(c/10+1)/2)}}const it={"minecraft:air":[150,160,170],"minecraft:water":[20,80,170],"minecraft:lava":[200,100,0],"minecraft:stone":[50,50,50],"minecraft:netherrack":[100,40,40],"minecraft:end_stone":[200,200,140]};let st,lt,ct=[];function dt(e,t,n){var o;if(Ve(n.version,"1.18")){const{settings:r,generator:a}=function(e,t){const n=w.fromJson(p.DataModel.unwrapLists(e));n.noise.bottomSlide.target*=128,n.noise.topSlide.target*=128;const o={factor:t.biomeFactor,offset:t.biomeOffset,peaks:t.biomePeaks,nearWater:!1},r=[e,o,`${t.seed}`];if(!xe(r,st)){st=be(r),ct=[];const e=new C("unknown");lt=new A(t.seed,e,n,o)}return{settings:n,generator:lt}}(e,n),i=new ht(-n.offset,n.width,r.noise.minY,r.noise.height);i.fill(a);const s=t.data;for(let e=0;e0?0:e[t+1]>0?150:255}class ht{constructor(e,t,n,o){this.minX=e,this.filled=[],this.chunks=[...Array(Math.ceil(t/16)+1)].map(((t,r)=>{const a=(e>>4)+r,i=ct.find((e=>e.pos[0]===a));return i?(this.filled[r]=!0,i):new z(n,o,E.create(a,0))}))}fill(e){this.chunks.forEach(((t,n)=>{this.filled[n]||(e.fill(t),this.filled[n]=!0,ct.push(t))}))}getBlockState(e){const t=(e[0]>>4)-(this.minX>>4);return this.chunks[t].getBlockState(e)}}const mt=({model:e,data:t,shown:n,lang:o,version:r})=>{var a;const[i,s]=h(2),[l,m]=h(void 0),g=u([0,0]),f=u(1),v=u(void 0),_=BigInt(e.get(new p.Path(["generator","seed"]))),y=function(e){if("string"==typeof e)switch(e.replace(/^minecraft:/,"")){case"overworld":case"amplified":return{temperature:{firstOctave:-9,amplitudes:[1.5,0,1,0,0,0]},humidity:{firstOctave:-7,amplitudes:[1,1,0,0,0,0]},continentalness:{firstOctave:-9,amplitudes:[1,1,2,2,2,1,1,1,1]},erosion:{firstOctave:-9,amplitudes:[1,1,0,1,1]},weirdness:{firstOctave:-7,amplitudes:[1,2,1,0,0,0]},shift:{firstOctave:-3,amplitudes:[1,1,1,0]}};case"end":case"floating_islands":return{temperature:{firstOctave:0,amplitudes:[0]},humidity:{firstOctave:0,amplitudes:[0]},continentalness:{firstOctave:0,amplitudes:[0]},erosion:{firstOctave:0,amplitudes:[0]},weirdness:{firstOctave:0,amplitudes:[0]},shift:{firstOctave:0,amplitudes:[0]}};default:return{temperature:{firstOctave:-7,amplitudes:[1,1]},humidity:{firstOctave:-7,amplitudes:[1,1]},continentalness:{firstOctave:-7,amplitudes:[1,1]},erosion:{firstOctave:-7,amplitudes:[1,1]},weirdness:{firstOctave:-7,amplitudes:[1,1]},shift:{firstOctave:0,amplitudes:[0]}}}return w.fromJson(e).octaves}(e.get(new p.Path(["generator","settings"]))),b=n?function(e,t){return JSON.stringify([e,t])}(t,y):"",x=null==(a=t.type)?void 0:a.replace(/^minecraft:/,""),{canvas:k,redraw:C}=J({size:()=>[200/f.current,200/f.current],async draw(e){const n={octaves:y,biomeColors:{},offset:g.current,scale:i,seed:_,res:f.current,version:r};await async function(e,t,n){const{biomeSource:o,climateSampler:r}=await Fe(e,n),a=t.data,i=-n.offset[0]-100+n.res/2,s=-n.offset[1]-100+n.res/2,l=4*t.width/n.res,c=4/n.res;for(let d=0;d<200;d+=n.res)for(let e=0;e<200;e+=n.res){const t=e*l+d*c,u=(d+i)*n.scale,h=(e+s)*n.scale,m=Je(o.getBiome(u,64,h,r),n.biomeColors);a[t]=m[0],a[t+1]=m[1],a[t+2]=m[2],a[t+3]=255}}(t,e,n),4===f.current&&(clearTimeout(v.current),v.current=setTimeout((()=>{f.current=1,C()}),150))},async onDrag(e,t){g.current[0]=g.current[0]+200*e,g.current[1]=g.current[1]+200*t,clearTimeout(v.current),f.current="multi_noise"===x?4:1,C()},async onHover(e,n){const o={octaves:y,biomeColors:{},offset:g.current,scale:i,seed:_,res:1,version:r},a=await async function(e,t,n,o){const{biomeSource:r,climateSampler:a}=await Fe(e,o),[i,s]=function([e,t],n){return[(e-n.offset[0]-100+n.res/2)*n.scale,(t-n.offset[1]-100+n.res/2)*n.scale]}([t,n],o);return r.getBiome(i,64,s,a)}(t,Math.floor(200*e),Math.floor(200*n),o);m(a)},onLeave(){m(void 0)}},[b,i,_]);c((()=>{n&&(f.current="multi_noise"===x?4:1,C())}),[b,i,_,n]);const M=e=>{g.current[0]=g.current[0]*i/e,g.current[1]=g.current[1]*i/e,s(e)};return d(I,null,d("div",{class:"controls"},l&&d(R,{label:l,class:"no-pointer"}),("multi_noise"===x||"checkerboard"===x)&&d(I,null,d(R,{icon:"dash",tooltip:ie(o,"zoom_out"),onClick:()=>M(1.5*i)}),d(R,{icon:"plus",tooltip:ie(o,"zoom_in"),onClick:()=>M(i/1.5)})),"multi_noise"===x&&d(R,{icon:"sync",tooltip:ie(o,"generate_new_seed"),onClick:()=>he(e)})),d("canvas",{ref:k,width:"200",height:"200"}))};const pt=({data:e,version:t,shown:n,lang:o})=>{const[r,a]=h(4),[i,s]=h(ue()),{canvas:l,redraw:u}=J({size:()=>[16*r,16*r],async draw(n){Ke(e,n,{seed:i,version:t,size:[16*r,128,16*r]})}}),m=JSON.stringify(e);return c((()=>{n&&u()}),[m,r,i,n]),d(I,null,d("div",{class:"controls"},d(R,{icon:"dash",tooltip:ie(o,"zoom_out"),onClick:()=>a(Math.min(16,r+1))}),d(R,{icon:"plus",tooltip:ie(o,"zoom_in"),onClick:()=>a(Math.max(1,r-1))}),d(R,{icon:"sync",tooltip:ie(o,"generate_new_seed"),onClick:()=>s(ue())})),d("canvas",{ref:l,width:"64",height:"64"}))},gt=({lang:e,data:t,shown:n,version:o})=>{var r,a;const i=ie.bind(null,e),[s,l]=h(ue()),[m,p]=h(.2),[g,f]=h(.1),[v,_]=h(0),[w,y]=h(void 0),b=u(0),x=JSON.stringify([t,m,g,v]),k=Ve(o,"1.18");c((()=>{p(k?600:.2),f(k?.05:.1)}),[k]);const C=null!=(a=null==(r=null==t?void 0:t.noise)?void 0:r.height)?a:256,{canvas:M,redraw:A}=J({size:()=>[C,C],async draw(e){const n={biomeOffset:g,biomeFactor:m,biomePeaks:v,offset:b.current,width:e.width,seed:s,version:o};dt(t,e,n)},async onDrag(e){b.current+=e*C,A()},async onHover(e,n){var o,r;const a=C-Math.max(1,Math.ceil(n*C))+(null!=(r=null==(o=null==t?void 0:t.noise)?void 0:o.min_y)?r:0);y(`${a}`)},onLeave(){y(void 0)}},[x,s]);return c((()=>{n&&A()}),[x,s,n]),d(I,null,d("div",{class:"controls"},w&&d(R,{label:`Y = ${w}`,class:"no-pointer"}),d(U,{icon:"gear",tooltip:ie(e,"terrain_settings")},k?d(I,null,d(F,{label:i("preview.factor"),value:`${m}`,onChange:e=>p(Number(e))}),d(F,{label:i("preview.offset"),value:`${g}`,onChange:e=>f(Number(e))}),d(F,{label:i("preview.peaks"),value:`${v}`,onChange:e=>_(Number(e))})):d(I,null,d(F,{label:i("preview.scale"),value:`${m}`,onChange:e=>p(Number(e))}),d(F,{label:i("preview.depth"),value:`${g}`,onChange:e=>f(Number(e))}))),d(R,{icon:"sync",tooltip:ie(e,"generate_new_seed"),onClick:()=>l(ue())})),d("canvas",{ref:M,width:C,height:C}))},ft=["dimension","worldgen/noise_settings","worldgen/configured_feature"];function vt({lang:e,model:t,version:n,id:o,shown:r}){var a;const[,i]=h(0);if(G(t,(()=>{i((e=>e+1))})),"dimension"===o&&(null==(a=null==t?void 0:t.get(new p.Path(["generator","type"])))?void 0:a.endsWith("noise"))){const o=t.get(new p.Path(["generator","biome_source"]));if(o)return d(mt,s({},{lang:e,model:t,version:n,shown:r,data:o}))}if("worldgen/noise_settings"===o&&t){const o=t.get(new p.Path([]));if(o)return d(gt,s({},{lang:e,model:t,version:n,shown:r,data:o}))}if("worldgen/configured_feature"===o&&t){const o=t.get(new p.Path([]));if(o)return d(pt,s({},{lang:e,model:t,version:n,shown:r,data:o}))}return d(I,null)}const _t={base:({},e,t)=>t,choice({switchNode:e},t,n,o){return e.hook(this,t,n,o)},list({children:e},t,n,o){return Array.isArray(n)?n.map(((n,r)=>e.hook(this,t.push(r),n.node,o))):n},map({children:e,config:t},n,o,r){var a,i;if(void 0===o)return;const s="block_state_map"===(null==(a=t.validation)?void 0:a.validator)?null==(i=r.blockStates)?void 0:i[p.relativePath(n,t.validation.params.id).get()]:null,l={};return Object.keys(o).forEach((t=>{var a;s&&!Object.keys(null!=(a=s.properties)?a:{}).includes(t)||(l[t]=e.hook(this,n.push(t),o[t],r))})),l},object({getActiveFields:e},t,n,o){if(null==n||"object"!=typeof n)return n;const r={},a=e(t);return Object.keys(a).filter((e=>a[e].enabled(t))).forEach((e=>{r[e]=a[e].hook(this,t.push(e),n[e],o)})),r}};var wt,yt;(yt=wt||(wt={})).ID_LANGUAGE="language",yt.ID_THEME="theme",yt.ID_VERSION="schema_version",yt.ID_INDENT="indentation",yt.ID_SOUNDS_VERSION="minecraft_sounds_version",yt.getLanguage=function(){var e;return null!=(e=localStorage.getItem(yt.ID_LANGUAGE))?e:"en"},yt.getTheme=function(){var e;return null!=(e=localStorage.getItem(yt.ID_THEME))?e:"dark"},yt.getVersion=function(){const e=localStorage.getItem(yt.ID_VERSION);return e&&ke.includes(e)?e:"1.17"},yt.getIndent=function(){var e;return null!=(e=localStorage.getItem(yt.ID_INDENT))?e:"2_spaces"},yt.getSoundsVersion=function(){var e;return null!=(e=localStorage.getItem(yt.ID_SOUNDS_VERSION))?e:"latest"},yt.setLanguage=function(e){e&&localStorage.setItem(yt.ID_LANGUAGE,e)},yt.setTheme=function(e){e&&localStorage.setItem(yt.ID_THEME,e)},yt.setVersion=function(e){e&&localStorage.setItem(yt.ID_VERSION,e)},yt.setIndent=function(e){e&&localStorage.setItem(yt.ID_INDENT,e)},yt.setSoundsVersion=function(e){e&&localStorage.setItem(yt.ID_SOUNDS_VERSION,e)};const bt={"2_spaces":2,"4_spaces":4,tabs:"\t"};function xt({lang:e,name:t,model:n,blockStates:o,doCopy:r,doDownload:a,doImport:i,copySuccess:s,onError:l}){const m=ie.bind(null,e),[g,f]=h(wt.getIndent()),v=u(null),_=u(null),w=u(),y=V(((e,t)=>{const n=e.schema.hook(_t,new p.ModelPath(e),e.data,{blockStates:t});return JSON.stringify(n,null,bt[g])+"\n"}),[g]);c((()=>{w.current=()=>{if(n&&o)try{const e=y(n,o);e.length>=1e4?v.current.value=e.slice(0,1e4)+"\n\nOutput is too large to display (+10000 chars)\nExport to view complete output\n\n":v.current.value=e}catch(e){l(`Error getting JSON output: ${ye(e)}`),console.error(e),v.current.value=""}}})),G(n,(()=>{w.current()})),c((()=>{n&&w.current()}),[n]),c((()=>{w.current()}),[g]);c((()=>{r&&n&&o&&navigator.clipboard.writeText(y(n,o)).then((()=>{s()}))}),[r]),c((()=>{if(a&&v.current&&_.current){const e=encodeURIComponent(v.current.value);_.current.setAttribute("href",`data:text/json;charset=utf-8,${e}`),_.current.setAttribute("download",`${t}.json`),_.current.click()}}),[a]),c((()=>{i&&v.current&&(v.current.value="",v.current.select())}),[i]);return d(I,null,d("div",{class:"controls"},d(U,{icon:"gear",tooltip:m("output_settings")},Object.entries(bt).map((([e])=>d(R,{label:m(`indentation.${e}`),active:g===e,onClick:()=>{return t=e,wt.setIndent(t),void f(t);var t}}))))),d("textarea",{ref:v,class:"source",onBlur:()=>{try{const e=JSON.parse(v.current.value);null==n||n.reset(p.DataModel.wrapLists(e),!1)}catch(e){l(`Error importing: ${ye(e)}`),console.error(e)}},spellcheck:!1,autocorrect:"off",placeholder:m("source_placeholder")}),d("a",{ref:_,style:"display: none;"}))}class kt extends p.DataModel{constructor(e,t,n,o){super(e),this.mapper=t,this.getter=n,this.setter=o}map(e){return this.mapper(e)}get(e){return this.getter(e)}set(e,t,n){return this.setter(e,t,n)}}const Ct=["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"],Mt=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],At=["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"],zt=["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"],Et=["function.set_nbt.tag","advancement.display.icon.nbt","text_component_object.nbt","entity.nbt","block.nbt","item.nbt"],It=["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"],Vt=new p.DataModel(p.MapNode(p.StringNode(),p.StringNode()),{historyMax:0});function jt({model:e,lang:t,blockStates:n}){var o;const r=new p.ModelPath(e),[a,i,s]=e.schema.hook($t,r,be(e.data),t,n,{});return(null==(o=null==i?void 0:i.props)?void 0:o.children.some((e=>e)))?d("div",{class:`node ${e.schema.type(r)}-node`,"data-category":e.schema.category(r)},d("div",{class:"node-header"},a,i),d("div",{class:"node-body"},s)):s}const $t={base:()=>[null,null,null],boolean:(e,t,n,o,r,a)=>[null,d(St,s({},l(s({},e),{path:t,value:n,lang:o,states:r,ctx:a}))),null],choice({choices:e,config:t,switchNode:n},o,r,a,i,s){const l=n.activeCase(o,!0),c=(null==t?void 0:t.context)?new p.ModelPath(o.getModel(),new p.Path(o.getArray(),[t.context])):o,[u,h,m]=l.node.hook(this,c,r,a,i,s);if(1===e.length)return[u,h,m];const g=(null==t?void 0:t.choiceContext)?new p.Path([],[t.choiceContext]):(null==t?void 0:t.context)?new p.Path([],[t.context]):o,f=d("select",{value:l.type,onChange:n=>(n=>{var a,i,s;const c=null!=(a=e.find((e=>e.type===n)))?a:l,d=c.change?c.change(p.DataModel.unwrapLists(r)):"feature"===t.choiceContext?null==(s=null==(i=c.node.default())?void 0:i.config)?void 0:s.feature:c.node.default();o.model.set(o,p.DataModel.wrapLists(d))})(n.target.value)},e.map((e=>d("option",{value:e.type},Ht(a,g.contextPush(e.type))))));return[u,d(I,null,f,h),m]},list({children:e,config:t},n,o,r,a,i){const{expand:c,collapse:u,isToggled:m}=Lt(),[g,f]=h(50),v=n.getContext().join(".");if(It.includes(v)){return[d(I,null,[...Array(t.maxLength)].map(((e,t)=>d(Rt,{lang:r,path:n.modelPush(t)}))),d("div",{class:"fixed-list"})),d(I,null,[...Array(t.maxLength)].map(((t,s)=>{var l;return e.hook(this,n.modelPush(s),null==(l=null==o?void 0:o[s])?void 0:l.node,r,a,i)[1]}))),null]}return[null,d("button",{class:"add tooltipped tip-se","aria-label":ie(r,"add_top"),onClick:()=>{Array.isArray(o)||(o=[]);const t=p.DataModel.wrapLists(e.default());n.model.set(n,[{node:t,id:de()},...o])}},Y.plus_circle),d(I,null,o&&Array.isArray(o)&&o.map((({node:t,id:h},p)=>{if(p===g)return d("div",{class:"node node-header"},d("label",null,ie(r,"entries_hidden",""+(o.length-g))),d("button",{onClick:()=>f(Math.min(g+50,o.length))},ie(r,"entries_hidden.more","50")),d("button",{onClick:()=>f(o.length)},ie(r,"entries_hidden.all")));if(p>g)return null;const v=n.push(p).contextPush("entry"),_="object"===e.type(v),w=m(h);if(_&&(!1===w||void 0===w&&o.length>20))return d("div",{class:"node node-header","data-category":e.category(v)},d(Rt,{lang:r,path:v,nested:!0}),d("button",{class:"toggle tooltipped tip-se","aria-label":`${ie(r,"expand")}\n${ie(r,"expand_all","Ctrl")}`,onClick:c(h)},Y.chevron_right),d("label",null,Ht(r,v,`${p}`)),d(Ot,{key:h,path:v,value:t,schema:e}));return d(Nt,l(s({key:h,path:v,schema:e,value:t},{lang:r,states:a,actions:[{icon:"duplicate",label:"duplicate",onSelect:()=>{const e=[...n.get()];e.splice(p,0,{id:de(),node:be(t)}),n.model.set(n,e)}}]}),{ctx:l(s({},i),{index:(0===p?1:0)+(p===o.length-1?2:0)})}),_&&d("button",{class:"toggle tooltipped tip-se","aria-label":`${ie(r,"collapse")}\n${ie(r,"collapse_all","Ctrl")}`,onClick:u(h)},Y.chevron_down),d("button",{class:"remove tooltipped tip-se","aria-label":ie(r,"remove"),onClick:()=>v.set(void 0)},Y.trashcan),o.length>1&&d("div",{class:"node-move"},d("button",{class:"move tooltipped tip-se","aria-label":ie(r,"move_up"),onClick:()=>{const e=[...n.get()];[e[p-1],e[p]]=[e[p],e[p-1]],n.model.set(n,e)},disabled:0===p},Y.chevron_up),d("button",{class:"move tooltipped tip-se","aria-label":ie(r,"move_down"),onClick:()=>{const e=[...n.get()];[e[p+1],e[p]]=[e[p],e[p+1]],n.model.set(n,e)},disabled:p===o.length-1},Y.chevron_down)))})),o&&o.length>0&&o.length<=g&&d("div",{class:"node node-header"},d("button",{class:"add tooltipped tip-se","aria-label":ie(r,"add_bottom"),onClick:()=>{Array.isArray(o)||(o=[]);const t=p.DataModel.wrapLists(e.default());n.model.set(n,[...o,{node:t,id:de()}])}},Y.plus_circle)))]},map({children:e,keys:t,config:n},o,r,a,i,c){var u,h,m,g,f;const{expand:v,collapse:_,isToggled:w}=Lt(),y=new p.ModelPath(Vt,new p.Path([Bt(o.toString())])),b="block_state_map"===(null==(u=n.validation)?void 0:u.validator)?null==i?void 0:i[p.relativePath(o,n.validation.params.id).get()]:null,x=(null==b?void 0:b.properties)?p.StringNode(null,{enum:Object.keys(null!=(h=b.properties)?h:{})}):t;if(b&&"Properties"===o.last()){"object"!=typeof r&&(r={});const e=Object.entries(null!=(m=b.properties)?m:{}).map((([e,t])=>[e,p.StringNode(null,{enum:t})]));return Object.entries(null!=(g=b.properties)?g:{}).forEach((([e,t])=>{"string"!=typeof r[e]?o.model.errors.add(o.push(e),"error.expected_string"):t.includes(r[e])||o.model.errors.add(o.push(e),"error.invalid_enum_option",r[e])})),p.ObjectNode(Object.fromEntries(e)).hook(this,o,r,a,i,c)}return[null,d(I,null,x.hook(this,y,null!=(f=y.get())?f:"",a,i,c)[1],d("button",{class:"add tooltipped tip-se","aria-label":ie(a,"add"),onClick:()=>{const t=y.get();o.model.set(o.push(t),p.DataModel.wrapLists(e.default()))}},Y.plus_circle)),d(I,null,"object"==typeof r&&Object.entries(r).map((([t,n])=>{var u,h,m,g;const f=o.modelPush(t),y="object"===e.type(f),x=w(t);if(y&&(!1===x||void 0===x&&r.length>20))return d("div",{class:"node node-header","data-category":e.category(f)},d(Rt,{lang:a,path:f,nested:!0}),d("button",{class:"toggle tooltipped tip-se","aria-label":`${ie(a,"expand")}\n${ie(a,"expand_all","Ctrl")}`,onClick:v(t)},Y.chevron_right),d("label",null,t),d(Ot,{key:t,path:f,value:n,schema:e}));const k=b?p.StringNode(null,{enum:null!=(h=null==(u=b.properties)?void 0:u[t])?h:[]}):e;(null==(m=null==b?void 0:b.properties)?void 0:m[t])&&"string"==typeof n&&!(null==(g=b.properties)?void 0:g[t].includes(n))&&o.model.errors.add(f,"error.invalid_enum_option",n);return d(Nt,l(s({key:t,schema:k,path:f,value:n},{lang:a,states:i,ctx:c}),{label:t}),y&&d("button",{class:"toggle tooltipped tip-se","aria-label":`${ie(a,"collapse")}\n${ie(a,"collapse_all","Ctrl")}`,onClick:_(t)},Y.chevron_down),d("button",{class:"remove tooltipped tip-se","aria-label":ie(a,"remove"),onClick:()=>f.set(void 0)},Y.trashcan))})))]},number:(e,t,n,o,r,a)=>[null,d(Pt,s({},l(s({},e),{path:t,value:n,lang:o,states:r,ctx:a}))),null],object({node:e,config:t,getActiveFields:n,getChildModelPath:o},r,a,i,c,u){var h;if(0==r.getArray().length&&function(e,t){var n;return"feature"===e&&"decorated"===(null==(n=null==t?void 0:t.type)?void 0:n.replace(/^minecraft:/,""))&&le(null==t?void 0:t.config)}(t.context,a)){const{wrapper:e,fields:t}=function(e,t,n){const o=[],r=Wt(n,o),a={type:e.type,config:p.ObjectNode({decorators:p.ListNode(ze),feature:Ee},{context:"feature.decorated"})},i=p.ObjectNode(a,{context:"feature"}),s=new p.Path(["config","feature"]),l=new p.Path(["config","decorators"]),c=t.getModel(),d=new kt(i,(e=>{if(e.startsWith(s))return new p.Path([...[...Array(o.length-1)].flatMap((()=>["config","feature"])),...e.modelArr]);if(e.startsWith(l)){if(2===e.modelArr.length)return new p.Path([]);const t=e.modelArr[2];if("number"==typeof t)return new p.Path([...[...Array(t)].flatMap((()=>["config","feature"])),"config","decorator",...e.modelArr.slice(3)])}return e}),(e=>{if(e.equals(l)){const e=[];return Wt(c.data,e),e}return c.get(d.map(e))}),((e,t,n)=>{if(e.startsWith(s)){const o=[];Wt(c.data,o);const r=new p.Path([...[...Array(o.length-1)].flatMap((()=>["config","feature"])),...e.modelArr]);return c.set(r,t,n)}if(e.startsWith(l)){const o=e.modelArr[2];if(2===e.modelArr.length){const e=d.get(s);return c.set(new p.Path,Gt(e,t),n)}if("number"==typeof o){if(3===e.modelArr.length&&void 0===t){const e=d.get(s),t=[];Wt(c.data,t),t.splice(o,1);const r=Gt(e,t);return c.set(new p.Path,r,n)}{const r=new p.Path([...[...Array(o)].flatMap((()=>["config","feature"])),"config","decorator",...e.modelArr.slice(3)]);return c.set(r,t,n)}}}c.set(e,t,n)}));return d.data={type:c.data.type,config:{decorators:o,feature:r}},d.errors=c.errors,{fields:a,wrapper:d}}(n(r),r,a);a=e.data,n=()=>t,o=(t,n)=>new p.ModelPath(e,new p.Path(t.getArray(),["feature"])).push(n)}let m=null,g=null;if(e.optional())if(void 0===a){const t=()=>r.set(p.DataModel.wrapLists(e.default()));g=d("button",{class:"collapse closed tooltipped tip-se","aria-label":ie(i,"expand"),onClick:t},Y.plus_circle)}else{const e=()=>r.set(void 0);g=d("button",{class:"collapse open tooltipped tip-se","aria-label":ie(i,"remove"),onClick:e},Y.trashcan)}const f="object"==typeof a&&null!==a&&(null==(h=e.default())?void 0:h.pools)?l(s({},u),{loot:null==a?void 0:a.type}):u,v=d(I,null,"object"==typeof a&&null!==a&&!(e.optional()&&void 0===a)&&Object.entries(n(r)).filter((([e,t])=>t.enabled(r))).map((([e,t])=>{var n,l,u;const h=o(r,e),p=h.getContext().join(".");if(Mt.includes(p))return null;const[v,_,w]=t.hook(this,h,a[e],i,c,f);if(!(v||_||(null!=(u=null==(l=null==(n=null==w?void 0:w.props)?void 0:n.children)?void 0:l.length)?u:0)>0))return null;const y="object"===t.type(h)&&At.includes(p),b=zt.includes(p);return y||b?(m=d(I,null,m,d(Rt,{lang:i,path:h}),d(Ft,{lang:i,path:h}),v),g=d(I,null,g,_),y?w:null):d(Nt,s({key:e,schema:t,path:h,value:a[e]},{lang:i,states:c,ctx:f}))})));return[m,g,v]},string:(e,t,n,o,r,a)=>[null,d(Dt,s({},l(s({},e),{path:t,value:n,lang:o,states:r,ctx:a}))),null]};function Ot({path:e,value:t}){var n,o,r,a,i;switch(e.getContext().join(".")){case"loot_table.pools.entry":return d("label",null,null!=(o=null==(n=null==t?void 0:t.entries)?void 0:n.length)?o:0," entries");case"function.set_contents.entries.entry":case"loot_pool.entries.entry":return d("label",null,null!=(i=null==(r=null==t?void 0:t.name)?void 0:r.replace(/^minecraft:/,""))?i:null==(a=null==t?void 0:t.type)?void 0:a.replace(/^minecraft:/,""))}for(const s of Object.values(null!=t?t:{}))if("string"==typeof s)return d("label",null,s.replace(/^minecraft:/,""));return null}function Lt(){const[e,t]=h(new Map),[n,o]=h(void 0);return{expand:e=>n=>{n.ctrlKey?(t(new Map),o(!0)):t((t=>new Map(t.set(e,!0))))},collapse:e=>n=>{n.ctrlKey?(t(new Map),o(!1)):t((t=>new Map(t.set(e,!1))))},isToggled:t=>{var o;return null!=(o=null==e?void 0:e.get(t))?o:n}}}function St({path:e,node:t,value:n,lang:o}){const r=o=>{e.model.set(e,t.optional()&&n===o?void 0:o)};return d(I,null,d("button",{class:!1===n?"selected":"",onClick:()=>r(!1)},ie(o,"false")),d("button",{class:!0===n?"selected":"",onClick:()=>r(!0)},ie(o,"true")))}function Pt({path:e,config:t,integer:n,value:o,lang:r}){var a;const i=t=>{const o=t.target.value,r=n?parseInt(o):parseFloat(o);e.model.set(e,r)};return d(I,null,d("input",{type:"text",value:null!=o?o:"",onBlur:i,onKeyDown:e=>{"Enter"===e.key&&i(e)}}),(null==t?void 0:t.color)&&d("input",{type:"color",value:"#"+(null!=(a=null==o?void 0:o.toString(16).padStart(6,"0"))?a:"000000"),onChange:t=>{const n=t.target.value,o=parseInt(n.slice(1),16);e.model.set(e,o)}}),["dimension.generator.seed","dimension.generator.biome_source.seed","world_settings.seed"].includes(e.getContext().join("."))&&d("button",{onClick:()=>he(e.model),class:"tooltipped tip-se","aria-label":ie(r,"generate_new_seed")},Y.sync))}function Dt({path:e,getValues:t,config:n,node:o,value:r,lang:a,states:i}){var s;const l=t=>{t.stopPropagation();const n=t.target.value;n!==r&&e.model.set(e,0===n.length?void 0:n)},c=t(),u=e.getContext().join(".");if(Et.includes(u))return d("textarea",{value:null!=r?r:"",onBlur:l});if(Tt(n)&&!n.additional||Ct.includes(u)){let e=new p.Path([]);return Tt(n)&&"string"==typeof n.enum?e=e.contextPush(n.enum):Tt(n)||"resource"!==(null==n?void 0:n.validator)||"string"!=typeof n.params.pool||(e=e.contextPush(n.params.pool)),d("select",{value:null!=r?r:"",onChange:l},o.optional()&&d("option",{value:""},ie(a,"unset")),c.map((t=>d("option",{value:t},Ht(a,e.contextPush(t.replace(/^minecraft:/,"")))))))}if(Tt(n)||"block_state_key"!==(null==n?void 0:n.validator)){const e=de();return d(I,null,d("input",{value:null!=r?r:"",onBlur:l,onKeyDown:e=>{"Enter"===e.key&&l(e)},list:c.length>0?e:""}),c.length>0&&d("datalist",{id:e},c.map((e=>d("option",{value:e})))))}{const t=null==i?void 0:i[p.relativePath(e,n.params.id).get()],o=Object.keys(null!=(s=null==t?void 0:t.properties)?s:{});return d("select",{value:null!=r?r:"",onChange:l},o.map((e=>d("option",null,e))))}}const Nt=j((function({label:e,schema:t,path:n,value:o,lang:r,states:a,ctx:i,actions:l,children:c}){const u=t.type(n),h=t.category(n),m=n.getContext().join("."),[p,g]=W(),f=s({},i);delete f.index;const[v,_,w]=t.hook($t,n,o,r,a,f);return d("div",{class:`node ${u}-node`,"data-category":h},d("div",{class:"node-header",onContextMenu:e=>{e.preventDefault(),g()}},d(Rt,{lang:r,path:n}),d(Ft,{lang:r,path:n}),c,v,d("label",null,null!=e?e:Ht(r,n,`${n.last()}`),p&&d("div",{class:"node-menu"},null==l?void 0:l.map((e=>{var t;return d("div",{key:e.label,class:"menu-item"},d(R,{icon:e.icon,tooltip:ie(r,e.label),tooltipLoc:"se",onClick:()=>e.onSelect()}),d("span",null,null!=(t=e.description)?t:ie(r,e.label)))})),d("div",{class:"menu-item"},d(R,{icon:"clippy",tooltip:ie(r,"copy_context"),tooltipLoc:"se",onClick:()=>navigator.clipboard.writeText(m)}),d("span",null,m)))),_),w&&d("div",{class:"node-body"},w))}),((e,t)=>e.schema===t.schema&&e.lang===t.lang&&e.path.equals(t.path)&&xe(e.ctx,t.ctx)&&xe(e.value,t.value)));function Tt(e){return!!(null==e?void 0:e.enum)}function Bt(e){var t,n=0;for(t=0;te.path.startsWith(t))):t.model.errors.get(t,!0);if(0===r.length)return null;const a=ie(e,r[0].error,...null!=(o=r[0].params)?o:[]);return Jt("node-error","issue_opened",a)}function Ft({lang:e,path:t}){const n=t.contextPush("help").getContext().join("."),o=ie(e,n);return o===n?null:Jt("node-help","info",o)}const Jt=(e,t,n)=>{const[o,r]=W();return d("div",{class:`node-icon ${e}${o?" show":""}`,onClick:r},Y[t],d("span",{class:"icon-popup"},n))};function Wt(e,t){var n,o;return"decorated"!==(null==(n=null==e?void 0:e.type)?void 0:n.replace(/^minecraft:/,""))?e:le(null==e?void 0:e.config)?(t.push({id:t.length,node:e.config.decorator}),Wt(null!=(o=e.config.feature)?o:"",t)):e}function Gt(e,t){return 0===t.length?e:{type:"minecraft:decorated",config:{decorator:t.shift().node,feature:Gt(e,t)}}}function Ut({lang:e,model:t,blockStates:n,onError:o}){if(!t||!n||"none"===e)return d(I,null);const[r]=$((e=>{o(`Error rendering the tree: ${e.message}`),console.error(e)}));if(r)return d(I,null);const[,a]=h(0);return G(t,(()=>{a((e=>e+1))})),d("div",{class:"tree"},d(jt,s({},{model:t,lang:e,blockStates:n})))}const Yt={system:"device_desktop",dark:"moon",light:"sun"};function Zt({lang:e,title:t,version:n,theme:o,changeTheme:r,language:a,changeLanguage:i}){const s=ie.bind(null,e),l=pe(O());return d("header",null,d("div",{class:"title"},d(L,{class:"home-link",href:"/","aria-label":s("home")},Kt.home),d("h2",null,t),l&&d(U,{icon:"chevron_down",tooltip:s("switch_generator")},B.generators.filter((e=>e.category===(null==l?void 0:l.category)&&Ve(n,e.minVersion))).map((e=>d(R,{label:s(e.id),active:e.id===l.id,onClick:()=>S(me(e.url))}))))),d("nav",null,d("ul",null,d("li",null,d(U,{icon:"globe",tooltip:s("language")},B.languages.map((({code:e,name:t})=>d(R,{label:t,active:e===a,onClick:()=>i(e)}))))),d("li",null,d(U,{icon:Yt[o],tooltip:s("theme")},Object.entries(Yt).map((([e,t])=>d(R,{icon:t,label:s(`theme.${e}`),active:e===o,onClick:()=>r(e)}))))),d("li",{class:"dimmed"},d("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",class:"tooltipped tip-sw","aria-label":s("github")},Y.mark_github)))))}const Kt={home:d("svg",{width:"32",height:"28",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("rect",{width:"26",height:"6",rx:"3",fill:"#7CB45C"}),d("rect",{x:"8",width:"18",height:"6",rx:"3",fill:"#4BA041"}),d("rect",{y:"11",width:"32",height:"6",rx:"3",fill:"#AAA8A8"}),d("rect",{x:"11",y:"11",width:"21",height:"6",rx:"3",fill:"#91908F"}),d("rect",{x:"11",y:"22",width:"21",height:"6",rx:"3",fill:"#70B5C3"}),d("rect",{x:"17",y:"22",width:"15",height:"6",rx:"3",fill:"#4D989B"})),report:d("svg",{width:"30",height:"36",viewBox:"0 0 30 36",xmlns:"http://www.w3.org/2000/svg"},d("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"}),d("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"}),d("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"}),d("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"}),d("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"}),d("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:d("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},d("circle",{cx:"10",cy:"10",r:"10",fill:"#451475"}),d("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 Xt({lang:e,assets:t,sounds:n,sound:o,delay:r,pitch:a,volume:i,onEdit:s,onDelete:l,delayedPlay:m}){const p=ie.bind(null,e),[g,f]=h(!0),[v,_]=h(!1),[w,y]=h(!1),b=u([]),x=`playsound minecraft:${o} master @s ~ ~ ~ ${i} ${a}`;c((()=>{var e,r,s;const l=n[o];y(0===(null!=(r=null==(e=null==l?void 0:l.sounds)?void 0:e.length)?r:0)),b.current.forEach((e=>e.stop())),b.current=(null!=(s=null==l?void 0:l.sounds)?s:[]).map((e=>{const n="string"==typeof e?e:e.name,o=Ne(t[`minecraft/sounds/${n}.ogg`].hash),r=new P.Howl({src:[o],format:["ogg"],volume:i,rate:a});r.on("end",(()=>{_(!1)}));const s=()=>{g&&b.current.every((e=>"loaded"===e.state()))&&f(!1)};return"loaded"===r.state()?setTimeout((()=>s())):r.on("load",(()=>{s()})),r})),f(!0)}),[o,n]),c((()=>{b.current.forEach((e=>e.rate(a)))}),[a]),c((()=>{b.current.forEach((e=>e.volume(i)))}),[i]);const k=()=>{if(g||w)return;C();const e=Math.floor(Math.random()*b.current.length);b.current[e].play(),_(!0)},C=()=>{b.current.forEach((e=>e.stop()))};c((()=>{m&&setTimeout((()=>k()),50*r)}),[m]),c((()=>()=>C()),[]);const[M,A]=h(!1),z=u(void 0);return d("div",{class:`sound-config${g?" loading":v?" playing":""}${w?" invalid":""}`},d(R,{class:"play",icon:w?"alert":g?"sync":"play",label:p("sounds.play"),onClick:k,tooltip:p(w?"sounds.unknown_sound":g?"sounds.loading_sound":"sounds.play_sound"),tooltipLoc:"se"}),d(X,{class:"btn btn-input sound",list:"sound-list",spellcheck:!1,value:o,onChange:e=>s({sound:e})}),d("label",{class:"delay-label"},p("sounds.delay"),": "),d(q,{class:"btn btn-input delay",min:0,value:r,onChange:e=>s({delay:e})}),d("label",{class:"pitch-label"},p("sounds.pitch"),": "),d(Q,{class:"pitch tooltipped tip-s",min:.5,max:2,step:.01,"aria-label":a.toFixed(2),style:`--x: ${100/1.5*(a-.5)}%`,value:a,onChange:e=>s({pitch:e})}),d("label",{class:"volume-label"},p("sounds.volume"),": "),d(Q,{class:"volume tooltipped tip-s",min:0,max:1,step:.01,"aria-label":i.toFixed(2),style:`--x: ${100*i}%`,value:i,onChange:e=>s({volume:e})}),d(R,{class:"copy"+(M?" active":""),icon:M?"check":"terminal",label:p("copy"),tooltip:p(M?"copied":"sounds.copy_command"),onClick:()=>{navigator.clipboard.writeText(x),A(!0),void 0!==z.current&&clearTimeout(z.current),z.current=setTimeout((()=>{A(!1)}),2e3)}}),d(R,{class:"remove",icon:"trashcan",tooltip:p("sounds.remove_sound"),onClick:()=>{l(),C()}}))}function qt({title:e,link:t,icon:n,children:o}){return d("a",{class:"tool-card",href:t},n&&Kt[n],d("div",null,d("h3",null,e),o))}function Qt({lang:e,changeTitle:t,version:n,changeVersion:o}){var r;const a=ie.bind(null,e),[i,m]=h(null),[g,f]=$();if(g)return d("main",null,d(Z,{error:`Something went wrong rendering the generator: ${g.message}`,onDismiss:f}));const v=pe(O());if(!v)return d("main",null,d(Z,{error:`Cannot find generator "${O()}"`}));c((()=>{m(null)}),[v.id,n]);const _=B.versions.filter((e=>Ve(e.id,v.minVersion))).map((e=>e.id));t(a("title.generator",a(v.id)),_),Ve(n,v.minVersion)||m(`The minimum version for this generator is ${v.minVersion}`);const[w,y]=h(null),[b,x]=h(null);c((()=>{y(null),async function(e){return(await Ie(e)).blockStates}(n).then((e=>x(e))),async function(e,t){var n;if(!Me[t]||Me[t].version!==e){const r=await Ie(e);ze=p.Reference(r.schemas,"configured_decorator"),Ee=p.ChoiceNode([{type:"string",node:p.StringNode(r.collections,{validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:p.Reference(r.schemas,"configured_feature")}],{choiceContext:"feature"});const a=null==(n=B.generators.find((e=>e.id===t)))?void 0:n.schema;if(!a)throw new Error(`Cannot find model ${t}`);try{const n=r.schemas.get(a),o=new p.DataModel(n,{wrapLists:!0});Me[t]?o.reset(Me[t].model.data,!1):(o.validate(!0),o.history=[JSON.stringify(o.data)]),Me[t]={model:o,version:e}}catch(o){throw new Error(`Cannot get generator "${t}" for version "${e}": ${ye(o)}`)}}return Me[t].model}(n,v.id).then((e=>y(e))).catch((e=>{console.error(e),m(ye(e))}))}),[n,v.id]),G(w,(()=>{m(null)}));const k=e=>{e.ctrlKey&&"z"===e.key?(T.generatorEvent("undo","Hotkey"),null==w||w.undo()):e.ctrlKey&&"y"===e.key&&(T.generatorEvent("redo","Hotkey"),null==w||w.redo())};c((()=>(document.addEventListener("keyup",k),()=>{document.removeEventListener("keyup",k)})),[w]);const[C,M]=h(""),[A,z]=h([]);c((()=>{(async function(e){return(await Ie(e)).collections})(n).then((e=>{const t=(null!=C?C:"").trim().split(" "),n=e.get(v.id).map((e=>e.slice(10))).filter((e=>t.every((t=>e.includes(t)))));n&&z(n)})).catch((e=>{console.error(e),m(e.message)}))}),[n,v.id,C]);const[E,V]=h(window.innerWidth>820),[j,L]=h(0),[S,P]=h(0),[D,N]=h(0),[J,W]=h(!1),K=u(void 0),[X,q]=h(!1),Q=ft.includes(v.id);X&&!Q&&q(!1);let ee=1;Q&&(ee+=1),E&&(ee+=2);return d(I,null,d("main",{class:X?"has-preview":""},d(H,{id:"data-pack-generator",type:"text"}),d("div",{class:"controls"},d(R,{icon:"upload",label:a("import"),onClick:()=>{T.generatorEvent("import"),V(!0),N(D+1)}}),d(U,{icon:"archive",label:a("presets"),relative:!1},d(F,{icon:"search",large:!0,value:C,onChange:M,doSelect:1,placeholder:a("search")}),d("div",{class:"result-list"},A.map((e=>d(R,{label:e,onClick:()=>{return t=e,T.generatorEvent("load-preset",t),void De(n,null!=(o=v.path)?o:v.id,t).then((e=>{var t,n;const o=null==w?void 0:w.get(new p.Path(["generator","seed"]));void 0!==(null==(t=null==e?void 0:e.generator)?void 0:t.seed)&&void 0!==o&&(e.generator.seed=o,void 0!==(null==(n=e.generator.biome_source)?void 0:n.seed)&&(e.generator.biome_source.seed=o)),null==w||w.reset(p.DataModel.wrapLists(e),!1)}));var t,o}})))),0===A.length&&d(R,{label:a("no_presets")})),d(U,{icon:"tag",label:n},_.reverse().map((e=>d(R,{label:e,active:e===n,onClick:()=>o(e)})))),d(U,{icon:"kebab_horizontal",tooltip:a("more")},d(R,{icon:"history",label:a("reset"),onClick:()=>{T.generatorEvent("reset"),null==w||w.reset(p.DataModel.wrapLists(w.schema.default()),!0)}}),d(R,{icon:"arrow_left",label:a("undo"),onClick:e=>{e.stopPropagation(),T.generatorEvent("undo","Menu"),null==w||w.undo()}}),d(R,{icon:"arrow_right",label:a("redo"),onClick:e=>{e.stopPropagation(),T.generatorEvent("redo","Menu"),null==w||w.redo()}}))),i&&d(Z,{error:i,onDismiss:()=>m(null)}),d(Ut,l(s({},{lang:e,model:w,version:n,blockStates:b}),{onError:m}))),d("div",{class:"popup-actions",style:`--offset: -${8+50*ee}px;`},d("div",{class:`popup-action action-preview${Q?" shown":""} tooltipped tip-nw`,"aria-label":a(X?"hide_preview":"show_preview"),onClick:()=>{T.generatorEvent("toggle-preview",X?"hidden":"visible"),q(!X)}},X?Y.x_circle:Y.play),d("div",{class:`popup-action action-download${E?" shown":""} tooltipped tip-nw`,"aria-label":a("download"),onClick:()=>{T.generatorEvent("download"),P(S+1)}},Y.download),d("div",{class:`popup-action action-copy${E?" shown":""}${J?" active":""} tooltipped tip-nw`,"aria-label":a(J?"copied":"copy"),onClick:()=>{T.generatorEvent("copy"),L(j+1)}},J?Y.check:Y.clippy),d("div",{class:"popup-action action-code shown tooltipped tip-nw","aria-label":a(E?"hide_output":"show_output"),onClick:()=>{T.generatorEvent("toggle-output",E?"hidden":"visible"),V(!E),L(0),P(0),N(0)}},E?Y.chevron_right:Y.code)),d("div",{class:"popup-preview"+(X?" shown":"")},d(vt,l(s({},{lang:e,model:w,version:n,id:v.id}),{shown:X,onError:m}))),d("div",{class:"popup-source"+(E?" shown":"")},d(xt,l(s({},{lang:e,model:w,blockStates:b,doCopy:j,doDownload:S,doImport:D}),{name:null!=(r=v.schema)?r:"data",copySuccess:()=>{W(!0),void 0!==K.current&&clearTimeout(K.current),K.current=setTimeout((()=>{W(!1)}),2e3)},onError:m}))))}function en({lang:e,changeTitle:t}){const n=ie.bind(null,e);return t(n("title.home")),d("main",null,d("div",{class:"home"},B.generators.filter((e=>!e.category)).map((e=>d(qt,{title:n(e.id),link:me(e.url)}))),d(qt,{title:n("worldgen"),link:"/worldgen/"}),d("hr",null),d(qt,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/"},d("p",null,"Analyse your performance reports")),d(qt,{title:"Minecraft Sounds",icon:"sounds",link:"/sounds/"},d("p",null,"Browse through and mix all the vanilla sounds")),d(qt,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/"},d("p",null,"Convert your 1.16 data packs to 1.17"))))}let tn=null;const nn={},on={};async function rn(){return tn||(tn=async function(){try{const e=await fetch("https://launchermeta.mojang.com/mc/game/version_manifest.json");return await e.json()}catch(e){throw new Error(`Error occurred while fetching version manifest: ${ye(e)}`)}}()),tn}async function an(e){return nn[e]||(nn[e]=(async()=>{const t=await rn();return await async function(e,t){var n;const o=B.versions.find((t=>t.id===e)),r=null!=(n=null==o?void 0:o.latest)?n:t.latest.snapshot;try{const e=await Te(t.versions.find((e=>e.id===r)).url);return(await Te(e.assetIndex.url)).objects}catch(a){throw new Error(`Error occurred while fetching assets for ${o}: ${ye(a)}`)}}(e,t)})()),nn[e]}async function sn(e){return on[e]||(on[e]=(async()=>{const t=await an(e);return await async function(e,t){try{const e=t["minecraft/sounds.json"].hash;return await Te(Ne(e))}catch(n){throw new Error(`Error occurred while fetching sounds for ${e}: ${ye(n)}`)}}(e,t)})()),on[e]}function ln({lang:e,changeTitle:t,version:n,changeVersion:o}){const r=ie.bind(null,e),[a,i]=h(null);t(r("title.sounds"));const[m,p]=h({}),[g,f]=h({}),v=Object.keys(null!=g?g:{});c((()=>{an(n).then((e=>(p(e),sn(n)))).then((e=>{e&&f(e)})).catch((e=>{console.error(e),i(ye(e))}))}),[n]);const[_,w]=h(""),[y,b]=h([]),x=()=>{b([{id:de(),sound:_,delay:0,pitch:1,volume:1},...y])},k=e=>()=>{b(y.filter((t=>t.id!==e)))},[C,M]=h(0),A=u(null);return d("main",null,d(H,{type:"text",id:"sounds"}),a&&d(Z,{error:a,onDismiss:()=>i(null)}),v.length>0&&d(I,null,d("div",{class:"controls sounds-controls"},d("div",{class:"sound-search-group"},d(X,{class:"btn btn-input sound-search",list:"sound-list",placeholder:r("sounds.search"),value:_,onChange:w,onEnter:x}),d(R,{icon:"plus",tooltip:r("sounds.add_sound"),class:"add-sound",onClick:x})),y.length>1&&d(R,{icon:"play",label:r("sounds.play_all"),class:"play-all-sounds",onClick:()=>{M(C+1)}}),d("div",{class:"spacer"}),d(R,{icon:"download",label:r("download"),tooltip:r("sounds.download_function"),class:"download-sounds",onClick:()=>{const e=y.some((e=>e.delay>0)),t=y.sort(((e,t)=>e.delay-t.delay)).map((t=>`${e?`execute if score @s delay matches ${t.delay} run `:""}playsound minecraft:${t.sound} master @s ~ ~ ~ ${t.volume} ${t.pitch}`)).join("\n");A.current.setAttribute("href","data:text/plain;charset=utf-8,"+t+"%0A"),A.current.setAttribute("download","sounds.mcfunction"),A.current.click()}}),d(U,{icon:"tag",label:n},B.versions.reverse().map((e=>d(R,{label:e.id,active:e.id===n,onClick:()=>o(e.id)}))))),d("div",{class:"sounds"},y.map((t=>{return d(Xt,l(s(s({key:t.id},t),{lang:e,assets:m,sounds:g,delayedPlay:C}),{onEdit:(n=t.id,e=>{b(y.map((t=>t.id===n?s(s({},t),e):t)))}),onDelete:k(t.id)}));var n}))),d("a",{ref:A,style:"display: none;"})),d("datalist",{id:"sound-list"},v.map((e=>d("option",{key:e,value:e})))))}function cn({lang:e,changeTitle:t}){const n=ie.bind(null,e);return t(n("title.generator_category",n("worldgen"))),d("main",null,d("div",{class:"home"},B.generators.filter((e=>"worldgen"===e.category)).map((e=>d(qt,{title:n(e.id),link:me(e.url)})))))}function dn(){const[e,t]=h("none");c((()=>{(async()=>{const e=wt.getLanguage();await Promise.all([se("en"),..."en"!==e?[se(e)]:[]]),t(e)})()}),[]);const[n,o]=h(wt.getTheme());c((()=>{document.documentElement.setAttribute("data-theme",n)}),[n]);const[r,a]=h(wt.getVersion()),i=e=>{T.setVersion(e),wt.setVersion(e),a(e)},[l,u]=h(ie(e,"title.home")),m=(e,t)=>{null!=t||(t=B.versions.map((e=>e.id))),t.splice(0,t.length-3),document.title=`${e} Minecraft ${t.join(", ")}`,u(e)};return d(I,null,d(Zt,s({},{lang:e,title:l,version:r,theme:n,language:e,changeLanguage:async e=>{ae[e]||await se(e),T.setLanguage(e),wt.setLanguage(e),t(e)},changeTheme:e=>{T.setTheme(e),wt.setTheme(e),o(e)}})),d(N,{onChange:e=>{setTimeout((()=>T.pageview(me(e.url))))}},d(en,s({path:"/"},{lang:e,changeTitle:m})),d(cn,s({path:"/worldgen"},{lang:e,changeTitle:m})),d(ln,s({path:"/sounds"},{lang:e,version:r,changeTitle:m,changeVersion:i})),d(Qt,s({default:!0},{lang:e,version:r,changeTitle:m,changeVersion:i}))))}D(d(dn,null),document.body); +//# sourceMappingURL=index.f1ae53c2.js.map diff --git a/assets/index.3fb19d8f.js.map b/assets/index.f1ae53c2.js.map similarity index 99% rename from assets/index.3fb19d8f.js.map rename to assets/index.f1ae53c2.js.map index d8c08a18..b1d70446 100644 --- a/assets/index.3fb19d8f.js.map +++ b/assets/index.f1ae53c2.js.map @@ -1 +1 @@ -{"version":3,"file":"index.3fb19d8f.js","sources":["../../src/app/Analytics.ts","../../src/app/components/Ad.tsx","../../src/app/components/Btn.tsx","../../src/app/components/BtnInput.tsx","../../src/app/hooks/useCanvas.ts","../../src/app/hooks/useFocus.ts","../../src/app/hooks/useModel.ts","../../src/app/components/BtnMenu.tsx","../../src/app/components/Octicon.tsx","../../src/app/components/ErrorPanel.tsx","../../src/app/components/forms/Input.tsx","../../vite/preload-helper","../../src/app/Locales.ts","../../src/app/Utils.ts","../../src/app/Schemas.ts","../../src/app/DataFetcher.ts","../../src/app/previews/BiomeSource.ts","../../src/app/previews/Decorator.ts","../../src/app/previews/noise/NoiseChunkGenerator.ts","../../src/app/previews/NoiseSettings.ts","../../src/app/components/previews/BiomeSourcePreview.tsx","../../src/app/components/previews/DecoratorPreview.tsx","../../src/app/components/previews/NoiseSettingsPreview.tsx","../../src/app/components/generator/PreviewPanel.tsx","../../src/app/schema/transformOutput.ts","../../src/app/Store.ts","../../src/app/components/generator/SourcePanel.tsx","../../src/app/schema/ModelWrapper.ts","../../src/app/schema/renderHtml.tsx","../../src/app/components/generator/Tree.tsx","../../src/app/components/Header.tsx","../../src/app/components/Icons.tsx","../../src/app/components/sounds/SoundConfig.tsx","../../src/app/components/ToolCard.tsx","../../src/app/pages/Generator.tsx","../../src/app/pages/Home.tsx","../../src/app/Manifest.ts","../../src/app/pages/Sounds.tsx","../../src/app/pages/Worldgen.tsx","../../src/app/Main.tsx"],"sourcesContent":["export namespace Analytics {\n\tconst ID_SITE = 'Site'\n\tconst ID_GENERATOR = 'Generator'\n\n\tconst DIM_THEME = 1\n\tconst DIM_VERSION = 3\n\tconst DIM_LANGUAGE = 4\n\tconst DIM_PREVIEW = 5\n\n\tfunction event(category: string, action: string, label?: string) {\n\t\tga('send', 'event', category, action, label)\n\t}\n\n\tfunction dimension(index: number, value: string) {\n\t\tga('set', `dimension${index}`, value)\n\t}\n\n\texport function pageview(page: string) {\n\t\tga('set', 'page', page)\n\t\tga('send', 'pageview')\n\t}\n\n\texport function setLanguage(language: string) {\n\t\tdimension(DIM_LANGUAGE, language)\n\t\tevent(ID_SITE, 'set-language', language)\n\t}\n\n\texport function setTheme(theme: string) {\n\t\tdimension(DIM_THEME, theme)\n\t\tevent(ID_SITE, 'set-theme', theme)\n\t}\n\n\texport function setVersion(version: string) {\n\t\tdimension(DIM_VERSION, version)\n\t\tevent(ID_GENERATOR, 'set-version', version)\n\t}\n\n\texport function setPreview(preview: string) {\n\t\tdimension(DIM_PREVIEW, preview)\n\t\tevent(ID_GENERATOR, 'set-preview', preview)\n\t}\n\n\texport function generatorEvent(action: string, label?: string) {\n\t\tevent(ID_GENERATOR, action, label)\n\t}\n}\n","import { useEffect } from 'preact/hooks'\n\ndeclare const ethicalads: any\n\ntype AdProps = {\n\ttype: 'text' | 'image',\n\tid: string,\n}\nexport function Ad({ type, id }: AdProps) {\n\tuseEffect(() => {\n\t\tdocument.getElementById('ad-placeholder')?.remove()\n\t\tif ('ethicalads' in window) {\n\t\t\tethicalads.load()\n\t\t}\n\t}, [])\n\n\treturn
\n}\n","import { Octicon } from '.'\n\ntype BtnProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\tactive?: boolean,\n\ttooltip?: string,\n\ttooltipLoc?: 'se' | 'sw' | 'nw',\n\tclass?: string,\n\tonClick?: (event: MouseEvent) => unknown,\n}\nexport function Btn({ icon, label, active, class: clazz, tooltip, tooltipLoc, onClick }: BtnProps) {\n\treturn
\n\t\t{icon && Octicon[icon]}\n\t\t{label && {label}}\n\t
\n}\n","import { useEffect, useRef } from 'preact/hooks'\nimport { Octicon } from '.'\n\ntype BtnInputProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\tlarge?: boolean,\n\tdoSelect?: number,\n\tvalue?: string,\n\tplaceholder?: string,\n\tonChange?: (value: string) => unknown,\n}\nexport function BtnInput({ icon, label, large, doSelect, value, placeholder, onChange }: BtnInputProps) {\n\tconst onInput = onChange === undefined ? () => {} : (e: any) => {\n\t\tconst value = (e.target as HTMLInputElement).value\n\t\tonChange?.(value)\n\t}\n\n\tconst ref = useRef(null)\n\tuseEffect(() => {\n\t\tif (doSelect && ref.current) {\n\t\t\tref.current.select()\n\t\t}\n\t}, [doSelect])\n\n\treturn
e.stopPropagation()}>\n\t\t{icon && Octicon[icon]}\n\t\t{label && {label}}\n\t\t\n\t
\n}\n","import type { Inputs } from 'preact/hooks'\nimport { useEffect, useRef } from 'preact/hooks'\n\ntype Vec2 = [number, number]\n\nexport function useCanvas({ size, draw, onDrag, onHover, onLeave }: {\n\tsize: () => Vec2,\n\tdraw: (img: ImageData) => Promise,\n\tonDrag?: (dx: number, dy: number) => Promise,\n\tonHover?: (x: number, y: number) => unknown,\n\tonLeave?: () => unknown,\n}, inputs?: Inputs) {\n\tconst canvas = useRef(null)\n\n\tconst dragStart = useRef()\n\tconst dragRequest = useRef()\n\tconst dragPending = useRef([0, 0])\n\tconst dragBusy = useRef(false)\n\n\tuseEffect(() => {\n\t\tconst onMouseDown = (e: MouseEvent) => {\n\t\t\tdragStart.current = [e.offsetX, e.offsetY]\n\t\t}\n\t\tconst onMouseMove = (e: MouseEvent) => {\n\t\t\tif (dragStart.current === undefined) {\n\t\t\t\tconst x = e.offsetX / canvas.current.clientWidth\n\t\t\t\tconst y = e.offsetY / canvas.current.clientHeight\n\t\t\t\tonHover?.(x, y)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (!onDrag) return\n\t\t\tconst dx = e.offsetX - dragStart.current[0]\n\t\t\tconst dy = e.offsetY - dragStart.current[1]\n\t\t\tif (!(dx === 0 && dy === 0)) {\n\t\t\t\tdragPending.current = [dragPending.current[0] + dx, dragPending.current[1] + dy]\n\t\t\t\tif (!dragBusy.current) {\n\t\t\t\t\tcancelAnimationFrame(dragRequest.current)\n\t\t\t\t\tdragRequest.current = requestAnimationFrame(async () => {\n\t\t\t\t\t\tdragBusy.current = true\n\t\t\t\t\t\tconst dx = dragPending.current[0] / canvas.current.clientWidth\n\t\t\t\t\t\tconst dy = dragPending.current[1] / canvas.current.clientHeight\n\t\t\t\t\t\tdragPending.current = [0, 0]\n\t\t\t\t\t\tawait onDrag?.(dx, dy)\n\t\t\t\t\t\tdragBusy.current = false\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tdragStart.current = [e.offsetX, e.offsetY]\n\t\t}\n\t\tconst onMouseUp = () => {\n\t\t\tdragStart.current = undefined\n\t\t}\n\t\tconst onMouseLeave = () => {\n\t\t\tonLeave?.()\n\t\t}\n\n\t\tcanvas.current.addEventListener('mousedown', onMouseDown)\n\t\tcanvas.current.addEventListener('mousemove', onMouseMove)\n\t\tcanvas.current.addEventListener('mouseleave', onMouseLeave)\n\t\tdocument.body.addEventListener('mouseup', onMouseUp)\n\n\t\treturn () => {\n\t\t\tcanvas.current?.removeEventListener('mousedown', onMouseDown)\n\t\t\tcanvas.current?.removeEventListener('mousemove', onMouseMove)\n\t\t\tcanvas.current?.removeEventListener('mouseleave', onMouseLeave)\n\t\t\tdocument.body.removeEventListener('mouseup', onMouseUp)\n\t\t}\n\t}, [...inputs ?? [], canvas.current])\n\n\tconst redraw = useRef<() => Promise>()\n\tconst redrawCount = useRef(0)\n\tredraw.current = async () => {\n\t\tconst ctx = canvas.current.getContext('2d')!\n\t\tconst s = size()\n\t\tcanvas.current.width = s[0]\n\t\tcanvas.current.height = s[1]\n\t\tconst img = ctx.getImageData(0, 0, s[0], s[1])\n\t\tconst ownCount = redrawCount.current += 1\n\t\tawait draw(img)\n\t\tif (ownCount === redrawCount.current) {\n\t\t\tctx.putImageData(img, 0, 0)\n\t\t}\n\t}\n\n\treturn {\n\t\tcanvas,\n\t\tredraw: redraw.current,\n\t}\n}\n","import { useEffect, useState } from 'preact/hooks'\n\nexport function useFocus(): [boolean, () => unknown] {\n\tconst [active, setActive] = useState(false)\n\n\tconst hider = () => {\n\t\tsetActive(false)\n\t}\n\n\tuseEffect(() => {\n\t\tif (active) {\n\t\t\tdocument.body.addEventListener('click', hider)\n\t\t\tdocument.body.addEventListener('contextmenu', hider)\n\t\t}\n\t\treturn () => {\n\t\t\tdocument.body.removeEventListener('click', hider)\n\t\t\tdocument.body.removeEventListener('contextmenu', hider)\n\t\t}\n\t}, [active])\n\n\treturn [active, () => setActive(true)]\n}\n","import type { DataModel } from '@mcschema/core'\nimport { useEffect } from 'preact/hooks'\n\nexport function useModel(model: DataModel | undefined | null, invalidated: (model: DataModel) => unknown) {\n\tconst listener = {\n\t\tinvalidated() {\n\t\t\tif (model) {\n\t\t\t\tinvalidated(model)\n\t\t\t}\n\t\t},\n\t}\n\n\tuseEffect(() => {\n\t\tmodel?.addListener(listener)\n\t\treturn () => {\n\t\t\tmodel?.removeListener(listener)\n\t\t}\n\t}, [model])\n}\n","import type { ComponentChildren } from 'preact'\nimport type { Octicon } from '.'\nimport { Btn } from '.'\nimport { useFocus } from '../hooks'\n\ntype BtnMenuProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\trelative?: boolean,\n\ttooltip?: string,\n\tchildren: ComponentChildren,\n}\nexport function BtnMenu({ icon, label, relative, tooltip, children }: BtnMenuProps) {\n\tconst [active, setActive] = useFocus()\n\n\treturn
\n\t\t\n\t\t{active &&
\n\t\t\t{children}\n\t\t
}\n\t
\n}\n","export const Octicon = {\n\talert: ,\n\tarchive: ,\n\tarrow_left: ,\n\tarrow_right: ,\n\tcheck: ,\n\tchevron_down: ,\n\tchevron_right: ,\n\tchevron_up: ,\n\tclippy: ,\n\tcode: ,\n\tdash: ,\n\tdevice_desktop: ,\n\tdownload: ,\n\tduplicate: ,\n\teye: ,\n\teye_closed: ,\n\tgear: ,\n\tglobe: ,\n\thistory: ,\n\tinfo: ,\n\tissue_opened: ,\n\tkebab_horizontal: ,\n\tlink: ,\n\tmark_github: ,\n\tmoon: ,\n\tplay: ,\n\tplus: ,\n\tplus_circle: ,\n\tsearch: ,\n\tsun: ,\n\tsync: ,\n\ttag: ,\n\tterminal: ,\n\tthree_bars: ,\n\ttrashcan: ,\n\tunfold: ,\n\tupload: ,\n\tx: ,\n\tx_circle: ,\n}\n","import { Octicon } from './Octicon'\n\ntype ErrorPanelProps = {\n\terror: string,\n\tonDismiss?: () => unknown,\n}\nexport function ErrorPanel({ error, onDismiss }: ErrorPanelProps) {\n\treturn
\n\t\t{onDismiss &&
{Octicon.x}
}\n\t\t

{error}

\n\t\t

If you think this is a bug, you can report it on GitHub

\n\t
\n}\n","import type { JSXInternal } from 'preact/src/jsx'\n\ntype InputProps = JSXInternal.HTMLAttributes\n\ntype BaseInputProps = Omit & {\n\tonChange?: (value: T) => unknown,\n\tonEnter?: (value: T) => unknown,\n}\nfunction BaseInput(name: string, type: string, fn: (value: string) => T) {\n\tconst component = (props: BaseInputProps) => {\n\t\tconst onChange = props.onChange && ((evt: Event) => {\n\t\t\tconst value = (evt.target as HTMLInputElement).value\n\t\t\tprops.onChange?.(fn(value))\n\t\t})\n\t\tconst onKeyDown = props.onEnter && ((evt: KeyboardEvent) => {\n\t\t\tif (evt.key === 'Enter') {\n\t\t\t\tconst value = (evt.target as HTMLInputElement).value\n\t\t\t\tprops.onEnter?.(fn(value))\n\t\t\t}\n\t\t})\n\t\treturn \n\t}\n\tcomponent.displayName = name\n\treturn component\n}\n\nexport const TextInput = BaseInput('TextInput', 'text', v => v)\n\nexport const NumberInput = BaseInput('NumberInput', 'number', v => Number(v))\n\nexport const RangeInput = BaseInput('RangeInput', 'range', v => Number(v))\n","let scriptRel;const seen = {};export const __vitePreload = function preload(baseModule, deps) {\n // @ts-ignore\n if (!__VITE_IS_MODERN__ || !deps) {\n return baseModule();\n }\n // @ts-ignore\n if (scriptRel === undefined) {\n // @ts-ignore\n const relList = document.createElement('link').relList;\n // @ts-ignore\n scriptRel =\n relList && relList.supports && relList.supports('modulepreload')\n ? 'modulepreload'\n : 'preload';\n }\n return Promise.all(deps.map((dep) => {\n // @ts-ignore\n if (dep in seen)\n return;\n // @ts-ignore\n seen[dep] = true;\n const isCss = dep.endsWith('.css');\n const cssSelector = isCss ? '[rel=\"stylesheet\"]' : '';\n // @ts-ignore check if the file is already preloaded by SSR markup\n if (document.querySelector(`link[href=\"${dep}\"]${cssSelector}`)) {\n return;\n }\n // @ts-ignore\n const link = document.createElement('link');\n // @ts-ignore\n link.rel = isCss ? 'stylesheet' : scriptRel;\n if (!isCss) {\n link.as = 'script';\n link.crossOrigin = '';\n }\n link.href = dep;\n // @ts-ignore\n document.head.appendChild(link);\n if (isCss) {\n return new Promise((res, rej) => {\n link.addEventListener('load', res);\n link.addEventListener('error', rej);\n });\n }\n })).then(() => baseModule());\n}","import config from '../config.json'\nimport English from '../locales/en.json'\n\nexport type Localize = (key: string, ...params: string[]) => string\n\ninterface Locale {\n\t[key: string]: string\n}\n\nexport const Locales: {\n\t[key: string]: Locale,\n} = {\n\tfallback: English,\n}\n\nfunction resolveLocaleParams(value: string, params?: string[]): string {\n\treturn value.replace(/%\\d+%/g, match => {\n\t\tconst index = parseInt(match.slice(1, -1))\n\t\treturn params?.[index] !== undefined ? params[index] : match\n\t})\n}\n\nexport function locale(language: string, key: string, ...params: string[]): string {\n\tconst value: string | undefined = Locales[language]?.[key]\n\t\t?? Locales.en?.[key] ?? Locales.fallback[key] ?? key\n\treturn resolveLocaleParams(value, params)\n}\n\nexport async function loadLocale(language: string) {\n\tconst langConfig = config.languages.find(lang => lang.code === language)\n\tif (!langConfig) return\n\tconst data = await import(`../locales/${language}.json`)\n\tconst schema = langConfig.schemas !== false\n\t\t&& await import(`../../node_modules/@mcschema/locales/src/${language}.json`)\n\tLocales[language] = { ...data.default, ...schema.default }\n}\n","import type { DataModel } from '@mcschema/core'\nimport { Path } from '@mcschema/core'\nimport rfdc from 'rfdc'\nimport config from '../config.json'\n\nexport function isPromise(obj: any): obj is Promise {\n\treturn typeof (obj as any)?.then === 'function' \n}\n\nexport function isObject(obj: any) {\n\treturn typeof obj === 'object' && obj !== null\n}\n\nconst dec2hex = (dec: number) => ('0' + dec.toString(16)).substr(-2)\n\nexport function hexId(length = 12) {\n\tvar arr = new Uint8Array(length / 2)\n\twindow.crypto.getRandomValues(arr)\n\treturn Array.from(arr, dec2hex).join('')\n}\n\nexport function randomSeed() {\n\treturn BigInt(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER))\n}\n\nexport function newSeed(model: DataModel) {\n\tconst seed = Math.floor(Math.random() * (4294967296)) - 2147483648\n\tconst dimensions = model.get(new Path(['dimensions']))\n\tmodel.set(new Path(['seed']), seed, true)\n\tif (typeof dimensions === 'object' && dimensions !== null) {\n\t\tObject.keys(dimensions).forEach(id => {\n\t\t\tmodel.set(new Path(['dimensions', id, 'generator', 'seed']), seed, true)\n\t\t\tmodel.set(new Path(['dimensions', id, 'generator', 'biome_source', 'seed']), seed, true)\n\t\t})\n\t}\n\tmodel.set(new Path(['generator', 'seed']), seed, true)\n\tmodel.set(new Path(['generator', 'biome_source', 'seed']), seed)\n}\n\nexport function htmlEncode(str: string) {\n\treturn str.replace(/&/g, '&').replace(//g, '>')\n\t\t.replace(/\"/g, '"').replace(/'/g, ''').replace(/\\//g, '/')\n}\n\nexport function hashString(s: string) {\n\tlet h = 0\n\tfor(let i = 0; i < s.length; i++)\n\t\th = Math.imul(31, h) + s.charCodeAt(i) | 0\n\treturn h\n}\n\nexport function cleanUrl(url: string) {\n\treturn `/${url}/`.replaceAll('//', '/')\n}\n\nexport function getGenerator(url: string) {\n\tconst trimmedUrl = url.replace(/^\\//, '').replace(/\\/$/, '')\n\treturn config.generators.find(g => g.url === trimmedUrl)\n}\n\nexport function stringToColor(str: string): [number, number, number] {\n\tconst h = Math.abs(hashString(str))\n\treturn [h % 256, (h >> 8) % 256, (h >> 16) % 256]\n}\n\nexport function square(a: number) {\n\treturn a * a\n}\n\nexport function clamp(a: number, b: number, c: number) {\n\treturn Math.max(a, Math.min(b, c))\n}\n\nexport function clampedLerp(a: number, b: number, c: number): number {\n\tif (c < 0) {\n\t\treturn a\n\t} else if (c > 1) {\n\t\treturn b\n\t} else {\n\t\treturn lerp(c, a, b)\n\t}\n}\n\nexport function lerp(a: number, b: number, c: number): number {\n\treturn b + a * (c - b)\n}\n\nexport function lerp2(a: number, b: number, c: number, d: number, e: number, f: number): number {\n\treturn lerp(b, lerp(a, c, d), lerp(a, e, f))\n}\n\nexport function lerp3(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) {\n\treturn lerp(c, lerp2(a, b, d, e, f, g), lerp2(a, b, h, i, j, k))\n}\n\nexport function smoothstep(x: number): number {\n\treturn x * x * x * (x * (x * 6 - 15) + 10)\n}\n\nexport function message(e: unknown): string {\n\tif (e instanceof Error) return e.message\n\treturn `${e}`\n}\n\nexport const deepClone = rfdc()\n\n/**\n * MIT License\n * \n * Copyright (c) 2017 Evgeny Poberezkin\n * \n * https://github.com/epoberezkin/fast-deep-equal/blob/master/LICENSE\n */\nexport function deepEqual(a: any, b: any) {\n\tif (a === b) return true\n\n\tif (a && b && typeof a == 'object' && typeof b == 'object') {\n\t\tif (a.constructor !== b.constructor) return false\n\t\tlet length, i\n\t\tif (Array.isArray(a)) {\n\t\t\tlength = a.length\n\t\t\tif (length != b.length) return false\n\t\t\tfor (i = 0; i < length; i++) {\n\t\t\t\tif (!deepEqual(a[i], b[i])) return false\n\t\t\t}\n\t\t\treturn true\n\t\t}\n\t\tif (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf()\n\t\tif (a.toString !== Object.prototype.toString) return a.toString() === b.toString()\n\t\tconst keys = Object.keys(a)\n\t\tlength = keys.length\n\t\tif (length !== Object.keys(b).length) return false\n\t\tfor (i = length; i-- !== 0;)\n\t\t\tif (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false\n\t\tfor (i = length; i-- !== 0;) {\n\t\t\tconst key = keys[i]\n\t\t\tif (!deepEqual(a[key], b[key])) return false\n\t\t}\n\t\treturn true\n\t}\n\treturn a !== a && b !== b\n}\n","import type { CollectionRegistry, INode, SchemaRegistry } from '@mcschema/core'\nimport { ChoiceNode, DataModel, Reference, StringNode } from '@mcschema/core'\nimport * as java15 from '@mcschema/java-1.15'\nimport * as java16 from '@mcschema/java-1.16'\nimport * as java17 from '@mcschema/java-1.17'\nimport * as java18 from '@mcschema/java-1.18'\nimport config from '../config.json'\nimport { fetchData } from './DataFetcher'\nimport { message } from './Utils'\n\nexport const VersionIds = ['1.15', '1.16', '1.17', '1.18'] as const\nexport type VersionId = typeof VersionIds[number]\n\nexport type BlockStateRegistry = {\n\t[block: string]: {\n\t\tproperties?: {\n\t\t\t[key: string]: string[],\n\t\t},\n\t\tdefault?: {\n\t\t\t[key: string]: string,\n\t\t},\n\t},\n}\n\ntype VersionData = {\n\tcollections: CollectionRegistry,\n\tschemas: SchemaRegistry,\n\tblockStates: BlockStateRegistry,\n}\nconst Versions: Record> = {}\n\ntype ModelData = {\n\tmodel: DataModel,\n\tversion: VersionId,\n}\nconst Models: Record = {}\n\nconst versionGetter: {\n\t[versionId in VersionId]: {\n\t\tgetCollections: () => CollectionRegistry,\n\t\tgetSchemas: (collections: CollectionRegistry) => SchemaRegistry,\n\t}\n} = {\n\t1.15: java15,\n\t1.16: java16,\n\t1.17: java17,\n\t1.18: java18,\n}\n\nexport let CachedDecorator: INode\nexport let CachedFeature: INode\n\nasync function getVersion(id: VersionId): Promise {\n\tif (!Versions[id]) {\n\t\tVersions[id] = (async () => {\n\t\t\ttry {\n\t\t\t\tconst collections = versionGetter[id].getCollections()\n\t\t\t\tconst blockStates: BlockStateRegistry = {}\n\t\t\t\tawait fetchData(id, collections, blockStates)\n\t\t\t\tconst schemas = versionGetter[id].getSchemas(collections)\n\t\t\t\tVersions[id] = { collections, schemas, blockStates }\n\t\t\t\treturn Versions[id]\n\t\t\t} catch (e) {\n\t\t\t\tthrow new Error(`Cannot get version \"${id}\": ${message(e)}`)\n\t\t\t}\n\t\t})()\n\t\treturn Versions[id]\n\t}\n\treturn Versions[id]\n}\n\nexport async function getModel(version: VersionId, id: string): Promise {\n\tif (!Models[id] || Models[id].version !== version) {\n\t\tconst versionData = await getVersion(version)\n\t\t\n\t\tCachedDecorator = Reference(versionData.schemas, 'configured_decorator')\n\t\tCachedFeature = ChoiceNode([\n\t\t\t{\n\t\t\t\ttype: 'string',\n\t\t\t\tnode: StringNode(versionData.collections, { validator: 'resource', params: { pool: '$worldgen/configured_feature' } }),\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'object',\n\t\t\t\tnode: Reference(versionData.schemas, 'configured_feature'),\n\t\t\t},\n\t\t], { choiceContext: 'feature' })\n\n\t\tconst schemaName = config.generators.find(g => g.id === id)?.schema\n\t\tif (!schemaName) {\n\t\t\tthrow new Error(`Cannot find model ${id}`)\n\t\t}\n\t\ttry {\n\t\t\tconst schema = versionData.schemas.get(schemaName)\n\t\t\tconst model = new DataModel(schema, { wrapLists: true })\n\t\t\tif (Models[id]) {\n\t\t\t\tmodel.reset(Models[id].model.data, false)\n\t\t\t} else {\n\t\t\t\tmodel.validate(true)\n\t\t\t\tmodel.history = [JSON.stringify(model.data)]\n\t\t\t}\n\t\t\tModels[id] = { model, version }\n\t\t} catch (e) {\n\t\t\tthrow new Error(`Cannot get generator \"${id}\" for version \"${version}\": ${message(e)}`)\n\t\t}\n\t}\n\treturn Models[id].model\n}\n\nexport async function getCollections(version: VersionId): Promise {\n\tconst versionData = await getVersion(version)\n\treturn versionData.collections\n}\n\nexport async function getBlockStates(version: VersionId): Promise {\n\tconst versionData = await getVersion(version)\n\treturn versionData.blockStates\n}\n\nexport function checkVersion(versionId: string, minVersionId: string | undefined, maxVersionId?: string) {\n\tconst version = config.versions.findIndex(v => v.id === versionId)\n\tconst minVersion = minVersionId ? config.versions.findIndex(v => v.id === minVersionId) : 0\n\tconst maxVersion = maxVersionId ? config.versions.findIndex(v => v.id === maxVersionId) : config.versions.length - 1\n\treturn minVersion <= version && version <= maxVersion\n}\n","import type { CollectionRegistry } from '@mcschema/core'\nimport config from '../config.json'\nimport type { VersionAssets, VersionManifest } from './Manifest'\nimport type { BlockStateRegistry, VersionId } from './Schemas'\nimport { checkVersion } from './Schemas'\nimport { message } from './Utils'\n\n['1.15', '1.16', '1.17'].forEach(v => localStorage.removeItem(`cache_${v}`))\n\nconst CACHE_NAME = 'misode-v1'\n\ntype VersionRef = 'mcdata_master' | 'vanilla_datapack_summary' | 'vanilla_datapack_data'\n\ntype Version = {\n\tid: string,\n\trefs: Partial<{ [key in VersionRef]: string }>,\n\tdynamic?: boolean,\n}\n\ndeclare var __MCDATA_MASTER_HASH__: string\ndeclare var __VANILLA_DATAPACK_SUMMARY_HASH__: string\n\nconst mcdataUrl = 'https://raw.githubusercontent.com/Arcensoth/mcdata'\nconst vanillaDatapackUrl = 'https://raw.githubusercontent.com/SPGoding/vanilla-datapack'\nconst manifestUrl = 'https://launchermeta.mojang.com/mc/game/version_manifest.json'\nconst resourceUrl = 'https://resources.download.minecraft.net/'\nconst corsUrl = 'https://misode-cors-anywhere.herokuapp.com/'\n\nconst refs: {\n\tid: VersionRef,\n\thash: string,\n\turl: string,\n}[] = [\n\t{\n\t\tid: 'mcdata_master',\n\t\thash: __MCDATA_MASTER_HASH__,\n\t\turl: mcdataUrl,\n\t},\n\t{\n\t\tid: 'vanilla_datapack_summary',\n\t\thash: __VANILLA_DATAPACK_SUMMARY_HASH__,\n\t\turl: vanillaDatapackUrl,\n\t},\n]\n\nexport async function fetchData(versionId: string, collectionTarget: CollectionRegistry, blockStateTarget: BlockStateRegistry) {\n\tconst version = config.versions.find(v => v.id === versionId) as Version | undefined\n\tif (!version) {\n\t\tconsole.error(`[fetchData] Unknown version ${version} in ${JSON.stringify(config.versions)}`)\n\t\treturn\n\t}\n\tconsole.debug(`[fetchData] ${JSON.stringify(version)}`)\n\n\tif (version.dynamic) {\n\t\tawait Promise.all(refs\n\t\t\t.filter(r => localStorage.getItem(`cached_${r.id}`) !== r.hash)\n\t\t\t.map(async r => {\n\t\t\t\tconsole.debug(`[deleteMatching] ${r.id} '${localStorage.getItem(`cached_${r.id}`)}' < '${r.hash}' ${r.url}/${version.refs[r.id]}`)\n\t\t\t\tawait deleteMatching(url => url.startsWith(`${r.url}/${version.refs[r.id]}`))\n\t\t\t\tconsole.debug(`[deleteMatching] Done! ${r.id} ${r.hash} '${localStorage.getItem(`cached_${r.id}`)}'`)\n\t\t\t\tlocalStorage.setItem(`cached_${r.id}`, r.hash)\n\t\t\t\tconsole.debug(`[deleteMatching] Set! ${r.id} ${r.hash} '${localStorage.getItem(`cached_${r.id}`)}'`)\n\t\t\t}))\n\t}\n\n\tawait Promise.all([\n\t\tfetchRegistries(version, collectionTarget),\n\t\tfetchBlockStateMap(version, blockStateTarget),\n\t\tfetchDynamicRegistries(version, collectionTarget),\n\t])\n}\n\nasync function fetchRegistries(version: Version, target: CollectionRegistry) {\n\tconsole.debug(`[fetchRegistries] ${version.id}`)\n\tconst registries = config.registries\n\t\t.filter(r => !r.dynamic)\n\t\t.filter(r => checkVersion(version.id, r.minVersion, r.maxVersion))\n\n\tif (checkVersion(version.id, undefined, '1.15')) {\n\t\tconst url = `${mcdataUrl}/${version.refs.mcdata_master}/generated/reports/registries.json`\n\t\ttry {\n\t\t\tconst data = await getData(url, (data) => {\n\t\t\t\tconst res: {[id: string]: string[]} = {}\n\t\t\t\tObject.keys(data).forEach(k => {\n\t\t\t\t\tres[k.slice(10)] = Object.keys(data[k].entries)\n\t\t\t\t})\n\t\t\t\treturn res\n\t\t\t})\n\t\t\tregistries.forEach(r => {\n\t\t\t\ttarget.register(r.id, data[r.id] ?? [])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching registries:', message(e))\n\t\t}\n\t} else {\n\t\tawait Promise.all(registries.map(async r => {\n\t\t\ttry {\n\t\t\t\tconst url = r.path\n\t\t\t\t\t? `${mcdataUrl}/${version.refs.mcdata_master}/${r.path}/data.min.json`\n\t\t\t\t\t: `${mcdataUrl}/${version.refs.mcdata_master}/processed/reports/registries/${r.id}/data.min.json`\n\t\t\t\ttarget.register(r.id, await getData(url, v => v.values))\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(`Error occurred while fetching registry ${r.id}:`, message(e))\n\t\t\t}\n\t\t}))\n\t}\n}\n\nasync function fetchBlockStateMap(version: Version, target: BlockStateRegistry) {\n\tconsole.debug(`[fetchBlockStateMap] ${version.id}`)\n\tif (checkVersion(version.id, undefined, '1.16')) {\n\t\tconst url = (checkVersion(version.id, undefined, '1.15'))\n\t\t\t? `${mcdataUrl}/${version.refs.mcdata_master}/generated/reports/blocks.json`\n\t\t\t: `${mcdataUrl}/${version.refs.mcdata_master}/processed/reports/blocks/data.min.json`\n\n\t\ttry {\n\t\t\tconst data = await getData(url, (data) => {\n\t\t\t\tconst res: BlockStateRegistry = {}\n\t\t\t\tObject.keys(data).forEach(b => {\n\t\t\t\t\tres[b] = {\n\t\t\t\t\t\tproperties: data[b].properties,\n\t\t\t\t\t\tdefault: data[b].states.find((s: any) => s.default).properties,\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\treturn res\n\t\t\t})\n\t\t\tObject.assign(target, data)\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching block state map:', message(e))\n\t\t}\n\t} else {\n\t\tconst url = `${mcdataUrl}/${version.refs.mcdata_master}/processed/reports/blocks/simplified/data.min.json`\n\t\ttry {\n\t\t\tconst data = await getData(url)\n\t\t\tObject.assign(target, data)\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching block state map:', message(e))\n\t\t}\n\t}\n}\n\nasync function fetchDynamicRegistries(version: Version, target: CollectionRegistry) {\n\tconsole.debug(`[fetchDynamicRegistries] ${version.id}`)\n\tconst registries = config.registries\n\t\t.filter(r => r.dynamic)\n\t\t.filter(r => checkVersion(version.id, r.minVersion, r.maxVersion))\n\n\tif (checkVersion(version.id, '1.16')) {\n\t\tconst url = `${vanillaDatapackUrl}/${version.refs.vanilla_datapack_summary}/summary/flattened.min.json`\n\t\ttry {\n\t\t\tconst data = await getData(url)\n\t\t\tregistries.forEach(r => {\n\t\t\t\ttarget.register(r.id, data[r.id])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching dynamic registries:', message(e))\n\t\t}\n\t}\n}\n\nexport async function fetchPreset(version: VersionId, registry: string, id: string) {\n\tconsole.debug(`[fetchPreset] ${registry} ${id}`)\n\tconst versionData = config.versions.find(v => v.id === version)!\n\ttry {\n\t\tconst url = `${vanillaDatapackUrl}/${versionData.refs.vanilla_datapack_data}/data/minecraft/${registry}/${id}.json`\n\t\tconst res = await fetch(url)\n\t\treturn await res.json()\n\t} catch (e) {\n\t\tconsole.warn(`Error occurred while fetching ${registry} preset ${id}:`, message(e))\n\t}\n}\n\nexport async function fetchManifest() {\n\ttry {\n\t\tconst res = await fetch(manifestUrl)\n\t\treturn await res.json()\n\t} catch (e) {\n\t\tthrow new Error(`Error occurred while fetching version manifest: ${message(e)}`)\n\t}\n}\n\nexport async function fetchAssets(versionId: VersionId, manifest: VersionManifest) {\n\tconst version = config.versions.find(v => v.id === versionId)\n\tconst id = version?.latest ?? manifest.latest.snapshot\n\ttry {\n\t\tconst versionMeta = await getData(manifest.versions.find(v => v.id === id)!.url)\n\t\n\t\treturn (await getData(versionMeta.assetIndex.url)).objects\n\t} catch (e) {\n\t\tthrow new Error(`Error occurred while fetching assets for ${version}: ${message(e)}`)\n\t}\n}\n\nexport async function fetchSounds(version: VersionId, assets: VersionAssets) {\n\ttry {\n\t\tconst hash = assets['minecraft/sounds.json'].hash\n\t\treturn await getData(getResourceUrl(hash))\n\t} catch (e) {\n\t\tthrow new Error(`Error occurred while fetching sounds for ${version}: ${message(e)}`)\n\t}\n}\n\nexport function getResourceUrl(hash: string) {\n\treturn `${corsUrl}${resourceUrl}${hash.slice(0, 2)}/${hash}`\n}\n\nasync function getData(url: string, fn: (v: any) => T = (v: any) => v): Promise {\n\ttry {\n\t\tconst cache = await caches.open(CACHE_NAME)\n\t\tconsole.debug(`[getData] Opened cache ${CACHE_NAME} ${url}`)\n\t\tconst cacheResponse = await cache.match(url)\n \n\t\tif (cacheResponse && cacheResponse.ok) {\n\t\t\tconsole.debug(`[getData] Retrieving cached data ${url}`)\n\t\t\treturn await cacheResponse.json()\n\t\t}\n \n\t\tconsole.debug(`[getData] fetching data ${url}`)\n\t\tconst fetchResponse = await fetch(url)\n\t\tconst responseData = fn(await fetchResponse.json())\n\t\tawait cache.put(url, new Response(JSON.stringify(responseData)))\n\t\treturn responseData\n\t} catch (e) {\n\t\tconsole.warn(`[getData] Failed to open cache ${CACHE_NAME}: ${message(e)}`)\n\n\t\tconsole.debug(`[getData] fetching data ${url}`)\n\t\tconst fetchResponse = await fetch(url)\n\t\tconst responseData = fn(await fetchResponse.json())\n\t\treturn responseData\n\t}\n}\n\nasync function deleteMatching(matches: (url: string) => boolean) {\n\ttry {\n\t\tconst cache = await caches.open(CACHE_NAME)\n\t\tconsole.debug(`[deleteMatching] Opened cache ${CACHE_NAME}`)\n\t\tconst promises: Promise[] = []\n \n\t\tfor (const request of await cache.keys()) {\n\t\t\tif (matches(request.url)) {\n\t\t\t\tpromises.push(cache.delete(request))\n\t\t\t}\n\t\t}\n\t\tconsole.debug(`[deleteMatching] Removing ${promises.length} cache objects...`)\n\t\tawait Promise.all(promises)\n\t} catch (e) {\n\t\tconsole.warn(`[deleteMatching] Failed to open cache ${CACHE_NAME}: ${message(e)}`)\n\t}\n}\n","import { DataModel } from '@mcschema/core'\nimport type { BiomeSource, Climate, NoiseOctaves } from 'deepslate'\nimport { FixedBiome, MultiNoise, NoiseGeneratorSettings, NoiseSampler, NormalNoise, Random } from 'deepslate'\nimport { fetchPreset } from '../DataFetcher'\nimport type { VersionId } from '../Schemas'\nimport { clamp, deepClone, deepEqual, square, stringToColor } from '../Utils'\n\ntype BiomeColors = Record\ntype BiomeSourceOptions = {\n\toctaves: NoiseOctaves,\n\tbiomeColors: BiomeColors,\n\toffset: [number, number],\n\tscale: number,\n\tres: number,\n\tseed: bigint,\n\tversion: VersionId,\n}\n\nlet cacheState: any\nlet biomeSourceCache: BiomeSource\nlet climateSamplerCache: Climate.Sampler\n\nexport async function biomeMap(state: any, img: ImageData, options: BiomeSourceOptions) {\n\tconst { biomeSource, climateSampler } = await getCached(state, options)\n\n\tconst data = img.data\n\tconst ox = -options.offset[0] - 100 + options.res / 2\n\tconst oz = -options.offset[1] - 100 + options.res / 2\n\tconst row = img.width * 4 / options.res\n\tconst col = 4 / options.res\n\tfor (let x = 0; x < 200; x += options.res) {\n\t\tfor (let z = 0; z < 200; z += options.res) {\n\t\t\tconst i = z * row + x * col\n\t\t\tconst worldX = (x + ox) * options.scale\n\t\t\tconst worldZ = (z + oz) * options.scale\n\t\t\tconst b = biomeSource.getBiome(worldX, 64, worldZ, climateSampler)\n\t\t\tconst color = getBiomeColor(b, options.biomeColors)\n\t\t\tdata[i] = color[0]\n\t\t\tdata[i + 1] = color[1]\n\t\t\tdata[i + 2] = color[2]\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nexport async function getBiome(state: any, x: number, z: number, options: BiomeSourceOptions): Promise {\n\tconst { biomeSource, climateSampler } = await getCached(state, options)\n\n\tconst [xx, zz] = toWorld([x, z], options)\n\treturn biomeSource.getBiome(xx, 64, zz, climateSampler)\n}\n\nasync function getCached(state: any, options: BiomeSourceOptions): Promise<{ biomeSource: BiomeSource, climateSampler: Climate.Sampler }> {\n\tconst newState = [state, options.octaves, `${options.seed}`, options.version]\n\tif (!deepEqual(newState, cacheState)) {\n\t\tcacheState = deepClone(newState)\n\n\t\tbiomeSourceCache = await getBiomeSource(state, options)\n\n\t\tconst settings = NoiseGeneratorSettings.fromJson({ octaves: options.octaves })\n\t\tconst noiseSampler = new NoiseSampler(4, 4, 32, biomeSourceCache, settings.noise, options.octaves, options.seed)\n\t\tclimateSamplerCache = noiseSampler.getClimate.bind(noiseSampler)\n\t}\n\treturn {\n\t\tbiomeSource: biomeSourceCache,\n\t\tclimateSampler: climateSamplerCache,\n\t} \n}\n\nasync function getBiomeSource(state: any, options: BiomeSourceOptions): Promise {\n\tswitch (state?.type?.replace(/^minecraft:/, '')) {\n\t\tcase 'fixed':\n\t\t\treturn new FixedBiome(state.biome as string)\n\n\t\tcase 'checkerboard':\n\t\t\tconst shift = (state.scale ?? 2) + 2\n\t\t\tconst numBiomes = state.biomes?.length ?? 0\n\t\t\treturn {\n\t\t\t\tgetBiome(x: number, _y: number, z: number) {\n\t\t\t\t\tconst i = (((x >> shift) + (z >> shift)) % numBiomes + numBiomes) % numBiomes\n\t\t\t\t\treturn (state.biomes?.[i].node as string)\n\t\t\t\t},\n\t\t\t}\n\n\t\tcase 'multi_noise':\n\t\t\tswitch(state.preset?.replace(/^minecraft:/, '')) {\n\t\t\t\tcase 'nether':\n\t\t\t\t\tstate = options.version === '1.18' ? NetherPreset18 : NetherPreset\n\t\t\t\t\tbreak\n\t\t\t\tcase 'overworld':\n\t\t\t\t\tstate = options.version === '1.18' ? await OverworldPreset18() : state\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t\tstate = DataModel.unwrapLists(state)\n\t\t\tif (options.version === '1.18') {\n\t\t\t\treturn MultiNoise.fromJson(state)\n\t\t\t} else {\n\t\t\t\tconst noise = ['altitude', 'temperature', 'humidity', 'weirdness']\n\t\t\t\t\t.map((id, i) => {\n\t\t\t\t\t\tconst config = state[`${id}_noise`]\n\t\t\t\t\t\tconfig.firstOctave = clamp(config.firstOctave ?? -7, -100, -1)\n\t\t\t\t\t\treturn new NormalNoise(new Random(options.seed + BigInt(i)), config)\n\t\t\t\t\t})\n\t\t\t\tif (!Array.isArray(state.biomes) || state.biomes.length === 0) {\n\t\t\t\t\treturn new FixedBiome('unknown')\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tgetBiome(x: number, _y: number, z: number): string {\n\t\t\t\t\t\tconst n = noise.map(n => n.sample(x, z, 0))\n\t\t\t\t\t\tlet minDist = Infinity\n\t\t\t\t\t\tlet minBiome = ''\n\t\t\t\t\t\tfor (const { biome, parameters: p } of state.biomes) {\n\t\t\t\t\t\t\tconst dist = square(p.altitude - n[0]) + square(p.temperature - n[1]) + square(p.humidity - n[2]) + square(p.weirdness - n[3]) + square(p.offset)\n\t\t\t\t\t\t\tif (dist < minDist) {\n\t\t\t\t\t\t\t\tminDist = dist\n\t\t\t\t\t\t\t\tminBiome = biome\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn minBiome\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t}\n\t}\n\tthrow new Error('Unknown biome source')\n}\n\nfunction getBiomeColor(biome: string, biomeColors: BiomeColors) {\n\tif (!biome) {\n\t\treturn [128, 128, 128]\n\t}\n\tconst color = biomeColors[biome] ?? VanillaColors[biome]\n\tif (color === undefined) {\n\t\treturn stringToColor(biome)\n\t}\n\treturn color\n}\n\nfunction toWorld([x, z]: [number, number], options: BiomeSourceOptions) {\n\tconst xx = (x - options.offset[0] - 100 + options.res / 2) * options.scale\n\tconst zz = (z - options.offset[1] - 100 + options.res / 2) * options.scale\n\treturn [xx, zz]\n}\n\nconst VanillaColors: Record = {\n\t'minecraft:badlands': [217,69,21],\n\t'minecraft:badlands_plateau': [202,140,101],\n\t'minecraft:bamboo_jungle': [118,142,20],\n\t'minecraft:bamboo_jungle_hills': [59,71,10],\n\t'minecraft:basalt_deltas': [64,54,54],\n\t'minecraft:beach': [250,222,85],\n\t'minecraft:birch_forest': [48,116,68],\n\t'minecraft:birch_forest_hills': [31,95,50],\n\t'minecraft:cold_ocean': [32,32,112],\n\t'minecraft:crimson_forest': [221,8,8],\n\t'minecraft:dark_forest': [64,81,26],\n\t'minecraft:dark_forest_hills': [104,121,66],\n\t'minecraft:deep_cold_ocean': [32,32,56],\n\t'minecraft:deep_frozen_ocean': [64,64,144],\n\t'minecraft:deep_lukewarm_ocean': [0,0,64],\n\t'minecraft:deep_ocean': [0,0,48],\n\t'minecraft:deep_warm_ocean': [0,0,80],\n\t'minecraft:desert': [250,148,24],\n\t'minecraft:desert_hills': [210,95,18],\n\t'minecraft:desert_lakes': [255,188,64],\n\t'minecraft:end_barrens': [128,128,255],\n\t'minecraft:end_highlands': [128,128,255],\n\t'minecraft:end_midlands': [128,128,255],\n\t'minecraft:eroded_badlands': [255,109,61],\n\t'minecraft:flower_forest': [45,142,73],\n\t'minecraft:forest': [5,102,33],\n\t'minecraft:frozen_ocean': [112,112,214],\n\t'minecraft:frozen_river': [160,160,255],\n\t'minecraft:giant_spruce_taiga': [129,142,121],\n\t'minecraft:giant_spruce_taiga_hills': [109,119,102],\n\t'minecraft:giant_tree_taiga': [89,102,81],\n\t'minecraft:giant_tree_taiga_hills': [69,79,62],\n\t'minecraft:gravelly_mountains': [136,136,136],\n\t'minecraft:ice_spikes': [180,220,220],\n\t'minecraft:jungle': [83,123,9],\n\t'minecraft:jungle_edge': [98,139,23],\n\t'minecraft:jungle_hills': [44,66,5],\n\t'minecraft:lukewarm_ocean': [0,0,144],\n\t'minecraft:modified_badlands_plateau': [242,180,141],\n\t'minecraft:modified_gravelly_mountains': [120,152,120],\n\t'minecraft:modified_jungle': [123,163,49],\n\t'minecraft:modified_jungle_edge': [138,179,63],\n\t'minecraft:modified_wooded_badlands_plateau': [216,191,141],\n\t'minecraft:mountain_edge': [114,120,154],\n\t'minecraft:mountains': [96,96,96],\n\t'minecraft:mushroom_field_shore': [160,0,255],\n\t'minecraft:mushroom_fields': [255,0,255],\n\t'minecraft:nether_wastes': [191,59,59],\n\t'minecraft:ocean': [0,0,112],\n\t'minecraft:plains': [141,179,96],\n\t'minecraft:river': [0,0,255],\n\t'minecraft:savanna': [189,178,95],\n\t'minecraft:savanna_plateau': [167,157,100],\n\t'minecraft:shattered_savanna': [229,218,135],\n\t'minecraft:shattered_savanna_plateau': [207,197,140],\n\t'minecraft:small_end_islands': [128,128,255],\n\t'minecraft:snowy_beach': [250,240,192],\n\t'minecraft:snowy_mountains': [160,160,160],\n\t'minecraft:snowy_taiga': [49,85,74],\n\t'minecraft:snowy_taiga_hills': [36,63,54],\n\t'minecraft:snowy_taiga_mountains': [89,125,114],\n\t'minecraft:snowy_tundra': [255,255,255],\n\t'minecraft:soul_sand_valley': [94,56,48],\n\t'minecraft:stone_shore': [162,162,132],\n\t'minecraft:sunflower_plains': [181,219,136],\n\t'minecraft:swamp': [7,249,178],\n\t'minecraft:swamp_hills': [47,255,218],\n\t'minecraft:taiga': [11,102,89],\n\t'minecraft:taiga_hills': [22,57,51],\n\t'minecraft:taiga_mountains': [51,142,129],\n\t'minecraft:tall_birch_forest': [88,156,108],\n\t'minecraft:tall_birch_hills': [71,135,90],\n\t'minecraft:the_end': [128,128,255],\n\t'minecraft:the_void': [0,0,0],\n\t'minecraft:warm_ocean': [0,0,172],\n\t'minecraft:warped_forest': [73,144,123],\n\t'minecraft:wooded_badlands_plateau': [176,151,101],\n\t'minecraft:wooded_hills': [34,85,28],\n\t'minecraft:wooded_mountains': [80,112,80],\n\t'minecraft:snowy_slopes': [140, 195, 222],\n\t'minecraft:lofty_peaks': [196, 168, 193],\n\t'minecraft:snowcapped_peaks': [200, 198, 200],\n\t'minecraft:stony_peaks': [82, 92, 103],\n\t'minecraft:grove': [150, 150, 189],\n\t'minecraft:meadow': [169, 197, 80],\n\t'minecraft:lush_caves': [112, 255, 79],\n\t'minecraft:dripstone_caves': [140, 124, 0],\n}\n\nconst NetherPreset = {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:-0.5,weirdness:0,offset:0}},{biome:'minecraft:crimson_forest',parameters:{altitude:0,temperature:0.4,humidity:0,weirdness:0,offset:0}},{biome:'minecraft:warped_forest',parameters:{altitude:0,temperature:0,humidity:0.5,weirdness:0,offset:0.375}},{biome:'minecraft:basalt_deltas',parameters:{altitude:0,temperature:-0.5,humidity:0,weirdness:0,offset:0.175}}]}\n\nconst NetherPreset18 = {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:-0.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:'minecraft:crimson_forest',parameters:{temperature:0.4,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:'minecraft:warped_forest',parameters:{temperature:0,humidity:0.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0.375}},{biome:'minecraft:basalt_deltas',parameters:{temperature:-0.5,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0.175}}]}\n\nasync function OverworldPreset18() {\n\tconst overworld = await fetchPreset('1.18', 'dimension', 'overworld')\n\treturn overworld.generator.biome_source\n}\n","import { DataModel } from '@mcschema/core'\nimport { PerlinNoise, Random } from 'deepslate'\nimport type { VersionId } from '../Schemas'\nimport { clamp, stringToColor } from '../Utils'\n\ntype BlockPos = [number, number, number]\ntype Placement = [BlockPos, number]\n\ntype PlacementContext = {\n\tplacements: Placement[],\n\tfeatures: string[],\n\trandom: Random,\n\tbiomeInfoNoise: PerlinNoise,\n\tseaLevel: number,\n\tversion: VersionId,\n\tnextFloat(): number,\n\tnextInt(max: number): number,\n\tsampleInt(provider: any): number,\n}\n\nconst terrain = [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] \n\nconst featureColors = [\n\t[255, 77, 54], // red\n\t[59, 118, 255], // blue\n\t[91, 207, 25], // green\n\t[217, 32, 245], // magenta\n\t[255, 209, 41], // yellow\n\t[52, 204, 209], // cyan\n]\n\nexport type DecoratorOptions = {\n\tsize: [number, number, number],\n\tseed: bigint,\n\tversion: VersionId,\n}\nexport function decorator(state: any, img: ImageData, options: DecoratorOptions) {\n\tconst random = new Random(options.seed)\n\tconst ctx: PlacementContext = {\n\t\tplacements: [],\n\t\tfeatures: [],\n\t\trandom,\n\t\tbiomeInfoNoise: new PerlinNoise(random.fork(), 0, [1]),\n\t\tseaLevel: 63,\n\t\tversion: options.version,\n\t\tnextFloat: () => random.nextFloat(),\n\t\tnextInt: (max: number) => random.nextInt(max),\n\t\tsampleInt(value) { return sampleInt(value, this) },\n\t}\n\n\tfor (let x = 0; x < options.size[0] / 16; x += 1) {\n\t\tfor (let z = 0; z < options.size[2] / 16; z += 1) {\n\t\t\tgetPlacements([x * 16, 0, z * 16], DataModel.unwrapLists(state), ctx)\n\t\t}\n\t}\n\n\tconst data = img.data\n\timg.data.fill(255)\n\n\tfor (const [pos, feature] of ctx.placements) {\n\t\tif (pos[0] < 0 || pos[1] < 0 || pos[2] < 0 || pos[0] >= options.size[0] || pos[1] >= options.size[1] || pos[2] >= options.size[2]) continue\n\t\tconst i = (pos[2] * (img.width * 4)) + (pos[0] * 4)\n\t\tconst color = feature < featureColors.length ? featureColors[feature] : stringToColor(ctx.features[feature])\n\t\tdata[i] = clamp(50, 205, color[0])\n\t\tdata[i + 1] = clamp(50, 205, color[1])\n\t\tdata[i + 2] = clamp(50, 205, color[2])\n\t\tdata[i + 3] = 255\n\t}\n\n\tfor (let x = 0; x < options.size[0]; x += 1) {\n\t\tfor (let y = 0; y < options.size[2]; y += 1) {\n\t\t\tif ((Math.floor(x / 16) + Math.floor(y / 16)) % 2 === 0) continue\n\t\t\tconst i = (y * (img.width * 4)) + (x * 4)\n\t\t\tfor (let j = 0; j < 3; j += 1) {\n\t\t\t\tdata[i + j] = 0.85 * data[i + j] \n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction normalize(id: string) {\n\treturn id.startsWith('minecraft:') ? id.slice(10) : id\n}\n\nfunction decorateY(pos: BlockPos, y: number): BlockPos[] {\n\treturn [[ pos[0], y, pos[2] ]]\n}\n\nfunction sampleInt(value: any, ctx: PlacementContext): number {\n\tif (typeof value === 'number') {\n\t\treturn value\n\t} else if (value.base) {\n\t\treturn value.base ?? 1 + ctx.nextInt(1 + (value.spread ?? 0))\n\t} else {\n\t\tswitch (normalize(value.type)) {\n\t\t\tcase 'constant': return value.value\n\t\t\tcase 'uniform': return value.value.min_inclusive + ctx.nextInt(value.value.max_inclusive - value.value.min_inclusive + 1)\n\t\t\tcase 'biased_to_bottom': return value.value.min_inclusive + ctx.nextInt(ctx.nextInt(value.value.max_inclusive - value.value.min_inclusive + 1) + 1)\n\t\t\tcase 'clamped': return Math.max(value.value.min_inclusive, Math.min(value.value.max_inclusive, sampleInt(value.value.source, ctx)))\n\t\t}\n\t\treturn 1\n\t}\n}\n\nfunction useFeature(s: string, ctx: PlacementContext) {\n\tconst i = ctx.features.indexOf(s)\n\tif (i != -1) return i\n\tctx.features.push(s)\n\treturn ctx.features.length - 1\n}\n\nfunction getPlacements(pos: BlockPos, feature: any, ctx: PlacementContext): void {\n\tif (typeof feature === 'string') {\n\t\tctx.placements.push([pos, useFeature(feature, ctx)])\n\t\treturn\n\t}\n\tconst type = normalize(feature?.type ?? 'no_op')\n\tconst featureFn = Features[type]\n\tif (featureFn) {\n\t\tfeatureFn(feature.config, pos, ctx)\n\t} else {\n\t\tctx.placements.push([pos, useFeature(JSON.stringify(feature), ctx)])\n\t}\n}\n\nfunction getPositions(pos: BlockPos, decorator: any, ctx: PlacementContext): BlockPos[] {\n\tconst type = normalize(decorator?.type ?? 'nope')\n\tconst decoratorFn = Decorators[type]\n\tif (!decoratorFn) {\n\t\treturn [pos]\n\t}\n\treturn decoratorFn(decorator?.config, pos, ctx)\n}\n\nconst Features: {\n\t[key: string]: (config: any, pos: BlockPos, ctx: PlacementContext) => void,\n} = {\n\tdecorated: (config, pos, ctx) => {\n\t\tconst positions = getPositions(pos, config?.decorator, ctx)\n\t\tpositions.forEach(p => getPlacements(p, config?.feature, ctx))\n\t},\n\trandom_boolean_selector: (config, pos, ctx) => {\n\t\tconst feature = ctx.nextFloat() < 0.5 ? config?.feature_true : config?.feature_false\n\t\tgetPlacements(pos, feature, ctx)\n\t},\n\trandom_selector: (config, pos, ctx) => {\n\t\tfor (const f of config?.features ?? []) {\n\t\t\tif (ctx.nextFloat() < (f?.chance ?? 0)) {\n\t\t\t\tgetPlacements(pos, f.feature, ctx)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tgetPlacements(pos, config?.default, ctx)\n\t},\n\tsimple_random_selector: (config, pos, ctx) => {\n\t\tconst feature = config?.features?.[ctx.nextInt(config?.features?.length ?? 0)]\n\t\tgetPlacements(pos, feature, ctx)\n\t},\n}\n\nconst Decorators: {\n\t[key: string]: (config: any, pos: BlockPos, ctx: PlacementContext) => BlockPos[],\n} = {\n\tchance: (config, pos, ctx) => {\n\t\treturn ctx.nextFloat() < 1 / (config?.chance ?? 1) ? [pos] : []\n\t},\n\tcount: (config, pos, ctx) => {\n\t\treturn new Array(ctx.sampleInt(config?.count ?? 1)).fill(pos)\n\t},\n\tcount_extra: (config, pos, ctx) => {\n\t\tlet count = config?.count ?? 1\n\t\tif (ctx.nextFloat() < config.extra_chance ?? 0){\n\t\t\tcount += config.extra_count ?? 0\n\t\t}\n\t\treturn new Array(count).fill(pos)\n\t},\n\tcount_multilayer: (config, pos, ctx) => {\n\t\treturn new Array(ctx.sampleInt(config?.count ?? 1)).fill(pos)\n\t\t\t.map(p => [\n\t\t\t\tp[0] + ctx.nextInt(16),\n\t\t\t\tp[1], \n\t\t\t\tp[2] + ctx.nextInt(16),\n\t\t\t])\n\t},\n\tcount_noise: (config, pos, ctx) => {\n\t\tconst noise = ctx.biomeInfoNoise.sample(pos[0] / 200, 0, pos[2] / 200)\n\t\tconst count = noise < config.noise_level ? config.below_noise : config.above_noise\n\t\treturn new Array(count).fill(pos)\n\t},\n\tcount_noise_biased: (config, pos, ctx) => {\n\t\tconst factor = Math.max(1, config.noise_factor)\n\t\tconst noise = ctx.biomeInfoNoise.sample(pos[0] / factor, 0, pos[2] / factor)\n\t\tconst count = Math.max(0, Math.ceil((noise + (config.noise_offset ?? 0)) * config.noise_to_count_ratio))\n\t\treturn new Array(count).fill(pos)\n\t},\n\tdark_oak_tree: (_config, pos, ctx) => {\n\t\treturn [...new Array(16)].map((_, i) => {\n\t\t\tconst x = Math.floor(i / 4) * 4 + 1 + ctx.nextInt(3) + pos[0]\n\t\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, x)])\n\t\t\tconst z = Math.floor(i % 4) * 4 + 1 + ctx.nextInt(3) + pos[2]\n\t\t\treturn [x, y, z]\n\t\t})\n\t},\n\tdecorated: (config, pos, ctx) => {\n\t\treturn getPositions(pos, config?.outer, ctx).flatMap(p => {\n\t\t\treturn getPositions(p, config?.inner, ctx)\n\t\t})\n\t},\n\tdepth_average: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(config?.spread ?? 0) + ctx.nextInt(config?.spread ?? 0) - (config.spread ?? 0) + (config?.baseline ?? 0)\n\t\treturn decorateY(pos, y)\n\t},\n\temerald_ore: (_config, pos, ctx) => {\n\t\tconst count = 3 + ctx.nextInt(6)\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\t4 + ctx.nextInt(28),\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t])\n\t},\n\tfire: (config, pos, ctx) => {\n\t\tconst count = 1 + ctx.nextInt(ctx.nextInt(ctx.sampleInt(config?.count)))\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\tctx.nextInt(128),\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t])\n\t},\n\tglowstone: (config, pos, ctx) => {\n\t\tconst count = ctx.nextInt(1 + ctx.nextInt(ctx.sampleInt(config?.count)))\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\tctx.nextInt(128),\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t])\n\t},\n\theightmap: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, y)\n\t},\n\theightmap_spread_double: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, ctx.nextInt(y * 2))\n\t},\n\theightmap_world_surface: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, y)\n\t},\n\ticeberg: (_config, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + 4 + ctx.nextInt(8),\n\t\t\tpos[1],\n\t\t\tpos[2] + 4 + ctx.nextInt(8),\n\t\t]]\n\t},\n\tlava_lake: (config, pos, ctx) => {\n\t\tif (ctx.nextInt((config.chance ?? 1) / 10) === 0) {\n\t\t\tconst y = ctx.nextInt(ctx.nextInt(256 - 8) + 8)\n\t\t\tif (y < ctx.seaLevel || ctx.nextInt((config?.chance ?? 1) / 8) == 0) {\n\t\t\t\tconst x = ctx.nextInt(16) + pos[0]\n\t\t\t\tconst z = ctx.nextInt(16) + pos[2]\n\t\t\t\treturn [[x, y, z]]\n\t\t\t}\n\t\t}\n\t\treturn []\n\t},\n\tnope: (_config, pos) => {\n\t\treturn [pos]\n\t},\n\trange: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0)) + (config?.bottom_offset ?? 0)\n\t\treturn decorateY(pos, y)\n\t},\n\trange_biased: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(ctx.nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0)) + (config?.bottom_offset ?? 0))\n\t\treturn decorateY(pos, y)\n\t},\n\trange_very_biased: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(ctx.nextInt(ctx.nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0)) + (config?.bottom_offset ?? 0)) + (config?.bottom_offset ?? 0))\n\t\treturn decorateY(pos, y)\n\t},\n\tspread_32_above: (_config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(pos[1] + 32)\n\t\treturn decorateY(pos, y)\n\t},\n\ttop_solid_heightmap: (_config, pos) => {\n\t\tconst y = terrain[clamp(0, 63, pos[0])]\n\t\treturn decorateY(pos, y)\n\t},\n\tmagma: (_config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(pos[1] + 32)\n\t\treturn decorateY(pos, y)\n\t},\n\tsquare: (_config, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\tpos[1],\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t]]\n\t},\n\tsurface_relative_threshold: (config, pos) => {\n\t\tconst height = terrain[clamp(0, 63, pos[0])]\n\t\tconst min = height + (config?.min_inclusive ?? -Infinity)\n\t\tconst max = height + (config?.max_inclusive ?? Infinity)\n\t\treturn (pos[1] < min || pos[1] > max) ? [pos] : []\n\t},\n\twater_lake: (config, pos, ctx) => {\n\t\tif (ctx.nextInt(config.chance ?? 1) === 0) {\n\t\t\treturn [[\n\t\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\t\tctx.nextInt(256),\n\t\t\t\tpos[2] + ctx.nextInt(16),\n\t\t\t]]\n\t\t}\n\t\treturn []\n\t},\n}\n","import { PerlinNoise, Random } from 'deepslate'\nimport { clampedLerp, lerp2 } from '../../Utils'\n\nexport class NoiseChunkGenerator {\n\tprivate readonly minLimitPerlinNoise: PerlinNoise\n\tprivate readonly maxLimitPerlinNoise: PerlinNoise\n\tprivate readonly mainPerlinNoise: PerlinNoise\n\tprivate readonly depthNoise: PerlinNoise\n\n\tprivate settings: any = {}\n\tprivate chunkWidth: number = 4\n\tprivate chunkHeight: number = 4\n\tprivate chunkCountY: number = 32\n\tprivate biomeDepth: number = 0.1\n\tprivate biomeScale: number = 0.2\n\n\tprivate noiseColumnCache: (number[] | null)[] = []\n\tprivate xOffset: number = 0\n\n\tconstructor(seed: bigint) {\n\t\tconst random = new Random(seed)\n\t\tthis.minLimitPerlinNoise = new PerlinNoise(random, -15, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n\t\tthis.maxLimitPerlinNoise = new PerlinNoise(random, -15, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n\t\tthis.mainPerlinNoise = new PerlinNoise(random, -7, [1, 1, 1, 1, 1, 1, 1, 1])\n\t\tthis.depthNoise = new PerlinNoise(random, -15, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n\t}\n\n\tpublic reset(settings: any, depth: number, scale: number, xOffset: number, width: number) {\n\t\tthis.settings = settings\n\t\tthis.chunkWidth = settings.size_horizontal * 4\n\t\tthis.chunkHeight = settings.size_vertical * 4\n\t\tthis.chunkCountY = Math.floor(settings.height / this.chunkHeight)\n\n\t\tif (settings.amplified && depth > 0) {\n\t\t\tdepth = 1 + depth * 2\n\t\t\tscale = 1 + scale * 4\n\t\t}\n\t\tthis.biomeDepth = 0.265625 * (depth * 0.5 - 0.125)\n\t\tthis.biomeScale = 96.0 / (scale * 0.9 + 0.1)\n\n\t\tthis.noiseColumnCache = Array(width).fill(null)\n\t\tthis.xOffset = xOffset\n\t}\n \n\tpublic iterateNoiseColumn(x: number): number[] {\n\t\tconst data = Array(this.chunkCountY * this.chunkHeight)\n\t\tconst cx = Math.floor(x / this.chunkWidth)\n\t\tconst ox = Math.floor(x % this.chunkWidth) / this.chunkWidth\n\t\tconst noise1 = this.fillNoiseColumn(cx)\n\t\tconst noise2 = this.fillNoiseColumn(cx + 1)\n\n\t\tfor (let y = this.chunkCountY - 1; y >= 0; y -= 1) {\n\t\t\tfor (let yy = this.chunkHeight; yy >= 0; yy -= 1) {\n\t\t\t\tconst oy = yy / this.chunkHeight\n\t\t\t\tconst i = y * this.chunkHeight + yy\n\t\t\t\tdata[i] = lerp2(oy, ox, noise1[y], noise1[y+1], noise2[y], noise2[y+1])\n\t\t\t}\n\t\t}\n\t\treturn data\n\t}\n\n\tprivate fillNoiseColumn(x: number): number[] {\n\t\tconst cachedColumn = this.noiseColumnCache[x - this.xOffset]\n\t\tif (cachedColumn) return cachedColumn\n\n\t\tconst data = Array(this.chunkCountY + 1)\n\n\t\tconst xzScale = 684.412 * this.settings.sampling.xz_scale\n\t\tconst yScale = 684.412 * this.settings.sampling.y_scale\n\t\tconst xzFactor = xzScale / this.settings.sampling.xz_factor\n\t\tconst yFactor = yScale / this.settings.sampling.y_factor\n\t\tconst randomDensity = this.settings.random_density_offset ? this.getRandomDensity(x) : 0\n\n\t\tfor (let y = 0; y <= this.chunkCountY; y += 1) {\n\t\t\tlet noise = this.sampleAndClampNoise(x, y, this.mainPerlinNoise.getOctaveNoise(0)!.zo, xzScale, yScale, xzFactor, yFactor)\n\t\t\tconst yOffset = 1 - y * 2 / this.chunkCountY + randomDensity\n\t\t\tconst density = yOffset * this.settings.density_factor + this.settings.density_offset\n\t\t\tconst falloff = (density + this.biomeDepth) * this.biomeScale\n\t\t\tnoise += falloff * (falloff > 0 ? 4 : 1)\n\n\t\t\tif (this.settings.top_slide.size > 0) {\n\t\t\t\tnoise = clampedLerp(\n\t\t\t\t\tthis.settings.top_slide.target,\n\t\t\t\t\tnoise,\n\t\t\t\t\t(this.chunkCountY - y - (this.settings.top_slide.offset)) / (this.settings.top_slide.size)\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tif (this.settings.bottom_slide.size > 0) {\n\t\t\t\tnoise = clampedLerp(\n\t\t\t\t\tthis.settings.bottom_slide.target,\n\t\t\t\t\tnoise,\n\t\t\t\t\t(y - (this.settings.bottom_slide.offset)) / (this.settings.bottom_slide.size)\n\t\t\t\t)\n\t\t\t}\n\t\t\tdata[y] = noise\n\t\t}\n\n\t\tthis.noiseColumnCache[x - this.xOffset] = data\n\t\treturn data\n\t}\n\n\tprivate getRandomDensity(x: number): number {\n\t\tconst noise = this.depthNoise.sample(x * 200, 10, this.depthNoise.getOctaveNoise(0)!.zo, 1, 0, true)\n\t\tconst a = (noise < 0) ? -noise * 0.3 : noise\n\t\tconst b = a * 24.575625 - 2\n\t\treturn (b < 0) ? b * 0.009486607142857142 : Math.min(b, 1) * 0.006640625\n\t}\n\n\tprivate sampleAndClampNoise(x: number, y: number, z: number, xzScale: number, yScale: number, xzFactor: number, yFactor: number): number {\n\t\tlet a = 0\n\t\tlet b = 0\n\t\tlet c = 0\n\t\tlet d = 1\n\n\t\tfor (let i = 0; i < 16; i += 1) {\n\t\t\tconst x2 = PerlinNoise.wrap(x * xzScale * d)\n\t\t\tconst y2 = PerlinNoise.wrap(y * yScale * d)\n\t\t\tconst z2 = PerlinNoise.wrap(z * xzScale * d)\n\t\t\tconst e = yScale * d\n\n\t\t\tconst minLimitNoise = this.minLimitPerlinNoise.getOctaveNoise(i)\n\t\t\tif (minLimitNoise) {\n\t\t\t\ta += minLimitNoise.sample(x2, y2, z2, e, y * e) / d\n\t\t\t}\n\n\t\t\tconst maxLimitNoise = this.maxLimitPerlinNoise.getOctaveNoise(i)\n\t\t\tif (maxLimitNoise) {\n\t\t\t\tb += maxLimitNoise.sample(x2, y2, z2, e, y * e) / d\n\t\t\t}\n\n\t\t\tif (i < 8) {\n\t\t\t\tconst mainNoise = this.mainPerlinNoise.getOctaveNoise(i)\n\t\t\t\tif (mainNoise) {\n\t\t\t\t\tc += mainNoise.sample(\n\t\t\t\t\t\tPerlinNoise.wrap(x * xzFactor * d),\n\t\t\t\t\t\tPerlinNoise.wrap(y * yFactor * d),\n\t\t\t\t\t\tPerlinNoise.wrap(z * xzFactor * d),\n\t\t\t\t\t\tyFactor * d,\n\t\t\t\t\t\ty * yFactor * d \n\t\t\t\t\t) / d\n\t\t\t\t}\n\t\t\t}\n\n\t\t\td /= 2\n\t\t}\n\n\t\treturn clampedLerp(a / 512, b / 512, (c / 10 + 1) / 2)\n\t}\n}\n","import { DataModel } from '@mcschema/core'\nimport type { BlockPos, BlockState } from 'deepslate'\nimport { Chunk, ChunkPos, FixedBiome, NoiseChunkGenerator, NoiseGeneratorSettings } from 'deepslate'\nimport type { VersionId } from '../Schemas'\nimport { checkVersion } from '../Schemas'\nimport { deepClone, deepEqual } from '../Utils'\nimport { NoiseChunkGenerator as OldNoiseChunkGenerator } from './noise/NoiseChunkGenerator'\n\nexport type NoiseSettingsOptions = {\n\tbiomeFactor: number,\n\tbiomeOffset: number,\n\tbiomePeaks: number,\n\toffset: number,\n\twidth: number,\n\tseed: bigint,\n\tversion: VersionId,\n}\n\nconst Z = 0\n\nconst colors: Record = {\n\t'minecraft:air': [150, 160, 170],\n\t'minecraft:water': [20, 80, 170],\n\t'minecraft:lava': [200, 100, 0],\n\t'minecraft:stone': [50, 50, 50],\n\t'minecraft:netherrack': [100, 40, 40],\n\t'minecraft:end_stone': [200, 200, 140],\n}\n\nlet cacheState: any\nlet generatorCache: NoiseChunkGenerator\nlet chunkCache: Chunk[] = []\n\nexport function noiseSettings(state: any, img: ImageData, options: NoiseSettingsOptions) {\n\tif (checkVersion(options.version, '1.18')) {\n\t\tconst { settings, generator } = getCached(state, options)\n\n\t\tconst slice = new LevelSlice(-options.offset, options.width, settings.noise.minY, settings.noise.height)\n\t\tslice.fill(generator)\n\n\t\tconst data = img.data\n\t\tfor (let x = 0; x < options.width; x += 1) {\n\t\t\tfor (let y = 0; y < settings.noise.height; y += 1) {\n\t\t\t\tconst i = x * 4 + (settings.noise.height-y-1) * 4 * img.width\n\t\t\t\tconst state = slice.getBlockState([x - options.offset, y, Z])\n\t\t\t\tconst color = colors[state.getName()] ?? [0, 0, 0]\n\t\t\t\tdata[i] = color[0]\n\t\t\t\tdata[i + 1] = color[1]\n\t\t\t\tdata[i + 2] = color[2]\n\t\t\t\tdata[i + 3] = 255\n\t\t\t}\n\t\t}\n\t\treturn\n\t}\n\n\tconst generator = new OldNoiseChunkGenerator(options.seed)\n\tgenerator.reset(state.noise, options.biomeOffset, options.biomeFactor, options.offset, 200)\n\tconst data = img.data\n\tconst row = img.width * 4\n\tfor (let x = 0; x < options.width; x += 1) {\n\t\tconst noise = generator.iterateNoiseColumn(x - options.offset).reverse()\n\t\tfor (let y = 0; y < state.noise.height; y += 1) {\n\t\t\tconst i = y * row + x * 4\n\t\t\tconst color = getColor(noise, y)\n\t\t\tdata[i] = color\n\t\t\tdata[i + 1] = color\n\t\t\tdata[i + 2] = color\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nfunction getCached(state: unknown, options: NoiseSettingsOptions) {\n\tconst settings = NoiseGeneratorSettings.fromJson(DataModel.unwrapLists(state))\n\t// Temporary fix for slides\n\tsettings.noise.bottomSlide.target *= 128\n\tsettings.noise.topSlide.target *= 128\n\tconst shape = { factor: options.biomeFactor, offset: options.biomeOffset, peaks: options.biomePeaks, nearWater: false }\n\n\tconst newState = [state, shape, `${options.seed}`]\n\tif (!deepEqual(newState, cacheState)) {\n\t\tcacheState = deepClone(newState)\n\t\tchunkCache = []\n\t\tconst biomeSource = new FixedBiome('unknown')\n\t\tgeneratorCache = new NoiseChunkGenerator(options.seed, biomeSource, settings, shape)\n\t}\n\treturn {\n\t\tsettings,\n\t\tgenerator: generatorCache,\n\t}\n}\n\nfunction getColor(noise: number[], y: number): number {\n\tif (noise[y] > 0) {\n\t\treturn 0\n\t}\n\tif (noise[y+1] > 0) {\n\t\treturn 150\n\t}\n\treturn 255\n}\n\nclass LevelSlice {\n\tprivate readonly chunks: Chunk[]\n\tprivate readonly filled: boolean[]\n\n\tconstructor(\n\t\tprivate readonly minX: number,\n\t\twidth: number,\n\t\tminY: number,\n\t\theight: number,\n\t) {\n\t\tthis.filled = []\n\t\tthis.chunks = [...Array(Math.ceil(width / 16) + 1)]\n\t\t\t.map((_, i) => {\n\t\t\t\tconst x = (minX >> 4) + i\n\t\t\t\tconst cached = chunkCache.find(c => c.pos[0] === x)\n\t\t\t\tif (cached) {\n\t\t\t\t\tthis.filled[i] = true\n\t\t\t\t\treturn cached\n\t\t\t\t}\n\t\t\t\treturn new Chunk(minY, height, ChunkPos.create(x, Z >> 4))\n\t\t\t})\n\t}\n\n\tpublic fill(generator: NoiseChunkGenerator) {\n\t\tthis.chunks.forEach((chunk, i) => {\n\t\t\tif (!this.filled[i]) {\n\t\t\t\tgenerator.fill(chunk)\n\t\t\t\tthis.filled[i] = true\n\t\t\t\tchunkCache.push(chunk)\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic getBlockState(pos: BlockPos): BlockState {\n\t\tconst chunkIndex = (pos[0] >> 4) - (this.minX >> 4)\n\t\treturn this.chunks[chunkIndex].getBlockState(pos)\n\t}\n}\n","import { Path } from '@mcschema/core'\nimport type { NoiseOctaves } from 'deepslate'\nimport { NoiseGeneratorSettings } from 'deepslate'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn } from '..'\nimport { useCanvas } from '../../hooks'\nimport { locale } from '../../Locales'\nimport { biomeMap, getBiome } from '../../previews'\nimport { newSeed } from '../../Utils'\n\nexport const BiomeSourcePreview = ({ model, data, shown, lang, version }: PreviewProps) => {\n\tconst [scale, setScale] = useState(2)\n\tconst [focused, setFocused] = useState(undefined)\n\tconst offset = useRef<[number, number]>([0, 0])\n\tconst res = useRef(1)\n\tconst refineTimeout = useRef(undefined)\n\n\tconst seed = BigInt(model.get(new Path(['generator', 'seed'])))\n\tconst octaves = getOctaves(model.get(new Path(['generator', 'settings'])))\n\tconst state = shown ? calculateState(data, octaves) : ''\n\tconst type: string = data.type?.replace(/^minecraft:/, '')\n\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [200 / res.current, 200 / res.current]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tconst options = { octaves, biomeColors: {}, offset: offset.current, scale, seed, res: res.current, version }\n\t\t\tawait biomeMap(data, img, options)\n\t\t\tif (res.current === 4) {\n\t\t\t\tclearTimeout(refineTimeout.current)\n\t\t\t\trefineTimeout.current = setTimeout(() => {\n\t\t\t\t\tres.current = 1\n\t\t\t\t\tredraw()\n\t\t\t\t}, 150) as any\n\t\t\t}\n\t\t},\n\t\tasync onDrag(dx, dy) {\n\t\t\toffset.current[0] = offset.current[0] + dx * 200\n\t\t\toffset.current[1] = offset.current[1] + dy * 200\n\t\t\tclearTimeout(refineTimeout.current)\n\t\t\tres.current = type === 'multi_noise' ? 4 : 1\n\t\t\tredraw()\n\t\t},\n\t\tasync onHover(x, y) {\n\t\t\tconst options = { octaves, biomeColors: {}, offset: offset.current, scale, seed, res: 1, version }\n\t\t\tconst biome = await getBiome(data, Math.floor(x * 200), Math.floor(y * 200), options)\n\t\t\tsetFocused(biome)\n\t\t},\n\t\tonLeave() {\n\t\t\tsetFocused(undefined)\n\t\t},\n\t}, [state, scale, seed])\n\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tres.current = type === 'multi_noise' ? 4 : 1\n\t\t\tredraw()\n\t\t}\n\t}, [state, scale, seed, shown])\n\n\tconst changeScale = (newScale: number) => {\n\t\toffset.current[0] = offset.current[0] * scale / newScale\n\t\toffset.current[1] = offset.current[1] * scale / newScale\n\t\tsetScale(newScale)\n\t}\n\n\treturn <>\n\t\t
\n\t\t\t{focused && }\n\t\t\t{(type === 'multi_noise' || type === 'checkerboard') && <>\n\t\t\t\t changeScale(scale * 1.5)} />\n\t\t\t\t changeScale(scale / 1.5)} />\n\t\t\t}\n\t\t\t{type === 'multi_noise' &&\n\t\t\t\t newSeed(model)} />}\n\t\t
\n\t\t\n\t\n}\n\nfunction calculateState(data: any, octaves: NoiseOctaves) {\n\treturn JSON.stringify([data, octaves])\n}\n\nfunction getOctaves(obj: any): NoiseOctaves {\n\tif (typeof obj === 'string') {\n\t\tswitch (obj.replace(/^minecraft:/, '')) {\n\t\t\tcase 'overworld':\n\t\t\tcase 'amplified':\n\t\t\t\treturn {\n\t\t\t\t\ttemperature: { firstOctave: -9, amplitudes: [1.5, 0, 1, 0, 0, 0] },\n\t\t\t\t\thumidity: { firstOctave: -7, amplitudes: [1, 1, 0, 0, 0, 0] },\n\t\t\t\t\tcontinentalness: { firstOctave: -9, amplitudes: [1, 1, 2, 2, 2, 1, 1, 1, 1] },\n\t\t\t\t\terosion: { firstOctave: -9, amplitudes: [1, 1, 0, 1, 1] },\n\t\t\t\t\tweirdness: { firstOctave: -7, amplitudes: [1, 2, 1, 0, 0, 0] },\n\t\t\t\t\tshift: { firstOctave: -3, amplitudes: [1, 1, 1, 0] },\n\t\t\t\t}\n\t\t\tcase 'end':\n\t\t\tcase 'floating_islands':\n\t\t\t\treturn {\n\t\t\t\t\ttemperature: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\t\thumidity: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\t\tcontinentalness: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\t\terosion: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\t\tweirdness: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\t\tshift: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn {\n\t\t\t\t\ttemperature: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\t\thumidity: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\t\tcontinentalness: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\t\terosion: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\t\tweirdness: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\t\tshift: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\t}\n\t\t}\n\t}\n\treturn NoiseGeneratorSettings.fromJson(obj).octaves\n}\n","import { useEffect, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn } from '..'\nimport { useCanvas } from '../../hooks'\nimport { locale } from '../../Locales'\nimport { decorator } from '../../previews'\nimport { randomSeed } from '../../Utils'\n\nexport const DecoratorPreview = ({ data, version, shown, lang }: PreviewProps) => {\n\tconst [scale, setScale] = useState(4)\n\tconst [seed, setSeed] = useState(randomSeed())\n\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [scale * 16, scale * 16]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tdecorator(data, img, { seed, version, size: [scale * 16, 128, scale * 16] })\n\t\t},\n\t})\n\n\tconst state = JSON.stringify(data)\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tredraw()\n\t\t}\n\t}, [state, scale, seed, shown])\n\n\treturn <>\n\t\t
\n\t\t\t setScale(Math.min(16, scale + 1))} />\n\t\t\t setScale(Math.max(1, scale - 1))} />\n\t\t\t setSeed(randomSeed())} />\n\t\t
\n\t\t\n\t\n}\n","import { useEffect, useRef, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn, BtnInput, BtnMenu } from '..'\nimport { useCanvas } from '../../hooks'\nimport { locale } from '../../Locales'\nimport { noiseSettings } from '../../previews'\nimport { checkVersion } from '../../Schemas'\nimport { randomSeed } from '../../Utils'\n\nexport const NoiseSettingsPreview = ({ lang, data, shown, version }: PreviewProps) => {\n\tconst loc = locale.bind(null, lang)\n\tconst [seed, setSeed] = useState(randomSeed())\n\tconst [biomeFactor, setBiomeFactor] = useState(0.2)\n\tconst [biomeOffset, setBiomeOffset] = useState(0.1)\n\tconst [biomePeaks, setBiomePeaks] = useState(0)\n\tconst [focused, setFocused] = useState(undefined)\n\tconst offset = useRef(0)\n\tconst state = JSON.stringify([data, biomeFactor, biomeOffset, biomePeaks])\n\n\tconst hasPeaks = checkVersion(version, '1.18')\n\tuseEffect(() => {\n\t\tsetBiomeFactor(hasPeaks ? 600 : 0.2)\n\t\tsetBiomeOffset(hasPeaks ? 0.05 : 0.1)\n\t}, [hasPeaks])\n\n\tconst size = data?.noise?.height ?? 256\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [size, size]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tconst options = { biomeOffset, biomeFactor, biomePeaks, offset: offset.current, width: img.width, seed, version }\n\t\t\tnoiseSettings(data, img, options)\n\t\t},\n\t\tasync onDrag(dx) {\n\t\t\toffset.current += dx * size\n\t\t\tredraw()\n\t\t},\n\t\tasync onHover(_, y) {\n\t\t\tconst worldY = size - Math.max(1, Math.ceil(y * size)) + (data?.noise?.min_y ?? 0)\n\t\t\tsetFocused(`${worldY}`)\n\t\t},\n\t\tonLeave() {\n\t\t\tsetFocused(undefined)\n\t\t},\n\t}, [state, seed])\n\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tredraw()\n\t\t}\n\t}, [state, seed, shown])\n\n\treturn <>\n\t\t
\n\t\t\t{focused && }\n\t\t\t\n\t\t\t\t{hasPeaks ? <>\n\t\t\t\t\t setBiomeFactor(Number(v))} />\n\t\t\t\t\t setBiomeOffset(Number(v))} />\n\t\t\t\t\t setBiomePeaks(Number(v))} />\n\t\t\t\t : <>\n\t\t\t\t\t setBiomeFactor(Number(v))} />\n\t\t\t\t\t setBiomeOffset(Number(v))} />\n\t\t\t\t}\n\t\t\t\n\t\t\t setSeed(randomSeed())} />\n\t\t
\n\t\t\n\t\n}\n","import type { DataModel } from '@mcschema/core'\nimport { Path } from '@mcschema/core'\nimport { useState } from 'preact/hooks'\nimport { useModel } from '../../hooks'\nimport type { VersionId } from '../../Schemas'\nimport { BiomeSourcePreview, DecoratorPreview, NoiseSettingsPreview } from '../previews'\n\nexport const HasPreview = ['dimension', 'worldgen/noise_settings', 'worldgen/configured_feature']\n\ntype PreviewPanelProps = {\n\tlang: string,\n\tmodel: DataModel | null,\n\tversion: VersionId,\n\tid: string,\n\tshown: boolean,\n\tonError: (message: string) => unknown,\n}\nexport function PreviewPanel({ lang, model, version, id, shown }: PreviewPanelProps) {\n\tconst [, setCount] = useState(0)\n\n\tuseModel(model, () => {\n\t\tsetCount(count => count + 1)\n\t})\n\n\tif (id === 'dimension' && model?.get(new Path(['generator', 'type']))?.endsWith('noise')) {\n\t\tconst data = model.get(new Path(['generator', 'biome_source']))\n\t\tif (data) return \n\t}\n\n\tif (id === 'worldgen/noise_settings' && model) {\n\t\tconst data = model.get(new Path([]))\n\t\tif (data) return \n\t}\n\n\tif (id === 'worldgen/configured_feature' && model) {\n\t\tconst data = model.get(new Path([]))\n\t\tif (data) return \n\t}\n\n\treturn <>\n}\n","import type { Hook } from '@mcschema/core'\nimport { relativePath } from '@mcschema/core'\nimport type { BlockStateRegistry } from '../Schemas'\n\nexport type OutputProps = {\n\tblockStates: BlockStateRegistry,\n}\nexport const transformOutput: Hook<[any, OutputProps], any> = {\n\tbase({}, _, value) {\n\t\treturn value\n\t},\n\n\tchoice({ switchNode }, path, value, props) {\n\t\treturn switchNode.hook(this, path, value, props)\n\t},\n\n\tlist({ children }, path, value, props) {\n\t\tif (!Array.isArray(value)) return value\n\t\treturn value.map((obj, index) =>\n\t\t\tchildren.hook(this, path.push(index), obj.node, props)\n\t\t)\n\t},\n\n\tmap({ children, config }, path, value, props) {\n\t\tif (value === undefined) return undefined\n\t\tconst blockState = config.validation?.validator === 'block_state_map'? props.blockStates?.[relativePath(path, config.validation.params.id).get()] : null\n\t\tconst res: any = {}\n\t\tObject.keys(value).forEach(f => {\n\t\t\tif (blockState) {\n\t\t\t\tif (!Object.keys(blockState.properties ?? {}).includes(f)) return\n\t\t\t}\n\t\t\tres[f] = children.hook(this, path.push(f), value[f], props)\n\t\t})\n\t\treturn res\n\t},\n\n\tobject({ getActiveFields }, path, value, props) {\n\t\tif (value === undefined || value === null || typeof value !== 'object') {\n\t\t\treturn value\n\t\t}\n\t\tconst res: any = {}\n\t\tconst activeFields = getActiveFields(path)\n\t\tObject.keys(activeFields)\n\t\t\t.filter(k => activeFields[k].enabled(path))\n\t\t\t.forEach(f => {\n\t\t\t\tres[f] = activeFields[f].hook(this, path.push(f), value[f], props)\n\t\t\t})\n\t\treturn res\n\t},\n}\n","import type { VersionId } from './Schemas'\nimport { VersionIds } from './Schemas'\n\nexport namespace Store {\n\texport const ID_LANGUAGE = 'language'\n\texport const ID_THEME = 'theme'\n\texport const ID_VERSION = 'schema_version'\n\texport const ID_INDENT = 'indentation'\n\texport const ID_SOUNDS_VERSION = 'minecraft_sounds_version'\n\n\texport function getLanguage() {\n\t\treturn localStorage.getItem(ID_LANGUAGE) ?? 'en'\n\t}\n\n\texport function getTheme() {\n\t\treturn localStorage.getItem(ID_THEME) ?? 'dark'\n\t}\n\n\texport function getVersion(): VersionId {\n\t\tconst version = localStorage.getItem(ID_VERSION)\n\t\tif (version && VersionIds.includes(version as VersionId)) {\n\t\t\treturn version as VersionId\n\t\t}\n\t\treturn '1.17'\n\t}\n\n\texport function getIndent() {\n\t\treturn localStorage.getItem(ID_INDENT) ?? '2_spaces'\n\t}\n\n\texport function getSoundsVersion() {\n\t\treturn localStorage.getItem(ID_SOUNDS_VERSION) ?? 'latest'\n\t}\n\n\texport function setLanguage(language: string | undefined) {\n\t\tif (language) localStorage.setItem(ID_LANGUAGE, language)\n\t}\n\n\texport function setTheme(theme: string | undefined) {\n\t\tif (theme) localStorage.setItem(ID_THEME, theme)\n\t}\n\n\texport function setVersion(version: VersionId | undefined) {\n\t\tif (version) localStorage.setItem(ID_VERSION, version)\n\t}\n\n\texport function setIndent(indent: string | undefined) {\n\t\tif (indent) localStorage.setItem(ID_INDENT, indent)\n\t}\n\n\texport function setSoundsVersion(version: string | undefined) {\n\t\tif (version) localStorage.setItem(ID_SOUNDS_VERSION, version)\n\t}\n}\n","import { DataModel, ModelPath } from '@mcschema/core'\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn, BtnMenu } from '..'\nimport { useModel } from '../../hooks'\nimport { locale } from '../../Locales'\nimport { transformOutput } from '../../schema/transformOutput'\nimport type { BlockStateRegistry } from '../../Schemas'\nimport { Store } from '../../Store'\nimport { message } from '../../Utils'\n\nconst OUTPUT_CHARS_LIMIT = 10000\n\nconst INDENT: Record = {\n\t'2_spaces': 2,\n\t'4_spaces': 4,\n\ttabs: '\\t',\n}\n\ntype SourcePanelProps = {\n\tlang: string,\n\tname: string,\n\tmodel: DataModel | null,\n\tblockStates: BlockStateRegistry | null,\n\tdoCopy?: number,\n\tdoDownload?: number,\n\tdoImport?: number,\n\tcopySuccess: () => unknown,\n\tonError: (message: string) => unknown,\n}\nexport function SourcePanel({ lang, name, model, blockStates, doCopy, doDownload, doImport, copySuccess, onError }: SourcePanelProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst [indent, setIndent] = useState(Store.getIndent())\n\tconst source = useRef(null)\n\tconst download = useRef(null)\n\tconst retransform = useRef()\n\n\tconst getOutput = useCallback((model: DataModel, blockStates: BlockStateRegistry) => {\n\t\tconst data = model.schema.hook(transformOutput, new ModelPath(model), model.data, { blockStates })\n\t\treturn JSON.stringify(data, null, INDENT[indent]) + '\\n'\n\t}, [indent])\n\n\tuseEffect(() => {\n\t\tretransform.current = () => {\n\t\t\tif (!model || !blockStates) return\n\t\t\ttry {\n\t\t\t\tconst output = getOutput(model, blockStates)\n\t\t\t\tif (output.length >= OUTPUT_CHARS_LIMIT) {\n\t\t\t\t\tsource.current.value = output.slice(0, OUTPUT_CHARS_LIMIT) + `\\n\\nOutput is too large to display (+${OUTPUT_CHARS_LIMIT} chars)\\nExport to view complete output\\n\\n`\n\t\t\t\t} else {\n\t\t\t\t\tsource.current.value = output\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tonError(`Error getting JSON output: ${message(e)}`)\n\t\t\t\tconsole.error(e)\n\t\t\t\tsource.current.value = ''\n\t\t\t}\n\t\t}\n\t})\n\n\tuseModel(model, () => {\n\t\tretransform.current()\n\t})\n\tuseEffect(() => {\n\t\tif (model) retransform.current()\n\t}, [model])\n\n\tuseEffect(() => {\n\t\tretransform.current()\n\t}, [indent])\n\n\tconst onImport = () => {\n\t\ttry {\n\t\t\tconst data = JSON.parse(source.current.value)\n\t\t\tmodel?.reset(DataModel.wrapLists(data), false)\n\t\t} catch (e) {\n\t\t\tonError(`Error importing: ${message(e)}`)\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\tuseEffect(() => {\n\t\tif (doCopy && model && blockStates) {\n\t\t\tnavigator.clipboard.writeText(getOutput(model, blockStates)).then(() => {\n\t\t\t\tcopySuccess()\n\t\t\t})\n\t\t}\n\t}, [doCopy])\n\n\tuseEffect(() => {\n\t\tif (doDownload && source.current && download.current) {\n\t\t\tconst content = encodeURIComponent(source.current.value)\n\t\t\tdownload.current.setAttribute('href', `data:text/json;charset=utf-8,${content}`)\n\t\t\tdownload.current.setAttribute('download', `${name}.json`)\n\t\t\tdownload.current.click()\n\t\t}\n\t}, [doDownload])\n\n\tuseEffect(() => {\n\t\tif (doImport && source.current) {\n\t\t\tsource.current.value = ''\n\t\t\tsource.current.select()\n\t\t}\n\t}, [doImport])\n\n\tconst changeIndent = (value: string) => {\n\t\tStore.setIndent(value)\n\t\tsetIndent(value)\n\t}\n\n\treturn <> \n\t\t
\n\t\t\t\n\t\t\t\t{Object.entries(INDENT).map(([key]) =>\n\t\t\t\t\t changeIndent(key)}/>\n\t\t\t\t)}\n\t\t\t\n\t\t
\n\t\t\n\t\t\n\t\n}\n","import type { INode, Path } from '@mcschema/core'\nimport { DataModel } from '@mcschema/core'\n\nexport class ModelWrapper extends DataModel {\n\tconstructor(\n\t\tschema: INode,\n\t\tprivate readonly mapper: (path: Path) => Path,\n\t\tprivate readonly getter: (path: Path) => any,\n\t\tprivate readonly setter: (path: Path, value: any, silent?: boolean) => any,\n\t) {\n\t\tsuper(schema)\n\t}\n\n\tmap(path: Path) {\n\t\treturn this.mapper(path)\n\t}\n\n\tget(path: Path) {\n\t\treturn this.getter(path)\n\t}\n\n\tset(path: Path, value: any, silent?: boolean) {\n\t\treturn this.setter(path, value, silent)\n\t}\n}\n","import type { BooleanHookParams, EnumOption, Hook, INode, NodeChildren, NumberHookParams, StringHookParams, ValidationOption } from '@mcschema/core'\nimport { DataModel, ListNode, MapNode, ModelPath, ObjectNode, Path, relativePath, StringNode } from '@mcschema/core'\nimport type { ComponentChildren, JSX } from 'preact'\nimport { memo } from 'preact/compat'\nimport { useState } from 'preact/hooks'\nimport { Btn } from '../components'\nimport { Octicon } from '../components/Octicon'\nimport { useFocus } from '../hooks'\nimport { locale } from '../Locales'\nimport type { BlockStateRegistry } from '../Schemas'\nimport { CachedDecorator, CachedFeature } from '../Schemas'\nimport { deepClone, deepEqual, hexId, isObject, newSeed } from '../Utils'\nimport { ModelWrapper } from './ModelWrapper'\n\nconst selectRegistries = ['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']\nconst hiddenFields = ['number_provider.type', 'score_provider.type', 'nbt_provider.type', 'int_provider.type', 'float_provider.type', 'height_provider.type']\nconst flattenedFields = ['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']\nconst inlineFields = ['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']\nconst nbtFields = ['function.set_nbt.tag', 'advancement.display.icon.nbt', 'text_component_object.nbt', 'entity.nbt', 'block.nbt', 'item.nbt']\nconst fixedLists = ['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']\n\n/**\n * Secondary model used to remember the keys of a map\n */\nconst keysModel = new DataModel(MapNode(\n\tStringNode(),\n\tStringNode()\n), { historyMax: 0 })\n\ntype JSXTriple = [JSX.Element | null, JSX.Element | null, JSX.Element | null]\ntype RenderHook = Hook<[any, string, BlockStateRegistry, Record], JSXTriple>\n\ntype NodeProps = T & {\n\tnode: INode,\n\tpath: ModelPath,\n\tvalue: any,\n\tlang: string,\n\tstates: BlockStateRegistry,\n\tctx: Record,\n}\n\nexport function FullNode({ model, lang, blockStates }: { model: DataModel, lang: string, blockStates: BlockStateRegistry }) {\n\tconst path = new ModelPath(model)\n\tconst [prefix, suffix, body] = model.schema.hook(renderHtml, path, deepClone(model.data), lang, blockStates, {})\n\treturn suffix?.props?.children.some((c: any) => c) ?
\n\t\t
{prefix}{suffix}
\n\t\t
{body}
\n\t
: body\n}\n\nconst renderHtml: RenderHook = {\n\tbase() {\n\t\treturn [null, null, null]\n\t},\n\n\tboolean(params, path, value, lang, states, ctx) {\n\t\treturn [null, , null]\n\t},\n\n\tchoice({ choices, config, switchNode }, path, value, lang, states, ctx) {\n\t\tconst choice = switchNode.activeCase(path, true) as typeof choices[number]\n\t\tconst contextPath = (config?.context) ? new ModelPath(path.getModel(), new Path(path.getArray(), [config.context])) : path\n\t\tconst [prefix, suffix, body] = choice.node.hook(this, contextPath, value, lang, states, ctx)\n\t\tif (choices.length === 1) {\n\t\t\treturn [prefix, suffix, body]\n\t\t}\n\t\tconst choiceContextPath = config?.choiceContext ? new Path([], [config.choiceContext]) : config?.context ? new Path([], [config.context]) : path\n\t\tconst set = (type: string) => {\n\t\t\tconst c = choices.find(c => c.type === type) ?? choice\n\t\t\tconst newValue = c.change\n\t\t\t\t? c.change(DataModel.unwrapLists(value))\n\t\t\t\t: config.choiceContext === 'feature' ?\tc.node.default()?.config?.feature : c.node.default()\n\t\t\tpath.model.set(path, DataModel.wrapLists(newValue))\n\t\t}\n\t\tconst inject = \n\t\treturn [prefix, <>{inject}{suffix}, body]\n\t},\n\n\tlist({ children, config }, path, value, lang, states, ctx) {\n\t\tconst { expand, collapse, isToggled } = useToggles()\n\t\tconst [maxShown, setMaxShown] = useState(50)\n\n\t\tconst context = path.getContext().join('.')\n\t\tif (fixedLists.includes(context)) {\n\t\t\tconst prefix = <>\n\t\t\t\t{[...Array(config.maxLength!)].map((_, i) =>\n\t\t\t\t\t)}\n\t\t\t\t
\n\t\t\t\n\t\t\tconst suffix = <>{[...Array(config.maxLength)].map((_, i) => {\n\t\t\t\tconst child = children.hook(this, path.modelPush(i), value?.[i]?.node, lang, states, ctx)\n\t\t\t\treturn child[1]\n\t\t\t})}\n\t\t\treturn [prefix, suffix, null]\n\t\t}\n\n\t\tconst onAdd = () => {\n\t\t\tif (!Array.isArray(value)) value = []\n\t\t\tconst node = DataModel.wrapLists(children.default())\n\t\t\tpath.model.set(path, [{ node, id: hexId() }, ...value])\n\t\t}\n\t\tconst onAddBottom = () => {\n\t\t\tif (!Array.isArray(value)) value = []\n\t\t\tconst node = DataModel.wrapLists(children.default())\n\t\t\tpath.model.set(path, [...value, { node, id: hexId() }])\n\t\t}\n\t\tconst suffix = \n\t\tconst body = <>\n\t\t\t{(value && Array.isArray(value)) && value.map(({ node: cValue, id: cId }, index) => {\n\t\t\t\tif (index === maxShown) {\n\t\t\t\t\treturn
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t}\n\t\t\t\tif (index > maxShown) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\n\t\t\t\tconst cPath = path.push(index).contextPush('entry')\n\t\t\t\tconst canToggle = children.type(cPath) === 'object'\n\t\t\t\tconst toggle = isToggled(cId)\n\t\t\t\tif (canToggle && (toggle === false || (toggle === undefined && value.length > 20))) {\n\t\t\t\t\treturn
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t}\n\n\t\t\t\tconst onRemove = () => cPath.set(undefined)\n\t\t\t\tconst onMoveUp = () => {\n\t\t\t\t\tconst v = [...path.get()];\n\t\t\t\t\t[v[index - 1], v[index]] = [v[index], v[index - 1]]\n\t\t\t\t\tpath.model.set(path, v)\n\t\t\t\t}\n\t\t\t\tconst onMoveDown = () => {\n\t\t\t\t\tconst v = [...path.get()];\n\t\t\t\t\t[v[index + 1], v[index]] = [v[index], v[index + 1]]\n\t\t\t\t\tpath.model.set(path, v)\n\t\t\t\t}\n\t\t\t\tconst actions: MenuAction[] = [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'duplicate',\n\t\t\t\t\t\tlabel: 'duplicate',\n\t\t\t\t\t\tonSelect: () => {\n\t\t\t\t\t\t\tconst v = [...path.get()]\n\t\t\t\t\t\t\tv.splice(index, 0, { id: hexId(), node: deepClone(cValue) })\n\t\t\t\t\t\t\tpath.model.set(path, v)\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t]\n\t\t\t\treturn \n\t\t\t\t\t{canToggle && }\n\t\t\t\t\t\n\t\t\t\t\t{value.length > 1 &&
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
}\n\t\t\t\t
\n\t\t\t})}\n\t\t\t{(value && value.length > 0 && value.length <= maxShown) &&
\n\t\t\t\t\n\t\t\t
}\n\t\t\n\t\treturn [null, suffix, body]\n\t},\n\n\tmap({ children, keys, config }, path, value, lang, states, ctx) {\n\t\tconst { expand, collapse, isToggled } = useToggles()\n\n\t\tconst keyPath = new ModelPath(keysModel, new Path([hashString(path.toString())]))\n\t\tconst onAdd = () => {\n\t\t\tconst key = keyPath.get()\n\t\t\tpath.model.set(path.push(key), DataModel.wrapLists(children.default()))\n\t\t}\n\t\tconst blockState = config.validation?.validator === 'block_state_map' ? states?.[relativePath(path, config.validation.params.id).get()] : null\n\t\tconst keysSchema = blockState?.properties\n\t\t\t? StringNode(null!, { enum: Object.keys(blockState.properties ?? {}) })\n\t\t\t: keys\n\t\tif (blockState && path.last() === 'Properties') {\n\t\t\tif (typeof value !== 'object') value = {}\n\t\t\tconst properties = Object.entries(blockState.properties ?? {})\n\t\t\t\t.map(([key, values]) => [key, StringNode(null!, { enum: values })])\n\t\t\tObject.entries(blockState.properties ?? {}).forEach(([key, values]) => {\n\t\t\t\tif (typeof value[key] !== 'string') {\n\t\t\t\t\tpath.model.errors.add(path.push(key), 'error.expected_string')\n\t\t\t\t} else if (!values.includes(value[key])) {\n\t\t\t\t\tpath.model.errors.add(path.push(key), 'error.invalid_enum_option', value[key])\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn ObjectNode(Object.fromEntries(properties)).hook(this, path, value, lang, states, ctx)\n\t\t}\n\t\tconst suffix = <>\n\t\t\t{keysSchema.hook(this, keyPath, keyPath.get() ?? '', lang, states, ctx)[1]}\n\t\t\t\n\t\t\n\t\tconst body = <>\n\t\t\t{typeof value === 'object' && Object.entries(value).map(([key, cValue]) => {\n\n\t\t\t\tconst cPath = path.modelPush(key)\n\t\t\t\tconst canToggle = children.type(cPath) === 'object'\n\t\t\t\tconst toggle = isToggled(key)\n\t\t\t\tif (canToggle && (toggle === false || (toggle === undefined && value.length > 20))) {\n\t\t\t\t\treturn
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t}\n\t\t\t\tconst cSchema = blockState\n\t\t\t\t\t? StringNode(null!, { enum: blockState.properties?.[key] ?? [] })\n\t\t\t\t\t: children\n\t\t\t\tif (blockState?.properties?.[key] && typeof cValue === 'string'\n\t\t\t\t\t&& !blockState.properties?.[key].includes(cValue)) {\n\t\t\t\t\tpath.model.errors.add(cPath, 'error.invalid_enum_option', cValue)\n\t\t\t\t}\n\t\t\t\tconst onRemove = () => cPath.set(undefined)\n\t\t\t\treturn \n\t\t\t\t\t{canToggle && }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t})}\n\t\t\n\t\treturn [null, suffix, body]\n\t},\n\n\tnumber(params, path, value, lang, states, ctx) {\n\t\treturn [null, , null]\n\t},\n\n\tobject({ node, config, getActiveFields, getChildModelPath }, path, value, lang, states, ctx) {\n\t\tif (path.getArray().length == 0 && isDecorated(config.context, value)) {\n\t\t\tconst { wrapper, fields } = createDecoratorsWrapper(getActiveFields(path), path, value)\n\t\t\tvalue = wrapper.data\n\t\t\tgetActiveFields = () => fields\n\t\t\tgetChildModelPath = (path, key) => new ModelPath(wrapper, new Path(path.getArray(), ['feature'])).push(key)\n\t\t}\n\n\t\tlet prefix: JSX.Element | null = null\n\t\tlet suffix: JSX.Element | null = null\n\t\tif (node.optional()) {\n\t\t\tif (value === undefined) {\n\t\t\t\tconst onExpand = () => path.set(DataModel.wrapLists(node.default()))\n\t\t\t\tsuffix = \n\t\t\t} else {\n\t\t\t\tconst onCollapse = () => path.set(undefined)\n\t\t\t\tsuffix = \n\t\t\t}\n\t\t}\n\t\tconst newCtx = (typeof value === 'object' && value !== null && node.default()?.pools)\n\t\t\t? { ...ctx, loot: value?.type } : ctx\n\t\tconst body = <>\n\t\t\t{(typeof value === 'object' && value !== null && !(node.optional() && value === undefined)) &&\n\t\t\t\tObject.entries(getActiveFields(path))\n\t\t\t\t\t.filter(([_, child]) => child.enabled(path))\n\t\t\t\t\t.map(([key, child]) => {\n\t\t\t\t\t\tconst cPath = getChildModelPath(path, key)\n\t\t\t\t\t\tconst context = cPath.getContext().join('.')\n\t\t\t\t\t\tif (hiddenFields.includes(context)) return null\n\t\t\t\t\t\tconst [cPrefix, cSuffix, cBody] = child.hook(this, cPath, value[key], lang, states, newCtx)\n\t\t\t\t\t\tif (!cPrefix && !cSuffix && !((cBody?.props?.children?.length ?? 0) > 0)) return null\n\t\t\t\t\t\tconst isFlattened = child.type(cPath) === 'object' && flattenedFields.includes(context)\n\t\t\t\t\t\tconst isInlined = inlineFields.includes(context)\n\t\t\t\t\t\tif (isFlattened || isInlined) {\n\t\t\t\t\t\t\tprefix = <>{prefix}{cPrefix}\n\t\t\t\t\t\t\tsuffix = <>{suffix}{cSuffix}\n\t\t\t\t\t\t\treturn isFlattened ? cBody : null\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn \n\t\t\t\t\t})\n\t\t\t}\n\t\t\n\t\treturn [prefix, suffix, body]\n\t},\n\n\tstring(params, path, value, lang, states, ctx) {\n\t\treturn [null, , null]\n\t},\n}\n\nfunction Collapsed({ path, value }: { path: ModelPath, value: any, schema: INode }) {\n\tconst context = path.getContext().join('.')\n\tswitch (context) {\n\t\tcase 'loot_table.pools.entry':\n\t\t\treturn \n\t\tcase 'function.set_contents.entries.entry':\n\t\tcase 'loot_pool.entries.entry':\n\t\t\treturn \n\t}\n\tfor (const child of Object.values(value ?? {})) {\n\t\tif (typeof child === 'string') {\n\t\t\treturn \n\t\t}\n\t}\n\treturn null\n}\n\nfunction useToggles() {\n\tconst [toggleState, setToggleState] = useState(new Map())\n\tconst [toggleAll, setToggleAll] = useState(undefined)\n\n\tconst expand = (key: string) => (evt: MouseEvent) => {\n\t\tif (evt.ctrlKey) {\n\t\t\tsetToggleState(new Map())\n\t\t\tsetToggleAll(true)\n\t\t} else {\n\t\t\tsetToggleState(state => new Map(state.set(key, true)))\n\t\t}\n\t}\n\tconst collapse = (key: string) => (evt: MouseEvent) => {\n\t\tif (evt.ctrlKey) {\n\t\t\tsetToggleState(new Map())\n\t\t\tsetToggleAll(false)\n\t\t} else {\n\t\t\tsetToggleState(state => new Map(state.set(key, false)))\n\t\t}\n\t}\n\t\n\tconst isToggled = (key: string) => {\n\t\treturn toggleState?.get(key) ?? toggleAll\n\t}\n\n\treturn { expand, collapse, isToggled }\n}\n\nfunction BooleanSuffix({ path, node, value, lang }: NodeProps) {\n\tconst set = (target: boolean) => {\n\t\tpath.model.set(path, node.optional() && value === target ? undefined : target)\n\t}\n\treturn <>\n\t\t\n\t\t\n\t\n}\n\nfunction NumberSuffix({ path, config, integer, value, lang }: NodeProps) {\n\tconst onChange = (evt: Event) => {\n\t\tconst value = (evt.target as HTMLInputElement).value\n\t\tconst parsed = integer ? parseInt(value) : parseFloat(value)\n\t\tpath.model.set(path, parsed)\n\t}\n\tconst onColor = (evt: Event) => {\n\t\tconst value = (evt.target as HTMLInputElement).value\n\t\tconst parsed = parseInt(value.slice(1), 16)\n\t\tpath.model.set(path, parsed)\n\t}\n\treturn <>\n\t\t {if (evt.key === 'Enter') onChange(evt)}} />\n\t\t{config?.color && }\n\t\t{['dimension.generator.seed', 'dimension.generator.biome_source.seed', 'world_settings.seed'].includes(path.getContext().join('.')) && }\n\t\n}\n\nfunction StringSuffix({ path, getValues, config, node, value, lang, states }: NodeProps) {\n\tconst onChange = (evt: Event) => {\n\t\tevt.stopPropagation()\n\t\tconst newValue = (evt.target as HTMLSelectElement).value\n\t\tif (newValue === value) return\n\t\tpath.model.set(path, newValue.length === 0 ? undefined : newValue)\n\t}\n\tconst values = getValues()\n\tconst context = path.getContext().join('.')\n\tif (nbtFields.includes(context)) {\n\t\treturn \n\t} else if ((isEnum(config) && !config.additional) || selectRegistries.includes(context)) {\n\t\tlet context = new Path([])\n\t\tif (isEnum(config) && typeof config.enum === 'string') {\n\t\t\tcontext = context.contextPush(config.enum)\n\t\t} else if (!isEnum(config) && config?.validator === 'resource' && typeof config.params.pool === 'string') {\n\t\t\tcontext = context.contextPush(config.params.pool)\n\t\t}\n\t\treturn \n\t} else if (!isEnum(config) && config?.validator === 'block_state_key') {\n\t\tconst blockState = states?.[relativePath(path, config.params.id).get()]\n\t\tconst values = Object.keys(blockState?.properties ?? {})\n\t\treturn \n\t} else {\n\t\tconst datalistId = hexId()\n\t\treturn <>\n\t\t\t {if (evt.key === 'Enter') onChange(evt)}}\n\t\t\t\tlist={values.length > 0 ? datalistId : ''} />\n\t\t\t{values.length > 0 && \n\t\t\t\t{values.map(v => }\n\t\t\n\t}\n}\n\ntype MenuAction = {\n\tlabel: string,\n\tdescription?: string,\n\ticon: keyof typeof Octicon,\n\tonSelect: () => unknown,\n}\n\ntype TreeNodeProps = {\n\tschema: INode,\n\tpath: ModelPath,\n\tvalue: any,\n\tlang: string,\n\tstates: BlockStateRegistry,\n\tctx: Record,\n\tcompare?: any,\n\tlabel?: string,\n\tactions?: MenuAction[],\n\tchildren?: ComponentChildren,\n}\nfunction TreeNode({ label, schema, path, value, lang, states, ctx, actions, children }: TreeNodeProps) {\n\tconst type = schema.type(path)\n\tconst category = schema.category(path)\n\tconst context = path.getContext().join('.')\n\n\tconst [active, setActive] = useFocus()\n\tconst onContextMenu = (evt: MouseEvent) => {\n\t\tevt.preventDefault()\n\t\tsetActive()\n\t}\n\n\tconst newCtx = {...ctx}\n\tdelete newCtx.index\n\tconst [prefix, suffix, body] = schema.hook(renderHtml, path, value, lang, states, newCtx)\n\treturn
\n\t\t
\n\t\t\t\n\t\t\t\n\t\t\t{children}\n\t\t\t{prefix}\n\t\t\t\n\t\t\t{suffix}\n\t\t
\n\t\t{body &&
{body}
}\n\t
\n}\n\nconst MemoedTreeNode = memo(TreeNode, (prev, next) => {\n\treturn prev.schema === next.schema\n\t\t&& prev.lang === next.lang\n\t\t&& prev.path.equals(next.path)\n\t\t&& deepEqual(prev.ctx, next.ctx)\n\t\t&& deepEqual(prev.value, next.value)\n})\n\nfunction isEnum(value?: ValidationOption | EnumOption): value is EnumOption {\n\treturn !!(value as any)?.enum\n}\n\nfunction hashString(str: string) {\n\tvar hash = 0, i, chr\n\tfor (i = 0; i < str.length; i++) {\n\t\tchr = str.charCodeAt(i)\n\t\thash = ((hash << 5) - hash) + chr\n\t\thash |= 0\n\t}\n\treturn hash\n}\n\nfunction pathLocale(lang: string, path: Path, ...params: string[]) {\n\tconst ctx = path.getContext()\n\tfor (let i = 0; i < ctx.length; i += 1) {\n\t\tconst key = ctx.slice(i).join('.')\n\t\tconst result = locale(lang, key, ...params)\n\t\tif (key !== result) {\n\t\t\treturn result\n\t\t}\n\t}\n\treturn ctx[ctx.length - 1]\n}\n\nfunction ErrorPopup({ lang, path, nested }: { lang: string, path: ModelPath, nested?: boolean }) {\n\tif (path.model instanceof ModelWrapper) {\n\t\tpath = path.model.map(path).withModel(path.model)\n\t}\n\tconst e = nested\n\t\t?\tpath.model.errors.getAll().filter(e => e.path.startsWith(path))\n\t\t: path.model.errors.get(path, true)\n\tif (e.length === 0) return null\n\tconst message = locale(lang, e[0].error, ...(e[0].params ?? []))\n\treturn popupIcon('node-error', 'issue_opened', message)\n}\n\nfunction HelpPopup({ lang, path }: { lang: string, path: Path }) {\n\tconst key = path.contextPush('help').getContext().join('.')\n\tconst message = locale(lang, key)\n\tif (message === key) return null\n\treturn popupIcon('node-help', 'info', message)\n}\n\nconst popupIcon = (type: string, icon: keyof typeof Octicon, popup: string) => {\n\tconst [active, setActive] = useFocus()\n\n\treturn
\n\t\t{Octicon[icon]}\n\t\t{popup}\n\t
\n}\n\nfunction isDecorated(context: string | undefined, value: any) {\n\treturn context === 'feature'\n\t\t&& value?.type?.replace(/^minecraft:/, '') === 'decorated'\n\t\t&& isObject(value?.config)\n}\n\nfunction createDecoratorsWrapper(originalFields: NodeChildren, path: ModelPath, value: any) {\n\tconst decorators: any[] = []\n\tconst feature = iterateNestedDecorators(value, decorators)\n\tconst fields = {\n\t\ttype: originalFields.type,\n\t\tconfig: ObjectNode({\n\t\t\tdecorators: ListNode(CachedDecorator),\n\t\t\tfeature: CachedFeature,\n\t\t}, { context: 'feature.decorated' }),\n\t}\n\tconst schema = ObjectNode(fields, { context: 'feature' })\n\tconst featurePath = new Path(['config', 'feature'])\n\tconst decoratorsPath = new Path(['config', 'decorators'])\n\tconst model = path.getModel()\n\tconst wrapper: ModelWrapper = new ModelWrapper(schema, path => {\n\t\tif (path.startsWith(featurePath)) {\n\t\t\treturn new Path([...[...Array(decorators.length - 1)].flatMap(() => ['config', 'feature']), ...path.modelArr])\n\t\t} else if (path.startsWith(decoratorsPath)) {\n\t\t\tif (path.modelArr.length === 2) {\n\t\t\t\treturn new Path([])\n\t\t\t}\n\t\t\tconst index = path.modelArr[2]\n\t\t\tif (typeof index === 'number') {\n\t\t\t\treturn new Path([...[...Array(index)].flatMap(() => ['config', 'feature']), 'config', 'decorator', ...path.modelArr.slice(3)])\n\t\t\t}\n\t\t}\n\t\treturn path\n\t}, path => {\n\t\tif (path.equals(decoratorsPath)) {\n\t\t\tconst newDecorators: any[] = []\n\t\t\titerateNestedDecorators(model.data, newDecorators)\n\t\t\treturn newDecorators\n\t\t}\n\t\treturn model.get(wrapper.map(path))\n\t}, (path, value, silent) => {\n\t\tif (path.startsWith(featurePath)) {\n\t\t\tconst newDecorators: any[] = []\n\t\t\titerateNestedDecorators(model.data, newDecorators)\n\t\t\tconst newPath =new Path([...[...Array(newDecorators.length - 1)].flatMap(() => ['config', 'feature']), ...path.modelArr])\n\t\t\treturn model.set(newPath, value, silent)\n\t\t} else if (path.startsWith(decoratorsPath)) {\n\t\t\tconst index = path.modelArr[2]\n\t\t\tif (path.modelArr.length === 2) {\n\t\t\t\tconst feature = wrapper.get(featurePath)\n\t\t\t\treturn model.set(new Path(), produceNestedDecorators(feature, value), silent)\n\t\t\t} else if (typeof index === 'number') {\n\t\t\t\tif (path.modelArr.length === 3 && value === undefined) {\n\t\t\t\t\tconst feature = wrapper.get(featurePath)\n\t\t\t\t\tconst newDecorators: any[] = []\n\t\t\t\t\titerateNestedDecorators(model.data, newDecorators)\n\t\t\t\t\tnewDecorators.splice(index, 1)\n\t\t\t\t\tconst newValue = produceNestedDecorators(feature, newDecorators)\n\t\t\t\t\treturn model.set(new Path(), newValue, silent)\n\t\t\t\t} else {\n\t\t\t\t\tconst newPath = new Path([...[...Array(index)].flatMap(() => ['config', 'feature']), 'config', 'decorator', ...path.modelArr.slice(3)])\n\t\t\t\t\treturn model.set(newPath, value, silent)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmodel.set(path, value, silent)\n\t})\n\twrapper.data = {\n\t\ttype: model.data.type,\n\t\tconfig: {\n\t\t\tdecorators,\n\t\t\tfeature,\n\t\t},\n\t}\n\twrapper.errors = model.errors\n\treturn { fields, wrapper }\n}\n\nfunction iterateNestedDecorators(value: any, decorators: any[]): any {\n\tif (value?.type?.replace(/^minecraft:/, '') !== 'decorated') {\n\t\treturn value\n\t}\n\tif (!isObject(value?.config)) {\n\t\treturn value\n\t}\n\tdecorators.push({ id: decorators.length, node: value.config.decorator })\n\treturn iterateNestedDecorators(value.config.feature ?? '', decorators)\n}\n\nfunction produceNestedDecorators(feature: any, decorators: any[]): any {\n\tif (decorators.length === 0) return feature\n\treturn {\n\t\ttype: 'minecraft:decorated',\n\t\tconfig: {\n\t\t\tdecorator: decorators.shift().node,\n\t\t\tfeature: produceNestedDecorators(feature, decorators),\n\t\t},\n\t}\n}\n","import type { DataModel } from '@mcschema/core'\nimport { useErrorBoundary, useState } from 'preact/hooks'\nimport { useModel } from '../../hooks'\nimport { FullNode } from '../../schema/renderHtml'\nimport type { BlockStateRegistry, VersionId } from '../../Schemas'\n\ntype TreePanelProps = {\n\tlang: string,\n\tversion: VersionId,\n\tmodel: DataModel | null,\n\tblockStates: BlockStateRegistry | null,\n\tonError: (message: string) => unknown,\n}\nexport function Tree({ lang, model, blockStates, onError }: TreePanelProps) {\n\tif (!model || !blockStates || lang === 'none') return <>\n\n\tconst [error] = useErrorBoundary(e => {\n\t\tonError(`Error rendering the tree: ${e.message}`)\n\t\tconsole.error(e)\n\t})\n\tif (error) return <>\n\n\tconst [, setState] = useState(0)\n\tuseModel(model, () => {\n\t\tsetState(state => state + 1)\n\t})\n\n\treturn
\n\t\t\n\t
\n}\n","import { getCurrentUrl, Link, route } from 'preact-router'\nimport { Btn, BtnMenu, Icons, Octicon } from '.'\nimport config from '../../config.json'\nimport { locale } from '../Locales'\nimport type { VersionId } from '../Schemas'\nimport { checkVersion } from '../Schemas'\nimport { cleanUrl, getGenerator } from '../Utils'\n\nconst Themes: Record = {\n\tsystem: 'device_desktop',\n\tdark: 'moon',\n\tlight: 'sun',\n}\n\ntype HeaderProps = {\n\tlang: string,\n\ttitle: string,\n\tversion: VersionId,\n\ttheme: string,\n\tchangeTheme: (theme: string) => unknown,\n\tlanguage: string,\n\tchangeLanguage: (language: string) => unknown,\n}\nexport function Header({ lang, title, version, theme, changeTheme, language, changeLanguage }: HeaderProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst gen = getGenerator(getCurrentUrl())\n\n\treturn
\n\t\t
\n\t\t\t{Icons.home}\n\t\t\t

{title}

\n\t\t\t{gen && \n\t\t\t\t{config.generators\n\t\t\t\t\t.filter(g => g.category === gen?.category && checkVersion(version, g.minVersion))\n\t\t\t\t\t.map(g =>\n\t\t\t\t\t\t route(cleanUrl(g.url))} />\n\t\t\t\t\t)}\n\t\t\t}\n\t\t
\n\t\t\n\t
\n}\n","export const Icons = {\n\thome: ,\n\treport: ,\n\tsounds: ,\n}\n","import { Howl } from 'howler'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn, NumberInput, RangeInput, TextInput } from '..'\nimport { getResourceUrl } from '../../DataFetcher'\nimport { locale } from '../../Locales'\nimport type { SoundEvents, VersionAssets } from '../../Manifest'\n\nexport interface SoundConfig {\n\tid: string,\n\tsound: string,\n\tdelay: number,\n\tpitch: number,\n\tvolume: number,\n}\ntype SoundConfigProps = SoundConfig & {\n\tlang: string,\n\tassets: VersionAssets,\n\tsounds: SoundEvents,\n\tonEdit: (changes: Partial) => unknown,\n\tonDelete: () => unknown,\n\tdelayedPlay?: number,\n}\nexport function SoundConfig({ lang, assets, sounds, sound, delay, pitch, volume, onEdit, onDelete, delayedPlay }: SoundConfigProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst [loading, setLoading] = useState(true)\n\tconst [playing, setPlaying] = useState(false)\n\tconst [invalid, setInvalid] = useState(false)\n\tconst howls = useRef([])\n\tconst command = `playsound minecraft:${sound} master @s ~ ~ ~ ${volume} ${pitch}`\n\n\tuseEffect(() => {\n\t\tconst soundEvent = sounds[sound]\n\t\tsetInvalid((soundEvent?.sounds?.length ?? 0) === 0)\n\t\thowls.current.forEach(h => h.stop())\n\t\thowls.current = (soundEvent?.sounds ?? []).map(entry => {\n\t\t\tconst soundPath = typeof entry === 'string' ? entry : entry.name\n\t\t\tconst hash = assets[`minecraft/sounds/${soundPath}.ogg`].hash\n\t\t\tconst url = getResourceUrl(hash)\n\t\t\tconst howl = new Howl({\n\t\t\t\tsrc: [url],\n\t\t\t\tformat: ['ogg'],\n\t\t\t\tvolume,\n\t\t\t\trate: pitch,\n\t\t\t})\n\t\t\thowl.on('end', () => {\n\t\t\t\tsetPlaying(false)\n\t\t\t})\n\t\t\tconst completed = () => {\n\t\t\t\tif (loading && howls.current.every(h => h.state() === 'loaded')) {\n\t\t\t\t\tsetLoading(false)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (howl.state() === 'loaded') {\n\t\t\t\tsetTimeout(() => completed())\n\t\t\t} else {\n\t\t\t\thowl.on('load', () => {\n\t\t\t\t\tcompleted()\n\t\t\t\t})\n\t\t\t}\n\t\t\treturn howl\n\t\t})\n\t\tsetLoading(true)\n\t}, [sound, sounds])\n\n\tuseEffect(() => {\n\t\thowls.current.forEach(h => h.rate(pitch))\n\t}, [pitch])\n\n\tuseEffect(() => {\n\t\thowls.current.forEach(h => h.volume(volume))\n\t}, [volume])\n\n\tconst play = () => {\n\t\tif (loading || invalid) return\n\t\tstop()\n\t\tconst howl = Math.floor(Math.random() * howls.current.length)\n\t\thowls.current[howl].play()\n\t\tsetPlaying(true)\n\t}\n\tconst stop = () => {\n\t\thowls.current.forEach(h => h.stop())\n\t}\n\tuseEffect(() => {\n\t\tif (delayedPlay) setTimeout(() => play(), delay * 50)\n\t}, [delayedPlay])\n\n\tuseEffect(() => {\n\t\treturn () => stop()\n\t}, [])\n\n\tconst [copyActive, setCopyActive] = useState(false)\n\tconst copyTimeout = useRef(undefined)\n\tconst copy = () => {\n\t\tnavigator.clipboard.writeText(command)\n\t\tsetCopyActive(true)\n\t\tif (copyTimeout.current !== undefined) clearTimeout(copyTimeout.current)\n\t\tcopyTimeout.current = setTimeout(() => {\n\t\t\tsetCopyActive(false)\n\t\t}, 2000) as any\n\t}\n\n\treturn
\n\t\t\n\t\t onEdit({ sound })} />\n\t\t\n\t\t onEdit({ delay })} />\n\t\t\n\t\t onEdit({ pitch })} />\n\t\t\n\t\t onEdit({ volume })} />\n\t\t\n\t\t {onDelete(); stop()}} />\n\t
\n}\n","import type { ComponentChildren } from 'preact'\nimport { Icons } from './Icons'\n\ntype ToolCardProps = {\n\ttitle: string,\n\tlink: string,\n\ticon?: keyof typeof Icons,\n\tchildren?: ComponentChildren,\n}\nexport function ToolCard({ title, link, icon, children }: ToolCardProps) {\n\treturn \n\t\t{icon && Icons[icon]}\n\t\t
\n\t\t\t

{title}

\n\t\t\t{children}\n\t\t
\n\t
\n}\n","import { DataModel, Path } from '@mcschema/core'\nimport { getCurrentUrl } from 'preact-router'\nimport { useEffect, useErrorBoundary, useRef, useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport { Analytics } from '../Analytics'\nimport { Ad, Btn, BtnInput, BtnMenu, ErrorPanel, HasPreview, Octicon, PreviewPanel, SourcePanel, Tree } from '../components'\nimport { fetchPreset } from '../DataFetcher'\nimport { useModel } from '../hooks'\nimport { locale } from '../Locales'\nimport type { BlockStateRegistry, VersionId } from '../Schemas'\nimport { checkVersion, getBlockStates, getCollections, getModel } from '../Schemas'\nimport { getGenerator, message } from '../Utils'\n\ntype GeneratorProps = {\n\tlang: string,\n\tchangeTitle: (title: string, versions?: VersionId[]) => unknown,\n\tversion: VersionId,\n\tchangeVersion: (version: VersionId) => unknown,\n\tdefault?: true,\n}\nexport function Generator({ lang, changeTitle, version, changeVersion }: GeneratorProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst [error, setError] = useState(null)\n\tconst [errorBoundary, errorRetry] = useErrorBoundary()\n\tif (errorBoundary) {\n\t\treturn
\n\t}\n\n\tconst gen = getGenerator(getCurrentUrl())\n\tif (!gen) {\n\t\treturn
\n\t}\n\n\tuseEffect(() => {\n\t\tsetError(null)\n\t}, [gen.id, version])\n\n\tconst allowedVersions = config.versions\n\t\t.filter(v => checkVersion(v.id, gen.minVersion))\n\t\t.map(v => v.id as VersionId)\n\n\tchangeTitle(loc('title.generator', loc(gen.id)), allowedVersions)\n\n\tif (!checkVersion(version, gen.minVersion)) {\n\t\tsetError(`The minimum version for this generator is ${gen.minVersion}`)\n\t}\n\n\tconst [model, setModel] = useState(null)\n\tconst [blockStates, setBlockStates] = useState(null)\n\tuseEffect(() => {\n\t\tsetModel(null)\n\t\tgetBlockStates(version)\n\t\t\t.then(b => setBlockStates(b))\n\t\tgetModel(version, gen.id)\n\t\t\t.then(m => setModel(m))\n\t\t\t.catch(e => { console.error(e); setError(message(e)) })\n\t}, [version, gen.id])\n\n\tuseModel(model, () => {\n\t\tsetError(null)\n\t})\n\n\tconst reset = () => {\n\t\tAnalytics.generatorEvent('reset')\n\t\tmodel?.reset(DataModel.wrapLists(model.schema.default()), true)\n\t}\n\tconst undo = (e: MouseEvent) => {\n\t\te.stopPropagation()\n\t\tAnalytics.generatorEvent('undo', 'Menu')\n\t\tmodel?.undo()\n\t}\n\tconst redo = (e: MouseEvent) => {\n\t\te.stopPropagation()\n\t\tAnalytics.generatorEvent('redo', 'Menu')\n\t\tmodel?.redo()\n\t}\n\n\tconst onKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.ctrlKey && e.key === 'z') {\n\t\t\tAnalytics.generatorEvent('undo', 'Hotkey')\n\t\t\tmodel?.undo()\n\t\t} else if (e.ctrlKey && e.key === 'y') {\n\t\t\tAnalytics.generatorEvent('redo', 'Hotkey')\n\t\t\tmodel?.redo()\n\t\t}\n\t}\n\tuseEffect(() => {\n\t\tdocument.addEventListener('keyup', onKeyUp)\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('keyup', onKeyUp)\n\t\t}\n\t}, [model])\n\n\tconst [presetFilter, setPresetFilter] = useState('')\n\tconst [presetResults, setPresetResults] = useState([])\n\tuseEffect(() => {\n\t\tgetCollections(version)\n\t\t\t.then(collections => {\n\t\t\t\tconst terms = (presetFilter ?? '').trim().split(' ')\n\t\t\t\tconst presets = collections.get(gen.id)\n\t\t\t\t\t.map(p => p.slice(10))\n\t\t\t\t\t.filter(p => terms.every(t => p.includes(t)))\n\t\t\t\tif (presets) {\n\t\t\t\t\tsetPresetResults(presets)\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(e => { console.error(e); setError(e.message) })\n\t}, [version, gen.id, presetFilter])\n\n\tconst loadPreset = (id: string) => {\n\t\tAnalytics.generatorEvent('load-preset', id)\n\t\tfetchPreset(version, gen.path ?? gen.id, id).then(preset => {\n\t\t\tconst seed = model?.get(new Path(['generator', 'seed']))\n\t\t\tif (preset?.generator?.seed !== undefined && seed !== undefined) {\n\t\t\t\tpreset.generator.seed = seed\n\t\t\t\tif (preset.generator.biome_source?.seed !== undefined) {\n\t\t\t\t\tpreset.generator.biome_source.seed = seed\n\t\t\t\t}\n\t\t\t}\n\t\t\tmodel?.reset(DataModel.wrapLists(preset), false)\n\t\t})\n\t}\n\n\tconst [sourceShown, setSourceShown] = useState(window.innerWidth > 820)\n\tconst [doCopy, setCopy] = useState(0)\n\tconst [doDownload, setDownload] = useState(0)\n\tconst [doImport, setImport] = useState(0)\n\n\tconst copySource = () => {\n\t\tAnalytics.generatorEvent('copy')\n\t\tsetCopy(doCopy + 1)\n\t}\n\tconst downloadSource = () => {\n\t\tAnalytics.generatorEvent('download')\n\t\tsetDownload(doDownload + 1)\n\t}\n\tconst importSource = () => {\n\t\tAnalytics.generatorEvent('import')\n\t\tsetSourceShown(true)\n\t\tsetImport(doImport + 1)\n\t}\n\tconst toggleSource = () => {\n\t\tAnalytics.generatorEvent('toggle-output', !sourceShown ? 'visible' : 'hidden')\n\t\tsetSourceShown(!sourceShown)\n\t\tsetCopy(0)\n\t\tsetDownload(0)\n\t\tsetImport(0)\n\t}\n\n\tconst [copyActive, setCopyActive] = useState(false)\n\tconst copyTimeout = useRef(undefined)\n\tconst copySuccess = () => {\n\t\tsetCopyActive(true)\n\t\tif (copyTimeout.current !== undefined) clearTimeout(copyTimeout.current)\n\t\tcopyTimeout.current = setTimeout(() => {\n\t\t\tsetCopyActive(false)\n\t\t}, 2000) as any\n\t}\n\n\tconst [previewShown, setPreviewShown] = useState(false)\n\tconst hasPreview = HasPreview.includes(gen.id)\n\tif (previewShown && !hasPreview) setPreviewShown(false)\n\tlet actionsShown = 1\n\tif (hasPreview) actionsShown += 1\n\tif (sourceShown) actionsShown += 2\n\n\tconst togglePreview = () => {\n\t\tAnalytics.generatorEvent('toggle-preview', !previewShown ? 'visible' : 'hidden')\n\t\tsetPreviewShown(!previewShown)\n\t}\n\n\treturn <>\n\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t{presetResults.map(preset => loadPreset(preset)} />)}\n\t\t\t\t\t
\n\t\t\t\t\t{presetResults.length === 0 && }\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{allowedVersions.reverse().map(v =>\n\t\t\t\t\t\t changeVersion(v)} />\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t{error && setError(null)} />}\n\t\t\t\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t{previewShown ? Octicon.x_circle : Octicon.play}\n\t\t\t
\n\t\t\t
\n\t\t\t\t{Octicon.download}\n\t\t\t
\n\t\t\t
\n\t\t\t\t{copyActive ? Octicon.check : Octicon.clippy}\n\t\t\t
\n\t\t\t
\n\t\t\t\t{sourceShown ? Octicon.chevron_right : Octicon.code}\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t\n\t\t
\n\t\t
\n\t\t\t\n\t\t
\n\t\n}\n","import config from '../../config.json'\nimport { ToolCard } from '../components'\nimport { locale } from '../Locales'\nimport { cleanUrl } from '../Utils'\n\ntype HomeProps = {\n\tlang: string,\n\tchangeTitle: (title: string) => unknown,\n\tpath?: string,\n}\nexport function Home({ lang, changeTitle }: HomeProps) {\n\tconst loc = locale.bind(null, lang)\n\tchangeTitle(loc('title.home'))\n\treturn
\n\t\t
\n\t\t\t{config.generators.filter(g => !g.category).map(g => \n\t\t\t\t\n\t\t\t)}\n\t\t\t\n\t\t\t
\n\t\t\t\n\t\t\t\t

Analyse your performance reports

\n\t\t\t
\n\t\t\t\n\t\t\t\t

Browse through and mix all the vanilla sounds

\n\t\t\t
\n\t\t\t\n\t\t\t\t

Convert your 1.16 data packs to 1.17

\n\t\t\t
\n\t\t
\n\t
\n}\n","import { fetchAssets, fetchManifest, fetchSounds } from './DataFetcher'\nimport type { VersionId } from './Schemas'\n\nexport type VersionManifest = {\n\tlatest: {\n\t\trelease: string,\n\t\tsnapshot: string,\n\t},\n\tversions: {\n\t\tid: string,\n\t\ttype: string,\n\t\turl: string,\n\t}[],\n}\nlet Manifest: VersionManifest | Promise | null = null\n\nexport type VersionAssets = {\n\t[key: string]: {\n\t\thash: string,\n\t},\n}\nconst VersionAssets: Record> = {}\n\nexport type SoundEvents = {\n\t[key: string]: {\n\t\tsounds: (string | { name: string })[],\n\t},\n}\nconst SoundEvents: Record> = {}\n\nexport async function getManifest() {\n\tif (!Manifest) {\n\t\tManifest = fetchManifest()\n\t}\n\treturn Manifest\n}\n\nexport async function getAssets(version: VersionId) {\n\tif (!VersionAssets[version]) {\n\t\tVersionAssets[version] = (async () => {\n\t\t\tconst manifest = await getManifest()\n\t\t\treturn await fetchAssets(version, manifest)\n\t\t})()\n\t}\n\treturn VersionAssets[version]\n}\n\nexport async function getSounds(version: VersionId) {\n\tif (!SoundEvents[version]) {\n\t\tSoundEvents[version] = (async () => {\n\t\t\tconst assets = await getAssets(version)\n\t\t\treturn await fetchSounds(version, assets)\n\t\t})()\n\t}\n\treturn SoundEvents[version]\n}\n","import { useEffect, useRef, useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport { Ad, Btn, BtnMenu, ErrorPanel, SoundConfig, TextInput } from '../components'\nimport { locale } from '../Locales'\nimport type { SoundEvents, VersionAssets } from '../Manifest'\nimport { getAssets, getSounds } from '../Manifest'\nimport type { VersionId } from '../Schemas'\nimport { hexId, message } from '../Utils'\n\ntype SoundsProps = {\n\tpath?: string,\n\tlang: string,\n\tchangeTitle: (title: string, versions?: VersionId[]) => unknown,\n\tversion: VersionId,\n\tchangeVersion: (version: VersionId) => unknown,\n}\nexport function Sounds({ lang, changeTitle, version, changeVersion }: SoundsProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst [error, setError] = useState(null)\n\tchangeTitle(loc('title.sounds'))\n\n\tconst [assets, setAssets] = useState({})\n\tconst [sounds, setSounds] = useState({})\n\tconst soundKeys = Object.keys(sounds ?? {})\n\tuseEffect(() => {\n\t\tgetAssets(version)\n\t\t\t.then(assets => { setAssets(assets); return getSounds(version) })\n\t\t\t.then(sounds => { if (sounds) setSounds(sounds) })\n\t\t\t.catch(e => { console.error(e); setError(message(e)) })\n\t}, [version])\n\n\tconst [search, setSearch] = useState('')\n\tconst [configs, setConfigs] = useState([])\n\tconst addConfig = () => {\n\t\tsetConfigs([{ id: hexId(), sound: search, delay: 0, pitch: 1, volume: 1 }, ...configs])\n\t}\n\tconst editConfig = (id: string) => (changes: Partial) => {\n\t\tsetConfigs(configs.map(c => c.id === id ? { ...c, ...changes } : c))\n\t}\n\tconst deleteConfig = (id: string) => () => {\n\t\tsetConfigs(configs.filter(c => c.id !== id))\n\t}\n\n\tconst [delayedPlay, setDelayedPlay] = useState(0)\n\tconst playAll = () => {\n\t\tsetDelayedPlay(delayedPlay + 1)\n\t}\n\n\tconst download = useRef(null)\n\tconst downloadFunction = () => {\n\t\tconst hasDelay = configs.some(c => c.delay > 0)\n\t\tconst content = configs\n\t\t\t.sort((a, b) => a.delay - b.delay)\n\t\t\t.map(c => `${hasDelay ? `execute if score @s delay matches ${c.delay} run ` : ''}playsound minecraft:${c.sound} master @s ~ ~ ~ ${c.volume} ${c.pitch}`)\n\t\t\t.join('\\n')\n\t\tdownload.current.setAttribute('href', 'data:text/plain;charset=utf-8,' + content + '%0A')\n\t\tdownload.current.setAttribute('download', 'sounds.mcfunction')\n\t\tdownload.current.click()\n\t}\n\n\treturn
\n\t\t\n\t\t{error && setError(null)} />}\n\t\t{soundKeys.length > 0 && <>\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t{configs.length > 1 && }\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{config.versions.reverse().map(v =>\n\t\t\t\t\t\t changeVersion(v.id as VersionId)} />\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\t{configs.map(c => )}\n\t\t\t
\n\t\t\t\n\t\t}\n\t\t\n\t\t\t{soundKeys.map(s => \n\t
\n}\n","import config from '../../config.json'\nimport { ToolCard } from '../components'\nimport { locale } from '../Locales'\nimport { cleanUrl } from '../Utils'\n\ntype WorldgenProps = {\n\tlang: string,\n\tchangeTitle: (title: string) => unknown,\n\tpath?: string,\n}\nexport function Worldgen({ lang, changeTitle }: WorldgenProps) {\n\tconst loc = locale.bind(null, lang)\n\tchangeTitle(loc('title.generator_category', loc('worldgen')))\n\treturn
\n\t\t
\n\t\t\t{config.generators.filter(g => g.category === 'worldgen').map(g => \n\t\t\t\t\n\t\t\t)}\n\t\t
\n\t
\n}\n","import { render } from 'preact'\nimport type { RouterOnChangeArgs } from 'preact-router'\nimport { Router } from 'preact-router'\nimport { useEffect, useState } from 'preact/hooks'\nimport config from '../config.json'\nimport '../styles/global.css'\nimport '../styles/nodes.css'\nimport { Analytics } from './Analytics'\nimport { Header } from './components'\nimport { loadLocale, locale, Locales } from './Locales'\nimport { Generator, Home, Sounds, Worldgen } from './pages'\nimport type { VersionId } from './Schemas'\nimport { Store } from './Store'\nimport { cleanUrl } from './Utils'\n\nconst VERSIONS_IN_TITLE = 3\n\nfunction Main() {\n\tconst [lang, setLanguage] = useState('none')\n\tconst changeLanguage = async (language: string) => {\n\t\tif (!Locales[language]) {\n\t\t\tawait loadLocale(language)\n\t\t}\n\t\tAnalytics.setLanguage(language)\n\t\tStore.setLanguage(language)\n\t\tsetLanguage(language)\n\t}\n\tuseEffect(() => {\n\t\t(async () => {\n\t\t\tconst target = Store.getLanguage()\n\t\t\tawait Promise.all([\n\t\t\t\tloadLocale('en'),\n\t\t\t\t...(target !== 'en' ? [loadLocale(target)] : []),\n\t\t\t])\n\t\t\tsetLanguage(target)\n\t\t})()\n\t}, [])\n\n\tconst [theme, setTheme] = useState(Store.getTheme())\n\tconst changeTheme = (theme: string) => {\n\t\tAnalytics.setTheme(theme)\n\t\tStore.setTheme(theme)\n\t\tsetTheme(theme)\n\t}\n\tuseEffect(() => {\n\t\tdocument.documentElement.setAttribute('data-theme', theme)\n\t}, [theme])\n\n\tconst [version, setVersion] = useState(Store.getVersion())\n\tconst changeVersion = (version: VersionId) => {\n\t\tAnalytics.setVersion(version)\n\t\tStore.setVersion(version)\n\t\tsetVersion(version)\n\t}\n\n\tconst [title, setTitle] = useState(locale(lang, 'title.home'))\n\tconst changeTitle = (title: string, versions?: VersionId[]) => {\n\t\tversions ??= config.versions.map(v => v.id as VersionId)\n\t\tversions.splice(0, versions.length - VERSIONS_IN_TITLE)\n\t\tdocument.title = `${title} Minecraft ${versions.join(', ')}`\n\t\tsetTitle(title)\n\t}\n\n\tconst changeRoute = (e: RouterOnChangeArgs) => {\n\t\t// Needs a timeout to ensure the title is set correctly\n\t\tsetTimeout(() => Analytics.pageview(cleanUrl(e.url)))\n\t}\n\n\treturn <>\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n}\n\nrender(
, document.body)\n"],"names":["Analytics","type","id","getElementById","remove","window","load","data-ea-publisher","data-ea-type","class","icon","label","active","clazz","tooltip","tooltipLoc","onClick","aria-label","Octicon","large","doSelect","value","placeholder","onChange","onInput","e","value2","target","ref","useRef","current","select","stopPropagation","size","draw","onDrag","onHover","onLeave","inputs","canvas","dragStart","dragRequest","dragPending","dragBusy","onMouseDown","offsetX","offsetY","onMouseMove","x","clientWidth","y2","clientHeight","dx","dy","requestAnimationFrame","async","dx2","dy2","onMouseUp","onMouseLeave","addEventListener","body","removeEventListener","redraw","redrawCount","ctx","getContext","s2","width","height","img","getImageData","ownCount","putImageData","setActive","useState","hider","model","invalidated","listener","[object Object]","addListener","removeListener","relative","children","useFocus","Btn","__spreadProps","Analytics2","ID_SITE","ID_GENERATOR","category","action","index","pageview","page","setLanguage","language","setTheme","theme","setVersion","version","setPreview","preview","generatorEvent","alert","xmlns","viewBox","fill-rule","d","archive","arrow_left","arrow_right","check","chevron_down","chevron_right","chevron_up","clippy","code","dash","device_desktop","download","duplicate","eye","eye_closed","gear","globe","history","info","issue_opened","kebab_horizontal","link","mark_github","moon","play","plus","plus_circle","search","sun","sync","tag","terminal","three_bars","trashcan","unfold","upload","x_circle","error","onDismiss","href","component","props","evt","fn","onKeyDown","onEnter","key","__spreadValues","displayName","name","TextInput","BaseInput","v","NumberInput","Number","RangeInput","scriptRel","seen","__vitePreload","baseModule","deps","relList","document","createElement","supports","Promise","all","map","dep","isCss","endsWith","cssSelector","querySelector","rel","as","crossOrigin","head","appendChild","res","rej","then","Locales","fallback","English","params","replace","parseInt","match","slice","resolveLocaleParams","en","langConfig","config","languages","find","lang","data","__variableDynamicImportRuntime0__","schema","schemas","__variableDynamicImportRuntime1__","default","obj","dec2hex","dec","toString","substr","length","arr","Uint8Array","crypto","getRandomValues","Array","from","join","BigInt","Math","floor","random","MAX_SAFE_INTEGER","seed","dimensions","get","Path","set","keys","forEach","url","replaceAll","trimmedUrl","generators","g2","str","h","abs","i","imul","charCodeAt","hashString","a2","b","c","max","min","lerp","Error","message","deepClone","rfdc","constructor","isArray","deepEqual","valueOf","Object","prototype","hasOwnProperty","call","VersionIds","Versions","Models","versionGetter","1.15","java15","1.16","java16","1.17","java17","1.18","java18","CachedDecorator","CachedFeature","collections","getCollections","blockStates","versionId","collectionTarget","blockStateTarget","versions","JSON","stringify","debug","dynamic","refs","filter","localStorage","getItem","r","hash","matches","cache","caches","open","promises","request","push","delete","warn","deleteMatching","startsWith","setItem","fetchRegistries","fetchBlockStateMap","fetchDynamicRegistries","fetchData","getSchemas","minVersionId","maxVersionId","findIndex","minVersion","maxVersion","removeItem","mcdataUrl","vanillaDatapackUrl","registries","checkVersion","mcdata_master","getData","data2","k","entries","register","path","values","properties","states","assign","vanilla_datapack_summary","registry","versionData","vanilla_datapack_data","fetch","json","cacheResponse","ok","fetchResponse","responseData","put","Response","cacheState","biomeSourceCache","climateSamplerCache","state","options","newState","octaves","FixedBiome","biome","shift","scale","numBiomes","biomes","_y","z","node","preset","NetherPreset18","NetherPreset","fetchPreset","generator","biome_source","OverworldPreset18","DataModel","unwrapLists","MultiNoise","fromJson","noise","config2","firstOctave","clamp","NormalNoise","Random","n","n2","sample","minDist","Infinity","minBiome","parameters","p","dist","square","altitude","temperature","humidity","weirdness","offset","getBiomeSource","settings","NoiseGeneratorSettings","noiseSampler","NoiseSampler","getClimate","bind","biomeSource","climateSampler","biomeColors","color","VanillaColors","stringToColor","minecraft:badlands","minecraft:badlands_plateau","minecraft:bamboo_jungle","minecraft:bamboo_jungle_hills","minecraft:basalt_deltas","minecraft:beach","minecraft:birch_forest","minecraft:birch_forest_hills","minecraft:cold_ocean","minecraft:crimson_forest","minecraft:dark_forest","minecraft:dark_forest_hills","minecraft:deep_cold_ocean","minecraft:deep_frozen_ocean","minecraft:deep_lukewarm_ocean","minecraft:deep_ocean","minecraft:deep_warm_ocean","minecraft:desert","minecraft:desert_hills","minecraft:desert_lakes","minecraft:end_barrens","minecraft:end_highlands","minecraft:end_midlands","minecraft:eroded_badlands","minecraft:flower_forest","minecraft:forest","minecraft:frozen_ocean","minecraft:frozen_river","minecraft:giant_spruce_taiga","minecraft:giant_spruce_taiga_hills","minecraft:giant_tree_taiga","minecraft:giant_tree_taiga_hills","minecraft:gravelly_mountains","minecraft:ice_spikes","minecraft:jungle","minecraft:jungle_edge","minecraft:jungle_hills","minecraft:lukewarm_ocean","minecraft:modified_badlands_plateau","minecraft:modified_gravelly_mountains","minecraft:modified_jungle","minecraft:modified_jungle_edge","minecraft:modified_wooded_badlands_plateau","minecraft:mountain_edge","minecraft:mountains","minecraft:mushroom_field_shore","minecraft:mushroom_fields","minecraft:nether_wastes","minecraft:ocean","minecraft:plains","minecraft:river","minecraft:savanna","minecraft:savanna_plateau","minecraft:shattered_savanna","minecraft:shattered_savanna_plateau","minecraft:small_end_islands","minecraft:snowy_beach","minecraft:snowy_mountains","minecraft:snowy_taiga","minecraft:snowy_taiga_hills","minecraft:snowy_taiga_mountains","minecraft:snowy_tundra","minecraft:soul_sand_valley","minecraft:stone_shore","minecraft:sunflower_plains","minecraft:swamp","minecraft:swamp_hills","minecraft:taiga","minecraft:taiga_hills","minecraft:taiga_mountains","minecraft:tall_birch_forest","minecraft:tall_birch_hills","minecraft:the_end","minecraft:the_void","minecraft:warm_ocean","minecraft:warped_forest","minecraft:wooded_badlands_plateau","minecraft:wooded_hills","minecraft:wooded_mountains","minecraft:snowy_slopes","minecraft:lofty_peaks","minecraft:snowcapped_peaks","minecraft:stony_peaks","minecraft:grove","minecraft:meadow","minecraft:lush_caves","minecraft:dripstone_caves","altitude_noise","amplitudes","temperature_noise","humidity_noise","weirdness_noise","continentalness","erosion","depth","terrain","featureColors","placements","features","biomeInfoNoise","PerlinNoise","fork","seaLevel","nextFloat","nextInt","sampleInt","this","fill","pos","feature","j2","base","spread","normalize","min_inclusive","max_inclusive","source","indexOf","useFeature","featureFn","Features","decorator2","decoratorFn","Decorators","decorated","getPositions","decorator","getPlacements","random_boolean_selector","feature_true","feature_false","random_selector","f","chance","simple_random_selector","count","count_extra","extra_chance","extra_count","count_multilayer","count_noise","noise_level","below_noise","above_noise","count_noise_biased","factor","noise_factor","ceil","noise_offset","noise_to_count_ratio","dark_oak_tree","_config","_","outer","flatMap","inner","depth_average","decorateY","baseline","emerald_ore","fire","glowstone","heightmap","heightmap_spread_double","heightmap_world_surface","iceberg","lava_lake","nope","range","maximum","top_offset","bottom_offset","range_biased","range_very_biased","spread_32_above","top_solid_heightmap","magma","surface_relative_threshold","water_lake","minLimitPerlinNoise","maxLimitPerlinNoise","mainPerlinNoise","depthNoise","xOffset","chunkWidth","size_horizontal","chunkHeight","size_vertical","chunkCountY","amplified","biomeDepth","biomeScale","noiseColumnCache","cx","ox","noise1","fillNoiseColumn","noise2","yy","oy","cachedColumn","xzScale","sampling","xz_scale","yScale","y_scale","xzFactor","xz_factor","yFactor","y_factor","randomDensity","random_density_offset","getRandomDensity","sampleAndClampNoise","getOctaveNoise","zo","falloff","density_factor","density_offset","top_slide","clampedLerp","bottom_slide","x2","wrap","y22","z2","minLimitNoise","maxLimitNoise","mainNoise","colors","minecraft:air","minecraft:water","minecraft:lava","minecraft:stone","minecraft:netherrack","minecraft:end_stone","generatorCache","chunkCache","bottomSlide","topSlide","shape","biomeFactor","biomeOffset","peaks","biomePeaks","nearWater","NoiseChunkGenerator","getCached","LevelSlice","minY","generator2","state2","getBlockState","getName","OldNoiseChunkGenerator","reset","row","iterateNoiseColumn","reverse","getColor","minX","filled","chunks","cached","Chunk","ChunkPos","create","Z","chunk","chunkIndex","BiomeSourcePreview","shown","setScale","focused","setFocused","refineTimeout","getOctaves","calculateState","useCanvas","oz","col","worldX","worldZ","getBiomeColor","getBiome","biomeMap","setTimeout","xx","zz","toWorld","changeScale","newScale","locale","newSeed","DecoratorPreview","setSeed","randomSeed","NoiseSettingsPreview","loc","setBiomeFactor","setBiomeOffset","setBiomePeaks","hasPeaks","worldY","min_y","BtnMenu","BtnInput","HasPreview","setCount","transformOutput","switchNode","hook","blockState","validation","validator","relativePath","includes","getActiveFields","activeFields","enabled","Store","Store2","getLanguage","getTheme","getVersion","getIndent","getSoundsVersion","setIndent","indent","setSoundsVersion","INDENT","2_spaces","4_spaces","tabs","doCopy","doDownload","doImport","copySuccess","onError","retransform","getOutput","useCallback","model2","blockStates2","ModelPath","output","clipboard","writeText","content","encodeURIComponent","setAttribute","click","changeIndent","onBlur","parse","wrapLists","spellcheck","autocorrect","style","mapper","getter","setter","silent","selectRegistries","hiddenFields","flattenedFields","inlineFields","nbtFields","fixedLists","keysModel","MapNode","StringNode","historyMax","prefix","suffix","renderHtml","some","data-category","boolean","BooleanSuffix","choices","choice","activeCase","contextPath","context","getModel","getArray","choiceContextPath","choiceContext","inject","c2","newValue","change","pathLocale","contextPush","expand","collapse","isToggled","useToggles","maxShown","setMaxShown","maxLength","ErrorPopup","modelPush","hexId","cValue","cId","cPath","canToggle","toggle","nested","Collapsed","MemoedTreeNode","actions","onSelect","splice","disabled","keyPath","keysSchema","enum","last","errors","add","ObjectNode","fromEntries","cSchema","number","NumberSuffix","getChildModelPath","isObject","isDecorated","wrapper","fields","originalFields","decorators","iterateNestedDecorators","ListNode","featurePath","decoratorsPath","ModelWrapper","path2","modelArr","equals","newDecorators","newPath","feature2","produceNestedDecorators","createDecoratorsWrapper","optional","onExpand","onCollapse","newCtx","pools","loot","child","cPrefix","cSuffix","cBody","isFlattened","isInlined","HelpPopup","string","StringSuffix","toggleState","setToggleState","Map","toggleAll","setToggleAll","ctrlKey","integer","parsed","parseFloat","padStart","getValues","isEnum","additional","context2","pool","datalistId","list","values2","memo","onContextMenu","preventDefault","a","description","navigator","prev","next","result","withModel","getAll","e2","message2","popupIcon","popup","useErrorBoundary","setState","FullNode","Themes","system","dark","light","title","changeTheme","changeLanguage","gen","getGenerator","getCurrentUrl","Link","Icons","home","route","cleanUrl","th","rx","y","report","sounds","cy","clip-rule","assets","sound","delay","pitch","volume","onEdit","onDelete","delayedPlay","loading","setLoading","playing","setPlaying","invalid","setInvalid","howls","command","soundEvent","h2","stop","soundPath","entry","getResourceUrl","howl","Howl","src","format","rate","on","completed","every","copyActive","setCopyActive","copyTimeout","step","toFixed","changeTitle","changeVersion","setError","errorBoundary","errorRetry","ErrorPanel","allowedVersions","setModel","setBlockStates","Reference","ChoiceNode","schemaName","validate","m","catch","onKeyUp","undo","redo","presetFilter","setPresetFilter","presetResults","setPresetResults","terms","trim","split","presets","t","sourceShown","setSourceShown","innerWidth","setCopy","setDownload","setImport","previewShown","setPreviewShown","hasPreview","actionsShown","Ad","loadPreset","Tree","PreviewPanel","SourcePanel","ToolCard","Manifest","VersionAssets","SoundEvents","fetchManifest","manifest","getManifest","latest","snapshot","versionMeta","assetIndex","objects","fetchAssets","getAssets","fetchSounds","setAssets","setSounds","soundKeys","assets2","getSounds","sounds2","setSearch","configs","setConfigs","addConfig","deleteConfig","setDelayedPlay","hasDelay","sort","SoundConfig","changes","loadLocale","documentElement","version2","setTitle","title2","Header","theme2","Router","Home","Worldgen","Sounds","Generator","render","Main"],"mappings":"gpBAAiBA,qkLCQEC,KAAEA,KAAMC,cAChB,6BACAC,eAAe,sBAAmBC,SACvC,eAAgBC,mBACRC,SAEV,MAEK,MAAD,CAAKC,oBAAkB,mBAAmBC,eAAcP,EAAMQ,MAAM,eAAeP,GAAAA,gBCLvEQ,KAAEA,QAAMC,SAAOC,EAAQH,MAAOI,UAAOC,aAASC,UAAYC,aACrE,MAAD,CAAKP,MAAO,MAAMG,EAAS,UAAY,KAAKC,EAAQ,IAAIA,IAAU,KAAKC,EAAU,yBAAmBC,IAAc,OAAS,KAAMC,QAAAA,EAAkBC,aAAYH,GACpKJ,GAAQQ,EAAQR,GAChBC,KAAU,OAAD,KAAOA,gBCFMD,KAAEA,QAAMC,QAAOQ,WAAOC,QAAUC,cAAOC,WAAaC,UACtEC,OAAuB,IAAbD,EAAyB,OAAYE,UAC9CC,EAASD,EAAEE,OAA4BN,iBAClCK,IAGNE,EAAMC,EAAyB,gBAC3B,KACLT,GAAYQ,EAAIE,WACfA,QAAQC,WAEX,CAACX,MAEI,MAAD,CAAKX,MAAO,kBAAiBU,EAAQ,cAAgB,IAAMH,WAAcS,EAAEO,mBAChFtB,GAAQQ,EAAQR,GAChBC,KAAU,OAAD,KAAOA,KAChB,QAAD,CAAOiB,IAAAA,EAAU3B,KAAK,OAAOoB,MAAAA,EAAcE,SAAUC,EAASF,YAAAA,iBCvBtCW,KAAEA,OAAMC,SAAMC,UAAQC,UAASC,GAMtDC,SACIC,EAASV,EAA0B,MAEnCW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,SAAO,GAAK,CAACN,KAAAA,EAAMxG,QAAAA,EAASg2B,YAAAA,EAAaC,cAAAA,OAKvDoF,IAAQC,GAAD,MAAU/2B,SAAS/G"} \ No newline at end of file +{"version":3,"file":"index.f1ae53c2.js","sources":["../../src/app/Analytics.ts","../../src/app/components/Ad.tsx","../../src/app/components/Btn.tsx","../../src/app/components/BtnInput.tsx","../../src/app/hooks/useCanvas.ts","../../src/app/hooks/useFocus.ts","../../src/app/hooks/useModel.ts","../../src/app/components/BtnMenu.tsx","../../src/app/components/Octicon.tsx","../../src/app/components/ErrorPanel.tsx","../../src/app/components/forms/Input.tsx","../../vite/preload-helper","../../src/app/Locales.ts","../../src/app/Utils.ts","../../src/app/Schemas.ts","../../src/app/DataFetcher.ts","../../src/app/previews/BiomeSource.ts","../../src/app/previews/Decorator.ts","../../src/app/previews/noise/NoiseChunkGenerator.ts","../../src/app/previews/NoiseSettings.ts","../../src/app/components/previews/BiomeSourcePreview.tsx","../../src/app/components/previews/DecoratorPreview.tsx","../../src/app/components/previews/NoiseSettingsPreview.tsx","../../src/app/components/generator/PreviewPanel.tsx","../../src/app/schema/transformOutput.ts","../../src/app/Store.ts","../../src/app/components/generator/SourcePanel.tsx","../../src/app/schema/ModelWrapper.ts","../../src/app/schema/renderHtml.tsx","../../src/app/components/generator/Tree.tsx","../../src/app/components/Header.tsx","../../src/app/components/Icons.tsx","../../src/app/components/sounds/SoundConfig.tsx","../../src/app/components/ToolCard.tsx","../../src/app/pages/Generator.tsx","../../src/app/pages/Home.tsx","../../src/app/Manifest.ts","../../src/app/pages/Sounds.tsx","../../src/app/pages/Worldgen.tsx","../../src/app/Main.tsx"],"sourcesContent":["export namespace Analytics {\n\tconst ID_SITE = 'Site'\n\tconst ID_GENERATOR = 'Generator'\n\n\tconst DIM_THEME = 1\n\tconst DIM_VERSION = 3\n\tconst DIM_LANGUAGE = 4\n\tconst DIM_PREVIEW = 5\n\n\tfunction event(category: string, action: string, label?: string) {\n\t\tga('send', 'event', category, action, label)\n\t}\n\n\tfunction dimension(index: number, value: string) {\n\t\tga('set', `dimension${index}`, value)\n\t}\n\n\texport function pageview(page: string) {\n\t\tga('set', 'page', page)\n\t\tga('send', 'pageview')\n\t}\n\n\texport function setLanguage(language: string) {\n\t\tdimension(DIM_LANGUAGE, language)\n\t\tevent(ID_SITE, 'set-language', language)\n\t}\n\n\texport function setTheme(theme: string) {\n\t\tdimension(DIM_THEME, theme)\n\t\tevent(ID_SITE, 'set-theme', theme)\n\t}\n\n\texport function setVersion(version: string) {\n\t\tdimension(DIM_VERSION, version)\n\t\tevent(ID_GENERATOR, 'set-version', version)\n\t}\n\n\texport function setPreview(preview: string) {\n\t\tdimension(DIM_PREVIEW, preview)\n\t\tevent(ID_GENERATOR, 'set-preview', preview)\n\t}\n\n\texport function generatorEvent(action: string, label?: string) {\n\t\tevent(ID_GENERATOR, action, label)\n\t}\n}\n","import { useEffect } from 'preact/hooks'\n\ndeclare const ethicalads: any\n\ntype AdProps = {\n\ttype: 'text' | 'image',\n\tid: string,\n}\nexport function Ad({ type, id }: AdProps) {\n\tuseEffect(() => {\n\t\tdocument.getElementById('ad-placeholder')?.remove()\n\t\tif ('ethicalads' in window) {\n\t\t\tethicalads.load()\n\t\t}\n\t}, [])\n\n\treturn
\n}\n","import { Octicon } from '.'\n\ntype BtnProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\tactive?: boolean,\n\ttooltip?: string,\n\ttooltipLoc?: 'se' | 'sw' | 'nw',\n\tclass?: string,\n\tonClick?: (event: MouseEvent) => unknown,\n}\nexport function Btn({ icon, label, active, class: clazz, tooltip, tooltipLoc, onClick }: BtnProps) {\n\treturn
\n\t\t{icon && Octicon[icon]}\n\t\t{label && {label}}\n\t
\n}\n","import { useEffect, useRef } from 'preact/hooks'\nimport { Octicon } from '.'\n\ntype BtnInputProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\tlarge?: boolean,\n\tdoSelect?: number,\n\tvalue?: string,\n\tplaceholder?: string,\n\tonChange?: (value: string) => unknown,\n}\nexport function BtnInput({ icon, label, large, doSelect, value, placeholder, onChange }: BtnInputProps) {\n\tconst onInput = onChange === undefined ? () => {} : (e: any) => {\n\t\tconst value = (e.target as HTMLInputElement).value\n\t\tonChange?.(value)\n\t}\n\n\tconst ref = useRef(null)\n\tuseEffect(() => {\n\t\tif (doSelect && ref.current) {\n\t\t\tref.current.select()\n\t\t}\n\t}, [doSelect])\n\n\treturn
e.stopPropagation()}>\n\t\t{icon && Octicon[icon]}\n\t\t{label && {label}}\n\t\t\n\t
\n}\n","import type { Inputs } from 'preact/hooks'\nimport { useEffect, useRef } from 'preact/hooks'\n\ntype Vec2 = [number, number]\n\nexport function useCanvas({ size, draw, onDrag, onHover, onLeave }: {\n\tsize: () => Vec2,\n\tdraw: (img: ImageData) => Promise,\n\tonDrag?: (dx: number, dy: number) => Promise,\n\tonHover?: (x: number, y: number) => unknown,\n\tonLeave?: () => unknown,\n}, inputs?: Inputs) {\n\tconst canvas = useRef(null)\n\n\tconst dragStart = useRef()\n\tconst dragRequest = useRef()\n\tconst dragPending = useRef([0, 0])\n\tconst dragBusy = useRef(false)\n\n\tuseEffect(() => {\n\t\tconst onMouseDown = (e: MouseEvent) => {\n\t\t\tdragStart.current = [e.offsetX, e.offsetY]\n\t\t}\n\t\tconst onMouseMove = (e: MouseEvent) => {\n\t\t\tif (dragStart.current === undefined) {\n\t\t\t\tconst x = e.offsetX / canvas.current.clientWidth\n\t\t\t\tconst y = e.offsetY / canvas.current.clientHeight\n\t\t\t\tonHover?.(x, y)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (!onDrag) return\n\t\t\tconst dx = e.offsetX - dragStart.current[0]\n\t\t\tconst dy = e.offsetY - dragStart.current[1]\n\t\t\tif (!(dx === 0 && dy === 0)) {\n\t\t\t\tdragPending.current = [dragPending.current[0] + dx, dragPending.current[1] + dy]\n\t\t\t\tif (!dragBusy.current) {\n\t\t\t\t\tcancelAnimationFrame(dragRequest.current)\n\t\t\t\t\tdragRequest.current = requestAnimationFrame(async () => {\n\t\t\t\t\t\tdragBusy.current = true\n\t\t\t\t\t\tconst dx = dragPending.current[0] / canvas.current.clientWidth\n\t\t\t\t\t\tconst dy = dragPending.current[1] / canvas.current.clientHeight\n\t\t\t\t\t\tdragPending.current = [0, 0]\n\t\t\t\t\t\tawait onDrag?.(dx, dy)\n\t\t\t\t\t\tdragBusy.current = false\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tdragStart.current = [e.offsetX, e.offsetY]\n\t\t}\n\t\tconst onMouseUp = () => {\n\t\t\tdragStart.current = undefined\n\t\t}\n\t\tconst onMouseLeave = () => {\n\t\t\tonLeave?.()\n\t\t}\n\n\t\tcanvas.current.addEventListener('mousedown', onMouseDown)\n\t\tcanvas.current.addEventListener('mousemove', onMouseMove)\n\t\tcanvas.current.addEventListener('mouseleave', onMouseLeave)\n\t\tdocument.body.addEventListener('mouseup', onMouseUp)\n\n\t\treturn () => {\n\t\t\tcanvas.current?.removeEventListener('mousedown', onMouseDown)\n\t\t\tcanvas.current?.removeEventListener('mousemove', onMouseMove)\n\t\t\tcanvas.current?.removeEventListener('mouseleave', onMouseLeave)\n\t\t\tdocument.body.removeEventListener('mouseup', onMouseUp)\n\t\t}\n\t}, [...inputs ?? [], canvas.current])\n\n\tconst redraw = useRef<() => Promise>()\n\tconst redrawCount = useRef(0)\n\tredraw.current = async () => {\n\t\tconst ctx = canvas.current.getContext('2d')!\n\t\tconst s = size()\n\t\tcanvas.current.width = s[0]\n\t\tcanvas.current.height = s[1]\n\t\tconst img = ctx.getImageData(0, 0, s[0], s[1])\n\t\tconst ownCount = redrawCount.current += 1\n\t\tawait draw(img)\n\t\tif (ownCount === redrawCount.current) {\n\t\t\tctx.putImageData(img, 0, 0)\n\t\t}\n\t}\n\n\treturn {\n\t\tcanvas,\n\t\tredraw: redraw.current,\n\t}\n}\n","import { useEffect, useState } from 'preact/hooks'\n\nexport function useFocus(): [boolean, () => unknown] {\n\tconst [active, setActive] = useState(false)\n\n\tconst hider = () => {\n\t\tsetActive(false)\n\t}\n\n\tuseEffect(() => {\n\t\tif (active) {\n\t\t\tdocument.body.addEventListener('click', hider)\n\t\t\tdocument.body.addEventListener('contextmenu', hider)\n\t\t}\n\t\treturn () => {\n\t\t\tdocument.body.removeEventListener('click', hider)\n\t\t\tdocument.body.removeEventListener('contextmenu', hider)\n\t\t}\n\t}, [active])\n\n\treturn [active, () => setActive(true)]\n}\n","import type { DataModel } from '@mcschema/core'\nimport { useEffect } from 'preact/hooks'\n\nexport function useModel(model: DataModel | undefined | null, invalidated: (model: DataModel) => unknown) {\n\tconst listener = {\n\t\tinvalidated() {\n\t\t\tif (model) {\n\t\t\t\tinvalidated(model)\n\t\t\t}\n\t\t},\n\t}\n\n\tuseEffect(() => {\n\t\tmodel?.addListener(listener)\n\t\treturn () => {\n\t\t\tmodel?.removeListener(listener)\n\t\t}\n\t}, [model])\n}\n","import type { ComponentChildren } from 'preact'\nimport type { Octicon } from '.'\nimport { Btn } from '.'\nimport { useFocus } from '../hooks'\n\ntype BtnMenuProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\trelative?: boolean,\n\ttooltip?: string,\n\tchildren: ComponentChildren,\n}\nexport function BtnMenu({ icon, label, relative, tooltip, children }: BtnMenuProps) {\n\tconst [active, setActive] = useFocus()\n\n\treturn
\n\t\t\n\t\t{active &&
\n\t\t\t{children}\n\t\t
}\n\t
\n}\n","export const Octicon = {\n\talert: ,\n\tarchive: ,\n\tarrow_left: ,\n\tarrow_right: ,\n\tcheck: ,\n\tchevron_down: ,\n\tchevron_right: ,\n\tchevron_up: ,\n\tclippy: ,\n\tcode: ,\n\tdash: ,\n\tdevice_desktop: ,\n\tdownload: ,\n\tduplicate: ,\n\teye: ,\n\teye_closed: ,\n\tgear: ,\n\tglobe: ,\n\thistory: ,\n\tinfo: ,\n\tissue_opened: ,\n\tkebab_horizontal: ,\n\tlink: ,\n\tmark_github: ,\n\tmoon: ,\n\tplay: ,\n\tplus: ,\n\tplus_circle: ,\n\tsearch: ,\n\tsun: ,\n\tsync: ,\n\ttag: ,\n\tterminal: ,\n\tthree_bars: ,\n\ttrashcan: ,\n\tunfold: ,\n\tupload: ,\n\tx: ,\n\tx_circle: ,\n}\n","import { Octicon } from './Octicon'\n\ntype ErrorPanelProps = {\n\terror: string,\n\tonDismiss?: () => unknown,\n}\nexport function ErrorPanel({ error, onDismiss }: ErrorPanelProps) {\n\treturn
\n\t\t{onDismiss &&
{Octicon.x}
}\n\t\t

{error}

\n\t\t

If you think this is a bug, you can report it on GitHub

\n\t
\n}\n","import type { JSXInternal } from 'preact/src/jsx'\n\ntype InputProps = JSXInternal.HTMLAttributes\n\ntype BaseInputProps = Omit & {\n\tonChange?: (value: T) => unknown,\n\tonEnter?: (value: T) => unknown,\n}\nfunction BaseInput(name: string, type: string, fn: (value: string) => T) {\n\tconst component = (props: BaseInputProps) => {\n\t\tconst onChange = props.onChange && ((evt: Event) => {\n\t\t\tconst value = (evt.target as HTMLInputElement).value\n\t\t\tprops.onChange?.(fn(value))\n\t\t})\n\t\tconst onKeyDown = props.onEnter && ((evt: KeyboardEvent) => {\n\t\t\tif (evt.key === 'Enter') {\n\t\t\t\tconst value = (evt.target as HTMLInputElement).value\n\t\t\t\tprops.onEnter?.(fn(value))\n\t\t\t}\n\t\t})\n\t\treturn \n\t}\n\tcomponent.displayName = name\n\treturn component\n}\n\nexport const TextInput = BaseInput('TextInput', 'text', v => v)\n\nexport const NumberInput = BaseInput('NumberInput', 'number', v => Number(v))\n\nexport const RangeInput = BaseInput('RangeInput', 'range', v => Number(v))\n","let scriptRel;const seen = {};export const __vitePreload = function preload(baseModule, deps) {\n // @ts-ignore\n if (!__VITE_IS_MODERN__ || !deps) {\n return baseModule();\n }\n // @ts-ignore\n if (scriptRel === undefined) {\n // @ts-ignore\n const relList = document.createElement('link').relList;\n // @ts-ignore\n scriptRel =\n relList && relList.supports && relList.supports('modulepreload')\n ? 'modulepreload'\n : 'preload';\n }\n return Promise.all(deps.map((dep) => {\n // @ts-ignore\n if (dep in seen)\n return;\n // @ts-ignore\n seen[dep] = true;\n const isCss = dep.endsWith('.css');\n const cssSelector = isCss ? '[rel=\"stylesheet\"]' : '';\n // @ts-ignore check if the file is already preloaded by SSR markup\n if (document.querySelector(`link[href=\"${dep}\"]${cssSelector}`)) {\n return;\n }\n // @ts-ignore\n const link = document.createElement('link');\n // @ts-ignore\n link.rel = isCss ? 'stylesheet' : scriptRel;\n if (!isCss) {\n link.as = 'script';\n link.crossOrigin = '';\n }\n link.href = dep;\n // @ts-ignore\n document.head.appendChild(link);\n if (isCss) {\n return new Promise((res, rej) => {\n link.addEventListener('load', res);\n link.addEventListener('error', rej);\n });\n }\n })).then(() => baseModule());\n}","import config from '../config.json'\nimport English from '../locales/en.json'\n\nexport type Localize = (key: string, ...params: string[]) => string\n\ninterface Locale {\n\t[key: string]: string\n}\n\nexport const Locales: {\n\t[key: string]: Locale,\n} = {\n\tfallback: English,\n}\n\nfunction resolveLocaleParams(value: string, params?: string[]): string {\n\treturn value.replace(/%\\d+%/g, match => {\n\t\tconst index = parseInt(match.slice(1, -1))\n\t\treturn params?.[index] !== undefined ? params[index] : match\n\t})\n}\n\nexport function locale(language: string, key: string, ...params: string[]): string {\n\tconst value: string | undefined = Locales[language]?.[key]\n\t\t?? Locales.en?.[key] ?? Locales.fallback[key] ?? key\n\treturn resolveLocaleParams(value, params)\n}\n\nexport async function loadLocale(language: string) {\n\tconst langConfig = config.languages.find(lang => lang.code === language)\n\tif (!langConfig) return\n\tconst data = await import(`../locales/${language}.json`)\n\tconst schema = langConfig.schemas !== false\n\t\t&& await import(`../../node_modules/@mcschema/locales/src/${language}.json`)\n\tLocales[language] = { ...data.default, ...schema.default }\n}\n","import type { DataModel } from '@mcschema/core'\nimport { Path } from '@mcschema/core'\nimport rfdc from 'rfdc'\nimport config from '../config.json'\n\nexport function isPromise(obj: any): obj is Promise {\n\treturn typeof (obj as any)?.then === 'function' \n}\n\nexport function isObject(obj: any) {\n\treturn typeof obj === 'object' && obj !== null\n}\n\nconst dec2hex = (dec: number) => ('0' + dec.toString(16)).substr(-2)\n\nexport function hexId(length = 12) {\n\tvar arr = new Uint8Array(length / 2)\n\twindow.crypto.getRandomValues(arr)\n\treturn Array.from(arr, dec2hex).join('')\n}\n\nexport function randomSeed() {\n\treturn BigInt(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER))\n}\n\nexport function newSeed(model: DataModel) {\n\tconst seed = Math.floor(Math.random() * (4294967296)) - 2147483648\n\tconst dimensions = model.get(new Path(['dimensions']))\n\tmodel.set(new Path(['seed']), seed, true)\n\tif (typeof dimensions === 'object' && dimensions !== null) {\n\t\tObject.keys(dimensions).forEach(id => {\n\t\t\tmodel.set(new Path(['dimensions', id, 'generator', 'seed']), seed, true)\n\t\t\tmodel.set(new Path(['dimensions', id, 'generator', 'biome_source', 'seed']), seed, true)\n\t\t})\n\t}\n\tmodel.set(new Path(['generator', 'seed']), seed, true)\n\tmodel.set(new Path(['generator', 'biome_source', 'seed']), seed)\n}\n\nexport function htmlEncode(str: string) {\n\treturn str.replace(/&/g, '&').replace(//g, '>')\n\t\t.replace(/\"/g, '"').replace(/'/g, ''').replace(/\\//g, '/')\n}\n\nexport function hashString(s: string) {\n\tlet h = 0\n\tfor(let i = 0; i < s.length; i++)\n\t\th = Math.imul(31, h) + s.charCodeAt(i) | 0\n\treturn h\n}\n\nexport function cleanUrl(url: string) {\n\treturn `/${url}/`.replaceAll('//', '/')\n}\n\nexport function getGenerator(url: string) {\n\tconst trimmedUrl = url.replace(/^\\//, '').replace(/\\/$/, '')\n\treturn config.generators.find(g => g.url === trimmedUrl)\n}\n\nexport function stringToColor(str: string): [number, number, number] {\n\tconst h = Math.abs(hashString(str))\n\treturn [h % 256, (h >> 8) % 256, (h >> 16) % 256]\n}\n\nexport function square(a: number) {\n\treturn a * a\n}\n\nexport function clamp(a: number, b: number, c: number) {\n\treturn Math.max(a, Math.min(b, c))\n}\n\nexport function clampedLerp(a: number, b: number, c: number): number {\n\tif (c < 0) {\n\t\treturn a\n\t} else if (c > 1) {\n\t\treturn b\n\t} else {\n\t\treturn lerp(c, a, b)\n\t}\n}\n\nexport function lerp(a: number, b: number, c: number): number {\n\treturn b + a * (c - b)\n}\n\nexport function lerp2(a: number, b: number, c: number, d: number, e: number, f: number): number {\n\treturn lerp(b, lerp(a, c, d), lerp(a, e, f))\n}\n\nexport function lerp3(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) {\n\treturn lerp(c, lerp2(a, b, d, e, f, g), lerp2(a, b, h, i, j, k))\n}\n\nexport function smoothstep(x: number): number {\n\treturn x * x * x * (x * (x * 6 - 15) + 10)\n}\n\nexport function message(e: unknown): string {\n\tif (e instanceof Error) return e.message\n\treturn `${e}`\n}\n\nexport const deepClone = rfdc()\n\n/**\n * MIT License\n * \n * Copyright (c) 2017 Evgeny Poberezkin\n * \n * https://github.com/epoberezkin/fast-deep-equal/blob/master/LICENSE\n */\nexport function deepEqual(a: any, b: any) {\n\tif (a === b) return true\n\n\tif (a && b && typeof a == 'object' && typeof b == 'object') {\n\t\tif (a.constructor !== b.constructor) return false\n\t\tlet length, i\n\t\tif (Array.isArray(a)) {\n\t\t\tlength = a.length\n\t\t\tif (length != b.length) return false\n\t\t\tfor (i = 0; i < length; i++) {\n\t\t\t\tif (!deepEqual(a[i], b[i])) return false\n\t\t\t}\n\t\t\treturn true\n\t\t}\n\t\tif (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf()\n\t\tif (a.toString !== Object.prototype.toString) return a.toString() === b.toString()\n\t\tconst keys = Object.keys(a)\n\t\tlength = keys.length\n\t\tif (length !== Object.keys(b).length) return false\n\t\tfor (i = length; i-- !== 0;)\n\t\t\tif (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false\n\t\tfor (i = length; i-- !== 0;) {\n\t\t\tconst key = keys[i]\n\t\t\tif (!deepEqual(a[key], b[key])) return false\n\t\t}\n\t\treturn true\n\t}\n\treturn a !== a && b !== b\n}\n","import type { CollectionRegistry, INode, SchemaRegistry } from '@mcschema/core'\nimport { ChoiceNode, DataModel, Reference, StringNode } from '@mcschema/core'\nimport * as java15 from '@mcschema/java-1.15'\nimport * as java16 from '@mcschema/java-1.16'\nimport * as java17 from '@mcschema/java-1.17'\nimport * as java18 from '@mcschema/java-1.18'\nimport config from '../config.json'\nimport { fetchData } from './DataFetcher'\nimport { message } from './Utils'\n\nexport const VersionIds = ['1.15', '1.16', '1.17', '1.18'] as const\nexport type VersionId = typeof VersionIds[number]\n\nexport type BlockStateRegistry = {\n\t[block: string]: {\n\t\tproperties?: {\n\t\t\t[key: string]: string[],\n\t\t},\n\t\tdefault?: {\n\t\t\t[key: string]: string,\n\t\t},\n\t},\n}\n\ntype VersionData = {\n\tcollections: CollectionRegistry,\n\tschemas: SchemaRegistry,\n\tblockStates: BlockStateRegistry,\n}\nconst Versions: Record> = {}\n\ntype ModelData = {\n\tmodel: DataModel,\n\tversion: VersionId,\n}\nconst Models: Record = {}\n\nconst versionGetter: {\n\t[versionId in VersionId]: {\n\t\tgetCollections: () => CollectionRegistry,\n\t\tgetSchemas: (collections: CollectionRegistry) => SchemaRegistry,\n\t}\n} = {\n\t1.15: java15,\n\t1.16: java16,\n\t1.17: java17,\n\t1.18: java18,\n}\n\nexport let CachedDecorator: INode\nexport let CachedFeature: INode\n\nasync function getVersion(id: VersionId): Promise {\n\tif (!Versions[id]) {\n\t\tVersions[id] = (async () => {\n\t\t\ttry {\n\t\t\t\tconst collections = versionGetter[id].getCollections()\n\t\t\t\tconst blockStates: BlockStateRegistry = {}\n\t\t\t\tawait fetchData(id, collections, blockStates)\n\t\t\t\tconst schemas = versionGetter[id].getSchemas(collections)\n\t\t\t\tVersions[id] = { collections, schemas, blockStates }\n\t\t\t\treturn Versions[id]\n\t\t\t} catch (e) {\n\t\t\t\tthrow new Error(`Cannot get version \"${id}\": ${message(e)}`)\n\t\t\t}\n\t\t})()\n\t\treturn Versions[id]\n\t}\n\treturn Versions[id]\n}\n\nexport async function getModel(version: VersionId, id: string): Promise {\n\tif (!Models[id] || Models[id].version !== version) {\n\t\tconst versionData = await getVersion(version)\n\t\t\n\t\tCachedDecorator = Reference(versionData.schemas, 'configured_decorator')\n\t\tCachedFeature = ChoiceNode([\n\t\t\t{\n\t\t\t\ttype: 'string',\n\t\t\t\tnode: StringNode(versionData.collections, { validator: 'resource', params: { pool: '$worldgen/configured_feature' } }),\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'object',\n\t\t\t\tnode: Reference(versionData.schemas, 'configured_feature'),\n\t\t\t},\n\t\t], { choiceContext: 'feature' })\n\n\t\tconst schemaName = config.generators.find(g => g.id === id)?.schema\n\t\tif (!schemaName) {\n\t\t\tthrow new Error(`Cannot find model ${id}`)\n\t\t}\n\t\ttry {\n\t\t\tconst schema = versionData.schemas.get(schemaName)\n\t\t\tconst model = new DataModel(schema, { wrapLists: true })\n\t\t\tif (Models[id]) {\n\t\t\t\tmodel.reset(Models[id].model.data, false)\n\t\t\t} else {\n\t\t\t\tmodel.validate(true)\n\t\t\t\tmodel.history = [JSON.stringify(model.data)]\n\t\t\t}\n\t\t\tModels[id] = { model, version }\n\t\t} catch (e) {\n\t\t\tthrow new Error(`Cannot get generator \"${id}\" for version \"${version}\": ${message(e)}`)\n\t\t}\n\t}\n\treturn Models[id].model\n}\n\nexport async function getCollections(version: VersionId): Promise {\n\tconst versionData = await getVersion(version)\n\treturn versionData.collections\n}\n\nexport async function getBlockStates(version: VersionId): Promise {\n\tconst versionData = await getVersion(version)\n\treturn versionData.blockStates\n}\n\nexport function checkVersion(versionId: string, minVersionId: string | undefined, maxVersionId?: string) {\n\tconst version = config.versions.findIndex(v => v.id === versionId)\n\tconst minVersion = minVersionId ? config.versions.findIndex(v => v.id === minVersionId) : 0\n\tconst maxVersion = maxVersionId ? config.versions.findIndex(v => v.id === maxVersionId) : config.versions.length - 1\n\treturn minVersion <= version && version <= maxVersion\n}\n","import type { CollectionRegistry } from '@mcschema/core'\nimport config from '../config.json'\nimport type { VersionAssets, VersionManifest } from './Manifest'\nimport type { BlockStateRegistry, VersionId } from './Schemas'\nimport { checkVersion } from './Schemas'\nimport { message } from './Utils'\n\n['1.15', '1.16', '1.17'].forEach(v => localStorage.removeItem(`cache_${v}`))\n\nconst CACHE_NAME = 'misode-v1'\n\ntype VersionRef = 'mcdata_master' | 'vanilla_datapack_summary' | 'vanilla_datapack_data'\n\ntype Version = {\n\tid: string,\n\trefs: Partial<{ [key in VersionRef]: string }>,\n\tdynamic?: boolean,\n}\n\ndeclare var __MCDATA_MASTER_HASH__: string\ndeclare var __VANILLA_DATAPACK_SUMMARY_HASH__: string\n\nconst mcdataUrl = 'https://raw.githubusercontent.com/Arcensoth/mcdata'\nconst vanillaDatapackUrl = 'https://raw.githubusercontent.com/SPGoding/vanilla-datapack'\nconst manifestUrl = 'https://launchermeta.mojang.com/mc/game/version_manifest.json'\nconst resourceUrl = 'https://resources.download.minecraft.net/'\nconst corsUrl = 'https://misode-cors-anywhere.herokuapp.com/'\n\nconst refs: {\n\tid: VersionRef,\n\thash: string,\n\turl: string,\n}[] = [\n\t{\n\t\tid: 'mcdata_master',\n\t\thash: __MCDATA_MASTER_HASH__,\n\t\turl: mcdataUrl,\n\t},\n\t{\n\t\tid: 'vanilla_datapack_summary',\n\t\thash: __VANILLA_DATAPACK_SUMMARY_HASH__,\n\t\turl: vanillaDatapackUrl,\n\t},\n]\n\nexport async function fetchData(versionId: string, collectionTarget: CollectionRegistry, blockStateTarget: BlockStateRegistry) {\n\tconst version = config.versions.find(v => v.id === versionId) as Version | undefined\n\tif (!version) {\n\t\tconsole.error(`[fetchData] Unknown version ${version} in ${JSON.stringify(config.versions)}`)\n\t\treturn\n\t}\n\tconsole.debug(`[fetchData] ${JSON.stringify(version)}`)\n\n\tif (version.dynamic) {\n\t\tawait Promise.all(refs\n\t\t\t.filter(r => localStorage.getItem(`cached_${r.id}`) !== r.hash)\n\t\t\t.map(async r => {\n\t\t\t\tconsole.debug(`[deleteMatching] ${r.id} '${localStorage.getItem(`cached_${r.id}`)}' < '${r.hash}' ${r.url}/${version.refs[r.id]}`)\n\t\t\t\tawait deleteMatching(url => url.startsWith(`${r.url}/${version.refs[r.id]}`))\n\t\t\t\tconsole.debug(`[deleteMatching] Done! ${r.id} ${r.hash} '${localStorage.getItem(`cached_${r.id}`)}'`)\n\t\t\t\tlocalStorage.setItem(`cached_${r.id}`, r.hash)\n\t\t\t\tconsole.debug(`[deleteMatching] Set! ${r.id} ${r.hash} '${localStorage.getItem(`cached_${r.id}`)}'`)\n\t\t\t}))\n\t}\n\n\tawait Promise.all([\n\t\tfetchRegistries(version, collectionTarget),\n\t\tfetchBlockStateMap(version, blockStateTarget),\n\t\tfetchDynamicRegistries(version, collectionTarget),\n\t])\n}\n\nasync function fetchRegistries(version: Version, target: CollectionRegistry) {\n\tconsole.debug(`[fetchRegistries] ${version.id}`)\n\tconst registries = config.registries\n\t\t.filter(r => !r.dynamic)\n\t\t.filter(r => checkVersion(version.id, r.minVersion, r.maxVersion))\n\n\tif (checkVersion(version.id, undefined, '1.15')) {\n\t\tconst url = `${mcdataUrl}/${version.refs.mcdata_master}/generated/reports/registries.json`\n\t\ttry {\n\t\t\tconst data = await getData(url, (data) => {\n\t\t\t\tconst res: {[id: string]: string[]} = {}\n\t\t\t\tObject.keys(data).forEach(k => {\n\t\t\t\t\tres[k.slice(10)] = Object.keys(data[k].entries)\n\t\t\t\t})\n\t\t\t\treturn res\n\t\t\t})\n\t\t\tregistries.forEach(r => {\n\t\t\t\ttarget.register(r.id, data[r.id] ?? [])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching registries:', message(e))\n\t\t}\n\t} else {\n\t\tawait Promise.all(registries.map(async r => {\n\t\t\ttry {\n\t\t\t\tconst url = r.path\n\t\t\t\t\t? `${mcdataUrl}/${version.refs.mcdata_master}/${r.path}/data.min.json`\n\t\t\t\t\t: `${mcdataUrl}/${version.refs.mcdata_master}/processed/reports/registries/${r.id}/data.min.json`\n\t\t\t\ttarget.register(r.id, await getData(url, v => v.values))\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(`Error occurred while fetching registry ${r.id}:`, message(e))\n\t\t\t}\n\t\t}))\n\t}\n}\n\nasync function fetchBlockStateMap(version: Version, target: BlockStateRegistry) {\n\tconsole.debug(`[fetchBlockStateMap] ${version.id}`)\n\tif (checkVersion(version.id, undefined, '1.16')) {\n\t\tconst url = (checkVersion(version.id, undefined, '1.15'))\n\t\t\t? `${mcdataUrl}/${version.refs.mcdata_master}/generated/reports/blocks.json`\n\t\t\t: `${mcdataUrl}/${version.refs.mcdata_master}/processed/reports/blocks/data.min.json`\n\n\t\ttry {\n\t\t\tconst data = await getData(url, (data) => {\n\t\t\t\tconst res: BlockStateRegistry = {}\n\t\t\t\tObject.keys(data).forEach(b => {\n\t\t\t\t\tres[b] = {\n\t\t\t\t\t\tproperties: data[b].properties,\n\t\t\t\t\t\tdefault: data[b].states.find((s: any) => s.default).properties,\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\treturn res\n\t\t\t})\n\t\t\tObject.assign(target, data)\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching block state map:', message(e))\n\t\t}\n\t} else {\n\t\tconst url = `${mcdataUrl}/${version.refs.mcdata_master}/processed/reports/blocks/simplified/data.min.json`\n\t\ttry {\n\t\t\tconst data = await getData(url)\n\t\t\tObject.assign(target, data)\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching block state map:', message(e))\n\t\t}\n\t}\n}\n\nasync function fetchDynamicRegistries(version: Version, target: CollectionRegistry) {\n\tconsole.debug(`[fetchDynamicRegistries] ${version.id}`)\n\tconst registries = config.registries\n\t\t.filter(r => r.dynamic)\n\t\t.filter(r => checkVersion(version.id, r.minVersion, r.maxVersion))\n\n\tif (checkVersion(version.id, '1.16')) {\n\t\tconst url = `${vanillaDatapackUrl}/${version.refs.vanilla_datapack_summary}/summary/flattened.min.json`\n\t\ttry {\n\t\t\tconst data = await getData(url)\n\t\t\tregistries.forEach(r => {\n\t\t\t\ttarget.register(r.id, data[r.id])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching dynamic registries:', message(e))\n\t\t}\n\t}\n}\n\nexport async function fetchPreset(version: VersionId, registry: string, id: string) {\n\tconsole.debug(`[fetchPreset] ${registry} ${id}`)\n\tconst versionData = config.versions.find(v => v.id === version)!\n\ttry {\n\t\tconst url = `${vanillaDatapackUrl}/${versionData.refs.vanilla_datapack_data}/data/minecraft/${registry}/${id}.json`\n\t\tconst res = await fetch(url)\n\t\treturn await res.json()\n\t} catch (e) {\n\t\tconsole.warn(`Error occurred while fetching ${registry} preset ${id}:`, message(e))\n\t}\n}\n\nexport async function fetchManifest() {\n\ttry {\n\t\tconst res = await fetch(manifestUrl)\n\t\treturn await res.json()\n\t} catch (e) {\n\t\tthrow new Error(`Error occurred while fetching version manifest: ${message(e)}`)\n\t}\n}\n\nexport async function fetchAssets(versionId: VersionId, manifest: VersionManifest) {\n\tconst version = config.versions.find(v => v.id === versionId)\n\tconst id = version?.latest ?? manifest.latest.snapshot\n\ttry {\n\t\tconst versionMeta = await getData(manifest.versions.find(v => v.id === id)!.url)\n\t\n\t\treturn (await getData(versionMeta.assetIndex.url)).objects\n\t} catch (e) {\n\t\tthrow new Error(`Error occurred while fetching assets for ${version}: ${message(e)}`)\n\t}\n}\n\nexport async function fetchSounds(version: VersionId, assets: VersionAssets) {\n\ttry {\n\t\tconst hash = assets['minecraft/sounds.json'].hash\n\t\treturn await getData(getResourceUrl(hash))\n\t} catch (e) {\n\t\tthrow new Error(`Error occurred while fetching sounds for ${version}: ${message(e)}`)\n\t}\n}\n\nexport function getResourceUrl(hash: string) {\n\treturn `${corsUrl}${resourceUrl}${hash.slice(0, 2)}/${hash}`\n}\n\nasync function getData(url: string, fn: (v: any) => T = (v: any) => v): Promise {\n\ttry {\n\t\tconst cache = await caches.open(CACHE_NAME)\n\t\tconsole.debug(`[getData] Opened cache ${CACHE_NAME} ${url}`)\n\t\tconst cacheResponse = await cache.match(url)\n \n\t\tif (cacheResponse && cacheResponse.ok) {\n\t\t\tconsole.debug(`[getData] Retrieving cached data ${url}`)\n\t\t\treturn await cacheResponse.json()\n\t\t}\n \n\t\tconsole.debug(`[getData] fetching data ${url}`)\n\t\tconst fetchResponse = await fetch(url)\n\t\tconst responseData = fn(await fetchResponse.json())\n\t\tawait cache.put(url, new Response(JSON.stringify(responseData)))\n\t\treturn responseData\n\t} catch (e) {\n\t\tconsole.warn(`[getData] Failed to open cache ${CACHE_NAME}: ${message(e)}`)\n\n\t\tconsole.debug(`[getData] fetching data ${url}`)\n\t\tconst fetchResponse = await fetch(url)\n\t\tconst responseData = fn(await fetchResponse.json())\n\t\treturn responseData\n\t}\n}\n\nasync function deleteMatching(matches: (url: string) => boolean) {\n\ttry {\n\t\tconst cache = await caches.open(CACHE_NAME)\n\t\tconsole.debug(`[deleteMatching] Opened cache ${CACHE_NAME}`)\n\t\tconst promises: Promise[] = []\n \n\t\tfor (const request of await cache.keys()) {\n\t\t\tif (matches(request.url)) {\n\t\t\t\tpromises.push(cache.delete(request))\n\t\t\t}\n\t\t}\n\t\tconsole.debug(`[deleteMatching] Removing ${promises.length} cache objects...`)\n\t\tawait Promise.all(promises)\n\t} catch (e) {\n\t\tconsole.warn(`[deleteMatching] Failed to open cache ${CACHE_NAME}: ${message(e)}`)\n\t}\n}\n","import { DataModel } from '@mcschema/core'\nimport type { BiomeSource, Climate, NoiseOctaves } from 'deepslate'\nimport { FixedBiome, MultiNoise, NoiseGeneratorSettings, NoiseSampler, NormalNoise, Random } from 'deepslate'\nimport { fetchPreset } from '../DataFetcher'\nimport type { VersionId } from '../Schemas'\nimport { clamp, deepClone, deepEqual, square, stringToColor } from '../Utils'\n\ntype BiomeColors = Record\ntype BiomeSourceOptions = {\n\toctaves: NoiseOctaves,\n\tbiomeColors: BiomeColors,\n\toffset: [number, number],\n\tscale: number,\n\tres: number,\n\tseed: bigint,\n\tversion: VersionId,\n}\n\nlet cacheState: any\nlet biomeSourceCache: BiomeSource\nlet climateSamplerCache: Climate.Sampler\n\nexport async function biomeMap(state: any, img: ImageData, options: BiomeSourceOptions) {\n\tconst { biomeSource, climateSampler } = await getCached(state, options)\n\n\tconst data = img.data\n\tconst ox = -options.offset[0] - 100 + options.res / 2\n\tconst oz = -options.offset[1] - 100 + options.res / 2\n\tconst row = img.width * 4 / options.res\n\tconst col = 4 / options.res\n\tfor (let x = 0; x < 200; x += options.res) {\n\t\tfor (let z = 0; z < 200; z += options.res) {\n\t\t\tconst i = z * row + x * col\n\t\t\tconst worldX = (x + ox) * options.scale\n\t\t\tconst worldZ = (z + oz) * options.scale\n\t\t\tconst b = biomeSource.getBiome(worldX, 64, worldZ, climateSampler)\n\t\t\tconst color = getBiomeColor(b, options.biomeColors)\n\t\t\tdata[i] = color[0]\n\t\t\tdata[i + 1] = color[1]\n\t\t\tdata[i + 2] = color[2]\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nexport async function getBiome(state: any, x: number, z: number, options: BiomeSourceOptions): Promise {\n\tconst { biomeSource, climateSampler } = await getCached(state, options)\n\n\tconst [xx, zz] = toWorld([x, z], options)\n\treturn biomeSource.getBiome(xx, 64, zz, climateSampler)\n}\n\nasync function getCached(state: any, options: BiomeSourceOptions): Promise<{ biomeSource: BiomeSource, climateSampler: Climate.Sampler }> {\n\tconst newState = [state, options.octaves, `${options.seed}`, options.version]\n\tif (!deepEqual(newState, cacheState)) {\n\t\tcacheState = deepClone(newState)\n\n\t\tbiomeSourceCache = await getBiomeSource(state, options)\n\n\t\tconst settings = NoiseGeneratorSettings.fromJson({ octaves: options.octaves })\n\t\tconst noiseSampler = new NoiseSampler(4, 4, 32, biomeSourceCache, settings.noise, options.octaves, options.seed)\n\t\tclimateSamplerCache = noiseSampler.getClimate.bind(noiseSampler)\n\t}\n\treturn {\n\t\tbiomeSource: biomeSourceCache,\n\t\tclimateSampler: climateSamplerCache,\n\t} \n}\n\nasync function getBiomeSource(state: any, options: BiomeSourceOptions): Promise {\n\tswitch (state?.type?.replace(/^minecraft:/, '')) {\n\t\tcase 'fixed':\n\t\t\treturn new FixedBiome(state.biome as string)\n\n\t\tcase 'checkerboard':\n\t\t\tconst shift = (state.scale ?? 2) + 2\n\t\t\tconst numBiomes = state.biomes?.length ?? 0\n\t\t\treturn {\n\t\t\t\tgetBiome(x: number, _y: number, z: number) {\n\t\t\t\t\tconst i = (((x >> shift) + (z >> shift)) % numBiomes + numBiomes) % numBiomes\n\t\t\t\t\treturn (state.biomes?.[i].node as string)\n\t\t\t\t},\n\t\t\t}\n\n\t\tcase 'multi_noise':\n\t\t\tswitch(state.preset?.replace(/^minecraft:/, '')) {\n\t\t\t\tcase 'nether':\n\t\t\t\t\tstate = options.version === '1.18' ? NetherPreset18 : NetherPreset\n\t\t\t\t\tbreak\n\t\t\t\tcase 'overworld':\n\t\t\t\t\tstate = options.version === '1.18' ? await OverworldPreset18() : state\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t\tstate = DataModel.unwrapLists(state)\n\t\t\tif (options.version === '1.18') {\n\t\t\t\treturn MultiNoise.fromJson(state)\n\t\t\t} else {\n\t\t\t\tconst noise = ['altitude', 'temperature', 'humidity', 'weirdness']\n\t\t\t\t\t.map((id, i) => {\n\t\t\t\t\t\tconst config = state[`${id}_noise`]\n\t\t\t\t\t\tconfig.firstOctave = clamp(config.firstOctave ?? -7, -100, -1)\n\t\t\t\t\t\treturn new NormalNoise(new Random(options.seed + BigInt(i)), config)\n\t\t\t\t\t})\n\t\t\t\tif (!Array.isArray(state.biomes) || state.biomes.length === 0) {\n\t\t\t\t\treturn new FixedBiome('unknown')\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tgetBiome(x: number, _y: number, z: number): string {\n\t\t\t\t\t\tconst n = noise.map(n => n.sample(x, z, 0))\n\t\t\t\t\t\tlet minDist = Infinity\n\t\t\t\t\t\tlet minBiome = ''\n\t\t\t\t\t\tfor (const { biome, parameters: p } of state.biomes) {\n\t\t\t\t\t\t\tconst dist = square(p.altitude - n[0]) + square(p.temperature - n[1]) + square(p.humidity - n[2]) + square(p.weirdness - n[3]) + square(p.offset)\n\t\t\t\t\t\t\tif (dist < minDist) {\n\t\t\t\t\t\t\t\tminDist = dist\n\t\t\t\t\t\t\t\tminBiome = biome\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn minBiome\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t}\n\t}\n\tthrow new Error('Unknown biome source')\n}\n\nfunction getBiomeColor(biome: string, biomeColors: BiomeColors) {\n\tif (!biome) {\n\t\treturn [128, 128, 128]\n\t}\n\tconst color = biomeColors[biome] ?? VanillaColors[biome]\n\tif (color === undefined) {\n\t\treturn stringToColor(biome)\n\t}\n\treturn color\n}\n\nfunction toWorld([x, z]: [number, number], options: BiomeSourceOptions) {\n\tconst xx = (x - options.offset[0] - 100 + options.res / 2) * options.scale\n\tconst zz = (z - options.offset[1] - 100 + options.res / 2) * options.scale\n\treturn [xx, zz]\n}\n\nconst VanillaColors: Record = {\n\t'minecraft:badlands': [217,69,21],\n\t'minecraft:badlands_plateau': [202,140,101],\n\t'minecraft:bamboo_jungle': [118,142,20],\n\t'minecraft:bamboo_jungle_hills': [59,71,10],\n\t'minecraft:basalt_deltas': [64,54,54],\n\t'minecraft:beach': [250,222,85],\n\t'minecraft:birch_forest': [48,116,68],\n\t'minecraft:birch_forest_hills': [31,95,50],\n\t'minecraft:cold_ocean': [32,32,112],\n\t'minecraft:crimson_forest': [221,8,8],\n\t'minecraft:dark_forest': [64,81,26],\n\t'minecraft:dark_forest_hills': [104,121,66],\n\t'minecraft:deep_cold_ocean': [32,32,56],\n\t'minecraft:deep_frozen_ocean': [64,64,144],\n\t'minecraft:deep_lukewarm_ocean': [0,0,64],\n\t'minecraft:deep_ocean': [0,0,48],\n\t'minecraft:deep_warm_ocean': [0,0,80],\n\t'minecraft:desert': [250,148,24],\n\t'minecraft:desert_hills': [210,95,18],\n\t'minecraft:desert_lakes': [255,188,64],\n\t'minecraft:end_barrens': [128,128,255],\n\t'minecraft:end_highlands': [128,128,255],\n\t'minecraft:end_midlands': [128,128,255],\n\t'minecraft:eroded_badlands': [255,109,61],\n\t'minecraft:flower_forest': [45,142,73],\n\t'minecraft:forest': [5,102,33],\n\t'minecraft:frozen_ocean': [112,112,214],\n\t'minecraft:frozen_river': [160,160,255],\n\t'minecraft:giant_spruce_taiga': [129,142,121],\n\t'minecraft:giant_spruce_taiga_hills': [109,119,102],\n\t'minecraft:giant_tree_taiga': [89,102,81],\n\t'minecraft:giant_tree_taiga_hills': [69,79,62],\n\t'minecraft:gravelly_mountains': [136,136,136],\n\t'minecraft:ice_spikes': [180,220,220],\n\t'minecraft:jungle': [83,123,9],\n\t'minecraft:jungle_edge': [98,139,23],\n\t'minecraft:jungle_hills': [44,66,5],\n\t'minecraft:lukewarm_ocean': [0,0,144],\n\t'minecraft:modified_badlands_plateau': [242,180,141],\n\t'minecraft:modified_gravelly_mountains': [120,152,120],\n\t'minecraft:modified_jungle': [123,163,49],\n\t'minecraft:modified_jungle_edge': [138,179,63],\n\t'minecraft:modified_wooded_badlands_plateau': [216,191,141],\n\t'minecraft:mountain_edge': [114,120,154],\n\t'minecraft:mountains': [96,96,96],\n\t'minecraft:mushroom_field_shore': [160,0,255],\n\t'minecraft:mushroom_fields': [255,0,255],\n\t'minecraft:nether_wastes': [191,59,59],\n\t'minecraft:ocean': [0,0,112],\n\t'minecraft:plains': [141,179,96],\n\t'minecraft:river': [0,0,255],\n\t'minecraft:savanna': [189,178,95],\n\t'minecraft:savanna_plateau': [167,157,100],\n\t'minecraft:shattered_savanna': [229,218,135],\n\t'minecraft:shattered_savanna_plateau': [207,197,140],\n\t'minecraft:small_end_islands': [128,128,255],\n\t'minecraft:snowy_beach': [250,240,192],\n\t'minecraft:snowy_mountains': [160,160,160],\n\t'minecraft:snowy_taiga': [49,85,74],\n\t'minecraft:snowy_taiga_hills': [36,63,54],\n\t'minecraft:snowy_taiga_mountains': [89,125,114],\n\t'minecraft:snowy_tundra': [255,255,255],\n\t'minecraft:soul_sand_valley': [94,56,48],\n\t'minecraft:stone_shore': [162,162,132],\n\t'minecraft:sunflower_plains': [181,219,136],\n\t'minecraft:swamp': [7,249,178],\n\t'minecraft:swamp_hills': [47,255,218],\n\t'minecraft:taiga': [11,102,89],\n\t'minecraft:taiga_hills': [22,57,51],\n\t'minecraft:taiga_mountains': [51,142,129],\n\t'minecraft:tall_birch_forest': [88,156,108],\n\t'minecraft:tall_birch_hills': [71,135,90],\n\t'minecraft:the_end': [128,128,255],\n\t'minecraft:the_void': [0,0,0],\n\t'minecraft:warm_ocean': [0,0,172],\n\t'minecraft:warped_forest': [73,144,123],\n\t'minecraft:wooded_badlands_plateau': [176,151,101],\n\t'minecraft:wooded_hills': [34,85,28],\n\t'minecraft:wooded_mountains': [80,112,80],\n\t'minecraft:snowy_slopes': [140, 195, 222],\n\t'minecraft:lofty_peaks': [196, 168, 193],\n\t'minecraft:snowcapped_peaks': [200, 198, 200],\n\t'minecraft:stony_peaks': [82, 92, 103],\n\t'minecraft:grove': [150, 150, 189],\n\t'minecraft:meadow': [169, 197, 80],\n\t'minecraft:lush_caves': [112, 255, 79],\n\t'minecraft:dripstone_caves': [140, 124, 0],\n}\n\nconst NetherPreset = {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:-0.5,weirdness:0,offset:0}},{biome:'minecraft:crimson_forest',parameters:{altitude:0,temperature:0.4,humidity:0,weirdness:0,offset:0}},{biome:'minecraft:warped_forest',parameters:{altitude:0,temperature:0,humidity:0.5,weirdness:0,offset:0.375}},{biome:'minecraft:basalt_deltas',parameters:{altitude:0,temperature:-0.5,humidity:0,weirdness:0,offset:0.175}}]}\n\nconst NetherPreset18 = {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:-0.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:'minecraft:crimson_forest',parameters:{temperature:0.4,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:'minecraft:warped_forest',parameters:{temperature:0,humidity:0.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0.375}},{biome:'minecraft:basalt_deltas',parameters:{temperature:-0.5,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0.175}}]}\n\nasync function OverworldPreset18() {\n\tconst overworld = await fetchPreset('1.18', 'dimension', 'overworld')\n\treturn overworld.generator.biome_source\n}\n","import { DataModel } from '@mcschema/core'\nimport { PerlinNoise, Random } from 'deepslate'\nimport type { VersionId } from '../Schemas'\nimport { clamp, stringToColor } from '../Utils'\n\ntype BlockPos = [number, number, number]\ntype Placement = [BlockPos, number]\n\ntype PlacementContext = {\n\tplacements: Placement[],\n\tfeatures: string[],\n\trandom: Random,\n\tbiomeInfoNoise: PerlinNoise,\n\tseaLevel: number,\n\tversion: VersionId,\n\tnextFloat(): number,\n\tnextInt(max: number): number,\n\tsampleInt(provider: any): number,\n}\n\nconst terrain = [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] \n\nconst featureColors = [\n\t[255, 77, 54], // red\n\t[59, 118, 255], // blue\n\t[91, 207, 25], // green\n\t[217, 32, 245], // magenta\n\t[255, 209, 41], // yellow\n\t[52, 204, 209], // cyan\n]\n\nexport type DecoratorOptions = {\n\tsize: [number, number, number],\n\tseed: bigint,\n\tversion: VersionId,\n}\nexport function decorator(state: any, img: ImageData, options: DecoratorOptions) {\n\tconst random = new Random(options.seed)\n\tconst ctx: PlacementContext = {\n\t\tplacements: [],\n\t\tfeatures: [],\n\t\trandom,\n\t\tbiomeInfoNoise: new PerlinNoise(random.fork(), 0, [1]),\n\t\tseaLevel: 63,\n\t\tversion: options.version,\n\t\tnextFloat: () => random.nextFloat(),\n\t\tnextInt: (max: number) => random.nextInt(max),\n\t\tsampleInt(value) { return sampleInt(value, this) },\n\t}\n\n\tfor (let x = 0; x < options.size[0] / 16; x += 1) {\n\t\tfor (let z = 0; z < options.size[2] / 16; z += 1) {\n\t\t\tgetPlacements([x * 16, 0, z * 16], DataModel.unwrapLists(state), ctx)\n\t\t}\n\t}\n\n\tconst data = img.data\n\timg.data.fill(255)\n\n\tfor (const [pos, feature] of ctx.placements) {\n\t\tif (pos[0] < 0 || pos[1] < 0 || pos[2] < 0 || pos[0] >= options.size[0] || pos[1] >= options.size[1] || pos[2] >= options.size[2]) continue\n\t\tconst i = (pos[2] * (img.width * 4)) + (pos[0] * 4)\n\t\tconst color = feature < featureColors.length ? featureColors[feature] : stringToColor(ctx.features[feature])\n\t\tdata[i] = clamp(50, 205, color[0])\n\t\tdata[i + 1] = clamp(50, 205, color[1])\n\t\tdata[i + 2] = clamp(50, 205, color[2])\n\t\tdata[i + 3] = 255\n\t}\n\n\tfor (let x = 0; x < options.size[0]; x += 1) {\n\t\tfor (let y = 0; y < options.size[2]; y += 1) {\n\t\t\tif ((Math.floor(x / 16) + Math.floor(y / 16)) % 2 === 0) continue\n\t\t\tconst i = (y * (img.width * 4)) + (x * 4)\n\t\t\tfor (let j = 0; j < 3; j += 1) {\n\t\t\t\tdata[i + j] = 0.85 * data[i + j] \n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction normalize(id: string) {\n\treturn id.startsWith('minecraft:') ? id.slice(10) : id\n}\n\nfunction decorateY(pos: BlockPos, y: number): BlockPos[] {\n\treturn [[ pos[0], y, pos[2] ]]\n}\n\nfunction sampleInt(value: any, ctx: PlacementContext): number {\n\tif (typeof value === 'number') {\n\t\treturn value\n\t} else if (value.base) {\n\t\treturn value.base ?? 1 + ctx.nextInt(1 + (value.spread ?? 0))\n\t} else {\n\t\tswitch (normalize(value.type)) {\n\t\t\tcase 'constant': return value.value\n\t\t\tcase 'uniform': return value.value.min_inclusive + ctx.nextInt(value.value.max_inclusive - value.value.min_inclusive + 1)\n\t\t\tcase 'biased_to_bottom': return value.value.min_inclusive + ctx.nextInt(ctx.nextInt(value.value.max_inclusive - value.value.min_inclusive + 1) + 1)\n\t\t\tcase 'clamped': return Math.max(value.value.min_inclusive, Math.min(value.value.max_inclusive, sampleInt(value.value.source, ctx)))\n\t\t}\n\t\treturn 1\n\t}\n}\n\nfunction useFeature(s: string, ctx: PlacementContext) {\n\tconst i = ctx.features.indexOf(s)\n\tif (i != -1) return i\n\tctx.features.push(s)\n\treturn ctx.features.length - 1\n}\n\nfunction getPlacements(pos: BlockPos, feature: any, ctx: PlacementContext): void {\n\tif (typeof feature === 'string') {\n\t\tctx.placements.push([pos, useFeature(feature, ctx)])\n\t\treturn\n\t}\n\tconst type = normalize(feature?.type ?? 'no_op')\n\tconst featureFn = Features[type]\n\tif (featureFn) {\n\t\tfeatureFn(feature.config, pos, ctx)\n\t} else {\n\t\tctx.placements.push([pos, useFeature(JSON.stringify(feature), ctx)])\n\t}\n}\n\nfunction getPositions(pos: BlockPos, decorator: any, ctx: PlacementContext): BlockPos[] {\n\tconst type = normalize(decorator?.type ?? 'nope')\n\tconst decoratorFn = Decorators[type]\n\tif (!decoratorFn) {\n\t\treturn [pos]\n\t}\n\treturn decoratorFn(decorator?.config, pos, ctx)\n}\n\nconst Features: {\n\t[key: string]: (config: any, pos: BlockPos, ctx: PlacementContext) => void,\n} = {\n\tdecorated: (config, pos, ctx) => {\n\t\tconst positions = getPositions(pos, config?.decorator, ctx)\n\t\tpositions.forEach(p => getPlacements(p, config?.feature, ctx))\n\t},\n\trandom_boolean_selector: (config, pos, ctx) => {\n\t\tconst feature = ctx.nextFloat() < 0.5 ? config?.feature_true : config?.feature_false\n\t\tgetPlacements(pos, feature, ctx)\n\t},\n\trandom_selector: (config, pos, ctx) => {\n\t\tfor (const f of config?.features ?? []) {\n\t\t\tif (ctx.nextFloat() < (f?.chance ?? 0)) {\n\t\t\t\tgetPlacements(pos, f.feature, ctx)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tgetPlacements(pos, config?.default, ctx)\n\t},\n\tsimple_random_selector: (config, pos, ctx) => {\n\t\tconst feature = config?.features?.[ctx.nextInt(config?.features?.length ?? 0)]\n\t\tgetPlacements(pos, feature, ctx)\n\t},\n}\n\nconst Decorators: {\n\t[key: string]: (config: any, pos: BlockPos, ctx: PlacementContext) => BlockPos[],\n} = {\n\tchance: (config, pos, ctx) => {\n\t\treturn ctx.nextFloat() < 1 / (config?.chance ?? 1) ? [pos] : []\n\t},\n\tcount: (config, pos, ctx) => {\n\t\treturn new Array(ctx.sampleInt(config?.count ?? 1)).fill(pos)\n\t},\n\tcount_extra: (config, pos, ctx) => {\n\t\tlet count = config?.count ?? 1\n\t\tif (ctx.nextFloat() < config.extra_chance ?? 0){\n\t\t\tcount += config.extra_count ?? 0\n\t\t}\n\t\treturn new Array(count).fill(pos)\n\t},\n\tcount_multilayer: (config, pos, ctx) => {\n\t\treturn new Array(ctx.sampleInt(config?.count ?? 1)).fill(pos)\n\t\t\t.map(p => [\n\t\t\t\tp[0] + ctx.nextInt(16),\n\t\t\t\tp[1], \n\t\t\t\tp[2] + ctx.nextInt(16),\n\t\t\t])\n\t},\n\tcount_noise: (config, pos, ctx) => {\n\t\tconst noise = ctx.biomeInfoNoise.sample(pos[0] / 200, 0, pos[2] / 200)\n\t\tconst count = noise < config.noise_level ? config.below_noise : config.above_noise\n\t\treturn new Array(count).fill(pos)\n\t},\n\tcount_noise_biased: (config, pos, ctx) => {\n\t\tconst factor = Math.max(1, config.noise_factor)\n\t\tconst noise = ctx.biomeInfoNoise.sample(pos[0] / factor, 0, pos[2] / factor)\n\t\tconst count = Math.max(0, Math.ceil((noise + (config.noise_offset ?? 0)) * config.noise_to_count_ratio))\n\t\treturn new Array(count).fill(pos)\n\t},\n\tdark_oak_tree: (_config, pos, ctx) => {\n\t\treturn [...new Array(16)].map((_, i) => {\n\t\t\tconst x = Math.floor(i / 4) * 4 + 1 + ctx.nextInt(3) + pos[0]\n\t\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, x)])\n\t\t\tconst z = Math.floor(i % 4) * 4 + 1 + ctx.nextInt(3) + pos[2]\n\t\t\treturn [x, y, z]\n\t\t})\n\t},\n\tdecorated: (config, pos, ctx) => {\n\t\treturn getPositions(pos, config?.outer, ctx).flatMap(p => {\n\t\t\treturn getPositions(p, config?.inner, ctx)\n\t\t})\n\t},\n\tdepth_average: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(config?.spread ?? 0) + ctx.nextInt(config?.spread ?? 0) - (config.spread ?? 0) + (config?.baseline ?? 0)\n\t\treturn decorateY(pos, y)\n\t},\n\temerald_ore: (_config, pos, ctx) => {\n\t\tconst count = 3 + ctx.nextInt(6)\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\t4 + ctx.nextInt(28),\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t])\n\t},\n\tfire: (config, pos, ctx) => {\n\t\tconst count = 1 + ctx.nextInt(ctx.nextInt(ctx.sampleInt(config?.count)))\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\tctx.nextInt(128),\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t])\n\t},\n\tglowstone: (config, pos, ctx) => {\n\t\tconst count = ctx.nextInt(1 + ctx.nextInt(ctx.sampleInt(config?.count)))\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\tctx.nextInt(128),\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t])\n\t},\n\theightmap: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, y)\n\t},\n\theightmap_spread_double: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, ctx.nextInt(y * 2))\n\t},\n\theightmap_world_surface: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, y)\n\t},\n\ticeberg: (_config, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + 4 + ctx.nextInt(8),\n\t\t\tpos[1],\n\t\t\tpos[2] + 4 + ctx.nextInt(8),\n\t\t]]\n\t},\n\tlava_lake: (config, pos, ctx) => {\n\t\tif (ctx.nextInt((config.chance ?? 1) / 10) === 0) {\n\t\t\tconst y = ctx.nextInt(ctx.nextInt(256 - 8) + 8)\n\t\t\tif (y < ctx.seaLevel || ctx.nextInt((config?.chance ?? 1) / 8) == 0) {\n\t\t\t\tconst x = ctx.nextInt(16) + pos[0]\n\t\t\t\tconst z = ctx.nextInt(16) + pos[2]\n\t\t\t\treturn [[x, y, z]]\n\t\t\t}\n\t\t}\n\t\treturn []\n\t},\n\tnope: (_config, pos) => {\n\t\treturn [pos]\n\t},\n\trange: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0)) + (config?.bottom_offset ?? 0)\n\t\treturn decorateY(pos, y)\n\t},\n\trange_biased: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(ctx.nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0)) + (config?.bottom_offset ?? 0))\n\t\treturn decorateY(pos, y)\n\t},\n\trange_very_biased: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(ctx.nextInt(ctx.nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0)) + (config?.bottom_offset ?? 0)) + (config?.bottom_offset ?? 0))\n\t\treturn decorateY(pos, y)\n\t},\n\tspread_32_above: (_config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(pos[1] + 32)\n\t\treturn decorateY(pos, y)\n\t},\n\ttop_solid_heightmap: (_config, pos) => {\n\t\tconst y = terrain[clamp(0, 63, pos[0])]\n\t\treturn decorateY(pos, y)\n\t},\n\tmagma: (_config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(pos[1] + 32)\n\t\treturn decorateY(pos, y)\n\t},\n\tsquare: (_config, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\tpos[1],\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t]]\n\t},\n\tsurface_relative_threshold: (config, pos) => {\n\t\tconst height = terrain[clamp(0, 63, pos[0])]\n\t\tconst min = height + (config?.min_inclusive ?? -Infinity)\n\t\tconst max = height + (config?.max_inclusive ?? Infinity)\n\t\treturn (pos[1] < min || pos[1] > max) ? [pos] : []\n\t},\n\twater_lake: (config, pos, ctx) => {\n\t\tif (ctx.nextInt(config.chance ?? 1) === 0) {\n\t\t\treturn [[\n\t\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\t\tctx.nextInt(256),\n\t\t\t\tpos[2] + ctx.nextInt(16),\n\t\t\t]]\n\t\t}\n\t\treturn []\n\t},\n}\n","import { PerlinNoise, Random } from 'deepslate'\nimport { clampedLerp, lerp2 } from '../../Utils'\n\nexport class NoiseChunkGenerator {\n\tprivate readonly minLimitPerlinNoise: PerlinNoise\n\tprivate readonly maxLimitPerlinNoise: PerlinNoise\n\tprivate readonly mainPerlinNoise: PerlinNoise\n\tprivate readonly depthNoise: PerlinNoise\n\n\tprivate settings: any = {}\n\tprivate chunkWidth: number = 4\n\tprivate chunkHeight: number = 4\n\tprivate chunkCountY: number = 32\n\tprivate biomeDepth: number = 0.1\n\tprivate biomeScale: number = 0.2\n\n\tprivate noiseColumnCache: (number[] | null)[] = []\n\tprivate xOffset: number = 0\n\n\tconstructor(seed: bigint) {\n\t\tconst random = new Random(seed)\n\t\tthis.minLimitPerlinNoise = new PerlinNoise(random, -15, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n\t\tthis.maxLimitPerlinNoise = new PerlinNoise(random, -15, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n\t\tthis.mainPerlinNoise = new PerlinNoise(random, -7, [1, 1, 1, 1, 1, 1, 1, 1])\n\t\tthis.depthNoise = new PerlinNoise(random, -15, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n\t}\n\n\tpublic reset(settings: any, depth: number, scale: number, xOffset: number, width: number) {\n\t\tthis.settings = settings\n\t\tthis.chunkWidth = settings.size_horizontal * 4\n\t\tthis.chunkHeight = settings.size_vertical * 4\n\t\tthis.chunkCountY = Math.floor(settings.height / this.chunkHeight)\n\n\t\tif (settings.amplified && depth > 0) {\n\t\t\tdepth = 1 + depth * 2\n\t\t\tscale = 1 + scale * 4\n\t\t}\n\t\tthis.biomeDepth = 0.265625 * (depth * 0.5 - 0.125)\n\t\tthis.biomeScale = 96.0 / (scale * 0.9 + 0.1)\n\n\t\tthis.noiseColumnCache = Array(width).fill(null)\n\t\tthis.xOffset = xOffset\n\t}\n \n\tpublic iterateNoiseColumn(x: number): number[] {\n\t\tconst data = Array(this.chunkCountY * this.chunkHeight)\n\t\tconst cx = Math.floor(x / this.chunkWidth)\n\t\tconst ox = Math.floor(x % this.chunkWidth) / this.chunkWidth\n\t\tconst noise1 = this.fillNoiseColumn(cx)\n\t\tconst noise2 = this.fillNoiseColumn(cx + 1)\n\n\t\tfor (let y = this.chunkCountY - 1; y >= 0; y -= 1) {\n\t\t\tfor (let yy = this.chunkHeight; yy >= 0; yy -= 1) {\n\t\t\t\tconst oy = yy / this.chunkHeight\n\t\t\t\tconst i = y * this.chunkHeight + yy\n\t\t\t\tdata[i] = lerp2(oy, ox, noise1[y], noise1[y+1], noise2[y], noise2[y+1])\n\t\t\t}\n\t\t}\n\t\treturn data\n\t}\n\n\tprivate fillNoiseColumn(x: number): number[] {\n\t\tconst cachedColumn = this.noiseColumnCache[x - this.xOffset]\n\t\tif (cachedColumn) return cachedColumn\n\n\t\tconst data = Array(this.chunkCountY + 1)\n\n\t\tconst xzScale = 684.412 * this.settings.sampling.xz_scale\n\t\tconst yScale = 684.412 * this.settings.sampling.y_scale\n\t\tconst xzFactor = xzScale / this.settings.sampling.xz_factor\n\t\tconst yFactor = yScale / this.settings.sampling.y_factor\n\t\tconst randomDensity = this.settings.random_density_offset ? this.getRandomDensity(x) : 0\n\n\t\tfor (let y = 0; y <= this.chunkCountY; y += 1) {\n\t\t\tlet noise = this.sampleAndClampNoise(x, y, this.mainPerlinNoise.getOctaveNoise(0)!.zo, xzScale, yScale, xzFactor, yFactor)\n\t\t\tconst yOffset = 1 - y * 2 / this.chunkCountY + randomDensity\n\t\t\tconst density = yOffset * this.settings.density_factor + this.settings.density_offset\n\t\t\tconst falloff = (density + this.biomeDepth) * this.biomeScale\n\t\t\tnoise += falloff * (falloff > 0 ? 4 : 1)\n\n\t\t\tif (this.settings.top_slide.size > 0) {\n\t\t\t\tnoise = clampedLerp(\n\t\t\t\t\tthis.settings.top_slide.target,\n\t\t\t\t\tnoise,\n\t\t\t\t\t(this.chunkCountY - y - (this.settings.top_slide.offset)) / (this.settings.top_slide.size)\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tif (this.settings.bottom_slide.size > 0) {\n\t\t\t\tnoise = clampedLerp(\n\t\t\t\t\tthis.settings.bottom_slide.target,\n\t\t\t\t\tnoise,\n\t\t\t\t\t(y - (this.settings.bottom_slide.offset)) / (this.settings.bottom_slide.size)\n\t\t\t\t)\n\t\t\t}\n\t\t\tdata[y] = noise\n\t\t}\n\n\t\tthis.noiseColumnCache[x - this.xOffset] = data\n\t\treturn data\n\t}\n\n\tprivate getRandomDensity(x: number): number {\n\t\tconst noise = this.depthNoise.sample(x * 200, 10, this.depthNoise.getOctaveNoise(0)!.zo, 1, 0, true)\n\t\tconst a = (noise < 0) ? -noise * 0.3 : noise\n\t\tconst b = a * 24.575625 - 2\n\t\treturn (b < 0) ? b * 0.009486607142857142 : Math.min(b, 1) * 0.006640625\n\t}\n\n\tprivate sampleAndClampNoise(x: number, y: number, z: number, xzScale: number, yScale: number, xzFactor: number, yFactor: number): number {\n\t\tlet a = 0\n\t\tlet b = 0\n\t\tlet c = 0\n\t\tlet d = 1\n\n\t\tfor (let i = 0; i < 16; i += 1) {\n\t\t\tconst x2 = PerlinNoise.wrap(x * xzScale * d)\n\t\t\tconst y2 = PerlinNoise.wrap(y * yScale * d)\n\t\t\tconst z2 = PerlinNoise.wrap(z * xzScale * d)\n\t\t\tconst e = yScale * d\n\n\t\t\tconst minLimitNoise = this.minLimitPerlinNoise.getOctaveNoise(i)\n\t\t\tif (minLimitNoise) {\n\t\t\t\ta += minLimitNoise.sample(x2, y2, z2, e, y * e) / d\n\t\t\t}\n\n\t\t\tconst maxLimitNoise = this.maxLimitPerlinNoise.getOctaveNoise(i)\n\t\t\tif (maxLimitNoise) {\n\t\t\t\tb += maxLimitNoise.sample(x2, y2, z2, e, y * e) / d\n\t\t\t}\n\n\t\t\tif (i < 8) {\n\t\t\t\tconst mainNoise = this.mainPerlinNoise.getOctaveNoise(i)\n\t\t\t\tif (mainNoise) {\n\t\t\t\t\tc += mainNoise.sample(\n\t\t\t\t\t\tPerlinNoise.wrap(x * xzFactor * d),\n\t\t\t\t\t\tPerlinNoise.wrap(y * yFactor * d),\n\t\t\t\t\t\tPerlinNoise.wrap(z * xzFactor * d),\n\t\t\t\t\t\tyFactor * d,\n\t\t\t\t\t\ty * yFactor * d \n\t\t\t\t\t) / d\n\t\t\t\t}\n\t\t\t}\n\n\t\t\td /= 2\n\t\t}\n\n\t\treturn clampedLerp(a / 512, b / 512, (c / 10 + 1) / 2)\n\t}\n}\n","import { DataModel } from '@mcschema/core'\nimport type { BlockPos, BlockState } from 'deepslate'\nimport { Chunk, ChunkPos, FixedBiome, NoiseChunkGenerator, NoiseGeneratorSettings } from 'deepslate'\nimport type { VersionId } from '../Schemas'\nimport { checkVersion } from '../Schemas'\nimport { deepClone, deepEqual } from '../Utils'\nimport { NoiseChunkGenerator as OldNoiseChunkGenerator } from './noise/NoiseChunkGenerator'\n\nexport type NoiseSettingsOptions = {\n\tbiomeFactor: number,\n\tbiomeOffset: number,\n\tbiomePeaks: number,\n\toffset: number,\n\twidth: number,\n\tseed: bigint,\n\tversion: VersionId,\n}\n\nconst Z = 0\n\nconst colors: Record = {\n\t'minecraft:air': [150, 160, 170],\n\t'minecraft:water': [20, 80, 170],\n\t'minecraft:lava': [200, 100, 0],\n\t'minecraft:stone': [50, 50, 50],\n\t'minecraft:netherrack': [100, 40, 40],\n\t'minecraft:end_stone': [200, 200, 140],\n}\n\nlet cacheState: any\nlet generatorCache: NoiseChunkGenerator\nlet chunkCache: Chunk[] = []\n\nexport function noiseSettings(state: any, img: ImageData, options: NoiseSettingsOptions) {\n\tif (checkVersion(options.version, '1.18')) {\n\t\tconst { settings, generator } = getCached(state, options)\n\n\t\tconst slice = new LevelSlice(-options.offset, options.width, settings.noise.minY, settings.noise.height)\n\t\tslice.fill(generator)\n\n\t\tconst data = img.data\n\t\tfor (let x = 0; x < options.width; x += 1) {\n\t\t\tfor (let y = 0; y < settings.noise.height; y += 1) {\n\t\t\t\tconst i = x * 4 + (settings.noise.height-y-1) * 4 * img.width\n\t\t\t\tconst state = slice.getBlockState([x - options.offset, y, Z])\n\t\t\t\tconst color = colors[state.getName()] ?? [0, 0, 0]\n\t\t\t\tdata[i] = color[0]\n\t\t\t\tdata[i + 1] = color[1]\n\t\t\t\tdata[i + 2] = color[2]\n\t\t\t\tdata[i + 3] = 255\n\t\t\t}\n\t\t}\n\t\treturn\n\t}\n\n\tconst generator = new OldNoiseChunkGenerator(options.seed)\n\tgenerator.reset(state.noise, options.biomeOffset, options.biomeFactor, options.offset, 200)\n\tconst data = img.data\n\tconst row = img.width * 4\n\tfor (let x = 0; x < options.width; x += 1) {\n\t\tconst noise = generator.iterateNoiseColumn(x - options.offset).reverse()\n\t\tfor (let y = 0; y < state.noise.height; y += 1) {\n\t\t\tconst i = y * row + x * 4\n\t\t\tconst color = getColor(noise, y)\n\t\t\tdata[i] = color\n\t\t\tdata[i + 1] = color\n\t\t\tdata[i + 2] = color\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nfunction getCached(state: unknown, options: NoiseSettingsOptions) {\n\tconst settings = NoiseGeneratorSettings.fromJson(DataModel.unwrapLists(state))\n\t// Temporary fix for slides\n\tsettings.noise.bottomSlide.target *= 128\n\tsettings.noise.topSlide.target *= 128\n\tconst shape = { factor: options.biomeFactor, offset: options.biomeOffset, peaks: options.biomePeaks, nearWater: false }\n\n\tconst newState = [state, shape, `${options.seed}`]\n\tif (!deepEqual(newState, cacheState)) {\n\t\tcacheState = deepClone(newState)\n\t\tchunkCache = []\n\t\tconst biomeSource = new FixedBiome('unknown')\n\t\tgeneratorCache = new NoiseChunkGenerator(options.seed, biomeSource, settings, shape)\n\t}\n\treturn {\n\t\tsettings,\n\t\tgenerator: generatorCache,\n\t}\n}\n\nfunction getColor(noise: number[], y: number): number {\n\tif (noise[y] > 0) {\n\t\treturn 0\n\t}\n\tif (noise[y+1] > 0) {\n\t\treturn 150\n\t}\n\treturn 255\n}\n\nclass LevelSlice {\n\tprivate readonly chunks: Chunk[]\n\tprivate readonly filled: boolean[]\n\n\tconstructor(\n\t\tprivate readonly minX: number,\n\t\twidth: number,\n\t\tminY: number,\n\t\theight: number,\n\t) {\n\t\tthis.filled = []\n\t\tthis.chunks = [...Array(Math.ceil(width / 16) + 1)]\n\t\t\t.map((_, i) => {\n\t\t\t\tconst x = (minX >> 4) + i\n\t\t\t\tconst cached = chunkCache.find(c => c.pos[0] === x)\n\t\t\t\tif (cached) {\n\t\t\t\t\tthis.filled[i] = true\n\t\t\t\t\treturn cached\n\t\t\t\t}\n\t\t\t\treturn new Chunk(minY, height, ChunkPos.create(x, Z >> 4))\n\t\t\t})\n\t}\n\n\tpublic fill(generator: NoiseChunkGenerator) {\n\t\tthis.chunks.forEach((chunk, i) => {\n\t\t\tif (!this.filled[i]) {\n\t\t\t\tgenerator.fill(chunk)\n\t\t\t\tthis.filled[i] = true\n\t\t\t\tchunkCache.push(chunk)\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic getBlockState(pos: BlockPos): BlockState {\n\t\tconst chunkIndex = (pos[0] >> 4) - (this.minX >> 4)\n\t\treturn this.chunks[chunkIndex].getBlockState(pos)\n\t}\n}\n","import { Path } from '@mcschema/core'\nimport type { NoiseOctaves } from 'deepslate'\nimport { NoiseGeneratorSettings } from 'deepslate'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn } from '..'\nimport { useCanvas } from '../../hooks'\nimport { locale } from '../../Locales'\nimport { biomeMap, getBiome } from '../../previews'\nimport { newSeed } from '../../Utils'\n\nexport const BiomeSourcePreview = ({ model, data, shown, lang, version }: PreviewProps) => {\n\tconst [scale, setScale] = useState(2)\n\tconst [focused, setFocused] = useState(undefined)\n\tconst offset = useRef<[number, number]>([0, 0])\n\tconst res = useRef(1)\n\tconst refineTimeout = useRef(undefined)\n\n\tconst seed = BigInt(model.get(new Path(['generator', 'seed'])))\n\tconst octaves = getOctaves(model.get(new Path(['generator', 'settings'])))\n\tconst state = shown ? calculateState(data, octaves) : ''\n\tconst type: string = data.type?.replace(/^minecraft:/, '')\n\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [200 / res.current, 200 / res.current]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tconst options = { octaves, biomeColors: {}, offset: offset.current, scale, seed, res: res.current, version }\n\t\t\tawait biomeMap(data, img, options)\n\t\t\tif (res.current === 4) {\n\t\t\t\tclearTimeout(refineTimeout.current)\n\t\t\t\trefineTimeout.current = setTimeout(() => {\n\t\t\t\t\tres.current = 1\n\t\t\t\t\tredraw()\n\t\t\t\t}, 150) as any\n\t\t\t}\n\t\t},\n\t\tasync onDrag(dx, dy) {\n\t\t\toffset.current[0] = offset.current[0] + dx * 200\n\t\t\toffset.current[1] = offset.current[1] + dy * 200\n\t\t\tclearTimeout(refineTimeout.current)\n\t\t\tres.current = type === 'multi_noise' ? 4 : 1\n\t\t\tredraw()\n\t\t},\n\t\tasync onHover(x, y) {\n\t\t\tconst options = { octaves, biomeColors: {}, offset: offset.current, scale, seed, res: 1, version }\n\t\t\tconst biome = await getBiome(data, Math.floor(x * 200), Math.floor(y * 200), options)\n\t\t\tsetFocused(biome)\n\t\t},\n\t\tonLeave() {\n\t\t\tsetFocused(undefined)\n\t\t},\n\t}, [state, scale, seed])\n\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tres.current = type === 'multi_noise' ? 4 : 1\n\t\t\tredraw()\n\t\t}\n\t}, [state, scale, seed, shown])\n\n\tconst changeScale = (newScale: number) => {\n\t\toffset.current[0] = offset.current[0] * scale / newScale\n\t\toffset.current[1] = offset.current[1] * scale / newScale\n\t\tsetScale(newScale)\n\t}\n\n\treturn <>\n\t\t
\n\t\t\t{focused && }\n\t\t\t{(type === 'multi_noise' || type === 'checkerboard') && <>\n\t\t\t\t changeScale(scale * 1.5)} />\n\t\t\t\t changeScale(scale / 1.5)} />\n\t\t\t}\n\t\t\t{type === 'multi_noise' &&\n\t\t\t\t newSeed(model)} />}\n\t\t
\n\t\t\n\t\n}\n\nfunction calculateState(data: any, octaves: NoiseOctaves) {\n\treturn JSON.stringify([data, octaves])\n}\n\nfunction getOctaves(obj: any): NoiseOctaves {\n\tif (typeof obj === 'string') {\n\t\tswitch (obj.replace(/^minecraft:/, '')) {\n\t\t\tcase 'overworld':\n\t\t\tcase 'amplified':\n\t\t\t\treturn {\n\t\t\t\t\ttemperature: { firstOctave: -9, amplitudes: [1.5, 0, 1, 0, 0, 0] },\n\t\t\t\t\thumidity: { firstOctave: -7, amplitudes: [1, 1, 0, 0, 0, 0] },\n\t\t\t\t\tcontinentalness: { firstOctave: -9, amplitudes: [1, 1, 2, 2, 2, 1, 1, 1, 1] },\n\t\t\t\t\terosion: { firstOctave: -9, amplitudes: [1, 1, 0, 1, 1] },\n\t\t\t\t\tweirdness: { firstOctave: -7, amplitudes: [1, 2, 1, 0, 0, 0] },\n\t\t\t\t\tshift: { firstOctave: -3, amplitudes: [1, 1, 1, 0] },\n\t\t\t\t}\n\t\t\tcase 'end':\n\t\t\tcase 'floating_islands':\n\t\t\t\treturn {\n\t\t\t\t\ttemperature: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\t\thumidity: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\t\tcontinentalness: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\t\terosion: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\t\tweirdness: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\t\tshift: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn {\n\t\t\t\t\ttemperature: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\t\thumidity: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\t\tcontinentalness: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\t\terosion: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\t\tweirdness: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\t\tshift: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\t}\n\t\t}\n\t}\n\treturn NoiseGeneratorSettings.fromJson(obj).octaves\n}\n","import { useEffect, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn } from '..'\nimport { useCanvas } from '../../hooks'\nimport { locale } from '../../Locales'\nimport { decorator } from '../../previews'\nimport { randomSeed } from '../../Utils'\n\nexport const DecoratorPreview = ({ data, version, shown, lang }: PreviewProps) => {\n\tconst [scale, setScale] = useState(4)\n\tconst [seed, setSeed] = useState(randomSeed())\n\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [scale * 16, scale * 16]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tdecorator(data, img, { seed, version, size: [scale * 16, 128, scale * 16] })\n\t\t},\n\t})\n\n\tconst state = JSON.stringify(data)\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tredraw()\n\t\t}\n\t}, [state, scale, seed, shown])\n\n\treturn <>\n\t\t
\n\t\t\t setScale(Math.min(16, scale + 1))} />\n\t\t\t setScale(Math.max(1, scale - 1))} />\n\t\t\t setSeed(randomSeed())} />\n\t\t
\n\t\t\n\t\n}\n","import { useEffect, useRef, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn, BtnInput, BtnMenu } from '..'\nimport { useCanvas } from '../../hooks'\nimport { locale } from '../../Locales'\nimport { noiseSettings } from '../../previews'\nimport { checkVersion } from '../../Schemas'\nimport { randomSeed } from '../../Utils'\n\nexport const NoiseSettingsPreview = ({ lang, data, shown, version }: PreviewProps) => {\n\tconst loc = locale.bind(null, lang)\n\tconst [seed, setSeed] = useState(randomSeed())\n\tconst [biomeFactor, setBiomeFactor] = useState(0.2)\n\tconst [biomeOffset, setBiomeOffset] = useState(0.1)\n\tconst [biomePeaks, setBiomePeaks] = useState(0)\n\tconst [focused, setFocused] = useState(undefined)\n\tconst offset = useRef(0)\n\tconst state = JSON.stringify([data, biomeFactor, biomeOffset, biomePeaks])\n\n\tconst hasPeaks = checkVersion(version, '1.18')\n\tuseEffect(() => {\n\t\tsetBiomeFactor(hasPeaks ? 600 : 0.2)\n\t\tsetBiomeOffset(hasPeaks ? 0.05 : 0.1)\n\t}, [hasPeaks])\n\n\tconst size = data?.noise?.height ?? 256\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [size, size]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tconst options = { biomeOffset, biomeFactor, biomePeaks, offset: offset.current, width: img.width, seed, version }\n\t\t\tnoiseSettings(data, img, options)\n\t\t},\n\t\tasync onDrag(dx) {\n\t\t\toffset.current += dx * size\n\t\t\tredraw()\n\t\t},\n\t\tasync onHover(_, y) {\n\t\t\tconst worldY = size - Math.max(1, Math.ceil(y * size)) + (data?.noise?.min_y ?? 0)\n\t\t\tsetFocused(`${worldY}`)\n\t\t},\n\t\tonLeave() {\n\t\t\tsetFocused(undefined)\n\t\t},\n\t}, [state, seed])\n\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tredraw()\n\t\t}\n\t}, [state, seed, shown])\n\n\treturn <>\n\t\t
\n\t\t\t{focused && }\n\t\t\t\n\t\t\t\t{hasPeaks ? <>\n\t\t\t\t\t setBiomeFactor(Number(v))} />\n\t\t\t\t\t setBiomeOffset(Number(v))} />\n\t\t\t\t\t setBiomePeaks(Number(v))} />\n\t\t\t\t : <>\n\t\t\t\t\t setBiomeFactor(Number(v))} />\n\t\t\t\t\t setBiomeOffset(Number(v))} />\n\t\t\t\t}\n\t\t\t\n\t\t\t setSeed(randomSeed())} />\n\t\t
\n\t\t\n\t\n}\n","import type { DataModel } from '@mcschema/core'\nimport { Path } from '@mcschema/core'\nimport { useState } from 'preact/hooks'\nimport { useModel } from '../../hooks'\nimport type { VersionId } from '../../Schemas'\nimport { BiomeSourcePreview, DecoratorPreview, NoiseSettingsPreview } from '../previews'\n\nexport const HasPreview = ['dimension', 'worldgen/noise_settings', 'worldgen/configured_feature']\n\ntype PreviewPanelProps = {\n\tlang: string,\n\tmodel: DataModel | null,\n\tversion: VersionId,\n\tid: string,\n\tshown: boolean,\n\tonError: (message: string) => unknown,\n}\nexport function PreviewPanel({ lang, model, version, id, shown }: PreviewPanelProps) {\n\tconst [, setCount] = useState(0)\n\n\tuseModel(model, () => {\n\t\tsetCount(count => count + 1)\n\t})\n\n\tif (id === 'dimension' && model?.get(new Path(['generator', 'type']))?.endsWith('noise')) {\n\t\tconst data = model.get(new Path(['generator', 'biome_source']))\n\t\tif (data) return \n\t}\n\n\tif (id === 'worldgen/noise_settings' && model) {\n\t\tconst data = model.get(new Path([]))\n\t\tif (data) return \n\t}\n\n\tif (id === 'worldgen/configured_feature' && model) {\n\t\tconst data = model.get(new Path([]))\n\t\tif (data) return \n\t}\n\n\treturn <>\n}\n","import type { Hook } from '@mcschema/core'\nimport { relativePath } from '@mcschema/core'\nimport type { BlockStateRegistry } from '../Schemas'\n\nexport type OutputProps = {\n\tblockStates: BlockStateRegistry,\n}\nexport const transformOutput: Hook<[any, OutputProps], any> = {\n\tbase({}, _, value) {\n\t\treturn value\n\t},\n\n\tchoice({ switchNode }, path, value, props) {\n\t\treturn switchNode.hook(this, path, value, props)\n\t},\n\n\tlist({ children }, path, value, props) {\n\t\tif (!Array.isArray(value)) return value\n\t\treturn value.map((obj, index) =>\n\t\t\tchildren.hook(this, path.push(index), obj.node, props)\n\t\t)\n\t},\n\n\tmap({ children, config }, path, value, props) {\n\t\tif (value === undefined) return undefined\n\t\tconst blockState = config.validation?.validator === 'block_state_map'? props.blockStates?.[relativePath(path, config.validation.params.id).get()] : null\n\t\tconst res: any = {}\n\t\tObject.keys(value).forEach(f => {\n\t\t\tif (blockState) {\n\t\t\t\tif (!Object.keys(blockState.properties ?? {}).includes(f)) return\n\t\t\t}\n\t\t\tres[f] = children.hook(this, path.push(f), value[f], props)\n\t\t})\n\t\treturn res\n\t},\n\n\tobject({ getActiveFields }, path, value, props) {\n\t\tif (value === undefined || value === null || typeof value !== 'object') {\n\t\t\treturn value\n\t\t}\n\t\tconst res: any = {}\n\t\tconst activeFields = getActiveFields(path)\n\t\tObject.keys(activeFields)\n\t\t\t.filter(k => activeFields[k].enabled(path))\n\t\t\t.forEach(f => {\n\t\t\t\tres[f] = activeFields[f].hook(this, path.push(f), value[f], props)\n\t\t\t})\n\t\treturn res\n\t},\n}\n","import type { VersionId } from './Schemas'\nimport { VersionIds } from './Schemas'\n\nexport namespace Store {\n\texport const ID_LANGUAGE = 'language'\n\texport const ID_THEME = 'theme'\n\texport const ID_VERSION = 'schema_version'\n\texport const ID_INDENT = 'indentation'\n\texport const ID_SOUNDS_VERSION = 'minecraft_sounds_version'\n\n\texport function getLanguage() {\n\t\treturn localStorage.getItem(ID_LANGUAGE) ?? 'en'\n\t}\n\n\texport function getTheme() {\n\t\treturn localStorage.getItem(ID_THEME) ?? 'dark'\n\t}\n\n\texport function getVersion(): VersionId {\n\t\tconst version = localStorage.getItem(ID_VERSION)\n\t\tif (version && VersionIds.includes(version as VersionId)) {\n\t\t\treturn version as VersionId\n\t\t}\n\t\treturn '1.17'\n\t}\n\n\texport function getIndent() {\n\t\treturn localStorage.getItem(ID_INDENT) ?? '2_spaces'\n\t}\n\n\texport function getSoundsVersion() {\n\t\treturn localStorage.getItem(ID_SOUNDS_VERSION) ?? 'latest'\n\t}\n\n\texport function setLanguage(language: string | undefined) {\n\t\tif (language) localStorage.setItem(ID_LANGUAGE, language)\n\t}\n\n\texport function setTheme(theme: string | undefined) {\n\t\tif (theme) localStorage.setItem(ID_THEME, theme)\n\t}\n\n\texport function setVersion(version: VersionId | undefined) {\n\t\tif (version) localStorage.setItem(ID_VERSION, version)\n\t}\n\n\texport function setIndent(indent: string | undefined) {\n\t\tif (indent) localStorage.setItem(ID_INDENT, indent)\n\t}\n\n\texport function setSoundsVersion(version: string | undefined) {\n\t\tif (version) localStorage.setItem(ID_SOUNDS_VERSION, version)\n\t}\n}\n","import { DataModel, ModelPath } from '@mcschema/core'\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn, BtnMenu } from '..'\nimport { useModel } from '../../hooks'\nimport { locale } from '../../Locales'\nimport { transformOutput } from '../../schema/transformOutput'\nimport type { BlockStateRegistry } from '../../Schemas'\nimport { Store } from '../../Store'\nimport { message } from '../../Utils'\n\nconst OUTPUT_CHARS_LIMIT = 10000\n\nconst INDENT: Record = {\n\t'2_spaces': 2,\n\t'4_spaces': 4,\n\ttabs: '\\t',\n}\n\ntype SourcePanelProps = {\n\tlang: string,\n\tname: string,\n\tmodel: DataModel | null,\n\tblockStates: BlockStateRegistry | null,\n\tdoCopy?: number,\n\tdoDownload?: number,\n\tdoImport?: number,\n\tcopySuccess: () => unknown,\n\tonError: (message: string) => unknown,\n}\nexport function SourcePanel({ lang, name, model, blockStates, doCopy, doDownload, doImport, copySuccess, onError }: SourcePanelProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst [indent, setIndent] = useState(Store.getIndent())\n\tconst source = useRef(null)\n\tconst download = useRef(null)\n\tconst retransform = useRef()\n\n\tconst getOutput = useCallback((model: DataModel, blockStates: BlockStateRegistry) => {\n\t\tconst data = model.schema.hook(transformOutput, new ModelPath(model), model.data, { blockStates })\n\t\treturn JSON.stringify(data, null, INDENT[indent]) + '\\n'\n\t}, [indent])\n\n\tuseEffect(() => {\n\t\tretransform.current = () => {\n\t\t\tif (!model || !blockStates) return\n\t\t\ttry {\n\t\t\t\tconst output = getOutput(model, blockStates)\n\t\t\t\tif (output.length >= OUTPUT_CHARS_LIMIT) {\n\t\t\t\t\tsource.current.value = output.slice(0, OUTPUT_CHARS_LIMIT) + `\\n\\nOutput is too large to display (+${OUTPUT_CHARS_LIMIT} chars)\\nExport to view complete output\\n\\n`\n\t\t\t\t} else {\n\t\t\t\t\tsource.current.value = output\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tonError(`Error getting JSON output: ${message(e)}`)\n\t\t\t\tconsole.error(e)\n\t\t\t\tsource.current.value = ''\n\t\t\t}\n\t\t}\n\t})\n\n\tuseModel(model, () => {\n\t\tretransform.current()\n\t})\n\tuseEffect(() => {\n\t\tif (model) retransform.current()\n\t}, [model])\n\n\tuseEffect(() => {\n\t\tretransform.current()\n\t}, [indent])\n\n\tconst onImport = () => {\n\t\ttry {\n\t\t\tconst data = JSON.parse(source.current.value)\n\t\t\tmodel?.reset(DataModel.wrapLists(data), false)\n\t\t} catch (e) {\n\t\t\tonError(`Error importing: ${message(e)}`)\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\tuseEffect(() => {\n\t\tif (doCopy && model && blockStates) {\n\t\t\tnavigator.clipboard.writeText(getOutput(model, blockStates)).then(() => {\n\t\t\t\tcopySuccess()\n\t\t\t})\n\t\t}\n\t}, [doCopy])\n\n\tuseEffect(() => {\n\t\tif (doDownload && source.current && download.current) {\n\t\t\tconst content = encodeURIComponent(source.current.value)\n\t\t\tdownload.current.setAttribute('href', `data:text/json;charset=utf-8,${content}`)\n\t\t\tdownload.current.setAttribute('download', `${name}.json`)\n\t\t\tdownload.current.click()\n\t\t}\n\t}, [doDownload])\n\n\tuseEffect(() => {\n\t\tif (doImport && source.current) {\n\t\t\tsource.current.value = ''\n\t\t\tsource.current.select()\n\t\t}\n\t}, [doImport])\n\n\tconst changeIndent = (value: string) => {\n\t\tStore.setIndent(value)\n\t\tsetIndent(value)\n\t}\n\n\treturn <> \n\t\t
\n\t\t\t\n\t\t\t\t{Object.entries(INDENT).map(([key]) =>\n\t\t\t\t\t changeIndent(key)}/>\n\t\t\t\t)}\n\t\t\t\n\t\t
\n\t\t\n\t\t\n\t\n}\n","import type { INode, Path } from '@mcschema/core'\nimport { DataModel } from '@mcschema/core'\n\nexport class ModelWrapper extends DataModel {\n\tconstructor(\n\t\tschema: INode,\n\t\tprivate readonly mapper: (path: Path) => Path,\n\t\tprivate readonly getter: (path: Path) => any,\n\t\tprivate readonly setter: (path: Path, value: any, silent?: boolean) => any,\n\t) {\n\t\tsuper(schema)\n\t}\n\n\tmap(path: Path) {\n\t\treturn this.mapper(path)\n\t}\n\n\tget(path: Path) {\n\t\treturn this.getter(path)\n\t}\n\n\tset(path: Path, value: any, silent?: boolean) {\n\t\treturn this.setter(path, value, silent)\n\t}\n}\n","import type { BooleanHookParams, EnumOption, Hook, INode, NodeChildren, NumberHookParams, StringHookParams, ValidationOption } from '@mcschema/core'\nimport { DataModel, ListNode, MapNode, ModelPath, ObjectNode, Path, relativePath, StringNode } from '@mcschema/core'\nimport type { ComponentChildren, JSX } from 'preact'\nimport { memo } from 'preact/compat'\nimport { useState } from 'preact/hooks'\nimport { Btn } from '../components'\nimport { Octicon } from '../components/Octicon'\nimport { useFocus } from '../hooks'\nimport { locale } from '../Locales'\nimport type { BlockStateRegistry } from '../Schemas'\nimport { CachedDecorator, CachedFeature } from '../Schemas'\nimport { deepClone, deepEqual, hexId, isObject, newSeed } from '../Utils'\nimport { ModelWrapper } from './ModelWrapper'\n\nconst selectRegistries = ['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']\nconst hiddenFields = ['number_provider.type', 'score_provider.type', 'nbt_provider.type', 'int_provider.type', 'float_provider.type', 'height_provider.type']\nconst flattenedFields = ['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']\nconst inlineFields = ['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']\nconst nbtFields = ['function.set_nbt.tag', 'advancement.display.icon.nbt', 'text_component_object.nbt', 'entity.nbt', 'block.nbt', 'item.nbt']\nconst fixedLists = ['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']\n\n/**\n * Secondary model used to remember the keys of a map\n */\nconst keysModel = new DataModel(MapNode(\n\tStringNode(),\n\tStringNode()\n), { historyMax: 0 })\n\ntype JSXTriple = [JSX.Element | null, JSX.Element | null, JSX.Element | null]\ntype RenderHook = Hook<[any, string, BlockStateRegistry, Record], JSXTriple>\n\ntype NodeProps = T & {\n\tnode: INode,\n\tpath: ModelPath,\n\tvalue: any,\n\tlang: string,\n\tstates: BlockStateRegistry,\n\tctx: Record,\n}\n\nexport function FullNode({ model, lang, blockStates }: { model: DataModel, lang: string, blockStates: BlockStateRegistry }) {\n\tconst path = new ModelPath(model)\n\tconst [prefix, suffix, body] = model.schema.hook(renderHtml, path, deepClone(model.data), lang, blockStates, {})\n\treturn suffix?.props?.children.some((c: any) => c) ?
\n\t\t
{prefix}{suffix}
\n\t\t
{body}
\n\t
: body\n}\n\nconst renderHtml: RenderHook = {\n\tbase() {\n\t\treturn [null, null, null]\n\t},\n\n\tboolean(params, path, value, lang, states, ctx) {\n\t\treturn [null, , null]\n\t},\n\n\tchoice({ choices, config, switchNode }, path, value, lang, states, ctx) {\n\t\tconst choice = switchNode.activeCase(path, true) as typeof choices[number]\n\t\tconst contextPath = (config?.context) ? new ModelPath(path.getModel(), new Path(path.getArray(), [config.context])) : path\n\t\tconst [prefix, suffix, body] = choice.node.hook(this, contextPath, value, lang, states, ctx)\n\t\tif (choices.length === 1) {\n\t\t\treturn [prefix, suffix, body]\n\t\t}\n\t\tconst choiceContextPath = config?.choiceContext ? new Path([], [config.choiceContext]) : config?.context ? new Path([], [config.context]) : path\n\t\tconst set = (type: string) => {\n\t\t\tconst c = choices.find(c => c.type === type) ?? choice\n\t\t\tconst newValue = c.change\n\t\t\t\t? c.change(DataModel.unwrapLists(value))\n\t\t\t\t: config.choiceContext === 'feature' ?\tc.node.default()?.config?.feature : c.node.default()\n\t\t\tpath.model.set(path, DataModel.wrapLists(newValue))\n\t\t}\n\t\tconst inject = \n\t\treturn [prefix, <>{inject}{suffix}, body]\n\t},\n\n\tlist({ children, config }, path, value, lang, states, ctx) {\n\t\tconst { expand, collapse, isToggled } = useToggles()\n\t\tconst [maxShown, setMaxShown] = useState(50)\n\n\t\tconst context = path.getContext().join('.')\n\t\tif (fixedLists.includes(context)) {\n\t\t\tconst prefix = <>\n\t\t\t\t{[...Array(config.maxLength!)].map((_, i) =>\n\t\t\t\t\t)}\n\t\t\t\t
\n\t\t\t\n\t\t\tconst suffix = <>{[...Array(config.maxLength)].map((_, i) => {\n\t\t\t\tconst child = children.hook(this, path.modelPush(i), value?.[i]?.node, lang, states, ctx)\n\t\t\t\treturn child[1]\n\t\t\t})}\n\t\t\treturn [prefix, suffix, null]\n\t\t}\n\n\t\tconst onAdd = () => {\n\t\t\tif (!Array.isArray(value)) value = []\n\t\t\tconst node = DataModel.wrapLists(children.default())\n\t\t\tpath.model.set(path, [{ node, id: hexId() }, ...value])\n\t\t}\n\t\tconst onAddBottom = () => {\n\t\t\tif (!Array.isArray(value)) value = []\n\t\t\tconst node = DataModel.wrapLists(children.default())\n\t\t\tpath.model.set(path, [...value, { node, id: hexId() }])\n\t\t}\n\t\tconst suffix = \n\t\tconst body = <>\n\t\t\t{(value && Array.isArray(value)) && value.map(({ node: cValue, id: cId }, index) => {\n\t\t\t\tif (index === maxShown) {\n\t\t\t\t\treturn
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t}\n\t\t\t\tif (index > maxShown) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\n\t\t\t\tconst cPath = path.push(index).contextPush('entry')\n\t\t\t\tconst canToggle = children.type(cPath) === 'object'\n\t\t\t\tconst toggle = isToggled(cId)\n\t\t\t\tif (canToggle && (toggle === false || (toggle === undefined && value.length > 20))) {\n\t\t\t\t\treturn
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t}\n\n\t\t\t\tconst onRemove = () => cPath.set(undefined)\n\t\t\t\tconst onMoveUp = () => {\n\t\t\t\t\tconst v = [...path.get()];\n\t\t\t\t\t[v[index - 1], v[index]] = [v[index], v[index - 1]]\n\t\t\t\t\tpath.model.set(path, v)\n\t\t\t\t}\n\t\t\t\tconst onMoveDown = () => {\n\t\t\t\t\tconst v = [...path.get()];\n\t\t\t\t\t[v[index + 1], v[index]] = [v[index], v[index + 1]]\n\t\t\t\t\tpath.model.set(path, v)\n\t\t\t\t}\n\t\t\t\tconst actions: MenuAction[] = [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'duplicate',\n\t\t\t\t\t\tlabel: 'duplicate',\n\t\t\t\t\t\tonSelect: () => {\n\t\t\t\t\t\t\tconst v = [...path.get()]\n\t\t\t\t\t\t\tv.splice(index, 0, { id: hexId(), node: deepClone(cValue) })\n\t\t\t\t\t\t\tpath.model.set(path, v)\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t]\n\t\t\t\treturn \n\t\t\t\t\t{canToggle && }\n\t\t\t\t\t\n\t\t\t\t\t{value.length > 1 &&
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
}\n\t\t\t\t
\n\t\t\t})}\n\t\t\t{(value && value.length > 0 && value.length <= maxShown) &&
\n\t\t\t\t\n\t\t\t
}\n\t\t\n\t\treturn [null, suffix, body]\n\t},\n\n\tmap({ children, keys, config }, path, value, lang, states, ctx) {\n\t\tconst { expand, collapse, isToggled } = useToggles()\n\n\t\tconst keyPath = new ModelPath(keysModel, new Path([hashString(path.toString())]))\n\t\tconst onAdd = () => {\n\t\t\tconst key = keyPath.get()\n\t\t\tpath.model.set(path.push(key), DataModel.wrapLists(children.default()))\n\t\t}\n\t\tconst blockState = config.validation?.validator === 'block_state_map' ? states?.[relativePath(path, config.validation.params.id).get()] : null\n\t\tconst keysSchema = blockState?.properties\n\t\t\t? StringNode(null!, { enum: Object.keys(blockState.properties ?? {}) })\n\t\t\t: keys\n\t\tif (blockState && path.last() === 'Properties') {\n\t\t\tif (typeof value !== 'object') value = {}\n\t\t\tconst properties = Object.entries(blockState.properties ?? {})\n\t\t\t\t.map(([key, values]) => [key, StringNode(null!, { enum: values })])\n\t\t\tObject.entries(blockState.properties ?? {}).forEach(([key, values]) => {\n\t\t\t\tif (typeof value[key] !== 'string') {\n\t\t\t\t\tpath.model.errors.add(path.push(key), 'error.expected_string')\n\t\t\t\t} else if (!values.includes(value[key])) {\n\t\t\t\t\tpath.model.errors.add(path.push(key), 'error.invalid_enum_option', value[key])\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn ObjectNode(Object.fromEntries(properties)).hook(this, path, value, lang, states, ctx)\n\t\t}\n\t\tconst suffix = <>\n\t\t\t{keysSchema.hook(this, keyPath, keyPath.get() ?? '', lang, states, ctx)[1]}\n\t\t\t\n\t\t\n\t\tconst body = <>\n\t\t\t{typeof value === 'object' && Object.entries(value).map(([key, cValue]) => {\n\n\t\t\t\tconst cPath = path.modelPush(key)\n\t\t\t\tconst canToggle = children.type(cPath) === 'object'\n\t\t\t\tconst toggle = isToggled(key)\n\t\t\t\tif (canToggle && (toggle === false || (toggle === undefined && value.length > 20))) {\n\t\t\t\t\treturn
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t}\n\t\t\t\tconst cSchema = blockState\n\t\t\t\t\t? StringNode(null!, { enum: blockState.properties?.[key] ?? [] })\n\t\t\t\t\t: children\n\t\t\t\tif (blockState?.properties?.[key] && typeof cValue === 'string'\n\t\t\t\t\t&& !blockState.properties?.[key].includes(cValue)) {\n\t\t\t\t\tpath.model.errors.add(cPath, 'error.invalid_enum_option', cValue)\n\t\t\t\t}\n\t\t\t\tconst onRemove = () => cPath.set(undefined)\n\t\t\t\treturn \n\t\t\t\t\t{canToggle && }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t})}\n\t\t\n\t\treturn [null, suffix, body]\n\t},\n\n\tnumber(params, path, value, lang, states, ctx) {\n\t\treturn [null, , null]\n\t},\n\n\tobject({ node, config, getActiveFields, getChildModelPath }, path, value, lang, states, ctx) {\n\t\tif (path.getArray().length == 0 && isDecorated(config.context, value)) {\n\t\t\tconst { wrapper, fields } = createDecoratorsWrapper(getActiveFields(path), path, value)\n\t\t\tvalue = wrapper.data\n\t\t\tgetActiveFields = () => fields\n\t\t\tgetChildModelPath = (path, key) => new ModelPath(wrapper, new Path(path.getArray(), ['feature'])).push(key)\n\t\t}\n\n\t\tlet prefix: JSX.Element | null = null\n\t\tlet suffix: JSX.Element | null = null\n\t\tif (node.optional()) {\n\t\t\tif (value === undefined) {\n\t\t\t\tconst onExpand = () => path.set(DataModel.wrapLists(node.default()))\n\t\t\t\tsuffix = \n\t\t\t} else {\n\t\t\t\tconst onCollapse = () => path.set(undefined)\n\t\t\t\tsuffix = \n\t\t\t}\n\t\t}\n\t\tconst newCtx = (typeof value === 'object' && value !== null && node.default()?.pools)\n\t\t\t? { ...ctx, loot: value?.type } : ctx\n\t\tconst body = <>\n\t\t\t{(typeof value === 'object' && value !== null && !(node.optional() && value === undefined)) &&\n\t\t\t\tObject.entries(getActiveFields(path))\n\t\t\t\t\t.filter(([_, child]) => child.enabled(path))\n\t\t\t\t\t.map(([key, child]) => {\n\t\t\t\t\t\tconst cPath = getChildModelPath(path, key)\n\t\t\t\t\t\tconst context = cPath.getContext().join('.')\n\t\t\t\t\t\tif (hiddenFields.includes(context)) return null\n\t\t\t\t\t\tconst [cPrefix, cSuffix, cBody] = child.hook(this, cPath, value[key], lang, states, newCtx)\n\t\t\t\t\t\tif (!cPrefix && !cSuffix && !((cBody?.props?.children?.length ?? 0) > 0)) return null\n\t\t\t\t\t\tconst isFlattened = child.type(cPath) === 'object' && flattenedFields.includes(context)\n\t\t\t\t\t\tconst isInlined = inlineFields.includes(context)\n\t\t\t\t\t\tif (isFlattened || isInlined) {\n\t\t\t\t\t\t\tprefix = <>{prefix}{cPrefix}\n\t\t\t\t\t\t\tsuffix = <>{suffix}{cSuffix}\n\t\t\t\t\t\t\treturn isFlattened ? cBody : null\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn \n\t\t\t\t\t})\n\t\t\t}\n\t\t\n\t\treturn [prefix, suffix, body]\n\t},\n\n\tstring(params, path, value, lang, states, ctx) {\n\t\treturn [null, , null]\n\t},\n}\n\nfunction Collapsed({ path, value }: { path: ModelPath, value: any, schema: INode }) {\n\tconst context = path.getContext().join('.')\n\tswitch (context) {\n\t\tcase 'loot_table.pools.entry':\n\t\t\treturn \n\t\tcase 'function.set_contents.entries.entry':\n\t\tcase 'loot_pool.entries.entry':\n\t\t\treturn \n\t}\n\tfor (const child of Object.values(value ?? {})) {\n\t\tif (typeof child === 'string') {\n\t\t\treturn \n\t\t}\n\t}\n\treturn null\n}\n\nfunction useToggles() {\n\tconst [toggleState, setToggleState] = useState(new Map())\n\tconst [toggleAll, setToggleAll] = useState(undefined)\n\n\tconst expand = (key: string) => (evt: MouseEvent) => {\n\t\tif (evt.ctrlKey) {\n\t\t\tsetToggleState(new Map())\n\t\t\tsetToggleAll(true)\n\t\t} else {\n\t\t\tsetToggleState(state => new Map(state.set(key, true)))\n\t\t}\n\t}\n\tconst collapse = (key: string) => (evt: MouseEvent) => {\n\t\tif (evt.ctrlKey) {\n\t\t\tsetToggleState(new Map())\n\t\t\tsetToggleAll(false)\n\t\t} else {\n\t\t\tsetToggleState(state => new Map(state.set(key, false)))\n\t\t}\n\t}\n\t\n\tconst isToggled = (key: string) => {\n\t\treturn toggleState?.get(key) ?? toggleAll\n\t}\n\n\treturn { expand, collapse, isToggled }\n}\n\nfunction BooleanSuffix({ path, node, value, lang }: NodeProps) {\n\tconst set = (target: boolean) => {\n\t\tpath.model.set(path, node.optional() && value === target ? undefined : target)\n\t}\n\treturn <>\n\t\t\n\t\t\n\t\n}\n\nfunction NumberSuffix({ path, config, integer, value, lang }: NodeProps) {\n\tconst onChange = (evt: Event) => {\n\t\tconst value = (evt.target as HTMLInputElement).value\n\t\tconst parsed = integer ? parseInt(value) : parseFloat(value)\n\t\tpath.model.set(path, parsed)\n\t}\n\tconst onColor = (evt: Event) => {\n\t\tconst value = (evt.target as HTMLInputElement).value\n\t\tconst parsed = parseInt(value.slice(1), 16)\n\t\tpath.model.set(path, parsed)\n\t}\n\treturn <>\n\t\t {if (evt.key === 'Enter') onChange(evt)}} />\n\t\t{config?.color && }\n\t\t{['dimension.generator.seed', 'dimension.generator.biome_source.seed', 'world_settings.seed'].includes(path.getContext().join('.')) && }\n\t\n}\n\nfunction StringSuffix({ path, getValues, config, node, value, lang, states }: NodeProps) {\n\tconst onChange = (evt: Event) => {\n\t\tevt.stopPropagation()\n\t\tconst newValue = (evt.target as HTMLSelectElement).value\n\t\tif (newValue === value) return\n\t\tpath.model.set(path, newValue.length === 0 ? undefined : newValue)\n\t}\n\tconst values = getValues()\n\tconst context = path.getContext().join('.')\n\tif (nbtFields.includes(context)) {\n\t\treturn \n\t} else if ((isEnum(config) && !config.additional) || selectRegistries.includes(context)) {\n\t\tlet context = new Path([])\n\t\tif (isEnum(config) && typeof config.enum === 'string') {\n\t\t\tcontext = context.contextPush(config.enum)\n\t\t} else if (!isEnum(config) && config?.validator === 'resource' && typeof config.params.pool === 'string') {\n\t\t\tcontext = context.contextPush(config.params.pool)\n\t\t}\n\t\treturn \n\t} else if (!isEnum(config) && config?.validator === 'block_state_key') {\n\t\tconst blockState = states?.[relativePath(path, config.params.id).get()]\n\t\tconst values = Object.keys(blockState?.properties ?? {})\n\t\treturn \n\t} else {\n\t\tconst datalistId = hexId()\n\t\treturn <>\n\t\t\t {if (evt.key === 'Enter') onChange(evt)}}\n\t\t\t\tlist={values.length > 0 ? datalistId : ''} />\n\t\t\t{values.length > 0 && \n\t\t\t\t{values.map(v => }\n\t\t\n\t}\n}\n\ntype MenuAction = {\n\tlabel: string,\n\tdescription?: string,\n\ticon: keyof typeof Octicon,\n\tonSelect: () => unknown,\n}\n\ntype TreeNodeProps = {\n\tschema: INode,\n\tpath: ModelPath,\n\tvalue: any,\n\tlang: string,\n\tstates: BlockStateRegistry,\n\tctx: Record,\n\tcompare?: any,\n\tlabel?: string,\n\tactions?: MenuAction[],\n\tchildren?: ComponentChildren,\n}\nfunction TreeNode({ label, schema, path, value, lang, states, ctx, actions, children }: TreeNodeProps) {\n\tconst type = schema.type(path)\n\tconst category = schema.category(path)\n\tconst context = path.getContext().join('.')\n\n\tconst [active, setActive] = useFocus()\n\tconst onContextMenu = (evt: MouseEvent) => {\n\t\tevt.preventDefault()\n\t\tsetActive()\n\t}\n\n\tconst newCtx = {...ctx}\n\tdelete newCtx.index\n\tconst [prefix, suffix, body] = schema.hook(renderHtml, path, value, lang, states, newCtx)\n\treturn
\n\t\t
\n\t\t\t\n\t\t\t\n\t\t\t{children}\n\t\t\t{prefix}\n\t\t\t\n\t\t\t{suffix}\n\t\t
\n\t\t{body &&
{body}
}\n\t
\n}\n\nconst MemoedTreeNode = memo(TreeNode, (prev, next) => {\n\treturn prev.schema === next.schema\n\t\t&& prev.lang === next.lang\n\t\t&& prev.path.equals(next.path)\n\t\t&& deepEqual(prev.ctx, next.ctx)\n\t\t&& deepEqual(prev.value, next.value)\n})\n\nfunction isEnum(value?: ValidationOption | EnumOption): value is EnumOption {\n\treturn !!(value as any)?.enum\n}\n\nfunction hashString(str: string) {\n\tvar hash = 0, i, chr\n\tfor (i = 0; i < str.length; i++) {\n\t\tchr = str.charCodeAt(i)\n\t\thash = ((hash << 5) - hash) + chr\n\t\thash |= 0\n\t}\n\treturn hash\n}\n\nfunction pathLocale(lang: string, path: Path, ...params: string[]) {\n\tconst ctx = path.getContext()\n\tfor (let i = 0; i < ctx.length; i += 1) {\n\t\tconst key = ctx.slice(i).join('.')\n\t\tconst result = locale(lang, key, ...params)\n\t\tif (key !== result) {\n\t\t\treturn result\n\t\t}\n\t}\n\treturn ctx[ctx.length - 1]\n}\n\nfunction ErrorPopup({ lang, path, nested }: { lang: string, path: ModelPath, nested?: boolean }) {\n\tif (path.model instanceof ModelWrapper) {\n\t\tpath = path.model.map(path).withModel(path.model)\n\t}\n\tconst e = nested\n\t\t?\tpath.model.errors.getAll().filter(e => e.path.startsWith(path))\n\t\t: path.model.errors.get(path, true)\n\tif (e.length === 0) return null\n\tconst message = locale(lang, e[0].error, ...(e[0].params ?? []))\n\treturn popupIcon('node-error', 'issue_opened', message)\n}\n\nfunction HelpPopup({ lang, path }: { lang: string, path: Path }) {\n\tconst key = path.contextPush('help').getContext().join('.')\n\tconst message = locale(lang, key)\n\tif (message === key) return null\n\treturn popupIcon('node-help', 'info', message)\n}\n\nconst popupIcon = (type: string, icon: keyof typeof Octicon, popup: string) => {\n\tconst [active, setActive] = useFocus()\n\n\treturn
\n\t\t{Octicon[icon]}\n\t\t{popup}\n\t
\n}\n\nfunction isDecorated(context: string | undefined, value: any) {\n\treturn context === 'feature'\n\t\t&& value?.type?.replace(/^minecraft:/, '') === 'decorated'\n\t\t&& isObject(value?.config)\n}\n\nfunction createDecoratorsWrapper(originalFields: NodeChildren, path: ModelPath, value: any) {\n\tconst decorators: any[] = []\n\tconst feature = iterateNestedDecorators(value, decorators)\n\tconst fields = {\n\t\ttype: originalFields.type,\n\t\tconfig: ObjectNode({\n\t\t\tdecorators: ListNode(CachedDecorator),\n\t\t\tfeature: CachedFeature,\n\t\t}, { context: 'feature.decorated' }),\n\t}\n\tconst schema = ObjectNode(fields, { context: 'feature' })\n\tconst featurePath = new Path(['config', 'feature'])\n\tconst decoratorsPath = new Path(['config', 'decorators'])\n\tconst model = path.getModel()\n\tconst wrapper: ModelWrapper = new ModelWrapper(schema, path => {\n\t\tif (path.startsWith(featurePath)) {\n\t\t\treturn new Path([...[...Array(decorators.length - 1)].flatMap(() => ['config', 'feature']), ...path.modelArr])\n\t\t} else if (path.startsWith(decoratorsPath)) {\n\t\t\tif (path.modelArr.length === 2) {\n\t\t\t\treturn new Path([])\n\t\t\t}\n\t\t\tconst index = path.modelArr[2]\n\t\t\tif (typeof index === 'number') {\n\t\t\t\treturn new Path([...[...Array(index)].flatMap(() => ['config', 'feature']), 'config', 'decorator', ...path.modelArr.slice(3)])\n\t\t\t}\n\t\t}\n\t\treturn path\n\t}, path => {\n\t\tif (path.equals(decoratorsPath)) {\n\t\t\tconst newDecorators: any[] = []\n\t\t\titerateNestedDecorators(model.data, newDecorators)\n\t\t\treturn newDecorators\n\t\t}\n\t\treturn model.get(wrapper.map(path))\n\t}, (path, value, silent) => {\n\t\tif (path.startsWith(featurePath)) {\n\t\t\tconst newDecorators: any[] = []\n\t\t\titerateNestedDecorators(model.data, newDecorators)\n\t\t\tconst newPath =new Path([...[...Array(newDecorators.length - 1)].flatMap(() => ['config', 'feature']), ...path.modelArr])\n\t\t\treturn model.set(newPath, value, silent)\n\t\t} else if (path.startsWith(decoratorsPath)) {\n\t\t\tconst index = path.modelArr[2]\n\t\t\tif (path.modelArr.length === 2) {\n\t\t\t\tconst feature = wrapper.get(featurePath)\n\t\t\t\treturn model.set(new Path(), produceNestedDecorators(feature, value), silent)\n\t\t\t} else if (typeof index === 'number') {\n\t\t\t\tif (path.modelArr.length === 3 && value === undefined) {\n\t\t\t\t\tconst feature = wrapper.get(featurePath)\n\t\t\t\t\tconst newDecorators: any[] = []\n\t\t\t\t\titerateNestedDecorators(model.data, newDecorators)\n\t\t\t\t\tnewDecorators.splice(index, 1)\n\t\t\t\t\tconst newValue = produceNestedDecorators(feature, newDecorators)\n\t\t\t\t\treturn model.set(new Path(), newValue, silent)\n\t\t\t\t} else {\n\t\t\t\t\tconst newPath = new Path([...[...Array(index)].flatMap(() => ['config', 'feature']), 'config', 'decorator', ...path.modelArr.slice(3)])\n\t\t\t\t\treturn model.set(newPath, value, silent)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmodel.set(path, value, silent)\n\t})\n\twrapper.data = {\n\t\ttype: model.data.type,\n\t\tconfig: {\n\t\t\tdecorators,\n\t\t\tfeature,\n\t\t},\n\t}\n\twrapper.errors = model.errors\n\treturn { fields, wrapper }\n}\n\nfunction iterateNestedDecorators(value: any, decorators: any[]): any {\n\tif (value?.type?.replace(/^minecraft:/, '') !== 'decorated') {\n\t\treturn value\n\t}\n\tif (!isObject(value?.config)) {\n\t\treturn value\n\t}\n\tdecorators.push({ id: decorators.length, node: value.config.decorator })\n\treturn iterateNestedDecorators(value.config.feature ?? '', decorators)\n}\n\nfunction produceNestedDecorators(feature: any, decorators: any[]): any {\n\tif (decorators.length === 0) return feature\n\treturn {\n\t\ttype: 'minecraft:decorated',\n\t\tconfig: {\n\t\t\tdecorator: decorators.shift().node,\n\t\t\tfeature: produceNestedDecorators(feature, decorators),\n\t\t},\n\t}\n}\n","import type { DataModel } from '@mcschema/core'\nimport { useErrorBoundary, useState } from 'preact/hooks'\nimport { useModel } from '../../hooks'\nimport { FullNode } from '../../schema/renderHtml'\nimport type { BlockStateRegistry, VersionId } from '../../Schemas'\n\ntype TreePanelProps = {\n\tlang: string,\n\tversion: VersionId,\n\tmodel: DataModel | null,\n\tblockStates: BlockStateRegistry | null,\n\tonError: (message: string) => unknown,\n}\nexport function Tree({ lang, model, blockStates, onError }: TreePanelProps) {\n\tif (!model || !blockStates || lang === 'none') return <>\n\n\tconst [error] = useErrorBoundary(e => {\n\t\tonError(`Error rendering the tree: ${e.message}`)\n\t\tconsole.error(e)\n\t})\n\tif (error) return <>\n\n\tconst [, setState] = useState(0)\n\tuseModel(model, () => {\n\t\tsetState(state => state + 1)\n\t})\n\n\treturn
\n\t\t\n\t
\n}\n","import { getCurrentUrl, Link, route } from 'preact-router'\nimport { Btn, BtnMenu, Icons, Octicon } from '.'\nimport config from '../../config.json'\nimport { locale } from '../Locales'\nimport type { VersionId } from '../Schemas'\nimport { checkVersion } from '../Schemas'\nimport { cleanUrl, getGenerator } from '../Utils'\n\nconst Themes: Record = {\n\tsystem: 'device_desktop',\n\tdark: 'moon',\n\tlight: 'sun',\n}\n\ntype HeaderProps = {\n\tlang: string,\n\ttitle: string,\n\tversion: VersionId,\n\ttheme: string,\n\tchangeTheme: (theme: string) => unknown,\n\tlanguage: string,\n\tchangeLanguage: (language: string) => unknown,\n}\nexport function Header({ lang, title, version, theme, changeTheme, language, changeLanguage }: HeaderProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst gen = getGenerator(getCurrentUrl())\n\n\treturn
\n\t\t
\n\t\t\t{Icons.home}\n\t\t\t

{title}

\n\t\t\t{gen && \n\t\t\t\t{config.generators\n\t\t\t\t\t.filter(g => g.category === gen?.category && checkVersion(version, g.minVersion))\n\t\t\t\t\t.map(g =>\n\t\t\t\t\t\t route(cleanUrl(g.url))} />\n\t\t\t\t\t)}\n\t\t\t}\n\t\t
\n\t\t\n\t
\n}\n","export const Icons = {\n\thome: ,\n\treport: ,\n\tsounds: ,\n}\n","import { Howl } from 'howler'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn, NumberInput, RangeInput, TextInput } from '..'\nimport { getResourceUrl } from '../../DataFetcher'\nimport { locale } from '../../Locales'\nimport type { SoundEvents, VersionAssets } from '../../Manifest'\n\nexport interface SoundConfig {\n\tid: string,\n\tsound: string,\n\tdelay: number,\n\tpitch: number,\n\tvolume: number,\n}\ntype SoundConfigProps = SoundConfig & {\n\tlang: string,\n\tassets: VersionAssets,\n\tsounds: SoundEvents,\n\tonEdit: (changes: Partial) => unknown,\n\tonDelete: () => unknown,\n\tdelayedPlay?: number,\n}\nexport function SoundConfig({ lang, assets, sounds, sound, delay, pitch, volume, onEdit, onDelete, delayedPlay }: SoundConfigProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst [loading, setLoading] = useState(true)\n\tconst [playing, setPlaying] = useState(false)\n\tconst [invalid, setInvalid] = useState(false)\n\tconst howls = useRef([])\n\tconst command = `playsound minecraft:${sound} master @s ~ ~ ~ ${volume} ${pitch}`\n\n\tuseEffect(() => {\n\t\tconst soundEvent = sounds[sound]\n\t\tsetInvalid((soundEvent?.sounds?.length ?? 0) === 0)\n\t\thowls.current.forEach(h => h.stop())\n\t\thowls.current = (soundEvent?.sounds ?? []).map(entry => {\n\t\t\tconst soundPath = typeof entry === 'string' ? entry : entry.name\n\t\t\tconst hash = assets[`minecraft/sounds/${soundPath}.ogg`].hash\n\t\t\tconst url = getResourceUrl(hash)\n\t\t\tconst howl = new Howl({\n\t\t\t\tsrc: [url],\n\t\t\t\tformat: ['ogg'],\n\t\t\t\tvolume,\n\t\t\t\trate: pitch,\n\t\t\t})\n\t\t\thowl.on('end', () => {\n\t\t\t\tsetPlaying(false)\n\t\t\t})\n\t\t\tconst completed = () => {\n\t\t\t\tif (loading && howls.current.every(h => h.state() === 'loaded')) {\n\t\t\t\t\tsetLoading(false)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (howl.state() === 'loaded') {\n\t\t\t\tsetTimeout(() => completed())\n\t\t\t} else {\n\t\t\t\thowl.on('load', () => {\n\t\t\t\t\tcompleted()\n\t\t\t\t})\n\t\t\t}\n\t\t\treturn howl\n\t\t})\n\t\tsetLoading(true)\n\t}, [sound, sounds])\n\n\tuseEffect(() => {\n\t\thowls.current.forEach(h => h.rate(pitch))\n\t}, [pitch])\n\n\tuseEffect(() => {\n\t\thowls.current.forEach(h => h.volume(volume))\n\t}, [volume])\n\n\tconst play = () => {\n\t\tif (loading || invalid) return\n\t\tstop()\n\t\tconst howl = Math.floor(Math.random() * howls.current.length)\n\t\thowls.current[howl].play()\n\t\tsetPlaying(true)\n\t}\n\tconst stop = () => {\n\t\thowls.current.forEach(h => h.stop())\n\t}\n\tuseEffect(() => {\n\t\tif (delayedPlay) setTimeout(() => play(), delay * 50)\n\t}, [delayedPlay])\n\n\tuseEffect(() => {\n\t\treturn () => stop()\n\t}, [])\n\n\tconst [copyActive, setCopyActive] = useState(false)\n\tconst copyTimeout = useRef(undefined)\n\tconst copy = () => {\n\t\tnavigator.clipboard.writeText(command)\n\t\tsetCopyActive(true)\n\t\tif (copyTimeout.current !== undefined) clearTimeout(copyTimeout.current)\n\t\tcopyTimeout.current = setTimeout(() => {\n\t\t\tsetCopyActive(false)\n\t\t}, 2000) as any\n\t}\n\n\treturn
\n\t\t\n\t\t onEdit({ sound })} />\n\t\t\n\t\t onEdit({ delay })} />\n\t\t\n\t\t onEdit({ pitch })} />\n\t\t\n\t\t onEdit({ volume })} />\n\t\t\n\t\t {onDelete(); stop()}} />\n\t
\n}\n","import type { ComponentChildren } from 'preact'\nimport { Icons } from './Icons'\n\ntype ToolCardProps = {\n\ttitle: string,\n\tlink: string,\n\ticon?: keyof typeof Icons,\n\tchildren?: ComponentChildren,\n}\nexport function ToolCard({ title, link, icon, children }: ToolCardProps) {\n\treturn \n\t\t{icon && Icons[icon]}\n\t\t
\n\t\t\t

{title}

\n\t\t\t{children}\n\t\t
\n\t
\n}\n","import { DataModel, Path } from '@mcschema/core'\nimport { getCurrentUrl } from 'preact-router'\nimport { useEffect, useErrorBoundary, useRef, useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport { Analytics } from '../Analytics'\nimport { Ad, Btn, BtnInput, BtnMenu, ErrorPanel, HasPreview, Octicon, PreviewPanel, SourcePanel, Tree } from '../components'\nimport { fetchPreset } from '../DataFetcher'\nimport { useModel } from '../hooks'\nimport { locale } from '../Locales'\nimport type { BlockStateRegistry, VersionId } from '../Schemas'\nimport { checkVersion, getBlockStates, getCollections, getModel } from '../Schemas'\nimport { getGenerator, message } from '../Utils'\n\ntype GeneratorProps = {\n\tlang: string,\n\tchangeTitle: (title: string, versions?: VersionId[]) => unknown,\n\tversion: VersionId,\n\tchangeVersion: (version: VersionId) => unknown,\n\tdefault?: true,\n}\nexport function Generator({ lang, changeTitle, version, changeVersion }: GeneratorProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst [error, setError] = useState(null)\n\tconst [errorBoundary, errorRetry] = useErrorBoundary()\n\tif (errorBoundary) {\n\t\treturn
\n\t}\n\n\tconst gen = getGenerator(getCurrentUrl())\n\tif (!gen) {\n\t\treturn
\n\t}\n\n\tuseEffect(() => {\n\t\tsetError(null)\n\t}, [gen.id, version])\n\n\tconst allowedVersions = config.versions\n\t\t.filter(v => checkVersion(v.id, gen.minVersion))\n\t\t.map(v => v.id as VersionId)\n\n\tchangeTitle(loc('title.generator', loc(gen.id)), allowedVersions)\n\n\tif (!checkVersion(version, gen.minVersion)) {\n\t\tsetError(`The minimum version for this generator is ${gen.minVersion}`)\n\t}\n\n\tconst [model, setModel] = useState(null)\n\tconst [blockStates, setBlockStates] = useState(null)\n\tuseEffect(() => {\n\t\tsetModel(null)\n\t\tgetBlockStates(version)\n\t\t\t.then(b => setBlockStates(b))\n\t\tgetModel(version, gen.id)\n\t\t\t.then(m => setModel(m))\n\t\t\t.catch(e => { console.error(e); setError(message(e)) })\n\t}, [version, gen.id])\n\n\tuseModel(model, () => {\n\t\tsetError(null)\n\t})\n\n\tconst reset = () => {\n\t\tAnalytics.generatorEvent('reset')\n\t\tmodel?.reset(DataModel.wrapLists(model.schema.default()), true)\n\t}\n\tconst undo = (e: MouseEvent) => {\n\t\te.stopPropagation()\n\t\tAnalytics.generatorEvent('undo', 'Menu')\n\t\tmodel?.undo()\n\t}\n\tconst redo = (e: MouseEvent) => {\n\t\te.stopPropagation()\n\t\tAnalytics.generatorEvent('redo', 'Menu')\n\t\tmodel?.redo()\n\t}\n\n\tconst onKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.ctrlKey && e.key === 'z') {\n\t\t\tAnalytics.generatorEvent('undo', 'Hotkey')\n\t\t\tmodel?.undo()\n\t\t} else if (e.ctrlKey && e.key === 'y') {\n\t\t\tAnalytics.generatorEvent('redo', 'Hotkey')\n\t\t\tmodel?.redo()\n\t\t}\n\t}\n\tuseEffect(() => {\n\t\tdocument.addEventListener('keyup', onKeyUp)\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('keyup', onKeyUp)\n\t\t}\n\t}, [model])\n\n\tconst [presetFilter, setPresetFilter] = useState('')\n\tconst [presetResults, setPresetResults] = useState([])\n\tuseEffect(() => {\n\t\tgetCollections(version)\n\t\t\t.then(collections => {\n\t\t\t\tconst terms = (presetFilter ?? '').trim().split(' ')\n\t\t\t\tconst presets = collections.get(gen.id)\n\t\t\t\t\t.map(p => p.slice(10))\n\t\t\t\t\t.filter(p => terms.every(t => p.includes(t)))\n\t\t\t\tif (presets) {\n\t\t\t\t\tsetPresetResults(presets)\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(e => { console.error(e); setError(e.message) })\n\t}, [version, gen.id, presetFilter])\n\n\tconst loadPreset = (id: string) => {\n\t\tAnalytics.generatorEvent('load-preset', id)\n\t\tfetchPreset(version, gen.path ?? gen.id, id).then(preset => {\n\t\t\tconst seed = model?.get(new Path(['generator', 'seed']))\n\t\t\tif (preset?.generator?.seed !== undefined && seed !== undefined) {\n\t\t\t\tpreset.generator.seed = seed\n\t\t\t\tif (preset.generator.biome_source?.seed !== undefined) {\n\t\t\t\t\tpreset.generator.biome_source.seed = seed\n\t\t\t\t}\n\t\t\t}\n\t\t\tmodel?.reset(DataModel.wrapLists(preset), false)\n\t\t})\n\t}\n\n\tconst [sourceShown, setSourceShown] = useState(window.innerWidth > 820)\n\tconst [doCopy, setCopy] = useState(0)\n\tconst [doDownload, setDownload] = useState(0)\n\tconst [doImport, setImport] = useState(0)\n\n\tconst copySource = () => {\n\t\tAnalytics.generatorEvent('copy')\n\t\tsetCopy(doCopy + 1)\n\t}\n\tconst downloadSource = () => {\n\t\tAnalytics.generatorEvent('download')\n\t\tsetDownload(doDownload + 1)\n\t}\n\tconst importSource = () => {\n\t\tAnalytics.generatorEvent('import')\n\t\tsetSourceShown(true)\n\t\tsetImport(doImport + 1)\n\t}\n\tconst toggleSource = () => {\n\t\tAnalytics.generatorEvent('toggle-output', !sourceShown ? 'visible' : 'hidden')\n\t\tsetSourceShown(!sourceShown)\n\t\tsetCopy(0)\n\t\tsetDownload(0)\n\t\tsetImport(0)\n\t}\n\n\tconst [copyActive, setCopyActive] = useState(false)\n\tconst copyTimeout = useRef(undefined)\n\tconst copySuccess = () => {\n\t\tsetCopyActive(true)\n\t\tif (copyTimeout.current !== undefined) clearTimeout(copyTimeout.current)\n\t\tcopyTimeout.current = setTimeout(() => {\n\t\t\tsetCopyActive(false)\n\t\t}, 2000) as any\n\t}\n\n\tconst [previewShown, setPreviewShown] = useState(false)\n\tconst hasPreview = HasPreview.includes(gen.id)\n\tif (previewShown && !hasPreview) setPreviewShown(false)\n\tlet actionsShown = 1\n\tif (hasPreview) actionsShown += 1\n\tif (sourceShown) actionsShown += 2\n\n\tconst togglePreview = () => {\n\t\tAnalytics.generatorEvent('toggle-preview', !previewShown ? 'visible' : 'hidden')\n\t\tsetPreviewShown(!previewShown)\n\t}\n\n\treturn <>\n\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t{presetResults.map(preset => loadPreset(preset)} />)}\n\t\t\t\t\t
\n\t\t\t\t\t{presetResults.length === 0 && }\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{allowedVersions.reverse().map(v =>\n\t\t\t\t\t\t changeVersion(v)} />\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t{error && setError(null)} />}\n\t\t\t\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t{previewShown ? Octicon.x_circle : Octicon.play}\n\t\t\t
\n\t\t\t
\n\t\t\t\t{Octicon.download}\n\t\t\t
\n\t\t\t
\n\t\t\t\t{copyActive ? Octicon.check : Octicon.clippy}\n\t\t\t
\n\t\t\t
\n\t\t\t\t{sourceShown ? Octicon.chevron_right : Octicon.code}\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t\n\t\t
\n\t\t
\n\t\t\t\n\t\t
\n\t\n}\n","import config from '../../config.json'\nimport { ToolCard } from '../components'\nimport { locale } from '../Locales'\nimport { cleanUrl } from '../Utils'\n\ntype HomeProps = {\n\tlang: string,\n\tchangeTitle: (title: string) => unknown,\n\tpath?: string,\n}\nexport function Home({ lang, changeTitle }: HomeProps) {\n\tconst loc = locale.bind(null, lang)\n\tchangeTitle(loc('title.home'))\n\treturn
\n\t\t
\n\t\t\t{config.generators.filter(g => !g.category).map(g => \n\t\t\t\t\n\t\t\t)}\n\t\t\t\n\t\t\t
\n\t\t\t\n\t\t\t\t

Analyse your performance reports

\n\t\t\t
\n\t\t\t\n\t\t\t\t

Browse through and mix all the vanilla sounds

\n\t\t\t
\n\t\t\t\n\t\t\t\t

Convert your 1.16 data packs to 1.17

\n\t\t\t
\n\t\t
\n\t
\n}\n","import { fetchAssets, fetchManifest, fetchSounds } from './DataFetcher'\nimport type { VersionId } from './Schemas'\n\nexport type VersionManifest = {\n\tlatest: {\n\t\trelease: string,\n\t\tsnapshot: string,\n\t},\n\tversions: {\n\t\tid: string,\n\t\ttype: string,\n\t\turl: string,\n\t}[],\n}\nlet Manifest: VersionManifest | Promise | null = null\n\nexport type VersionAssets = {\n\t[key: string]: {\n\t\thash: string,\n\t},\n}\nconst VersionAssets: Record> = {}\n\nexport type SoundEvents = {\n\t[key: string]: {\n\t\tsounds: (string | { name: string })[],\n\t},\n}\nconst SoundEvents: Record> = {}\n\nexport async function getManifest() {\n\tif (!Manifest) {\n\t\tManifest = fetchManifest()\n\t}\n\treturn Manifest\n}\n\nexport async function getAssets(version: VersionId) {\n\tif (!VersionAssets[version]) {\n\t\tVersionAssets[version] = (async () => {\n\t\t\tconst manifest = await getManifest()\n\t\t\treturn await fetchAssets(version, manifest)\n\t\t})()\n\t}\n\treturn VersionAssets[version]\n}\n\nexport async function getSounds(version: VersionId) {\n\tif (!SoundEvents[version]) {\n\t\tSoundEvents[version] = (async () => {\n\t\t\tconst assets = await getAssets(version)\n\t\t\treturn await fetchSounds(version, assets)\n\t\t})()\n\t}\n\treturn SoundEvents[version]\n}\n","import { useEffect, useRef, useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport { Ad, Btn, BtnMenu, ErrorPanel, SoundConfig, TextInput } from '../components'\nimport { locale } from '../Locales'\nimport type { SoundEvents, VersionAssets } from '../Manifest'\nimport { getAssets, getSounds } from '../Manifest'\nimport type { VersionId } from '../Schemas'\nimport { hexId, message } from '../Utils'\n\ntype SoundsProps = {\n\tpath?: string,\n\tlang: string,\n\tchangeTitle: (title: string, versions?: VersionId[]) => unknown,\n\tversion: VersionId,\n\tchangeVersion: (version: VersionId) => unknown,\n}\nexport function Sounds({ lang, changeTitle, version, changeVersion }: SoundsProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst [error, setError] = useState(null)\n\tchangeTitle(loc('title.sounds'))\n\n\tconst [assets, setAssets] = useState({})\n\tconst [sounds, setSounds] = useState({})\n\tconst soundKeys = Object.keys(sounds ?? {})\n\tuseEffect(() => {\n\t\tgetAssets(version)\n\t\t\t.then(assets => { setAssets(assets); return getSounds(version) })\n\t\t\t.then(sounds => { if (sounds) setSounds(sounds) })\n\t\t\t.catch(e => { console.error(e); setError(message(e)) })\n\t}, [version])\n\n\tconst [search, setSearch] = useState('')\n\tconst [configs, setConfigs] = useState([])\n\tconst addConfig = () => {\n\t\tsetConfigs([{ id: hexId(), sound: search, delay: 0, pitch: 1, volume: 1 }, ...configs])\n\t}\n\tconst editConfig = (id: string) => (changes: Partial) => {\n\t\tsetConfigs(configs.map(c => c.id === id ? { ...c, ...changes } : c))\n\t}\n\tconst deleteConfig = (id: string) => () => {\n\t\tsetConfigs(configs.filter(c => c.id !== id))\n\t}\n\n\tconst [delayedPlay, setDelayedPlay] = useState(0)\n\tconst playAll = () => {\n\t\tsetDelayedPlay(delayedPlay + 1)\n\t}\n\n\tconst download = useRef(null)\n\tconst downloadFunction = () => {\n\t\tconst hasDelay = configs.some(c => c.delay > 0)\n\t\tconst content = configs\n\t\t\t.sort((a, b) => a.delay - b.delay)\n\t\t\t.map(c => `${hasDelay ? `execute if score @s delay matches ${c.delay} run ` : ''}playsound minecraft:${c.sound} master @s ~ ~ ~ ${c.volume} ${c.pitch}`)\n\t\t\t.join('\\n')\n\t\tdownload.current.setAttribute('href', 'data:text/plain;charset=utf-8,' + content + '%0A')\n\t\tdownload.current.setAttribute('download', 'sounds.mcfunction')\n\t\tdownload.current.click()\n\t}\n\n\treturn
\n\t\t\n\t\t{error && setError(null)} />}\n\t\t{soundKeys.length > 0 && <>\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t{configs.length > 1 && }\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{config.versions.reverse().map(v =>\n\t\t\t\t\t\t changeVersion(v.id as VersionId)} />\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\t{configs.map(c => )}\n\t\t\t
\n\t\t\t\n\t\t}\n\t\t\n\t\t\t{soundKeys.map(s => \n\t
\n}\n","import config from '../../config.json'\nimport { ToolCard } from '../components'\nimport { locale } from '../Locales'\nimport { cleanUrl } from '../Utils'\n\ntype WorldgenProps = {\n\tlang: string,\n\tchangeTitle: (title: string) => unknown,\n\tpath?: string,\n}\nexport function Worldgen({ lang, changeTitle }: WorldgenProps) {\n\tconst loc = locale.bind(null, lang)\n\tchangeTitle(loc('title.generator_category', loc('worldgen')))\n\treturn
\n\t\t
\n\t\t\t{config.generators.filter(g => g.category === 'worldgen').map(g => \n\t\t\t\t\n\t\t\t)}\n\t\t
\n\t
\n}\n","import { render } from 'preact'\nimport type { RouterOnChangeArgs } from 'preact-router'\nimport { Router } from 'preact-router'\nimport { useEffect, useState } from 'preact/hooks'\nimport config from '../config.json'\nimport '../styles/global.css'\nimport '../styles/nodes.css'\nimport { Analytics } from './Analytics'\nimport { Header } from './components'\nimport { loadLocale, locale, Locales } from './Locales'\nimport { Generator, Home, Sounds, Worldgen } from './pages'\nimport type { VersionId } from './Schemas'\nimport { Store } from './Store'\nimport { cleanUrl } from './Utils'\n\nconst VERSIONS_IN_TITLE = 3\n\nfunction Main() {\n\tconst [lang, setLanguage] = useState('none')\n\tconst changeLanguage = async (language: string) => {\n\t\tif (!Locales[language]) {\n\t\t\tawait loadLocale(language)\n\t\t}\n\t\tAnalytics.setLanguage(language)\n\t\tStore.setLanguage(language)\n\t\tsetLanguage(language)\n\t}\n\tuseEffect(() => {\n\t\t(async () => {\n\t\t\tconst target = Store.getLanguage()\n\t\t\tawait Promise.all([\n\t\t\t\tloadLocale('en'),\n\t\t\t\t...(target !== 'en' ? [loadLocale(target)] : []),\n\t\t\t])\n\t\t\tsetLanguage(target)\n\t\t})()\n\t}, [])\n\n\tconst [theme, setTheme] = useState(Store.getTheme())\n\tconst changeTheme = (theme: string) => {\n\t\tAnalytics.setTheme(theme)\n\t\tStore.setTheme(theme)\n\t\tsetTheme(theme)\n\t}\n\tuseEffect(() => {\n\t\tdocument.documentElement.setAttribute('data-theme', theme)\n\t}, [theme])\n\n\tconst [version, setVersion] = useState(Store.getVersion())\n\tconst changeVersion = (version: VersionId) => {\n\t\tAnalytics.setVersion(version)\n\t\tStore.setVersion(version)\n\t\tsetVersion(version)\n\t}\n\n\tconst [title, setTitle] = useState(locale(lang, 'title.home'))\n\tconst changeTitle = (title: string, versions?: VersionId[]) => {\n\t\tversions ??= config.versions.map(v => v.id as VersionId)\n\t\tversions.splice(0, versions.length - VERSIONS_IN_TITLE)\n\t\tdocument.title = `${title} Minecraft ${versions.join(', ')}`\n\t\tsetTitle(title)\n\t}\n\n\tconst changeRoute = (e: RouterOnChangeArgs) => {\n\t\t// Needs a timeout to ensure the title is set correctly\n\t\tsetTimeout(() => Analytics.pageview(cleanUrl(e.url)))\n\t}\n\n\treturn <>\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n}\n\nrender(
, document.body)\n"],"names":["Analytics","type","id","getElementById","remove","window","load","data-ea-publisher","data-ea-type","class","icon","label","active","clazz","tooltip","tooltipLoc","onClick","aria-label","Octicon","large","doSelect","value","placeholder","onChange","onInput","e","value2","target","ref","useRef","current","select","stopPropagation","size","draw","onDrag","onHover","onLeave","inputs","canvas","dragStart","dragRequest","dragPending","dragBusy","onMouseDown","offsetX","offsetY","onMouseMove","x","clientWidth","y2","clientHeight","dx","dy","requestAnimationFrame","async","dx2","dy2","onMouseUp","onMouseLeave","addEventListener","body","removeEventListener","redraw","redrawCount","ctx","getContext","s2","width","height","img","getImageData","ownCount","putImageData","setActive","useState","hider","model","invalidated","listener","[object Object]","addListener","removeListener","relative","children","useFocus","Btn","__spreadProps","Analytics2","ID_SITE","ID_GENERATOR","category","action","index","pageview","page","setLanguage","language","setTheme","theme","setVersion","version","setPreview","preview","generatorEvent","alert","xmlns","viewBox","fill-rule","d","archive","arrow_left","arrow_right","check","chevron_down","chevron_right","chevron_up","clippy","code","dash","device_desktop","download","duplicate","eye","eye_closed","gear","globe","history","info","issue_opened","kebab_horizontal","link","mark_github","moon","play","plus","plus_circle","search","sun","sync","tag","terminal","three_bars","trashcan","unfold","upload","x_circle","error","onDismiss","href","component","props","evt","fn","onKeyDown","onEnter","key","__spreadValues","displayName","name","TextInput","BaseInput","v","NumberInput","Number","RangeInput","scriptRel","seen","__vitePreload","baseModule","deps","relList","document","createElement","supports","Promise","all","map","dep","isCss","endsWith","cssSelector","querySelector","rel","as","crossOrigin","head","appendChild","res","rej","then","Locales","fallback","English","params","replace","parseInt","match","slice","resolveLocaleParams","en","langConfig","config","languages","find","lang","data","__variableDynamicImportRuntime0__","schema","schemas","__variableDynamicImportRuntime1__","default","obj","dec2hex","dec","toString","substr","length","arr","Uint8Array","crypto","getRandomValues","Array","from","join","BigInt","Math","floor","random","MAX_SAFE_INTEGER","seed","dimensions","get","Path","set","keys","forEach","url","replaceAll","trimmedUrl","generators","g2","str","h","abs","i","imul","charCodeAt","hashString","a2","b","c","max","min","lerp","Error","message","deepClone","rfdc","constructor","isArray","deepEqual","valueOf","Object","prototype","hasOwnProperty","call","VersionIds","Versions","Models","versionGetter","1.15","java15","1.16","java16","1.17","java17","1.18","java18","CachedDecorator","CachedFeature","collections","getCollections","blockStates","versionId","collectionTarget","blockStateTarget","versions","JSON","stringify","debug","dynamic","refs","filter","localStorage","getItem","r","hash","matches","cache","caches","open","promises","request","push","delete","warn","deleteMatching","startsWith","setItem","fetchRegistries","fetchBlockStateMap","fetchDynamicRegistries","fetchData","getSchemas","minVersionId","maxVersionId","findIndex","minVersion","maxVersion","removeItem","mcdataUrl","vanillaDatapackUrl","registries","checkVersion","mcdata_master","getData","data2","k","entries","register","path","values","properties","states","assign","vanilla_datapack_summary","registry","versionData","vanilla_datapack_data","fetch","json","cacheResponse","ok","fetchResponse","responseData","put","Response","cacheState","biomeSourceCache","climateSamplerCache","state","options","newState","octaves","FixedBiome","biome","shift","scale","numBiomes","biomes","_y","z","node","preset","NetherPreset18","NetherPreset","fetchPreset","generator","biome_source","OverworldPreset18","DataModel","unwrapLists","MultiNoise","fromJson","noise","config2","firstOctave","clamp","NormalNoise","Random","n","n2","sample","minDist","Infinity","minBiome","parameters","p","dist","square","altitude","temperature","humidity","weirdness","offset","getBiomeSource","settings","NoiseGeneratorSettings","noiseSampler","NoiseSampler","getClimate","bind","biomeSource","climateSampler","biomeColors","color","VanillaColors","stringToColor","minecraft:badlands","minecraft:badlands_plateau","minecraft:bamboo_jungle","minecraft:bamboo_jungle_hills","minecraft:basalt_deltas","minecraft:beach","minecraft:birch_forest","minecraft:birch_forest_hills","minecraft:cold_ocean","minecraft:crimson_forest","minecraft:dark_forest","minecraft:dark_forest_hills","minecraft:deep_cold_ocean","minecraft:deep_frozen_ocean","minecraft:deep_lukewarm_ocean","minecraft:deep_ocean","minecraft:deep_warm_ocean","minecraft:desert","minecraft:desert_hills","minecraft:desert_lakes","minecraft:end_barrens","minecraft:end_highlands","minecraft:end_midlands","minecraft:eroded_badlands","minecraft:flower_forest","minecraft:forest","minecraft:frozen_ocean","minecraft:frozen_river","minecraft:giant_spruce_taiga","minecraft:giant_spruce_taiga_hills","minecraft:giant_tree_taiga","minecraft:giant_tree_taiga_hills","minecraft:gravelly_mountains","minecraft:ice_spikes","minecraft:jungle","minecraft:jungle_edge","minecraft:jungle_hills","minecraft:lukewarm_ocean","minecraft:modified_badlands_plateau","minecraft:modified_gravelly_mountains","minecraft:modified_jungle","minecraft:modified_jungle_edge","minecraft:modified_wooded_badlands_plateau","minecraft:mountain_edge","minecraft:mountains","minecraft:mushroom_field_shore","minecraft:mushroom_fields","minecraft:nether_wastes","minecraft:ocean","minecraft:plains","minecraft:river","minecraft:savanna","minecraft:savanna_plateau","minecraft:shattered_savanna","minecraft:shattered_savanna_plateau","minecraft:small_end_islands","minecraft:snowy_beach","minecraft:snowy_mountains","minecraft:snowy_taiga","minecraft:snowy_taiga_hills","minecraft:snowy_taiga_mountains","minecraft:snowy_tundra","minecraft:soul_sand_valley","minecraft:stone_shore","minecraft:sunflower_plains","minecraft:swamp","minecraft:swamp_hills","minecraft:taiga","minecraft:taiga_hills","minecraft:taiga_mountains","minecraft:tall_birch_forest","minecraft:tall_birch_hills","minecraft:the_end","minecraft:the_void","minecraft:warm_ocean","minecraft:warped_forest","minecraft:wooded_badlands_plateau","minecraft:wooded_hills","minecraft:wooded_mountains","minecraft:snowy_slopes","minecraft:lofty_peaks","minecraft:snowcapped_peaks","minecraft:stony_peaks","minecraft:grove","minecraft:meadow","minecraft:lush_caves","minecraft:dripstone_caves","altitude_noise","amplitudes","temperature_noise","humidity_noise","weirdness_noise","continentalness","erosion","depth","terrain","featureColors","placements","features","biomeInfoNoise","PerlinNoise","fork","seaLevel","nextFloat","nextInt","sampleInt","this","fill","pos","feature","j2","base","spread","normalize","min_inclusive","max_inclusive","source","indexOf","useFeature","featureFn","Features","decorator2","decoratorFn","Decorators","decorated","getPositions","decorator","getPlacements","random_boolean_selector","feature_true","feature_false","random_selector","f","chance","simple_random_selector","count","count_extra","extra_chance","extra_count","count_multilayer","count_noise","noise_level","below_noise","above_noise","count_noise_biased","factor","noise_factor","ceil","noise_offset","noise_to_count_ratio","dark_oak_tree","_config","_","outer","flatMap","inner","depth_average","decorateY","baseline","emerald_ore","fire","glowstone","heightmap","heightmap_spread_double","heightmap_world_surface","iceberg","lava_lake","nope","range","maximum","top_offset","bottom_offset","range_biased","range_very_biased","spread_32_above","top_solid_heightmap","magma","surface_relative_threshold","water_lake","minLimitPerlinNoise","maxLimitPerlinNoise","mainPerlinNoise","depthNoise","xOffset","chunkWidth","size_horizontal","chunkHeight","size_vertical","chunkCountY","amplified","biomeDepth","biomeScale","noiseColumnCache","cx","ox","noise1","fillNoiseColumn","noise2","yy","oy","cachedColumn","xzScale","sampling","xz_scale","yScale","y_scale","xzFactor","xz_factor","yFactor","y_factor","randomDensity","random_density_offset","getRandomDensity","sampleAndClampNoise","getOctaveNoise","zo","falloff","density_factor","density_offset","top_slide","clampedLerp","bottom_slide","x2","wrap","y22","z2","minLimitNoise","maxLimitNoise","mainNoise","colors","minecraft:air","minecraft:water","minecraft:lava","minecraft:stone","minecraft:netherrack","minecraft:end_stone","generatorCache","chunkCache","bottomSlide","topSlide","shape","biomeFactor","biomeOffset","peaks","biomePeaks","nearWater","NoiseChunkGenerator","getCached","LevelSlice","minY","generator2","state2","getBlockState","getName","OldNoiseChunkGenerator","reset","row","iterateNoiseColumn","reverse","getColor","minX","filled","chunks","cached","Chunk","ChunkPos","create","Z","chunk","chunkIndex","BiomeSourcePreview","shown","setScale","focused","setFocused","refineTimeout","getOctaves","calculateState","useCanvas","oz","col","worldX","worldZ","getBiomeColor","getBiome","biomeMap","setTimeout","xx","zz","toWorld","changeScale","newScale","locale","newSeed","DecoratorPreview","setSeed","randomSeed","NoiseSettingsPreview","loc","setBiomeFactor","setBiomeOffset","setBiomePeaks","hasPeaks","worldY","min_y","BtnMenu","BtnInput","HasPreview","setCount","transformOutput","switchNode","hook","blockState","validation","validator","relativePath","includes","getActiveFields","activeFields","enabled","Store","Store2","getLanguage","getTheme","getVersion","getIndent","getSoundsVersion","setIndent","indent","setSoundsVersion","INDENT","2_spaces","4_spaces","tabs","doCopy","doDownload","doImport","copySuccess","onError","retransform","getOutput","useCallback","model2","blockStates2","ModelPath","output","clipboard","writeText","content","encodeURIComponent","setAttribute","click","changeIndent","onBlur","parse","wrapLists","spellcheck","autocorrect","style","mapper","getter","setter","silent","selectRegistries","hiddenFields","flattenedFields","inlineFields","nbtFields","fixedLists","keysModel","MapNode","StringNode","historyMax","prefix","suffix","renderHtml","some","data-category","boolean","BooleanSuffix","choices","choice","activeCase","contextPath","context","getModel","getArray","choiceContextPath","choiceContext","inject","c2","newValue","change","pathLocale","contextPush","expand","collapse","isToggled","useToggles","maxShown","setMaxShown","maxLength","ErrorPopup","modelPush","hexId","cValue","cId","cPath","canToggle","toggle","nested","Collapsed","MemoedTreeNode","actions","onSelect","splice","disabled","keyPath","keysSchema","enum","last","errors","add","ObjectNode","fromEntries","cSchema","number","NumberSuffix","getChildModelPath","isObject","isDecorated","wrapper","fields","originalFields","decorators","iterateNestedDecorators","ListNode","featurePath","decoratorsPath","ModelWrapper","path2","modelArr","equals","newDecorators","newPath","feature2","produceNestedDecorators","createDecoratorsWrapper","optional","onExpand","onCollapse","newCtx","pools","loot","child","cPrefix","cSuffix","cBody","isFlattened","isInlined","HelpPopup","string","StringSuffix","toggleState","setToggleState","Map","toggleAll","setToggleAll","ctrlKey","integer","parsed","parseFloat","padStart","getValues","isEnum","additional","context2","pool","datalistId","list","values2","memo","onContextMenu","preventDefault","a","description","navigator","prev","next","result","withModel","getAll","e2","message2","popupIcon","popup","useErrorBoundary","setState","FullNode","Themes","system","dark","light","title","changeTheme","changeLanguage","gen","getGenerator","getCurrentUrl","Link","Icons","home","route","cleanUrl","th","rx","y","report","sounds","cy","clip-rule","assets","sound","delay","pitch","volume","onEdit","onDelete","delayedPlay","loading","setLoading","playing","setPlaying","invalid","setInvalid","howls","command","soundEvent","h2","stop","soundPath","entry","getResourceUrl","howl","Howl","src","format","rate","on","completed","every","copyActive","setCopyActive","copyTimeout","step","toFixed","changeTitle","changeVersion","setError","errorBoundary","errorRetry","ErrorPanel","allowedVersions","setModel","setBlockStates","Reference","ChoiceNode","schemaName","validate","m","catch","onKeyUp","undo","redo","presetFilter","setPresetFilter","presetResults","setPresetResults","terms","trim","split","presets","t","sourceShown","setSourceShown","innerWidth","setCopy","setDownload","setImport","previewShown","setPreviewShown","hasPreview","actionsShown","Ad","loadPreset","Tree","PreviewPanel","SourcePanel","ToolCard","Manifest","VersionAssets","SoundEvents","fetchManifest","manifest","getManifest","latest","snapshot","versionMeta","assetIndex","objects","fetchAssets","getAssets","fetchSounds","setAssets","setSounds","soundKeys","assets2","getSounds","sounds2","setSearch","configs","setConfigs","addConfig","deleteConfig","setDelayedPlay","hasDelay","sort","SoundConfig","changes","loadLocale","documentElement","version2","setTitle","title2","Header","theme2","Router","Home","Worldgen","Sounds","Generator","render","Main"],"mappings":"gpBAAiBA,qkLCQEC,KAAEA,KAAMC,cAChB,6BACAC,eAAe,sBAAmBC,SACvC,eAAgBC,mBACRC,SAEV,MAEK,MAAD,CAAKC,oBAAkB,mBAAmBC,eAAcP,EAA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ClDwvB,EAAc,CAAC6E,EAAenvB,iBACtBrF,EAAOqF,SAAS9G,QAASf,EAAEhK,QAC/BszB,OAAO,EAAGzhB,EAAStE,OA3CJ,YA4CfurB,MAAQ,GAAGkI,eAAmBnvB,EAAS/D,KAAK,UAC5CkzB,sBASRC,GAADt3B,KAAY,CAACgD,KAAAA,EAAMmsB,MAAAA,EAAO3yB,QAAAA,EAASF,MAAAA,EAAOF,SAAU4G,EAAMqsB,eAlDpC31B,MAAO0C,IACxB8F,GAAQ9F,UACN66B,GAAW76B,KAERD,YAAYC,MAChBD,YAAYC,KACNA,IA4C8DgzB,YA9BtDmI,MACVl7B,SAASk7B,MACbl7B,SAASk7B,KACNA,SA4BRC,EAAD,CAAQ9/B,SAPYE,gBAET,IAAMzB,EAAU8F,SAAS4zB,GAASj4B,EAAEoN,YAM7CyyB,GAADz3B,GAAM8K,KAAK,KAAQ,CAAC9H,KAAAA,EAAMwvB,YAAAA,OACzBkF,GAAD13B,GAAU8K,KAAK,aAAgB,CAAC9H,KAAAA,EAAMwvB,YAAAA,OACrCmF,GAAD33B,GAAQ8K,KAAK,WAAc,CAAC9H,KAAAA,EAAMxG,QAAAA,EAASg2B,YAAAA,EAAaC,cAAAA,OACvDmF,GAAD53B,GAAWsD,SAAO,GAAK,CAACN,KAAAA,EAAMxG,QAAAA,EAASg2B,YAAAA,EAAaC,cAAAA,OAKvDoF,IAAQC,GAAD,MAAU/2B,SAAS/G"} \ No newline at end of file diff --git a/dimension-type/index.html b/dimension-type/index.html index c7d5bfd5..4f9ccc33 100644 --- a/dimension-type/index.html +++ b/dimension-type/index.html @@ -20,7 +20,7 @@ Dimension Type Generator Minecraft 1.16, 1.17, 1.18 - + diff --git a/dimension/index.html b/dimension/index.html index b2a6bc84..b18aed6e 100644 --- a/dimension/index.html +++ b/dimension/index.html @@ -20,7 +20,7 @@ Dimension Generator Minecraft 1.16, 1.17, 1.18 - + diff --git a/index.html b/index.html index f4f2c219..3ee3d463 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,7 @@ Data Pack Generators Minecraft 1.15, 1.16, 1.17 - + diff --git a/item-modifier/index.html b/item-modifier/index.html index ae02e45c..7e5d41fe 100644 --- a/item-modifier/index.html +++ b/item-modifier/index.html @@ -20,7 +20,7 @@ Item Modifier Generator Minecraft 1.17, 1.18 - + diff --git a/loot-table/index.html b/loot-table/index.html index f29e74b4..335a210e 100644 --- a/loot-table/index.html +++ b/loot-table/index.html @@ -20,7 +20,7 @@ Loot Table Generator Minecraft 1.16, 1.17, 1.18 - + diff --git a/predicate/index.html b/predicate/index.html index 4cac711d..bbfea1e6 100644 --- a/predicate/index.html +++ b/predicate/index.html @@ -20,7 +20,7 @@ Predicate Generator Minecraft 1.16, 1.17, 1.18 - + diff --git a/recipe/index.html b/recipe/index.html index bd2049a2..93435da0 100644 --- a/recipe/index.html +++ b/recipe/index.html @@ -20,7 +20,7 @@ Recipe Generator Minecraft 1.16, 1.17, 1.18 - + diff --git a/sounds/index.html b/sounds/index.html index c48cc44c..bcd3749f 100644 --- a/sounds/index.html +++ b/sounds/index.html @@ -20,7 +20,7 @@ Sound Explorer Minecraft 1.16, 1.17, 1.18 - + diff --git a/world/index.html b/world/index.html index 499fb472..661c6a66 100644 --- a/world/index.html +++ b/world/index.html @@ -20,7 +20,7 @@ World Settings Generator Minecraft 1.16, 1.17, 1.18 - + diff --git a/worldgen/biome/index.html b/worldgen/biome/index.html index 8083de67..4b539b67 100644 --- a/worldgen/biome/index.html +++ b/worldgen/biome/index.html @@ -20,7 +20,7 @@ Biome Generator Minecraft 1.16, 1.17, 1.18 - + diff --git a/worldgen/carver/index.html b/worldgen/carver/index.html index b4c55176..1881a40a 100644 --- a/worldgen/carver/index.html +++ b/worldgen/carver/index.html @@ -20,7 +20,7 @@ Carver Generator Minecraft 1.16, 1.17, 1.18 - + diff --git a/worldgen/feature/index.html b/worldgen/feature/index.html index 5d3ff03e..4ec33280 100644 --- a/worldgen/feature/index.html +++ b/worldgen/feature/index.html @@ -20,7 +20,7 @@ Feature Generator Minecraft 1.16, 1.17, 1.18 - + diff --git a/worldgen/noise-settings/index.html b/worldgen/noise-settings/index.html index fa75d973..ac30d266 100644 --- a/worldgen/noise-settings/index.html +++ b/worldgen/noise-settings/index.html @@ -20,7 +20,7 @@ Noise Settings Generator Minecraft 1.16, 1.17, 1.18 - + diff --git a/worldgen/processor-list/index.html b/worldgen/processor-list/index.html index 05af61d8..09dfefa7 100644 --- a/worldgen/processor-list/index.html +++ b/worldgen/processor-list/index.html @@ -20,7 +20,7 @@ Processor List Generator Minecraft 1.16, 1.17, 1.18 - + diff --git a/worldgen/structure-feature/index.html b/worldgen/structure-feature/index.html index a6ed4f91..879f13a0 100644 --- a/worldgen/structure-feature/index.html +++ b/worldgen/structure-feature/index.html @@ -20,7 +20,7 @@ Structure Feature Generator Minecraft 1.16, 1.17, 1.18 - + diff --git a/worldgen/surface-builder/index.html b/worldgen/surface-builder/index.html index aa1faddc..99a59e30 100644 --- a/worldgen/surface-builder/index.html +++ b/worldgen/surface-builder/index.html @@ -20,7 +20,7 @@ Surface Builder Generator Minecraft 1.16, 1.17, 1.18 - + diff --git a/worldgen/template-pool/index.html b/worldgen/template-pool/index.html index c5d2e9e1..eef61000 100644 --- a/worldgen/template-pool/index.html +++ b/worldgen/template-pool/index.html @@ -20,7 +20,7 @@ Template Pool Generator Minecraft 1.16, 1.17, 1.18 - +