mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-20 15:25:36 +08:00
315 lines
608 KiB
JavaScript
315 lines
608 KiB
JavaScript
|
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/dagre-VKFMJZFB.WoZbLr_t.js","assets/chunks/chunk-RYQCIY6F.DF2IyMF4.js","assets/chunks/graph.BvS0Xx32.js","assets/chunks/map.DsahiwlY.js","assets/chunks/layout.BIpOukc5.js","assets/chunks/framework.C2AwuPrQ.js","assets/chunks/swimlanes-5IMT3BWC.CH50oLdK.js","assets/chunks/cose-bilkent-JH36ORCC.BVcHG8-S.js","assets/chunks/cytoscape.esm.OyMbaexL.js","assets/chunks/c4Diagram-LMCZKHZV.CTkNN5tJ.js","assets/chunks/chunk-32BRIVSS.DTslVixY.js","assets/chunks/flowDiagram-23GEKE2U.DsMgkuRh.js","assets/chunks/chunk-5VM5RSS4.D8JH7qlT.js","assets/chunks/chunk-XXDRQBXY.Cwm78DH8.js","assets/chunks/chunk-VR4S4FIN.V_t2sjuN.js","assets/chunks/channel.DVCQ8-ym.js","assets/chunks/swimlanesDiagram-G3AALYLV.Bx02elx7.js","assets/chunks/erDiagram-Q63AITRT.ClsMUxcC.js","assets/chunks/gitGraphDiagram-IHSO6WYX.Bl72_nsd.js","assets/chunks/chunk-2Q5K7J3B.BGKRutAs.js","assets/chunks/chunk-JWPE2WC7.C9webpn6.js","assets/chunks/cynefin-VYW2F7L2.DDB6TQyK.js","assets/chunks/ganttDiagram-NO4QXBWP.CcOb5Plw.js","assets/chunks/linear.C-E3dEV8.js","assets/chunks/init.Gi6I4Gst.js","assets/chunks/defaultLocale.DX6XiGOO.js","assets/chunks/infoDiagram-FWYZ7A6U.L7IuR3uD.js","assets/chunks/pieDiagram-ENE6RG2P.CaC0dzQe.js","assets/chunks/arc.BE7C84-M.js","assets/chunks/ordinal.BYWQX77i.js","assets/chunks/quadrantDiagram-ABIIQ3AL.BXYyWeay.js","assets/chunks/xychartDiagram-FW5EYKEG.Ef7DhQ15.js","assets/chunks/requirementDiagram-TGXJPOKE.GjkRH4S6.js","assets/chunks/sequenceDiagram-DBY2YBRQ.DmmY8fN-.js","assets/chunks/classDiagram-OUVF2IWQ.LQ-fU6dC.js","assets/chunks/chunk-V7JOEXUC.DdUJrCtt.js","assets/chunks/classDiagram-v2-EOCWNBFH.LQ-fU6dC.js","assets/chunks/stateDiagram-2N3HPSRC.DD1ZNyFT.js","assets/chunks/chunk-EX3LRPZG.BEgQN1yE.js","assets/chunks/stateDiagram-v2-6OUMAXLB.-49KoKw4.js","assets/chunks/journeyDiagram-5HDEW3XC.CSX0rqh5.js","assets/chunks/timeline-definition-FHXFAJF6.BjNTqx_G.js","assets/chunks/mindmap-definition-LN4V7U3C.C6ozGKih.js","assets/chunks/kanban-definition-HUTT4EX6.DVGs3wD1.js","assets/chunks/sankeyDiagram-HTMAVEWB.Jc5E54NN.js","assets/chunks/diagram-NH7WQ7WH.DviI3VWs.js","assets/chunks/diagram-WEI45ONY.BdeTBdc0.js","assets/chunks/blockDiagram-677ZJIJ3.vDOR2WiE.js","assets/chunks/diagram-OA4YK3LP.CKc1NH-s.js","assets/chunks/architectureDiagram-ZJ3FMSHR.JbsoWAmW.js","assets/chunks/diagram-FQU43EPY.DxUAkvs5.js","assets/chunks/ishikawaDiagram-FXEZZL3T.D67SKgIq.js","assets/chunks/vennDiagram-L72KCM5P.B27UOI_3.js","assets/chunks/diagram-G47NLZAW.BbNWv9-a.js","assets/chunks/wardleyDiagram-EHGQE667.VDMS5VVw.js","assets/chunks/cynefinDiagram-TSTJHNR4.DLJ1p5JZ.js","assets/chunks/railroadDiagram-RFXS5EU6.B5d3tS7r.js","assets/chunks/chunk-MOJQB5TN.CiSdFNtX.js","assets/chunks/ebnfDiagram-CCIWWBDH.n70AeiK_.js","assets/chunks/abnfDiagram-VRR7QNED.Bck9XS9N.js","assets/chunks/pegDiagram-2B236MQR.Ckcpsat6.js"])))=>i.map(i=>d[i]);
|
|||
|
|
import{W as nt}from"./framework.C2AwuPrQ.js";var qc=Object.defineProperty,p=(e,t)=>qc(e,"name",{value:t,configurable:!0}),Fy=(e,t)=>{for(var r in t)qc(e,r,{get:t[r],enumerable:!0})};function Ay(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var No={exports:{}},Ey=No.exports,ih;function My(){return ih||(ih=1,(function(e,t){(function(r,i){e.exports=i()})(Ey,(function(){var r=1e3,i=6e4,o=36e5,s="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",f="quarter",u="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|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,b={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($){var A=["th","st","nd","rd"],F=$%100;return"["+$+(A[(F-20)%10]||A[F]||A[0])+"]"}},k=function($,A,F){var D=String($);return!D||D.length>=A?$:""+Array(A+1-D.length).join(F)+$},T={s:k,z:function($){var A=-$.utcOffset(),F=Math.abs(A),D=Math.floor(F/60),M=F%60;return(A<=0?"+":"-")+k(D,2,"0")+":"+k(M,2,"0")},m:function $(A,F){if(A.date()<F.date())return-$(F,A);var D=12*(F.year()-A.year())+(F.month()-A.month()),M=A.clone().add(D,d),H=F-M<0,Y=A.clone().add(D+(H?-1:1),d);return+(-(D+(F-M)/(H?M-Y:Y-M))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:d,y:u,w:h,d:c,D:g,h:l,m:n,s:a,ms:s,Q:f}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},S="en",_={};_[S]=b;var L="$isDayjsObject",v=function($){return $ instanceof z||!(!$||!$[L])},N=function $(A,F,D){var M;if(!A)return S;if(typeof A=="string"){var H=A.toLowerCase();_[H]&&(M=H),F&&(_[H]=F,M=H);var Y=A.split("-");if(!M&&Y.length>1)return $(Y[0])}else{var G=A.name;_[G]=A,M=G}return!D&&M&&(S=M),M||!D&&S},R=function($,A){if(v($))return $.clone();var F=typeof A=="object"?A:{};return F.date=$,F.args=arguments,new z(F)},P=T;P.l=N,P.i=v,P.w=function($,A){return R($,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var z=(function(){function $(F){this.$L=N(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[L]=!0}var A=$.prototype;return A.parse=function(F){this.$d=(function(D){var M=D.date,H=D.utc;if(M===null)return new Date(NaN);if(P.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var Y=M.match(y);if(Y){var G=Y[2]-1||0,lt=(Y[7]||"0").substring(0,3);return H?new Date(Date.UTC(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,lt)):new Date(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,lt)}}return new Date(M)})(F),this.init()},A.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},A.$utils=function(){return P},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(F,D){var M=R(F);return this.startOf(D)<=M&&M<=this.endOf(D)},A.isAfter=function(F,D){return R(F)<this.startOf(D)},A.isBefore=function(F,D){return this.endOf(D)<R(F)},A.$g=function(F,D,M){return P.u(F)?this[D]:this.set(M,F)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(F,D){var M=this,H=!!P.u(D)||D,Y=P.p(F),G=function(Bt,St){var ut=P.w(M.$u?Date.UTC(M.$y,St,Bt):new Date(M.$y,St,Bt),M);return H?ut:ut.endOf(c)},lt=function(Bt,St){return P.w(M.toDate()[Bt].apply(M.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(St)),M)},ht=this.$W,dt=this.$M,bt=this.$D,et="set"+(this.$u?"UTC":"");switch(Y){case u:return H?G(1,0):G(31,11);case d:return H?G(1,dt):G(0,dt+1);case h:var ft=this.$locale().weekStart||0,kt=(ht<ft?ht+7:ht)-ft;return G(H?bt-kt:bt+(6-kt),dt);case c:case g:return lt(et+"Hours",0);case l:return lt(et+"Minutes",1);case n:return lt(et+"Seconds",2);case a:return lt(et+"Milliseconds",3);default:return this.clone()}},A.endOf=function(F){retur
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uy(e,t){return zy(e)||Hy(e,t)||jy(e,t)||Yy()}function jy(e,t){if(e){if(typeof e=="string")return oh(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oh(e,t):void 0}}const Hc=Object.entries,sh=Object.setPrototypeOf,Gy=Object.isFrozen,Xy=Object.getPrototypeOf,Vy=Object.getOwnPropertyDescriptor;let Ut=Object.freeze,jt=Object.seal,Hr=Object.create,Yc=typeof Reflect<"u"&&Reflect,Ma=Yc.apply,$a=Yc.construct;Ut||(Ut=function(t){return t});jt||(jt=function(t){return t});Ma||(Ma=function(t,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];return t.apply(r,o)});$a||($a=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return new t(...i)});const vi=Ot(Array.prototype.forEach),Zy=Ot(Array.prototype.lastIndexOf),ah=Ot(Array.prototype.pop),Nr=Ot(Array.prototype.push),Ky=Ot(Array.prototype.splice),er=Array.isArray,Ri=Ot(String.prototype.toLowerCase),ua=Ot(String.prototype.toString),nh=Ot(String.prototype.match),Li=Ot(String.prototype.replace),lh=Ot(String.prototype.indexOf),Qy=Ot(String.prototype.trim),Jy=Ot(Number.prototype.toString),t0=Ot(Boolean.prototype.toString),hh=typeof BigInt>"u"?null:Ot(BigInt.prototype.toString),ch=typeof Symbol>"u"?null:Ot(Symbol.prototype.toString),Nt=Ot(Object.prototype.hasOwnProperty),Fi=Ot(Object.prototype.toString),zt=Ot(RegExp.prototype.test),fr=e0(TypeError);function Ot(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return Ma(e,t,i)}}function e0(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return $a(e,r)}}function mt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ri;if(sh&&sh(e,null),!er(t))return e;let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){const s=r(o);s!==o&&(Gy(t)||(t[i]=s),o=s)}e[o]=!0}return e}function r0(e){for(let t=0;t<e.length;t++)Nt(e,t)||(e[t]=null);return e}function Qt(e){const t=Hr(null);for(const i of Hc(e)){var r=Uy(i,2);const o=r[0],s=r[1];Nt(e,o)&&(er(s)?t[o]=r0(s):s&&typeof s=="object"&&s.constructor===Object?t[o]=Qt(s):t[o]=s)}return t}function i0(e){switch(typeof e){case"string":return e;case"number":return Jy(e);case"boolean":return t0(e);case"bigint":return hh?hh(e):"0";case"symbol":return ch?ch(e):"Symbol()";case"undefined":return Fi(e);case"function":case"object":{if(e===null)return Fi(e);const t=e,r=Be(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Fi(i)}return Fi(e)}default:return Fi(e)}}function Be(e,t){for(;e!==null;){const i=Vy(e,t);if(i){if(i.get)return Ot(i.get);if(typeof i.value=="function")return Ot(i.value)}e=Xy(e)}function r(){return null}return r}function o0(e){try{return zt(e,""),!0}catch{return!1}}const dh=Ut(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),fa=Ut(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","ent
|
|||
|
|
`+Mt),Ze&&(Mt=So(Mt)),_&&ko?z(Mt):Mt},t.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};la(j),Zs=!0,Ks=ut,Qs=Tt},t.clearConfig=function(){Pr=null,Zs=!1,Ks=null,Qs=null,_=v,L=""},t.isValidAttribute=function(j,w,E){Pr||la({});const U=Ft(j),J=Ft(w);return th(U,J,E)},t.addHook=function(j,w){typeof w=="function"&&Nt(G,j)&&Nr(G[j],w)},t.removeHook=function(j,w){if(Nt(G,j)){if(w!==void 0){const E=Zy(G[j],w);return E===-1?void 0:Ky(G[j],E,1)[0]}return ah(G[j])}},t.removeHooks=function(j){Nt(G,j)&&(G[j]=[])},t.removeAllHooks=function(){G=yh()},t}var ui=Uc(),Oa=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>Oa(e,s,o)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&t[s]!==null&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=Oa(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Dt=Oa,$e="#ffffff",Oe="#f2f2f2",st=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),Qr,k0=(Qr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?I(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||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectB
|
|||
|
|
`);for(const[r,{detector:i}]of Object.entries(_r))if(i(e,t))return r;throw new rd(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ia=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)id(t,r,i)},"registerLazyLoadedDiagrams"),id=p((e,t,r)=>{_r[e]&&q.warn(`Detector with key ${e} already exists. Overwriting.`),_r[e]={detector:t,loader:r},q.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Q0=p(e=>_r[e].loader,"getDiagramLoader"),co=/<br\s*\/?>/gi,J0=p(e=>e?ad(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),tC=(()=>{let e=!1;return()=>{e||(od(),e=!0)}})();function od(){const e="data-temp-href-target";ui.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),ui.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(od,"setupDompurifyHooks");var sd=p(e=>(tC(),ui.sanitize(e)),"removeScript"),xh=p((e,t)=>{if(ee(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=sd(e):r!=="loose"&&(e=ad(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=oC(e))}return e},"sanitizeMore"),be=p((e,t)=>e&&(t.dompurifyConfig?e=ui.sanitize(xh(e,t),t.dompurifyConfig).toString():e=ui.sanitize(xh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),eC=p((e,t)=>typeof e=="string"?be(e,t):e.flat().map(r=>be(r,t)),"sanitizeTextOrArray"),rC=p(e=>co.test(e),"hasBreaks"),iC=p(e=>e.split(co),"splitBreaks"),oC=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),ad=p(e=>e.replace(co,"#br#"),"breakToPlaceholder"),sC=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),aC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),nC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),bh=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let o=t[i];if(o===","&&i>0&&i+1<t.length){const s=t[i-1],a=t[i+1];lC(s,a)&&(o=s+","+a,i++,r.pop())}r.push(hC(o))}return r.join("")},"parseGenericTypes"),Da=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),lC=p((e,t)=>{const r=Da(e,"~"),i=Da(t,"~");return r===1&&i===1},"shouldCombineSets"),hC=p(e=>{const t=Da(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let o=i.indexOf("~"),s=i.lastIndexOf("~");for(;o!==-1&&s!==-1&&o!==s;)i[o]="<",i[s]=">",o=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),kh=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Pa=/\$\$(.*?)\$\$/g,Qi=p(e=>(e.match(Pa)?.length??0)>0,"hasKatex"),IL=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await nd(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),cC=p(async(e,t)=>{if(!Qi(e))return e;if(!(kh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Pa,"MathML is unsupported in this environment.");{const{default:r}=await nt(async()=>{const{default:o}=await import("./katex.HP8lGamR.js");return{default:o}},[]),i=t.forceLegacyMathML||!kh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(co).map(o=>Qi(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Pa,(o,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),nd=p(async(e,t)=>be(await cC(e,t),t),"renderKatexSanitized"),uo={getRows:J0,sanitizeText:be,sanitizeTextOrArray:eC,hasBreaks:rC,splitBreaks:iC,lineBreakRegex:co,removeScript:sd,getUrl:sC,
|
|||
|
|
`)}p(Ra,"cssStyleSheetToString");var pC=p((e,t,r,i)=>{let o="";return e in Wo&&Wo[e]?o=Wo[e]({...r,svgId:i}):q.warn(`No theme found for ${e}`),` & {
|
|||
|
|
font-family: ${r.fontFamily};
|
|||
|
|
font-size: ${r.fontSize};
|
|||
|
|
fill: ${r.textColor}
|
|||
|
|
}
|
|||
|
|
@keyframes edge-animation-frame {
|
|||
|
|
from {
|
|||
|
|
stroke-dashoffset: 0;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
@keyframes dash {
|
|||
|
|
to {
|
|||
|
|
stroke-dashoffset: 0;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
& .edge-animation-slow {
|
|||
|
|
stroke-dasharray: 9,5 !important;
|
|||
|
|
stroke-dashoffset: 900;
|
|||
|
|
animation: dash 50s linear infinite;
|
|||
|
|
stroke-linecap: round;
|
|||
|
|
}
|
|||
|
|
& .edge-animation-fast {
|
|||
|
|
stroke-dasharray: 9,5 !important;
|
|||
|
|
stroke-dashoffset: 900;
|
|||
|
|
animation: dash 20s linear infinite;
|
|||
|
|
stroke-linecap: round;
|
|||
|
|
}
|
|||
|
|
/* Classes common for multiple diagrams */
|
|||
|
|
|
|||
|
|
& .error-icon {
|
|||
|
|
fill: ${r.errorBkgColor};
|
|||
|
|
}
|
|||
|
|
& .error-text {
|
|||
|
|
fill: ${r.errorTextColor};
|
|||
|
|
stroke: ${r.errorTextColor};
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
& .edge-thickness-normal {
|
|||
|
|
stroke-width: ${r.strokeWidth??1}px;
|
|||
|
|
}
|
|||
|
|
& .edge-thickness-thick {
|
|||
|
|
stroke-width: 3.5px
|
|||
|
|
}
|
|||
|
|
& .edge-pattern-solid {
|
|||
|
|
stroke-dasharray: 0;
|
|||
|
|
}
|
|||
|
|
& .edge-thickness-invisible {
|
|||
|
|
stroke-width: 0;
|
|||
|
|
fill: none;
|
|||
|
|
}
|
|||
|
|
& .edge-pattern-dashed{
|
|||
|
|
stroke-dasharray: 3;
|
|||
|
|
}
|
|||
|
|
.edge-pattern-dotted {
|
|||
|
|
stroke-dasharray: 2;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
& .marker {
|
|||
|
|
fill: ${r.lineColor};
|
|||
|
|
stroke: ${r.lineColor};
|
|||
|
|
}
|
|||
|
|
& .marker.cross {
|
|||
|
|
stroke: ${r.lineColor};
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
& svg {
|
|||
|
|
font-family: ${r.fontFamily};
|
|||
|
|
font-size: ${r.fontSize};
|
|||
|
|
}
|
|||
|
|
& p {
|
|||
|
|
margin: 0
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
${o}
|
|||
|
|
.node .neo-node {
|
|||
|
|
stroke: ${r.nodeBorder};
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|||
|
|
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|||
|
|
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|||
|
|
}
|
|||
|
|
[data-look="neo"].swimlane.cluster rect {
|
|||
|
|
filter: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
[data-look="neo"].node path {
|
|||
|
|
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|||
|
|
stroke-width: ${r.strokeWidth??1}px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
[data-look="neo"].node .outer-path {
|
|||
|
|
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
[data-look="neo"].node .neo-line path {
|
|||
|
|
stroke: ${r.nodeBorder};
|
|||
|
|
filter: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
[data-look="neo"].node circle{
|
|||
|
|
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|||
|
|
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
[data-look="neo"].node circle .state-start{
|
|||
|
|
fill: #000000;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
[data-look="neo"].icon-shape .icon {
|
|||
|
|
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|||
|
|
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
[data-look="neo"].icon-shape .icon-neo path {
|
|||
|
|
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|||
|
|
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
${t}
|
|||
|
|
`},"getStyles"),gC=p((e,t)=>{t!==void 0&&(Wo[e]=t)},"addStylesForDiagram"),mC=pC,hd={};Fy(hd,{clear:()=>yC,getAccDescription:()=>kC,getAccTitle:()=>xC,getDiagramTitle:()=>TC,setAccDescription:()=>bC,setAccTitle:()=>CC,setDiagramTitle:()=>wC});var In="",Dn="",Pn="",Rn=p(e=>be(e,vt()),"sanitizeText"),yC=p(()=>{In="",Pn="",Dn=""},"clear"),CC=p(e=>{In=Rn(e).replace(/^\s+/g,"")},"setAccTitle"),xC=p(()=>In,"getAccTitle"),bC=p(e=>{Pn=Rn(e).replace(/\n\s+/g,`
|
|||
|
|
`)},"setAccDescription"),kC=p(()=>Pn,"getAccDescription"),wC=p(e=>{Dn=Rn(e)},"setDiagramTitle"),TC=p(()=>Dn,"getDiagramTitle"),wh=q,SC=$n,Ct=vt,DL=Kc,PL=fi,Nn=p(e=>be(e,Ct()),"sanitizeText"),_C=fC,BC=p(()=>hd,"getCommonDb"),rs={},is=p((e,t,r)=>{rs[e]&&wh.warn(`Diagram with id ${e} already registered. Overwriting.`),rs[e]=t,r&&id(e,r),gC(e,t.styles),t.injectUtils?.(wh,SC,Ct,Nn,_C,BC(),()=>{})},"registerDiagram"),Na=p(e=>{if(e in rs)return rs[e];throw new vC(e)},"getDiagram"),ci,vC=(ci=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(ci,"DiagramNotFoundError"),ci),LC={value:()=>{}};function cd(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new zo(r)}function zo(e){this._=e}function FC(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",o=r.indexOf(".");if(o>=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}zo.prototype=cd.prototype={constructor:zo,on:function(e,t){var r=this._,i=FC(e+"",r),o,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((o=(e=i[s]).type)&&(o=AC(r[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(o=(e=i[s]).type)r[o]=Th(r[o],e.name,t);else if(t==null)for(o in r)r[o]=Th(r[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new zo(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var r=new Array(o),i=0,o,s;i<o;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,o=s.length;i<o;++i)s[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,s=i.length;o<s;++o)i[o].value.apply(t,r)}};function AC(e,t){for(var r=0,i=e.length,o;r<i;++r)if((o=e[r]).name===t)return o.value}function Th(e,t,r){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=LC,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var qa="http://www.w3.org/1999/xhtml";const Sh={svg:"http://www.w3.org/2000/svg",xhtml:qa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ms(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Sh.hasOwnProperty(t)?{space:Sh[t],local:e}:e}function EC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===qa&&t.documentElement.namespaceURI===qa?t.createElement(e):t.createElementNS(r,e)}}function MC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function dd(e){var t=Ms(e);return(t.local?MC:EC)(t)}function $C(){}function qn(e){return e==null?$C:function(){return this.querySelector(e)}}function OC(e){typeof e!="function"&&(e=qn(e));for(var t=this._groups,r=t.length,i=new Array(r),o=0;o<r;++o)for(var s=t[o],a=s.length,n=i[o]=new Array(a),l,c,h=0;h<a;++h)(l=s[h])&&(c=e.call(l,l.__data__,h,s))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new ne(i,this._parents)}function IC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function DC(){return[]}function ud(e){return e==null?DC:function(){return this.querySelectorAll(e)}}function PC(e){return function(){return IC(e.apply(this,arguments))}}function RC(e){typeof e=="function"?e=PC(e):e=ud(e);for(var t=this._groups,r=t.length,i=[],o=[],s=0;s<r;++s)for(var a=t[s],n=a.length,l,c=0;c<n;++c)(l=a[c])&&(i.push(e.call(l,l.__data__,c,a)),o.push(l));return new ne(i,o)}function fd(e){return function(){return this.matches(e)}}function pd(e){return function(t){return t.matches(e)}}var NC=Array.prototype.find;function qC(e){return function(){return NC.call(this.children,e)}}function WC(){return this.firstElementChild}function zC(e){return this.select(e==null?WC:qC(typeof e=="function"?e:pd(e)))}var HC=Array.prototype.filter;function YC(){return Array.from(this.children)}function UC(e){return function(){return HC.call(this
|
|||
|
|
|
|||
|
|
`+e.mark.snippet),i+" "+r):i}p(Jn,"formatError");function mi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Jn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(mi,"YAMLException$1");mi.prototype=Object.create(Error.prototype);mi.prototype.constructor=mi;mi.prototype.toString=p(function(t){return this.name+": "+Jn(this,t)},"toString");var oe=mi;function Uo(e,t,r,i,o){var s="",a="",n=Math.floor(o/2)-1;return i-t>n&&(s=" ... ",t=i-n+s.length),r-i>n&&(a=" ...",r=i+n-a.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+a,pos:i-t+s.length}}p(Uo,"getLine");function jo(e,t){return Pt.repeat(" ",t-e.length)+e}p(jo,"padStart");function cu(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],o=[],s,a=-1;s=r.exec(e.buffer);)o.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,o.length).toString().length,d=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)c=Uo(e.buffer,i[a-l],o[a-l],e.position-(i[a]-i[a-l]),d),n=Pt.repeat(" ",t.indent)+jo((e.line-l+1).toString(),h)+" | "+c.str+`
|
|||
|
|
`+n;for(c=Uo(e.buffer,i[a],o[a],e.position,d),n+=Pt.repeat(" ",t.indent)+jo((e.line+1).toString(),h)+" | "+c.str+`
|
|||
|
|
`,n+=Pt.repeat("-",t.indent+h+3+c.pos)+`^
|
|||
|
|
`,l=1;l<=t.linesAfter&&!(a+l>=o.length);l++)c=Uo(e.buffer,i[a+l],o[a+l],e.position-(i[a]-i[a+l]),d),n+=Pt.repeat(" ",t.indent)+jo((e.line+l+1).toString(),h)+" | "+c.str+`
|
|||
|
|
`;return n.replace(/\n$/,"")}p(cu,"makeSnippet");var d1=cu,u1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],f1=["scalar","sequence","mapping"];function du(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(du,"compileStyleAliases");function uu(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(u1.indexOf(r)===-1)throw new oe('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=du(t.styleAliases||null),f1.indexOf(this.kind)===-1)throw new oe('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(uu,"Type$1");var Vt=uu;function Za(e,t){var r=[];return e[t].forEach(function(i){var o=r.length;r.forEach(function(s,a){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(o=a)}),r[o]=i}),r}p(Za,"compileList");function fu(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(fu,"compileMap");function fs(e){return this.extend(e)}p(fs,"Schema$1");fs.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Vt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new oe("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Vt))throw new oe("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new oe("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new oe("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof Vt))throw new oe("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(fs.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(i),o.compiledImplicit=Za(o,"implicit"),o.compiledExplicit=Za(o,"explicit"),o.compiledTypeMap=fu(o.compiledImplicit,o.compiledExplicit),o},"extend");var p1=fs,g1=new Vt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),m1=new Vt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),y1=new Vt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),C1=new p1({explicit:[g1,m1,y1]});function pu(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(pu,"resolveYamlNull");function gu(){return null}p(gu,"constructYamlNull");function mu(e){return e===null}p(mu,"isNull");var x1=new Vt("tag:yaml.org,2002:null",{kind:"scalar",resolve:pu,construct:gu,predicate:mu,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function yu(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(yu,"resolveYamlBoolean");function Cu(e){return e==="true"||e==="True"||e==="TRU
|
|||
|
|
\r`;function Pu(e){if(e===null)return!1;var t,r,i=0,o=e.length,s=tl;for(r=0;r<o;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Pu,"resolveYamlBinary");function Ru(e){var t,r,i=e.replace(/[\r\n=]/g,""),o=i.length,s=tl,a=0,n=[];for(t=0;t<o;t++)t%4===0&&t&&(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)),a=a<<6|s.indexOf(i.charAt(t));return r=o%4*6,r===0?(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)):r===18?(n.push(a>>10&255),n.push(a>>2&255)):r===12&&n.push(a>>4&255),new Uint8Array(n)}p(Ru,"constructYamlBinary");function Nu(e){var t="",r=0,i,o,s=e.length,a=tl;for(i=0;i<s;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return o=s%3,o===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):o===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):o===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}p(Nu,"representYamlBinary");function qu(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(qu,"isBinary");var L1=new Vt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Pu,construct:Ru,predicate:qu,represent:Nu}),F1=Object.prototype.hasOwnProperty,A1=Object.prototype.toString;function Wu(e){if(e===null)return!0;var t=[],r,i,o,s,a,n=e;for(r=0,i=n.length;r<i;r+=1){if(o=n[r],a=!1,A1.call(o)!=="[object Object]")return!1;for(s in o)if(F1.call(o,s))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}p(Wu,"resolveYamlOmap");function zu(e){return e!==null?e:[]}p(zu,"constructYamlOmap");var E1=new Vt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Wu,construct:zu}),M1=Object.prototype.toString;function Hu(e){if(e===null)return!0;var t,r,i,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],M1.call(i)!=="[object Object]"||(o=Object.keys(i),o.length!==1))return!1;s[t]=[o[0],i[o[0]]]}return!0}p(Hu,"resolveYamlPairs");function Yu(e){if(e===null)return[];var t,r,i,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],o=Object.keys(i),s[t]=[o[0],i[o[0]]];return s}p(Yu,"constructYamlPairs");var $1=new Vt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Hu,construct:Yu}),O1=Object.prototype.hasOwnProperty;function Uu(e){if(e===null)return!0;var t,r=e;for(t in r)if(O1.call(r,t)&&r[t]!==null)return!1;return!0}p(Uu,"resolveYamlSet");function ju(e){return e!==null?e:{}}p(ju,"constructYamlSet");var I1=new Vt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Uu,construct:ju}),Gu=_1.extend({implicit:[B1,v1],explicit:[L1,E1,$1,I1]}),nr=Object.prototype.hasOwnProperty,ps=1,Xu=2,Vu=3,gs=4,ba=1,D1=2,Uh=3,P1=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,R1=/[\x85\u2028\u2029]/,N1=/[,\[\]\{\}]/,Zu=/^(?:!|!!|![a-z\-]+!)$/i,Ku=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ka(e){return Object.prototype.toString.call(e)}p(Ka,"_class");function Ce(e){return e===10||e===13}p(Ce,"is_EOL");function sr(e){return e===9||e===32}p(sr,"is_WHITE_SPACE");function Jt(e){return e===9||e===32||e===10||e===13}p(Jt,"is_WS_OR_EOL");function br(e){return e===44||e===91||e===93||e===123||e===125}p(br,"is_FLOW_INDICATOR");function Qu(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Qu,"fromHexCode");function Ju(e){return e===120?2:e===117?4:e===85?8:0}p(Ju,"escapedHexLen");function tf(e){return 48<=e&&e<=57?e-48:-1}p(tf,"fromDecimalCode");function Qa(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|||
|
|
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(Qa,"simpleEscapeSequence");function ef(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(ef,"charFromCodepoint");function el(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}p(el,"setProperty");var rf=new Array(256),of=new Array(256);for(pr=0;pr<256;pr++)rf[pr]=Qa(pr)?1:0,of[pr]=Qa(pr);var pr;function sf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Gu,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(sf,"State$1");function rl(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=d1(r),new oe(t,r)}p(rl,"generateError");function tt(e,t){throw rl(e,t)}p(tt,"throwError");function io(e,t){e.onWarning&&e.onWarning.call(null,rl(e,t))}p(io,"throwWarning");var jh={YAML:p(function(t,r,i){var o,s,a;t.version!==null&&tt(t,"duplication of %YAML directive"),i.length!==1&&tt(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),o===null&&tt(t,"ill-formed argument of the YAML directive"),s=parseInt(o[1],10),a=parseInt(o[2],10),s!==1&&tt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&io(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var o,s;i.length!==2&&tt(t,"TAG directive accepts exactly two arguments"),o=i[0],s=i[1],Zu.test(o)||tt(t,"ill-formed tag handle (first argument) of the TAG directive"),nr.call(t.tagMap,o)&&tt(t,'there is a previously declared suffix for "'+o+'" tag handle'),Ku.test(s)||tt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{tt(t,"tag prefix is malformed: "+s)}t.tagMap[o]=s},"handleTagDirective")};function Ye(e,t,r,i){var o,s,a,n;if(t<r){if(n=e.input.slice(t,r),i)for(o=0,s=n.length;o<s;o+=1)a=n.charCodeAt(o),a===9||32<=a&&a<=1114111||tt(e,"expected valid JSON character");else P1.test(n)&&tt(e,"the stream contains non-printable characters");e.result+=n}}p(Ye,"captureSegment");function Ja(e,t,r,i){var o,s,a,n;for(Pt.isObject(r)||tt(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),a=0,n=o.length;a<n;a+=1)s=o[a],nr.call(t,s)||(el(t,s,r[s]),i[s]=!0)}p(Ja,"mergeMappings");function kr(e,t,r,i,o,s,a,n,l){var c,h;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),c=0,h=o.length;c<h;c+=1)Array.isArray(o[c])&&tt(e,"nested arrays are not supported inside keys"),typeof o=="object"&&Ka(o[c])==="[object Object]"&&(o[c]="[object Object]");if(typeof o=="object"&&Ka(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,h=s.length;c<h;c+=1)Ja(e,t,s[c],r);else Ja(e,t,s,r);else!e.json&&!nr.call(r,o)&&nr.call(t,o)&&(e.line=a||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,tt(e,"duplicated mapping key")),el(t,o,s),delete r[o];return t}p(kr,"storeMappingPair");function Ps(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):tt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Ps,"readLineBreak");function Et(e,t,r){for(var i=0,o=e.input.charCodeAt(e.position);o!==0;){for(;sr(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(Ce(o))for(Ps(e),o=e.input.charCodeAt(e.position),i++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.p
|
|||
|
|
`,t-1))}p(Rs,"writeFoldedLines");function af(e,t,r){var i,o,s,a,n,l,c,h,d=e.kind,f=e.result,u;if(u=e.input.charCodeAt(e.position),Jt(u)||br(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(o=e.input.charCodeAt(e.position+1),Jt(o)||r&&br(o)))return!1;for(e.kind="scalar",e.result="",s=a=e.position,n=!1;u!==0;){if(u===58){if(o=e.input.charCodeAt(e.position+1),Jt(o)||r&&br(o))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),Jt(i))break}else{if(e.position===e.lineStart&&go(e)||r&&br(u))break;if(Ce(u))if(l=e.line,c=e.lineStart,h=e.lineIndent,Et(e,!1,-1),e.lineIndent>=t){n=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(Ye(e,s,a,!1),Rs(e,e.line-l),s=a=e.position,n=!1),sr(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return Ye(e,s,a,!1),e.result?!0:(e.kind=d,e.result=f,!1)}p(af,"readPlainScalar");function nf(e,t){var r,i,o;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ye(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,o=e.position;else return!0;else Ce(r)?(Ye(e,i,o,!0),Rs(e,Et(e,!1,t)),i=o=e.position):e.position===e.lineStart&&go(e)?tt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);tt(e,"unexpected end of the stream within a single quoted scalar")}p(nf,"readSingleQuotedScalar");function lf(e,t){var r,i,o,s,a,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Ye(e,r,e.position,!0),e.position++,!0;if(n===92){if(Ye(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),Ce(n))Et(e,!1,t);else if(n<256&&rf[n])e.result+=of[n],e.position++;else if((a=Ju(n))>0){for(o=a,s=0;o>0;o--)n=e.input.charCodeAt(++e.position),(a=Qu(n))>=0?s=(s<<4)+a:tt(e,"expected hexadecimal character");e.result+=ef(s),e.position++}else tt(e,"unknown escape sequence");r=i=e.position}else Ce(n)?(Ye(e,r,i,!0),Rs(e,Et(e,!1,t)),r=i=e.position):e.position===e.lineStart&&go(e)?tt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}tt(e,"unexpected end of the stream within a double quoted scalar")}p(lf,"readDoubleQuotedScalar");function hf(e,t){var r=!0,i,o,s,a=e.tag,n,l=e.anchor,c,h,d,f,u,g=Object.create(null),m,y,C,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,u=!1,n=[];else if(b===123)h=125,u=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(Et(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=a,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=n,!0;r?b===44&&tt(e,"expected the node content, but found ','"):tt(e,"missed comma between flow collection entries"),y=m=C=null,d=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Jt(c)&&(d=f=!0,e.position++,Et(e,!0,t))),i=e.line,o=e.lineStart,s=e.position,vr(e,t,ps,!1,!0),y=e.tag,m=e.result,Et(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(d=!0,b=e.input.charCodeAt(++e.position),Et(e,!0,t),vr(e,t,ps,!1,!0),C=e.result),u?kr(e,n,g,y,m,C,i,o,s):d?n.push(kr(e,null,g,y,m,C,i,o,s)):n.push(m),Et(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}tt(e,"unexpected end of the stream within a flow collection")}p(hf,"readFlowCollection");function cf(e,t){var r,i,o=ba,s=!1,a=!1,n=t,l=0,c=!1,h,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)ba===o?o=d===43?Uh:D1:tt(e,"repeat of a chomping mode identifier");else if((h=tf(d))>=0)h===0?tt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?tt(e,"repeat of an indentation width identifier"):(n=t+h-1,a=!0);else break;if(sr(d)){do d=e.input.charCodeAt(++e.position);while(sr(d));if(
|
|||
|
|
`,s?1+l:l):o===ba&&s&&(e.result+=`
|
|||
|
|
`);break}for(i?sr(d)?(c=!0,e.result+=Pt.repeat(`
|
|||
|
|
`,s?1+l:l)):c?(c=!1,e.result+=Pt.repeat(`
|
|||
|
|
`,l+1)):l===0?s&&(e.result+=" "):e.result+=Pt.repeat(`
|
|||
|
|
`,l):e.result+=Pt.repeat(`
|
|||
|
|
`,s?1+l:l),s=!0,a=!0,l=0,r=e.position;!Ce(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Ye(e,r,e.position,!1)}return!0}p(cf,"readBlockScalar");function tn(e,t){var r,i=e.tag,o=e.anchor,s=[],a,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),!(l!==45||(a=e.input.charCodeAt(e.position+1),!Jt(a))));){if(n=!0,e.position++,Et(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,vr(e,t,Vu,!1,!0),s.push(e.result),Et(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)tt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=o,e.kind="sequence",e.result=s,!0):!1}p(tn,"readBlockSequence");function df(e,t,r){var i,o,s,a,n,l,c=e.tag,h=e.anchor,d={},f=Object.create(null),u=null,g=null,m=null,y=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&Jt(i))b===63?(y&&(kr(e,d,f,u,g,null,a,n,l),u=g=m=null),C=!0,y=!0,o=!0):y?(y=!1,o=!0):tt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(a=e.line,n=e.lineStart,l=e.position,!vr(e,r,Xu,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);sr(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Jt(b)||tt(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(kr(e,d,f,u,g,null,a,n,l),u=g=m=null),C=!0,y=!1,o=!1,u=e.tag,g=e.result;else if(C)tt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(C)tt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===s||e.lineIndent>t)&&(y&&(a=e.line,n=e.lineStart,l=e.position),vr(e,t,gs,!0,o)&&(y?g=e.result:m=e.result),y||(kr(e,d,f,u,g,m,a,n,l),u=g=m=null),Et(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)tt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&kr(e,d,f,u,g,null,a,n,l),C&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=d),C}p(df,"readBlockMapping");function uf(e){var t,r=!1,i=!1,o,s,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&tt(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(i=!0,o="!!",a=e.input.charCodeAt(++e.position)):o="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(s=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):tt(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Jt(a);)a===33&&(i?tt(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),Zu.test(o)||tt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),N1.test(s)&&tt(e,"tag suffix cannot contain flow indicator characters")}s&&!Ku.test(s)&&tt(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{tt(e,"tag name is malformed: "+s)}return r?e.tag=s:nr.call(e.tagMap,o)?e.tag=e.tagMap[o]+s:o==="!"?e.tag="!"+s:o==="!!"?e.tag="tag:yaml.org,2002:"+s:tt(e,'undeclared tag handle "'+o+'"'),!0}p(uf,"readTagProperty");function ff(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&tt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Jt(r)&&!br(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.po
|
|||
|
|
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new sf(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,tt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)gf(r);return r.documents}p(il,"loadDocuments");function q1(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=il(e,r);if(typeof t!="function")return i;for(var o=0,s=i.length;o<s;o+=1)t(i[o])}p(q1,"loadAll$1");function mf(e,t){var r=il(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new oe("expected a single document in the stream, but found more")}}p(mf,"load$1");var W1=mf,z1={load:W1},yf=Object.prototype.toString,Cf=Object.prototype.hasOwnProperty,ol=65279,H1=9,oo=10,Y1=13,U1=32,j1=33,G1=34,en=35,X1=37,V1=38,Z1=39,K1=42,xf=44,Q1=45,ms=58,J1=61,t2=62,e2=63,r2=64,bf=91,kf=93,i2=96,wf=123,o2=124,Tf=125,Zt={};Zt[0]="\\0";Zt[7]="\\a";Zt[8]="\\b";Zt[9]="\\t";Zt[10]="\\n";Zt[11]="\\v";Zt[12]="\\f";Zt[13]="\\r";Zt[27]="\\e";Zt[34]='\\"';Zt[92]="\\\\";Zt[133]="\\N";Zt[160]="\\_";Zt[8232]="\\L";Zt[8233]="\\P";var s2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],a2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Sf(e,t){var r,i,o,s,a,n,l;if(t===null)return{};for(r={},i=Object.keys(t),o=0,s=i.length;o<s;o+=1)a=i[o],n=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&Cf.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[a]=n;return r}p(Sf,"compileStyleMap");function _f(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new oe("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Pt.repeat("0",i-t.length)+t}p(_f,"encodeHex");var n2=1,so=2;function Bf(e){this.schema=e.schema||Gu,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Pt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Sf(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?so:n2,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(Bf,"State");function rn(e,t){for(var r=Pt.repeat(" ",t),i=0,o=-1,s="",a,n=e.length;i<n;)o=e.indexOf(`
|
|||
|
|
`,i),o===-1?(a=e.slice(i),i=n):(a=e.slice(i,o+1),i=o+1),a.length&&a!==`
|
|||
|
|
`&&(s+=r),s+=a;return s}p(rn,"indentString");function ys(e,t){return`
|
|||
|
|
`+Pt.repeat(" ",e.indent*t)}p(ys,"generateNextLine");function vf(e,t){var r,i,o;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(o=e.implicitTypes[r],o.resolve(t))return!0;return!1}p(vf,"testImplicitResolving");function ao(e){return e===U1||e===H1}p(ao,"isWhitespace");function yi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ol||65536<=e&&e<=1114111}p(yi,"isPrintable");function on(e){return yi(e)&&e!==ol&&e!==Y1&&e!==oo}p(on,"isNsCharOrWhitespace");function sn(e,t,r){var i=on(e),o=i&&!ao(e);return(r?i:i&&e!==xf&&e!==bf&&e!==kf&&e!==wf&&e!==Tf)&&e!==en&&!(t===ms&&!o)||on(t)&&!ao(t)&&e===en||t===ms&&o}p(sn,"isPlainSafe");function Lf(e){return yi(e)&&e!==ol&&!ao(e)&&e!==Q1&&e!==e2&&e!==ms&&e!==xf&&e!==bf&&e!==kf&&e!==wf&&e!==Tf&&e!==en&&e!==V1&&e!==K1&&e!==j1&&e!==o2&&e!==J1&&e!==t2&&e!==Z1&&e!==G1&&e!==X1&&e!==r2&&e!==i2}p(Lf,"isPlainSafeFirst");function Ff(e){return!ao(e)&&e!==ms}p(Ff,"isPlainSafeLast");function Gr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(Gr,"codePointAt");function sl(e){var t=/^\n* /;return t.test(e)}p(sl,"needIndentIndicator");var Af=1,an=2,Ef=3,Mf=4,Yr=5;function $f(e,t,r,i,o,s,a,n){var l,c=0,h=null,d=!1,f=!1,u=i!==-1,g=-1,m=Lf(Gr(e,0))&&Ff(Gr(e,e.length-1));if(t||a)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Gr(e,l),!yi(c))return Yr;m=m&&sn(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Gr(e,l),c===oo)d=!0,u&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!yi(c))return Yr;m=m&&sn(c,h,n),h=c}f=f||u&&l-g-1>i&&e[g+1]!==" "}return!d&&!f?m&&!a&&!o(e)?Af:s===so?Yr:an:r>9&&sl(e)?Yr:a?s===so?Yr:an:f?Mf:Ef}p($f,"chooseScalarStyle");function Of(e,t,r,i,o){e.dump=(function(){if(t.length===0)return e.quotingType===so?'""':"''";if(!e.noCompatMode&&(s2.indexOf(t)!==-1||a2.test(t)))return e.quotingType===so?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return vf(e,c)}switch(p(l,"testAmbiguity"),$f(t,n,e.indent,a,l,e.quotingType,e.forceQuotes&&!i,o)){case Af:return t;case an:return"'"+t.replace(/'/g,"''")+"'";case Ef:return"|"+nn(t,e.indent)+ln(rn(t,s));case Mf:return">"+nn(t,e.indent)+ln(rn(If(t,a),s));case Yr:return'"'+Df(t)+'"';default:throw new oe("impossible error: invalid scalar style")}})()}p(Of,"writeScalar");function nn(e,t){var r=sl(e)?String(t):"",i=e[e.length-1]===`
|
|||
|
|
`,o=i&&(e[e.length-2]===`
|
|||
|
|
`||e===`
|
|||
|
|
`),s=o?"+":i?"":"-";return r+s+`
|
|||
|
|
`}p(nn,"blockHeader");function ln(e){return e[e.length-1]===`
|
|||
|
|
`?e.slice(0,-1):e}p(ln,"dropEndingNewline");function If(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
|
|||
|
|
`);return c=c!==-1?c:e.length,r.lastIndex=c,hn(e.slice(0,c),t)})(),o=e[0]===`
|
|||
|
|
`||e[0]===" ",s,a;a=r.exec(e);){var n=a[1],l=a[2];s=l[0]===" ",i+=n+(!o&&!s&&l!==""?`
|
|||
|
|
`:"")+hn(l,t),o=s}return i}p(If,"foldString");function hn(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,o=0,s,a=0,n=0,l="";i=r.exec(e);)n=i.index,n-o>t&&(s=a>o?a:n,l+=`
|
|||
|
|
`+e.slice(o,s),o=s+1),a=n;return l+=`
|
|||
|
|
`,e.length-o>t&&a>o?l+=e.slice(o,a)+`
|
|||
|
|
`+e.slice(a+1):l+=e.slice(o),l.slice(1)}p(hn,"foldLine");function Df(e){for(var t="",r=0,i,o=0;o<e.length;r>=65536?o+=2:o++)r=Gr(e,o),i=Zt[r],!i&&yi(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=i||_f(r);return t}p(Df,"escapeString");function Pf(e,t,r){var i="",o=e.tag,s,a,n;for(s=0,a=r.length;s<a;s+=1)n=r[s],e.replacer&&(n=e.replacer.call(r,String(s),n)),(Me(e,t,n,!1,!1)||typeof n>"u"&&Me(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=o,e.dump="["+i+"]"}p(Pf,"writeFlowSequence");function cn(e,t,r,i){var o="",s=e.tag,a,n,l;for(a=0,n=r.length;a<n;a+=1)l=r[a],e.replacer&&(l=e.replacer.call(r,String(a),l)),(Me(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Me(e,t+1,null,!0,!0,!1,!0))&&((!i||o!=="")&&(o+=ys(e,t)),e.dump&&oo===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=s,e.dump=o||"[]"}p(cn,"writeBlockSequence");function Rf(e,t,r){var i="",o=e.tag,s=Object.keys(r),a,n,l,c,h;for(a=0,n=s.length;a<n;a+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=s[a],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),Me(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Me(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=o,e.dump="{"+i+"}"}p(Rf,"writeFlowMapping");function Nf(e,t,r,i){var o="",s=e.tag,a=Object.keys(r),n,l,c,h,d,f;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new oe("sortKeys must be a boolean or a function");for(n=0,l=a.length;n<l;n+=1)f="",(!i||o!=="")&&(f+=ys(e,t)),c=a[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),Me(e,t+1,c,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&oo===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,d&&(f+=ys(e,t)),Me(e,t+1,h,!0,d)&&(e.dump&&oo===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,o+=f));e.tag=s,e.dump=o||"{}"}p(Nf,"writeBlockMapping");function dn(e,t,r){var i,o,s,a,n,l;for(o=r?e.explicitTypes:e.implicitTypes,s=0,a=o.length;s<a;s+=1)if(n=o[s],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,yf.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Cf.call(n.represent,l))i=n.represent[l](t,l);else throw new oe("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(dn,"detectType");function Me(e,t,r,i,o,s,a){e.tag=null,e.dump=r,dn(e,r,!1)||dn(e,r,!0);var n=yf.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",d,f;if(h&&(d=e.duplicates.indexOf(r),f=d!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(o=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(h&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Nf(e,t,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(Rf(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?cn(e,t-1,e.dump,o):cn(e,t,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(Pf(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Of(e,e.dump,t,s,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new oe("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(Me,"writeNode");function qf(e,t){var r=[],i=[],o,s;for(Cs(e,r,i),o=0,s=i.length;o<s;o+=1)t.duplicates.push(r[i[o]]);t.usedDuplicates=new Array(s)}p(qf,"getDuplicateReferences");function Cs(e,t,r){var i,o,s;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)Cs(e[o],t,r);else for(i=Object.keys(e),o=0,s=i.length;o<s;o+=1)Cs(e[i[o]],t,r)}p(Cs,"inspectNode");function l2(e,t){t=t||{};var r=new Bf(
|
|||
|
|
`:""}p(l2,"dump$1");function h2(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(h2,"renamed");var c2=Au,d2=z1.load;/*! Bundled license information:
|
|||
|
|
|
|||
|
|
js-yaml/dist/js-yaml.mjs:
|
|||
|
|
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|||
|
|
*/var u2=p(e=>{const{handDrawnSeed:t}=Ct();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),bi=p(e=>{const t=f2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),f2=p(e=>{const t=new Map;return e.forEach(r=>{const[i,o]=r.split(":");t.set(i.trim(),o?.trim())}),t},"styles2Map"),Wf=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),K=p(e=>{const{stylesArray:t}=bi(e),r=[],i=[],o=[],s=[];return t.forEach(a=>{const n=a[0];Wf(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&o.push(a.join(":")+" !important"),n==="fill"&&s.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:o,backgroundStyles:s}},"styles2String"),V=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=Ct(),{nodeBorder:o,mainBkg:s}=r,{stylesMap:a}=bi(e);return Object.assign({roughness:.7,fill:a.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||o,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:p2(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),p2=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const o=isNaN(t[0])?0:t[0];return[o,o]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Eo={},It={},Gh;function g2(){return Gh||(Gh=1,Object.defineProperty(It,"__esModule",{value:!0}),It.BLANK_URL=It.relativeFirstCharacters=It.whitespaceEscapeCharsRegex=It.urlSchemeRegex=It.ctrlCharactersRegex=It.htmlCtrlEntityRegex=It.htmlEntitiesRegex=It.invalidProtocolRegex=void 0,It.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,It.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,It.htmlCtrlEntityRegex=/&(newline|tab);/gi,It.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,It.urlSchemeRegex=/^.+(:|:)/gim,It.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,It.relativeFirstCharacters=[".","/"],It.BLANK_URL="about:blank"),It}var Xh;function m2(){if(Xh)return Eo;Xh=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.sanitizeUrl=s;var e=g2();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function o(a){try{return decodeURIComponent(a)}catch{return a}}function s(a){if(!a)return e.BLANK_URL;var n,l=o(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=o(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),d=h.match(e.urlSchemeRegex);if(!d)return c;var f=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var u=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return u;if(f==="http:"||f==="https:"){if(!i(u))return e.BLANK_URL;var g=new URL(u);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return u}return Eo}var y2=m2();function ka(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function C2(
|
|||
|
|
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),q.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const o=[];for(;(i=Xi.exec(e))!==null;)if(i.index===Xi.lastIndex&&Xi.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const s=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:s,args:a})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(r){return q.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),K2=p(function(e){return e.replace(Xi,"")},"removeDirectives"),Q2=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function cl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return X2[r]??t}p(cl,"interpolateToCurve");function Vf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?y2.sanitizeUrl(r):r}p(Vf,"formatUrl");var J2=p((e,...t)=>{const r=e.split("."),i=r.length-1,o=r[i];let s=window;for(let a=0;a<i;a++)if(s=s[r[a]],!s){q.error(`Function name: ${e} not found in window`);return}s[o](...t)},"runFunc");function dl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(dl,"distance");function Zf(e){let t,r=0;e.forEach(o=>{r+=dl(o,t),t=o});const i=r/2;return ul(e,i)}p(Zf,"traverseEdge");function Kf(e){return e.length===1?e[0]:Zf(e)}p(Kf,"calcLabelPosition");var Qh=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),ul=p((e,t)=>{let r,i=t;for(const o of e){if(r){const s=dl(o,r);if(s===0)return r;if(s<i)i-=s;else{const a=i/s;if(a<=0)return r;if(a>=1)return{x:o.x,y:o.y};if(a>0&&a<1)return{x:Qh((1-a)*r.x+a*o.x,5),y:Qh((1-a)*r.y+a*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),tw=p((e,t,r)=>{q.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const o=ul(t,25),s=e?10:5,a=Math.atan2(t[0].y-o.y,t[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(a)*s+(t[0].x+o.x)/2,n.y=-Math.cos(a)*s+(t[0].y+o.y)/2,n},"calcCardinalityPosition");function Qf(e,t,r){const i=structuredClone(r);q.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const o=25+e,s=ul(i,o),a=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+s.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+s.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+s.x)/2,l.y=-Math.cos(n)*a+(i[0].y+s.y)/2),l}p(Qf,"calcTerminalLabelPosition");function Jf(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(Jf,"getStylesFromArray");var Jh=0,ew=p(()=>(Jh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Jh),"generateId");function tp(e){let t="";const r="0123456789abcdef",i=r.length;for(let o=0;o<e;o++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(tp,"makeRandomHex");var rw=p(e=>tp(e.length),"random"),iw=p(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"),ow=p(function(e,t){const r=t.text.replace(uo.lineBreakRegex," "),[,i]=Ns(t.fontSize),o=e.append("text");o.attr("x",t.x),o.attr("y",t.y),o.style("text-anchor",t.anchor),o.style("font-family",t.fontFamily),o.style("font-size",i),o.style("font-weight",t.fontWeight),o.attr("fill",t.fill),t.class!==void 0&&o.attr("class",t.class);const s=o.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),o},"drawSimpleText"),sw=mo((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),uo.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),o=[];let s="";return i.forEach((a,n)=>{const l=je(`${a} `,r),c=je(s,r);if(l>t){const{hyphenatedStrings:f,remainingW
|
|||
|
|
]`).replace("lheading",hp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},jw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Gw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,dp=/^( {2,}|\\)\n(?!\s*$)/,Xw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ws=/[\p{P}\p{S}]/u,Tl=/[\s\p{P}\p{S}]/u,up=/[^\s\p{P}\p{S}]/u,Vw=xt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Tl).getRegex(),fp=/(?!~)[\p{P}\p{S}]/u,Zw=/(?!~)[\s\p{P}\p{S}]/u,Kw=/(?:[^\s\p{P}\p{S}]|~)/u,Qw=xt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",$w?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Jw=xt(pp,"u").replace(/punct/g,Ws).getRegex(),tT=xt(pp,"u").replace(/punct/g,fp).getRegex(),gp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",eT=xt(gp,"gu").replace(/notPunctSpace/g,up).replace(/punctSpace/g,Tl).replace(/punct/g,Ws).getRegex(),rT=xt(gp,"gu").replace(/notPunctSpace/g,Kw).replace(/punctSpace/g,Zw).replace(/punct/g,fp).getRegex(),iT=xt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,up).replace(/punctSpace/g,Tl).replace(/punct/g,Ws).getRegex(),oT=xt(/\\(punct)/,"gu").replace(/punct/g,Ws).getRegex(),sT=xt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),aT=xt(kl).replace("(?:-->|$)","-->").getRegex(),nT=xt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",aT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),bs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,lT=xt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",bs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mp=xt(/^!?\[(label)\]\[(ref)\]/).replace("label",bs).replace("ref",bl).getRegex(),yp=xt(/^!?\[(ref)\](?:\[\])?/).replace("ref",bl).getRegex(),hT=xt("reflink|nolink(?!\\()","g").replace("reflink",mp).replace("nolink",yp).getRegex(),sc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Sl={_backpedal:Zi,anyPunctuation:oT,autolink:sT,blockSkip:Qw,br:dp,code:Gw,del:Zi,emStrongLDelim:Jw,emStrongRDelimAst:eT,emStrongRDelimUnd:iT,escape:jw,link:lT,nolink:yp,punctuation:Vw,reflink:mp,reflinkSearch:hT,tag:nT,text:Xw,url:Zi},cT={...Sl,link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",bs).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",bs).getRegex()},gn={...Sl,emStrongRDelimAst:rT,emStrongLDelim:tT,url:xt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",sc).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:xt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("p
|
|||
|
|
`).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[n]=a;return n.length>=o.length?s.slice(o.length):s}).join(`
|
|||
|
|
`)}var ks=class{options;rules;lexer;constructor(t){this.options=t||Er}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Mi(i,`
|
|||
|
|
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],o=pT(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:o}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let o=Mi(i,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(i=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Mi(r[0],`
|
|||
|
|
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Mi(r[0],`
|
|||
|
|
`).split(`
|
|||
|
|
`),o="",s="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
|
|||
|
|
`),d=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|||
|
|
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
|
|||
|
|
${h}`:h,s=s?`${s}
|
|||
|
|
${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=f,i.length===0)break;let u=a.at(-1);if(u?.type==="code")break;if(u?.type==="blockquote"){let g=u,m=g.raw+`
|
|||
|
|
`+i.join(`
|
|||
|
|
`),y=this.blockquote(m);a[a.length-1]=y,o=o.substring(0,o.length-g.raw.length)+y.raw,s=s.substring(0,s.length-g.text.length)+y.text;break}else if(u?.type==="list"){let g=u,m=g.raw+`
|
|||
|
|
`+i.join(`
|
|||
|
|
`),y=this.list(m);a[a.length-1]=y,o=o.substring(0,o.length-u.raw.length)+y.raw,s=s.substring(0,s.length-g.raw.length)+y.raw,i=m.substring(a.at(-1).raw.length).split(`
|
|||
|
|
`);continue}}return{type:"blockquote",raw:o,tokens:a,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),o=i.length>1,s={type:"list",raw:"",ordered:o,start:o?+i.slice(0,-1):"",loose:!1,items:[]};i=o?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=o?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",d="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
|
|||
|
|
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),u=t.split(`
|
|||
|
|
`,1)[0],g=!f.trim(),m=0;if(this.options.pedantic?(m=2,d=f.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,d=f.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(u)&&(h+=u+`
|
|||
|
|
`,t=t.substring(u.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),k=this.rules.other.hrRegex(m),T=this.rules.other.fencesBeginRegex(m),S=this.rules.other.headingBeginRegex(m),_=this.rules.other.htmlBeginRegex(m);for(;t;){let L=t.split(`
|
|||
|
|
`,1)[0],v;if(u=L,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),v=u):v=u.replace(this.rules.other.tabCharGlobal," "),T.test(u)||S.test(u)||_.test(u)||b.test(u)||k.test(u))break;if(v.search(this.rules.other.nonSpaceChar)>=m||!u.trim())d+=`
|
|||
|
|
`+v.slice(m);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(f)||S.test(f)||k.test(f))break;d+=`
|
|||
|
|
`+u}!g&&!u.trim()&&(g=!0),h+=L+`
|
|||
|
|
`,t=t.substring(L.length+1),f=v.slice(m)}}s.loose||(n?s.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let y=null,C;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(C=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:h,task:!!y,checked:C,loose:!1,text:d,tokens:[]}),s.raw+=h}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let h=s.items[c].tokens.filter(f=>f.type==="space"),d=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:o,title:s}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=lc(r[1]),o=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|||
|
|
`):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===o.length){for(let n of o)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of s)a.rows.push(lc(n,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|||
|
|
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=Mi(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=fT(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let o=r[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(o);a&&(o=a[1],s=a[3])}else s=r[3]?r[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?o=o.slice(1):o=o.slice(1,-1)),hc(r,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let o=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[o.toLowerCase()];if(!s){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return hc(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!(!o||o[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...o[0]].length-1,a,n,l=s,c=0,h=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+s);(o=h.exec(r))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(n=[...a].length,o[3]||o[4]){l+=n;continue}else if((o[5]||o[6])&&s%3&&!((s+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...o[0]][0].length,f=t.slice(0,s+o.index+d+n);if(Math.min(s,n)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let u=f.slice(2,-2);return{type:"strong",raw:f,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return o&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,o;return r[2]==="@"?(i=r[1],o="mailto:"+i):(i=r[1],o=i),{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,o;if(r[2]==="@")i=r[0],o="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);i=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},pe=class mn{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.toke
|
|||
|
|
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(te.tabCharGlobal," ").replace(te.spaceLine,""));t;){let o;if(this.options.extensions?.block?.some(a=>(o=a.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let a=r.at(-1);o.raw.length===1&&a!==void 0?a.raw+=`
|
|||
|
|
`:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|||
|
|
`)?"":`
|
|||
|
|
`)+o.raw,a.text+=`
|
|||
|
|
`+o.text,this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|||
|
|
`)?"":`
|
|||
|
|
`)+o.raw,a.text+=`
|
|||
|
|
`+o.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let s=t;if(this.options.extensions?.startBlock){let a=1/0,n=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},n),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){let a=r.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|||
|
|
`)?"":`
|
|||
|
|
`)+o.raw,a.text+=`
|
|||
|
|
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o),i=s.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|||
|
|
`)?"":`
|
|||
|
|
`)+o.raw,a.text+=`
|
|||
|
|
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,o=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=o[2]?o[2].length:0,i=i.slice(0,o.index+s)+"["+"a".repeat(o[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(u=>{f=u.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},ws=class{options;parser;constructor(t){this.options=t||Er}space(t){return""}code({text:t,lang:r,escaped:i}){let o=(r||"").match(te.notSpaceStart)?.[0],s=t.replace(te.endingNewline,"")+`
|
|||
|
|
`;return o?'<pre><code class="language-'+ve(o)+'">'+(i?s:ve(s,!0))+`</code></pre>
|
|||
|
|
`:"<pre><code>"+(i?s:ve(s,!0))+`</code></pre>
|
|||
|
|
`}blockquote({tokens:t}){return`<blockquote>
|
|||
|
|
${this.parser.parse(t)}</blockquote>
|
|||
|
|
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|||
|
|
`}hr(t){return`<hr>
|
|||
|
|
`}list(t){let r=t.ordered,i=t.start,o="";for(let n=0;n<t.items.length;n++){let l=t.items[n];o+=this.listitem(l)}let s=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+s+a+`>
|
|||
|
|
`+o+"</"+s+`>
|
|||
|
|
`}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+ve(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|||
|
|
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|||
|
|
`}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let o="";for(let s=0;s<t.rows.length;s++){let a=t.rows[s];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);o+=this.tablerow({text:i})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
|
|||
|
|
<thead>
|
|||
|
|
`+r+`</thead>
|
|||
|
|
`+o+`</table>
|
|||
|
|
`}tablerow({text:t}){return`<tr>
|
|||
|
|
${t}</tr>
|
|||
|
|
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|||
|
|
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${ve(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let o=this.parser.parseInline(i),s=nc(t);if(s===null)return o;t=s;let a='<a href="'+t+'"';return r&&(a+=' title="'+ve(r)+'"'),a+=">"+o+"</a>",a}image({href:t,title:r,text:i,tokens:o}){o&&(i=this.parser.parseInline(o,this.parser.textRenderer));let s=nc(t);if(s===null)return ve(i);t=s;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${ve(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ve(t.text)}},_l=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},ge=class yn{options;renderer;textRenderer;constructor(t){this.options=t||Er,this.options.renderer=this.options.renderer||new ws,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _l}static parse(t,r){return new yn(r).parse(t)}static parseInline(t,r){return new yn(r).parseInline(t)}parse(t,r=!0){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=s,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let a=s;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,l=this.renderer.text(n);for(;o+1<t.length&&t[o+1].type==="text";)n=t[++o],l+=`
|
|||
|
|
`+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=this.options.extensions.renderers[s.type].call({parser:this},s);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=n||"";continue}}let a=s;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},zi=class{options;block;constructor(t){this.options=t||Er}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?pe.lex:pe.lexInline}provideParser(){return this.block?ge.parse:ge.parseInline}},gT=class{defaults=yl();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ge;Renderer=ws;TextRenderer=_l;Lexer=pe;Tokenizer=ks;Hooks=zi;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let s=o;for(let a of s.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of s.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let s=o;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=o;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{let n=s[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let o={...i};if(o.async=this.defaults.async||o.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=r.renderers[s.name];a?r.renderers[s.name]=function(...n){let l=s.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[s.level];a?a.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),o.extensions=r),i.renderer){let s=this.defaults.renderer||new ws(this.defaults);for(let a in i.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=s[n];s[n]=(...h)=>{let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d||""}}o.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new ks(this.defaults);for(let a in i.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=s[n];s[n]=(...h)=>{let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d}}o.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new zi;for(let a in i.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=s[n];zi.passThroughHooks.has(a)?s[n]=h=>{if(this.
|
|||
|
|
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+ve(i.message+"",!0)+"</pre>";return r?Promise.resolve(o):o}if(r)return Promise.reject(i);throw i}}},Fr=new gT;function wt(e,t){return Fr.parse(e,t)}wt.options=wt.setOptions=function(e){return Fr.setOptions(e),wt.defaults=Fr.defaults,np(wt.defaults),wt};wt.getDefaults=yl;wt.defaults=Er;wt.use=function(...e){return Fr.use(...e),wt.defaults=Fr.defaults,np(wt.defaults),wt};wt.walkTokens=function(e,t){return Fr.walkTokens(e,t)};wt.parseInline=Fr.parseInline;wt.Parser=ge;wt.parser=ge.parse;wt.Renderer=ws;wt.TextRenderer=_l;wt.Lexer=pe;wt.lexer=pe.lex;wt.Tokenizer=ks;wt.Hooks=zi;wt.parse=wt;wt.options;wt.setOptions;wt.use;wt.walkTokens;wt.parseInline;ge.parse;pe.lex;function Cp(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var d,f;return(f=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&f!==void 0?f:0})):n},[]);if(o.length){var s=new RegExp(`
|
|||
|
|
[ ]{`.concat(Math.min.apply(Math,o),"}"),"g");i=i.map(function(n){return n.replace(s,`
|
|||
|
|
`)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",d=n;typeof n=="string"&&n.includes(`
|
|||
|
|
`)&&(d=String(n).split(`
|
|||
|
|
`).map(function(f,u){return u===0?f:"".concat(h).concat(f)}).join(`
|
|||
|
|
`)),a+=d+i[l+1]}),a}function xp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|||
|
|
`).replace(/\n{2,}/g,`
|
|||
|
|
`);return Cp(i)}p(xp,"preprocessMarkdown");function bp(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}p(bp,"nonMarkdownToLines");function kp(e,t={}){const r=xp(e,t),i=wt.lexer(r),o=[[]];let s=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
|
|||
|
|
`).forEach((h,d)=>{d!==0&&(s++,o.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&o[s].push({content:f,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&o[s].push({content:n.text,type:"normal"})}return p(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{a(l)}):n.type==="html"?o[s].push({content:n.text,type:"normal"}):o[s].push({content:n.raw,type:"normal"})}),o}p(kp,"markdownToLines");function wp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(wp,"nonMarkdownToHTML");function Tp(e,{markdownAutoWrap:t}={}){const r=wt.lexer(e);function i(o){return o.type==="text"?t===!1?o.text.replace(/\n */g,"<br/>").replace(/ /g," "):o.text.replace(/\n */g,"<br/>"):o.type==="strong"?`<strong>${o.tokens?.map(i).join("")}</strong>`:o.type==="em"?`<em>${o.tokens?.map(i).join("")}</em>`:o.type==="paragraph"?`<p>${o.tokens?.map(i).join("")}</p>`:o.type==="space"?"":o.type==="html"?`${o.text}`:o.type==="escape"?o.text:(q.warn(`Unsupported markdown: ${o.type}`),o.raw)}return p(i,"output"),r.map(i).join("")}p(Tp,"markdownToHTML");function Sp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Sp,"splitTextToChars");function _p(e,t){const r=Sp(t.content);return Bl(e,[],r,t.type)}p(_p,"splitWordToFitWidth");function Bl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[o,...s]=r,a=[...t,o];return e([{content:a.join(""),type:i}])?Bl(e,a,s,i):(t.length===0&&o&&(t.push(o),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(Bl,"splitWordToFitWidthRecursion");function Bp(e,t){if(e.some(({content:r})=>r.includes(`
|
|||
|
|
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Ts(e,t)}p(Bp,"splitLineToFitWidth");function Ts(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let o="";e[0].content===" "&&(o=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},a=[...i];if(o!==""&&a.push({content:o,type:"normal"}),a.push(s),t(a))return Ts(e,t,r,a);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,l]=_p(t,s);r.push([n]),l.content&&e.unshift(l)}return Ts(e,t,r)}p(Ts,"splitLineToFitWidthRecursion");function Cn(e,t){t&&e.attr("style",t)}p(Cn,"applyStyle");var cc=16384;async function vp(e,t,r,i,o=!1,s=vt()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,cc)}px`),a.attr("height",`${Math.min(10*r,cc)}px`);const n=a.append("xhtml:div"),l=Qi(t.label)?await nd(t.label.replace(uo.lineBreakRegex,`
|
|||
|
|
`),s):be(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),Cn(h,t.labelStyle),h.attr("class",`${c} ${i}`),Cn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),a.node()}p(vp,"addHtmlSpan");function zs(e,t,r,i=!1){const o=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}p(zs,"createTspan");function Lp(e,t,r){const i=e.append("text"),o=zs(i,1,t);Hs(o,r);const s=o.node().getComputedTextLength();return i.remove(),s}p(Lp,"computeWidthOfText");function mT(e,t,r){const i=e.append("text"),o=zs(i,1,t);Hs(o,[{content:r,type:"normal"}]);const s=o.node()?.getBoundingClientRect();return s&&i.remove(),s}p(mT,"computeDimensionOfText");function Fp(e,t,r,i=!1,o=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");o&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=p(u=>Lp(a,1.1,u)<=e,"checkWidth"),f=d(h)?[h]:Bp(h,d);for(const u of f){const g=zs(l,c,1.1,o);Hs(g,u),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),a.node()}else return l.node()}p(Fp,"createFormattedText");function xn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(xn,"decodeHTMLEntities");function Hs(e,t){e.text(""),t.forEach((r,i)=>{const o=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?o.text(xn(r.content)):o.text(" "+xn(r.content))})}p(Hs,"updateTextContentAndStyles");async function Ap(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,s,a)=>(r.push((async()=>{const n=`${s}:${a}`;return await Mw(n)?await yo(n,void 0,{class:"label-icon"}):`<i class='${be(o,t).replace(":"," ")}'></i>`})()),o));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Ap,"replaceIconSubstring");var Pe=p(async(e,t="",{style:r="",isTitle:i=!1,classes:o="",useHtmlLabels:s=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(q.debug("XYZ createText",t,r,i,o,s,n,"addSvgBackground: ",c),s){const d=a?Tp(t,h):wp(t),f=await Ap(Lr(d),h),u=t.replace(/\\\\/g,"\\"),g={isNode:n,label:Qi(t)?u:f,labelStyle:r.replace("fill:","color:")};return await vp(e,g,l,o,c,h)}else{const d=Lr(t.replace(/<br\s*\/?>/g,"<br/>")),f=a?kp(d.replace("<br>","<br/>"),h):bp(d),u=Fp(l,e,f,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(u).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ct(u).select("rect").attr("style",g.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(u).select("text").attr("style",m)}return i?ct(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ct(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function Ta(e,t,r){if(e&&e.length){const[i,o]=t,s=Math.PI/180*r,a=Math.cos(s),n=Math.sin(s);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-o)*n+i,l[1]=(c-i)*n+(h-o)*a+o}}}function yT(e,t){return e[0]===t[0]&&e[1]===t[1]}function CT(e,t,r,i=1){const o=r,s=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0
|
|||
|
|
M ${o.x},${o.y} L ${a.x},${a.y}`}p(Zp,"createLine");function Kp(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r,t.label="";const o=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:a}=t,n=Z.svg(o),l=V(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,s*2,l),h=Zp(s),d=n.path(h,l),f=o.insert(()=>c,":first-child");return f.insert(()=>d),f.attr("class","outer-path"),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),Q(t,f),t.intersect=function(u){return q.info("crossedCircle intersect",t,{radius:s,point:u}),X.circle(t,s,u)},o}p(Kp,"crossedCircle");function We(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),g=t+r*Math.sin(f);a.push({x:-u,y:-g})}return a}p(We,"generateCirclePoints");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await it(e,t,rt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+n,h=s.height+l,d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...We(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...We(c/2+d*2,-d,d,20,-180,-270),...We(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...We(c/2,h/2,d,20,0,90)],g=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...We(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...We(c/2+c*.1,-d,d,20,-180,-270),...We(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...We(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],m=Z.svg(o),y=V(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=gt(u).replace("Z",""),k=m.path(b,y),T=gt(g),S=m.path(T,{...y}),_=o.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${d}, 0)`),a.attr("transform",`translate(${-c/2+d-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Q(t,_),t.intersect=function(L){return X.polygon(t,g,L)},o}p(Qp,"curlyBraceLeft");function ze(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),g=t+r*Math.sin(f);a.push({x:u,y:g})}return a}p(ze,"generateCirclePoints");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await it(e,t,rt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),h=s.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...ze(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...ze(c/2+d*2,-d,d,20,-180,-270),...ze(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...ze(c/2,h/2,d,20,0,90)],g=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},...ze(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...ze(c/2+d*2,-d,d,20,-180,-270),...ze(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...ze(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],m=Z.svg(o),y=V(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=gt(u).replace("Z",""),k=m.path(b,y),T=gt(g),S=m.path(T,{...y}),_=o.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-d}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Q(t,_),t.intersect=function(L){return X.polygon(t,g,L)},o}p(Jp,"curlyBraceRight");function Ht(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),g=t+r*Math.sin(f);a.push({x:-u,y:-g})}return a}p(Ht,"generateCirclePoints");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{s
|
|||
|
|
a${o},${s} 0,0,1 0,${-i}
|
|||
|
|
l${r},0
|
|||
|
|
a${o},${s} 0,0,1 0,${i}
|
|||
|
|
M${r},${-i}
|
|||
|
|
a${o},${s} 0,0,0 0,${i}
|
|||
|
|
l${-r},0`,"createCylinderPathD"),rS=p((e,t,r,i,o,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${o},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),iS=p((e,t,r,i,o,s)=>[`M${e+r/2},${-i/2}`,`a${o},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),_c=5,Bc=10;async function zg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?12:o/2;if(t.width||t.height){const m=t.height??0;t.height=(t.height??0)-s,t.height<_c&&(t.height=_c);const C=m/2/(2.5+m/50);t.width=(t.width??0)-s-C*3,t.width<Bc&&(t.width=Bc)}const{shapeSvg:a,bbox:n,label:l}=await it(e,t,rt(t)),c=(t.height?t.height:n.height)+s,h=c/2,d=h/(2.5+c/50),f=(t.width?t.width:n.width)+d+s,{cssStyles:u}=t;let g;if(t.look==="handDrawn"){const m=Z.svg(a),y=rS(0,0,f,c,d,h),C=iS(0,0,f,c,d,h),b=m.path(y,V(t,{})),k=m.path(C,V(t,{fill:"none"}));g=a.insert(()=>k,":first-child"),g=a.insert(()=>b,":first-child"),g.attr("class","basic label-container"),u&&g.attr("style",u)}else{const m=eS(0,0,f,c,d,h);g=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",qt(u)).attr("style",i),g.attr("class","basic label-container outer-path"),u&&g.selectAll("path").attr("style",u),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",d),g.attr("transform",`translate(${-f/2}, ${c/2} )`),l.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Q(t,g),t.intersect=function(m){const y=X.rect(t,m),C=y.y-(t.y??0);if(h!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-d)){let b=d*d*(1-C*C/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},a}p(zg,"tiltedCylinder");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=(t.look==="neo",o),a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await it(e,t,rt(t)),c=(t?.height??l.height)+s,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=Z.svg(n),m=V(t,{}),y=gt(d),C=g.path(y,m);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Xe(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,Q(t,f),t.intersect=function(g){return X.polygon(t,d,g)},n}p(Hg,"trapezoid");async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-s*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await it(e,t,rt(t)),d=(t?.width?t?.width:h.width)+s*2,f=(t?.height?t?.height:h.height)+a*2,{cssStyles:u}=t,g=Z.svg(c),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-d/2*.8,y:-f/2},{x:d/2*.8,y:-f/2},{x:d/2,y:-f/2*.6},{x:d/2,y:f/2},{x:-d/2,y:f/2},{x:-d/2,y:-f/2*.6}],C=gt(y),b=g.path(C,m),k=c.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Q(t,k),t.intersect=function(T){return X.polygon(t,y,T)},c}p(Yg,"trapezoidalPentagon");var vc=10,Lc=10;async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.width=((t?.width??0)-s)/2,t.width<Lc&&(t.width=Lc),t.height=t?.height??0,t.height<vc&&(t.height=vc));const{shapeSvg:a,bbox:n,label:l}=await it(e,t,rt(t)),c=Ie(Ct().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+s,d=t?.height?t?.height:h+n.height,f=d,u=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-d}],{cssStyles:g}=t,m=Z.svg(a),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=gt(u),b=m.path(C,y),k=a.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&k.selectChildren("pa
|
|||
|
|
M${u-At},${g} L${u+d},${g}
|
|||
|
|
M${u},${g-At} L${u},${g+f}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const T=y.path(k,C),S=a.insert(()=>T,":first-child");return S.attr("transform",`translate(${At/2}, ${At/2})`),S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+At/2-(n.x-(n.left??0))}, ${-(n.height/2)+At/2-(n.y-(n.top??0))})`),Q(t,S),t.intersect=function(_){return X.polygon(t,b,_)},a}p(Xg,"windowPane");var Fc=new Set(["redux-color","redux-dark-color"]),oS=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Al(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:o}=vt(),{rowEven:s,rowOdd:a,nodeBorder:n,borderColorArray:l}=o;if(t.look==="handDrawn"){const{themeVariables:et}=vt(),{background:ft}=et,kt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ft}`]};await Al(e,kt)}const c=vt();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,d=c.er?.entityPadding??6;const{cssStyles:f}=t,{labelStyles:u,nodeStyles:g}=K(t);if(r.attributes.length===0&&t.label){const et={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};je(t.label,c)+et.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const ft=await ki(e,t,et);if(i!=null&&Fc.has(i)){const kt=r.colorIndex??0;ft.attr("data-color-id",`color-${kt%l.length}`)}if(!Ie(c.htmlLabels)){const kt=ft.select("text"),Bt=kt.node()?.getBBox();kt.attr("transform",`translate(${-Bt.width/2}, 0)`)}return ft}c.htmlLabels||(h*=1.25,d*=1.25);let m=rt(t);m||(m="node default");const y=e.insert("g").attr("class",m).attr("id",t.domId||t.id),C=await Ur(y,t.label??"",c,0,0,["name"],u);C.height+=d;let b=0;const k=[],T=[];let S=0,_=0,L=0,v=0,N=!0,R=!0;for(const et of r.attributes){const ft=await Ur(y,et.type,c,0,b,["attribute-type"],u);S=Math.max(S,ft.width+h);const kt=await Ur(y,et.name,c,0,b,["attribute-name"],u);_=Math.max(_,kt.width+h);const Bt=await Ur(y,et.keys.join(),c,0,b,["attribute-keys"],u);L=Math.max(L,Bt.width+h);const St=await Ur(y,et.comment,c,0,b,["attribute-comment"],u);v=Math.max(v,St.width+h);const ut=Math.max(ft.height,kt.height,Bt.height,St.height)+d;T.push({yOffset:b,rowHeight:ut}),b+=ut}let P=4;L<=h&&(N=!1,L=0,P--),v<=h&&(R=!1,v=0,P--);const z=y.node().getBBox();if(C.width+h*2-(S+_+L+v)>0){const et=C.width+h*2-(S+_+L+v);S+=et/P,_+=et/P,L>0&&(L+=et/P),v>0&&(v+=et/P)}const W=S+_+L+v,$=Z.svg(y),A=V(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let F=0;T.length>0&&(F=T.reduce((et,ft)=>et+(ft?.rowHeight??0),0));const D=Math.max(z.width+h*2,t?.width||0,W),M=Math.max((F??0)+C.height,t?.height||0),H=-D/2,Y=-M/2;if(y.selectAll("g:not(:first-child)").each((et,ft,kt)=>{const Bt=ct(kt[ft]),St=Bt.attr("transform");let ut=0,de=0;if(St){const $r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(St);$r&&(ut=parseFloat($r[1]),de=parseFloat($r[2]),Bt.attr("class").includes("attribute-name")?ut+=S:Bt.attr("class").includes("attribute-keys")?ut+=S+_:Bt.attr("class").includes("attribute-comment")&&(ut+=S+_+L))}Bt.attr("transform",`translate(${H+h/2+ut}, ${de+Y+C.height+d/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(Y+d/2)+")"),i!=null&&Fc.has(i)){const et=r.colorIndex??0;y.attr("data-color-id",`color-${et%l.length}`)}const G=$.rectangle(H,Y,D,M,A),lt=y.insert(()=>G,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[et,ft]of T.entries()){const Bt=(et+1)%2===0&&ft.yOffset!==0,St=$.rectangle(H,C.height+Y+ft?.yOffset,D,ft?.rowHeight,{...A,fill:Bt?s:a,stroke:n});y.insert(()=>St,"g.label").attr("style",f.join("")).attr("class",`row-rect-${Bt?"even":"odd"}`)}const ht=1e-4;let dt=jr(H,C.height+Y,D+H,C.height+Y,ht),bt=$.polygon(dt.map(et=>[et.x,et.y]),A);if(y.insert(()=>bt).attr("class","divider"),dt=jr(S+H,C.height+Y,S+H,M+Y,ht),bt=$.polygon(dt.map(et=>[et.x,et.y]),A),y.insert(()=>bt).attr("class","divider"),N){const et=S+_+H;dt=jr(et,C.height+Y,et,M
|
|||
|
|
a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
|
|||
|
|
a${h},${h} 1 0,0 ${g*.25},0
|
|||
|
|
a${h},${h} 1 0,0 ${g*.25},0
|
|||
|
|
a${h},${h} 1 0,0 ${g*.25},${m*.1}
|
|||
|
|
|
|||
|
|
a${h},${h} 1 0,0 ${g*.15},${m*.33}
|
|||
|
|
a${h*.8},${h*.8} 1 0,0 0,${m*.34}
|
|||
|
|
a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
|
|||
|
|
|
|||
|
|
a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
|
|||
|
|
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|||
|
|
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|||
|
|
a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
|
|||
|
|
|
|||
|
|
a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
|
|||
|
|
a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
|
|||
|
|
a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
|
|||
|
|
H0 V0 Z`;if(t.look==="handDrawn"){const b=Z.svg(o),k=V(t,{}),T=b.path(C,k);y=o.insert(()=>T,":first-child"),y.attr("class","basic label-container").attr("style",qt(d))}else y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),Q(t,y),t.calcIntersect=function(b,k){return X.rect(b,k)},t.intersect=function(b){return q.info("Bang intersect",t,b),X.rect(t,b)},o}p(Jg,"bang");async function tm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await it(e,t,rt(t)),l=s.width+2*a,c=s.height+2*a,h=.15*l,d=.25*l,f=.35*l,u=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
|
|||
|
|
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|||
|
|
a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
|
|||
|
|
a${d},${d} 1 0,1 ${l*.35},${l*.2}
|
|||
|
|
|
|||
|
|
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|||
|
|
a${u},${u} 1 0,1 ${-1*l*.15},${c*.65}
|
|||
|
|
|
|||
|
|
a${d},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|||
|
|
a${f},${f} 1 0,1 ${-1*l*.5},0
|
|||
|
|
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|||
|
|
|
|||
|
|
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|||
|
|
a${u},${u} 1 0,1 ${l*.1},${-1*c*.65}
|
|||
|
|
H0 V0 Z`;if(t.look==="handDrawn"){const C=Z.svg(o),b=V(t,{}),k=C.path(y,b);m=o.insert(()=>k,":first-child"),m.attr("class","basic label-container").attr("style",qt(g))}else m=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Q(t,m),t.calcIntersect=function(C,b){return X.rect(C,b)},t.intersect=function(C){return q.info("Cloud intersect",t,C),X.rect(t,C)},o}p(tm,"cloud");async function em(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await it(e,t,rt(t)),l=s.width+8*a,c=s.height+2*a,h=5,d=t.look==="neo"?`
|
|||
|
|
M${-l/2} ${c/2-h}
|
|||
|
|
v${-c+2*h}
|
|||
|
|
q0,-${h} ${h},-${h}
|
|||
|
|
h${l-2*h}
|
|||
|
|
q${h},0 ${h},${h}
|
|||
|
|
v${c-h}
|
|||
|
|
H${-l/2}
|
|||
|
|
Z
|
|||
|
|
`:`
|
|||
|
|
M${-l/2} ${c/2-h}
|
|||
|
|
v${-c+2*h}
|
|||
|
|
q0,-${h} ${h},-${h}
|
|||
|
|
h${l-2*h}
|
|||
|
|
q${h},0 ${h},${h}
|
|||
|
|
v${c-2*h}
|
|||
|
|
q0,${h} ${-h},${h}
|
|||
|
|
h${-(l-2*h)}
|
|||
|
|
q${-h},0 ${-h},${-h}
|
|||
|
|
Z
|
|||
|
|
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=o.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return o.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),o.append(()=>n.node()),Q(t,f),t.calcIntersect=function(u,g){return X.rect(u,g)},t.intersect=function(u){return X.rect(t,u)},o}p(em,"defaultMindmapNode");async function rm(e,t){const r={padding:t.padding??0};return Fl(e,t,r)}p(rm,"mindmapCircle");var aS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:$g},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Ag},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Og},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Rg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:rg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:ig},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Fl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Jg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:tm},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:vg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:cg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:bg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:xg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Hg},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:yg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:sg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Wg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Xp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Eg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Pg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Dg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:lg},
|
|||
|
|
outsidePoint: ${JSON.stringify(t)}
|
|||
|
|
insidePoint : ${JSON.stringify(r)}
|
|||
|
|
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,o=e.y,s=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-s:a+s;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(o-t.y)*a>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-o:o-l-t.y;n=h*d/c;const f={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),q.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,f),f}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let d=c*n/h,f=r.x<t.x?r.x+h-n:r.x-h+n,u=r.y<t.y?r.y+d:r.y-d;return q.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:f,_y:u}),n===0&&(f=t.x,u=t.y),h===0&&(f=t.x),c===0&&(u=t.y),{x:f,y:u}}},"intersection"),Mc=p((e,t)=>{q.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],o=!1;return e.forEach(s=>{if(q.info("abc88 checking point",s,t),!yS(t,s)&&!o){const a=CS(t,i,s);q.debug("abc88 inside",s,i,a),q.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?q.warn("abc88 no intersect",a,r):r.push(a),o=!0}else q.warn("abc88 outside",s,i),i=s,o||r.push(s)}),q.debug("returning points",r),r},"cutPathAtIntersect");function sm(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const o=e[i-1],s=e[i],a=e[i+1];(o.x===s.x&&s.y===a.y&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5||o.y===s.y&&s.x===a.x&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(sm,"extractCornerPoints");var $c=p(function(e,t,r){const i=t.x-e.x,o=t.y-e.y,s=Math.sqrt(i*i+o*o),a=r/s;return{x:t.x-a*i,y:t.y-a*o}},"findAdjacentPoint"),xS=p(function(e){const{cornerPointPositions:t}=sm(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const o=e[i-1],s=e[i+1],a=e[i],n=$c(o,a,5),l=$c(s,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let f={x:a.x,y:a.y};if(Math.abs(s.x-o.x)>10&&Math.abs(s.y-o.y)>=10){q.debug("Corner point fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));const u=5;a.x===n.x?f={x:c<0?n.x-u+d:n.x+u-d,y:h<0?n.y-d:n.y+d}:f={x:c<0?n.x-d:n.x+d,y:h<0?n.y-u+d:n.y+u-d}}else q.debug("Corner point skipping fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),bS=p((e,t,r)=>{const i=e-t-r,o=2,s=2,a=o+s,n=Math.floor(i/a),l=Array(n).fill(`${o} ${s}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),kS=p(function(e,t,r,i,o,s,a,n=!1){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=Ct();let h=t.points,d=!1;const f=o;var u=s;const g=[];for(const M in t.cssCompiledStyles)Wf(M)||g.push(t.cssCompiledStyles[M]);if(c==="swimlane"){if(u.intersect&&f.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[f.intersect(h[0]),u.intersect(h[1])];else{const M=h.slice(1,-1),H=M[0],Y=M[M.length-1],G=.5,lt=Math.abs(h[h.length-1].x-Y.x)<G&&Math.abs(h[h.length-1].y-Y.y)<G,ht=f.intersect(H),dt=lt?Y:u.intersect(Y),bt=Math.abs(dt.x-Y.x)<G&&Math.abs(dt.y-Y.y)<G,ft=Math.abs(ht.x-H.x)<G&&Math.abs(ht.y-H.y)<G?[]:[ht],kt=bt?[]:[dt];h=[...ft,...M,...kt]}h=mS(t,h)}else u.intersect&&f.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(f.intersect(h[0])),h.push(u.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(q.info("to cluster abc88",r.get(t.toCluster)),h=Mc(t.points,r.get(t.toCluster).node),d=!0),t.fromCluster&&(q.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Mc(h.reverse(),r.get(t.fromCluster).node).reverse(),d=!0);let y=h.filter(M=>!Number.isNaN(M.y));const C=fS(t.curve);C!=="rounded"&&(y=xS(y));let b=Vi;switch(C){case"linear":b=Vi;break;case"basis":b=Va;break;case"cardinal":b=Yd;break;case"bumpX":b=Nd;break;case"bumpY":b=qd;break;case"catmullRom":b=jd;break;case"monotoneX":b=Qd;break;case"monotoneY":b=Jd;break;case"natural":b=eu;break;case"step":b=ru;break;case"stepAfter":b=ou;break;case"stepBefore":b=iu;break;case"rounded":b=Vi;break;default:b=Va}const{x:k,y:T}=hS(t),S=Vk().x(k).y(T).curve(b);let _;switch(t.thickness){case"normal":_="edge-thickness-
|
|||
|
|
L20,10
|
|||
|
|
M20,10
|
|||
|
|
L0,20`)},"requirement_arrow"),zS=p((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|||
|
|
L20,10
|
|||
|
|
M20,10
|
|||
|
|
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),HS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),YS=p((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s}=o,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),US={extension:TS,composition:SS,aggregation:_S,dependency:BS,lollipop:vS,point:LS,circle:FS,cross:AS,barb:ES,barbNeo:MS,only_one:$S,zero_or_one:OS,one_or_more:IS,zero_or_more:DS,only_one_neo:PS,zero_or_one_neo:RS,one_or_more_neo:NS,zero_or_more_neo:qS,requirement_arrow:WS,requirement_contains:HS,requirement_arrow_neo:zS,requirement_contains_neo:YS},jS=wS,GS={common:uo,getConfig:vt,insertCluster:zT,insertEdge:kS,insertEdgeLabel:pS,insertMarkers:jS,insertNode:om,interpolateToCurve:cl,labelHelper:it,log:q,positionEdgeLabel:gS},lo={},lm=p(e=>{for(const t of e)lo[t.name]=t},"registerLayoutLoaders"),XS=p(()=>{lm([{name:"dagre",loader:p(async()=>await nt(()=>import("./dagre-VKFMJZFB.WoZbLr_t.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader")},{name:"swimlane",loader:p(async()=>await nt(()=>import("./swimlanes-5IMT3BWC.CH50oLdK.js"),__vite__mapDeps([6,5,1,2,3])),"loader")},{name:"cose-bilkent",loader:p(async()=>await nt(()=>import("./cose-bilkent-JH36ORCC.BVcHG8-S.js"),__vite__mapDeps([7,8,5])),"loader")}])},"registerDefaultLayoutLoaders");XS();var aF=p(async(e,t,r)=>{if(!(e.layoutAlgorithm in lo))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const d of e.nodes){const f=d.domId||d.id;d.domId=`${e.diagramId}-${f}`}const i=lo[e.layoutAlgorithm],o=await i.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:n,gradientStart:l,gradientStop:c}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),n){const d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return o.render(e,t,GS,{algorithm:i.algorithm},r)},"render"),nF=p((e="",{fallback:t="dagre"}={})=>{if(e in lo)return e;if(t in lo)return q.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),El="comm",hm="rule",cm="decl",VS="@media",ZS="@import",KS="@supports",QS="@namespace",vn="@keyframes",dm="@layer",JS="@scope",t_=Math.abs,Ki=String.fromCharCode;function um(e){return e.trim()}function Ln(e,t,r){return e.replace(t,r)}function Kr(e,t){return e.charCodeAt(t)|0}function Ci(e,t,r){return e.slice(t,r
|
|||
|
|
`);const i=o1(t),o=i.append("g");i.attr("viewBox","0 0 2412 512"),ld(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),$m={draw:FB},AB=$m,EB={db:{},renderer:$m,parser:{parse:p(()=>{},"parse")}},MB=EB,Om="flowchart-elk",$B=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),OB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U.DsMgkuRh.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,15]));return{id:Om,diagram:e}},"loader"),IB={id:Om,detector:$B,loader:OB},DB=IB,Im="timeline",PB=p(e=>/^\s*timeline/.test(e),"detector"),RB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./timeline-definition-FHXFAJF6.BjNTqx_G.js");return{diagram:t}},__vite__mapDeps([41,28,5]));return{id:Im,diagram:e}},"loader"),NB={id:Im,detector:PB,loader:RB},qB=NB,Dm="mindmap",WB=p(e=>/^\s*mindmap/.test(e),"detector"),zB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./mindmap-definition-LN4V7U3C.C6ozGKih.js");return{diagram:t}},__vite__mapDeps([42,13,14,5]));return{id:Dm,diagram:e}},"loader"),HB={id:Dm,detector:WB,loader:zB},YB=HB,Pm="kanban",UB=p(e=>/^\s*kanban/.test(e),"detector"),jB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./kanban-definition-HUTT4EX6.DVGs3wD1.js");return{diagram:t}},__vite__mapDeps([43,12,5]));return{id:Pm,diagram:e}},"loader"),GB={id:Pm,detector:UB,loader:jB},XB=GB,Rm="sankey",VB=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),ZB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./sankeyDiagram-HTMAVEWB.Jc5E54NN.js");return{diagram:t}},__vite__mapDeps([44,29,24,5]));return{id:Rm,diagram:e}},"loader"),KB={id:Rm,detector:VB,loader:ZB},QB=KB,Nm="packet",JB=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),tv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-NH7WQ7WH.DviI3VWs.js");return{diagram:t}},__vite__mapDeps([45,20,21,5]));return{id:Nm,diagram:e
|
|||
|
|
`;try{Na(o)}catch{const c=Q0(o);if(!c)throw new rd(`Diagram ${o} not found.`);const{id:h,diagram:d}=await c();is(h,d)}const{db:s,parser:a,renderer:n,init:l}=Na(o);return a.parser&&(a.parser.yy=s),s.clear?.(),l?.(i),r.title&&s.setDiagramTitle?.(r.title),await a.parse(t),new Tr(o,t,s,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Tr,"Diagram"),Tr),Pc=[],Qv=p(()=>{Pc.forEach(e=>{e()}),Pc=[]},"attachFunctions"),Jv=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function ry(e){const t=e.match(ed);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
|
|||
|
|
`).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
|
|||
|
|
`):t[2];let o=d2(i,{schema:c2})??{};o=typeof o=="object"&&!Array.isArray(o)?o:{};const s={};return o.displayMode&&(s.displayMode=o.displayMode.toString()),o.title&&(s.title=o.title.toString()),o.config&&(s.config=o.config),{text:e.slice(t[0].length),metadata:s}}p(ry,"extractFrontMatter");var tL=p(e=>e.replace(/\r\n?/g,`
|
|||
|
|
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),eL=p(e=>{const{text:t,metadata:r}=ry(e),{displayMode:i,title:o,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:o,config:s,text:t}},"processFrontmatter"),rL=p(e=>{const t=ye.detectInit(e)??{},r=ye.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:K2(e),directive:t}},"processDirectives");function $l(e){const t=tL(e),r=eL(t),i=rL(r.text),o=gl(r.config,i.directive);return e=Jv(i.text),{code:e,title:r.title,config:o}}p($l,"preprocessDiagram");function iy(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(iy,"toBase64");var iL=5e4,oL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",sL="sandbox",aL="loose",nL="http://www.w3.org/2000/svg",lL="http://www.w3.org/1999/xlink",hL="http://www.w3.org/1999/xhtml",cL="100%",dL="100%",uL="border:0;margin:0;",fL="margin:0",pL="allow-top-navigation-by-user-activation allow-popups",gL='The "iframe" tag is not supported by your browser.',mL=["foreignobject"],yL=["dominant-baseline"];function Ol(e){const t=$l(e);return es(),V0(t.config??{}),t}p(Ol,"processAndSetConfigs");async function oy(e,t){Xs();try{const{code:r,config:i}=Ol(e);return{diagramType:(await ay(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(oy,"parse");var Rc=p((e,t,r=[])=>{const i=Vc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),CL=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=ee(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Kh(l.styles)||n.forEach(c=>{r.insertRule(Rc(l.id,c,l.styles),r.cssRules.length)}),Kh(l.textStyles)||r.insertRule(Rc(l.id,"tspan",(l?.textStyles||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const o=new CSSStyleSheet;o.replaceSync(e.themeCSS),i=Ra(o)+`
|
|||
|
|
`}else i+=`${e.themeCSS}
|
|||
|
|
`;return i+Ra(r)},"createCssStyles"),xL=p((e,t)=>An(h_(`${e}{${t}}`),u_([p(function(i,o,s,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===vn)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[VS,KS,dm,JS,"@container","@starting-style"],vn].includes(i.type)||(q.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=El))},"addNamespace"),d_])),"compileCSS"),bL=p((e,t,r,i)=>{const o=CL(e,r),s=mC(t,o,{...e.themeVariables,theme:e.theme,look:e.look},i);return xL(i,s)},"createUserStyles"),kL=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Lr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),wL=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":dL,i=iy(`<body style="${fL}">${e}</body>`);return`<iframe style="width:${cL};height:${r};${uL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${pL}">
|
|||
|
|
${gL}
|
|||
|
|
</iframe>`},"putIntoIFrame"),Nc=p((e,t,r,i,o)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const a=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",nL);return o&&a.attr("xmlns:xlink",o),a.append("g"),e},"appendDivSvgG");function Mn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Mn,"sandboxedIframe");var TL=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),SL=p(async function(e,t,r){Xs();const i=Ol(t);t=i.code;const o=vt();q.debug(o),t.length>(o?.maxTextSize??iL)&&(t=oL);const s=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=p(()=>{const W=ct(f?n:c).node();W&&"remove"in W&&W.remove()},"removeTempElements");let d=ct(document.body);const f=o.securityLevel===sL,u=o.securityLevel===aL,g=o.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const z=Mn(ct(r),a);d=ct(z.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=ct(r);Nc(d,e,l,`font-family: ${g}`,lL)}else{if(TL(document,e,l,a),f){const z=Mn(ct(document.body),a);d=ct(z.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=ct("body");Nc(d,e,l)}let m,y;try{m=await En.fromText(t,{title:i.title})}catch(z){if(o.suppressErrorRendering)throw h(),z;m=await En.fromText("error"),y=z}const C=d.select(c).node(),b=m.type,k=C.firstChild,T=k.firstChild,S=m.renderer.getClasses?.(t,m),_=bL(o,b,S,s),L=document.createElement("style");L.innerHTML=_,k.insertBefore(L,T);try{await m.renderer.draw(t,e,"11.16.0",m)}catch(z){throw o.suppressErrorRendering?h():AB.draw(t,e,"11.16.0"),z}const v=d.select(`${c} svg`),N=m.db.getAccTitle?.(),R=m.db.getAccDescription?.();ny(b,v,N,R),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",hL);let P=d.select(c).node().innerHTML;if(q.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),P=kL(P,f,Ie(o.arrowMarkerAbsolute)),f){const z=d.select(c+" svg").node();P=wL(P,z)}else u||(P=ui.sanitize(P,{ADD_TAGS:mL,ADD_ATTR:yL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Qv(),y)throw y;return h(),{diagramType:b,svg:P,bindFunctions:m.db.bindFunctions}},"render");function sy(e={}){const t=Dt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),G0(t),t?.theme&&t.theme in He?t.themeVariables=He[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=He.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?j0(t):Zc();$n(r.logLevel),Xs()}p(sy,"initialize");var ay=p((e,t={})=>{const{code:r}=$l(e);return En.fromText(r,t)},"getDiagramFromText");function ny(e,t,r,i){ty(t,e),ey(t,r,i,t.attr("id"))}p(ny,"addA11yInfo");var Ar=Object.freeze({render:SL,parse:oy,getDiagramFromText:ay,initialize:sy,getConfig:vt,setConfig:Kc,getSiteConfig:Zc,updateSiteConfig:X0,reset:p(()=>{es()},"reset"),globalReset:p(()=>{es(fi)},"globalReset"),defaultConfig:fi});$n(vt().logLevel);es(vt());var _L=p((e,t,r)=>{q.warn(e),pl(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),ly=p(async function(e={querySelector:".mermaid"}){try{await BL(e)}catch(t){if(pl(t)&&q.error(t.str),Ge.parseError&&Ge.parseError(t),!e.suppressErrors)throw q.error("Use the suppressErrors option to suppress these errors"),t}},"run"),BL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Ar.getConfig();q.debug(`${e?"":"No "}Callback function found`);let o;if(r)o=r;else if(t)o=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");q.debug(`Found ${o.length} diagrams`),i?.startOnLoad!==void 0&&(q.debug("Start On Load: "+i?.startOnLoad),Ar.updateSiteConfig({startOnLoad:i?.startOnLoad}));const s=new ye.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(o)){if(q.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","
|
|||
|
|
* Wait for document loaded before starting the execution
|
|||
|
|
*/const lF=Object.freeze(Object.defineProperty({__proto__:null,default:ML},Symbol.toStringTag,{value:"Module"}));export{Qi as $,_C as A,gl as B,Ee as C,Xc as D,rw as E,o1 as F,Uk as G,Gn as H,WL as I,YL as J,qr as K,qh as L,Nh as M,jL as N,UL as O,HL as P,NL as Q,qL as R,XL as S,zL as T,at as U,GL as V,B0 as W,DL as X,d2 as Y,c2 as Z,p as _,xC as a,Pe as a$,IL as a0,Ns as a1,G2 as a2,sC as a3,nd as a4,ui as a5,bh as a6,Vk as a7,Va as a8,ew as a9,ll as aA,al as aB,Go as aC,E2 as aD,A2 as aE,F2 as aF,L2 as aG,b2 as aH,Hf as aI,T2 as aJ,x2 as aK,B2 as aL,Yf as aM,w2 as aN,O2 as aO,$2 as aP,M2 as aQ,D2 as aR,I2 as aS,k2 as aT,Uf as aU,v2 as aV,_2 as aW,S2 as aX,jf as aY,hS as aZ,ee as a_,ke as aa,O as ab,I as ac,fC as ad,hd as ae,zT as af,om as ag,oF as ah,yo as ai,Ew as aj,fl as ak,Z as al,jS as am,iF as an,sF as ao,eF as ap,Q as aq,rF as ar,ml as as,kS as at,gS as au,pS as av,Ls as aw,Yt as ax,Xt as ay,mT as az,CC as b,Ii as b0,Jf as b1,Lr as b2,ip as b3,zc as b4,jk as b5,OL as b6,Ay as b7,Aw as b8,PL as b9,Hn as ba,tr as bb,$h as bc,_b as bd,eo as be,K as bf,Wf as bg,se as bh,Cb as bi,zn as bj,Td as bk,po as bl,Bd as bm,RL as bn,Oy as bo,lS as bp,lF as bq,Ct as c,ct as d,ld as e,Dt as f,kC as g,je as h,be as i,y2 as j,uo as k,q as l,ep as m,co as n,wC as o,TC as p,yC as q,VL as r,bC as s,or as t,Fy as u,nF as v,sw as w,aF as x,ye as y,vt as z};
|