From 95b783f0134019efd58cdab3e888bfbcc66b786c Mon Sep 17 00:00:00 2001 From: Shu Wang Date: Tue, 3 Sep 2024 16:55:45 +0200 Subject: [PATCH] Updates --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 08a31ae..3c839b5 100644 --- a/app.js +++ b/app.js @@ -1,2 +1,2 @@ /*! For license information please see app.js.LICENSE.txt */ -(self.webpackChunkonsenui_v2_react_minimum=self.webpackChunkonsenui_v2_react_minimum||[]).push([[3524],{3895:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function findLastDrawCoveringIndex(t,e){var r=t.draw,n=null;if(!r)return console.log("draw command is null!"),null;for(var i=0;i=o.start&&e<=o.end&&(n=r[i])}return n}function evaluateExpression(string1,string2,number){var replacedString=string1.replace(new RegExp(string2,"g"),number);return eval(replacedString)}function findComponentIdxByName(t,e){for(var r=t.data,n=0;nevaluateExpression,el:()=>findComponentIdxByName,rO:()=>findLastDrawCoveringIndex})},6897:(t,e,r)=>{"use strict";var n=r(758),i=r(9576),o=r(9673),a=r(1393),s=r(972),l={palette:{mode:"dark",primary:{main:"#90caf9"},secondary:{main:"#f48fb1"}},components:{MuiAccordion:{defaultProps:{square:!0,TransitionProps:{unmountOnExit:!0}},styleOverrides:{root:{border:"1px solid rgba(255, 255, 255, .125)",boxShadow:"none",transition:(0,s.A)().transitions.create("margin-left"),"&:not(:last-child)":{borderBottom:0},"&:before":{display:"none"},"&.Mui-expanded":{margin:"auto"},"&.Mui-disabled":{marginLeft:32}}}},MuiAccordionSummary:{styleOverrides:{root:{borderBottom:"1px solid rgba(255, 255, 255, .125)",minHeight:56,"&.Mui-expanded":{minHeight:56}},content:{alignItems:"center",justifyContent:"space-between","&.Mui-expanded":{margin:"12px 0"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:"#212121"}}},MuiDrawer:{styleOverrides:{docked:{"& .MuiPaper-root":{position:"static"}},paper:{}}},MuiPopover:{styleOverrides:{paper:{backgroundColor:"#121212"}}},MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{borderLeft:"2px solid #3399ff",color:"#66b3ff",backgroundColor:"#1d2126"}}}}},typography:{fontSize:14}};const c=(0,s.A)(l);var u=r(5686),h=r(1191),d=r(3989),f=r(7749),p=r(4805),m=r(1891),g=r(3325),y=r(7230),b=r(9634);function _(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return x(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0?r.map((function(t,e){return n.createElement(p.A,{key:t.timestamp,selected:a===e,onClick:function(){i(t),s(e)}},n.createElement(m.A,{sx:{pl:2}},new Date(t.timestamp).toLocaleString()))})):n.createElement(m.A,{sx:{pl:2}},"No saved diagrams")))))};var v=r(1275);function w(t){t.languages.register({id:"customLang"});var e=new RegExp("\\b(".concat(["page","show","visslides","data","draw"].join("|"),")\\b")),r=[":",":=","=","*",",","@","&","(",")","[","]","{","}"].map((function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})),n=new RegExp("(".concat(r.join("|"),")"),"g"),i=new RegExp("\\b(".concat(["array","matrix","linkedlist","stack","tree","graph","text"].join("|"),")\\b")),o=new RegExp("\\b(".concat(["id","value","color","arrow","hidden","structure"].join("|"),")\\b"));t.languages.setMonarchTokensProvider("customLang",{tokenizer:{root:[[/\[error\].*/,"custom-error"],[/\[warning\].*/,"custom-warning"],[/\[info\].*/,"custom-info"],[/\[debug\].*/,"custom-debug"],[/\b(digit|number)\b/,"custom-number"],[/\/\/.*$/,"comment"],[/$[ \t]*.*/,"inlinecomment"],[e,"keyword"],[i,"component"],[o,"attribute"],[/\b[a-zA-Z_][a-zA-Z0-9_]*\b/,"variable"],[/\b\d+(\.\d+)?\b/,"number"],[n,"symbol"]]}}),t.editor.defineTheme("customTheme",{base:"vs-dark",inherit:!0,rules:[{token:"custom-error",foreground:"ff0000",fontStyle:"bold"},{token:"custom-warning",foreground:"FFA500",fontStyle:"italic"},{token:"custom-info",foreground:"0000ff"},{token:"custom-debug",foreground:"008800"},{token:"custom-number",foreground:"800080"},{token:"comment",foreground:"6a9955"},{token:"inlinecomment",foreground:"6a9955"},{token:"variable",foreground:"dcdcaa"},{token:"number",foreground:"b5cea8"},{token:"keyword",foreground:"569cd6"},{token:"symbol",foreground:"ffcc00"},{token:"component",foreground:"4ec9b0"},{token:"attribute",foreground:"d19a66"}],colors:{"editor.background":"#1E1E1E","editor.foreground":"#FFFFFF","editorCursor.foreground":"#A7A7A7","editor.lineHighlightBackground":"#333333","editorLineNumber.foreground":"#858585","editor.selectionBackground":"#264F78","editor.inactiveSelectionBackground":"#3A3D41"}})}const k=function(t){var e=t.value,r=void 0===e?"":e,i=t.onChange,o=void 0===i?function(){}:i;return v.wG.init().then((function(t){w(t)})),n.createElement(v.Ay,{height:"100%",language:"customLang",value:r,onChange:function(t){return o(t)},theme:"customTheme",options:{automaticLayout:!0,fontFamily:"Consolas",fontSize:15,lineNumbers:"on",minimap:{enabled:!1}}})},T=function(t){var e=t.value,r=void 0===e?"":e,i=t.onChange,o=void 0===i?function(){}:i;return v.wG.init().then((function(t){w(t)})),n.createElement(v.Ay,{height:"100%",language:"customLang",value:r,onChange:function(t){return o(t)},theme:"customTheme",options:{automaticLayout:!0,fontFamily:"Consolas",fontSize:14,lineNumbers:"on",minimap:{enabled:!1},readOnly:!0}})};var S=r(6220),K=r(7463),A=r(235),B=r(9967),F=r(6607),E=r(2632);const L=function(t){var e=t.code1,r=t.mermaidCode,i=t.editor1Height,o=t.leftWidth,a=t.handleEditor1Change,s=t.setEditor1Height,l=t.setMermaidCode,c=t.dslEditorEditable,u=t.setDslEditorEditable;return n.createElement("div",{className:"CodeEditorsContent",style:{width:o,display:"flex",flexDirection:"column",overflow:"hidden",position:"relative"}},n.createElement(h.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2}},n.createElement(K.A,{variant:"overline"},"Code Editor"),n.createElement(A.A,{title:c?"Edit Mode":"Read Mode"},n.createElement(B.A,{onClick:function(){u((function(t){return!t}))},size:"small"},c?n.createElement(E.A,{sx:{fontSize:18}}):n.createElement(F.A,{sx:{fontSize:18}})))),n.createElement(S.ResizableBox,{height:i,width:1/0,resizeHandles:["s"],onResizeStop:function(t,e){return s(e.size.height)},minConstraints:[1/0,100],maxConstraints:[1/0,window.innerHeight-100],handle:n.createElement("span",{style:{width:"100%",height:"4px",borderTop:"1px solid #444",cursor:"row-resize",position:"absolute",bottom:0,left:0}})},n.createElement("div",{style:{height:"100%",margin:0,padding:0}},n.createElement(k,{value:e,onChange:a}))),n.createElement(h.A,{sx:{display:"flex",flexDirection:"column",height:"calc(100% - ".concat(i,"px)"),overflow:"hidden"}},n.createElement(h.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2}},n.createElement(K.A,{variant:"overline"},"Mermaid Editor"),n.createElement(A.A,{title:"Read Mode"},n.createElement(B.A,{size:"small"},n.createElement(F.A,{sx:{fontSize:18}})))),n.createElement("div",{style:{flexGrow:1,overflow:"auto"}},n.createElement(T,{value:r,onChange:l}))))};var M=r(9700),O=r(389),$=r(6404),I=r(3615),D=r(57),N=(r(5070),r(772)),P=(r(8605),r(6009)),j="comm",z="rule",q="decl",R=Math.abs,W=String.fromCharCode;function U(t){return t.trim()}function H(t,e,r){return t.replace(e,r)}function Y(t,e,r){return t.indexOf(e,r)}function G(t,e){return 0|t.charCodeAt(e)}function V(t,e,r){return t.slice(e,r)}function J(t){return t.length}function X(t){return t.length}function Z(t,e){return e.push(t),t}(0,P.K2)(U,"trim"),(0,P.K2)(H,"replace"),(0,P.K2)(Y,"indexof"),(0,P.K2)(G,"charat"),(0,P.K2)(V,"substr"),(0,P.K2)(J,"strlen"),(0,P.K2)(X,"sizeof"),(0,P.K2)(Z,"append");var Q=1,tt=1,et=0,rt=0,nt=0,it="";function ot(t,e,r,n,i,o,a,s){return{value:t,root:e,parent:r,type:n,props:i,children:o,line:Q,column:tt,length:a,return:"",siblings:s}}function at(){return nt}function st(){return nt=rt>0?G(it,--rt):0,tt--,10===nt&&(tt=1,Q--),nt}function lt(){return nt=rt2||dt(nt)>3?"":" "}function yt(t,e){for(;--e&<()&&!(nt<48||nt>102||nt>57&&nt<65||nt>70&&nt<97););return ht(t,ut()+(e<6&&32==ct()&&32==lt()))}function bt(t){for(;lt();)switch(nt){case t:return rt;case 34:case 39:34!==t&&39!==t&&bt(nt);break;case 40:41===t&&bt(t);break;case 92:lt()}return rt}function _t(t,e){for(;lt()&&t+nt!==57&&(t+nt!==84||47!==ct()););return"/*"+ht(e,rt-1)+"*"+W(47===t?t:lt())}function xt(t){for(;!dt(ct());)lt();return ht(t,rt)}function Ct(t){return pt(vt("",null,null,null,[""],t=ft(t),0,[0],t))}function vt(t,e,r,n,i,o,a,s,l){for(var c=0,u=0,h=a,d=0,f=0,p=0,m=1,g=1,y=1,b=0,_="",x=i,C=o,v=n,w=_;g;)switch(p=b,b=lt()){case 40:if(108!=p&&58==G(w,h-1)){-1!=Y(w+=H(mt(b),"&","&\f"),"&\f",R(c?s[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:w+=mt(b);break;case 9:case 10:case 13:case 32:w+=gt(p);break;case 92:w+=yt(ut()-1,7);continue;case 47:switch(ct()){case 42:case 47:Z(kt(_t(lt(),ut()),e,r,l),l);break;default:w+="/"}break;case 123*m:s[c++]=J(w)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:-1==y&&(w=H(w,/\f/g,"")),f>0&&J(w)-h&&Z(f>32?Tt(w+";",n,r,h-1,l):Tt(H(w," ","")+";",n,r,h-2,l),l);break;case 59:w+=";";default:if(Z(v=wt(w,e,r,c,u,i,s,_,x=[],C=[],h,o),o),123===b)if(0===u)vt(w,e,v,v,x,o,h,s,C);else switch(99===d&&110===G(w,3)?100:d){case 100:case 108:case 109:case 115:vt(t,v,v,n&&Z(wt(t,v,v,0,0,i,s,_,i,x=[],h,C),C),i,C,h,s,n?x:C);break;default:vt(w,v,v,v,[""],C,0,s,C)}}c=u=f=0,m=y=1,_=w="",h=a;break;case 58:h=1+J(w),f=p;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==st())continue;switch(w+=W(b),b*m){case 38:y=u>0?1:(w+="\f",-1);break;case 44:s[c++]=(J(w)-1)*y,y=1;break;case 64:45===ct()&&(w+=mt(lt())),d=ct(),u=h=J(_=w+=xt(ut())),b++;break;case 45:45===p&&2==J(w)&&(m=0)}}return o}function wt(t,e,r,n,i,o,a,s,l,c,u,h){for(var d=i-1,f=0===i?o:[""],p=X(f),m=0,g=0,y=0;m0?f[b]+" "+_:H(_,/&\f/g,f[b])))&&(l[y++]=x);return ot(t,e,r,0===i?z:s,l,c,u,h)}function kt(t,e,r,n){return ot(t,e,r,j,W(at()),V(t,2,-2),0,n)}function Tt(t,e,r,n,i){return ot(t,e,r,q,V(t,0,n),V(t,n+1,-1),n,i)}function St(t,e){for(var r="",n=0;n/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(8544).then(r.bind(r,8544));return{id:"c4",diagram:t}}),"loader")},Bt="flowchart",Ft={id:Bt,detector:(0,P.K2)(((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(2725),r.e(8396),r.e(3706),r.e(9199),r.e(4822)]).then(r.bind(r,4822));return{id:Bt,diagram:t}}),"loader")},Et="flowchart-v2",Lt={id:Et,detector:(0,P.K2)(((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&(!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t))),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(2725),r.e(8396),r.e(3706),r.e(9199),r.e(3478)]).then(r.bind(r,3478));return{id:Et,diagram:t}}),"loader")},Mt={id:"er",detector:(0,P.K2)((t=>/^\s*erDiagram/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(1381)]).then(r.bind(r,3762));return{id:"er",diagram:t}}),"loader")},Ot="gitGraph",$t={id:Ot,detector:(0,P.K2)((t=>/^\s*gitGraph/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(9872).then(r.bind(r,9872));return{id:Ot,diagram:t}}),"loader")},It="gantt",Dt={id:It,detector:(0,P.K2)((t=>/^\s*gantt/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(3640).then(r.bind(r,3640));return{id:It,diagram:t}}),"loader")},Nt="info",Pt={id:Nt,detector:(0,P.K2)((t=>/^\s*info/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(9251)]).then(r.bind(r,9251));return{id:Nt,diagram:t}}),"loader")},jt={id:"pie",detector:(0,P.K2)((t=>/^\s*pie/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(5808)]).then(r.bind(r,5808));return{id:"pie",diagram:t}}),"loader")},zt="quadrantChart",qt={id:zt,detector:(0,P.K2)((t=>/^\s*quadrantChart/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(7194).then(r.bind(r,7194));return{id:zt,diagram:t}}),"loader")},Rt="xychart",Wt={id:Rt,detector:(0,P.K2)((t=>/^\s*xychart-beta/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(2725),r.e(3474)]).then(r.bind(r,3474));return{id:Rt,diagram:t}}),"loader")},Ut="requirement",Ht={id:Ut,detector:(0,P.K2)((t=>/^\s*requirement(Diagram)?/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(9856)]).then(r.bind(r,9856));return{id:Ut,diagram:t}}),"loader")},Yt="sequence",Gt={id:Yt,detector:(0,P.K2)((t=>/^\s*sequenceDiagram/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(5171).then(r.bind(r,5171));return{id:Yt,diagram:t}}),"loader")},Vt="class",Jt={id:Vt,detector:(0,P.K2)(((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(5877),r.e(7606)]).then(r.bind(r,7606));return{id:Vt,diagram:t}}),"loader")},Xt="classDiagram",Zt={id:Xt,detector:(0,P.K2)(((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(2725),r.e(8396),r.e(3706),r.e(5877),r.e(6803)]).then(r.bind(r,6803));return{id:Xt,diagram:t}}),"loader")},Qt="state",te={id:Qt,detector:(0,P.K2)(((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(1269),r.e(2807)]).then(r.bind(r,2807));return{id:Qt,diagram:t}}),"loader")},ee="stateDiagram",re={id:ee,detector:(0,P.K2)(((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(2725),r.e(8396),r.e(3706),r.e(1269),r.e(8953)]).then(r.bind(r,8953));return{id:ee,diagram:t}}),"loader")},ne="journey",ie={id:ne,detector:(0,P.K2)((t=>/^\s*journey/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(3456).then(r.bind(r,3456));return{id:ne,diagram:t}}),"loader")},oe={draw:(0,P.K2)(((t,e,r)=>{N.Rm.debug("rendering svg for syntax error\n");const n=(0,O.D)(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),(0,N.a$)(n,100,512,!0),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)}),"draw")},ae=oe,se={db:{},renderer:oe,parser:{parse:()=>{}}},le="flowchart-elk",ce={id:le,detector:(0,P.K2)(((t,e)=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(setTimeout((()=>N.Rm.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](link) for more details. This diagram will be rendered using `dagre` layout as a fallback.")),500),!0)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(2725),r.e(8396),r.e(3706),r.e(9199),r.e(3478)]).then(r.bind(r,3478));return{id:le,diagram:t}}),"loader")},ue="timeline",he={id:ue,detector:(0,P.K2)((t=>/^\s*timeline/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(3796).then(r.bind(r,3796));return{id:ue,diagram:t}}),"loader")},de="mindmap",fe={id:de,detector:(0,P.K2)((t=>/^\s*mindmap/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(2725),r.e(1450)]).then(r.bind(r,1450));return{id:de,diagram:t}}),"loader")},pe="sankey",me={id:pe,detector:(0,P.K2)((t=>/^\s*sankey-beta/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(9156).then(r.bind(r,9156));return{id:pe,diagram:t}}),"loader")},ge="packet",ye={id:ge,detector:(0,P.K2)((t=>/^\s*packet-beta/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(5033)]).then(r.bind(r,5033));return{id:ge,diagram:t}}),"loader")},be="array",_e={id:be,detector:(0,P.K2)((t=>/^\s*array/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(9263)]).then(r.bind(r,9263));return{id:be,diagram:t}}),"loader")},xe="matrix",Ce={id:xe,detector:(0,P.K2)((t=>/^\s*matrix/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(2147)]).then(r.bind(r,2147));return{id:xe,diagram:t}}),"loader")},ve="testslides",we={id:ve,detector:(0,P.K2)((t=>/^\s*testslides/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(8501)]).then(r.bind(r,8501));return{id:ve,diagram:t}}),"loader")},ke="visslides",Te={id:ke,detector:(0,P.K2)((t=>/^\s*visslides/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(9061)]).then(r.bind(r,9061));return{id:ke,diagram:t}}),"loader")},Se="visual",Ke={id:Se,detector:(0,P.K2)((t=>/^\s*visual/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(533)]).then(r.bind(r,533));return{id:Se,diagram:t}}),"loader")},Ae="block",Be={id:Ae,detector:(0,P.K2)((t=>/^\s*block-beta/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(2725),r.e(8396),r.e(373)]).then(r.bind(r,373));return{id:Ae,diagram:t}}),"loader")},Fe=!1,Ee=(0,P.K2)((()=>{Fe||(Fe=!0,(0,N.Js)("error",se,(t=>"error"===t.toLowerCase().trim())),(0,N.Js)("---",{db:{clear:()=>{}},styles:{},renderer:{draw:()=>{}},parser:{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("---"))),(0,N.Xd)(At,Zt,Jt,Mt,Dt,Pt,jt,Ht,Gt,ce,Lt,Ft,fe,he,$t,re,te,ie,qt,me,ye,Wt,Be,_e,Ce,we,Te,Ke))}),"addDiagrams"),Le=class t{constructor(t,e,r,n,i){this.type=t,this.text=e,this.db=r,this.parser=n,this.renderer=i}static{(0,P.K2)(this,"Diagram")}static async fromText(e,r={}){const n=(0,N.zj)(),i=(0,N.Ch)(e,n);e=(0,D.C4)(e)+"\n";try{(0,N.Gs)(i)}catch(t){const e=(0,N.J$)(i);if(!e)throw new N.C0(`Diagram ${i} not found.`);const{id:r,diagram:n}=await e();(0,N.Js)(r,n)}const{db:o,parser:a,renderer:s,init:l}=(0,N.Gs)(i);return a.parser&&(a.parser.yy=o),o.clear?.(),l?.(n),r.title&&o.setDiagramTitle?.(r.title),await a.parse(e),new t(i,e,o,a,s)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},Me=[],Oe=(0,P.K2)((()=>{Me.forEach((t=>{t()})),Me=[]}),"attachFunctions"),$e=(0,P.f1)((0,N.gK)(),1),Ie="graphics-document document";function De(t,e){t.attr("role",Ie),""!==e&&t.attr("aria-roledescription",e)}function Ne(t,e,r,n){if(void 0!==t.insert){if(r){const e=`chart-desc-${n}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${n}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,P.K2)(De,"setA11yDiagramInfo"),(0,P.K2)(Ne,"addSVGa11yTitleDescription");var Pe=(0,P.K2)((t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart()),"cleanupComments");function je(t){return null==t}function ze(t){return"object"==typeof t&&null!==t}function qe(t){return Array.isArray(t)?t:je(t)?[]:[t]}function Re(t,e){var r,n,i,o;if(e)for(r=0,n=(o=Object.keys(e)).length;rs&&(e=n-s+(o=" ... ").length),r-n>s&&(r=n+s-(a=" ...").length),{str:o+t.slice(e,r).replace(/\t/g,"→")+a,pos:n-e+o.length}}function Xe(t,e){return He.repeat(" ",e-t.length)+t}function Ze(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],o=[],a=-1;r=n.exec(t.buffer);)o.push(r.index),i.push(r.index+r[0].length),t.position<=r.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var s,l,c="",u=Math.min(t.line+e.linesAfter,o.length).toString().length,h=e.maxLength-(e.indent+u+3);for(s=1;s<=e.linesBefore&&!(a-s<0);s++)l=Je(t.buffer,i[a-s],o[a-s],t.position-(i[a]-i[a-s]),h),c=He.repeat(" ",e.indent)+Xe((t.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=Je(t.buffer,i[a],o[a],t.position,h),c+=He.repeat(" ",e.indent)+Xe((t.line+1).toString(),u)+" | "+l.str+"\n",c+=He.repeat("-",e.indent+u+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(a+s>=o.length);s++)l=Je(t.buffer,i[a+s],o[a+s],t.position-(i[a]-i[a+s]),h),c+=He.repeat(" ",e.indent)+Xe((t.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}(0,P.K2)(Je,"getLine"),(0,P.K2)(Xe,"padStart"),(0,P.K2)(Ze,"makeSnippet");var Qe=Ze,tr=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],er=["scalar","sequence","mapping"];function rr(t){var e={};return null!==t&&Object.keys(t).forEach((function(r){t[r].forEach((function(t){e[String(t)]=r}))})),e}function nr(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===tr.indexOf(e))throw new Ve('Unknown option "'+e+'" 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(t){return t},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=rr(e.styleAliases||null),-1===er.indexOf(this.kind))throw new Ve('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,P.K2)(rr,"compileStyleAliases"),(0,P.K2)(nr,"Type$1");var ir=nr;function or(t,e){var r=[];return t[e].forEach((function(t){var e=r.length;r.forEach((function(r,n){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=n)})),r[e]=t})),r}function ar(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for((0,P.K2)(n,"collectType"),t=0,e=arguments.length;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"]}}),kr=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Tr(t){return null!==t&&!(!kr.test(t)||"_"===t[t.length-1])}function Sr(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,P.K2)(Tr,"resolveYamlFloat"),(0,P.K2)(Sr,"constructYamlFloat");var Kr=/^[-+]?[0-9]+e/;function Ar(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(He.isNegativeZero(t))return"-0.0";return r=t.toString(10),Kr.test(r)?r.replace("e",".e"):r}function Br(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||He.isNegativeZero(t))}(0,P.K2)(Ar,"representYamlFloat"),(0,P.K2)(Br,"isFloat");var Fr=new ir("tag:yaml.org,2002:float",{kind:"scalar",resolve:Tr,construct:Sr,predicate:Br,represent:Ar,defaultStyle:"lowercase"}),Er=lr.extend({implicit:[dr,gr,wr,Fr]}),Lr=Er,Mr=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Or=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 $r(t){return null!==t&&(null!==Mr.exec(t)||null!==Or.exec(t))}function Ir(t){var e,r,n,i,o,a,s,l,c=0,u=null;if(null===(e=Mr.exec(t))&&(e=Or.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(o=+e[4],a=+e[5],s=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(u=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(u=-u)),l=new Date(Date.UTC(r,n,i,o,a,s,c)),u&&l.setTime(l.getTime()-u),l}function Dr(t){return t.toISOString()}(0,P.K2)($r,"resolveYamlTimestamp"),(0,P.K2)(Ir,"constructYamlTimestamp"),(0,P.K2)(Dr,"representYamlTimestamp");var Nr=new ir("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:$r,construct:Ir,instanceOf:Date,represent:Dr});function Pr(t){return"<<"===t||null===t}(0,P.K2)(Pr,"resolveYamlMerge");var jr=new ir("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Pr}),zr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function qr(t){if(null===t)return!1;var e,r,n=0,i=t.length,o=zr;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8==0}function Rr(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,o=zr,a=0,s=[];for(e=0;e>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(n.charAt(e));return 0==(r=i%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===r?(s.push(a>>10&255),s.push(a>>2&255)):12===r&&s.push(a>>4&255),new Uint8Array(s)}function Wr(t){var e,r,n="",i=0,o=t.length,a=zr;for(e=0;e>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]),i=(i<<8)+t[e];return 0==(r=o%3)?(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]):2===r?(n+=a[i>>10&63],n+=a[i>>4&63],n+=a[i<<2&63],n+=a[64]):1===r&&(n+=a[i>>2&63],n+=a[i<<4&63],n+=a[64],n+=a[64]),n}function Ur(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,P.K2)(qr,"resolveYamlBinary"),(0,P.K2)(Rr,"constructYamlBinary"),(0,P.K2)(Wr,"representYamlBinary"),(0,P.K2)(Ur,"isBinary");var Hr=new ir("tag:yaml.org,2002:binary",{kind:"scalar",resolve:qr,construct:Rr,predicate:Ur,represent:Wr}),Yr=Object.prototype.hasOwnProperty,Gr=Object.prototype.toString;function Vr(t){if(null===t)return!0;var e,r,n,i,o,a=[],s=t;for(e=0,r=s.length;e>10),56320+(t-65536&1023))}(0,P.K2)(Cn,"_class"),(0,P.K2)(vn,"is_EOL"),(0,P.K2)(wn,"is_WHITE_SPACE"),(0,P.K2)(kn,"is_WS_OR_EOL"),(0,P.K2)(Tn,"is_FLOW_INDICATOR"),(0,P.K2)(Sn,"fromHexCode"),(0,P.K2)(Kn,"escapedHexLen"),(0,P.K2)(An,"fromDecimalCode"),(0,P.K2)(Bn,"simpleEscapeSequence"),(0,P.K2)(Fn,"charFromCodepoint");var En,Ln=new Array(256),Mn=new Array(256);for(En=0;En<256;En++)Ln[En]=Bn(En)?1:0,Mn[En]=Bn(En);function On(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||sn,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 $n(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=Qe(r),new Ve(e,r)}function In(t,e){throw $n(t,e)}function Dn(t,e){t.onWarning&&t.onWarning.call(null,$n(t,e))}(0,P.K2)(On,"State$1"),(0,P.K2)($n,"generateError"),(0,P.K2)(In,"throwError"),(0,P.K2)(Dn,"throwWarning");var Nn={YAML:(0,P.K2)((function(t,e,r){var n,i,o;null!==t.version&&In(t,"duplication of %YAML directive"),1!==r.length&&In(t,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&In(t,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),o=parseInt(n[2],10),1!==i&&In(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&Dn(t,"unsupported YAML version of the document")}),"handleYamlDirective"),TAG:(0,P.K2)((function(t,e,r){var n,i;2!==r.length&&In(t,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],_n.test(n)||In(t,"ill-formed tag handle (first argument) of the TAG directive"),ln.call(t.tagMap,n)&&In(t,'there is a previously declared suffix for "'+n+'" tag handle'),xn.test(i)||In(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(e){In(t,"tag prefix is malformed: "+i)}t.tagMap[n]=i}),"handleTagDirective")};function Pn(t,e,r,n){var i,o,a,s;if(e1&&(t.result+=He.repeat("\n",e-1))}function Hn(t,e,r){var n,i,o,a,s,l,c,u,h=t.kind,d=t.result;if(kn(u=t.input.charCodeAt(t.position))||Tn(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(kn(n=t.input.charCodeAt(t.position+1))||r&&Tn(n)))return!1;for(t.kind="scalar",t.result="",i=o=t.position,a=!1;0!==u;){if(58===u){if(kn(n=t.input.charCodeAt(t.position+1))||r&&Tn(n))break}else if(35===u){if(kn(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&Wn(t)||r&&Tn(u))break;if(vn(u)){if(s=t.line,l=t.lineStart,c=t.lineIndent,Rn(t,!1,-1),t.lineIndent>=e){a=!0,u=t.input.charCodeAt(t.position);continue}t.position=o,t.line=s,t.lineStart=l,t.lineIndent=c;break}}a&&(Pn(t,i,o,!1),Un(t,t.line-s),i=o=t.position,a=!1),wn(u)||(o=t.position+1),u=t.input.charCodeAt(++t.position)}return Pn(t,i,o,!1),!!t.result||(t.kind=h,t.result=d,!1)}function Yn(t,e){var r,n,i;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(Pn(t,n,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;n=t.position,t.position++,i=t.position}else vn(r)?(Pn(t,n,i,!0),Un(t,Rn(t,!1,e)),n=i=t.position):t.position===t.lineStart&&Wn(t)?In(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);In(t,"unexpected end of the stream within a single quoted scalar")}function Gn(t,e){var r,n,i,o,a,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return Pn(t,r,t.position,!0),t.position++,!0;if(92===s){if(Pn(t,r,t.position,!0),vn(s=t.input.charCodeAt(++t.position)))Rn(t,!1,e);else if(s<256&&Ln[s])t.result+=Mn[s],t.position++;else if((a=Kn(s))>0){for(i=a,o=0;i>0;i--)(a=Sn(s=t.input.charCodeAt(++t.position)))>=0?o=(o<<4)+a:In(t,"expected hexadecimal character");t.result+=Fn(o),t.position++}else In(t,"unknown escape sequence");r=n=t.position}else vn(s)?(Pn(t,r,n,!0),Un(t,Rn(t,!1,e)),r=n=t.position):t.position===t.lineStart&&Wn(t)?In(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}In(t,"unexpected end of the stream within a double quoted scalar")}function Vn(t,e){var r,n,i,o,a,s,l,c,u,h,d,f,p=!0,m=t.tag,g=t.anchor,y=Object.create(null);if(91===(f=t.input.charCodeAt(t.position)))a=93,c=!1,o=[];else{if(123!==f)return!1;a=125,c=!0,o={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),f=t.input.charCodeAt(++t.position);0!==f;){if(Rn(t,!0,e),(f=t.input.charCodeAt(t.position))===a)return t.position++,t.tag=m,t.anchor=g,t.kind=c?"mapping":"sequence",t.result=o,!0;p?44===f&&In(t,"expected the node content, but found ','"):In(t,"missed comma between flow collection entries"),d=null,s=l=!1,63===f&&kn(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,Rn(t,!0,e)),r=t.line,n=t.lineStart,i=t.position,ri(t,e,cn,!1,!0),h=t.tag,u=t.result,Rn(t,!0,e),f=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==f||(s=!0,f=t.input.charCodeAt(++t.position),Rn(t,!0,e),ri(t,e,cn,!1,!0),d=t.result),c?zn(t,o,y,h,u,d,r,n,i):s?o.push(zn(t,null,y,h,u,d,r,n,i)):o.push(u),Rn(t,!0,e),44===(f=t.input.charCodeAt(t.position))?(p=!0,f=t.input.charCodeAt(++t.position)):p=!1}In(t,"unexpected end of the stream within a flow collection")}function Jn(t,e){var r,n,i,o,a=fn,s=!1,l=!1,c=e,u=0,h=!1;if(124===(o=t.input.charCodeAt(t.position)))n=!1;else{if(62!==o)return!1;n=!0}for(t.kind="scalar",t.result="";0!==o;)if(43===(o=t.input.charCodeAt(++t.position))||45===o)fn===a?a=43===o?mn:pn:In(t,"repeat of a chomping mode identifier");else{if(!((i=An(o))>=0))break;0===i?In(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?In(t,"repeat of an indentation width identifier"):(c=e+i-1,l=!0)}if(wn(o)){do{o=t.input.charCodeAt(++t.position)}while(wn(o));if(35===o)do{o=t.input.charCodeAt(++t.position)}while(!vn(o)&&0!==o)}for(;0!==o;){for(qn(t),t.lineIndent=0,o=t.input.charCodeAt(t.position);(!l||t.lineIndentc&&(c=t.lineIndent),vn(o))u++;else{if(t.lineIndente)&&0!==n)In(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(y&&(a=t.line,s=t.lineStart,l=t.position),ri(t,e,dn,!0,i)&&(y?m=t.result:g=t.result),y||(zn(t,d,f,p,m,g,a,s,l),p=m=g=null),Rn(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&0!==c)In(t,"bad indentation of a mapping entry");else if(t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&h.kind!==t.kind&&In(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+h.kind+'", not "'+t.kind+'"'),h.resolve(t.result,t.tag)?(t.result=h.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):In(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function ni(t){var e,r,n,i,o=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(Rn(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==i));){for(a=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!kn(i);)i=t.input.charCodeAt(++t.position);for(n=[],(r=t.input.slice(e,t.position)).length<1&&In(t,"directive name must not be less than one character in length");0!==i;){for(;wn(i);)i=t.input.charCodeAt(++t.position);if(35===i){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&!vn(i));break}if(vn(i))break;for(e=t.position;0!==i&&!kn(i);)i=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==i&&qn(t),ln.call(Nn,r)?Nn[r](t,r,n):Dn(t,'unknown document directive "'+r+'"')}Rn(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,Rn(t,!0,-1)):a&&In(t,"directives end mark is expected"),ri(t,t.lineIndent-1,dn,!1,!0),Rn(t,!0,-1),t.checkLineBreaks&&yn.test(t.input.slice(o,t.position))&&Dn(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Wn(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,Rn(t,!0,-1)):t.position=55296&&n<=56319&&e+1=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function Qi(t){return/^\n* /.test(t)}(0,P.K2)(qi,"State"),(0,P.K2)(Ri,"indentString"),(0,P.K2)(Wi,"generateNextLine"),(0,P.K2)(Ui,"testImplicitResolving"),(0,P.K2)(Hi,"isWhitespace"),(0,P.K2)(Yi,"isPrintable"),(0,P.K2)(Gi,"isNsCharOrWhitespace"),(0,P.K2)(Vi,"isPlainSafe"),(0,P.K2)(Ji,"isPlainSafeFirst"),(0,P.K2)(Xi,"isPlainSafeLast"),(0,P.K2)(Zi,"codePointAt"),(0,P.K2)(Qi,"needIndentIndicator");var to=1,eo=2,ro=3,no=4,io=5;function oo(t,e,r,n,i,o,a,s){var l,c=0,u=null,h=!1,d=!1,f=-1!==n,p=-1,m=Ji(Zi(t,0))&&Xi(Zi(t,t.length-1));if(e||a)for(l=0;l=65536?l+=2:l++){if(!Yi(c=Zi(t,l)))return io;m=m&&Vi(c,u,s),u=c}else{for(l=0;l=65536?l+=2:l++){if((c=Zi(t,l))===di)h=!0,f&&(d=d||l-p-1>n&&" "!==t[p+1],p=l);else if(!Yi(c))return io;m=m&&Vi(c,u,s),u=c}d=d||f&&l-p-1>n&&" "!==t[p+1]}return h||d?r>9&&Qi(t)?io:a?o===zi?io:eo:d?no:ro:!m||a||i(t)?o===zi?io:eo:to}function ao(t,e,r,n,i){t.dump=function(){if(0===e.length)return t.quotingType===zi?'""':"''";if(!t.noCompatMode&&(-1!==Ii.indexOf(e)||Di.test(e)))return t.quotingType===zi?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,r),a=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),s=n||t.flowLevel>-1&&r>=t.flowLevel;function l(e){return Ui(t,e)}switch((0,P.K2)(l,"testAmbiguity"),oo(e,s,t.indent,a,l,t.quotingType,t.forceQuotes&&!n,i)){case to:return e;case eo:return"'"+e.replace(/'/g,"''")+"'";case ro:return"|"+so(e,t.indent)+lo(Ri(e,o));case no:return">"+so(e,t.indent)+lo(Ri(co(e,a),o));case io:return'"'+ho(e)+'"';default:throw new Ve("impossible error: invalid scalar style")}}()}function so(t,e){var r=Qi(t)?String(e):"",n="\n"===t[t.length-1];return r+(!n||"\n"!==t[t.length-2]&&"\n"!==t?n?"":"-":"+")+"\n"}function lo(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function co(t,e){for(var r,n,i,o=/(\n+)([^\n]*)/g,a=(r=-1!==(r=t.indexOf("\n"))?r:t.length,o.lastIndex=r,uo(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];i=o.exec(t);){var l=i[1],c=i[2];n=" "===c[0],a+=l+(s||n||""===c?"":"\n")+uo(c,e),s=n}return a}function uo(t,e){if(""===t||" "===t[0])return t;for(var r,n,i=/ [^ ]/g,o=0,a=0,s=0,l="";r=i.exec(t);)(s=r.index)-o>e&&(n=a>o?a:s,l+="\n"+t.slice(o,n),o=n+1),a=s;return l+="\n",t.length-o>e&&a>o?l+=t.slice(o,a)+"\n"+t.slice(a+1):l+=t.slice(o),l.slice(1)}function ho(t){for(var e,r="",n=0,i=0;i=65536?i+=2:i++)n=Zi(t,i),!(e=$i[n])&&Yi(n)?(r+=t[i],n>=65536&&(r+=t[i+1])):r+=e||Pi(n);return r}function fo(t,e,r){var n,i,o,a="",s=t.tag;for(n=0,i=r.length;n1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),bo(t,e,a,!1,!1)&&(l+=s+=t.dump));t.tag=c,t.dump="{"+l+"}"}function go(t,e,r,n){var i,o,a,s,l,c,u="",h=t.tag,d=Object.keys(r);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new Ve("sortKeys must be a boolean or a function");for(i=0,o=d.length;i1024)&&(t.dump&&di===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=Wi(t,e)),bo(t,e+1,s,!0,l)&&(t.dump&&di===t.dump.charCodeAt(0)?c+=":":c+=": ",u+=c+=t.dump));t.tag=h,t.dump=u||"{}"}function yo(t,e,r){var n,i,o,a,s,l;for(o=0,a=(i=r?t.explicitTypes:t.implicitTypes).length;o tag resolver accepts not "'+l+'" style');n=s.represent[l](e,l)}t.dump=n}return!0}return!1}function bo(t,e,r,n,i,o,a){t.tag=null,t.dump=r,yo(t,r,!1)||yo(t,r,!0);var s,l=li.call(t.dump),c=n;n&&(n=t.flowLevel<0||t.flowLevel>e);var u,h,d="[object Object]"===l||"[object Array]"===l;if(d&&(h=-1!==(u=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||h||2!==t.indent&&e>0)&&(i=!1),h&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(d&&h&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),"[object Object]"===l)n&&0!==Object.keys(t.dump).length?(go(t,e,t.dump,i),h&&(t.dump="&ref_"+u+t.dump)):(mo(t,e,t.dump),h&&(t.dump="&ref_"+u+" "+t.dump));else if("[object Array]"===l)n&&0!==t.dump.length?(t.noArrayIndent&&!a&&e>0?po(t,e-1,t.dump,i):po(t,e,t.dump,i),h&&(t.dump="&ref_"+u+t.dump)):(fo(t,e,t.dump),h&&(t.dump="&ref_"+u+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new Ve("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&ao(t,t.dump,e,o,c)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function _o(t,e){var r,n,i=[],o=[];for(xo(t,i,o),r=0,n=o.length;rt.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"))),"cleanupText"),So=(0,P.K2)((t=>{const{text:e,metadata:r}=ko(t),{displayMode:n,title:i,config:o={}}=r;return n&&(o.gantt||(o.gantt={}),o.gantt.displayMode=n),{title:i,config:o,text:e}}),"processFrontmatter"),Ko=(0,P.K2)((t=>{const e=D._K.detectInit(t)??{},r=D._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some((({type:t})=>{})):"wrap"===r?.type&&(e.wrap=!0),{text:(0,D.vU)(t),directive:e}}),"processDirectives");function Ao(t){const e=To(t),r=So(e),n=Ko(r.text),i=(0,D.$t)(r.config,n.directive);return{code:t=Pe(n.text),title:r.title,config:i}}(0,P.K2)(Ao,"preprocessDiagram");var Bo=["foreignobject"],Fo=["dominant-baseline"];function Eo(t){const e=Ao(t);return(0,N.cL)(),(0,N.xA)(e.config??{}),e}async function Lo(t,e){Ee();try{const{code:e}=Eo(t);return{diagramType:(await Ro(e)).type}}catch(t){if(e?.suppressErrors)return!1;throw t}}(0,P.K2)(Eo,"processAndSetConfigs"),(0,P.K2)(Lo,"parse");var Mo=(0,P.K2)(((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`),"cssImportantStyles"),Oo=(0,P.K2)(((t,e=new Map)=>{let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const n=t.htmlLabels||t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach((t=>{(0,I._S)(t.styles)||n.forEach((e=>{r+=Mo(t.id,e,t.styles)})),(0,I._S)(t.textStyles)||(r+=Mo(t.id,"tspan",t.textStyles))}))}return r}),"createCssStyles"),$o=(0,P.K2)(((t,e,r,n)=>{const i=Oo(t,r);return St(Ct(`${n}{${(0,N.tM)(e,i,t.themeVariables)}}`),Kt)}),"createUserStyles"),Io=(0,P.K2)(((t="",e,r)=>{let n=t;return r||e||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=(0,D.Sm)(n),n=n.replace(/
/g,"
"),n}),"cleanUpSvgCode"),Do=(0,P.K2)(((t="",e)=>``),"putIntoIFrame"),No=(0,P.K2)(((t,e,r,n,i)=>{const o=t.append("div");o.attr("id",r),n&&o.attr("style",n);const a=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return i&&a.attr("xmlns:xlink",i),a.append("g"),t}),"appendDivSvgG");function Po(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,P.K2)(Po,"sandboxedIframe");var jo=(0,P.K2)(((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()}),"removeExistingElements"),zo=(0,P.K2)((async function(t,e,r){Ee();const n=Eo(e);e=n.code;const i=(0,N.zj)();N.Rm.debug(i),e.length>(i?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const o="#"+t,a="i"+t,s="#"+a,l="d"+t,c="#"+l,u=(0,P.K2)((()=>{const t=d?s:c,e=(0,N.df)(t).node();e&&"remove"in e&&e.remove()}),"removeTempElements");let h=(0,N.df)("body");const d="sandbox"===i.securityLevel,f="loose"===i.securityLevel,p=i.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),d){const t=Po((0,N.df)(r),a);h=(0,N.df)(t.nodes()[0].contentDocument.body),h.node().style.margin=0}else h=(0,N.df)(r);No(h,t,l,`font-family: ${p}`,"http://www.w3.org/1999/xlink")}else{if(jo(document,t,l,a),d){const t=Po((0,N.df)("body"),a);h=(0,N.df)(t.nodes()[0].contentDocument.body),h.node().style.margin=0}else h=(0,N.df)("body");No(h,t,l)}let m,g;try{m=await Le.fromText(e,{title:n.title})}catch(t){if(i.suppressErrorRendering)throw u(),t;m=await Le.fromText("error"),g=t}const y=h.select(c).node(),b=m.type,_=y.firstChild,x=_.firstChild,C=m.renderer.getClasses?.(e,m),v=$o(i,b,C,o),w=document.createElement("style");w.innerHTML=v,_.insertBefore(w,x);try{await m.renderer.draw(e,t,M.r,m)}catch(r){throw i.suppressErrorRendering?u():ae.draw(e,t,M.r),r}const k=h.select(`${c} svg`),T=m.db.getAccTitle?.(),S=m.db.getAccDescription?.();Wo(b,k,T,S),h.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let K=h.select(c).node().innerHTML;if(N.Rm.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),K=Io(K,d,(0,N._3)(i.arrowMarkerAbsolute)),d){const t=h.select(c+" svg").node();K=Do(K,t)}else f||(K=$e.default.sanitize(K,{ADD_TAGS:Bo,ADD_ATTR:Fo}));if(Oe(),g)throw g;return u(),{diagramType:b,svg:K,bindFunctions:m.db.bindFunctions}}),"render");function qo(t={}){t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),(0,N.wZ)(t),t?.theme&&t.theme in N.H$?t.themeVariables=N.H$[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=N.H$.default.getThemeVariables(t.themeVariables));const e="object"==typeof t?(0,N.UU)(t):(0,N.Q2)();(0,N.He)(e.logLevel),Ee()}(0,P.K2)(qo,"initialize");var Ro=(0,P.K2)(((t,e={})=>{const{code:r}=Ao(t);return Le.fromText(r,e)}),"getDiagramFromText");function Wo(t,e,r,n){De(e,t),Ne(e,r,n,e.attr("id"))}(0,P.K2)(Wo,"addA11yInfo");var Uo=Object.freeze({render:zo,parse:Lo,getDiagramFromText:Ro,initialize:qo,getConfig:N.zj,setConfig:N.eI,getSiteConfig:N.Q2,updateSiteConfig:N.B6,reset:()=>{(0,N.cL)()},globalReset:()=>{(0,N.cL)(N.sb)},defaultConfig:N.sb});(0,N.He)((0,N.zj)().logLevel),(0,N.cL)((0,N.zj)());var Ho=(0,P.K2)((async()=>{N.Rm.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(N.mW).map((async([t,{detector:e,loader:r}])=>{if(r)try{(0,N.Gs)(t)}catch(n){try{const{diagram:t,id:n}=await r();(0,N.Js)(n,t,e)}catch(e){throw N.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete N.mW[t],e}}})))).filter((t=>"rejected"===t.status));if(t.length>0){N.Rm.error(`Failed to load ${t.length} external diagrams`);for(const e of t)N.Rm.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}}),"loadRegisteredDiagrams"),Yo=(0,P.K2)(((t,e,r)=>{N.Rm.warn(t),(0,D.dq)(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}))}),"handleError"),Go=(0,P.K2)((async function(t={querySelector:".mermaid"}){try{await Vo(t)}catch(e){if((0,D.dq)(e)&&N.Rm.error(e.str),aa.parseError&&aa.parseError(e),!t.suppressErrors)throw N.Rm.error("Use the suppressErrors option to suppress these errors"),e}}),"run"),Vo=(0,P.K2)((async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=Uo.getConfig();let i;if(N.Rm.debug((t?"":"No ")+"Callback function found"),r)i=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(e)}N.Rm.debug(`Found ${i.length} diagrams`),void 0!==n?.startOnLoad&&(N.Rm.debug("Start On Load: "+n?.startOnLoad),Uo.updateSiteConfig({startOnLoad:n?.startOnLoad}));const o=new D._K.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let a;const s=[];for(const e of Array.from(i)){if(N.Rm.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const r=`mermaid-${o.next()}`;a=e.innerHTML,a=(0,$.T)(D._K.entityDecode(a)).trim().replace(//gi,"
");const n=D._K.detectInit(a);n&&N.Rm.debug("Detected early reinit: ",n);try{const{svg:n,bindFunctions:i}=await oa(r,a,e);e.innerHTML=n,t&&await t(r),i&&i(e)}catch(t){Yo(t,s,aa.parseError)}}if(s.length>0)throw s[0]}),"runThrowsErrors"),Jo=(0,P.K2)((function(t){Uo.initialize(t)}),"initialize"),Xo=(0,P.K2)((async function(t,e,r){N.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&Jo(t);const n={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await Go(n)}),"init"),Zo=(0,P.K2)((async(t,{lazyLoad:e=!0}={})=>{Ee(),(0,N.Xd)(...t),!1===e&&await Ho()}),"registerExternalDiagrams"),Qo=(0,P.K2)((function(){if(aa.startOnLoad){const{startOnLoad:t}=Uo.getConfig();t&&aa.run().catch((t=>N.Rm.error("Mermaid failed to initialize",t)))}}),"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",Qo,!1);var ta=(0,P.K2)((function(t){aa.parseError=t}),"setParseErrorHandler"),ea=[],ra=!1,na=(0,P.K2)((async()=>{if(!ra){for(ra=!0;ea.length>0;){const t=ea.shift();if(t)try{await t()}catch(t){N.Rm.error("Error executing queue",t)}}ra=!1}}),"executeQueue"),ia=(0,P.K2)((async(t,e)=>new Promise(((r,n)=>{const i=(0,P.K2)((()=>new Promise(((i,o)=>{Uo.parse(t,e).then((t=>{i(t),r(t)}),(t=>{N.Rm.error("Error parsing",t),aa.parseError?.(t),o(t),n(t)}))}))),"performCall");ea.push(i),na().catch(n)}))),"parse"),oa=(0,P.K2)(((t,e,r)=>new Promise(((n,i)=>{const o=(0,P.K2)((()=>new Promise(((o,a)=>{Uo.render(t,e,r).then((t=>{o(t),n(t)}),(t=>{N.Rm.error("Error parsing",t),aa.parseError?.(t),a(t),i(t)}))}))),"performCall");ea.push(o),na().catch(i)}))),"render"),aa={startOnLoad:!0,mermaidAPI:Uo,parse:ia,render:oa,init:Xo,run:Go,registerExternalDiagrams:Zo,initialize:Jo,parseError:void 0,contentLoaded:Qo,setParseErrorHandler:ta,detectType:N.Ch},sa=aa,la=function(t){var e=t.svgElement,r=t.updateInspector;(0,n.useEffect)((function(){i()}),[e]);var i=function(){e&&e.addEventListener("click",o)},o=function(t){for(var e=t.target;e&&!e.classList.contains("unit");)e=e.parentElement;for(var n=e?e.id:null;e&&!e.classList.contains("component");)e=e.parentElement;for(var i=e?e.id:null;e&&!e.classList.contains("page");)e=e.parentElement;var o=e?e.id:null;r(n,i,o)};return n.createElement("div",null)};function ca(t){return ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ca(t)}function ua(){ua=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),s=new F(n||[]);return i(a,"_invoke",{value:S(t,r,s)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var d="suspendedStart",f="suspendedYield",p="executing",m="completed",g={};function y(){}function b(){}function _(){}var x={};c(x,a,(function(){return this}));var C=Object.getPrototypeOf,v=C&&C(C(E([])));v&&v!==r&&n.call(v,a)&&(x=v);var w=_.prototype=y.prototype=Object.create(x);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,a,s){var l=h(t[i],t,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==ca(u)&&n.call(u,"__await")?e.resolve(u.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(u).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function S(e,r,n){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var l=K(s,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?m:f,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function K(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,K(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function B(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),B(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;B(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:E(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function ha(t,e,r,n,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,i)}const da=function(t){var e=t.text,r=t.update,i=t.exampleSvg,o=(t.setTotalPages,t.setSvgContent),a=(0,n.useRef)(null);return(0,n.useEffect)((function(){sa.initialize({startOnLoad:!0,securityLevel:"loose",theme:"forest",logLevel:5});var t=function(){var t,n=(t=ua().mark((function t(){var n,s;return ua().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!a.current||""===e){t.next=19;break}if(t.prev=1,!i){t.next=7;break}a.current.innerHTML=i,r(a.current),t.next=14;break;case 7:return t.next=9,sa.mermaidAPI.render("preview",e);case 9:n=t.sent,s=n.svg,o(s),a.current.innerHTML=s,r(a.current);case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(1),console.error("Mermaid render error:",t.t0);case 19:case"end":return t.stop()}}),t,null,[[1,16]])})),function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){ha(o,n,i,a,s,"next",t)}function s(t){ha(o,n,i,a,s,"throw",t)}a(void 0)}))});return function(){return n.apply(this,arguments)}}();return t(),function(){a.current&&(a.current.innerHTML="")}}),[e,i]),n.createElement("div",{ref:a,className:"mermaid-container"})};var fa=r(3340),pa=r(7235),ma=r(3044),ga=r(6879),ya=r(6466),ba=r(3360),_a=r(5800),xa=r(7187),Ca=r(1045),va=r(7477);function wa(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ka(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ka(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ka(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=1?d-1:1)},variant:"contained",style:{fontSize:"12px",marginRight:"15px",maxWidth:"80px",maxHeight:"25px",minWidth:"40px",minHeight:"25px"}},"Prev"),n.createElement(fa.A,{onClick:function(){p(d+1<=l?d+1:l)},variant:"contained",style:{fontSize:"12px",marginRight:"15px",maxWidth:"80px",maxHeight:"25px",minWidth:"40px",minHeight:"25px"}},"Next"),d,"/",l)))))};var Sa=r(1003),Ka=r.n(Sa),Aa=r(1381),Ba=r(8847),Fa=[{id:"commonErrors",title:"Common Errors",tags:[],svg:"",userCode:'// common error\n// 1.page index exceeds data structure, i.e no array[9] but there are only 5 element in array\n// 2.invalid input format\n// 3.arrow field with ""\n// 4.can\'t find component name\n// 5.page index is invalid, like -1'},{id:"graphExample",title:"Example - graph",userCode:"data:\ngraph gh = {\nid:[[n1],[n1,n2],[n1,n2,n3]]\nvalue:[[1],[1,2],[1,2,3]]\nedge:[[(node1,node1)]]\n}\ndraw:\npage p := [0,2] {\nshow gh[p]\n}"},{id:"arrayExample",title:"Example - array",userCode:"data:\narray arr1 = {\nstructure:[[1],[1,2],[1,2,3]]\n}\narray arr2 = {\nstructure:[[3,2,1],[2,1],[1]]\n}\ndraw:\npage p := [0,2] {\nshow arr1[p]\nshow arr2[p]\n}"},{id:"TutorialFibonacci",title:"Tutorial - Fibonacci",userCode:"data:\narray arr1 = {\n structure:[[1],[1,1],[1,1,2]]\n value:[[1],[1,1],[1,1,2]]\n color:[[null],[null,null],[null,null,null]]\n}\ndraw:\npage p:=[0,2] {\nshow arr1[p]\n}"},{id:"playground",title:"Playground",userCode:""},{id:"task1LCAofTree",title:"Task 1 - LCA in a tree",userCode:"data:\ntree tr1 = {\n structure:[[n1,n2,n3,n4,n5,n6,n7]]\n value:[[1,2,3,4,5,6,7]]\n color:[[null,null,blue,null,blue]]\n}\ndraw:\npage p := [0,0] {\n show tr1[p]\n}"},{id:"task2DepthFirstSearch",title:"Task 2 - Depth First Search",userCode:"data:\ngraph dfs = {\n id:[[n1,n2,n3,n4,n5,n6,n7,n8],[n1,n2,n3,n4,n5,n6,n7,n8],[n1,n2,n3,n4,n5,n6,n7,n8],[n1,n2,n3,n4,n5,n6,n7,n8]]\n edge:[[(n1,n2),(n1,n6),(n1,n7),(n2,n3),(n3,n7),(n3,n5),(n4,n5),(n4,n6),(n4,n8)],[(n1,n2),(n1,n6),(n1,n7),(n2,n3),(n3,n7),(n3,n5),(n4,n5),(n4,n6),(n4,n8)],[(n1,n2),(n1,n6),(n1,n7),(n2,n3),(n3,n7),(n3,n5),(n4,n5),(n4,n6),(n4,n8)],[(n1,n2),(n1,n6),(n1,n7),(n2,n3),(n3,n7),(n3,n5),(n4,n5),(n4,n6),(n4,n8)]]\n value:[[n1,n2,n3,n4,n5,n6,n7,n8],[n1,n2,n3,n4,n5,n6,n7,n8],[n1,n2,n3,n4,n5,n6,n7,n8],[n1,n2,n3,n4,n5,n6,n7,n8]]\n color:[[red,null,null,null,null,null,null,null],[blue,red,null,null,null,null,null,null],[blue,blue,red,null,null,null,null,null],[blue,blue,blue,null,red,null,null,null]]\n arrow:[[start,null,null,null,null,null,null,null],[null,cur,null,null,null,null,null,null],[null,null,cur,null,null,null,null,null],[null,null,null,null,cur,null,null,null]]\n}\ndraw:\npage p:=[0,3] {\nshow dfs[p]\n}"},{id:"task3NumbersOfIslands",title:"Task 3 - Numbers of Islands",userCode:"data:\nmatrix mr1 = {\n structure:[[[0,0,1,0],[0,1,1,0],[1,0,0,0],[0,0,1,1]]]\n color:[[[null,null,red,null]]]\n\n}\ndraw:\npage p:=[0,0] {\nshow mr1[p]\n}"},{id:"task4ValidBrackets",title:"Task 4 - Valid Brackets",userCode:"data:\narray arr = {\n structure:[[{,{,{,},{,},},{,}]]\n}\nstack stk = {\n structure: [[{]]\n}\ndraw:\npage p:=[0,0] {\nshow arr[p]\nshow stk[p]\n}"}],Ea=r(8675),La=r(6836),Ma=r(5073),Oa=r(7853),$a=r(9755);function Ia(t){var e=t.data,r=t.draw;return e.forEach((function(t){switch(t.type){case"array":case"tree":case"linkedlist":case"stack":var e=t.attributes.structure.length;t.attributes.value=t.attributes.value?t.attributes.value:[];for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=Array(e);rn.length||n.splice(o+1,0,n[o].slice())})),console.log("idx: ",r,"\nname: ",i,"\ncomponent_idx_dsl: ",o,"\ncomponent_id_dsl",s,"\nto copy: ",t.data[s],"\nafter copy: ",t.data)})),e.range.end+=1;var s=Da(t);r(s)},sx:{mr:1},size:"small"},n.createElement(Oa.A,{sx:{fontSize:20}}))),n.createElement(A.A,{title:"Remove last Page"},n.createElement(B.A,{disabled:!(o===a)||a<=1,onClick:function(){console.log("remove current page: ",o-1);var t=Ia(i);s((function(t){return t-1}));var e=(0,Ra.rO)(t,o-1),n=e.page_index,a=o-1;e.show.forEach((function(e){var r=e.component_index,i=e.component_name,o=(0,Ra.O4)(r,n,a),s=(0,Ra.el)(t,i),l=t.data[s].attributes;Object.entries(l).forEach((function(t){var e=Ga(t,2),r=e[0],n=e[1];"edge"===r&&o-1<0||n.splice(o,1)}))})),e.range.end-=1;var l=Da(t);r(l)},sx:{mr:1},size:"small"},n.createElement($a.A,{sx:{fontSize:20}}))))),e&&n.createElement(h.A,{component:"form",sx:{"& .MuiTextField-root":{m:1,width:"25ch"},p:"5px 15px"},noValidate:!0,autoComplete:"off"},n.createElement(h.A,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{"& > *":{mr:1},marginBottom:2}},n.createElement(h.A,{display:"flex",alignItems:"center"},n.createElement(K.A,{variant:"overline"},"Current Selection:"),n.createElement(La.A,{label:e.unitID,size:"small",sx:{ml:1}}),n.createElement(La.A,{label:e.componentID,size:"small",sx:{ml:1}}),n.createElement(La.A,{label:e.pageID,size:"small",sx:{ml:1}})),n.createElement(fa.A,{variant:"contained",size:"small",onClick:function(){console.log("query index:",e),console.log("new data:",u);var t=Ha({},i),n=(0,Ra.rO)(t,parseInt(e.pageID.slice(4))),o=n.page_index,a=parseInt(e.pageID.slice(4)),s=n.show[parseInt(e.componentID.slice(10))].component_index,l=n.show[parseInt(e.componentID.slice(10))].component_name,c=(0,Ra.O4)(s,o,a),h=(0,Ra.el)(t,l),d=e.unitID.slice(5),f=t.data[h],p=t.data[h].type,m=f.attributes;switch(p){case"array":case"stack":m.structure[c][parseInt(d)]=""!=u.value?u.value:"null",m.value[c][parseInt(d)]=""!=u.value?u.value:"null",m.color[c][parseInt(d)]=""!=u.color?u.color:"null",m.arrow[c][parseInt(d)]=""!=u.arrow?u.arrow:"null",m.hidden[c][parseInt(d)]=""!=u.hidden?u.hidden:"false";break;case"tree":case"linkedlist":case"graph":m.value[c][parseInt(d)]=""!=u.value?u.value:"null",m.color[c][parseInt(d)]=""!=u.color?u.color:"null",m.arrow[c][parseInt(d)]=""!=u.arrow?u.arrow:"null",m.hidden[c][parseInt(d)]=""!=u.hidden?u.hidden:"false",console.log("debug findSelectedComponentData\n",m);break;case"matrix":var g=parseInt(d.slice(1,-1).split(",")[0]),y=parseInt(d.slice(1,-1).split(",")[1]);m.value[c][g][y]=""!=u.value?u.value:"null",m.color[c][g][y]=""!=u.color?u.color:"null",m.arrow[c][g][y]=""!=u.arrow?u.arrow:"null",m.hidden[c][g][y]=""!=u.hidden?u.hidden:"false";break;default:console.log("GUI EDITOR - findUnitData, no matching component type!")}var b=Da(t);r(b)},sx:{mr:8}},"Update")),n.createElement("div",null,n.createElement("div",null,("graph"==p||"tree"==p||"linkedlist"==p)&&n.createElement(Ma.A,{label:"Id",disabled:"true",id:"outlined-size-small",helperText:"The unit id is unchangeable",value:u.id,size:"small",onChange:function(t){d(Ha(Ha({},u),{},{value:t.target.value}))}}),n.createElement(Ma.A,{label:"Value",id:"outlined-size-small",value:u.value,size:"small",onChange:function(t){d(Ha(Ha({},u),{},{value:t.target.value}))}}),n.createElement(Ma.A,{label:"Unit Color",id:"outlined-size-small",value:u.color,size:"small",onChange:function(t){d(Ha(Ha({},u),{},{color:t.target.value}))}}),n.createElement(Ma.A,{label:"Arrow Label",id:"outlined-size-small",value:u.arrow,size:"small",onChange:function(t){d(Ha(Ha({},u),{},{arrow:t.target.value}))}}),"graph"==p&&n.createElement(Ma.A,{label:"Hidden",id:"outlined-size-small",value:u.hidden,size:"small",onChange:function(t){d(Ha(Ha({},u),{},{hidden:t.target.value}))}})))))};var Xa=r(9794),Za=r(1826),Qa=r(421),ts=r(8803);const es=function(){return n.createElement(Xa.A,{position:"static",sx:{justifyContent:"space-between",flexDirection:"row",padding:"2px 15px",borderBottom:"1px solid #444",backgroundColor:"#000"}},n.createElement(h.A,{display:"flex",flexGrow:1,alignItems:"center"},n.createElement(K.A,{sx:{fontWeight:"bold",textTransform:"uppercase"}},"Intuition Vis")),n.createElement(h.A,{display:"flex"},n.createElement(Za.A,{disableGutters:!0},n.createElement(Qa.Ay,{container:!0,justifyContent:"space-between",alignItems:"center"},n.createElement(B.A,{href:"https://github.com/ETH-PEACH-Lab/intuition-vis-test",target:"_blank",rel:"noreferrer",size:"large"},n.createElement(ts.A,null)),n.createElement(fa.A,{variant:"text",color:"inherit"},"Docs"),n.createElement(fa.A,{variant:"text",color:"inherit"},"Tutorial"),n.createElement(fa.A,{variant:"text",color:"inherit",href:"https://eth-peach-lab.github.io/intuition-visualisation/",target:"_blank"},"Intuition Viewer")))))};function rs(t){return rs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rs(t)}function ns(){ns=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),s=new F(n||[]);return i(a,"_invoke",{value:S(t,r,s)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var d="suspendedStart",f="suspendedYield",p="executing",m="completed",g={};function y(){}function b(){}function _(){}var x={};c(x,a,(function(){return this}));var C=Object.getPrototypeOf,v=C&&C(C(E([])));v&&v!==r&&n.call(v,a)&&(x=v);var w=_.prototype=y.prototype=Object.create(x);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,a,s){var l=h(t[i],t,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==rs(u)&&n.call(u,"__await")?e.resolve(u.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(u).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function S(e,r,n){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var l=K(s,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?m:f,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function K(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,K(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function B(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),B(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;B(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:E(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function is(t,e,r,n,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,i)}function os(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||as(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function as(t,e){if(t){if("string"==typeof t)return ss(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ss(t,e):void 0}}function ss(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0&&r.forEach((function(t){t&&t.style&&(t.style.display="none")})),r&&r.length>0&&r[t].style&&(r[t].style.display="inline")}};(0,n.useEffect)((function(){H()}),[]),(0,n.useEffect)((function(){var t=document.getElementById("preview"),e=0;try{e=t.querySelectorAll("g.page").length}catch(t){console.log("got error when fetching total pages: error")}O(e),R(B-1)}),[I]),(0,n.useEffect)((function(){var t=document.getElementById("preview");if(t&&B<=M){var e=t.querySelectorAll("g.page");e&&e.length>0&&e.forEach((function(t){t&&t.style&&(t.style.display="none")})),e&&e.length>0&&e[B-1].style&&(e[B-1].style.display="inline")}}),[B]),(0,n.useEffect)((function(){try{var t=qa(l);f(t);var e=(0,Ea.G)(t);g(e),R(B-1)}catch(t){g("DSL grammar is incorrect!"),console.log("update mermaid error:\n",t)}}),[l]),(0,n.useEffect)((function(){var t=function(){F(window.currentPage)};return window.addEventListener("pageChange",t),function(){window.removeEventListener("pageChange",t)}}),[]);var W=function(t){var e=t.clientX,r=o,n=function(t){var n=r+t.clientX-e;n>100&&n20){var i=n.shift();document.cookie="".concat(i.timestamp,"=; max-age=0; path=/"),localStorage.removeItem("diagram_".concat(i.timestamp))}return n.sort((function(t,e){return new Date(e.timestamp)-new Date(t.timestamp)})),n}));var n,i,o,a="\nuserCode:\n\n".concat(l,"\n\nmermaidCode:\n\n").concat(m,"\n\ntimestamp:\n\n").concat(t,"\n ");n="".concat(e,".txt"),i=new Blob([a],{type:"text/plain"}),(o=document.createElement("a")).download=n,o.href=URL.createObjectURL(i),document.body.appendChild(o),o.click(),URL.revokeObjectURL(o.href),document.body.removeChild(o),alert("Diagram saved successfully!")},mermaidRef:z,updateInspector:Y,totalPages:M,setTotalPages:O,setSvgContent:D,currentPage:B,setCurrentPage:F}),n.createElement(Ja,{inspectorIndex:S,setCode1:c,parsedCode1:d,setParsedCode1:f,code1:l,currentPage:B,totalPages:M,setCurrentPage:F,setTotalPages:O,dslEditorEditable:P,setDslEditorEditable:j})))))))))};var cs=document.getElementById("app");(0,i.H)(cs).render(n.createElement(n.StrictMode,null,n.createElement(o.A,{theme:c},n.createElement(a.Ay,null),n.createElement(ls,null))))},3026:t=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(t,r,n){return(r=function(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function n(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0&&e.push(n(e[e.length-1])):e.push(t[r][0]);return e}function o(t){var e={id:null,value:null,color:null,arrow:null,hidden:null};return t.forEach((function(t){var r=Object.keys(t)[0],n=t[r];e[r]=n})),e}var a={Lexer:void 0,ParserRules:[{name:"main$string$1",symbols:[{literal:"d"},{literal:"a"},{literal:"t"},{literal:"a"},{literal:":"}],postprocess:function(t){return t.join("")}},{name:"main$string$2",symbols:[{literal:"d"},{literal:"r"},{literal:"a"},{literal:"w"},{literal:":"}],postprocess:function(t){return t.join("")}},{name:"main",symbols:["_","main$string$1","_","data_entries","_","main$string$2","draw_section","_"],postprocess:function(t){var e={data:t[3]};return e.draw=t[6],e}},{name:"draw_section$ebnf$1",symbols:["draw_entry"]},{name:"draw_section$ebnf$1",symbols:["draw_section$ebnf$1","draw_entry"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"draw_section",symbols:["draw_section$ebnf$1"],postprocess:function(t){return t[0]}},{name:"draw_entry",symbols:["page_entry"],postprocess:function(t){return t[0]}},{name:"page_entry$string$1",symbols:[{literal:"p"},{literal:"a"},{literal:"g"},{literal:"e"}],postprocess:function(t){return t.join("")}},{name:"page_entry$string$2",symbols:[{literal:":"},{literal:"="}],postprocess:function(t){return t.join("")}},{name:"page_entry$ebnf$1$subexpression$1",symbols:["_","show_entry"]},{name:"page_entry$ebnf$1",symbols:["page_entry$ebnf$1$subexpression$1"]},{name:"page_entry$ebnf$1$subexpression$2",symbols:["_","show_entry"]},{name:"page_entry$ebnf$1",symbols:["page_entry$ebnf$1","page_entry$ebnf$1$subexpression$2"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"page_entry",symbols:["_","page_entry$string$1","_","page_index","_","page_entry$string$2","_","range_entry","_",{literal:"{"},"page_entry$ebnf$1","_",{literal:"}"}],postprocess:function(t){var e={};return e.page_index=t[3][0],e.range=t[7],e.show=t[10].map((function(t){return t[1]})),e}},{name:"range_entry",symbols:[{literal:"["},"_","number","_",{literal:","},"_","number","_",{literal:"]"}],postprocess:function(t){return{start:t[2],end:t[6]}}},{name:"page_index",symbols:["alphanum"]},{name:"show_entry$string$1",symbols:[{literal:"s"},{literal:"h"},{literal:"o"},{literal:"w"}],postprocess:function(t){return t.join("")}},{name:"show_entry",symbols:["show_entry$string$1","_","component_name",{literal:"["},"component_index",{literal:"]"}],postprocess:function(t){return{component_name:t[2][0],component_index:t[4]}}},{name:"component_index$ebnf$1",symbols:[/[A-Za-z0-9\-\+\*/]/]},{name:"component_index$ebnf$1",symbols:["component_index$ebnf$1",/[A-Za-z0-9\-\+\*/]/],postprocess:function(t){return t[0].concat([t[1]])}},{name:"component_index",symbols:["component_index$ebnf$1"],postprocess:function(t){return t[0].join("")}},{name:"component_name",symbols:["alphanum"]},{name:"data_entries$ebnf$1$subexpression$1",symbols:["_","data_entry"]},{name:"data_entries$ebnf$1",symbols:["data_entries$ebnf$1$subexpression$1"]},{name:"data_entries$ebnf$1$subexpression$2",symbols:["_","data_entry"]},{name:"data_entries$ebnf$1",symbols:["data_entries$ebnf$1","data_entries$ebnf$1$subexpression$2"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"data_entries",symbols:["data_entries$ebnf$1"],postprocess:function(t){return t[0].map((function(t){return t[1]}))}},{name:"data_entry$ebnf$1",symbols:["all_type_description"]},{name:"data_entry$ebnf$1",symbols:["data_entry$ebnf$1","all_type_description"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"data_entry",symbols:["data_type","_","var_name","_",{literal:"="},"_",{literal:"{"},"data_entry$ebnf$1","_",{literal:"}"}],postprocess:function(t){switch(t[0][0]){case"array":var e={type:t[0][0],name:t[2]};return e.attributes=o(t[7].map((function(t){return t[0]}))),e;case"stack":var r={type:t[0][0],name:t[2]};return r.attributes=o(t[7].map((function(t){return t[0]}))),r;case"tree":var n={type:t[0][0],name:t[2]};return n.attributes=o(t[7].map((function(t){return t[0]}))),n;case"linkedlist":var i={type:t[0][0],name:t[2]};return i.attributes=o(t[7].map((function(t){return t[0]}))),i;case"matrix":var a={type:t[0][0],name:t[2],processed_data:t[7].map((function(t){return t[0]}))};return a.attributes=o(a.processed_data),a;case"graph":var s={type:t[0][0],name:t[2]};return s.attributes=o(t[7].map((function(t){return t[0]}))),s;default:return}}},{name:"all_type_description",symbols:["data_description"]},{name:"all_type_description",symbols:["matrix_description"],postprocess:function(t){return e=t,(r=[]).concat.apply(r,n(e));var e,r}},{name:"matrix_description",symbols:["_","attribute_name","_",{literal:":"},"_",{literal:"["},"_","matrix_components","_",{literal:"]"}],postprocess:function(t){return r({},t[1][0],i(t[7]))}},{name:"matrix_components$ebnf$1",symbols:[]},{name:"matrix_components$ebnf$1$subexpression$1",symbols:["_",{literal:","},"_","matrix_component_or_star"]},{name:"matrix_components$ebnf$1",symbols:["matrix_components$ebnf$1","matrix_components$ebnf$1$subexpression$1"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"matrix_components",symbols:["matrix_component_or_star","matrix_components$ebnf$1"],postprocess:function(t){return[t[0]].concat(t[1].map((function(t){return t[3]})))}},{name:"matrix_component_or_star",symbols:["matrix_component"]},{name:"matrix_component_or_star",symbols:[{literal:"*"}],postprocess:function(t){return"*"===t[0]?"*":t[0]}},{name:"matrix_component",symbols:[{literal:"["},"matrix_rows",{literal:"]"}],postprocess:function(t){return t[1]}},{name:"matrix_rows$ebnf$1",symbols:[]},{name:"matrix_rows$ebnf$1$subexpression$1",symbols:[{literal:","},"_","matrix_row"]},{name:"matrix_rows$ebnf$1",symbols:["matrix_rows$ebnf$1","matrix_rows$ebnf$1$subexpression$1"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"matrix_rows",symbols:["matrix_row","_","matrix_rows$ebnf$1"],postprocess:function(t){return[t[0]].concat(t[2].map((function(t){return t[2]})))}},{name:"matrix_row$ebnf$1",symbols:[]},{name:"matrix_row$ebnf$1$subexpression$1",symbols:[{literal:","},"_","value"]},{name:"matrix_row$ebnf$1",symbols:["matrix_row$ebnf$1","matrix_row$ebnf$1$subexpression$1"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"matrix_row",symbols:["_",{literal:"["},"value","_","matrix_row$ebnf$1",{literal:"]"}],postprocess:function(t){return[t[2][0]].concat(t[4].map((function(t){return t[2][0]})))}},{name:"data_type$string$1",symbols:[{literal:"a"},{literal:"r"},{literal:"r"},{literal:"a"},{literal:"y"}],postprocess:function(t){return t.join("")}},{name:"data_type",symbols:["data_type$string$1"]},{name:"data_type$string$2",symbols:[{literal:"s"},{literal:"t"},{literal:"a"},{literal:"c"},{literal:"k"}],postprocess:function(t){return t.join("")}},{name:"data_type",symbols:["data_type$string$2"]},{name:"data_type$string$3",symbols:[{literal:"l"},{literal:"i"},{literal:"n"},{literal:"k"},{literal:"e"},{literal:"d"},{literal:"l"},{literal:"i"},{literal:"s"},{literal:"t"}],postprocess:function(t){return t.join("")}},{name:"data_type",symbols:["data_type$string$3"]},{name:"data_type$string$4",symbols:[{literal:"t"},{literal:"r"},{literal:"e"},{literal:"e"}],postprocess:function(t){return t.join("")}},{name:"data_type",symbols:["data_type$string$4"]},{name:"data_type$string$5",symbols:[{literal:"m"},{literal:"a"},{literal:"t"},{literal:"r"},{literal:"i"},{literal:"x"}],postprocess:function(t){return t.join("")}},{name:"data_type",symbols:["data_type$string$5"]},{name:"data_type$string$6",symbols:[{literal:"g"},{literal:"r"},{literal:"a"},{literal:"p"},{literal:"h"}],postprocess:function(t){return t.join("")}},{name:"data_type",symbols:["data_type$string$6"]},{name:"var_name$ebnf$1",symbols:[/[a-zA-Z0-9]/]},{name:"var_name$ebnf$1",symbols:["var_name$ebnf$1",/[a-zA-Z0-9]/],postprocess:function(t){return t[0].concat([t[1]])}},{name:"var_name",symbols:["var_name$ebnf$1"],postprocess:function(t){return t[0].join("").replace(",","")}},{name:"data_description",symbols:["_","attribute_name","_",{literal:":"},"_",{literal:"["},"_","data_rows","_",{literal:"]"}],postprocess:function(t){return r({},t[1][0],i(t[7]))}},{name:"attribute_name",symbols:["alphanum"]},{name:"data_rows$ebnf$1",symbols:[]},{name:"data_rows$ebnf$1$subexpression$1",symbols:[{literal:","},"_","data_row_or_star"]},{name:"data_rows$ebnf$1",symbols:["data_rows$ebnf$1","data_rows$ebnf$1$subexpression$1"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"data_rows",symbols:["data_row_or_star","_","data_rows$ebnf$1"],postprocess:function(t){return[t[0]].concat(t[2].map((function(t){return t[2]})))}},{name:"data_row_or_star",symbols:["data_row"]},{name:"data_row_or_star",symbols:[{literal:"*"}],postprocess:function(t){return"*"===t[0]?"*":t[0]}},{name:"data_row",symbols:[{literal:"["},"_","value_edge_list","_",{literal:"]"}],postprocess:function(t){return"object"==e(t[2][0])?t[2][0]:t[2]}},{name:"value_edge_list",symbols:["edge_list"]},{name:"value_edge_list",symbols:["value_list"],postprocess:function(t){return t[0]}},{name:"value_list$ebnf$1",symbols:[]},{name:"value_list$ebnf$1$subexpression$1",symbols:[{literal:","},"_","value"]},{name:"value_list$ebnf$1",symbols:["value_list$ebnf$1","value_list$ebnf$1$subexpression$1"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"value_list",symbols:["value","_","value_list$ebnf$1"],postprocess:function(t){return[t[0][0]].concat(t[2].map((function(t){return t[2][0]})))}},{name:"edge_list$ebnf$1",symbols:[]},{name:"edge_list$ebnf$1$subexpression$1",symbols:[{literal:","},"_","edge"]},{name:"edge_list$ebnf$1",symbols:["edge_list$ebnf$1","edge_list$ebnf$1$subexpression$1"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"edge_list",symbols:["edge","_","edge_list$ebnf$1"],postprocess:function(t){return[t[0]].concat(t[2].map((function(t){return t[2]})))}},{name:"edge",symbols:[{literal:"("},"_","value","_",{literal:","},"_","value","_",{literal:")"}],postprocess:function(t){return{startPoint:t[2],endPoint:t[6]}}},{name:"value",symbols:["alphanum"]},{name:"number$ebnf$1",symbols:[/[0-9]/]},{name:"number$ebnf$1",symbols:["number$ebnf$1",/[0-9]/],postprocess:function(t){return t[0].concat([t[1]])}},{name:"number",symbols:["number$ebnf$1"],postprocess:function(t){return parseInt(t[0].join(""),10)}},{name:"alphanum$ebnf$1",symbols:[/[a-zA-Z0-9\/\\\{\}<>#@$&|]/]},{name:"alphanum$ebnf$1",symbols:["alphanum$ebnf$1",/[a-zA-Z0-9\/\\\{\}<>#@$&|]/],postprocess:function(t){return t[0].concat([t[1]])}},{name:"alphanum",symbols:["alphanum$ebnf$1"],postprocess:function(t){return t[0].join("")}},{name:"_$ebnf$1",symbols:[]},{name:"_$ebnf$1",symbols:["_$ebnf$1",/[ \t\n\r]/],postprocess:function(t){return t[0].concat([t[1]])}},{name:"_",symbols:["_$ebnf$1"]}],ParserStart:"main"};void 0!==t.exports?t.exports=a:window.grammar=a}()},9038:(t,e,r)=>{"use strict";function n(t){let e="array\n@\n";const r=t.attributes.structure,n=t.attributes.color||[],i=t.attributes.value||[],o=t.attributes.arrow||[];for(let t=0;tn})},6205:(t,e,r)=>{"use strict";function n(t){let e="graph\n@";const r=t.attributes.id,n=t.attributes.edge||[],i=t.attributes.value||[],o=t.attributes.color||[],a=t.attributes.arrow||[],s=t.attributes.hidden||[];for(let t=0;tn})},2936:(t,e,r)=>{"use strict";function n(t){let e="linkedList\n@\n";const r=t.attributes.structure,n=t.attributes.value||[],i=t.attributes.color||[],o=t.attributes.arrow||[];for(let t=0;tn})},4724:(t,e,r)=>{"use strict";function n(t){let e="matrix\n@";const r=t.attributes.structure,n=t.attributes.color||[],i=t.attributes.arrow||[];for(let t=0;tn})},6665:(t,e,r)=>{"use strict";function n(t){let e="stack\n";e+="size: 7\n",e+="@\n";const r=t.attributes.structure,n=t.attributes.color||[],i=t.attributes.arrow||[];for(let t=0;tn})},6835:(t,e,r)=>{"use strict";function n(t){let e="tree\n@";return e+=function(t,e,r,n){if(!t||0===t.length)return"";let i=[{node:t[0],index:0}],o="";for(;i.length>0;){let a=i.shift(),s=a.node,l=a.index;if("none"===s)o+="\nNone:[None,None]";else{let a=2*l+1,c=2*l+2,u=an})},8675:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{G:()=>convertParsedDSLtoMermaid});var _parser_test_mjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(7484),_generateArray_mjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9038),_generateLinkedlist_mjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(2936),_generateStack_mjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(6665),_generateTree_mjs__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(6835),_generateMatrix_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(4724),_generateGraph_mjs__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(6205);function convertDSLtoMermaid(t){const e=(0,_parser_test_mjs__WEBPACK_IMPORTED_MODULE_0__.n)(t),r=e.data,n=e.draw;let i={};n.forEach((t=>{const e=t.page_index,n=t.range.start,o=t.range.end,a=t.show;for(let t=n;t{let a=o.component_index,s=o.component_name,l=calculateIndex(e,t,a),c=findItemByComponentNameAndIndex(r,s,l);i[`page${t}`][`component_${n}`]={type:c.type,name:s,index:l,attributes:c.attributes},n+=1}))}}));let o="visual\n";const a=Object.keys(i);for(const t of a){o+="page\n";const e=Object.keys(i[t]);for(const r of e){const e=i[t][r];switch(e.type){case"array":o+=(0,_generateArray_mjs__WEBPACK_IMPORTED_MODULE_1__.b)(e);break;case"linkedlist":o+=(0,_generateLinkedlist_mjs__WEBPACK_IMPORTED_MODULE_2__.$)(e);break;case"stack":o+=(0,_generateStack_mjs__WEBPACK_IMPORTED_MODULE_3__.a)(e);break;case"tree":o+=(0,_generateTree_mjs__WEBPACK_IMPORTED_MODULE_4__.w)(e);break;case"matrix":o+=(0,_generateMatrix_mjs__WEBPACK_IMPORTED_MODULE_5__.z)(e);break;case"graph":o+=(0,_generateGraph_mjs__WEBPACK_IMPORTED_MODULE_6__.q)(e);break;default:console.log(`compiler error! no matching componenet type: ${e.type}!`)}}}return o}function convertParsedDSLtoMermaid(t){const e=t.data,r=t.draw;let n={};r.forEach((t=>{const r=t.page_index,i=t.range.start,o=t.range.end,a=t.show;for(let t=i;t{let a=o.component_index,s=o.component_name,l=calculateIndex(r,t,a),c=findItemByComponentNameAndIndex(e,s,l);n[`page${t}`][`component_${i}`]={type:c.type,name:s,index:l,attributes:c.attributes},i+=1}))}}));let i="visual\n";const o=Object.keys(n);for(const t of o){i+="page\n";const e=Object.keys(n[t]);for(const r of e){const e=n[t][r];switch(e.type){case"array":i+=(0,_generateArray_mjs__WEBPACK_IMPORTED_MODULE_1__.b)(e);break;case"linkedlist":i+=(0,_generateLinkedlist_mjs__WEBPACK_IMPORTED_MODULE_2__.$)(e);break;case"stack":i+=(0,_generateStack_mjs__WEBPACK_IMPORTED_MODULE_3__.a)(e);break;case"tree":i+=(0,_generateTree_mjs__WEBPACK_IMPORTED_MODULE_4__.w)(e);break;case"matrix":i+=(0,_generateMatrix_mjs__WEBPACK_IMPORTED_MODULE_5__.z)(e);break;case"graph":i+=(0,_generateGraph_mjs__WEBPACK_IMPORTED_MODULE_6__.q)(e);break;default:console.log(`compiler error! no matching componenet type: ${e.type}!`)}}}return i}function calculateIndex(variableName,variableValue,expression){const regex=new RegExp(`\\b${variableName}\\b`,"g"),replacedExpression=expression.replace(regex,variableValue);try{const result=eval(replacedExpression);return result}catch(t){return console.error("Error evaluating expression:",t),null}}function findItemByComponentNameAndIndex(t,e,r){for(const n of t)if(n.name===e){const t={};for(const[e,i]of Object.entries(n.attributes))Array.isArray(i)?t[e]=i[r]||null:t[e]=i;return{type:n.type,attributes:t}}return console.log(`name: ${e} matches no entries!`),null}},389:(t,e,r)=>{"use strict";r.d(e,{D:()=>i});var n=r(772),i=(0,r(6009).K2)((t=>{const{securityLevel:e}=(0,n.D7)();let r=(0,n.df)("body");if("sandbox"===e){const e=(0,n.df)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,n.df)(i.body)}return r.select(`#${t}`)}),"selectSvgElement")},3615:(t,e,r)=>{"use strict";r.d(e,{St:()=>l,Xy:()=>k,_S:()=>K,zZ:()=>h});var n=r(8605),i=r(6009),o=(0,n.To)(Object.keys,Object),a=Object.prototype.hasOwnProperty;function s(t){if(!(0,n.HI)(t))return o(t);var e=[];for(var r in Object(t))a.call(t,r)&&"constructor"!=r&&e.push(r);return e}(0,i.K2)(s,"baseKeys");var l=s,c=(0,n.On)(n.DA,"DataView"),u=(0,n.On)(n.DA,"Promise"),h=(0,n.On)(n.DA,"Set"),d=(0,n.On)(n.DA,"WeakMap"),f="[object Map]",p="[object Promise]",m="[object Set]",g="[object WeakMap]",y="[object DataView]",b=(0,n.$q)(c),_=(0,n.$q)(n.zI),x=(0,n.$q)(u),C=(0,n.$q)(h),v=(0,n.$q)(d),w=n.GT;(c&&w(new c(new ArrayBuffer(1)))!=y||n.zI&&w(new n.zI)!=f||u&&w(u.resolve())!=p||h&&w(new h)!=m||d&&w(new d)!=g)&&(w=(0,i.K2)((function(t){var e=(0,n.GT)(t),r="[object Object]"==e?t.constructor:void 0,i=r?(0,n.$q)(r):"";if(i)switch(i){case b:return y;case _:return f;case x:return p;case C:return m;case v:return g}return e}),"getTag"));var k=w,T=Object.prototype.hasOwnProperty;function S(t){if(null==t)return!0;if((0,n.lr)(t)&&((0,n._i)(t)||"string"==typeof t||"function"==typeof t.splice||(0,n.NY)(t)||(0,n.aB)(t)||(0,n.Th)(t)))return!t.length;var e=k(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,n.HI)(t))return!l(t).length;for(var r in t)if(T.call(t,r))return!1;return!0}(0,i.K2)(S,"isEmpty");var K=S},6404:(t,e,r)=>{"use strict";function n(t){for(var e=[],r=1;rn}),(0,r(6009).K2)(n,"dedent")},772:(t,e,r)=>{"use strict";r.d(e,{$i:()=>pt,A0:()=>No,AB:()=>_s,AS:()=>Zc,Ag:()=>ds,B6:()=>wt,Bp:()=>gu,C0:()=>p,Ch:()=>g,D6:()=>bu,D7:()=>Be,DB:()=>d,DC:()=>Ys,Dl:()=>ie,EI:()=>we,EJ:()=>h,Ed:()=>R,Gh:()=>qu,Gs:()=>De,Gu:()=>Cs,H$:()=>lt,H1:()=>$t,He:()=>c,IE:()=>pa,IU:()=>xe,J$:()=>_,J1:()=>hu,J9:()=>Fu,JW:()=>af,Jj:()=>Tu,Jl:()=>Lu,Jp:()=>Cu,Js:()=>Ie,Ko:()=>Vu,MC:()=>_c,ME:()=>Ee,Mo:()=>vs,NN:()=>Au,Nk:()=>Ru,P$:()=>it,PG:()=>xs,Ps:()=>Ju,Q2:()=>kt,QO:()=>Xt,Rc:()=>cs,Rm:()=>l,SV:()=>Ce,T9:()=>Pe,TU:()=>ws,UA:()=>ps,UI:()=>ft,UU:()=>Ct,Ug:()=>U,Ui:()=>Ms,VJ:()=>oe,Wi:()=>ne,Wt:()=>me,XV:()=>Fe,Xd:()=>y,Y2:()=>ae,Y7:()=>Hu,YA:()=>ki,YP:()=>bs,ZY:()=>i,_3:()=>Gt,a$:()=>ce,ab:()=>Se,cL:()=>Bt,cw:()=>j,dJ:()=>su,df:()=>wi,ds:()=>P,eI:()=>Tt,f2:()=>ou,gK:()=>o,h$:()=>pu,hH:()=>C,iN:()=>ve,jU:()=>wu,jZ:()=>zt,jk:()=>je,kB:()=>gc,ke:()=>Te,kl:()=>lu,l7:()=>Cr,m7:()=>ke,mW:()=>m,mc:()=>H,mj:()=>Me,ot:()=>ue,pG:()=>ru,rG:()=>ks,sb:()=>gt,sn:()=>Za,tM:()=>pe,tl:()=>xr,wX:()=>us,wZ:()=>vt,xA:()=>At,yF:()=>Ou,yp:()=>yc,yr:()=>rs,z1:()=>Gu,zj:()=>St,zp:()=>Jc});var n=r(6009),i=(0,n.P$)({"../../node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/dayjs.min.js"(t,e){var r,i;r=t,i=function(){var t=6e4,e=36e5,r="millisecond",i="second",o="minute",a="hour",s="day",l="week",c="month",u="quarter",h="year",d="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,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(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},y=(0,n.K2)((function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t}),"m"),b={s:y,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),i=r%60;return(e<=0?"+":"-")+y(n,2,"0")+":"+y(i,2,"0")},m:(0,n.K2)((function t(e,r){if(e.date()1)return t(a[0])}else{var s=e.name;x[s]=e,i=s}return!n&&i&&(_=i),i||!n&&_}),"t"),k=(0,n.K2)((function(t,e){if(v(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new S(r)}),"O"),T=b;T.l=w,T.i=v,T.w=function(t,e){return k(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function g(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[C]=!0}(0,n.K2)(g,"M");var y=g.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(T.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(p);if(n){var i=n[2]-1||0,o=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return T},y.isValid=function(){return!(this.$d.toString()===f)},y.isSame=function(t,e){var r=k(t);return this.startOf(e)<=r&&r<=this.endOf(e)},y.isAfter=function(t,e){return k(t)1?r-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:p;e&&e(t,null);let o=n.length;for(;o--;){let e=n[o];if("string"==typeof e){const t=i(e);t!==e&&(r(n)||(n[o]=t),e=t)}t[e]=!0}return t}function S(t){for(let e=0;e/gm),q=s(/\${[\w\W]*}/gm),R=s(/^data-[\-\w.\u00B7-\uFFFF]/),W=s(/^aria-[\-\w]+$/),U=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=s(/^(?:\w+script|data):/i),Y=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G=s(/^html$/i),V=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var J=Object.freeze({__proto__:null,MUSTACHE_EXPR:j,ERB_EXPR:z,TMPLIT_EXPR:q,DATA_ATTR:R,ARIA_ATTR:W,IS_ALLOWED_URI:U,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:Y,DOCTYPE_NAME:G,CUSTOM_ELEMENT:V});const X=(0,n.K2)((function(){return"undefined"==typeof window?null:window}),"getGlobal"),Z=(0,n.K2)((function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(r=e.getAttribute(n));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}),"_createTrustedTypesPolicy");function Q(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const r=(0,n.K2)((t=>Q(t)),"DOMPurify");if(r.version="3.1.2",r.removed=[],!e||!e.document||9!==e.document.nodeType)return r.isSupported=!1,r;let{document:i}=e;const o=i,s=o.currentScript,{DocumentFragment:c,HTMLTemplateElement:u,Node:w,Element:k,NodeFilter:S,NamedNodeMap:j=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:z,DOMParser:q,trustedTypes:R}=e,W=k.prototype,H=A(W,"cloneNode"),Y=A(W,"nextSibling"),V=A(W,"childNodes"),tt=A(W,"parentNode");if("function"==typeof u){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let et,rt="";const{implementation:nt,createNodeIterator:it,createDocumentFragment:ot,getElementsByTagName:at}=i,{importNode:st}=o;let lt={};r.isSupported="function"==typeof t&&"function"==typeof tt&&nt&&void 0!==nt.createHTMLDocument;const{MUSTACHE_EXPR:ct,ERB_EXPR:ut,TMPLIT_EXPR:ht,DATA_ATTR:dt,ARIA_ATTR:ft,IS_SCRIPT_OR_DATA:pt,ATTR_WHITESPACE:mt,CUSTOM_ELEMENT:gt}=J;let{IS_ALLOWED_URI:yt}=J,bt=null;const _t=T({},[...B,...F,...E,...M,...$]);let xt=null;const Ct=T({},[...I,...D,...N,...P]);let vt=Object.seal(l(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}})),wt=null,kt=null,Tt=!0,St=!0,Kt=!1,At=!0,Bt=!1,Ft=!0,Et=!1,Lt=!1,Mt=!1,Ot=!1,$t=!1,It=!1,Dt=!0,Nt=!1,Pt=!0,jt=!1,zt={},qt=null;const Rt=T({},["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 Wt=null;const Ut=T({},["audio","video","img","source","image","track"]);let Ht=null;const Yt=T({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Gt="http://www.w3.org/1998/Math/MathML",Vt="http://www.w3.org/2000/svg",Jt="http://www.w3.org/1999/xhtml";let Xt=Jt,Zt=!1,Qt=null;const te=T({},[Gt,Vt,Jt],m);let ee=null;const re=["application/xhtml+xml","text/html"];let ne=null,ie=null;const oe=i.createElement("form"),ae=(0,n.K2)((function(t){return t instanceof RegExp||t instanceof Function}),"isRegexOrFunction"),se=(0,n.K2)((function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ie||ie!==t){if(t&&"object"==typeof t||(t={}),t=K(t),ee=-1===re.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,ne="application/xhtml+xml"===ee?m:p,bt=x(t,"ALLOWED_TAGS")?T({},t.ALLOWED_TAGS,ne):_t,xt=x(t,"ALLOWED_ATTR")?T({},t.ALLOWED_ATTR,ne):Ct,Qt=x(t,"ALLOWED_NAMESPACES")?T({},t.ALLOWED_NAMESPACES,m):te,Ht=x(t,"ADD_URI_SAFE_ATTR")?T(K(Yt),t.ADD_URI_SAFE_ATTR,ne):Yt,Wt=x(t,"ADD_DATA_URI_TAGS")?T(K(Ut),t.ADD_DATA_URI_TAGS,ne):Ut,qt=x(t,"FORBID_CONTENTS")?T({},t.FORBID_CONTENTS,ne):Rt,wt=x(t,"FORBID_TAGS")?T({},t.FORBID_TAGS,ne):{},kt=x(t,"FORBID_ATTR")?T({},t.FORBID_ATTR,ne):{},zt=!!x(t,"USE_PROFILES")&&t.USE_PROFILES,Tt=!1!==t.ALLOW_ARIA_ATTR,St=!1!==t.ALLOW_DATA_ATTR,Kt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,At=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Bt=t.SAFE_FOR_TEMPLATES||!1,Ft=!1!==t.SAFE_FOR_XML,Et=t.WHOLE_DOCUMENT||!1,Ot=t.RETURN_DOM||!1,$t=t.RETURN_DOM_FRAGMENT||!1,It=t.RETURN_TRUSTED_TYPE||!1,Mt=t.FORCE_BODY||!1,Dt=!1!==t.SANITIZE_DOM,Nt=t.SANITIZE_NAMED_PROPS||!1,Pt=!1!==t.KEEP_CONTENT,jt=t.IN_PLACE||!1,yt=t.ALLOWED_URI_REGEXP||U,Xt=t.NAMESPACE||Jt,vt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ae(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(vt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ae(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(vt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(vt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Bt&&(St=!1),$t&&(Ot=!0),zt&&(bt=T({},$),xt=[],!0===zt.html&&(T(bt,B),T(xt,I)),!0===zt.svg&&(T(bt,F),T(xt,D),T(xt,P)),!0===zt.svgFilters&&(T(bt,E),T(xt,D),T(xt,P)),!0===zt.mathMl&&(T(bt,M),T(xt,N),T(xt,P))),t.ADD_TAGS&&(bt===_t&&(bt=K(bt)),T(bt,t.ADD_TAGS,ne)),t.ADD_ATTR&&(xt===Ct&&(xt=K(xt)),T(xt,t.ADD_ATTR,ne)),t.ADD_URI_SAFE_ATTR&&T(Ht,t.ADD_URI_SAFE_ATTR,ne),t.FORBID_CONTENTS&&(qt===Rt&&(qt=K(qt)),T(qt,t.FORBID_CONTENTS,ne)),Pt&&(bt["#text"]=!0),Et&&T(bt,["html","head","body"]),bt.table&&(T(bt,["tbody"]),delete wt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');et=t.TRUSTED_TYPES_POLICY,rt=et.createHTML("")}else void 0===et&&(et=Z(R,s)),null!==et&&"string"==typeof rt&&(rt=et.createHTML(""));a&&a(t),ie=t}}),"_parseConfig"),le=T({},["mi","mo","mn","ms","mtext"]),ce=T({},["foreignobject","annotation-xml"]),ue=T({},["title","style","font","a","script"]),he=T({},[...F,...E,...L]),de=T({},[...M,...O]),fe=(0,n.K2)((function(t){let e=tt(t);e&&e.tagName||(e={namespaceURI:Xt,tagName:"template"});const r=p(t.tagName),n=p(e.tagName);return!!Qt[t.namespaceURI]&&(t.namespaceURI===Vt?e.namespaceURI===Jt?"svg"===r:e.namespaceURI===Gt?"svg"===r&&("annotation-xml"===n||le[n]):Boolean(he[r]):t.namespaceURI===Gt?e.namespaceURI===Jt?"math"===r:e.namespaceURI===Vt?"math"===r&&ce[n]:Boolean(de[r]):t.namespaceURI===Jt?!(e.namespaceURI===Vt&&!ce[n])&&!(e.namespaceURI===Gt&&!le[n])&&!de[r]&&(ue[r]||!he[r]):!("application/xhtml+xml"!==ee||!Qt[t.namespaceURI]))}),"_checkValidNamespace"),pe=(0,n.K2)((function(t){f(r.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.remove()}}),"_forceRemove"),me=(0,n.K2)((function(t,e){try{f(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){f(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!xt[t])if(Ot||$t)try{pe(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}}),"_removeAttribute"),ge=(0,n.K2)((function(t){let e=null,r=null;if(Mt)t=""+t;else{const e=g(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===ee&&Xt===Jt&&(t=''+t+"");const n=et?et.createHTML(t):t;if(Xt===Jt)try{e=(new q).parseFromString(n,ee)}catch(t){}if(!e||!e.documentElement){e=nt.createDocument(Xt,"template",null);try{e.documentElement.innerHTML=Zt?rt:n}catch(t){}}const o=e.body||e.documentElement;return t&&r&&o.insertBefore(i.createTextNode(r),o.childNodes[0]||null),Xt===Jt?at.call(e,Et?"html":"body")[0]:Et?e.documentElement:o}),"_initDocument"),ye=(0,n.K2)((function(t){return it.call(t.ownerDocument||t,t,S.SHOW_ELEMENT|S.SHOW_COMMENT|S.SHOW_TEXT|S.SHOW_PROCESSING_INSTRUCTION|S.SHOW_CDATA_SECTION,null)}),"_createNodeIterator"),be=(0,n.K2)((function(t){return t instanceof z&&(void 0!==t.__depth&&"number"!=typeof t.__depth||void 0!==t.__removalCount&&"number"!=typeof t.__removalCount||"string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof j)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)}),"_isClobbered"),_e=(0,n.K2)((function(t){return"function"==typeof w&&t instanceof w}),"_isNode"),xe=(0,n.K2)((function(t,e,n){lt[t]&&h(lt[t],(t=>{t.call(r,e,n,ie)}))}),"_executeHook"),Ce=(0,n.K2)((function(t){let e=null;if(xe("beforeSanitizeElements",t,null),be(t))return pe(t),!0;const n=ne(t.nodeName);if(xe("uponSanitizeElement",t,{tagName:n,allowedTags:bt}),t.hasChildNodes()&&!_e(t.firstElementChild)&&C(/<[/\w]/g,t.innerHTML)&&C(/<[/\w]/g,t.textContent))return pe(t),!0;if(7===t.nodeType)return pe(t),!0;if(Ft&&8===t.nodeType&&C(/<[/\w]/g,t.data))return pe(t),!0;if(!bt[n]||wt[n]){if(!wt[n]&&we(n)){if(vt.tagNameCheck instanceof RegExp&&C(vt.tagNameCheck,n))return!1;if(vt.tagNameCheck instanceof Function&&vt.tagNameCheck(n))return!1}if(Pt&&!qt[n]){const e=tt(t)||t.parentNode,r=V(t)||t.childNodes;if(r&&e)for(let n=r.length-1;n>=0;--n){const i=H(r[n],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,Y(t))}}return pe(t),!0}return t instanceof k&&!fe(t)?(pe(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!C(/<\/no(script|embed|frames)/i,t.innerHTML)?(Bt&&3===t.nodeType&&(e=t.textContent,h([ct,ut,ht],(t=>{e=y(e,t," ")})),t.textContent!==e&&(f(r.removed,{element:t.cloneNode()}),t.textContent=e)),xe("afterSanitizeElements",t,null),!1):(pe(t),!0)}),"_sanitizeElements"),ve=(0,n.K2)((function(t,e,r){if(Dt&&("id"===e||"name"===e)&&(r in i||r in oe))return!1;if(St&&!kt[e]&&C(dt,e));else if(Tt&&C(ft,e));else if(!xt[e]||kt[e]){if(!(we(t)&&(vt.tagNameCheck instanceof RegExp&&C(vt.tagNameCheck,t)||vt.tagNameCheck instanceof Function&&vt.tagNameCheck(t))&&(vt.attributeNameCheck instanceof RegExp&&C(vt.attributeNameCheck,e)||vt.attributeNameCheck instanceof Function&&vt.attributeNameCheck(e))||"is"===e&&vt.allowCustomizedBuiltInElements&&(vt.tagNameCheck instanceof RegExp&&C(vt.tagNameCheck,r)||vt.tagNameCheck instanceof Function&&vt.tagNameCheck(r))))return!1}else if(Ht[e]);else if(C(yt,y(r,mt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==b(r,"data:")||!Wt[t])if(Kt&&!C(pt,y(r,mt,"")));else if(r)return!1;return!0}),"_isValidAttribute"),we=(0,n.K2)((function(t){return"annotation-xml"!==t&&g(t,gt)}),"_isBasicCustomElement"),ke=(0,n.K2)((function(t){xe("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xt};let i=e.length;for(;i--;){const o=e[i],{name:a,namespaceURI:s,value:l}=o,c=ne(a);let u="value"===a?l:_(l);if(n.attrName=c,n.attrValue=u,n.keepAttr=!0,n.forceKeepAttr=void 0,xe("uponSanitizeAttribute",t,n),u=n.attrValue,n.forceKeepAttr)continue;if(me(a,t),!n.keepAttr)continue;if(!At&&C(/\/>/i,u)){me(a,t);continue}Bt&&h([ct,ut,ht],(t=>{u=y(u,t," ")}));const f=ne(t.nodeName);if(ve(f,c,u)){if(!Nt||"id"!==c&&"name"!==c||(me(a,t),u="user-content-"+u),et&&"object"==typeof R&&"function"==typeof R.getAttributeType)if(s);else switch(R.getAttributeType(f,c)){case"TrustedHTML":u=et.createHTML(u);break;case"TrustedScriptURL":u=et.createScriptURL(u)}try{s?t.setAttributeNS(s,a,u):t.setAttribute(a,u),d(r.removed)}catch(t){}}}xe("afterSanitizeAttributes",t,null)}),"_sanitizeAttributes"),Te=(0,n.K2)((function t(e){let r=null;const n=ye(e);for(xe("beforeSanitizeShadowDOM",e,null);r=n.nextNode();){if(xe("uponSanitizeShadowNode",r,null),Ce(r))continue;const e=tt(r);1===r.nodeType&&(e&&e.__depth?r.__depth=(r.__removalCount||0)+e.__depth+1:r.__depth=1),r.__depth>=255&&pe(r),r.content instanceof c&&(r.content.__depth=r.__depth,t(r.content)),ke(r)}xe("afterSanitizeShadowDOM",e,null)}),"_sanitizeShadowDOM");return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,i=null,a=null,s=null;if(Zt=!t,Zt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!_e(t)){if("function"!=typeof t.toString)throw v("toString is not a function");if("string"!=typeof(t=t.toString()))throw v("dirty is not a string, aborting")}if(!r.isSupported)return t;if(Lt||se(e),r.removed=[],"string"==typeof t&&(jt=!1),jt){if(t.nodeName){const e=ne(t.nodeName);if(!bt[e]||wt[e])throw v("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof w)n=ge("\x3c!----\x3e"),i=n.ownerDocument.importNode(t,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?n=i:n.appendChild(i);else{if(!Ot&&!Bt&&!Et&&-1===t.indexOf("<"))return et&&It?et.createHTML(t):t;if(n=ge(t),!n)return Ot?null:It?rt:""}n&&Mt&&pe(n.firstChild);const l=ye(jt?t:n);for(;a=l.nextNode();){if(Ce(a))continue;const t=tt(a);1===a.nodeType&&(t&&t.__depth?a.__depth=(a.__removalCount||0)+t.__depth+1:a.__depth=1),a.__depth>=255&&pe(a),a.content instanceof c&&(a.content.__depth=a.__depth,Te(a.content)),ke(a)}if(jt)return t;if(Ot){if($t)for(s=ot.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(xt.shadowroot||xt.shadowrootmode)&&(s=st.call(o,s,!0)),s}let u=Et?n.outerHTML:n.innerHTML;return Et&&bt["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&C(G,n.ownerDocument.doctype.name)&&(u="\n"+u),Bt&&h([ct,ut,ht],(t=>{u=y(u,t," ")})),et&&It?et.createHTML(u):u},r.setConfig=function(){se(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Lt=!0},r.clearConfig=function(){ie=null,Lt=!1},r.isValidAttribute=function(t,e,r){ie||se({});const n=ne(t),i=ne(e);return ve(n,i,r)},r.addHook=function(t,e){"function"==typeof e&&(lt[t]=lt[t]||[],f(lt[t],e))},r.removeHook=function(t){if(lt[t])return d(lt[t])},r.removeHooks=function(t){lt[t]&&(lt[t]=[])},r.removeAllHooks=function(){lt={}},r}return(0,n.K2)(Q,"createDOMPurify"),Q()}))}}),a=(0,n.f1)(i(),1),s={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},c=(0,n.K2)((function(t="fatal"){let e=s.fatal;"string"==typeof t?(t=t.toLowerCase())in s&&(e=s[t]):"number"==typeof t&&(e=t),l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=s.fatal&&(l.fatal=console.error?console.error.bind(console,u("FATAL"),"color: orange"):console.log.bind(console,"",u("FATAL"))),e<=s.error&&(l.error=console.error?console.error.bind(console,u("ERROR"),"color: orange"):console.log.bind(console,"",u("ERROR"))),e<=s.warn&&(l.warn=console.warn?console.warn.bind(console,u("WARN"),"color: orange"):console.log.bind(console,"",u("WARN"))),e<=s.info&&(l.info=console.info?console.info.bind(console,u("INFO"),"color: lightblue"):console.log.bind(console,"",u("INFO"))),e<=s.debug&&(l.debug=console.debug?console.debug.bind(console,u("DEBUG"),"color: lightgreen"):console.log.bind(console,"",u("DEBUG"))),e<=s.trace&&(l.trace=console.debug?console.debug.bind(console,u("TRACE"),"color: lightgreen"):console.log.bind(console,"",u("TRACE")))}),"setLogLevel"),u=(0,n.K2)((t=>`%c${(0,a.default)().format("ss.SSS")} : ${t} : `),"format"),h=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,d=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,f=/\s*%%.*\n/gm,p=class extends Error{static{(0,n.K2)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},m={},g=(0,n.K2)((function(t,e){t=t.replace(h,"").replace(d,"").replace(f,"\n");for(const[r,{detector:n}]of Object.entries(m))if(n(t,e))return r;throw new p(`No diagram type detected matching given configuration for text: ${t}`)}),"detectType"),y=(0,n.K2)(((...t)=>{for(const{id:e,detector:r,loader:n}of t)b(e,r,n)}),"registerLazyLoadedDiagrams"),b=(0,n.K2)(((t,e,r)=>{m[t]&&l.warn(`Detector with key ${t} already exists. Overwriting.`),m[t]={detector:e,loader:r},l.debug(`Detector with key ${t} added${r?" with loader":""}`)}),"addDetector"),_=(0,n.K2)((t=>m[t].loader),"getDiagramLoader"),x=(0,n.K2)(((t,e,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>x(t,e,i))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((i=>{"object"!=typeof e[i]||void 0!==t[i]&&"object"!=typeof t[i]?(n||"object"!=typeof t[i]&&"object"!=typeof e[i])&&(t[i]=e[i]):(void 0===t[i]&&(t[i]=Array.isArray(e[i])?[]:{}),t[i]=x(t[i],e[i],{depth:r-1,clobber:n}))})),t)}),"assignWithDepth"),C=x,v={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+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return 2.55*r;t/=360,e/=100;const i=(r/=100)<.5?r*(1+e):r+e-r*e,o=2*r-i;switch(n){case"r":return 255*v.hue2rgb(o,i,t+1/3);case"g":return 255*v.hue2rgb(o,i,t);case"b":return 255*v.hue2rgb(o,i,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),o=Math.min(t,e,r),a=(i+o)/2;if("l"===n)return 100*a;if(i===o)return 0;const s=i-o;if("s"===n)return 100*(a>.5?s/(2-i-o):s/(i+o));switch(i){case t:return 60*((e-r)/s+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}},k={};for(let t=0;t<=255;t++)k[t]=w.unit.dec2hex(t);var T,S=class{static{(0,n.K2)(this,"Type")}constructor(){this.type=0}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=0}is(t){return this.type===t}},K=new class{static{(0,n.K2)(this,"Channels")}constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new S}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=0,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=w.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=w.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=w.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=w.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=w.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=w.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(2)||void 0===e?(this._ensureHSL(),w.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(2)||void 0===e?(this._ensureHSL(),w.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(2)||void 0===e?(this._ensureHSL(),w.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(1)||void 0===e?(this._ensureRGB(),w.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(1)||void 0===e?(this._ensureRGB(),w.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(1)||void 0===e?(this._ensureRGB(),w.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(1),this.changed=!0,this.data.r=t}set g(t){this.type.set(1),this.changed=!0,this.data.g=t}set b(t){this.type.set(1),this.changed=!0,this.data.b=t}set h(t){this.type.set(2),this.changed=!0,this.data.h=t}set s(t){this.type.set(2),this.changed=!0,this.data.s=t}set l(t){this.type.set(2),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent"),A={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(A.re);if(!e)return;const r=e[1],n=parseInt(r,16),i=r.length,o=i%4==0,a=i>4,s=a?1:17,l=a?8:4,c=o?0:-1,u=a?255:15;return K.set({r:(n>>l*(c+3)&u)*s,g:(n>>l*(c+2)&u)*s,b:(n>>l*(c+1)&u)*s,a:o?(n&u)*s/255:1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`#${k[Math.round(e)]}${k[Math.round(r)]}${k[Math.round(n)]}${k[Math.round(255*i)]}`:`#${k[Math.round(e)]}${k[Math.round(r)]}${k[Math.round(n)]}`}},B=A,F={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(F.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return w.channel.clamp.h(.9*parseFloat(t));case"rad":return w.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return w.channel.clamp.h(360*parseFloat(t))}}return w.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(F.re);if(!r)return;const[,n,i,o,a,s]=r;return K.set({h:F._hue2deg(n),s:w.channel.clamp.s(parseFloat(i)),l:w.channel.clamp.l(parseFloat(o)),a:a?w.channel.clamp.a(s?parseFloat(a)/100:parseFloat(a)):1},t)},stringify:t=>{const{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${w.lang.round(e)}, ${w.lang.round(r)}%, ${w.lang.round(n)}%, ${i})`:`hsl(${w.lang.round(e)}, ${w.lang.round(r)}%, ${w.lang.round(n)}%)`}},E=F,L={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=L.colors[t];if(e)return B.parse(e)},stringify:t=>{const e=B.stringify(t);for(const t in L.colors)if(L.colors[t]===e)return t}},M=L,O={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(114!==e&&82!==e)return;const r=t.match(O.re);if(!r)return;const[,n,i,o,a,s,l,c,u]=r;return K.set({r:w.channel.clamp.r(i?2.55*parseFloat(n):parseFloat(n)),g:w.channel.clamp.g(a?2.55*parseFloat(o):parseFloat(o)),b:w.channel.clamp.b(l?2.55*parseFloat(s):parseFloat(s)),a:c?w.channel.clamp.a(u?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${w.lang.round(e)}, ${w.lang.round(r)}, ${w.lang.round(n)}, ${w.lang.round(i)})`:`rgb(${w.lang.round(e)}, ${w.lang.round(r)}, ${w.lang.round(n)})`}},$=O,I=t=>{if("string"!=typeof t)return t;const e=B.parse(t)||$.parse(t)||E.parse(t)||M.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},D=t=>!t.changed&&t.color?t.color:t.type.is(2)||void 0===t.data.r?E.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?$.stringify(t):B.stringify(t),N=(0,n.K2)(((t,e)=>{const r=I(t);for(const t in e)r[t]=w.channel.clamp[t](e[t]);return D(r)}),"change"),P=(0,n.K2)(((t,e,r=0,n=1)=>{if("number"!=typeof t)return N(t,{a:e});const i=K.set({r:w.channel.clamp.r(t),g:w.channel.clamp.g(e),b:w.channel.clamp.b(r),a:w.channel.clamp.a(n)});return D(i)}),"rgba"),j=(0,n.K2)(((t,e)=>w.lang.round(I(t)[e])),"channel"),z=(0,n.K2)((t=>{const{r:e,g:r,b:n}=I(t),i=.2126*w.channel.toLinear(e)+.7152*w.channel.toLinear(r)+.0722*w.channel.toLinear(n);return w.lang.round(i)}),"luminance"),q=(0,n.K2)((t=>z(t)>=.5),"isLight"),R=(0,n.K2)((t=>!q(t)),"isDark"),W=(0,n.K2)(((t,e,r)=>{const n=I(t),i=n[e],o=w.channel.clamp[e](i+r);return i!==o&&(n[e]=o),D(n)}),"adjustChannel"),U=(0,n.K2)(((t,e)=>W(t,"l",e)),"lighten"),H=(0,n.K2)(((t,e)=>W(t,"l",-e)),"darken"),Y=(0,n.K2)(((t,e)=>{const r=I(t),n={};for(const t in e)e[t]&&(n[t]=r[t]+e[t]);return N(t,n)}),"adjust"),G=(0,n.K2)(((t,e,r=50)=>{const{r:n,g:i,b:o,a}=I(t),{r:s,g:l,b:c,a:u}=I(e),h=r/100,d=2*h-1,f=a-u,p=((d*f==-1?d:(d+f)/(1+d*f))+1)/2,m=1-p;return P(n*p+s*m,i*p+l*m,o*p+c*m,a*h+u*(1-h))}),"mix"),V=(0,n.K2)(((t,e=100)=>{const r=I(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,G(r,t,e)}),"invert"),J=(0,n.K2)(((t,e)=>Y(t,e?{s:-40,l:10}:{s:-40,l:-10})),"mkBorder"),X="#ffffff",Z="#f2f2f2",Q=class{static{(0,n.K2)(this,"Theme")}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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Y(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Y(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(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?H(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||this.actorBorder,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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||V(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||U(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||Y(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Y(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Y(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Y(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Y(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Y(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Y(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Y(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Y(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},tt=(0,n.K2)((t=>{const e=new Q;return e.calculate(t),e}),"getThemeVariables"),et=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=U(this.primaryColor,16),this.tertiaryColor=Y(this.primaryColor,{h:-160}),this.primaryBorderColor=V(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.lineColor=V(this.background),this.textColor=V(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=U(V("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=P(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=H("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=H(this.sectionBkgColor,10),this.taskBorderColor=P(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=P(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(){this.secondBkg=U(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=U(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,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=U(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=Y(this.primaryColor,{h:64}),this.fillType3=Y(this.secondaryColor,{h:64}),this.fillType4=Y(this.primaryColor,{h:-64}),this.fillType5=Y(this.secondaryColor,{h:-64}),this.fillType6=Y(this.primaryColor,{h:128}),this.fillType7=Y(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||Y(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Y(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Y(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Y(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Y(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Y(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Y(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Y(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Y(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},rt=(0,n.K2)((t=>{const e=new et;return e.calculate(t),e}),"getThemeVariables"),nt=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Y(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Y(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.lineColor=V(this.background),this.textColor=V(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="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="#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=P(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(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Y(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Y(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Y(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Y(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Y(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Y(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Y(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Y(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Y(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||H(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||H(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},it=(0,n.K2)((t=>{const e=new nt;return e.calculate(t),e}),"getThemeVariables"),ot=class{static{(0,n.K2)(this,"Theme")}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=U("#cde498",10),this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.primaryColor),this.lineColor=V(this.background),this.textColor=V(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="calculated",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(){this.actorBorder=H(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.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Y(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Y(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Y(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Y(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Y(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Y(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Y(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Y(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Y(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||H(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||H(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},at=(0,n.K2)((t=>{const e=new ot;return e.calculate(t),e}),"getThemeVariables"),st=class{static{(0,n.K2)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=U(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Y(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.lineColor=V(this.background),this.textColor=V(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=this.actorBorder,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(){this.secondBkg=U(this.contrast,55),this.border2=this.contrast,this.actorBorder=U(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,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 t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},lt={base:{getThemeVariables:tt},dark:{getThemeVariables:rt},default:{getThemeVariables:it},forest:{getThemeVariables:at},neutral:{getThemeVariables:(0,n.K2)((t=>{const e=new st;return e.calculate(t),e}),"getThemeVariables")}},ct={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},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},array:{useMaxWidth:!0,borderWidth:1},matrix:{useMaxWidth:!0,borderWidth:1},testslides:{useMaxWidth:!0,borderWidth:1},visslides:{useMaxWidth:!0,borderWidth:1},visual:{useMaxWidth:!0,borderWidth:1},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","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},ut={...ct,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:lt.default.getThemeVariables(),sequence:{...ct.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:{...ct.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ct.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:{...ct.pie,useWidth:984},xyChart:{...ct.xyChart,useWidth:void 0},requirement:{...ct.requirement,useWidth:void 0},gitGraph:{...ct.gitGraph,useMaxWidth:!1},sankey:{...ct.sankey,useMaxWidth:!1},packet:{...ct.packet}},ht=(0,n.K2)(((t,e="")=>Object.keys(t).reduce(((r,n)=>Array.isArray(t[n])?r:"object"==typeof t[n]&&null!==t[n]?[...r,e+n,...ht(t[n],"")]:[...r,e+n]),[])),"keyify"),dt=new Set(ht(ut,"")),ft=ut,pt=(0,n.K2)((t=>{if(l.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>pt(t)));else{for(const e of Object.keys(t)){if(l.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!dt.has(e)||null==t[e]){l.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){l.debug("sanitizing object",e),pt(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(l.debug("sanitizing css option",e),t[e]=mt(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}l.debug("After sanitization",t)}}),"sanitizeDirective"),mt=(0,n.K2)((t=>{let e=0,r=0;for(const n of t){if(e{let r=C({},t),n={};for(const t of e)Kt(t),n=C(n,t);if(r=C(r,n),n.theme&&n.theme in lt){const t=C({},T),e=C(t.themeVariables||{},n.themeVariables);r.theme&&r.theme in lt&&(r.themeVariables=lt[r.theme].getThemeVariables(e))}return Mt(_t=r),_t}),"updateCurrentConfig"),Ct=(0,n.K2)((t=>(yt=C({},gt),yt=C(yt,t),t.theme&<[t.theme]&&(yt.themeVariables=lt[t.theme].getThemeVariables(t.themeVariables)),xt(yt,bt),yt)),"setSiteConfig"),vt=(0,n.K2)((t=>{T=C({},t)}),"saveConfigFromInitialize"),wt=(0,n.K2)((t=>(yt=C(yt,t),xt(yt,bt),yt)),"updateSiteConfig"),kt=(0,n.K2)((()=>C({},yt)),"getSiteConfig"),Tt=(0,n.K2)((t=>(Mt(t),C(_t,t),St())),"setConfig"),St=(0,n.K2)((()=>C({},_t)),"getConfig"),Kt=(0,n.K2)((t=>{t&&(["secure",...yt.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(l.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=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&Kt(t[e])})))}),"sanitize"),At=(0,n.K2)((t=>{pt(t),!t.fontFamily||t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}),bt.push(t),xt(yt,bt)}),"addDirective"),Bt=(0,n.K2)(((t=yt)=>{xt(t,bt=[])}),"reset"),Ft={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Et={},Lt=(0,n.K2)((t=>{Et[t]||(l.warn(Ft[t]),Et[t]=!0)}),"issueWarning"),Mt=(0,n.K2)((t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Lt("LAZY_LOAD_DEPRECATED")}),"checkConfig"),Ot=(0,n.f1)(o(),1),$t=//gi,It=(0,n.K2)((t=>t?Ht(t).replace(/\\n/g,"#br#").split("#br#"):[""]),"getRows"),Dt=(()=>{let t=!1;return()=>{t||(Nt(),t=!0)}})();function Nt(){const t="data-temp-href-target";Ot.default.addHook("beforeSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")||"")})),Ot.default.addHook("afterSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)||""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))}))}(0,n.K2)(Nt,"setupDompurifyHooks");var Pt=(0,n.K2)((t=>(Dt(),Ot.default.sanitize(t))),"removeScript"),jt=(0,n.K2)(((t,e)=>{if(!1!==e.flowchart?.htmlLabels){const r=e.securityLevel;"antiscript"===r||"strict"===r?t=Pt(t):"loose"!==r&&(t=(t=(t=Ht(t)).replace(//g,">")).replace(/=/g,"="),t=Ut(t))}return t}),"sanitizeMore"),zt=(0,n.K2)(((t,e)=>t?t=e.dompurifyConfig?Ot.default.sanitize(jt(t,e),e.dompurifyConfig).toString():Ot.default.sanitize(jt(t,e),{FORBID_TAGS:["style"]}).toString():t),"sanitizeText"),qt=(0,n.K2)(((t,e)=>"string"==typeof t?zt(t,e):t.flat().map((t=>zt(t,e)))),"sanitizeTextOrArray"),Rt=(0,n.K2)((t=>$t.test(t)),"hasBreaks"),Wt=(0,n.K2)((t=>t.split($t)),"splitBreaks"),Ut=(0,n.K2)((t=>t.replace(/#br#/g,"
")),"placeholderToBreak"),Ht=(0,n.K2)((t=>t.replace($t,"#br#")),"breakToPlaceholder"),Yt=(0,n.K2)((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}),"getUrl"),Gt=(0,n.K2)((t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Vt=(0,n.K2)((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.max(...e)}),"getMax"),Jt=(0,n.K2)((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.min(...e)}),"getMin"),Xt=(0,n.K2)((function(t){const e=t.split(/(,)/),r=[];for(let t=0;t0&&t+1Math.max(0,t.split(e).length-1)),"countOccurrence"),Qt=(0,n.K2)(((t,e)=>{const r=Zt(t,"~"),n=Zt(e,"~");return 1===r&&1===n}),"shouldCombineSets"),te=(0,n.K2)((t=>{const e=Zt(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const n=[...t];let i=n.indexOf("~"),o=n.lastIndexOf("~");for(;-1!==i&&-1!==o&&i!==o;)n[i]="<",n[o]=">",i=n.indexOf("~"),o=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")}),"processSet"),ee=(0,n.K2)((()=>void 0!==window.MathMLElement),"isMathMLSupported"),re=/\$\$(.*)\$\$/g,ne=(0,n.K2)((t=>(t.match(re)?.length??0)>0),"hasKatex"),ie=(0,n.K2)((async(t,e)=>{t=await oe(t,e);const r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const n=document.querySelector("body");n?.insertAdjacentElement("beforeend",r);const i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i}),"calculateMathMLDimensions"),oe=(0,n.K2)((async(t,e)=>{if(!ne(t))return t;if(!(ee()||e.legacyMathML||e.forceLegacyMathML))return t.replace(re,"MathML is unsupported in this environment.");const{default:n}=await r.e(6449).then(r.bind(r,6449)),i=e.forceLegacyMathML||!ee()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split($t).map((t=>ne(t)?`
${t}
`:`
${t}
`)).join("").replace(re,((t,e)=>n.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,"")))}),"renderKatex"),ae={getRows:It,sanitizeText:zt,sanitizeTextOrArray:qt,hasBreaks:Rt,splitBreaks:Wt,lineBreakRegex:$t,removeScript:Pt,getUrl:Yt,evaluate:Gt,getMax:Vt,getMin:Jt},se=(0,n.K2)((function(t,e){for(let r of e)t.attr(r[0],r[1])}),"d3Attrs"),le=(0,n.K2)((function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n}),"calculateSvgSizeAttrs"),ce=(0,n.K2)((function(t,e,r,n){const i=le(e,r,n);se(t,i)}),"configureSvgSize"),ue=(0,n.K2)((function(t,e,r,n){const i=e.node().getBBox(),o=i.width,a=i.height;l.info(`SVG bounds: ${o}x${a}`,i);let s=0,c=0;l.info(`Graph bounds: ${s}x${c}`,t),s=o+2*r,c=a+2*r,l.info(`Calculated bounds: ${s}x${c}`),ce(e,c,s,n);const u=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",u)}),"setupGraphViewbox"),he={},de=(0,n.K2)(((t,e,r)=>{let n="";return t in he&&he[t]?n=he[t](r):l.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 2px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n\n ${n}\n\n ${e}\n`}),"getStyles"),fe=(0,n.K2)(((t,e)=>{void 0!==e&&(he[t]=e)}),"addStylesForDiagram"),pe=de,me={};(0,n.VA)(me,{clear:()=>xe,getAccDescription:()=>ke,getAccTitle:()=>ve,getDiagramTitle:()=>Se,setAccDescription:()=>we,setAccTitle:()=>Ce,setDiagramTitle:()=>Te});var ge="",ye="",be="",_e=(0,n.K2)((t=>zt(t,St())),"sanitizeText"),xe=(0,n.K2)((()=>{ge="",be="",ye=""}),"clear"),Ce=(0,n.K2)((t=>{ge=_e(t).replace(/^\s+/g,"")}),"setAccTitle"),ve=(0,n.K2)((()=>ge),"getAccTitle"),we=(0,n.K2)((t=>{be=_e(t).replace(/\n\s+/g,"\n")}),"setAccDescription"),ke=(0,n.K2)((()=>be),"getAccDescription"),Te=(0,n.K2)((t=>{ye=_e(t)}),"setDiagramTitle"),Se=(0,n.K2)((()=>ye),"getDiagramTitle"),Ke=l,Ae=c,Be=St,Fe=Tt,Ee=gt,Le=(0,n.K2)((t=>zt(t,Be())),"sanitizeText"),Me=ue,Oe=(0,n.K2)((()=>me),"getCommonDb"),$e={},Ie=(0,n.K2)(((t,e,r)=>{$e[t]&&Ke.warn(`Diagram with id ${t} already registered. Overwriting.`),$e[t]=e,r&&b(t,r),fe(t,e.styles),e.injectUtils?.(Ke,Ae,Be,Le,Me,Oe(),(()=>{}))}),"registerDiagram"),De=(0,n.K2)((t=>{if(t in $e)return $e[t];throw new Ne(t)}),"getDiagram"),Ne=class extends Error{static{(0,n.K2)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}};function Pe(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r=e)&&(r=e);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r=i)&&(r=i)}return r}function je(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r>e||void 0===r&&e>=e)&&(r=e);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function ze(t,e){return null==t||null==e?NaN:te?1:t>=e?0:NaN}function qe(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function Re(t){let e,r,i;function o(t,n,i=0,o=t.length){if(i>>1;r(t[e],n)<0?i=e+1:o=e}while(i>>1;r(t[e],n)<=0?i=e+1:o=e}while(ir&&i(t[a-1],e)>-i(t[a],e)?a-1:a}return 2!==t.length?(e=ze,r=(0,n.K2)(((e,r)=>ze(t(e),r)),"compare2"),i=(0,n.K2)(((e,r)=>t(e)-r),"delta")):(e=t===ze||t===qe?t:We,r=t,i=t),(0,n.K2)(o,"left"),(0,n.K2)(a,"right"),(0,n.K2)(s,"center"),{left:o,center:s,right:a}}function We(){return 0}function Ue(t){return null===t?NaN:+t}(0,n.K2)(Pe,"max"),(0,n.K2)(je,"min"),(0,n.K2)(ze,"ascending"),(0,n.K2)(qe,"descending"),(0,n.K2)(Re,"bisector"),(0,n.K2)(We,"zero"),(0,n.K2)(Ue,"number");var He=Re(ze),Ye=He.right,Ge=(He.left,Re(Ue).center,Ye),Ve=class extends Map{static{(0,n.K2)(this,"InternMap")}constructor(t,e=Qe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,r]of t)this.set(e,r)}get(t){return super.get(Je(this,t))}has(t){return super.has(Je(this,t))}set(t,e){return super.set(Xe(this,t),e)}delete(t){return super.delete(Ze(this,t))}};function Je({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function Xe({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function Ze({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function Qe(t){return null!==t&&"object"==typeof t?t.valueOf():t}(0,n.K2)(Je,"intern_get"),(0,n.K2)(Xe,"intern_set"),(0,n.K2)(Ze,"intern_delete"),(0,n.K2)(Qe,"keyof");var tr=Math.sqrt(50),er=Math.sqrt(10),rr=Math.sqrt(2);function nr(t,e,r){const n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),a=o>=tr?10:o>=er?5:o>=rr?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),l=Math.round(e*c),s/ce&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),l=Math.round(e/c),s*ce&&--l),l0))return[];if((t=+t)==(e=+e))return[t];const n=e=i))return[];const s=o-i+1,l=new Array(s);if(n)if(a<0)for(let t=0;t+t(e)}function yr(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function br(){return!this.__axis}function _r(t,e){var r=[],i=null,o=null,a=6,s=6,l=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=t===cr||t===dr?-1:1,h=t===dr||t===ur?"x":"y",d=t===cr||t===hr?pr:mr;function f(n){var f=null==i?e.ticks?e.ticks.apply(e,r):e.domain():i,p=null==o?e.tickFormat?e.tickFormat.apply(e,r):lr:o,m=Math.max(a,0)+l,g=e.range(),y=+g[0]+c,b=+g[g.length-1]+c,_=(e.bandwidth?yr:gr)(e.copy(),c),x=n.selection?n.selection():n,C=x.selectAll(".domain").data([null]),v=x.selectAll(".tick").data(f,e).order(),w=v.exit(),k=v.enter().append("g").attr("class","tick"),T=v.select("line"),S=v.select("text");C=C.merge(C.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),v=v.merge(k),T=T.merge(k.append("line").attr("stroke","currentColor").attr(h+"2",u*a)),S=S.merge(k.append("text").attr("fill","currentColor").attr(h,u*m).attr("dy",t===cr?"0em":t===hr?"0.71em":"0.32em")),n!==x&&(C=C.transition(n),v=v.transition(n),T=T.transition(n),S=S.transition(n),w=w.transition(n).attr("opacity",fr).attr("transform",(function(t){return isFinite(t=_(t))?d(t+c):this.getAttribute("transform")})),k.attr("opacity",fr).attr("transform",(function(t){var e=this.parentNode.__axis;return d((e&&isFinite(e=e(t))?e:_(t))+c)}))),w.remove(),C.attr("d",t===dr||t===ur?s?"M"+u*s+","+y+"H"+c+"V"+b+"H"+u*s:"M"+c+","+y+"V"+b:s?"M"+y+","+u*s+"V"+c+"H"+b+"V"+u*s:"M"+y+","+c+"H"+b),v.attr("opacity",1).attr("transform",(function(t){return d(_(t)+c)})),T.attr(h+"2",u*a),S.attr(h,u*m).text(p),x.filter(br).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ur?"start":t===dr?"end":"middle"),x.each((function(){this.__axis=_}))}return(0,n.K2)(f,"axis"),f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return r=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),f):r.slice()},f.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),f):i&&i.slice()},f.tickFormat=function(t){return arguments.length?(o=t,f):o},f.tickSize=function(t){return arguments.length?(a=s=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(s=+t,f):s},f.tickPadding=function(t){return arguments.length?(l=+t,f):l},f.offset=function(t){return arguments.length?(c=+t,f):c},f}function xr(t){return _r(cr,t)}function Cr(t){return _r(hr,t)}function vr(){}function wr(t){return null==t?vr:function(){return this.querySelector(t)}}function kr(t){"function"!=typeof t&&(t=wr(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i=x&&(x=_+1);!(b=g[x])&&++x=0;)(n=i[o])&&(a&&4^n.compareDocumentPosition(a)&&a.parentNode.insertBefore(n,a),a=n);return this}function tn(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=en),(0,n.K2)(e,"compareNode");for(var r=this._groups,i=r.length,o=new Array(i),a=0;ae?1:t>=e?0:NaN}function rn(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function nn(){return Array.from(this)}function on(){for(var t=this._groups,e=0,r=t.length;e=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),un.hasOwnProperty(e)?{space:un[e],local:t}:t}function dn(t){return function(){this.removeAttribute(t)}}function fn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pn(t,e){return function(){this.setAttribute(t,e)}}function mn(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function gn(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function yn(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function bn(t,e){var r=hn(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((null==e?r.local?fn:dn:"function"==typeof e?r.local?yn:gn:r.local?mn:pn)(r,e))}function _n(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function xn(t){return function(){this.style.removeProperty(t)}}function Cn(t,e,r){return function(){this.style.setProperty(t,e,r)}}function vn(t,e,r){return function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function wn(t,e,r){return arguments.length>1?this.each((null==e?xn:"function"==typeof e?vn:Cn)(t,e,null==r?"":r)):kn(this.node(),t)}function kn(t,e){return t.style.getPropertyValue(e)||_n(t).getComputedStyle(t,null).getPropertyValue(e)}function Tn(t){return function(){delete this[t]}}function Sn(t,e){return function(){this[t]=e}}function Kn(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function An(t,e){return arguments.length>1?this.each((null==e?Tn:"function"==typeof e?Kn:Sn)(t,e)):this.node()[t]}function Bn(t){return t.trim().split(/^|\s+/)}function Fn(t){return t.classList||new En(t)}function En(t){this._node=t,this._names=Bn(t.getAttribute("class")||"")}function Ln(t,e){for(var r=Fn(t),n=-1,i=e.length;++n=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}}))}function ui(t){return function(){var e=this.__on;if(e){for(var r,n=0,i=-1,o=e.length;n=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}},(0,n.K2)(Ln,"classedAdd"),(0,n.K2)(Mn,"classedRemove"),(0,n.K2)(On,"classedTrue"),(0,n.K2)($n,"classedFalse"),(0,n.K2)(In,"classedFunction"),(0,n.K2)(Dn,"default"),(0,n.K2)(Nn,"textRemove"),(0,n.K2)(Pn,"textConstant"),(0,n.K2)(jn,"textFunction"),(0,n.K2)(zn,"default"),(0,n.K2)(qn,"htmlRemove"),(0,n.K2)(Rn,"htmlConstant"),(0,n.K2)(Wn,"htmlFunction"),(0,n.K2)(Un,"default"),(0,n.K2)(Hn,"raise"),(0,n.K2)(Yn,"default"),(0,n.K2)(Gn,"lower"),(0,n.K2)(Vn,"default"),(0,n.K2)(Jn,"creatorInherit"),(0,n.K2)(Xn,"creatorFixed"),(0,n.K2)(Zn,"default"),(0,n.K2)(Qn,"default"),(0,n.K2)(ti,"constantNull"),(0,n.K2)(ei,"default"),(0,n.K2)(ri,"remove"),(0,n.K2)(ni,"default"),(0,n.K2)(ii,"selection_cloneShallow"),(0,n.K2)(oi,"selection_cloneDeep"),(0,n.K2)(ai,"default"),(0,n.K2)(si,"default"),(0,n.K2)(li,"contextListener"),(0,n.K2)(ci,"parseTypenames"),(0,n.K2)(ui,"onRemove"),(0,n.K2)(hi,"onAdd"),(0,n.K2)(di,"default"),(0,n.K2)(fi,"dispatchEvent"),(0,n.K2)(pi,"dispatchConstant"),(0,n.K2)(mi,"dispatchFunction"),(0,n.K2)(gi,"default"),(0,n.K2)(yi,"default");var bi=[null];function _i(t,e){this._groups=t,this._parents=e}function xi(){return new _i([[document.documentElement]],bi)}function Ci(){return this}(0,n.K2)(_i,"Selection"),(0,n.K2)(xi,"selection"),(0,n.K2)(Ci,"selection_selection"),_i.prototype=xi.prototype={constructor:_i,select:kr,selectAll:Br,selectChild:$r,selectChildren:Pr,filter:jr,data:Gr,enter:qr,exit:Jr,join:Xr,merge:Zr,selection:Ci,order:Qr,sort:tn,call:rn,nodes:nn,node:on,size:an,empty:sn,each:ln,attr:bn,style:wn,property:An,classed:Dn,text:zn,html:Un,raise:Yn,lower:Vn,append:Qn,insert:ei,remove:ni,clone:ai,datum:si,on:di,dispatch:gi,[Symbol.iterator]:yi};var vi=xi;function wi(t){return"string"==typeof t?new _i([[document.querySelector(t)]],[document.documentElement]):new _i([[t]],bi)}function ki(t){return"string"==typeof t?new _i([document.querySelectorAll(t)],[document.documentElement]):new _i([Tr(t)],bi)}function Ti(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Si(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function Ki(){}(0,n.K2)(wi,"default"),(0,n.K2)(ki,"default"),(0,n.K2)(Ti,"default"),(0,n.K2)(Si,"extend"),(0,n.K2)(Ki,"Color");var Ai=.7,Bi=1/Ai,Fi="\\s*([+-]?\\d+)\\s*",Ei="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Li="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Mi=/^#([0-9a-f]{3,8})$/,Oi=new RegExp(`^rgb\\(${Fi},${Fi},${Fi}\\)$`),$i=new RegExp(`^rgb\\(${Li},${Li},${Li}\\)$`),Ii=new RegExp(`^rgba\\(${Fi},${Fi},${Fi},${Ei}\\)$`),Di=new RegExp(`^rgba\\(${Li},${Li},${Li},${Ei}\\)$`),Ni=new RegExp(`^hsl\\(${Ei},${Li},${Li}\\)$`),Pi=new RegExp(`^hsla\\(${Ei},${Li},${Li},${Ei}\\)$`),ji={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};function zi(){return this.rgb().formatHex()}function qi(){return this.rgb().formatHex8()}function Ri(){return io(this).formatHsl()}function Wi(){return this.rgb().formatRgb()}function Ui(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Mi.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?Hi(e):3===r?new Ji(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Yi(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Yi(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Oi.exec(t))?new Ji(e[1],e[2],e[3],1):(e=$i.exec(t))?new Ji(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ii.exec(t))?Yi(e[1],e[2],e[3],e[4]):(e=Di.exec(t))?Yi(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ni.exec(t))?no(e[1],e[2]/100,e[3]/100,1):(e=Pi.exec(t))?no(e[1],e[2]/100,e[3]/100,e[4]):ji.hasOwnProperty(t)?Hi(ji[t]):"transparent"===t?new Ji(NaN,NaN,NaN,0):null}function Hi(t){return new Ji(t>>16&255,t>>8&255,255&t,1)}function Yi(t,e,r,n){return n<=0&&(t=e=r=NaN),new Ji(t,e,r,n)}function Gi(t){return t instanceof Ki||(t=Ui(t)),t?new Ji((t=t.rgb()).r,t.g,t.b,t.opacity):new Ji}function Vi(t,e,r,n){return 1===arguments.length?Gi(t):new Ji(t,e,r,null==n?1:n)}function Ji(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function Xi(){return`#${ro(this.r)}${ro(this.g)}${ro(this.b)}`}function Zi(){return`#${ro(this.r)}${ro(this.g)}${ro(this.b)}${ro(255*(isNaN(this.opacity)?1:this.opacity))}`}function Qi(){const t=to(this.opacity);return`${1===t?"rgb(":"rgba("}${eo(this.r)}, ${eo(this.g)}, ${eo(this.b)}${1===t?")":`, ${t})`}`}function to(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function eo(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ro(t){return((t=eo(t))<16?"0":"")+t.toString(16)}function no(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new ao(t,e,r,n)}function io(t){if(t instanceof ao)return new ao(t.h,t.s,t.l,t.opacity);if(t instanceof Ki||(t=Ui(t)),!t)return new ao;if(t instanceof ao)return t;var e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),o=Math.max(e,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=e===o?(r-n)/s+6*(r0&&l<1?0:a,new ao(a,s,l,t.opacity)}function oo(t,e,r,n){return 1===arguments.length?io(t):new ao(t,e,r,null==n?1:n)}function ao(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function so(t){return(t=(t||0)%360)<0?t+360:t}function lo(t){return Math.max(0,Math.min(1,t||0))}function co(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}Ti(Ki,Ui,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:zi,formatHex:zi,formatHex8:qi,formatHsl:Ri,formatRgb:Wi,toString:Wi}),(0,n.K2)(zi,"color_formatHex"),(0,n.K2)(qi,"color_formatHex8"),(0,n.K2)(Ri,"color_formatHsl"),(0,n.K2)(Wi,"color_formatRgb"),(0,n.K2)(Ui,"color"),(0,n.K2)(Hi,"rgbn"),(0,n.K2)(Yi,"rgba"),(0,n.K2)(Gi,"rgbConvert"),(0,n.K2)(Vi,"rgb"),(0,n.K2)(Ji,"Rgb"),Ti(Ji,Vi,Si(Ki,{brighter(t){return t=null==t?Bi:Math.pow(Bi,t),new Ji(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Ai:Math.pow(Ai,t),new Ji(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ji(eo(this.r),eo(this.g),eo(this.b),to(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:Xi,formatHex:Xi,formatHex8:Zi,formatRgb:Qi,toString:Qi})),(0,n.K2)(Xi,"rgb_formatHex"),(0,n.K2)(Zi,"rgb_formatHex8"),(0,n.K2)(Qi,"rgb_formatRgb"),(0,n.K2)(to,"clampa"),(0,n.K2)(eo,"clampi"),(0,n.K2)(ro,"hex"),(0,n.K2)(no,"hsla"),(0,n.K2)(io,"hslConvert"),(0,n.K2)(oo,"hsl"),(0,n.K2)(ao,"Hsl"),Ti(ao,oo,Si(Ki,{brighter(t){return t=null==t?Bi:Math.pow(Bi,t),new ao(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Ai:Math.pow(Ai,t),new ao(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new Ji(co(t>=240?t-240:t+120,i,n),co(t,i,n),co(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new ao(so(this.h),lo(this.s),lo(this.l),to(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=to(this.opacity);return`${1===t?"hsl(":"hsla("}${so(this.h)}, ${100*lo(this.s)}%, ${100*lo(this.l)}%${1===t?")":`, ${t})`}`}})),(0,n.K2)(so,"clamph"),(0,n.K2)(lo,"clampt"),(0,n.K2)(co,"hsl2rgb");var uo=Math.PI/180,ho=180/Math.PI,fo=.96422,po=1,mo=.82521,go=4/29,yo=6/29,bo=3*yo*yo,_o=yo*yo*yo;function xo(t){if(t instanceof vo)return new vo(t.l,t.a,t.b,t.opacity);if(t instanceof Bo)return Fo(t);t instanceof Ji||(t=Gi(t));var e,r,n=So(t.r),i=So(t.g),o=So(t.b),a=wo((.2225045*n+.7168786*i+.0606169*o)/po);return n===i&&i===o?e=r=a:(e=wo((.4360747*n+.3850649*i+.1430804*o)/fo),r=wo((.0139322*n+.0971045*i+.7141733*o)/mo)),new vo(116*a-16,500*(e-a),200*(a-r),t.opacity)}function Co(t,e,r,n){return 1===arguments.length?xo(t):new vo(t,e,r,null==n?1:n)}function vo(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function wo(t){return t>_o?Math.pow(t,1/3):t/bo+go}function ko(t){return t>yo?t*t*t:bo*(t-go)}function To(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function So(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ko(t){if(t instanceof Bo)return new Bo(t.h,t.c,t.l,t.opacity);if(t instanceof vo||(t=xo(t)),0===t.a&&0===t.b)return new Bo(NaN,0()=>t),"default");function Lo(t,e){return function(r){return t+r*e}}function Mo(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function Oo(t,e){var r=e-t;return r?Lo(t,r>180||r<-180?r-360*Math.round(r/360):r):Eo(isNaN(t)?e:t)}function $o(t){return 1==(t=+t)?Io:function(e,r){return r-e?Mo(e,r,t):Eo(isNaN(e)?r:e)}}function Io(t,e){var r=e-t;return r?Lo(t,r):Eo(isNaN(t)?e:t)}function Do(t){return function(e,r){var n=t((e=Ao(e)).h,(r=Ao(r)).h),i=Io(e.c,r.c),o=Io(e.l,r.l),a=Io(e.opacity,r.opacity);return function(t){return e.h=n(t),e.c=i(t),e.l=o(t),e.opacity=a(t),e+""}}}(0,n.K2)(Lo,"linear"),(0,n.K2)(Mo,"exponential"),(0,n.K2)(Oo,"hue"),(0,n.K2)($o,"gamma"),(0,n.K2)(Io,"nogamma"),(0,n.K2)(Do,"hcl");var No=Do(Oo);function Po(t,e,r,n,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*r+(1+3*t+3*o-3*a)*n+a*i)/6}function jo(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],o=t[n+1],a=n>0?t[n-1]:2*i-o,s=no&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:Go(r,n)})),o=Xo.lastIndex;return o180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(o(r)+"rotate(",null,i)-2,x:Go(t,e)})):e&&r.push(o(r)+"rotate("+e+i)}function l(t,e,r,n){t!==e?n.push({i:r.push(o(r)+"skewX(",null,i)-2,x:Go(t,e)}):e&&r.push(o(r)+"skewX("+e+i)}function c(t,e,r,n,i,a){if(t!==r||e!==n){var s=i.push(o(i)+"scale(",null,",",null,")");a.push({i:s-4,x:Go(t,r)},{i:s-2,x:Go(e,n)})}else 1===r&&1===n||i.push(o(i)+"scale("+r+","+n+")")}return(0,n.K2)(o,"pop"),(0,n.K2)(a,"translate"),(0,n.K2)(s,"rotate"),(0,n.K2)(l,"skewX"),(0,n.K2)(c,"scale"),function(e,r){var n=[],i=[];return e=t(e),r=t(r),a(e.translateX,e.translateY,r.translateX,r.translateY,n,i),s(e.rotate,r.rotate,n,i),l(e.skewX,r.skewX,n,i),c(e.scaleX,e.scaleY,r.scaleX,r.scaleY,n,i),e=r=null,function(t){for(var e,r=-1,o=i.length;++re&&(r=t,t=e,e=r),function(r){return Math.max(t,Math.min(e,r))}}function Ca(t,e,r){var n=t[0],i=t[1],o=e[0],a=e[1];return i2?va:Ca,o=a=null,d}function d(e){return null==e||isNaN(e=+e)?r:(o||(o=i(s.map(t),l,c)))(t(u(e)))}return(0,n.K2)(h,"rescale"),(0,n.K2)(d,"scale"),d.invert=function(r){return u(e((a||(a=i(l,s.map(t),Go)))(r)))},d.domain=function(t){return arguments.length?(s=Array.from(t,ga),h()):s.slice()},d.range=function(t){return arguments.length?(l=Array.from(t),h()):l.slice()},d.rangeRound=function(t){return l=Array.from(t),c=ra,h()},d.clamp=function(t){return arguments.length?(u=!!t||ba,h()):u!==ba},d.interpolate=function(t){return arguments.length?(c=t,h()):c},d.unknown=function(t){return arguments.length?(r=t,d):r},function(r,n){return t=r,e=n,h()}}function Ta(){return ka()(ba,ba)}function Sa(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ka(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function Aa(t){return(t=Ka(Math.abs(t)))?t[1]:NaN}function Ba(t,e){return function(r,n){for(var i=r.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function Fa(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(0,n.K2)(ba,"identity"),(0,n.K2)(_a,"normalize"),(0,n.K2)(xa,"clamper"),(0,n.K2)(Ca,"bimap"),(0,n.K2)(va,"polymap"),(0,n.K2)(wa,"copy"),(0,n.K2)(ka,"transformer"),(0,n.K2)(Ta,"continuous"),(0,n.K2)(Sa,"default"),(0,n.K2)(Ka,"formatDecimalParts"),(0,n.K2)(Aa,"default"),(0,n.K2)(Ba,"default"),(0,n.K2)(Fa,"default");var Ea,La=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ma(t){if(!(e=La.exec(t)))throw new Error("invalid format: "+t);var e;return new Oa({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Oa(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function $a(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}function Ia(t,e){var r=Ka(t,e);if(!r)return t+"";var n=r[0],i=r[1],o=i-(Ea=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Ka(t,Math.max(0,e+o-1))[0]}function Da(t,e){var r=Ka(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}(0,n.K2)(Ma,"formatSpecifier"),Ma.prototype=Oa.prototype,(0,n.K2)(Oa,"FormatSpecifier"),Oa.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},(0,n.K2)($a,"default"),(0,n.K2)(Ia,"default"),(0,n.K2)(Da,"default");var Na={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Sa,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Da(100*t,e),r:Da,s:Ia,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Pa(t){return t}(0,n.K2)(Pa,"default");var ja,za,qa,Ra=Array.prototype.map,Wa=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ua(t){var e=void 0===t.grouping||void 0===t.thousands?Pa:Ba(Ra.call(t.grouping,Number),t.thousands+""),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Pa:Fa(Ra.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function u(t){var u=(t=Ma(t)).fill,h=t.align,d=t.sign,f=t.symbol,p=t.zero,m=t.width,g=t.comma,y=t.precision,b=t.trim,_=t.type;"n"===_?(g=!0,_="g"):Na[_]||(void 0===y&&(y=12),b=!0,_="g"),(p||"0"===u&&"="===h)&&(p=!0,u="0",h="=");var x="$"===f?r:"#"===f&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",C="$"===f?i:/[%p]/.test(_)?s:"",v=Na[_],w=/[defgprs%]/.test(_);function k(t){var r,n,i,s=x,f=C;if("c"===_)f=v(t)+f,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:v(Math.abs(t),y),b&&(t=$a(t)),k&&0==+t&&"+"!==d&&(k=!1),s=(k?"("===d?d:l:"-"===d||"("===d?"":d)+s,f=("s"===_?Wa[8+Ea/3]:"")+f+(k&&"("===d?")":""),w)for(r=-1,n=t.length;++r(i=t.charCodeAt(r))||i>57){f=(46===i?o+t.slice(r+1):t.slice(r))+f,t=t.slice(0,r);break}}g&&!p&&(t=e(t,1/0));var T=s.length+t.length+f.length,S=T>1)+s+t+f+S.slice(T);break;default:t=S+s+t+f}return a(t)}return y=void 0===y?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),(0,n.K2)(k,"format"),k.toString=function(){return t+""},k}function h(t,e){var r=u(((t=Ma(t)).type="f",t)),n=3*Math.max(-8,Math.min(8,Math.floor(Aa(e)/3))),i=Math.pow(10,-n),o=Wa[8+n/3];return function(t){return r(i*t)+o}}return(0,n.K2)(u,"newFormat"),(0,n.K2)(h,"formatPrefix"),{format:u,formatPrefix:h}}function Ha(t){return ja=Ua(t),za=ja.format,qa=ja.formatPrefix,ja}function Ya(t){return Math.max(0,-Aa(Math.abs(t)))}function Ga(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Aa(e)/3)))-Aa(Math.abs(t)))}function Va(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Aa(e)-Aa(t))+1}function Ja(t,e,r,n){var i,o=ar(t,e,r);switch((n=Ma(null==n?",f":n)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(i=Ga(o,a))||(n.precision=i),qa(n,a);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=Va(o,Math.max(Math.abs(t),Math.abs(e))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=Ya(o))||(n.precision=i-2*("%"===n.type))}return za(n)}function Xa(t){var e=t.domain;return t.ticks=function(t){var r=e();return ir(r[0],r[r.length-1],null==t?10:t)},t.tickFormat=function(t,r){var n=e();return Ja(n[0],n[n.length-1],null==t?10:t,r)},t.nice=function(r){null==r&&(r=10);var n,i,o=e(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c0;){if((i=or(l,c,r))===n)return o[a]=l,o[s]=c,e(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}n=i}return t},t}function Za(){var t=Ta();return t.copy=function(){return wa(t,Za())},da.apply(t,arguments),Xa(t)}(0,n.K2)(Ua,"default"),Ha({thousands:",",grouping:[3],currency:["$",""]}),(0,n.K2)(Ha,"defaultLocale"),(0,n.K2)(Ya,"default"),(0,n.K2)(Ga,"default"),(0,n.K2)(Va,"default"),(0,n.K2)(Ja,"tickFormat"),(0,n.K2)(Xa,"linearish"),(0,n.K2)(Za,"linear");var Qa=new Date,ts=new Date;function es(t,e,r,i){function o(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return(0,n.K2)(o,"interval"),o.floor=e=>(t(e=new Date(+e)),e),o.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),o.round=t=>{const e=o(t),r=o.ceil(t);return t-e(e(t=new Date(+t),null==r?1:Math.floor(r)),t),o.range=(r,n,i)=>{const a=[];if(r=o.ceil(r),i=null==i?1:Math.floor(i),!(r0))return a;let s;do{a.push(s=new Date(+r)),e(r,i),t(r)}while(ses((e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)}),((t,n)=>{if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!r(t););else for(;--n>=0;)for(;e(t,1),!r(t););})),r&&(o.count=(e,n)=>(Qa.setTime(+e),ts.setTime(+n),t(Qa),t(ts),Math.floor(r(Qa,ts))),o.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?o.filter(i?e=>i(e)%t==0:e=>o.count(0,e)%t==0):o:null)),o}(0,n.K2)(es,"timeInterval");var rs=es((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));rs.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?es((e=>{e.setTime(Math.floor(e/t)*t)}),((e,r)=>{e.setTime(+e+r*t)}),((e,r)=>(r-e)/t)):rs:null),rs.range;var ns=1e3,is=6e4,os=36e5,as=864e5,ss=6048e5,ls=31536e6,cs=es((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*ns)}),((t,e)=>(e-t)/ns),(t=>t.getUTCSeconds())),us=(cs.range,es((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ns)}),((t,e)=>{t.setTime(+t+e*is)}),((t,e)=>(e-t)/is),(t=>t.getMinutes()))),hs=(us.range,es((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*is)}),((t,e)=>(e-t)/is),(t=>t.getUTCMinutes()))),ds=(hs.range,es((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ns-t.getMinutes()*is)}),((t,e)=>{t.setTime(+t+e*os)}),((t,e)=>(e-t)/os),(t=>t.getHours()))),fs=(ds.range,es((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*os)}),((t,e)=>(e-t)/os),(t=>t.getUTCHours()))),ps=(fs.range,es((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*is)/as),(t=>t.getDate()-1))),ms=(ps.range,es((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/as),(t=>t.getUTCDate()-1))),gs=(ms.range,es((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/as),(t=>Math.floor(t/as))));function ys(t){return es((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*is)/ss))}gs.range,(0,n.K2)(ys,"timeWeekday");var bs=ys(0),_s=ys(1),xs=ys(2),Cs=ys(3),vs=ys(4),ws=ys(5),ks=ys(6);function Ts(t){return es((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/ss))}bs.range,_s.range,xs.range,Cs.range,vs.range,ws.range,ks.range,(0,n.K2)(Ts,"utcWeekday");var Ss=Ts(0),Ks=Ts(1),As=Ts(2),Bs=Ts(3),Fs=Ts(4),Es=Ts(5),Ls=Ts(6),Ms=(Ss.range,Ks.range,As.range,Bs.range,Fs.range,Es.range,Ls.range,es((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()))),Os=(Ms.range,es((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()))),$s=(Os.range,es((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));$s.every=t=>isFinite(t=Math.floor(t))&&t>0?es((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,r)=>{e.setFullYear(e.getFullYear()+r*t)})):null,$s.range;var Is=es((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function Ds(t,e,r,i,o,a){const s=[[cs,1,ns],[cs,5,5e3],[cs,15,15e3],[cs,30,3e4],[a,1,is],[a,5,3e5],[a,15,9e5],[a,30,18e5],[o,1,os],[o,3,108e5],[o,6,216e5],[o,12,432e5],[i,1,as],[i,2,1728e5],[r,1,ss],[e,1,2592e6],[e,3,7776e6],[t,1,ls]];function l(t,e,r){const n=et)).right(s,i);if(o===s.length)return t.every(ar(e/ls,r/ls,n));if(0===o)return rs.every(Math.max(ar(e,r,n),1));const[a,l]=s[i/s[o-1][2]isFinite(t=Math.floor(t))&&t>0?es((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null,Is.range,(0,n.K2)(Ds,"ticker");var[Ns,Ps]=Ds(Is,Os,Ss,gs,fs,hs),[js,zs]=Ds($s,Ms,bs,ps,ds,us);function qs(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Rs(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ws(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Us(t){var e=t.dateTime,r=t.date,i=t.time,o=t.periods,a=t.days,s=t.shortDays,l=t.months,c=t.shortMonths,u=tl(o),h=el(o),d=tl(a),f=el(a),p=tl(s),m=el(s),g=tl(l),y=el(l),b=tl(c),_=el(c),x={a:O,A:$,b:I,B:D,c:null,d:vl,e:vl,f:Kl,g:Nl,G:jl,H:wl,I:kl,j:Tl,L:Sl,m:Al,M:Bl,p:N,q:P,Q:cc,s:uc,S:Fl,u:El,U:Ll,V:Ol,w:$l,W:Il,x:null,X:null,y:Dl,Y:Pl,Z:zl,"%":lc},C={a:j,A:z,b:q,B:R,c:null,d:ql,e:ql,f:Yl,g:ic,G:ac,H:Rl,I:Wl,j:Ul,L:Hl,m:Gl,M:Vl,p:W,q:U,Q:cc,s:uc,S:Jl,u:Xl,U:Zl,V:tc,w:ec,W:rc,x:null,X:null,y:nc,Y:oc,Z:sc,"%":lc},v={a:K,A,b:B,B:F,c:E,d:dl,e:dl,f:bl,g:ll,G:sl,H:pl,I:pl,j:fl,L:yl,m:hl,M:ml,p:S,q:ul,Q:xl,s:Cl,S:gl,u:nl,U:il,V:ol,w:rl,W:al,x:L,X:M,y:ll,Y:sl,Z:cl,"%":_l};function w(t,e){return function(r){var n,i,o,a=[],s=-1,l=0,c=t.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(n=Rs(Ws(o.y,0,1))).getUTCDay(),n=i>4||0===i?Ks.ceil(n):Ks(n),n=ms.offset(n,7*(o.V-1)),o.y=n.getUTCFullYear(),o.m=n.getUTCMonth(),o.d=n.getUTCDate()+(o.w+6)%7):(i=(n=qs(Ws(o.y,0,1))).getDay(),n=i>4||0===i?_s.ceil(n):_s(n),n=ps.offset(n,7*(o.V-1)),o.y=n.getFullYear(),o.m=n.getMonth(),o.d=n.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Rs(Ws(o.y,0,1)).getUTCDay():qs(Ws(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Rs(o)):qs(o)}}function T(t,e,r,n){for(var i,o,a=0,s=e.length,l=r.length;a=l)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=v[i in Gs?e.charAt(a++):i])||(n=o(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}function S(t,e,r){var n=u.exec(e.slice(r));return n?(t.p=h.get(n[0].toLowerCase()),r+n[0].length):-1}function K(t,e,r){var n=p.exec(e.slice(r));return n?(t.w=m.get(n[0].toLowerCase()),r+n[0].length):-1}function A(t,e,r){var n=d.exec(e.slice(r));return n?(t.w=f.get(n[0].toLowerCase()),r+n[0].length):-1}function B(t,e,r){var n=b.exec(e.slice(r));return n?(t.m=_.get(n[0].toLowerCase()),r+n[0].length):-1}function F(t,e,r){var n=g.exec(e.slice(r));return n?(t.m=y.get(n[0].toLowerCase()),r+n[0].length):-1}function E(t,r,n){return T(t,e,r,n)}function L(t,e,n){return T(t,r,e,n)}function M(t,e,r){return T(t,i,e,r)}function O(t){return s[t.getDay()]}function $(t){return a[t.getDay()]}function I(t){return c[t.getMonth()]}function D(t){return l[t.getMonth()]}function N(t){return o[+(t.getHours()>=12)]}function P(t){return 1+~~(t.getMonth()/3)}function j(t){return s[t.getUTCDay()]}function z(t){return a[t.getUTCDay()]}function q(t){return c[t.getUTCMonth()]}function R(t){return l[t.getUTCMonth()]}function W(t){return o[+(t.getUTCHours()>=12)]}function U(t){return 1+~~(t.getUTCMonth()/3)}return x.x=w(r,x),x.X=w(i,x),x.c=w(e,x),C.x=w(r,C),C.X=w(i,C),C.c=w(e,C),(0,n.K2)(w,"newFormat"),(0,n.K2)(k,"newParse"),(0,n.K2)(T,"parseSpecifier"),(0,n.K2)(S,"parsePeriod"),(0,n.K2)(K,"parseShortWeekday"),(0,n.K2)(A,"parseWeekday"),(0,n.K2)(B,"parseShortMonth"),(0,n.K2)(F,"parseMonth"),(0,n.K2)(E,"parseLocaleDateTime"),(0,n.K2)(L,"parseLocaleDate"),(0,n.K2)(M,"parseLocaleTime"),(0,n.K2)(O,"formatShortWeekday"),(0,n.K2)($,"formatWeekday"),(0,n.K2)(I,"formatShortMonth"),(0,n.K2)(D,"formatMonth"),(0,n.K2)(N,"formatPeriod"),(0,n.K2)(P,"formatQuarter"),(0,n.K2)(j,"formatUTCShortWeekday"),(0,n.K2)(z,"formatUTCWeekday"),(0,n.K2)(q,"formatUTCShortMonth"),(0,n.K2)(R,"formatUTCMonth"),(0,n.K2)(W,"formatUTCPeriod"),(0,n.K2)(U,"formatUTCQuarter"),{format:function(t){var e=w(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",C);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}(0,n.K2)(qs,"localDate"),(0,n.K2)(Rs,"utcDate"),(0,n.K2)(Ws,"newDate"),(0,n.K2)(Us,"formatLocale");var Hs,Ys,Gs={"-":"",_:" ",0:"0"},Vs=/^\s*\d+/,Js=/^%/,Xs=/[\\^$*+?|[\]().{}]/g;function Zs(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",o=i.length;return n+(o[t.toLowerCase(),e])))}function rl(t,e,r){var n=Vs.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function nl(t,e,r){var n=Vs.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function il(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function ol(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function al(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function sl(t,e,r){var n=Vs.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function ll(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function cl(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function ul(t,e,r){var n=Vs.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function hl(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function dl(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function fl(t,e,r){var n=Vs.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function pl(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function ml(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function gl(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function yl(t,e,r){var n=Vs.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function bl(t,e,r){var n=Vs.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function _l(t,e,r){var n=Js.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function xl(t,e,r){var n=Vs.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function Cl(t,e,r){var n=Vs.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function vl(t,e){return Zs(t.getDate(),e,2)}function wl(t,e){return Zs(t.getHours(),e,2)}function kl(t,e){return Zs(t.getHours()%12||12,e,2)}function Tl(t,e){return Zs(1+ps.count($s(t),t),e,3)}function Sl(t,e){return Zs(t.getMilliseconds(),e,3)}function Kl(t,e){return Sl(t,e)+"000"}function Al(t,e){return Zs(t.getMonth()+1,e,2)}function Bl(t,e){return Zs(t.getMinutes(),e,2)}function Fl(t,e){return Zs(t.getSeconds(),e,2)}function El(t){var e=t.getDay();return 0===e?7:e}function Ll(t,e){return Zs(bs.count($s(t)-1,t),e,2)}function Ml(t){var e=t.getDay();return e>=4||0===e?vs(t):vs.ceil(t)}function Ol(t,e){return t=Ml(t),Zs(vs.count($s(t),t)+(4===$s(t).getDay()),e,2)}function $l(t){return t.getDay()}function Il(t,e){return Zs(_s.count($s(t)-1,t),e,2)}function Dl(t,e){return Zs(t.getFullYear()%100,e,2)}function Nl(t,e){return Zs((t=Ml(t)).getFullYear()%100,e,2)}function Pl(t,e){return Zs(t.getFullYear()%1e4,e,4)}function jl(t,e){var r=t.getDay();return Zs((t=r>=4||0===r?vs(t):vs.ceil(t)).getFullYear()%1e4,e,4)}function zl(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Zs(e/60|0,"0",2)+Zs(e%60,"0",2)}function ql(t,e){return Zs(t.getUTCDate(),e,2)}function Rl(t,e){return Zs(t.getUTCHours(),e,2)}function Wl(t,e){return Zs(t.getUTCHours()%12||12,e,2)}function Ul(t,e){return Zs(1+ms.count(Is(t),t),e,3)}function Hl(t,e){return Zs(t.getUTCMilliseconds(),e,3)}function Yl(t,e){return Hl(t,e)+"000"}function Gl(t,e){return Zs(t.getUTCMonth()+1,e,2)}function Vl(t,e){return Zs(t.getUTCMinutes(),e,2)}function Jl(t,e){return Zs(t.getUTCSeconds(),e,2)}function Xl(t){var e=t.getUTCDay();return 0===e?7:e}function Zl(t,e){return Zs(Ss.count(Is(t)-1,t),e,2)}function Ql(t){var e=t.getUTCDay();return e>=4||0===e?Fs(t):Fs.ceil(t)}function tc(t,e){return t=Ql(t),Zs(Fs.count(Is(t),t)+(4===Is(t).getUTCDay()),e,2)}function ec(t){return t.getUTCDay()}function rc(t,e){return Zs(Ks.count(Is(t)-1,t),e,2)}function nc(t,e){return Zs(t.getUTCFullYear()%100,e,2)}function ic(t,e){return Zs((t=Ql(t)).getUTCFullYear()%100,e,2)}function oc(t,e){return Zs(t.getUTCFullYear()%1e4,e,4)}function ac(t,e){var r=t.getUTCDay();return Zs((t=r>=4||0===r?Fs(t):Fs.ceil(t)).getUTCFullYear()%1e4,e,4)}function sc(){return"+0000"}function lc(){return"%"}function cc(t){return+t}function uc(t){return Math.floor(+t/1e3)}function hc(t){return Hs=Us(t),Ys=Hs.format,Hs.parse,Hs.utcFormat,Hs.utcParse,Hs}function dc(t,e){var r,n=0,i=(t=t.slice()).length-1,o=t[n],a=t[i];return a1?0:t<-1?Bc:Math.acos(t)}function Mc(t){return t>=1?Fc:t<=-1?-Fc:Math.asin(t)}(0,n.K2)(Lc,"acos"),(0,n.K2)(Mc,"asin");var Oc=Math.PI,$c=2*Oc,Ic=1e-6,Dc=$c-Ic;function Nc(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Nc;const r=10**e;return function(t){this._+=t[0];for(let e=1,n=t.length;eIc)if(Math.abs(u*s-l*c)>Ic&&i){let d=r-o,f=n-a,p=s*s+l*l,m=d*d+f*f,g=Math.sqrt(p),y=Math.sqrt(h),b=i*Math.tan((Oc-Math.acos((p+h-m)/(2*g*y)))/2),_=b/y,x=b/g;Math.abs(_-1)>Ic&&this._append`L${t+_*c},${e+_*u}`,this._append`A${i},${i},0,0,${+(u*d>c*f)},${this._x1=t+x*s},${this._y1=e+x*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,r,n,i,o){if(t=+t,e=+e,o=!!o,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(n),s=r*Math.sin(n),l=t+a,c=e+s,u=1^o,h=o?n-i:i-n;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Ic||Math.abs(this._y1-c)>Ic)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%$c+$c),h>Dc?this._append`A${r},${r},0,1,${u},${t-a},${e-s}A${r},${r},0,1,${u},${this._x1=l},${this._y1=c}`:h>Ic&&this._append`A${r},${r},0,${+(h>=Oc)},${u},${this._x1=t+r*Math.cos(i)},${this._y1=e+r*Math.sin(i)}`)}rect(t,e,r,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}};function zc(){return new jc}function qc(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new jc(e)}function Rc(t){return t.innerRadius}function Wc(t){return t.outerRadius}function Uc(t){return t.startAngle}function Hc(t){return t.endAngle}function Yc(t){return t&&t.padAngle}function Gc(t,e,r,n,i,o,a,s){var l=r-t,c=n-e,u=a-i,h=s-o,d=h*l-u*c;if(!(d*dF*F+E*E&&(k=S,T=K),{cx:k,cy:T,x01:-u,y01:-h,x11:k*(i/C-1),y11:T*(i/C-1)}}function Jc(){var t=Rc,e=Wc,r=xc(0),i=null,o=Uc,a=Hc,s=Yc,l=null,c=qc(u);function u(){var n,u,h=+t.apply(this,arguments),d=+e.apply(this,arguments),f=o.apply(this,arguments)-Fc,p=a.apply(this,arguments)-Fc,m=Cc(p-f),g=p>f;if(l||(l=n=c()),dAc)if(m>Ec-Ac)l.moveTo(d*wc(f),d*Sc(f)),l.arc(0,0,d,f,p,!g),h>Ac&&(l.moveTo(h*wc(p),h*Sc(p)),l.arc(0,0,h,p,f,g));else{var y,b,_=f,x=p,C=f,v=p,w=m,k=m,T=s.apply(this,arguments)/2,S=T>Ac&&(i?+i.apply(this,arguments):Kc(h*h+d*d)),K=Tc(Cc(d-h)/2,+r.apply(this,arguments)),A=K,B=K;if(S>Ac){var F=Mc(S/h*Sc(T)),E=Mc(S/d*Sc(T));(w-=2*F)>Ac?(C+=F*=g?1:-1,v-=F):(w=0,C=v=(f+p)/2),(k-=2*E)>Ac?(_+=E*=g?1:-1,x-=E):(k=0,_=x=(f+p)/2)}var L=d*wc(_),M=d*Sc(_),O=h*wc(v),$=h*Sc(v);if(K>Ac){var I,D=d*wc(x),N=d*Sc(x),P=h*wc(C),j=h*Sc(C);if(mAc?B>Ac?(y=Vc(P,j,L,M,d,B,g),b=Vc(D,N,O,$,d,B,g),l.moveTo(y.cx+y.x01,y.cy+y.y01),BAc&&w>Ac?A>Ac?(y=Vc(O,$,D,N,h,-A,g),b=Vc(L,M,P,j,h,-A,g),l.lineTo(y.cx+y.x01,y.cy+y.y01),At?1:e>=t?0:NaN}function iu(t){return t}function ou(){var t=iu,e=nu,r=null,i=xc(0),o=xc(Ec),a=xc(0);function s(n){var s,l,c,u,h,d=(n=Qc(n)).length,f=0,p=new Array(d),m=new Array(d),g=+i.apply(this,arguments),y=Math.min(Ec,Math.max(-Ec,o.apply(this,arguments)-g)),b=Math.min(Math.abs(y)/d,a.apply(this,arguments)),_=b*(y<0?-1:1);for(s=0;s0&&(f+=h);for(null!=e?p.sort((function(t,r){return e(m[t],m[r])})):null!=r&&p.sort((function(t,e){return r(n[t],n[e])})),s=0,c=f?(y-d*_)/f:0;s0?h*c:0)+_,m[l]={data:n[l],index:s,value:h,startAngle:g,endAngle:u,padAngle:b};return m}return(0,n.K2)(s,"pie"),s.value=function(e){return arguments.length?(t="function"==typeof e?e:xc(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,r=null,s):e},s.sort=function(t){return arguments.length?(r=t,e=null,s):r},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:xc(+t),s):i},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:xc(+t),s):o},s.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:xc(+t),s):a},s}(0,n.K2)(zc,"path"),zc.prototype=jc.prototype,(0,n.K2)(qc,"withPath"),(0,n.K2)(Rc,"arcInnerRadius"),(0,n.K2)(Wc,"arcOuterRadius"),(0,n.K2)(Uc,"arcStartAngle"),(0,n.K2)(Hc,"arcEndAngle"),(0,n.K2)(Yc,"arcPadAngle"),(0,n.K2)(Gc,"intersect"),(0,n.K2)(Vc,"cornerTangents"),(0,n.K2)(Jc,"default"),(0,n.K2)(Xc,"Linear"),Xc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&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)}}},(0,n.K2)(Zc,"default"),Array.prototype.slice,(0,n.K2)(Qc,"default"),(0,n.K2)(tu,"x"),(0,n.K2)(eu,"y"),(0,n.K2)(ru,"default"),(0,n.K2)(nu,"default"),(0,n.K2)(iu,"default"),(0,n.K2)(ou,"default");var au=class{static{(0,n.K2)(this,"Bump")}constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(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._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}};function su(t){return new au(t,!0)}function lu(t){return new au(t,!1)}function cu(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 uu(t){this._context=t}function hu(t){return new uu(t)}function du(){}function fu(t){this._context=t}function pu(t){return new fu(t)}function mu(t){this._context=t}function gu(t){return new mu(t)}function yu(t,e){this._basis=new uu(t),this._beta=e}(0,n.K2)(su,"bumpX"),(0,n.K2)(lu,"bumpY"),(0,n.K2)(cu,"point"),(0,n.K2)(uu,"Basis"),uu.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:cu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:cu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},(0,n.K2)(hu,"default"),(0,n.K2)(du,"default"),(0,n.K2)(fu,"BasisClosed"),fu.prototype={areaStart:du,areaEnd:du,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)}},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:cu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},(0,n.K2)(pu,"default"),(0,n.K2)(mu,"BasisOpen"),mu.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||0!==this._line&&3===this._point)&&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,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:cu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},(0,n.K2)(gu,"default"),(0,n.K2)(yu,"Bundle"),yu.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 n,i=t[0],o=e[0],a=t[r]-i,s=e[r]-o,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*a),this._beta*e[l]+(1-this._beta)*(o+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var bu=(0,n.K2)((function t(e){function r(t){return 1===e?new uu(t):new yu(t,e)}return(0,n.K2)(r,"bundle"),r.beta=function(e){return t(+e)},r}),"custom")(.85);function _u(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 xu(t,e){this._context=t,this._k=(1-e)/6}(0,n.K2)(_u,"point"),(0,n.K2)(xu,"Cardinal"),xu.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:_u(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:_u(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Cu=(0,n.K2)((function t(e){function r(t){return new xu(t,e)}return(0,n.K2)(r,"cardinal"),r.tension=function(e){return t(+e)},r}),"custom")(0);function vu(t,e){this._context=t,this._k=(1-e)/6}(0,n.K2)(vu,"CardinalClosed"),vu.prototype={areaStart:du,areaEnd:du,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)}},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:_u(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var wu=(0,n.K2)((function t(e){function r(t){return new vu(t,e)}return(0,n.K2)(r,"cardinal"),r.tension=function(e){return t(+e)},r}),"custom")(0);function ku(t,e){this._context=t,this._k=(1-e)/6}(0,n.K2)(ku,"CardinalOpen"),ku.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||0!==this._line&&3===this._point)&&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:_u(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Tu=(0,n.K2)((function t(e){function r(t){return new ku(t,e)}return(0,n.K2)(r,"cardinal"),r.tension=function(e){return t(+e)},r}),"custom")(0);function Su(t,e,r){var n=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Ac){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);n=(n*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Ac){var c=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);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/u,a=(a*c+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(n,i,o,a,t._x2,t._y2)}function Ku(t,e){this._context=t,this._alpha=e}(0,n.K2)(Su,"point"),(0,n.K2)(Ku,"CatmullRom"),Ku.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:Su(this,t,e)}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}};var Au=(0,n.K2)((function t(e){function r(t){return e?new Ku(t,e):new xu(t,0)}return(0,n.K2)(r,"catmullRom"),r.alpha=function(e){return t(+e)},r}),"custom")(.5);function Bu(t,e){this._context=t,this._alpha=e}(0,n.K2)(Bu,"CatmullRomClosed"),Bu.prototype={areaStart:du,areaEnd:du,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)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:Su(this,t,e)}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}};var Fu=(0,n.K2)((function t(e){function r(t){return e?new Bu(t,e):new vu(t,0)}return(0,n.K2)(r,"catmullRom"),r.alpha=function(e){return t(+e)},r}),"custom")(.5);function Eu(t,e){this._context=t,this._alpha=e}(0,n.K2)(Eu,"CatmullRomOpen"),Eu.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:Su(this,t,e)}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}};var Lu=(0,n.K2)((function t(e){function r(t){return e?new Eu(t,e):new ku(t,0)}return(0,n.K2)(r,"catmullRom"),r.alpha=function(e){return t(+e)},r}),"custom")(.5);function Mu(t){this._context=t}function Ou(t){return new Mu(t)}function $u(t){return t<0?-1:1}function Iu(t,e,r){var n=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(n||i<0&&-0),a=(r-t._y1)/(i||n<0&&-0),s=(o*i+a*n)/(n+i);return($u(o)+$u(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Du(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Nu(t,e,r){var n=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-n)/3;t._context.bezierCurveTo(n+s,i+s*e,o-s,a-s*r,o,a)}function Pu(t){this._context=t}function ju(t){this._context=new zu(t)}function zu(t){this._context=t}function qu(t){return new Pu(t)}function Ru(t){return new ju(t)}function Wu(t){this._context=t}function Uu(t){var e,r,n=t.length-1,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e=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)}}this._x=t,this._y=e}},(0,n.K2)(Gu,"default"),(0,n.K2)(Vu,"stepBefore"),(0,n.K2)(Ju,"stepAfter");var Xu={value:()=>{}};function Zu(){for(var t,e=0,r=arguments.length,n={};e=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}}))}function eh(t,e){for(var r,n=0,i=t.length;n0)for(var r,n,i=new Array(r),o=0;o=0&&e._call.call(void 0,t),e=e._next;--ah}function xh(){hh=(uh=fh.now())+dh,ah=sh=0;try{_h()}finally{ah=0,vh(),hh=0}}function Ch(){var t=fh.now(),e=t-uh;e>ch&&(dh-=e,uh=t)}function vh(){for(var t,e,r=nh,n=1/0;r;)r._call?(n>r._time&&(n=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:nh=e);ih=t,wh(n)}function wh(t){ah||(sh&&(sh=clearTimeout(sh)),t-hh>24?(t<1/0&&(sh=setTimeout(xh,t-fh.now()-dh)),lh&&(lh=clearInterval(lh))):(lh||(uh=fh.now(),lh=setInterval(Ch,ch)),ah=1,ph(xh)))}function kh(t,e,r){var n=new yh;return e=null==e?0:+e,n.restart((r=>{n.stop(),t(r+e)}),e,r),n}(0,n.K2)(mh,"now"),(0,n.K2)(gh,"clearNow"),(0,n.K2)(yh,"Timer"),yh.prototype=bh.prototype={constructor:yh,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?mh():+r)+(null==e?0:+e),this._next||ih===this||(ih?ih._next=this:nh=this,ih=this),this._call=t,this._time=r,wh()},stop:function(){this._call&&(this._call=null,this._time=1/0,wh())}},(0,n.K2)(bh,"timer"),(0,n.K2)(_h,"timerFlush"),(0,n.K2)(xh,"wake"),(0,n.K2)(Ch,"poke"),(0,n.K2)(vh,"nap"),(0,n.K2)(wh,"sleep"),(0,n.K2)(kh,"default");var Th=oh("start","end","cancel","interrupt"),Sh=[],Kh=0,Ah=1,Bh=2,Fh=3,Eh=4,Lh=5,Mh=6;function Oh(t,e,r,n,i,o){var a=t.__transition;if(a){if(r in a)return}else t.__transition={};Nh(t,r,{name:e,index:n,group:i,on:Th,tween:Sh,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Kh})}function $h(t,e){var r=Dh(t,e);if(r.state>Kh)throw new Error("too late; already scheduled");return r}function Ih(t,e){var r=Dh(t,e);if(r.state>Fh)throw new Error("too late; already running");return r}function Dh(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Nh(t,e,r){var i,o=t.__transition;function a(t){r.state=Ah,r.timer.restart(s,r.delay,r.time),r.delay<=t&&s(t-r.delay)}function s(n){var a,u,h,d;if(r.state!==Ah)return c();for(a in o)if((d=o[a]).name===r.name){if(d.state===Fh)return kh(s);d.state===Eh?(d.state=Mh,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete o[a]):+aBh&&r.state=0&&(t=t.slice(0,e)),!t||"start"===t}))}function yd(t,e,r){var n,i,o=gd(e)?$h:Ih;return function(){var a=o(this,t),s=a.on;s!==n&&(i=(n=s).copy()).on(e,r),a.on=i}}function bd(t,e){var r=this._id;return arguments.length<2?Dh(this.node(),r).on.on(t):this.each(yd(r,t,e))}function _d(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function xd(){return this.on("end.remove",_d(this._id))}function Cd(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=wr(t));for(var n=this._groups,i=n.length,o=new Array(i),a=0;anf(e,r).then((e=>(new DOMParser).parseFromString(e,t)))}(0,n.K2)(tf,"number1"),(0,n.K2)((function(t){return[tf(t[0]),tf(t[1])]}),"number2"),["w","e"].map(ef),["n","s"].map(ef),["n","w","e","s","nw","ne","sw","se"].map(ef),(0,n.K2)(ef,"type"),(0,n.K2)(rf,"responseText"),(0,n.K2)(nf,"default"),(0,n.K2)(of,"parser"),of("application/xml"),of("text/html");var af=of("image/svg+xml");function sf(t,e,r){this.k=t,this.x=e,this.y=r}(0,n.K2)(sf,"Transform"),sf.prototype={constructor:sf,scale:function(t){return 1===t?this:new sf(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new sf(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+")"}};var lf=new sf(1,0,0);function cf(t){for(;!t.__zoom;)if(!(t=t.parentNode))return lf;return t.__zoom}cf.prototype=sf.prototype,(0,n.K2)(cf,"transform")},5070:(t,e,r)=>{"use strict";r.d(e,{F:()=>o});var n=r(6009),i=(0,n.P$)({"../../node_modules/.pnpm/@braintree+sanitize-url@7.0.1/node_modules/@braintree/sanitize-url/dist/constants.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.BLANK_URL=t.relativeFirstCharacters=t.urlSchemeRegex=t.ctrlCharactersRegex=t.htmlCtrlEntityRegex=t.htmlEntitiesRegex=t.invalidProtocolRegex=void 0,t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,t.htmlCtrlEntityRegex=/&(newline|tab);/gi,t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,t.urlSchemeRegex=/^.+(:|:)/gim,t.relativeFirstCharacters=[".","/"],t.BLANK_URL="about:blank"}}),o=(0,n.P$)({"../../node_modules/.pnpm/@braintree+sanitize-url@7.0.1/node_modules/@braintree/sanitize-url/dist/index.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=void 0;var e=i();function r(t){return e.relativeFirstCharacters.indexOf(t[0])>-1}function o(t){return t.replace(e.ctrlCharactersRegex,"").replace(e.htmlEntitiesRegex,(function(t,e){return String.fromCharCode(e)}))}function a(t){if(!t)return e.BLANK_URL;var n,i=t;do{n=(i=o(i).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").trim()).match(e.ctrlCharactersRegex)||i.match(e.htmlEntitiesRegex)||i.match(e.htmlCtrlEntityRegex)}while(n&&n.length>0);var a=i;if(!a)return e.BLANK_URL;if(r(a))return a;var s=a.match(e.urlSchemeRegex);if(!s)return a;var l=s[0];return e.invalidProtocolRegex.test(l)?e.BLANK_URL:a}(0,n.K2)(r,"isRelativeUrlWithoutProtocol"),(0,n.K2)(o,"decodeHtmlCharacters"),(0,n.K2)(a,"sanitizeUrl"),t.sanitizeUrl=a}})},6009:(t,e,r)=>{"use strict";r.d(e,{K2:()=>c,P$:()=>u,VA:()=>h,f1:()=>p,ie:()=>f});var n=Object.create,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(t,e)=>i(t,"name",{value:e,configurable:!0}),u=(t,e)=>function(){return e||(0,t[a(t)[0]])((e={exports:{}}).exports,e),e.exports},h=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},d=(t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let s of a(e))l.call(t,s)||s===r||i(t,s,{get:()=>e[s],enumerable:!(n=o(e,s))||n.enumerable});return t},f=(t,e,r)=>(d(t,e,"default"),r&&d(r,e,"default")),p=(t,e,r)=>(r=null!=t?n(s(t)):{},d(!e&&t&&t.__esModule?r:i(r,"default",{value:t,enumerable:!0}),t))},57:(t,e,r)=>{"use strict";r.d(e,{$C:()=>K,$t:()=>R,C4:()=>U,I5:()=>q,Ib:()=>m,Sm:()=>H,Un:()=>$,_K:()=>W,bH:()=>L,dq:()=>j,pe:()=>l,rY:()=>Y,ru:()=>O,sM:()=>T,vU:()=>f,yT:()=>B});var n=r(5070),i=r(772),o=r(8605),a=r(6009),s=(0,a.f1)((0,n.F)(),1),l="​",c={curveBasis:i.J1,curveBasisClosed:i.h$,curveBasisOpen:i.Bp,curveBumpX:i.dJ,curveBumpY:i.kl,curveBundle:i.D6,curveCardinalClosed:i.jU,curveCardinalOpen:i.Jj,curveCardinal:i.Jp,curveCatmullRomClosed:i.J9,curveCatmullRomOpen:i.Jl,curveCatmullRom:i.NN,curveLinear:i.AS,curveLinearClosed:i.yF,curveMonotoneX:i.Gh,curveMonotoneY:i.Nk,curveNatural:i.Y7,curveStep:i.z1,curveStepAfter:i.Ps,curveStepBefore:i.Ko},u=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,h=(0,a.K2)((function(t,e){const r=d(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const t=r.map((t=>t.args));(0,i.$i)(t),n=(0,i.hH)(n,[...t])}else n=r.args;if(!n)return;let o=(0,i.Ch)(t,e);const a="config";return void 0!==n[a]&&("flowchart-v2"===o&&(o="flowchart"),n[o]=n[a],delete n[a]),n}),"detectInit"),d=(0,a.K2)((function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${u.source})(?=[}][%]{2}).*\n`,"ig");let n;t=t.trim().replace(r,"").replace(/'/gm,'"'),i.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(n=i.DB.exec(t));)if(n.index===i.DB.lastIndex&&i.DB.lastIndex++,n&&!e||e&&n[1]&&n[1].match(e)||e&&n[2]&&n[2].match(e)){const t=n[1]?n[1]:n[2],e=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(r){return i.Rm.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}}),"detectDirective"),f=(0,a.K2)((function(t){return t.replace(i.DB,"")}),"removeDirectives"),p=(0,a.K2)((function(t,e){for(const[r,n]of e.entries())if(n.match(t))return r;return-1}),"isSubstringInArray");function m(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return c[r]??e}function g(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,s.sanitizeUrl)(r):r}(0,a.K2)(m,"interpolateToCurve"),(0,a.K2)(g,"formatUrl");var y=(0,a.K2)(((t,...e)=>{const r=t.split("."),n=r.length-1,o=r[n];let a=window;for(let e=0;e{r+=b(t,e),e=t})),v(t,r/2)}function x(t){return 1===t.length?t[0]:_(t)}(0,a.K2)(b,"distance"),(0,a.K2)(_,"traverseEdge"),(0,a.K2)(x,"calcLabelPosition");var C=(0,a.K2)(((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r}),"roundNumber"),v=(0,a.K2)(((t,e)=>{let r,n=e;for(const e of t){if(r){const t=b(e,r);if(t=1)return{x:e.x,y:e.y};if(i>0&&i<1)return{x:C((1-i)*r.x+i*e.x,5),y:C((1-i)*r.y+i*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")}),"calculatePoint"),w=(0,a.K2)(((t,e,r)=>{i.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const n=v(e,25),o=t?10:5,a=Math.atan2(e[0].y-n.y,e[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(a)*o+(e[0].x+n.x)/2,s.y=-Math.cos(a)*o+(e[0].y+n.y)/2,s}),"calcCardinalityPosition");function k(t,e,r){const n=structuredClone(r);i.Rm.info("our points",n),"start_left"!==e&&"start_right"!==e&&n.reverse();const o=v(n,25+t),a=10+.5*t,s=Math.atan2(n[0].y-o.y,n[0].x-o.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*a+(n[0].x+o.x)/2,l.y=-Math.cos(s+Math.PI)*a+(n[0].y+o.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*a+(n[0].x+o.x)/2-5,l.y=-Math.cos(s-Math.PI)*a+(n[0].y+o.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*a+(n[0].x+o.x)/2-5,l.y=-Math.cos(s)*a+(n[0].y+o.y)/2-5):(l.x=Math.sin(s)*a+(n[0].x+o.x)/2,l.y=-Math.cos(s)*a+(n[0].y+o.y)/2),l}function T(t){let e="",r="";for(const n of t)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}(0,a.K2)(k,"calcTerminalLabelPosition"),(0,a.K2)(T,"getStylesFromArray");var S=0,K=(0,a.K2)((()=>(S++,"id-"+Math.random().toString(36).substr(2,12)+"-"+S)),"generateId");function A(t){let e="";for(let r=0;rA(t.length)),"random"),F=(0,a.K2)((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:""}}),"getTextObj"),E=(0,a.K2)((function(t,e){const r=e.text.replace(i.Y2.lineBreakRegex," "),[,n]=q(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",n),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),void 0!==e.class&&o.attr("class",e.class);const a=o.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.attr("fill",e.fill),a.text(r),o}),"drawSimpleText"),L=(0,o.Dr)(((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),i.Y2.lineBreakRegex.test(t))return t;const n=t.split(" "),o=[];let a="";return n.forEach(((t,i)=>{const s=$(`${t} `,r),l=$(a,r);if(s>e){const{hyphenatedStrings:n,remainingWord:i}=M(t,e,"-",r);o.push(a,...n),a=i}else l+s>=e?(o.push(a),a=t):a=[a,t].filter(Boolean).join(" ");i+1===n.length&&o.push(a)})),o.filter((t=>""!==t)).join(r.joinWith)}),((t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`)),M=(0,o.Dr)(((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...t],o=[];let a="";return i.forEach(((t,s)=>{const l=`${a}${t}`;if($(l,n)>=e){const t=s+1,e=i.length===t,n=`${l}${r}`;o.push(e?l:n),a=""}else a=l})),{hyphenatedStrings:o,remainingWord:a}}),((t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`));function O(t,e){return D(t,e).height}function $(t,e){return D(t,e).width}(0,a.K2)(O,"calculateTextHeight"),(0,a.K2)($,"calculateTextWidth");var I,D=(0,o.Dr)(((t,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:o=400}=e;if(!t)return{width:0,height:0};const[,a]=q(r),s=["sans-serif",n],c=t.split(i.Y2.lineBreakRegex),u=[],h=(0,i.df)("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const d=h.append("svg");for(const t of s){let e=0;const r={width:0,height:0,lineHeight:0};for(const n of c){const i=F();i.text=n||l;const s=E(d,i).style("font-size",a).style("font-weight",o).style("font-family",t),c=(s._groups||s)[0][0].getBBox();if(0===c.width&&0===c.height)throw new Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,c.width)),e=Math.round(c.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}u.push(r)}return d.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`)),N=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,a.K2)(this,"InitIDGenerator")}},P=(0,a.K2)((function(t){return I=I||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),I.innerHTML=t,unescape(I.textContent)}),"entityDecode");function j(t){return"str"in t}(0,a.K2)(j,"isDetailedError");var z=(0,a.K2)(((t,e,r,n)=>{if(!n)return;const i=t.node()?.getBBox();i&&t.append("text").text(n).attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)}),"insertTitle"),q=(0,a.K2)((t=>{if("number"==typeof t)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]}),"parseFontSize");function R(t,e){return(0,o.ds)({},t,e)}(0,a.K2)(R,"cleanAndMerge");var W={assignWithDepth:i.hH,wrapLabel:L,calculateTextHeight:O,calculateTextWidth:$,calculateTextDimensions:D,cleanAndMerge:R,detectInit:h,detectDirective:d,isSubstringInArray:p,interpolateToCurve:m,calcLabelPosition:x,calcCardinalityPosition:w,calcTerminalLabelPosition:k,formatUrl:g,getStylesFromArray:T,generateId:K,random:B,runFunc:y,entityDecode:P,insertTitle:z,parseFontSize:q,InitIDGenerator:N},U=(0,a.K2)((function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})),e}),"encodeEntities"),H=(0,a.K2)((function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")}),"decodeEntities"),Y=(0,a.K2)(((t,e,{counter:r=0,prefix:n,suffix:i})=>`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`),"getEdgeId")},8605:(t,e,r)=>{"use strict";r.d(e,{$q:()=>E,A$:()=>ee,A6:()=>rr,Bx:()=>Fe,DA:()=>a,Dr:()=>jt,EE:()=>de,FX:()=>Gr,GT:()=>_,HI:()=>Se,JH:()=>br,KO:()=>rn,M$:()=>Re,NJ:()=>Ar,NY:()=>Ve,Nc:()=>we,Ni:()=>Ae,On:()=>R,T1:()=>ge,Th:()=>Ie,To:()=>ve,Wg:()=>$r,Yi:()=>on,_$:()=>he,_i:()=>De,aB:()=>fr,bT:()=>sr,bt:()=>Rr,dZ:()=>hr,ds:()=>ln,ii:()=>C,jL:()=>tn,jk:()=>s,l1:()=>Pe,l7:()=>pe,lI:()=>Zt,lr:()=>ze,nD:()=>sn,nJ:()=>oe,nO:()=>be,pI:()=>lt,pP:()=>Nt,pp:()=>Jr,uQ:()=>Tr,vX:()=>xr,zI:()=>vt,zw:()=>k});var n=r(6009),i="object"==typeof global&&global&&global.Object===Object&&global,o="object"==typeof self&&self&&self.Object===Object&&self,a=i||o||Function("return this")(),s=a.Symbol,l=Object.prototype,c=l.hasOwnProperty,u=l.toString,h=s?s.toStringTag:void 0;function d(t){var e=c.call(t,h),r=t[h];try{t[h]=void 0;var n=!0}catch(t){}var i=u.call(t);return n&&(e?t[h]=r:delete t[h]),i}(0,n.K2)(d,"getRawTag");var f=d,p=Object.prototype.toString;function m(t){return p.call(t)}(0,n.K2)(m,"objectToString");var g=m,y=s?s.toStringTag:void 0;function b(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":y&&y in Object(t)?f(t):g(t)}(0,n.K2)(b,"baseGetTag");var _=b;function x(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}(0,n.K2)(x,"isObject");var C=x;function v(t){if(!C(t))return!1;var e=_(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}(0,n.K2)(v,"isFunction");var w,k=v,T=a["__core-js_shared__"],S=(w=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"";function K(t){return!!S&&S in t}(0,n.K2)(K,"isMasked");var A=K,B=Function.prototype.toString;function F(t){if(null!=t){try{return B.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(0,n.K2)(F,"toSource");var E=F,L=/^\[object .+?Constructor\]$/,M=Function.prototype,O=Object.prototype,$=M.toString,I=O.hasOwnProperty,D=RegExp("^"+$.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function N(t){return!(!C(t)||A(t))&&(k(t)?D:L).test(E(t))}(0,n.K2)(N,"baseIsNative");var P=N;function j(t,e){return null==t?void 0:t[e]}(0,n.K2)(j,"getValue");var z=j;function q(t,e){var r=z(t,e);return P(r)?r:void 0}(0,n.K2)(q,"getNative");var R=q,W=R(Object,"create");function U(){this.__data__=W?W(null):{},this.size=0}(0,n.K2)(U,"hashClear");var H=U;function Y(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}(0,n.K2)(Y,"hashDelete");var G=Y,V=Object.prototype.hasOwnProperty;function J(t){var e=this.__data__;if(W){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return V.call(e,t)?e[t]:void 0}(0,n.K2)(J,"hashGet");var X=J,Z=Object.prototype.hasOwnProperty;function Q(t){var e=this.__data__;return W?void 0!==e[t]:Z.call(e,t)}(0,n.K2)(Q,"hashHas");var tt=Q;function et(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=W&&void 0===e?"__lodash_hash_undefined__":e,this}(0,n.K2)(et,"hashSet");var rt=et;function nt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1}(0,n.K2)(gt,"listCacheHas");var yt=gt;function bt(t,e){var r=this.__data__,n=ut(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}(0,n.K2)(bt,"listCacheSet");var _t=bt;function xt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=9007199254740991}(0,n.K2)(Ne,"isLength");var Pe=Ne;function je(t){return null!=t&&Pe(t.length)&&!k(t)}(0,n.K2)(je,"isArrayLike");var ze=je;function qe(t){return Fe(t)&&ze(t)}(0,n.K2)(qe,"isArrayLikeObject");var Re=qe;function We(){return!1}(0,n.K2)(We,"stubFalse");var Ue=We,He="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ye=He&&"object"==typeof module&&module&&!module.nodeType&&module,Ge=Ye&&Ye.exports===He?a.Buffer:void 0,Ve=(Ge?Ge.isBuffer:void 0)||Ue,Je=Function.prototype,Xe=Object.prototype,Ze=Je.toString,Qe=Xe.hasOwnProperty,tr=Ze.call(Object);function er(t){if(!Fe(t)||"[object Object]"!=_(t))return!1;var e=we(t);if(null===e)return!0;var r=Qe.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Ze.call(r)==tr}(0,n.K2)(er,"isPlainObject");var rr=er,nr={};function ir(t){return Fe(t)&&Pe(t.length)&&!!nr[_(t)]}nr["[object Float32Array]"]=nr["[object Float64Array]"]=nr["[object Int8Array]"]=nr["[object Int16Array]"]=nr["[object Int32Array]"]=nr["[object Uint8Array]"]=nr["[object Uint8ClampedArray]"]=nr["[object Uint16Array]"]=nr["[object Uint32Array]"]=!0,nr["[object Arguments]"]=nr["[object Array]"]=nr["[object ArrayBuffer]"]=nr["[object Boolean]"]=nr["[object DataView]"]=nr["[object Date]"]=nr["[object Error]"]=nr["[object Function]"]=nr["[object Map]"]=nr["[object Number]"]=nr["[object Object]"]=nr["[object RegExp]"]=nr["[object Set]"]=nr["[object String]"]=nr["[object WeakMap]"]=!1,(0,n.K2)(ir,"baseIsTypedArray");var or=ir;function ar(t){return function(e){return t(e)}}(0,n.K2)(ar,"baseUnary");var sr=ar,lr="object"==typeof exports&&exports&&!exports.nodeType&&exports,cr=lr&&"object"==typeof module&&module&&!module.nodeType&&module,ur=cr&&cr.exports===lr&&i.process,hr=function(){try{return cr&&cr.require&&cr.require("util").types||ur&&ur.binding&&ur.binding("util")}catch(t){}}(),dr=hr&&hr.isTypedArray,fr=dr?sr(dr):or;function pr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}(0,n.K2)(pr,"safeGet");var mr=pr,gr=Object.prototype.hasOwnProperty;function yr(t,e,r){var n=t[e];gr.call(t,e)&<(n,r)&&(void 0!==r||e in t)||ee(t,e,r)}(0,n.K2)(yr,"assignValue");var br=yr;function _r(t,e,r,n){var i=!r;r||(r={});for(var o=-1,a=e.length;++o-1&&t%1==0&&t0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(0,n.K2)(Qr,"shortOut");var tn=Qr(Xr);function en(t,e){return tn(Gr(t,e,Rr),t+"")}(0,n.K2)(en,"baseRest");var rn=en;function nn(t,e,r){if(!C(r))return!1;var n=typeof e;return!!("number"==n?ze(r)&&Tr(e,r.length):"string"==n&&e in r)&<(r[e],t)}(0,n.K2)(nn,"isIterateeCall");var on=nn;function an(t){return rn((function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&on(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++n{"use strict";r.d(e,{r:()=>n});var n="11.0.0-alpha.7"},7484:(t,e,r)=>{"use strict";r.d(e,{n:()=>o});var n=r(1098),i=r(3026);function o(t){const e=new n.Parser(n.Grammar.fromCompiled(i));return e.feed(t),e.results[0]}}},t=>{t.O(0,[4770],(()=>t(t.s=6897))),t.O()}]); \ No newline at end of file +(self.webpackChunkonsenui_v2_react_minimum=self.webpackChunkonsenui_v2_react_minimum||[]).push([[3524],{3895:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function findLastDrawCoveringIndex(t,e){var r=t.draw,n=null;if(!r)return console.log("draw command is null!"),null;for(var i=0;i=o.start&&e<=o.end&&(n=r[i])}return n}function evaluateExpression(string1,string2,number){var replacedString=string1.replace(new RegExp(string2,"g"),number);return eval(replacedString)}function findComponentIdxByName(t,e){for(var r=t.data,n=0;nevaluateExpression,el:()=>findComponentIdxByName,rO:()=>findLastDrawCoveringIndex})},6897:(t,e,r)=>{"use strict";var n=r(758),i=r(9576),o=r(9673),a=r(1393),s=r(972),l={palette:{mode:"dark",primary:{main:"#90caf9"},secondary:{main:"#f48fb1"}},components:{MuiAccordion:{defaultProps:{square:!0,TransitionProps:{unmountOnExit:!0}},styleOverrides:{root:{border:"1px solid rgba(255, 255, 255, .125)",boxShadow:"none",transition:(0,s.A)().transitions.create("margin-left"),"&:not(:last-child)":{borderBottom:0},"&:before":{display:"none"},"&.Mui-expanded":{margin:"auto"},"&.Mui-disabled":{marginLeft:32}}}},MuiAccordionSummary:{styleOverrides:{root:{borderBottom:"1px solid rgba(255, 255, 255, .125)",minHeight:56,"&.Mui-expanded":{minHeight:56}},content:{alignItems:"center",justifyContent:"space-between","&.Mui-expanded":{margin:"12px 0"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:"#212121"}}},MuiDrawer:{styleOverrides:{docked:{"& .MuiPaper-root":{position:"static"}},paper:{}}},MuiPopover:{styleOverrides:{paper:{backgroundColor:"#121212"}}},MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{borderLeft:"2px solid #3399ff",color:"#66b3ff",backgroundColor:"#1d2126"}}}}},typography:{fontSize:14}};const c=(0,s.A)(l);var u=r(5686),h=r(1191),d=r(3989),f=r(7749),p=r(4805),m=r(1891),g=r(3325),y=r(7230),b=r(9634);function _(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return x(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0?r.map((function(t,e){return n.createElement(p.A,{key:t.timestamp,selected:a===e,onClick:function(){i(t),s(e)}},n.createElement(m.A,{sx:{pl:2}},new Date(t.timestamp).toLocaleString()))})):n.createElement(m.A,{sx:{pl:2}},"No saved diagrams")))))};var v=r(1275);function w(t){t.languages.register({id:"customLang"});var e=new RegExp("\\b(".concat(["page","show","visslides","data","draw"].join("|"),")\\b")),r=[":",":=","=","*",",","@","&","(",")","[","]","{","}"].map((function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})),n=new RegExp("(".concat(r.join("|"),")"),"g"),i=new RegExp("\\b(".concat(["array","matrix","linkedlist","stack","tree","graph","text"].join("|"),")\\b")),o=new RegExp("\\b(".concat(["id","value","color","arrow","hidden","structure"].join("|"),")\\b"));t.languages.setMonarchTokensProvider("customLang",{tokenizer:{root:[[/\[error\].*/,"custom-error"],[/\[warning\].*/,"custom-warning"],[/\[info\].*/,"custom-info"],[/\[debug\].*/,"custom-debug"],[/\b(digit|number)\b/,"custom-number"],[/\/\/.*$/,"comment"],[/$[ \t]*.*/,"inlinecomment"],[e,"keyword"],[i,"component"],[o,"attribute"],[/\b[a-zA-Z_][a-zA-Z0-9_]*\b/,"variable"],[/\b\d+(\.\d+)?\b/,"number"],[n,"symbol"]]}}),t.editor.defineTheme("customTheme",{base:"vs-dark",inherit:!0,rules:[{token:"custom-error",foreground:"ff0000",fontStyle:"bold"},{token:"custom-warning",foreground:"FFA500",fontStyle:"italic"},{token:"custom-info",foreground:"0000ff"},{token:"custom-debug",foreground:"008800"},{token:"custom-number",foreground:"800080"},{token:"comment",foreground:"6a9955"},{token:"inlinecomment",foreground:"6a9955"},{token:"variable",foreground:"dcdcaa"},{token:"number",foreground:"b5cea8"},{token:"keyword",foreground:"569cd6"},{token:"symbol",foreground:"ffcc00"},{token:"component",foreground:"4ec9b0"},{token:"attribute",foreground:"d19a66"}],colors:{"editor.background":"#1E1E1E","editor.foreground":"#FFFFFF","editorCursor.foreground":"#A7A7A7","editor.lineHighlightBackground":"#333333","editorLineNumber.foreground":"#858585","editor.selectionBackground":"#264F78","editor.inactiveSelectionBackground":"#3A3D41"}})}const k=function(t){var e=t.value,r=void 0===e?"":e,i=t.onChange,o=void 0===i?function(){}:i;return v.wG.init().then((function(t){w(t)})),n.createElement(v.Ay,{height:"100%",language:"customLang",value:r,onChange:function(t){return o(t)},theme:"customTheme",options:{automaticLayout:!0,fontFamily:"Consolas",fontSize:15,lineNumbers:"on",minimap:{enabled:!1}}})},T=function(t){var e=t.value,r=void 0===e?"":e,i=t.onChange,o=void 0===i?function(){}:i;return v.wG.init().then((function(t){w(t)})),n.createElement(v.Ay,{height:"100%",language:"customLang",value:r,onChange:function(t){return o(t)},theme:"customTheme",options:{automaticLayout:!0,fontFamily:"Consolas",fontSize:14,lineNumbers:"on",minimap:{enabled:!1},readOnly:!0}})};var S=r(6220),K=r(7463),A=r(235),B=r(9967),F=r(6607),E=r(2632);const L=function(t){var e=t.code1,r=t.mermaidCode,i=t.editor1Height,o=t.leftWidth,a=t.handleEditor1Change,s=t.setEditor1Height,l=t.setMermaidCode,c=t.dslEditorEditable,u=t.setDslEditorEditable;return n.createElement("div",{className:"CodeEditorsContent",style:{width:o,display:"flex",flexDirection:"column",overflow:"hidden",position:"relative"}},n.createElement(h.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2}},n.createElement(K.A,{variant:"overline"},"Code Editor"),n.createElement(A.A,{title:c?"Edit Mode":"Read Mode"},n.createElement(B.A,{onClick:function(){u((function(t){return!t}))},size:"small"},c?n.createElement(E.A,{sx:{fontSize:18}}):n.createElement(F.A,{sx:{fontSize:18}})))),n.createElement(S.ResizableBox,{height:i,width:1/0,resizeHandles:["s"],onResizeStop:function(t,e){return s(e.size.height)},minConstraints:[1/0,100],maxConstraints:[1/0,window.innerHeight-100],handle:n.createElement("span",{style:{width:"100%",height:"4px",borderTop:"1px solid #444",cursor:"row-resize",position:"absolute",bottom:0,left:0}})},n.createElement("div",{style:{height:"100%",margin:0,padding:0}},n.createElement(k,{value:e,onChange:a}))),n.createElement(h.A,{sx:{display:"flex",flexDirection:"column",height:"calc(100% - ".concat(i,"px)"),overflow:"hidden"}},n.createElement(h.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2}},n.createElement(K.A,{variant:"overline"},"Mermaid Editor"),n.createElement(A.A,{title:"Read Mode"},n.createElement(B.A,{size:"small"},n.createElement(F.A,{sx:{fontSize:18}})))),n.createElement("div",{style:{flexGrow:1,overflow:"auto"}},n.createElement(T,{value:r,onChange:l}))))};var M=r(9700),O=r(389),$=r(6404),I=r(3615),D=r(57),N=(r(5070),r(772)),P=(r(8605),r(6009)),j="comm",z="rule",q="decl",R=Math.abs,W=String.fromCharCode;function U(t){return t.trim()}function H(t,e,r){return t.replace(e,r)}function Y(t,e,r){return t.indexOf(e,r)}function G(t,e){return 0|t.charCodeAt(e)}function V(t,e,r){return t.slice(e,r)}function J(t){return t.length}function X(t){return t.length}function Z(t,e){return e.push(t),t}(0,P.K2)(U,"trim"),(0,P.K2)(H,"replace"),(0,P.K2)(Y,"indexof"),(0,P.K2)(G,"charat"),(0,P.K2)(V,"substr"),(0,P.K2)(J,"strlen"),(0,P.K2)(X,"sizeof"),(0,P.K2)(Z,"append");var Q=1,tt=1,et=0,rt=0,nt=0,it="";function ot(t,e,r,n,i,o,a,s){return{value:t,root:e,parent:r,type:n,props:i,children:o,line:Q,column:tt,length:a,return:"",siblings:s}}function at(){return nt}function st(){return nt=rt>0?G(it,--rt):0,tt--,10===nt&&(tt=1,Q--),nt}function lt(){return nt=rt2||dt(nt)>3?"":" "}function yt(t,e){for(;--e&<()&&!(nt<48||nt>102||nt>57&&nt<65||nt>70&&nt<97););return ht(t,ut()+(e<6&&32==ct()&&32==lt()))}function bt(t){for(;lt();)switch(nt){case t:return rt;case 34:case 39:34!==t&&39!==t&&bt(nt);break;case 40:41===t&&bt(t);break;case 92:lt()}return rt}function _t(t,e){for(;lt()&&t+nt!==57&&(t+nt!==84||47!==ct()););return"/*"+ht(e,rt-1)+"*"+W(47===t?t:lt())}function xt(t){for(;!dt(ct());)lt();return ht(t,rt)}function Ct(t){return pt(vt("",null,null,null,[""],t=ft(t),0,[0],t))}function vt(t,e,r,n,i,o,a,s,l){for(var c=0,u=0,h=a,d=0,f=0,p=0,m=1,g=1,y=1,b=0,_="",x=i,C=o,v=n,w=_;g;)switch(p=b,b=lt()){case 40:if(108!=p&&58==G(w,h-1)){-1!=Y(w+=H(mt(b),"&","&\f"),"&\f",R(c?s[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:w+=mt(b);break;case 9:case 10:case 13:case 32:w+=gt(p);break;case 92:w+=yt(ut()-1,7);continue;case 47:switch(ct()){case 42:case 47:Z(kt(_t(lt(),ut()),e,r,l),l);break;default:w+="/"}break;case 123*m:s[c++]=J(w)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:-1==y&&(w=H(w,/\f/g,"")),f>0&&J(w)-h&&Z(f>32?Tt(w+";",n,r,h-1,l):Tt(H(w," ","")+";",n,r,h-2,l),l);break;case 59:w+=";";default:if(Z(v=wt(w,e,r,c,u,i,s,_,x=[],C=[],h,o),o),123===b)if(0===u)vt(w,e,v,v,x,o,h,s,C);else switch(99===d&&110===G(w,3)?100:d){case 100:case 108:case 109:case 115:vt(t,v,v,n&&Z(wt(t,v,v,0,0,i,s,_,i,x=[],h,C),C),i,C,h,s,n?x:C);break;default:vt(w,v,v,v,[""],C,0,s,C)}}c=u=f=0,m=y=1,_=w="",h=a;break;case 58:h=1+J(w),f=p;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==st())continue;switch(w+=W(b),b*m){case 38:y=u>0?1:(w+="\f",-1);break;case 44:s[c++]=(J(w)-1)*y,y=1;break;case 64:45===ct()&&(w+=mt(lt())),d=ct(),u=h=J(_=w+=xt(ut())),b++;break;case 45:45===p&&2==J(w)&&(m=0)}}return o}function wt(t,e,r,n,i,o,a,s,l,c,u,h){for(var d=i-1,f=0===i?o:[""],p=X(f),m=0,g=0,y=0;m0?f[b]+" "+_:H(_,/&\f/g,f[b])))&&(l[y++]=x);return ot(t,e,r,0===i?z:s,l,c,u,h)}function kt(t,e,r,n){return ot(t,e,r,j,W(at()),V(t,2,-2),0,n)}function Tt(t,e,r,n,i){return ot(t,e,r,q,V(t,0,n),V(t,n+1,-1),n,i)}function St(t,e){for(var r="",n=0;n/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(8544).then(r.bind(r,8544));return{id:"c4",diagram:t}}),"loader")},Bt="flowchart",Ft={id:Bt,detector:(0,P.K2)(((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(2725),r.e(8396),r.e(3706),r.e(9199),r.e(4822)]).then(r.bind(r,4822));return{id:Bt,diagram:t}}),"loader")},Et="flowchart-v2",Lt={id:Et,detector:(0,P.K2)(((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&(!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t))),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(2725),r.e(8396),r.e(3706),r.e(9199),r.e(3478)]).then(r.bind(r,3478));return{id:Et,diagram:t}}),"loader")},Mt={id:"er",detector:(0,P.K2)((t=>/^\s*erDiagram/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(1381)]).then(r.bind(r,3762));return{id:"er",diagram:t}}),"loader")},Ot="gitGraph",$t={id:Ot,detector:(0,P.K2)((t=>/^\s*gitGraph/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(9872).then(r.bind(r,9872));return{id:Ot,diagram:t}}),"loader")},It="gantt",Dt={id:It,detector:(0,P.K2)((t=>/^\s*gantt/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(3640).then(r.bind(r,3640));return{id:It,diagram:t}}),"loader")},Nt="info",Pt={id:Nt,detector:(0,P.K2)((t=>/^\s*info/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(9251)]).then(r.bind(r,9251));return{id:Nt,diagram:t}}),"loader")},jt={id:"pie",detector:(0,P.K2)((t=>/^\s*pie/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(5808)]).then(r.bind(r,5808));return{id:"pie",diagram:t}}),"loader")},zt="quadrantChart",qt={id:zt,detector:(0,P.K2)((t=>/^\s*quadrantChart/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(7194).then(r.bind(r,7194));return{id:zt,diagram:t}}),"loader")},Rt="xychart",Wt={id:Rt,detector:(0,P.K2)((t=>/^\s*xychart-beta/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(2725),r.e(3474)]).then(r.bind(r,3474));return{id:Rt,diagram:t}}),"loader")},Ut="requirement",Ht={id:Ut,detector:(0,P.K2)((t=>/^\s*requirement(Diagram)?/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(9856)]).then(r.bind(r,9856));return{id:Ut,diagram:t}}),"loader")},Yt="sequence",Gt={id:Yt,detector:(0,P.K2)((t=>/^\s*sequenceDiagram/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(5171).then(r.bind(r,5171));return{id:Yt,diagram:t}}),"loader")},Vt="class",Jt={id:Vt,detector:(0,P.K2)(((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(5877),r.e(7606)]).then(r.bind(r,7606));return{id:Vt,diagram:t}}),"loader")},Xt="classDiagram",Zt={id:Xt,detector:(0,P.K2)(((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(2725),r.e(8396),r.e(3706),r.e(5877),r.e(6803)]).then(r.bind(r,6803));return{id:Xt,diagram:t}}),"loader")},Qt="state",te={id:Qt,detector:(0,P.K2)(((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(1269),r.e(2807)]).then(r.bind(r,2807));return{id:Qt,diagram:t}}),"loader")},ee="stateDiagram",re={id:ee,detector:(0,P.K2)(((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(2725),r.e(8396),r.e(3706),r.e(1269),r.e(8953)]).then(r.bind(r,8953));return{id:ee,diagram:t}}),"loader")},ne="journey",ie={id:ne,detector:(0,P.K2)((t=>/^\s*journey/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(3456).then(r.bind(r,3456));return{id:ne,diagram:t}}),"loader")},oe={draw:(0,P.K2)(((t,e,r)=>{N.Rm.debug("rendering svg for syntax error\n");const n=(0,O.D)(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),(0,N.a$)(n,100,512,!0),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)}),"draw")},ae=oe,se={db:{},renderer:oe,parser:{parse:()=>{}}},le="flowchart-elk",ce={id:le,detector:(0,P.K2)(((t,e)=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(setTimeout((()=>N.Rm.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](link) for more details. This diagram will be rendered using `dagre` layout as a fallback.")),500),!0)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(3723),r.e(2725),r.e(8396),r.e(3706),r.e(9199),r.e(3478)]).then(r.bind(r,3478));return{id:le,diagram:t}}),"loader")},ue="timeline",he={id:ue,detector:(0,P.K2)((t=>/^\s*timeline/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(3796).then(r.bind(r,3796));return{id:ue,diagram:t}}),"loader")},de="mindmap",fe={id:de,detector:(0,P.K2)((t=>/^\s*mindmap/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(2725),r.e(1450)]).then(r.bind(r,1450));return{id:de,diagram:t}}),"loader")},pe="sankey",me={id:pe,detector:(0,P.K2)((t=>/^\s*sankey-beta/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await r.e(9156).then(r.bind(r,9156));return{id:pe,diagram:t}}),"loader")},ge="packet",ye={id:ge,detector:(0,P.K2)((t=>/^\s*packet-beta/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(5033)]).then(r.bind(r,5033));return{id:ge,diagram:t}}),"loader")},be="array",_e={id:be,detector:(0,P.K2)((t=>/^\s*array/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(9263)]).then(r.bind(r,9263));return{id:be,diagram:t}}),"loader")},xe="matrix",Ce={id:xe,detector:(0,P.K2)((t=>/^\s*matrix/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(2147)]).then(r.bind(r,2147));return{id:xe,diagram:t}}),"loader")},ve="testslides",we={id:ve,detector:(0,P.K2)((t=>/^\s*testslides/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(8501)]).then(r.bind(r,8501));return{id:ve,diagram:t}}),"loader")},ke="visslides",Te={id:ke,detector:(0,P.K2)((t=>/^\s*visslides/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(9061)]).then(r.bind(r,9061));return{id:ke,diagram:t}}),"loader")},Se="visual",Ke={id:Se,detector:(0,P.K2)((t=>/^\s*visual/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(8965),r.e(533)]).then(r.bind(r,533));return{id:Se,diagram:t}}),"loader")},Ae="block",Be={id:Ae,detector:(0,P.K2)((t=>/^\s*block-beta/.test(t)),"detector"),loader:(0,P.K2)((async()=>{const{diagram:t}=await Promise.all([r.e(1265),r.e(2725),r.e(8396),r.e(373)]).then(r.bind(r,373));return{id:Ae,diagram:t}}),"loader")},Fe=!1,Ee=(0,P.K2)((()=>{Fe||(Fe=!0,(0,N.Js)("error",se,(t=>"error"===t.toLowerCase().trim())),(0,N.Js)("---",{db:{clear:()=>{}},styles:{},renderer:{draw:()=>{}},parser:{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("---"))),(0,N.Xd)(At,Zt,Jt,Mt,Dt,Pt,jt,Ht,Gt,ce,Lt,Ft,fe,he,$t,re,te,ie,qt,me,ye,Wt,Be,_e,Ce,we,Te,Ke))}),"addDiagrams"),Le=class t{constructor(t,e,r,n,i){this.type=t,this.text=e,this.db=r,this.parser=n,this.renderer=i}static{(0,P.K2)(this,"Diagram")}static async fromText(e,r={}){const n=(0,N.zj)(),i=(0,N.Ch)(e,n);e=(0,D.C4)(e)+"\n";try{(0,N.Gs)(i)}catch(t){const e=(0,N.J$)(i);if(!e)throw new N.C0(`Diagram ${i} not found.`);const{id:r,diagram:n}=await e();(0,N.Js)(r,n)}const{db:o,parser:a,renderer:s,init:l}=(0,N.Gs)(i);return a.parser&&(a.parser.yy=o),o.clear?.(),l?.(n),r.title&&o.setDiagramTitle?.(r.title),await a.parse(e),new t(i,e,o,a,s)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},Me=[],Oe=(0,P.K2)((()=>{Me.forEach((t=>{t()})),Me=[]}),"attachFunctions"),$e=(0,P.f1)((0,N.gK)(),1),Ie="graphics-document document";function De(t,e){t.attr("role",Ie),""!==e&&t.attr("aria-roledescription",e)}function Ne(t,e,r,n){if(void 0!==t.insert){if(r){const e=`chart-desc-${n}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${n}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,P.K2)(De,"setA11yDiagramInfo"),(0,P.K2)(Ne,"addSVGa11yTitleDescription");var Pe=(0,P.K2)((t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart()),"cleanupComments");function je(t){return null==t}function ze(t){return"object"==typeof t&&null!==t}function qe(t){return Array.isArray(t)?t:je(t)?[]:[t]}function Re(t,e){var r,n,i,o;if(e)for(r=0,n=(o=Object.keys(e)).length;rs&&(e=n-s+(o=" ... ").length),r-n>s&&(r=n+s-(a=" ...").length),{str:o+t.slice(e,r).replace(/\t/g,"→")+a,pos:n-e+o.length}}function Xe(t,e){return He.repeat(" ",e-t.length)+t}function Ze(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],o=[],a=-1;r=n.exec(t.buffer);)o.push(r.index),i.push(r.index+r[0].length),t.position<=r.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var s,l,c="",u=Math.min(t.line+e.linesAfter,o.length).toString().length,h=e.maxLength-(e.indent+u+3);for(s=1;s<=e.linesBefore&&!(a-s<0);s++)l=Je(t.buffer,i[a-s],o[a-s],t.position-(i[a]-i[a-s]),h),c=He.repeat(" ",e.indent)+Xe((t.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=Je(t.buffer,i[a],o[a],t.position,h),c+=He.repeat(" ",e.indent)+Xe((t.line+1).toString(),u)+" | "+l.str+"\n",c+=He.repeat("-",e.indent+u+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(a+s>=o.length);s++)l=Je(t.buffer,i[a+s],o[a+s],t.position-(i[a]-i[a+s]),h),c+=He.repeat(" ",e.indent)+Xe((t.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}(0,P.K2)(Je,"getLine"),(0,P.K2)(Xe,"padStart"),(0,P.K2)(Ze,"makeSnippet");var Qe=Ze,tr=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],er=["scalar","sequence","mapping"];function rr(t){var e={};return null!==t&&Object.keys(t).forEach((function(r){t[r].forEach((function(t){e[String(t)]=r}))})),e}function nr(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===tr.indexOf(e))throw new Ve('Unknown option "'+e+'" 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(t){return t},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=rr(e.styleAliases||null),-1===er.indexOf(this.kind))throw new Ve('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,P.K2)(rr,"compileStyleAliases"),(0,P.K2)(nr,"Type$1");var ir=nr;function or(t,e){var r=[];return t[e].forEach((function(t){var e=r.length;r.forEach((function(r,n){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=n)})),r[e]=t})),r}function ar(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for((0,P.K2)(n,"collectType"),t=0,e=arguments.length;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"]}}),kr=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Tr(t){return null!==t&&!(!kr.test(t)||"_"===t[t.length-1])}function Sr(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,P.K2)(Tr,"resolveYamlFloat"),(0,P.K2)(Sr,"constructYamlFloat");var Kr=/^[-+]?[0-9]+e/;function Ar(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(He.isNegativeZero(t))return"-0.0";return r=t.toString(10),Kr.test(r)?r.replace("e",".e"):r}function Br(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||He.isNegativeZero(t))}(0,P.K2)(Ar,"representYamlFloat"),(0,P.K2)(Br,"isFloat");var Fr=new ir("tag:yaml.org,2002:float",{kind:"scalar",resolve:Tr,construct:Sr,predicate:Br,represent:Ar,defaultStyle:"lowercase"}),Er=lr.extend({implicit:[dr,gr,wr,Fr]}),Lr=Er,Mr=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Or=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 $r(t){return null!==t&&(null!==Mr.exec(t)||null!==Or.exec(t))}function Ir(t){var e,r,n,i,o,a,s,l,c=0,u=null;if(null===(e=Mr.exec(t))&&(e=Or.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(o=+e[4],a=+e[5],s=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(u=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(u=-u)),l=new Date(Date.UTC(r,n,i,o,a,s,c)),u&&l.setTime(l.getTime()-u),l}function Dr(t){return t.toISOString()}(0,P.K2)($r,"resolveYamlTimestamp"),(0,P.K2)(Ir,"constructYamlTimestamp"),(0,P.K2)(Dr,"representYamlTimestamp");var Nr=new ir("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:$r,construct:Ir,instanceOf:Date,represent:Dr});function Pr(t){return"<<"===t||null===t}(0,P.K2)(Pr,"resolveYamlMerge");var jr=new ir("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Pr}),zr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function qr(t){if(null===t)return!1;var e,r,n=0,i=t.length,o=zr;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8==0}function Rr(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,o=zr,a=0,s=[];for(e=0;e>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(n.charAt(e));return 0==(r=i%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===r?(s.push(a>>10&255),s.push(a>>2&255)):12===r&&s.push(a>>4&255),new Uint8Array(s)}function Wr(t){var e,r,n="",i=0,o=t.length,a=zr;for(e=0;e>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]),i=(i<<8)+t[e];return 0==(r=o%3)?(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]):2===r?(n+=a[i>>10&63],n+=a[i>>4&63],n+=a[i<<2&63],n+=a[64]):1===r&&(n+=a[i>>2&63],n+=a[i<<4&63],n+=a[64],n+=a[64]),n}function Ur(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,P.K2)(qr,"resolveYamlBinary"),(0,P.K2)(Rr,"constructYamlBinary"),(0,P.K2)(Wr,"representYamlBinary"),(0,P.K2)(Ur,"isBinary");var Hr=new ir("tag:yaml.org,2002:binary",{kind:"scalar",resolve:qr,construct:Rr,predicate:Ur,represent:Wr}),Yr=Object.prototype.hasOwnProperty,Gr=Object.prototype.toString;function Vr(t){if(null===t)return!0;var e,r,n,i,o,a=[],s=t;for(e=0,r=s.length;e>10),56320+(t-65536&1023))}(0,P.K2)(Cn,"_class"),(0,P.K2)(vn,"is_EOL"),(0,P.K2)(wn,"is_WHITE_SPACE"),(0,P.K2)(kn,"is_WS_OR_EOL"),(0,P.K2)(Tn,"is_FLOW_INDICATOR"),(0,P.K2)(Sn,"fromHexCode"),(0,P.K2)(Kn,"escapedHexLen"),(0,P.K2)(An,"fromDecimalCode"),(0,P.K2)(Bn,"simpleEscapeSequence"),(0,P.K2)(Fn,"charFromCodepoint");var En,Ln=new Array(256),Mn=new Array(256);for(En=0;En<256;En++)Ln[En]=Bn(En)?1:0,Mn[En]=Bn(En);function On(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||sn,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 $n(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=Qe(r),new Ve(e,r)}function In(t,e){throw $n(t,e)}function Dn(t,e){t.onWarning&&t.onWarning.call(null,$n(t,e))}(0,P.K2)(On,"State$1"),(0,P.K2)($n,"generateError"),(0,P.K2)(In,"throwError"),(0,P.K2)(Dn,"throwWarning");var Nn={YAML:(0,P.K2)((function(t,e,r){var n,i,o;null!==t.version&&In(t,"duplication of %YAML directive"),1!==r.length&&In(t,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&In(t,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),o=parseInt(n[2],10),1!==i&&In(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&Dn(t,"unsupported YAML version of the document")}),"handleYamlDirective"),TAG:(0,P.K2)((function(t,e,r){var n,i;2!==r.length&&In(t,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],_n.test(n)||In(t,"ill-formed tag handle (first argument) of the TAG directive"),ln.call(t.tagMap,n)&&In(t,'there is a previously declared suffix for "'+n+'" tag handle'),xn.test(i)||In(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(e){In(t,"tag prefix is malformed: "+i)}t.tagMap[n]=i}),"handleTagDirective")};function Pn(t,e,r,n){var i,o,a,s;if(e1&&(t.result+=He.repeat("\n",e-1))}function Hn(t,e,r){var n,i,o,a,s,l,c,u,h=t.kind,d=t.result;if(kn(u=t.input.charCodeAt(t.position))||Tn(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(kn(n=t.input.charCodeAt(t.position+1))||r&&Tn(n)))return!1;for(t.kind="scalar",t.result="",i=o=t.position,a=!1;0!==u;){if(58===u){if(kn(n=t.input.charCodeAt(t.position+1))||r&&Tn(n))break}else if(35===u){if(kn(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&Wn(t)||r&&Tn(u))break;if(vn(u)){if(s=t.line,l=t.lineStart,c=t.lineIndent,Rn(t,!1,-1),t.lineIndent>=e){a=!0,u=t.input.charCodeAt(t.position);continue}t.position=o,t.line=s,t.lineStart=l,t.lineIndent=c;break}}a&&(Pn(t,i,o,!1),Un(t,t.line-s),i=o=t.position,a=!1),wn(u)||(o=t.position+1),u=t.input.charCodeAt(++t.position)}return Pn(t,i,o,!1),!!t.result||(t.kind=h,t.result=d,!1)}function Yn(t,e){var r,n,i;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(Pn(t,n,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;n=t.position,t.position++,i=t.position}else vn(r)?(Pn(t,n,i,!0),Un(t,Rn(t,!1,e)),n=i=t.position):t.position===t.lineStart&&Wn(t)?In(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);In(t,"unexpected end of the stream within a single quoted scalar")}function Gn(t,e){var r,n,i,o,a,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return Pn(t,r,t.position,!0),t.position++,!0;if(92===s){if(Pn(t,r,t.position,!0),vn(s=t.input.charCodeAt(++t.position)))Rn(t,!1,e);else if(s<256&&Ln[s])t.result+=Mn[s],t.position++;else if((a=Kn(s))>0){for(i=a,o=0;i>0;i--)(a=Sn(s=t.input.charCodeAt(++t.position)))>=0?o=(o<<4)+a:In(t,"expected hexadecimal character");t.result+=Fn(o),t.position++}else In(t,"unknown escape sequence");r=n=t.position}else vn(s)?(Pn(t,r,n,!0),Un(t,Rn(t,!1,e)),r=n=t.position):t.position===t.lineStart&&Wn(t)?In(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}In(t,"unexpected end of the stream within a double quoted scalar")}function Vn(t,e){var r,n,i,o,a,s,l,c,u,h,d,f,p=!0,m=t.tag,g=t.anchor,y=Object.create(null);if(91===(f=t.input.charCodeAt(t.position)))a=93,c=!1,o=[];else{if(123!==f)return!1;a=125,c=!0,o={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),f=t.input.charCodeAt(++t.position);0!==f;){if(Rn(t,!0,e),(f=t.input.charCodeAt(t.position))===a)return t.position++,t.tag=m,t.anchor=g,t.kind=c?"mapping":"sequence",t.result=o,!0;p?44===f&&In(t,"expected the node content, but found ','"):In(t,"missed comma between flow collection entries"),d=null,s=l=!1,63===f&&kn(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,Rn(t,!0,e)),r=t.line,n=t.lineStart,i=t.position,ri(t,e,cn,!1,!0),h=t.tag,u=t.result,Rn(t,!0,e),f=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==f||(s=!0,f=t.input.charCodeAt(++t.position),Rn(t,!0,e),ri(t,e,cn,!1,!0),d=t.result),c?zn(t,o,y,h,u,d,r,n,i):s?o.push(zn(t,null,y,h,u,d,r,n,i)):o.push(u),Rn(t,!0,e),44===(f=t.input.charCodeAt(t.position))?(p=!0,f=t.input.charCodeAt(++t.position)):p=!1}In(t,"unexpected end of the stream within a flow collection")}function Jn(t,e){var r,n,i,o,a=fn,s=!1,l=!1,c=e,u=0,h=!1;if(124===(o=t.input.charCodeAt(t.position)))n=!1;else{if(62!==o)return!1;n=!0}for(t.kind="scalar",t.result="";0!==o;)if(43===(o=t.input.charCodeAt(++t.position))||45===o)fn===a?a=43===o?mn:pn:In(t,"repeat of a chomping mode identifier");else{if(!((i=An(o))>=0))break;0===i?In(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?In(t,"repeat of an indentation width identifier"):(c=e+i-1,l=!0)}if(wn(o)){do{o=t.input.charCodeAt(++t.position)}while(wn(o));if(35===o)do{o=t.input.charCodeAt(++t.position)}while(!vn(o)&&0!==o)}for(;0!==o;){for(qn(t),t.lineIndent=0,o=t.input.charCodeAt(t.position);(!l||t.lineIndentc&&(c=t.lineIndent),vn(o))u++;else{if(t.lineIndente)&&0!==n)In(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(y&&(a=t.line,s=t.lineStart,l=t.position),ri(t,e,dn,!0,i)&&(y?m=t.result:g=t.result),y||(zn(t,d,f,p,m,g,a,s,l),p=m=g=null),Rn(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&0!==c)In(t,"bad indentation of a mapping entry");else if(t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&h.kind!==t.kind&&In(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+h.kind+'", not "'+t.kind+'"'),h.resolve(t.result,t.tag)?(t.result=h.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):In(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function ni(t){var e,r,n,i,o=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(Rn(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==i));){for(a=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!kn(i);)i=t.input.charCodeAt(++t.position);for(n=[],(r=t.input.slice(e,t.position)).length<1&&In(t,"directive name must not be less than one character in length");0!==i;){for(;wn(i);)i=t.input.charCodeAt(++t.position);if(35===i){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&!vn(i));break}if(vn(i))break;for(e=t.position;0!==i&&!kn(i);)i=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==i&&qn(t),ln.call(Nn,r)?Nn[r](t,r,n):Dn(t,'unknown document directive "'+r+'"')}Rn(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,Rn(t,!0,-1)):a&&In(t,"directives end mark is expected"),ri(t,t.lineIndent-1,dn,!1,!0),Rn(t,!0,-1),t.checkLineBreaks&&yn.test(t.input.slice(o,t.position))&&Dn(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Wn(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,Rn(t,!0,-1)):t.position=55296&&n<=56319&&e+1=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function Qi(t){return/^\n* /.test(t)}(0,P.K2)(qi,"State"),(0,P.K2)(Ri,"indentString"),(0,P.K2)(Wi,"generateNextLine"),(0,P.K2)(Ui,"testImplicitResolving"),(0,P.K2)(Hi,"isWhitespace"),(0,P.K2)(Yi,"isPrintable"),(0,P.K2)(Gi,"isNsCharOrWhitespace"),(0,P.K2)(Vi,"isPlainSafe"),(0,P.K2)(Ji,"isPlainSafeFirst"),(0,P.K2)(Xi,"isPlainSafeLast"),(0,P.K2)(Zi,"codePointAt"),(0,P.K2)(Qi,"needIndentIndicator");var to=1,eo=2,ro=3,no=4,io=5;function oo(t,e,r,n,i,o,a,s){var l,c=0,u=null,h=!1,d=!1,f=-1!==n,p=-1,m=Ji(Zi(t,0))&&Xi(Zi(t,t.length-1));if(e||a)for(l=0;l=65536?l+=2:l++){if(!Yi(c=Zi(t,l)))return io;m=m&&Vi(c,u,s),u=c}else{for(l=0;l=65536?l+=2:l++){if((c=Zi(t,l))===di)h=!0,f&&(d=d||l-p-1>n&&" "!==t[p+1],p=l);else if(!Yi(c))return io;m=m&&Vi(c,u,s),u=c}d=d||f&&l-p-1>n&&" "!==t[p+1]}return h||d?r>9&&Qi(t)?io:a?o===zi?io:eo:d?no:ro:!m||a||i(t)?o===zi?io:eo:to}function ao(t,e,r,n,i){t.dump=function(){if(0===e.length)return t.quotingType===zi?'""':"''";if(!t.noCompatMode&&(-1!==Ii.indexOf(e)||Di.test(e)))return t.quotingType===zi?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,r),a=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),s=n||t.flowLevel>-1&&r>=t.flowLevel;function l(e){return Ui(t,e)}switch((0,P.K2)(l,"testAmbiguity"),oo(e,s,t.indent,a,l,t.quotingType,t.forceQuotes&&!n,i)){case to:return e;case eo:return"'"+e.replace(/'/g,"''")+"'";case ro:return"|"+so(e,t.indent)+lo(Ri(e,o));case no:return">"+so(e,t.indent)+lo(Ri(co(e,a),o));case io:return'"'+ho(e)+'"';default:throw new Ve("impossible error: invalid scalar style")}}()}function so(t,e){var r=Qi(t)?String(e):"",n="\n"===t[t.length-1];return r+(!n||"\n"!==t[t.length-2]&&"\n"!==t?n?"":"-":"+")+"\n"}function lo(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function co(t,e){for(var r,n,i,o=/(\n+)([^\n]*)/g,a=(r=-1!==(r=t.indexOf("\n"))?r:t.length,o.lastIndex=r,uo(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];i=o.exec(t);){var l=i[1],c=i[2];n=" "===c[0],a+=l+(s||n||""===c?"":"\n")+uo(c,e),s=n}return a}function uo(t,e){if(""===t||" "===t[0])return t;for(var r,n,i=/ [^ ]/g,o=0,a=0,s=0,l="";r=i.exec(t);)(s=r.index)-o>e&&(n=a>o?a:s,l+="\n"+t.slice(o,n),o=n+1),a=s;return l+="\n",t.length-o>e&&a>o?l+=t.slice(o,a)+"\n"+t.slice(a+1):l+=t.slice(o),l.slice(1)}function ho(t){for(var e,r="",n=0,i=0;i=65536?i+=2:i++)n=Zi(t,i),!(e=$i[n])&&Yi(n)?(r+=t[i],n>=65536&&(r+=t[i+1])):r+=e||Pi(n);return r}function fo(t,e,r){var n,i,o,a="",s=t.tag;for(n=0,i=r.length;n1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),bo(t,e,a,!1,!1)&&(l+=s+=t.dump));t.tag=c,t.dump="{"+l+"}"}function go(t,e,r,n){var i,o,a,s,l,c,u="",h=t.tag,d=Object.keys(r);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new Ve("sortKeys must be a boolean or a function");for(i=0,o=d.length;i1024)&&(t.dump&&di===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=Wi(t,e)),bo(t,e+1,s,!0,l)&&(t.dump&&di===t.dump.charCodeAt(0)?c+=":":c+=": ",u+=c+=t.dump));t.tag=h,t.dump=u||"{}"}function yo(t,e,r){var n,i,o,a,s,l;for(o=0,a=(i=r?t.explicitTypes:t.implicitTypes).length;o tag resolver accepts not "'+l+'" style');n=s.represent[l](e,l)}t.dump=n}return!0}return!1}function bo(t,e,r,n,i,o,a){t.tag=null,t.dump=r,yo(t,r,!1)||yo(t,r,!0);var s,l=li.call(t.dump),c=n;n&&(n=t.flowLevel<0||t.flowLevel>e);var u,h,d="[object Object]"===l||"[object Array]"===l;if(d&&(h=-1!==(u=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||h||2!==t.indent&&e>0)&&(i=!1),h&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(d&&h&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),"[object Object]"===l)n&&0!==Object.keys(t.dump).length?(go(t,e,t.dump,i),h&&(t.dump="&ref_"+u+t.dump)):(mo(t,e,t.dump),h&&(t.dump="&ref_"+u+" "+t.dump));else if("[object Array]"===l)n&&0!==t.dump.length?(t.noArrayIndent&&!a&&e>0?po(t,e-1,t.dump,i):po(t,e,t.dump,i),h&&(t.dump="&ref_"+u+t.dump)):(fo(t,e,t.dump),h&&(t.dump="&ref_"+u+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new Ve("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&ao(t,t.dump,e,o,c)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function _o(t,e){var r,n,i=[],o=[];for(xo(t,i,o),r=0,n=o.length;rt.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"))),"cleanupText"),So=(0,P.K2)((t=>{const{text:e,metadata:r}=ko(t),{displayMode:n,title:i,config:o={}}=r;return n&&(o.gantt||(o.gantt={}),o.gantt.displayMode=n),{title:i,config:o,text:e}}),"processFrontmatter"),Ko=(0,P.K2)((t=>{const e=D._K.detectInit(t)??{},r=D._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some((({type:t})=>{})):"wrap"===r?.type&&(e.wrap=!0),{text:(0,D.vU)(t),directive:e}}),"processDirectives");function Ao(t){const e=To(t),r=So(e),n=Ko(r.text),i=(0,D.$t)(r.config,n.directive);return{code:t=Pe(n.text),title:r.title,config:i}}(0,P.K2)(Ao,"preprocessDiagram");var Bo=["foreignobject"],Fo=["dominant-baseline"];function Eo(t){const e=Ao(t);return(0,N.cL)(),(0,N.xA)(e.config??{}),e}async function Lo(t,e){Ee();try{const{code:e}=Eo(t);return{diagramType:(await Ro(e)).type}}catch(t){if(e?.suppressErrors)return!1;throw t}}(0,P.K2)(Eo,"processAndSetConfigs"),(0,P.K2)(Lo,"parse");var Mo=(0,P.K2)(((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`),"cssImportantStyles"),Oo=(0,P.K2)(((t,e=new Map)=>{let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const n=t.htmlLabels||t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach((t=>{(0,I._S)(t.styles)||n.forEach((e=>{r+=Mo(t.id,e,t.styles)})),(0,I._S)(t.textStyles)||(r+=Mo(t.id,"tspan",t.textStyles))}))}return r}),"createCssStyles"),$o=(0,P.K2)(((t,e,r,n)=>{const i=Oo(t,r);return St(Ct(`${n}{${(0,N.tM)(e,i,t.themeVariables)}}`),Kt)}),"createUserStyles"),Io=(0,P.K2)(((t="",e,r)=>{let n=t;return r||e||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=(0,D.Sm)(n),n=n.replace(/
/g,"
"),n}),"cleanUpSvgCode"),Do=(0,P.K2)(((t="",e)=>``),"putIntoIFrame"),No=(0,P.K2)(((t,e,r,n,i)=>{const o=t.append("div");o.attr("id",r),n&&o.attr("style",n);const a=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return i&&a.attr("xmlns:xlink",i),a.append("g"),t}),"appendDivSvgG");function Po(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,P.K2)(Po,"sandboxedIframe");var jo=(0,P.K2)(((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()}),"removeExistingElements"),zo=(0,P.K2)((async function(t,e,r){Ee();const n=Eo(e);e=n.code;const i=(0,N.zj)();N.Rm.debug(i),e.length>(i?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const o="#"+t,a="i"+t,s="#"+a,l="d"+t,c="#"+l,u=(0,P.K2)((()=>{const t=d?s:c,e=(0,N.df)(t).node();e&&"remove"in e&&e.remove()}),"removeTempElements");let h=(0,N.df)("body");const d="sandbox"===i.securityLevel,f="loose"===i.securityLevel,p=i.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),d){const t=Po((0,N.df)(r),a);h=(0,N.df)(t.nodes()[0].contentDocument.body),h.node().style.margin=0}else h=(0,N.df)(r);No(h,t,l,`font-family: ${p}`,"http://www.w3.org/1999/xlink")}else{if(jo(document,t,l,a),d){const t=Po((0,N.df)("body"),a);h=(0,N.df)(t.nodes()[0].contentDocument.body),h.node().style.margin=0}else h=(0,N.df)("body");No(h,t,l)}let m,g;try{m=await Le.fromText(e,{title:n.title})}catch(t){if(i.suppressErrorRendering)throw u(),t;m=await Le.fromText("error"),g=t}const y=h.select(c).node(),b=m.type,_=y.firstChild,x=_.firstChild,C=m.renderer.getClasses?.(e,m),v=$o(i,b,C,o),w=document.createElement("style");w.innerHTML=v,_.insertBefore(w,x);try{await m.renderer.draw(e,t,M.r,m)}catch(r){throw i.suppressErrorRendering?u():ae.draw(e,t,M.r),r}const k=h.select(`${c} svg`),T=m.db.getAccTitle?.(),S=m.db.getAccDescription?.();Wo(b,k,T,S),h.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let K=h.select(c).node().innerHTML;if(N.Rm.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),K=Io(K,d,(0,N._3)(i.arrowMarkerAbsolute)),d){const t=h.select(c+" svg").node();K=Do(K,t)}else f||(K=$e.default.sanitize(K,{ADD_TAGS:Bo,ADD_ATTR:Fo}));if(Oe(),g)throw g;return u(),{diagramType:b,svg:K,bindFunctions:m.db.bindFunctions}}),"render");function qo(t={}){t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),(0,N.wZ)(t),t?.theme&&t.theme in N.H$?t.themeVariables=N.H$[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=N.H$.default.getThemeVariables(t.themeVariables));const e="object"==typeof t?(0,N.UU)(t):(0,N.Q2)();(0,N.He)(e.logLevel),Ee()}(0,P.K2)(qo,"initialize");var Ro=(0,P.K2)(((t,e={})=>{const{code:r}=Ao(t);return Le.fromText(r,e)}),"getDiagramFromText");function Wo(t,e,r,n){De(e,t),Ne(e,r,n,e.attr("id"))}(0,P.K2)(Wo,"addA11yInfo");var Uo=Object.freeze({render:zo,parse:Lo,getDiagramFromText:Ro,initialize:qo,getConfig:N.zj,setConfig:N.eI,getSiteConfig:N.Q2,updateSiteConfig:N.B6,reset:()=>{(0,N.cL)()},globalReset:()=>{(0,N.cL)(N.sb)},defaultConfig:N.sb});(0,N.He)((0,N.zj)().logLevel),(0,N.cL)((0,N.zj)());var Ho=(0,P.K2)((async()=>{N.Rm.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(N.mW).map((async([t,{detector:e,loader:r}])=>{if(r)try{(0,N.Gs)(t)}catch(n){try{const{diagram:t,id:n}=await r();(0,N.Js)(n,t,e)}catch(e){throw N.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete N.mW[t],e}}})))).filter((t=>"rejected"===t.status));if(t.length>0){N.Rm.error(`Failed to load ${t.length} external diagrams`);for(const e of t)N.Rm.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}}),"loadRegisteredDiagrams"),Yo=(0,P.K2)(((t,e,r)=>{N.Rm.warn(t),(0,D.dq)(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}))}),"handleError"),Go=(0,P.K2)((async function(t={querySelector:".mermaid"}){try{await Vo(t)}catch(e){if((0,D.dq)(e)&&N.Rm.error(e.str),aa.parseError&&aa.parseError(e),!t.suppressErrors)throw N.Rm.error("Use the suppressErrors option to suppress these errors"),e}}),"run"),Vo=(0,P.K2)((async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=Uo.getConfig();let i;if(N.Rm.debug((t?"":"No ")+"Callback function found"),r)i=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(e)}N.Rm.debug(`Found ${i.length} diagrams`),void 0!==n?.startOnLoad&&(N.Rm.debug("Start On Load: "+n?.startOnLoad),Uo.updateSiteConfig({startOnLoad:n?.startOnLoad}));const o=new D._K.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let a;const s=[];for(const e of Array.from(i)){if(N.Rm.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const r=`mermaid-${o.next()}`;a=e.innerHTML,a=(0,$.T)(D._K.entityDecode(a)).trim().replace(//gi,"
");const n=D._K.detectInit(a);n&&N.Rm.debug("Detected early reinit: ",n);try{const{svg:n,bindFunctions:i}=await oa(r,a,e);e.innerHTML=n,t&&await t(r),i&&i(e)}catch(t){Yo(t,s,aa.parseError)}}if(s.length>0)throw s[0]}),"runThrowsErrors"),Jo=(0,P.K2)((function(t){Uo.initialize(t)}),"initialize"),Xo=(0,P.K2)((async function(t,e,r){N.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&Jo(t);const n={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await Go(n)}),"init"),Zo=(0,P.K2)((async(t,{lazyLoad:e=!0}={})=>{Ee(),(0,N.Xd)(...t),!1===e&&await Ho()}),"registerExternalDiagrams"),Qo=(0,P.K2)((function(){if(aa.startOnLoad){const{startOnLoad:t}=Uo.getConfig();t&&aa.run().catch((t=>N.Rm.error("Mermaid failed to initialize",t)))}}),"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",Qo,!1);var ta=(0,P.K2)((function(t){aa.parseError=t}),"setParseErrorHandler"),ea=[],ra=!1,na=(0,P.K2)((async()=>{if(!ra){for(ra=!0;ea.length>0;){const t=ea.shift();if(t)try{await t()}catch(t){N.Rm.error("Error executing queue",t)}}ra=!1}}),"executeQueue"),ia=(0,P.K2)((async(t,e)=>new Promise(((r,n)=>{const i=(0,P.K2)((()=>new Promise(((i,o)=>{Uo.parse(t,e).then((t=>{i(t),r(t)}),(t=>{N.Rm.error("Error parsing",t),aa.parseError?.(t),o(t),n(t)}))}))),"performCall");ea.push(i),na().catch(n)}))),"parse"),oa=(0,P.K2)(((t,e,r)=>new Promise(((n,i)=>{const o=(0,P.K2)((()=>new Promise(((o,a)=>{Uo.render(t,e,r).then((t=>{o(t),n(t)}),(t=>{N.Rm.error("Error parsing",t),aa.parseError?.(t),a(t),i(t)}))}))),"performCall");ea.push(o),na().catch(i)}))),"render"),aa={startOnLoad:!0,mermaidAPI:Uo,parse:ia,render:oa,init:Xo,run:Go,registerExternalDiagrams:Zo,initialize:Jo,parseError:void 0,contentLoaded:Qo,setParseErrorHandler:ta,detectType:N.Ch},sa=aa,la=function(t){var e=t.svgElement,r=t.updateInspector;(0,n.useEffect)((function(){i()}),[e]);var i=function(){e&&e.addEventListener("click",o)},o=function(t){for(var e=t.target;e&&!e.classList.contains("unit");)e=e.parentElement;for(var n=e?e.id:null;e&&!e.classList.contains("component");)e=e.parentElement;for(var i=e?e.id:null;e&&!e.classList.contains("page");)e=e.parentElement;var o=e?e.id:null;r(n,i,o)};return n.createElement("div",null)};function ca(t){return ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ca(t)}function ua(){ua=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),s=new F(n||[]);return i(a,"_invoke",{value:S(t,r,s)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var d="suspendedStart",f="suspendedYield",p="executing",m="completed",g={};function y(){}function b(){}function _(){}var x={};c(x,a,(function(){return this}));var C=Object.getPrototypeOf,v=C&&C(C(E([])));v&&v!==r&&n.call(v,a)&&(x=v);var w=_.prototype=y.prototype=Object.create(x);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,a,s){var l=h(t[i],t,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==ca(u)&&n.call(u,"__await")?e.resolve(u.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(u).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function S(e,r,n){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var l=K(s,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?m:f,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function K(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,K(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function B(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),B(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;B(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:E(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function ha(t,e,r,n,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,i)}const da=function(t){var e=t.text,r=t.update,i=t.exampleSvg,o=(t.setTotalPages,t.setSvgContent),a=(0,n.useRef)(null);return(0,n.useEffect)((function(){sa.initialize({startOnLoad:!0,securityLevel:"loose",theme:"forest",logLevel:5});var t=function(){var t,n=(t=ua().mark((function t(){var n,s;return ua().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!a.current||""===e){t.next=19;break}if(t.prev=1,!i){t.next=7;break}a.current.innerHTML=i,r(a.current),t.next=14;break;case 7:return t.next=9,sa.mermaidAPI.render("preview",e);case 9:n=t.sent,s=n.svg,o(s),a.current.innerHTML=s,r(a.current);case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(1),console.error("Mermaid render error:",t.t0);case 19:case"end":return t.stop()}}),t,null,[[1,16]])})),function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){ha(o,n,i,a,s,"next",t)}function s(t){ha(o,n,i,a,s,"throw",t)}a(void 0)}))});return function(){return n.apply(this,arguments)}}();return t(),function(){a.current&&(a.current.innerHTML="")}}),[e,i]),n.createElement("div",{ref:a,className:"mermaid-container"})};var fa=r(3340),pa=r(7235),ma=r(3044),ga=r(6879),ya=r(6466),ba=r(3360),_a=r(5800),xa=r(7187),Ca=r(1045),va=r(7477);function wa(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ka(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ka(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ka(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=1?d-1:1)},variant:"contained",style:{fontSize:"12px",marginRight:"15px",maxWidth:"80px",maxHeight:"25px",minWidth:"40px",minHeight:"25px"}},"Prev"),n.createElement(fa.A,{onClick:function(){p(d+1<=l?d+1:l)},variant:"contained",style:{fontSize:"12px",marginRight:"15px",maxWidth:"80px",maxHeight:"25px",minWidth:"40px",minHeight:"25px"}},"Next"),d,"/",l)))))};var Sa=r(1003),Ka=r.n(Sa),Aa=r(1381),Ba=r(8847),Fa=[{id:"commonErrors",title:"Common Errors",tags:[],svg:"",userCode:'// common error\n// 1.page index exceeds data structure, i.e no array[9] but there are only 5 element in array\n// 2.invalid input format\n// 3.arrow field with ""\n// 4.can\'t find component name\n// 5.page index is invalid, like -1'},{id:"graphExample",title:"Example - graph",userCode:"data:\ngraph gh = {\nid:[[n1],[n1,n2],[n1,n2,n3]]\nvalue:[[1],[1,2],[1,2,3]]\nedge:[[(node1,node1)]]\n}\ndraw:\npage p := [0,2] {\nshow gh[p]\n}"},{id:"arrayExample",title:"Example - array",userCode:"data:\narray arr1 = {\nstructure:[[1],[1,2],[1,2,3]]\n}\narray arr2 = {\nstructure:[[3,2,1],[2,1],[1]]\n}\ndraw:\npage p := [0,2] {\nshow arr1[p]\nshow arr2[p]\n}"},{id:"TutorialFibonacci",title:"Tutorial - Fibonacci",userCode:"data:\narray arr1 = {\n structure:[[1],[1,1],[1,1,2]]\n value:[[1],[1,1],[1,1,2]]\n color:[[null],[null,null],[null,null,null]]\n}\ndraw:\npage p:=[0,2] {\nshow arr1[p]\n}"},{id:"playground",title:"Playground",userCode:""},{id:"task1LCAofTree",title:"Task 1 - LCA in a tree",userCode:"data:\ntree tr1 = {\n structure:[[n1,n2,n3,n4,n5,n6,n7]]\n value:[[1,2,3,4,5,6,7]]\n color:[[null,null,blue,null,blue]]\n}\ndraw:\npage p := [0,0] {\n show tr1[p]\n}"},{id:"task2DepthFirstSearch",title:"Task 2 - Depth First Search",userCode:"data:\ngraph dfs = {\n id:[[n1,n2,n3,n4,n5,n6,n7,n8],[n1,n2,n3,n4,n5,n6,n7,n8],[n1,n2,n3,n4,n5,n6,n7,n8],[n1,n2,n3,n4,n5,n6,n7,n8]]\n edge:[[(n1,n2),(n1,n6),(n1,n7),(n2,n3),(n3,n7),(n3,n5),(n4,n5),(n4,n6),(n4,n8)],[(n1,n2),(n1,n6),(n1,n7),(n2,n3),(n3,n7),(n3,n5),(n4,n5),(n4,n6),(n4,n8)],[(n1,n2),(n1,n6),(n1,n7),(n2,n3),(n3,n7),(n3,n5),(n4,n5),(n4,n6),(n4,n8)],[(n1,n2),(n1,n6),(n1,n7),(n2,n3),(n3,n7),(n3,n5),(n4,n5),(n4,n6),(n4,n8)]]\n value:[[n1,n2,n3,n4,n5,n6,n7,n8],[n1,n2,n3,n4,n5,n6,n7,n8],[n1,n2,n3,n4,n5,n6,n7,n8],[n1,n2,n3,n4,n5,n6,n7,n8]]\n color:[[red,null,null,null,null,null,null,null],[blue,red,null,null,null,null,null,null],[blue,blue,red,null,null,null,null,null],[blue,blue,blue,null,red,null,null,null]]\n arrow:[[start,null,null,null,null,null,null,null],[null,cur,null,null,null,null,null,null],[null,null,cur,null,null,null,null,null],[null,null,null,null,cur,null,null,null]]\n}\ndraw:\npage p:=[0,3] {\nshow dfs[p]\n}"},{id:"task3NumbersOfIslands",title:"Task 3 - Numbers of Islands",userCode:"data:\nmatrix mr1 = {\n structure:[[[0,0,1,0],[0,1,1,0],[1,0,0,0],[0,0,1,1]]]\n color:[[[null,null,red,null]]]\n\n}\ndraw:\npage p:=[0,0] {\nshow mr1[p]\n}"},{id:"task4ValidBrackets",title:"Task 4 - Valid Brackets",userCode:"data:\narray arr = {\n structure:[[{,{,{,},{,},{]]\n}\nstack stk = {\n structure: [[{]]\n}\ndraw:\npage p:=[0,0] {\nshow arr[p]\nshow stk[p]\n}"}],Ea=r(8675),La=r(6836),Ma=r(5073),Oa=r(7853),$a=r(9755);function Ia(t){var e=t.data,r=t.draw;return e.forEach((function(t){switch(t.type){case"array":case"tree":case"linkedlist":case"stack":var e=t.attributes.structure.length;t.attributes.value=t.attributes.value?t.attributes.value:[];for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=Array(e);rn.length||n.splice(o+1,0,n[o].slice())})),console.log("idx: ",r,"\nname: ",i,"\ncomponent_idx_dsl: ",o,"\ncomponent_id_dsl",s,"\nto copy: ",t.data[s],"\nafter copy: ",t.data)})),e.range.end+=1;var s=Da(t);r(s)},sx:{mr:1},size:"small"},n.createElement(Oa.A,{sx:{fontSize:20}}))),n.createElement(A.A,{title:"Remove last Page"},n.createElement(B.A,{disabled:!(o===a)||a<=1,onClick:function(){console.log("remove current page: ",o-1);var t=Ia(i);s((function(t){return t-1}));var e=(0,Ra.rO)(t,o-1),n=e.page_index,a=o-1;e.show.forEach((function(e){var r=e.component_index,i=e.component_name,o=(0,Ra.O4)(r,n,a),s=(0,Ra.el)(t,i),l=t.data[s].attributes;Object.entries(l).forEach((function(t){var e=Ga(t,2),r=e[0],n=e[1];"edge"===r&&o-1<0||n.splice(o,1)}))})),e.range.end-=1;var l=Da(t);r(l)},sx:{mr:1},size:"small"},n.createElement($a.A,{sx:{fontSize:20}}))))),e&&n.createElement(h.A,{component:"form",sx:{"& .MuiTextField-root":{m:1,width:"25ch"},p:"5px 15px"},noValidate:!0,autoComplete:"off"},n.createElement(h.A,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{"& > *":{mr:1},marginBottom:2}},n.createElement(h.A,{display:"flex",alignItems:"center"},n.createElement(K.A,{variant:"overline"},"Current Selection:"),n.createElement(La.A,{label:e.unitID,size:"small",sx:{ml:1}}),n.createElement(La.A,{label:e.componentID,size:"small",sx:{ml:1}}),n.createElement(La.A,{label:e.pageID,size:"small",sx:{ml:1}})),n.createElement(fa.A,{variant:"contained",size:"small",onClick:function(){console.log("query index:",e),console.log("new data:",u);var t=Ha({},i),n=(0,Ra.rO)(t,parseInt(e.pageID.slice(4))),o=n.page_index,a=parseInt(e.pageID.slice(4)),s=n.show[parseInt(e.componentID.slice(10))].component_index,l=n.show[parseInt(e.componentID.slice(10))].component_name,c=(0,Ra.O4)(s,o,a),h=(0,Ra.el)(t,l),d=e.unitID.slice(5),f=t.data[h],p=t.data[h].type,m=f.attributes;switch(p){case"array":case"stack":m.structure[c][parseInt(d)]=""!=u.value?u.value:"null",m.value[c][parseInt(d)]=""!=u.value?u.value:"null",m.color[c][parseInt(d)]=""!=u.color?u.color:"null",m.arrow[c][parseInt(d)]=""!=u.arrow?u.arrow:"null",m.hidden[c][parseInt(d)]=""!=u.hidden?u.hidden:"false";break;case"tree":case"linkedlist":case"graph":m.value[c][parseInt(d)]=""!=u.value?u.value:"null",m.color[c][parseInt(d)]=""!=u.color?u.color:"null",m.arrow[c][parseInt(d)]=""!=u.arrow?u.arrow:"null",m.hidden[c][parseInt(d)]=""!=u.hidden?u.hidden:"false",console.log("debug findSelectedComponentData\n",m);break;case"matrix":var g=parseInt(d.slice(1,-1).split(",")[0]),y=parseInt(d.slice(1,-1).split(",")[1]);m.value[c][g][y]=""!=u.value?u.value:"null",m.color[c][g][y]=""!=u.color?u.color:"null",m.arrow[c][g][y]=""!=u.arrow?u.arrow:"null",m.hidden[c][g][y]=""!=u.hidden?u.hidden:"false";break;default:console.log("GUI EDITOR - findUnitData, no matching component type!")}var b=Da(t);r(b)},sx:{mr:8}},"Update")),n.createElement("div",null,n.createElement("div",null,("graph"==p||"tree"==p||"linkedlist"==p)&&n.createElement(Ma.A,{label:"Id",disabled:"true",id:"outlined-size-small",helperText:"The unit id is unchangeable",value:u.id,size:"small",onChange:function(t){d(Ha(Ha({},u),{},{value:t.target.value}))}}),n.createElement(Ma.A,{label:"Value",id:"outlined-size-small",value:u.value,size:"small",onChange:function(t){d(Ha(Ha({},u),{},{value:t.target.value}))}}),n.createElement(Ma.A,{label:"Unit Color",id:"outlined-size-small",value:u.color,size:"small",onChange:function(t){d(Ha(Ha({},u),{},{color:t.target.value}))}}),n.createElement(Ma.A,{label:"Arrow Label",id:"outlined-size-small",value:u.arrow,size:"small",onChange:function(t){d(Ha(Ha({},u),{},{arrow:t.target.value}))}}),"graph"==p&&n.createElement(Ma.A,{label:"Hidden",id:"outlined-size-small",value:u.hidden,size:"small",onChange:function(t){d(Ha(Ha({},u),{},{hidden:t.target.value}))}})))))};var Xa=r(9794),Za=r(1826),Qa=r(421),ts=r(8803);const es=function(){return n.createElement(Xa.A,{position:"static",sx:{justifyContent:"space-between",flexDirection:"row",padding:"2px 15px",borderBottom:"1px solid #444",backgroundColor:"#000"}},n.createElement(h.A,{display:"flex",flexGrow:1,alignItems:"center"},n.createElement(K.A,{sx:{fontWeight:"bold",textTransform:"uppercase"}},"Intuition Vis")),n.createElement(h.A,{display:"flex"},n.createElement(Za.A,{disableGutters:!0},n.createElement(Qa.Ay,{container:!0,justifyContent:"space-between",alignItems:"center"},n.createElement(B.A,{href:"https://github.com/ETH-PEACH-Lab/intuition-vis-test",target:"_blank",rel:"noreferrer",size:"large"},n.createElement(ts.A,null)),n.createElement(fa.A,{variant:"text",color:"inherit"},"Docs"),n.createElement(fa.A,{variant:"text",color:"inherit"},"Tutorial"),n.createElement(fa.A,{variant:"text",color:"inherit",href:"https://eth-peach-lab.github.io/intuition-visualisation/",target:"_blank"},"Intuition Viewer")))))};function rs(t){return rs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rs(t)}function ns(){ns=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),s=new F(n||[]);return i(a,"_invoke",{value:S(t,r,s)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var d="suspendedStart",f="suspendedYield",p="executing",m="completed",g={};function y(){}function b(){}function _(){}var x={};c(x,a,(function(){return this}));var C=Object.getPrototypeOf,v=C&&C(C(E([])));v&&v!==r&&n.call(v,a)&&(x=v);var w=_.prototype=y.prototype=Object.create(x);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,a,s){var l=h(t[i],t,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==rs(u)&&n.call(u,"__await")?e.resolve(u.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(u).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function S(e,r,n){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var l=K(s,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?m:f,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function K(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,K(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function B(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),B(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;B(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:E(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function is(t,e,r,n,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,i)}function os(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||as(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function as(t,e){if(t){if("string"==typeof t)return ss(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ss(t,e):void 0}}function ss(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0&&r.forEach((function(t){t&&t.style&&(t.style.display="none")})),r&&r.length>0&&r[t].style&&(r[t].style.display="inline")}};(0,n.useEffect)((function(){H()}),[]),(0,n.useEffect)((function(){var t=document.getElementById("preview"),e=0;try{e=t.querySelectorAll("g.page").length}catch(t){console.log("got error when fetching total pages: error")}O(e),R(B-1)}),[I]),(0,n.useEffect)((function(){var t=document.getElementById("preview");if(t&&B<=M){var e=t.querySelectorAll("g.page");e&&e.length>0&&e.forEach((function(t){t&&t.style&&(t.style.display="none")})),e&&e.length>0&&e[B-1].style&&(e[B-1].style.display="inline")}}),[B]),(0,n.useEffect)((function(){try{var t=qa(l);f(t);var e=(0,Ea.G)(t);g(e),R(B-1)}catch(t){g("DSL grammar is incorrect!"),console.log("update mermaid error:\n",t)}}),[l]),(0,n.useEffect)((function(){var t=function(){F(window.currentPage)};return window.addEventListener("pageChange",t),function(){window.removeEventListener("pageChange",t)}}),[]);var W=function(t){var e=t.clientX,r=o,n=function(t){var n=r+t.clientX-e;n>100&&n20){var i=n.shift();document.cookie="".concat(i.timestamp,"=; max-age=0; path=/"),localStorage.removeItem("diagram_".concat(i.timestamp))}return n.sort((function(t,e){return new Date(e.timestamp)-new Date(t.timestamp)})),n}));var n,i,o,a="\nuserCode:\n\n".concat(l,"\n\nmermaidCode:\n\n").concat(m,"\n\ntimestamp:\n\n").concat(t,"\n ");n="".concat(e,".txt"),i=new Blob([a],{type:"text/plain"}),(o=document.createElement("a")).download=n,o.href=URL.createObjectURL(i),document.body.appendChild(o),o.click(),URL.revokeObjectURL(o.href),document.body.removeChild(o),alert("Diagram saved successfully!")},mermaidRef:z,updateInspector:Y,totalPages:M,setTotalPages:O,setSvgContent:D,currentPage:B,setCurrentPage:F}),n.createElement(Ja,{inspectorIndex:S,setCode1:c,parsedCode1:d,setParsedCode1:f,code1:l,currentPage:B,totalPages:M,setCurrentPage:F,setTotalPages:O,dslEditorEditable:P,setDslEditorEditable:j})))))))))};var cs=document.getElementById("app");(0,i.H)(cs).render(n.createElement(n.StrictMode,null,n.createElement(o.A,{theme:c},n.createElement(a.Ay,null),n.createElement(ls,null))))},3026:t=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(t,r,n){return(r=function(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function n(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0&&e.push(n(e[e.length-1])):e.push(t[r][0]);return e}function o(t){var e={id:null,value:null,color:null,arrow:null,hidden:null};return t.forEach((function(t){var r=Object.keys(t)[0],n=t[r];e[r]=n})),e}var a={Lexer:void 0,ParserRules:[{name:"main$string$1",symbols:[{literal:"d"},{literal:"a"},{literal:"t"},{literal:"a"},{literal:":"}],postprocess:function(t){return t.join("")}},{name:"main$string$2",symbols:[{literal:"d"},{literal:"r"},{literal:"a"},{literal:"w"},{literal:":"}],postprocess:function(t){return t.join("")}},{name:"main",symbols:["_","main$string$1","_","data_entries","_","main$string$2","draw_section","_"],postprocess:function(t){var e={data:t[3]};return e.draw=t[6],e}},{name:"draw_section$ebnf$1",symbols:["draw_entry"]},{name:"draw_section$ebnf$1",symbols:["draw_section$ebnf$1","draw_entry"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"draw_section",symbols:["draw_section$ebnf$1"],postprocess:function(t){return t[0]}},{name:"draw_entry",symbols:["page_entry"],postprocess:function(t){return t[0]}},{name:"page_entry$string$1",symbols:[{literal:"p"},{literal:"a"},{literal:"g"},{literal:"e"}],postprocess:function(t){return t.join("")}},{name:"page_entry$string$2",symbols:[{literal:":"},{literal:"="}],postprocess:function(t){return t.join("")}},{name:"page_entry$ebnf$1$subexpression$1",symbols:["_","show_entry"]},{name:"page_entry$ebnf$1",symbols:["page_entry$ebnf$1$subexpression$1"]},{name:"page_entry$ebnf$1$subexpression$2",symbols:["_","show_entry"]},{name:"page_entry$ebnf$1",symbols:["page_entry$ebnf$1","page_entry$ebnf$1$subexpression$2"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"page_entry",symbols:["_","page_entry$string$1","_","page_index","_","page_entry$string$2","_","range_entry","_",{literal:"{"},"page_entry$ebnf$1","_",{literal:"}"}],postprocess:function(t){var e={};return e.page_index=t[3][0],e.range=t[7],e.show=t[10].map((function(t){return t[1]})),e}},{name:"range_entry",symbols:[{literal:"["},"_","number","_",{literal:","},"_","number","_",{literal:"]"}],postprocess:function(t){return{start:t[2],end:t[6]}}},{name:"page_index",symbols:["alphanum"]},{name:"show_entry$string$1",symbols:[{literal:"s"},{literal:"h"},{literal:"o"},{literal:"w"}],postprocess:function(t){return t.join("")}},{name:"show_entry",symbols:["show_entry$string$1","_","component_name",{literal:"["},"component_index",{literal:"]"}],postprocess:function(t){return{component_name:t[2][0],component_index:t[4]}}},{name:"component_index$ebnf$1",symbols:[/[A-Za-z0-9\-\+\*/]/]},{name:"component_index$ebnf$1",symbols:["component_index$ebnf$1",/[A-Za-z0-9\-\+\*/]/],postprocess:function(t){return t[0].concat([t[1]])}},{name:"component_index",symbols:["component_index$ebnf$1"],postprocess:function(t){return t[0].join("")}},{name:"component_name",symbols:["alphanum"]},{name:"data_entries$ebnf$1$subexpression$1",symbols:["_","data_entry"]},{name:"data_entries$ebnf$1",symbols:["data_entries$ebnf$1$subexpression$1"]},{name:"data_entries$ebnf$1$subexpression$2",symbols:["_","data_entry"]},{name:"data_entries$ebnf$1",symbols:["data_entries$ebnf$1","data_entries$ebnf$1$subexpression$2"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"data_entries",symbols:["data_entries$ebnf$1"],postprocess:function(t){return t[0].map((function(t){return t[1]}))}},{name:"data_entry$ebnf$1",symbols:["all_type_description"]},{name:"data_entry$ebnf$1",symbols:["data_entry$ebnf$1","all_type_description"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"data_entry",symbols:["data_type","_","var_name","_",{literal:"="},"_",{literal:"{"},"data_entry$ebnf$1","_",{literal:"}"}],postprocess:function(t){switch(t[0][0]){case"array":var e={type:t[0][0],name:t[2]};return e.attributes=o(t[7].map((function(t){return t[0]}))),e;case"stack":var r={type:t[0][0],name:t[2]};return r.attributes=o(t[7].map((function(t){return t[0]}))),r;case"tree":var n={type:t[0][0],name:t[2]};return n.attributes=o(t[7].map((function(t){return t[0]}))),n;case"linkedlist":var i={type:t[0][0],name:t[2]};return i.attributes=o(t[7].map((function(t){return t[0]}))),i;case"matrix":var a={type:t[0][0],name:t[2],processed_data:t[7].map((function(t){return t[0]}))};return a.attributes=o(a.processed_data),a;case"graph":var s={type:t[0][0],name:t[2]};return s.attributes=o(t[7].map((function(t){return t[0]}))),s;default:return}}},{name:"all_type_description",symbols:["data_description"]},{name:"all_type_description",symbols:["matrix_description"],postprocess:function(t){return e=t,(r=[]).concat.apply(r,n(e));var e,r}},{name:"matrix_description",symbols:["_","attribute_name","_",{literal:":"},"_",{literal:"["},"_","matrix_components","_",{literal:"]"}],postprocess:function(t){return r({},t[1][0],i(t[7]))}},{name:"matrix_components$ebnf$1",symbols:[]},{name:"matrix_components$ebnf$1$subexpression$1",symbols:["_",{literal:","},"_","matrix_component_or_star"]},{name:"matrix_components$ebnf$1",symbols:["matrix_components$ebnf$1","matrix_components$ebnf$1$subexpression$1"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"matrix_components",symbols:["matrix_component_or_star","matrix_components$ebnf$1"],postprocess:function(t){return[t[0]].concat(t[1].map((function(t){return t[3]})))}},{name:"matrix_component_or_star",symbols:["matrix_component"]},{name:"matrix_component_or_star",symbols:[{literal:"*"}],postprocess:function(t){return"*"===t[0]?"*":t[0]}},{name:"matrix_component",symbols:[{literal:"["},"matrix_rows",{literal:"]"}],postprocess:function(t){return t[1]}},{name:"matrix_rows$ebnf$1",symbols:[]},{name:"matrix_rows$ebnf$1$subexpression$1",symbols:[{literal:","},"_","matrix_row"]},{name:"matrix_rows$ebnf$1",symbols:["matrix_rows$ebnf$1","matrix_rows$ebnf$1$subexpression$1"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"matrix_rows",symbols:["matrix_row","_","matrix_rows$ebnf$1"],postprocess:function(t){return[t[0]].concat(t[2].map((function(t){return t[2]})))}},{name:"matrix_row$ebnf$1",symbols:[]},{name:"matrix_row$ebnf$1$subexpression$1",symbols:[{literal:","},"_","value"]},{name:"matrix_row$ebnf$1",symbols:["matrix_row$ebnf$1","matrix_row$ebnf$1$subexpression$1"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"matrix_row",symbols:["_",{literal:"["},"value","_","matrix_row$ebnf$1",{literal:"]"}],postprocess:function(t){return[t[2][0]].concat(t[4].map((function(t){return t[2][0]})))}},{name:"data_type$string$1",symbols:[{literal:"a"},{literal:"r"},{literal:"r"},{literal:"a"},{literal:"y"}],postprocess:function(t){return t.join("")}},{name:"data_type",symbols:["data_type$string$1"]},{name:"data_type$string$2",symbols:[{literal:"s"},{literal:"t"},{literal:"a"},{literal:"c"},{literal:"k"}],postprocess:function(t){return t.join("")}},{name:"data_type",symbols:["data_type$string$2"]},{name:"data_type$string$3",symbols:[{literal:"l"},{literal:"i"},{literal:"n"},{literal:"k"},{literal:"e"},{literal:"d"},{literal:"l"},{literal:"i"},{literal:"s"},{literal:"t"}],postprocess:function(t){return t.join("")}},{name:"data_type",symbols:["data_type$string$3"]},{name:"data_type$string$4",symbols:[{literal:"t"},{literal:"r"},{literal:"e"},{literal:"e"}],postprocess:function(t){return t.join("")}},{name:"data_type",symbols:["data_type$string$4"]},{name:"data_type$string$5",symbols:[{literal:"m"},{literal:"a"},{literal:"t"},{literal:"r"},{literal:"i"},{literal:"x"}],postprocess:function(t){return t.join("")}},{name:"data_type",symbols:["data_type$string$5"]},{name:"data_type$string$6",symbols:[{literal:"g"},{literal:"r"},{literal:"a"},{literal:"p"},{literal:"h"}],postprocess:function(t){return t.join("")}},{name:"data_type",symbols:["data_type$string$6"]},{name:"var_name$ebnf$1",symbols:[/[a-zA-Z0-9]/]},{name:"var_name$ebnf$1",symbols:["var_name$ebnf$1",/[a-zA-Z0-9]/],postprocess:function(t){return t[0].concat([t[1]])}},{name:"var_name",symbols:["var_name$ebnf$1"],postprocess:function(t){return t[0].join("").replace(",","")}},{name:"data_description",symbols:["_","attribute_name","_",{literal:":"},"_",{literal:"["},"_","data_rows","_",{literal:"]"}],postprocess:function(t){return r({},t[1][0],i(t[7]))}},{name:"attribute_name",symbols:["alphanum"]},{name:"data_rows$ebnf$1",symbols:[]},{name:"data_rows$ebnf$1$subexpression$1",symbols:[{literal:","},"_","data_row_or_star"]},{name:"data_rows$ebnf$1",symbols:["data_rows$ebnf$1","data_rows$ebnf$1$subexpression$1"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"data_rows",symbols:["data_row_or_star","_","data_rows$ebnf$1"],postprocess:function(t){return[t[0]].concat(t[2].map((function(t){return t[2]})))}},{name:"data_row_or_star",symbols:["data_row"]},{name:"data_row_or_star",symbols:[{literal:"*"}],postprocess:function(t){return"*"===t[0]?"*":t[0]}},{name:"data_row",symbols:[{literal:"["},"_","value_edge_list","_",{literal:"]"}],postprocess:function(t){return"object"==e(t[2][0])?t[2][0]:t[2]}},{name:"value_edge_list",symbols:["edge_list"]},{name:"value_edge_list",symbols:["value_list"],postprocess:function(t){return t[0]}},{name:"value_list$ebnf$1",symbols:[]},{name:"value_list$ebnf$1$subexpression$1",symbols:[{literal:","},"_","value"]},{name:"value_list$ebnf$1",symbols:["value_list$ebnf$1","value_list$ebnf$1$subexpression$1"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"value_list",symbols:["value","_","value_list$ebnf$1"],postprocess:function(t){return[t[0][0]].concat(t[2].map((function(t){return t[2][0]})))}},{name:"edge_list$ebnf$1",symbols:[]},{name:"edge_list$ebnf$1$subexpression$1",symbols:[{literal:","},"_","edge"]},{name:"edge_list$ebnf$1",symbols:["edge_list$ebnf$1","edge_list$ebnf$1$subexpression$1"],postprocess:function(t){return t[0].concat([t[1]])}},{name:"edge_list",symbols:["edge","_","edge_list$ebnf$1"],postprocess:function(t){return[t[0]].concat(t[2].map((function(t){return t[2]})))}},{name:"edge",symbols:[{literal:"("},"_","value","_",{literal:","},"_","value","_",{literal:")"}],postprocess:function(t){return{startPoint:t[2],endPoint:t[6]}}},{name:"value",symbols:["alphanum"]},{name:"number$ebnf$1",symbols:[/[0-9]/]},{name:"number$ebnf$1",symbols:["number$ebnf$1",/[0-9]/],postprocess:function(t){return t[0].concat([t[1]])}},{name:"number",symbols:["number$ebnf$1"],postprocess:function(t){return parseInt(t[0].join(""),10)}},{name:"alphanum$ebnf$1",symbols:[/[a-zA-Z0-9\/\\\{\}<>#@$&|]/]},{name:"alphanum$ebnf$1",symbols:["alphanum$ebnf$1",/[a-zA-Z0-9\/\\\{\}<>#@$&|]/],postprocess:function(t){return t[0].concat([t[1]])}},{name:"alphanum",symbols:["alphanum$ebnf$1"],postprocess:function(t){return t[0].join("")}},{name:"_$ebnf$1",symbols:[]},{name:"_$ebnf$1",symbols:["_$ebnf$1",/[ \t\n\r]/],postprocess:function(t){return t[0].concat([t[1]])}},{name:"_",symbols:["_$ebnf$1"]}],ParserStart:"main"};void 0!==t.exports?t.exports=a:window.grammar=a}()},9038:(t,e,r)=>{"use strict";function n(t){let e="array\n@\n";const r=t.attributes.structure,n=t.attributes.color||[],i=t.attributes.value||[],o=t.attributes.arrow||[];for(let t=0;tn})},6205:(t,e,r)=>{"use strict";function n(t){let e="graph\n@";const r=t.attributes.id,n=t.attributes.edge||[],i=t.attributes.value||[],o=t.attributes.color||[],a=t.attributes.arrow||[],s=t.attributes.hidden||[];for(let t=0;tn})},2936:(t,e,r)=>{"use strict";function n(t){let e="linkedList\n@\n";const r=t.attributes.structure,n=t.attributes.value||[],i=t.attributes.color||[],o=t.attributes.arrow||[];for(let t=0;tn})},4724:(t,e,r)=>{"use strict";function n(t){let e="matrix\n@";const r=t.attributes.structure,n=t.attributes.color||[],i=t.attributes.arrow||[];for(let t=0;tn})},6665:(t,e,r)=>{"use strict";function n(t){let e="stack\n";e+="size: 7\n",e+="@\n";const r=t.attributes.structure,n=t.attributes.color||[],i=t.attributes.arrow||[];for(let t=0;tn})},6835:(t,e,r)=>{"use strict";function n(t){let e="tree\n@";return e+=function(t,e,r,n){if(!t||0===t.length)return"";let i=[{node:t[0],index:0}],o="";for(;i.length>0;){let a=i.shift(),s=a.node,l=a.index;if("none"===s)o+="\nNone:[None,None]";else{let a=2*l+1,c=2*l+2,u=an})},8675:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{G:()=>convertParsedDSLtoMermaid});var _parser_test_mjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(7484),_generateArray_mjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9038),_generateLinkedlist_mjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(2936),_generateStack_mjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(6665),_generateTree_mjs__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(6835),_generateMatrix_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(4724),_generateGraph_mjs__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(6205);function convertDSLtoMermaid(t){const e=(0,_parser_test_mjs__WEBPACK_IMPORTED_MODULE_0__.n)(t),r=e.data,n=e.draw;let i={};n.forEach((t=>{const e=t.page_index,n=t.range.start,o=t.range.end,a=t.show;for(let t=n;t{let a=o.component_index,s=o.component_name,l=calculateIndex(e,t,a),c=findItemByComponentNameAndIndex(r,s,l);i[`page${t}`][`component_${n}`]={type:c.type,name:s,index:l,attributes:c.attributes},n+=1}))}}));let o="visual\n";const a=Object.keys(i);for(const t of a){o+="page\n";const e=Object.keys(i[t]);for(const r of e){const e=i[t][r];switch(e.type){case"array":o+=(0,_generateArray_mjs__WEBPACK_IMPORTED_MODULE_1__.b)(e);break;case"linkedlist":o+=(0,_generateLinkedlist_mjs__WEBPACK_IMPORTED_MODULE_2__.$)(e);break;case"stack":o+=(0,_generateStack_mjs__WEBPACK_IMPORTED_MODULE_3__.a)(e);break;case"tree":o+=(0,_generateTree_mjs__WEBPACK_IMPORTED_MODULE_4__.w)(e);break;case"matrix":o+=(0,_generateMatrix_mjs__WEBPACK_IMPORTED_MODULE_5__.z)(e);break;case"graph":o+=(0,_generateGraph_mjs__WEBPACK_IMPORTED_MODULE_6__.q)(e);break;default:console.log(`compiler error! no matching componenet type: ${e.type}!`)}}}return o}function convertParsedDSLtoMermaid(t){const e=t.data,r=t.draw;let n={};r.forEach((t=>{const r=t.page_index,i=t.range.start,o=t.range.end,a=t.show;for(let t=i;t{let a=o.component_index,s=o.component_name,l=calculateIndex(r,t,a),c=findItemByComponentNameAndIndex(e,s,l);n[`page${t}`][`component_${i}`]={type:c.type,name:s,index:l,attributes:c.attributes},i+=1}))}}));let i="visual\n";const o=Object.keys(n);for(const t of o){i+="page\n";const e=Object.keys(n[t]);for(const r of e){const e=n[t][r];switch(e.type){case"array":i+=(0,_generateArray_mjs__WEBPACK_IMPORTED_MODULE_1__.b)(e);break;case"linkedlist":i+=(0,_generateLinkedlist_mjs__WEBPACK_IMPORTED_MODULE_2__.$)(e);break;case"stack":i+=(0,_generateStack_mjs__WEBPACK_IMPORTED_MODULE_3__.a)(e);break;case"tree":i+=(0,_generateTree_mjs__WEBPACK_IMPORTED_MODULE_4__.w)(e);break;case"matrix":i+=(0,_generateMatrix_mjs__WEBPACK_IMPORTED_MODULE_5__.z)(e);break;case"graph":i+=(0,_generateGraph_mjs__WEBPACK_IMPORTED_MODULE_6__.q)(e);break;default:console.log(`compiler error! no matching componenet type: ${e.type}!`)}}}return i}function calculateIndex(variableName,variableValue,expression){const regex=new RegExp(`\\b${variableName}\\b`,"g"),replacedExpression=expression.replace(regex,variableValue);try{const result=eval(replacedExpression);return result}catch(t){return console.error("Error evaluating expression:",t),null}}function findItemByComponentNameAndIndex(t,e,r){for(const n of t)if(n.name===e){const t={};for(const[e,i]of Object.entries(n.attributes))Array.isArray(i)?t[e]=i[r]||null:t[e]=i;return{type:n.type,attributes:t}}return console.log(`name: ${e} matches no entries!`),null}},389:(t,e,r)=>{"use strict";r.d(e,{D:()=>i});var n=r(772),i=(0,r(6009).K2)((t=>{const{securityLevel:e}=(0,n.D7)();let r=(0,n.df)("body");if("sandbox"===e){const e=(0,n.df)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,n.df)(i.body)}return r.select(`#${t}`)}),"selectSvgElement")},3615:(t,e,r)=>{"use strict";r.d(e,{St:()=>l,Xy:()=>k,_S:()=>K,zZ:()=>h});var n=r(8605),i=r(6009),o=(0,n.To)(Object.keys,Object),a=Object.prototype.hasOwnProperty;function s(t){if(!(0,n.HI)(t))return o(t);var e=[];for(var r in Object(t))a.call(t,r)&&"constructor"!=r&&e.push(r);return e}(0,i.K2)(s,"baseKeys");var l=s,c=(0,n.On)(n.DA,"DataView"),u=(0,n.On)(n.DA,"Promise"),h=(0,n.On)(n.DA,"Set"),d=(0,n.On)(n.DA,"WeakMap"),f="[object Map]",p="[object Promise]",m="[object Set]",g="[object WeakMap]",y="[object DataView]",b=(0,n.$q)(c),_=(0,n.$q)(n.zI),x=(0,n.$q)(u),C=(0,n.$q)(h),v=(0,n.$q)(d),w=n.GT;(c&&w(new c(new ArrayBuffer(1)))!=y||n.zI&&w(new n.zI)!=f||u&&w(u.resolve())!=p||h&&w(new h)!=m||d&&w(new d)!=g)&&(w=(0,i.K2)((function(t){var e=(0,n.GT)(t),r="[object Object]"==e?t.constructor:void 0,i=r?(0,n.$q)(r):"";if(i)switch(i){case b:return y;case _:return f;case x:return p;case C:return m;case v:return g}return e}),"getTag"));var k=w,T=Object.prototype.hasOwnProperty;function S(t){if(null==t)return!0;if((0,n.lr)(t)&&((0,n._i)(t)||"string"==typeof t||"function"==typeof t.splice||(0,n.NY)(t)||(0,n.aB)(t)||(0,n.Th)(t)))return!t.length;var e=k(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,n.HI)(t))return!l(t).length;for(var r in t)if(T.call(t,r))return!1;return!0}(0,i.K2)(S,"isEmpty");var K=S},6404:(t,e,r)=>{"use strict";function n(t){for(var e=[],r=1;rn}),(0,r(6009).K2)(n,"dedent")},772:(t,e,r)=>{"use strict";r.d(e,{$i:()=>pt,A0:()=>No,AB:()=>_s,AS:()=>Zc,Ag:()=>ds,B6:()=>wt,Bp:()=>gu,C0:()=>p,Ch:()=>g,D6:()=>bu,D7:()=>Be,DB:()=>d,DC:()=>Ys,Dl:()=>ie,EI:()=>we,EJ:()=>h,Ed:()=>R,Gh:()=>qu,Gs:()=>De,Gu:()=>Cs,H$:()=>lt,H1:()=>$t,He:()=>c,IE:()=>pa,IU:()=>xe,J$:()=>_,J1:()=>hu,J9:()=>Fu,JW:()=>af,Jj:()=>Tu,Jl:()=>Lu,Jp:()=>Cu,Js:()=>Ie,Ko:()=>Vu,MC:()=>_c,ME:()=>Ee,Mo:()=>vs,NN:()=>Au,Nk:()=>Ru,P$:()=>it,PG:()=>xs,Ps:()=>Ju,Q2:()=>kt,QO:()=>Xt,Rc:()=>cs,Rm:()=>l,SV:()=>Ce,T9:()=>Pe,TU:()=>ws,UA:()=>ps,UI:()=>ft,UU:()=>Ct,Ug:()=>U,Ui:()=>Ms,VJ:()=>oe,Wi:()=>ne,Wt:()=>me,XV:()=>Fe,Xd:()=>y,Y2:()=>ae,Y7:()=>Hu,YA:()=>ki,YP:()=>bs,ZY:()=>i,_3:()=>Gt,a$:()=>ce,ab:()=>Se,cL:()=>Bt,cw:()=>j,dJ:()=>su,df:()=>wi,ds:()=>P,eI:()=>Tt,f2:()=>ou,gK:()=>o,h$:()=>pu,hH:()=>C,iN:()=>ve,jU:()=>wu,jZ:()=>zt,jk:()=>je,kB:()=>gc,ke:()=>Te,kl:()=>lu,l7:()=>Cr,m7:()=>ke,mW:()=>m,mc:()=>H,mj:()=>Me,ot:()=>ue,pG:()=>ru,rG:()=>ks,sb:()=>gt,sn:()=>Za,tM:()=>pe,tl:()=>xr,wX:()=>us,wZ:()=>vt,xA:()=>At,yF:()=>Ou,yp:()=>yc,yr:()=>rs,z1:()=>Gu,zj:()=>St,zp:()=>Jc});var n=r(6009),i=(0,n.P$)({"../../node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/dayjs.min.js"(t,e){var r,i;r=t,i=function(){var t=6e4,e=36e5,r="millisecond",i="second",o="minute",a="hour",s="day",l="week",c="month",u="quarter",h="year",d="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,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(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},y=(0,n.K2)((function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t}),"m"),b={s:y,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),i=r%60;return(e<=0?"+":"-")+y(n,2,"0")+":"+y(i,2,"0")},m:(0,n.K2)((function t(e,r){if(e.date()1)return t(a[0])}else{var s=e.name;x[s]=e,i=s}return!n&&i&&(_=i),i||!n&&_}),"t"),k=(0,n.K2)((function(t,e){if(v(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new S(r)}),"O"),T=b;T.l=w,T.i=v,T.w=function(t,e){return k(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function g(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[C]=!0}(0,n.K2)(g,"M");var y=g.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(T.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(p);if(n){var i=n[2]-1||0,o=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return T},y.isValid=function(){return!(this.$d.toString()===f)},y.isSame=function(t,e){var r=k(t);return this.startOf(e)<=r&&r<=this.endOf(e)},y.isAfter=function(t,e){return k(t)1?r-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:p;e&&e(t,null);let o=n.length;for(;o--;){let e=n[o];if("string"==typeof e){const t=i(e);t!==e&&(r(n)||(n[o]=t),e=t)}t[e]=!0}return t}function S(t){for(let e=0;e/gm),q=s(/\${[\w\W]*}/gm),R=s(/^data-[\-\w.\u00B7-\uFFFF]/),W=s(/^aria-[\-\w]+$/),U=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=s(/^(?:\w+script|data):/i),Y=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G=s(/^html$/i),V=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var J=Object.freeze({__proto__:null,MUSTACHE_EXPR:j,ERB_EXPR:z,TMPLIT_EXPR:q,DATA_ATTR:R,ARIA_ATTR:W,IS_ALLOWED_URI:U,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:Y,DOCTYPE_NAME:G,CUSTOM_ELEMENT:V});const X=(0,n.K2)((function(){return"undefined"==typeof window?null:window}),"getGlobal"),Z=(0,n.K2)((function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(r=e.getAttribute(n));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}),"_createTrustedTypesPolicy");function Q(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const r=(0,n.K2)((t=>Q(t)),"DOMPurify");if(r.version="3.1.2",r.removed=[],!e||!e.document||9!==e.document.nodeType)return r.isSupported=!1,r;let{document:i}=e;const o=i,s=o.currentScript,{DocumentFragment:c,HTMLTemplateElement:u,Node:w,Element:k,NodeFilter:S,NamedNodeMap:j=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:z,DOMParser:q,trustedTypes:R}=e,W=k.prototype,H=A(W,"cloneNode"),Y=A(W,"nextSibling"),V=A(W,"childNodes"),tt=A(W,"parentNode");if("function"==typeof u){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let et,rt="";const{implementation:nt,createNodeIterator:it,createDocumentFragment:ot,getElementsByTagName:at}=i,{importNode:st}=o;let lt={};r.isSupported="function"==typeof t&&"function"==typeof tt&&nt&&void 0!==nt.createHTMLDocument;const{MUSTACHE_EXPR:ct,ERB_EXPR:ut,TMPLIT_EXPR:ht,DATA_ATTR:dt,ARIA_ATTR:ft,IS_SCRIPT_OR_DATA:pt,ATTR_WHITESPACE:mt,CUSTOM_ELEMENT:gt}=J;let{IS_ALLOWED_URI:yt}=J,bt=null;const _t=T({},[...B,...F,...E,...M,...$]);let xt=null;const Ct=T({},[...I,...D,...N,...P]);let vt=Object.seal(l(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}})),wt=null,kt=null,Tt=!0,St=!0,Kt=!1,At=!0,Bt=!1,Ft=!0,Et=!1,Lt=!1,Mt=!1,Ot=!1,$t=!1,It=!1,Dt=!0,Nt=!1,Pt=!0,jt=!1,zt={},qt=null;const Rt=T({},["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 Wt=null;const Ut=T({},["audio","video","img","source","image","track"]);let Ht=null;const Yt=T({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Gt="http://www.w3.org/1998/Math/MathML",Vt="http://www.w3.org/2000/svg",Jt="http://www.w3.org/1999/xhtml";let Xt=Jt,Zt=!1,Qt=null;const te=T({},[Gt,Vt,Jt],m);let ee=null;const re=["application/xhtml+xml","text/html"];let ne=null,ie=null;const oe=i.createElement("form"),ae=(0,n.K2)((function(t){return t instanceof RegExp||t instanceof Function}),"isRegexOrFunction"),se=(0,n.K2)((function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ie||ie!==t){if(t&&"object"==typeof t||(t={}),t=K(t),ee=-1===re.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,ne="application/xhtml+xml"===ee?m:p,bt=x(t,"ALLOWED_TAGS")?T({},t.ALLOWED_TAGS,ne):_t,xt=x(t,"ALLOWED_ATTR")?T({},t.ALLOWED_ATTR,ne):Ct,Qt=x(t,"ALLOWED_NAMESPACES")?T({},t.ALLOWED_NAMESPACES,m):te,Ht=x(t,"ADD_URI_SAFE_ATTR")?T(K(Yt),t.ADD_URI_SAFE_ATTR,ne):Yt,Wt=x(t,"ADD_DATA_URI_TAGS")?T(K(Ut),t.ADD_DATA_URI_TAGS,ne):Ut,qt=x(t,"FORBID_CONTENTS")?T({},t.FORBID_CONTENTS,ne):Rt,wt=x(t,"FORBID_TAGS")?T({},t.FORBID_TAGS,ne):{},kt=x(t,"FORBID_ATTR")?T({},t.FORBID_ATTR,ne):{},zt=!!x(t,"USE_PROFILES")&&t.USE_PROFILES,Tt=!1!==t.ALLOW_ARIA_ATTR,St=!1!==t.ALLOW_DATA_ATTR,Kt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,At=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Bt=t.SAFE_FOR_TEMPLATES||!1,Ft=!1!==t.SAFE_FOR_XML,Et=t.WHOLE_DOCUMENT||!1,Ot=t.RETURN_DOM||!1,$t=t.RETURN_DOM_FRAGMENT||!1,It=t.RETURN_TRUSTED_TYPE||!1,Mt=t.FORCE_BODY||!1,Dt=!1!==t.SANITIZE_DOM,Nt=t.SANITIZE_NAMED_PROPS||!1,Pt=!1!==t.KEEP_CONTENT,jt=t.IN_PLACE||!1,yt=t.ALLOWED_URI_REGEXP||U,Xt=t.NAMESPACE||Jt,vt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ae(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(vt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ae(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(vt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(vt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Bt&&(St=!1),$t&&(Ot=!0),zt&&(bt=T({},$),xt=[],!0===zt.html&&(T(bt,B),T(xt,I)),!0===zt.svg&&(T(bt,F),T(xt,D),T(xt,P)),!0===zt.svgFilters&&(T(bt,E),T(xt,D),T(xt,P)),!0===zt.mathMl&&(T(bt,M),T(xt,N),T(xt,P))),t.ADD_TAGS&&(bt===_t&&(bt=K(bt)),T(bt,t.ADD_TAGS,ne)),t.ADD_ATTR&&(xt===Ct&&(xt=K(xt)),T(xt,t.ADD_ATTR,ne)),t.ADD_URI_SAFE_ATTR&&T(Ht,t.ADD_URI_SAFE_ATTR,ne),t.FORBID_CONTENTS&&(qt===Rt&&(qt=K(qt)),T(qt,t.FORBID_CONTENTS,ne)),Pt&&(bt["#text"]=!0),Et&&T(bt,["html","head","body"]),bt.table&&(T(bt,["tbody"]),delete wt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');et=t.TRUSTED_TYPES_POLICY,rt=et.createHTML("")}else void 0===et&&(et=Z(R,s)),null!==et&&"string"==typeof rt&&(rt=et.createHTML(""));a&&a(t),ie=t}}),"_parseConfig"),le=T({},["mi","mo","mn","ms","mtext"]),ce=T({},["foreignobject","annotation-xml"]),ue=T({},["title","style","font","a","script"]),he=T({},[...F,...E,...L]),de=T({},[...M,...O]),fe=(0,n.K2)((function(t){let e=tt(t);e&&e.tagName||(e={namespaceURI:Xt,tagName:"template"});const r=p(t.tagName),n=p(e.tagName);return!!Qt[t.namespaceURI]&&(t.namespaceURI===Vt?e.namespaceURI===Jt?"svg"===r:e.namespaceURI===Gt?"svg"===r&&("annotation-xml"===n||le[n]):Boolean(he[r]):t.namespaceURI===Gt?e.namespaceURI===Jt?"math"===r:e.namespaceURI===Vt?"math"===r&&ce[n]:Boolean(de[r]):t.namespaceURI===Jt?!(e.namespaceURI===Vt&&!ce[n])&&!(e.namespaceURI===Gt&&!le[n])&&!de[r]&&(ue[r]||!he[r]):!("application/xhtml+xml"!==ee||!Qt[t.namespaceURI]))}),"_checkValidNamespace"),pe=(0,n.K2)((function(t){f(r.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.remove()}}),"_forceRemove"),me=(0,n.K2)((function(t,e){try{f(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){f(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!xt[t])if(Ot||$t)try{pe(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}}),"_removeAttribute"),ge=(0,n.K2)((function(t){let e=null,r=null;if(Mt)t=""+t;else{const e=g(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===ee&&Xt===Jt&&(t=''+t+"");const n=et?et.createHTML(t):t;if(Xt===Jt)try{e=(new q).parseFromString(n,ee)}catch(t){}if(!e||!e.documentElement){e=nt.createDocument(Xt,"template",null);try{e.documentElement.innerHTML=Zt?rt:n}catch(t){}}const o=e.body||e.documentElement;return t&&r&&o.insertBefore(i.createTextNode(r),o.childNodes[0]||null),Xt===Jt?at.call(e,Et?"html":"body")[0]:Et?e.documentElement:o}),"_initDocument"),ye=(0,n.K2)((function(t){return it.call(t.ownerDocument||t,t,S.SHOW_ELEMENT|S.SHOW_COMMENT|S.SHOW_TEXT|S.SHOW_PROCESSING_INSTRUCTION|S.SHOW_CDATA_SECTION,null)}),"_createNodeIterator"),be=(0,n.K2)((function(t){return t instanceof z&&(void 0!==t.__depth&&"number"!=typeof t.__depth||void 0!==t.__removalCount&&"number"!=typeof t.__removalCount||"string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof j)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)}),"_isClobbered"),_e=(0,n.K2)((function(t){return"function"==typeof w&&t instanceof w}),"_isNode"),xe=(0,n.K2)((function(t,e,n){lt[t]&&h(lt[t],(t=>{t.call(r,e,n,ie)}))}),"_executeHook"),Ce=(0,n.K2)((function(t){let e=null;if(xe("beforeSanitizeElements",t,null),be(t))return pe(t),!0;const n=ne(t.nodeName);if(xe("uponSanitizeElement",t,{tagName:n,allowedTags:bt}),t.hasChildNodes()&&!_e(t.firstElementChild)&&C(/<[/\w]/g,t.innerHTML)&&C(/<[/\w]/g,t.textContent))return pe(t),!0;if(7===t.nodeType)return pe(t),!0;if(Ft&&8===t.nodeType&&C(/<[/\w]/g,t.data))return pe(t),!0;if(!bt[n]||wt[n]){if(!wt[n]&&we(n)){if(vt.tagNameCheck instanceof RegExp&&C(vt.tagNameCheck,n))return!1;if(vt.tagNameCheck instanceof Function&&vt.tagNameCheck(n))return!1}if(Pt&&!qt[n]){const e=tt(t)||t.parentNode,r=V(t)||t.childNodes;if(r&&e)for(let n=r.length-1;n>=0;--n){const i=H(r[n],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,Y(t))}}return pe(t),!0}return t instanceof k&&!fe(t)?(pe(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!C(/<\/no(script|embed|frames)/i,t.innerHTML)?(Bt&&3===t.nodeType&&(e=t.textContent,h([ct,ut,ht],(t=>{e=y(e,t," ")})),t.textContent!==e&&(f(r.removed,{element:t.cloneNode()}),t.textContent=e)),xe("afterSanitizeElements",t,null),!1):(pe(t),!0)}),"_sanitizeElements"),ve=(0,n.K2)((function(t,e,r){if(Dt&&("id"===e||"name"===e)&&(r in i||r in oe))return!1;if(St&&!kt[e]&&C(dt,e));else if(Tt&&C(ft,e));else if(!xt[e]||kt[e]){if(!(we(t)&&(vt.tagNameCheck instanceof RegExp&&C(vt.tagNameCheck,t)||vt.tagNameCheck instanceof Function&&vt.tagNameCheck(t))&&(vt.attributeNameCheck instanceof RegExp&&C(vt.attributeNameCheck,e)||vt.attributeNameCheck instanceof Function&&vt.attributeNameCheck(e))||"is"===e&&vt.allowCustomizedBuiltInElements&&(vt.tagNameCheck instanceof RegExp&&C(vt.tagNameCheck,r)||vt.tagNameCheck instanceof Function&&vt.tagNameCheck(r))))return!1}else if(Ht[e]);else if(C(yt,y(r,mt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==b(r,"data:")||!Wt[t])if(Kt&&!C(pt,y(r,mt,"")));else if(r)return!1;return!0}),"_isValidAttribute"),we=(0,n.K2)((function(t){return"annotation-xml"!==t&&g(t,gt)}),"_isBasicCustomElement"),ke=(0,n.K2)((function(t){xe("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xt};let i=e.length;for(;i--;){const o=e[i],{name:a,namespaceURI:s,value:l}=o,c=ne(a);let u="value"===a?l:_(l);if(n.attrName=c,n.attrValue=u,n.keepAttr=!0,n.forceKeepAttr=void 0,xe("uponSanitizeAttribute",t,n),u=n.attrValue,n.forceKeepAttr)continue;if(me(a,t),!n.keepAttr)continue;if(!At&&C(/\/>/i,u)){me(a,t);continue}Bt&&h([ct,ut,ht],(t=>{u=y(u,t," ")}));const f=ne(t.nodeName);if(ve(f,c,u)){if(!Nt||"id"!==c&&"name"!==c||(me(a,t),u="user-content-"+u),et&&"object"==typeof R&&"function"==typeof R.getAttributeType)if(s);else switch(R.getAttributeType(f,c)){case"TrustedHTML":u=et.createHTML(u);break;case"TrustedScriptURL":u=et.createScriptURL(u)}try{s?t.setAttributeNS(s,a,u):t.setAttribute(a,u),d(r.removed)}catch(t){}}}xe("afterSanitizeAttributes",t,null)}),"_sanitizeAttributes"),Te=(0,n.K2)((function t(e){let r=null;const n=ye(e);for(xe("beforeSanitizeShadowDOM",e,null);r=n.nextNode();){if(xe("uponSanitizeShadowNode",r,null),Ce(r))continue;const e=tt(r);1===r.nodeType&&(e&&e.__depth?r.__depth=(r.__removalCount||0)+e.__depth+1:r.__depth=1),r.__depth>=255&&pe(r),r.content instanceof c&&(r.content.__depth=r.__depth,t(r.content)),ke(r)}xe("afterSanitizeShadowDOM",e,null)}),"_sanitizeShadowDOM");return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,i=null,a=null,s=null;if(Zt=!t,Zt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!_e(t)){if("function"!=typeof t.toString)throw v("toString is not a function");if("string"!=typeof(t=t.toString()))throw v("dirty is not a string, aborting")}if(!r.isSupported)return t;if(Lt||se(e),r.removed=[],"string"==typeof t&&(jt=!1),jt){if(t.nodeName){const e=ne(t.nodeName);if(!bt[e]||wt[e])throw v("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof w)n=ge("\x3c!----\x3e"),i=n.ownerDocument.importNode(t,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?n=i:n.appendChild(i);else{if(!Ot&&!Bt&&!Et&&-1===t.indexOf("<"))return et&&It?et.createHTML(t):t;if(n=ge(t),!n)return Ot?null:It?rt:""}n&&Mt&&pe(n.firstChild);const l=ye(jt?t:n);for(;a=l.nextNode();){if(Ce(a))continue;const t=tt(a);1===a.nodeType&&(t&&t.__depth?a.__depth=(a.__removalCount||0)+t.__depth+1:a.__depth=1),a.__depth>=255&&pe(a),a.content instanceof c&&(a.content.__depth=a.__depth,Te(a.content)),ke(a)}if(jt)return t;if(Ot){if($t)for(s=ot.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(xt.shadowroot||xt.shadowrootmode)&&(s=st.call(o,s,!0)),s}let u=Et?n.outerHTML:n.innerHTML;return Et&&bt["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&C(G,n.ownerDocument.doctype.name)&&(u="\n"+u),Bt&&h([ct,ut,ht],(t=>{u=y(u,t," ")})),et&&It?et.createHTML(u):u},r.setConfig=function(){se(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Lt=!0},r.clearConfig=function(){ie=null,Lt=!1},r.isValidAttribute=function(t,e,r){ie||se({});const n=ne(t),i=ne(e);return ve(n,i,r)},r.addHook=function(t,e){"function"==typeof e&&(lt[t]=lt[t]||[],f(lt[t],e))},r.removeHook=function(t){if(lt[t])return d(lt[t])},r.removeHooks=function(t){lt[t]&&(lt[t]=[])},r.removeAllHooks=function(){lt={}},r}return(0,n.K2)(Q,"createDOMPurify"),Q()}))}}),a=(0,n.f1)(i(),1),s={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},c=(0,n.K2)((function(t="fatal"){let e=s.fatal;"string"==typeof t?(t=t.toLowerCase())in s&&(e=s[t]):"number"==typeof t&&(e=t),l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=s.fatal&&(l.fatal=console.error?console.error.bind(console,u("FATAL"),"color: orange"):console.log.bind(console,"",u("FATAL"))),e<=s.error&&(l.error=console.error?console.error.bind(console,u("ERROR"),"color: orange"):console.log.bind(console,"",u("ERROR"))),e<=s.warn&&(l.warn=console.warn?console.warn.bind(console,u("WARN"),"color: orange"):console.log.bind(console,"",u("WARN"))),e<=s.info&&(l.info=console.info?console.info.bind(console,u("INFO"),"color: lightblue"):console.log.bind(console,"",u("INFO"))),e<=s.debug&&(l.debug=console.debug?console.debug.bind(console,u("DEBUG"),"color: lightgreen"):console.log.bind(console,"",u("DEBUG"))),e<=s.trace&&(l.trace=console.debug?console.debug.bind(console,u("TRACE"),"color: lightgreen"):console.log.bind(console,"",u("TRACE")))}),"setLogLevel"),u=(0,n.K2)((t=>`%c${(0,a.default)().format("ss.SSS")} : ${t} : `),"format"),h=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,d=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,f=/\s*%%.*\n/gm,p=class extends Error{static{(0,n.K2)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},m={},g=(0,n.K2)((function(t,e){t=t.replace(h,"").replace(d,"").replace(f,"\n");for(const[r,{detector:n}]of Object.entries(m))if(n(t,e))return r;throw new p(`No diagram type detected matching given configuration for text: ${t}`)}),"detectType"),y=(0,n.K2)(((...t)=>{for(const{id:e,detector:r,loader:n}of t)b(e,r,n)}),"registerLazyLoadedDiagrams"),b=(0,n.K2)(((t,e,r)=>{m[t]&&l.warn(`Detector with key ${t} already exists. Overwriting.`),m[t]={detector:e,loader:r},l.debug(`Detector with key ${t} added${r?" with loader":""}`)}),"addDetector"),_=(0,n.K2)((t=>m[t].loader),"getDiagramLoader"),x=(0,n.K2)(((t,e,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>x(t,e,i))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((i=>{"object"!=typeof e[i]||void 0!==t[i]&&"object"!=typeof t[i]?(n||"object"!=typeof t[i]&&"object"!=typeof e[i])&&(t[i]=e[i]):(void 0===t[i]&&(t[i]=Array.isArray(e[i])?[]:{}),t[i]=x(t[i],e[i],{depth:r-1,clobber:n}))})),t)}),"assignWithDepth"),C=x,v={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+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return 2.55*r;t/=360,e/=100;const i=(r/=100)<.5?r*(1+e):r+e-r*e,o=2*r-i;switch(n){case"r":return 255*v.hue2rgb(o,i,t+1/3);case"g":return 255*v.hue2rgb(o,i,t);case"b":return 255*v.hue2rgb(o,i,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),o=Math.min(t,e,r),a=(i+o)/2;if("l"===n)return 100*a;if(i===o)return 0;const s=i-o;if("s"===n)return 100*(a>.5?s/(2-i-o):s/(i+o));switch(i){case t:return 60*((e-r)/s+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}},k={};for(let t=0;t<=255;t++)k[t]=w.unit.dec2hex(t);var T,S=class{static{(0,n.K2)(this,"Type")}constructor(){this.type=0}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=0}is(t){return this.type===t}},K=new class{static{(0,n.K2)(this,"Channels")}constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new S}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=0,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=w.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=w.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=w.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=w.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=w.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=w.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(2)||void 0===e?(this._ensureHSL(),w.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(2)||void 0===e?(this._ensureHSL(),w.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(2)||void 0===e?(this._ensureHSL(),w.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(1)||void 0===e?(this._ensureRGB(),w.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(1)||void 0===e?(this._ensureRGB(),w.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(1)||void 0===e?(this._ensureRGB(),w.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(1),this.changed=!0,this.data.r=t}set g(t){this.type.set(1),this.changed=!0,this.data.g=t}set b(t){this.type.set(1),this.changed=!0,this.data.b=t}set h(t){this.type.set(2),this.changed=!0,this.data.h=t}set s(t){this.type.set(2),this.changed=!0,this.data.s=t}set l(t){this.type.set(2),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent"),A={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(A.re);if(!e)return;const r=e[1],n=parseInt(r,16),i=r.length,o=i%4==0,a=i>4,s=a?1:17,l=a?8:4,c=o?0:-1,u=a?255:15;return K.set({r:(n>>l*(c+3)&u)*s,g:(n>>l*(c+2)&u)*s,b:(n>>l*(c+1)&u)*s,a:o?(n&u)*s/255:1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`#${k[Math.round(e)]}${k[Math.round(r)]}${k[Math.round(n)]}${k[Math.round(255*i)]}`:`#${k[Math.round(e)]}${k[Math.round(r)]}${k[Math.round(n)]}`}},B=A,F={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(F.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return w.channel.clamp.h(.9*parseFloat(t));case"rad":return w.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return w.channel.clamp.h(360*parseFloat(t))}}return w.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(F.re);if(!r)return;const[,n,i,o,a,s]=r;return K.set({h:F._hue2deg(n),s:w.channel.clamp.s(parseFloat(i)),l:w.channel.clamp.l(parseFloat(o)),a:a?w.channel.clamp.a(s?parseFloat(a)/100:parseFloat(a)):1},t)},stringify:t=>{const{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${w.lang.round(e)}, ${w.lang.round(r)}%, ${w.lang.round(n)}%, ${i})`:`hsl(${w.lang.round(e)}, ${w.lang.round(r)}%, ${w.lang.round(n)}%)`}},E=F,L={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=L.colors[t];if(e)return B.parse(e)},stringify:t=>{const e=B.stringify(t);for(const t in L.colors)if(L.colors[t]===e)return t}},M=L,O={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(114!==e&&82!==e)return;const r=t.match(O.re);if(!r)return;const[,n,i,o,a,s,l,c,u]=r;return K.set({r:w.channel.clamp.r(i?2.55*parseFloat(n):parseFloat(n)),g:w.channel.clamp.g(a?2.55*parseFloat(o):parseFloat(o)),b:w.channel.clamp.b(l?2.55*parseFloat(s):parseFloat(s)),a:c?w.channel.clamp.a(u?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${w.lang.round(e)}, ${w.lang.round(r)}, ${w.lang.round(n)}, ${w.lang.round(i)})`:`rgb(${w.lang.round(e)}, ${w.lang.round(r)}, ${w.lang.round(n)})`}},$=O,I=t=>{if("string"!=typeof t)return t;const e=B.parse(t)||$.parse(t)||E.parse(t)||M.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},D=t=>!t.changed&&t.color?t.color:t.type.is(2)||void 0===t.data.r?E.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?$.stringify(t):B.stringify(t),N=(0,n.K2)(((t,e)=>{const r=I(t);for(const t in e)r[t]=w.channel.clamp[t](e[t]);return D(r)}),"change"),P=(0,n.K2)(((t,e,r=0,n=1)=>{if("number"!=typeof t)return N(t,{a:e});const i=K.set({r:w.channel.clamp.r(t),g:w.channel.clamp.g(e),b:w.channel.clamp.b(r),a:w.channel.clamp.a(n)});return D(i)}),"rgba"),j=(0,n.K2)(((t,e)=>w.lang.round(I(t)[e])),"channel"),z=(0,n.K2)((t=>{const{r:e,g:r,b:n}=I(t),i=.2126*w.channel.toLinear(e)+.7152*w.channel.toLinear(r)+.0722*w.channel.toLinear(n);return w.lang.round(i)}),"luminance"),q=(0,n.K2)((t=>z(t)>=.5),"isLight"),R=(0,n.K2)((t=>!q(t)),"isDark"),W=(0,n.K2)(((t,e,r)=>{const n=I(t),i=n[e],o=w.channel.clamp[e](i+r);return i!==o&&(n[e]=o),D(n)}),"adjustChannel"),U=(0,n.K2)(((t,e)=>W(t,"l",e)),"lighten"),H=(0,n.K2)(((t,e)=>W(t,"l",-e)),"darken"),Y=(0,n.K2)(((t,e)=>{const r=I(t),n={};for(const t in e)e[t]&&(n[t]=r[t]+e[t]);return N(t,n)}),"adjust"),G=(0,n.K2)(((t,e,r=50)=>{const{r:n,g:i,b:o,a}=I(t),{r:s,g:l,b:c,a:u}=I(e),h=r/100,d=2*h-1,f=a-u,p=((d*f==-1?d:(d+f)/(1+d*f))+1)/2,m=1-p;return P(n*p+s*m,i*p+l*m,o*p+c*m,a*h+u*(1-h))}),"mix"),V=(0,n.K2)(((t,e=100)=>{const r=I(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,G(r,t,e)}),"invert"),J=(0,n.K2)(((t,e)=>Y(t,e?{s:-40,l:10}:{s:-40,l:-10})),"mkBorder"),X="#ffffff",Z="#f2f2f2",Q=class{static{(0,n.K2)(this,"Theme")}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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Y(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Y(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(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?H(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||this.actorBorder,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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||V(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||U(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||Y(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Y(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Y(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Y(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Y(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Y(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Y(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Y(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Y(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},tt=(0,n.K2)((t=>{const e=new Q;return e.calculate(t),e}),"getThemeVariables"),et=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=U(this.primaryColor,16),this.tertiaryColor=Y(this.primaryColor,{h:-160}),this.primaryBorderColor=V(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.lineColor=V(this.background),this.textColor=V(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=U(V("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=P(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=H("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=H(this.sectionBkgColor,10),this.taskBorderColor=P(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=P(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(){this.secondBkg=U(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=U(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,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=U(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=Y(this.primaryColor,{h:64}),this.fillType3=Y(this.secondaryColor,{h:64}),this.fillType4=Y(this.primaryColor,{h:-64}),this.fillType5=Y(this.secondaryColor,{h:-64}),this.fillType6=Y(this.primaryColor,{h:128}),this.fillType7=Y(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||Y(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Y(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Y(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Y(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Y(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Y(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Y(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Y(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Y(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},rt=(0,n.K2)((t=>{const e=new et;return e.calculate(t),e}),"getThemeVariables"),nt=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Y(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Y(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.lineColor=V(this.background),this.textColor=V(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="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="#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=P(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(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Y(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Y(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Y(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Y(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Y(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Y(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Y(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Y(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Y(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||H(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||H(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},it=(0,n.K2)((t=>{const e=new nt;return e.calculate(t),e}),"getThemeVariables"),ot=class{static{(0,n.K2)(this,"Theme")}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=U("#cde498",10),this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.primaryColor),this.lineColor=V(this.background),this.textColor=V(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="calculated",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(){this.actorBorder=H(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.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Y(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Y(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Y(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Y(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Y(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Y(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Y(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Y(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Y(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||H(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||H(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},at=(0,n.K2)((t=>{const e=new ot;return e.calculate(t),e}),"getThemeVariables"),st=class{static{(0,n.K2)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=U(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Y(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.lineColor=V(this.background),this.textColor=V(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=this.actorBorder,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(){this.secondBkg=U(this.contrast,55),this.border2=this.contrast,this.actorBorder=U(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,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 t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},lt={base:{getThemeVariables:tt},dark:{getThemeVariables:rt},default:{getThemeVariables:it},forest:{getThemeVariables:at},neutral:{getThemeVariables:(0,n.K2)((t=>{const e=new st;return e.calculate(t),e}),"getThemeVariables")}},ct={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},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},array:{useMaxWidth:!0,borderWidth:1},matrix:{useMaxWidth:!0,borderWidth:1},testslides:{useMaxWidth:!0,borderWidth:1},visslides:{useMaxWidth:!0,borderWidth:1},visual:{useMaxWidth:!0,borderWidth:1},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","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},ut={...ct,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:lt.default.getThemeVariables(),sequence:{...ct.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:{...ct.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ct.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:{...ct.pie,useWidth:984},xyChart:{...ct.xyChart,useWidth:void 0},requirement:{...ct.requirement,useWidth:void 0},gitGraph:{...ct.gitGraph,useMaxWidth:!1},sankey:{...ct.sankey,useMaxWidth:!1},packet:{...ct.packet}},ht=(0,n.K2)(((t,e="")=>Object.keys(t).reduce(((r,n)=>Array.isArray(t[n])?r:"object"==typeof t[n]&&null!==t[n]?[...r,e+n,...ht(t[n],"")]:[...r,e+n]),[])),"keyify"),dt=new Set(ht(ut,"")),ft=ut,pt=(0,n.K2)((t=>{if(l.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>pt(t)));else{for(const e of Object.keys(t)){if(l.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!dt.has(e)||null==t[e]){l.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){l.debug("sanitizing object",e),pt(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(l.debug("sanitizing css option",e),t[e]=mt(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}l.debug("After sanitization",t)}}),"sanitizeDirective"),mt=(0,n.K2)((t=>{let e=0,r=0;for(const n of t){if(e{let r=C({},t),n={};for(const t of e)Kt(t),n=C(n,t);if(r=C(r,n),n.theme&&n.theme in lt){const t=C({},T),e=C(t.themeVariables||{},n.themeVariables);r.theme&&r.theme in lt&&(r.themeVariables=lt[r.theme].getThemeVariables(e))}return Mt(_t=r),_t}),"updateCurrentConfig"),Ct=(0,n.K2)((t=>(yt=C({},gt),yt=C(yt,t),t.theme&<[t.theme]&&(yt.themeVariables=lt[t.theme].getThemeVariables(t.themeVariables)),xt(yt,bt),yt)),"setSiteConfig"),vt=(0,n.K2)((t=>{T=C({},t)}),"saveConfigFromInitialize"),wt=(0,n.K2)((t=>(yt=C(yt,t),xt(yt,bt),yt)),"updateSiteConfig"),kt=(0,n.K2)((()=>C({},yt)),"getSiteConfig"),Tt=(0,n.K2)((t=>(Mt(t),C(_t,t),St())),"setConfig"),St=(0,n.K2)((()=>C({},_t)),"getConfig"),Kt=(0,n.K2)((t=>{t&&(["secure",...yt.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(l.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=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&Kt(t[e])})))}),"sanitize"),At=(0,n.K2)((t=>{pt(t),!t.fontFamily||t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}),bt.push(t),xt(yt,bt)}),"addDirective"),Bt=(0,n.K2)(((t=yt)=>{xt(t,bt=[])}),"reset"),Ft={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Et={},Lt=(0,n.K2)((t=>{Et[t]||(l.warn(Ft[t]),Et[t]=!0)}),"issueWarning"),Mt=(0,n.K2)((t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Lt("LAZY_LOAD_DEPRECATED")}),"checkConfig"),Ot=(0,n.f1)(o(),1),$t=//gi,It=(0,n.K2)((t=>t?Ht(t).replace(/\\n/g,"#br#").split("#br#"):[""]),"getRows"),Dt=(()=>{let t=!1;return()=>{t||(Nt(),t=!0)}})();function Nt(){const t="data-temp-href-target";Ot.default.addHook("beforeSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")||"")})),Ot.default.addHook("afterSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)||""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))}))}(0,n.K2)(Nt,"setupDompurifyHooks");var Pt=(0,n.K2)((t=>(Dt(),Ot.default.sanitize(t))),"removeScript"),jt=(0,n.K2)(((t,e)=>{if(!1!==e.flowchart?.htmlLabels){const r=e.securityLevel;"antiscript"===r||"strict"===r?t=Pt(t):"loose"!==r&&(t=(t=(t=Ht(t)).replace(//g,">")).replace(/=/g,"="),t=Ut(t))}return t}),"sanitizeMore"),zt=(0,n.K2)(((t,e)=>t?t=e.dompurifyConfig?Ot.default.sanitize(jt(t,e),e.dompurifyConfig).toString():Ot.default.sanitize(jt(t,e),{FORBID_TAGS:["style"]}).toString():t),"sanitizeText"),qt=(0,n.K2)(((t,e)=>"string"==typeof t?zt(t,e):t.flat().map((t=>zt(t,e)))),"sanitizeTextOrArray"),Rt=(0,n.K2)((t=>$t.test(t)),"hasBreaks"),Wt=(0,n.K2)((t=>t.split($t)),"splitBreaks"),Ut=(0,n.K2)((t=>t.replace(/#br#/g,"
")),"placeholderToBreak"),Ht=(0,n.K2)((t=>t.replace($t,"#br#")),"breakToPlaceholder"),Yt=(0,n.K2)((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}),"getUrl"),Gt=(0,n.K2)((t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Vt=(0,n.K2)((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.max(...e)}),"getMax"),Jt=(0,n.K2)((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.min(...e)}),"getMin"),Xt=(0,n.K2)((function(t){const e=t.split(/(,)/),r=[];for(let t=0;t0&&t+1Math.max(0,t.split(e).length-1)),"countOccurrence"),Qt=(0,n.K2)(((t,e)=>{const r=Zt(t,"~"),n=Zt(e,"~");return 1===r&&1===n}),"shouldCombineSets"),te=(0,n.K2)((t=>{const e=Zt(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const n=[...t];let i=n.indexOf("~"),o=n.lastIndexOf("~");for(;-1!==i&&-1!==o&&i!==o;)n[i]="<",n[o]=">",i=n.indexOf("~"),o=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")}),"processSet"),ee=(0,n.K2)((()=>void 0!==window.MathMLElement),"isMathMLSupported"),re=/\$\$(.*)\$\$/g,ne=(0,n.K2)((t=>(t.match(re)?.length??0)>0),"hasKatex"),ie=(0,n.K2)((async(t,e)=>{t=await oe(t,e);const r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const n=document.querySelector("body");n?.insertAdjacentElement("beforeend",r);const i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i}),"calculateMathMLDimensions"),oe=(0,n.K2)((async(t,e)=>{if(!ne(t))return t;if(!(ee()||e.legacyMathML||e.forceLegacyMathML))return t.replace(re,"MathML is unsupported in this environment.");const{default:n}=await r.e(6449).then(r.bind(r,6449)),i=e.forceLegacyMathML||!ee()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split($t).map((t=>ne(t)?`
${t}
`:`
${t}
`)).join("").replace(re,((t,e)=>n.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,"")))}),"renderKatex"),ae={getRows:It,sanitizeText:zt,sanitizeTextOrArray:qt,hasBreaks:Rt,splitBreaks:Wt,lineBreakRegex:$t,removeScript:Pt,getUrl:Yt,evaluate:Gt,getMax:Vt,getMin:Jt},se=(0,n.K2)((function(t,e){for(let r of e)t.attr(r[0],r[1])}),"d3Attrs"),le=(0,n.K2)((function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n}),"calculateSvgSizeAttrs"),ce=(0,n.K2)((function(t,e,r,n){const i=le(e,r,n);se(t,i)}),"configureSvgSize"),ue=(0,n.K2)((function(t,e,r,n){const i=e.node().getBBox(),o=i.width,a=i.height;l.info(`SVG bounds: ${o}x${a}`,i);let s=0,c=0;l.info(`Graph bounds: ${s}x${c}`,t),s=o+2*r,c=a+2*r,l.info(`Calculated bounds: ${s}x${c}`),ce(e,c,s,n);const u=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",u)}),"setupGraphViewbox"),he={},de=(0,n.K2)(((t,e,r)=>{let n="";return t in he&&he[t]?n=he[t](r):l.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 2px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n\n ${n}\n\n ${e}\n`}),"getStyles"),fe=(0,n.K2)(((t,e)=>{void 0!==e&&(he[t]=e)}),"addStylesForDiagram"),pe=de,me={};(0,n.VA)(me,{clear:()=>xe,getAccDescription:()=>ke,getAccTitle:()=>ve,getDiagramTitle:()=>Se,setAccDescription:()=>we,setAccTitle:()=>Ce,setDiagramTitle:()=>Te});var ge="",ye="",be="",_e=(0,n.K2)((t=>zt(t,St())),"sanitizeText"),xe=(0,n.K2)((()=>{ge="",be="",ye=""}),"clear"),Ce=(0,n.K2)((t=>{ge=_e(t).replace(/^\s+/g,"")}),"setAccTitle"),ve=(0,n.K2)((()=>ge),"getAccTitle"),we=(0,n.K2)((t=>{be=_e(t).replace(/\n\s+/g,"\n")}),"setAccDescription"),ke=(0,n.K2)((()=>be),"getAccDescription"),Te=(0,n.K2)((t=>{ye=_e(t)}),"setDiagramTitle"),Se=(0,n.K2)((()=>ye),"getDiagramTitle"),Ke=l,Ae=c,Be=St,Fe=Tt,Ee=gt,Le=(0,n.K2)((t=>zt(t,Be())),"sanitizeText"),Me=ue,Oe=(0,n.K2)((()=>me),"getCommonDb"),$e={},Ie=(0,n.K2)(((t,e,r)=>{$e[t]&&Ke.warn(`Diagram with id ${t} already registered. Overwriting.`),$e[t]=e,r&&b(t,r),fe(t,e.styles),e.injectUtils?.(Ke,Ae,Be,Le,Me,Oe(),(()=>{}))}),"registerDiagram"),De=(0,n.K2)((t=>{if(t in $e)return $e[t];throw new Ne(t)}),"getDiagram"),Ne=class extends Error{static{(0,n.K2)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}};function Pe(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r=e)&&(r=e);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r=i)&&(r=i)}return r}function je(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r>e||void 0===r&&e>=e)&&(r=e);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function ze(t,e){return null==t||null==e?NaN:te?1:t>=e?0:NaN}function qe(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function Re(t){let e,r,i;function o(t,n,i=0,o=t.length){if(i>>1;r(t[e],n)<0?i=e+1:o=e}while(i>>1;r(t[e],n)<=0?i=e+1:o=e}while(ir&&i(t[a-1],e)>-i(t[a],e)?a-1:a}return 2!==t.length?(e=ze,r=(0,n.K2)(((e,r)=>ze(t(e),r)),"compare2"),i=(0,n.K2)(((e,r)=>t(e)-r),"delta")):(e=t===ze||t===qe?t:We,r=t,i=t),(0,n.K2)(o,"left"),(0,n.K2)(a,"right"),(0,n.K2)(s,"center"),{left:o,center:s,right:a}}function We(){return 0}function Ue(t){return null===t?NaN:+t}(0,n.K2)(Pe,"max"),(0,n.K2)(je,"min"),(0,n.K2)(ze,"ascending"),(0,n.K2)(qe,"descending"),(0,n.K2)(Re,"bisector"),(0,n.K2)(We,"zero"),(0,n.K2)(Ue,"number");var He=Re(ze),Ye=He.right,Ge=(He.left,Re(Ue).center,Ye),Ve=class extends Map{static{(0,n.K2)(this,"InternMap")}constructor(t,e=Qe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,r]of t)this.set(e,r)}get(t){return super.get(Je(this,t))}has(t){return super.has(Je(this,t))}set(t,e){return super.set(Xe(this,t),e)}delete(t){return super.delete(Ze(this,t))}};function Je({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function Xe({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function Ze({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function Qe(t){return null!==t&&"object"==typeof t?t.valueOf():t}(0,n.K2)(Je,"intern_get"),(0,n.K2)(Xe,"intern_set"),(0,n.K2)(Ze,"intern_delete"),(0,n.K2)(Qe,"keyof");var tr=Math.sqrt(50),er=Math.sqrt(10),rr=Math.sqrt(2);function nr(t,e,r){const n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),a=o>=tr?10:o>=er?5:o>=rr?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),l=Math.round(e*c),s/ce&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),l=Math.round(e/c),s*ce&&--l),l0))return[];if((t=+t)==(e=+e))return[t];const n=e=i))return[];const s=o-i+1,l=new Array(s);if(n)if(a<0)for(let t=0;t+t(e)}function yr(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function br(){return!this.__axis}function _r(t,e){var r=[],i=null,o=null,a=6,s=6,l=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=t===cr||t===dr?-1:1,h=t===dr||t===ur?"x":"y",d=t===cr||t===hr?pr:mr;function f(n){var f=null==i?e.ticks?e.ticks.apply(e,r):e.domain():i,p=null==o?e.tickFormat?e.tickFormat.apply(e,r):lr:o,m=Math.max(a,0)+l,g=e.range(),y=+g[0]+c,b=+g[g.length-1]+c,_=(e.bandwidth?yr:gr)(e.copy(),c),x=n.selection?n.selection():n,C=x.selectAll(".domain").data([null]),v=x.selectAll(".tick").data(f,e).order(),w=v.exit(),k=v.enter().append("g").attr("class","tick"),T=v.select("line"),S=v.select("text");C=C.merge(C.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),v=v.merge(k),T=T.merge(k.append("line").attr("stroke","currentColor").attr(h+"2",u*a)),S=S.merge(k.append("text").attr("fill","currentColor").attr(h,u*m).attr("dy",t===cr?"0em":t===hr?"0.71em":"0.32em")),n!==x&&(C=C.transition(n),v=v.transition(n),T=T.transition(n),S=S.transition(n),w=w.transition(n).attr("opacity",fr).attr("transform",(function(t){return isFinite(t=_(t))?d(t+c):this.getAttribute("transform")})),k.attr("opacity",fr).attr("transform",(function(t){var e=this.parentNode.__axis;return d((e&&isFinite(e=e(t))?e:_(t))+c)}))),w.remove(),C.attr("d",t===dr||t===ur?s?"M"+u*s+","+y+"H"+c+"V"+b+"H"+u*s:"M"+c+","+y+"V"+b:s?"M"+y+","+u*s+"V"+c+"H"+b+"V"+u*s:"M"+y+","+c+"H"+b),v.attr("opacity",1).attr("transform",(function(t){return d(_(t)+c)})),T.attr(h+"2",u*a),S.attr(h,u*m).text(p),x.filter(br).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ur?"start":t===dr?"end":"middle"),x.each((function(){this.__axis=_}))}return(0,n.K2)(f,"axis"),f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return r=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),f):r.slice()},f.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),f):i&&i.slice()},f.tickFormat=function(t){return arguments.length?(o=t,f):o},f.tickSize=function(t){return arguments.length?(a=s=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(s=+t,f):s},f.tickPadding=function(t){return arguments.length?(l=+t,f):l},f.offset=function(t){return arguments.length?(c=+t,f):c},f}function xr(t){return _r(cr,t)}function Cr(t){return _r(hr,t)}function vr(){}function wr(t){return null==t?vr:function(){return this.querySelector(t)}}function kr(t){"function"!=typeof t&&(t=wr(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i=x&&(x=_+1);!(b=g[x])&&++x=0;)(n=i[o])&&(a&&4^n.compareDocumentPosition(a)&&a.parentNode.insertBefore(n,a),a=n);return this}function tn(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=en),(0,n.K2)(e,"compareNode");for(var r=this._groups,i=r.length,o=new Array(i),a=0;ae?1:t>=e?0:NaN}function rn(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function nn(){return Array.from(this)}function on(){for(var t=this._groups,e=0,r=t.length;e=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),un.hasOwnProperty(e)?{space:un[e],local:t}:t}function dn(t){return function(){this.removeAttribute(t)}}function fn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pn(t,e){return function(){this.setAttribute(t,e)}}function mn(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function gn(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function yn(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function bn(t,e){var r=hn(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((null==e?r.local?fn:dn:"function"==typeof e?r.local?yn:gn:r.local?mn:pn)(r,e))}function _n(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function xn(t){return function(){this.style.removeProperty(t)}}function Cn(t,e,r){return function(){this.style.setProperty(t,e,r)}}function vn(t,e,r){return function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function wn(t,e,r){return arguments.length>1?this.each((null==e?xn:"function"==typeof e?vn:Cn)(t,e,null==r?"":r)):kn(this.node(),t)}function kn(t,e){return t.style.getPropertyValue(e)||_n(t).getComputedStyle(t,null).getPropertyValue(e)}function Tn(t){return function(){delete this[t]}}function Sn(t,e){return function(){this[t]=e}}function Kn(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function An(t,e){return arguments.length>1?this.each((null==e?Tn:"function"==typeof e?Kn:Sn)(t,e)):this.node()[t]}function Bn(t){return t.trim().split(/^|\s+/)}function Fn(t){return t.classList||new En(t)}function En(t){this._node=t,this._names=Bn(t.getAttribute("class")||"")}function Ln(t,e){for(var r=Fn(t),n=-1,i=e.length;++n=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}}))}function ui(t){return function(){var e=this.__on;if(e){for(var r,n=0,i=-1,o=e.length;n=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}},(0,n.K2)(Ln,"classedAdd"),(0,n.K2)(Mn,"classedRemove"),(0,n.K2)(On,"classedTrue"),(0,n.K2)($n,"classedFalse"),(0,n.K2)(In,"classedFunction"),(0,n.K2)(Dn,"default"),(0,n.K2)(Nn,"textRemove"),(0,n.K2)(Pn,"textConstant"),(0,n.K2)(jn,"textFunction"),(0,n.K2)(zn,"default"),(0,n.K2)(qn,"htmlRemove"),(0,n.K2)(Rn,"htmlConstant"),(0,n.K2)(Wn,"htmlFunction"),(0,n.K2)(Un,"default"),(0,n.K2)(Hn,"raise"),(0,n.K2)(Yn,"default"),(0,n.K2)(Gn,"lower"),(0,n.K2)(Vn,"default"),(0,n.K2)(Jn,"creatorInherit"),(0,n.K2)(Xn,"creatorFixed"),(0,n.K2)(Zn,"default"),(0,n.K2)(Qn,"default"),(0,n.K2)(ti,"constantNull"),(0,n.K2)(ei,"default"),(0,n.K2)(ri,"remove"),(0,n.K2)(ni,"default"),(0,n.K2)(ii,"selection_cloneShallow"),(0,n.K2)(oi,"selection_cloneDeep"),(0,n.K2)(ai,"default"),(0,n.K2)(si,"default"),(0,n.K2)(li,"contextListener"),(0,n.K2)(ci,"parseTypenames"),(0,n.K2)(ui,"onRemove"),(0,n.K2)(hi,"onAdd"),(0,n.K2)(di,"default"),(0,n.K2)(fi,"dispatchEvent"),(0,n.K2)(pi,"dispatchConstant"),(0,n.K2)(mi,"dispatchFunction"),(0,n.K2)(gi,"default"),(0,n.K2)(yi,"default");var bi=[null];function _i(t,e){this._groups=t,this._parents=e}function xi(){return new _i([[document.documentElement]],bi)}function Ci(){return this}(0,n.K2)(_i,"Selection"),(0,n.K2)(xi,"selection"),(0,n.K2)(Ci,"selection_selection"),_i.prototype=xi.prototype={constructor:_i,select:kr,selectAll:Br,selectChild:$r,selectChildren:Pr,filter:jr,data:Gr,enter:qr,exit:Jr,join:Xr,merge:Zr,selection:Ci,order:Qr,sort:tn,call:rn,nodes:nn,node:on,size:an,empty:sn,each:ln,attr:bn,style:wn,property:An,classed:Dn,text:zn,html:Un,raise:Yn,lower:Vn,append:Qn,insert:ei,remove:ni,clone:ai,datum:si,on:di,dispatch:gi,[Symbol.iterator]:yi};var vi=xi;function wi(t){return"string"==typeof t?new _i([[document.querySelector(t)]],[document.documentElement]):new _i([[t]],bi)}function ki(t){return"string"==typeof t?new _i([document.querySelectorAll(t)],[document.documentElement]):new _i([Tr(t)],bi)}function Ti(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Si(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function Ki(){}(0,n.K2)(wi,"default"),(0,n.K2)(ki,"default"),(0,n.K2)(Ti,"default"),(0,n.K2)(Si,"extend"),(0,n.K2)(Ki,"Color");var Ai=.7,Bi=1/Ai,Fi="\\s*([+-]?\\d+)\\s*",Ei="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Li="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Mi=/^#([0-9a-f]{3,8})$/,Oi=new RegExp(`^rgb\\(${Fi},${Fi},${Fi}\\)$`),$i=new RegExp(`^rgb\\(${Li},${Li},${Li}\\)$`),Ii=new RegExp(`^rgba\\(${Fi},${Fi},${Fi},${Ei}\\)$`),Di=new RegExp(`^rgba\\(${Li},${Li},${Li},${Ei}\\)$`),Ni=new RegExp(`^hsl\\(${Ei},${Li},${Li}\\)$`),Pi=new RegExp(`^hsla\\(${Ei},${Li},${Li},${Ei}\\)$`),ji={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};function zi(){return this.rgb().formatHex()}function qi(){return this.rgb().formatHex8()}function Ri(){return io(this).formatHsl()}function Wi(){return this.rgb().formatRgb()}function Ui(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Mi.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?Hi(e):3===r?new Ji(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Yi(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Yi(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Oi.exec(t))?new Ji(e[1],e[2],e[3],1):(e=$i.exec(t))?new Ji(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ii.exec(t))?Yi(e[1],e[2],e[3],e[4]):(e=Di.exec(t))?Yi(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ni.exec(t))?no(e[1],e[2]/100,e[3]/100,1):(e=Pi.exec(t))?no(e[1],e[2]/100,e[3]/100,e[4]):ji.hasOwnProperty(t)?Hi(ji[t]):"transparent"===t?new Ji(NaN,NaN,NaN,0):null}function Hi(t){return new Ji(t>>16&255,t>>8&255,255&t,1)}function Yi(t,e,r,n){return n<=0&&(t=e=r=NaN),new Ji(t,e,r,n)}function Gi(t){return t instanceof Ki||(t=Ui(t)),t?new Ji((t=t.rgb()).r,t.g,t.b,t.opacity):new Ji}function Vi(t,e,r,n){return 1===arguments.length?Gi(t):new Ji(t,e,r,null==n?1:n)}function Ji(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function Xi(){return`#${ro(this.r)}${ro(this.g)}${ro(this.b)}`}function Zi(){return`#${ro(this.r)}${ro(this.g)}${ro(this.b)}${ro(255*(isNaN(this.opacity)?1:this.opacity))}`}function Qi(){const t=to(this.opacity);return`${1===t?"rgb(":"rgba("}${eo(this.r)}, ${eo(this.g)}, ${eo(this.b)}${1===t?")":`, ${t})`}`}function to(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function eo(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ro(t){return((t=eo(t))<16?"0":"")+t.toString(16)}function no(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new ao(t,e,r,n)}function io(t){if(t instanceof ao)return new ao(t.h,t.s,t.l,t.opacity);if(t instanceof Ki||(t=Ui(t)),!t)return new ao;if(t instanceof ao)return t;var e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),o=Math.max(e,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=e===o?(r-n)/s+6*(r0&&l<1?0:a,new ao(a,s,l,t.opacity)}function oo(t,e,r,n){return 1===arguments.length?io(t):new ao(t,e,r,null==n?1:n)}function ao(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function so(t){return(t=(t||0)%360)<0?t+360:t}function lo(t){return Math.max(0,Math.min(1,t||0))}function co(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}Ti(Ki,Ui,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:zi,formatHex:zi,formatHex8:qi,formatHsl:Ri,formatRgb:Wi,toString:Wi}),(0,n.K2)(zi,"color_formatHex"),(0,n.K2)(qi,"color_formatHex8"),(0,n.K2)(Ri,"color_formatHsl"),(0,n.K2)(Wi,"color_formatRgb"),(0,n.K2)(Ui,"color"),(0,n.K2)(Hi,"rgbn"),(0,n.K2)(Yi,"rgba"),(0,n.K2)(Gi,"rgbConvert"),(0,n.K2)(Vi,"rgb"),(0,n.K2)(Ji,"Rgb"),Ti(Ji,Vi,Si(Ki,{brighter(t){return t=null==t?Bi:Math.pow(Bi,t),new Ji(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Ai:Math.pow(Ai,t),new Ji(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ji(eo(this.r),eo(this.g),eo(this.b),to(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:Xi,formatHex:Xi,formatHex8:Zi,formatRgb:Qi,toString:Qi})),(0,n.K2)(Xi,"rgb_formatHex"),(0,n.K2)(Zi,"rgb_formatHex8"),(0,n.K2)(Qi,"rgb_formatRgb"),(0,n.K2)(to,"clampa"),(0,n.K2)(eo,"clampi"),(0,n.K2)(ro,"hex"),(0,n.K2)(no,"hsla"),(0,n.K2)(io,"hslConvert"),(0,n.K2)(oo,"hsl"),(0,n.K2)(ao,"Hsl"),Ti(ao,oo,Si(Ki,{brighter(t){return t=null==t?Bi:Math.pow(Bi,t),new ao(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Ai:Math.pow(Ai,t),new ao(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new Ji(co(t>=240?t-240:t+120,i,n),co(t,i,n),co(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new ao(so(this.h),lo(this.s),lo(this.l),to(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=to(this.opacity);return`${1===t?"hsl(":"hsla("}${so(this.h)}, ${100*lo(this.s)}%, ${100*lo(this.l)}%${1===t?")":`, ${t})`}`}})),(0,n.K2)(so,"clamph"),(0,n.K2)(lo,"clampt"),(0,n.K2)(co,"hsl2rgb");var uo=Math.PI/180,ho=180/Math.PI,fo=.96422,po=1,mo=.82521,go=4/29,yo=6/29,bo=3*yo*yo,_o=yo*yo*yo;function xo(t){if(t instanceof vo)return new vo(t.l,t.a,t.b,t.opacity);if(t instanceof Bo)return Fo(t);t instanceof Ji||(t=Gi(t));var e,r,n=So(t.r),i=So(t.g),o=So(t.b),a=wo((.2225045*n+.7168786*i+.0606169*o)/po);return n===i&&i===o?e=r=a:(e=wo((.4360747*n+.3850649*i+.1430804*o)/fo),r=wo((.0139322*n+.0971045*i+.7141733*o)/mo)),new vo(116*a-16,500*(e-a),200*(a-r),t.opacity)}function Co(t,e,r,n){return 1===arguments.length?xo(t):new vo(t,e,r,null==n?1:n)}function vo(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function wo(t){return t>_o?Math.pow(t,1/3):t/bo+go}function ko(t){return t>yo?t*t*t:bo*(t-go)}function To(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function So(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ko(t){if(t instanceof Bo)return new Bo(t.h,t.c,t.l,t.opacity);if(t instanceof vo||(t=xo(t)),0===t.a&&0===t.b)return new Bo(NaN,0()=>t),"default");function Lo(t,e){return function(r){return t+r*e}}function Mo(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function Oo(t,e){var r=e-t;return r?Lo(t,r>180||r<-180?r-360*Math.round(r/360):r):Eo(isNaN(t)?e:t)}function $o(t){return 1==(t=+t)?Io:function(e,r){return r-e?Mo(e,r,t):Eo(isNaN(e)?r:e)}}function Io(t,e){var r=e-t;return r?Lo(t,r):Eo(isNaN(t)?e:t)}function Do(t){return function(e,r){var n=t((e=Ao(e)).h,(r=Ao(r)).h),i=Io(e.c,r.c),o=Io(e.l,r.l),a=Io(e.opacity,r.opacity);return function(t){return e.h=n(t),e.c=i(t),e.l=o(t),e.opacity=a(t),e+""}}}(0,n.K2)(Lo,"linear"),(0,n.K2)(Mo,"exponential"),(0,n.K2)(Oo,"hue"),(0,n.K2)($o,"gamma"),(0,n.K2)(Io,"nogamma"),(0,n.K2)(Do,"hcl");var No=Do(Oo);function Po(t,e,r,n,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*r+(1+3*t+3*o-3*a)*n+a*i)/6}function jo(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],o=t[n+1],a=n>0?t[n-1]:2*i-o,s=no&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:Go(r,n)})),o=Xo.lastIndex;return o180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(o(r)+"rotate(",null,i)-2,x:Go(t,e)})):e&&r.push(o(r)+"rotate("+e+i)}function l(t,e,r,n){t!==e?n.push({i:r.push(o(r)+"skewX(",null,i)-2,x:Go(t,e)}):e&&r.push(o(r)+"skewX("+e+i)}function c(t,e,r,n,i,a){if(t!==r||e!==n){var s=i.push(o(i)+"scale(",null,",",null,")");a.push({i:s-4,x:Go(t,r)},{i:s-2,x:Go(e,n)})}else 1===r&&1===n||i.push(o(i)+"scale("+r+","+n+")")}return(0,n.K2)(o,"pop"),(0,n.K2)(a,"translate"),(0,n.K2)(s,"rotate"),(0,n.K2)(l,"skewX"),(0,n.K2)(c,"scale"),function(e,r){var n=[],i=[];return e=t(e),r=t(r),a(e.translateX,e.translateY,r.translateX,r.translateY,n,i),s(e.rotate,r.rotate,n,i),l(e.skewX,r.skewX,n,i),c(e.scaleX,e.scaleY,r.scaleX,r.scaleY,n,i),e=r=null,function(t){for(var e,r=-1,o=i.length;++re&&(r=t,t=e,e=r),function(r){return Math.max(t,Math.min(e,r))}}function Ca(t,e,r){var n=t[0],i=t[1],o=e[0],a=e[1];return i2?va:Ca,o=a=null,d}function d(e){return null==e||isNaN(e=+e)?r:(o||(o=i(s.map(t),l,c)))(t(u(e)))}return(0,n.K2)(h,"rescale"),(0,n.K2)(d,"scale"),d.invert=function(r){return u(e((a||(a=i(l,s.map(t),Go)))(r)))},d.domain=function(t){return arguments.length?(s=Array.from(t,ga),h()):s.slice()},d.range=function(t){return arguments.length?(l=Array.from(t),h()):l.slice()},d.rangeRound=function(t){return l=Array.from(t),c=ra,h()},d.clamp=function(t){return arguments.length?(u=!!t||ba,h()):u!==ba},d.interpolate=function(t){return arguments.length?(c=t,h()):c},d.unknown=function(t){return arguments.length?(r=t,d):r},function(r,n){return t=r,e=n,h()}}function Ta(){return ka()(ba,ba)}function Sa(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ka(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function Aa(t){return(t=Ka(Math.abs(t)))?t[1]:NaN}function Ba(t,e){return function(r,n){for(var i=r.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function Fa(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(0,n.K2)(ba,"identity"),(0,n.K2)(_a,"normalize"),(0,n.K2)(xa,"clamper"),(0,n.K2)(Ca,"bimap"),(0,n.K2)(va,"polymap"),(0,n.K2)(wa,"copy"),(0,n.K2)(ka,"transformer"),(0,n.K2)(Ta,"continuous"),(0,n.K2)(Sa,"default"),(0,n.K2)(Ka,"formatDecimalParts"),(0,n.K2)(Aa,"default"),(0,n.K2)(Ba,"default"),(0,n.K2)(Fa,"default");var Ea,La=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ma(t){if(!(e=La.exec(t)))throw new Error("invalid format: "+t);var e;return new Oa({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Oa(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function $a(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}function Ia(t,e){var r=Ka(t,e);if(!r)return t+"";var n=r[0],i=r[1],o=i-(Ea=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Ka(t,Math.max(0,e+o-1))[0]}function Da(t,e){var r=Ka(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}(0,n.K2)(Ma,"formatSpecifier"),Ma.prototype=Oa.prototype,(0,n.K2)(Oa,"FormatSpecifier"),Oa.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},(0,n.K2)($a,"default"),(0,n.K2)(Ia,"default"),(0,n.K2)(Da,"default");var Na={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Sa,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Da(100*t,e),r:Da,s:Ia,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Pa(t){return t}(0,n.K2)(Pa,"default");var ja,za,qa,Ra=Array.prototype.map,Wa=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ua(t){var e=void 0===t.grouping||void 0===t.thousands?Pa:Ba(Ra.call(t.grouping,Number),t.thousands+""),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Pa:Fa(Ra.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function u(t){var u=(t=Ma(t)).fill,h=t.align,d=t.sign,f=t.symbol,p=t.zero,m=t.width,g=t.comma,y=t.precision,b=t.trim,_=t.type;"n"===_?(g=!0,_="g"):Na[_]||(void 0===y&&(y=12),b=!0,_="g"),(p||"0"===u&&"="===h)&&(p=!0,u="0",h="=");var x="$"===f?r:"#"===f&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",C="$"===f?i:/[%p]/.test(_)?s:"",v=Na[_],w=/[defgprs%]/.test(_);function k(t){var r,n,i,s=x,f=C;if("c"===_)f=v(t)+f,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:v(Math.abs(t),y),b&&(t=$a(t)),k&&0==+t&&"+"!==d&&(k=!1),s=(k?"("===d?d:l:"-"===d||"("===d?"":d)+s,f=("s"===_?Wa[8+Ea/3]:"")+f+(k&&"("===d?")":""),w)for(r=-1,n=t.length;++r(i=t.charCodeAt(r))||i>57){f=(46===i?o+t.slice(r+1):t.slice(r))+f,t=t.slice(0,r);break}}g&&!p&&(t=e(t,1/0));var T=s.length+t.length+f.length,S=T>1)+s+t+f+S.slice(T);break;default:t=S+s+t+f}return a(t)}return y=void 0===y?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),(0,n.K2)(k,"format"),k.toString=function(){return t+""},k}function h(t,e){var r=u(((t=Ma(t)).type="f",t)),n=3*Math.max(-8,Math.min(8,Math.floor(Aa(e)/3))),i=Math.pow(10,-n),o=Wa[8+n/3];return function(t){return r(i*t)+o}}return(0,n.K2)(u,"newFormat"),(0,n.K2)(h,"formatPrefix"),{format:u,formatPrefix:h}}function Ha(t){return ja=Ua(t),za=ja.format,qa=ja.formatPrefix,ja}function Ya(t){return Math.max(0,-Aa(Math.abs(t)))}function Ga(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Aa(e)/3)))-Aa(Math.abs(t)))}function Va(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Aa(e)-Aa(t))+1}function Ja(t,e,r,n){var i,o=ar(t,e,r);switch((n=Ma(null==n?",f":n)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(i=Ga(o,a))||(n.precision=i),qa(n,a);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=Va(o,Math.max(Math.abs(t),Math.abs(e))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=Ya(o))||(n.precision=i-2*("%"===n.type))}return za(n)}function Xa(t){var e=t.domain;return t.ticks=function(t){var r=e();return ir(r[0],r[r.length-1],null==t?10:t)},t.tickFormat=function(t,r){var n=e();return Ja(n[0],n[n.length-1],null==t?10:t,r)},t.nice=function(r){null==r&&(r=10);var n,i,o=e(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c0;){if((i=or(l,c,r))===n)return o[a]=l,o[s]=c,e(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}n=i}return t},t}function Za(){var t=Ta();return t.copy=function(){return wa(t,Za())},da.apply(t,arguments),Xa(t)}(0,n.K2)(Ua,"default"),Ha({thousands:",",grouping:[3],currency:["$",""]}),(0,n.K2)(Ha,"defaultLocale"),(0,n.K2)(Ya,"default"),(0,n.K2)(Ga,"default"),(0,n.K2)(Va,"default"),(0,n.K2)(Ja,"tickFormat"),(0,n.K2)(Xa,"linearish"),(0,n.K2)(Za,"linear");var Qa=new Date,ts=new Date;function es(t,e,r,i){function o(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return(0,n.K2)(o,"interval"),o.floor=e=>(t(e=new Date(+e)),e),o.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),o.round=t=>{const e=o(t),r=o.ceil(t);return t-e(e(t=new Date(+t),null==r?1:Math.floor(r)),t),o.range=(r,n,i)=>{const a=[];if(r=o.ceil(r),i=null==i?1:Math.floor(i),!(r0))return a;let s;do{a.push(s=new Date(+r)),e(r,i),t(r)}while(ses((e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)}),((t,n)=>{if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!r(t););else for(;--n>=0;)for(;e(t,1),!r(t););})),r&&(o.count=(e,n)=>(Qa.setTime(+e),ts.setTime(+n),t(Qa),t(ts),Math.floor(r(Qa,ts))),o.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?o.filter(i?e=>i(e)%t==0:e=>o.count(0,e)%t==0):o:null)),o}(0,n.K2)(es,"timeInterval");var rs=es((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));rs.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?es((e=>{e.setTime(Math.floor(e/t)*t)}),((e,r)=>{e.setTime(+e+r*t)}),((e,r)=>(r-e)/t)):rs:null),rs.range;var ns=1e3,is=6e4,os=36e5,as=864e5,ss=6048e5,ls=31536e6,cs=es((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*ns)}),((t,e)=>(e-t)/ns),(t=>t.getUTCSeconds())),us=(cs.range,es((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ns)}),((t,e)=>{t.setTime(+t+e*is)}),((t,e)=>(e-t)/is),(t=>t.getMinutes()))),hs=(us.range,es((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*is)}),((t,e)=>(e-t)/is),(t=>t.getUTCMinutes()))),ds=(hs.range,es((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ns-t.getMinutes()*is)}),((t,e)=>{t.setTime(+t+e*os)}),((t,e)=>(e-t)/os),(t=>t.getHours()))),fs=(ds.range,es((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*os)}),((t,e)=>(e-t)/os),(t=>t.getUTCHours()))),ps=(fs.range,es((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*is)/as),(t=>t.getDate()-1))),ms=(ps.range,es((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/as),(t=>t.getUTCDate()-1))),gs=(ms.range,es((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/as),(t=>Math.floor(t/as))));function ys(t){return es((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*is)/ss))}gs.range,(0,n.K2)(ys,"timeWeekday");var bs=ys(0),_s=ys(1),xs=ys(2),Cs=ys(3),vs=ys(4),ws=ys(5),ks=ys(6);function Ts(t){return es((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/ss))}bs.range,_s.range,xs.range,Cs.range,vs.range,ws.range,ks.range,(0,n.K2)(Ts,"utcWeekday");var Ss=Ts(0),Ks=Ts(1),As=Ts(2),Bs=Ts(3),Fs=Ts(4),Es=Ts(5),Ls=Ts(6),Ms=(Ss.range,Ks.range,As.range,Bs.range,Fs.range,Es.range,Ls.range,es((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()))),Os=(Ms.range,es((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()))),$s=(Os.range,es((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));$s.every=t=>isFinite(t=Math.floor(t))&&t>0?es((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,r)=>{e.setFullYear(e.getFullYear()+r*t)})):null,$s.range;var Is=es((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function Ds(t,e,r,i,o,a){const s=[[cs,1,ns],[cs,5,5e3],[cs,15,15e3],[cs,30,3e4],[a,1,is],[a,5,3e5],[a,15,9e5],[a,30,18e5],[o,1,os],[o,3,108e5],[o,6,216e5],[o,12,432e5],[i,1,as],[i,2,1728e5],[r,1,ss],[e,1,2592e6],[e,3,7776e6],[t,1,ls]];function l(t,e,r){const n=et)).right(s,i);if(o===s.length)return t.every(ar(e/ls,r/ls,n));if(0===o)return rs.every(Math.max(ar(e,r,n),1));const[a,l]=s[i/s[o-1][2]isFinite(t=Math.floor(t))&&t>0?es((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null,Is.range,(0,n.K2)(Ds,"ticker");var[Ns,Ps]=Ds(Is,Os,Ss,gs,fs,hs),[js,zs]=Ds($s,Ms,bs,ps,ds,us);function qs(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Rs(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ws(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Us(t){var e=t.dateTime,r=t.date,i=t.time,o=t.periods,a=t.days,s=t.shortDays,l=t.months,c=t.shortMonths,u=tl(o),h=el(o),d=tl(a),f=el(a),p=tl(s),m=el(s),g=tl(l),y=el(l),b=tl(c),_=el(c),x={a:O,A:$,b:I,B:D,c:null,d:vl,e:vl,f:Kl,g:Nl,G:jl,H:wl,I:kl,j:Tl,L:Sl,m:Al,M:Bl,p:N,q:P,Q:cc,s:uc,S:Fl,u:El,U:Ll,V:Ol,w:$l,W:Il,x:null,X:null,y:Dl,Y:Pl,Z:zl,"%":lc},C={a:j,A:z,b:q,B:R,c:null,d:ql,e:ql,f:Yl,g:ic,G:ac,H:Rl,I:Wl,j:Ul,L:Hl,m:Gl,M:Vl,p:W,q:U,Q:cc,s:uc,S:Jl,u:Xl,U:Zl,V:tc,w:ec,W:rc,x:null,X:null,y:nc,Y:oc,Z:sc,"%":lc},v={a:K,A,b:B,B:F,c:E,d:dl,e:dl,f:bl,g:ll,G:sl,H:pl,I:pl,j:fl,L:yl,m:hl,M:ml,p:S,q:ul,Q:xl,s:Cl,S:gl,u:nl,U:il,V:ol,w:rl,W:al,x:L,X:M,y:ll,Y:sl,Z:cl,"%":_l};function w(t,e){return function(r){var n,i,o,a=[],s=-1,l=0,c=t.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(n=Rs(Ws(o.y,0,1))).getUTCDay(),n=i>4||0===i?Ks.ceil(n):Ks(n),n=ms.offset(n,7*(o.V-1)),o.y=n.getUTCFullYear(),o.m=n.getUTCMonth(),o.d=n.getUTCDate()+(o.w+6)%7):(i=(n=qs(Ws(o.y,0,1))).getDay(),n=i>4||0===i?_s.ceil(n):_s(n),n=ps.offset(n,7*(o.V-1)),o.y=n.getFullYear(),o.m=n.getMonth(),o.d=n.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Rs(Ws(o.y,0,1)).getUTCDay():qs(Ws(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Rs(o)):qs(o)}}function T(t,e,r,n){for(var i,o,a=0,s=e.length,l=r.length;a=l)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=v[i in Gs?e.charAt(a++):i])||(n=o(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}function S(t,e,r){var n=u.exec(e.slice(r));return n?(t.p=h.get(n[0].toLowerCase()),r+n[0].length):-1}function K(t,e,r){var n=p.exec(e.slice(r));return n?(t.w=m.get(n[0].toLowerCase()),r+n[0].length):-1}function A(t,e,r){var n=d.exec(e.slice(r));return n?(t.w=f.get(n[0].toLowerCase()),r+n[0].length):-1}function B(t,e,r){var n=b.exec(e.slice(r));return n?(t.m=_.get(n[0].toLowerCase()),r+n[0].length):-1}function F(t,e,r){var n=g.exec(e.slice(r));return n?(t.m=y.get(n[0].toLowerCase()),r+n[0].length):-1}function E(t,r,n){return T(t,e,r,n)}function L(t,e,n){return T(t,r,e,n)}function M(t,e,r){return T(t,i,e,r)}function O(t){return s[t.getDay()]}function $(t){return a[t.getDay()]}function I(t){return c[t.getMonth()]}function D(t){return l[t.getMonth()]}function N(t){return o[+(t.getHours()>=12)]}function P(t){return 1+~~(t.getMonth()/3)}function j(t){return s[t.getUTCDay()]}function z(t){return a[t.getUTCDay()]}function q(t){return c[t.getUTCMonth()]}function R(t){return l[t.getUTCMonth()]}function W(t){return o[+(t.getUTCHours()>=12)]}function U(t){return 1+~~(t.getUTCMonth()/3)}return x.x=w(r,x),x.X=w(i,x),x.c=w(e,x),C.x=w(r,C),C.X=w(i,C),C.c=w(e,C),(0,n.K2)(w,"newFormat"),(0,n.K2)(k,"newParse"),(0,n.K2)(T,"parseSpecifier"),(0,n.K2)(S,"parsePeriod"),(0,n.K2)(K,"parseShortWeekday"),(0,n.K2)(A,"parseWeekday"),(0,n.K2)(B,"parseShortMonth"),(0,n.K2)(F,"parseMonth"),(0,n.K2)(E,"parseLocaleDateTime"),(0,n.K2)(L,"parseLocaleDate"),(0,n.K2)(M,"parseLocaleTime"),(0,n.K2)(O,"formatShortWeekday"),(0,n.K2)($,"formatWeekday"),(0,n.K2)(I,"formatShortMonth"),(0,n.K2)(D,"formatMonth"),(0,n.K2)(N,"formatPeriod"),(0,n.K2)(P,"formatQuarter"),(0,n.K2)(j,"formatUTCShortWeekday"),(0,n.K2)(z,"formatUTCWeekday"),(0,n.K2)(q,"formatUTCShortMonth"),(0,n.K2)(R,"formatUTCMonth"),(0,n.K2)(W,"formatUTCPeriod"),(0,n.K2)(U,"formatUTCQuarter"),{format:function(t){var e=w(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",C);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}(0,n.K2)(qs,"localDate"),(0,n.K2)(Rs,"utcDate"),(0,n.K2)(Ws,"newDate"),(0,n.K2)(Us,"formatLocale");var Hs,Ys,Gs={"-":"",_:" ",0:"0"},Vs=/^\s*\d+/,Js=/^%/,Xs=/[\\^$*+?|[\]().{}]/g;function Zs(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",o=i.length;return n+(o[t.toLowerCase(),e])))}function rl(t,e,r){var n=Vs.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function nl(t,e,r){var n=Vs.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function il(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function ol(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function al(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function sl(t,e,r){var n=Vs.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function ll(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function cl(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function ul(t,e,r){var n=Vs.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function hl(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function dl(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function fl(t,e,r){var n=Vs.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function pl(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function ml(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function gl(t,e,r){var n=Vs.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function yl(t,e,r){var n=Vs.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function bl(t,e,r){var n=Vs.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function _l(t,e,r){var n=Js.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function xl(t,e,r){var n=Vs.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function Cl(t,e,r){var n=Vs.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function vl(t,e){return Zs(t.getDate(),e,2)}function wl(t,e){return Zs(t.getHours(),e,2)}function kl(t,e){return Zs(t.getHours()%12||12,e,2)}function Tl(t,e){return Zs(1+ps.count($s(t),t),e,3)}function Sl(t,e){return Zs(t.getMilliseconds(),e,3)}function Kl(t,e){return Sl(t,e)+"000"}function Al(t,e){return Zs(t.getMonth()+1,e,2)}function Bl(t,e){return Zs(t.getMinutes(),e,2)}function Fl(t,e){return Zs(t.getSeconds(),e,2)}function El(t){var e=t.getDay();return 0===e?7:e}function Ll(t,e){return Zs(bs.count($s(t)-1,t),e,2)}function Ml(t){var e=t.getDay();return e>=4||0===e?vs(t):vs.ceil(t)}function Ol(t,e){return t=Ml(t),Zs(vs.count($s(t),t)+(4===$s(t).getDay()),e,2)}function $l(t){return t.getDay()}function Il(t,e){return Zs(_s.count($s(t)-1,t),e,2)}function Dl(t,e){return Zs(t.getFullYear()%100,e,2)}function Nl(t,e){return Zs((t=Ml(t)).getFullYear()%100,e,2)}function Pl(t,e){return Zs(t.getFullYear()%1e4,e,4)}function jl(t,e){var r=t.getDay();return Zs((t=r>=4||0===r?vs(t):vs.ceil(t)).getFullYear()%1e4,e,4)}function zl(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Zs(e/60|0,"0",2)+Zs(e%60,"0",2)}function ql(t,e){return Zs(t.getUTCDate(),e,2)}function Rl(t,e){return Zs(t.getUTCHours(),e,2)}function Wl(t,e){return Zs(t.getUTCHours()%12||12,e,2)}function Ul(t,e){return Zs(1+ms.count(Is(t),t),e,3)}function Hl(t,e){return Zs(t.getUTCMilliseconds(),e,3)}function Yl(t,e){return Hl(t,e)+"000"}function Gl(t,e){return Zs(t.getUTCMonth()+1,e,2)}function Vl(t,e){return Zs(t.getUTCMinutes(),e,2)}function Jl(t,e){return Zs(t.getUTCSeconds(),e,2)}function Xl(t){var e=t.getUTCDay();return 0===e?7:e}function Zl(t,e){return Zs(Ss.count(Is(t)-1,t),e,2)}function Ql(t){var e=t.getUTCDay();return e>=4||0===e?Fs(t):Fs.ceil(t)}function tc(t,e){return t=Ql(t),Zs(Fs.count(Is(t),t)+(4===Is(t).getUTCDay()),e,2)}function ec(t){return t.getUTCDay()}function rc(t,e){return Zs(Ks.count(Is(t)-1,t),e,2)}function nc(t,e){return Zs(t.getUTCFullYear()%100,e,2)}function ic(t,e){return Zs((t=Ql(t)).getUTCFullYear()%100,e,2)}function oc(t,e){return Zs(t.getUTCFullYear()%1e4,e,4)}function ac(t,e){var r=t.getUTCDay();return Zs((t=r>=4||0===r?Fs(t):Fs.ceil(t)).getUTCFullYear()%1e4,e,4)}function sc(){return"+0000"}function lc(){return"%"}function cc(t){return+t}function uc(t){return Math.floor(+t/1e3)}function hc(t){return Hs=Us(t),Ys=Hs.format,Hs.parse,Hs.utcFormat,Hs.utcParse,Hs}function dc(t,e){var r,n=0,i=(t=t.slice()).length-1,o=t[n],a=t[i];return a1?0:t<-1?Bc:Math.acos(t)}function Mc(t){return t>=1?Fc:t<=-1?-Fc:Math.asin(t)}(0,n.K2)(Lc,"acos"),(0,n.K2)(Mc,"asin");var Oc=Math.PI,$c=2*Oc,Ic=1e-6,Dc=$c-Ic;function Nc(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Nc;const r=10**e;return function(t){this._+=t[0];for(let e=1,n=t.length;eIc)if(Math.abs(u*s-l*c)>Ic&&i){let d=r-o,f=n-a,p=s*s+l*l,m=d*d+f*f,g=Math.sqrt(p),y=Math.sqrt(h),b=i*Math.tan((Oc-Math.acos((p+h-m)/(2*g*y)))/2),_=b/y,x=b/g;Math.abs(_-1)>Ic&&this._append`L${t+_*c},${e+_*u}`,this._append`A${i},${i},0,0,${+(u*d>c*f)},${this._x1=t+x*s},${this._y1=e+x*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,r,n,i,o){if(t=+t,e=+e,o=!!o,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(n),s=r*Math.sin(n),l=t+a,c=e+s,u=1^o,h=o?n-i:i-n;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Ic||Math.abs(this._y1-c)>Ic)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%$c+$c),h>Dc?this._append`A${r},${r},0,1,${u},${t-a},${e-s}A${r},${r},0,1,${u},${this._x1=l},${this._y1=c}`:h>Ic&&this._append`A${r},${r},0,${+(h>=Oc)},${u},${this._x1=t+r*Math.cos(i)},${this._y1=e+r*Math.sin(i)}`)}rect(t,e,r,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}};function zc(){return new jc}function qc(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new jc(e)}function Rc(t){return t.innerRadius}function Wc(t){return t.outerRadius}function Uc(t){return t.startAngle}function Hc(t){return t.endAngle}function Yc(t){return t&&t.padAngle}function Gc(t,e,r,n,i,o,a,s){var l=r-t,c=n-e,u=a-i,h=s-o,d=h*l-u*c;if(!(d*dF*F+E*E&&(k=S,T=K),{cx:k,cy:T,x01:-u,y01:-h,x11:k*(i/C-1),y11:T*(i/C-1)}}function Jc(){var t=Rc,e=Wc,r=xc(0),i=null,o=Uc,a=Hc,s=Yc,l=null,c=qc(u);function u(){var n,u,h=+t.apply(this,arguments),d=+e.apply(this,arguments),f=o.apply(this,arguments)-Fc,p=a.apply(this,arguments)-Fc,m=Cc(p-f),g=p>f;if(l||(l=n=c()),dAc)if(m>Ec-Ac)l.moveTo(d*wc(f),d*Sc(f)),l.arc(0,0,d,f,p,!g),h>Ac&&(l.moveTo(h*wc(p),h*Sc(p)),l.arc(0,0,h,p,f,g));else{var y,b,_=f,x=p,C=f,v=p,w=m,k=m,T=s.apply(this,arguments)/2,S=T>Ac&&(i?+i.apply(this,arguments):Kc(h*h+d*d)),K=Tc(Cc(d-h)/2,+r.apply(this,arguments)),A=K,B=K;if(S>Ac){var F=Mc(S/h*Sc(T)),E=Mc(S/d*Sc(T));(w-=2*F)>Ac?(C+=F*=g?1:-1,v-=F):(w=0,C=v=(f+p)/2),(k-=2*E)>Ac?(_+=E*=g?1:-1,x-=E):(k=0,_=x=(f+p)/2)}var L=d*wc(_),M=d*Sc(_),O=h*wc(v),$=h*Sc(v);if(K>Ac){var I,D=d*wc(x),N=d*Sc(x),P=h*wc(C),j=h*Sc(C);if(mAc?B>Ac?(y=Vc(P,j,L,M,d,B,g),b=Vc(D,N,O,$,d,B,g),l.moveTo(y.cx+y.x01,y.cy+y.y01),BAc&&w>Ac?A>Ac?(y=Vc(O,$,D,N,h,-A,g),b=Vc(L,M,P,j,h,-A,g),l.lineTo(y.cx+y.x01,y.cy+y.y01),At?1:e>=t?0:NaN}function iu(t){return t}function ou(){var t=iu,e=nu,r=null,i=xc(0),o=xc(Ec),a=xc(0);function s(n){var s,l,c,u,h,d=(n=Qc(n)).length,f=0,p=new Array(d),m=new Array(d),g=+i.apply(this,arguments),y=Math.min(Ec,Math.max(-Ec,o.apply(this,arguments)-g)),b=Math.min(Math.abs(y)/d,a.apply(this,arguments)),_=b*(y<0?-1:1);for(s=0;s0&&(f+=h);for(null!=e?p.sort((function(t,r){return e(m[t],m[r])})):null!=r&&p.sort((function(t,e){return r(n[t],n[e])})),s=0,c=f?(y-d*_)/f:0;s0?h*c:0)+_,m[l]={data:n[l],index:s,value:h,startAngle:g,endAngle:u,padAngle:b};return m}return(0,n.K2)(s,"pie"),s.value=function(e){return arguments.length?(t="function"==typeof e?e:xc(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,r=null,s):e},s.sort=function(t){return arguments.length?(r=t,e=null,s):r},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:xc(+t),s):i},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:xc(+t),s):o},s.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:xc(+t),s):a},s}(0,n.K2)(zc,"path"),zc.prototype=jc.prototype,(0,n.K2)(qc,"withPath"),(0,n.K2)(Rc,"arcInnerRadius"),(0,n.K2)(Wc,"arcOuterRadius"),(0,n.K2)(Uc,"arcStartAngle"),(0,n.K2)(Hc,"arcEndAngle"),(0,n.K2)(Yc,"arcPadAngle"),(0,n.K2)(Gc,"intersect"),(0,n.K2)(Vc,"cornerTangents"),(0,n.K2)(Jc,"default"),(0,n.K2)(Xc,"Linear"),Xc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&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)}}},(0,n.K2)(Zc,"default"),Array.prototype.slice,(0,n.K2)(Qc,"default"),(0,n.K2)(tu,"x"),(0,n.K2)(eu,"y"),(0,n.K2)(ru,"default"),(0,n.K2)(nu,"default"),(0,n.K2)(iu,"default"),(0,n.K2)(ou,"default");var au=class{static{(0,n.K2)(this,"Bump")}constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(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._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}};function su(t){return new au(t,!0)}function lu(t){return new au(t,!1)}function cu(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 uu(t){this._context=t}function hu(t){return new uu(t)}function du(){}function fu(t){this._context=t}function pu(t){return new fu(t)}function mu(t){this._context=t}function gu(t){return new mu(t)}function yu(t,e){this._basis=new uu(t),this._beta=e}(0,n.K2)(su,"bumpX"),(0,n.K2)(lu,"bumpY"),(0,n.K2)(cu,"point"),(0,n.K2)(uu,"Basis"),uu.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:cu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:cu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},(0,n.K2)(hu,"default"),(0,n.K2)(du,"default"),(0,n.K2)(fu,"BasisClosed"),fu.prototype={areaStart:du,areaEnd:du,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)}},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:cu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},(0,n.K2)(pu,"default"),(0,n.K2)(mu,"BasisOpen"),mu.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||0!==this._line&&3===this._point)&&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,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:cu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},(0,n.K2)(gu,"default"),(0,n.K2)(yu,"Bundle"),yu.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 n,i=t[0],o=e[0],a=t[r]-i,s=e[r]-o,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*a),this._beta*e[l]+(1-this._beta)*(o+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var bu=(0,n.K2)((function t(e){function r(t){return 1===e?new uu(t):new yu(t,e)}return(0,n.K2)(r,"bundle"),r.beta=function(e){return t(+e)},r}),"custom")(.85);function _u(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 xu(t,e){this._context=t,this._k=(1-e)/6}(0,n.K2)(_u,"point"),(0,n.K2)(xu,"Cardinal"),xu.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:_u(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:_u(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Cu=(0,n.K2)((function t(e){function r(t){return new xu(t,e)}return(0,n.K2)(r,"cardinal"),r.tension=function(e){return t(+e)},r}),"custom")(0);function vu(t,e){this._context=t,this._k=(1-e)/6}(0,n.K2)(vu,"CardinalClosed"),vu.prototype={areaStart:du,areaEnd:du,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)}},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:_u(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var wu=(0,n.K2)((function t(e){function r(t){return new vu(t,e)}return(0,n.K2)(r,"cardinal"),r.tension=function(e){return t(+e)},r}),"custom")(0);function ku(t,e){this._context=t,this._k=(1-e)/6}(0,n.K2)(ku,"CardinalOpen"),ku.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||0!==this._line&&3===this._point)&&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:_u(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Tu=(0,n.K2)((function t(e){function r(t){return new ku(t,e)}return(0,n.K2)(r,"cardinal"),r.tension=function(e){return t(+e)},r}),"custom")(0);function Su(t,e,r){var n=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Ac){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);n=(n*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Ac){var c=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);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/u,a=(a*c+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(n,i,o,a,t._x2,t._y2)}function Ku(t,e){this._context=t,this._alpha=e}(0,n.K2)(Su,"point"),(0,n.K2)(Ku,"CatmullRom"),Ku.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:Su(this,t,e)}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}};var Au=(0,n.K2)((function t(e){function r(t){return e?new Ku(t,e):new xu(t,0)}return(0,n.K2)(r,"catmullRom"),r.alpha=function(e){return t(+e)},r}),"custom")(.5);function Bu(t,e){this._context=t,this._alpha=e}(0,n.K2)(Bu,"CatmullRomClosed"),Bu.prototype={areaStart:du,areaEnd:du,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)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:Su(this,t,e)}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}};var Fu=(0,n.K2)((function t(e){function r(t){return e?new Bu(t,e):new vu(t,0)}return(0,n.K2)(r,"catmullRom"),r.alpha=function(e){return t(+e)},r}),"custom")(.5);function Eu(t,e){this._context=t,this._alpha=e}(0,n.K2)(Eu,"CatmullRomOpen"),Eu.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:Su(this,t,e)}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}};var Lu=(0,n.K2)((function t(e){function r(t){return e?new Eu(t,e):new ku(t,0)}return(0,n.K2)(r,"catmullRom"),r.alpha=function(e){return t(+e)},r}),"custom")(.5);function Mu(t){this._context=t}function Ou(t){return new Mu(t)}function $u(t){return t<0?-1:1}function Iu(t,e,r){var n=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(n||i<0&&-0),a=(r-t._y1)/(i||n<0&&-0),s=(o*i+a*n)/(n+i);return($u(o)+$u(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Du(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Nu(t,e,r){var n=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-n)/3;t._context.bezierCurveTo(n+s,i+s*e,o-s,a-s*r,o,a)}function Pu(t){this._context=t}function ju(t){this._context=new zu(t)}function zu(t){this._context=t}function qu(t){return new Pu(t)}function Ru(t){return new ju(t)}function Wu(t){this._context=t}function Uu(t){var e,r,n=t.length-1,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e=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)}}this._x=t,this._y=e}},(0,n.K2)(Gu,"default"),(0,n.K2)(Vu,"stepBefore"),(0,n.K2)(Ju,"stepAfter");var Xu={value:()=>{}};function Zu(){for(var t,e=0,r=arguments.length,n={};e=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}}))}function eh(t,e){for(var r,n=0,i=t.length;n0)for(var r,n,i=new Array(r),o=0;o=0&&e._call.call(void 0,t),e=e._next;--ah}function xh(){hh=(uh=fh.now())+dh,ah=sh=0;try{_h()}finally{ah=0,vh(),hh=0}}function Ch(){var t=fh.now(),e=t-uh;e>ch&&(dh-=e,uh=t)}function vh(){for(var t,e,r=nh,n=1/0;r;)r._call?(n>r._time&&(n=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:nh=e);ih=t,wh(n)}function wh(t){ah||(sh&&(sh=clearTimeout(sh)),t-hh>24?(t<1/0&&(sh=setTimeout(xh,t-fh.now()-dh)),lh&&(lh=clearInterval(lh))):(lh||(uh=fh.now(),lh=setInterval(Ch,ch)),ah=1,ph(xh)))}function kh(t,e,r){var n=new yh;return e=null==e?0:+e,n.restart((r=>{n.stop(),t(r+e)}),e,r),n}(0,n.K2)(mh,"now"),(0,n.K2)(gh,"clearNow"),(0,n.K2)(yh,"Timer"),yh.prototype=bh.prototype={constructor:yh,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?mh():+r)+(null==e?0:+e),this._next||ih===this||(ih?ih._next=this:nh=this,ih=this),this._call=t,this._time=r,wh()},stop:function(){this._call&&(this._call=null,this._time=1/0,wh())}},(0,n.K2)(bh,"timer"),(0,n.K2)(_h,"timerFlush"),(0,n.K2)(xh,"wake"),(0,n.K2)(Ch,"poke"),(0,n.K2)(vh,"nap"),(0,n.K2)(wh,"sleep"),(0,n.K2)(kh,"default");var Th=oh("start","end","cancel","interrupt"),Sh=[],Kh=0,Ah=1,Bh=2,Fh=3,Eh=4,Lh=5,Mh=6;function Oh(t,e,r,n,i,o){var a=t.__transition;if(a){if(r in a)return}else t.__transition={};Nh(t,r,{name:e,index:n,group:i,on:Th,tween:Sh,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Kh})}function $h(t,e){var r=Dh(t,e);if(r.state>Kh)throw new Error("too late; already scheduled");return r}function Ih(t,e){var r=Dh(t,e);if(r.state>Fh)throw new Error("too late; already running");return r}function Dh(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Nh(t,e,r){var i,o=t.__transition;function a(t){r.state=Ah,r.timer.restart(s,r.delay,r.time),r.delay<=t&&s(t-r.delay)}function s(n){var a,u,h,d;if(r.state!==Ah)return c();for(a in o)if((d=o[a]).name===r.name){if(d.state===Fh)return kh(s);d.state===Eh?(d.state=Mh,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete o[a]):+aBh&&r.state=0&&(t=t.slice(0,e)),!t||"start"===t}))}function yd(t,e,r){var n,i,o=gd(e)?$h:Ih;return function(){var a=o(this,t),s=a.on;s!==n&&(i=(n=s).copy()).on(e,r),a.on=i}}function bd(t,e){var r=this._id;return arguments.length<2?Dh(this.node(),r).on.on(t):this.each(yd(r,t,e))}function _d(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function xd(){return this.on("end.remove",_d(this._id))}function Cd(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=wr(t));for(var n=this._groups,i=n.length,o=new Array(i),a=0;anf(e,r).then((e=>(new DOMParser).parseFromString(e,t)))}(0,n.K2)(tf,"number1"),(0,n.K2)((function(t){return[tf(t[0]),tf(t[1])]}),"number2"),["w","e"].map(ef),["n","s"].map(ef),["n","w","e","s","nw","ne","sw","se"].map(ef),(0,n.K2)(ef,"type"),(0,n.K2)(rf,"responseText"),(0,n.K2)(nf,"default"),(0,n.K2)(of,"parser"),of("application/xml"),of("text/html");var af=of("image/svg+xml");function sf(t,e,r){this.k=t,this.x=e,this.y=r}(0,n.K2)(sf,"Transform"),sf.prototype={constructor:sf,scale:function(t){return 1===t?this:new sf(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new sf(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+")"}};var lf=new sf(1,0,0);function cf(t){for(;!t.__zoom;)if(!(t=t.parentNode))return lf;return t.__zoom}cf.prototype=sf.prototype,(0,n.K2)(cf,"transform")},5070:(t,e,r)=>{"use strict";r.d(e,{F:()=>o});var n=r(6009),i=(0,n.P$)({"../../node_modules/.pnpm/@braintree+sanitize-url@7.0.1/node_modules/@braintree/sanitize-url/dist/constants.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.BLANK_URL=t.relativeFirstCharacters=t.urlSchemeRegex=t.ctrlCharactersRegex=t.htmlCtrlEntityRegex=t.htmlEntitiesRegex=t.invalidProtocolRegex=void 0,t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,t.htmlCtrlEntityRegex=/&(newline|tab);/gi,t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,t.urlSchemeRegex=/^.+(:|:)/gim,t.relativeFirstCharacters=[".","/"],t.BLANK_URL="about:blank"}}),o=(0,n.P$)({"../../node_modules/.pnpm/@braintree+sanitize-url@7.0.1/node_modules/@braintree/sanitize-url/dist/index.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=void 0;var e=i();function r(t){return e.relativeFirstCharacters.indexOf(t[0])>-1}function o(t){return t.replace(e.ctrlCharactersRegex,"").replace(e.htmlEntitiesRegex,(function(t,e){return String.fromCharCode(e)}))}function a(t){if(!t)return e.BLANK_URL;var n,i=t;do{n=(i=o(i).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").trim()).match(e.ctrlCharactersRegex)||i.match(e.htmlEntitiesRegex)||i.match(e.htmlCtrlEntityRegex)}while(n&&n.length>0);var a=i;if(!a)return e.BLANK_URL;if(r(a))return a;var s=a.match(e.urlSchemeRegex);if(!s)return a;var l=s[0];return e.invalidProtocolRegex.test(l)?e.BLANK_URL:a}(0,n.K2)(r,"isRelativeUrlWithoutProtocol"),(0,n.K2)(o,"decodeHtmlCharacters"),(0,n.K2)(a,"sanitizeUrl"),t.sanitizeUrl=a}})},6009:(t,e,r)=>{"use strict";r.d(e,{K2:()=>c,P$:()=>u,VA:()=>h,f1:()=>p,ie:()=>f});var n=Object.create,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(t,e)=>i(t,"name",{value:e,configurable:!0}),u=(t,e)=>function(){return e||(0,t[a(t)[0]])((e={exports:{}}).exports,e),e.exports},h=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},d=(t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let s of a(e))l.call(t,s)||s===r||i(t,s,{get:()=>e[s],enumerable:!(n=o(e,s))||n.enumerable});return t},f=(t,e,r)=>(d(t,e,"default"),r&&d(r,e,"default")),p=(t,e,r)=>(r=null!=t?n(s(t)):{},d(!e&&t&&t.__esModule?r:i(r,"default",{value:t,enumerable:!0}),t))},57:(t,e,r)=>{"use strict";r.d(e,{$C:()=>K,$t:()=>R,C4:()=>U,I5:()=>q,Ib:()=>m,Sm:()=>H,Un:()=>$,_K:()=>W,bH:()=>L,dq:()=>j,pe:()=>l,rY:()=>Y,ru:()=>O,sM:()=>T,vU:()=>f,yT:()=>B});var n=r(5070),i=r(772),o=r(8605),a=r(6009),s=(0,a.f1)((0,n.F)(),1),l="​",c={curveBasis:i.J1,curveBasisClosed:i.h$,curveBasisOpen:i.Bp,curveBumpX:i.dJ,curveBumpY:i.kl,curveBundle:i.D6,curveCardinalClosed:i.jU,curveCardinalOpen:i.Jj,curveCardinal:i.Jp,curveCatmullRomClosed:i.J9,curveCatmullRomOpen:i.Jl,curveCatmullRom:i.NN,curveLinear:i.AS,curveLinearClosed:i.yF,curveMonotoneX:i.Gh,curveMonotoneY:i.Nk,curveNatural:i.Y7,curveStep:i.z1,curveStepAfter:i.Ps,curveStepBefore:i.Ko},u=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,h=(0,a.K2)((function(t,e){const r=d(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const t=r.map((t=>t.args));(0,i.$i)(t),n=(0,i.hH)(n,[...t])}else n=r.args;if(!n)return;let o=(0,i.Ch)(t,e);const a="config";return void 0!==n[a]&&("flowchart-v2"===o&&(o="flowchart"),n[o]=n[a],delete n[a]),n}),"detectInit"),d=(0,a.K2)((function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${u.source})(?=[}][%]{2}).*\n`,"ig");let n;t=t.trim().replace(r,"").replace(/'/gm,'"'),i.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(n=i.DB.exec(t));)if(n.index===i.DB.lastIndex&&i.DB.lastIndex++,n&&!e||e&&n[1]&&n[1].match(e)||e&&n[2]&&n[2].match(e)){const t=n[1]?n[1]:n[2],e=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(r){return i.Rm.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}}),"detectDirective"),f=(0,a.K2)((function(t){return t.replace(i.DB,"")}),"removeDirectives"),p=(0,a.K2)((function(t,e){for(const[r,n]of e.entries())if(n.match(t))return r;return-1}),"isSubstringInArray");function m(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return c[r]??e}function g(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,s.sanitizeUrl)(r):r}(0,a.K2)(m,"interpolateToCurve"),(0,a.K2)(g,"formatUrl");var y=(0,a.K2)(((t,...e)=>{const r=t.split("."),n=r.length-1,o=r[n];let a=window;for(let e=0;e{r+=b(t,e),e=t})),v(t,r/2)}function x(t){return 1===t.length?t[0]:_(t)}(0,a.K2)(b,"distance"),(0,a.K2)(_,"traverseEdge"),(0,a.K2)(x,"calcLabelPosition");var C=(0,a.K2)(((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r}),"roundNumber"),v=(0,a.K2)(((t,e)=>{let r,n=e;for(const e of t){if(r){const t=b(e,r);if(t=1)return{x:e.x,y:e.y};if(i>0&&i<1)return{x:C((1-i)*r.x+i*e.x,5),y:C((1-i)*r.y+i*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")}),"calculatePoint"),w=(0,a.K2)(((t,e,r)=>{i.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const n=v(e,25),o=t?10:5,a=Math.atan2(e[0].y-n.y,e[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(a)*o+(e[0].x+n.x)/2,s.y=-Math.cos(a)*o+(e[0].y+n.y)/2,s}),"calcCardinalityPosition");function k(t,e,r){const n=structuredClone(r);i.Rm.info("our points",n),"start_left"!==e&&"start_right"!==e&&n.reverse();const o=v(n,25+t),a=10+.5*t,s=Math.atan2(n[0].y-o.y,n[0].x-o.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*a+(n[0].x+o.x)/2,l.y=-Math.cos(s+Math.PI)*a+(n[0].y+o.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*a+(n[0].x+o.x)/2-5,l.y=-Math.cos(s-Math.PI)*a+(n[0].y+o.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*a+(n[0].x+o.x)/2-5,l.y=-Math.cos(s)*a+(n[0].y+o.y)/2-5):(l.x=Math.sin(s)*a+(n[0].x+o.x)/2,l.y=-Math.cos(s)*a+(n[0].y+o.y)/2),l}function T(t){let e="",r="";for(const n of t)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}(0,a.K2)(k,"calcTerminalLabelPosition"),(0,a.K2)(T,"getStylesFromArray");var S=0,K=(0,a.K2)((()=>(S++,"id-"+Math.random().toString(36).substr(2,12)+"-"+S)),"generateId");function A(t){let e="";for(let r=0;rA(t.length)),"random"),F=(0,a.K2)((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:""}}),"getTextObj"),E=(0,a.K2)((function(t,e){const r=e.text.replace(i.Y2.lineBreakRegex," "),[,n]=q(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",n),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),void 0!==e.class&&o.attr("class",e.class);const a=o.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.attr("fill",e.fill),a.text(r),o}),"drawSimpleText"),L=(0,o.Dr)(((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),i.Y2.lineBreakRegex.test(t))return t;const n=t.split(" "),o=[];let a="";return n.forEach(((t,i)=>{const s=$(`${t} `,r),l=$(a,r);if(s>e){const{hyphenatedStrings:n,remainingWord:i}=M(t,e,"-",r);o.push(a,...n),a=i}else l+s>=e?(o.push(a),a=t):a=[a,t].filter(Boolean).join(" ");i+1===n.length&&o.push(a)})),o.filter((t=>""!==t)).join(r.joinWith)}),((t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`)),M=(0,o.Dr)(((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...t],o=[];let a="";return i.forEach(((t,s)=>{const l=`${a}${t}`;if($(l,n)>=e){const t=s+1,e=i.length===t,n=`${l}${r}`;o.push(e?l:n),a=""}else a=l})),{hyphenatedStrings:o,remainingWord:a}}),((t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`));function O(t,e){return D(t,e).height}function $(t,e){return D(t,e).width}(0,a.K2)(O,"calculateTextHeight"),(0,a.K2)($,"calculateTextWidth");var I,D=(0,o.Dr)(((t,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:o=400}=e;if(!t)return{width:0,height:0};const[,a]=q(r),s=["sans-serif",n],c=t.split(i.Y2.lineBreakRegex),u=[],h=(0,i.df)("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const d=h.append("svg");for(const t of s){let e=0;const r={width:0,height:0,lineHeight:0};for(const n of c){const i=F();i.text=n||l;const s=E(d,i).style("font-size",a).style("font-weight",o).style("font-family",t),c=(s._groups||s)[0][0].getBBox();if(0===c.width&&0===c.height)throw new Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,c.width)),e=Math.round(c.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}u.push(r)}return d.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`)),N=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,a.K2)(this,"InitIDGenerator")}},P=(0,a.K2)((function(t){return I=I||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),I.innerHTML=t,unescape(I.textContent)}),"entityDecode");function j(t){return"str"in t}(0,a.K2)(j,"isDetailedError");var z=(0,a.K2)(((t,e,r,n)=>{if(!n)return;const i=t.node()?.getBBox();i&&t.append("text").text(n).attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)}),"insertTitle"),q=(0,a.K2)((t=>{if("number"==typeof t)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]}),"parseFontSize");function R(t,e){return(0,o.ds)({},t,e)}(0,a.K2)(R,"cleanAndMerge");var W={assignWithDepth:i.hH,wrapLabel:L,calculateTextHeight:O,calculateTextWidth:$,calculateTextDimensions:D,cleanAndMerge:R,detectInit:h,detectDirective:d,isSubstringInArray:p,interpolateToCurve:m,calcLabelPosition:x,calcCardinalityPosition:w,calcTerminalLabelPosition:k,formatUrl:g,getStylesFromArray:T,generateId:K,random:B,runFunc:y,entityDecode:P,insertTitle:z,parseFontSize:q,InitIDGenerator:N},U=(0,a.K2)((function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})),e}),"encodeEntities"),H=(0,a.K2)((function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")}),"decodeEntities"),Y=(0,a.K2)(((t,e,{counter:r=0,prefix:n,suffix:i})=>`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`),"getEdgeId")},8605:(t,e,r)=>{"use strict";r.d(e,{$q:()=>E,A$:()=>ee,A6:()=>rr,Bx:()=>Fe,DA:()=>a,Dr:()=>jt,EE:()=>de,FX:()=>Gr,GT:()=>_,HI:()=>Se,JH:()=>br,KO:()=>rn,M$:()=>Re,NJ:()=>Ar,NY:()=>Ve,Nc:()=>we,Ni:()=>Ae,On:()=>R,T1:()=>ge,Th:()=>Ie,To:()=>ve,Wg:()=>$r,Yi:()=>on,_$:()=>he,_i:()=>De,aB:()=>fr,bT:()=>sr,bt:()=>Rr,dZ:()=>hr,ds:()=>ln,ii:()=>C,jL:()=>tn,jk:()=>s,l1:()=>Pe,l7:()=>pe,lI:()=>Zt,lr:()=>ze,nD:()=>sn,nJ:()=>oe,nO:()=>be,pI:()=>lt,pP:()=>Nt,pp:()=>Jr,uQ:()=>Tr,vX:()=>xr,zI:()=>vt,zw:()=>k});var n=r(6009),i="object"==typeof global&&global&&global.Object===Object&&global,o="object"==typeof self&&self&&self.Object===Object&&self,a=i||o||Function("return this")(),s=a.Symbol,l=Object.prototype,c=l.hasOwnProperty,u=l.toString,h=s?s.toStringTag:void 0;function d(t){var e=c.call(t,h),r=t[h];try{t[h]=void 0;var n=!0}catch(t){}var i=u.call(t);return n&&(e?t[h]=r:delete t[h]),i}(0,n.K2)(d,"getRawTag");var f=d,p=Object.prototype.toString;function m(t){return p.call(t)}(0,n.K2)(m,"objectToString");var g=m,y=s?s.toStringTag:void 0;function b(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":y&&y in Object(t)?f(t):g(t)}(0,n.K2)(b,"baseGetTag");var _=b;function x(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}(0,n.K2)(x,"isObject");var C=x;function v(t){if(!C(t))return!1;var e=_(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}(0,n.K2)(v,"isFunction");var w,k=v,T=a["__core-js_shared__"],S=(w=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"";function K(t){return!!S&&S in t}(0,n.K2)(K,"isMasked");var A=K,B=Function.prototype.toString;function F(t){if(null!=t){try{return B.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(0,n.K2)(F,"toSource");var E=F,L=/^\[object .+?Constructor\]$/,M=Function.prototype,O=Object.prototype,$=M.toString,I=O.hasOwnProperty,D=RegExp("^"+$.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function N(t){return!(!C(t)||A(t))&&(k(t)?D:L).test(E(t))}(0,n.K2)(N,"baseIsNative");var P=N;function j(t,e){return null==t?void 0:t[e]}(0,n.K2)(j,"getValue");var z=j;function q(t,e){var r=z(t,e);return P(r)?r:void 0}(0,n.K2)(q,"getNative");var R=q,W=R(Object,"create");function U(){this.__data__=W?W(null):{},this.size=0}(0,n.K2)(U,"hashClear");var H=U;function Y(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}(0,n.K2)(Y,"hashDelete");var G=Y,V=Object.prototype.hasOwnProperty;function J(t){var e=this.__data__;if(W){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return V.call(e,t)?e[t]:void 0}(0,n.K2)(J,"hashGet");var X=J,Z=Object.prototype.hasOwnProperty;function Q(t){var e=this.__data__;return W?void 0!==e[t]:Z.call(e,t)}(0,n.K2)(Q,"hashHas");var tt=Q;function et(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=W&&void 0===e?"__lodash_hash_undefined__":e,this}(0,n.K2)(et,"hashSet");var rt=et;function nt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1}(0,n.K2)(gt,"listCacheHas");var yt=gt;function bt(t,e){var r=this.__data__,n=ut(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}(0,n.K2)(bt,"listCacheSet");var _t=bt;function xt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=9007199254740991}(0,n.K2)(Ne,"isLength");var Pe=Ne;function je(t){return null!=t&&Pe(t.length)&&!k(t)}(0,n.K2)(je,"isArrayLike");var ze=je;function qe(t){return Fe(t)&&ze(t)}(0,n.K2)(qe,"isArrayLikeObject");var Re=qe;function We(){return!1}(0,n.K2)(We,"stubFalse");var Ue=We,He="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ye=He&&"object"==typeof module&&module&&!module.nodeType&&module,Ge=Ye&&Ye.exports===He?a.Buffer:void 0,Ve=(Ge?Ge.isBuffer:void 0)||Ue,Je=Function.prototype,Xe=Object.prototype,Ze=Je.toString,Qe=Xe.hasOwnProperty,tr=Ze.call(Object);function er(t){if(!Fe(t)||"[object Object]"!=_(t))return!1;var e=we(t);if(null===e)return!0;var r=Qe.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Ze.call(r)==tr}(0,n.K2)(er,"isPlainObject");var rr=er,nr={};function ir(t){return Fe(t)&&Pe(t.length)&&!!nr[_(t)]}nr["[object Float32Array]"]=nr["[object Float64Array]"]=nr["[object Int8Array]"]=nr["[object Int16Array]"]=nr["[object Int32Array]"]=nr["[object Uint8Array]"]=nr["[object Uint8ClampedArray]"]=nr["[object Uint16Array]"]=nr["[object Uint32Array]"]=!0,nr["[object Arguments]"]=nr["[object Array]"]=nr["[object ArrayBuffer]"]=nr["[object Boolean]"]=nr["[object DataView]"]=nr["[object Date]"]=nr["[object Error]"]=nr["[object Function]"]=nr["[object Map]"]=nr["[object Number]"]=nr["[object Object]"]=nr["[object RegExp]"]=nr["[object Set]"]=nr["[object String]"]=nr["[object WeakMap]"]=!1,(0,n.K2)(ir,"baseIsTypedArray");var or=ir;function ar(t){return function(e){return t(e)}}(0,n.K2)(ar,"baseUnary");var sr=ar,lr="object"==typeof exports&&exports&&!exports.nodeType&&exports,cr=lr&&"object"==typeof module&&module&&!module.nodeType&&module,ur=cr&&cr.exports===lr&&i.process,hr=function(){try{return cr&&cr.require&&cr.require("util").types||ur&&ur.binding&&ur.binding("util")}catch(t){}}(),dr=hr&&hr.isTypedArray,fr=dr?sr(dr):or;function pr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}(0,n.K2)(pr,"safeGet");var mr=pr,gr=Object.prototype.hasOwnProperty;function yr(t,e,r){var n=t[e];gr.call(t,e)&<(n,r)&&(void 0!==r||e in t)||ee(t,e,r)}(0,n.K2)(yr,"assignValue");var br=yr;function _r(t,e,r,n){var i=!r;r||(r={});for(var o=-1,a=e.length;++o-1&&t%1==0&&t0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(0,n.K2)(Qr,"shortOut");var tn=Qr(Xr);function en(t,e){return tn(Gr(t,e,Rr),t+"")}(0,n.K2)(en,"baseRest");var rn=en;function nn(t,e,r){if(!C(r))return!1;var n=typeof e;return!!("number"==n?ze(r)&&Tr(e,r.length):"string"==n&&e in r)&<(r[e],t)}(0,n.K2)(nn,"isIterateeCall");var on=nn;function an(t){return rn((function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&on(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++n{"use strict";r.d(e,{r:()=>n});var n="11.0.0-alpha.7"},7484:(t,e,r)=>{"use strict";r.d(e,{n:()=>o});var n=r(1098),i=r(3026);function o(t){const e=new n.Parser(n.Grammar.fromCompiled(i));return e.feed(t),e.results[0]}}},t=>{t.O(0,[4770],(()=>t(t.s=6897))),t.O()}]); \ No newline at end of file