From 2d6c0231348d3710e570163b6b42c5f63de0b07c Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 30 Apr 2023 18:18:06 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20thepaper?= =?UTF-8?q?pilot/Planar-Pioneers@2a362a95c3be424c4c9a0a882ddb59643bf27aec?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/{gameLoop.7304201e.js => gameLoop.bd6b5c0b.js} | 2 +- assets/{index.13ad3786.js => index.86288ff3.js} | 4 ++-- index.html | 2 +- sw.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename assets/{gameLoop.7304201e.js => gameLoop.bd6b5c0b.js} (92%) rename assets/{index.13ad3786.js => index.86288ff3.js} (80%) diff --git a/assets/gameLoop.7304201e.js b/assets/gameLoop.bd6b5c0b.js similarity index 92% rename from assets/gameLoop.7304201e.js rename to assets/gameLoop.bd6b5c0b.js index 0195537..bc7ee5c 100644 --- a/assets/gameLoop.7304201e.js +++ b/assets/gameLoop.bd6b5c0b.js @@ -1 +1 @@ -import{_ as d,s as p,p as e,a as o,l as T,D as l,b as m,g as u}from"./index.13ad3786.js";import"./vue.c16a309b.js";import{b2 as c}from"./@vue.6b211d3c.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.dccec454.js";import"./vue-next-select.ded54c4a.js";import"./vuedraggable.1879de79.js";import"./amator.1e5a40c8.js";import"./bezier-easing.a990b400.js";import"./sortablejs.a0f68e5e.js";import"./vue-textarea-autosize.35804eaf.js";import"./vue-panzoom.8ce6f9b1.js";import"./panzoom.30c56ba6.js";import"./wheel.f2ae740f.js";import"./ngraph.events.083734c6.js";import"./vue-toastification.9c2dad53.js";import"./unique-names-generator.5494b30b.js";let n=null,f=null;function a(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const r=i;if(o.lastTenTicks.push(r),o.lastTenTicks.length>10&&(o.lastTenTicks=o.lastTenTicks.slice(1)),!((f==null?void 0:f.value)&&!e.keepGoing)&&!o.hasNaN&&(i=Math.max(i,0),e.devSpeed!==0)){if(T.value=!1,e.offlineTime!=null){if(l.gt(e.offlineTime,m.offlineLimit*3600)&&(e.offlineTime=m.offlineLimit*3600),l.gt(e.offlineTime,0)&&e.devSpeed!==0){const s=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-s,i+=s}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||l.lt(e.offlineTime,0))&&(e.offlineTime=null)}i=Math.min(i,m.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),!l.eq(i,0)&&(e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308),u.emit("update",i,r),p.unthrottled?(requestAnimationFrame(a),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(a,50)))}}async function M(){f=(await d(()=>import("./index.13ad3786.js").then(function(t){return t.c}),["assets/index.13ad3786.js","assets/index.83961fb5.css","assets/@fontsource.f66d05e7.css","assets/vue.c16a309b.js","assets/amator.1e5a40c8.js","assets/bezier-easing.a990b400.js","assets/@vue.6b211d3c.js","assets/nanoevents.1080beb7.js","assets/lz-string.dccec454.js","assets/vue-next-select.ded54c4a.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.1879de79.js","assets/sortablejs.a0f68e5e.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-panzoom.8ce6f9b1.js","assets/panzoom.30c56ba6.js","assets/wheel.f2ae740f.js","assets/ngraph.events.083734c6.js","assets/vue-toastification.9c2dad53.js","assets/vue-toastification.4b5f8ac8.css","assets/unique-names-generator.5494b30b.js"])).hasWon,c(f,t=>{t&&u.emit("gameWon")}),p.unthrottled?requestAnimationFrame(a):n=setInterval(a,50)}export{M as startGameLoop}; +import{_ as d,s as p,p as e,a as o,l as T,D as l,b as m,g as u}from"./index.86288ff3.js";import"./vue.c16a309b.js";import{b2 as c}from"./@vue.6b211d3c.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.dccec454.js";import"./vue-next-select.ded54c4a.js";import"./vuedraggable.1879de79.js";import"./amator.1e5a40c8.js";import"./bezier-easing.a990b400.js";import"./sortablejs.a0f68e5e.js";import"./vue-textarea-autosize.35804eaf.js";import"./vue-panzoom.8ce6f9b1.js";import"./panzoom.30c56ba6.js";import"./wheel.f2ae740f.js";import"./ngraph.events.083734c6.js";import"./vue-toastification.9c2dad53.js";import"./unique-names-generator.5494b30b.js";let n=null,f=null;function a(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const r=i;if(o.lastTenTicks.push(r),o.lastTenTicks.length>10&&(o.lastTenTicks=o.lastTenTicks.slice(1)),!((f==null?void 0:f.value)&&!e.keepGoing)&&!o.hasNaN&&(i=Math.max(i,0),e.devSpeed!==0)){if(T.value=!1,e.offlineTime!=null){if(l.gt(e.offlineTime,m.offlineLimit*3600)&&(e.offlineTime=m.offlineLimit*3600),l.gt(e.offlineTime,0)&&e.devSpeed!==0){const s=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-s,i+=s}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||l.lt(e.offlineTime,0))&&(e.offlineTime=null)}i=Math.min(i,m.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),!l.eq(i,0)&&(e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308),u.emit("update",i,r),p.unthrottled?(requestAnimationFrame(a),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(a,50)))}}async function M(){f=(await d(()=>import("./index.86288ff3.js").then(function(t){return t.c}),["assets/index.86288ff3.js","assets/index.83961fb5.css","assets/@fontsource.f66d05e7.css","assets/vue.c16a309b.js","assets/amator.1e5a40c8.js","assets/bezier-easing.a990b400.js","assets/@vue.6b211d3c.js","assets/nanoevents.1080beb7.js","assets/lz-string.dccec454.js","assets/vue-next-select.ded54c4a.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.1879de79.js","assets/sortablejs.a0f68e5e.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-panzoom.8ce6f9b1.js","assets/panzoom.30c56ba6.js","assets/wheel.f2ae740f.js","assets/ngraph.events.083734c6.js","assets/vue-toastification.9c2dad53.js","assets/vue-toastification.4b5f8ac8.css","assets/unique-names-generator.5494b30b.js"])).hasWon,c(f,t=>{t&&u.emit("gameWon")}),p.unthrottled?requestAnimationFrame(a):n=setInterval(a,50)}export{M as startGameLoop}; diff --git a/assets/index.13ad3786.js b/assets/index.86288ff3.js similarity index 80% rename from assets/index.13ad3786.js rename to assets/index.86288ff3.js index 8dd6448..f403aab 100644 --- a/assets/index.13ad3786.js +++ b/assets/index.86288ff3.js @@ -14,5 +14,5 @@ ${F} ${T}`)}}return f[$]}nt(n,$=>{$&&Object.keys(f).forEach(T=>delete f[T])});const g=I(()=>se.saves.reduce(($,T)=>($[T]=h(T),$),{}));function y($){let T;switch(J.id===$?T=Di(J):T=JSON.stringify(g.value[$]),de.exportEncoding){default:console.warn(`Unknown save encoding: ${de.exportEncoding}. Defaulting to lz`);case"lz":T=$t.compressToUTF16(T);break;case"base64":T=btoa(unescape(encodeURIComponent(T)));break;case"plain":break}const F=document.createElement("textarea");F.value=T,document.body.appendChild(F),F.select(),F.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(F)}function N($){J.id===$&&ze();const T={...g.value[$],id:Sn()};ze(T),se.saves.push(T.id)}function w($){se.saves=se.saves.filter(T=>T!==$),localStorage.removeItem($),f[$]=void 0}function _($){g.value[J.id].time=J.time,ze(),f[J.id]=void 0,Rt(g.value[$]),f[$]=void 0}function x($){if(u.value=$,yt(()=>{u.value=null}),$[0]!=="{")if($[0]==="e")$=decodeURIComponent(escape(atob($)));else if($[0]==="\u1BE1")$=$t.decompressFromUTF16($);else{console.warn("Unable to determine preset encoding",$);return}const T=JSON.parse($);T.id=Sn(),ze(T),se.saves.push(T.id),_(T.id)}function q($,T){const F=g.value[$];F!=null&&(F.name=T,J.id===$?(J.name=T,ze()):(ze(F),f[$]=void 0))}return($,T)=>(M(),ee(_t,{modelValue:n.value,"onUpdate:modelValue":T[4]||(T[4]=F=>n.value=F),ref_key:"modal",ref:i},{header:z(()=>[io]),body:z(({shown:F})=>[F?(M(),ee(s(cr),{key:0,list:s(se).saves,handle:".handle",itemKey:j=>j},{item:z(({element:j})=>[p(no,{save:s(g)[j],onOpen:ie=>_(j),onExport:ie=>y(j),onEditName:ie=>q(j,ie),onDuplicate:ie=>N(j),onDelete:ie=>w(j)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):B("",!0)]),footer:z(()=>[C("div",ro,[p(zi,{modelValue:a.value,"onUpdate:modelValue":T[0]||(T[0]=F=>a.value=F),title:"Import Save",placeholder:"Paste your save here!",class:ge({importingFailed:r.value})},null,8,["modelValue","class"]),C("div",ao,[so,C("div",oo,[C("button",{class:"button",onClick:T[1]||(T[1]=F=>_(s(en)().id))},"New Game"),Object.keys(s(c)).length>0?(M(),ee(ai,{key:0,options:s(c),modelValue:u.value,"onUpdate:modelValue":T[2]||(T[2]=F=>x(F)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):B("",!0)])]),C("div",lo,[uo,C("button",{class:"button modal-default-button",onClick:T[3]||(T[3]=F=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Ui=fe(co,[["__scopeId","data-v-2a4275be"]]);const He=e=>(Gt("data-v-318a1c31"),e=e(),Wt(),e),fo=["src","alt"],go={key:1,class:"title"},po=He(()=>C("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),mo={class:"discord"},vo={class:"discord-links"},ho={key:0},bo=["href"],yo=He(()=>C("li",null,[C("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"The Paper Pilot Community")],-1)),wo=He(()=>C("li",null,[C("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),_o={href:"https://forums.moddingtree.com/",target:"_blank"},No=He(()=>C("span",{class:"material-icons"},"forum",-1)),Co=He(()=>C("span",{class:"material-icons"},"info",-1)),ko=He(()=>C("span",{class:"material-icons"},"library_books",-1)),Mo=He(()=>C("span",{class:"material-icons"},"settings",-1)),So=He(()=>C("span",{class:"material-icons"},"library_books",-1)),Io=He(()=>C("span",{class:"material-icons"},"settings",-1)),$o=He(()=>C("span",{class:"material-icons"},"info",-1)),xo={href:"https://forums.moddingtree.com/",target:"_blank"},Eo=He(()=>C("span",{class:"material-icons"},"forum",-1)),To={class:"discord"},Po={class:"discord-links"},Do={key:0},Fo=["href"],Oo=He(()=>C("li",null,[C("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"The Paper Pilot Community")],-1)),Ao=He(()=>C("li",null,[C("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),qo=K({__name:"Nav",setup(e){const t=L(null),n=L(null),i=L(null),r=L(null),{useHeader:a,banner:u,title:o,discordName:c,discordLink:f,versionNumber:h}=de;function g(){window.open(f,"mywindow")}return(y,N)=>(M(),P(le,null,[s(a)?(M(),P("div",wt({key:0,class:"nav"},y.$attrs),[s(u)?(M(),P("img",{key:0,src:s(u),class:"banner",alt:s(o)},null,8,fo)):(M(),P("div",go,re(s(o)),1)),C("div",{onClick:N[0]||(N[0]=w=>{var _;return(_=r.value)==null?void 0:_.open()}),class:"version-container"},[p(Ce,{display:"Changelog",direction:s(W).Down,class:"version"},{default:z(()=>[C("span",null,"v"+re(s(h)),1)]),_:1},8,["direction"])]),po,C("div",mo,[C("span",{onClick:g,class:"material-icons"},"discord"),C("ul",vo,[s(f)?(M(),P("li",ho,[C("a",{href:s(f),target:"_blank"},re(s(c)),9,bo)])):B("",!0),yo,wo])]),C("div",null,[C("a",_o,[p(Ce,{display:"Forums",direction:s(W).Down,yoffset:"5px"},{default:z(()=>[No]),_:1},8,["direction"])])]),C("div",{onClick:N[1]||(N[1]=w=>{var _;return(_=t.value)==null?void 0:_.open()})},[p(Ce,{display:"Info",direction:s(W).Down,class:"info"},{default:z(()=>[Co]),_:1},8,["direction"])]),C("div",{onClick:N[2]||(N[2]=w=>{var _;return(_=n.value)==null?void 0:_.open()})},[p(Ce,{display:"Saves",direction:s(W).Down,xoffset:"-20px"},{default:z(()=>[ko]),_:1},8,["direction"])]),C("div",{onClick:N[3]||(N[3]=w=>{var _;return(_=i.value)==null?void 0:_.open()})},[p(Ce,{display:"Settings",direction:s(W).Down,xoffset:"-66px"},{default:z(()=>[Mo]),_:1},8,["direction"])])],16)):(M(),P("div",wt({key:1,class:"overlay-nav"},y.$attrs),[C("div",{onClick:N[4]||(N[4]=w=>{var _;return(_=r.value)==null?void 0:_.open()}),class:"version-container"},[p(Ce,{display:"Changelog",direction:s(W).Right,xoffset:"25%",class:"version"},{default:z(()=>[C("span",null,"v"+re(s(h)),1)]),_:1},8,["direction"])]),C("div",{onClick:N[5]||(N[5]=w=>{var _;return(_=n.value)==null?void 0:_.open()})},[p(Ce,{display:"Saves",direction:s(W).Right},{default:z(()=>[So]),_:1},8,["direction"])]),C("div",{onClick:N[6]||(N[6]=w=>{var _;return(_=i.value)==null?void 0:_.open()})},[p(Ce,{display:"Settings",direction:s(W).Right},{default:z(()=>[Io]),_:1},8,["direction"])]),C("div",{onClick:N[7]||(N[7]=w=>{var _;return(_=t.value)==null?void 0:_.open()})},[p(Ce,{display:"Info",direction:s(W).Right},{default:z(()=>[$o]),_:1},8,["direction"])]),C("div",null,[C("a",xo,[p(Ce,{display:"Forums",direction:s(W).Right,xoffset:"7px"},{default:z(()=>[Eo]),_:1},8,["direction"])])]),C("div",To,[C("span",{onClick:g,class:"material-icons"},"discord"),C("ul",Po,[s(f)?(M(),P("li",Do,[C("a",{href:s(f),target:"_blank"},re(s(c)),9,Fo)])):B("",!0),Oo,Ao])])],16)),p(ms,{ref_key:"info",ref:t,changelog:r.value},null,8,["changelog"]),p(Ui,{ref_key:"savesManager",ref:n},null,512),p(Is,{ref_key:"options",ref:i},null,512),p(Ja,{ref_key:"changelog",ref:r},null,512)],64))}});var Gi=fe(qo,[["__scopeId","data-v-318a1c31"]]);const Vo={class:"inner-tab"},Ro=K({__name:"Game",setup(e){const t=Pt(J,"tabs"),n=I(()=>Object.keys(ye)),i=de.useHeader;function r(a){const{display:u,minimized:o,name:c,color:f,minimizable:h,nodes:g,minimizedDisplay:y}=a;return{display:u,minimized:o,name:c,color:f,minimizable:h,nodes:g,minimizedDisplay:y}}return(a,u)=>(M(),P("div",{class:ge(["tabs-container",{useHeader:s(i)}])},[(M(!0),P(le,null,rn(s(t),(o,c)=>{var f,h;return M(),P("div",{key:c,class:ge(["tab",s((f=s(ye)[o])==null?void 0:f.classes)]),style:Oe(s((h=s(ye)[o])==null?void 0:h.style))},[c===0&&!s(i)?(M(),ee(Gi,{key:0})):B("",!0),C("div",Vo,[s(n).includes(o)?(M(),ee(Wa,wt({key:0},r(s(ye)[o]),{index:c,onSetMinimized:g=>s(ye)[o].minimized.value=g}),null,16,["index","onSetMinimized"])):(M(),ee(De(o),{key:1,index:c},null,8,["index"]))])],6)}),128))],2))}});var Lo=fe(Ro,[["__scopeId","data-v-dcd207b4"]]);const Bo=K({__name:"Sticky",setup(e){const t=L("0"),n=new ResizeObserver(r),i=Ge(null);function r(){let a=i.value;if(a==null)return;let u=0;for(;a.previousSibling;){const o=a.previousSibling;o.dataset&&"vSticky"in o.dataset&&(u+=o.offsetHeight),a=o}t.value=u+"px"}return yt(r),document.fonts.ready.then(r),Fn(()=>{var u;const a=(u=i.value)==null?void 0:u.parentElement;a&&n.observe(a)}),(a,u)=>(M(),P("div",{class:"sticky",style:Oe({top:t.value}),ref_key:"element",ref:i,"data-v-sticky":""},[bt(a.$slots,"default",{},void 0,!0)],4))}});var Pn=fe(Bo,[["__scopeId","data-v-cccac690"]]);const jo=["x1","y1","x2","y2"],zo=K({__name:"BoardLink",props:{link:null},setup(e){const n=Ne(e),i=I(()=>{const a=n.link.value.startNode.position;return n.link.value.offsetStart&&(a.x+=s(n.link.value.offsetStart).x,a.y+=s(n.link.value.offsetStart).y),a}),r=I(()=>{const a=n.link.value.endNode.position;return n.link.value.offsetEnd&&(a.x+=s(n.link.value.offsetEnd).x,a.y+=s(n.link.value.offsetEnd).y),a});return(a,u)=>(M(),P("line",wt({class:"link"},e.link,{class:{pulsing:e.link.pulsing},x1:s(i).x,y1:s(i).y,x2:s(r).x,y2:s(r).y}),null,16,jo))}});var Uo=fe(zo,[["__scopeId","data-v-57c4970a"]]);const Go={key:0},Wo=["transform","onMousedown","onTouchstart","onMouseup","onTouchend"],Ho=["fill","stroke-width","stroke"],Zo=["fill"],Yo=K({__name:"BoardNodeAction",props:{node:null,nodeType:null,actions:null,isSelected:{type:Boolean},selectedAction:null},emits:["clickAction"],setup(e,{emit:t}){const i=Ne(e),r=I(()=>ce(i.nodeType.value.size,s(i.node))),a=I(()=>{var h;return(h=ce(i.nodeType.value.outlineColor,s(i.node)))!=null?h:at[se.theme].variables["--outline"]}),u=I(()=>{var h;return(h=ce(i.nodeType.value.titleColor,s(i.node)))!=null?h:at[se.theme].variables["--foreground"]}),o=I(()=>ce(i.nodeType.value.actionDistance,s(i.node)));function c(h,g){t("clickAction",g.id),h.preventDefault(),h.stopPropagation()}function f(h,g){var y;((y=s(i.selectedAction))==null?void 0:y.id)===g.id&&(h.preventDefault(),h.stopPropagation())}return(h,g)=>(M(),ee(nn,{name:"actions",appear:""},{default:z(()=>[e.isSelected&&e.actions?(M(),P("g",Go,[(M(!0),P(le,null,rn(e.actions,(y,N)=>{var w,_;return M(),P("g",{key:y.id,class:ge(["action",{selected:((w=e.selectedAction)==null?void 0:w.id)===y.id}]),transform:`translate( ${(-s(r)-30)*Math.sin(((e.actions.length-1)/2-N)*s(o))}, ${(s(r)+30)*Math.cos(((e.actions.length-1)/2-N)*s(o))} - )`,onMousedown:x=>c(x,y),onTouchstart:x=>c(x,y),onMouseup:x=>f(x,y),onTouchend:tn(x=>f(x,y),["stop"])},[C("circle",{fill:s(ce)(y.fillColor,e.node),r:"20","stroke-width":((_=e.selectedAction)==null?void 0:_.id)===y.id?4:0,stroke:s(a)},null,8,Ho),C("text",{fill:s(u),class:"material-icons"},re(s(ce)(y.icon,e.node)),9,Zo)],42,Wo)}),128))])):B("",!0)]),_:1}))}});var Jo=fe(Yo,[["__scopeId","data-v-9efb2a56"]]);const Ko=["transform"],Xo={key:0},Qo=["r","fill","stroke"],el=["r","fill","stroke"],tl=["r","fill"],nl=["r","stroke-dasharray","stroke-dashoffset","stroke"],il={key:1,transform:"rotate(45, 0, 0)"},rl=["width","height","transform","fill","stroke"],al=["width","height","transform","fill","stroke"],sl=["width","height","transform","fill"],ol=["width","height","transform","stroke-dasharray","stroke-dashoffset","stroke"],ll=["fill","y"],ul=["fill"],cl={key:0},dl=["fill","y"],fl=["fill","y"],gl=K({__name:"BoardNode",props:{node:null,nodeType:null,dragging:null,dragged:null,hasDragged:{type:Boolean},receivingNode:{type:Boolean},selectedNode:null,selectedAction:null},emits:["mouseDown","endDragging","clickAction"],setup(e,{emit:t}){const n=e,i=Math.sqrt(2),r=Ne(n),a=I(()=>s(r.selectedNode)===s(r.node)),u=I(()=>ce(r.nodeType.value.draggable,s(r.node)));nt(u,Z=>{const pe=s(r.node);s(r.dragging)===pe&&!Z&&t("endDragging",pe)});const o=I(()=>{var pe;const Z=s(r.node);return(pe=ce(r.nodeType.value.actions,Z))==null?void 0:pe.filter(qe=>it(ce(qe.visibility,Z)))}),c=I(()=>{var pe;const Z=s(r.node);if(ce(r.nodeType.value.draggable,Z)&&((pe=s(r.dragging))==null?void 0:pe.id)===Z.id&&s(r.dragged)!=null){const{x:qe,y:Fe}=s(r.dragged);return{x:Z.position.x+Math.round(qe/25)*25,y:Z.position.y+Math.round(Fe/25)*25}}return Z.position}),f=I(()=>ce(r.nodeType.value.shape,s(r.node))),h=I(()=>ce(r.nodeType.value.title,s(r.node))),g=I(()=>ce(r.nodeType.value.subtitle,s(r.node))),y=I(()=>{var Z;return(Z=a.value?s(r.selectedAction)&&ce(s(r.selectedAction).tooltip,s(r.node)):null)!=null?Z:ce(r.nodeType.value.label,s(r.node))}),N=I(()=>{var Z,pe;return ce((pe=(Z=s(r.selectedAction))==null?void 0:Z.confirmationLabel)!=null?pe:{text:"Tap again to confirm"},s(r.node))}),w=I(()=>ce(r.nodeType.value.size,s(r.node))),_=I(()=>{var Z;return(Z=ce(r.nodeType.value.progress,s(r.node)))!=null?Z:0}),x=I(()=>at[se.theme].variables["--background"]),q=I(()=>{var Z;return(Z=ce(r.nodeType.value.outlineColor,s(r.node)))!=null?Z:at[se.theme].variables["--outline"]}),$=I(()=>{var Z;return(Z=ce(r.nodeType.value.fillColor,s(r.node)))!=null?Z:at[se.theme].variables["--raised-background"]}),T=I(()=>ce(r.nodeType.value.progressColor,s(r.node))),F=I(()=>{var Z;return(Z=ce(r.nodeType.value.titleColor,s(r.node)))!=null?Z:at[se.theme].variables["--foreground"]}),j=I(()=>ce(r.nodeType.value.progressDisplay,s(r.node))),ie=I(()=>r.dragging.value!=null&&s(r.hasDragged)&&ce(r.nodeType.value.canAccept,s(r.node),r.dragging.value)),ae=I(()=>ce(r.nodeType.value.style,s(r.node))),X=I(()=>ce(r.nodeType.value.classes,s(r.node)));function Ee(Z){t("mouseDown",Z,r.node.value,u.value)}function H(Z){var pe,qe,Fe;(pe=r.hasDragged)!=null&&pe.value||(t("endDragging",r.node.value),(Fe=(qe=r.nodeType.value).onClick)==null||Fe.call(qe,r.node.value),Z.stopPropagation())}return(Z,pe)=>{var qe,Fe,Dt;return M(),P("g",{class:ge(["boardnode",{[e.node.type]:!0,isSelected:s(a),isDraggable:s(u),...s(X)}]),style:Oe([{opacity:((qe=e.dragging)==null?void 0:qe.id)===e.node.id&&e.hasDragged?.5:1},(Fe=s(ae))!=null?Fe:[]]),transform:`translate(${s(c).x},${s(c).y})${s(a)?" scale(1.2)":""}`},[p(Jo,{actions:(Dt=s(o))!=null?Dt:[],"is-selected":s(a),node:e.node,"node-type":e.nodeType,"selected-action":e.selectedAction,onClickAction:pe[0]||(pe[0]=Ie=>t("clickAction",Ie))},null,8,["actions","is-selected","node","node-type","selected-action"]),C("g",{class:"node-container",onMousedown:Ee,onTouchstartPassive:Ee,onMouseup:H,onTouchendPassive:H},[s(f)===s(Be).Circle?(M(),P("g",Xo,[s(ie)?(M(),P("circle",{key:0,class:"receiver",r:s(w)+8,fill:s(x),stroke:e.receivingNode?"#0F0":"#0F03","stroke-width":2},null,8,Qo)):B("",!0),C("circle",{class:"body",r:s(w),fill:s($),stroke:s(q),"stroke-width":4},null,8,el),s(j)===s(Bt).Fill?(M(),P("circle",{key:1,class:"progress progressFill",r:Math.max(s(w)*s(_)-2,0),fill:s(T)},null,8,tl)):(M(),P("circle",{key:2,r:s(w)+4.5,class:"progress progressRing",fill:"transparent","stroke-dasharray":(s(w)+4.5)*2*Math.PI,"stroke-width":5,"stroke-dashoffset":(s(w)+4.5)*2*Math.PI-s(_)*(s(w)+4.5)*2*Math.PI,stroke:s(T)},null,8,nl))])):s(f)===s(Be).Diamond?(M(),P("g",il,[s(ie)?(M(),P("rect",{key:0,class:"receiver",width:s(w)*s(i)+16,height:s(w)*s(i)+16,transform:`translate(${-(s(w)*s(i)+16)/2}, ${-(s(w)*s(i)+16)/2})`,fill:s(x),stroke:e.receivingNode?"#0F0":"#0F03","stroke-width":2},null,8,rl)):B("",!0),C("rect",{class:"body",width:s(w)*s(i),height:s(w)*s(i),transform:`translate(${-s(w)*s(i)/2}, ${-s(w)*s(i)/2})`,fill:s($),stroke:s(q),"stroke-width":4},null,8,al),s(j)===s(Bt).Fill?(M(),P("rect",{key:1,class:"progress progressFill",width:Math.max(s(w)*s(i)*s(_)-2,0),height:Math.max(s(w)*s(i)*s(_)-2,0),transform:`translate(${-Math.max(s(w)*s(i)*s(_)-2,0)/2}, ${-Math.max(s(w)*s(i)*s(_)-2,0)/2})`,fill:s(T)},null,8,sl)):(M(),P("rect",{key:2,class:"progress progressDiamond",width:s(w)*s(i)+9,height:s(w)*s(i)+9,transform:`translate(${-(s(w)*s(i)+9)/2}, ${-(s(w)*s(i)+9)/2})`,fill:"transparent","stroke-dasharray":(s(w)*s(i)+9)*4,"stroke-width":5,"stroke-dashoffset":(s(w)*s(i)+9)*4-s(_)*(s(w)*s(i)+9)*4,stroke:s(T)},null,8,ol))])):B("",!0),C("text",{fill:s(F),class:"node-title",y:s(g)?10:0},re(s(h)),9,ll),s(g)?(M(),P("text",{key:2,fill:s(F),class:"node-subtitle",y:"-15"},re(s(g)),9,ul)):B("",!0)],32),p(nn,{name:"fade",appear:""},{default:z(()=>{var Ie;return[s(y)?(M(),P("g",cl,[C("text",{fill:(Ie=s(y).color)!=null?Ie:s(F),class:ge(["node-title",{pulsing:s(y).pulsing}]),y:-s(w)-20},re(s(y).text),11,dl)])):B("",!0)]}),_:1}),p(nn,{name:"fade",appear:""},{default:z(()=>{var Ie;return[s(a)&&e.selectedAction?(M(),P("text",{key:0,fill:(Ie=s(N).color)!=null?Ie:s(F),class:ge(["node-title",{pulsing:s(N).pulsing}]),y:s(w)+75},re(s(N).text),11,fl)):B("",!0)]}),_:1})],14,Ko)}}});var pl=fe(gl,[["__scopeId","data-v-4654be02"]]);const ml={class:"stage",width:"100%",height:"100%"},vl={class:"g1"},hl=K({__name:"Board",props:{nodes:null,types:null,state:null,visibility:null,width:null,height:null,style:null,classes:null,links:null,selectedAction:null,selectedNode:null,draggingNode:null,receivingNode:null,mousePosition:null,setReceivingNode:{type:Function},setDraggingNode:{type:Function}},setup(e){const n=Ne(e),i=L({x:0,y:0}),r=L({x:0,y:0}),a=L(!1),u=L(null),o=I(()=>{const N=n.nodes.value.slice();if(n.draggingNode.value){const w=N.splice(N.indexOf(n.draggingNode.value),1)[0];N.push(w)}return N});Qe(()=>{const N=n.draggingNode.value;if(N==null)return null;const w={x:N.position.x+r.value.x,y:N.position.y+r.value.y};let _=Number.MAX_VALUE;n.setReceivingNode.value(n.nodes.value.reduce((x,q)=>{if(q.id===N.id)return x;const $=n.types.value[q.type];if(!ce($.canAccept,q,N))return x;const F=Math.pow(w.x-q.position.x,2)+Math.pow(w.y-q.position.y,2);let j=ce($.size,q);return F>_||F>j*j?x:(_=F,q)},null))});function c(N){N.setTransformOrigin(null),N.moveTo(u.value.$el.clientWidth/2,u.value.$el.clientHeight/2)}function f(N,w=null,_=!1){if(n.draggingNode.value==null){N.preventDefault(),N.stopPropagation();let x,q;if("touches"in N)if(N.touches.length===1)x=N.touches[0].clientX,q=N.touches[0].clientY;else return;else x=N.clientX,q=N.clientY;i.value={x,y:q},r.value={x:0,y:0},a.value=!1,_&&n.setDraggingNode.value(w)}w!=null&&(n.state.value.selectedNode=null,n.state.value.selectedAction=null)}function h(N){const{x:w,y:_,scale:x}=u.value.panZoomInstance.getTransform();let q,$;if("touches"in N)if(N.touches.length===1)q=N.touches[0].clientX,$=N.touches[0].clientY;else{g(n.draggingNode.value),n.mousePosition.value=null;return}else q=N.clientX,$=N.clientY;n.mousePosition.value={x:(q-w)/x,y:($-_)/x},r.value={x:r.value.x+(q-i.value.x)/x,y:r.value.y+($-i.value.y)/x},i.value={x:q,y:$},(Math.abs(r.value.x)>10||Math.abs(r.value.y)>10)&&(a.value=!0),n.draggingNode.value!=null&&(N.preventDefault(),N.stopPropagation())}function g(N,w=!1){var _,x;if(n.draggingNode.value!=null&&n.draggingNode.value===N){n.receivingNode.value==null&&(n.draggingNode.value.position.x+=Math.round(r.value.x/25)*25,n.draggingNode.value.position.y+=Math.round(r.value.y/25)*25);const q=n.nodes.value;q.push(q.splice(q.indexOf(n.draggingNode.value),1)[0]),n.receivingNode.value&&((x=(_=n.types.value[n.receivingNode.value.type]).onDrop)==null||x.call(_,n.receivingNode.value,n.draggingNode.value)),n.setDraggingNode.value(null)}else!a.value&&!w&&(n.state.value.selectedNode=null,n.state.value.selectedAction=null)}function y(N,w){n.state.value.selectedAction===w?s(n.selectedAction).onClick(s(n.selectedNode)):n.state.value={...n.state.value,selectedAction:w}}return(N,w)=>{const _=gt("panZoom");return s(it)(e.visibility)?(M(),ee(_,{key:0,style:Oe([{width:e.width,height:e.height},e.style]),class:ge(e.classes),selector:".g1",options:{initialZoom:1,minZoom:.1,maxZoom:10,zoomDoubleClickSpeed:1},ref_key:"stage",ref:u,onInit:c,onMousemove:h,onTouchmove:h,onMousedown:w[0]||(w[0]=x=>f(x)),onTouchstart:w[1]||(w[1]=x=>f(x)),onMouseup:w[2]||(w[2]=()=>g(s(e.draggingNode))),onTouchendPassive:w[3]||(w[3]=()=>g(s(e.draggingNode))),onMouseleave:w[4]||(w[4]=()=>g(s(e.draggingNode),!0))},{default:z(()=>[(M(),P("svg",ml,[C("g",vl,[p(li,{name:"link",appear:""},{default:z(()=>[(M(!0),P(le,null,rn(s(e.links)||[],x=>(M(),P("g",{key:`${x.startNode.id}-${x.endNode.id}`},[p(Uo,{link:x},null,8,["link"])]))),128))]),_:1}),p(li,{name:"grow",duration:500,appear:""},{default:z(()=>[(M(!0),P(le,null,rn(s(o),x=>{var q;return M(),P("g",{key:x.id,style:{"transition-duration":"0s"}},[p(pl,{node:x,nodeType:e.types[x.type],dragging:s(e.draggingNode),dragged:s(e.draggingNode)===x?r.value:void 0,hasDragged:a.value,receivingNode:((q=s(e.receivingNode))==null?void 0:q.id)===x.id,selectedNode:s(e.selectedNode),selectedAction:s(e.selectedAction),onMouseDown:f,onEndDragging:g,onClickAction:$=>y(x,$)},null,8,["node","nodeType","dragging","dragged","hasDragged","receivingNode","selectedNode","selectedAction","onClickAction"])])}),128))]),_:1})])]))]),_:1},8,["style","class","options"])):B("",!0)}}});Ae.on("setupVue",e=>fr.install(e));const Wi=Symbol("Board");var Bt=(e=>(e.Outline="Outline",e.Fill="Fill",e))(Bt||{}),Be=(e=>(e.Circle="Circle",e.Diamond="Triangle",e))(Be||{});function bl(e){const t=lt({nodes:[],selectedNode:null,selectedAction:null},!1);return We(n=>{const i=e.call(n,n);i.id=bn("board-"),i.type=Wi,i[st]=hl,i.state?(Ri(t),A(i,"state")):(t[an]={nodes:i.startNodes().map((o,c)=>(o.id=c,o)),selectedNode:null,selectedAction:null},i.state=t),i.nodes=I(()=>s(u.state).nodes),i.selectedNode=I({get(){return u.nodes.value.find(o=>o.id===s(u.state).selectedNode)||null},set(o){var c,f;ke(u.state)?u.state.value={...u.state.value,selectedNode:(c=o==null?void 0:o.id)!=null?c:null}:u.state.selectedNode=(f=o==null?void 0:o.id)!=null?f:null}}),i.selectedAction=I({get(){const o=u.selectedNode.value;if(o==null)return null;const c=u.types[o.type];return c.actions==null?null:c.actions.find(f=>f.id===s(u.state).selectedAction)||null},set(o){var c,f;ke(u.state)?u.state.value={...u.state.value,selectedAction:(c=o==null?void 0:o.id)!=null?c:null}:u.state.selectedAction=(f=o==null?void 0:o.id)!=null?f:null}}),i.mousePosition=L(null),i.links?A(i,"links"):i.links=I(()=>u.selectedAction.value==null?null:u.selectedAction.value.links&&u.selectedNode.value?ce(u.selectedAction.value.links,u.selectedNode.value):null),i.draggingNode=L(null),i.receivingNode=L(null),A(i,"visibility"),ue(i,"visibility",we.Visible),A(i,"width"),ue(i,"width","100%"),A(i,"height"),ue(i,"height","100%"),A(i,"classes"),A(i,"style");for(const o in i.types){const c=i.types[o];if(A(c,"title"),A(c,"subtitle"),A(c,"label"),A(c,"size"),ue(c,"size",50),A(c,"style"),A(c,"classes"),A(c,"draggable"),ue(c,"draggable",!1),A(c,"shape"),ue(c,"shape","Circle"),A(c,"canAccept"),ue(c,"canAccept",!1),A(c,"progress"),A(c,"progressDisplay"),ue(c,"progressDisplay","Fill"),A(c,"progressColor"),ue(c,"progressColor","none"),A(c,"fillColor"),A(c,"outlineColor"),A(c,"titleColor"),A(c,"actionDistance"),ue(c,"actionDistance",Math.PI/6),c.nodes=I(()=>s(u.state).nodes.filter(f=>f.type===o)),ue(c,"onClick",function(f){s(u.state).selectedNode=f.id}),c.actions)for(const f of c.actions)A(f,"visibility"),ue(f,"visibility",we.Visible),A(f,"icon"),A(f,"fillColor"),A(f,"tooltip"),A(f,"confirmationLabel"),ue(f,"confirmationLabel",{text:"Tap again to confirm"}),A(f,"links")}function r(o){i.draggingNode.value=o}function a(o){i.receivingNode.value=o}i.placeInAvailableSpace=function(o,c=100,f=W.Right){const h=u.nodes.value.slice().filter(g=>g===o||(f===W.Down||f===W.Up)&&Math.abs(g.position.x-o.position.x)>c||(f===W.Left||f===W.Right)&&Math.abs(g.position.y-o.position.y)>c?!1:!(f===W.Right&&g.position.xo.position.x+c||f===W.Up&&g.position.y>o.position.y+c||f===W.Down&&g.position.yg.position.x-y.position.x:f===W.Left?(g,y)=>y.position.x-g.position.x:f===W.Up?(g,y)=>y.position.y-g.position.y:(g,y)=>g.position.y-y.position.y);for(let g=0;g0&&N>c)break}},i[et]=function(){const{nodes:o,types:c,state:f,visibility:h,width:g,height:y,style:N,classes:w,links:_,selectedAction:x,selectedNode:q,mousePosition:$,draggingNode:T,receivingNode:F}=this;return{nodes:o,types:c,state:f,visibility:h,width:g,height:y,style:s(N),classes:w,links:_,selectedAction:x,selectedNode:q,mousePosition:$,draggingNode:T,receivingNode:F,setDraggingNode:r,setReceivingNode:a}};const u=i;return u})}function ce(e,t,...n){return xn(e)?e(t,...n):s(e)}function Gn(e){let t=0;return e.nodes.value.forEach(n=>{n.id>=t&&(t=n.id+1)}),t}const dn={};Ae.on("addLayer",e=>{const t=pa(e,Wi);dn[e.id]=e.on("postUpdate",n=>{t.forEach(i=>{Object.values(i.types).forEach(r=>r.nodes.value.forEach(a=>{var u;return(u=r.update)==null?void 0:u.call(r,a,n)}))})})});Ae.on("removeLayer",e=>{var t;(t=dn[e.id])==null||t.call(dn),dn[e.id]=void 0});function Hi(e,t="points",n=0,i=void 0){const r=ke(e)?e:lt(e);if(r.displayName=t,r.precision=n,r.small=i,!ke(e)){const a=r[dt];a.displayName=t,a.precision=n,a.small=i}return r}new l("10^^8");new l("1e100");function vi(e,t){const n=t!=null?t:e.value;return l.eq(e.precision,0)?je(e.small?n:l.floor(n)):jt(n,e.precision,e.small)}Ae.on("setupVue",e=>e.use(gr));function yl(e="white",t="8px"){return{transform:"scale(1.05, 1.05)",borderColor:"rgba(0, 0, 0, 0.125)",boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${t} ${e}`,zIndex:1}}const wl=K({props:{visibility:{type:R(Number,Boolean),required:!0},display:{type:R(Object,String,Function),required:!0},style:R(String,Object,Array),classes:R(Object),glowColor:R(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup(e,{emit:t}){const{display:n,glowColor:i,floating:r}=Ne(e),a=qi(n),u=I(()=>{const c=Se(i);return c==null||c===""?{}:s(r)?yl(c):{boxShadow:`0px 9px 5px -6px ${c}`}});function o(){t("selectTab")}return{selectTab:o,component:a,glowColorStyle:u,unref:s,Visibility:we,isVisible:it,isHidden:sn}}});function _l(e,t,n,i,r,a){var u;return e.isVisible(e.visibility)?(M(),P("button",{key:0,onClick:t[0]||(t[0]=(...o)=>e.selectTab&&e.selectTab(...o)),class:ge(["tabButton",{active:e.active,...e.unref(e.classes)}]),style:Oe([{visibility:e.isHidden(e.visibility)?"hidden":void 0},e.glowColorStyle,(u=e.unref(e.style))!=null?u:{}])},[(M(),ee(De(e.component)))],6)):B("",!0)}var Zi=fe(wl,[["render",_l],["__scopeId","data-v-21427abb"]]);const Nl=K({props:{visibility:{type:R(Number,Boolean),required:!0},activeTab:{type:R(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:R(Object),required:!0},style:R(String,Object,Array),classes:R(Object),buttonContainerStyle:R(String,Object,Array),buttonContainerClasses:R(Object)},components:{Sticky:Pn,TabButton:Zi},setup(e){const{activeTab:t}=Ne(e),n=I(()=>at[se.theme].floatingTabs),i=Ge("");Qe(()=>{const o=Se(t);if(o==null){i.value="";return}if(ot(o)){i.value=oe(o);return}i.value=oe(s(o.display))});const r=I(()=>{const o=Se(t);return ot(o)||!o?void 0:s(o.classes)}),a=I(()=>{const o=Se(t);return ot(o)||!o?void 0:s(o.style)});function u(o){const{display:c,style:f,classes:h,glowColor:g,visibility:y}=o;return{display:c,style:s(f),classes:h,glowColor:g,visibility:y}}return{floating:n,tabClasses:r,tabStyle:a,Visibility:we,component:i,gatherButtonProps:u,unref:s,isVisible:it,isHidden:sn}}});function Cl(e,t,n,i,r,a){var c,f;const u=gt("TabButton"),o=gt("Sticky");return e.isVisible(e.visibility)?(M(),P("div",{key:0,class:ge(["tab-family-container",{...e.unref(e.classes),...e.tabClasses}]),style:Oe([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(c=e.unref(e.style))!=null?c:[],(f=e.tabStyle)!=null?f:[]])},[p(o,{class:ge(["tab-buttons-container",e.unref(e.buttonContainerClasses)]),style:Oe(e.unref(e.buttonContainerStyle))},{default:z(()=>[C("div",{class:ge(["tab-buttons",{floating:e.floating}])},[(M(!0),P(le,null,rn(e.unref(e.tabs),(h,g)=>(M(),ee(u,wt({onSelectTab:y=>e.selected.value=g,floating:e.floating,key:g,active:e.unref(h.tab)===e.unref(e.activeTab)},e.gatherButtonProps(h)),null,16,["onSelectTab","floating","active"]))),128))],2)]),_:1},8,["class","style"]),e.unref(e.activeTab)?(M(),ee(De(e.unref(e.component)),{key:0})):B("",!0)],6)):B("",!0)}var kl=fe(Nl,[["render",Cl],["__scopeId","data-v-58dbf83a"]]);const Ml=Symbol("TabButton"),Sl=Symbol("TabFamily");function Il(e,t){if(Object.keys(e).length===0)throw console.warn("Cannot create tab family with 0 tabs"),new Error("Cannot create tab family with 0 tabs");const n=lt(Object.keys(e)[0],!1);return We(i=>{var u;const r=(u=t==null?void 0:t.call(i,i))!=null?u:{};r.id=bn("tabFamily-"),r.type=Sl,r[st]=kl,r.tabs=Object.keys(e).reduce((o,c)=>{const f=e[c]();return f.type=Ml,f[st]=Zi,A(f,"visibility"),ue(f,"visibility",we.Visible),A(f,"tab"),A(f,"display"),A(f,"classes"),A(f,"style"),A(f,"glowColor"),o[c]=f,o},{}),r.selected=n,r.activeTab=I(()=>{const o=s(a.tabs);if(n.value in o&&it(o[n.value].visibility))return s(o[n.value].tab);const c=Object.values(o).find(f=>it(f.visibility));return c?s(c.tab):null}),A(r,"visibility"),ue(r,"visibility",we.Visible),A(r,"classes"),A(r,"style"),A(r,"buttonContainerClasses"),A(r,"buttonContainerStyle"),r[et]=function(){const{visibility:o,activeTab:c,selected:f,tabs:h,style:g,classes:y,buttonContainerClasses:N,buttonContainerStyle:w}=this;return{visibility:o,activeTab:c,selected:f,tabs:h,style:s(g),classes:y,buttonContainerClasses:N,buttonContainerStyle:w}};const a=r;return a})}const Yi=l.ln(10);function fn(e){return e}function $l(e,t){if(D(t))return t.invert(l.neg(e));throw new Error("Could not invert due to no input being a variable")}function xl(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");return m.neg(t.getIntegralFormula(e))}throw new Error("Could not integrate due to no input being a variable")}function El(e){return m.neg(e)}function Tl(e,t,n){if(D(t))return t.invert(l.sub(e,ve(n)));if(D(n))return n.invert(l.sub(e,ve(t)));throw new Error("Could not invert due to no input being a variable")}function Pl(e,t,n){var i,r;if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const a=t.getIntegralFormula(e);return m.times(n,(i=t.innermostVariable)!=null?i:0).add(a)}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const a=n.getIntegralFormula(e);return m.times(t,(r=n.innermostVariable)!=null?r:0).add(a)}throw new Error("Could not integrate due to no input being a variable")}function Dl(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.add(i,n)}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e);return m.add(i,t)}throw new Error("Could not integrate due to no input being a variable")}function Fl(e,t,n){if(D(t))return t.invert(l.add(e,ve(n)));if(D(n))return n.invert(l.sub(ve(t),e));throw new Error("Could not invert due to no input being a variable")}function Ol(e,t,n){var i,r;if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const a=t.getIntegralFormula(e);return m.sub(a,m.times(n,(i=t.innermostVariable)!=null?i:0))}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const a=n.getIntegralFormula(e);return m.times(t,(r=n.innermostVariable)!=null?r:0).sub(a)}throw new Error("Could not integrate due to no input being a variable")}function Al(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.sub(i,n)}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e);return m.sub(i,t)}throw new Error("Could not integrate due to no input being a variable")}function ql(e,t,n){if(D(t))return t.invert(l.div(e,ve(n)));if(D(n))return n.invert(l.div(e,ve(t)));throw new Error("Could not invert due to no input being a variable")}function Vl(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.times(i,n)}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e);return m.times(i,t)}throw new Error("Could not integrate due to no input being a variable")}function Rl(e,t,n){if(D(t))return m.div(e,n);if(D(n))return m.div(e,t);throw new Error("Could not apply substitution due to no input being a variable")}function Ll(e,t,n){if(D(t))return t.invert(l.mul(e,ve(n)));if(D(n))return n.invert(l.div(ve(t),e));throw new Error("Could not invert due to no input being a variable")}function Bl(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.div(i,n)}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e);return m.div(t,i)}throw new Error("Could not integrate due to no input being a variable")}function jl(e,t,n){if(D(t))return m.mul(e,n);if(D(n))return m.mul(e,t);throw new Error("Could not apply substitution due to no input being a variable")}function zl(e,t){if(D(t))return t.invert(l.recip(e));throw new Error("Could not invert due to no input being a variable")}function Ul(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.ln(n)}throw new Error("Could not integrate due to no input being a variable")}function Gl(e,t){if(D(t))return t.invert(l.pow10(e));throw new Error("Could not invert due to no input being a variable")}function Wl(e){return l.ln(e).sub(1).times(e).div(Yi)}function Hl(e,t){if(D(t)){const n=Yi.times(e);return t.invert(n.div(n.div(Math.E).lambertw()))}throw new Error("Could not invert due to no input being a variable")}function Zl(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");return new m({inputs:[t.getIntegralFormula(e)],evaluate:Wl,invert:Hl})}throw new Error("Could not integrate due to no input being a variable")}function Yl(e,t,n){if(D(t))return t.invert(l.pow(ve(n),e));if(D(n))return n.invert(l.root(ve(t),e));throw new Error("Could not invert due to no input being a variable")}function Jl(e,t){return l.ln(e).sub(1).times(e).div(l.ln(t))}function Kl(e,t,n){if(D(t)){const i=l.ln(ve(n)).times(e);return t.invert(i.div(i.div(Math.E).lambertw()))}throw new Error("Could not invert due to no input being a variable")}function Xl(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");return new m({inputs:[t.getIntegralFormula(e),n],evaluate:Jl,invert:Kl})}throw new Error("Could not integrate due to no input being a variable")}function Ql(e,t){if(D(t))return t.invert(l.pow(2,e));throw new Error("Could not invert due to no input being a variable")}function eu(e){return l.ln(e).sub(1).times(e).div(l.ln(2))}function tu(e,t){if(D(t)){const n=l.ln(2).times(e);return t.invert(n.div(n.div(Math.E).lambertw()))}throw new Error("Could not invert due to no input being a variable")}function nu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");return new m({inputs:[t.getIntegralFormula(e)],evaluate:eu,invert:tu})}throw new Error("Could not integrate due to no input being a variable")}function iu(e,t){if(D(t))return t.invert(l.exp(e));throw new Error("Could not invert due to no input being a variable")}function ru(e){return l.ln(e).sub(1).times(e)}function au(e,t){if(D(t))return t.invert(l.div(e,l.div(e,Math.E).lambertw()));throw new Error("Could not invert due to no input being a variable")}function su(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");return new m({inputs:[t.getIntegralFormula(e)],evaluate:ru,invert:au})}throw new Error("Could not integrate due to no input being a variable")}function ou(e,t,n){if(D(t))return t.invert(l.root(e,ve(n)));if(D(n))return n.invert(l.ln(e).div(l.ln(ve(t))));throw new Error("Could not invert due to no input being a variable")}function lu(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e),r=m.add(n,1);return m.pow(i,r).div(r)}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e);return m.pow(t,i).div(m.ln(t))}throw new Error("Could not integrate due to no input being a variable")}function uu(e,t){if(D(t))return t.invert(l.root(e,10));throw new Error("Could not invert due to no input being a variable")}function cu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.pow10(n).div(m.ln(10))}throw new Error("Could not integrate due to no input being a variable")}function du(e,t,n){if(D(t))return t.invert(l.ln(e).div(ve(n)));if(D(n))return n.invert(l.root(ve(t),e));throw new Error("Could not invert due to no input being a variable")}function fu(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.pow(n,i).div(m.ln(n))}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e),r=m.add(t,1);return m.pow(i,r).div(r)}throw new Error("Could not integrate due to no input being a variable")}function gu(e,t,n){if(D(t))return t.invert(l.root(e,l.recip(ve(n))));if(D(n))return n.invert(l.ln(ve(t)).div(l.ln(e)));throw new Error("Could not invert due to no input being a variable")}function pu(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.pow(i,m.recip(n).add(1)).times(n).div(m.add(n,1))}throw new Error("Could not integrate due to no input being a variable")}function mu(e,t){if(D(t))return t.invert(l.ln(e));throw new Error("Could not invert due to no input being a variable")}function vu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.exp(n)}throw new Error("Could not integrate due to no input being a variable")}function hu(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){const i=l.minabs(t,1e308).toNumber();return l.tetrate(e,i,n)}function bu(e,t,n,i){if(D(t))return t.invert(l.ssqrt(e));throw new Error("Could not invert due to no input being a variable")}function yu(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){const i=l.minabs(t,1e308).toNumber();return l.iteratedexp(e,i,new l(n))}function wu(e,t,n,i){if(D(t))return t.invert(l.iteratedlog(e,Math.E,l.minabs(1e308,ve(n)).toNumber()));throw new Error("Could not invert due to no input being a variable")}function _u(e,t=10,n=2){const i=l.minabs(n,1e308).toNumber();return l.iteratedlog(e,t,i)}function Nu(e,t=10){const n=l.minabs(t,1e308).toNumber();return l.slog(e,n)}function Cu(e,t,n){if(D(t))return t.invert(l.tetrate(e,l.minabs(1e308,ve(n)).toNumber()));throw new Error("Could not invert due to no input being a variable")}function ku(e,t,n){const i=l.minabs(t,1e308).toNumber();return l.layeradd(e,i,n)}function Mu(e,t,n,i){if(D(t))return t.invert(l.layeradd(e,l.minabs(1e308,ve(n)).negate().toNumber()));throw new Error("Could not invert due to no input being a variable")}function Su(e,t){if(D(t))return t.invert(l.pow(Math.E,e).times(e));throw new Error("Could not invert due to no input being a variable")}function Iu(e,t){if(D(t))return t.invert(l.tetrate(e,2));throw new Error("Could not invert due to no input being a variable")}function $u(e,t,n){const i=l.minabs(t,1e308).toNumber();return l.pentate(e,i,n)}function xu(e,t){if(D(t))return t.invert(l.asin(e));throw new Error("Could not invert due to no input being a variable")}function Eu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.cos(n).neg()}throw new Error("Could not integrate due to no input being a variable")}function Tu(e,t){if(D(t))return t.invert(l.acos(e));throw new Error("Could not invert due to no input being a variable")}function Pu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.sin(n)}throw new Error("Could not integrate due to no input being a variable")}function Du(e,t){if(D(t))return t.invert(l.atan(e));throw new Error("Could not invert due to no input being a variable")}function Fu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.cos(n).ln().neg()}throw new Error("Could not integrate due to no input being a variable")}function Ou(e,t){if(D(t))return t.invert(l.sin(e));throw new Error("Could not invert due to no input being a variable")}function Au(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.asin(n).times(n).add(m.sqrt(m.sub(1,m.pow(n,2))))}throw new Error("Could not integrate due to no input being a variable")}function qu(e,t){if(D(t))return t.invert(l.cos(e));throw new Error("Could not invert due to no input being a variable")}function Vu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.acos(n).times(n).sub(m.sqrt(m.sub(1,m.pow(n,2))))}throw new Error("Could not integrate due to no input being a variable")}function Ru(e,t){if(D(t))return t.invert(l.tan(e));throw new Error("Could not invert due to no input being a variable")}function Lu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.atan(n).times(n).sub(m.ln(m.pow(n,2).add(1)).div(2))}throw new Error("Could not integrate due to no input being a variable")}function Bu(e,t){if(D(t))return t.invert(l.asinh(e));throw new Error("Could not invert due to no input being a variable")}function ju(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.cosh(n)}throw new Error("Could not integrate due to no input being a variable")}function zu(e,t){if(D(t))return t.invert(l.acosh(e));throw new Error("Could not invert due to no input being a variable")}function Uu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.sinh(n)}throw new Error("Could not integrate due to no input being a variable")}function Gu(e,t){if(D(t))return t.invert(l.atanh(e));throw new Error("Could not invert due to no input being a variable")}function Wu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.cosh(n).ln()}throw new Error("Could not integrate due to no input being a variable")}function Hu(e,t){if(D(t))return t.invert(l.sinh(e));throw new Error("Could not invert due to no input being a variable")}function Zu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.asinh(n).times(n).sub(m.pow(n,2).add(1).sqrt())}throw new Error("Could not integrate due to no input being a variable")}function Yu(e,t){if(D(t))return t.invert(l.cosh(e));throw new Error("Could not invert due to no input being a variable")}function Ju(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.acosh(n).times(n).sub(m.add(n,1).sqrt().times(m.sub(n,1).sqrt()))}throw new Error("Could not integrate due to no input being a variable")}function Ku(e,t){if(D(t))return t.invert(l.tanh(e));throw new Error("Could not invert due to no input being a variable")}function Xu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.atanh(n).times(n).add(m.sub(1,m.pow(n,2)).ln().div(2))}throw new Error("Could not integrate due to no input being a variable")}function on(e){return(t,n)=>new m({inputs:[t,n],evaluate:e,invert:fn})}function D(e){return e instanceof be&&e.hasVariable()}function ve(e,t){return e instanceof be?e.evaluate(t):s(e)}function Qu(){return m.pow(this,2).div(2)}function ec(){return this}const _e=class{constructor(e){this.negate=this.neg,this.negated=this.neg,this.sgn=this.sign,this.plus=this.add,this.subtract=this.sub,this.minus=this.sub,this.multiply=this.mul,this.times=this.mul,this.divide=this.div,this.divideBy=this.div,this.dividedBy=this.div,this.reciprocal=this.recip,this.reciprocate=this.recip,this.logarithm=this.log;let t;"inputs"in e&&(e.inputs=e.inputs.map(n=>typeof n=="object"&&dt in n?n[dt]:n)),"variable"in e?(typeof e.variable=="object"&&dt in e.variable&&(e.variable=e.variable[dt]),t=this.setupVariable(e)):"evaluate"in e?t=this.setupFormula(e):t=this.setupConstant(e),this.inputs=t.inputs,this.internalVariables=t.internalVariables,this.innermostVariable=t.innermostVariable,this.internalEvaluate=t.internalEvaluate,this.internalInvert=t.internalInvert,this.internalIntegrate=t.internalIntegrate,this.internalIntegrateInner=t.internalIntegrateInner,this.applySubstitution=t.applySubstitution}setupVariable({variable:e}){return{inputs:[e],internalVariables:1,innermostVariable:e,internalIntegrate:Qu,internalIntegrateInner:ec,applySubstitution:fn}}setupConstant({inputs:e}){if(e.length!==1)throw new Error("Evaluate function is required if inputs is not length 1");return{inputs:e,internalVariables:0}}setupFormula(e){var y,N;const{inputs:t,evaluate:n,invert:i,integrate:r,integrateInner:a,applySubstitution:u}=e,o=t.reduce((w,_)=>w+(_ instanceof _e?_.internalVariables:0),0),c=t.find(w=>w instanceof _e&&w.hasVariable()),f=o===1?c==null?void 0:c.innermostVariable:void 0,h=(y=c==null?void 0:c.isInvertible())!=null?y:!1,g=(N=c==null?void 0:c.isIntegrable())!=null?N:!1;return{inputs:t,internalEvaluate:n,internalInvert:h?i:void 0,internalIntegrate:g?r:void 0,internalIntegrateInner:a,applySubstitution:u,innermostVariable:f,internalVariables:o}}isInvertible(){return this.hasVariable()&&(this.internalInvert!=null||this.internalEvaluate==null)}isIntegrable(){return this.hasVariable()&&this.internalIntegrate!=null}isIntegralInvertible(){return this.isIntegrable()?this.getIntegralFormula().isInvertible():!1}hasVariable(){return this.internalVariables===1}evaluate(e){var t,n,i;return(i=(n=(t=this.internalEvaluate)==null?void 0:t.call(this,...this.inputs.map(r=>ve(r,e))))!=null?n:this.hasVariable()?e:null)!=null?i:ve(this.inputs[0])}equals(e){return this.inputs.length===e.inputs.length&&this.inputs.every((t,n)=>t instanceof _e&&e.inputs[n]instanceof _e?t.equals(e.inputs[n]):!(t instanceof _e)&&!(e.inputs[n]instanceof _e)&&l.eq(s(t),s(e.inputs[n])))&&this.internalEvaluate===e.internalEvaluate&&this.internalInvert===e.internalInvert&&this.internalIntegrate===e.internalIntegrate&&this.internalVariables===e.internalVariables}static constant(e){return new m({inputs:[e]})}static variable(e){return new m({variable:e})}static step(e,t,n){const i=L(0),r=n(m.variable(i)),a=he(t);function u(c){return l.lt(c,s(a))?c:(i.value=l.sub(c,s(a)),l.add(r.evaluate(),s(a)))}function o(c,f){if(D(f)&&r.isInvertible())return l.gt(c,s(a))&&(c=l.add(r.invert(l.sub(c,s(a))),s(a))),f.invert(c);throw new Error("Could not invert due to no input being a variable")}return new m({inputs:[e],evaluate:u,invert:r.isInvertible()&&r.hasVariable()?o:void 0})}static if(e,t,n,i){const r=L(0),a=m.variable(r),u=n(a),o=i==null?void 0:i(a),c=he(t);function f(g){return s(c)?(r.value=g,u.evaluate()):o?(r.value=g,o.evaluate()):g}function h(g,y){if(!D(y)||!u.isInvertible()||o!=null&&!o.isInvertible())throw new Error("Could not invert due to no input being a variable");return s(c)?y.invert(u.invert(g)):o?y.invert(o.invert(g)):y.invert(g)}return new m({inputs:[e],evaluate:f,invert:u.isInvertible()&&u.hasVariable()?h:void 0})}static conditional(e,t,n,i){return m.if(e,t,n,i)}static abs(e){return new m({inputs:[e],evaluate:l.abs})}static neg(e){return new m({inputs:[e],evaluate:l.neg,invert:$l,applySubstitution:El,integrate:xl})}static sign(e){return new m({inputs:[e],evaluate:l.sign})}static round(e){return new m({inputs:[e],evaluate:l.round})}static floor(e){return new m({inputs:[e],evaluate:l.floor})}static ceil(e){return new m({inputs:[e],evaluate:l.ceil})}static trunc(e){return new m({inputs:[e],evaluate:l.trunc})}static add(e,t){return new m({inputs:[e,t],evaluate:l.add,invert:Tl,integrate:Pl,integrateInner:Dl,applySubstitution:fn})}static sub(e,t){return new m({inputs:[e,t],evaluate:l.sub,invert:Fl,integrate:Ol,integrateInner:Al,applySubstitution:fn})}static mul(e,t){return new m({inputs:[e,t],evaluate:l.mul,invert:ql,integrate:Vl,applySubstitution:Rl})}static div(e,t){return new m({inputs:[e,t],evaluate:l.div,invert:Ll,integrate:Bl,applySubstitution:jl})}static recip(e){return new m({inputs:[e],evaluate:l.recip,invert:zl,integrate:Ul})}static clamp(e,t,n){return new m({inputs:[e,t,n],evaluate:l.clamp,invert:fn})}static pLog10(e){return new m({inputs:[e],evaluate:l.pLog10})}static absLog10(e){return new m({inputs:[e],evaluate:l.absLog10})}static log10(e){return new m({inputs:[e],evaluate:l.log10,invert:Gl,integrate:Zl})}static log(e,t){return new m({inputs:[e,t],evaluate:l.log,invert:Yl,integrate:Xl})}static log2(e){return new m({inputs:[e],evaluate:l.log2,invert:Ql,integrate:nu})}static ln(e){return new m({inputs:[e],evaluate:l.ln,invert:iu,integrate:su})}static pow(e,t){return new m({inputs:[e,t],evaluate:l.pow,invert:ou,integrate:lu})}static pow10(e){return new m({inputs:[e],evaluate:l.pow10,invert:uu,integrate:cu})}static pow_base(e,t){return new m({inputs:[e,t],evaluate:l.pow_base,invert:du,integrate:fu})}static root(e,t){return new m({inputs:[e,t],evaluate:l.root,invert:gu,integrate:pu})}static factorial(e){return new m({inputs:[e],evaluate:l.factorial})}static gamma(e){return new m({inputs:[e],evaluate:l.gamma})}static lngamma(e){return new m({inputs:[e],evaluate:l.lngamma})}static exp(e){return new m({inputs:[e],evaluate:l.exp,invert:mu,integrate:vu})}static sqr(e){return m.pow(e,2)}static sqrt(e){return m.root(e,2)}static cube(e){return m.pow(e,3)}static cbrt(e){return m.root(e,3)}static tetrate(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){return new m({inputs:[e,t,n],evaluate:hu,invert:bu})}static iteratedexp(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){return new m({inputs:[e,t,n],evaluate:yu,invert:wu})}static iteratedlog(e,t=10,n=1){return new m({inputs:[e,t,n],evaluate:_u})}static slog(e,t=10){return new m({inputs:[e,t],evaluate:Nu,invert:Cu})}static layeradd10(e,t){return new m({inputs:[e,t],evaluate:l.layeradd10})}static layeradd(e,t,n=10){return new m({inputs:[e,t,n],evaluate:ku,invert:Mu})}static lambertw(e){return new m({inputs:[e],evaluate:l.lambertw,invert:Su})}static ssqrt(e){return new m({inputs:[e],evaluate:l.ssqrt,invert:Iu})}static pentate(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){return new m({inputs:[e,t,n],evaluate:$u})}static sin(e){return new m({inputs:[e],evaluate:l.sin,invert:Ou,integrate:Eu})}static cos(e){return new m({inputs:[e],evaluate:l.cos,invert:qu,integrate:Pu})}static tan(e){return new m({inputs:[e],evaluate:l.tan,invert:Ru,integrate:Fu})}static asin(e){return new m({inputs:[e],evaluate:l.asin,invert:xu,integrate:Au})}static acos(e){return new m({inputs:[e],evaluate:l.acos,invert:Tu,integrate:Vu})}static atan(e){return new m({inputs:[e],evaluate:l.atan,invert:Du,integrate:Lu})}static sinh(e){return new m({inputs:[e],evaluate:l.sinh,invert:Hu,integrate:ju})}static cosh(e){return new m({inputs:[e],evaluate:l.cosh,invert:Yu,integrate:Uu})}static tanh(e){return new m({inputs:[e],evaluate:l.tanh,invert:Ku,integrate:Wu})}static asinh(e){return new m({inputs:[e],evaluate:l.asinh,invert:Bu,integrate:Zu})}static acosh(e){return new m({inputs:[e],evaluate:l.acosh,invert:zu,integrate:Ju})}static atanh(e){return new m({inputs:[e],evaluate:l.atanh,invert:Gu,integrate:Xu})}step(e,t){return m.step(this,e,t)}if(e,t){return m.if(this,e,t)}conditional(e,t){return m.if(this,e,t)}abs(){return m.abs(this)}neg(){return m.neg(this)}sign(){return m.sign(this)}round(){return m.round(this)}floor(){return m.floor(this)}ceil(){return m.ceil(this)}trunc(){return m.trunc(this)}add(e){return m.add(this,e)}sub(e){return m.sub(this,e)}mul(e){return m.mul(this,e)}div(e){return m.div(this,e)}recip(){return m.recip(this)}max(e){return m.max(this,e)}min(e){return m.min(this,e)}maxabs(e){return m.maxabs(this,e)}minabs(e){return m.minabs(this,e)}clamp(e,t){return m.clamp(this,e,t)}clampMin(e){return m.clampMin(this,e)}clampMax(e){return m.clampMax(this,e)}pLog10(){return m.pLog10(this)}absLog10(){return m.absLog10(this)}log10(){return m.log10(this)}log(e){return m.log(this,e)}log2(){return m.log2(this)}ln(){return m.ln(this)}pow(e){return m.pow(this,e)}pow10(){return m.pow10(this)}pow_base(e){return m.pow_base(this,e)}root(e){return m.root(this,e)}factorial(){return m.factorial(this)}gamma(){return m.gamma(this)}lngamma(){return m.lngamma(this)}exp(){return m.exp(this)}sqr(){return m.pow(this,2)}sqrt(){return m.root(this,2)}cube(){return m.pow(this,3)}cbrt(){return m.root(this,3)}tetrate(e=2,t=l.fromComponents_noNormalize(1,0,1)){return m.tetrate(this,e,t)}iteratedexp(e=2,t=l.fromComponents_noNormalize(1,0,1)){return m.iteratedexp(this,e,t)}iteratedlog(e=10,t=1){return m.iteratedlog(this,e,t)}slog(e=10){return m.slog(this,e)}layeradd10(e){return m.layeradd10(this,e)}layeradd(e,t){return m.layeradd(this,e,t)}lambertw(){return m.lambertw(this)}ssqrt(){return m.ssqrt(this)}pentate(e=2,t=l.fromComponents_noNormalize(1,0,1)){return m.pentate(this,e,t)}sin(){return m.sin(this)}cos(){return m.cos(this)}tan(){return m.tan(this)}asin(){return m.asin(this)}acos(){return m.acos(this)}atan(){return m.atan(this)}sinh(){return m.sinh(this)}cosh(){return m.cosh(this)}tanh(){return m.tanh(this)}asinh(){return m.asinh(this)}acosh(){return m.acosh(this)}atanh(){return m.atanh(this)}};let be=_e;be.negate=_e.neg;be.negated=_e.neg;be.sgn=_e.sign;be.plus=_e.add;be.subtract=_e.sub;be.minus=_e.sub;be.multiply=_e.mul;be.times=_e.mul;be.divide=_e.div;be.divideBy=_e.div;be.dividedBy=_e.div;be.reciprocal=_e.recip;be.reciprocate=_e.recip;be.max=on(l.max);be.min=on(l.min);be.minabs=on(l.minabs);be.maxabs=on(l.maxabs);be.clampMin=on(l.clampMin);be.clampMax=on(l.clampMax);be.logarithm=_e.log;class m extends be{invert(t){if(this.internalInvert&&this.hasVariable())return this.internalInvert.call(this,t,...this.inputs);if(this.inputs.length===1&&this.hasVariable())return t;throw new Error("Cannot invert non-invertible formula")}evaluateIntegral(t){if(!this.isIntegrable())throw new Error("Cannot evaluate integral of formula without integral");return this.getIntegralFormula().evaluate(t)}invertIntegral(t){if(!this.isIntegrable()||!this.getIntegralFormula().isInvertible())throw new Error("Cannot invert integral of formula without invertible integral");return this.getIntegralFormula().invert(t)}calculateConstantOfIntegration(){const t=this.getIntegralFormula().evaluate(1),n=l.add(this.evaluate(0),this.evaluate(1)).div(2);return l.sub(n,t)}getIntegralFormula(t){if(this.integralFormula!=null&&t==null)return this.integralFormula;if(t==null){if(this.applySubstitution==null){if(t=[],this.internalIntegrate==null)throw new Error("Cannot integrate formula with non-integrable operation");let n=this.internalIntegrate.call(this,t,...this.inputs);t.forEach(i=>n=i(n)),this.integralFormula=n}else if(this.internalIntegrate)this.integralFormula=this.internalIntegrate.call(this,void 0,...this.inputs);else if(this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable())this.integralFormula=this;else throw new Error("Cannot integrate formula without variable");return this.integralFormula}else{if(this.applySubstitution==null)throw new Error("Cannot have two complex operations in an integrable formula");if(t.push(n=>this.applySubstitution.call(this,n,...this.inputs)),this.internalIntegrateInner)return this.internalIntegrateInner.call(this,t,...this.inputs);if(this.internalIntegrate)return this.internalIntegrate.call(this,t,...this.inputs);if(this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable())return this;throw new Error("Cannot integrate formula without variable")}}}function tc(e,t,n=!0,i){const r=he(n);return I(()=>{var u,o;let a;if(s(r)){if(!e.isIntegrable()||!e.isIntegralInvertible())throw new Error("Cannot calculate max affordable of formula with non-invertible integral");a=l.floor(e.invertIntegral(l.add(t.value,e.evaluateIntegral()))).sub((u=s(e.innermostVariable))!=null?u:0),i==null&&(i=10)}else{if(!e.isInvertible())throw new Error("Cannot calculate max affordable of non-invertible formula");a=l.floor(e.invert(t.value)),i==null&&(i=0)}if(i>0&&l.lt(Tt(e,a,!0,0),1e308)){a=a.sub(i).clampMin(0);let c=Tt(e,a,!0,0);for(;;){const f=e.evaluate(a.add((o=s(e.innermostVariable))!=null?o:0));if(l.add(c,f).lte(t.value))a=a.add(1),c=l.add(c,f);else break}}return a})}function Tt(e,t,n=!0,i){var a,u,o;let r=l.add(t,(a=s(e.innermostVariable))!=null?a:0);if(n){if(!e.isIntegrable())throw new Error("Cannot calculate cost with spending resources of non-integrable formula");const c=r;r=r.sub(i!=null?i:10).clampMin((u=s(e.innermostVariable))!=null?u:0);let f=l.sub(e.evaluateIntegral(r),e.evaluateIntegral());if(c.gt(1e308))return f.add(l.sub(c,r).times(e.evaluate(r)));for(let h=r.toNumber();h{const{addend:n,description:i,enabled:r,smallerIsBetter:a}=e.call(t,t),u=he(n),o=he(i),c=r==null?void 0:he(r);return{apply:f=>l.add(f,s(u)),invert:f=>l.sub(f,s(u)),getFormula:f=>m.add(f,u),enabled:c,description:i==null?void 0:ne(()=>p("div",{class:"modifier-container"},[s(o)!=null?p("span",{class:"modifier-description"},[tt(s(o))]):null,p("span",{class:"modifier-amount",style:(a===!0?l.gt(s(u),0):l.lt(s(u),0))?"color: var(--danger)":""},[l.gte(s(u),0)?"+":"",xt(s(u))])]))}})}function ct(e){return We(t=>{const{multiplier:n,description:i,enabled:r,smallerIsBetter:a}=e.call(t,t),u=he(n),o=he(i),c=r==null?void 0:he(r);return{apply:f=>l.times(f,s(u)),invert:f=>l.div(f,s(u)),getFormula:f=>m.times(f,u),enabled:c,description:i==null?void 0:ne(()=>p("div",{class:"modifier-container"},[s(o)!=null?p("span",{class:"modifier-description"},[tt(s(o))]):null,p("span",{class:"modifier-amount",style:(a===!0?l.gt(s(u),1):l.lt(s(u),1))?"color: var(--danger)":""},[V("\xD7"),xt(s(u))])]))}})}function nc(e){return We(t=>{const{exponent:n,description:i,enabled:r,supportLowNumbers:a,smallerIsBetter:u}=e.call(t,t),o=he(n),c=he(i),f=r==null?void 0:he(r);return{apply:h=>{let g=h;return a&&(g=l.add(g,1)),g=l.pow(g,s(o)),a&&(g=l.sub(g,1)),g},invert:h=>{let g=h;return a&&(g=l.add(g,1)),g=l.root(g,s(o)),a&&(g=l.sub(g,1)),g},getFormula:h=>a?m.add(h,1).pow(o).sub(1):m.pow(h,o),enabled:f,description:i==null?void 0:ne(()=>p("div",{class:"modifier-container"},[s(c)!=null?p("span",{class:"modifier-description"},[tt(s(c)),a?" (+1 effective)":null]):null,p("span",{class:"modifier-amount",style:(u===!0?l.gt(s(o),1):l.lt(s(o),1))?"color: var(--danger)":""},[V("^"),xt(s(o))])]))}})}function qt(e){return We(()=>{const t=e();return{apply:n=>t.filter(i=>s(i.enabled)!==!1).reduce((i,r)=>r.apply(i),n),invert:t.every(n=>n.invert!=null)?n=>t.filter(i=>s(i.enabled)!==!1).reduceRight((i,r)=>r.invert(i),n):void 0,getFormula:t.every(n=>n.getFormula!=null)?n=>t.filter(i=>s(i.enabled)!==!1).reduce((i,r)=>r.getFormula(i),n):void 0,enabled:t.some(n=>n.enabled!=null)?I(()=>t.filter(n=>s(n.enabled)!==!1).length>0):void 0,description:t.some(n=>n.description!=null)?ne(()=>p(le,null,[t.filter(n=>s(n.enabled)!==!1).map(n=>s(n.description)).filter(n=>n).map(tt)])):void 0}})}const ic={key:0},rc={key:0,class:"mark star"},ac=["src"],sc=K({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(M(),P("div",ic,[e.mark===!0?(M(),P("div",rc)):(M(),P("img",{key:1,class:"mark",src:e.mark},null,8,ac))])):B("",!0)}});var An=fe(sc,[["__scopeId","data-v-2207999f"]]);const oc=K({__name:"Node",props:{id:null},setup(e){const n=Ne(e),i=In(Qn,()=>{}),r=In(ei,()=>{}),a=Ge(null),u=I(()=>a.value&&a.value.parentElement);return nt([u,n.id],([o,c],[f,h])=>{f&&r(s(h)),o&&i(c,o)}),Mi(()=>r(s(n.id))),(o,c)=>(M(),P("div",{class:"node",ref_key:"node",ref:a},null,512))}});var qn=fe(oc,[["__scopeId","data-v-a48cb382"]]),lc=K({props:{display:{type:R(Object,String,Function),required:!0},visibility:{type:R(Number,Boolean),required:!0},style:R(Object,String,Array),classes:R(Object),onClick:Function,onHold:Function,canClick:{type:R(Boolean),required:!0},small:Boolean,mark:R(Boolean,String),id:{type:String,required:!0}},components:{Node:qn,MarkNode:An},setup(e){const{display:t,onClick:n,onHold:i}=Ne(e),r=Ge("");Qe(()=>{var h;const o=Se(t);if(o==null){r.value="";return}if(ot(o)){r.value=oe(o);return}const c=oe((h=o.title)!=null?h:"","h3"),f=oe(o.description,"div");r.value=oe(ne(()=>p("span",null,[o.title!=null?p("div",null,[p(c,null,null)]):null,p(f,null,null)])))});const{start:a,stop:u}=Ai(n,i);return{start:a,stop:u,comp:r,Visibility:we,isVisible:it,isHidden:sn,unref:s}}});function uc(e,t,n,i,r,a){var c;const u=gt("MarkNode"),o=gt("Node");return e.isVisible(e.visibility)?(M(),P("button",{key:0,style:Oe([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(c=e.unref(e.style))!=null?c:[]]),onClick:t[0]||(t[0]=(...f)=>e.onClick&&e.onClick(...f)),onMousedown:t[1]||(t[1]=(...f)=>e.start&&e.start(...f)),onMouseleave:t[2]||(t[2]=(...f)=>e.stop&&e.stop(...f)),onMouseup:t[3]||(t[3]=(...f)=>e.stop&&e.stop(...f)),onTouchstartPassive:t[4]||(t[4]=(...f)=>e.start&&e.start(...f)),onTouchendPassive:t[5]||(t[5]=(...f)=>e.stop&&e.stop(...f)),onTouchcancelPassive:t[6]||(t[6]=(...f)=>e.stop&&e.stop(...f)),class:ge({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(M(),ee(De(e.unref(e.comp)),{key:0})):B("",!0),p(u,{mark:e.unref(e.mark)},null,8,["mark"]),p(o,{id:e.id},null,8,["id"])],38)):B("",!0)}var cc=fe(lc,[["render",uc],["__scopeId","data-v-211328c0"]]);const dc=["x1","y1","x2","y2"],fc=K({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const n=Ne(e),i=I(()=>{const a=n.startNode.value.rect,u=n.boundingRect.value,o=u?{x:a.x+a.width/2-u.x,y:a.y+a.height/2-u.y}:{x:0,y:0};return n.link.value.offsetStart&&(o.x+=n.link.value.offsetStart.x,o.y+=n.link.value.offsetStart.y),o}),r=I(()=>{const a=n.endNode.value.rect,u=n.boundingRect.value,o=u?{x:a.x+a.width/2-u.x,y:a.y+a.height/2-u.y}:{x:0,y:0};return n.link.value.offsetEnd&&(o.x+=n.link.value.offsetEnd.x,o.y+=n.link.value.offsetEnd.y),o});return(a,u)=>(M(),P("line",wt({"stroke-width":"15px",stroke:"white"},e.link,{x1:s(i).x,y1:s(i).y,x2:s(r).x,y2:s(r).y}),null,16,dc))}});const gc=K({__name:"Links",props:{links:null},setup(e){var c;const n=Pt(e,"links"),i=L(null),r=In(ti,L({})),a=In(ni,L(void 0)),u=L((c=i.value)==null?void 0:c.getBoundingClientRect());nt(a,()=>{var f;return u.value=(f=i.value)==null?void 0:f.getBoundingClientRect()}),Fn(()=>{var f;return u.value=(f=i.value)==null?void 0:f.getBoundingClientRect()});const o=I(()=>{var h,g;const f=r.value;return(g=(h=n.value)==null?void 0:h.filter(y=>{var N,w;return((N=f[y.startNode.id])==null?void 0:N.rect)&&((w=f[y.startNode.id])==null?void 0:w.rect)}))!=null?g:[]});return(f,h)=>(M(),P(le,null,[s(o)?(M(),P("svg",sr(wt({key:0},f.$attrs)),[(M(!0),P(le,null,rn(s(o),(g,y)=>(M(),ee(fc,{key:y,link:g,boundingRect:u.value,startNode:s(r)[g.startNode.id],endNode:s(r)[g.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):B("",!0),C("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var pc=fe(gc,[["__scopeId","data-v-063f6d6b"]]);K({props:{nodes:{type:R(Array),required:!0},leftSideNodes:R(Array),rightSideNodes:R(Array),branches:R(Array)},components:{Links:pc},setup(e){const{nodes:t,leftSideNodes:n,rightSideNodes:i}=Ne(e),r=Ge();Qe(()=>{const o=Se(t);r.value=oe(ne(()=>p(le,null,[o.map(c=>p("span",{class:"row tree-row",style:"margin: 50px auto;"},[c.map(tt)]))])))});const a=Ge();Qe(()=>{const o=Se(n);a.value=o?oe(ne(()=>p("span",{class:"left-side-nodes small"},[o.map(tt)]))):""});const u=Ge();return Qe(()=>{const o=Se(i);u.value=o?oe(ne(()=>p("span",{class:"side-nodes small"},[o.map(tt)]))):""}),{unref:s,nodesComp:r,leftNodesComp:a,rightNodesComp:u}}});K({props:{display:R(Object,String,Function),visibility:{type:R(Number,Boolean),required:!0},style:R(String,Object,Array),classes:R(Object),onClick:Function,onHold:Function,color:R(String),glowColor:R(String),canClick:{type:R(Boolean),required:!0},mark:R(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:An,Node:qn},setup(e){const{onClick:t,onHold:n,display:i}=Ne(e),r=yn(i),{start:a,stop:u}=Ai(t,n);return{start:a,stop:u,comp:r,unref:s,Visibility:we,isCoercableComponent:ot,isVisible:it,isHidden:sn}}});function gn(e){const t=[],n={};let i=!1;function r(){return i||(t.push(...e()),n.base=t.map(o=>he(o.base)),n.baseText=t.map(o=>he(o.baseText)),n.visible=t.map(o=>he(o.visible)),n.title=t.map(o=>he(o.title)),n.subtitle=t.map(o=>he(o.subtitle)),i=!0),t}const a=lt({},!1);return[ne(()=>{const o=r();let c=!0;const f=o.map((h,g)=>{var q,$,T;if(s(n.visible[g])===!1)return null;const y=p("h3",{onClick:()=>a.value[g]=!a.value[g],style:"cursor: pointer"},[p("span",{class:"modifier-toggle"+(s(a.value[g])?" collapsed":"")},[V("\u25BC")]),s(n.title[g]),s(n.subtitle[g])!=null?p("span",{class:"subtitle"},[V(" ("),s(n.subtitle[g]),V(")")]):null]),N=s(a.value[g])?null:p(le,null,[p("div",{class:"modifier-container"},[p("span",{class:"modifier-description"},[tt((q=s(n.baseText[g]))!=null?q:"Base")]),p("span",{class:"modifier-amount"},[jt(($=s(n.base[g]))!=null?$:1),h.unit])]),h.modifier.description==null?null:tt(s(h.modifier.description))]),w=!c;c=!1;const _=(T=s(n.base[g]))!=null?T:1,x=h.modifier.apply(_);return p(le,null,[w?p("br",null,null):null,p("div",{style:{"--unit":se.alignUnits&&h.unit!=null?"'"+h.unit+"'":""}},[y,p("br",null,null),N,p("hr",null,null),p("div",{class:"modifier-container"},[p("span",{class:"modifier-description"},[V("Total")]),p("span",{class:"modifier-amount",style:(h.smallerIsBetter===!0?l.gt(x,_!=null?_:1):l.lt(x,_!=null?_:1))?"color: var(--danger)":""},[xt(x),h.unit])])])])});return p(le,null,[f])}),a]}function hi(e,t,n){const i=he(t),r=he(n);return I(()=>{const a=s(i),u=s(r);return l.gte(e.value,u)?"Now":l.lte(a,0)?"Never":On(l.sub(u,e.value).div(a))})}function Dn(e,t,n=1){const i=he(t),r=he(n);if(!e.hasVariable())throw new Error("Cannot create formula preview if the formula does not have a variable");return ne(()=>{var a;if(s(i)){const u=xt(e.evaluate()),o=xt(e.evaluate(l.add(s((a=e.innermostVariable)!=null?a:0),s(r))));return p(le,null,[p("b",null,[p("i",null,[u,V(" \u2192 "),o])])])}return p(le,null,[xt(e.evaluate())])})}const mc=K({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(M(),P("div",{style:Oe({width:e.width,height:e.height})},null,4))}});function Wn(e){return We(t=>{const n=e.call(t,t);if(n.partialDisplay=i=>p("span",{style:s(n.requirementMet)?"":"color: var(--danger)"},[vi(n.resource,n.cost instanceof m?Tt(n.cost,i!=null?i:1,s(n.spendResources)):s(n.cost))," ",n.resource.displayName]),n.display=i=>p("div",null,[s(n.requiresPay)?"Costs: ":"Requires: ",vi(n.resource,n.cost instanceof m?Tt(n.cost,i!=null?i:1,s(n.spendResources)):s(n.cost))," ",n.resource.displayName]),A(n,"visibility"),ue(n,"visibility",we.Visible),A(n,"cost"),A(n,"requiresPay"),ue(n,"requiresPay",!0),A(n,"spendResources"),ue(n,"spendResources",!0),ue(n,"pay",function(i){const r=n.cost instanceof m?Tt(n.cost,i!=null?i:1,s(n.spendResources)):s(n.cost);n.resource.value=l.sub(n.resource.value,r).max(0)}),n.canMaximize=I(()=>n.cost instanceof m&&n.cost.isInvertible()&&(s(n.spendResources)===!1||n.cost.isIntegrable())),n.cost instanceof m&&n.cost.isInvertible()){const i=tc(n.cost,n.resource,s(n.spendResources));n.requirementMet=I(()=>s(n.canMaximize)?i.value:n.cost instanceof m?l.gte(n.resource.value,n.cost.evaluate()):l.gte(n.resource.value,s(n.cost)))}else n.requirementMet=I(()=>n.cost instanceof m?l.gte(n.resource.value,n.cost.evaluate()):l.gte(n.resource.value,s(n.cost)));return n})}function oi(e){return We(()=>({requirementMet:I(()=>it(e.visibility)),visibility:we.None,requiresPay:!1}))}function vc(e,t){return We(()=>({requirementMet:he(e),partialDisplay:t==null?void 0:ne(()=>tt(t)),display:t==null?void 0:ne(()=>p(le,null,[V("Req: "),tt(t)])),visibility:t==null?we.None:we.Visible,requiresPay:!1}))}function Vn(e){if(ft(e))return e.every(Vn);const t=s(e.requirementMet);return typeof t=="boolean"?t:l.gt(t,0)}function Ji(e){if(ft(e))return e.map(Ji).reduce(l.min);const t=s(e.requirementMet);return typeof t=="boolean"?t?l.dInf:0:l.gt(t,1)&&s(e.canMaximize)!==!0?1:t}function Rn(e,t=1){var n,i;if(ft(e)&&(e=e.filter(r=>it(r.visibility)),e.length===1&&(e=e[0])),ft(e)){e=e.filter(u=>"partialDisplay"in u);const r=e.filter(u=>s(u.requiresPay)),a=e.filter(u=>!s(u.requiresPay));return p(le,null,[r.length>0?p("div",null,[V("Costs:")," ",pi(r.map(u=>u.partialDisplay(t)),p(le,null,[V(", ")]))]):null,a.length>0?p("div",null,[V("Requires:")," ",pi(a.map(u=>u.partialDisplay(t)),p(le,null,[V(", ")]))]):null])}return(i=(n=e.display)==null?void 0:n.call(e))!=null?i:p(le,null,null)}function Ki(e,t=1){var n;ft(e)?e.filter(i=>s(i.requiresPay)).forEach(i=>{var r;return(r=i.pay)==null?void 0:r.call(i,t)}):s(e.requiresPay)&&((n=e.pay)==null||n.call(e,t))}var hc=K({props:{visibility:{type:R(Number,Boolean),required:!0},display:R(Object,String,Function),earned:{type:R(Boolean),required:!0},requirements:R(Object,Array),image:R(String),style:R(String,Object,Array),classes:R(Object),mark:R(Boolean,String),small:R(Boolean),id:{type:String,required:!0}},components:{Node:qn,MarkNode:An},setup(e){const{display:t,requirements:n,earned:i}=Ne(e),r=Ge("");return Qe(()=>{const a=Se(t);if(a==null){r.value="";return}if(ot(a)){r.value=oe(a);return}const u=oe(a.requirement?a.requirement:ne(()=>{var f;return Rn((f=Se(n))!=null?f:[])}),"h3"),o=oe(a.effectDisplay||"","b"),c=Se(i)?oe(a.optionsDisplay||"","span"):"";r.value=oe(ne(()=>p("span",null,[p(u,null,null),a.effectDisplay!=null?p("div",null,[p(o,null,null)]):null,a.optionsDisplay!=null?p("div",{class:"equal-spaced"},[p(c,null,null)]):null])))}),{comp:r,unref:s,Visibility:we,isVisible:it,isHidden:sn}}});function bc(e,t,n,i,r,a){var c;const u=gt("MarkNode"),o=gt("Node");return e.isVisible(e.visibility)?(M(),P("div",{key:0,style:Oe([{visibility:e.isHidden(e.visibility)?"hidden":void 0,backgroundImage:e.earned&&e.image&&`url(${e.image})`||""},(c=e.unref(e.style))!=null?c:[]]),class:ge({feature:!0,achievement:!0,locked:!e.unref(e.earned),done:e.unref(e.earned),small:e.unref(e.small),...e.unref(e.classes)})},[e.comp?(M(),ee(De(e.comp),{key:0})):B("",!0),p(u,{mark:e.unref(e.mark)},null,8,["mark"]),p(o,{id:e.id},null,8,["id"])],6)):B("",!0)}var yc=fe(hc,[["render",bc],["__scopeId","data-v-5673325a"]]);const wc=Kn(),_c=Symbol("Achievement");let Qt=function(e){return e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none",e}({});function Nc(e,...t){const n=lt(!1,!1),i=t.reduce((r,a)=>{var u;return Object.assign(r,(u=a.getPersistentData)==null?void 0:u.call(a))},{});return We(r=>{var c,f,h;const a=(c=e==null?void 0:e.call(r,r))!=null?c:{};a.id=bn("achievement-"),a.type=_c,a[st]=yc;for(const g of t)(f=g.preConstruct)==null||f.call(g,a);a.earned=n,a.complete=function(){var y,N;n.value=!0;const g=a;if((y=g.onComplete)==null||y.call(g),g.display!=null&&s(g.showPopups)===!0){const w=s(g.display);let _;ot(w)?_=oe(w):w.requirement!=null?_=oe(w.requirement):_=Rn((N=g.requirements)!=null?N:[]),wc.info(p("div",null,[p("h3",null,[V("Achievement earned!")]),p("div",null,[p(_,null,null)])]))}},Object.assign(a,i),A(a,"visibility"),ue(a,"visibility",we.Visible);const u=a.visibility;a.visibility=or(()=>{const g=s(a.display);switch(se.msDisplay){default:case Qt.All:return s(u);case Qt.Configurable:return s(a.earned)&&!(g!=null&&typeof g=="object"&&"optionsDisplay"in g)?we.None:s(u);case Qt.Incomplete:return s(a.earned)?we.None:s(u);case Qt.None:return we.None}}),A(a,"display"),A(a,"mark"),A(a,"small"),A(a,"image"),A(a,"style"),A(a,"classes"),A(a,"showPopups"),ue(a,"showPopups",!0);for(const g of t)(h=g.postConstruct)==null||h.call(g,a);const o=t.reduce((g,y)=>{var N;return Object.assign(g,(N=y.getGatheredProps)==null?void 0:N.call(y,a))},{});if(a[et]=function(){const{visibility:g,display:y,requirements:N,earned:w,image:_,style:x,classes:q,mark:$,small:T,id:F}=this;return{visibility:g,display:y,requirements:N,earned:w,image:_,style:s(x),classes:q,mark:$,small:T,id:F,...o}},a.requirements){const g=a,y=[oi(g),vc(()=>!g.earned.value),...ft(a.requirements)?a.requirements:[a.requirements]];Qe(()=>{se.active===J.id&&Vn(y)&&g.complete()})}return a})}Ae.on("loadSettings",e=>{ue(e,"msDisplay",Qt.All)});const Cc=Object.values(Qt).map(e=>({label:Ke(e),value:e}));_a(ne(()=>p(ai,{title:ne(()=>p("span",{class:"option-title"},[V("Show achievements"),p("desc",null,[V("Select which achievements to display based on criterias.")])])),options:Cc,"onUpdate:modelValue":e=>se.msDisplay=e,modelValue:se.msDisplay},null)));const kc=Symbol("Repeatable");function Mc(e,...t){const n=lt(0),i=t.reduce((r,a)=>{var u;return Object.assign(r,(u=a.getPersistentData)==null?void 0:u.call(a))},{});return We(r=>{var y,N,w;const a=e.call(r,r);a.id=bn("repeatable-"),a.type=kc,a[st]=cc;for(const _ of t)(y=_.preConstruct)==null||y.call(_,a);a.amount=n,a.amount[an]=(N=a.initialAmount)!=null?N:0,Object.assign(a,i);const u={requirementMet:I(()=>l.sub(s(a.limit),a.amount.value)),requiresPay:!1,visibility:we.None},o=oi(a);ft(a.requirements)?(a.requirements.unshift(o),a.requirements.push(u)):a.requirements=[o,a.requirements,u],a.maxed=I(()=>l.gte(a.amount.value,s(a.limit))),A(a,"classes");const c=a.classes;a.classes=I(()=>{const _=s(c)||{};return a.maxed.value&&(_.bought=!0),_}),a.amountToIncrease=I(()=>s(a.maximize)?Ji(a.requirements):1),a.canClick=I(()=>Vn(a.requirements));const f=a.onClick;a.onClick=function(_){const x=a;!s(x.canClick)||(Ki(a.requirements,s(a.amountToIncrease)),x.amount.value=l.add(x.amount.value,1),f==null||f(_))},A(a,"display");const h=a.display;a.display=ne(()=>{var x,q,$;const _=s(h);if(ot(_)){const T=oe(_);return p(T,null,null)}if(_!=null){const T=a,F=oe((x=_.title)!=null?x:"","h3"),j=oe((q=_.description)!=null?q:""),ie=oe(($=_.effectDisplay)!=null?$:"");return p("span",null,[_.title==null?null:p("div",null,[p(F,null,null)]),_.description==null?null:p(j,null,null),_.showAmount===!1?null:p("div",null,[p("br",null,null),p(le,null,[V("Amount: "),je(T.amount.value)]),l.isFinite(s(T.limit))?p(le,null,[V(" / "),je(s(T.limit))]):void 0]),_.effectDisplay==null?null:p("div",null,[p("br",null,null),V("Currently: "),p(ie,null,null)]),T.maxed.value?null:p("div",null,[p("br",null,null),Rn(T.requirements,s(a.amountToIncrease))])])}return""}),A(a,"visibility"),ue(a,"visibility",we.Visible),A(a,"limit"),ue(a,"limit",l.dInf),A(a,"style"),A(a,"mark"),A(a,"small"),A(a,"maximize");for(const _ of t)(w=_.postConstruct)==null||w.call(_,a);const g=t.reduce((_,x)=>{var q;return Object.assign(_,(q=x.getGatheredProps)==null?void 0:q.call(x,a))},{});return a[et]=function(){const{display:_,visibility:x,style:q,classes:$,onClick:T,canClick:F,small:j,mark:ie,id:ae}=this;return{display:_,visibility:x,style:s(q),classes:$,onClick:T,canClick:F,small:j,mark:ie,id:ae,...g}},a})}function bi(e,t){return A(t,"display"),A(t,"classes"),A(t,"style"),A(t,"direction"),ue(t,"direction",W.Up),A(t,"xoffset"),A(t,"yoffset"),t.pinnable&&(t.pinned=lt(!1,!1)),yt(()=>{t.pinnable&&("pinned"in e?(console.error("Cannot add pinnable tooltip to element that already has a property called 'pinned'"),t.pinnable=!1,Ri(t.pinned)):e.pinned=t.pinned);const n=e[st];e[st]=Ce;const i=e[et].bind(e);e[et]=function(){const{display:a,classes:u,style:o,direction:c,xoffset:f,yoffset:h,pinned:g}=this;return{element:{[st]:n,[et]:i},display:a,classes:u,style:s(o),direction:c,xoffset:f,yoffset:h,pinned:g}}.bind(t)}),t}var Sc=K({props:{display:{type:R(String,Object,Function),required:!0},visibility:{type:R(Number,Boolean),required:!0},style:R(String,Object,Array),classes:R(Object),requirements:{type:Object,required:!0},canPurchase:{type:R(Boolean),required:!0},bought:{type:R(Boolean),required:!0},mark:R(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:qn,MarkNode:An},setup(e){const{display:t,requirements:n,bought:i}=Ne(e),r=Ge("");return Qe(()=>{const a=Se(t);if(a==null){r.value="";return}if(ot(a)){r.value=oe(a);return}const u=oe(a.title||"","h3"),o=oe(a.description,"div"),c=oe(a.effectDisplay||"");r.value=oe(ne(()=>p("span",null,[a.title!=null?p("div",null,[p(u,null,null)]):null,p(o,null,null),a.effectDisplay!=null?p("div",null,[V("Currently: "),p(c,null,null)]):null,i.value?null:p(le,null,[p("br",null,null),Rn(n.value)])])))}),{component:r,unref:s,Visibility:we,isVisible:it,isHidden:sn}}});const Ic=["disabled"];function $c(e,t,n,i,r,a){var c;const u=gt("MarkNode"),o=gt("Node");return e.isVisible(e.visibility)?(M(),P("button",{key:0,style:Oe([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),onClick:t[0]||(t[0]=(...f)=>e.purchase&&e.purchase(...f)),class:ge({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(M(),ee(De(e.unref(e.component)),{key:0})):B("",!0),p(u,{mark:e.unref(e.mark)},null,8,["mark"]),p(o,{id:e.id},null,8,["id"])],14,Ic)):B("",!0)}var xc=fe(Sc,[["render",$c],["__scopeId","data-v-9be6bac0"]]);const Ec=Symbol("Upgrade");function Tc(e,...t){const n=lt(!1,!1),i=t.reduce((r,a)=>{var u;return Object.assign(r,(u=a.getPersistentData)==null?void 0:u.call(a))},{});return We(r=>{var c,f;const a=e.call(r,r);a.id=bn("upgrade-"),a.type=Ec,a[st]=xc;for(const h of t)(c=h.preConstruct)==null||c.call(h,a);a.bought=n,Object.assign(a,i),a.canPurchase=I(()=>Vn(a.requirements)),a.purchase=function(){var g;const h=a;!s(h.canPurchase)||(Ki(a.requirements),n.value=!0,(g=h.onPurchase)==null||g.call(h))};const u=oi(a);ft(a.requirements)?a.requirements.unshift(u):a.requirements=[u,a.requirements],A(a,"visibility"),ue(a,"visibility",we.Visible),A(a,"classes"),A(a,"style"),A(a,"display"),A(a,"mark");for(const h of t)(f=h.postConstruct)==null||f.call(h,a);const o=t.reduce((h,g)=>{var y;return Object.assign(h,(y=g.getGatheredProps)==null?void 0:y.call(g,a))},{});return a[et]=function(){const{display:h,visibility:g,style:y,classes:N,requirements:w,canPurchase:_,bought:x,mark:q,id:$,purchase:T}=this;return{display:h,visibility:g,style:s(y),classes:N,requirements:w,canPurchase:_,bought:x,mark:q,id:$,purchase:T,...o}},a})}function Pc(e,t,n,i){return function(){e>>>=0,t>>>=0,n>>>=0,i>>>=0;let r=e+t|0;return e=t^t>>>9,t=n+(n<<3)|0,n=n<<21|n>>>11,i=i+1|0,r=r+i|0,n=n+r|0,(r>>>0)/4294967296}}const Dc={1:["b","c","d","f","g","h","i","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z"],2:["a","e","o","u"],3:["br","cr","dr","fr","gr","pr","str","tr","bl","cl","fl","gl","pl","sl","sc","sk","sm","sn","sp","st","sw","ch","sh","th","wh"],4:["ae","ai","ao","au","a","ay","ea","ei","eo","eu","e","ey","ua","ue","ui","uo","u","uy","ia","ie","iu","io","iy","oa","oe","ou","oi","o","oy"],5:["turn","ter","nus","rus","tania","hiri","hines","gawa","nides","carro","rilia","stea","lia","lea","ria","nov","phus","mia","nerth","wei","ruta","tov","zuno","vis","lara","nia","liv","tera","gantu","yama","tune","ter","nus","cury","bos","pra","thea","nope","tis","clite"],6:["una","ion","iea","iri","illes","ides","agua","olla","inda","eshan","oria","ilia","erth","arth","orth","oth","illon","ichi","ov","arvis","ara","ars","yke","yria","onoe","ippe","osie","one","ore","ade","adus","urn","ypso","ora","iuq","orix","apus","ion","eon","eron","ao","omia"]},yi=[[1,2,5],[2,3,6],[3,4,5],[4,3,6],[3,4,2,5],[2,1,3,6],[3,4,2,5],[4,3,1,6],[3,4,1,4,5],[4,1,4,3,6]];function wi(e){const t=yi[Math.floor(e()*yi.length)];let n="";for(let i=0;in-n*t*Math.max(Math.min(a,4-a,1),0);return[i(5),i(3),i(1)]}function Xi(e,t,n){return ii(e,function(){const i=Pc(0,n>>0,n>>32,1);for(let Y=0;Y<12;Y++)i();const r=wi(i),a=_i([.64,.75,.55],i),u=_i([.18,.2,.25],i),o=Hi(0,wi(i)),c=St.indexOf(t),f=i()+c+1,h=Math.ceil(i()*(c+2)),g=[],y=qt(()=>g),N=I(()=>y.apply(0)),w=[];function _(Y,U,Ze,Zt,Yt=Ze){U=he(U);const Ve=$a(Y);w.push({shouldShowPreview:I(()=>s(U)&&Ve.value),modifier:Yt,cost:Zt}),g.push(Ze);const Ct=hi(o,N,()=>ve(Zt));bi(Y,{display:Ct,direction:W.Down})}const x=[],q=L(0);let $=m.variable(q).times(0);const T={};let F=!0;const j=I(()=>l.add(f,i()-.5).pow_base(2).times(10).times($.evaluate()));for(let Y=0;Y({addend:O,description:rt,enabled:E.bought}));break}case"mult":{const O=i()*5+1;b=`Multiply previous ${o.displayName} gain by x${me(O)}.`,$=$.add(l.sub(O,1).times(T[q.value-1])),d=ct(()=>({multiplier:O,description:rt,enabled:E.bought}));break}case"pow":{const O=i()/5+1.1;b=`Raise previous ${o.displayName} gain to the ^${me(O)}`,$=$.add(l.pow(T[q.value-1],O)).sub(T[q.value-1]),d=nc(()=>({exponent:O,description:rt,enabled:E.bought}))}}T[q.value]=$.evaluate(),q.value++;const S=F,E=Tc(()=>({requirements:Wn(()=>({resource:Un(o),cost:vt})),display:{title:rt,description:b},visibility:S}));_(E,()=>!E.bought.value&&E.canPurchase.value,d,vt),pt.push(E)}x.push(pt);break;case"repeatables":const mt=[];for(let Ye=0;Ye<3;Ye++){const Xt=Mn({add:1.5,mult:3},i),vt=q.value,rt=j.value,b=Ni(i);let d="",S,E,O,te;const $e=m.variable(I(()=>Te.amount.value)).times(2);switch(Xt){case"add":{const Pe=l.add(rt,10).times(i()+.5);d=`Gain ${me(Pe)} ${o.displayName}/s`,te=$e.add(1).times(rt),$=$.add(I(()=>l.sub(q.value,vt).add(1).times(5).times(Pe))),S=I(()=>me(l.times(Pe,Te.amount.value))+"/s"),E=pn(()=>({addend:()=>l.times(Pe,Te.amount.value),description:b,enabled:()=>l.gt(Te.amount.value,0)})),O=pn(()=>({addend:Pe}));break}case"mult":{const Pe=i()+1;d=`Multiply previous ${o.displayName} gain by x${me(Pe)}.`,te=$e.pow_base(Pe).times(rt),$=$.add(I(()=>l.sub(q.value,vt).add(1).times(5).pow_base(Pe).sub(1).times(T[vt]))),S=I(()=>"x"+me(l.pow(Pe,Te.amount.value))),E=ct(()=>({multiplier:()=>l.pow(Pe,Te.amount.value),description:b,enabled:()=>l.gt(Te.amount.value,0)})),O=ct(()=>({multiplier:Pe}));break}}T[q.value]=$.evaluate(),q.value++;const ut=F,Te=Mc(()=>({requirements:Wn(()=>({resource:Un(o),cost:te})),display:()=>({title:b,description:d,effectDisplay:s(S)}),visibility:ut}));_(Te,()=>s(Te.canClick),E,te,O),mt.push(Te)}x.push(mt);break}const Yt=Mn({cache:100,generation:10,resourceMulti:5,energyMulti:5},i);let Ve="",Ct,Nn,Cn,Le,ln,Ft;switch(Yt){case"cache":Le=Hn(i),Ve=`Gain ${me(f)}x your current ${Le}.`,Nn=()=>{var mt,Ye,Kt;return Vt.grantResource(Le,l.times((Kt=(Ye=(mt=Vt.resourceNodes.value[Le])==null?void 0:mt.state)==null?void 0:Ye.amount)!=null?Kt:0,f))};break;case"generation":Le=Hn(i);const pt=l.div(f,120).times(Xe[Le]);Ve=`Gain ${me(pt)} ${Le}/s while plane is active.`,Ct=mt=>Vt.grantResource(Le,l.times(mt,pt)),Cn=I(()=>Vt.resourceNodes.value[Le]);break;case"resourceMulti":ln=Le=Hn(i),Ft=l.div(f,17).pow_base(2),Ve=`Gain ${me(Ft)}x ${Le} while plane is active.`;break;case"energyMulti":ln="energy",Ft=l.div(f,17),Ve=`Gain ${me(Ft)}x energy while plane is active.`;break}const Bn=F,un=j.value,Jt=Nc(()=>({requirements:Wn(()=>({resource:Un(o),cost:un})),visibility:Bn,display:{requirement:`${me(un)} ${o.displayName}`,effectDisplay:Ve},style:"width: 100%",classes:{final:Y===h-1},update:Ct,onComplete:Nn,link:Cn,effectedResource:ln,resourceMulti:Ft})),kt=hi(o,N,un);bi(Jt,{display:()=>Jt.earned.value?"":kt.value,direction:W.Down}),x.push([Jt]),F=Jt.earned}const[ie,ae]=gn(()=>[{title:`${Ke(o.displayName)} Gain`,modifier:y,base:0,unit:"/s"}]),X=L(!1),Ee=ne(()=>p(_t,{modelValue:X.value,"onUpdate:modelValue":Y=>X.value=Y},{header:()=>p("h2",null,[V("Modifiers")]),body:()=>Ue(ie)}));this.on("preUpdate",Y=>{!Vt.activePortals.value.some(U=>U.state.id===e)||(o.value=l.times(N.value,Y).add(o.value),Ie.value.forEach(U=>{var Ze;(Ze=U.update)==null||Ze.call(U,Y)}))});const H=I(()=>{const Y=w.find(U=>U.shouldShowPreview.value);return Y?l.neg(ve(Y.cost)):0}),Z=I(()=>{const Y=w.find(U=>U.shouldShowPreview.value);return Y?l.sub(Y.modifier.apply(N.value),N.value):0}),pe=Dn(m.variable(0).add(o),()=>l.neq(H.value,0),H),qe=Dn(m.variable(0).add(N),()=>l.neq(Z.value,0),Z),Fe=I(()=>{const Y=[];return Ie.value.forEach(U=>{U.link&&Y.push(U.link)}),Y}),Dt=I(()=>{const Y={};return Ie.value.forEach(U=>{U.effectedResource!=null&&U.resourceMulti!=null&&(Y[U.effectedResource]!=null?Y[U.effectedResource]=l.times(Y[U.effectedResource],U.resourceMulti):Y[U.effectedResource]=U.resourceMulti)}),Y}),Ie=I(()=>{const Y=[];for(let U=1;Ul.lt(Ie.value.length,h)&&x.some(Y=>Y.some(U=>"earned"in U&&s(U.earned)||"bought"in U&&s(U.bought)?!1:("canClick"in U&&s(U.canClick)||"canPurchase"in U&&s(U.canPurchase),!0))));return{tier:lt(t),seed:lt(n),name:r,color:a,resource:o,background:u,style:{background:u,"--background":u},features:x,resourceTabCollapsed:ae,links:Fe,resourceMultis:Dt,earnedTreasures:Ie,showNotif:_n,display:ne(()=>p(le,null,[p(Pn,{class:"nav-container"},{default:()=>[p("span",{class:"nav-segment"},[p("h2",null,[r])]),p("span",{class:"nav-segment"},[p("h3",null,[t,V("-tier")])]),p("span",{class:"nav-segment"},[p("button",{class:"button",style:"display: inline",onClick:()=>X.value=!0},[V("open modifiers")])])]}),p(Pn,{class:"nav-container"},{default:()=>[p("span",{class:"nav-segment"},[p("h3",{style:`color: ${a}; text-shadow: 0px 0px 10px ${a};`},[Ue(pe)])," ",o.displayName]),p("span",{class:"nav-segment"},[V("("),p("h3",{style:`color: ${a}; text-shadow: 0px 0px 10px ${a};`},[l.gt(N.value,0)?"+":"",Ue(qe)]),V("/s)")])]}),p(mc,{height:"60px"},null),x.map(Y=>Ia(...Y)),Ue(Ee)])),minimizedDisplay:ne(()=>p("div",null,[p("span",null,[r]),p("span",{style:"font-size: large; vertical-align: sub;"},[" ",Ie.value.length,V("/"),h,V(" treasures")])]))}})}function Hn(e){const t=Object.values(Xe).reduce((u,o)=>u+o),n=Object.keys(Xe),i=Math.floor(e()*t);let r=0,a;for(let u=0;uo+c),i=Object.keys(e);let r=0,a=null;const u=t()*n;for(let o=0;oe?"Quadruples mining speed":"Doubles mining speed"},gravel:{description:e=>e?"Quadruples mine ore drops":"Doubles mine ore drops"},stone:{description:e=>e?"Quadruples energy gain":"Doubles energy gain"},copper:{description:e=>e?"Material level is 20% stronger":"Material level is 10% stronger"}},Vt=ii("main",function(){const e=Hi(0,"energy"),t=m.variable(0).add(1),n=I(()=>F.types.resource.nodes.value.reduce((b,d)=>(b[d.state.type]=d,b),{})),i=I(()=>({...F.types.passive.nodes.value.reduce((b,d)=>(b[d.state]=d,b),{}),sand:F.types.dowsing.nodes.value[0],wood:F.types.quarry.nodes.value[0],coal:F.types.empowerer.nodes.value[0],iron:F.types.portalGenerator.nodes.value[0]})),r=I(()=>St.reduce((b,d)=>{var te,$e,ut;const S=(ut=($e=(te=n.value[d])==null?void 0:te.state)==null?void 0:$e.amount)!=null?ut:0;let E=l.floor(t.invertIntegral(S)).sub(10).clampMin(0),O=Tt(t,E,!0,0);for(;;){const Te=t.evaluate(E);if(l.add(O,Te).lte(S))E=E.add(1),O=l.add(O,Te);else break}return b[d]=E,b},{}));function a(b){var te,$e,ut;const d=(ut=($e=(te=n.value[b])==null?void 0:te.state)==null?void 0:$e.amount)!=null?ut:0,S=r.value[b],E=Tt(t,S,!0),O=Tt(t,l.add(S,1),!0);return l.sub(d,E).max(0).div(l.sub(O,E)).toNumber()}const u=Ut({}),o=Ut({});yt(()=>{St.forEach(b=>{nt(()=>r.value[b],(d,S)=>{l.gt(d,S)&&se.active===J.id&&Ci.info(p("div",null,[p("h3",null,[l.eq(d,1)?`${Ke(b)} discovered`:`${Ke(b)} is now Level ${je(d)}`,V("!")]),p("div",null,[V("Energy gain is now 1.01x higher.")])]))})})});const c=I(()=>[ie,X,Ee,H].filter(b=>{var d,S;return(S=(d=b.value)==null?void 0:d.state)==null?void 0:S.powered}).length),f=I(()=>l.eq(c.value,0)?10:l.add(c.value,1).pow_base(100).div(10).times(.99)),h=I(()=>Ee.value==null?0:Ee.value.state.resources.reduce((d,S)=>l.div(100,Ve[S].computedModifier.value).add(d),l.dZero)),g={id:"deselect",icon:"close",tooltip:b=>({text:"resources"in b.state?"Disconnect resources":"Disconnect tools"}),onClick(b){"resources"in b.state?b.state={...b.state,resources:[]}:"tools"in b.state&&(b.state={...b.state,tools:[]}),F.selectedAction.value=null,F.selectedNode.value=null},visibility:b=>"resources"in b.state?b.state.resources.length>0:"tools"in b.state?b.state.tools.length>0:!0},y={id:"toggle",icon:"bolt",tooltip:b=>({text:b.state.powered?"Turn Off":`Turn On - Always runs for ${je(f.value)} energy/s`}),onClick(b){b.state={...b.state,powered:!b.state.powered},F.selectedAction.value=null},fillColor:b=>b.state.powered?"var(--accent1)":"var(--locked)"};function N(b,d=1/0){const S=b(m.variable(0));return{id:"moreConnections",icon:"hub",formula:S,tooltip(E){return{text:`Increase Connections - ${je(S.evaluate(E.state.maxConnections))} energy`}},confirmationLabel:E=>l.gte(e.value,S.evaluate(E.state.maxConnections))?{text:"Tap again to confirm"}:{text:"Cannot afford",color:"var(--danger)"},onClick(E){const O=S.evaluate(E.state.maxConnections);l.gte(e.value,O)&&(e.value=l.sub(e.value,O)),E.state={...E.state,maxConnections:E.state.maxConnections+1},F.selectedAction.value=null},visibility:E=>E.state.maxConnectionsO!==S)}:b.state={...b.state,resources:[...E,S]},F.selectedNode.value=b}function $(b,d){if(d.type!=="passive")return!1;const S=d.state,{maxConnections:E,tools:O}=b.state;return O.includes(S)?!0:O.length!==E}function T(b,d){if(d.type!=="passive")return;const S=d.state,E=b.state.tools;E.includes(S)?b.state={...b.state,tools:E.filter(O=>O!==S)}:b.state={...b.state,tools:[...E,S]},F.selectedNode.value=b}const F=bl(b=>({startNodes:()=>[{position:{x:0,y:0},type:"mine",state:{progress:0,powered:!1}},{position:{x:0,y:-200},type:"brokenFactory"}],types:{mine:{shape:Be.Diamond,size:50,title:"\u{1FAA8}",label:d=>d===b.selectedNode.value?{text:"Mining"}:Object.keys(n.value).length===0?{text:"Click me!"}:null,actionDistance:Math.PI/4,actions:[y],progress:d=>j(d)?new l(d.state.progress).toNumber():0,progressDisplay:Bt.Outline,progressColor:"var(--accent2)",classes:d=>({running:j(d)}),draggable:!0},brokenFactory:{shape:Be.Diamond,size:50,title:"\u{1F6E0}\uFE0F",label:d=>d===b.selectedNode.value?{text:"Broken Forge"}:null,actionDistance:Math.PI/4,actions:[{id:"repair",icon:"build",tooltip:{text:"Repair - 100 energy"},onClick(d){l.gte(e.value,100)&&(d.type="factory",e.value=l.sub(e.value,100))},confirmationLabel:()=>l.gte(e.value,1e3)?{text:"Tap again to confirm"}:{text:"Cannot afford",color:"var(--danger)"}}],draggable:!0},factory:{shape:Be.Diamond,size:50,title:"\u{1F6E0}\uFE0F",label:d=>{var S,E;if(d===b.selectedNode.value)return{text:d.state==null?"Forge - Drag a resource to me!":`Forging ${xe[d.state].name}`};if(((S=b.draggingNode.value)==null?void 0:S.type)==="resource"){const O=((E=b.draggingNode.value)==null?void 0:E.state).type,te=d.state===O?"Disconnect":xe[O].name,$e=d.state===O||l.gte(e.value,xe[O].cost)&&i.value[O]==null?"var(--accent2)":"var(--danger)";return{text:te,color:$e}}return null},actionDistance:Math.PI/4,actions:[{id:"deselect",icon:"close",tooltip:{text:"Disconnect resource"},onClick(d){d.state=void 0,b.selectedAction.value=null,b.selectedNode.value=null},visibility:d=>d.state!=null},{id:"craft",icon:"done",tooltip:d=>({text:`Forge ${xe[d.state].name} - ${je(xe[d.state].cost)} energy`}),onClick(d){const S=xe[d.state];if(l.gte(e.value,S.cost)&&i.value[d.state]==null){e.value=l.sub(e.value,S.cost);const E={id:Gn(b),position:{...d.position},type:S.type,state:S.state};b.placeInAvailableSpace(E),b.nodes.value.push(E),b.selectedAction.value=null,b.selectedNode.value=null,d.state=void 0}},fillColor:d=>l.gte(e.value,xe[d.state].cost)&&i.value[d.state]==null?"var(--accent2)":"var(--danger)",visibility:d=>d.state!=null,confirmationLabel:d=>l.gte(e.value,xe[d.state].cost)?i.value[d.state]==null?{text:"Tap again to confirm"}:{text:"Already crafted",color:"var(--danger)"}:{text:"Cannot afford",color:"var(--danger)"}}],progress:d=>d.state==null||i.value[d.state]!=null?0:l.div(e.value,xe[d.state].cost).clampMax(1).toNumber(),progressDisplay:Bt.Fill,progressColor:d=>d.state!=null&&l.gte(e.value,xe[d.state].cost)?"var(--accent2)":"var(--foreground)",canAccept(d,S){return S.type==="resource"},onDrop(d,S){const E=S.state.type;d.state===E?d.state=void 0:d.state=E,b.selectedNode.value=d},draggable:!0},resource:{shape:Be.Circle,size:50,title:d=>Ke(d.state.type),subtitle:d=>je(d.state.amount),progress:d=>a(d.state.type),onClick(){},progressDisplay:Bt.Outline,progressColor:"var(--accent3)",classes:d=>{var S;return{"affected-node":X.value!=null&&j(X.value)&&X.value.state.resources.includes(d.state.type)||l.neq((S=Fe.value[d.state.type])!=null?S:1,1)}},draggable:!0},passive:{shape:Be.Circle,size:50,title:d=>xe[d.state].name,label:d=>d===b.selectedNode.value?{text:ki[d.state].description(H.value!=null&&j(H.value)&&H.value.state.tools.includes(d.state))}:null,outlineColor:"var(--bought)",classes:d=>({"affected-node":H.value!=null&&j(H.value)&&H.value.state.tools.includes(d.state)}),draggable:!0},dowsing:{shape:Be.Diamond,size:50,title:"\u{1F962}",label:d=>d===b.selectedNode.value?{text:d.state.resources.length===0?"Dowsing - Drag a resource to me!":`Dowsing (${d.state.resources.length}/${d.state.maxConnections})`}:w(d,S=>`Double ${S} odds`),actionDistance:Math.PI/4,actions:[g,N(d=>d.add(2).pow_base(100),16),y],classes:d=>({running:j(d)}),canAccept:x,onDrop:q,draggable:!0},quarry:{shape:Be.Diamond,size:50,title:"\u26CF\uFE0F",label:d=>d===b.selectedNode.value?{text:d.state.resources.length===0?"Quarry - Drag a resource to me!":`Quarrying (${d.state.resources.length}/${d.state.maxConnections})`}:w(d,S=>`Gather ${jt(l.div(Ve[S].computedModifier.value,100))} ${S}/s`),actionDistance:Math.PI/4,actions:[g,N(d=>d.add(2).pow_base(1e4),16),y],progress:d=>j(d)?l.eq(h.value,0)?0:new l(d.state.progress).div(h.value).toNumber():0,progressDisplay:Bt.Outline,progressColor:"var(--accent2)",canAccept:x,onDrop:q,classes:d=>({running:j(d)}),draggable:!0},empowerer:{shape:Be.Diamond,size:50,title:"\u{1F50C}",label:d=>d===b.selectedNode.value?{text:d.state.tools.length===0?"Empowerer - Drag a tool to me!":`Empowering (${d.state.tools.length}/${d.state.maxConnections})`}:_(d,S=>`Double ${xe[S].name}'s effect`),actionDistance:Math.PI/4,actions:[g,N(d=>d.add(3).pow_base(1e3),16),y],canAccept:$,onDrop:T,classes:d=>({running:j(d)}),draggable:!0},portalGenerator:{shape:Be.Diamond,size:50,title:"\u26E9\uFE0F",label:d=>{var S,E;if(d===b.selectedNode.value)return{text:d.state.tier==null?"Portal Spawner - Drag a resource to me!":`Spawning ${d.state.tier}-tier portal`};if(((S=b.draggingNode.value)==null?void 0:S.type)==="resource"){const O=((E=b.draggingNode.value)==null?void 0:E.state).type;return{text:d.state.tier===O?"Disconnect":`${Ke(O)}-tier Portal`,color:"var(--accent2)"}}return null},actionDistance:Math.PI/4,actions:[{id:"deselect",icon:"close",tooltip:{text:"Disconnect all"},onClick(d){d.state={...d.state,tier:void 0,influences:[]},b.selectedAction.value=null,b.selectedNode.value=null},visibility:d=>{const{tier:S,influences:E}=d.state;return S!=null||E.length>0}},{id:"makePortal",icon:"done",tooltip:d=>({text:`Spawn ${d.state.tier}-tier portal`}),onClick(d){let S=0;for(;`portal-${S}`in ye;)S++;ri(Xi(`portal-${S}`,d.state.tier,Math.floor(Math.random()*4294967296)),J);const E={id:Gn(b),position:{...d.position},type:"portal",state:{id:`portal-${S}`,powered:!1}};b.placeInAvailableSpace(E),b.nodes.value.push(E),b.selectedAction.value=null,b.selectedNode.value=null,d.state={tier:void 0,influences:[]}},visibility:d=>d.state.tier!=null}],canAccept(d,S){return S.type==="resource"||S.type==="influence"},onDrop(d,S){if(S.type==="resource"){const E=S.state.type,O=d.state.tier;d.state={...d.state,tier:E===O?void 0:E}}else if(S.type==="influence"){const E=S.state,O=d.state.influences;O.includes(E)?d.state={...d.state,influences:O.filter(te=>te!==E)}:d.state={...d.state,influences:[...O,E]}}b.selectedNode.value=d},draggable:!0},portal:{shape:Be.Diamond,size:50,title:"\u{1F300}",label:d=>d===b.selectedNode.value?{text:`Portal to ${ye[d.state.id].name}`,color:ye[d.state.id].color}:null,actionDistance:Math.PI/4,actions:[y],classes:d=>({running:j(d),showNotif:ye[d.state.id].showNotif.value}),outlineColor:d=>ye[d.state.id].background,draggable:!0}},style:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"},links(){const d=[];return d.push(...Object.keys(u).map(S=>({startNode:ie.value,endNode:n.value[S],stroke:"var(--accent3)",strokeWidth:5}))),ae.value!=null&&ae.value.state!=null&&d.push({startNode:ae.value,endNode:n.value[ae.value.state],stroke:"var(--foreground)",strokeWidth:4}),X.value!=null&&X.value.state.resources.forEach(S=>{d.push({startNode:X.value,endNode:n.value[S],stroke:j(X.value)?"var(--accent1)":"var(--foreground)",strokeWidth:4})}),Ee.value!=null&&Ee.value.state.resources.forEach(S=>{d.push({startNode:Ee.value,endNode:n.value[S],stroke:"var(--foreground)",strokeWidth:4})}),d.push(...Object.keys(o).map(S=>({startNode:Ee.value,endNode:n.value[S],stroke:"var(--accent3)",strokeWidth:5}))),H.value!=null&&H.value.state.tools.forEach(S=>{d.push({startNode:H.value,endNode:i.value[S],stroke:j(H.value)?"var(--accent1)":"var(--foreground)",strokeWidth:4})}),Z.value!=null&&(Z.value.state.tier!=null&&d.push({startNode:Z.value,endNode:n.value[Z.value.state.tier],stroke:"var(--foreground)",strokeWidth:4}),b.types.portal.nodes.value.forEach(S=>{const E=ye[S.state.id];return E.links.value.forEach(O=>{O.value!=null&&d.push({startNode:S,endNode:O.value,stroke:j(S)?"var(--accent3)":"var(--foreground)",strokeWidth:4})}),Object.keys(E.resourceMultis.value).forEach(O=>{O!=="energy"&&O in n.value&&d.push({startNode:S,endNode:n.value[O],stroke:j(S)?"var(--accent1)":"var(--foreground)",strokeWidth:4})}),d})),d}}));function j(b){return b===F.selectedNode.value||b.state.powered}const ie=I(()=>F.types.mine.nodes.value[0]),ae=I(()=>F.types.factory.nodes.value[0]),X=I(()=>i.value.sand),Ee=I(()=>i.value.wood),H=I(()=>i.value.coal),Z=I(()=>i.value.iron);function pe(b,d){let S=n.value[b];if(d=l.times(d,Ct[b].computedModifier.value),S==null)S={id:Gn(F),position:{...ie.value.position},type:"resource",state:{type:b,amount:d}},F.placeInAvailableSpace(S),F.nodes.value.push(S);else{const E=S.state;S.state={...E,amount:l.add(E.amount,d)}}}const qe=I(()=>Object.keys(Xe).reduce((b,d)=>b+new l(Ve[d].computedModifier.value).toNumber(),0)),Fe=I(()=>{const b={};return F.types.portal.nodes.value.forEach(d=>{if(!j(d))return;const E=ye[d.state.id].resourceMultis.value;Object.keys(E).forEach(O=>{b[O]!=null?b[O]=l.times(b[O],E[O]):b[O]=E[O]})}),b}),Dt=qt(()=>[...St.map(b=>ct(()=>({description:()=>`${Ke(b)} (Lv. ${je(r.value[b])}) (${jt(Yt.value)}x per level)`,multiplier:()=>l.pow(Yt.value,r.value[b]),enabled:()=>{var d,S;return b in n.value&&l.gt((S=(d=n.value[b].state)==null?void 0:d.amount)!=null?S:0,0)}}))),ct(()=>({multiplier:()=>H.value!=null&&j(H.value)&&H.value.state.tools.includes("stone")?4:2,description:()=>(H.value!=null&&j(H.value)&&H.value.state.tools.includes("stone")?"Empowered ":"")+xe.stone.name,enabled:()=>i.value.stone!=null})),ct(()=>({multiplier:()=>{var b;return(b=Fe.value.energy)!=null?b:1},description:"Planar Treasures",enabled:()=>{var b;return l.neq((b=Fe.value.energy)!=null?b:1,1)}})),pn(()=>({addend:()=>l.pow(100,c.value).div(10).neg(),description:"Powered Machines (100^n/10 energy/s)",enabled:()=>l.gt(c.value,0)}))]),Ie=I(()=>Dt.apply(1)),_n=qt(()=>[ct(()=>({multiplier:()=>H.value!=null&&j(H.value)&&H.value.state.tools.includes("dirt")?4:2,description:()=>(H.value!=null&&j(H.value)&&H.value.state.tools.includes("dirt")?"Empowered ":"")+xe.dirt.name,enabled:()=>i.value.dirt!=null}))]),Y=I(()=>_n.apply(1)),U=qt(()=>[ct(()=>({multiplier:()=>H.value!=null&&j(H.value)&&H.value.state.tools.includes("gravel")?4:2,description:()=>(H.value!=null&&j(H.value)&&H.value.state.tools.includes("gravel")?"Empowered ":"")+xe.gravel.name,enabled:()=>i.value.gravel!=null}))]),Ze=I(()=>U.apply(1)),Zt=qt(()=>[pn(()=>({addend:()=>H.value!=null&&j(H.value)&&H.value.state.tools.includes("copper")?.002:.001,description:()=>(H.value!=null&&j(H.value)&&H.value.state.tools.includes("copper")?"Empowered ":"")+xe.copper.name,enabled:()=>i.value.copper!=null}))]),Yt=I(()=>Zt.apply(1.01)),Ve=Object.keys(Xe).reduce((b,d)=>{const S=qt(()=>[ct(()=>({multiplier:2,description:"Dowsing",enabled:()=>X.value!=null&&j(X.value)&&X.value.state.resources.includes(d)}))]),E=I(()=>S.apply(Xe[d])),O={title:`${Ke(d)} Drop Rate`,modifier:S,base:Xe[d]};return b[d]={modifier:S,computedModifier:E,section:O},b},{}),Ct=Object.keys(Xe).reduce((b,d)=>{const S=qt(()=>[ct(()=>({multiplier:()=>{var te;return(te=Fe.value[d])!=null?te:1},description:"Planar Treasures",enabled:()=>{var te;return l.neq((te=Fe.value[d])!=null?te:1,1)}}))]),E=I(()=>S.apply(1)),O={title:`${Ke(d)} Gain`,modifier:S};return b[d]={modifier:S,computedModifier:E,section:O},b},{}),[Nn,Cn]=gn(()=>[{title:"Energy Gain",modifier:Dt,base:1,unit:"/s"}]),[Le,ln]=gn(()=>[{title:"Mining Speed",modifier:_n,base:1,unit:"/s",visible:()=>i.value.dirt!=null},{title:"Ore Dropped",modifier:U,base:1,visible:()=>i.value.gravel!=null},{title:"Material Level Effect",modifier:Zt,base:1.01,visible:()=>i.value.copper!=null}]),[Ft,Bn]=gn(()=>Object.values(Ve).map(b=>b.section)),[un,Jt]=gn(()=>Object.values(Ct).map(b=>b.section)),kt=Il({general:()=>({display:"Energy",glowColor(){return kt.activeTab.value===this.tab?"white":""},tab:Nn,energyTabCollapsed:Cn}),mining:()=>({display:"Mine",glowColor(){return kt.activeTab.value===this.tab?"white":""},visibility:()=>Object.keys(i.value).length>0,tab:Le,miningTabCollapsed:ln}),resources:()=>({display:"Mine Rates",glowColor(){return kt.activeTab.value===this.tab?"white":""},visibility:()=>X.value!=null,tab:Ft,resourcesCollapsed:Bn}),resourcesGain:()=>({display:"Resource Gain",glowColor(){return kt.activeTab.value===this.tab?"white":""},visibility:()=>Object.values(Ct).some(b=>l.neq(b.computedModifier.value,1)),tab:un,resourceGainCollapsed:Jt})}),pt=L(!1),mt=ne(()=>p(_t,{modelValue:pt.value,"onUpdate:modelValue":b=>pt.value=b},{header:()=>p("h2",null,[V("Modifiers")]),body:()=>Ue(kt)}));this.on("preUpdate",b=>{if(Object.keys(u).forEach(d=>{u[d]-=b,u[d]<=0&&delete u[d]}),Object.keys(o).forEach(d=>{o[d]-=b,o[d]<=0&&delete o[d]}),j(ie.value)){const d=l.add(ie.value.state.progress,l.times(Y.value,b)),S=d.floor();ie.value.state={...ie.value.state,progress:l.sub(d,S)};const E=S.div(qe.value).floor();E.gt(0)&&St.forEach(te=>{pe(te,l.times(new l(Ve[te].computedModifier.value).toNumber(),E).times(Ze.value)),u[te]=.3});const O=l.sub(S,E).toNumber();for(let te=0;te0){let E=l.add(d,b);const O=l.div(d,h.value).floor();E=l.sub(E,l.times(O,h.value)),Ee.value.state={...Ee.value.state,progress:E},l.gt(O,0)&&S.forEach(te=>{pe(te,O),o[te]=.3})}}e.value=l.add(e.value,l.times(Ie.value,b)),l.lt(e.value,0)&&(e.value=0,ie.value.state={...ie.value.state,powered:!1},Ci.warning(p("div",null,[p("h3",null,[V("Ran out of energy!")]),p("div",null,[V("All machines have been turned off.")])])))});const Ye=I(()=>{var b,d;return F.selectedAction.value===F.types.brokenFactory.actions[0]?-100:F.selectedAction.value===F.types.factory.actions[1]?l.neg(xe[F.selectedNode.value.state].cost):((b=F.selectedAction.value)==null?void 0:b.id)==="moreConnections"?l.neg(F.selectedAction.value.formula.evaluate(((d=F.selectedNode.value)==null?void 0:d.state).maxConnections)):0}),Kt=Dn(m.variable(0).add(e),()=>l.neq(Ye.value,0),Ye),Xt=I(()=>{var b;return F.selectedAction.value===y?((b=F.selectedNode.value)==null?void 0:b.state).powered?l.eq(c.value,1)?10:l.pow(100,c.value).div(10).times(.99):l.neg(f.value):0}),vt=Dn(m.variable(0).add(Ie),()=>l.neq(Xt.value,0),Xt),rt=I(()=>F.types.portal.nodes.value.filter(b=>j(b)));return nt(rt,b=>{yt(()=>{J.tabs=["main",...b.map(d=>d.state.id)]})}),{name:"World",board:F,energy:e,modifierTabs:kt,mineLootTable:Xe,tools:xe,passives:ki,resourceNodes:n,toolNodes:i,grantResource:pe,activePortals:rt,display:ne(()=>p(le,null,[p(Pn,{class:"nav-container"},{default:()=>[p("span",{class:"nav-segment"},[p("h2",{style:"color: white; text-shadow: 0px 0px 10px white;"},[Ue(Kt)])," ",V("energy")]),p("span",{class:"nav-segment"},[V("("),p("h3",{style:"color: white; text-shadow: 0px 0px 10px white;"},[l.gt(Ie.value,0)?"+":"",Ue(vt)]),V("/s)")]),l.gt(c.value,0)?p("span",{class:"nav-segment"},[p("h3",{style:"color: var(--accent1); text-shadow: 0px 0px 10px var(--accent1);"},[je(c.value)])," ",V("machines powered")]):null,p("span",{class:"nav-segment"},[p("button",{class:"button",style:"display: inline",onClick:()=>pt.value=!0},[V("open modifiers")])]),J.devSpeed===0?p("span",{class:"nav-segment"},[V("Game Paused")]):J.devSpeed!=null&&J.devSpeed!==1?p("span",{class:"nav-segment"},[V("Dev Speed: "),jt(J.devSpeed),V("x")]):null]}),Ue(F),Ue(mt)]))}}),Ac=e=>{var i,r,a,u;const t=[Vt];let n=0;for(;`portal-${n}`in((i=e.layers)!=null?i:{});){const o=(r=e.layers)==null?void 0:r[`portal-${n}`];t.push(Xi(`portal-${n}`,(a=o.tier)!=null?a:"dirt",(u=o.seed)!=null?u:Math.floor(Math.random()*4294967296))),n++}return t},Qi=I(()=>!1);function qc(e,t){}var Vc=Object.freeze(Object.defineProperty({__proto__:null,mineLootTable:Xe,resourceNames:St,main:Vt,getInitialLayers:Ac,hasWon:Qi,fixOldSave:qc},Symbol.toStringTag,{value:"Module"}));const wn=e=>(Gt("data-v-4a50ce42"),e=e(),Wt(),e),Rc={class:"game-over-modal-header"},Lc=["src","alt"],Bc={class:"game-over-modal-title"},jc=wn(()=>C("h2",null,"Congratulations!",-1)),zc={key:0},Uc=wn(()=>C("br",null,null,-1)),Gc=wn(()=>C("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Wc=wn(()=>C("br",null,null,-1)),Hc=["href"],Zc=wn(()=>C("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),Yc=K({__name:"GameOverScreen",setup(e){const{title:t,logo:n,discordName:i,discordLink:r,versionNumber:a,versionTitle:u}=de,o=I(()=>On(J.timePlayed)),c=I(()=>Qi.value&&!J.keepGoing),f=Pt(J,"autosave");function h(){J.keepGoing=!0}function g(){Rt(en())}return(y,N)=>(M(),ee(_t,{"model-value":s(c)},{header:z(()=>[C("div",Rc,[s(n)?(M(),P("img",{key:0,class:"game-over-modal-logo",src:s(n),alt:s(t)},null,8,Lc)):B("",!0),C("div",Bc,[jc,C("h4",null,"You've beaten "+re(s(t))+" v"+re(s(a))+": "+re(s(u)),1)])])]),body:z(({shown:w})=>[w?(M(),P("div",zc,[C("div",null,"It took you "+re(s(o))+" to beat the game.",1),Uc,Gc,Wc,C("div",null,[C("a",{href:s(r),class:"game-over-modal-discord-link"},[Zc,V(" "+re(s(i)),1)],8,Hc)]),p(ht,{title:"Autosave",modelValue:s(f),"onUpdate:modelValue":N[0]||(N[0]=_=>ke(f)?f.value=_:null)},null,8,["modelValue"])])):B("",!0)]),footer:z(()=>[C("div",{class:"game-over-footer"},[C("button",{onClick:h,class:"button"},"Keep Going"),C("button",{onClick:g,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var Jc=fe(Yc,[["__scopeId","data-v-4a50ce42"]]);const Ln=e=>(Gt("data-v-2776d67d"),e=e(),Wt(),e),Kc=Ln(()=>C("div",{class:"nan-modal-header"},[C("h2",null,"NaN value detected!")],-1)),Xc={key:0},Qc=Ln(()=>C("br",null,null,-1)),ed=["href"],td=Ln(()=>C("span",{class:"material-icons nan-modal-discord"},"discord",-1)),nd=Ln(()=>C("br",null,null,-1)),id={class:"nan-footer"},rd=K({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:n}=de,i=L(!0),r=L(!0),a=Pt(Me,"hasNaN"),u=L(null);nt(a,y=>{y?(i.value=J.autosave,r.value=J.devSpeed===0):(J.autosave=i.value,J.devSpeed=r.value?0:null)});const o=I(()=>{var y;return(y=Me.NaNPath)==null?void 0:y.join(".")}),c=I(()=>Me.NaNPersistent!=null?Me.NaNPersistent.value:null);function f(){Me.NaNPersistent!=null&&(Me.NaNPersistent.value=new l(0),Me.hasNaN=!1)}function h(){Me.NaNPersistent&&(Me.NaNPersistent.value=new l(1),Me.hasNaN=!1)}function g(){Me.NaNPersistent&&(Me.NaNPersistent.value=new l(NaN),Me.hasNaN=!1)}return(y,N)=>(M(),P(le,null,[p(_t,wt({modelValue:s(a),"onUpdate:modelValue":N[4]||(N[4]=w=>ke(a)?a.value=w:null)},y.$attrs),{header:z(()=>[Kc]),body:z(()=>[C("div",null,[V(' Attempted to assign "'+re(s(o))+'" to NaN',1),s(c)?(M(),P("span",Xc,re(" ")+"(previously "+re(s(jt)(s(c)))+")",1)):B("",!0),V(". Auto-saving has been "+re(i.value?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),Qc,C("div",null,[C("a",{href:s(n)||"https://discord.gg/yJ4fjnjU54",class:"nan-modal-discord-link"},[td,V(" "+re(s(t)||"The Paper Pilot Community"),1)],8,ed)]),nd,p(ht,{title:"Autosave",modelValue:i.value,"onUpdate:modelValue":N[0]||(N[0]=w=>i.value=w)},null,8,["modelValue"]),s(de).enablePausing?(M(),ee(ht,{key:0,title:"Pause game",modelValue:r.value,"onUpdate:modelValue":N[1]||(N[1]=w=>r.value=w)},null,8,["modelValue"])):B("",!0)]),footer:z(()=>[C("div",id,[C("button",{onClick:N[2]||(N[2]=w=>{var _;return(_=u.value)==null?void 0:_.open()}),class:"button"},"Open Saves Manager"),C("button",{onClick:f,class:"button"},"Set to 0"),C("button",{onClick:h,class:"button"},"Set to 1"),s(c)&&s(l).neq(s(c),0)&&s(l).neq(s(c),1)?(M(),P("button",{key:0,onClick:N[3]||(N[3]=w=>a.value=!1),class:"button"}," Set to previous ")):B("",!0),C("button",{onClick:g,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),p(Ui,{ref_key:"savesManager",ref:u},null,512)],64))}});var ad=fe(rd,[["__scopeId","data-v-2776d67d"]]);const sd={key:0,class:"tpsDisplay"},od={key:0,class:"low"},ld=K({__name:"TPS",setup(e){const t=I(()=>l.div(Me.lastTenTicks.length,Me.lastTenTicks.reduce((a,u)=>a+u,0))),n=L([]);Qe(()=>{n.value.push(Math.round(t.value.toNumber())),n.value.length>10&&(n.value=n.value.slice(1))});const i=I(()=>n.value.reduce((a,u)=>l.max(a,u),0)),r=I(()=>l.sub(t.value,i.value).gt(1));return(a,u)=>s(t).isNan()?B("",!0):(M(),P("div",sd,[V(" TPS: "+re(s(je)(s(t)))+" ",1),p(nn,{name:"fade"},{default:z(()=>[s(r)?(M(),P("span",od,re(s(je)(s(i))),1)):B("",!0)]),_:1})]))}});var ud=fe(ld,[["__scopeId","data-v-46a3ed5b"]]);var cd=K({__name:"App",setup(e){const t=de.useHeader,n=I(()=>at[se.theme].variables),i=Pt(se,"showTPS"),r=I(()=>oe(ne(()=>p(le,null,[Ca.map(Ue)]))));return(a,u)=>(M(),P(le,null,[C("div",{id:"modal-root",style:Oe(s(n))},null,4),C("div",{class:ge(["app",{useHeader:s(t)}]),style:Oe(s(n))},[s(t)?(M(),ee(Gi,{key:0})):B("",!0),p(Lo),s(s(i))?(M(),ee(ud,{key:1})):B("",!0),p(Jc),p(ad),(M(),ee(De(s(r))))],6)],64))}});var dd=fe(cd,[["__scopeId","data-v-41d15e5e"]]);function fd(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:i,onRegistered:r,onRegisteredSW:a,onRegisterError:u}=e;let o,c,f,h;const g=async(N=!0)=>{await f,N&&(o==null||o.addEventListener("controlling",w=>{w.isUpdate&&window.location.reload()})),await(h==null?void 0:h())};async function y(){if("serviceWorker"in navigator){const{Workbox:N,messageSW:w}=await mn(()=>import("./workbox-window.4a8794bb.js"),[]);h=async()=>{c&&c.waiting&&await w(c.waiting,{type:"SKIP_WAITING"})},o=new N("./sw.js",{scope:"./",type:"classic"}),o.addEventListener("activated",_=>{_.isUpdate||i==null||i()});{const _=()=>{n==null||n()};o.addEventListener("waiting",_),o.addEventListener("externalwaiting",_)}o.register({immediate:t}).then(_=>{c=_,a?a("./sw.js",_):r==null||r(_)}).catch(_=>{u==null||u(_)})}}return f=y(),g}function gd(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:i,onRegistered:r,onRegisteredSW:a,onRegisterError:u}=e,o=L(!1),c=L(!1);return{updateServiceWorker:fd({immediate:t,onNeedRefresh(){o.value=!0,n==null||n()},onOfflineReady(){c.value=!0,i==null||i()},onRegistered:r,onRegisteredSW:a,onRegisterError:u}),offlineReady:c,needRefresh:o}}document.title=de.title;window.projInfo=de;if(de.id==="")throw new Error("Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json");requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c -Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await ha();const{globalBus:e}=await mn(()=>Promise.resolve().then(function(){return ma}),void 0),{startGameLoop:t}=await mn(()=>import("./gameLoop.7304201e.js"),["assets/gameLoop.7304201e.js","assets/@fontsource.f66d05e7.css","assets/vue.c16a309b.js","assets/amator.1e5a40c8.js","assets/bezier-easing.a990b400.js","assets/@vue.6b211d3c.js","assets/nanoevents.1080beb7.js","assets/lz-string.dccec454.js","assets/vue-next-select.ded54c4a.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.1879de79.js","assets/sortablejs.a0f68e5e.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-panzoom.8ce6f9b1.js","assets/panzoom.30c56ba6.js","assets/wheel.f2ae740f.js","assets/ngraph.events.083734c6.js","assets/vue-toastification.9c2dad53.js","assets/vue-toastification.4b5f8ac8.css","assets/unique-names-generator.5494b30b.js"]),n=window.vue=lr(dd);e.emit("setupVue",n),n.mount("#app"),yt(()=>{const i=Kn(),{updateServiceWorker:r}=gd({onNeedRefresh(){i.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){r()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(a){a&&setInterval(()=>a.update(),60*60*1e3)}})}),t()});export{l as D,mn as _,Me as a,de as b,Vc as c,Ae as g,ba as l,J as p,se as s}; + )`,onMousedown:x=>c(x,y),onTouchstart:x=>c(x,y),onMouseup:x=>f(x,y),onTouchend:tn(x=>f(x,y),["stop"])},[C("circle",{fill:s(ce)(y.fillColor,e.node),r:"20","stroke-width":((_=e.selectedAction)==null?void 0:_.id)===y.id?4:0,stroke:s(a)},null,8,Ho),C("text",{fill:s(u),class:"material-icons"},re(s(ce)(y.icon,e.node)),9,Zo)],42,Wo)}),128))])):B("",!0)]),_:1}))}});var Jo=fe(Yo,[["__scopeId","data-v-9efb2a56"]]);const Ko=["transform"],Xo={key:0},Qo=["r","fill","stroke"],el=["r","fill","stroke"],tl=["r","fill"],nl=["r","stroke-dasharray","stroke-dashoffset","stroke"],il={key:1,transform:"rotate(45, 0, 0)"},rl=["width","height","transform","fill","stroke"],al=["width","height","transform","fill","stroke"],sl=["width","height","transform","fill"],ol=["width","height","transform","stroke-dasharray","stroke-dashoffset","stroke"],ll=["fill","y"],ul=["fill"],cl={key:0},dl=["fill","y"],fl=["fill","y"],gl=K({__name:"BoardNode",props:{node:null,nodeType:null,dragging:null,dragged:null,hasDragged:{type:Boolean},receivingNode:{type:Boolean},selectedNode:null,selectedAction:null},emits:["mouseDown","endDragging","clickAction"],setup(e,{emit:t}){const n=e,i=Math.sqrt(2),r=Ne(n),a=I(()=>s(r.selectedNode)===s(r.node)),u=I(()=>ce(r.nodeType.value.draggable,s(r.node)));nt(u,Z=>{const pe=s(r.node);s(r.dragging)===pe&&!Z&&t("endDragging",pe)});const o=I(()=>{var pe;const Z=s(r.node);return(pe=ce(r.nodeType.value.actions,Z))==null?void 0:pe.filter(qe=>it(ce(qe.visibility,Z)))}),c=I(()=>{var pe;const Z=s(r.node);if(ce(r.nodeType.value.draggable,Z)&&((pe=s(r.dragging))==null?void 0:pe.id)===Z.id&&s(r.dragged)!=null){const{x:qe,y:Fe}=s(r.dragged);return{x:Z.position.x+Math.round(qe/25)*25,y:Z.position.y+Math.round(Fe/25)*25}}return Z.position}),f=I(()=>ce(r.nodeType.value.shape,s(r.node))),h=I(()=>ce(r.nodeType.value.title,s(r.node))),g=I(()=>ce(r.nodeType.value.subtitle,s(r.node))),y=I(()=>{var Z;return(Z=a.value?s(r.selectedAction)&&ce(s(r.selectedAction).tooltip,s(r.node)):null)!=null?Z:ce(r.nodeType.value.label,s(r.node))}),N=I(()=>{var Z,pe;return ce((pe=(Z=s(r.selectedAction))==null?void 0:Z.confirmationLabel)!=null?pe:{text:"Tap again to confirm"},s(r.node))}),w=I(()=>ce(r.nodeType.value.size,s(r.node))),_=I(()=>{var Z;return(Z=ce(r.nodeType.value.progress,s(r.node)))!=null?Z:0}),x=I(()=>at[se.theme].variables["--background"]),q=I(()=>{var Z;return(Z=ce(r.nodeType.value.outlineColor,s(r.node)))!=null?Z:at[se.theme].variables["--outline"]}),$=I(()=>{var Z;return(Z=ce(r.nodeType.value.fillColor,s(r.node)))!=null?Z:at[se.theme].variables["--raised-background"]}),T=I(()=>ce(r.nodeType.value.progressColor,s(r.node))),F=I(()=>{var Z;return(Z=ce(r.nodeType.value.titleColor,s(r.node)))!=null?Z:at[se.theme].variables["--foreground"]}),j=I(()=>ce(r.nodeType.value.progressDisplay,s(r.node))),ie=I(()=>r.dragging.value!=null&&s(r.hasDragged)&&ce(r.nodeType.value.canAccept,s(r.node),r.dragging.value)),ae=I(()=>ce(r.nodeType.value.style,s(r.node))),X=I(()=>ce(r.nodeType.value.classes,s(r.node)));function Ee(Z){t("mouseDown",Z,r.node.value,u.value)}function H(Z){var pe,qe,Fe;(pe=r.hasDragged)!=null&&pe.value||(t("endDragging",r.node.value),(Fe=(qe=r.nodeType.value).onClick)==null||Fe.call(qe,r.node.value),Z.stopPropagation())}return(Z,pe)=>{var qe,Fe,Dt;return M(),P("g",{class:ge(["boardnode",{[e.node.type]:!0,isSelected:s(a),isDraggable:s(u),...s(X)}]),style:Oe([{opacity:((qe=e.dragging)==null?void 0:qe.id)===e.node.id&&e.hasDragged?.5:1},(Fe=s(ae))!=null?Fe:[]]),transform:`translate(${s(c).x},${s(c).y})${s(a)?" scale(1.2)":""}`},[p(Jo,{actions:(Dt=s(o))!=null?Dt:[],"is-selected":s(a),node:e.node,"node-type":e.nodeType,"selected-action":e.selectedAction,onClickAction:pe[0]||(pe[0]=Ie=>t("clickAction",Ie))},null,8,["actions","is-selected","node","node-type","selected-action"]),C("g",{class:"node-container",onMousedown:Ee,onTouchstartPassive:Ee,onMouseup:H,onTouchendPassive:H},[s(f)===s(Be).Circle?(M(),P("g",Xo,[s(ie)?(M(),P("circle",{key:0,class:"receiver",r:s(w)+8,fill:s(x),stroke:e.receivingNode?"#0F0":"#0F03","stroke-width":2},null,8,Qo)):B("",!0),C("circle",{class:"body",r:s(w),fill:s($),stroke:s(q),"stroke-width":4},null,8,el),s(j)===s(Bt).Fill?(M(),P("circle",{key:1,class:"progress progressFill",r:Math.max(s(w)*s(_)-2,0),fill:s(T)},null,8,tl)):(M(),P("circle",{key:2,r:s(w)+4.5,class:"progress progressRing",fill:"transparent","stroke-dasharray":(s(w)+4.5)*2*Math.PI,"stroke-width":5,"stroke-dashoffset":(s(w)+4.5)*2*Math.PI-s(_)*(s(w)+4.5)*2*Math.PI,stroke:s(T)},null,8,nl))])):s(f)===s(Be).Diamond?(M(),P("g",il,[s(ie)?(M(),P("rect",{key:0,class:"receiver",width:s(w)*s(i)+16,height:s(w)*s(i)+16,transform:`translate(${-(s(w)*s(i)+16)/2}, ${-(s(w)*s(i)+16)/2})`,fill:s(x),stroke:e.receivingNode?"#0F0":"#0F03","stroke-width":2},null,8,rl)):B("",!0),C("rect",{class:"body",width:s(w)*s(i),height:s(w)*s(i),transform:`translate(${-s(w)*s(i)/2}, ${-s(w)*s(i)/2})`,fill:s($),stroke:s(q),"stroke-width":4},null,8,al),s(j)===s(Bt).Fill?(M(),P("rect",{key:1,class:"progress progressFill",width:Math.max(s(w)*s(i)*s(_)-2,0),height:Math.max(s(w)*s(i)*s(_)-2,0),transform:`translate(${-Math.max(s(w)*s(i)*s(_)-2,0)/2}, ${-Math.max(s(w)*s(i)*s(_)-2,0)/2})`,fill:s(T)},null,8,sl)):(M(),P("rect",{key:2,class:"progress progressDiamond",width:s(w)*s(i)+9,height:s(w)*s(i)+9,transform:`translate(${-(s(w)*s(i)+9)/2}, ${-(s(w)*s(i)+9)/2})`,fill:"transparent","stroke-dasharray":(s(w)*s(i)+9)*4,"stroke-width":5,"stroke-dashoffset":(s(w)*s(i)+9)*4-s(_)*(s(w)*s(i)+9)*4,stroke:s(T)},null,8,ol))])):B("",!0),C("text",{fill:s(F),class:"node-title",y:s(g)?10:0},re(s(h)),9,ll),s(g)?(M(),P("text",{key:2,fill:s(F),class:"node-subtitle",y:"-15"},re(s(g)),9,ul)):B("",!0)],32),p(nn,{name:"fade",appear:""},{default:z(()=>{var Ie;return[s(y)?(M(),P("g",cl,[C("text",{fill:(Ie=s(y).color)!=null?Ie:s(F),class:ge(["node-title",{pulsing:s(y).pulsing}]),y:-s(w)-20},re(s(y).text),11,dl)])):B("",!0)]}),_:1}),p(nn,{name:"fade",appear:""},{default:z(()=>{var Ie;return[s(a)&&e.selectedAction?(M(),P("text",{key:0,fill:(Ie=s(N).color)!=null?Ie:s(F),class:ge(["node-title",{pulsing:s(N).pulsing}]),y:s(w)+75},re(s(N).text),11,fl)):B("",!0)]}),_:1})],14,Ko)}}});var pl=fe(gl,[["__scopeId","data-v-4654be02"]]);const ml={class:"stage",width:"100%",height:"100%"},vl={class:"g1"},hl=K({__name:"Board",props:{nodes:null,types:null,state:null,visibility:null,width:null,height:null,style:null,classes:null,links:null,selectedAction:null,selectedNode:null,draggingNode:null,receivingNode:null,mousePosition:null,setReceivingNode:{type:Function},setDraggingNode:{type:Function}},setup(e){const n=Ne(e),i=L({x:0,y:0}),r=L({x:0,y:0}),a=L(!1),u=L(null),o=I(()=>{const N=n.nodes.value.slice();if(n.draggingNode.value){const w=N.splice(N.indexOf(n.draggingNode.value),1)[0];N.push(w)}return N});Qe(()=>{const N=n.draggingNode.value;if(N==null)return null;const w={x:N.position.x+r.value.x,y:N.position.y+r.value.y};let _=Number.MAX_VALUE;n.setReceivingNode.value(n.nodes.value.reduce((x,q)=>{if(q.id===N.id)return x;const $=n.types.value[q.type];if(!ce($.canAccept,q,N))return x;const F=Math.pow(w.x-q.position.x,2)+Math.pow(w.y-q.position.y,2);let j=ce($.size,q);return F>_||F>j*j?x:(_=F,q)},null))});function c(N){N.setTransformOrigin(null),N.moveTo(u.value.$el.clientWidth/2,u.value.$el.clientHeight/2)}function f(N,w=null,_=!1){if(n.draggingNode.value==null){N.preventDefault(),N.stopPropagation();let x,q;if("touches"in N)if(N.touches.length===1)x=N.touches[0].clientX,q=N.touches[0].clientY;else return;else x=N.clientX,q=N.clientY;i.value={x,y:q},r.value={x:0,y:0},a.value=!1,_&&n.setDraggingNode.value(w)}w!=null&&(n.state.value.selectedNode=null,n.state.value.selectedAction=null)}function h(N){const{x:w,y:_,scale:x}=u.value.panZoomInstance.getTransform();let q,$;if("touches"in N)if(N.touches.length===1)q=N.touches[0].clientX,$=N.touches[0].clientY;else{g(n.draggingNode.value),n.mousePosition.value=null;return}else q=N.clientX,$=N.clientY;n.mousePosition.value={x:(q-w)/x,y:($-_)/x},r.value={x:r.value.x+(q-i.value.x)/x,y:r.value.y+($-i.value.y)/x},i.value={x:q,y:$},(Math.abs(r.value.x)>10||Math.abs(r.value.y)>10)&&(a.value=!0),n.draggingNode.value!=null&&(N.preventDefault(),N.stopPropagation())}function g(N,w=!1){var _,x;if(n.draggingNode.value!=null&&n.draggingNode.value===N){n.receivingNode.value==null&&(n.draggingNode.value.position.x+=Math.round(r.value.x/25)*25,n.draggingNode.value.position.y+=Math.round(r.value.y/25)*25);const q=n.nodes.value;q.push(q.splice(q.indexOf(n.draggingNode.value),1)[0]),n.receivingNode.value&&((x=(_=n.types.value[n.receivingNode.value.type]).onDrop)==null||x.call(_,n.receivingNode.value,n.draggingNode.value)),n.setDraggingNode.value(null)}else!a.value&&!w&&(n.state.value.selectedNode=null,n.state.value.selectedAction=null)}function y(N,w){n.state.value.selectedAction===w?s(n.selectedAction).onClick(s(n.selectedNode)):n.state.value={...n.state.value,selectedAction:w}}return(N,w)=>{const _=gt("panZoom");return s(it)(e.visibility)?(M(),ee(_,{key:0,style:Oe([{width:e.width,height:e.height},e.style]),class:ge(e.classes),selector:".g1",options:{initialZoom:1,minZoom:.1,maxZoom:10,zoomDoubleClickSpeed:1},ref_key:"stage",ref:u,onInit:c,onMousemove:h,onTouchmove:h,onMousedown:w[0]||(w[0]=x=>f(x)),onTouchstart:w[1]||(w[1]=x=>f(x)),onMouseup:w[2]||(w[2]=()=>g(s(e.draggingNode))),onTouchendPassive:w[3]||(w[3]=()=>g(s(e.draggingNode))),onMouseleave:w[4]||(w[4]=()=>g(s(e.draggingNode),!0))},{default:z(()=>[(M(),P("svg",ml,[C("g",vl,[p(li,{name:"link",appear:""},{default:z(()=>[(M(!0),P(le,null,rn(s(e.links)||[],x=>(M(),P("g",{key:`${x.startNode.id}-${x.endNode.id}`},[p(Uo,{link:x},null,8,["link"])]))),128))]),_:1}),p(li,{name:"grow",duration:500,appear:""},{default:z(()=>[(M(!0),P(le,null,rn(s(o),x=>{var q;return M(),P("g",{key:x.id,style:{"transition-duration":"0s"}},[p(pl,{node:x,nodeType:e.types[x.type],dragging:s(e.draggingNode),dragged:s(e.draggingNode)===x?r.value:void 0,hasDragged:a.value,receivingNode:((q=s(e.receivingNode))==null?void 0:q.id)===x.id,selectedNode:s(e.selectedNode),selectedAction:s(e.selectedAction),onMouseDown:f,onEndDragging:g,onClickAction:$=>y(x,$)},null,8,["node","nodeType","dragging","dragged","hasDragged","receivingNode","selectedNode","selectedAction","onClickAction"])])}),128))]),_:1})])]))]),_:1},8,["style","class","options"])):B("",!0)}}});Ae.on("setupVue",e=>fr.install(e));const Wi=Symbol("Board");var Bt=(e=>(e.Outline="Outline",e.Fill="Fill",e))(Bt||{}),Be=(e=>(e.Circle="Circle",e.Diamond="Triangle",e))(Be||{});function bl(e){const t=lt({nodes:[],selectedNode:null,selectedAction:null},!1);return We(n=>{const i=e.call(n,n);i.id=bn("board-"),i.type=Wi,i[st]=hl,i.state?(Ri(t),A(i,"state")):(t[an]={nodes:i.startNodes().map((o,c)=>(o.id=c,o)),selectedNode:null,selectedAction:null},i.state=t),i.nodes=I(()=>s(u.state).nodes),i.selectedNode=I({get(){return u.nodes.value.find(o=>o.id===s(u.state).selectedNode)||null},set(o){var c,f;ke(u.state)?u.state.value={...u.state.value,selectedNode:(c=o==null?void 0:o.id)!=null?c:null}:u.state.selectedNode=(f=o==null?void 0:o.id)!=null?f:null}}),i.selectedAction=I({get(){const o=u.selectedNode.value;if(o==null)return null;const c=u.types[o.type];return c.actions==null?null:c.actions.find(f=>f.id===s(u.state).selectedAction)||null},set(o){var c,f;ke(u.state)?u.state.value={...u.state.value,selectedAction:(c=o==null?void 0:o.id)!=null?c:null}:u.state.selectedAction=(f=o==null?void 0:o.id)!=null?f:null}}),i.mousePosition=L(null),i.links?A(i,"links"):i.links=I(()=>u.selectedAction.value==null?null:u.selectedAction.value.links&&u.selectedNode.value?ce(u.selectedAction.value.links,u.selectedNode.value):null),i.draggingNode=L(null),i.receivingNode=L(null),A(i,"visibility"),ue(i,"visibility",we.Visible),A(i,"width"),ue(i,"width","100%"),A(i,"height"),ue(i,"height","100%"),A(i,"classes"),A(i,"style");for(const o in i.types){const c=i.types[o];if(A(c,"title"),A(c,"subtitle"),A(c,"label"),A(c,"size"),ue(c,"size",50),A(c,"style"),A(c,"classes"),A(c,"draggable"),ue(c,"draggable",!1),A(c,"shape"),ue(c,"shape","Circle"),A(c,"canAccept"),ue(c,"canAccept",!1),A(c,"progress"),A(c,"progressDisplay"),ue(c,"progressDisplay","Fill"),A(c,"progressColor"),ue(c,"progressColor","none"),A(c,"fillColor"),A(c,"outlineColor"),A(c,"titleColor"),A(c,"actionDistance"),ue(c,"actionDistance",Math.PI/6),c.nodes=I(()=>s(u.state).nodes.filter(f=>f.type===o)),ue(c,"onClick",function(f){s(u.state).selectedNode=f.id}),c.actions)for(const f of c.actions)A(f,"visibility"),ue(f,"visibility",we.Visible),A(f,"icon"),A(f,"fillColor"),A(f,"tooltip"),A(f,"confirmationLabel"),ue(f,"confirmationLabel",{text:"Tap again to confirm"}),A(f,"links")}function r(o){i.draggingNode.value=o}function a(o){i.receivingNode.value=o}i.placeInAvailableSpace=function(o,c=100,f=W.Right){const h=u.nodes.value.slice().filter(g=>g===o||(f===W.Down||f===W.Up)&&Math.abs(g.position.x-o.position.x)>c||(f===W.Left||f===W.Right)&&Math.abs(g.position.y-o.position.y)>c?!1:!(f===W.Right&&g.position.xo.position.x+c||f===W.Up&&g.position.y>o.position.y+c||f===W.Down&&g.position.yg.position.x-y.position.x:f===W.Left?(g,y)=>y.position.x-g.position.x:f===W.Up?(g,y)=>y.position.y-g.position.y:(g,y)=>g.position.y-y.position.y);for(let g=0;g0&&N>c)break}},i[et]=function(){const{nodes:o,types:c,state:f,visibility:h,width:g,height:y,style:N,classes:w,links:_,selectedAction:x,selectedNode:q,mousePosition:$,draggingNode:T,receivingNode:F}=this;return{nodes:o,types:c,state:f,visibility:h,width:g,height:y,style:s(N),classes:w,links:_,selectedAction:x,selectedNode:q,mousePosition:$,draggingNode:T,receivingNode:F,setDraggingNode:r,setReceivingNode:a}};const u=i;return u})}function ce(e,t,...n){return xn(e)?e(t,...n):s(e)}function Gn(e){let t=0;return e.nodes.value.forEach(n=>{n.id>=t&&(t=n.id+1)}),t}const dn={};Ae.on("addLayer",e=>{const t=pa(e,Wi);dn[e.id]=e.on("postUpdate",n=>{t.forEach(i=>{Object.values(i.types).forEach(r=>r.nodes.value.forEach(a=>{var u;return(u=r.update)==null?void 0:u.call(r,a,n)}))})})});Ae.on("removeLayer",e=>{var t;(t=dn[e.id])==null||t.call(dn),dn[e.id]=void 0});function Hi(e,t="points",n=0,i=void 0){const r=ke(e)?e:lt(e);if(r.displayName=t,r.precision=n,r.small=i,!ke(e)){const a=r[dt];a.displayName=t,a.precision=n,a.small=i}return r}new l("10^^8");new l("1e100");function vi(e,t){const n=t!=null?t:e.value;return l.eq(e.precision,0)?je(e.small?n:l.floor(n)):jt(n,e.precision,e.small)}Ae.on("setupVue",e=>e.use(gr));function yl(e="white",t="8px"){return{transform:"scale(1.05, 1.05)",borderColor:"rgba(0, 0, 0, 0.125)",boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${t} ${e}`,zIndex:1}}const wl=K({props:{visibility:{type:R(Number,Boolean),required:!0},display:{type:R(Object,String,Function),required:!0},style:R(String,Object,Array),classes:R(Object),glowColor:R(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup(e,{emit:t}){const{display:n,glowColor:i,floating:r}=Ne(e),a=qi(n),u=I(()=>{const c=Se(i);return c==null||c===""?{}:s(r)?yl(c):{boxShadow:`0px 9px 5px -6px ${c}`}});function o(){t("selectTab")}return{selectTab:o,component:a,glowColorStyle:u,unref:s,Visibility:we,isVisible:it,isHidden:sn}}});function _l(e,t,n,i,r,a){var u;return e.isVisible(e.visibility)?(M(),P("button",{key:0,onClick:t[0]||(t[0]=(...o)=>e.selectTab&&e.selectTab(...o)),class:ge(["tabButton",{active:e.active,...e.unref(e.classes)}]),style:Oe([{visibility:e.isHidden(e.visibility)?"hidden":void 0},e.glowColorStyle,(u=e.unref(e.style))!=null?u:{}])},[(M(),ee(De(e.component)))],6)):B("",!0)}var Zi=fe(wl,[["render",_l],["__scopeId","data-v-21427abb"]]);const Nl=K({props:{visibility:{type:R(Number,Boolean),required:!0},activeTab:{type:R(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:R(Object),required:!0},style:R(String,Object,Array),classes:R(Object),buttonContainerStyle:R(String,Object,Array),buttonContainerClasses:R(Object)},components:{Sticky:Pn,TabButton:Zi},setup(e){const{activeTab:t}=Ne(e),n=I(()=>at[se.theme].floatingTabs),i=Ge("");Qe(()=>{const o=Se(t);if(o==null){i.value="";return}if(ot(o)){i.value=oe(o);return}i.value=oe(s(o.display))});const r=I(()=>{const o=Se(t);return ot(o)||!o?void 0:s(o.classes)}),a=I(()=>{const o=Se(t);return ot(o)||!o?void 0:s(o.style)});function u(o){const{display:c,style:f,classes:h,glowColor:g,visibility:y}=o;return{display:c,style:s(f),classes:h,glowColor:g,visibility:y}}return{floating:n,tabClasses:r,tabStyle:a,Visibility:we,component:i,gatherButtonProps:u,unref:s,isVisible:it,isHidden:sn}}});function Cl(e,t,n,i,r,a){var c,f;const u=gt("TabButton"),o=gt("Sticky");return e.isVisible(e.visibility)?(M(),P("div",{key:0,class:ge(["tab-family-container",{...e.unref(e.classes),...e.tabClasses}]),style:Oe([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(c=e.unref(e.style))!=null?c:[],(f=e.tabStyle)!=null?f:[]])},[p(o,{class:ge(["tab-buttons-container",e.unref(e.buttonContainerClasses)]),style:Oe(e.unref(e.buttonContainerStyle))},{default:z(()=>[C("div",{class:ge(["tab-buttons",{floating:e.floating}])},[(M(!0),P(le,null,rn(e.unref(e.tabs),(h,g)=>(M(),ee(u,wt({onSelectTab:y=>e.selected.value=g,floating:e.floating,key:g,active:e.unref(h.tab)===e.unref(e.activeTab)},e.gatherButtonProps(h)),null,16,["onSelectTab","floating","active"]))),128))],2)]),_:1},8,["class","style"]),e.unref(e.activeTab)?(M(),ee(De(e.unref(e.component)),{key:0})):B("",!0)],6)):B("",!0)}var kl=fe(Nl,[["render",Cl],["__scopeId","data-v-58dbf83a"]]);const Ml=Symbol("TabButton"),Sl=Symbol("TabFamily");function Il(e,t){if(Object.keys(e).length===0)throw console.warn("Cannot create tab family with 0 tabs"),new Error("Cannot create tab family with 0 tabs");const n=lt(Object.keys(e)[0],!1);return We(i=>{var u;const r=(u=t==null?void 0:t.call(i,i))!=null?u:{};r.id=bn("tabFamily-"),r.type=Sl,r[st]=kl,r.tabs=Object.keys(e).reduce((o,c)=>{const f=e[c]();return f.type=Ml,f[st]=Zi,A(f,"visibility"),ue(f,"visibility",we.Visible),A(f,"tab"),A(f,"display"),A(f,"classes"),A(f,"style"),A(f,"glowColor"),o[c]=f,o},{}),r.selected=n,r.activeTab=I(()=>{const o=s(a.tabs);if(n.value in o&&it(o[n.value].visibility))return s(o[n.value].tab);const c=Object.values(o).find(f=>it(f.visibility));return c?s(c.tab):null}),A(r,"visibility"),ue(r,"visibility",we.Visible),A(r,"classes"),A(r,"style"),A(r,"buttonContainerClasses"),A(r,"buttonContainerStyle"),r[et]=function(){const{visibility:o,activeTab:c,selected:f,tabs:h,style:g,classes:y,buttonContainerClasses:N,buttonContainerStyle:w}=this;return{visibility:o,activeTab:c,selected:f,tabs:h,style:s(g),classes:y,buttonContainerClasses:N,buttonContainerStyle:w}};const a=r;return a})}const Yi=l.ln(10);function fn(e){return e}function $l(e,t){if(D(t))return t.invert(l.neg(e));throw new Error("Could not invert due to no input being a variable")}function xl(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");return m.neg(t.getIntegralFormula(e))}throw new Error("Could not integrate due to no input being a variable")}function El(e){return m.neg(e)}function Tl(e,t,n){if(D(t))return t.invert(l.sub(e,ve(n)));if(D(n))return n.invert(l.sub(e,ve(t)));throw new Error("Could not invert due to no input being a variable")}function Pl(e,t,n){var i,r;if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const a=t.getIntegralFormula(e);return m.times(n,(i=t.innermostVariable)!=null?i:0).add(a)}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const a=n.getIntegralFormula(e);return m.times(t,(r=n.innermostVariable)!=null?r:0).add(a)}throw new Error("Could not integrate due to no input being a variable")}function Dl(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.add(i,n)}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e);return m.add(i,t)}throw new Error("Could not integrate due to no input being a variable")}function Fl(e,t,n){if(D(t))return t.invert(l.add(e,ve(n)));if(D(n))return n.invert(l.sub(ve(t),e));throw new Error("Could not invert due to no input being a variable")}function Ol(e,t,n){var i,r;if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const a=t.getIntegralFormula(e);return m.sub(a,m.times(n,(i=t.innermostVariable)!=null?i:0))}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const a=n.getIntegralFormula(e);return m.times(t,(r=n.innermostVariable)!=null?r:0).sub(a)}throw new Error("Could not integrate due to no input being a variable")}function Al(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.sub(i,n)}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e);return m.sub(i,t)}throw new Error("Could not integrate due to no input being a variable")}function ql(e,t,n){if(D(t))return t.invert(l.div(e,ve(n)));if(D(n))return n.invert(l.div(e,ve(t)));throw new Error("Could not invert due to no input being a variable")}function Vl(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.times(i,n)}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e);return m.times(i,t)}throw new Error("Could not integrate due to no input being a variable")}function Rl(e,t,n){if(D(t))return m.div(e,n);if(D(n))return m.div(e,t);throw new Error("Could not apply substitution due to no input being a variable")}function Ll(e,t,n){if(D(t))return t.invert(l.mul(e,ve(n)));if(D(n))return n.invert(l.div(ve(t),e));throw new Error("Could not invert due to no input being a variable")}function Bl(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.div(i,n)}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e);return m.div(t,i)}throw new Error("Could not integrate due to no input being a variable")}function jl(e,t,n){if(D(t))return m.mul(e,n);if(D(n))return m.mul(e,t);throw new Error("Could not apply substitution due to no input being a variable")}function zl(e,t){if(D(t))return t.invert(l.recip(e));throw new Error("Could not invert due to no input being a variable")}function Ul(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.ln(n)}throw new Error("Could not integrate due to no input being a variable")}function Gl(e,t){if(D(t))return t.invert(l.pow10(e));throw new Error("Could not invert due to no input being a variable")}function Wl(e){return l.ln(e).sub(1).times(e).div(Yi)}function Hl(e,t){if(D(t)){const n=Yi.times(e);return t.invert(n.div(n.div(Math.E).lambertw()))}throw new Error("Could not invert due to no input being a variable")}function Zl(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");return new m({inputs:[t.getIntegralFormula(e)],evaluate:Wl,invert:Hl})}throw new Error("Could not integrate due to no input being a variable")}function Yl(e,t,n){if(D(t))return t.invert(l.pow(ve(n),e));if(D(n))return n.invert(l.root(ve(t),e));throw new Error("Could not invert due to no input being a variable")}function Jl(e,t){return l.ln(e).sub(1).times(e).div(l.ln(t))}function Kl(e,t,n){if(D(t)){const i=l.ln(ve(n)).times(e);return t.invert(i.div(i.div(Math.E).lambertw()))}throw new Error("Could not invert due to no input being a variable")}function Xl(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");return new m({inputs:[t.getIntegralFormula(e),n],evaluate:Jl,invert:Kl})}throw new Error("Could not integrate due to no input being a variable")}function Ql(e,t){if(D(t))return t.invert(l.pow(2,e));throw new Error("Could not invert due to no input being a variable")}function eu(e){return l.ln(e).sub(1).times(e).div(l.ln(2))}function tu(e,t){if(D(t)){const n=l.ln(2).times(e);return t.invert(n.div(n.div(Math.E).lambertw()))}throw new Error("Could not invert due to no input being a variable")}function nu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");return new m({inputs:[t.getIntegralFormula(e)],evaluate:eu,invert:tu})}throw new Error("Could not integrate due to no input being a variable")}function iu(e,t){if(D(t))return t.invert(l.exp(e));throw new Error("Could not invert due to no input being a variable")}function ru(e){return l.ln(e).sub(1).times(e)}function au(e,t){if(D(t))return t.invert(l.div(e,l.div(e,Math.E).lambertw()));throw new Error("Could not invert due to no input being a variable")}function su(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");return new m({inputs:[t.getIntegralFormula(e)],evaluate:ru,invert:au})}throw new Error("Could not integrate due to no input being a variable")}function ou(e,t,n){if(D(t))return t.invert(l.root(e,ve(n)));if(D(n))return n.invert(l.ln(e).div(l.ln(ve(t))));throw new Error("Could not invert due to no input being a variable")}function lu(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e),r=m.add(n,1);return m.pow(i,r).div(r)}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e);return m.pow(t,i).div(m.ln(t))}throw new Error("Could not integrate due to no input being a variable")}function uu(e,t){if(D(t))return t.invert(l.root(e,10));throw new Error("Could not invert due to no input being a variable")}function cu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.pow10(n).div(m.ln(10))}throw new Error("Could not integrate due to no input being a variable")}function du(e,t,n){if(D(t))return t.invert(l.ln(e).div(ve(n)));if(D(n))return n.invert(l.root(ve(t),e));throw new Error("Could not invert due to no input being a variable")}function fu(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.pow(n,i).div(m.ln(n))}else if(D(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e),r=m.add(t,1);return m.pow(i,r).div(r)}throw new Error("Could not integrate due to no input being a variable")}function gu(e,t,n){if(D(t))return t.invert(l.root(e,l.recip(ve(n))));if(D(n))return n.invert(l.ln(ve(t)).div(l.ln(e)));throw new Error("Could not invert due to no input being a variable")}function pu(e,t,n){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.pow(i,m.recip(n).add(1)).times(n).div(m.add(n,1))}throw new Error("Could not integrate due to no input being a variable")}function mu(e,t){if(D(t))return t.invert(l.ln(e));throw new Error("Could not invert due to no input being a variable")}function vu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.exp(n)}throw new Error("Could not integrate due to no input being a variable")}function hu(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){const i=l.minabs(t,1e308).toNumber();return l.tetrate(e,i,n)}function bu(e,t,n,i){if(D(t))return t.invert(l.ssqrt(e));throw new Error("Could not invert due to no input being a variable")}function yu(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){const i=l.minabs(t,1e308).toNumber();return l.iteratedexp(e,i,new l(n))}function wu(e,t,n,i){if(D(t))return t.invert(l.iteratedlog(e,Math.E,l.minabs(1e308,ve(n)).toNumber()));throw new Error("Could not invert due to no input being a variable")}function _u(e,t=10,n=2){const i=l.minabs(n,1e308).toNumber();return l.iteratedlog(e,t,i)}function Nu(e,t=10){const n=l.minabs(t,1e308).toNumber();return l.slog(e,n)}function Cu(e,t,n){if(D(t))return t.invert(l.tetrate(e,l.minabs(1e308,ve(n)).toNumber()));throw new Error("Could not invert due to no input being a variable")}function ku(e,t,n){const i=l.minabs(t,1e308).toNumber();return l.layeradd(e,i,n)}function Mu(e,t,n,i){if(D(t))return t.invert(l.layeradd(e,l.minabs(1e308,ve(n)).negate().toNumber()));throw new Error("Could not invert due to no input being a variable")}function Su(e,t){if(D(t))return t.invert(l.pow(Math.E,e).times(e));throw new Error("Could not invert due to no input being a variable")}function Iu(e,t){if(D(t))return t.invert(l.tetrate(e,2));throw new Error("Could not invert due to no input being a variable")}function $u(e,t,n){const i=l.minabs(t,1e308).toNumber();return l.pentate(e,i,n)}function xu(e,t){if(D(t))return t.invert(l.asin(e));throw new Error("Could not invert due to no input being a variable")}function Eu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.cos(n).neg()}throw new Error("Could not integrate due to no input being a variable")}function Tu(e,t){if(D(t))return t.invert(l.acos(e));throw new Error("Could not invert due to no input being a variable")}function Pu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.sin(n)}throw new Error("Could not integrate due to no input being a variable")}function Du(e,t){if(D(t))return t.invert(l.atan(e));throw new Error("Could not invert due to no input being a variable")}function Fu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.cos(n).ln().neg()}throw new Error("Could not integrate due to no input being a variable")}function Ou(e,t){if(D(t))return t.invert(l.sin(e));throw new Error("Could not invert due to no input being a variable")}function Au(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.asin(n).times(n).add(m.sqrt(m.sub(1,m.pow(n,2))))}throw new Error("Could not integrate due to no input being a variable")}function qu(e,t){if(D(t))return t.invert(l.cos(e));throw new Error("Could not invert due to no input being a variable")}function Vu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.acos(n).times(n).sub(m.sqrt(m.sub(1,m.pow(n,2))))}throw new Error("Could not integrate due to no input being a variable")}function Ru(e,t){if(D(t))return t.invert(l.tan(e));throw new Error("Could not invert due to no input being a variable")}function Lu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.atan(n).times(n).sub(m.ln(m.pow(n,2).add(1)).div(2))}throw new Error("Could not integrate due to no input being a variable")}function Bu(e,t){if(D(t))return t.invert(l.asinh(e));throw new Error("Could not invert due to no input being a variable")}function ju(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.cosh(n)}throw new Error("Could not integrate due to no input being a variable")}function zu(e,t){if(D(t))return t.invert(l.acosh(e));throw new Error("Could not invert due to no input being a variable")}function Uu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.sinh(n)}throw new Error("Could not integrate due to no input being a variable")}function Gu(e,t){if(D(t))return t.invert(l.atanh(e));throw new Error("Could not invert due to no input being a variable")}function Wu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.cosh(n).ln()}throw new Error("Could not integrate due to no input being a variable")}function Hu(e,t){if(D(t))return t.invert(l.sinh(e));throw new Error("Could not invert due to no input being a variable")}function Zu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.asinh(n).times(n).sub(m.pow(n,2).add(1).sqrt())}throw new Error("Could not integrate due to no input being a variable")}function Yu(e,t){if(D(t))return t.invert(l.cosh(e));throw new Error("Could not invert due to no input being a variable")}function Ju(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.acosh(n).times(n).sub(m.add(n,1).sqrt().times(m.sub(n,1).sqrt()))}throw new Error("Could not integrate due to no input being a variable")}function Ku(e,t){if(D(t))return t.invert(l.tanh(e));throw new Error("Could not invert due to no input being a variable")}function Xu(e,t){if(D(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.atanh(n).times(n).add(m.sub(1,m.pow(n,2)).ln().div(2))}throw new Error("Could not integrate due to no input being a variable")}function on(e){return(t,n)=>new m({inputs:[t,n],evaluate:e,invert:fn})}function D(e){return e instanceof be&&e.hasVariable()}function ve(e,t){return e instanceof be?e.evaluate(t):s(e)}function Qu(){return m.pow(this,2).div(2)}function ec(){return this}const _e=class{constructor(e){this.negate=this.neg,this.negated=this.neg,this.sgn=this.sign,this.plus=this.add,this.subtract=this.sub,this.minus=this.sub,this.multiply=this.mul,this.times=this.mul,this.divide=this.div,this.divideBy=this.div,this.dividedBy=this.div,this.reciprocal=this.recip,this.reciprocate=this.recip,this.logarithm=this.log;let t;"inputs"in e&&(e.inputs=e.inputs.map(n=>typeof n=="object"&&dt in n?n[dt]:n)),"variable"in e?(typeof e.variable=="object"&&dt in e.variable&&(e.variable=e.variable[dt]),t=this.setupVariable(e)):"evaluate"in e?t=this.setupFormula(e):t=this.setupConstant(e),this.inputs=t.inputs,this.internalVariables=t.internalVariables,this.innermostVariable=t.innermostVariable,this.internalEvaluate=t.internalEvaluate,this.internalInvert=t.internalInvert,this.internalIntegrate=t.internalIntegrate,this.internalIntegrateInner=t.internalIntegrateInner,this.applySubstitution=t.applySubstitution}setupVariable({variable:e}){return{inputs:[e],internalVariables:1,innermostVariable:e,internalIntegrate:Qu,internalIntegrateInner:ec,applySubstitution:fn}}setupConstant({inputs:e}){if(e.length!==1)throw new Error("Evaluate function is required if inputs is not length 1");return{inputs:e,internalVariables:0}}setupFormula(e){var y,N;const{inputs:t,evaluate:n,invert:i,integrate:r,integrateInner:a,applySubstitution:u}=e,o=t.reduce((w,_)=>w+(_ instanceof _e?_.internalVariables:0),0),c=t.find(w=>w instanceof _e&&w.hasVariable()),f=o===1?c==null?void 0:c.innermostVariable:void 0,h=(y=c==null?void 0:c.isInvertible())!=null?y:!1,g=(N=c==null?void 0:c.isIntegrable())!=null?N:!1;return{inputs:t,internalEvaluate:n,internalInvert:h?i:void 0,internalIntegrate:g?r:void 0,internalIntegrateInner:a,applySubstitution:u,innermostVariable:f,internalVariables:o}}isInvertible(){return this.hasVariable()&&(this.internalInvert!=null||this.internalEvaluate==null)}isIntegrable(){return this.hasVariable()&&this.internalIntegrate!=null}isIntegralInvertible(){return this.isIntegrable()?this.getIntegralFormula().isInvertible():!1}hasVariable(){return this.internalVariables===1}evaluate(e){var t,n,i;return(i=(n=(t=this.internalEvaluate)==null?void 0:t.call(this,...this.inputs.map(r=>ve(r,e))))!=null?n:this.hasVariable()?e:null)!=null?i:ve(this.inputs[0])}equals(e){return this.inputs.length===e.inputs.length&&this.inputs.every((t,n)=>t instanceof _e&&e.inputs[n]instanceof _e?t.equals(e.inputs[n]):!(t instanceof _e)&&!(e.inputs[n]instanceof _e)&&l.eq(s(t),s(e.inputs[n])))&&this.internalEvaluate===e.internalEvaluate&&this.internalInvert===e.internalInvert&&this.internalIntegrate===e.internalIntegrate&&this.internalVariables===e.internalVariables}static constant(e){return new m({inputs:[e]})}static variable(e){return new m({variable:e})}static step(e,t,n){const i=L(0),r=n(m.variable(i)),a=he(t);function u(c){return l.lt(c,s(a))?c:(i.value=l.sub(c,s(a)),l.add(r.evaluate(),s(a)))}function o(c,f){if(D(f)&&r.isInvertible())return l.gt(c,s(a))&&(c=l.add(r.invert(l.sub(c,s(a))),s(a))),f.invert(c);throw new Error("Could not invert due to no input being a variable")}return new m({inputs:[e],evaluate:u,invert:r.isInvertible()&&r.hasVariable()?o:void 0})}static if(e,t,n,i){const r=L(0),a=m.variable(r),u=n(a),o=i==null?void 0:i(a),c=he(t);function f(g){return s(c)?(r.value=g,u.evaluate()):o?(r.value=g,o.evaluate()):g}function h(g,y){if(!D(y)||!u.isInvertible()||o!=null&&!o.isInvertible())throw new Error("Could not invert due to no input being a variable");return s(c)?y.invert(u.invert(g)):o?y.invert(o.invert(g)):y.invert(g)}return new m({inputs:[e],evaluate:f,invert:u.isInvertible()&&u.hasVariable()?h:void 0})}static conditional(e,t,n,i){return m.if(e,t,n,i)}static abs(e){return new m({inputs:[e],evaluate:l.abs})}static neg(e){return new m({inputs:[e],evaluate:l.neg,invert:$l,applySubstitution:El,integrate:xl})}static sign(e){return new m({inputs:[e],evaluate:l.sign})}static round(e){return new m({inputs:[e],evaluate:l.round})}static floor(e){return new m({inputs:[e],evaluate:l.floor})}static ceil(e){return new m({inputs:[e],evaluate:l.ceil})}static trunc(e){return new m({inputs:[e],evaluate:l.trunc})}static add(e,t){return new m({inputs:[e,t],evaluate:l.add,invert:Tl,integrate:Pl,integrateInner:Dl,applySubstitution:fn})}static sub(e,t){return new m({inputs:[e,t],evaluate:l.sub,invert:Fl,integrate:Ol,integrateInner:Al,applySubstitution:fn})}static mul(e,t){return new m({inputs:[e,t],evaluate:l.mul,invert:ql,integrate:Vl,applySubstitution:Rl})}static div(e,t){return new m({inputs:[e,t],evaluate:l.div,invert:Ll,integrate:Bl,applySubstitution:jl})}static recip(e){return new m({inputs:[e],evaluate:l.recip,invert:zl,integrate:Ul})}static clamp(e,t,n){return new m({inputs:[e,t,n],evaluate:l.clamp,invert:fn})}static pLog10(e){return new m({inputs:[e],evaluate:l.pLog10})}static absLog10(e){return new m({inputs:[e],evaluate:l.absLog10})}static log10(e){return new m({inputs:[e],evaluate:l.log10,invert:Gl,integrate:Zl})}static log(e,t){return new m({inputs:[e,t],evaluate:l.log,invert:Yl,integrate:Xl})}static log2(e){return new m({inputs:[e],evaluate:l.log2,invert:Ql,integrate:nu})}static ln(e){return new m({inputs:[e],evaluate:l.ln,invert:iu,integrate:su})}static pow(e,t){return new m({inputs:[e,t],evaluate:l.pow,invert:ou,integrate:lu})}static pow10(e){return new m({inputs:[e],evaluate:l.pow10,invert:uu,integrate:cu})}static pow_base(e,t){return new m({inputs:[e,t],evaluate:l.pow_base,invert:du,integrate:fu})}static root(e,t){return new m({inputs:[e,t],evaluate:l.root,invert:gu,integrate:pu})}static factorial(e){return new m({inputs:[e],evaluate:l.factorial})}static gamma(e){return new m({inputs:[e],evaluate:l.gamma})}static lngamma(e){return new m({inputs:[e],evaluate:l.lngamma})}static exp(e){return new m({inputs:[e],evaluate:l.exp,invert:mu,integrate:vu})}static sqr(e){return m.pow(e,2)}static sqrt(e){return m.root(e,2)}static cube(e){return m.pow(e,3)}static cbrt(e){return m.root(e,3)}static tetrate(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){return new m({inputs:[e,t,n],evaluate:hu,invert:bu})}static iteratedexp(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){return new m({inputs:[e,t,n],evaluate:yu,invert:wu})}static iteratedlog(e,t=10,n=1){return new m({inputs:[e,t,n],evaluate:_u})}static slog(e,t=10){return new m({inputs:[e,t],evaluate:Nu,invert:Cu})}static layeradd10(e,t){return new m({inputs:[e,t],evaluate:l.layeradd10})}static layeradd(e,t,n=10){return new m({inputs:[e,t,n],evaluate:ku,invert:Mu})}static lambertw(e){return new m({inputs:[e],evaluate:l.lambertw,invert:Su})}static ssqrt(e){return new m({inputs:[e],evaluate:l.ssqrt,invert:Iu})}static pentate(e,t=2,n=l.fromComponents_noNormalize(1,0,1)){return new m({inputs:[e,t,n],evaluate:$u})}static sin(e){return new m({inputs:[e],evaluate:l.sin,invert:Ou,integrate:Eu})}static cos(e){return new m({inputs:[e],evaluate:l.cos,invert:qu,integrate:Pu})}static tan(e){return new m({inputs:[e],evaluate:l.tan,invert:Ru,integrate:Fu})}static asin(e){return new m({inputs:[e],evaluate:l.asin,invert:xu,integrate:Au})}static acos(e){return new m({inputs:[e],evaluate:l.acos,invert:Tu,integrate:Vu})}static atan(e){return new m({inputs:[e],evaluate:l.atan,invert:Du,integrate:Lu})}static sinh(e){return new m({inputs:[e],evaluate:l.sinh,invert:Hu,integrate:ju})}static cosh(e){return new m({inputs:[e],evaluate:l.cosh,invert:Yu,integrate:Uu})}static tanh(e){return new m({inputs:[e],evaluate:l.tanh,invert:Ku,integrate:Wu})}static asinh(e){return new m({inputs:[e],evaluate:l.asinh,invert:Bu,integrate:Zu})}static acosh(e){return new m({inputs:[e],evaluate:l.acosh,invert:zu,integrate:Ju})}static atanh(e){return new m({inputs:[e],evaluate:l.atanh,invert:Gu,integrate:Xu})}step(e,t){return m.step(this,e,t)}if(e,t){return m.if(this,e,t)}conditional(e,t){return m.if(this,e,t)}abs(){return m.abs(this)}neg(){return m.neg(this)}sign(){return m.sign(this)}round(){return m.round(this)}floor(){return m.floor(this)}ceil(){return m.ceil(this)}trunc(){return m.trunc(this)}add(e){return m.add(this,e)}sub(e){return m.sub(this,e)}mul(e){return m.mul(this,e)}div(e){return m.div(this,e)}recip(){return m.recip(this)}max(e){return m.max(this,e)}min(e){return m.min(this,e)}maxabs(e){return m.maxabs(this,e)}minabs(e){return m.minabs(this,e)}clamp(e,t){return m.clamp(this,e,t)}clampMin(e){return m.clampMin(this,e)}clampMax(e){return m.clampMax(this,e)}pLog10(){return m.pLog10(this)}absLog10(){return m.absLog10(this)}log10(){return m.log10(this)}log(e){return m.log(this,e)}log2(){return m.log2(this)}ln(){return m.ln(this)}pow(e){return m.pow(this,e)}pow10(){return m.pow10(this)}pow_base(e){return m.pow_base(this,e)}root(e){return m.root(this,e)}factorial(){return m.factorial(this)}gamma(){return m.gamma(this)}lngamma(){return m.lngamma(this)}exp(){return m.exp(this)}sqr(){return m.pow(this,2)}sqrt(){return m.root(this,2)}cube(){return m.pow(this,3)}cbrt(){return m.root(this,3)}tetrate(e=2,t=l.fromComponents_noNormalize(1,0,1)){return m.tetrate(this,e,t)}iteratedexp(e=2,t=l.fromComponents_noNormalize(1,0,1)){return m.iteratedexp(this,e,t)}iteratedlog(e=10,t=1){return m.iteratedlog(this,e,t)}slog(e=10){return m.slog(this,e)}layeradd10(e){return m.layeradd10(this,e)}layeradd(e,t){return m.layeradd(this,e,t)}lambertw(){return m.lambertw(this)}ssqrt(){return m.ssqrt(this)}pentate(e=2,t=l.fromComponents_noNormalize(1,0,1)){return m.pentate(this,e,t)}sin(){return m.sin(this)}cos(){return m.cos(this)}tan(){return m.tan(this)}asin(){return m.asin(this)}acos(){return m.acos(this)}atan(){return m.atan(this)}sinh(){return m.sinh(this)}cosh(){return m.cosh(this)}tanh(){return m.tanh(this)}asinh(){return m.asinh(this)}acosh(){return m.acosh(this)}atanh(){return m.atanh(this)}};let be=_e;be.negate=_e.neg;be.negated=_e.neg;be.sgn=_e.sign;be.plus=_e.add;be.subtract=_e.sub;be.minus=_e.sub;be.multiply=_e.mul;be.times=_e.mul;be.divide=_e.div;be.divideBy=_e.div;be.dividedBy=_e.div;be.reciprocal=_e.recip;be.reciprocate=_e.recip;be.max=on(l.max);be.min=on(l.min);be.minabs=on(l.minabs);be.maxabs=on(l.maxabs);be.clampMin=on(l.clampMin);be.clampMax=on(l.clampMax);be.logarithm=_e.log;class m extends be{invert(t){if(this.internalInvert&&this.hasVariable())return this.internalInvert.call(this,t,...this.inputs);if(this.inputs.length===1&&this.hasVariable())return t;throw new Error("Cannot invert non-invertible formula")}evaluateIntegral(t){if(!this.isIntegrable())throw new Error("Cannot evaluate integral of formula without integral");return this.getIntegralFormula().evaluate(t)}invertIntegral(t){if(!this.isIntegrable()||!this.getIntegralFormula().isInvertible())throw new Error("Cannot invert integral of formula without invertible integral");return this.getIntegralFormula().invert(t)}calculateConstantOfIntegration(){const t=this.getIntegralFormula().evaluate(1),n=l.add(this.evaluate(0),this.evaluate(1)).div(2);return l.sub(n,t)}getIntegralFormula(t){if(this.integralFormula!=null&&t==null)return this.integralFormula;if(t==null){if(this.applySubstitution==null){if(t=[],this.internalIntegrate==null)throw new Error("Cannot integrate formula with non-integrable operation");let n=this.internalIntegrate.call(this,t,...this.inputs);t.forEach(i=>n=i(n)),this.integralFormula=n}else if(this.internalIntegrate)this.integralFormula=this.internalIntegrate.call(this,void 0,...this.inputs);else if(this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable())this.integralFormula=this;else throw new Error("Cannot integrate formula without variable");return this.integralFormula}else{if(this.applySubstitution==null)throw new Error("Cannot have two complex operations in an integrable formula");if(t.push(n=>this.applySubstitution.call(this,n,...this.inputs)),this.internalIntegrateInner)return this.internalIntegrateInner.call(this,t,...this.inputs);if(this.internalIntegrate)return this.internalIntegrate.call(this,t,...this.inputs);if(this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable())return this;throw new Error("Cannot integrate formula without variable")}}}function tc(e,t,n=!0,i){const r=he(n);return I(()=>{var u,o;let a;if(s(r)){if(!e.isIntegrable()||!e.isIntegralInvertible())throw new Error("Cannot calculate max affordable of formula with non-invertible integral");a=l.floor(e.invertIntegral(l.add(t.value,e.evaluateIntegral()))).sub((u=s(e.innermostVariable))!=null?u:0),i==null&&(i=10)}else{if(!e.isInvertible())throw new Error("Cannot calculate max affordable of non-invertible formula");a=l.floor(e.invert(t.value)),i==null&&(i=0)}if(i>0&&l.lt(Tt(e,a,!0,0),1e308)){a=a.sub(i).clampMin(0);let c=Tt(e,a,!0,0);for(;;){const f=e.evaluate(a.add((o=s(e.innermostVariable))!=null?o:0));if(l.add(c,f).lte(t.value))a=a.add(1),c=l.add(c,f);else break}}return a})}function Tt(e,t,n=!0,i){var a,u,o;let r=l.add(t,(a=s(e.innermostVariable))!=null?a:0);if(n){if(!e.isIntegrable())throw new Error("Cannot calculate cost with spending resources of non-integrable formula");const c=r;r=r.sub(i!=null?i:10).clampMin((u=s(e.innermostVariable))!=null?u:0);let f=l.sub(e.evaluateIntegral(r),e.evaluateIntegral());if(c.gt(1e308))return f.add(l.sub(c,r).times(e.evaluate(r)));for(let h=r.toNumber();h{const{addend:n,description:i,enabled:r,smallerIsBetter:a}=e.call(t,t),u=he(n),o=he(i),c=r==null?void 0:he(r);return{apply:f=>l.add(f,s(u)),invert:f=>l.sub(f,s(u)),getFormula:f=>m.add(f,u),enabled:c,description:i==null?void 0:ne(()=>p("div",{class:"modifier-container"},[s(o)!=null?p("span",{class:"modifier-description"},[tt(s(o))]):null,p("span",{class:"modifier-amount",style:(a===!0?l.gt(s(u),0):l.lt(s(u),0))?"color: var(--danger)":""},[l.gte(s(u),0)?"+":"",xt(s(u))])]))}})}function ct(e){return We(t=>{const{multiplier:n,description:i,enabled:r,smallerIsBetter:a}=e.call(t,t),u=he(n),o=he(i),c=r==null?void 0:he(r);return{apply:f=>l.times(f,s(u)),invert:f=>l.div(f,s(u)),getFormula:f=>m.times(f,u),enabled:c,description:i==null?void 0:ne(()=>p("div",{class:"modifier-container"},[s(o)!=null?p("span",{class:"modifier-description"},[tt(s(o))]):null,p("span",{class:"modifier-amount",style:(a===!0?l.gt(s(u),1):l.lt(s(u),1))?"color: var(--danger)":""},[V("\xD7"),xt(s(u))])]))}})}function nc(e){return We(t=>{const{exponent:n,description:i,enabled:r,supportLowNumbers:a,smallerIsBetter:u}=e.call(t,t),o=he(n),c=he(i),f=r==null?void 0:he(r);return{apply:h=>{let g=h;return a&&(g=l.add(g,1)),g=l.pow(g,s(o)),a&&(g=l.sub(g,1)),g},invert:h=>{let g=h;return a&&(g=l.add(g,1)),g=l.root(g,s(o)),a&&(g=l.sub(g,1)),g},getFormula:h=>a?m.add(h,1).pow(o).sub(1):m.pow(h,o),enabled:f,description:i==null?void 0:ne(()=>p("div",{class:"modifier-container"},[s(c)!=null?p("span",{class:"modifier-description"},[tt(s(c)),a?" (+1 effective)":null]):null,p("span",{class:"modifier-amount",style:(u===!0?l.gt(s(o),1):l.lt(s(o),1))?"color: var(--danger)":""},[V("^"),xt(s(o))])]))}})}function qt(e){return We(()=>{const t=e();return{apply:n=>t.filter(i=>s(i.enabled)!==!1).reduce((i,r)=>r.apply(i),n),invert:t.every(n=>n.invert!=null)?n=>t.filter(i=>s(i.enabled)!==!1).reduceRight((i,r)=>r.invert(i),n):void 0,getFormula:t.every(n=>n.getFormula!=null)?n=>t.filter(i=>s(i.enabled)!==!1).reduce((i,r)=>r.getFormula(i),n):void 0,enabled:t.some(n=>n.enabled!=null)?I(()=>t.filter(n=>s(n.enabled)!==!1).length>0):void 0,description:t.some(n=>n.description!=null)?ne(()=>p(le,null,[t.filter(n=>s(n.enabled)!==!1).map(n=>s(n.description)).filter(n=>n).map(tt)])):void 0}})}const ic={key:0},rc={key:0,class:"mark star"},ac=["src"],sc=K({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(M(),P("div",ic,[e.mark===!0?(M(),P("div",rc)):(M(),P("img",{key:1,class:"mark",src:e.mark},null,8,ac))])):B("",!0)}});var An=fe(sc,[["__scopeId","data-v-2207999f"]]);const oc=K({__name:"Node",props:{id:null},setup(e){const n=Ne(e),i=In(Qn,()=>{}),r=In(ei,()=>{}),a=Ge(null),u=I(()=>a.value&&a.value.parentElement);return nt([u,n.id],([o,c],[f,h])=>{f&&r(s(h)),o&&i(c,o)}),Mi(()=>r(s(n.id))),(o,c)=>(M(),P("div",{class:"node",ref_key:"node",ref:a},null,512))}});var qn=fe(oc,[["__scopeId","data-v-a48cb382"]]),lc=K({props:{display:{type:R(Object,String,Function),required:!0},visibility:{type:R(Number,Boolean),required:!0},style:R(Object,String,Array),classes:R(Object),onClick:Function,onHold:Function,canClick:{type:R(Boolean),required:!0},small:Boolean,mark:R(Boolean,String),id:{type:String,required:!0}},components:{Node:qn,MarkNode:An},setup(e){const{display:t,onClick:n,onHold:i}=Ne(e),r=Ge("");Qe(()=>{var h;const o=Se(t);if(o==null){r.value="";return}if(ot(o)){r.value=oe(o);return}const c=oe((h=o.title)!=null?h:"","h3"),f=oe(o.description,"div");r.value=oe(ne(()=>p("span",null,[o.title!=null?p("div",null,[p(c,null,null)]):null,p(f,null,null)])))});const{start:a,stop:u}=Ai(n,i);return{start:a,stop:u,comp:r,Visibility:we,isVisible:it,isHidden:sn,unref:s}}});function uc(e,t,n,i,r,a){var c;const u=gt("MarkNode"),o=gt("Node");return e.isVisible(e.visibility)?(M(),P("button",{key:0,style:Oe([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(c=e.unref(e.style))!=null?c:[]]),onClick:t[0]||(t[0]=(...f)=>e.onClick&&e.onClick(...f)),onMousedown:t[1]||(t[1]=(...f)=>e.start&&e.start(...f)),onMouseleave:t[2]||(t[2]=(...f)=>e.stop&&e.stop(...f)),onMouseup:t[3]||(t[3]=(...f)=>e.stop&&e.stop(...f)),onTouchstartPassive:t[4]||(t[4]=(...f)=>e.start&&e.start(...f)),onTouchendPassive:t[5]||(t[5]=(...f)=>e.stop&&e.stop(...f)),onTouchcancelPassive:t[6]||(t[6]=(...f)=>e.stop&&e.stop(...f)),class:ge({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(M(),ee(De(e.unref(e.comp)),{key:0})):B("",!0),p(u,{mark:e.unref(e.mark)},null,8,["mark"]),p(o,{id:e.id},null,8,["id"])],38)):B("",!0)}var cc=fe(lc,[["render",uc],["__scopeId","data-v-211328c0"]]);const dc=["x1","y1","x2","y2"],fc=K({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const n=Ne(e),i=I(()=>{const a=n.startNode.value.rect,u=n.boundingRect.value,o=u?{x:a.x+a.width/2-u.x,y:a.y+a.height/2-u.y}:{x:0,y:0};return n.link.value.offsetStart&&(o.x+=n.link.value.offsetStart.x,o.y+=n.link.value.offsetStart.y),o}),r=I(()=>{const a=n.endNode.value.rect,u=n.boundingRect.value,o=u?{x:a.x+a.width/2-u.x,y:a.y+a.height/2-u.y}:{x:0,y:0};return n.link.value.offsetEnd&&(o.x+=n.link.value.offsetEnd.x,o.y+=n.link.value.offsetEnd.y),o});return(a,u)=>(M(),P("line",wt({"stroke-width":"15px",stroke:"white"},e.link,{x1:s(i).x,y1:s(i).y,x2:s(r).x,y2:s(r).y}),null,16,dc))}});const gc=K({__name:"Links",props:{links:null},setup(e){var c;const n=Pt(e,"links"),i=L(null),r=In(ti,L({})),a=In(ni,L(void 0)),u=L((c=i.value)==null?void 0:c.getBoundingClientRect());nt(a,()=>{var f;return u.value=(f=i.value)==null?void 0:f.getBoundingClientRect()}),Fn(()=>{var f;return u.value=(f=i.value)==null?void 0:f.getBoundingClientRect()});const o=I(()=>{var h,g;const f=r.value;return(g=(h=n.value)==null?void 0:h.filter(y=>{var N,w;return((N=f[y.startNode.id])==null?void 0:N.rect)&&((w=f[y.startNode.id])==null?void 0:w.rect)}))!=null?g:[]});return(f,h)=>(M(),P(le,null,[s(o)?(M(),P("svg",sr(wt({key:0},f.$attrs)),[(M(!0),P(le,null,rn(s(o),(g,y)=>(M(),ee(fc,{key:y,link:g,boundingRect:u.value,startNode:s(r)[g.startNode.id],endNode:s(r)[g.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):B("",!0),C("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var pc=fe(gc,[["__scopeId","data-v-063f6d6b"]]);K({props:{nodes:{type:R(Array),required:!0},leftSideNodes:R(Array),rightSideNodes:R(Array),branches:R(Array)},components:{Links:pc},setup(e){const{nodes:t,leftSideNodes:n,rightSideNodes:i}=Ne(e),r=Ge();Qe(()=>{const o=Se(t);r.value=oe(ne(()=>p(le,null,[o.map(c=>p("span",{class:"row tree-row",style:"margin: 50px auto;"},[c.map(tt)]))])))});const a=Ge();Qe(()=>{const o=Se(n);a.value=o?oe(ne(()=>p("span",{class:"left-side-nodes small"},[o.map(tt)]))):""});const u=Ge();return Qe(()=>{const o=Se(i);u.value=o?oe(ne(()=>p("span",{class:"side-nodes small"},[o.map(tt)]))):""}),{unref:s,nodesComp:r,leftNodesComp:a,rightNodesComp:u}}});K({props:{display:R(Object,String,Function),visibility:{type:R(Number,Boolean),required:!0},style:R(String,Object,Array),classes:R(Object),onClick:Function,onHold:Function,color:R(String),glowColor:R(String),canClick:{type:R(Boolean),required:!0},mark:R(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:An,Node:qn},setup(e){const{onClick:t,onHold:n,display:i}=Ne(e),r=yn(i),{start:a,stop:u}=Ai(t,n);return{start:a,stop:u,comp:r,unref:s,Visibility:we,isCoercableComponent:ot,isVisible:it,isHidden:sn}}});function gn(e){const t=[],n={};let i=!1;function r(){return i||(t.push(...e()),n.base=t.map(o=>he(o.base)),n.baseText=t.map(o=>he(o.baseText)),n.visible=t.map(o=>he(o.visible)),n.title=t.map(o=>he(o.title)),n.subtitle=t.map(o=>he(o.subtitle)),i=!0),t}const a=lt({},!1);return[ne(()=>{const o=r();let c=!0;const f=o.map((h,g)=>{var q,$,T;if(s(n.visible[g])===!1)return null;const y=p("h3",{onClick:()=>a.value[g]=!a.value[g],style:"cursor: pointer"},[p("span",{class:"modifier-toggle"+(s(a.value[g])?" collapsed":"")},[V("\u25BC")]),s(n.title[g]),s(n.subtitle[g])!=null?p("span",{class:"subtitle"},[V(" ("),s(n.subtitle[g]),V(")")]):null]),N=s(a.value[g])?null:p(le,null,[p("div",{class:"modifier-container"},[p("span",{class:"modifier-description"},[tt((q=s(n.baseText[g]))!=null?q:"Base")]),p("span",{class:"modifier-amount"},[jt(($=s(n.base[g]))!=null?$:1),h.unit])]),h.modifier.description==null?null:tt(s(h.modifier.description))]),w=!c;c=!1;const _=(T=s(n.base[g]))!=null?T:1,x=h.modifier.apply(_);return p(le,null,[w?p("br",null,null):null,p("div",{style:{"--unit":se.alignUnits&&h.unit!=null?"'"+h.unit+"'":""}},[y,p("br",null,null),N,p("hr",null,null),p("div",{class:"modifier-container"},[p("span",{class:"modifier-description"},[V("Total")]),p("span",{class:"modifier-amount",style:(h.smallerIsBetter===!0?l.gt(x,_!=null?_:1):l.lt(x,_!=null?_:1))?"color: var(--danger)":""},[xt(x),h.unit])])])])});return p(le,null,[f])}),a]}function hi(e,t,n){const i=he(t),r=he(n);return I(()=>{const a=s(i),u=s(r);return l.gte(e.value,u)?"Now":l.lte(a,0)?"Never":On(l.sub(u,e.value).div(a))})}function Dn(e,t,n=1){const i=he(t),r=he(n);if(!e.hasVariable())throw new Error("Cannot create formula preview if the formula does not have a variable");return ne(()=>{var a;if(s(i)){const u=xt(e.evaluate()),o=xt(e.evaluate(l.add(s((a=e.innermostVariable)!=null?a:0),s(r))));return p(le,null,[p("b",null,[p("i",null,[u,V(" \u2192 "),o])])])}return p(le,null,[xt(e.evaluate())])})}const mc=K({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(M(),P("div",{style:Oe({width:e.width,height:e.height})},null,4))}});function Wn(e){return We(t=>{const n=e.call(t,t);if(n.partialDisplay=i=>p("span",{style:s(n.requirementMet)?"":"color: var(--danger)"},[vi(n.resource,n.cost instanceof m?Tt(n.cost,i!=null?i:1,s(n.spendResources)):s(n.cost))," ",n.resource.displayName]),n.display=i=>p("div",null,[s(n.requiresPay)?"Costs: ":"Requires: ",vi(n.resource,n.cost instanceof m?Tt(n.cost,i!=null?i:1,s(n.spendResources)):s(n.cost))," ",n.resource.displayName]),A(n,"visibility"),ue(n,"visibility",we.Visible),A(n,"cost"),A(n,"requiresPay"),ue(n,"requiresPay",!0),A(n,"spendResources"),ue(n,"spendResources",!0),ue(n,"pay",function(i){const r=n.cost instanceof m?Tt(n.cost,i!=null?i:1,s(n.spendResources)):s(n.cost);n.resource.value=l.sub(n.resource.value,r).max(0)}),n.canMaximize=I(()=>n.cost instanceof m&&n.cost.isInvertible()&&(s(n.spendResources)===!1||n.cost.isIntegrable())),n.cost instanceof m&&n.cost.isInvertible()){const i=tc(n.cost,n.resource,s(n.spendResources));n.requirementMet=I(()=>s(n.canMaximize)?i.value:n.cost instanceof m?l.gte(n.resource.value,n.cost.evaluate()):l.gte(n.resource.value,s(n.cost)))}else n.requirementMet=I(()=>n.cost instanceof m?l.gte(n.resource.value,n.cost.evaluate()):l.gte(n.resource.value,s(n.cost)));return n})}function oi(e){return We(()=>({requirementMet:I(()=>it(e.visibility)),visibility:we.None,requiresPay:!1}))}function vc(e,t){return We(()=>({requirementMet:he(e),partialDisplay:t==null?void 0:ne(()=>tt(t)),display:t==null?void 0:ne(()=>p(le,null,[V("Req: "),tt(t)])),visibility:t==null?we.None:we.Visible,requiresPay:!1}))}function Vn(e){if(ft(e))return e.every(Vn);const t=s(e.requirementMet);return typeof t=="boolean"?t:l.gt(t,0)}function Ji(e){if(ft(e))return e.map(Ji).reduce(l.min);const t=s(e.requirementMet);return typeof t=="boolean"?t?l.dInf:0:l.gt(t,1)&&s(e.canMaximize)!==!0?1:t}function Rn(e,t=1){var n,i;if(ft(e)&&(e=e.filter(r=>it(r.visibility)),e.length===1&&(e=e[0])),ft(e)){e=e.filter(u=>"partialDisplay"in u);const r=e.filter(u=>s(u.requiresPay)),a=e.filter(u=>!s(u.requiresPay));return p(le,null,[r.length>0?p("div",null,[V("Costs:")," ",pi(r.map(u=>u.partialDisplay(t)),p(le,null,[V(", ")]))]):null,a.length>0?p("div",null,[V("Requires:")," ",pi(a.map(u=>u.partialDisplay(t)),p(le,null,[V(", ")]))]):null])}return(i=(n=e.display)==null?void 0:n.call(e))!=null?i:p(le,null,null)}function Ki(e,t=1){var n;ft(e)?e.filter(i=>s(i.requiresPay)).forEach(i=>{var r;return(r=i.pay)==null?void 0:r.call(i,t)}):s(e.requiresPay)&&((n=e.pay)==null||n.call(e,t))}var hc=K({props:{visibility:{type:R(Number,Boolean),required:!0},display:R(Object,String,Function),earned:{type:R(Boolean),required:!0},requirements:R(Object,Array),image:R(String),style:R(String,Object,Array),classes:R(Object),mark:R(Boolean,String),small:R(Boolean),id:{type:String,required:!0}},components:{Node:qn,MarkNode:An},setup(e){const{display:t,requirements:n,earned:i}=Ne(e),r=Ge("");return Qe(()=>{const a=Se(t);if(a==null){r.value="";return}if(ot(a)){r.value=oe(a);return}const u=oe(a.requirement?a.requirement:ne(()=>{var f;return Rn((f=Se(n))!=null?f:[])}),"h3"),o=oe(a.effectDisplay||"","b"),c=Se(i)?oe(a.optionsDisplay||"","span"):"";r.value=oe(ne(()=>p("span",null,[p(u,null,null),a.effectDisplay!=null?p("div",null,[p(o,null,null)]):null,a.optionsDisplay!=null?p("div",{class:"equal-spaced"},[p(c,null,null)]):null])))}),{comp:r,unref:s,Visibility:we,isVisible:it,isHidden:sn}}});function bc(e,t,n,i,r,a){var c;const u=gt("MarkNode"),o=gt("Node");return e.isVisible(e.visibility)?(M(),P("div",{key:0,style:Oe([{visibility:e.isHidden(e.visibility)?"hidden":void 0,backgroundImage:e.earned&&e.image&&`url(${e.image})`||""},(c=e.unref(e.style))!=null?c:[]]),class:ge({feature:!0,achievement:!0,locked:!e.unref(e.earned),done:e.unref(e.earned),small:e.unref(e.small),...e.unref(e.classes)})},[e.comp?(M(),ee(De(e.comp),{key:0})):B("",!0),p(u,{mark:e.unref(e.mark)},null,8,["mark"]),p(o,{id:e.id},null,8,["id"])],6)):B("",!0)}var yc=fe(hc,[["render",bc],["__scopeId","data-v-5673325a"]]);const wc=Kn(),_c=Symbol("Achievement");let Qt=function(e){return e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none",e}({});function Nc(e,...t){const n=lt(!1,!1),i=t.reduce((r,a)=>{var u;return Object.assign(r,(u=a.getPersistentData)==null?void 0:u.call(a))},{});return We(r=>{var c,f,h;const a=(c=e==null?void 0:e.call(r,r))!=null?c:{};a.id=bn("achievement-"),a.type=_c,a[st]=yc;for(const g of t)(f=g.preConstruct)==null||f.call(g,a);a.earned=n,a.complete=function(){var y,N;n.value=!0;const g=a;if((y=g.onComplete)==null||y.call(g),g.display!=null&&s(g.showPopups)===!0){const w=s(g.display);let _;ot(w)?_=oe(w):w.requirement!=null?_=oe(w.requirement):_=Rn((N=g.requirements)!=null?N:[]),wc.info(p("div",null,[p("h3",null,[V("Achievement earned!")]),p("div",null,[p(_,null,null)])]))}},Object.assign(a,i),A(a,"visibility"),ue(a,"visibility",we.Visible);const u=a.visibility;a.visibility=or(()=>{const g=s(a.display);switch(se.msDisplay){default:case Qt.All:return s(u);case Qt.Configurable:return s(a.earned)&&!(g!=null&&typeof g=="object"&&"optionsDisplay"in g)?we.None:s(u);case Qt.Incomplete:return s(a.earned)?we.None:s(u);case Qt.None:return we.None}}),A(a,"display"),A(a,"mark"),A(a,"small"),A(a,"image"),A(a,"style"),A(a,"classes"),A(a,"showPopups"),ue(a,"showPopups",!0);for(const g of t)(h=g.postConstruct)==null||h.call(g,a);const o=t.reduce((g,y)=>{var N;return Object.assign(g,(N=y.getGatheredProps)==null?void 0:N.call(y,a))},{});if(a[et]=function(){const{visibility:g,display:y,requirements:N,earned:w,image:_,style:x,classes:q,mark:$,small:T,id:F}=this;return{visibility:g,display:y,requirements:N,earned:w,image:_,style:s(x),classes:q,mark:$,small:T,id:F,...o}},a.requirements){const g=a,y=[oi(g),vc(()=>!g.earned.value),...ft(a.requirements)?a.requirements:[a.requirements]];Qe(()=>{se.active===J.id&&Vn(y)&&g.complete()})}return a})}Ae.on("loadSettings",e=>{ue(e,"msDisplay",Qt.All)});const Cc=Object.values(Qt).map(e=>({label:Ke(e),value:e}));_a(ne(()=>p(ai,{title:ne(()=>p("span",{class:"option-title"},[V("Show achievements"),p("desc",null,[V("Select which achievements to display based on criterias.")])])),options:Cc,"onUpdate:modelValue":e=>se.msDisplay=e,modelValue:se.msDisplay},null)));const kc=Symbol("Repeatable");function Mc(e,...t){const n=lt(0),i=t.reduce((r,a)=>{var u;return Object.assign(r,(u=a.getPersistentData)==null?void 0:u.call(a))},{});return We(r=>{var y,N,w;const a=e.call(r,r);a.id=bn("repeatable-"),a.type=kc,a[st]=cc;for(const _ of t)(y=_.preConstruct)==null||y.call(_,a);a.amount=n,a.amount[an]=(N=a.initialAmount)!=null?N:0,Object.assign(a,i);const u={requirementMet:I(()=>l.sub(s(a.limit),a.amount.value)),requiresPay:!1,visibility:we.None},o=oi(a);ft(a.requirements)?(a.requirements.unshift(o),a.requirements.push(u)):a.requirements=[o,a.requirements,u],a.maxed=I(()=>l.gte(a.amount.value,s(a.limit))),A(a,"classes");const c=a.classes;a.classes=I(()=>{const _=s(c)||{};return a.maxed.value&&(_.bought=!0),_}),a.amountToIncrease=I(()=>s(a.maximize)?Ji(a.requirements):1),a.canClick=I(()=>Vn(a.requirements));const f=a.onClick;a.onClick=function(_){const x=a;!s(x.canClick)||(Ki(a.requirements,s(a.amountToIncrease)),x.amount.value=l.add(x.amount.value,1),f==null||f(_))},A(a,"display");const h=a.display;a.display=ne(()=>{var x,q,$;const _=s(h);if(ot(_)){const T=oe(_);return p(T,null,null)}if(_!=null){const T=a,F=oe((x=_.title)!=null?x:"","h3"),j=oe((q=_.description)!=null?q:""),ie=oe(($=_.effectDisplay)!=null?$:"");return p("span",null,[_.title==null?null:p("div",null,[p(F,null,null)]),_.description==null?null:p(j,null,null),_.showAmount===!1?null:p("div",null,[p("br",null,null),p(le,null,[V("Amount: "),je(T.amount.value)]),l.isFinite(s(T.limit))?p(le,null,[V(" / "),je(s(T.limit))]):void 0]),_.effectDisplay==null?null:p("div",null,[p("br",null,null),V("Currently: "),p(ie,null,null)]),T.maxed.value?null:p("div",null,[p("br",null,null),Rn(T.requirements,s(a.amountToIncrease))])])}return""}),A(a,"visibility"),ue(a,"visibility",we.Visible),A(a,"limit"),ue(a,"limit",l.dInf),A(a,"style"),A(a,"mark"),A(a,"small"),A(a,"maximize");for(const _ of t)(w=_.postConstruct)==null||w.call(_,a);const g=t.reduce((_,x)=>{var q;return Object.assign(_,(q=x.getGatheredProps)==null?void 0:q.call(x,a))},{});return a[et]=function(){const{display:_,visibility:x,style:q,classes:$,onClick:T,canClick:F,small:j,mark:ie,id:ae}=this;return{display:_,visibility:x,style:s(q),classes:$,onClick:T,canClick:F,small:j,mark:ie,id:ae,...g}},a})}function bi(e,t){return A(t,"display"),A(t,"classes"),A(t,"style"),A(t,"direction"),ue(t,"direction",W.Up),A(t,"xoffset"),A(t,"yoffset"),t.pinnable&&(t.pinned=lt(!1,!1)),yt(()=>{t.pinnable&&("pinned"in e?(console.error("Cannot add pinnable tooltip to element that already has a property called 'pinned'"),t.pinnable=!1,Ri(t.pinned)):e.pinned=t.pinned);const n=e[st];e[st]=Ce;const i=e[et].bind(e);e[et]=function(){const{display:a,classes:u,style:o,direction:c,xoffset:f,yoffset:h,pinned:g}=this;return{element:{[st]:n,[et]:i},display:a,classes:u,style:s(o),direction:c,xoffset:f,yoffset:h,pinned:g}}.bind(t)}),t}var Sc=K({props:{display:{type:R(String,Object,Function),required:!0},visibility:{type:R(Number,Boolean),required:!0},style:R(String,Object,Array),classes:R(Object),requirements:{type:Object,required:!0},canPurchase:{type:R(Boolean),required:!0},bought:{type:R(Boolean),required:!0},mark:R(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:qn,MarkNode:An},setup(e){const{display:t,requirements:n,bought:i}=Ne(e),r=Ge("");return Qe(()=>{const a=Se(t);if(a==null){r.value="";return}if(ot(a)){r.value=oe(a);return}const u=oe(a.title||"","h3"),o=oe(a.description,"div"),c=oe(a.effectDisplay||"");r.value=oe(ne(()=>p("span",null,[a.title!=null?p("div",null,[p(u,null,null)]):null,p(o,null,null),a.effectDisplay!=null?p("div",null,[V("Currently: "),p(c,null,null)]):null,i.value?null:p(le,null,[p("br",null,null),Rn(n.value)])])))}),{component:r,unref:s,Visibility:we,isVisible:it,isHidden:sn}}});const Ic=["disabled"];function $c(e,t,n,i,r,a){var c;const u=gt("MarkNode"),o=gt("Node");return e.isVisible(e.visibility)?(M(),P("button",{key:0,style:Oe([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),onClick:t[0]||(t[0]=(...f)=>e.purchase&&e.purchase(...f)),class:ge({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(M(),ee(De(e.unref(e.component)),{key:0})):B("",!0),p(u,{mark:e.unref(e.mark)},null,8,["mark"]),p(o,{id:e.id},null,8,["id"])],14,Ic)):B("",!0)}var xc=fe(Sc,[["render",$c],["__scopeId","data-v-9be6bac0"]]);const Ec=Symbol("Upgrade");function Tc(e,...t){const n=lt(!1,!1),i=t.reduce((r,a)=>{var u;return Object.assign(r,(u=a.getPersistentData)==null?void 0:u.call(a))},{});return We(r=>{var c,f;const a=e.call(r,r);a.id=bn("upgrade-"),a.type=Ec,a[st]=xc;for(const h of t)(c=h.preConstruct)==null||c.call(h,a);a.bought=n,Object.assign(a,i),a.canPurchase=I(()=>!n.value&&Vn(a.requirements)),a.purchase=function(){var g;const h=a;!s(h.canPurchase)||(Ki(a.requirements),n.value=!0,(g=h.onPurchase)==null||g.call(h))};const u=oi(a);ft(a.requirements)?a.requirements.unshift(u):a.requirements=[u,a.requirements],A(a,"visibility"),ue(a,"visibility",we.Visible),A(a,"classes"),A(a,"style"),A(a,"display"),A(a,"mark");for(const h of t)(f=h.postConstruct)==null||f.call(h,a);const o=t.reduce((h,g)=>{var y;return Object.assign(h,(y=g.getGatheredProps)==null?void 0:y.call(g,a))},{});return a[et]=function(){const{display:h,visibility:g,style:y,classes:N,requirements:w,canPurchase:_,bought:x,mark:q,id:$,purchase:T}=this;return{display:h,visibility:g,style:s(y),classes:N,requirements:w,canPurchase:_,bought:x,mark:q,id:$,purchase:T,...o}},a})}function Pc(e,t,n,i){return function(){e>>>=0,t>>>=0,n>>>=0,i>>>=0;let r=e+t|0;return e=t^t>>>9,t=n+(n<<3)|0,n=n<<21|n>>>11,i=i+1|0,r=r+i|0,n=n+r|0,(r>>>0)/4294967296}}const Dc={1:["b","c","d","f","g","h","i","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z"],2:["a","e","o","u"],3:["br","cr","dr","fr","gr","pr","str","tr","bl","cl","fl","gl","pl","sl","sc","sk","sm","sn","sp","st","sw","ch","sh","th","wh"],4:["ae","ai","ao","au","a","ay","ea","ei","eo","eu","e","ey","ua","ue","ui","uo","u","uy","ia","ie","iu","io","iy","oa","oe","ou","oi","o","oy"],5:["turn","ter","nus","rus","tania","hiri","hines","gawa","nides","carro","rilia","stea","lia","lea","ria","nov","phus","mia","nerth","wei","ruta","tov","zuno","vis","lara","nia","liv","tera","gantu","yama","tune","ter","nus","cury","bos","pra","thea","nope","tis","clite"],6:["una","ion","iea","iri","illes","ides","agua","olla","inda","eshan","oria","ilia","erth","arth","orth","oth","illon","ichi","ov","arvis","ara","ars","yke","yria","onoe","ippe","osie","one","ore","ade","adus","urn","ypso","ora","iuq","orix","apus","ion","eon","eron","ao","omia"]},yi=[[1,2,5],[2,3,6],[3,4,5],[4,3,6],[3,4,2,5],[2,1,3,6],[3,4,2,5],[4,3,1,6],[3,4,1,4,5],[4,1,4,3,6]];function wi(e){const t=yi[Math.floor(e()*yi.length)];let n="";for(let i=0;in-n*t*Math.max(Math.min(a,4-a,1),0);return[i(5),i(3),i(1)]}function Xi(e,t,n){return ii(e,function(){const i=Pc(0,n>>0,n>>32,1);for(let Y=0;Y<12;Y++)i();const r=wi(i),a=_i([.64,.75,.55],i),u=_i([.18,.2,.25],i),o=Hi(0,wi(i)),c=St.indexOf(t),f=i()+c+1,h=Math.ceil(i()*(c+2)),g=[],y=qt(()=>g),N=I(()=>y.apply(0)),w=[];function _(Y,U,Ze,Zt,Yt=Ze){U=he(U);const Ve=$a(Y);w.push({shouldShowPreview:I(()=>s(U)&&Ve.value),modifier:Yt,cost:Zt}),g.push(Ze);const Ct=hi(o,N,()=>ve(Zt));bi(Y,{display:Ct,direction:W.Down})}const x=[],q=L(0);let $=m.variable(q).times(0);const T={};let F=!0;const j=I(()=>l.add(f,i()-.5).pow_base(2).times(10).times($.evaluate()));for(let Y=0;Y({addend:O,description:rt,enabled:E.bought}));break}case"mult":{const O=i()*5+1;b=`Multiply previous ${o.displayName} gain by x${me(O)}.`,$=$.add(l.sub(O,1).times(T[q.value-1])),d=ct(()=>({multiplier:O,description:rt,enabled:E.bought}));break}case"pow":{const O=i()/5+1.1;b=`Raise previous ${o.displayName} gain to the ^${me(O)}`,$=$.add(l.pow(T[q.value-1],O)).sub(T[q.value-1]),d=nc(()=>({exponent:O,description:rt,enabled:E.bought}))}}T[q.value]=$.evaluate(),q.value++;const S=F,E=Tc(()=>({requirements:Wn(()=>({resource:Un(o),cost:vt})),display:{title:rt,description:b},visibility:S}));_(E,()=>!E.bought.value&&E.canPurchase.value,d,vt),pt.push(E)}x.push(pt);break;case"repeatables":const mt=[];for(let Ye=0;Ye<3;Ye++){const Xt=Mn({add:1.5,mult:3},i),vt=q.value,rt=j.value,b=Ni(i);let d="",S,E,O,te;const $e=m.variable(I(()=>Te.amount.value)).times(2);switch(Xt){case"add":{const Pe=l.add(rt,10).times(i()+.5);d=`Gain ${me(Pe)} ${o.displayName}/s`,te=$e.add(1).times(rt),$=$.add(I(()=>l.sub(q.value,vt).add(1).times(5).times(Pe))),S=I(()=>me(l.times(Pe,Te.amount.value))+"/s"),E=pn(()=>({addend:()=>l.times(Pe,Te.amount.value),description:b,enabled:()=>l.gt(Te.amount.value,0)})),O=pn(()=>({addend:Pe}));break}case"mult":{const Pe=i()+1;d=`Multiply previous ${o.displayName} gain by x${me(Pe)}.`,te=$e.pow_base(Pe).times(rt),$=$.add(I(()=>l.sub(q.value,vt).add(1).times(5).pow_base(Pe).sub(1).times(T[vt]))),S=I(()=>"x"+me(l.pow(Pe,Te.amount.value))),E=ct(()=>({multiplier:()=>l.pow(Pe,Te.amount.value),description:b,enabled:()=>l.gt(Te.amount.value,0)})),O=ct(()=>({multiplier:Pe}));break}}T[q.value]=$.evaluate(),q.value++;const ut=F,Te=Mc(()=>({requirements:Wn(()=>({resource:Un(o),cost:te})),display:()=>({title:b,description:d,effectDisplay:s(S)}),visibility:ut}));_(Te,()=>s(Te.canClick),E,te,O),mt.push(Te)}x.push(mt);break}const Yt=Mn({cache:100,generation:10,resourceMulti:5,energyMulti:5},i);let Ve="",Ct,Nn,Cn,Le,ln,Ft;switch(Yt){case"cache":Le=Hn(i),Ve=`Gain ${me(f)}x your current ${Le}.`,Nn=()=>{var mt,Ye,Kt;return Vt.grantResource(Le,l.times((Kt=(Ye=(mt=Vt.resourceNodes.value[Le])==null?void 0:mt.state)==null?void 0:Ye.amount)!=null?Kt:0,f))};break;case"generation":Le=Hn(i);const pt=l.div(f,120).times(Xe[Le]);Ve=`Gain ${me(pt)} ${Le}/s while plane is active.`,Ct=mt=>Vt.grantResource(Le,l.times(mt,pt)),Cn=I(()=>Vt.resourceNodes.value[Le]);break;case"resourceMulti":ln=Le=Hn(i),Ft=l.div(f,17).pow_base(2),Ve=`Gain ${me(Ft)}x ${Le} while plane is active.`;break;case"energyMulti":ln="energy",Ft=l.div(f,17),Ve=`Gain ${me(Ft)}x energy while plane is active.`;break}const Bn=F,un=j.value,Jt=Nc(()=>({requirements:Wn(()=>({resource:Un(o),cost:un})),visibility:Bn,display:{requirement:`${me(un)} ${o.displayName}`,effectDisplay:Ve},style:"width: 100%",classes:{final:Y===h-1},update:Ct,onComplete:Nn,link:Cn,effectedResource:ln,resourceMulti:Ft})),kt=hi(o,N,un);bi(Jt,{display:()=>Jt.earned.value?"":kt.value,direction:W.Down}),x.push([Jt]),F=Jt.earned}const[ie,ae]=gn(()=>[{title:`${Ke(o.displayName)} Gain`,modifier:y,base:0,unit:"/s"}]),X=L(!1),Ee=ne(()=>p(_t,{modelValue:X.value,"onUpdate:modelValue":Y=>X.value=Y},{header:()=>p("h2",null,[V("Modifiers")]),body:()=>Ue(ie)}));this.on("preUpdate",Y=>{!Vt.activePortals.value.some(U=>U.state.id===e)||(o.value=l.times(N.value,Y).add(o.value),Ie.value.forEach(U=>{var Ze;(Ze=U.update)==null||Ze.call(U,Y)}))});const H=I(()=>{const Y=w.find(U=>U.shouldShowPreview.value);return Y?l.neg(ve(Y.cost)):0}),Z=I(()=>{const Y=w.find(U=>U.shouldShowPreview.value);return Y?l.sub(Y.modifier.apply(N.value),N.value):0}),pe=Dn(m.variable(0).add(o),()=>l.neq(H.value,0),H),qe=Dn(m.variable(0).add(N),()=>l.neq(Z.value,0),Z),Fe=I(()=>{const Y=[];return Ie.value.forEach(U=>{U.link&&Y.push(U.link)}),Y}),Dt=I(()=>{const Y={};return Ie.value.forEach(U=>{U.effectedResource!=null&&U.resourceMulti!=null&&(Y[U.effectedResource]!=null?Y[U.effectedResource]=l.times(Y[U.effectedResource],U.resourceMulti):Y[U.effectedResource]=U.resourceMulti)}),Y}),Ie=I(()=>{const Y=[];for(let U=1;Ul.lt(Ie.value.length,h)&&x.some(Y=>Y.some(U=>"earned"in U&&s(U.earned)||"bought"in U&&s(U.bought)?!1:("canClick"in U&&s(U.canClick)||"canPurchase"in U&&s(U.canPurchase),!0))));return{tier:lt(t),seed:lt(n),name:r,color:a,resource:o,background:u,style:{background:u,"--background":u},features:x,resourceTabCollapsed:ae,links:Fe,resourceMultis:Dt,earnedTreasures:Ie,showNotif:_n,display:ne(()=>p(le,null,[p(Pn,{class:"nav-container"},{default:()=>[p("span",{class:"nav-segment"},[p("h2",null,[r])]),p("span",{class:"nav-segment"},[p("h3",null,[t,V("-tier")])]),p("span",{class:"nav-segment"},[p("button",{class:"button",style:"display: inline",onClick:()=>X.value=!0},[V("open modifiers")])])]}),p(Pn,{class:"nav-container"},{default:()=>[p("span",{class:"nav-segment"},[p("h3",{style:`color: ${a}; text-shadow: 0px 0px 10px ${a};`},[Ue(pe)])," ",o.displayName]),p("span",{class:"nav-segment"},[V("("),p("h3",{style:`color: ${a}; text-shadow: 0px 0px 10px ${a};`},[l.gt(N.value,0)?"+":"",Ue(qe)]),V("/s)")])]}),p(mc,{height:"60px"},null),x.map(Y=>Ia(...Y)),Ue(Ee)])),minimizedDisplay:ne(()=>p("div",null,[p("span",null,[r]),p("span",{style:"font-size: large; vertical-align: sub;"},[" ",Ie.value.length,V("/"),h,V(" treasures")])]))}})}function Hn(e){const t=Object.values(Xe).reduce((u,o)=>u+o),n=Object.keys(Xe),i=Math.floor(e()*t);let r=0,a;for(let u=0;uo+c),i=Object.keys(e);let r=0,a=null;const u=t()*n;for(let o=0;oe?"Quadruples mining speed":"Doubles mining speed"},gravel:{description:e=>e?"Quadruples mine ore drops":"Doubles mine ore drops"},stone:{description:e=>e?"Quadruples energy gain":"Doubles energy gain"},copper:{description:e=>e?"Material level is 20% stronger":"Material level is 10% stronger"}},Vt=ii("main",function(){const e=Hi(0,"energy"),t=m.variable(0).add(1),n=I(()=>F.types.resource.nodes.value.reduce((b,d)=>(b[d.state.type]=d,b),{})),i=I(()=>({...F.types.passive.nodes.value.reduce((b,d)=>(b[d.state]=d,b),{}),sand:F.types.dowsing.nodes.value[0],wood:F.types.quarry.nodes.value[0],coal:F.types.empowerer.nodes.value[0],iron:F.types.portalGenerator.nodes.value[0]})),r=I(()=>St.reduce((b,d)=>{var te,$e,ut;const S=(ut=($e=(te=n.value[d])==null?void 0:te.state)==null?void 0:$e.amount)!=null?ut:0;let E=l.floor(t.invertIntegral(S)).sub(10).clampMin(0),O=Tt(t,E,!0,0);for(;;){const Te=t.evaluate(E);if(l.add(O,Te).lte(S))E=E.add(1),O=l.add(O,Te);else break}return b[d]=E,b},{}));function a(b){var te,$e,ut;const d=(ut=($e=(te=n.value[b])==null?void 0:te.state)==null?void 0:$e.amount)!=null?ut:0,S=r.value[b],E=Tt(t,S,!0),O=Tt(t,l.add(S,1),!0);return l.sub(d,E).max(0).div(l.sub(O,E)).toNumber()}const u=Ut({}),o=Ut({});yt(()=>{St.forEach(b=>{nt(()=>r.value[b],(d,S)=>{l.gt(d,S)&&se.active===J.id&&Ci.info(p("div",null,[p("h3",null,[l.eq(d,1)?`${Ke(b)} discovered`:`${Ke(b)} is now Level ${je(d)}`,V("!")]),p("div",null,[V("Energy gain is now 1.01x higher.")])]))})})});const c=I(()=>[ie,X,Ee,H].filter(b=>{var d,S;return(S=(d=b.value)==null?void 0:d.state)==null?void 0:S.powered}).length),f=I(()=>l.eq(c.value,0)?10:l.add(c.value,1).pow_base(100).div(10).times(.99)),h=I(()=>Ee.value==null?0:Ee.value.state.resources.reduce((d,S)=>l.div(100,Ve[S].computedModifier.value).add(d),l.dZero)),g={id:"deselect",icon:"close",tooltip:b=>({text:"resources"in b.state?"Disconnect resources":"Disconnect tools"}),onClick(b){"resources"in b.state?b.state={...b.state,resources:[]}:"tools"in b.state&&(b.state={...b.state,tools:[]}),F.selectedAction.value=null,F.selectedNode.value=null},visibility:b=>"resources"in b.state?b.state.resources.length>0:"tools"in b.state?b.state.tools.length>0:!0},y={id:"toggle",icon:"bolt",tooltip:b=>({text:b.state.powered?"Turn Off":`Turn On - Always runs for ${je(f.value)} energy/s`}),onClick(b){b.state={...b.state,powered:!b.state.powered},F.selectedAction.value=null},fillColor:b=>b.state.powered?"var(--accent1)":"var(--locked)"};function N(b,d=1/0){const S=b(m.variable(0));return{id:"moreConnections",icon:"hub",formula:S,tooltip(E){return{text:`Increase Connections - ${je(S.evaluate(E.state.maxConnections))} energy`}},confirmationLabel:E=>l.gte(e.value,S.evaluate(E.state.maxConnections))?{text:"Tap again to confirm"}:{text:"Cannot afford",color:"var(--danger)"},onClick(E){const O=S.evaluate(E.state.maxConnections);l.gte(e.value,O)&&(e.value=l.sub(e.value,O)),E.state={...E.state,maxConnections:E.state.maxConnections+1},F.selectedAction.value=null},visibility:E=>E.state.maxConnectionsO!==S)}:b.state={...b.state,resources:[...E,S]},F.selectedNode.value=b}function $(b,d){if(d.type!=="passive")return!1;const S=d.state,{maxConnections:E,tools:O}=b.state;return O.includes(S)?!0:O.length!==E}function T(b,d){if(d.type!=="passive")return;const S=d.state,E=b.state.tools;E.includes(S)?b.state={...b.state,tools:E.filter(O=>O!==S)}:b.state={...b.state,tools:[...E,S]},F.selectedNode.value=b}const F=bl(b=>({startNodes:()=>[{position:{x:0,y:0},type:"mine",state:{progress:0,powered:!1}},{position:{x:0,y:-200},type:"brokenFactory"}],types:{mine:{shape:Be.Diamond,size:50,title:"\u{1FAA8}",label:d=>d===b.selectedNode.value?{text:"Mining"}:Object.keys(n.value).length===0?{text:"Click me!"}:null,actionDistance:Math.PI/4,actions:[y],progress:d=>j(d)?new l(d.state.progress).toNumber():0,progressDisplay:Bt.Outline,progressColor:"var(--accent2)",classes:d=>({running:j(d)}),draggable:!0},brokenFactory:{shape:Be.Diamond,size:50,title:"\u{1F6E0}\uFE0F",label:d=>d===b.selectedNode.value?{text:"Broken Forge"}:null,actionDistance:Math.PI/4,actions:[{id:"repair",icon:"build",tooltip:{text:"Repair - 100 energy"},onClick(d){l.gte(e.value,100)&&(d.type="factory",e.value=l.sub(e.value,100))},confirmationLabel:()=>l.gte(e.value,1e3)?{text:"Tap again to confirm"}:{text:"Cannot afford",color:"var(--danger)"}}],draggable:!0},factory:{shape:Be.Diamond,size:50,title:"\u{1F6E0}\uFE0F",label:d=>{var S,E;if(d===b.selectedNode.value)return{text:d.state==null?"Forge - Drag a resource to me!":`Forging ${xe[d.state].name}`};if(((S=b.draggingNode.value)==null?void 0:S.type)==="resource"){const O=((E=b.draggingNode.value)==null?void 0:E.state).type,te=d.state===O?"Disconnect":xe[O].name,$e=d.state===O||l.gte(e.value,xe[O].cost)&&i.value[O]==null?"var(--accent2)":"var(--danger)";return{text:te,color:$e}}return null},actionDistance:Math.PI/4,actions:[{id:"deselect",icon:"close",tooltip:{text:"Disconnect resource"},onClick(d){d.state=void 0,b.selectedAction.value=null,b.selectedNode.value=null},visibility:d=>d.state!=null},{id:"craft",icon:"done",tooltip:d=>({text:`Forge ${xe[d.state].name} - ${je(xe[d.state].cost)} energy`}),onClick(d){const S=xe[d.state];if(l.gte(e.value,S.cost)&&i.value[d.state]==null){e.value=l.sub(e.value,S.cost);const E={id:Gn(b),position:{...d.position},type:S.type,state:S.state};b.placeInAvailableSpace(E),b.nodes.value.push(E),b.selectedAction.value=null,b.selectedNode.value=null,d.state=void 0}},fillColor:d=>l.gte(e.value,xe[d.state].cost)&&i.value[d.state]==null?"var(--accent2)":"var(--danger)",visibility:d=>d.state!=null,confirmationLabel:d=>l.gte(e.value,xe[d.state].cost)?i.value[d.state]==null?{text:"Tap again to confirm"}:{text:"Already crafted",color:"var(--danger)"}:{text:"Cannot afford",color:"var(--danger)"}}],progress:d=>d.state==null||i.value[d.state]!=null?0:l.div(e.value,xe[d.state].cost).clampMax(1).toNumber(),progressDisplay:Bt.Fill,progressColor:d=>d.state!=null&&l.gte(e.value,xe[d.state].cost)?"var(--accent2)":"var(--foreground)",canAccept(d,S){return S.type==="resource"},onDrop(d,S){const E=S.state.type;d.state===E?d.state=void 0:d.state=E,b.selectedNode.value=d},draggable:!0},resource:{shape:Be.Circle,size:50,title:d=>Ke(d.state.type),subtitle:d=>je(d.state.amount),progress:d=>a(d.state.type),onClick(){},progressDisplay:Bt.Outline,progressColor:"var(--accent3)",classes:d=>{var S;return{"affected-node":X.value!=null&&j(X.value)&&X.value.state.resources.includes(d.state.type)||l.neq((S=Fe.value[d.state.type])!=null?S:1,1)}},draggable:!0},passive:{shape:Be.Circle,size:50,title:d=>xe[d.state].name,label:d=>d===b.selectedNode.value?{text:ki[d.state].description(H.value!=null&&j(H.value)&&H.value.state.tools.includes(d.state))}:null,outlineColor:"var(--bought)",classes:d=>({"affected-node":H.value!=null&&j(H.value)&&H.value.state.tools.includes(d.state)}),draggable:!0},dowsing:{shape:Be.Diamond,size:50,title:"\u{1F962}",label:d=>d===b.selectedNode.value?{text:d.state.resources.length===0?"Dowsing - Drag a resource to me!":`Dowsing (${d.state.resources.length}/${d.state.maxConnections})`}:w(d,S=>`Double ${S} odds`),actionDistance:Math.PI/4,actions:[g,N(d=>d.add(2).pow_base(100),16),y],classes:d=>({running:j(d)}),canAccept:x,onDrop:q,draggable:!0},quarry:{shape:Be.Diamond,size:50,title:"\u26CF\uFE0F",label:d=>d===b.selectedNode.value?{text:d.state.resources.length===0?"Quarry - Drag a resource to me!":`Quarrying (${d.state.resources.length}/${d.state.maxConnections})`}:w(d,S=>`Gather ${jt(l.div(Ve[S].computedModifier.value,100))} ${S}/s`),actionDistance:Math.PI/4,actions:[g,N(d=>d.add(2).pow_base(1e4),16),y],progress:d=>j(d)?l.eq(h.value,0)?0:new l(d.state.progress).div(h.value).toNumber():0,progressDisplay:Bt.Outline,progressColor:"var(--accent2)",canAccept:x,onDrop:q,classes:d=>({running:j(d)}),draggable:!0},empowerer:{shape:Be.Diamond,size:50,title:"\u{1F50C}",label:d=>d===b.selectedNode.value?{text:d.state.tools.length===0?"Empowerer - Drag a tool to me!":`Empowering (${d.state.tools.length}/${d.state.maxConnections})`}:_(d,S=>`Double ${xe[S].name}'s effect`),actionDistance:Math.PI/4,actions:[g,N(d=>d.add(3).pow_base(1e3),16),y],canAccept:$,onDrop:T,classes:d=>({running:j(d)}),draggable:!0},portalGenerator:{shape:Be.Diamond,size:50,title:"\u26E9\uFE0F",label:d=>{var S,E;if(d===b.selectedNode.value)return{text:d.state.tier==null?"Portal Spawner - Drag a resource to me!":`Spawning ${d.state.tier}-tier portal`};if(((S=b.draggingNode.value)==null?void 0:S.type)==="resource"){const O=((E=b.draggingNode.value)==null?void 0:E.state).type;return{text:d.state.tier===O?"Disconnect":`${Ke(O)}-tier Portal`,color:"var(--accent2)"}}return null},actionDistance:Math.PI/4,actions:[{id:"deselect",icon:"close",tooltip:{text:"Disconnect all"},onClick(d){d.state={...d.state,tier:void 0,influences:[]},b.selectedAction.value=null,b.selectedNode.value=null},visibility:d=>{const{tier:S,influences:E}=d.state;return S!=null||E.length>0}},{id:"makePortal",icon:"done",tooltip:d=>({text:`Spawn ${d.state.tier}-tier portal`}),onClick(d){let S=0;for(;`portal-${S}`in ye;)S++;ri(Xi(`portal-${S}`,d.state.tier,Math.floor(Math.random()*4294967296)),J);const E={id:Gn(b),position:{...d.position},type:"portal",state:{id:`portal-${S}`,powered:!1}};b.placeInAvailableSpace(E),b.nodes.value.push(E),b.selectedAction.value=null,b.selectedNode.value=null,d.state={tier:void 0,influences:[]}},visibility:d=>d.state.tier!=null}],canAccept(d,S){return S.type==="resource"||S.type==="influence"},onDrop(d,S){if(S.type==="resource"){const E=S.state.type,O=d.state.tier;d.state={...d.state,tier:E===O?void 0:E}}else if(S.type==="influence"){const E=S.state,O=d.state.influences;O.includes(E)?d.state={...d.state,influences:O.filter(te=>te!==E)}:d.state={...d.state,influences:[...O,E]}}b.selectedNode.value=d},draggable:!0},portal:{shape:Be.Diamond,size:50,title:"\u{1F300}",label:d=>d===b.selectedNode.value?{text:`Portal to ${ye[d.state.id].name}`,color:ye[d.state.id].color}:null,actionDistance:Math.PI/4,actions:[y],classes:d=>({running:j(d),showNotif:ye[d.state.id].showNotif.value}),outlineColor:d=>ye[d.state.id].background,draggable:!0}},style:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"},links(){const d=[];return d.push(...Object.keys(u).map(S=>({startNode:ie.value,endNode:n.value[S],stroke:"var(--accent3)",strokeWidth:5}))),ae.value!=null&&ae.value.state!=null&&d.push({startNode:ae.value,endNode:n.value[ae.value.state],stroke:"var(--foreground)",strokeWidth:4}),X.value!=null&&X.value.state.resources.forEach(S=>{d.push({startNode:X.value,endNode:n.value[S],stroke:j(X.value)?"var(--accent1)":"var(--foreground)",strokeWidth:4})}),Ee.value!=null&&Ee.value.state.resources.forEach(S=>{d.push({startNode:Ee.value,endNode:n.value[S],stroke:"var(--foreground)",strokeWidth:4})}),d.push(...Object.keys(o).map(S=>({startNode:Ee.value,endNode:n.value[S],stroke:"var(--accent3)",strokeWidth:5}))),H.value!=null&&H.value.state.tools.forEach(S=>{d.push({startNode:H.value,endNode:i.value[S],stroke:j(H.value)?"var(--accent1)":"var(--foreground)",strokeWidth:4})}),Z.value!=null&&(Z.value.state.tier!=null&&d.push({startNode:Z.value,endNode:n.value[Z.value.state.tier],stroke:"var(--foreground)",strokeWidth:4}),b.types.portal.nodes.value.forEach(S=>{const E=ye[S.state.id];return E.links.value.forEach(O=>{O.value!=null&&d.push({startNode:S,endNode:O.value,stroke:j(S)?"var(--accent3)":"var(--foreground)",strokeWidth:4})}),Object.keys(E.resourceMultis.value).forEach(O=>{O!=="energy"&&O in n.value&&d.push({startNode:S,endNode:n.value[O],stroke:j(S)?"var(--accent1)":"var(--foreground)",strokeWidth:4})}),d})),d}}));function j(b){return b===F.selectedNode.value||b.state.powered}const ie=I(()=>F.types.mine.nodes.value[0]),ae=I(()=>F.types.factory.nodes.value[0]),X=I(()=>i.value.sand),Ee=I(()=>i.value.wood),H=I(()=>i.value.coal),Z=I(()=>i.value.iron);function pe(b,d){let S=n.value[b];if(d=l.times(d,Ct[b].computedModifier.value),S==null)S={id:Gn(F),position:{...ie.value.position},type:"resource",state:{type:b,amount:d}},F.placeInAvailableSpace(S),F.nodes.value.push(S);else{const E=S.state;S.state={...E,amount:l.add(E.amount,d)}}}const qe=I(()=>Object.keys(Xe).reduce((b,d)=>b+new l(Ve[d].computedModifier.value).toNumber(),0)),Fe=I(()=>{const b={};return F.types.portal.nodes.value.forEach(d=>{if(!j(d))return;const E=ye[d.state.id].resourceMultis.value;Object.keys(E).forEach(O=>{b[O]!=null?b[O]=l.times(b[O],E[O]):b[O]=E[O]})}),b}),Dt=qt(()=>[...St.map(b=>ct(()=>({description:()=>`${Ke(b)} (Lv. ${je(r.value[b])}) (${jt(Yt.value)}x per level)`,multiplier:()=>l.pow(Yt.value,r.value[b]),enabled:()=>{var d,S;return b in n.value&&l.gt((S=(d=n.value[b].state)==null?void 0:d.amount)!=null?S:0,0)}}))),ct(()=>({multiplier:()=>H.value!=null&&j(H.value)&&H.value.state.tools.includes("stone")?4:2,description:()=>(H.value!=null&&j(H.value)&&H.value.state.tools.includes("stone")?"Empowered ":"")+xe.stone.name,enabled:()=>i.value.stone!=null})),ct(()=>({multiplier:()=>{var b;return(b=Fe.value.energy)!=null?b:1},description:"Planar Treasures",enabled:()=>{var b;return l.neq((b=Fe.value.energy)!=null?b:1,1)}})),pn(()=>({addend:()=>l.pow(100,c.value).div(10).neg(),description:"Powered Machines (100^n/10 energy/s)",enabled:()=>l.gt(c.value,0)}))]),Ie=I(()=>Dt.apply(1)),_n=qt(()=>[ct(()=>({multiplier:()=>H.value!=null&&j(H.value)&&H.value.state.tools.includes("dirt")?4:2,description:()=>(H.value!=null&&j(H.value)&&H.value.state.tools.includes("dirt")?"Empowered ":"")+xe.dirt.name,enabled:()=>i.value.dirt!=null}))]),Y=I(()=>_n.apply(1)),U=qt(()=>[ct(()=>({multiplier:()=>H.value!=null&&j(H.value)&&H.value.state.tools.includes("gravel")?4:2,description:()=>(H.value!=null&&j(H.value)&&H.value.state.tools.includes("gravel")?"Empowered ":"")+xe.gravel.name,enabled:()=>i.value.gravel!=null}))]),Ze=I(()=>U.apply(1)),Zt=qt(()=>[pn(()=>({addend:()=>H.value!=null&&j(H.value)&&H.value.state.tools.includes("copper")?.002:.001,description:()=>(H.value!=null&&j(H.value)&&H.value.state.tools.includes("copper")?"Empowered ":"")+xe.copper.name,enabled:()=>i.value.copper!=null}))]),Yt=I(()=>Zt.apply(1.01)),Ve=Object.keys(Xe).reduce((b,d)=>{const S=qt(()=>[ct(()=>({multiplier:2,description:"Dowsing",enabled:()=>X.value!=null&&j(X.value)&&X.value.state.resources.includes(d)}))]),E=I(()=>S.apply(Xe[d])),O={title:`${Ke(d)} Drop Rate`,modifier:S,base:Xe[d]};return b[d]={modifier:S,computedModifier:E,section:O},b},{}),Ct=Object.keys(Xe).reduce((b,d)=>{const S=qt(()=>[ct(()=>({multiplier:()=>{var te;return(te=Fe.value[d])!=null?te:1},description:"Planar Treasures",enabled:()=>{var te;return l.neq((te=Fe.value[d])!=null?te:1,1)}}))]),E=I(()=>S.apply(1)),O={title:`${Ke(d)} Gain`,modifier:S};return b[d]={modifier:S,computedModifier:E,section:O},b},{}),[Nn,Cn]=gn(()=>[{title:"Energy Gain",modifier:Dt,base:1,unit:"/s"}]),[Le,ln]=gn(()=>[{title:"Mining Speed",modifier:_n,base:1,unit:"/s",visible:()=>i.value.dirt!=null},{title:"Ore Dropped",modifier:U,base:1,visible:()=>i.value.gravel!=null},{title:"Material Level Effect",modifier:Zt,base:1.01,visible:()=>i.value.copper!=null}]),[Ft,Bn]=gn(()=>Object.values(Ve).map(b=>b.section)),[un,Jt]=gn(()=>Object.values(Ct).map(b=>b.section)),kt=Il({general:()=>({display:"Energy",glowColor(){return kt.activeTab.value===this.tab?"white":""},tab:Nn,energyTabCollapsed:Cn}),mining:()=>({display:"Mine",glowColor(){return kt.activeTab.value===this.tab?"white":""},visibility:()=>Object.keys(i.value).length>0,tab:Le,miningTabCollapsed:ln}),resources:()=>({display:"Mine Rates",glowColor(){return kt.activeTab.value===this.tab?"white":""},visibility:()=>X.value!=null,tab:Ft,resourcesCollapsed:Bn}),resourcesGain:()=>({display:"Resource Gain",glowColor(){return kt.activeTab.value===this.tab?"white":""},visibility:()=>Object.values(Ct).some(b=>l.neq(b.computedModifier.value,1)),tab:un,resourceGainCollapsed:Jt})}),pt=L(!1),mt=ne(()=>p(_t,{modelValue:pt.value,"onUpdate:modelValue":b=>pt.value=b},{header:()=>p("h2",null,[V("Modifiers")]),body:()=>Ue(kt)}));this.on("preUpdate",b=>{if(Object.keys(u).forEach(d=>{u[d]-=b,u[d]<=0&&delete u[d]}),Object.keys(o).forEach(d=>{o[d]-=b,o[d]<=0&&delete o[d]}),j(ie.value)){const d=l.add(ie.value.state.progress,l.times(Y.value,b)),S=d.floor();ie.value.state={...ie.value.state,progress:l.sub(d,S)};const E=S.div(qe.value).floor();E.gt(0)&&St.forEach(te=>{pe(te,l.times(new l(Ve[te].computedModifier.value).toNumber(),E).times(Ze.value)),u[te]=.3});const O=l.sub(S,E).toNumber();for(let te=0;te0){let E=l.add(d,b);const O=l.div(d,h.value).floor();E=l.sub(E,l.times(O,h.value)),Ee.value.state={...Ee.value.state,progress:E},l.gt(O,0)&&S.forEach(te=>{pe(te,O),o[te]=.3})}}e.value=l.add(e.value,l.times(Ie.value,b)),l.lt(e.value,0)&&(e.value=0,ie.value.state={...ie.value.state,powered:!1},Ci.warning(p("div",null,[p("h3",null,[V("Ran out of energy!")]),p("div",null,[V("All machines have been turned off.")])])))});const Ye=I(()=>{var b,d;return F.selectedAction.value===F.types.brokenFactory.actions[0]?-100:F.selectedAction.value===F.types.factory.actions[1]?l.neg(xe[F.selectedNode.value.state].cost):((b=F.selectedAction.value)==null?void 0:b.id)==="moreConnections"?l.neg(F.selectedAction.value.formula.evaluate(((d=F.selectedNode.value)==null?void 0:d.state).maxConnections)):0}),Kt=Dn(m.variable(0).add(e),()=>l.neq(Ye.value,0),Ye),Xt=I(()=>{var b;return F.selectedAction.value===y?((b=F.selectedNode.value)==null?void 0:b.state).powered?l.eq(c.value,1)?10:l.pow(100,c.value).div(10).times(.99):l.neg(f.value):0}),vt=Dn(m.variable(0).add(Ie),()=>l.neq(Xt.value,0),Xt),rt=I(()=>F.types.portal.nodes.value.filter(b=>j(b)));return nt(rt,b=>{yt(()=>{J.tabs=["main",...b.map(d=>d.state.id)]})}),{name:"World",board:F,energy:e,modifierTabs:kt,mineLootTable:Xe,tools:xe,passives:ki,resourceNodes:n,toolNodes:i,grantResource:pe,activePortals:rt,display:ne(()=>p(le,null,[p(Pn,{class:"nav-container"},{default:()=>[p("span",{class:"nav-segment"},[p("h2",{style:"color: white; text-shadow: 0px 0px 10px white;"},[Ue(Kt)])," ",V("energy")]),p("span",{class:"nav-segment"},[V("("),p("h3",{style:"color: white; text-shadow: 0px 0px 10px white;"},[l.gt(Ie.value,0)?"+":"",Ue(vt)]),V("/s)")]),l.gt(c.value,0)?p("span",{class:"nav-segment"},[p("h3",{style:"color: var(--accent1); text-shadow: 0px 0px 10px var(--accent1);"},[je(c.value)])," ",V("machines powered")]):null,p("span",{class:"nav-segment"},[p("button",{class:"button",style:"display: inline",onClick:()=>pt.value=!0},[V("open modifiers")])]),J.devSpeed===0?p("span",{class:"nav-segment"},[V("Game Paused")]):J.devSpeed!=null&&J.devSpeed!==1?p("span",{class:"nav-segment"},[V("Dev Speed: "),jt(J.devSpeed),V("x")]):null]}),Ue(F),Ue(mt)]))}}),Ac=e=>{var i,r,a,u;const t=[Vt];let n=0;for(;`portal-${n}`in((i=e.layers)!=null?i:{});){const o=(r=e.layers)==null?void 0:r[`portal-${n}`];t.push(Xi(`portal-${n}`,(a=o.tier)!=null?a:"dirt",(u=o.seed)!=null?u:Math.floor(Math.random()*4294967296))),n++}return t},Qi=I(()=>!1);function qc(e,t){}var Vc=Object.freeze(Object.defineProperty({__proto__:null,mineLootTable:Xe,resourceNames:St,main:Vt,getInitialLayers:Ac,hasWon:Qi,fixOldSave:qc},Symbol.toStringTag,{value:"Module"}));const wn=e=>(Gt("data-v-4a50ce42"),e=e(),Wt(),e),Rc={class:"game-over-modal-header"},Lc=["src","alt"],Bc={class:"game-over-modal-title"},jc=wn(()=>C("h2",null,"Congratulations!",-1)),zc={key:0},Uc=wn(()=>C("br",null,null,-1)),Gc=wn(()=>C("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Wc=wn(()=>C("br",null,null,-1)),Hc=["href"],Zc=wn(()=>C("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),Yc=K({__name:"GameOverScreen",setup(e){const{title:t,logo:n,discordName:i,discordLink:r,versionNumber:a,versionTitle:u}=de,o=I(()=>On(J.timePlayed)),c=I(()=>Qi.value&&!J.keepGoing),f=Pt(J,"autosave");function h(){J.keepGoing=!0}function g(){Rt(en())}return(y,N)=>(M(),ee(_t,{"model-value":s(c)},{header:z(()=>[C("div",Rc,[s(n)?(M(),P("img",{key:0,class:"game-over-modal-logo",src:s(n),alt:s(t)},null,8,Lc)):B("",!0),C("div",Bc,[jc,C("h4",null,"You've beaten "+re(s(t))+" v"+re(s(a))+": "+re(s(u)),1)])])]),body:z(({shown:w})=>[w?(M(),P("div",zc,[C("div",null,"It took you "+re(s(o))+" to beat the game.",1),Uc,Gc,Wc,C("div",null,[C("a",{href:s(r),class:"game-over-modal-discord-link"},[Zc,V(" "+re(s(i)),1)],8,Hc)]),p(ht,{title:"Autosave",modelValue:s(f),"onUpdate:modelValue":N[0]||(N[0]=_=>ke(f)?f.value=_:null)},null,8,["modelValue"])])):B("",!0)]),footer:z(()=>[C("div",{class:"game-over-footer"},[C("button",{onClick:h,class:"button"},"Keep Going"),C("button",{onClick:g,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var Jc=fe(Yc,[["__scopeId","data-v-4a50ce42"]]);const Ln=e=>(Gt("data-v-2776d67d"),e=e(),Wt(),e),Kc=Ln(()=>C("div",{class:"nan-modal-header"},[C("h2",null,"NaN value detected!")],-1)),Xc={key:0},Qc=Ln(()=>C("br",null,null,-1)),ed=["href"],td=Ln(()=>C("span",{class:"material-icons nan-modal-discord"},"discord",-1)),nd=Ln(()=>C("br",null,null,-1)),id={class:"nan-footer"},rd=K({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:n}=de,i=L(!0),r=L(!0),a=Pt(Me,"hasNaN"),u=L(null);nt(a,y=>{y?(i.value=J.autosave,r.value=J.devSpeed===0):(J.autosave=i.value,J.devSpeed=r.value?0:null)});const o=I(()=>{var y;return(y=Me.NaNPath)==null?void 0:y.join(".")}),c=I(()=>Me.NaNPersistent!=null?Me.NaNPersistent.value:null);function f(){Me.NaNPersistent!=null&&(Me.NaNPersistent.value=new l(0),Me.hasNaN=!1)}function h(){Me.NaNPersistent&&(Me.NaNPersistent.value=new l(1),Me.hasNaN=!1)}function g(){Me.NaNPersistent&&(Me.NaNPersistent.value=new l(NaN),Me.hasNaN=!1)}return(y,N)=>(M(),P(le,null,[p(_t,wt({modelValue:s(a),"onUpdate:modelValue":N[4]||(N[4]=w=>ke(a)?a.value=w:null)},y.$attrs),{header:z(()=>[Kc]),body:z(()=>[C("div",null,[V(' Attempted to assign "'+re(s(o))+'" to NaN',1),s(c)?(M(),P("span",Xc,re(" ")+"(previously "+re(s(jt)(s(c)))+")",1)):B("",!0),V(". Auto-saving has been "+re(i.value?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),Qc,C("div",null,[C("a",{href:s(n)||"https://discord.gg/yJ4fjnjU54",class:"nan-modal-discord-link"},[td,V(" "+re(s(t)||"The Paper Pilot Community"),1)],8,ed)]),nd,p(ht,{title:"Autosave",modelValue:i.value,"onUpdate:modelValue":N[0]||(N[0]=w=>i.value=w)},null,8,["modelValue"]),s(de).enablePausing?(M(),ee(ht,{key:0,title:"Pause game",modelValue:r.value,"onUpdate:modelValue":N[1]||(N[1]=w=>r.value=w)},null,8,["modelValue"])):B("",!0)]),footer:z(()=>[C("div",id,[C("button",{onClick:N[2]||(N[2]=w=>{var _;return(_=u.value)==null?void 0:_.open()}),class:"button"},"Open Saves Manager"),C("button",{onClick:f,class:"button"},"Set to 0"),C("button",{onClick:h,class:"button"},"Set to 1"),s(c)&&s(l).neq(s(c),0)&&s(l).neq(s(c),1)?(M(),P("button",{key:0,onClick:N[3]||(N[3]=w=>a.value=!1),class:"button"}," Set to previous ")):B("",!0),C("button",{onClick:g,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),p(Ui,{ref_key:"savesManager",ref:u},null,512)],64))}});var ad=fe(rd,[["__scopeId","data-v-2776d67d"]]);const sd={key:0,class:"tpsDisplay"},od={key:0,class:"low"},ld=K({__name:"TPS",setup(e){const t=I(()=>l.div(Me.lastTenTicks.length,Me.lastTenTicks.reduce((a,u)=>a+u,0))),n=L([]);Qe(()=>{n.value.push(Math.round(t.value.toNumber())),n.value.length>10&&(n.value=n.value.slice(1))});const i=I(()=>n.value.reduce((a,u)=>l.max(a,u),0)),r=I(()=>l.sub(t.value,i.value).gt(1));return(a,u)=>s(t).isNan()?B("",!0):(M(),P("div",sd,[V(" TPS: "+re(s(je)(s(t)))+" ",1),p(nn,{name:"fade"},{default:z(()=>[s(r)?(M(),P("span",od,re(s(je)(s(i))),1)):B("",!0)]),_:1})]))}});var ud=fe(ld,[["__scopeId","data-v-46a3ed5b"]]);var cd=K({__name:"App",setup(e){const t=de.useHeader,n=I(()=>at[se.theme].variables),i=Pt(se,"showTPS"),r=I(()=>oe(ne(()=>p(le,null,[Ca.map(Ue)]))));return(a,u)=>(M(),P(le,null,[C("div",{id:"modal-root",style:Oe(s(n))},null,4),C("div",{class:ge(["app",{useHeader:s(t)}]),style:Oe(s(n))},[s(t)?(M(),ee(Gi,{key:0})):B("",!0),p(Lo),s(s(i))?(M(),ee(ud,{key:1})):B("",!0),p(Jc),p(ad),(M(),ee(De(s(r))))],6)],64))}});var dd=fe(cd,[["__scopeId","data-v-41d15e5e"]]);function fd(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:i,onRegistered:r,onRegisteredSW:a,onRegisterError:u}=e;let o,c,f,h;const g=async(N=!0)=>{await f,N&&(o==null||o.addEventListener("controlling",w=>{w.isUpdate&&window.location.reload()})),await(h==null?void 0:h())};async function y(){if("serviceWorker"in navigator){const{Workbox:N,messageSW:w}=await mn(()=>import("./workbox-window.4a8794bb.js"),[]);h=async()=>{c&&c.waiting&&await w(c.waiting,{type:"SKIP_WAITING"})},o=new N("./sw.js",{scope:"./",type:"classic"}),o.addEventListener("activated",_=>{_.isUpdate||i==null||i()});{const _=()=>{n==null||n()};o.addEventListener("waiting",_),o.addEventListener("externalwaiting",_)}o.register({immediate:t}).then(_=>{c=_,a?a("./sw.js",_):r==null||r(_)}).catch(_=>{u==null||u(_)})}}return f=y(),g}function gd(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:i,onRegistered:r,onRegisteredSW:a,onRegisterError:u}=e,o=L(!1),c=L(!1);return{updateServiceWorker:fd({immediate:t,onNeedRefresh(){o.value=!0,n==null||n()},onOfflineReady(){c.value=!0,i==null||i()},onRegistered:r,onRegisteredSW:a,onRegisterError:u}),offlineReady:c,needRefresh:o}}document.title=de.title;window.projInfo=de;if(de.id==="")throw new Error("Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json");requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c +Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await ha();const{globalBus:e}=await mn(()=>Promise.resolve().then(function(){return ma}),void 0),{startGameLoop:t}=await mn(()=>import("./gameLoop.bd6b5c0b.js"),["assets/gameLoop.bd6b5c0b.js","assets/@fontsource.f66d05e7.css","assets/vue.c16a309b.js","assets/amator.1e5a40c8.js","assets/bezier-easing.a990b400.js","assets/@vue.6b211d3c.js","assets/nanoevents.1080beb7.js","assets/lz-string.dccec454.js","assets/vue-next-select.ded54c4a.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.1879de79.js","assets/sortablejs.a0f68e5e.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-panzoom.8ce6f9b1.js","assets/panzoom.30c56ba6.js","assets/wheel.f2ae740f.js","assets/ngraph.events.083734c6.js","assets/vue-toastification.9c2dad53.js","assets/vue-toastification.4b5f8ac8.css","assets/unique-names-generator.5494b30b.js"]),n=window.vue=lr(dd);e.emit("setupVue",n),n.mount("#app"),yt(()=>{const i=Kn(),{updateServiceWorker:r}=gd({onNeedRefresh(){i.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){r()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(a){a&&setInterval(()=>a.update(),60*60*1e3)}})}),t()});export{l as D,mn as _,Me as a,de as b,Vc as c,Ae as g,ba as l,J as p,se as s}; diff --git a/index.html b/index.html index c7e5e2d..b722ebe 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ Profectus - + diff --git a/sw.js b/sw.js index 258b539..0d341aa 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let a={};const o=e=>i(e,r),u={module:{uri:r},exports:a,require:o};s[r]=Promise.all(n.map((e=>u[e]||o(e)))).then((e=>(l(...e),a)))}}define(["./workbox-7369c0e1"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"assets/@fontsource.f66d05e7.css",revision:null},{url:"assets/@vue.6b211d3c.js",revision:null},{url:"assets/amator.1e5a40c8.js",revision:null},{url:"assets/bezier-easing.a990b400.js",revision:null},{url:"assets/gameLoop.7304201e.js",revision:null},{url:"assets/index.13ad3786.js",revision:null},{url:"assets/index.83961fb5.css",revision:null},{url:"assets/lz-string.dccec454.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/ngraph.events.083734c6.js",revision:null},{url:"assets/panzoom.30c56ba6.js",revision:null},{url:"assets/sortablejs.a0f68e5e.js",revision:null},{url:"assets/unique-names-generator.5494b30b.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.ded54c4a.js",revision:null},{url:"assets/vue-panzoom.8ce6f9b1.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.9c2dad53.js",revision:null},{url:"assets/vue.c16a309b.js",revision:null},{url:"assets/vuedraggable.1879de79.js",revision:null},{url:"assets/wheel.f2ae740f.js",revision:null},{url:"assets/workbox-window.4a8794bb.js",revision:null},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"favicon.svg",revision:"c8dd2748f1fedd25449164d7dda6aecb"},{url:"index.html",revision:"3be6cb71a8fa4353533a9dcfb0aa9ff2"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"e1e419fec40e2d042566c11fe4bce322"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let a={};const o=e=>i(e,r),u={module:{uri:r},exports:a,require:o};s[r]=Promise.all(n.map((e=>u[e]||o(e)))).then((e=>(l(...e),a)))}}define(["./workbox-7369c0e1"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"assets/@fontsource.f66d05e7.css",revision:null},{url:"assets/@vue.6b211d3c.js",revision:null},{url:"assets/amator.1e5a40c8.js",revision:null},{url:"assets/bezier-easing.a990b400.js",revision:null},{url:"assets/gameLoop.bd6b5c0b.js",revision:null},{url:"assets/index.83961fb5.css",revision:null},{url:"assets/index.86288ff3.js",revision:null},{url:"assets/lz-string.dccec454.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/ngraph.events.083734c6.js",revision:null},{url:"assets/panzoom.30c56ba6.js",revision:null},{url:"assets/sortablejs.a0f68e5e.js",revision:null},{url:"assets/unique-names-generator.5494b30b.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.ded54c4a.js",revision:null},{url:"assets/vue-panzoom.8ce6f9b1.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.9c2dad53.js",revision:null},{url:"assets/vue.c16a309b.js",revision:null},{url:"assets/vuedraggable.1879de79.js",revision:null},{url:"assets/wheel.f2ae740f.js",revision:null},{url:"assets/workbox-window.4a8794bb.js",revision:null},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"favicon.svg",revision:"c8dd2748f1fedd25449164d7dda6aecb"},{url:"index.html",revision:"095290ce1babe088d78bf74b9394c0c3"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"e1e419fec40e2d042566c11fe4bce322"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));