giant freakin documentation and reorganization pass, it also uses cmake because all the building was getting too complicated for shell scripts

This commit is contained in:
nicole committed 2025-09-29 20:31:42 -07:00
1 parent a5f837189b
commit 0edb4b50d2
71 files changed
+4895 -127

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uri name="seagull:rules/items" uri="items.xsd" />
<uri name="seagull:rules/upgrades" uri="upgrades.xsd" />
</catalog>
+36
View File
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="seagull:rules/items">
<xs:element name="ItemRules">
<xs:complexType>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="Food">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:int" name="Min"/>
<xs:element type="xs:int" name="Max"/>
</xs:sequence>
<xs:attribute type="xs:int" name="StoryBeat" use="optional" default="0"/>
</xs:complexType>
</xs:element>
<xs:element name="Shinies">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:int" name="Min"/>
<xs:element type="xs:int" name="Max"/>
</xs:sequence>
<xs:attribute type="xs:int" name="StoryBeat" use="optional" default="0"/>
</xs:complexType>
</xs:element>
<xs:element name="Psi">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:int" name="Min"/>
<xs:element type="xs:int" name="Max"/>
</xs:sequence>
<xs:attribute type="xs:int" name="StoryBeat" default="0"/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
+47
View File
@@ -0,0 +1,47 @@
<?xml version="1.0" standalone="yes"?>
<xs:schema id="UpgradeRules" targetNamespace="seagull:rules/upgrades" xmlns="seagull:rules/upgrades" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" attributeFormDefault="unqualified" elementFormDefault="qualified">
<xs:element name="UpgradeRules">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="TreeData" maxOccurs="1">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Name" maxOccurs="1" type="xs:string" />
<xs:element name="PrimaryColor" maxOccurs="1" type="xs:string" />
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="Upgrade">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Id" type="xs:string" minOccurs="1" maxOccurs="1" />
<xs:element name="Name" type="xs:string" minOccurs="1" maxOccurs="1" />
<xs:element name="Desc" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="Modifiers" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Mod" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="Id" form="unqualified" type="xs:string" />
<xs:attribute name="Name" form="unqualified" type="xs:string" />
<xs:attribute name="Speed" form="unqualified" type="xs:int" />
<xs:attribute name="ChanceSteal" form="unqualified" type="xs:int" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Requirements" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="Require" maxOccurs="unbounded" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
@@ -0,0 +1,5 @@
function structuredClone(val) {
var output = JSON.parse(JSON.stringify(val));
if (window.pywebview.api.debug_mode) { console.log(("structuredClone:" + val) + " => " + outval); }
return output;
}
+164
View File
@@ -0,0 +1,164 @@
/*
* Konami-JS ~
* :: Now with support for touch events and multiple instances for
* :: those situations that call for multiple easter eggs!
* Code: https://github.com/georgemandis/konami-js
* Copyright (c) 2009 George Mandis (https://george.mand.is)
* Version: 1.7.0 (09/03/2024)
* Licensed under the MIT License (http://opensource.org/licenses/MIT)
* Tested in: Safari 4+, Google Chrome 4+, Firefox 3+, IE7+, Mobile Safari 2.2.1+ and Android
*/
var Konami = function (callback) {
var konami = {
addEvent: function (obj, type, fn, ref_obj) {
if (obj.addEventListener) obj.addEventListener(type, fn, false);
else if (obj.attachEvent) {
// IE
obj["e" + type + fn] = fn;
obj[type + fn] = function () {
obj["e" + type + fn](window.event, ref_obj);
};
obj.attachEvent("on" + type, obj[type + fn]);
}
},
removeEvent: function (obj, eventName, eventCallback) {
if (obj.removeEventListener) {
obj.removeEventListener(eventName, eventCallback);
} else if (obj.attachEvent) {
obj.detachEvent(eventName);
}
},
input: "",
pattern: "38384040373937396665",
keydownHandler: function (e, ref_obj) {
if (ref_obj) {
konami = ref_obj;
} // IE
konami.input += e ? e.keyCode : event.keyCode;
if (konami.input.length > konami.pattern.length) {
konami.input = konami.input.substr(
konami.input.length - konami.pattern.length,
);
}
if (konami.input === konami.pattern) {
konami.code(konami._currentLink);
konami.input = "";
e.preventDefault();
return false;
}
},
load: function (link) {
this._currentLink = link;
this.addEvent(document, "keydown", this.keydownHandler, this);
this.iphone.load(link);
},
unload: function () {
this.removeEvent(document, "keydown", this.keydownHandler);
this.iphone.unload();
},
code: function (link) {
window.location = link;
},
iphone: {
start_x: 0,
start_y: 0,
stop_x: 0,
stop_y: 0,
tap: false,
capture: false,
orig_keys: "",
keys: [
"UP",
"UP",
"DOWN",
"DOWN",
"LEFT",
"RIGHT",
"LEFT",
"RIGHT",
"TAP",
"TAP",
],
input: [],
code: function (link) {
konami.code(link);
},
touchmoveHandler: function (e) {
if (e.touches.length === 1 && konami.iphone.capture === true) {
var touch = e.touches[0];
konami.iphone.stop_x = touch.pageX;
konami.iphone.stop_y = touch.pageY;
konami.iphone.tap = false;
konami.iphone.capture = false;
}
},
touchendHandler: function () {
konami.iphone.input.push(konami.iphone.check_direction());
if (konami.iphone.input.length > konami.iphone.keys.length)
konami.iphone.input.shift();
if (konami.iphone.input.length === konami.iphone.keys.length) {
var match = true;
for (var i = 0; i < konami.iphone.keys.length; i++) {
if (konami.iphone.input[i] !== konami.iphone.keys[i]) {
match = false;
}
}
if (match) {
konami.iphone.code(konami._currentLink);
}
}
},
touchstartHandler: function (e) {
konami.iphone.start_x = e.changedTouches[0].pageX;
konami.iphone.start_y = e.changedTouches[0].pageY;
konami.iphone.tap = true;
konami.iphone.capture = true;
},
load: function (link) {
this.orig_keys = this.keys;
konami.addEvent(document, "touchmove", this.touchmoveHandler);
konami.addEvent(document, "touchend", this.touchendHandler, false);
konami.addEvent(document, "touchstart", this.touchstartHandler);
},
unload: function () {
konami.removeEvent(document, "touchmove", this.touchmoveHandler);
konami.removeEvent(document, "touchend", this.touchendHandler);
konami.removeEvent(document, "touchstart", this.touchstartHandler);
},
check_direction: function () {
var x_magnitude = Math.abs(this.start_x - this.stop_x);
var y_magnitude = Math.abs(this.start_y - this.stop_y);
var x = this.start_x - this.stop_x < 0 ? "RIGHT" : "LEFT";
var y = this.start_y - this.stop_y < 0 ? "DOWN" : "UP";
var result =
this.tap === true ? "TAP" : x_magnitude > y_magnitude ? x : y;
return result;
},
},
};
typeof callback === "string" && konami.load(callback);
if (typeof callback === "function") {
konami.code = callback;
konami.load();
}
return konami;
};
if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
module.exports = Konami;
} else {
if (typeof define === "function" && define.amd) {
define([], function () {
return Konami;
});
} else {
window.Konami = Konami;
}
}
+14
View File
@@ -0,0 +1,14 @@
import{a as ht}from"./chunks/mermaid.esm.min/chunk-4HFYJGYH.mjs";import{a as Yt}from"./chunks/mermaid.esm.min/chunk-ASAHGCDZ.mjs";import{a as Ut,b as qt}from"./chunks/mermaid.esm.min/chunk-F3RBCZRS.mjs";import{a as Bt}from"./chunks/mermaid.esm.min/chunk-W6CKT3PL.mjs";import"./chunks/mermaid.esm.min/chunk-TVVDRG3C.mjs";import"./chunks/mermaid.esm.min/chunk-RV6DXAHM.mjs";import"./chunks/mermaid.esm.min/chunk-EQI6KKA3.mjs";import"./chunks/mermaid.esm.min/chunk-LM6QDVU5.mjs";import"./chunks/mermaid.esm.min/chunk-5V7UUW6L.mjs";import{b as Ot,d as Pt}from"./chunks/mermaid.esm.min/chunk-GOL2OBWC.mjs";import{b as Vt,j as yt,l as $t,m as V,n as Nt,o as Ht}from"./chunks/mermaid.esm.min/chunk-EFRVIJHI.mjs";import"./chunks/mermaid.esm.min/chunk-THXVA4DE.mjs";import{$ as z,E as Ft,G as It,H as X,I as rt,J as W,K as _t,L as Gt,N as zt,a as St,aa as K,h as tt,k as ut,l as Mt,m as At,n as Tt,o as Dt,p as Ct,q as G,r as Rt,s as Y,u as kt,y as jt}from"./chunks/mermaid.esm.min/chunk-KXVH62NG.mjs";import{b as g,c as lt,h as k}from"./chunks/mermaid.esm.min/chunk-63GW7ZVL.mjs";import{d as xt}from"./chunks/mermaid.esm.min/chunk-IQQE2MEC.mjs";import"./chunks/mermaid.esm.min/chunk-A4ITRWGT.mjs";import{a as r}from"./chunks/mermaid.esm.min/chunk-GTKDMUJJ.mjs";var Pe=r(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),Fe=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/c4Diagram-Q5SP5FFD.mjs");return{id:"c4",diagram:t}},"loader"),Ie={id:"c4",detector:Pe,loader:Fe},Xt=Ie;var Wt="flowchart",_e=r((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),Ge=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/flowDiagram-UML6HZQP.mjs");return{id:Wt,diagram:t}},"loader"),ze={id:Wt,detector:_e,loader:Ge},Kt=ze;var Qt="flowchart-v2",Ve=r((t,e)=>e?.flowchart?.defaultRenderer==="dagre-d3"?!1:(e?.flowchart?.defaultRenderer==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)),"detector"),$e=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/flowDiagram-UML6HZQP.mjs");return{id:Qt,diagram:t}},"loader"),Ne={id:Qt,detector:Ve,loader:$e},Jt=Ne;var He=r(t=>/^\s*erDiagram/.test(t),"detector"),Ue=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/erDiagram-MBDK6S7D.mjs");return{id:"er",diagram:t}},"loader"),qe={id:"er",detector:He,loader:Ue},Zt=qe;var tr="gitGraph",Be=r(t=>/^\s*gitGraph/.test(t),"detector"),Ye=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/gitGraphDiagram-JCGM6PWI.mjs");return{id:tr,diagram:t}},"loader"),Xe={id:tr,detector:Be,loader:Ye},rr=Xe;var er="gantt",We=r(t=>/^\s*gantt/.test(t),"detector"),Ke=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/ganttDiagram-SAESIEWH.mjs");return{id:er,diagram:t}},"loader"),Qe={id:er,detector:We,loader:Ke},ar=Qe;var ir="info",Je=r(t=>/^\s*info/.test(t),"detector"),Ze=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/infoDiagram-GKI3LBYJ.mjs");return{id:ir,diagram:t}},"loader"),or={id:ir,detector:Je,loader:Ze};var ta=r(t=>/^\s*pie/.test(t),"detector"),ra=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/pieDiagram-QB62DFGK.mjs");return{id:"pie",diagram:t}},"loader"),nr={id:"pie",detector:ta,loader:ra};var sr="quadrantChart",ea=r(t=>/^\s*quadrantChart/.test(t),"detector"),aa=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/quadrantDiagram-AGVETKZM.mjs");return{id:sr,diagram:t}},"loader"),ia={id:sr,detector:ea,loader:aa},cr=ia;var mr="xychart",oa=r(t=>/^\s*xychart(-beta)?/.test(t),"detector"),na=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/xychartDiagram-6J6QOAP6.mjs");return{id:mr,diagram:t}},"loader"),sa={id:mr,detector:oa,loader:na},pr=sa;var dr="requirement",ca=r(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),ma=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/requirementDiagram-BJFPASL3.mjs");return{id:dr,diagram:t}},"loader"),pa={id:dr,detector:ca,loader:ma},fr=pa;var gr="sequence",da=r(t=>/^\s*sequenceDiagram/.test(t),"detector"),fa=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/sequenceDiagram-W4XLKSBU.mjs");return{id:gr,diagram:t}},"loader"),ga={id:gr,detector:da,loader:fa},lr=ga;var ur="class",la=r((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),ua=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/classDiagram-FKO7XAE5.mjs");return{id:ur,diagram:t}},"loader"),Da={id:ur,detector:la,loader:ua},Dr=Da;var yr="classDiagram",ya=r((t,e)=>/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),xa=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/classDiagram-v2-XZHHGUJO.mjs");return{id:yr,diagram:t}},"loader"),ha={id:yr,detector:ya,loader:xa},xr=ha;var hr="state",Ea=r((t,e)=>e?.state?.defaLine truncated
`);let i=Yt(e),o=i.append("g");i.attr("viewBox","0 0 2412 512"),Gt(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${a}`)},"draw"),Et={draw:Ca},Sr=Et;var Ra={db:{},renderer:Et,parser:{parse:r(()=>{},"parse")}},Mr=Ra;var Ar="flowchart-elk",ka=r((t,e={})=>/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),ja=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/flowDiagram-UML6HZQP.mjs");return{id:Ar,diagram:t}},"loader"),Oa={id:Ar,detector:ka,loader:ja},Tr=Oa;var Cr="timeline",Pa=r(t=>/^\s*timeline/.test(t),"detector"),Fa=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/timeline-definition-DZOEFOHF.mjs");return{id:Cr,diagram:t}},"loader"),Ia={id:Cr,detector:Pa,loader:Fa},Rr=Ia;var kr="mindmap",_a=r(t=>/^\s*mindmap/.test(t),"detector"),Ga=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/mindmap-definition-ZYHNXUZP.mjs");return{id:kr,diagram:t}},"loader"),za={id:kr,detector:_a,loader:Ga},jr=za;var Or="kanban",Va=r(t=>/^\s*kanban/.test(t),"detector"),$a=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/kanban-definition-D5DEDDHO.mjs");return{id:Or,diagram:t}},"loader"),Na={id:Or,detector:Va,loader:$a},Pr=Na;var Fr="sankey",Ha=r(t=>/^\s*sankey(-beta)?/.test(t),"detector"),Ua=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/sankeyDiagram-XSL23WO4.mjs");return{id:Fr,diagram:t}},"loader"),qa={id:Fr,detector:Ha,loader:Ua},Ir=qa;var _r="packet",Ba=r(t=>/^\s*packet(-beta)?/.test(t),"detector"),Ya=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/diagram-BZV4OSZQ.mjs");return{id:_r,diagram:t}},"loader"),Gr={id:_r,detector:Ba,loader:Ya};var zr="radar",Xa=r(t=>/^\s*radar-beta/.test(t),"detector"),Wa=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/diagram-DKYQLJNW.mjs");return{id:zr,diagram:t}},"loader"),Vr={id:zr,detector:Xa,loader:Wa};var $r="block",Ka=r(t=>/^\s*block(-beta)?/.test(t),"detector"),Qa=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/blockDiagram-BWRZOBD3.mjs");return{id:$r,diagram:t}},"loader"),Ja={id:$r,detector:Ka,loader:Qa},Nr=Ja;var Hr="architecture",Za=r(t=>/^\s*architecture/.test(t),"detector"),ti=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/architectureDiagram-4X3Z3J56.mjs");return{id:Hr,diagram:t}},"loader"),ri={id:Hr,detector:Za,loader:ti},Ur=ri;var qr="treemap",ei=r(t=>/^\s*treemap/.test(t),"detector"),ai=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/diagram-LL6QPXA2.mjs");return{id:qr,diagram:t}},"loader"),Br={id:qr,detector:ei,loader:ai};var Yr=!1,$=r(()=>{Yr||(Yr=!0,z("error",Mr,t=>t.toLowerCase().trim()==="error"),z("---",{db:{clear:r(()=>{},"clear")},styles:{},renderer:{draw:r(()=>{},"draw")},parser:{parse:r(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter Line truncated
`;try{K(o)}catch{let l=_t(o);if(!l)throw new It(`Diagram ${o} not found.`);let{id:y,diagram:p}=await l();z(y,p)}let{db:n,parser:m,renderer:s,init:c}=K(o);return m.parser&&(m.parser.yy=n),n.clear?.(),c?.(i),a.title&&n.setDiagramTitle?.(a.title),await m.parse(e),new t(o,e,n,m,s)}async render(e,a){await this.renderer.draw(this.text,e,a,this)}getParser(){return this.parser}getType(){return this.type}};var De=[];var ye=r(()=>{De.forEach(t=>{t()}),De=[]},"attachFunctions");var xe=r(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function he(t){let e=t.match(Ft);if(!e)return{text:t,metadata:{}};let a=qt(e[1],{schema:Ut})??{};a=typeof a=="object"&&!Array.isArray(a)?a:{};let i={};return a.displayMode&&(i.displayMode=a.displayMode.toString()),a.title&&(i.title=a.title.toString()),a.config&&(i.config=a.config),{text:t.slice(e[0].length),metadata:i}}r(he,"extractFrontMatter");var si=r(t=>t.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(e,a,i)=>"<"+a+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),ci=r(t=>{let{text:e,metadata:a}=he(t),{displayMode:i,title:o,config:n={}}=a;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:o,config:n,text:e}},"processFrontmatter"),mi=r(t=>{let e=V.detectInit(t)??{},a=V.detectDirective(t,"wrap");return Array.isArray(a)?e.wrap=a.some(({type:i})=>i==="wrap"):a?.type==="wrap"&&(e.wrap=!0),{text:Vt(t),directive:e}},"processDirectives");function bt(t){let e=si(t),a=ci(e),i=mi(a.text),o=$t(a.config,i.directive);return t=xe(i.text),{code:t,title:a.title,config:o}}r(bt,"preprocessDiagram");function Ee(t){let e=new TextEncoder().encode(t),a=Array.from(e,i=>String.fromCodePoint(i)).join("");return btoa(a)}r(Ee,"toBase64");var pi=5e4,di="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",fi="sandbox",gi="loose",li="http://www.w3.org/2000/svg",ui="http://www.w3.org/1999/xlink",Di="http://www.w3.org/1999/xhtml",yi="100%",xi="100%",hi="border:0;margin:0;",Ei="margin:0",wi="allow-top-navigation-by-user-activation allow-popups",Li='The "iframe" tag is not supported by your browser.',bi=["foreignobject"],vi=["dominant-baseline"];function ve(t){let e=bt(t);return Y(),Rt(e.config??{}),e}r(ve,"processAndSetConfigs");async function Si(t,e){$();try{let{code:a,config:i}=ve(t);return{diagramType:(await Se(a)).type,config:i}}catch(a){if(e?.suppressErrors)return!1;throw a}}r(Si,"parse");var we=r((t,e,a=[])=>`
.${t} ${e} { ${a.join(" !important; ")} !important; }`,"cssImportantStyles"),Mi=r((t,e=new Map)=>{let a="";if(t.themeCSS!==void 0&&(a+=`
${t.themeCSS}`),t.fontFamily!==void 0&&(a+=`
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(a+=`
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){let m=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(s=>{xt(s.styles)||m.forEach(c=>{a+=we(s.id,c,s.styles)}),xt(s.textStyles)||(a+=we(s.id,"tspan",(s?.textStyles||[]).map(c=>c.replace("color","fill"))))})}return a},"createCssStyles"),Ai=r((t,e,a,i)=>{let o=Mi(t,a),n=zt(e,o,t.themeVariables);return dt(fe(`${i}{${n}}`),ge)},"createUserStyles"),Ti=r((t="",e,a)=>{let i=t;return!a&&!e&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Ht(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),Ci=r((t="",e)=>{let a=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":xi,i=Ee(`<body style="${Ei}">${t}</body>`);return`<iframe style="width:${yi};height:${a};${hi}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${wi}">
${Li}
</iframe>`},"putIntoIFrame"),Le=r((t,e,a,i,o)=>{let n=t.append("div");n.attr("id",a),i&&n.attr("style",i);let m=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns",li);return o&&m.attr("xmlns:xlink",o),m.append("g"),t},"appendDivSvgG");function be(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}r(be,"sandboxedIframe");var Ri=r((t,e,a,i)=>{t.getElementById(e)?.remove(),t.getElementById(a)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),ki=r(async function(t,e,a){$();let i=ve(e);e=i.code;let o=G();g.debug(o),e.length>(o?.maxTextSize??pi)&&(e=di);let n="#"+t,m="i"+t,s="#"+m,c="d"+t,l="#"+c,y=r(()=>{let gt=k(x?s:l).node();gt&&"remove"in gt&&gt.remove()},"removeTempElements"),p=k("body"),x=o.securityLevel===fi,A=o.securityLevel===gi,b=o.fontFamily;if(a!==void 0){if(a&&(a.innerHTML=""),x){let M=be(k(a),m);p=k(M.nodes()[0].contentDocument.body),p.node().style.margin=0}else p=k(a);Le(p,t,c,`font-family: ${b}`,ui)}else{if(Ri(document,t,c,m),x){let M=be(k("body"),m);p=k(M.nodes()[0].contentDocument.body),p.node().style.margin=0}else p=k("body");Le(p,t,c)}let f,C;try{f=await B.fromText(e,{title:i.title})}catch(M){if(o.suppressErrorRendering)throw y(),M;f=await B.fromText("error"),C=M}let v=p.select(l).node(),u=f.type,S=v.firstChild,R=S.firstChild,T=f.renderer.getClasses?.(e,f),E=Ai(o,u,T,n),d=document.createElement("style");d.innerHTML=E,S.insertBefore(d,R);try{await f.renderer.draw(e,t,ht.version,f)}catch(M){throw o.suppressErrorRendering?y():Sr.draw(e,t,ht.version),M}let ke=p.select(`${l} svg`),je=f.db.getAccTitle?.(),Oe=f.db.getAccDescription?.();Oi(u,ke,je,Oe),p.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Di);let _=p.select(l).node().innerHTML;if(g.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),_=Ti(_,x,jt(o.arrowMarkerAbsolute)),x){let M=p.select(l+" svg").node();_=Ci(_,M)}else A||(_=kt.sanitize(_,{ADD_TAGS:bi,ADD_ATTR:vi,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(ye(),C)throw C;return y(),{diagramType:u,svg:_,bindFunctions:f.db.bindFunctions}},"render");function ji(t={}){let e=St({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),At(e),e?.theme&&e.theme in tt?e.themeVariables=tt[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=tt.default.getThemeVariables(e.themeVariables));let a=typeof e=="object"?Mt(e):Dt();lt(a.logLevel),$()}r(ji,"initialize");var Se=r((t,e={})=>{let{code:a}=bt(t);return B.fromText(a,e)},"getDiagramFromText");function Oi(t,e,a,i){le(e,t),ue(e,a,i,e.attr("id"))}r(Oi,"addA11yInfo");var I=Object.freeze({render:ki,parse:Si,getDiagramFromText:Se,initialize:ji,getConfig:G,setConfig:Ct,getSiteConfig:Dt,updateSiteConfig:Tt,reset:r(()=>{Y()},"reset"),globalReset:r(()=>{Y(ut)},"globalReset"),defaultConfig:ut});lt(G().logLevel);Y(G());var Pi=r((t,e,a)=>{g.warn(t),yt(t)?(a&&a(t.str,t.hash),e.push({...t,message:t.str,error:t})):(a&&a(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Me=r(async function(t={querySelector:".mermaid"}){try{await Fi(t)}catch(e){if(yt(e)&&g.error(e.str),O.parseError&&O.parseError(e),!t.suppressErrors)throw g.error("Use the suppressErrors option to suppress these errors"),e}},"run"),Fi=r(async function({postRenderCallback:t,querySelector:e,nodes:a}={querySelector:".mermaid"}){let i=I.getConfig();g.debug(`${t?"":"No "}Callback function found`);let o;if(a)o=a;else if(e)o=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");g.debug(`Found ${o.length} diagrams`),i?.startOnLoad!==void 0&&(g.debug("Start On Load: "+i?.startOnLoad),I.updateSiteConfig({startOnLoad:i?.startOnLoad}));let n=new V.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),m,s=[];for(let c of Array.from(o)){g.info("Rendering diagram: "+c.id);if(c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");let l=`mermaid-${n.next()}`;m=c.innerHTML,m=Pt(V.entityDecode(m)).trim().replace(/<br\s*\/?>/gi,"<br/>");let y=V.detectInit(m);y&&g.debug("Detected early reinit: ",y);try{let{svg:p,bindFunctions:x}=await Re(l,m,c);c.innerHTML=p,t&&await t(l),x&&x(c)}catch(p){Pi(p,s,O.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Ae=r(function(t){I.initialize(t)},"initialize"),Ii=r(async function(t,e,a){g.warn("mermaid.init is deprecated. Please use run instead."),t&&Ae(t);let i={postRenderCallback:a,querySelector:".mermaid"};typeof e=="string"?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await Me(i)},"init"),_i=r(async(t,{lazyLoad:e=!0}={})=>{$(),W(...t),e===!1&&await Xr()},"registerExternalDiagrams"),Te=r(function(){if(O.startOnLoad){let{startOnLoad:t}=I.getConfig();t&&O.run().catch(e=>g.error("Mermaid failed to initialize",e))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",Te,!1)}var Gi=r(function(t){O.parseError=t},"setPaLine truncated
/*! Check if previously processed */
/*!
* Wait for document loaded before starting the execution
*/