vitepress-mermaid-preview
Version:
Mermaid preview for vitepress
3 lines • 539 kB
JavaScript
"use strict";const w=require("vue");function mu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wn={exports:{}},q0=Wn.exports,Rc;function W0(){return Rc||(Rc=1,function(e,t){(function(r,i){e.exports=i()})(q0,function(){var r=1e3,i=6e4,n=36e5,a="millisecond",o="second",s="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",g="date",m="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={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(M){var F=["th","st","nd","rd"],E=M%100;return"["+M+(F[(E-20)%10]||F[E]||F[0])+"]"}},v=function(M,F,E){var N=String(M);return!N||N.length>=F?M:""+Array(F+1-N.length).join(E)+M},_={s:v,z:function(M){var F=-M.utcOffset(),E=Math.abs(F),N=Math.floor(E/60),I=E%60;return(F<=0?"+":"-")+v(N,2,"0")+":"+v(I,2,"0")},m:function M(F,E){if(F.date()<E.date())return-M(E,F);var N=12*(E.year()-F.year())+(E.month()-F.month()),I=F.clone().add(N,u),j=E-I<0,V=F.clone().add(N+(j?-1:1),u);return+(-(N+(E-I)/(j?I-V:V-I))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:u,y:d,w:h,d:c,D:g,h:l,m:s,s:o,ms:a,Q:f}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},C="en",A={};A[C]=y;var L="$isDayjsObject",P=function(M){return M instanceof O||!(!M||!M[L])},S=function M(F,E,N){var I;if(!F)return C;if(typeof F=="string"){var j=F.toLowerCase();A[j]&&(I=j),E&&(A[j]=E,I=j);var V=F.split("-");if(!I&&V.length>1)return M(V[0])}else{var Y=F.name;A[Y]=F,I=Y}return!N&&I&&(C=I),I||!N&&C},$=function(M,F){if(P(M))return M.clone();var E=typeof F=="object"?F:{};return E.date=M,E.args=arguments,new O(E)},B=_;B.l=S,B.i=P,B.w=function(M,F){return $(M,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var O=function(){function M(E){this.$L=S(E.locale,null,!0),this.parse(E),this.$x=this.$x||E.x||{},this[L]=!0}var F=M.prototype;return F.parse=function(E){this.$d=function(N){var I=N.date,j=N.utc;if(I===null)return new Date(NaN);if(B.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var V=I.match(x);if(V){var Y=V[2]-1||0,it=(V[7]||"0").substring(0,3);return j?new Date(Date.UTC(V[1],Y,V[3]||1,V[4]||0,V[5]||0,V[6]||0,it)):new Date(V[1],Y,V[3]||1,V[4]||0,V[5]||0,V[6]||0,it)}}return new Date(I)}(E),this.init()},F.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},F.$utils=function(){return B},F.isValid=function(){return this.$d.toString()!==m},F.isSame=function(E,N){var I=$(E);return this.startOf(N)<=I&&I<=this.endOf(N)},F.isAfter=function(E,N){return $(E)<this.startOf(N)},F.isBefore=function(E,N){return this.endOf(N)<$(E)},F.$g=function(E,N,I){return B.u(E)?this[N]:this.set(I,E)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(E,N){var I=this,j=!!B.u(N)||N,V=B.p(E),Y=function(ct,ht){var bt=B.w(I.$u?Date.UTC(I.$y,ht,ct):new Date(I.$y,ht,ct),I);return j?bt:bt.endOf(c)},it=function(ct,ht){return B.w(I.toDate()[ct].apply(I.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(ht)),I)},tt=this.$W,ft=this.$M,nt=this.$D,kt="set"+(this.$u?"UTC":"");switch(V){case d:return j?Y(1,0):Y(31,11);case u:return j?Y(1,ft):Y(0,ft+1);case h:var R=this.$locale().weekStart||0,xt=(tt<R?tt+7:tt)-R;return Y(j?nt-xt:nt+(6-xt),ft);case c:case g:return it(kt+"Hours",0);case l:return it(kt+"Minutes",1);case s:return it(kt+"Seconds",2);case o:return it(kt+"Milliseconds",3);default:return this.clone()}},F.endOf=function(E){return this.startOf(E,!1)},F.$set=function(E,N){var I,j=B.p(E),V="set"+(this.$u?"UTC":""),Y=(I={},I[c]=V+"Date",I[g]=V+"Date",I[u]=V+"Month",I[d]=V+"FullYear",I[l]=V+"Hours",I[s]=V+"Minutes",I[o]=V+"Seconds",I[a]=V+"Milliseconds",I)[j],it=j===c?this.$D+(N-this.$W):N;if(j===u||j===d){var tt=this.clone().set(g,1);tt.$d[Y](it),tt.init(),this.$d=tt.set(g,Math.min(this.$D,tt.daysInMonth())).$d}else Y&&this.$d[Y](it);return this.init(),this},F.set=function(E,N){return this.clone().$set(E,N)},F.get=function(E){return this[B.p(E)]()},F.add=function(E,N){var I,j=this;E=Number(E);var V=B.p(N),Y=function(ft){var nt=$(j);return B.w(nt.date(nt.date()+Math.round(ft*E)),j)};if(V===u)return this.set(u,this.$M+E);if(V===d)return this.set(d,this.$y+E);if(V===c)return Y(1);if(V===h)return Y(7);var it=(I={},I[s]=i,I[l]=n,I[o]=r,I)[V]||1,tt=this.$d.getTime()+E*it;return B.w(tt,this)},F.subtract=function(E,N){return this.add(-1*E,N)},F.format=function(E){var N=this,I=this.$locale();if(!this.isValid())return I.invalidDate||m;var j=E||"YYYY-MM-DDTHH:mm:ssZ",V=B.z(this),Y=this.$H,it=this.$m,tt=this.$M,ft=I.weekdays,nt=I.months,kt=I.meridiem,R=function(ht,bt,_t,ae){return ht&&(ht[bt]||ht(N,j))||_t[bt].slice(0,ae)},xt=function(ht){return B.s(Y%12||12,ht,"0")},ct=kt||function(ht,bt,_t){var ae=ht<12?"AM":"PM";return _t?ae.toLowerCase():ae};return j.replace(b,function(ht,bt){return bt||function(_t){switch(_t){case"YY":return String(N.$y).slice(-2);case"YYYY":return B.s(N.$y,4,"0");case"M":return tt+1;case"MM":return B.s(tt+1,2,"0");case"MMM":return R(I.monthsShort,tt,nt,3);case"MMMM":return R(nt,tt);case"D":return N.$D;case"DD":return B.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return R(I.weekdaysMin,N.$W,ft,2);case"ddd":return R(I.weekdaysShort,N.$W,ft,3);case"dddd":return ft[N.$W];case"H":return String(Y);case"HH":return B.s(Y,2,"0");case"h":return xt(1);case"hh":return xt(2);case"a":return ct(Y,it,!0);case"A":return ct(Y,it,!1);case"m":return String(it);case"mm":return B.s(it,2,"0");case"s":return String(N.$s);case"ss":return B.s(N.$s,2,"0");case"SSS":return B.s(N.$ms,3,"0");case"Z":return V}return null}(ht)||V.replace(":","")})},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(E,N,I){var j,V=this,Y=B.p(N),it=$(E),tt=(it.utcOffset()-this.utcOffset())*i,ft=this-it,nt=function(){return B.m(V,it)};switch(Y){case d:j=nt()/12;break;case u:j=nt();break;case f:j=nt()/3;break;case h:j=(ft-tt)/6048e5;break;case c:j=(ft-tt)/864e5;break;case l:j=ft/n;break;case s:j=ft/i;break;case o:j=ft/r;break;default:j=ft}return I?j:B.a(j)},F.daysInMonth=function(){return this.endOf(u).$D},F.$locale=function(){return A[this.$L]},F.locale=function(E,N){if(!E)return this.$L;var I=this.clone(),j=S(E,N,!0);return j&&(I.$L=j),I},F.clone=function(){return B.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},M}(),D=O.prototype;return $.prototype=D,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",c],["$M",u],["$y",d],["$D",g]].forEach(function(M){D[M[1]]=function(F){return this.$g(F,M[0],M[1])}}),$.extend=function(M,F){return M.$i||(M(F,O,$),M.$i=!0),$},$.locale=S,$.isDayjs=P,$.unix=function(M){return $(1e3*M)},$.en=A[C],$.Ls=A,$.p={},$})}(Wn)),Wn.exports}var H0=W0();const yu=mu(H0),Hn={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return Hn.hue2rgb(a,n,e+1/3)*255;case"g":return Hn.hue2rgb(a,n,e)*255;case"b":return Hn.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),o=(n+a)/2;if(i==="l")return o*100;if(n===a)return 0;const s=n-a,l=o>.5?s/(2-n-a):s/(n+a);if(i==="s")return l*100;switch(n){case e:return((t-r)/s+(t<r?6:0))*60;case t:return((r-e)/s+2)*60;case r:return((e-t)/s+4)*60;default:return-1}}},j0={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},U0={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},ot={channel:Hn,lang:j0,unit:U0},Xe={};for(let e=0;e<=255;e++)Xe[e]=ot.unit.dec2hex(e);const Pt={ALL:0,RGB:1,HSL:2};class Y0{constructor(){this.type=Pt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Pt.ALL}is(t){return this.type===t}}class V0{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Y0}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Pt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=ot.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=ot.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=ot.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=ot.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=ot.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=ot.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Pt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Pt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Pt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Pt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Pt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Pt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Pt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Pt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Pt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Pt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Pt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Pt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Pa=new V0({r:0,g:0,b:0,a:0},"transparent"),Wr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Wr.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,o=n>4,s=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return Pa.set({r:(i>>l*(c+3)&h)*s,g:(i>>l*(c+2)&h)*s,b:(i>>l*(c+1)&h)*s,a:a?(i&h)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${Xe[Math.round(t)]}${Xe[Math.round(r)]}${Xe[Math.round(i)]}${Xe[Math.round(n*255)]}`:`#${Xe[Math.round(t)]}${Xe[Math.round(r)]}${Xe[Math.round(i)]}`}},ur={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(ur.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return ot.channel.clamp.h(parseFloat(r)*.9);case"rad":return ot.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ot.channel.clamp.h(parseFloat(r)*360)}}return ot.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(ur.re);if(!r)return;const[,i,n,a,o,s]=r;return Pa.set({h:ur._hue2deg(i),s:ot.channel.clamp.s(parseFloat(n)),l:ot.channel.clamp.l(parseFloat(a)),a:o?ot.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${ot.lang.round(t)}, ${ot.lang.round(r)}%, ${ot.lang.round(i)}%, ${n})`:`hsl(${ot.lang.round(t)}, ${ot.lang.round(r)}%, ${ot.lang.round(i)}%)`}},ji={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=ji.colors[e];if(t)return Wr.parse(t)},stringify:e=>{const t=Wr.stringify(e);for(const r in ji.colors)if(ji.colors[r]===t)return r}},Ri={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Ri.re);if(!r)return;const[,i,n,a,o,s,l,c,h]=r;return Pa.set({r:ot.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:ot.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:ot.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:c?ot.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${ot.lang.round(t)}, ${ot.lang.round(r)}, ${ot.lang.round(i)}, ${ot.lang.round(n)})`:`rgb(${ot.lang.round(t)}, ${ot.lang.round(r)}, ${ot.lang.round(i)})`}},ge={format:{keyword:ji,hex:Wr,rgb:Ri,rgba:Ri,hsl:ur,hsla:ur},parse:e=>{if(typeof e!="string")return e;const t=Wr.parse(e)||Ri.parse(e)||ur.parse(e)||ji.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Pt.HSL)||e.data.r===void 0?ur.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ri.stringify(e):Wr.stringify(e)},xu=(e,t)=>{const r=ge.parse(e);for(const i in t)r[i]=ot.channel.clamp[i](t[i]);return ge.stringify(r)},Hr=(e,t,r=0,i=1)=>{if(typeof e!="number")return xu(e,{a:t});const n=Pa.set({r:ot.channel.clamp.r(e),g:ot.channel.clamp.g(t),b:ot.channel.clamp.b(r),a:ot.channel.clamp.a(i)});return ge.stringify(n)},G0=e=>{const{r:t,g:r,b:i}=ge.parse(e),n=.2126*ot.channel.toLinear(t)+.7152*ot.channel.toLinear(r)+.0722*ot.channel.toLinear(i);return ot.lang.round(n)},X0=e=>G0(e)>=.5,hi=e=>!X0(e),bu=(e,t,r)=>{const i=ge.parse(e),n=i[t],a=ot.channel.clamp[t](n+r);return n!==a&&(i[t]=a),ge.stringify(i)},H=(e,t)=>bu(e,"l",t),et=(e,t)=>bu(e,"l",-t),T=(e,t)=>{const r=ge.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return xu(e,i)},K0=(e,t,r=50)=>{const{r:i,g:n,b:a,a:o}=ge.parse(e),{r:s,g:l,b:c,a:h}=ge.parse(t),u=r/100,f=u*2-1,d=o-h,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,x=1-m,b=i*m+s*x,y=n*m+l*x,v=a*m+c*x,_=o*u+h*(1-u);return Hr(b,y,v,_)},W=(e,t=100)=>{const r=ge.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,K0(r,e,t)};/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:wu,setPrototypeOf:Ic,isFrozen:Z0,getPrototypeOf:Q0,getOwnPropertyDescriptor:J0}=Object;let{freeze:Xt,seal:le,create:vu}=Object,{apply:Js,construct:to}=typeof Reflect<"u"&&Reflect;Xt||(Xt=function(t){return t});le||(le=function(t){return t});Js||(Js=function(t,r,i){return t.apply(r,i)});to||(to=function(t,r){return new t(...r)});const An=Kt(Array.prototype.forEach),tx=Kt(Array.prototype.lastIndexOf),Pc=Kt(Array.prototype.pop),Ci=Kt(Array.prototype.push),ex=Kt(Array.prototype.splice),jn=Kt(String.prototype.toLowerCase),Ts=Kt(String.prototype.toString),Nc=Kt(String.prototype.match),ki=Kt(String.prototype.replace),rx=Kt(String.prototype.indexOf),ix=Kt(String.prototype.trim),he=Kt(Object.prototype.hasOwnProperty),Wt=Kt(RegExp.prototype.test),_i=nx(TypeError);function Kt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return Js(e,t,i)}}function nx(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return to(e,r)}}function ut(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:jn;Ic&&Ic(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const a=r(n);a!==n&&(Z0(t)||(t[i]=a),n=a)}e[n]=!0}return e}function ax(e){for(let t=0;t<e.length;t++)he(e,t)||(e[t]=null);return e}function Fe(e){const t=vu(null);for(const[r,i]of wu(e))he(e,r)&&(Array.isArray(i)?t[r]=ax(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=Fe(i):t[r]=i);return t}function Si(e,t){for(;e!==null;){const i=J0(e,t);if(i){if(i.get)return Kt(i.get);if(typeof i.value=="function")return Kt(i.value)}e=Q0(e)}function r(){return null}return r}const zc=Xt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Bs=Xt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ls=Xt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),sx=Xt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),As=Xt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ox=Xt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qc=Xt(["#text"]),Wc=Xt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Es=Xt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Hc=Xt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),En=Xt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),lx=le(/\{\{[\w\W]*|[\w\W]*\}\}/gm),cx=le(/<%[\w\W]*|[\w\W]*%>/gm),hx=le(/\$\{[\w\W]*/gm),ux=le(/^data-[\-\w.\u00B7-\uFFFF]+$/),fx=le(/^aria-[\-\w]+$/),Cu=le(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),dx=le(/^(?:\w+script|data):/i),px=le(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ku=le(/^html$/i),gx=le(/^[a-z][.\w]*(-[.\w]+)+$/i);var jc=Object.freeze({__proto__:null,ARIA_ATTR:fx,ATTR_WHITESPACE:px,CUSTOM_ELEMENT:gx,DATA_ATTR:ux,DOCTYPE_NAME:ku,ERB_EXPR:cx,IS_ALLOWED_URI:Cu,IS_SCRIPT_OR_DATA:dx,MUSTACHE_EXPR:lx,TMPLIT_EXPR:hx});const Ti={element:1,text:3,progressingInstruction:7,comment:8,document:9},mx=function(){return typeof window>"u"?null:window},yx=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Uc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _u(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mx();const t=rt=>_u(rt);if(t.version="3.2.6",t.removed=[],!e||!e.document||e.document.nodeType!==Ti.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=e,g=l.prototype,m=Si(g,"cloneNode"),x=Si(g,"remove"),b=Si(g,"nextSibling"),y=Si(g,"childNodes"),v=Si(g,"parentNode");if(typeof o=="function"){const rt=r.createElement("template");rt.content&&rt.content.ownerDocument&&(r=rt.content.ownerDocument)}let _,C="";const{implementation:A,createNodeIterator:L,createDocumentFragment:P,getElementsByTagName:S}=r,{importNode:$}=i;let B=Uc();t.isSupported=typeof wu=="function"&&typeof v=="function"&&A&&A.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:O,ERB_EXPR:D,TMPLIT_EXPR:M,DATA_ATTR:F,ARIA_ATTR:E,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:I,CUSTOM_ELEMENT:j}=jc;let{IS_ALLOWED_URI:V}=jc,Y=null;const it=ut({},[...zc,...Bs,...Ls,...As,...qc]);let tt=null;const ft=ut({},[...Wc,...Es,...Hc,...En]);let nt=Object.seal(vu(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),kt=null,R=null,xt=!0,ct=!0,ht=!1,bt=!0,_t=!1,ae=!0,qt=!1,Cn=!1,xs=!1,$r=!1,kn=!1,_n=!1,xc=!0,bc=!1;const F0="user-content-";let bs=!0,bi=!1,Fr={},Dr=null;const wc=ut({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let vc=null;const Cc=ut({},["audio","video","img","source","image","track"]);let ws=null;const kc=ut({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Sn="http://www.w3.org/1998/Math/MathML",Tn="http://www.w3.org/2000/svg",Be="http://www.w3.org/1999/xhtml";let Or=Be,vs=!1,Cs=null;const D0=ut({},[Sn,Tn,Be],Ts);let Bn=ut({},["mi","mo","mn","ms","mtext"]),Ln=ut({},["annotation-xml"]);const O0=ut({},["title","style","font","a","script"]);let wi=null;const R0=["application/xhtml+xml","text/html"],I0="text/html";let $t=null,Rr=null;const P0=r.createElement("form"),_c=function(k){return k instanceof RegExp||k instanceof Function},ks=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Rr&&Rr===k)){if((!k||typeof k!="object")&&(k={}),k=Fe(k),wi=R0.indexOf(k.PARSER_MEDIA_TYPE)===-1?I0:k.PARSER_MEDIA_TYPE,$t=wi==="application/xhtml+xml"?Ts:jn,Y=he(k,"ALLOWED_TAGS")?ut({},k.ALLOWED_TAGS,$t):it,tt=he(k,"ALLOWED_ATTR")?ut({},k.ALLOWED_ATTR,$t):ft,Cs=he(k,"ALLOWED_NAMESPACES")?ut({},k.ALLOWED_NAMESPACES,Ts):D0,ws=he(k,"ADD_URI_SAFE_ATTR")?ut(Fe(kc),k.ADD_URI_SAFE_ATTR,$t):kc,vc=he(k,"ADD_DATA_URI_TAGS")?ut(Fe(Cc),k.ADD_DATA_URI_TAGS,$t):Cc,Dr=he(k,"FORBID_CONTENTS")?ut({},k.FORBID_CONTENTS,$t):wc,kt=he(k,"FORBID_TAGS")?ut({},k.FORBID_TAGS,$t):Fe({}),R=he(k,"FORBID_ATTR")?ut({},k.FORBID_ATTR,$t):Fe({}),Fr=he(k,"USE_PROFILES")?k.USE_PROFILES:!1,xt=k.ALLOW_ARIA_ATTR!==!1,ct=k.ALLOW_DATA_ATTR!==!1,ht=k.ALLOW_UNKNOWN_PROTOCOLS||!1,bt=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_t=k.SAFE_FOR_TEMPLATES||!1,ae=k.SAFE_FOR_XML!==!1,qt=k.WHOLE_DOCUMENT||!1,$r=k.RETURN_DOM||!1,kn=k.RETURN_DOM_FRAGMENT||!1,_n=k.RETURN_TRUSTED_TYPE||!1,xs=k.FORCE_BODY||!1,xc=k.SANITIZE_DOM!==!1,bc=k.SANITIZE_NAMED_PROPS||!1,bs=k.KEEP_CONTENT!==!1,bi=k.IN_PLACE||!1,V=k.ALLOWED_URI_REGEXP||Cu,Or=k.NAMESPACE||Be,Bn=k.MATHML_TEXT_INTEGRATION_POINTS||Bn,Ln=k.HTML_INTEGRATION_POINTS||Ln,nt=k.CUSTOM_ELEMENT_HANDLING||{},k.CUSTOM_ELEMENT_HANDLING&&_c(k.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(nt.tagNameCheck=k.CUSTOM_ELEMENT_HANDLING.tagNameCheck),k.CUSTOM_ELEMENT_HANDLING&&_c(k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(nt.attributeNameCheck=k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(nt.allowCustomizedBuiltInElements=k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_t&&(ct=!1),kn&&($r=!0),Fr&&(Y=ut({},qc),tt=[],Fr.html===!0&&(ut(Y,zc),ut(tt,Wc)),Fr.svg===!0&&(ut(Y,Bs),ut(tt,Es),ut(tt,En)),Fr.svgFilters===!0&&(ut(Y,Ls),ut(tt,Es),ut(tt,En)),Fr.mathMl===!0&&(ut(Y,As),ut(tt,Hc),ut(tt,En))),k.ADD_TAGS&&(Y===it&&(Y=Fe(Y)),ut(Y,k.ADD_TAGS,$t)),k.ADD_ATTR&&(tt===ft&&(tt=Fe(tt)),ut(tt,k.ADD_ATTR,$t)),k.ADD_URI_SAFE_ATTR&&ut(ws,k.ADD_URI_SAFE_ATTR,$t),k.FORBID_CONTENTS&&(Dr===wc&&(Dr=Fe(Dr)),ut(Dr,k.FORBID_CONTENTS,$t)),bs&&(Y["#text"]=!0),qt&&ut(Y,["html","head","body"]),Y.table&&(ut(Y,["tbody"]),delete kt.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw _i('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw _i('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=k.TRUSTED_TYPES_POLICY,C=_.createHTML("")}else _===void 0&&(_=yx(d,n)),_!==null&&typeof C=="string"&&(C=_.createHTML(""));Xt&&Xt(k),Rr=k}},Sc=ut({},[...Bs,...Ls,...sx]),Tc=ut({},[...As,...ox]),N0=function(k){let q=v(k);(!q||!q.tagName)&&(q={namespaceURI:Or,tagName:"template"});const X=jn(k.tagName),vt=jn(q.tagName);return Cs[k.namespaceURI]?k.namespaceURI===Tn?q.namespaceURI===Be?X==="svg":q.namespaceURI===Sn?X==="svg"&&(vt==="annotation-xml"||Bn[vt]):!!Sc[X]:k.namespaceURI===Sn?q.namespaceURI===Be?X==="math":q.namespaceURI===Tn?X==="math"&&Ln[vt]:!!Tc[X]:k.namespaceURI===Be?q.namespaceURI===Tn&&!Ln[vt]||q.namespaceURI===Sn&&!Bn[vt]?!1:!Tc[X]&&(O0[X]||!Sc[X]):!!(wi==="application/xhtml+xml"&&Cs[k.namespaceURI]):!1},ye=function(k){Ci(t.removed,{element:k});try{v(k).removeChild(k)}catch{x(k)}},Ir=function(k,q){try{Ci(t.removed,{attribute:q.getAttributeNode(k),from:q})}catch{Ci(t.removed,{attribute:null,from:q})}if(q.removeAttribute(k),k==="is")if($r||kn)try{ye(q)}catch{}else try{q.setAttribute(k,"")}catch{}},Bc=function(k){let q=null,X=null;if(xs)k="<remove></remove>"+k;else{const Lt=Nc(k,/^[\r\n\t ]+/);X=Lt&&Lt[0]}wi==="application/xhtml+xml"&&Or===Be&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const vt=_?_.createHTML(k):k;if(Or===Be)try{q=new f().parseFromString(vt,wi)}catch{}if(!q||!q.documentElement){q=A.createDocument(Or,"template",null);try{q.documentElement.innerHTML=vs?C:vt}catch{}}const Rt=q.body||q.documentElement;return k&&X&&Rt.insertBefore(r.createTextNode(X),Rt.childNodes[0]||null),Or===Be?S.call(q,qt?"html":"body")[0]:qt?q.documentElement:Rt},Lc=function(k){return L.call(k.ownerDocument||k,k,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},_s=function(k){return k instanceof u&&(typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||!(k.attributes instanceof h)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function")},Ac=function(k){return typeof s=="function"&&k instanceof s};function Le(rt,k,q){An(rt,X=>{X.call(t,k,q,Rr)})}const Ec=function(k){let q=null;if(Le(B.beforeSanitizeElements,k,null),_s(k))return ye(k),!0;const X=$t(k.nodeName);if(Le(B.uponSanitizeElement,k,{tagName:X,allowedTags:Y}),ae&&k.hasChildNodes()&&!Ac(k.firstElementChild)&&Wt(/<[/\w!]/g,k.innerHTML)&&Wt(/<[/\w!]/g,k.textContent)||k.nodeType===Ti.progressingInstruction||ae&&k.nodeType===Ti.comment&&Wt(/<[/\w]/g,k.data))return ye(k),!0;if(!Y[X]||kt[X]){if(!kt[X]&&$c(X)&&(nt.tagNameCheck instanceof RegExp&&Wt(nt.tagNameCheck,X)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(X)))return!1;if(bs&&!Dr[X]){const vt=v(k)||k.parentNode,Rt=y(k)||k.childNodes;if(Rt&&vt){const Lt=Rt.length;for(let Zt=Lt-1;Zt>=0;--Zt){const Ae=m(Rt[Zt],!0);Ae.__removalCount=(k.__removalCount||0)+1,vt.insertBefore(Ae,b(k))}}}return ye(k),!0}return k instanceof l&&!N0(k)||(X==="noscript"||X==="noembed"||X==="noframes")&&Wt(/<\/no(script|embed|frames)/i,k.innerHTML)?(ye(k),!0):(_t&&k.nodeType===Ti.text&&(q=k.textContent,An([O,D,M],vt=>{q=ki(q,vt," ")}),k.textContent!==q&&(Ci(t.removed,{element:k.cloneNode()}),k.textContent=q)),Le(B.afterSanitizeElements,k,null),!1)},Mc=function(k,q,X){if(xc&&(q==="id"||q==="name")&&(X in r||X in P0))return!1;if(!(ct&&!R[q]&&Wt(F,q))){if(!(xt&&Wt(E,q))){if(!tt[q]||R[q]){if(!($c(k)&&(nt.tagNameCheck instanceof RegExp&&Wt(nt.tagNameCheck,k)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(k))&&(nt.attributeNameCheck instanceof RegExp&&Wt(nt.attributeNameCheck,q)||nt.attributeNameCheck instanceof Function&&nt.attributeNameCheck(q))||q==="is"&&nt.allowCustomizedBuiltInElements&&(nt.tagNameCheck instanceof RegExp&&Wt(nt.tagNameCheck,X)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(X))))return!1}else if(!ws[q]){if(!Wt(V,ki(X,I,""))){if(!((q==="src"||q==="xlink:href"||q==="href")&&k!=="script"&&rx(X,"data:")===0&&vc[k])){if(!(ht&&!Wt(N,ki(X,I,"")))){if(X)return!1}}}}}}return!0},$c=function(k){return k!=="annotation-xml"&&Nc(k,j)},Fc=function(k){Le(B.beforeSanitizeAttributes,k,null);const{attributes:q}=k;if(!q||_s(k))return;const X={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:tt,forceKeepAttr:void 0};let vt=q.length;for(;vt--;){const Rt=q[vt],{name:Lt,namespaceURI:Zt,value:Ae}=Rt,vi=$t(Lt),Ss=Ae;let It=Lt==="value"?Ss:ix(Ss);if(X.attrName=vi,X.attrValue=It,X.keepAttr=!0,X.forceKeepAttr=void 0,Le(B.uponSanitizeAttribute,k,X),It=X.attrValue,bc&&(vi==="id"||vi==="name")&&(Ir(Lt,k),It=F0+It),ae&&Wt(/((--!?|])>)|<\/(style|title)/i,It)){Ir(Lt,k);continue}if(X.forceKeepAttr)continue;if(!X.keepAttr){Ir(Lt,k);continue}if(!bt&&Wt(/\/>/i,It)){Ir(Lt,k);continue}_t&&An([O,D,M],Oc=>{It=ki(It,Oc," ")});const Dc=$t(k.nodeName);if(!Mc(Dc,vi,It)){Ir(Lt,k);continue}if(_&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Zt)switch(d.getAttributeType(Dc,vi)){case"TrustedHTML":{It=_.createHTML(It);break}case"TrustedScriptURL":{It=_.createScriptURL(It);break}}if(It!==Ss)try{Zt?k.setAttributeNS(Zt,Lt,It):k.setAttribute(Lt,It),_s(k)?ye(k):Pc(t.removed)}catch{Ir(Lt,k)}}Le(B.afterSanitizeAttributes,k,null)},z0=function rt(k){let q=null;const X=Lc(k);for(Le(B.beforeSanitizeShadowDOM,k,null);q=X.nextNode();)Le(B.uponSanitizeShadowNode,q,null),Ec(q),Fc(q),q.content instanceof a&&rt(q.content);Le(B.afterSanitizeShadowDOM,k,null)};return t.sanitize=function(rt){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,X=null,vt=null,Rt=null;if(vs=!rt,vs&&(rt="<!-->"),typeof rt!="string"&&!Ac(rt))if(typeof rt.toString=="function"){if(rt=rt.toString(),typeof rt!="string")throw _i("dirty is not a string, aborting")}else throw _i("toString is not a function");if(!t.isSupported)return rt;if(Cn||ks(k),t.removed=[],typeof rt=="string"&&(bi=!1),bi){if(rt.nodeName){const Ae=$t(rt.nodeName);if(!Y[Ae]||kt[Ae])throw _i("root node is forbidden and cannot be sanitized in-place")}}else if(rt instanceof s)q=Bc("<!---->"),X=q.ownerDocument.importNode(rt,!0),X.nodeType===Ti.element&&X.nodeName==="BODY"||X.nodeName==="HTML"?q=X:q.appendChild(X);else{if(!$r&&!_t&&!qt&&rt.indexOf("<")===-1)return _&&_n?_.createHTML(rt):rt;if(q=Bc(rt),!q)return $r?null:_n?C:""}q&&xs&&ye(q.firstChild);const Lt=Lc(bi?rt:q);for(;vt=Lt.nextNode();)Ec(vt),Fc(vt),vt.content instanceof a&&z0(vt.content);if(bi)return rt;if($r){if(kn)for(Rt=P.call(q.ownerDocument);q.firstChild;)Rt.appendChild(q.firstChild);else Rt=q;return(tt.shadowroot||tt.shadowrootmode)&&(Rt=$.call(i,Rt,!0)),Rt}let Zt=qt?q.outerHTML:q.innerHTML;return qt&&Y["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&Wt(ku,q.ownerDocument.doctype.name)&&(Zt="<!DOCTYPE "+q.ownerDocument.doctype.name+`>
`+Zt),_t&&An([O,D,M],Ae=>{Zt=ki(Zt,Ae," ")}),_&&_n?_.createHTML(Zt):Zt},t.setConfig=function(){let rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ks(rt),Cn=!0},t.clearConfig=function(){Rr=null,Cn=!1},t.isValidAttribute=function(rt,k,q){Rr||ks({});const X=$t(rt),vt=$t(k);return Mc(X,vt,q)},t.addHook=function(rt,k){typeof k=="function"&&Ci(B[rt],k)},t.removeHook=function(rt,k){if(k!==void 0){const q=tx(B[rt],k);return q===-1?void 0:ex(B[rt],q,1)[0]}return Pc(B[rt])},t.removeHooks=function(rt){B[rt]=[]},t.removeAllHooks=function(){B=Uc()},t}var ti=_u(),Su=Object.defineProperty,p=(e,t)=>Su(e,"name",{value:t,configurable:!0}),Tu=(e,t)=>{for(var r in t)Su(e,r,{get:t[r],enumerable:!0})},Ee={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},z={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},ol=p(function(e="fatal"){let t=Ee.fatal;typeof e=="string"?e.toLowerCase()in Ee&&(t=Ee[e]):typeof e=="number"&&(t=e),z.trace=()=>{},z.debug=()=>{},z.info=()=>{},z.warn=()=>{},z.error=()=>{},z.fatal=()=>{},t<=Ee.fatal&&(z.fatal=console.error?console.error.bind(console,se("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",se("FATAL"))),t<=Ee.error&&(z.error=console.error?console.error.bind(console,se("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",se("ERROR"))),t<=Ee.warn&&(z.warn=console.warn?console.warn.bind(console,se("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",se("WARN"))),t<=Ee.info&&(z.info=console.info?console.info.bind(console,se("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",se("INFO"))),t<=Ee.debug&&(z.debug=console.debug?console.debug.bind(console,se("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",se("DEBUG"))),t<=Ee.trace&&(z.trace=console.debug?console.debug.bind(console,se("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",se("TRACE")))},"setLogLevel"),se=p(e=>`%c${yu().format("ss.SSS")} : ${e} : `,"format"),Bu=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Ui=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,xx=/\s*%%.*\n/gm,Yr,Lu=(Yr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(Yr,"UnknownDiagramError"),Yr),br={},ll=p(function(e,t){e=e.replace(Bu,"").replace(Ui,"").replace(xx,`
`);for(const[r,{detector:i}]of Object.entries(br))if(i(e,t))return r;throw new Lu(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),eo=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Au(t,r,i)},"registerLazyLoadedDiagrams"),Au=p((e,t,r)=>{br[e]&&z.warn(`Detector with key ${e} already exists. Overwriting.`),br[e]={detector:t,loader:r},z.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),bx=p(e=>br[e].loader,"getDiagramLoader"),ro=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>ro(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),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(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=ro(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Ft=ro,Na="#ffffff",za="#f2f2f2",Ht=p((e,t)=>t?T(e,{s:-40,l:10}):T(e,{s:-40,l:-10}),"mkBorder"),Vr,wx=(Vr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||T(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||T(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ht(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ht(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||W(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||W(this.tertiaryColor),this.lineColor=this.lineColor||W(this.background),this.arrowheadColor=this.arrowheadColor||W(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?et(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||et(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||W(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||H(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||et(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||et(this.mainBkg,10)):(this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||W(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||H(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||et(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||T(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||T(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||T(this.primaryColor,{h:64}),this.fillType3=this.fillType3||T(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||T(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||T(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||T(this.primaryColor,{h:128}),this.fillType7=this.fillType7||T(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.p