const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/layers.DH1cXS7y-CncWywJ2.js","assets/layers.BaVoV2Mc-vb1ha5Fm.js","assets/layers.B6AgvWr7-Bq9IA4iY.js","assets/index-DTC0Ed21.js","assets/index-By4xmZe0.css","assets/TaskPanel-DL-lNNa-.js","assets/tasks-ClycqzjK.js","assets/tasks-Ct0kp_KC.css","assets/IconUser-Bh9n--nN.js","assets/tasks-R9G1-k7v.js","assets/IconChevronLeft-DwnMQlxZ.js","assets/use-resize-observer-B2T5TxF-.js","assets/useTaskTypesData-DEDxUwkB.js","assets/PillsInput-BQBRVlfT.js","assets/SegmentedControl-CI2D3wRP.js","assets/get-base-value-JqT_q0U7.js","assets/ColorSwatch-DyLoUEeW.js","assets/TypographyStylesProvider-B4wTcLh8.js","assets/clamp-Bw9v46PI.js","assets/IconGripVertical-A4WphpSm.js","assets/Accordion-BmslGzqa.js","assets/TaskPanel-BkvM9tO8.css","assets/layers.CL40iKmx-Xv28zrig.js","assets/layers.CfZBH4Eu-O0GaySU7.js","assets/layers.D4fGb2cV-B5XFCW96.js","assets/layers.C7lIplJU-DZsL1XrW.js","assets/_flatRest-IJQXWsZt.js","assets/uniqueId-BjBDjfz6.js","assets/layers.CAO7q0r4-CUd9ex3I.js","assets/layers.BwUxT4Q5-DBD_8f9x.js","assets/layers.Dtn3JFPr-Cp4Fd7tq.js","assets/layers.DUdXdOlx-DkXuWGBn.js","assets/layers.DksgtuUk-g5u_Khqt.js","assets/layers.CqVTtuYm-C3YJfAyO.js","assets/layers.DLwuMfdd-B0oSrkCJ.js","assets/layers.pwlx4g6z-DfN8SxTT.js","assets/layers.CYIdfi3R-vhgkOCD1.js","assets/layers.C_IqWsSv-rV4HP_6W.js","assets/layers.IHjzuCNG-C8lhmUhN.js","assets/layers.cYU68oPw-BOLyh78G.js","assets/layers.C4pfbcLK-CYfP-n41.js","assets/layers.DjUOC4st-DHuO7-vr.js","assets/layers.Sa1zF2S2-Dri9LObb.js","assets/layers.atdgiJ8F-DapGouzV.js","assets/layers.DxRkHDxc-DU-c-Pfl.js","assets/layers.b0h5ZBmD-D7tiw6cE.js","assets/layers.cMZ04ZtI-CyMOMuh2.js","assets/layers.DVe0wbIH-CMJLZKHD.js","assets/layers.CcYiIh13-Bi1TFfEX.js","assets/layers.B7rE870D-BJaaJcuZ.js","assets/layers.KbkdU8W--BY_5u2qS.js","assets/layers.BbI5HnBu-DqsNBB6u.js","assets/layers.BnNOrBrJ-BVMKu1MG.js","assets/layers.DWyN9gGU-DtpJmT9Y.js","assets/layers.DDhM4ko7-BDu1Zmiz.js","assets/layers.C451D7EK-nSKRA56K.js","assets/layers.CilNpK1h-Dt9spa6G.js","assets/layers.CEegMYbQ-C4436Ebb.js","assets/layers.BpilXLfW-DfYEAvWy.js","assets/layers.BSCshcOE-CvGaEdID.js","assets/layers.B9VhcQ9O-CC8rSfyb.js","assets/layers.C5BdKnCx-DmzrDoDf.js","assets/layers.D7jGxypv-Cyu9clx1.js","assets/layers.snikzCwF-Z29qbx7G.js"])))=>i.map(i=>d[i]);
import{ah as K}from"./index-DTC0Ed21.js";import{Y as Gh,L as te}from"./layers.B6AgvWr7-Bq9IA4iY.js";import{X as Kh}from"./TaskPanel-DL-lNNa-.js";import"./tasks-ClycqzjK.js";import"./IconUser-Bh9n--nN.js";import"./tasks-R9G1-k7v.js";import"./IconChevronLeft-DwnMQlxZ.js";import"./use-resize-observer-B2T5TxF-.js";import"./useTaskTypesData-DEDxUwkB.js";import"./PillsInput-BQBRVlfT.js";import"./SegmentedControl-CI2D3wRP.js";import"./get-base-value-JqT_q0U7.js";import"./ColorSwatch-DyLoUEeW.js";import"./TypographyStylesProvider-B4wTcLh8.js";import"./clamp-Bw9v46PI.js";import"./IconGripVertical-A4WphpSm.js";import"./Accordion-BmslGzqa.js";const Oi=20,Zh={rect:"rectangle",circle:"ellipse"},Xn={startOnLoad:!1,flowchart:{curve:"linear"},themeVariables:{fontSize:`${Oi*1.25}px`},maxEdges:500,maxTextSize:5e4};class Mi{constructor({converter:e}){this.convert=(r,i)=>this.converter(r,{...i,fontSize:i.fontSize||Oi}),this.converter=e}}var ye;(function(t){t.ROUND="round",t.STADIUM="stadium",t.DOUBLECIRCLE="doublecircle",t.CIRCLE="circle",t.DIAMOND="diamond"})(ye||(ye={}));var To;(function(t){t.COLOR="color"})(To||(To={}));var Ne;(function(t){t.FILL="fill",t.STROKE="stroke",t.STROKE_WIDTH="stroke-width",t.STROKE_DASHARRAY="stroke-dasharray"})(Ne||(Ne={}));var or={},Vn;function Jh(){if(Vn)return or;Vn=1,Object.defineProperty(or,"__esModule",{value:!0}),or.removeMarkdown=void 0;var t=function(e,r){r===void 0&&(r={listUnicodeChar:""}),r=r||{},r.listUnicodeChar=r.hasOwnProperty("listUnicodeChar")?r.listUnicodeChar:!1,r.stripListLeaders=r.hasOwnProperty("stripListLeaders")?r.stripListLeaders:!0,r.gfm=r.hasOwnProperty("gfm")?r.gfm:!0,r.useImgAltText=r.hasOwnProperty("useImgAltText")?r.useImgAltText:!0,r.preserveLinks=r.hasOwnProperty("preserveLinks")?r.preserveLinks:!1;var i=e||"";i=i.replace(/^(-\s*?|\*\s*?|_\s*?){3,}\s*$/gm,"");try{r.stripListLeaders&&(r.listUnicodeChar?i=i.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,r.listUnicodeChar+" $1"):i=i.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,"$1")),r.gfm&&(i=i.replace(/\n={2,}/g,`
`).replace(/~{3}.*\n/g,"").replace(/~~/g,"").replace(/`{3}.*\n/g,"")),r.preserveLinks&&(i=i.replace(/\[(.*?)\][\[\(](.*?)[\]\)]/g,"$1 ($2)")),i=i.replace(/<[^>]*>/g,"").replace(/^[=\-]{2,}\s*$/g,"").replace(/\[\^.+?\](\: .*?$)?/g,"").replace(/\s{0,2}\[.*?\]: .*?$/g,"").replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g,r.useImgAltText?"$1":"").replace(/\[(.*?)\][\[\(].*?[\]\)]/g,"$1").replace(/^\s{0,3}>\s?/g,"").replace(/(^|\n)\s{0,3}>\s?/g,`

`).replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g,"").replace(/^(\n)?\s{0,}#{1,6}\s+| {0,}(\n)?\s{0,}#{0,} {0,}(\n)?\s{0,}$/gm,"$1$2$3").replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g,"$2").replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g,"$2").replace(/(`{3,})(.*?)\1/gm,"$2").replace(/`(.+?)`/g,"$1").replace(/\n{2,}/g,`

`)}catch(o){return console.error(o),e}return i};return or.removeMarkdown=t,or}var Qh=Jh();const tc={arrow_circle:{endArrowhead:"dot"},arrow_cross:{endArrowhead:"bar"},arrow_open:{endArrowhead:null,startArrowhead:null},double_arrow_circle:{endArrowhead:"dot",startArrowhead:"dot"},double_arrow_cross:{endArrowhead:"bar",startArrowhead:"bar"},double_arrow_point:{endArrowhead:"arrow",startArrowhead:"arrow"}},ec=t=>tc[t],Hr=t=>{let e=t.text;return t.labelType==="markdown"&&(e=Qh.removeMarkdown(t.text)),rc(e)},rc=t=>{const e=/\s?(fa|fab):[a-zA-Z0-9-]+/g;return t.replace(e,"")},ic=t=>{const e={};return Object.keys(t).forEach(r=>{var i;switch(r){case Ne.FILL:{e.backgroundColor=t[r],e.fillStyle="solid";break}case Ne.STROKE:{e.strokeColor=t[r];break}case Ne.STROKE_WIDTH:{e.strokeWidth=Number((i=t[r])==null?void 0:i.split("px")[0]);break}case Ne.STROKE_DASHARRAY:{e.strokeStyle="dashed";break}}}),e},oc=t=>{const e={};return Object.keys(t).forEach(r=>{switch(r){case To.COLOR:{e.strokeColor=t[r];break}}}),e},nc=t=>{const e={};t.subGraphs.map(i=>{i.nodeIds.forEach(o=>{e[i.id]={id:i.id,parent:null,isLeaf:!1},e[o]={id:o,parent:i.id,isLeaf:t.vertices[o]!==void 0}})});const r={};return[...Object.keys(t.vertices),...t.subGraphs.map(i=>i.id)].forEach(i=>{if(!e[i])return;let o=e[i];const a=[];for(o.isLeaf||a.push(`subgraph_group_${o.id}`);o.parent;)a.push(`subgraph_group_${o.parent}`),o=e[o.parent];r[i]=a}),{getGroupIds:i=>r[i]||[],getParentId:i=>e[i]?e[i].parent:null}},ac=new Mi({converter:(t,e)=>{const r=[],i=e.fontSize,{getGroupIds:o,getParentId:a}=nc(t);return t.subGraphs.reverse().forEach(n=>{const s=o(n.id),l={id:n.id,type:"rectangle",groupIds:s,x:n.x,y:n.y,width:n.width,height:n.height,label:{groupIds:s,text:Hr(n),fontSize:i,verticalAlign:"top"}};r.push(l)}),Object.values(t.vertices).forEach(n=>{if(!n)return;const s=o(n.id),l=ic(n.containerStyle),h=oc(n.labelStyle);let u={id:n.id,type:"rectangle",groupIds:s,x:n.x,y:n.y,width:n.width,height:n.height,strokeWidth:2,label:{groupIds:s,text:Hr(n),fontSize:i,...h},link:n.link||null,...l};switch(n.type){case ye.STADIUM:{u={...u,roundness:{type:3}};break}case ye.ROUND:{u={...u,roundness:{type:3}};break}case ye.DOUBLECIRCLE:{s.push(`doublecircle_${n.id}}`);const c={type:"ellipse",groupIds:s,x:n.x+5,y:n.y+5,width:n.width-10,height:n.height-10,strokeWidth:2,roundness:{type:3},label:{groupIds:s,text:Hr(n),fontSize:i}};u={...u,groupIds:s,type:"ellipse"},r.push(c);break}case ye.CIRCLE:{u.type="ellipse";break}case ye.DIAMOND:{u.type="diamond";break}}r.push(u)}),t.edges.forEach(n=>{let s=[];const l=a(n.start),h=a(n.end);l&&l===h&&(s=o(l));const{startX:u,startY:c,reflectionPoints:d}=n,p=d.map(_=>[_.x-d[0].x,_.y-d[0].y]),m=ec(n.type),b={id:`${n.start}_${n.end}`,type:"arrow",groupIds:s,x:u,y:c,strokeWidth:n.stroke==="thick"?4:2,strokeStyle:n.stroke==="dotted"?"dashed":void 0,points:p,...n.text?{label:{text:Hr(n),fontSize:i,groupIds:s}}:{},roundness:{type:2},...m},x=r.find(_=>_.id===n.start),E=r.find(_=>_.id===n.end);!x||!E||(b.start={id:x.id||""},b.end={id:E.id||""},r.push(b))}),{elements:r}}}),sc=new Mi({converter:t=>{const e=te(),{width:r,height:i}=t,o={type:"image",x:0,y:0,width:r,height:i,status:"saved",fileId:e};return{files:{[e]:{id:e,mimeType:t.mimeType,dataURL:t.dataURL}},elements:[o]}}}),Xo=t=>t.replace(/\\n/g,`
`),yr=t=>{const e={type:"line",x:t.startX,y:t.startY,points:[[0,0],[t.endX-t.startX,t.endY-t.startY]],width:t.endX-t.startX,height:t.endY-t.startY,strokeStyle:t.strokeStyle||"solid",strokeColor:t.strokeColor||"#000",strokeWidth:t.strokeWidth||1};return t.groupId&&Object.assign(e,{groupIds:[t.groupId]}),t.id&&Object.assign(e,{id:t.id}),e},hi=t=>{const e={type:"text",x:t.x,y:t.y,width:t.width,height:t.height,text:Xo(t.text)||"",fontSize:t.fontSize,verticalAlign:"middle"};return t.groupId&&Object.assign(e,{groupIds:[t.groupId]}),t.id&&Object.assign(e,{id:t.id}),e},dr=t=>{var e,r,i,o;let a={};t.type==="rectangle"&&t.subtype==="activation"&&(a={backgroundColor:"#e9ecef",fillStyle:"solid"});const n={id:t.id,type:t.type,x:t.x,y:t.y,width:t.width,height:t.height,label:{text:Xo(((e=t==null?void 0:t.label)==null?void 0:e.text)||""),fontSize:(r=t==null?void 0:t.label)==null?void 0:r.fontSize,verticalAlign:((i=t.label)==null?void 0:i.verticalAlign)||"middle",strokeColor:((o=t.label)==null?void 0:o.color)||"#000",groupIds:t.groupId?[t.groupId]:[]},strokeStyle:t==null?void 0:t.strokeStyle,strokeWidth:t==null?void 0:t.strokeWidth,strokeColor:t==null?void 0:t.strokeColor,backgroundColor:t==null?void 0:t.bgColor,fillStyle:"solid",...a};return t.groupId&&Object.assign(n,{groupIds:[t.groupId]}),n},ms=t=>{var e;const r={type:"arrow",x:t.startX,y:t.startY,points:t.points||[[0,0],[t.endX-t.startX,t.endY-t.startY]],width:t.endX-t.startX,height:t.endY-t.startY,strokeStyle:(t==null?void 0:t.strokeStyle)||"solid",endArrowhead:(t==null?void 0:t.endArrowhead)||null,startArrowhead:(t==null?void 0:t.startArrowhead)||null,label:{text:Xo(((e=t==null?void 0:t.label)==null?void 0:e.text)||""),fontSize:16},roundness:{type:2},start:t.start,end:t.end};return t.groupId&&Object.assign(r,{groupIds:[t.groupId]}),r},lc=new Mi({converter:t=>{const e=[],r=[];if(Object.values(t.nodes).forEach(i=>{!i||!i.length||i.forEach(o=>{let a;switch(o.type){case"line":a=yr(o);break;case"rectangle":case"ellipse":a=dr(o);break;case"text":a=hi(o);break;default:throw`unknown type ${o.type}`}o.type==="rectangle"&&(o==null?void 0:o.subtype)==="activation"?r.push(a):e.push(a)})}),Object.values(t.lines).forEach(i=>{i&&e.push(yr(i))}),Object.values(t.arrows).forEach(i=>{i&&(e.push(ms(i)),i.sequenceNumber&&e.push(dr(i.sequenceNumber)))}),e.push(...r),t.loops){const{lines:i,texts:o,nodes:a}=t.loops;i.forEach(n=>{e.push(yr(n))}),o.forEach(n=>{e.push(hi(n))}),a.forEach(n=>{e.push(dr(n))})}return t.groups&&t.groups.forEach(i=>{const{actorKeys:o,name:a}=i;let n=1/0,s=1/0,l=0,h=0;if(!o.length)return;e.filter(y=>{if(y.id){const j=y.id.indexOf("-"),U=y.id.substring(0,j);return o.includes(U)}}).forEach(y=>{if(y.x===void 0||y.y===void 0||y.width===void 0||y.height===void 0)throw new Error(`Actor attributes missing ${y}`);n=Math.min(n,y.x),s=Math.min(s,y.y),l=Math.max(l,y.x+y.width),h=Math.max(h,y.y+y.height)});const u=10,c=n-u,d=s-u,p=l-n+u*2,m=h-s+u*2,b=te(),x=dr({type:"rectangle",x:c,y:d,width:p,height:m,bgColor:i.fill,id:b});e.unshift(x);const E=te(),_=[b];e.forEach(y=>{if(y.type!=="frame"){if(y.x===void 0||y.y===void 0||y.width===void 0||y.height===void 0)throw new Error(`Element attributes missing ${y}`);if(y.x>=n&&y.x+y.width<=l&&y.y>=s&&y.y+y.height<=h){const j=y.id||te();y.id||Object.assign(y,{id:j}),_.push(j)}}});const R={type:"frame",id:E,name:a,children:_};e.push(R)}),{elements:e}}}),hc=new Mi({converter:t=>{const e=[];return Object.values(t.nodes).forEach(r=>{!r||!r.length||r.forEach(i=>{let o;switch(i.type){case"line":o=yr(i);break;case"rectangle":case"ellipse":o=dr(i);break;case"text":o=hi(i);break;default:throw`unknown type ${i.type}`}e.push(o)})}),Object.values(t.lines).forEach(r=>{r&&e.push(yr(r))}),Object.values(t.arrows).forEach(r=>{if(!r)return;const i=ms(r);e.push(i)}),Object.values(t.text).forEach(r=>{const i=hi(r);e.push(i)}),Object.values(t.namespaces).forEach(r=>{const i=Object.keys(r.classes),o=[...i],a=[...t.lines,...t.arrows,...t.text];i.forEach(s=>{const l=a.filter(h=>h.metadata&&h.metadata.classId===s).map(h=>h.id);l.length&&o.push(...l)});const n={type:"frame",id:te(),name:r.id,children:o};e.push(n)}),{elements:e}}}),cc=(t,e={})=>{switch(t.type){case"graphImage":return sc.convert(t,e);case"flowchart":return ac.convert(t,e);case"sequence":return lc.convert(t,e);case"class":return hc.convert(t,e);default:throw new Error(`graphToExcalidraw: unknown graph type "${t.type}, only flowcharts are supported!"`)}};function uc(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from(typeof t=="string"?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(s,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?s.concat(h.map(function(u){var c,d;return(d=(c=u.match(/[\t ]/g))===null||c===void 0?void 0:c.length)!==null&&d!==void 0?d:0})):s},[]);if(o.length){var a=new RegExp(`
[	 ]{`+Math.min.apply(Math,o)+"}","g");i=i.map(function(s){return s.replace(a,`
`)})}i[0]=i[0].replace(/^\r?\n/,"");var n=i[0];return e.forEach(function(s,l){var h=n.match(/(?:^|\n)( *)$/),u=h?h[1]:"",c=s;typeof s=="string"&&s.includes(`
`)&&(c=String(s).split(`
`).map(function(d,p){return p===0?d:""+u+d}).join(`
`)),n+=c+i[l+1]}),n}var wo={exports:{}},dc=wo.exports,Gn;function fc(){return Gn||(Gn=1,(function(t,e){(function(r,i){t.exports=i()})(dc,(function(){var r=1e3,i=6e4,o=36e5,a="millisecond",n="second",s="minute",l="hour",h="day",u="week",c="month",d="quarter",p="year",m="date",b="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var w=["th","st","nd","rd"],C=I%100;return"["+I+(w[(C-20)%10]||w[C]||w[0])+"]"}},R=function(I,w,C){var A=String(I);return!A||A.length>=w?I:""+Array(w+1-A.length).join(C)+I},y={s:R,z:function(I){var w=-I.utcOffset(),C=Math.abs(w),A=Math.floor(C/60),k=C%60;return(w<=0?"+":"-")+R(A,2,"0")+":"+R(k,2,"0")},m:function I(w,C){if(w.date()<C.date())return-I(C,w);var A=12*(C.year()-w.year())+(C.month()-w.month()),k=w.clone().add(A,c),z=C-k<0,$=w.clone().add(A+(z?-1:1),c);return+(-(A+(C-k)/(z?k-$:$-k))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:c,y:p,w:u,d:h,D:m,h:l,m:s,s:n,ms:a,Q:d}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},j="en",U={};U[j]=_;var N="$isDayjsObject",tt=function(I){return I instanceof et||!(!I||!I[N])},ot=function I(w,C,A){var k;if(!w)return j;if(typeof w=="string"){var z=w.toLowerCase();U[z]&&(k=z),C&&(U[z]=C,k=z);var $=w.split("-");if(!k&&$.length>1)return I($[0])}else{var D=w.name;U[D]=w,k=D}return!A&&k&&(j=k),k||!A&&j},P=function(I,w){if(tt(I))return I.clone();var C=typeof w=="object"?w:{};return C.date=I,C.args=arguments,new et(C)},B=y;B.l=ot,B.i=tt,B.w=function(I,w){return P(I,{locale:w.$L,utc:w.$u,x:w.$x,$offset:w.$offset})};var et=(function(){function I(C){this.$L=ot(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[N]=!0}var w=I.prototype;return w.parse=function(C){this.$d=(function(A){var k=A.date,z=A.utc;if(k===null)return new Date(NaN);if(B.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var $=k.match(x);if($){var D=$[2]-1||0,G=($[7]||"0").substring(0,3);return z?new Date(Date.UTC($[1],D,$[3]||1,$[4]||0,$[5]||0,$[6]||0,G)):new Date($[1],D,$[3]||1,$[4]||0,$[5]||0,$[6]||0,G)}}return new Date(k)})(C),this.init()},w.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},w.$utils=function(){return B},w.isValid=function(){return this.$d.toString()!==b},w.isSame=function(C,A){var k=P(C);return this.startOf(A)<=k&&k<=this.endOf(A)},w.isAfter=function(C,A){return P(C)<this.startOf(A)},w.isBefore=function(C,A){return this.endOf(A)<P(C)},w.$g=function(C,A,k){return B.u(C)?this[A]:this.set(k,C)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(C,A){var k=this,z=!!B.u(A)||A,$=B.p(C),D=function(At,nt){var Lt=B.w(k.$u?Date.UTC(k.$y,nt,At):new Date(k.$y,nt,At),k);return z?Lt:Lt.endOf(h)},G=function(At,nt){return B.w(k.toDate()[At].apply(k.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(nt)),k)},Y=this.$W,rt=this.$M,H=this.$D,xt="set"+(this.$u?"UTC":"");switch($){case p:return z?D(1,0):D(31,11);case c:return z?D(1,rt):D(0,rt+1);case u:var Bt=this.$locale().weekStart||0,ne=(Y<Bt?Y+7:Y)-Bt;return D(z?H-ne:H+(6-ne),rt);case h:case m:return G(xt+"Hours",0);case l:return G(xt+"Minutes",1);case s:return G(xt+"Seconds",2);case n:return G(xt+"Milliseconds",3);default:return this.clone()}},w.endOf=function(C){return this.startOf(C,!1)},w.$set=function(C,A){var k,z=B.p(C),$="set"+(this.$u?"UTC":""),D=(k={},k[h]=$+"Date",k[m]=$+"Date",k[c]=$+"Month",k[p]=$+"FullYear",k[l]=$+"Hours",k[s]=$+"Minutes",k[n]=$+"Seconds",k[a]=$+"Milliseconds",k)[z],G=z===h?this.$D+(A-this.$W):A;if(z===c||z===p){var Y=this.clone().set(m,1);Y.$d[D](G),Y.init(),this.$d=Y.set(m,Math.min(this.$D,Y.daysInMonth())).$d}else D&&this.$d[D](G);return this.init(),this},w.set=function(C,A){return this.clone().$set(C,A)},w.get=function(C){return this[B.p(C)]()},w.add=function(C,A){var k,z=this;C=Number(C);var $=B.p(A),D=function(rt){var H=P(z);return B.w(H.date(H.date()+Math.round(rt*C)),z)};if($===c)return this.set(c,this.$M+C);if($===p)return this.set(p,this.$y+C);if($===h)return D(1);if($===u)return D(7);var G=(k={},k[s]=i,k[l]=o,k[n]=r,k)[$]||1,Y=this.$d.getTime()+C*G;return B.w(Y,this)},w.subtract=function(C,A){return this.add(-1*C,A)},w.format=function(C){var A=this,k=this.$locale();if(!this.isValid())return k.invalidDate||b;var z=C||"YYYY-MM-DDTHH:mm:ssZ",$=B.z(this),D=this.$H,G=this.$m,Y=this.$M,rt=k.weekdays,H=k.months,xt=k.meridiem,Bt=function(nt,Lt,kt,Ht){return nt&&(nt[Lt]||nt(A,z))||kt[Lt].slice(0,Ht)},ne=function(nt){return B.s(D%12||12,nt,"0")},At=xt||function(nt,Lt,kt){var Ht=nt<12?"AM":"PM";return kt?Ht.toLowerCase():Ht};return z.replace(E,(function(nt,Lt){return Lt||(function(kt){switch(kt){case"YY":return String(A.$y).slice(-2);case"YYYY":return B.s(A.$y,4,"0");case"M":return Y+1;case"MM":return B.s(Y+1,2,"0");case"MMM":return Bt(k.monthsShort,Y,H,3);case"MMMM":return Bt(H,Y);case"D":return A.$D;case"DD":return B.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return Bt(k.weekdaysMin,A.$W,rt,2);case"ddd":return Bt(k.weekdaysShort,A.$W,rt,3);case"dddd":return rt[A.$W];case"H":return String(D);case"HH":return B.s(D,2,"0");case"h":return ne(1);case"hh":return ne(2);case"a":return At(D,G,!0);case"A":return At(D,G,!1);case"m":return String(G);case"mm":return B.s(G,2,"0");case"s":return String(A.$s);case"ss":return B.s(A.$s,2,"0");case"SSS":return B.s(A.$ms,3,"0");case"Z":return $}return null})(nt)||$.replace(":","")}))},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(C,A,k){var z,$=this,D=B.p(A),G=P(C),Y=(G.utcOffset()-this.utcOffset())*i,rt=this-G,H=function(){return B.m($,G)};switch(D){case p:z=H()/12;break;case c:z=H();break;case d:z=H()/3;break;case u:z=(rt-Y)/6048e5;break;case h:z=(rt-Y)/864e5;break;case l:z=rt/o;break;case s:z=rt/i;break;case n:z=rt/r;break;default:z=rt}return k?z:B.a(z)},w.daysInMonth=function(){return this.endOf(c).$D},w.$locale=function(){return U[this.$L]},w.locale=function(C,A){if(!C)return this.$L;var k=this.clone(),z=ot(C,A,!0);return z&&(k.$L=z),k},w.clone=function(){return B.w(this.$d,this)},w.toDate=function(){return new Date(this.valueOf())},w.toJSON=function(){return this.isValid()?this.toISOString():null},w.toISOString=function(){return this.$d.toISOString()},w.toString=function(){return this.$d.toUTCString()},I})(),oe=et.prototype;return P.prototype=oe,[["$ms",a],["$s",n],["$m",s],["$H",l],["$W",h],["$M",c],["$y",p],["$D",m]].forEach((function(I){oe[I[1]]=function(w){return this.$g(w,I[0],I[1])}})),P.extend=function(I,w){return I.$i||(I(w,et,P),I.$i=!0),P},P.locale=ot,P.isDayjs=tt,P.unix=function(I){return P(1e3*I)},P.en=U[j],P.Ls=U,P.p={},P}))})(wo)),wo.exports}var pc=fc();const gc=Kh(pc);var mc={value:()=>{}};function ys(){for(var t=0,e=arguments.length,r={},i;t<e;++t){if(!(i=arguments[t]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new ti(r)}function ti(t){this._=t}function yc(t,e){return t.trim().split(/^|\s+/).map(function(r){var i="",o=r.indexOf(".");if(o>=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}ti.prototype=ys.prototype={constructor:ti,on:function(t,e){var r=this._,i=yc(t+"",r),o,a=-1,n=i.length;if(arguments.length<2){for(;++a<n;)if((o=(t=i[a]).type)&&(o=bc(r[o],t.name)))return o;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<n;)if(o=(t=i[a]).type)r[o]=Kn(r[o],t.name,e);else if(e==null)for(o in r)r[o]=Kn(r[o],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new ti(t)},call:function(t,e){if((o=arguments.length-2)>0)for(var r=new Array(o),i=0,o,a;i<o;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],i=0,o=a.length;i<o;++i)a[i].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],o=0,a=i.length;o<a;++o)i[o].value.apply(e,r)}};function bc(t,e){for(var r=0,i=t.length,o;r<i;++r)if((o=t[r]).name===e)return o.value}function Kn(t,e,r){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=mc,t=t.slice(0,i).concat(t.slice(i+1));break}return r!=null&&t.push({name:e,value:r}),t}var So="http://www.w3.org/1999/xhtml";const Zn={svg:"http://www.w3.org/2000/svg",xhtml:So,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ii(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Zn.hasOwnProperty(e)?{space:Zn[e],local:t}:t}function _c(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===So&&e.documentElement.namespaceURI===So?e.createElement(t):e.createElementNS(r,t)}}function Cc(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function bs(t){var e=Ii(t);return(e.local?Cc:_c)(e)}function xc(){}function Vo(t){return t==null?xc:function(){return this.querySelector(t)}}function kc(t){typeof t!="function"&&(t=Vo(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a=e[o],n=a.length,s=i[o]=new Array(n),l,h,u=0;u<n;++u)(l=a[u])&&(h=t.call(l,l.__data__,u,a))&&("__data__"in l&&(h.__data__=l.__data__),s[u]=h);return new Ct(i,this._parents)}function vc(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Tc(){return[]}function _s(t){return t==null?Tc:function(){return this.querySelectorAll(t)}}function wc(t){return function(){return vc(t.apply(this,arguments))}}function Sc(t){typeof t=="function"?t=wc(t):t=_s(t);for(var e=this._groups,r=e.length,i=[],o=[],a=0;a<r;++a)for(var n=e[a],s=n.length,l,h=0;h<s;++h)(l=n[h])&&(i.push(t.call(l,l.__data__,h,n)),o.push(l));return new Ct(i,o)}function Cs(t){return function(){return this.matches(t)}}function xs(t){return function(e){return e.matches(t)}}var Bc=Array.prototype.find;function Ac(t){return function(){return Bc.call(this.children,t)}}function Lc(){return this.firstElementChild}function Fc(t){return this.select(t==null?Lc:Ac(typeof t=="function"?t:xs(t)))}var Ec=Array.prototype.filter;function Oc(){return Array.from(this.children)}function Mc(t){return function(){return Ec.call(this.children,t)}}function Ic(t){return this.selectAll(t==null?Oc:Mc(typeof t=="function"?t:xs(t)))}function Nc(t){typeof t!="function"&&(t=Cs(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a=e[o],n=a.length,s=i[o]=[],l,h=0;h<n;++h)(l=a[h])&&t.call(l,l.__data__,h,a)&&s.push(l);return new Ct(i,this._parents)}function ks(t){return new Array(t.length)}function qc(){return new Ct(this._enter||this._groups.map(ks),this._parents)}function ci(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ci.prototype={constructor:ci,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Dc(t){return function(){return t}}function $c(t,e,r,i,o,a){for(var n=0,s,l=e.length,h=a.length;n<h;++n)(s=e[n])?(s.__data__=a[n],i[n]=s):r[n]=new ci(t,a[n]);for(;n<l;++n)(s=e[n])&&(o[n]=s)}function zc(t,e,r,i,o,a,n){var s,l,h=new Map,u=e.length,c=a.length,d=new Array(u),p;for(s=0;s<u;++s)(l=e[s])&&(d[s]=p=n.call(l,l.__data__,s,e)+"",h.has(p)?o[s]=l:h.set(p,l));for(s=0;s<c;++s)p=n.call(t,a[s],s,a)+"",(l=h.get(p))?(i[s]=l,l.__data__=a[s],h.delete(p)):r[s]=new ci(t,a[s]);for(s=0;s<u;++s)(l=e[s])&&h.get(d[s])===l&&(o[s]=l)}function Rc(t){return t.__data__}function Pc(t,e){if(!arguments.length)return Array.from(this,Rc);var r=e?zc:$c,i=this._parents,o=this._groups;typeof t!="function"&&(t=Dc(t));for(var a=o.length,n=new Array(a),s=new Array(a),l=new Array(a),h=0;h<a;++h){var u=i[h],c=o[h],d=c.length,p=jc(t.call(u,u&&u.__data__,h,i)),m=p.length,b=s[h]=new Array(m),x=n[h]=new Array(m),E=l[h]=new Array(d);r(u,c,b,x,E,p,e);for(var _=0,R=0,y,j;_<m;++_)if(y=b[_]){for(_>=R&&(R=_+1);!(j=x[R])&&++R<m;);y._next=j||null}}return n=new Ct(n,i),n._enter=s,n._exit=l,n}function jc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Wc(){return new Ct(this._exit||this._groups.map(ks),this._parents)}function Yc(t,e,r){var i=this.enter(),o=this,a=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(o=e(o),o&&(o=o.selection())),r==null?a.remove():r(a),i&&o?i.merge(o).order():o}function Hc(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,o=r.length,a=i.length,n=Math.min(o,a),s=new Array(o),l=0;l<n;++l)for(var h=r[l],u=i[l],c=h.length,d=s[l]=new Array(c),p,m=0;m<c;++m)(p=h[m]||u[m])&&(d[m]=p);for(;l<o;++l)s[l]=r[l];return new Ct(s,this._parents)}function Uc(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i=t[e],o=i.length-1,a=i[o],n;--o>=0;)(n=i[o])&&(a&&n.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(n,a),a=n);return this}function Xc(t){t||(t=Vc);function e(c,d){return c&&d?t(c.__data__,d.__data__):!c-!d}for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a){for(var n=r[a],s=n.length,l=o[a]=new Array(s),h,u=0;u<s;++u)(h=n[u])&&(l[u]=h);l.sort(e)}return new Ct(o,this._parents).order()}function Vc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Gc(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Kc(){return Array.from(this)}function Zc(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],o=0,a=i.length;o<a;++o){var n=i[o];if(n)return n}return null}function Jc(){let t=0;for(const e of this)++t;return t}function Qc(){return!this.node()}function tu(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var o=e[r],a=0,n=o.length,s;a<n;++a)(s=o[a])&&t.call(s,s.__data__,a,o);return this}function eu(t){return function(){this.removeAttribute(t)}}function ru(t){return function(){this.removeAttributeNS(t.space,t.local)}}function iu(t,e){return function(){this.setAttribute(t,e)}}function ou(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function nu(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function au(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function su(t,e){var r=Ii(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((e==null?r.local?ru:eu:typeof e=="function"?r.local?au:nu:r.local?ou:iu)(r,e))}function vs(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function lu(t){return function(){this.style.removeProperty(t)}}function hu(t,e,r){return function(){this.style.setProperty(t,e,r)}}function cu(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function uu(t,e,r){return arguments.length>1?this.each((e==null?lu:typeof e=="function"?cu:hu)(t,e,r??"")):je(this.node(),t)}function je(t,e){return t.style.getPropertyValue(e)||vs(t).getComputedStyle(t,null).getPropertyValue(e)}function du(t){return function(){delete this[t]}}function fu(t,e){return function(){this[t]=e}}function pu(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function gu(t,e){return arguments.length>1?this.each((e==null?du:typeof e=="function"?pu:fu)(t,e)):this.node()[t]}function Ts(t){return t.trim().split(/^|\s+/)}function Go(t){return t.classList||new ws(t)}function ws(t){this._node=t,this._names=Ts(t.getAttribute("class")||"")}ws.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ss(t,e){for(var r=Go(t),i=-1,o=e.length;++i<o;)r.add(e[i])}function Bs(t,e){for(var r=Go(t),i=-1,o=e.length;++i<o;)r.remove(e[i])}function mu(t){return function(){Ss(this,t)}}function yu(t){return function(){Bs(this,t)}}function bu(t,e){return function(){(e.apply(this,arguments)?Ss:Bs)(this,t)}}function _u(t,e){var r=Ts(t+"");if(arguments.length<2){for(var i=Go(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each((typeof e=="function"?bu:e?mu:yu)(r,e))}function Cu(){this.textContent=""}function xu(t){return function(){this.textContent=t}}function ku(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function vu(t){return arguments.length?this.each(t==null?Cu:(typeof t=="function"?ku:xu)(t)):this.node().textContent}function Tu(){this.innerHTML=""}function wu(t){return function(){this.innerHTML=t}}function Su(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Bu(t){return arguments.length?this.each(t==null?Tu:(typeof t=="function"?Su:wu)(t)):this.node().innerHTML}function Au(){this.nextSibling&&this.parentNode.appendChild(this)}function Lu(){return this.each(Au)}function Fu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Eu(){return this.each(Fu)}function Ou(t){var e=typeof t=="function"?t:bs(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Mu(){return null}function Iu(t,e){var r=typeof t=="function"?t:bs(t),i=e==null?Mu:typeof e=="function"?e:Vo(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Nu(){var t=this.parentNode;t&&t.removeChild(this)}function qu(){return this.each(Nu)}function Du(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function $u(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function zu(t){return this.select(t?$u:Du)}function Ru(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Pu(t){return function(e){t.call(this,e,this.__data__)}}function ju(t){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");return i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}function Wu(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,o=e.length,a;r<o;++r)a=e[r],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++i]=a;++i?e.length=i:delete this.__on}}}function Yu(t,e,r){return function(){var i=this.__on,o,a=Pu(e);if(i){for(var n=0,s=i.length;n<s;++n)if((o=i[n]).type===t.type&&o.name===t.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=r),o.value=e;return}}this.addEventListener(t.type,a,r),o={type:t.type,name:t.name,value:e,listener:a,options:r},i?i.push(o):this.__on=[o]}}function Hu(t,e,r){var i=ju(t+""),o,a=i.length,n;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,h=s.length,u;l<h;++l)for(o=0,u=s[l];o<a;++o)if((n=i[o]).type===u.type&&n.name===u.name)return u.value}return}for(s=e?Yu:Wu,o=0;o<a;++o)this.each(s(i[o],e,r));return this}function As(t,e,r){var i=vs(t),o=i.CustomEvent;typeof o=="function"?o=new o(e,r):(o=i.document.createEvent("Event"),r?(o.initEvent(e,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function Uu(t,e){return function(){return As(this,t,e)}}function Xu(t,e){return function(){return As(this,t,e.apply(this,arguments))}}function Vu(t,e){return this.each((typeof e=="function"?Xu:Uu)(t,e))}function*Gu(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],o=0,a=i.length,n;o<a;++o)(n=i[o])&&(yield n)}var Ls=[null];function Ct(t,e){this._groups=t,this._parents=e}function Mr(){return new Ct([[document.documentElement]],Ls)}function Ku(){return this}Ct.prototype=Mr.prototype={constructor:Ct,select:kc,selectAll:Sc,selectChild:Fc,selectChildren:Ic,filter:Nc,data:Pc,enter:qc,exit:Wc,join:Yc,merge:Hc,selection:Ku,order:Uc,sort:Xc,call:Gc,nodes:Kc,node:Zc,size:Jc,empty:Qc,each:tu,attr:su,style:uu,property:gu,classed:_u,text:vu,html:Bu,raise:Lu,lower:Eu,append:Ou,insert:Iu,remove:qu,clone:zu,datum:Ru,on:Hu,dispatch:Vu,[Symbol.iterator]:Gu};function Tt(t){return typeof t=="string"?new Ct([[document.querySelector(t)]],[document.documentElement]):new Ct([[t]],Ls)}function Ko(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Fs(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function Ir(){}var Tr=.7,ui=1/Tr,$e="\\s*([+-]?\\d+)\\s*",wr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",$t="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zu=/^#([0-9a-f]{3,8})$/,Ju=new RegExp(`^rgb\\(${$e},${$e},${$e}\\)$`),Qu=new RegExp(`^rgb\\(${$t},${$t},${$t}\\)$`),td=new RegExp(`^rgba\\(${$e},${$e},${$e},${wr}\\)$`),ed=new RegExp(`^rgba\\(${$t},${$t},${$t},${wr}\\)$`),rd=new RegExp(`^hsl\\(${wr},${$t},${$t}\\)$`),id=new RegExp(`^hsla\\(${wr},${$t},${$t},${wr}\\)$`),Jn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ko(Ir,Sr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Qn,formatHex:Qn,formatHex8:od,formatHsl:nd,formatRgb:ta,toString:ta});function Qn(){return this.rgb().formatHex()}function od(){return this.rgb().formatHex8()}function nd(){return Es(this).formatHsl()}function ta(){return this.rgb().formatRgb()}function Sr(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Zu.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?ea(e):r===3?new yt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Ur(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Ur(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Ju.exec(t))?new yt(e[1],e[2],e[3],1):(e=Qu.exec(t))?new yt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=td.exec(t))?Ur(e[1],e[2],e[3],e[4]):(e=ed.exec(t))?Ur(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=rd.exec(t))?oa(e[1],e[2]/100,e[3]/100,1):(e=id.exec(t))?oa(e[1],e[2]/100,e[3]/100,e[4]):Jn.hasOwnProperty(t)?ea(Jn[t]):t==="transparent"?new yt(NaN,NaN,NaN,0):null}function ea(t){return new yt(t>>16&255,t>>8&255,t&255,1)}function Ur(t,e,r,i){return i<=0&&(t=e=r=NaN),new yt(t,e,r,i)}function ad(t){return t instanceof Ir||(t=Sr(t)),t?(t=t.rgb(),new yt(t.r,t.g,t.b,t.opacity)):new yt}function Bo(t,e,r,i){return arguments.length===1?ad(t):new yt(t,e,r,i??1)}function yt(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}Ko(yt,Bo,Fs(Ir,{brighter(t){return t=t==null?ui:Math.pow(ui,t),new yt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Tr:Math.pow(Tr,t),new yt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new yt(Ce(this.r),Ce(this.g),Ce(this.b),di(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ra,formatHex:ra,formatHex8:sd,formatRgb:ia,toString:ia}));function ra(){return`#${be(this.r)}${be(this.g)}${be(this.b)}`}function sd(){return`#${be(this.r)}${be(this.g)}${be(this.b)}${be((isNaN(this.opacity)?1:this.opacity)*255)}`}function ia(){const t=di(this.opacity);return`${t===1?"rgb(":"rgba("}${Ce(this.r)}, ${Ce(this.g)}, ${Ce(this.b)}${t===1?")":`, ${t})`}`}function di(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ce(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function be(t){return t=Ce(t),(t<16?"0":"")+t.toString(16)}function oa(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Ot(t,e,r,i)}function Es(t){if(t instanceof Ot)return new Ot(t.h,t.s,t.l,t.opacity);if(t instanceof Ir||(t=Sr(t)),!t)return new Ot;if(t instanceof Ot)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,o=Math.min(e,r,i),a=Math.max(e,r,i),n=NaN,s=a-o,l=(a+o)/2;return s?(e===a?n=(r-i)/s+(r<i)*6:r===a?n=(i-e)/s+2:n=(e-r)/s+4,s/=l<.5?a+o:2-a-o,n*=60):s=l>0&&l<1?0:n,new Ot(n,s,l,t.opacity)}function ld(t,e,r,i){return arguments.length===1?Es(t):new Ot(t,e,r,i??1)}function Ot(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}Ko(Ot,ld,Fs(Ir,{brighter(t){return t=t==null?ui:Math.pow(ui,t),new Ot(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Tr:Math.pow(Tr,t),new Ot(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,o=2*r-i;return new yt(so(t>=240?t-240:t+120,o,i),so(t,o,i),so(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new Ot(na(this.h),Xr(this.s),Xr(this.l),di(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=di(this.opacity);return`${t===1?"hsl(":"hsla("}${na(this.h)}, ${Xr(this.s)*100}%, ${Xr(this.l)*100}%${t===1?")":`, ${t})`}`}}));function na(t){return t=(t||0)%360,t<0?t+360:t}function Xr(t){return Math.max(0,Math.min(1,t||0))}function so(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const Zo=t=>()=>t;function Os(t,e){return function(r){return t+r*e}}function hd(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}function ok(t,e){var r=e-t;return r?Os(t,r>180||r<-180?r-360*Math.round(r/360):r):Zo(isNaN(t)?e:t)}function cd(t){return(t=+t)==1?Ms:function(e,r){return r-e?hd(e,r,t):Zo(isNaN(e)?r:e)}}function Ms(t,e){var r=e-t;return r?Os(t,r):Zo(isNaN(t)?e:t)}const aa=(function t(e){var r=cd(e);function i(o,a){var n=r((o=Bo(o)).r,(a=Bo(a)).r),s=r(o.g,a.g),l=r(o.b,a.b),h=Ms(o.opacity,a.opacity);return function(u){return o.r=n(u),o.g=s(u),o.b=l(u),o.opacity=h(u),o+""}}return i.gamma=t,i})(1);function le(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var Ao=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,lo=new RegExp(Ao.source,"g");function ud(t){return function(){return t}}function dd(t){return function(e){return t(e)+""}}function fd(t,e){var r=Ao.lastIndex=lo.lastIndex=0,i,o,a,n=-1,s=[],l=[];for(t=t+"",e=e+"";(i=Ao.exec(t))&&(o=lo.exec(e));)(a=o.index)>r&&(a=e.slice(r,a),s[n]?s[n]+=a:s[++n]=a),(i=i[0])===(o=o[0])?s[n]?s[n]+=o:s[++n]=o:(s[++n]=null,l.push({i:n,x:le(i,o)})),r=lo.lastIndex;return r<e.length&&(a=e.slice(r),s[n]?s[n]+=a:s[++n]=a),s.length<2?l[0]?dd(l[0].x):ud(e):(e=l.length,function(h){for(var u=0,c;u<e;++u)s[(c=l[u]).i]=c.x(h);return s.join("")})}var sa=180/Math.PI,Is={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ns(t,e,r,i,o,a){var n,s,l;return(n=Math.sqrt(t*t+e*e))&&(t/=n,e/=n),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),t*i<e*r&&(t=-t,e=-e,l=-l,n=-n),{translateX:o,translateY:a,rotate:Math.atan2(e,t)*sa,skewX:Math.atan(l)*sa,scaleX:n,scaleY:s}}var Vr;function pd(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Is:Ns(e.a,e.b,e.c,e.d,e.e,e.f)}function gd(t){return t==null||(Vr||(Vr=document.createElementNS("http://www.w3.org/2000/svg","g")),Vr.setAttribute("transform",t),!(t=Vr.transform.baseVal.consolidate()))?Is:(t=t.matrix,Ns(t.a,t.b,t.c,t.d,t.e,t.f))}function qs(t,e,r,i){function o(h){return h.length?h.pop()+" ":""}function a(h,u,c,d,p,m){if(h!==c||u!==d){var b=p.push("translate(",null,e,null,r);m.push({i:b-4,x:le(h,c)},{i:b-2,x:le(u,d)})}else(c||d)&&p.push("translate("+c+e+d+r)}function n(h,u,c,d){h!==u?(h-u>180?u+=360:u-h>180&&(h+=360),d.push({i:c.push(o(c)+"rotate(",null,i)-2,x:le(h,u)})):u&&c.push(o(c)+"rotate("+u+i)}function s(h,u,c,d){h!==u?d.push({i:c.push(o(c)+"skewX(",null,i)-2,x:le(h,u)}):u&&c.push(o(c)+"skewX("+u+i)}function l(h,u,c,d,p,m){if(h!==c||u!==d){var b=p.push(o(p)+"scale(",null,",",null,")");m.push({i:b-4,x:le(h,c)},{i:b-2,x:le(u,d)})}else(c!==1||d!==1)&&p.push(o(p)+"scale("+c+","+d+")")}return function(h,u){var c=[],d=[];return h=t(h),u=t(u),a(h.translateX,h.translateY,u.translateX,u.translateY,c,d),n(h.rotate,u.rotate,c,d),s(h.skewX,u.skewX,c,d),l(h.scaleX,h.scaleY,u.scaleX,u.scaleY,c,d),h=u=null,function(p){for(var m=-1,b=d.length,x;++m<b;)c[(x=d[m]).i]=x.x(p);return c.join("")}}}var md=qs(pd,"px, ","px)","deg)"),yd=qs(gd,", ",")",")"),We=0,fr=0,nr=0,Ds=1e3,fi,pr,pi=0,ke=0,Ni=0,Br=typeof performance=="object"&&performance.now?performance:Date,$s=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Jo(){return ke||($s(bd),ke=Br.now()+Ni)}function bd(){ke=0}function gi(){this._call=this._time=this._next=null}gi.prototype=zs.prototype={constructor:gi,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?Jo():+r)+(e==null?0:+e),!this._next&&pr!==this&&(pr?pr._next=this:fi=this,pr=this),this._call=t,this._time=r,Lo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Lo())}};function zs(t,e,r){var i=new gi;return i.restart(t,e,r),i}function _d(){Jo(),++We;for(var t=fi,e;t;)(e=ke-t._time)>=0&&t._call.call(void 0,e),t=t._next;--We}function la(){ke=(pi=Br.now())+Ni,We=fr=0;try{_d()}finally{We=0,xd(),ke=0}}function Cd(){var t=Br.now(),e=t-pi;e>Ds&&(Ni-=e,pi=t)}function xd(){for(var t,e=fi,r,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:fi=r);pr=t,Lo(i)}function Lo(t){if(!We){fr&&(fr=clearTimeout(fr));var e=t-ke;e>24?(t<1/0&&(fr=setTimeout(la,t-Br.now()-Ni)),nr&&(nr=clearInterval(nr))):(nr||(pi=Br.now(),nr=setInterval(Cd,Ds)),We=1,$s(la))}}function ha(t,e,r){var i=new gi;return e=e==null?0:+e,i.restart(o=>{i.stop(),t(o+e)},e,r),i}var kd=ys("start","end","cancel","interrupt"),vd=[],Rs=0,ca=1,Fo=2,ei=3,ua=4,Eo=5,ri=6;function qi(t,e,r,i,o,a){var n=t.__transition;if(!n)t.__transition={};else if(r in n)return;Td(t,r,{name:e,index:i,group:o,on:kd,tween:vd,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Rs})}function Qo(t,e){var r=It(t,e);if(r.state>Rs)throw new Error("too late; already scheduled");return r}function Wt(t,e){var r=It(t,e);if(r.state>ei)throw new Error("too late; already running");return r}function It(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Td(t,e,r){var i=t.__transition,o;i[e]=r,r.timer=zs(a,0,r.time);function a(h){r.state=ca,r.timer.restart(n,r.delay,r.time),r.delay<=h&&n(h-r.delay)}function n(h){var u,c,d,p;if(r.state!==ca)return l();for(u in i)if(p=i[u],p.name===r.name){if(p.state===ei)return ha(n);p.state===ua?(p.state=ri,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete i[u]):+u<e&&(p.state=ri,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete i[u])}if(ha(function(){r.state===ei&&(r.state=ua,r.timer.restart(s,r.delay,r.time),s(h))}),r.state=Fo,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Fo){for(r.state=ei,o=new Array(d=r.tween.length),u=0,c=-1;u<d;++u)(p=r.tween[u].value.call(t,t.__data__,r.index,r.group))&&(o[++c]=p);o.length=c+1}}function s(h){for(var u=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=Eo,1),c=-1,d=o.length;++c<d;)o[c].call(t,u);r.state===Eo&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){r.state=ri,r.timer.stop(),delete i[e];for(var h in i)return;delete t.__transition}}function wd(t,e){var r=t.__transition,i,o,a=!0,n;if(r){e=e==null?null:e+"";for(n in r){if((i=r[n]).name!==e){a=!1;continue}o=i.state>Fo&&i.state<Eo,i.state=ri,i.timer.stop(),i.on.call(o?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete r[n]}a&&delete t.__transition}}function Sd(t){return this.each(function(){wd(this,t)})}function Bd(t,e){var r,i;return function(){var o=Wt(this,t),a=o.tween;if(a!==r){i=r=a;for(var n=0,s=i.length;n<s;++n)if(i[n].name===e){i=i.slice(),i.splice(n,1);break}}o.tween=i}}function Ad(t,e,r){var i,o;if(typeof r!="function")throw new Error;return function(){var a=Wt(this,t),n=a.tween;if(n!==i){o=(i=n).slice();for(var s={name:e,value:r},l=0,h=o.length;l<h;++l)if(o[l].name===e){o[l]=s;break}l===h&&o.push(s)}a.tween=o}}function Ld(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i=It(this.node(),r).tween,o=0,a=i.length,n;o<a;++o)if((n=i[o]).name===t)return n.value;return null}return this.each((e==null?Bd:Ad)(r,t,e))}function tn(t,e,r){var i=t._id;return t.each(function(){var o=Wt(this,i);(o.value||(o.value={}))[e]=r.apply(this,arguments)}),function(o){return It(o,i).value[e]}}function Ps(t,e){var r;return(typeof e=="number"?le:e instanceof Sr?aa:(r=Sr(e))?(e=r,aa):fd)(t,e)}function Fd(t){return function(){this.removeAttribute(t)}}function Ed(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Od(t,e,r){var i,o=r+"",a;return function(){var n=this.getAttribute(t);return n===o?null:n===i?a:a=e(i=n,r)}}function Md(t,e,r){var i,o=r+"",a;return function(){var n=this.getAttributeNS(t.space,t.local);return n===o?null:n===i?a:a=e(i=n,r)}}function Id(t,e,r){var i,o,a;return function(){var n,s=r(this),l;return s==null?void this.removeAttribute(t):(n=this.getAttribute(t),l=s+"",n===l?null:n===i&&l===o?a:(o=l,a=e(i=n,s)))}}function Nd(t,e,r){var i,o,a;return function(){var n,s=r(this),l;return s==null?void this.removeAttributeNS(t.space,t.local):(n=this.getAttributeNS(t.space,t.local),l=s+"",n===l?null:n===i&&l===o?a:(o=l,a=e(i=n,s)))}}function qd(t,e){var r=Ii(t),i=r==="transform"?yd:Ps;return this.attrTween(t,typeof e=="function"?(r.local?Nd:Id)(r,i,tn(this,"attr."+t,e)):e==null?(r.local?Ed:Fd)(r):(r.local?Md:Od)(r,i,e))}function Dd(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function $d(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function zd(t,e){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&$d(t,a)),r}return o._value=e,o}function Rd(t,e){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Dd(t,a)),r}return o._value=e,o}function Pd(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var i=Ii(t);return this.tween(r,(i.local?zd:Rd)(i,e))}function jd(t,e){return function(){Qo(this,t).delay=+e.apply(this,arguments)}}function Wd(t,e){return e=+e,function(){Qo(this,t).delay=e}}function Yd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?jd:Wd)(e,t)):It(this.node(),e).delay}function Hd(t,e){return function(){Wt(this,t).duration=+e.apply(this,arguments)}}function Ud(t,e){return e=+e,function(){Wt(this,t).duration=e}}function Xd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Hd:Ud)(e,t)):It(this.node(),e).duration}function Vd(t,e){if(typeof e!="function")throw new Error;return function(){Wt(this,t).ease=e}}function Gd(t){var e=this._id;return arguments.length?this.each(Vd(e,t)):It(this.node(),e).ease}function Kd(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Wt(this,t).ease=r}}function Zd(t){if(typeof t!="function")throw new Error;return this.each(Kd(this._id,t))}function Jd(t){typeof t!="function"&&(t=Cs(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a=e[o],n=a.length,s=i[o]=[],l,h=0;h<n;++h)(l=a[h])&&t.call(l,l.__data__,h,a)&&s.push(l);return new re(i,this._parents,this._name,this._id)}function Qd(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,o=r.length,a=Math.min(i,o),n=new Array(i),s=0;s<a;++s)for(var l=e[s],h=r[s],u=l.length,c=n[s]=new Array(u),d,p=0;p<u;++p)(d=l[p]||h[p])&&(c[p]=d);for(;s<i;++s)n[s]=e[s];return new re(n,this._parents,this._name,this._id)}function tf(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function ef(t,e,r){var i,o,a=tf(e)?Qo:Wt;return function(){var n=a(this,t),s=n.on;s!==i&&(o=(i=s).copy()).on(e,r),n.on=o}}function rf(t,e){var r=this._id;return arguments.length<2?It(this.node(),r).on.on(t):this.each(ef(r,t,e))}function of(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function nf(){return this.on("end.remove",of(this._id))}function af(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Vo(t));for(var i=this._groups,o=i.length,a=new Array(o),n=0;n<o;++n)for(var s=i[n],l=s.length,h=a[n]=new Array(l),u,c,d=0;d<l;++d)(u=s[d])&&(c=t.call(u,u.__data__,d,s))&&("__data__"in u&&(c.__data__=u.__data__),h[d]=c,qi(h[d],e,r,d,h,It(u,r)));return new re(a,this._parents,e,r)}function sf(t){var e=this._name,r=this._id;typeof t!="function"&&(t=_s(t));for(var i=this._groups,o=i.length,a=[],n=[],s=0;s<o;++s)for(var l=i[s],h=l.length,u,c=0;c<h;++c)if(u=l[c]){for(var d=t.call(u,u.__data__,c,l),p,m=It(u,r),b=0,x=d.length;b<x;++b)(p=d[b])&&qi(p,e,r,b,d,m);a.push(d),n.push(u)}return new re(a,n,e,r)}var lf=Mr.prototype.constructor;function hf(){return new lf(this._groups,this._parents)}function cf(t,e){var r,i,o;return function(){var a=je(this,t),n=(this.style.removeProperty(t),je(this,t));return a===n?null:a===r&&n===i?o:o=e(r=a,i=n)}}function js(t){return function(){this.style.removeProperty(t)}}function uf(t,e,r){var i,o=r+"",a;return function(){var n=je(this,t);return n===o?null:n===i?a:a=e(i=n,r)}}function df(t,e,r){var i,o,a;return function(){var n=je(this,t),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(t),je(this,t))),n===l?null:n===i&&l===o?a:(o=l,a=e(i=n,s))}}function ff(t,e){var r,i,o,a="style."+e,n="end."+a,s;return function(){var l=Wt(this,t),h=l.on,u=l.value[a]==null?s||(s=js(e)):void 0;(h!==r||o!==u)&&(i=(r=h).copy()).on(n,o=u),l.on=i}}function pf(t,e,r){var i=(t+="")=="transform"?md:Ps;return e==null?this.styleTween(t,cf(t,i)).on("end.style."+t,js(t)):typeof e=="function"?this.styleTween(t,df(t,i,tn(this,"style."+t,e))).each(ff(this._id,t)):this.styleTween(t,uf(t,i,e),r).on("end.style."+t,null)}function gf(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}function mf(t,e,r){var i,o;function a(){var n=e.apply(this,arguments);return n!==o&&(i=(o=n)&&gf(t,n,r)),i}return a._value=e,a}function yf(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,mf(t,e,r??""))}function bf(t){return function(){this.textContent=t}}function _f(t){return function(){var e=t(this);this.textContent=e??""}}function Cf(t){return this.tween("text",typeof t=="function"?_f(tn(this,"text",t)):bf(t==null?"":t+""))}function xf(t){return function(e){this.textContent=t.call(this,e)}}function kf(t){var e,r;function i(){var o=t.apply(this,arguments);return o!==r&&(e=(r=o)&&xf(o)),e}return i._value=t,i}function vf(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,kf(t))}function Tf(){for(var t=this._name,e=this._id,r=Ws(),i=this._groups,o=i.length,a=0;a<o;++a)for(var n=i[a],s=n.length,l,h=0;h<s;++h)if(l=n[h]){var u=It(l,e);qi(l,t,r,h,n,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new re(i,this._parents,t,r)}function wf(){var t,e,r=this,i=r._id,o=r.size();return new Promise(function(a,n){var s={value:n},l={value:function(){--o===0&&a()}};r.each(function(){var h=Wt(this,i),u=h.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),h.on=e}),o===0&&a()})}var Sf=0;function re(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Ws(){return++Sf}var Gt=Mr.prototype;re.prototype={constructor:re,select:af,selectAll:sf,selectChild:Gt.selectChild,selectChildren:Gt.selectChildren,filter:Jd,merge:Qd,selection:hf,transition:Tf,call:Gt.call,nodes:Gt.nodes,node:Gt.node,size:Gt.size,empty:Gt.empty,each:Gt.each,on:rf,attr:qd,attrTween:Pd,style:pf,styleTween:yf,text:Cf,textTween:vf,remove:nf,tween:Ld,delay:Yd,duration:Xd,ease:Gd,easeVarying:Zd,end:wf,[Symbol.iterator]:Gt[Symbol.iterator]};function Bf(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Af={time:null,delay:0,duration:250,ease:Bf};function Lf(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function Ff(t){var e,r;t instanceof re?(e=t._id,t=t._name):(e=Ws(),(r=Af).time=Jo(),t=t==null?null:t+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var n=i[a],s=n.length,l,h=0;h<s;++h)(l=n[h])&&qi(l,t,e,h,n,r||Lf(l,e));return new re(i,this._parents,t,e)}Mr.prototype.interrupt=Sd;Mr.prototype.transition=Ff;const nk=Math.abs,ak=Math.atan2,sk=Math.cos,lk=Math.max,hk=Math.min,ck=Math.sin,uk=Math.sqrt,da=1e-12,en=Math.PI,fa=en/2,dk=2*en;function fk(t){return t>1?0:t<-1?en:Math.acos(t)}function pk(t){return t>=1?fa:t<=-1?-fa:Math.asin(t)}function Ys(t){this._context=t}Ys.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Ef(t){return new Ys(t)}class Hs{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function Of(t){return new Hs(t,!0)}function Mf(t){return new Hs(t,!1)}function ue(){}function mi(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function Di(t){this._context=t}Di.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:mi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:mi(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function If(t){return new Di(t)}function Us(t){this._context=t}Us.prototype={areaStart:ue,areaEnd:ue,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:mi(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Nf(t){return new Us(t)}function Xs(t){this._context=t}Xs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:mi(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function qf(t){return new Xs(t)}function Vs(t,e){this._basis=new Di(t),this._beta=e}Vs.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i=t[0],o=e[0],a=t[r]-i,n=e[r]-o,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+l*a),this._beta*e[s]+(1-this._beta)*(o+l*n));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Df=(function t(e){function r(i){return e===1?new Di(i):new Vs(i,e)}return r.beta=function(i){return t(+i)},r})(.85);function yi(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function rn(t,e){this._context=t,this._k=(1-e)/6}rn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:yi(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:yi(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $f=(function t(e){function r(i){return new rn(i,e)}return r.tension=function(i){return t(+i)},r})(0);function on(t,e){this._context=t,this._k=(1-e)/6}on.prototype={areaStart:ue,areaEnd:ue,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:yi(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zf=(function t(e){function r(i){return new on(i,e)}return r.tension=function(i){return t(+i)},r})(0);function nn(t,e){this._context=t,this._k=(1-e)/6}nn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yi(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Rf=(function t(e){function r(i){return new nn(i,e)}return r.tension=function(i){return t(+i)},r})(0);function an(t,e,r){var i=t._x1,o=t._y1,a=t._x2,n=t._y2;if(t._l01_a>da){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,o=(o*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>da){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*h+t._x1*t._l23_2a-e*t._l12_2a)/u,n=(n*h+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(i,o,a,n,t._x2,t._y2)}function Gs(t,e){this._context=t,this._alpha=e}Gs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:an(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Pf=(function t(e){function r(i){return e?new Gs(i,e):new rn(i,0)}return r.alpha=function(i){return t(+i)},r})(.5);function Ks(t,e){this._context=t,this._alpha=e}Ks.prototype={areaStart:ue,areaEnd:ue,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:an(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const jf=(function t(e){function r(i){return e?new Ks(i,e):new on(i,0)}return r.alpha=function(i){return t(+i)},r})(.5);function Zs(t,e){this._context=t,this._alpha=e}Zs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:an(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Wf=(function t(e){function r(i){return e?new Zs(i,e):new nn(i,0)}return r.alpha=function(i){return t(+i)},r})(.5);function Js(t){this._context=t}Js.prototype={areaStart:ue,areaEnd:ue,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Yf(t){return new Js(t)}function pa(t){return t<0?-1:1}function ga(t,e,r){var i=t._x1-t._x0,o=e-t._x1,a=(t._y1-t._y0)/(i||o<0&&-0),n=(r-t._y1)/(o||i<0&&-0),s=(a*o+n*i)/(i+o);return(pa(a)+pa(n))*Math.min(Math.abs(a),Math.abs(n),.5*Math.abs(s))||0}function ma(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function ho(t,e,r){var i=t._x0,o=t._y0,a=t._x1,n=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,o+s*e,a-s,n-s*r,a,n)}function bi(t){this._context=t}bi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ho(this,this._t0,ma(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,ho(this,ma(this,r=ga(this,t,e)),r);break;default:ho(this,this._t0,r=ga(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function Qs(t){this._context=new tl(t)}(Qs.prototype=Object.create(bi.prototype)).point=function(t,e){bi.prototype.point.call(this,e,t)};function tl(t){this._context=t}tl.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,o,a){this._context.bezierCurveTo(e,t,i,r,a,o)}};function Hf(t){return new bi(t)}function Uf(t){return new Qs(t)}function el(t){this._context=t}el.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var i=ya(t),o=ya(e),a=0,n=1;n<r;++a,++n)this._context.bezierCurveTo(i[0][a],o[0][a],i[1][a],o[1][a],t[n],e[n]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function ya(t){var e,r=t.length-1,i,o=new Array(r),a=new Array(r),n=new Array(r);for(o[0]=0,a[0]=2,n[0]=t[0]+2*t[1],e=1;e<r-1;++e)o[e]=1,a[e]=4,n[e]=4*t[e]+2*t[e+1];for(o[r-1]=2,a[r-1]=7,n[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)i=o[e]/a[e-1],a[e]-=i,n[e]-=i*n[e-1];for(o[r-1]=n[r-1]/a[r-1],e=r-2;e>=0;--e)o[e]=(n[e]-o[e+1])/a[e];for(a[r-1]=(t[r]+o[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-o[e+1];return[o,a]}function Xf(t){return new el(t)}function $i(t,e){this._context=t,this._t=e}$i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function Vf(t){return new $i(t,.5)}function Gf(t){return new $i(t,0)}function Kf(t){return new $i(t,1)}function gr(t,e,r){this.k=t,this.x=e,this.y=r}gr.prototype={constructor:gr,scale:function(t){return t===1?this:new gr(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new gr(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};gr.prototype;/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:rl,setPrototypeOf:ba,isFrozen:Zf,getPrototypeOf:Jf,getOwnPropertyDescriptor:Qf}=Object;let{freeze:pt,seal:wt,create:il}=Object,{apply:Oo,construct:Mo}=typeof Reflect<"u"&&Reflect;pt||(pt=function(t){return t});wt||(wt=function(t){return t});Oo||(Oo=function(t,e,r){return t.apply(e,r)});Mo||(Mo=function(t,e){return new t(...e)});const Gr=gt(Array.prototype.forEach),tp=gt(Array.prototype.lastIndexOf),_a=gt(Array.prototype.pop),ar=gt(Array.prototype.push),ep=gt(Array.prototype.splice),ii=gt(String.prototype.toLowerCase),co=gt(String.prototype.toString),Ca=gt(String.prototype.match),sr=gt(String.prototype.replace),rp=gt(String.prototype.indexOf),ip=gt(String.prototype.trim),Et=gt(Object.prototype.hasOwnProperty),ut=gt(RegExp.prototype.test),lr=op(TypeError);function gt(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return Oo(t,e,i)}}function op(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return Mo(t,r)}}function W(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ii;ba&&ba(t,null);let i=e.length;for(;i--;){let o=e[i];if(typeof o=="string"){const a=r(o);a!==o&&(Zf(e)||(e[i]=a),o=a)}t[o]=!0}return t}function np(t){for(let e=0;e<t.length;e++)Et(t,e)||(t[e]=null);return t}function Jt(t){const e=il(null);for(const[r,i]of rl(t))Et(t,r)&&(Array.isArray(i)?e[r]=np(i):i&&typeof i=="object"&&i.constructor===Object?e[r]=Jt(i):e[r]=i);return e}function hr(t,e){for(;t!==null;){const i=Qf(t,e);if(i){if(i.get)return gt(i.get);if(typeof i.value=="function")return gt(i.value)}t=Jf(t)}function r(){return null}return r}const xa=pt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),uo=pt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),fo=pt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ap=pt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),po=pt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),sp=pt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ka=pt(["#text"]),va=pt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),go=pt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ta=pt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Kr=pt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),lp=wt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),hp=wt(/<%[\w\W]*|[\w\W]*%>/gm),cp=wt(/\$\{[\w\W]*/gm),up=wt(/^data-[\-\w.\u00B7-\uFFFF]+$/),dp=wt(/^aria-[\-\w]+$/),ol=wt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fp=wt(/^(?:\w+script|data):/i),pp=wt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),nl=wt(/^html$/i),gp=wt(/^[a-z][.\w]*(-[.\w]+)+$/i);var wa=Object.freeze({__proto__:null,ARIA_ATTR:dp,ATTR_WHITESPACE:pp,CUSTOM_ELEMENT:gp,DATA_ATTR:up,DOCTYPE_NAME:nl,ERB_EXPR:hp,IS_ALLOWED_URI:ol,IS_SCRIPT_OR_DATA:fp,MUSTACHE_EXPR:lp,TMPLIT_EXPR:cp});const cr={element:1,text:3,progressingInstruction:7,comment:8,document:9},mp=function(){return typeof window>"u"?null:window},yp=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Sa=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function al(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mp();const e=f=>al(f);if(e.version="3.2.6",e.removed=[],!t||!t.document||t.document.nodeType!==cr.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t;const i=r,o=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:n,Node:s,Element:l,NodeFilter:h,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:c,DOMParser:d,trustedTypes:p}=t,m=l.prototype,b=hr(m,"cloneNode"),x=hr(m,"remove"),E=hr(m,"nextSibling"),_=hr(m,"childNodes"),R=hr(m,"parentNode");if(typeof n=="function"){const f=r.createElement("template");f.content&&f.content.ownerDocument&&(r=f.content.ownerDocument)}let y,j="";const{implementation:U,createNodeIterator:N,createDocumentFragment:tt,getElementsByTagName:ot}=r,{importNode:P}=i;let B=Sa();e.isSupported=typeof rl=="function"&&typeof R=="function"&&U&&U.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:et,ERB_EXPR:oe,TMPLIT_EXPR:I,DATA_ATTR:w,ARIA_ATTR:C,IS_SCRIPT_OR_DATA:A,ATTR_WHITESPACE:k,CUSTOM_ELEMENT:z}=wa;let{IS_ALLOWED_URI:$}=wa,D=null;const G=W({},[...xa,...uo,...fo,...po,...ka]);let Y=null;const rt=W({},[...va,...go,...Ta,...Kr]);let H=Object.seal(il(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),xt=null,Bt=null,ne=!0,At=!0,nt=!1,Lt=!0,kt=!1,Ht=!0,pe=!1,Ji=!1,Qi=!1,Ae=!1,zr=!1,Rr=!1,Fn=!0,En=!1;const Rh="user-content-";let to=!0,rr=!1,Le={},Fe=null;const On=W({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Mn=null;const In=W({},["audio","video","img","source","image","track"]);let eo=null;const Nn=W({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pr="http://www.w3.org/1998/Math/MathML",jr="http://www.w3.org/2000/svg",Ut="http://www.w3.org/1999/xhtml";let Ee=Ut,ro=!1,io=null;const Ph=W({},[Pr,jr,Ut],co);let Wr=W({},["mi","mo","mn","ms","mtext"]),Yr=W({},["annotation-xml"]);const jh=W({},["title","style","font","a","script"]);let ir=null;const Wh=["application/xhtml+xml","text/html"],Yh="text/html";let it=null,Oe=null;const Hh=r.createElement("form"),qn=function(f){return f instanceof RegExp||f instanceof Function},oo=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Oe&&Oe===f)){if((!f||typeof f!="object")&&(f={}),f=Jt(f),ir=Wh.indexOf(f.PARSER_MEDIA_TYPE)===-1?Yh:f.PARSER_MEDIA_TYPE,it=ir==="application/xhtml+xml"?co:ii,D=Et(f,"ALLOWED_TAGS")?W({},f.ALLOWED_TAGS,it):G,Y=Et(f,"ALLOWED_ATTR")?W({},f.ALLOWED_ATTR,it):rt,io=Et(f,"ALLOWED_NAMESPACES")?W({},f.ALLOWED_NAMESPACES,co):Ph,eo=Et(f,"ADD_URI_SAFE_ATTR")?W(Jt(Nn),f.ADD_URI_SAFE_ATTR,it):Nn,Mn=Et(f,"ADD_DATA_URI_TAGS")?W(Jt(In),f.ADD_DATA_URI_TAGS,it):In,Fe=Et(f,"FORBID_CONTENTS")?W({},f.FORBID_CONTENTS,it):On,xt=Et(f,"FORBID_TAGS")?W({},f.FORBID_TAGS,it):Jt({}),Bt=Et(f,"FORBID_ATTR")?W({},f.FORBID_ATTR,it):Jt({}),Le=Et(f,"USE_PROFILES")?f.USE_PROFILES:!1,ne=f.ALLOW_ARIA_ATTR!==!1,At=f.ALLOW_DATA_ATTR!==!1,nt=f.ALLOW_UNKNOWN_PROTOCOLS||!1,Lt=f.ALLOW_SELF_CLOSE_IN_ATTR!==!1,kt=f.SAFE_FOR_TEMPLATES||!1,Ht=f.SAFE_FOR_XML!==!1,pe=f.WHOLE_DOCUMENT||!1,Ae=f.RETURN_DOM||!1,zr=f.RETURN_DOM_FRAGMENT||!1,Rr=f.RETURN_TRUSTED_TYPE||!1,Qi=f.FORCE_BODY||!1,Fn=f.SANITIZE_DOM!==!1,En=f.SANITIZE_NAMED_PROPS||!1,to=f.KEEP_CONTENT!==!1,rr=f.IN_PLACE||!1,$=f.ALLOWED_URI_REGEXP||ol,Ee=f.NAMESPACE||Ut,Wr=f.MATHML_TEXT_INTEGRATION_POINTS||Wr,Yr=f.HTML_INTEGRATION_POINTS||Yr,H=f.CUSTOM_ELEMENT_HANDLING||{},f.CUSTOM_ELEMENT_HANDLING&&qn(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=f.CUSTOM_ELEMENT_HANDLING.tagNameCheck),f.CUSTOM_ELEMENT_HANDLING&&qn(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),f.CUSTOM_ELEMENT_HANDLING&&typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(H.allowCustomizedBuiltInElements=f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),kt&&(At=!1),zr&&(Ae=!0),Le&&(D=W({},ka),Y=[],Le.html===!0&&(W(D,xa),W(Y,va)),Le.svg===!0&&(W(D,uo),W(Y,go),W(Y,Kr)),Le.svgFilters===!0&&(W(D,fo),W(Y,go),W(Y,Kr)),Le.mathMl===!0&&(W(D,po),W(Y,Ta),W(Y,Kr))),f.ADD_TAGS&&(D===G&&(D=Jt(D)),W(D,f.ADD_TAGS,it)),f.ADD_ATTR&&(Y===rt&&(Y=Jt(Y)),W(Y,f.ADD_ATTR,it)),f.ADD_URI_SAFE_ATTR&&W(eo,f.ADD_URI_SAFE_ATTR,it),f.FORBID_CONTENTS&&(Fe===On&&(Fe=Jt(Fe)),W(Fe,f.FORBID_CONTENTS,it)),to&&(D["#text"]=!0),pe&&W(D,["html","head","body"]),D.table&&(W(D,["tbody"]),delete xt.tbody),f.TRUSTED_TYPES_POLICY){if(typeof f.TRUSTED_TYPES_POLICY.createHTML!="function")throw lr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof f.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw lr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=f.TRUSTED_TYPES_POLICY,j=y.createHTML("")}else y===void 0&&(y=yp(p,o)),y!==null&&typeof j=="string"&&(j=y.createHTML(""));pt&&pt(f),Oe=f}},Dn=W({},[...uo,...fo,...ap]),$n=W({},[...po,...sp]),Uh=function(f){let S=R(f);(!S||!S.tagName)&&(S={namespaceURI:Ee,tagName:"template"});const v=ii(f.tagName),X=ii(S.tagName);return io[f.namespaceURI]?f.namespaceURI===jr?S.namespaceURI===Ut?v==="svg":S.namespaceURI===Pr?v==="svg"&&(X==="annotation-xml"||Wr[X]):!!Dn[v]:f.namespaceURI===Pr?S.namespaceURI===Ut?v==="math":S.namespaceURI===jr?v==="math"&&Yr[X]:!!$n[v]:f.namespaceURI===Ut?S.namespaceURI===jr&&!Yr[X]||S.namespaceURI===Pr&&!Wr[X]?!1:!$n[v]&&(jh[v]||!Dn[v]):!!(ir==="application/xhtml+xml"&&io[f.namespaceURI]):!1},ge=function(f){ar(e.removed,{element:f});try{R(f).removeChild(f)}catch{x(f)}},Me=function(f,S){try{ar(e.removed,{attribute:S.getAttributeNode(f),from:S})}catch{ar(e.removed,{attribute:null,from:S})}if(S.removeAttribute(f),f==="is")if(Ae||zr)try{ge(S)}catch{}else try{S.setAttribute(f,"")}catch{}},zn=function(f){let S=null,v=null;if(Qi)f="<remove></remove>"+f;else{const Z=Ca(f,/^[\r\n\t ]+/);v=Z&&Z[0]}ir==="application/xhtml+xml"&&Ee===Ut&&(f='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+f+"</body></html>");const X=y?y.createHTML(f):f;if(Ee===Ut)try{S=new d().parseFromString(X,ir)}catch{}if(!S||!S.documentElement){S=U.createDocument(Ee,"template",null);try{S.documentElement.innerHTML=ro?j:X}catch{}}const at=S.body||S.documentElement;return f&&v&&at.insertBefore(r.createTextNode(v),at.childNodes[0]||null),Ee===Ut?ot.call(S,pe?"html":"body")[0]:pe?S.documentElement:at},Rn=function(f){return N.call(f.ownerDocument||f,f,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},no=function(f){return f instanceof c&&(typeof f.nodeName!="string"||typeof f.textContent!="string"||typeof f.removeChild!="function"||!(f.attributes instanceof u)||typeof f.removeAttribute!="function"||typeof f.setAttribute!="function"||typeof f.namespaceURI!="string"||typeof f.insertBefore!="function"||typeof f.hasChildNodes!="function")},Pn=function(f){return typeof s=="function"&&f instanceof s};function Xt(f,S,v){Gr(f,X=>{X.call(e,S,v,Oe)})}const jn=function(f){let S=null;if(Xt(B.beforeSanitizeElements,f,null),no(f))return ge(f),!0;const v=it(f.nodeName);if(Xt(B.uponSanitizeElement,f,{tagName:v,allowedTags:D}),Ht&&f.hasChildNodes()&&!Pn(f.firstElementChild)&&ut(/<[/\w!]/g,f.innerHTML)&&ut(/<[/\w!]/g,f.textContent)||f.nodeType===cr.progressingInstruction||Ht&&f.nodeType===cr.comment&&ut(/<[/\w]/g,f.data))return ge(f),!0;if(!D[v]||xt[v]){if(!xt[v]&&Yn(v)&&(H.tagNameCheck instanceof RegExp&&ut(H.tagNameCheck,v)||H.tagNameCheck instanceof Function&&H.tagNameCheck(v)))return!1;if(to&&!Fe[v]){const X=R(f)||f.parentNode,at=_(f)||f.childNodes;if(at&&X){const Z=at.length;for(let Vt=Z-1;Vt>=0;--Vt){const Ft=b(at[Vt],!0);Ft.__removalCount=(f.__removalCount||0)+1,X.insertBefore(Ft,E(f))}}}return ge(f),!0}return f instanceof l&&!Uh(f)||(v==="noscript"||v==="noembed"||v==="noframes")&&ut(/<\/no(script|embed|frames)/i,f.innerHTML)?(ge(f),!0):(kt&&f.nodeType===cr.text&&(S=f.textContent,Gr([et,oe,I],X=>{S=sr(S,X," ")}),f.textContent!==S&&(ar(e.removed,{element:f.cloneNode()}),f.textContent=S)),Xt(B.afterSanitizeElements,f,null),!1)},Wn=function(f,S,v){if(Fn&&(S==="id"||S==="name")&&(v in r||v in Hh))return!1;if(!(At&&!Bt[S]&&ut(w,S))&&!(ne&&ut(C,S))){if(!Y[S]||Bt[S]){if(!(Yn(f)&&(H.tagNameCheck instanceof RegExp&&ut(H.tagNameCheck,f)||H.tagNameCheck instanceof Function&&H.tagNameCheck(f))&&(H.attributeNameCheck instanceof RegExp&&ut(H.attributeNameCheck,S)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(S))||S==="is"&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&ut(H.tagNameCheck,v)||H.tagNameCheck instanceof Function&&H.tagNameCheck(v))))return!1}else if(!eo[S]&&!ut($,sr(v,k,""))&&!((S==="src"||S==="xlink:href"||S==="href")&&f!=="script"&&rp(v,"data:")===0&&Mn[f])&&!(nt&&!ut(A,sr(v,k,"")))&&v)return!1}return!0},Yn=function(f){return f!=="annotation-xml"&&Ca(f,z)},Hn=function(f){Xt(B.beforeSanitizeAttributes,f,null);const{attributes:S}=f;if(!S||no(f))return;const v={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let X=S.length;for(;X--;){const at=S[X],{name:Z,namespaceURI:Vt,value:Ft}=at,Nt=it(Z),ao=Ft;let st=Z==="value"?ao:ip(ao);if(v.attrName=Nt,v.attrValue=st,v.keepAttr=!0,v.forceKeepAttr=void 0,Xt(B.uponSanitizeAttribute,f,v),st=v.attrValue,En&&(Nt==="id"||Nt==="name")&&(Me(Z,f),st=Rh+st),Ht&&ut(/((--!?|])>)|<\/(style|title)/i,st)){Me(Z,f);continue}if(v.forceKeepAttr)continue;if(!v.keepAttr){Me(Z,f);continue}if(!Lt&&ut(/\/>/i,st)){Me(Z,f);continue}kt&&Gr([et,oe,I],Vh=>{st=sr(st,Vh," ")});const Un=it(f.nodeName);if(!Wn(Un,Nt,st)){Me(Z,f);continue}if(y&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Vt)switch(p.getAttributeType(Un,Nt)){case"TrustedHTML":{st=y.createHTML(st);break}case"TrustedScriptURL":{st=y.createScriptURL(st);break}}if(st!==ao)try{Vt?f.setAttributeNS(Vt,Z,st):f.setAttribute(Z,st),no(f)?ge(f):_a(e.removed)}catch{Me(Z,f)}}Xt(B.afterSanitizeAttributes,f,null)},Xh=function f(S){let v=null;const X=Rn(S);for(Xt(B.beforeSanitizeShadowDOM,S,null);v=X.nextNode();)Xt(B.uponSanitizeShadowNode,v,null),jn(v),Hn(v),v.content instanceof a&&f(v.content);Xt(B.afterSanitizeShadowDOM,S,null)};return e.sanitize=function(f){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=null,X=null,at=null,Z=null;if(ro=!f,ro&&(f="<!-->"),typeof f!="string"&&!Pn(f))if(typeof f.toString=="function"){if(f=f.toString(),typeof f!="string")throw lr("dirty is not a string, aborting")}else throw lr("toString is not a function");if(!e.isSupported)return f;if(Ji||oo(S),e.removed=[],typeof f=="string"&&(rr=!1),rr){if(f.nodeName){const Nt=it(f.nodeName);if(!D[Nt]||xt[Nt])throw lr("root node is forbidden and cannot be sanitized in-place")}}else if(f instanceof s)v=zn("<!---->"),X=v.ownerDocument.importNode(f,!0),X.nodeType===cr.element&&X.nodeName==="BODY"||X.nodeName==="HTML"?v=X:v.appendChild(X);else{if(!Ae&&!kt&&!pe&&f.indexOf("<")===-1)return y&&Rr?y.createHTML(f):f;if(v=zn(f),!v)return Ae?null:Rr?j:""}v&&Qi&&ge(v.firstChild);const Vt=Rn(rr?f:v);for(;at=Vt.nextNode();)jn(at),Hn(at),at.content instanceof a&&Xh(at.content);if(rr)return f;if(Ae){if(zr)for(Z=tt.call(v.ownerDocument);v.firstChild;)Z.appendChild(v.firstChild);else Z=v;return(Y.shadowroot||Y.shadowrootmode)&&(Z=P.call(i,Z,!0)),Z}let Ft=pe?v.outerHTML:v.innerHTML;return pe&&D["!doctype"]&&v.ownerDocument&&v.ownerDocument.doctype&&v.ownerDocument.doctype.name&&ut(nl,v.ownerDocument.doctype.name)&&(Ft="<!DOCTYPE "+v.ownerDocument.doctype.name+`>
`+Ft),kt&&Gr([et,oe,I],Nt=>{Ft=sr(Ft,Nt," ")}),y&&Rr?y.createHTML(Ft):Ft},e.setConfig=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};oo(f),Ji=!0},e.clearConfig=function(){Oe=null,Ji=!1},e.isValidAttribute=function(f,S,v){Oe||oo({});const X=it(f),at=it(S);return Wn(X,at,v)},e.addHook=function(f,S){typeof S=="function"&&ar(B[f],S)},e.removeHook=function(f,S){if(S!==void 0){const v=tp(B[f],S);return v===-1?void 0:ep(B[f],v,1)[0]}return _a(B[f])},e.removeHooks=function(f){B[f]=[]},e.removeAllHooks=function(){B=Sa()},e}var Ye=al();const oi={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const o=r<.5?r*(1+e):r+e-r*e,a=2*r-o;switch(i){case"r":return oi.hue2rgb(a,o,t+1/3)*255;case"g":return oi.hue2rgb(a,o,t)*255;case"b":return oi.hue2rgb(a,o,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const o=Math.max(t,e,r),a=Math.min(t,e,r),n=(o+a)/2;if(i==="l")return n*100;if(o===a)return 0;const s=o-a,l=n>.5?s/(2-o-a):s/(o+a);if(i==="s")return l*100;switch(o){case t:return((e-r)/s+(e<r?6:0))*60;case e:return((r-t)/s+2)*60;case r:return((t-e)/s+4)*60;default:return-1}}},bp={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},_p={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},q={channel:oi,lang:bp,unit:_p},se={};for(let t=0;t<=255;t++)se[t]=q.unit.dec2hex(t);const lt={ALL:0,RGB:1,HSL:2};class Cp{constructor(){this.type=lt.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=lt.ALL}is(e){return this.type===e}}class xp{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new Cp}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=lt.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:i,l:o}=e;r===void 0&&(e.h=q.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=q.channel.rgb2hsl(e,"s")),o===void 0&&(e.l=q.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:i,b:o}=e;r===void 0&&(e.r=q.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=q.channel.hsl2rgb(e,"g")),o===void 0&&(e.b=q.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(lt.HSL)&&r!==void 0?r:(this._ensureHSL(),q.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(lt.HSL)&&r!==void 0?r:(this._ensureHSL(),q.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(lt.HSL)&&r!==void 0?r:(this._ensureHSL(),q.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(lt.RGB)&&r!==void 0?r:(this._ensureRGB(),q.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(lt.RGB)&&r!==void 0?r:(this._ensureRGB(),q.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(lt.RGB)&&r!==void 0?r:(this._ensureRGB(),q.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(lt.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(lt.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(lt.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(lt.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(lt.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(lt.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const zi=new xp({r:0,g:0,b:0,a:0},"transparent"),ze={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(ze.re);if(!e)return;const r=e[1],i=parseInt(r,16),o=r.length,a=o%4===0,n=o>4,s=n?1:17,l=n?8:4,h=a?0:-1,u=n?255:15;return zi.set({r:(i>>l*(h+3)&u)*s,g:(i>>l*(h+2)&u)*s,b:(i>>l*(h+1)&u)*s,a:a?(i&u)*s/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`#${se[Math.round(e)]}${se[Math.round(r)]}${se[Math.round(i)]}${se[Math.round(o*255)]}`:`#${se[Math.round(e)]}${se[Math.round(r)]}${se[Math.round(i)]}`}},_e={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(_e.hueRe);if(e){const[,r,i]=e;switch(i){case"grad":return q.channel.clamp.h(parseFloat(r)*.9);case"rad":return q.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return q.channel.clamp.h(parseFloat(r)*360)}}return q.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(_e.re);if(!r)return;const[,i,o,a,n,s]=r;return zi.set({h:_e._hue2deg(i),s:q.channel.clamp.s(parseFloat(o)),l:q.channel.clamp.l(parseFloat(a)),a:n?q.channel.clamp.a(s?parseFloat(n)/100:parseFloat(n)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:o}=t;return o<1?`hsla(${q.lang.round(e)}, ${q.lang.round(r)}%, ${q.lang.round(i)}%, ${o})`:`hsl(${q.lang.round(e)}, ${q.lang.round(r)}%, ${q.lang.round(i)}%)`}},br={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=br.colors[t];if(e)return ze.parse(e)},stringify:t=>{const e=ze.stringify(t);for(const r in br.colors)if(br.colors[r]===e)return r}},mr={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const r=t.match(mr.re);if(!r)return;const[,i,o,a,n,s,l,h,u]=r;return zi.set({r:q.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:q.channel.clamp.g(n?parseFloat(a)*2.55:parseFloat(a)),b:q.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:h?q.channel.clamp.a(u?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`rgba(${q.lang.round(e)}, ${q.lang.round(r)}, ${q.lang.round(i)}, ${q.lang.round(o)})`:`rgb(${q.lang.round(e)}, ${q.lang.round(r)}, ${q.lang.round(i)})`}},Rt={format:{keyword:br,hex:ze,rgb:mr,rgba:mr,hsl:_e,hsla:_e},parse:t=>{if(typeof t!="string")return t;const e=ze.parse(t)||mr.parse(t)||_e.parse(t)||br.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(lt.HSL)||t.data.r===void 0?_e.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?mr.stringify(t):ze.stringify(t)},sl=(t,e)=>{const r=Rt.parse(t);for(const i in e)r[i]=q.channel.clamp[i](e[i]);return Rt.stringify(r)},_r=(t,e,r=0,i=1)=>{if(typeof t!="number")return sl(t,{a:e});const o=zi.set({r:q.channel.clamp.r(t),g:q.channel.clamp.g(e),b:q.channel.clamp.b(r),a:q.channel.clamp.a(i)});return Rt.stringify(o)},kp=t=>{const{r:e,g:r,b:i}=Rt.parse(t),o=.2126*q.channel.toLinear(e)+.7152*q.channel.toLinear(r)+.0722*q.channel.toLinear(i);return q.lang.round(o)},vp=t=>kp(t)>=.5,Nr=t=>!vp(t),ll=(t,e,r)=>{const i=Rt.parse(t),o=i[e],a=q.channel.clamp[e](o+r);return o!==a&&(i[e]=a),Rt.stringify(i)},L=(t,e)=>ll(t,"l",e),M=(t,e)=>ll(t,"l",-e),g=(t,e)=>{const r=Rt.parse(t),i={};for(const o in e)e[o]&&(i[o]=r[o]+e[o]);return sl(t,i)},Tp=(t,e,r=50)=>{const{r:i,g:o,b:a,a:n}=Rt.parse(t),{r:s,g:l,b:h,a:u}=Rt.parse(e),c=r/100,d=c*2-1,p=n-u,m=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,b=1-m,x=i*m+s*b,E=o*m+l*b,_=a*m+h*b,R=n*c+u*(1-c);return _r(x,E,_,R)},T=(t,e=100)=>{const r=Rt.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Tp(r,t,e)};var hl=typeof global=="object"&&global&&global.Object===Object&&global,wp=typeof self=="object"&&self&&self.Object===Object&&self,Yt=hl||wp||Function("return this")(),_i=Yt.Symbol,cl=Object.prototype,Sp=cl.hasOwnProperty,Bp=cl.toString,ur=_i?_i.toStringTag:void 0;function Ap(t){var e=Sp.call(t,ur),r=t[ur];try{t[ur]=void 0;var i=!0}catch{}var o=Bp.call(t);return i&&(e?t[ur]=r:delete t[ur]),o}var Lp=Object.prototype,Fp=Lp.toString;function Ep(t){return Fp.call(t)}var Op="[object Null]",Mp="[object Undefined]",Ba=_i?_i.toStringTag:void 0;function Je(t){return t==null?t===void 0?Mp:Op:Ba&&Ba in Object(t)?Ap(t):Ep(t)}function we(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ip="[object AsyncFunction]",Np="[object Function]",qp="[object GeneratorFunction]",Dp="[object Proxy]";function sn(t){if(!we(t))return!1;var e=Je(t);return e==Np||e==qp||e==Ip||e==Dp}var mo=Yt["__core-js_shared__"],Aa=(function(){var t=/[^.]+$/.exec(mo&&mo.keys&&mo.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function $p(t){return!!Aa&&Aa in t}var zp=Function.prototype,Rp=zp.toString;function Se(t){if(t!=null){try{return Rp.call(t)}catch{}try{return t+""}catch{}}return""}var Pp=/[\\^$.*+?()[\]{}|]/g,jp=/^\[object .+?Constructor\]$/,Wp=Function.prototype,Yp=Object.prototype,Hp=Wp.toString,Up=Yp.hasOwnProperty,Xp=RegExp("^"+Hp.call(Up).replace(Pp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vp(t){if(!we(t)||$p(t))return!1;var e=sn(t)?Xp:jp;return e.test(Se(t))}function Gp(t,e){return t==null?void 0:t[e]}function Be(t,e){var r=Gp(t,e);return Vp(r)?r:void 0}var Ar=Be(Object,"create");function Kp(){this.__data__=Ar?Ar(null):{},this.size=0}function Zp(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Jp="__lodash_hash_undefined__",Qp=Object.prototype,tg=Qp.hasOwnProperty;function eg(t){var e=this.__data__;if(Ar){var r=e[t];return r===Jp?void 0:r}return tg.call(e,t)?e[t]:void 0}var rg=Object.prototype,ig=rg.hasOwnProperty;function og(t){var e=this.__data__;return Ar?e[t]!==void 0:ig.call(e,t)}var ng="__lodash_hash_undefined__";function ag(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ar&&e===void 0?ng:e,this}function ve(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}ve.prototype.clear=Kp;ve.prototype.delete=Zp;ve.prototype.get=eg;ve.prototype.has=og;ve.prototype.set=ag;function sg(){this.__data__=[],this.size=0}function Ri(t,e){return t===e||t!==t&&e!==e}function Pi(t,e){for(var r=t.length;r--;)if(Ri(t[r][0],e))return r;return-1}var lg=Array.prototype,hg=lg.splice;function cg(t){var e=this.__data__,r=Pi(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():hg.call(e,r,1),--this.size,!0}function ug(t){var e=this.__data__,r=Pi(e,t);return r<0?void 0:e[r][1]}function dg(t){return Pi(this.__data__,t)>-1}function fg(t,e){var r=this.__data__,i=Pi(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}function ie(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}ie.prototype.clear=sg;ie.prototype.delete=cg;ie.prototype.get=ug;ie.prototype.has=dg;ie.prototype.set=fg;var Lr=Be(Yt,"Map");function pg(){this.size=0,this.__data__={hash:new ve,map:new(Lr||ie),string:new ve}}function gg(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function ji(t,e){var r=t.__data__;return gg(e)?r[typeof e=="string"?"string":"hash"]:r.map}function mg(t){var e=ji(this,t).delete(t);return this.size-=e?1:0,e}function yg(t){return ji(this,t).get(t)}function bg(t){return ji(this,t).has(t)}function _g(t,e){var r=ji(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}function fe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}fe.prototype.clear=pg;fe.prototype.delete=mg;fe.prototype.get=yg;fe.prototype.has=bg;fe.prototype.set=_g;var Cg="Expected a function";function qr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Cg);var r=function(){var i=arguments,o=e?e.apply(this,i):i[0],a=r.cache;if(a.has(o))return a.get(o);var n=t.apply(this,i);return r.cache=a.set(o,n)||a,n};return r.cache=new(qr.Cache||fe),r}qr.Cache=fe;function xg(){this.__data__=new ie,this.size=0}function kg(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function vg(t){return this.__data__.get(t)}function Tg(t){return this.__data__.has(t)}var wg=200;function Sg(t,e){var r=this.__data__;if(r instanceof ie){var i=r.__data__;if(!Lr||i.length<wg-1)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new fe(i)}return r.set(t,e),this.size=r.size,this}function Qe(t){var e=this.__data__=new ie(t);this.size=e.size}Qe.prototype.clear=xg;Qe.prototype.delete=kg;Qe.prototype.get=vg;Qe.prototype.has=Tg;Qe.prototype.set=Sg;var Ci=(function(){try{var t=Be(Object,"defineProperty");return t({},"",{}),t}catch{}})();function ln(t,e,r){e=="__proto__"&&Ci?Ci(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Io(t,e,r){(r!==void 0&&!Ri(t[e],r)||r===void 0&&!(e in t))&&ln(t,e,r)}function Bg(t){return function(e,r,i){for(var o=-1,a=Object(e),n=i(e),s=n.length;s--;){var l=n[++o];if(r(a[l],l,a)===!1)break}return e}}var Ag=Bg(),ul=typeof exports=="object"&&exports&&!exports.nodeType&&exports,La=ul&&typeof module=="object"&&module&&!module.nodeType&&module,Lg=La&&La.exports===ul,Fa=Lg?Yt.Buffer:void 0,Ea=Fa?Fa.allocUnsafe:void 0;function Fg(t,e){if(e)return t.slice();var r=t.length,i=Ea?Ea(r):new t.constructor(r);return t.copy(i),i}var Oa=Yt.Uint8Array;function Eg(t){var e=new t.constructor(t.byteLength);return new Oa(e).set(new Oa(t)),e}function Og(t,e){var r=e?Eg(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Mg(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}var Ma=Object.create,Ig=(function(){function t(){}return function(e){if(!we(e))return{};if(Ma)return Ma(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})();function dl(t,e){return function(r){return t(e(r))}}var fl=dl(Object.getPrototypeOf,Object),Ng=Object.prototype;function Wi(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Ng;return t===r}function qg(t){return typeof t.constructor=="function"&&!Wi(t)?Ig(fl(t)):{}}function Dr(t){return t!=null&&typeof t=="object"}var Dg="[object Arguments]";function Ia(t){return Dr(t)&&Je(t)==Dg}var pl=Object.prototype,$g=pl.hasOwnProperty,zg=pl.propertyIsEnumerable,xi=Ia((function(){return arguments})())?Ia:function(t){return Dr(t)&&$g.call(t,"callee")&&!zg.call(t,"callee")},ki=Array.isArray,Rg=9007199254740991;function gl(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Rg}function Yi(t){return t!=null&&gl(t.length)&&!sn(t)}function Pg(t){return Dr(t)&&Yi(t)}function jg(){return!1}var ml=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Na=ml&&typeof module=="object"&&module&&!module.nodeType&&module,Wg=Na&&Na.exports===ml,qa=Wg?Yt.Buffer:void 0,Yg=qa?qa.isBuffer:void 0,hn=Yg||jg,Hg="[object Object]",Ug=Function.prototype,Xg=Object.prototype,yl=Ug.toString,Vg=Xg.hasOwnProperty,Gg=yl.call(Object);function Kg(t){if(!Dr(t)||Je(t)!=Hg)return!1;var e=fl(t);if(e===null)return!0;var r=Vg.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&yl.call(r)==Gg}var Zg="[object Arguments]",Jg="[object Array]",Qg="[object Boolean]",tm="[object Date]",em="[object Error]",rm="[object Function]",im="[object Map]",om="[object Number]",nm="[object Object]",am="[object RegExp]",sm="[object Set]",lm="[object String]",hm="[object WeakMap]",cm="[object ArrayBuffer]",um="[object DataView]",dm="[object Float32Array]",fm="[object Float64Array]",pm="[object Int8Array]",gm="[object Int16Array]",mm="[object Int32Array]",ym="[object Uint8Array]",bm="[object Uint8ClampedArray]",_m="[object Uint16Array]",Cm="[object Uint32Array]",V={};V[dm]=V[fm]=V[pm]=V[gm]=V[mm]=V[ym]=V[bm]=V[_m]=V[Cm]=!0;V[Zg]=V[Jg]=V[cm]=V[Qg]=V[um]=V[tm]=V[em]=V[rm]=V[im]=V[om]=V[nm]=V[am]=V[sm]=V[lm]=V[hm]=!1;function xm(t){return Dr(t)&&gl(t.length)&&!!V[Je(t)]}function km(t){return function(e){return t(e)}}var bl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Cr=bl&&typeof module=="object"&&module&&!module.nodeType&&module,vm=Cr&&Cr.exports===bl,yo=vm&&hl.process,Da=(function(){try{var t=Cr&&Cr.require&&Cr.require("util").types;return t||yo&&yo.binding&&yo.binding("util")}catch{}})(),$a=Da&&Da.isTypedArray,cn=$a?km($a):xm;function No(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Tm=Object.prototype,wm=Tm.hasOwnProperty;function Sm(t,e,r){var i=t[e];(!(wm.call(t,e)&&Ri(i,r))||r===void 0&&!(e in t))&&ln(t,e,r)}function Bm(t,e,r,i){var o=!r;r||(r={});for(var a=-1,n=e.length;++a<n;){var s=e[a],l=void 0;l===void 0&&(l=t[s]),o?ln(r,s,l):Sm(r,s,l)}return r}function Am(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}var Lm=9007199254740991,Fm=/^(?:0|[1-9]\d*)$/;function _l(t,e){var r=typeof t;return e=e??Lm,!!e&&(r=="number"||r!="symbol"&&Fm.test(t))&&t>-1&&t%1==0&&t<e}var Em=Object.prototype,Om=Em.hasOwnProperty;function Mm(t,e){var r=ki(t),i=!r&&xi(t),o=!r&&!i&&hn(t),a=!r&&!i&&!o&&cn(t),n=r||i||o||a,s=n?Am(t.length,String):[],l=s.length;for(var h in t)(e||Om.call(t,h))&&!(n&&(h=="length"||o&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||_l(h,l)))&&s.push(h);return s}function Im(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Nm=Object.prototype,qm=Nm.hasOwnProperty;function Dm(t){if(!we(t))return Im(t);var e=Wi(t),r=[];for(var i in t)i=="constructor"&&(e||!qm.call(t,i))||r.push(i);return r}function Cl(t){return Yi(t)?Mm(t,!0):Dm(t)}function $m(t){return Bm(t,Cl(t))}function zm(t,e,r,i,o,a,n){var s=No(t,r),l=No(e,r),h=n.get(l);if(h){Io(t,r,h);return}var u=a?a(s,l,r+"",t,e,n):void 0,c=u===void 0;if(c){var d=ki(l),p=!d&&hn(l),m=!d&&!p&&cn(l);u=l,d||p||m?ki(s)?u=s:Pg(s)?u=Mg(s):p?(c=!1,u=Fg(l,!0)):m?(c=!1,u=Og(l,!0)):u=[]:Kg(l)||xi(l)?(u=s,xi(s)?u=$m(s):(!we(s)||sn(s))&&(u=qg(l))):c=!1}c&&(n.set(l,u),o(u,l,i,a,n),n.delete(l)),Io(t,r,u)}function xl(t,e,r,i,o){t!==e&&Ag(e,function(a,n){if(o||(o=new Qe),we(a))zm(t,e,n,r,xl,i,o);else{var s=i?i(No(t,n),a,n+"",t,e,o):void 0;s===void 0&&(s=a),Io(t,n,s)}},Cl)}function kl(t){return t}function Rm(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var za=Math.max;function Pm(t,e,r){return e=za(e===void 0?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=za(i.length-e,0),n=Array(a);++o<a;)n[o]=i[e+o];o=-1;for(var s=Array(e+1);++o<e;)s[o]=i[o];return s[e]=r(n),Rm(t,this,s)}}function jm(t){return function(){return t}}var Wm=Ci?function(t,e){return Ci(t,"toString",{configurable:!0,enumerable:!1,value:jm(e),writable:!0})}:kl,Ym=800,Hm=16,Um=Date.now;function Xm(t){var e=0,r=0;return function(){var i=Um(),o=Hm-(i-r);if(r=i,o>0){if(++e>=Ym)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Vm=Xm(Wm);function Gm(t,e){return Vm(Pm(t,e,kl),t+"")}function Km(t,e,r){if(!we(r))return!1;var i=typeof e;return(i=="number"?Yi(r)&&_l(e,r.length):i=="string"&&e in r)?Ri(r[e],t):!1}function Zm(t){return Gm(function(e,r){var i=-1,o=r.length,a=o>1?r[o-1]:void 0,n=o>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,n&&Km(r[0],r[1],n)&&(a=o<3?void 0:a,o=1),e=Object(e);++i<o;){var s=r[i];s&&t(e,s,i,a)}return e})}var Jm=Zm(function(t,e,r){xl(t,e,r)}),vl="comm",Tl="rule",wl="decl",Qm="@import",ty="@namespace",ey="@keyframes",ry="@layer",Sl=Math.abs,un=String.fromCharCode;function Bl(t){return t.trim()}function ni(t,e,r){return t.replace(e,r)}function iy(t,e,r){return t.indexOf(e,r)}function Re(t,e){return t.charCodeAt(e)|0}function He(t,e,r){return t.slice(e,r)}function Dt(t){return t.length}function oy(t){return t.length}function Zr(t,e){return e.push(t),t}var Hi=1,Ue=1,Al=0,St=0,J=0,tr="";function dn(t,e,r,i,o,a,n,s){return{value:t,root:e,parent:r,type:i,props:o,children:a,line:Hi,column:Ue,length:n,return:"",siblings:s}}function ny(){return J}function ay(){return J=St>0?Re(tr,--St):0,Ue--,J===10&&(Ue=1,Hi--),J}function Mt(){return J=St<Al?Re(tr,St++):0,Ue++,J===10&&(Ue=1,Hi++),J}function he(){return Re(tr,St)}function ai(){return St}function Ui(t,e){return He(tr,t,e)}function Fr(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function sy(t){return Hi=Ue=1,Al=Dt(tr=t),St=0,[]}function ly(t){return tr="",t}function bo(t){return Bl(Ui(St-1,qo(t===91?t+2:t===40?t+1:t)))}function hy(t){for(;(J=he())&&J<33;)Mt();return Fr(t)>2||Fr(J)>3?"":" "}function cy(t,e){for(;--e&&Mt()&&!(J<48||J>102||J>57&&J<65||J>70&&J<97););return Ui(t,ai()+(e<6&&he()==32&&Mt()==32))}function qo(t){for(;Mt();)switch(J){case t:return St;case 34:case 39:t!==34&&t!==39&&qo(J);break;case 40:t===41&&qo(t);break;case 92:Mt();break}return St}function uy(t,e){for(;Mt()&&t+J!==57&&!(t+J===84&&he()===47););return"/*"+Ui(e,St-1)+"*"+un(t===47?t:Mt())}function dy(t){for(;!Fr(he());)Mt();return Ui(t,St)}function fy(t){return ly(si("",null,null,null,[""],t=sy(t),0,[0],t))}function si(t,e,r,i,o,a,n,s,l){for(var h=0,u=0,c=n,d=0,p=0,m=0,b=1,x=1,E=1,_=0,R="",y=o,j=a,U=i,N=R;x;)switch(m=_,_=Mt()){case 40:if(m!=108&&Re(N,c-1)==58){iy(N+=ni(bo(_),"&","&\f"),"&\f",Sl(h?s[h-1]:0))!=-1&&(E=-1);break}case 34:case 39:case 91:N+=bo(_);break;case 9:case 10:case 13:case 32:N+=hy(m);break;case 92:N+=cy(ai()-1,7);continue;case 47:switch(he()){case 42:case 47:Zr(py(uy(Mt(),ai()),e,r,l),l),(Fr(m||1)==5||Fr(he()||1)==5)&&Dt(N)&&He(N,-1,void 0)!==" "&&(N+=" ");break;default:N+="/"}break;case 123*b:s[h++]=Dt(N)*E;case 125*b:case 59:case 0:switch(_){case 0:case 125:x=0;case 59+u:E==-1&&(N=ni(N,/\f/g,"")),p>0&&(Dt(N)-c||b===0&&m===47)&&Zr(p>32?Pa(N+";",i,r,c-1,l):Pa(ni(N," ","")+";",i,r,c-2,l),l);break;case 59:N+=";";default:if(Zr(U=Ra(N,e,r,h,u,o,s,R,y=[],j=[],c,a),a),_===123)if(u===0)si(N,e,U,U,y,a,c,s,j);else{switch(d){case 99:if(Re(N,3)===110)break;case 108:if(Re(N,2)===97)break;default:u=0;case 100:case 109:case 115:}u?si(t,U,U,i&&Zr(Ra(t,U,U,0,0,o,s,R,o,y=[],c,j),j),o,j,c,s,i?y:j):si(N,U,U,U,[""],j,0,s,j)}}h=u=p=0,b=E=1,R=N="",c=n;break;case 58:c=1+Dt(N),p=m;default:if(b<1){if(_==123)--b;else if(_==125&&b++==0&&ay()==125)continue}switch(N+=un(_),_*b){case 38:E=u>0?1:(N+="\f",-1);break;case 44:s[h++]=(Dt(N)-1)*E,E=1;break;case 64:he()===45&&(N+=bo(Mt())),d=he(),u=c=Dt(R=N+=dy(ai())),_++;break;case 45:m===45&&Dt(N)==2&&(b=0)}}return a}function Ra(t,e,r,i,o,a,n,s,l,h,u,c){for(var d=o-1,p=o===0?a:[""],m=oy(p),b=0,x=0,E=0;b<i;++b)for(var _=0,R=He(t,d+1,d=Sl(x=n[b])),y=t;_<m;++_)(y=Bl(x>0?p[_]+" "+R:ni(R,/&\f/g,p[_])))&&(l[E++]=y);return dn(t,e,r,o===0?Tl:s,l,h,u,c)}function py(t,e,r,i){return dn(t,e,r,vl,un(ny()),He(t,2,-2),0,i)}function Pa(t,e,r,i,o){return dn(t,e,r,wl,He(t,0,i),He(t,i+1,-1),i,o)}function Do(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function gy(t,e,r,i){switch(t.type){case ry:if(t.children.length)break;case Qm:case ty:case wl:return t.return=t.return||t.value;case vl:return"";case ey:return t.return=t.value+"{"+Do(t.children,i)+"}";case Tl:if(!Dt(t.value=t.props.join(",")))return""}return Dt(r=Do(t.children,i))?t.return=t.value+"{"+r+"}":""}var my=dl(Object.keys,Object),yy=Object.prototype,by=yy.hasOwnProperty;function _y(t){if(!Wi(t))return my(t);var e=[];for(var r in Object(t))by.call(t,r)&&r!="constructor"&&e.push(r);return e}var $o=Be(Yt,"DataView"),zo=Be(Yt,"Promise"),Ro=Be(Yt,"Set"),Po=Be(Yt,"WeakMap"),ja="[object Map]",Cy="[object Object]",Wa="[object Promise]",Ya="[object Set]",Ha="[object WeakMap]",Ua="[object DataView]",xy=Se($o),ky=Se(Lr),vy=Se(zo),Ty=Se(Ro),wy=Se(Po),me=Je;($o&&me(new $o(new ArrayBuffer(1)))!=Ua||Lr&&me(new Lr)!=ja||zo&&me(zo.resolve())!=Wa||Ro&&me(new Ro)!=Ya||Po&&me(new Po)!=Ha)&&(me=function(t){var e=Je(t),r=e==Cy?t.constructor:void 0,i=r?Se(r):"";if(i)switch(i){case xy:return Ua;case ky:return ja;case vy:return Wa;case Ty:return Ya;case wy:return Ha}return e});var Sy="[object Map]",By="[object Set]",Ay=Object.prototype,Ly=Ay.hasOwnProperty;function _o(t){if(t==null)return!0;if(Yi(t)&&(ki(t)||typeof t=="string"||typeof t.splice=="function"||hn(t)||cn(t)||xi(t)))return!t.length;var e=me(t);if(e==Sy||e==By)return!t.size;if(Wi(t))return!_y(t).length;for(var r in t)if(Ly.call(t,r))return!1;return!0}const Kt={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},O={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},fn=function(t="fatal"){let e=Kt.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Kt&&(e=Kt[t])):typeof t=="number"&&(e=t),O.trace=()=>{},O.debug=()=>{},O.info=()=>{},O.warn=()=>{},O.error=()=>{},O.fatal=()=>{},e<=Kt.fatal&&(O.fatal=console.error?console.error.bind(console,vt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",vt("FATAL"))),e<=Kt.error&&(O.error=console.error?console.error.bind(console,vt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",vt("ERROR"))),e<=Kt.warn&&(O.warn=console.warn?console.warn.bind(console,vt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",vt("WARN"))),e<=Kt.info&&(O.info=console.info?console.info.bind(console,vt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",vt("INFO"))),e<=Kt.debug&&(O.debug=console.debug?console.debug.bind(console,vt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",vt("DEBUG"))),e<=Kt.trace&&(O.trace=console.debug?console.debug.bind(console,vt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",vt("TRACE")))},vt=t=>`%c${gc().format("ss.SSS")} : ${t} : `,$r=/<br\s*\/?>/gi,Fy=t=>t?Fl(t).replace(/\\n/g,"#br#").split("#br#"):[""],Ey=(()=>{let t=!1;return()=>{t||(Oy(),t=!0)}})();function Oy(){const t="data-temp-href-target";Ye.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")||"")}),Ye.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)||""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}const Ll=t=>(Ey(),Ye.sanitize(t)),Xa=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=e.securityLevel;i==="antiscript"||i==="strict"?t=Ll(t):i!=="loose"&&(t=Fl(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=qy(t))}return t},Xe=(t,e)=>t&&(e.dompurifyConfig?t=Ye.sanitize(Xa(t,e),e.dompurifyConfig).toString():t=Ye.sanitize(Xa(t,e),{FORBID_TAGS:["style"]}).toString(),t),My=(t,e)=>typeof t=="string"?Xe(t,e):t.flat().map(r=>Xe(r,e)),Iy=t=>$r.test(t),Ny=t=>t.split($r),qy=t=>t.replace(/#br#/g,"<br/>"),Fl=t=>t.replace($r,"#br#"),Dy=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},El=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),$y=function(...t){const e=t.filter(r=>!isNaN(r));return Math.max(...e)},zy=function(...t){const e=t.filter(r=>!isNaN(r));return Math.min(...e)},gk=function(t){const e=t.split(/(,)/),r=[];for(let i=0;i<e.length;i++){let o=e[i];if(o===","&&i>0&&i+1<e.length){const a=e[i-1],n=e[i+1];Ry(a,n)&&(o=a+","+n,i++,r.pop())}r.push(Py(o))}return r.join("")},jo=(t,e)=>Math.max(0,t.split(e).length-1),Ry=(t,e)=>{const r=jo(t,"~"),i=jo(e,"~");return r===1&&i===1},Py=t=>{const e=jo(t,"~");let r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let o=i.indexOf("~"),a=i.lastIndexOf("~");for(;o!==-1&&a!==-1&&o!==a;)i[o]="<",i[a]=">",o=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},Va=()=>window.MathMLElement!==void 0,Wo=/\$\$(.*)\$\$/g,Ga=t=>{var e;return(((e=t.match(Wo))==null?void 0:e.length)??0)>0},mk=async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Wy(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},jy=async(t,e)=>{if(!Ga(t))return t;if(!Va()&&!e.legacyMathML)return t.replace(Wo,"MathML is unsupported in this environment.");const{default:r}=await K(async()=>{const{default:i}=await import("./layers.9tX9hjoM-DXJ1LYX4.js");return{default:i}},[]);return t.split($r).map(i=>Ga(i)?`
            <div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">
              ${i}
            </div>
          `:`<div>${i}</div>`).join("").replace(Wo,(i,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:Va()?"mathml":"htmlAndMathml"}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))},Wy=async(t,e)=>Xe(await jy(t,e),e),pn={getRows:Fy,sanitizeText:Xe,sanitizeTextOrArray:My,hasBreaks:Iy,splitBreaks:Ny,lineBreakRegex:$r,removeScript:Ll,getUrl:Dy,evaluate:El,getMax:$y,getMin:zy},ft=(t,e)=>e?g(t,{s:-40,l:10}):g(t,{s:-40,l:-10}),Xi="#ffffff",Vi="#f2f2f2";let Yy=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var t,e,r,i,o,a,n,s,l,h,u;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||g(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||g(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||T(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||T(this.tertiaryColor),this.lineColor=this.lineColor||T(this.background),this.arrowheadColor=this.arrowheadColor||T(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?M(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||M(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||T(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||L(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||g(this.primaryColor,{h:30}),this.cScale4=this.cScale4||g(this.primaryColor,{h:60}),this.cScale5=this.cScale5||g(this.primaryColor,{h:90}),this.cScale6=this.cScale6||g(this.primaryColor,{h:120}),this.cScale7=this.cScale7||g(this.primaryColor,{h:150}),this.cScale8=this.cScale8||g(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||g(this.primaryColor,{h:270}),this.cScale10=this.cScale10||g(this.primaryColor,{h:300}),this.cScale11=this.cScale11||g(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=M(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=M(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||T(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||L(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||M(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const c=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||g(this.mainBkg,{h:180,s:-15,l:c*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||g(this.mainBkg,{h:180,s:-15,l:c*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||g(this.primaryColor,{h:64}),this.fillType3=this.fillType3||g(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||g(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||g(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||g(this.primaryColor,{h:128}),this.fillType7=this.fillType7||g(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||g(this.primaryColor,{l:-10}),this.pie5=this.pie5||g(this.secondaryColor,{l:-10}),this.pie6=this.pie6||g(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||g(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||g(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||g(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||g(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||g(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||g(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||g(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||g(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||g(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||g(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||g(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||g(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Nr(this.quadrant1Fill)?L(this.quadrant1Fill):M(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((e=this.xyChart)==null?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((s=this.xyChart)==null?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?M(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||g(this.primaryColor,{h:-30}),this.git4=this.git4||g(this.primaryColor,{h:-60}),this.git5=this.git5||g(this.primaryColor,{h:-90}),this.git6=this.git6||g(this.primaryColor,{h:60}),this.git7=this.git7||g(this.primaryColor,{h:120}),this.darkMode?(this.git0=L(this.git0,25),this.git1=L(this.git1,25),this.git2=L(this.git2,25),this.git3=L(this.git3,25),this.git4=L(this.git4,25),this.git5=L(this.git5,25),this.git6=L(this.git6,25),this.git7=L(this.git7,25)):(this.git0=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)),this.gitInv0=this.gitInv0||T(this.git0),this.gitInv1=this.gitInv1||T(this.git1),this.gitInv2=this.gitInv2||T(this.git2),this.gitInv3=this.gitInv3||T(this.git3),this.gitInv4=this.gitInv4||T(this.git4),this.gitInv5=this.gitInv5||T(this.git5),this.gitInv6=this.gitInv6||T(this.git6),this.gitInv7=this.gitInv7||T(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Xi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Vi}calculate(t){if(typeof t!="object"){this.updateColors();return}const e=Object.keys(t);e.forEach(r=>{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}};const Hy=t=>{const e=new Yy;return e.calculate(t),e};let Uy=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=L(this.primaryColor,16),this.tertiaryColor=g(this.primaryColor,{h:-160}),this.primaryBorderColor=T(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=T(this.primaryColor),this.secondaryTextColor=T(this.secondaryColor),this.tertiaryTextColor=T(this.tertiaryColor),this.lineColor=T(this.background),this.textColor=T(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=L(T("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=_r(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=M("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=M(this.sectionBkgColor,10),this.taskBorderColor=_r(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=_r(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,e,r,i,o,a,n,s,l,h,u;this.secondBkg=L(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=L(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=L(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=g(this.primaryColor,{h:64}),this.fillType3=g(this.secondaryColor,{h:64}),this.fillType4=g(this.primaryColor,{h:-64}),this.fillType5=g(this.secondaryColor,{h:-64}),this.fillType6=g(this.primaryColor,{h:128}),this.fillType7=g(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||g(this.primaryColor,{h:30}),this.cScale4=this.cScale4||g(this.primaryColor,{h:60}),this.cScale5=this.cScale5||g(this.primaryColor,{h:90}),this.cScale6=this.cScale6||g(this.primaryColor,{h:120}),this.cScale7=this.cScale7||g(this.primaryColor,{h:150}),this.cScale8=this.cScale8||g(this.primaryColor,{h:210}),this.cScale9=this.cScale9||g(this.primaryColor,{h:270}),this.cScale10=this.cScale10||g(this.primaryColor,{h:300}),this.cScale11=this.cScale11||g(this.primaryColor,{h:330});for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleInv"+c]=this["cScaleInv"+c]||T(this["cScale"+c]);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScalePeer"+c]=this["cScalePeer"+c]||L(this["cScale"+c],10);for(let c=0;c<5;c++)this["surface"+c]=this["surface"+c]||g(this.mainBkg,{h:30,s:-30,l:-(-10+c*4)}),this["surfacePeer"+c]=this["surfacePeer"+c]||g(this.mainBkg,{h:30,s:-30,l:-(-7+c*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleLabel"+c]=this["cScaleLabel"+c]||this.scaleLabelColor;for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["pie"+c]=this["cScale"+c];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||g(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||g(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||g(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||g(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||g(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||g(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Nr(this.quadrant1Fill)?L(this.quadrant1Fill):M(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((e=this.xyChart)==null?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((s=this.xyChart)==null?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?M(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=L(this.secondaryColor,20),this.git1=L(this.pie2||this.secondaryColor,20),this.git2=L(this.pie3||this.tertiaryColor,20),this.git3=L(this.pie4||g(this.primaryColor,{h:-30}),20),this.git4=L(this.pie5||g(this.primaryColor,{h:-60}),20),this.git5=L(this.pie6||g(this.primaryColor,{h:-90}),10),this.git6=L(this.pie7||g(this.primaryColor,{h:60}),10),this.git7=L(this.pie8||g(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||T(this.git0),this.gitInv1=this.gitInv1||T(this.git1),this.gitInv2=this.gitInv2||T(this.git2),this.gitInv3=this.gitInv3||T(this.git3),this.gitInv4=this.gitInv4||T(this.git4),this.gitInv5=this.gitInv5||T(this.git5),this.gitInv6=this.gitInv6||T(this.git6),this.gitInv7=this.gitInv7||T(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||T(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||T(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||L(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||L(this.background,2)}calculate(t){if(typeof t!="object"){this.updateColors();return}const e=Object.keys(t);e.forEach(r=>{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}};const Xy=t=>{const e=new Uy;return e.calculate(t),e};let Vy=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=g(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=g(this.primaryColor,{h:-160}),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=T(this.primaryColor),this.secondaryTextColor=T(this.secondaryColor),this.tertiaryTextColor=T(this.tertiaryColor),this.lineColor=T(this.background),this.textColor=T(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=_r(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,e,r,i,o,a,n,s,l,h,u;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||g(this.primaryColor,{h:30}),this.cScale4=this.cScale4||g(this.primaryColor,{h:60}),this.cScale5=this.cScale5||g(this.primaryColor,{h:90}),this.cScale6=this.cScale6||g(this.primaryColor,{h:120}),this.cScale7=this.cScale7||g(this.primaryColor,{h:150}),this.cScale8=this.cScale8||g(this.primaryColor,{h:210}),this.cScale9=this.cScale9||g(this.primaryColor,{h:270}),this.cScale10=this.cScale10||g(this.primaryColor,{h:300}),this.cScale11=this.cScale11||g(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||M(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||M(this.tertiaryColor,40);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScale"+c]=M(this["cScale"+c],10),this["cScalePeer"+c]=this["cScalePeer"+c]||M(this["cScale"+c],25);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleInv"+c]=this["cScaleInv"+c]||g(this["cScale"+c],{h:180});for(let c=0;c<5;c++)this["surface"+c]=this["surface"+c]||g(this.mainBkg,{h:30,l:-(5+c*5)}),this["surfacePeer"+c]=this["surfacePeer"+c]||g(this.mainBkg,{h:30,l:-(7+c*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||T(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||T(this.labelTextColor);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleLabel"+c]=this["cScaleLabel"+c]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=L(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=g(this.primaryColor,{h:64}),this.fillType3=g(this.secondaryColor,{h:64}),this.fillType4=g(this.primaryColor,{h:-64}),this.fillType5=g(this.secondaryColor,{h:-64}),this.fillType6=g(this.primaryColor,{h:128}),this.fillType7=g(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||g(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||g(this.primaryColor,{l:-10}),this.pie5=this.pie5||g(this.secondaryColor,{l:-30}),this.pie6=this.pie6||g(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||g(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||g(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||g(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||g(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||g(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||g(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||g(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||g(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||g(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||g(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||g(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||g(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Nr(this.quadrant1Fill)?L(this.quadrant1Fill):M(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((e=this.xyChart)==null?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((s=this.xyChart)==null?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||g(this.primaryColor,{h:-30}),this.git4=this.git4||g(this.primaryColor,{h:-60}),this.git5=this.git5||g(this.primaryColor,{h:-90}),this.git6=this.git6||g(this.primaryColor,{h:60}),this.git7=this.git7||g(this.primaryColor,{h:120}),this.darkMode?(this.git0=L(this.git0,25),this.git1=L(this.git1,25),this.git2=L(this.git2,25),this.git3=L(this.git3,25),this.git4=L(this.git4,25),this.git5=L(this.git5,25),this.git6=L(this.git6,25),this.git7=L(this.git7,25)):(this.git0=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)),this.gitInv0=this.gitInv0||M(T(this.git0),25),this.gitInv1=this.gitInv1||T(this.git1),this.gitInv2=this.gitInv2||T(this.git2),this.gitInv3=this.gitInv3||T(this.git3),this.gitInv4=this.gitInv4||T(this.git4),this.gitInv5=this.gitInv5||T(this.git5),this.gitInv6=this.gitInv6||T(this.git6),this.gitInv7=this.gitInv7||T(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||T(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||T(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Xi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Vi}calculate(t){if(typeof t!="object"){this.updateColors();return}const e=Object.keys(t);e.forEach(r=>{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}};const Gy=t=>{const e=new Vy;return e.calculate(t),e};let Ky=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=L("#cde498",10),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=T(this.primaryColor),this.secondaryTextColor=T(this.secondaryColor),this.tertiaryTextColor=T(this.primaryColor),this.lineColor=T(this.background),this.textColor=T(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,e,r,i,o,a,n,s,l,h,u;this.actorBorder=M(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||g(this.primaryColor,{h:30}),this.cScale4=this.cScale4||g(this.primaryColor,{h:60}),this.cScale5=this.cScale5||g(this.primaryColor,{h:90}),this.cScale6=this.cScale6||g(this.primaryColor,{h:120}),this.cScale7=this.cScale7||g(this.primaryColor,{h:150}),this.cScale8=this.cScale8||g(this.primaryColor,{h:210}),this.cScale9=this.cScale9||g(this.primaryColor,{h:270}),this.cScale10=this.cScale10||g(this.primaryColor,{h:300}),this.cScale11=this.cScale11||g(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||M(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||M(this.tertiaryColor,40);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScale"+c]=M(this["cScale"+c],10),this["cScalePeer"+c]=this["cScalePeer"+c]||M(this["cScale"+c],25);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleInv"+c]=this["cScaleInv"+c]||g(this["cScale"+c],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleLabel"+c]=this["cScaleLabel"+c]||this.scaleLabelColor;for(let c=0;c<5;c++)this["surface"+c]=this["surface"+c]||g(this.mainBkg,{h:30,s:-30,l:-(5+c*5)}),this["surfacePeer"+c]=this["surfacePeer"+c]||g(this.mainBkg,{h:30,s:-30,l:-(8+c*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=g(this.primaryColor,{h:64}),this.fillType3=g(this.secondaryColor,{h:64}),this.fillType4=g(this.primaryColor,{h:-64}),this.fillType5=g(this.secondaryColor,{h:-64}),this.fillType6=g(this.primaryColor,{h:128}),this.fillType7=g(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||g(this.primaryColor,{l:-30}),this.pie5=this.pie5||g(this.secondaryColor,{l:-30}),this.pie6=this.pie6||g(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||g(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||g(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||g(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||g(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||g(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||g(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||g(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||g(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||g(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||g(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||g(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||g(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Nr(this.quadrant1Fill)?L(this.quadrant1Fill):M(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((e=this.xyChart)==null?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((s=this.xyChart)==null?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||g(this.primaryColor,{h:-30}),this.git4=this.git4||g(this.primaryColor,{h:-60}),this.git5=this.git5||g(this.primaryColor,{h:-90}),this.git6=this.git6||g(this.primaryColor,{h:60}),this.git7=this.git7||g(this.primaryColor,{h:120}),this.darkMode?(this.git0=L(this.git0,25),this.git1=L(this.git1,25),this.git2=L(this.git2,25),this.git3=L(this.git3,25),this.git4=L(this.git4,25),this.git5=L(this.git5,25),this.git6=L(this.git6,25),this.git7=L(this.git7,25)):(this.git0=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)),this.gitInv0=this.gitInv0||T(this.git0),this.gitInv1=this.gitInv1||T(this.git1),this.gitInv2=this.gitInv2||T(this.git2),this.gitInv3=this.gitInv3||T(this.git3),this.gitInv4=this.gitInv4||T(this.git4),this.gitInv5=this.gitInv5||T(this.git5),this.gitInv6=this.gitInv6||T(this.git6),this.gitInv7=this.gitInv7||T(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||T(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||T(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Xi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Vi}calculate(t){if(typeof t!="object"){this.updateColors();return}const e=Object.keys(t);e.forEach(r=>{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}};const Zy=t=>{const e=new Ky;return e.calculate(t),e};class Jy{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=L(this.contrast,55),this.background="#ffffff",this.tertiaryColor=g(this.primaryColor,{h:-160}),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=T(this.primaryColor),this.secondaryTextColor=T(this.secondaryColor),this.tertiaryTextColor=T(this.tertiaryColor),this.lineColor=T(this.background),this.textColor=T(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,r,i,o,a,n,s,l,h,u,c;this.secondBkg=L(this.contrast,55),this.border2=this.contrast,this.actorBorder=L(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||T(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||L(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||M(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||g(this.mainBkg,{l:-(5+d*5)}),this["surfacePeer"+d]=this["surfacePeer"+d]||g(this.mainBkg,{l:-(8+d*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=L(this.contrast,30),this.sectionBkgColor2=L(this.contrast,30),this.taskBorderColor=M(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=L(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=M(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=g(this.primaryColor,{h:64}),this.fillType3=g(this.secondaryColor,{h:64}),this.fillType4=g(this.primaryColor,{h:-64}),this.fillType5=g(this.secondaryColor,{h:-64}),this.fillType6=g(this.primaryColor,{h:128}),this.fillType7=g(this.secondaryColor,{h:128});for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["pie"+d]=this["cScale"+d];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||g(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||g(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||g(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||g(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||g(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||g(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Nr(this.quadrant1Fill)?L(this.quadrant1Fill):M(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((s=this.xyChart)==null?void 0:s.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((c=this.xyChart)==null?void 0:c.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=M(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||g(this.primaryColor,{h:-30}),this.git4=this.pie5||g(this.primaryColor,{h:-60}),this.git5=this.pie6||g(this.primaryColor,{h:-90}),this.git6=this.pie7||g(this.primaryColor,{h:60}),this.git7=this.pie8||g(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||T(this.git0),this.gitInv1=this.gitInv1||T(this.git1),this.gitInv2=this.gitInv2||T(this.git2),this.gitInv3=this.gitInv3||T(this.git3),this.gitInv4=this.gitInv4||T(this.git4),this.gitInv5=this.gitInv5||T(this.git5),this.gitInv6=this.gitInv6||T(this.git6),this.gitInv7=this.gitInv7||T(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Xi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Vi}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}}const Qy=t=>{const e=new Jy;return e.calculate(t),e},ee={base:{getThemeVariables:Hy},dark:{getThemeVariables:Xy},default:{getThemeVariables:Gy},forest:{getThemeVariables:Zy},neutral:{getThemeVariables:Qy}},Zt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},theme:"default",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","maxEdges"],legacyMathML:!1,deterministicIds:!1,fontSize:16},Ol={...Zt,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:ee.default.getThemeVariables(),sequence:{...Zt.sequence,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{...Zt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Zt.c4,useWidth:void 0,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}},pie:{...Zt.pie,useWidth:984},xyChart:{...Zt.xyChart,useWidth:void 0},requirement:{...Zt.requirement,useWidth:void 0},gitGraph:{...Zt.gitGraph,useMaxWidth:!1},sankey:{...Zt.sankey,useMaxWidth:!1}},Ml=(t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...Ml(t[i],"")]:[...r,e+i],[]),t0=new Set(Ml(Ol,"")),e0=Ol,vi=t=>{if(O.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>vi(e));return}for(const e of Object.keys(t)){if(O.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!t0.has(e)||t[e]==null){O.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){O.debug("sanitizing object",e),vi(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(O.debug("sanitizing css option",e),t[e]=r0(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}O.debug("After sanitization",t)}},r0=t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?e++:i==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},Il=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,xr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,i0=/\s*%%.*\n/gm;class Nl extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}}const Ve={},Gi=function(t,e){t=t.replace(Il,"").replace(xr,"").replace(i0,`
`);for(const[r,{detector:i}]of Object.entries(Ve))if(i(t,e))return r;throw new Nl(`No diagram type detected matching given configuration for text: ${t}`)},ql=(...t)=>{for(const{id:e,detector:r,loader:i}of t)Dl(e,r,i)},Dl=(t,e,r)=>{Ve[t]?O.error(`Detector with key ${t} already exists`):Ve[t]={detector:e,loader:r},O.debug(`Detector with key ${t} added${r?" with loader":""}`)},o0=t=>Ve[t].loader,Yo=(t,e,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>Yo(t,a,o)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=Yo(t[a],e[a],{depth:r-1,clobber:i})):(i||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},ht=Yo,n0="​",a0={curveBasis:If,curveBasisClosed:Nf,curveBasisOpen:qf,curveBumpX:Of,curveBumpY:Mf,curveBundle:Df,curveCardinalClosed:zf,curveCardinalOpen:Rf,curveCardinal:$f,curveCatmullRomClosed:jf,curveCatmullRomOpen:Wf,curveCatmullRom:Pf,curveLinear:Ef,curveLinearClosed:Yf,curveMonotoneX:Hf,curveMonotoneY:Uf,curveNatural:Xf,curveStep:Vf,curveStepAfter:Kf,curveStepBefore:Gf},s0=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,l0=function(t,e){const r=$l(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(s=>s.args);vi(n),i=ht(i,[...n])}else i=r.args;if(!i)return;let o=Gi(t,e);const a="config";return i[a]!==void 0&&(o==="flowchart-v2"&&(o="flowchart"),i[o]=i[a],delete i[a]),i},$l=function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${s0.source})(?=[}][%]{2}).*
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),O.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let i;const o=[];for(;(i=xr.exec(t))!==null;)if(i.index===xr.lastIndex&&xr.lastIndex++,i&&!e||e&&i[1]&&i[1].match(e)||e&&i[2]&&i[2].match(e)){const a=i[1]?i[1]:i[2],n=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:a,args:n})}return o.length===0?{type:t,args:null}:o.length===1?o[0]:o}catch(r){return O.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},h0=function(t){return t.replace(xr,"")},c0=function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1};function u0(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return a0[r]??e}function d0(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?Gh.sanitizeUrl(r):r}const f0=(t,...e)=>{const r=t.split("."),i=r.length-1,o=r[i];let a=window;for(let n=0;n<i;n++)if(a=a[r[n]],!a){O.error(`Function name: ${t} not found in window`);return}a[o](...e)};function zl(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function p0(t){let e,r=0;t.forEach(o=>{r+=zl(o,e),e=o});const i=r/2;return gn(t,i)}function g0(t){return t.length===1?t[0]:p0(t)}const Ka=(t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},gn=(t,e)=>{let r,i=e;for(const o of t){if(r){const a=zl(o,r);if(a<i)i-=a;else{const n=i/a;if(n<=0)return r;if(n>=1)return{x:o.x,y:o.y};if(n>0&&n<1)return{x:Ka((1-n)*r.x+n*o.x,5),y:Ka((1-n)*r.y+n*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},m0=(t,e,r)=>{O.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=gn(e,25),o=t?10:5,a=Math.atan2(e[0].y-i.y,e[0].x-i.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(e[0].x+i.x)/2,n.y=-Math.cos(a)*o+(e[0].y+i.y)/2,n};function y0(t,e,r){const i=structuredClone(r);O.info("our points",i),e!=="start_left"&&e!=="start_right"&&i.reverse();const o=25+t,a=gn(i,o),n=10+t*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return e==="start_left"?(l.x=Math.sin(s+Math.PI)*n+(i[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*n+(i[0].y+a.y)/2):e==="end_right"?(l.x=Math.sin(s-Math.PI)*n+(i[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*n+(i[0].y+a.y)/2-5):e==="end_left"?(l.x=Math.sin(s)*n+(i[0].x+a.x)/2-5,l.y=-Math.cos(s)*n+(i[0].y+a.y)/2-5):(l.x=Math.sin(s)*n+(i[0].x+a.x)/2,l.y=-Math.cos(s)*n+(i[0].y+a.y)/2),l}function b0(t){let e="",r="";for(const i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}let Za=0;const _0=()=>(Za++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Za);function C0(t){let e="";const r="0123456789abcdef",i=r.length;for(let o=0;o<t;o++)e+=r.charAt(Math.floor(Math.random()*i));return e}const x0=t=>C0(t.length),k0=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},v0=function(t,e){const r=e.text.replace(pn.lineBreakRegex," "),[,i]=yn(e.fontSize),o=t.append("text");o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",i),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),e.class!==void 0&&o.attr("class",e.class);const a=o.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),o},T0=qr((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),pn.lineBreakRegex.test(t)))return t;const i=t.split(" "),o=[];let a="";return i.forEach((n,s)=>{const l=Ti(`${n} `,r),h=Ti(a,r);if(l>e){const{hyphenatedStrings:u,remainingWord:c}=w0(n,e,"-",r);o.push(a,...u),a=c}else h+l>=e?(o.push(a),a=n):a=[a,n].filter(Boolean).join(" ");s+1===i.length&&o.push(a)}),o.filter(n=>n!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),w0=qr((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...t],a=[];let n="";return o.forEach((s,l)=>{const h=`${n}${s}`;if(Ti(h,i)>=e){const u=l+1,c=o.length===u,d=`${h}${r}`;a.push(c?h:d),n=""}else n=h}),{hyphenatedStrings:a,remainingWord:n}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function S0(t,e){return mn(t,e).height}function Ti(t,e){return mn(t,e).width}const mn=qr((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:o=400}=e;if(!t)return{width:0,height:0};const[,a]=yn(r),n=["sans-serif",i],s=t.split(pn.lineBreakRegex),l=[],h=Tt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const u=h.append("svg");for(const d of n){let p=0;const m={width:0,height:0,lineHeight:0};for(const b of s){const x=k0();x.text=b||n0;const E=v0(u,x).style("font-size",a).style("font-weight",o).style("font-family",d),_=(E._groups||E)[0][0].getBBox();if(_.width===0&&_.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,_.width)),p=Math.round(_.height),m.height+=p,m.lineHeight=Math.round(Math.max(m.lineHeight,p))}l.push(m)}u.remove();const c=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[c]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`);class B0{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}}let Jr;const A0=function(t){return Jr=Jr||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Jr.innerHTML=t,unescape(Jr.textContent)};function Rl(t){return"str"in t}const L0=(t,e,r,i)=>{var o;if(!i)return;const a=(o=t.node())==null?void 0:o.getBBox();a&&t.append("text").text(i).attr("x",a.x+a.width/2).attr("y",-r).attr("class",e)},yn=t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]};function Pl(t,e){return Jm({},t,e)}const kr={assignWithDepth:ht,wrapLabel:T0,calculateTextHeight:S0,calculateTextWidth:Ti,calculateTextDimensions:mn,cleanAndMerge:Pl,detectInit:l0,detectDirective:$l,isSubstringInArray:c0,interpolateToCurve:u0,calcLabelPosition:g0,calcCardinalityPosition:m0,calcTerminalLabelPosition:y0,formatUrl:d0,getStylesFromArray:b0,generateId:_0,random:x0,runFunc:f0,entityDecode:A0,insertTitle:L0,parseFontSize:yn,InitIDGenerator:B0},F0=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"ﬂ°°"+i+"¶ß":"ﬂ°"+i+"¶ß"}),e},E0=function(t){return t.replace(/ﬂ°°/g,"&#").replace(/ﬂ°/g,"&").replace(/¶ß/g,";")},Ja="10.9.4",Ge=Object.freeze(e0);let mt=ht({},Ge),jl,Ke=[],vr=ht({},Ge);const Ki=(t,e)=>{let r=ht({},t),i={};for(const o of e)Hl(o),i=ht(i,o);if(r=ht(r,i),i.theme&&i.theme in ee){const o=ht({},jl),a=ht(o.themeVariables||{},i.themeVariables);r.theme&&r.theme in ee&&(r.themeVariables=ee[r.theme].getThemeVariables(a))}return vr=r,Ul(vr),vr},O0=t=>(mt=ht({},Ge),mt=ht(mt,t),t.theme&&ee[t.theme]&&(mt.themeVariables=ee[t.theme].getThemeVariables(t.themeVariables)),Ki(mt,Ke),mt),M0=t=>{jl=ht({},t)},I0=t=>(mt=ht(mt,t),Ki(mt,Ke),mt),Wl=()=>ht({},mt),Yl=t=>(Ul(t),ht(vr,t),Pt()),Pt=()=>ht({},vr),Hl=t=>{t&&(["secure",...mt.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(O.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&Hl(t[e])}))},N0=t=>{vi(t),t.fontFamily&&(!t.themeVariables||!t.themeVariables.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),Ke.push(t),Ki(mt,Ke)},wi=(t=mt)=>{Ke=[],Ki(t,Ke)},q0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Qa={},D0=t=>{Qa[t]||(O.warn(q0[t]),Qa[t]=!0)},Ul=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&D0("LAZY_LOAD_DEPRECATED")},Xl="c4",$0=t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),z0=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.DH1cXS7y-CncWywJ2.js");return{diagram:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]));return{id:Xl,diagram:t}},R0={id:Xl,detector:$0,loader:z0},P0=R0,Vl="flowchart",j0=(t,e)=>{var r,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},W0=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.CL40iKmx-Xv28zrig.js");return{diagram:e}},__vite__mapDeps([22,23,24,25,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,26,27,28,29,30,31,32,33,34,35,2]));return{id:Vl,diagram:t}},Y0={id:Vl,detector:j0,loader:W0},H0=Y0,Gl="flowchart-v2",U0=(t,e)=>{var r,i,o;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)&&((o=e==null?void 0:e.flowchart)==null?void 0:o.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)},X0=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.CYIdfi3R-vhgkOCD1.js");return{diagram:e}},__vite__mapDeps([36,23,28,25,3,4,29,24,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,26,27,30,31,32,33,34,35,2]));return{id:Gl,diagram:t}},V0={id:Gl,detector:U0,loader:X0},G0=V0,Kl="er",K0=t=>/^\s*erDiagram/.test(t),Z0=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.C_IqWsSv-rV4HP_6W.js");return{diagram:e}},__vite__mapDeps([37,25,3,4,24,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,26,27,2,32,33,34]));return{id:Kl,diagram:t}},J0={id:Kl,detector:K0,loader:Z0},Q0=J0,Zl="gitGraph",tb=t=>/^\s*gitGraph/.test(t),eb=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.IHjzuCNG-C8lhmUhN.js");return{diagram:e}},__vite__mapDeps([38,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]));return{id:Zl,diagram:t}},rb={id:Zl,detector:tb,loader:eb},ib=rb,Jl="gantt",ob=t=>/^\s*gantt/.test(t),nb=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.cYU68oPw-BOLyh78G.js");return{diagram:e}},__vite__mapDeps([39,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,40,41]));return{id:Jl,diagram:t}},ab={id:Jl,detector:ob,loader:nb},sb=ab,Ql="info",lb=t=>/^\s*info/.test(t),hb=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.Sa1zF2S2-Dri9LObb.js");return{diagram:e}},__vite__mapDeps([42,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]));return{id:Ql,diagram:t}},cb={id:Ql,detector:lb,loader:hb},th="pie",ub=t=>/^\s*pie/.test(t),db=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.atdgiJ8F-DapGouzV.js");return{diagram:e}},__vite__mapDeps([43,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,44,34,45,41,33]));return{id:th,diagram:t}},fb={id:th,detector:ub,loader:db},eh="quadrantChart",pb=t=>/^\s*quadrantChart/.test(t),gb=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.cMZ04ZtI-CyMOMuh2.js");return{diagram:e}},__vite__mapDeps([46,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,40,41]));return{id:eh,diagram:t}},mb={id:eh,detector:pb,loader:gb},yb=mb,rh="xychart",bb=t=>/^\s*xychart-beta/.test(t),_b=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.DVe0wbIH-CMJLZKHD.js");return{diagram:e}},__vite__mapDeps([47,31,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,41,45,40,32,33,34]));return{id:rh,diagram:t}},Cb={id:rh,detector:bb,loader:_b},xb=Cb,ih="requirement",kb=t=>/^\s*requirement(Diagram)?/.test(t),vb=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.CcYiIh13-Bi1TFfEX.js");return{diagram:e}},__vite__mapDeps([48,24,25,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,26,27,2,32,33,34]));return{id:ih,diagram:t}},Tb={id:ih,detector:kb,loader:vb},wb=Tb,oh="sequence",Sb=t=>/^\s*sequenceDiagram/.test(t),Bb=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.B7rE870D-BJaaJcuZ.js");return{diagram:e}},__vite__mapDeps([49,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,1]));return{id:oh,diagram:t}},Ab={id:oh,detector:Sb,loader:Bb},Lb=Ab,nh="class",Fb=(t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},Eb=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.KbkdU8W--BY_5u2qS.js");return{diagram:e}},__vite__mapDeps([50,51,24,25,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,26,27,2,32,33,34]));return{id:nh,diagram:t}},Ob={id:nh,detector:Fb,loader:Eb},Mb=Ob,ah="classDiagram",Ib=(t,e)=>{var r;return/^\s*classDiagram/.test(t)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},Nb=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.BnNOrBrJ-BVMKu1MG.js");return{diagram:e}},__vite__mapDeps([52,51,25,3,4,29,24,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,26,27,30,31,32,33,34,2]));return{id:ah,diagram:t}},qb={id:ah,detector:Ib,loader:Nb},Db=qb,sh="state",$b=(t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},zb=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.DWyN9gGU-DtpJmT9Y.js");return{diagram:e}},__vite__mapDeps([53,54,24,25,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,26,27,2,32,33,34]));return{id:sh,diagram:t}},Rb={id:sh,detector:$b,loader:zb},Pb=Rb,lh="stateDiagram",jb=(t,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},Wb=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.C451D7EK-nSKRA56K.js");return{diagram:e}},__vite__mapDeps([55,54,25,3,4,29,24,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,26,27,30,31,32,33,34,2]));return{id:lh,diagram:t}},Yb={id:lh,detector:jb,loader:Wb},Hb=Yb,hh="journey",Ub=t=>/^\s*journey/.test(t),Xb=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.CilNpK1h-Dt9spa6G.js");return{diagram:e}},__vite__mapDeps([56,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,44,34]));return{id:hh,diagram:t}},Vb={id:hh,detector:Ub,loader:Xb},Gb=Vb,Kb=function(t,e){for(let r of e)t.attr(r[0],r[1])},Zb=function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},ch=function(t,e,r,i){const o=Zb(e,r,i);Kb(t,o)},Jb=function(t,e,r,i){const o=e.node().getBBox(),a=o.width,n=o.height;O.info(`SVG bounds: ${a}x${n}`,o);let s=0,l=0;O.info(`Graph bounds: ${s}x${l}`,t),s=a+r*2,l=n+r*2,O.info(`Calculated bounds: ${s}x${l}`),ch(e,l,s,i);const h=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;e.attr("viewBox",h)},li={},Qb=(t,e,r)=>{let i="";return t in li&&li[t]?i=li[t](r):O.warn(`No theme found for ${t}`),` & {
    font-family: ${r.fontFamily};
    font-size: ${r.fontSize};
    fill: ${r.textColor}
  }

  /* Classes common for multiple diagrams */

  & .error-icon {
    fill: ${r.errorBkgColor};
  }
  & .error-text {
    fill: ${r.errorTextColor};
    stroke: ${r.errorTextColor};
  }

  & .edge-thickness-normal {
    stroke-width: 2px;
  }
  & .edge-thickness-thick {
    stroke-width: 3.5px
  }
  & .edge-pattern-solid {
    stroke-dasharray: 0;
  }

  & .edge-pattern-dashed{
    stroke-dasharray: 3;
  }
  .edge-pattern-dotted {
    stroke-dasharray: 2;
  }

  & .marker {
    fill: ${r.lineColor};
    stroke: ${r.lineColor};
  }
  & .marker.cross {
    stroke: ${r.lineColor};
  }

  & svg {
    font-family: ${r.fontFamily};
    font-size: ${r.fontSize};
  }

  ${i}

  ${e}
`},t_=(t,e)=>{e!==void 0&&(li[t]=e)},e_=Qb;let bn="",_n="",Cn="";const xn=t=>Xe(t,Pt()),r_=()=>{bn="",Cn="",_n=""},i_=t=>{bn=xn(t).replace(/^\s+/g,"")},o_=()=>bn,n_=t=>{Cn=xn(t).replace(/\n\s+/g,`
`)},a_=()=>Cn,s_=t=>{_n=xn(t)},l_=()=>_n,h_=Object.freeze(Object.defineProperty({__proto__:null,clear:r_,getAccDescription:a_,getAccTitle:o_,getDiagramTitle:l_,setAccDescription:n_,setAccTitle:i_,setDiagramTitle:s_},Symbol.toStringTag,{value:"Module"})),c_=O,u_=fn,kn=Pt,yk=Yl,bk=Ge,d_=t=>Xe(t,kn()),f_=Jb,p_=()=>h_,Si={},Bi=(t,e,r)=>{var i;if(Si[t])throw new Error(`Diagram ${t} already registered.`);Si[t]=e,r&&Dl(t,r),t_(t,e.styles),(i=e.injectUtils)==null||i.call(e,c_,u_,kn,d_,f_,p_(),()=>{})},vn=t=>{if(t in Si)return Si[t];throw new g_(t)};class g_ extends Error{constructor(e){super(`Diagram ${e} not found.`)}}const m_=t=>{var e;const{securityLevel:r}=kn();let i=Tt("body");if(r==="sandbox"){const o=((e=Tt(`#i${t}`).node())==null?void 0:e.contentDocument)??document;i=Tt(o.body)}return i.select(`#${t}`)},y_=(t,e,r)=>{O.debug(`rendering svg for syntax error
`);const i=m_(e),o=i.append("g");i.attr("viewBox","0 0 2412 512"),ch(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 ${r}`)},uh={draw:y_},b_=uh,__={db:{},renderer:uh,parser:{parser:{yy:{}},parse:()=>{}}},C_=__,dh="flowchart-elk",x_=(t,e)=>{var r;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk")},k_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.CEegMYbQ-C4436Ebb.js");return{diagram:e}},__vite__mapDeps([57,23,30,31,32,33,34,5,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,58,2]));return{id:dh,diagram:t}},v_={id:dh,detector:x_,loader:k_},T_=v_,fh="timeline",w_=t=>/^\s*timeline/.test(t),S_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.BSCshcOE-CvGaEdID.js");return{diagram:e}},__vite__mapDeps([59,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,44,34]));return{id:fh,diagram:t}},B_={id:fh,detector:w_,loader:S_},A_=B_,ph="mindmap",L_=t=>/^\s*mindmap/.test(t),F_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.B9VhcQ9O-CC8rSfyb.js");return{diagram:e}},__vite__mapDeps([60,5,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,31,2]));return{id:ph,diagram:t}},E_={id:ph,detector:L_,loader:F_},O_=E_,gh="sankey",M_=t=>/^\s*sankey-beta/.test(t),I_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.C5BdKnCx-DmzrDoDf.js");return{diagram:e}},__vite__mapDeps([61,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,45,41,62]));return{id:gh,diagram:t}},N_={id:gh,detector:M_,loader:I_},q_=N_,mh="block",D_=t=>/^\s*block-beta/.test(t),$_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./layers.snikzCwF-Z29qbx7G.js");return{diagram:e}},__vite__mapDeps([63,30,31,32,33,34,25,3,4,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,35,45,41,62]));return{id:mh,diagram:t}},z_={id:mh,detector:D_,loader:$_},R_=z_;let ts=!1;const Tn=()=>{ts||(ts=!0,Bi("error",C_,t=>t.toLowerCase().trim()==="error"),Bi("---",{db:{clear:()=>{}},styles:{},renderer:{draw:()=>{}},parser:{parser:{yy:{}},parse:()=>{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 with un-indented `---` blocks")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),ql(P0,Db,Mb,Q0,sb,cb,fb,wb,Lb,T_,G0,H0,O_,A_,ib,Hb,Pb,Gb,yb,q_,xb,R_))};class yh{constructor(e,r={}){this.text=e,this.metadata=r,this.type="graph",this.text=F0(e),this.text+=`
`;const i=Pt();try{this.type=Gi(e,i)}catch(a){this.type="error",this.detectError=a}const o=vn(this.type);O.debug("Type "+this.type),this.db=o.db,this.renderer=o.renderer,this.parser=o.parser,this.parser.parser.yy=this.db,this.init=o.init,this.parse()}parse(){var e,r,i,o,a;if(this.detectError)throw this.detectError;(r=(e=this.db).clear)==null||r.call(e);const n=Pt();(i=this.init)==null||i.call(this,n),this.metadata.title&&((a=(o=this.db).setDiagramTitle)==null||a.call(o,this.metadata.title)),this.parser.parse(this.text)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}}const P_=async(t,e={})=>{const r=Gi(t,Pt());try{vn(r)}catch{const i=o0(r);if(!i)throw new Nl(`Diagram ${r} not found.`);const{id:o,diagram:a}=await i();Bi(o,a)}return new yh(t,e)};let es=[];const j_=()=>{es.forEach(t=>{t()}),es=[]},W_="graphics-document document";function Y_(t,e){t.attr("role",W_),e!==""&&t.attr("aria-roledescription",e)}function H_(t,e,r,i){if(t.insert!==void 0){if(r){const o=`chart-desc-${i}`;t.attr("aria-describedby",o),t.insert("desc",":first-child").attr("id",o).text(r)}if(e){const o=`chart-title-${i}`;t.attr("aria-labelledby",o),t.insert("title",":first-child").attr("id",o).text(e)}}}const U_=t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart();/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function bh(t){return typeof t>"u"||t===null}function X_(t){return typeof t=="object"&&t!==null}function V_(t){return Array.isArray(t)?t:bh(t)?[]:[t]}function G_(t,e){var r,i,o,a;if(e)for(a=Object.keys(e),r=0,i=a.length;r<i;r+=1)o=a[r],t[o]=e[o];return t}function K_(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}function Z_(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var J_=bh,Q_=X_,tC=V_,eC=K_,rC=Z_,iC=G_,dt={isNothing:J_,isObject:Q_,toArray:tC,repeat:eC,isNegativeZero:rC,extend:iC};function _h(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`

`+t.mark.snippet),i+" "+r):i}function Er(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=_h(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Er.prototype=Object.create(Error.prototype);Er.prototype.constructor=Er;Er.prototype.toString=function(t){return this.name+": "+_h(this,t)};var Qt=Er;function Co(t,e,r,i,o){var a="",n="",s=Math.floor(o/2)-1;return i-e>s&&(a=" ... ",e=i-s+a.length),r-i>s&&(n=" ...",r=i+s-n.length),{str:a+t.slice(e,r).replace(/\t/g,"→")+n,pos:i-e+a.length}}function xo(t,e){return dt.repeat(" ",e-t.length)+t}function oC(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],o=[],a,n=-1;a=r.exec(t.buffer);)o.push(a.index),i.push(a.index+a[0].length),t.position<=a.index&&n<0&&(n=i.length-2);n<0&&(n=i.length-1);var s="",l,h,u=Math.min(t.line+e.linesAfter,o.length).toString().length,c=e.maxLength-(e.indent+u+3);for(l=1;l<=e.linesBefore&&!(n-l<0);l++)h=Co(t.buffer,i[n-l],o[n-l],t.position-(i[n]-i[n-l]),c),s=dt.repeat(" ",e.indent)+xo((t.line-l+1).toString(),u)+" | "+h.str+`
`+s;for(h=Co(t.buffer,i[n],o[n],t.position,c),s+=dt.repeat(" ",e.indent)+xo((t.line+1).toString(),u)+" | "+h.str+`
`,s+=dt.repeat("-",e.indent+u+3+h.pos)+`^
`,l=1;l<=e.linesAfter&&!(n+l>=o.length);l++)h=Co(t.buffer,i[n+l],o[n+l],t.position-(i[n]-i[n+l]),c),s+=dt.repeat(" ",e.indent)+xo((t.line+l+1).toString(),u)+" | "+h.str+`
`;return s.replace(/\n$/,"")}var nC=oC,aC=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],sC=["scalar","sequence","mapping"];function lC(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function hC(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(aC.indexOf(r)===-1)throw new Qt('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=lC(e.styleAliases||null),sC.indexOf(this.kind)===-1)throw new Qt('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var ct=hC;function rs(t,e){var r=[];return t[e].forEach(function(i){var o=r.length;r.forEach(function(a,n){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(o=n)}),r[o]=i}),r}function cC(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(o){o.multi?(t.multi[o.kind].push(o),t.multi.fallback.push(o)):t[o.kind][o.tag]=t.fallback[o.tag]=o}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}function Ho(t){return this.extend(t)}Ho.prototype.extend=function(t){var e=[],r=[];if(t instanceof ct)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new Qt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.forEach(function(o){if(!(o instanceof ct))throw new Qt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Qt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Qt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(o){if(!(o instanceof ct))throw new Qt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Ho.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=rs(i,"implicit"),i.compiledExplicit=rs(i,"explicit"),i.compiledTypeMap=cC(i.compiledImplicit,i.compiledExplicit),i};var uC=Ho,dC=new ct("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),fC=new ct("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),pC=new ct("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),gC=new uC({explicit:[dC,fC,pC]});function mC(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function yC(){return null}function bC(t){return t===null}var _C=new ct("tag:yaml.org,2002:null",{kind:"scalar",resolve:mC,construct:yC,predicate:bC,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function CC(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function xC(t){return t==="true"||t==="True"||t==="TRUE"}function kC(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var vC=new ct("tag:yaml.org,2002:bool",{kind:"scalar",resolve:CC,construct:xC,predicate:kC,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function TC(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function wC(t){return 48<=t&&t<=55}function SC(t){return 48<=t&&t<=57}function BC(t){if(t===null)return!1;var e=t.length,r=0,i=!1,o;if(!e)return!1;if(o=t[r],(o==="-"||o==="+")&&(o=t[++r]),o==="0"){if(r+1===e)return!0;if(o=t[++r],o==="b"){for(r++;r<e;r++)if(o=t[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;i=!0}return i&&o!=="_"}if(o==="x"){for(r++;r<e;r++)if(o=t[r],o!=="_"){if(!TC(t.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}if(o==="o"){for(r++;r<e;r++)if(o=t[r],o!=="_"){if(!wC(t.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}}if(o==="_")return!1;for(;r<e;r++)if(o=t[r],o!=="_"){if(!SC(t.charCodeAt(r)))return!1;i=!0}return!(!i||o==="_")}function AC(t){var e=t,r=1,i;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),i=e[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),e=e.slice(1),i=e[0]),e==="0")return 0;if(i==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function LC(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!dt.isNegativeZero(t)}var FC=new ct("tag:yaml.org,2002:int",{kind:"scalar",resolve:BC,construct:AC,predicate:LC,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),EC=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function OC(t){return!(t===null||!EC.test(t)||t[t.length-1]==="_")}function MC(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var IC=/^[-+]?[0-9]+e/;function NC(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(dt.isNegativeZero(t))return"-0.0";return r=t.toString(10),IC.test(r)?r.replace("e",".e"):r}function qC(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||dt.isNegativeZero(t))}var DC=new ct("tag:yaml.org,2002:float",{kind:"scalar",resolve:OC,construct:MC,predicate:qC,represent:NC,defaultStyle:"lowercase"}),Ch=gC.extend({implicit:[_C,vC,FC,DC]}),$C=Ch,xh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),kh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function zC(t){return t===null?!1:xh.exec(t)!==null||kh.exec(t)!==null}function RC(t){var e,r,i,o,a,n,s,l=0,h=null,u,c,d;if(e=xh.exec(t),e===null&&(e=kh.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(r,i,o));if(a=+e[4],n=+e[5],s=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],c=+(e[11]||0),h=(u*60+c)*6e4,e[9]==="-"&&(h=-h)),d=new Date(Date.UTC(r,i,o,a,n,s,l)),h&&d.setTime(d.getTime()-h),d}function PC(t){return t.toISOString()}var jC=new ct("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:zC,construct:RC,instanceOf:Date,represent:PC});function WC(t){return t==="<<"||t===null}var YC=new ct("tag:yaml.org,2002:merge",{kind:"scalar",resolve:WC}),wn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function HC(t){if(t===null)return!1;var e,r,i=0,o=t.length,a=wn;for(r=0;r<o;r++)if(e=a.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;i+=6}return i%8===0}function UC(t){var e,r,i=t.replace(/[\r\n=]/g,""),o=i.length,a=wn,n=0,s=[];for(e=0;e<o;e++)e%4===0&&e&&(s.push(n>>16&255),s.push(n>>8&255),s.push(n&255)),n=n<<6|a.indexOf(i.charAt(e));return r=o%4*6,r===0?(s.push(n>>16&255),s.push(n>>8&255),s.push(n&255)):r===18?(s.push(n>>10&255),s.push(n>>2&255)):r===12&&s.push(n>>4&255),new Uint8Array(s)}function XC(t){var e="",r=0,i,o,a=t.length,n=wn;for(i=0;i<a;i++)i%3===0&&i&&(e+=n[r>>18&63],e+=n[r>>12&63],e+=n[r>>6&63],e+=n[r&63]),r=(r<<8)+t[i];return o=a%3,o===0?(e+=n[r>>18&63],e+=n[r>>12&63],e+=n[r>>6&63],e+=n[r&63]):o===2?(e+=n[r>>10&63],e+=n[r>>4&63],e+=n[r<<2&63],e+=n[64]):o===1&&(e+=n[r>>2&63],e+=n[r<<4&63],e+=n[64],e+=n[64]),e}function VC(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var GC=new ct("tag:yaml.org,2002:binary",{kind:"scalar",resolve:HC,construct:UC,predicate:VC,represent:XC}),KC=Object.prototype.hasOwnProperty,ZC=Object.prototype.toString;function JC(t){if(t===null)return!0;var e=[],r,i,o,a,n,s=t;for(r=0,i=s.length;r<i;r+=1){if(o=s[r],n=!1,ZC.call(o)!=="[object Object]")return!1;for(a in o)if(KC.call(o,a))if(!n)n=!0;else return!1;if(!n)return!1;if(e.indexOf(a)===-1)e.push(a);else return!1}return!0}function QC(t){return t!==null?t:[]}var tx=new ct("tag:yaml.org,2002:omap",{kind:"sequence",resolve:JC,construct:QC}),ex=Object.prototype.toString;function rx(t){if(t===null)return!0;var e,r,i,o,a,n=t;for(a=new Array(n.length),e=0,r=n.length;e<r;e+=1){if(i=n[e],ex.call(i)!=="[object Object]"||(o=Object.keys(i),o.length!==1))return!1;a[e]=[o[0],i[o[0]]]}return!0}function ix(t){if(t===null)return[];var e,r,i,o,a,n=t;for(a=new Array(n.length),e=0,r=n.length;e<r;e+=1)i=n[e],o=Object.keys(i),a[e]=[o[0],i[o[0]]];return a}var ox=new ct("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:rx,construct:ix}),nx=Object.prototype.hasOwnProperty;function ax(t){if(t===null)return!0;var e,r=t;for(e in r)if(nx.call(r,e)&&r[e]!==null)return!1;return!0}function sx(t){return t!==null?t:{}}var lx=new ct("tag:yaml.org,2002:set",{kind:"mapping",resolve:ax,construct:sx}),hx=$C.extend({implicit:[jC,YC],explicit:[GC,tx,ox,lx]}),de=Object.prototype.hasOwnProperty,Ai=1,vh=2,Th=3,Li=4,ko=1,cx=2,is=3,ux=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,dx=/[\x85\u2028\u2029]/,fx=/[,\[\]\{\}]/,wh=/^(?:!|!!|![a-z\-]+!)$/i,Sh=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function os(t){return Object.prototype.toString.call(t)}function zt(t){return t===10||t===13}function xe(t){return t===9||t===32}function bt(t){return t===9||t===32||t===10||t===13}function qe(t){return t===44||t===91||t===93||t===123||t===125}function px(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function gx(t){return t===120?2:t===117?4:t===85?8:0}function mx(t){return 48<=t&&t<=57?t-48:-1}function ns(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?"	":t===110?`
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function yx(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Bh=new Array(256),Ah=new Array(256);for(var Ie=0;Ie<256;Ie++)Bh[Ie]=ns(Ie)?1:0,Ah[Ie]=ns(Ie);function bx(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||hx,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Lh(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=nC(r),new Qt(e,r)}function F(t,e){throw Lh(t,e)}function Fi(t,e){t.onWarning&&t.onWarning.call(null,Lh(t,e))}var as={YAML:function(t,e,r){var i,o,a;t.version!==null&&F(t,"duplication of %YAML directive"),r.length!==1&&F(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&F(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),a=parseInt(i[2],10),o!==1&&F(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Fi(t,"unsupported YAML version of the document")},TAG:function(t,e,r){var i,o;r.length!==2&&F(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],wh.test(i)||F(t,"ill-formed tag handle (first argument) of the TAG directive"),de.call(t.tagMap,i)&&F(t,'there is a previously declared suffix for "'+i+'" tag handle'),Sh.test(o)||F(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{F(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o}};function ce(t,e,r,i){var o,a,n,s;if(e<r){if(s=t.input.slice(e,r),i)for(o=0,a=s.length;o<a;o+=1)n=s.charCodeAt(o),n===9||32<=n&&n<=1114111||F(t,"expected valid JSON character");else ux.test(s)&&F(t,"the stream contains non-printable characters");t.result+=s}}function ss(t,e,r,i){var o,a,n,s;for(dt.isObject(r)||F(t,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),n=0,s=o.length;n<s;n+=1)a=o[n],de.call(e,a)||(e[a]=r[a],i[a]=!0)}function De(t,e,r,i,o,a,n,s,l){var h,u;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),h=0,u=o.length;h<u;h+=1)Array.isArray(o[h])&&F(t,"nested arrays are not supported inside keys"),typeof o=="object"&&os(o[h])==="[object Object]"&&(o[h]="[object Object]");if(typeof o=="object"&&os(o)==="[object Object]"&&(o="[object Object]"),o=String(o),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(h=0,u=a.length;h<u;h+=1)ss(t,e,a[h],r);else ss(t,e,a,r);else!t.json&&!de.call(r,o)&&de.call(e,o)&&(t.line=n||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,F(t,"duplicated mapping key")),o==="__proto__"?Object.defineProperty(e,o,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[o]=a,delete r[o];return e}function Sn(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):F(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Q(t,e,r){for(var i=0,o=t.input.charCodeAt(t.position);o!==0;){for(;xe(o);)o===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),o=t.input.charCodeAt(++t.position);if(e&&o===35)do o=t.input.charCodeAt(++t.position);while(o!==10&&o!==13&&o!==0);if(zt(o))for(Sn(t),o=t.input.charCodeAt(t.position),i++,t.lineIndent=0;o===32;)t.lineIndent++,o=t.input.charCodeAt(++t.position);else break}return r!==-1&&i!==0&&t.lineIndent<r&&Fi(t,"deficient indentation"),i}function Zi(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||bt(r)))}function Bn(t,e){e===1?t.result+=" ":e>1&&(t.result+=dt.repeat(`
`,e-1))}function _x(t,e,r){var i,o,a,n,s,l,h,u,c=t.kind,d=t.result,p;if(p=t.input.charCodeAt(t.position),bt(p)||qe(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(o=t.input.charCodeAt(t.position+1),bt(o)||r&&qe(o)))return!1;for(t.kind="scalar",t.result="",a=n=t.position,s=!1;p!==0;){if(p===58){if(o=t.input.charCodeAt(t.position+1),bt(o)||r&&qe(o))break}else if(p===35){if(i=t.input.charCodeAt(t.position-1),bt(i))break}else{if(t.position===t.lineStart&&Zi(t)||r&&qe(p))break;if(zt(p))if(l=t.line,h=t.lineStart,u=t.lineIndent,Q(t,!1,-1),t.lineIndent>=e){s=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=n,t.line=l,t.lineStart=h,t.lineIndent=u;break}}s&&(ce(t,a,n,!1),Bn(t,t.line-l),a=n=t.position,s=!1),xe(p)||(n=t.position+1),p=t.input.charCodeAt(++t.position)}return ce(t,a,n,!1),t.result?!0:(t.kind=c,t.result=d,!1)}function Cx(t,e){var r,i,o;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=o=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(ce(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,o=t.position;else return!0;else zt(r)?(ce(t,i,o,!0),Bn(t,Q(t,!1,e)),i=o=t.position):t.position===t.lineStart&&Zi(t)?F(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);F(t,"unexpected end of the stream within a single quoted scalar")}function xx(t,e){var r,i,o,a,n,s;if(s=t.input.charCodeAt(t.position),s!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(s=t.input.charCodeAt(t.position))!==0;){if(s===34)return ce(t,r,t.position,!0),t.position++,!0;if(s===92){if(ce(t,r,t.position,!0),s=t.input.charCodeAt(++t.position),zt(s))Q(t,!1,e);else if(s<256&&Bh[s])t.result+=Ah[s],t.position++;else if((n=gx(s))>0){for(o=n,a=0;o>0;o--)s=t.input.charCodeAt(++t.position),(n=px(s))>=0?a=(a<<4)+n:F(t,"expected hexadecimal character");t.result+=yx(a),t.position++}else F(t,"unknown escape sequence");r=i=t.position}else zt(s)?(ce(t,r,i,!0),Bn(t,Q(t,!1,e)),r=i=t.position):t.position===t.lineStart&&Zi(t)?F(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}F(t,"unexpected end of the stream within a double quoted scalar")}function kx(t,e){var r=!0,i,o,a,n=t.tag,s,l=t.anchor,h,u,c,d,p,m=Object.create(null),b,x,E,_;if(_=t.input.charCodeAt(t.position),_===91)u=93,p=!1,s=[];else if(_===123)u=125,p=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),_=t.input.charCodeAt(++t.position);_!==0;){if(Q(t,!0,e),_=t.input.charCodeAt(t.position),_===u)return t.position++,t.tag=n,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=s,!0;r?_===44&&F(t,"expected the node content, but found ','"):F(t,"missed comma between flow collection entries"),x=b=E=null,c=d=!1,_===63&&(h=t.input.charCodeAt(t.position+1),bt(h)&&(c=d=!0,t.position++,Q(t,!0,e))),i=t.line,o=t.lineStart,a=t.position,Ze(t,e,Ai,!1,!0),x=t.tag,b=t.result,Q(t,!0,e),_=t.input.charCodeAt(t.position),(d||t.line===i)&&_===58&&(c=!0,_=t.input.charCodeAt(++t.position),Q(t,!0,e),Ze(t,e,Ai,!1,!0),E=t.result),p?De(t,s,m,x,b,E,i,o,a):c?s.push(De(t,null,m,x,b,E,i,o,a)):s.push(b),Q(t,!0,e),_=t.input.charCodeAt(t.position),_===44?(r=!0,_=t.input.charCodeAt(++t.position)):r=!1}F(t,"unexpected end of the stream within a flow collection")}function vx(t,e){var r,i,o=ko,a=!1,n=!1,s=e,l=0,h=!1,u,c;if(c=t.input.charCodeAt(t.position),c===124)i=!1;else if(c===62)i=!0;else return!1;for(t.kind="scalar",t.result="";c!==0;)if(c=t.input.charCodeAt(++t.position),c===43||c===45)ko===o?o=c===43?is:cx:F(t,"repeat of a chomping mode identifier");else if((u=mx(c))>=0)u===0?F(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):n?F(t,"repeat of an indentation width identifier"):(s=e+u-1,n=!0);else break;if(xe(c)){do c=t.input.charCodeAt(++t.position);while(xe(c));if(c===35)do c=t.input.charCodeAt(++t.position);while(!zt(c)&&c!==0)}for(;c!==0;){for(Sn(t),t.lineIndent=0,c=t.input.charCodeAt(t.position);(!n||t.lineIndent<s)&&c===32;)t.lineIndent++,c=t.input.charCodeAt(++t.position);if(!n&&t.lineIndent>s&&(s=t.lineIndent),zt(c)){l++;continue}if(t.lineIndent<s){o===is?t.result+=dt.repeat(`
`,a?1+l:l):o===ko&&a&&(t.result+=`
`);break}for(i?xe(c)?(h=!0,t.result+=dt.repeat(`
`,a?1+l:l)):h?(h=!1,t.result+=dt.repeat(`
`,l+1)):l===0?a&&(t.result+=" "):t.result+=dt.repeat(`
`,l):t.result+=dt.repeat(`
`,a?1+l:l),a=!0,n=!0,l=0,r=t.position;!zt(c)&&c!==0;)c=t.input.charCodeAt(++t.position);ce(t,r,t.position,!1)}return!0}function ls(t,e){var r,i=t.tag,o=t.anchor,a=[],n,s=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,F(t,"tab characters must not be used in indentation")),!(l!==45||(n=t.input.charCodeAt(t.position+1),!bt(n))));){if(s=!0,t.position++,Q(t,!0,-1)&&t.lineIndent<=e){a.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,Ze(t,e,Th,!1,!0),a.push(t.result),Q(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)F(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return s?(t.tag=i,t.anchor=o,t.kind="sequence",t.result=a,!0):!1}function Tx(t,e,r){var i,o,a,n,s,l,h=t.tag,u=t.anchor,c={},d=Object.create(null),p=null,m=null,b=null,x=!1,E=!1,_;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=c),_=t.input.charCodeAt(t.position);_!==0;){if(!x&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,F(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),a=t.line,(_===63||_===58)&&bt(i))_===63?(x&&(De(t,c,d,p,m,null,n,s,l),p=m=b=null),E=!0,x=!0,o=!0):x?(x=!1,o=!0):F(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,_=i;else{if(n=t.line,s=t.lineStart,l=t.position,!Ze(t,r,vh,!1,!0))break;if(t.line===a){for(_=t.input.charCodeAt(t.position);xe(_);)_=t.input.charCodeAt(++t.position);if(_===58)_=t.input.charCodeAt(++t.position),bt(_)||F(t,"a whitespace character is expected after the key-value separator within a block mapping"),x&&(De(t,c,d,p,m,null,n,s,l),p=m=b=null),E=!0,x=!1,o=!1,p=t.tag,m=t.result;else if(E)F(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=h,t.anchor=u,!0}else if(E)F(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=h,t.anchor=u,!0}if((t.line===a||t.lineIndent>e)&&(x&&(n=t.line,s=t.lineStart,l=t.position),Ze(t,e,Li,!0,o)&&(x?m=t.result:b=t.result),x||(De(t,c,d,p,m,b,n,s,l),p=m=b=null),Q(t,!0,-1),_=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&_!==0)F(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return x&&De(t,c,d,p,m,null,n,s,l),E&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=c),E}function wx(t){var e,r=!1,i=!1,o,a,n;if(n=t.input.charCodeAt(t.position),n!==33)return!1;if(t.tag!==null&&F(t,"duplication of a tag property"),n=t.input.charCodeAt(++t.position),n===60?(r=!0,n=t.input.charCodeAt(++t.position)):n===33?(i=!0,o="!!",n=t.input.charCodeAt(++t.position)):o="!",e=t.position,r){do n=t.input.charCodeAt(++t.position);while(n!==0&&n!==62);t.position<t.length?(a=t.input.slice(e,t.position),n=t.input.charCodeAt(++t.position)):F(t,"unexpected end of the stream within a verbatim tag")}else{for(;n!==0&&!bt(n);)n===33&&(i?F(t,"tag suffix cannot contain exclamation marks"):(o=t.input.slice(e-1,t.position+1),wh.test(o)||F(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),n=t.input.charCodeAt(++t.position);a=t.input.slice(e,t.position),fx.test(a)&&F(t,"tag suffix cannot contain flow indicator characters")}a&&!Sh.test(a)&&F(t,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{F(t,"tag name is malformed: "+a)}return r?t.tag=a:de.call(t.tagMap,o)?t.tag=t.tagMap[o]+a:o==="!"?t.tag="!"+a:o==="!!"?t.tag="tag:yaml.org,2002:"+a:F(t,'undeclared tag handle "'+o+'"'),!0}function Sx(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&F(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!bt(r)&&!qe(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&F(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Bx(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!bt(i)&&!qe(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&F(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),de.call(t.anchorMap,r)||F(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Q(t,!0,-1),!0}function Ze(t,e,r,i,o){var a,n,s,l=1,h=!1,u=!1,c,d,p,m,b,x;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=n=s=Li===r||Th===r,i&&Q(t,!0,-1)&&(h=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;wx(t)||Sx(t);)Q(t,!0,-1)?(h=!0,s=a,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):s=!1;if(s&&(s=h||o),(l===1||Li===r)&&(Ai===r||vh===r?b=e:b=e+1,x=t.position-t.lineStart,l===1?s&&(ls(t,x)||Tx(t,x,b))||kx(t,b)?u=!0:(n&&vx(t,b)||Cx(t,b)||xx(t,b)?u=!0:Bx(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&F(t,"alias node should not have any properties")):_x(t,b,Ai===r)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(u=s&&ls(t,x))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&F(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),c=0,d=t.implicitTypes.length;c<d;c+=1)if(m=t.implicitTypes[c],m.resolve(t.result)){t.result=m.construct(t.result),t.tag=m.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(de.call(t.typeMap[t.kind||"fallback"],t.tag))m=t.typeMap[t.kind||"fallback"][t.tag];else for(m=null,p=t.typeMap.multi[t.kind||"fallback"],c=0,d=p.length;c<d;c+=1)if(t.tag.slice(0,p[c].tag.length)===p[c].tag){m=p[c];break}m||F(t,"unknown tag !<"+t.tag+">"),t.result!==null&&m.kind!==t.kind&&F(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+m.kind+'", not "'+t.kind+'"'),m.resolve(t.result,t.tag)?(t.result=m.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):F(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function Ax(t){var e=t.position,r,i,o,a=!1,n;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(n=t.input.charCodeAt(t.position))!==0&&(Q(t,!0,-1),n=t.input.charCodeAt(t.position),!(t.lineIndent>0||n!==37));){for(a=!0,n=t.input.charCodeAt(++t.position),r=t.position;n!==0&&!bt(n);)n=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),o=[],i.length<1&&F(t,"directive name must not be less than one character in length");n!==0;){for(;xe(n);)n=t.input.charCodeAt(++t.position);if(n===35){do n=t.input.charCodeAt(++t.position);while(n!==0&&!zt(n));break}if(zt(n))break;for(r=t.position;n!==0&&!bt(n);)n=t.input.charCodeAt(++t.position);o.push(t.input.slice(r,t.position))}n!==0&&Sn(t),de.call(as,i)?as[i](t,i,o):Fi(t,'unknown document directive "'+i+'"')}if(Q(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Q(t,!0,-1)):a&&F(t,"directives end mark is expected"),Ze(t,t.lineIndent-1,Li,!1,!0),Q(t,!0,-1),t.checkLineBreaks&&dx.test(t.input.slice(e,t.position))&&Fi(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Zi(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Q(t,!0,-1));return}if(t.position<t.length-1)F(t,"end of the stream or a document separator is expected");else return}function Lx(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new bx(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,F(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Ax(r);return r.documents}function Fx(t,e){var r=Lx(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new Qt("expected a single document in the stream, but found more")}}var Ex=Fx,Ox={load:Ex},Mx=Ch,Ix=Ox.load;function Nx(t){const e=t.match(Il);if(!e)return{text:t,metadata:{}};let r=Ix(e[1],{schema:Mx})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}const qx=t=>t.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(e,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),Dx=t=>{const{text:e,metadata:r}=Nx(t),{displayMode:i,title:o,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:o,config:a,text:e}},$x=t=>{const e=kr.detectInit(t)??{},r=kr.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:i})=>{}):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:h0(t),directive:e}};function Fh(t){const e=qx(t),r=Dx(e),i=$x(r.text),o=Pl(r.config,i.directive);return t=U_(i.text),{code:t,title:r.title,config:o}}const zx=5e4,Rx="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Px="sandbox",jx="loose",Wx="http://www.w3.org/2000/svg",Yx="http://www.w3.org/1999/xlink",Hx="http://www.w3.org/1999/xhtml",Ux="100%",Xx="100%",Vx="border:0;margin:0;",Gx="margin:0",Kx="allow-top-navigation-by-user-activation allow-popups",Zx='The "iframe" tag is not supported by your browser.',Jx=["foreignobject"],Qx=["dominant-baseline"];function Eh(t){const e=Fh(t);return wi(),N0(e.config??{}),e}async function t1(t,e){Tn(),t=Eh(t).code;try{await An(t)}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}return!0}const hs=(t,e,r=[])=>`
.${t} ${e} { ${r.join(" !important; ")} !important; }`,e1=(t,e={})=>{var r;let i="";if(t.themeCSS!==void 0&&(i+=`
${t.themeCSS}`),t.fontFamily!==void 0&&(i+=`
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(i+=`
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!_o(e)){const o=t.htmlLabels||(r=t.flowchart)!=null&&r.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const a in e){const n=e[a];_o(n.styles)||o.forEach(s=>{i+=hs(n.id,s,n.styles)}),_o(n.textStyles)||(i+=hs(n.id,"tspan",n.textStyles))}}return i},r1=(t,e,r,i)=>{const o=e1(t,r),a=e_(e,o,t.themeVariables);return Do(fy(`${i}{${a}}`),gy)},i1=(t="",e,r)=>{let i=t;return!r&&!e&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=E0(i),i=i.replace(/<br>/g,"<br/>"),i},o1=(t="",e)=>{var r,i;const o=(i=(r=e==null?void 0:e.viewBox)==null?void 0:r.baseVal)!=null&&i.height?e.viewBox.baseVal.height+"px":Xx,a=btoa('<body style="'+Gx+'">'+t+"</body>");return`<iframe style="width:${Ux};height:${o};${Vx}" src="data:text/html;base64,${a}" sandbox="${Kx}">
  ${Zx}
</iframe>`},cs=(t,e,r,i,o)=>{const a=t.append("div");a.attr("id",r),i&&a.attr("style",i);const n=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",Wx);return o&&n.attr("xmlns:xlink",o),n.append("g"),t};function us(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const n1=(t,e,r,i)=>{var o,a,n;(o=t.getElementById(e))==null||o.remove(),(a=t.getElementById(r))==null||a.remove(),(n=t.getElementById(i))==null||n.remove()},a1=async function(t,e,r){var i,o,a,n,s,l;Tn();const h=Eh(e);e=h.code;const u=Pt();O.debug(u),e.length>((u==null?void 0:u.maxTextSize)??zx)&&(e=Rx);const c="#"+t,d="i"+t,p="#"+d,m="d"+t,b="#"+m;let x=Tt("body");const E=u.securityLevel===Px,_=u.securityLevel===jx,R=u.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),E){const k=us(Tt(r),d);x=Tt(k.nodes()[0].contentDocument.body),x.node().style.margin=0}else x=Tt(r);cs(x,t,m,`font-family: ${R}`,Yx)}else{if(n1(document,t,m,d),E){const k=us(Tt("body"),d);x=Tt(k.nodes()[0].contentDocument.body),x.node().style.margin=0}else x=Tt("body");cs(x,t,m)}let y,j;try{y=await An(e,{title:h.title})}catch(k){y=new yh("error"),j=k}const U=x.select(b).node(),N=y.type,tt=U.firstChild,ot=tt.firstChild,P=(o=(i=y.renderer).getClasses)==null?void 0:o.call(i,e,y),B=r1(u,N,P,c),et=document.createElement("style");et.innerHTML=B,tt.insertBefore(et,ot);try{await y.renderer.draw(e,t,Ja,y)}catch(k){throw b_.draw(e,t,Ja),k}const oe=x.select(`${b} svg`),I=(n=(a=y.db).getAccTitle)==null?void 0:n.call(a),w=(l=(s=y.db).getAccDescription)==null?void 0:l.call(s);l1(N,oe,I,w),x.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Hx);let C=x.select(b).node().innerHTML;if(O.debug("config.arrowMarkerAbsolute",u.arrowMarkerAbsolute),C=i1(C,E,El(u.arrowMarkerAbsolute)),E){const k=x.select(b+" svg").node();C=o1(C,k)}else _||(C=Ye.sanitize(C,{ADD_TAGS:Jx,ADD_ATTR:Qx}));if(j_(),j)throw j;const A=Tt(E?p:b).node();return A&&"remove"in A&&A.remove(),{svg:C,bindFunctions:y.db.bindFunctions}};function s1(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),M0(t),t!=null&&t.theme&&t.theme in ee?t.themeVariables=ee[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ee.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?O0(t):Wl();fn(r.logLevel),Tn()}const An=(t,e={})=>{const{code:r}=Fh(t);return P_(r,e)};function l1(t,e,r,i){Y_(e,t),H_(e,r,i,e.attr("id"))}const Te=Object.freeze({render:a1,parse:t1,getDiagramFromText:An,initialize:s1,getConfig:Pt,setConfig:Yl,getSiteConfig:Wl,updateSiteConfig:I0,reset:()=>{wi()},globalReset:()=>{wi(Ge)},defaultConfig:Ge});fn(Pt().logLevel);wi(Pt());const h1=async()=>{O.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Ve).map(async([e,{detector:r,loader:i}])=>{if(i)try{vn(e)}catch{try{const{diagram:o,id:a}=await i();Bi(a,o,r)}catch(o){throw O.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete Ve[e],o}}}))).filter(e=>e.status==="rejected");if(t.length>0){O.error(`Failed to load ${t.length} external diagrams`);for(const e of t)O.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},c1=(t,e,r)=>{O.warn(t),Rl(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},Oh=async function(t={querySelector:".mermaid"}){try{await u1(t)}catch(e){if(Rl(e)&&O.error(e.str),_t.parseError&&_t.parseError(e),!t.suppressErrors)throw O.error("Use the suppressErrors option to suppress these errors"),e}},u1=async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=Te.getConfig();O.debug(`${t?"":"No "}Callback function found`);let o;if(r)o=r;else if(e)o=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");O.debug(`Found ${o.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(O.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Te.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new kr.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let n;const s=[];for(const l of Array.from(o)){O.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;n=l.innerHTML,n=uc(kr.entityDecode(n)).trim().replace(/<br\s*\/?>/gi,"<br/>");const u=kr.detectInit(n);u&&O.debug("Detected early reinit: ",u);try{const{svg:c,bindFunctions:d}=await qh(h,n,l);l.innerHTML=c,t&&await t(h),d&&d(l)}catch(c){c1(c,s,_t.parseError)}}if(s.length>0)throw s[0]},Mh=function(t){Te.initialize(t)},d1=async function(t,e,r){O.warn("mermaid.init is deprecated. Please use run instead."),t&&Mh(t);const i={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await Oh(i)},f1=async(t,{lazyLoad:e=!0}={})=>{ql(...t),e===!1&&await h1()},Ih=function(){if(_t.startOnLoad){const{startOnLoad:t}=Te.getConfig();t&&_t.run().catch(e=>O.error("Mermaid failed to initialize",e))}};if(typeof document<"u"){/*!
 * Wait for document loaded before starting the execution
 */window.addEventListener("load",Ih,!1)}const p1=function(t){_t.parseError=t},Ei=[];let vo=!1;const Nh=async()=>{if(!vo){for(vo=!0;Ei.length>0;){const t=Ei.shift();if(t)try{await t()}catch(e){O.error("Error executing queue",e)}}vo=!1}},g1=async(t,e)=>new Promise((r,i)=>{const o=()=>new Promise((a,n)=>{Te.parse(t,e).then(s=>{a(s),r(s)},s=>{var l;O.error("Error parsing",s),(l=_t.parseError)==null||l.call(_t,s),n(s),i(s)})});Ei.push(o),Nh().catch(i)}),qh=(t,e,r)=>new Promise((i,o)=>{const a=()=>new Promise((n,s)=>{Te.render(t,e,r).then(l=>{n(l),i(l)},l=>{var h;O.error("Error parsing",l),(h=_t.parseError)==null||h.call(_t,l),s(l),o(l)})});Ei.push(a),Nh().catch(o)}),_t={startOnLoad:!0,mermaidAPI:Te,parse:g1,render:qh,init:d1,run:Oh,registerExternalDiagrams:f1,initialize:Mh,parseError:void 0,contentLoaded:Ih,setParseErrorHandler:p1,detectType:Gi},er=t=>{t=y1(t);const e=t.replace(/#(\d+);/g,"&#$1;").replace(/#([a-z]+);/g,"&$1;"),r=document.createElement("textarea");return r.innerHTML=e,r.value},Pe=t=>{const e=t.getAttribute("transform"),r=e==null?void 0:e.match(/translate\(([ \d.-]+),\s*([\d.-]+)\)/);let i=0,o=0;return r&&(i=Number(r[1]),o=Number(r[2])),{transformX:i,transformY:o}},m1=t=>{let e=t;return e=e.replace(/style.*:\S*#.*;/g,r=>r.substring(0,r.length-1)),e=e.replace(/classDef.*:\S*#.*;/g,r=>r.substring(0,r.length-1)),e=e.replace(/#\w+;/g,r=>{const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?`ﬂ°°${i}¶ß`:`ﬂ°${i}¶ß`}),e},y1=function(t){return t.replace(/ﬂ°°/g,"#").replace(/ﬂ°/g,"&").replace(/¶ß/g,";")},Dh=(t,e={x:0,y:0})=>{if(t.tagName.toLowerCase()!=="path")throw new Error(`Invalid input: Expected an HTMLElement of tag "path", got ${t.tagName}`);const r=t.getAttribute("d");if(!r)throw new Error('Path element does not contain a "d" attribute');const i=r.split(/(?=[LM])/),o=i[0].substring(1).split(",").map(s=>parseFloat(s)),a=i[i.length-1].substring(1).split(",").map(s=>parseFloat(s)),n=i.map(s=>{const l=s.substring(1).split(",").map(h=>parseFloat(h));return{x:l[0],y:l[1]}}).filter((s,l,h)=>{if(l===0||l===h.length-1)return!0;if(s.x===h[l-1].x&&s.y===h[l-1].y)return!1;if(l===h.length-2&&(h[l-1].x===s.x||h[l-1].y===s.y)){const u=h[h.length-1];return Math.hypot(u.x-s.x,u.y-s.y)>20}return s.x!==h[l-1].x||s.y!==h[l-1].y}).map(s=>({x:s.x+e.x,y:s.y+e.y}));return{startX:o[0]+e.x,startY:o[1]+e.y,endX:a[0]+e.x,endY:a[1]+e.y,reflectionPoints:n}},b1=(t,e)=>{const r=t.nodes.map(s=>s.startsWith("flowchart-")?s.split("-")[1]:s),i=e.querySelector(`[id='${t.id}']`);if(!i)throw new Error("SubGraph element not found");const o=Ln(i,e),a=i.getBBox(),n={width:a.width,height:a.height};return t.classes=void 0,t.dir=void 0,{...t,nodeIds:r,...o,...n,text:er(t.title)}},_1=(t,e)=>{var r,i,o;const a=e.querySelector(`[id*="flowchart-${t.id}-"]`);if(!a)return;let n;((r=a.parentElement)==null?void 0:r.tagName.toLowerCase())==="a"&&(n=a.parentElement.getAttribute("xlink:href"));const s=Ln(n?a.parentElement:a,e),l=a.getBBox(),h={width:l.width,height:l.height},u=(i=a.querySelector(".label-container"))==null?void 0:i.getAttribute("style"),c=(o=a.querySelector(".label"))==null?void 0:o.getAttribute("style"),d={};u==null||u.split(";").forEach(m=>{if(!m)return;const b=m.split(":")[0].trim(),x=m.split(":")[1].trim();d[b]=x});const p={};return c==null||c.split(";").forEach(m=>{if(!m)return;const b=m.split(":")[0].trim(),x=m.split(":")[1].trim();p[b]=x}),{id:t.id,labelType:t.labelType,text:er(t.text),type:t.type,link:n||void 0,...s,...h,containerStyle:d,labelStyle:p}},C1=(t,e,r)=>{const i=r.querySelector(`[id*="L-${t.start}-${t.end}-${e}"]`);if(!i)throw new Error("Edge element not found");const o=Ln(i,r),a=Dh(i,o);return t.length=void 0,{...t,...a,text:er(t.text)}},Ln=(t,e)=>{var r;if(!t)throw new Error("Element not found");let i=(r=t.parentElement)==null?void 0:r.parentElement;const o=t.childNodes[0];let a={x:0,y:0};if(o){const{transformX:h,transformY:u}=Pe(o),c=o.getBBox();a={x:Number(o.getAttribute("x"))||h+c.x||0,y:Number(o.getAttribute("y"))||u+c.y||0}}const{transformX:n,transformY:s}=Pe(t),l={x:n+a.x,y:s+a.y};for(;i&&i.id!==e.id;){if(i.classList.value==="root"&&i.hasAttribute("transform")){const{transformX:h,transformY:u}=Pe(i);l.x+=h,l.y+=u}i=i.parentElement}return l},x1=(t,e)=>{t.parse();const r=t.parser.yy,i=r.getVertices();Object.keys(i).forEach(n=>{i[n]=_1(i[n],e)});const o=new Map,a=r.getEdges().filter(n=>e.querySelector(`[id*="L-${n.start}-${n.end}"]`)).map(n=>{const s=`${n.start}-${n.end}`,l=o.get(s)||0;return o.set(s,l+1),C1(n,l,e)});return{type:"flowchart",subGraphs:r.getSubGraphs().map(n=>b1(n,e)),vertices:i,edges:a}},k1=(t,e)=>{const r={};e!=null&&e.label&&(r.label={text:er(e.label),fontSize:16});const i=t.tagName;if(i==="line")r.startX=Number(t.getAttribute("x1")),r.startY=Number(t.getAttribute("y1")),r.endX=Number(t.getAttribute("x2")),r.endY=Number(t.getAttribute("y2"));else if(i==="path"){const o=t.getAttribute("d");if(!o)throw new Error('Path element does not contain a "d" attribute');const a=o.split(/(?=[LC])/),n=a[0].substring(1).split(",").map(h=>parseFloat(h)),s=[];a.forEach(h=>{const u=h.substring(1).trim().split(" ").map(c=>{const[d,p]=c.split(",");return[parseFloat(d)-n[0],parseFloat(p)-n[1]]});s.push(...u)});const l=s[s.length-1];r.startX=n[0],r.startY=n[1],r.endX=l[0],r.endY=l[1],r.points=s}return e!=null&&e.label&&(r.startY=r.startY-10,r.endY=r.endY-10),r.strokeColor=t.getAttribute("stroke"),r.strokeWidth=Number(t.getAttribute("stroke-width")),r.type="arrow",r.strokeStyle=(e==null?void 0:e.strokeStyle)||"solid",r.startArrowhead=(e==null?void 0:e.startArrowhead)||null,r.endArrowhead=(e==null?void 0:e.endArrowhead)||null,r},$h=(t,e,r,i,o)=>{const a={};return a.type="arrow",a.startX=t,a.startY=e,a.endX=r,a.endY=i,Object.assign(a,{...o}),a},Uo=(t,e,r,i)=>({type:"text",x:t,y:e,text:r,width:(i==null?void 0:i.width)||20,height:(i==null?void 0:i.height)||20,fontSize:(i==null?void 0:i.fontSize)||Oi,id:i==null?void 0:i.id,groupId:i==null?void 0:i.groupId,metadata:i==null?void 0:i.metadata}),zh=(t,e,r)=>{const i={},o=Number(t.getAttribute("x")),a=Number(t.getAttribute("y"));i.type="text",i.text=er(e),r!=null&&r.id&&(i.id=r.id),r!=null&&r.groupId&&(i.groupId=r.groupId);const n=t.getBBox();i.width=n.width,i.height=n.height,i.x=o-n.width/2,i.y=a;const s=parseInt(getComputedStyle(t).fontSize);return i.fontSize=s,i},jt=(t,e,r={})=>{const i={};i.type=e;const{label:o,subtype:a,id:n,groupId:s}=r;i.id=n,s&&(i.groupId=s),o&&(i.label={text:er(o.text),fontSize:16,verticalAlign:o==null?void 0:o.verticalAlign});const l=t.getBBox();switch(i.x=l.x,i.y=l.y,i.width=l.width,i.height=l.height,i.subtype=a,a){case"highlight":const h=t.getAttribute("fill");h&&(i.bgColor=h);break;case"note":i.strokeStyle="dashed";break}return i},Or=(t,e,r,i,o,a)=>{const n={};return n.startX=e,n.startY=r,n.endX=i,a!=null&&a.groupId&&(n.groupId=a.groupId),a!=null&&a.id&&(n.id=a.id),n.endY=o,n.strokeColor=t.getAttribute("stroke"),n.strokeWidth=Number(t.getAttribute("stroke-width")),n.type="line",n},ds={0:"SOLID",1:"DOTTED",3:"SOLID_CROSS",4:"DOTTED_CROSS",5:"SOLID_OPEN",6:"DOTTED_OPEN",24:"SOLID_POINT",25:"DOTTED_POINT"},qt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,SOLID_POINT:24,DOTTED_POINT:25,CRITICAL_START:27},v1=t=>{let e;switch(t){case qt.SOLID:case qt.SOLID_CROSS:case qt.SOLID_OPEN:case qt.SOLID_POINT:e="solid";break;case qt.DOTTED:case qt.DOTTED_CROSS:case qt.DOTTED_OPEN:case qt.DOTTED_POINT:e="dotted";break;default:e="solid";break}return e},T1=(t,e)=>{var r,i;if((r=t.nextElementSibling)!=null&&r.classList.contains("sequenceNumber")){const o=(i=t.nextElementSibling)==null?void 0:i.textContent;if(!o)throw new Error("sequence number not present");const a=30,n=a/2,s={type:"rectangle",x:e.startX-10,y:e.startY-n,label:{text:o,fontSize:14},bgColor:"#e9ecef",height:a,subtype:"sequence"};Object.assign(e,{sequenceNumber:s})}},fs=(t,e,r)=>{if(!t)throw"root node not found";const i=te(),o=Array.from(t.children),a=[];return o.forEach((n,s)=>{const l=`${r==null?void 0:r.id}-${s}`;let h;switch(n.tagName){case"line":const u=Number(n.getAttribute("x1")),c=Number(n.getAttribute("y1")),d=Number(n.getAttribute("x2")),p=Number(n.getAttribute("y2"));h=Or(n,u,c,d,p,{groupId:i,id:l});break;case"text":h=zh(n,e,{groupId:i,id:l});break;case"circle":h=jt(n,"ellipse",{label:n.textContent?{text:n.textContent}:void 0,groupId:i,id:l});default:h=jt(n,Zh[n.tagName],{label:n.textContent?{text:n.textContent}:void 0,groupId:i,id:l})}a.push(h)}),a},w1=(t,e)=>{const r=Array.from(e.querySelectorAll(".actor-top")),i=Array.from(e.querySelectorAll(".actor-bottom")),o=[],a=[];return Object.values(t).forEach((n,s)=>{var l;const h=r.find(d=>d.getAttribute("name")===n.name),u=i.find(d=>d.getAttribute("name")===n.name);if(!h||!u)throw"root not found";const c=n.description;if(n.type==="participant"){const d=jt(h,"rectangle",{id:`${n.name}-top`,label:{text:c},subtype:"actor"});if(!d)throw"Top Node element not found!";o.push([d]);const p=jt(u,"rectangle",{id:`${n.name}-bottom`,label:{text:c},subtype:"actor"});o.push([p]);const m=(l=h==null?void 0:h.parentElement)==null?void 0:l.previousElementSibling;if((m==null?void 0:m.tagName)!=="line")throw"Line not found";const b=Number(m.getAttribute("x1"));if(!d.height)throw"Top node element height is null";const x=d.y+d.height,E=p.y,_=Number(m.getAttribute("x2")),R=Or(m,b,x,_,E);a.push(R)}else if(n.type==="actor"){const d=fs(h,c,{id:`${n.name}-top`});o.push(d);const p=fs(u,c,{id:`${n.name}-bottom`});o.push(p);const m=h.previousElementSibling;if((m==null?void 0:m.tagName)!=="line")throw"Line not found";const b=Number(m.getAttribute("x1")),x=Number(m.getAttribute("y1")),E=Number(m.getAttribute("x2")),_=p.find(R=>R.type==="ellipse");if(_){const R=_.y,y=Or(m,b,x,E,R);a.push(y)}}}),{nodes:o,lines:a}},S1=(t,e)=>{const r=[],i=Array.from(e.querySelectorAll('[class*="messageLine"]')),o=Object.keys(ds),a=t.filter(n=>o.includes(n.type.toString()));return i.forEach((n,s)=>{const l=a[s],h=ds[l.type],u=k1(n,{label:l==null?void 0:l.message,strokeStyle:v1(l.type),endArrowhead:h==="SOLID_OPEN"||h==="DOTTED_OPEN"?null:"arrow"});T1(n,u),r.push(u)}),r},B1=(t,e)=>{const r=Array.from(e.querySelectorAll(".note")).map(a=>a.parentElement),i=t.filter(a=>a.type===qt.NOTE),o=[];return r.forEach((a,n)=>{if(!a)return;const s=a.firstChild,l=i[n].message,h=jt(s,"rectangle",{label:{text:l},subtype:"note"});o.push(h)}),o},A1=t=>{const e=Array.from(t.querySelectorAll("[class*=activation]")),r=[];return e.forEach(i=>{const o=jt(i,"rectangle",{label:{text:""},subtype:"activation"});r.push(o)}),r},L1=(t,e)=>{const r=Array.from(e.querySelectorAll(".loopLine")),i=[],o=[],a=[];r.forEach(u=>{const c=Number(u.getAttribute("x1")),d=Number(u.getAttribute("y1")),p=Number(u.getAttribute("x2")),m=Number(u.getAttribute("y2")),b=Or(u,c,d,p,m);b.strokeStyle="dotted",b.strokeColor="#adb5bd",b.strokeWidth=2,i.push(b)});const n=Array.from(e.querySelectorAll(".loopText")),s=t.filter(u=>u.type===qt.CRITICAL_START).map(u=>u.message);n.forEach(u=>{var c;const d=u.textContent||"",p=zh(u,d),m=((c=d.match(/\[(.*?)\]/))==null?void 0:c[1])||"";s.includes(m)&&(p.x+=16),o.push(p)});const l=Array.from(e==null?void 0:e.querySelectorAll(".labelBox")),h=Array.from(e==null?void 0:e.querySelectorAll(".labelText"));return l.forEach((u,c)=>{var d;const p=((d=h[c])==null?void 0:d.textContent)||"",m=jt(u,"rectangle",{label:{text:p}});m.strokeColor="#adb5bd",m.bgColor="#e9ecef",m.width=void 0,a.push(m)}),{lines:i,texts:o,nodes:a}},F1=t=>{const e=Array.from(t.querySelectorAll(".rect")).filter(i=>{var o;return((o=i.parentElement)==null?void 0:o.tagName)!=="g"}),r=[];return e.forEach(i=>{const o=jt(i,"rectangle",{label:{text:""},subtype:"highlight"});r.push(o)}),r},E1=(t,e)=>{t.parse();const r=t.parser.yy,i=[],o=r.getBoxes(),a=F1(e),n=r.getActors(),{nodes:s,lines:l}=w1(n,e),h=r.getMessages(),u=S1(h,e),c=B1(h,e),d=A1(e),p=L1(h,e);return i.push(a),i.push(...s),i.push(c),i.push(d),{type:"sequence",lines:l,arrows:u,nodes:i,loops:p,groups:o}},Qr={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},ps={LINE:0,DOTTED_LINE:1},ae=16,O1=t=>{let e;switch(t){case ps.LINE:e="solid";break;case ps.DOTTED_LINE:e="dotted";break;default:e="solid"}return e},gs=t=>{let e;switch(t){case Qr.AGGREGATION:e="diamond_outline";break;case Qr.COMPOSITION:e="diamond";break;case Qr.EXTENSION:e="triangle_outline";break;case"none":e=null;break;case Qr.DEPENDENCY:default:e="arrow";break}return e},M1=(t,e)=>{const r=[],i=[],o=[];return Object.values(t).forEach(a=>{var n;const{domId:s,id:l}=a,h=te(),u=e.querySelector(`[data-id=${l}]`);if(!u)throw Error(`DOM Node with id ${s} not found`);const{transformX:c,transformY:d}=Pe(u),p=jt(u.firstChild,"rectangle",{id:l,groupId:h});p.x+=c,p.y+=d,p.metadata={classId:l},r.push(p),Array.from(u.querySelectorAll(".divider")).forEach(b=>{const x=Number(b.getAttribute("x1")),E=Number(b.getAttribute("y1")),_=Number(b.getAttribute("x2")),R=Number(b.getAttribute("y2")),y=Or(b,x,E,_,R,{groupId:h,id:te()});y.startX+=c,y.startY+=d,y.endX+=c,y.endY+=d,y.metadata={classId:l},i.push(y)});const m=(n=u.querySelector(".label"))==null?void 0:n.children;if(!m)throw"label nodes not found";Array.from(m).forEach(b=>{const x=b.textContent;if(!x)return;const E=te(),{transformX:_,transformY:R}=Pe(b),y=b.getBBox(),j=Uo(c+_,d+R+10,x,{width:y.width,height:y.height,id:E,groupId:h,metadata:{classId:l}});o.push(j)})}),{nodes:r,lines:i,text:o}},I1=(t,e)=>{const r=["triangle_outline","diamond","diamond_outline"],i=e.startArrowhead&&r.includes(e.startArrowhead),o=e.endArrowhead&&r.includes(e.endArrowhead);return!o&&!i||(i&&(t==="LR"?e.startX-=ae:t==="RL"?e.startX+=ae:t==="TB"?e.startY-=ae:t==="BT"&&(e.startY+=ae)),o&&(t==="LR"?e.endX+=ae:t==="RL"?e.endX-=ae:t==="TB"?e.endY+=ae:t==="BT"&&(e.endY-=ae))),e},N1=(t,e,r,i)=>{var o;const a=(o=r.querySelector(".edgePaths"))==null?void 0:o.children;if(!a)throw new Error("No Edges found!");const n=[],s=[];return t.forEach((l,h)=>{const{id1:u,id2:c,relation:d}=l,p=e.find(et=>et.id===u),m=e.find(et=>et.id===c),b=O1(d.lineType),x=gs(d.type1),E=gs(d.type2),_=Dh(a[h]),R=$h(_.startX,_.startY,_.endX,_.endY,{strokeStyle:b,startArrowhead:x,endArrowhead:E,label:l.title?{text:l.title}:void 0,start:{type:"rectangle",id:p.id},end:{type:"rectangle",id:m.id}}),y=I1(i,R);n.push(y);const{relationTitle1:j,relationTitle2:U}=l,N=20,tt=15,ot=15;let P,B;if(j&&j!=="none"){switch(i){case"TB":P=y.startX-N,y.endX<y.startX&&(P-=ot),B=y.startY+tt;break;case"BT":P=y.startX+N,y.endX>y.startX&&(P+=ot),B=y.startY-tt;break;case"LR":P=y.startX+N,B=y.startY+tt,y.endY>y.startY&&(B+=ot);break;case"RL":P=y.startX-N,B=y.startY-tt,y.startY>y.endY&&(B-=ot);break;default:P=y.startX-N,B=y.startY+tt}const et=Uo(P,B,j,{fontSize:16});s.push(et)}if(U&&U!=="none"){switch(i){case"TB":P=y.endX+N,y.endX<y.startX&&(P+=ot),B=y.endY-tt;break;case"BT":P=y.endX-N,y.endX>y.startX&&(P-=ot),B=y.endY+tt;break;case"LR":P=y.endX-N,B=y.endY-tt,y.endY>y.startY&&(B-=ot);break;case"RL":P=y.endX+N,B=y.endY+tt,y.startY>y.endY&&(B+=ot);break;default:P=y.endX+N,B=y.endY-tt}const et=Uo(P,B,U,{fontSize:16});s.push(et)}}),{arrows:n,text:s}},q1=(t,e,r)=>{const i=[],o=[];return t.forEach(a=>{const{id:n,text:s,class:l}=a,h=e.querySelector(`#${n}`);if(!h)throw new Error(`Node with id ${n} not found!`);const{transformX:u,transformY:c}=Pe(h),d=h.firstChild,p=jt(d,"rectangle",{id:n,subtype:"note",label:{text:s}});if(Object.assign(p,{x:p.x+u,y:p.y+c}),i.push(p),l){const m=r.find(y=>y.id===l);if(!m)throw new Error(`class node with id ${l} not found!`);const b=p.x+(p.width||0)/2,x=p.y+(p.height||0),E=b,_=m.y,R=$h(b,x,E,_,{strokeStyle:"dotted",startArrowhead:null,endArrowhead:null,start:{id:p.id,type:"rectangle"},end:{id:m.id,type:"rectangle"}});o.push(R)}}),{notes:i,connectors:o}},D1=(t,e)=>{t.parse();const r=t.parser.yy,i=r.getDirection(),o=[],a=[],n=[],s=[],l=r.getNamespaces(),h=r.getClasses();if(Object.keys(h).length){const b=M1(h,e);o.push(b.nodes),a.push(...b.lines),n.push(...b.text),s.push(...b.nodes)}const u=r.getRelations(),{arrows:c,text:d}=N1(u,s,e,i),{notes:p,connectors:m}=q1(r.getNotes(),e,s);return o.push(p),c.push(...m),n.push(...d),{type:"class",nodes:o,lines:a,arrows:c,text:n,namespaces:l}},$1=t=>{const e=t.querySelector("svg");if(!e)throw new Error("SVG element not found");const r=e.getBoundingClientRect(),i=r.width,o=r.height;e.setAttribute("width",`${i}`),e.setAttribute("height",`${o}`);const a="image/svg+xml",n=unescape(encodeURIComponent(e.outerHTML)),s=`data:image/svg+xml;base64,${btoa(n)}`;return{type:"graphImage",mimeType:a,dataURL:s,width:i,height:o}},z1=async(t,e=Xn)=>{_t.initialize({...Xn,...e});const r=await _t.mermaidAPI.getDiagramFromText(m1(t)),{svg:i}=await _t.render("mermaid-to-excalidraw",t),o=document.createElement("div");o.setAttribute("style","opacity: 0; position: relative; z-index: -1;"),o.innerHTML=i,o.id="mermaid-diagram",document.body.appendChild(o);let a;switch(r.type){case"flowchart-v2":{a=x1(r,o);break}case"sequence":{a=E1(r,o);break}case"classDiagram":{a=D1(r,o);break}default:a=$1(o)}return o.remove(),a},R1=async(t,e)=>{var r;const i=e||{},o=parseInt(((r=i.themeVariables)==null?void 0:r.fontSize)??"")||Oi,a=await z1(t,{...i,themeVariables:{...i.themeVariables,fontSize:`${o*1.25}px`}});return cc(a,{fontSize:o})},_k=Object.freeze(Object.defineProperty({__proto__:null,parseMermaidToExcalidraw:R1},Symbol.toStringTag,{value:"Module"}));export{u0 as $,m_ as A,en as B,Rt as C,sk as D,ck as E,fa as F,da as G,dk as H,uk as I,hk as J,nk as K,ak as L,pk as M,lk as N,fk as O,e0 as P,Gy as Q,Ga as R,mk as S,yn as T,q as U,Wy as V,Pt as W,gk as X,Jb as Y,n0 as Z,b0 as _,a_ as a,Ef as a0,_0 as a1,Nr as a2,L as a3,M as a4,h_ as a5,Pl as a6,Ct as a7,Ls as a8,vc as a9,ok as aA,gc as aB,Zo as aC,le as aD,aa as aE,fd as aF,Sr as aG,uc as aH,_k as aI,_r as aa,Mm as ab,_y as ac,Yi as ad,Bm as ae,ki as af,_i as ag,Og as ah,Eg as ai,Dr as aj,me as ak,km as al,Da as am,we as an,Mg as ao,hn as ap,Fg as aq,qg as ar,Qe as as,Sm as at,yt as au,ad as av,Ko as aw,Fs as ax,Ir as ay,Ms as az,o_ as b,i_ as c,Tt as d,ch as e,ht as f,kn as g,Ti as h,Xe as i,pn as j,S0 as k,O as l,$r as m,l_ as n,s_ as o,bk as p,r_ as q,If as r,n_ as s,El as t,kr as u,E0 as v,T0 as w,yk as x,f_ as y,x0 as z};
