PHPIndex

This page lists files in the current directory. You can view content, get download/execute commands for Wget, Curl, or PowerShell, or filter the list using wildcards (e.g., `*.sh`).

katex
abcjs-basic-min.js
wget 'https://sme10.lists2.roe3.org/kodbox/static/app/vender/markdown/abcjs-basic-min.js'
View Content
/*! abcjs_basic v6.0.0-beta.33 Copyright © 2009-2021 Paul Rosen and Gregory Dyke (https://abcjs.net) */
/*! For license information please see abcjs_basic.LICENSE */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.abcjs=t():e.ABCJS=t()}(this,(function(){return e={1045:function(e,t,r){r(6106);var n=r(1185),i=r(6306),a=r(1592),s=r(1028),o={};o.signature="abcjs-basic v"+n,Object.keys(i).forEach((function(e){o[e]=i[e]})),Object.keys(a).forEach((function(e){o[e]=a[e]})),o.renderAbc=r(6859),o.TimingCallbacks=r(5681);var c=r(5245);o.setGlyph=c.setSymbol;var l=r(5594),h=r(8471),u=r(522),d=r(2029),f=r(6313),p=r(5281),m=r(8702),g=r(5049),v=r(4718),b=r(3450),y=r(562);o.synth={CreateSynth:l,instrumentIndexToName:h,pitchToNoteName:u,SynthController:b,SynthSequence:d,CreateSynthControl:f,registerAudioContext:p,activeAudioContext:m,supportsAudio:g,playEvent:v,getMidiFile:y,sequence:s},o.Editor=r(5294),o.EditArea=r(2945),e.exports=o},6106:function(){},6306:function(e,t,r){var n=r(5681),i={};!function(){"use strict";var e,t;i.startAnimation=function(r,i,a){function s(e){for(var t=0;t<e.length;t++){var r=e[t];r.classList.contains("abcjs-bar")||(r.style.display="none")}}var o;function c(e){a.hideCurrentMeasure?function(e){s(r.querySelectorAll(e))}(e):a.hideFinishedMeasures&&function(e){o&&s(r.querySelectorAll(o)),o=e}(e)}e&&(e.stop(),e=void 0),a.showCursor&&((t=r.querySelector(".abcjs-cursor"))||((t=document.createElement("DIV")).className="abcjs-cursor cursor",t.style.position="absolute",r.appendChild(t),r.style.position="relative")),(e=new n(i,{qpm:a.bpm,eventCallback:function(r){if(r){if(r.measureStart){var n=".abcjs-l"+(i=r).line+".abcjs-m"+i.measureNumber;n&&c(n)}t&&(t.style.left=r.left+"px",t.style.top=r.top+"px",t.style.width=r.width+"px",t.style.height=r.height+"px")}else e.stop(),e=void 0;var i}})).start()},i.pauseAnimation=function(t){e&&(t?e.pause():e.start())},i.stopAnimation=function(){e&&(e.stop(),e=void 0)}}(),e.exports=i},5681:function(e){e.exports=function(e,t){var r=this;if(t||(t={}),r.qpm=t.qpm?parseInt(t.qpm,10):null,!r.qpm){var n=e.metaText?e.metaText.tempo:null;r.qpm=e.getBpm(n)}r.extraMeasuresAtBeginning=t.extraMeasuresAtBeginning?parseInt(t.extraMeasuresAtBeginning,10):0,r.beatCallback=t.beatCallback,r.eventCallback=t.eventCallback,r.lineEndCallback=t.lineEndCallback,r.lineEndAnticipation=t.lineEndAnticipation?parseInt(t.lineEndAnticipation,10):0,r.beatSubdivisions=t.beatSubdivisions?parseInt(t.beatSubdivisions,10):1,r.joggerTimer=null,r.replaceTarget=function(e){r.noteTimings=e.setTiming(r.qpm,r.extraMeasuresAtBeginning),0===e.noteTimings.length&&e.setTiming(0,0),r.lineEndCallback&&(r.lineEndTimings=function(e,t){for(var r=[],n=null,i=0;i<e.length;i++){var a=e[i];"end"!==a.type&&a.top!==n&&(r.push({measureNumber:a.measureNumber,milliseconds:a.milliseconds-t,top:a.top,bottom:a.top+a.height}),n=a.top)}return r}(e.noteTimings,r.lineEndAnticipation)),r.startTime=null,r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.isPaused=!1,r.isRunning=!1,r.pausedPercent=null,r.justUnpaused=!1,r.newSeekPercent=0,r.lastTimestamp=0,0!==r.noteTimings.length&&(r.millisecondsPerBeat=1e3/(r.qpm/60)/r.beatSubdivisions,r.lastMoment=r.noteTimings[r.noteTimings.length-1].milliseconds,r.totalBeats=Math.round(r.lastMoment/r.millisecondsPerBeat))},r.replaceTarget(e),r.doTiming=function(e){if(r.lastTimestamp!==e&&(r.lastTimestamp=e,r.startTime||(r.startTime=e),!r.isPaused&&r.isRunning)){var t=e-r.startTime;for(t+=16;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].milliseconds<t;){if(r.eventCallback&&"event"===r.noteTimings[r.currentEvent].type){var n=r.startTime;r.eventCallback(r.noteTimings[r.currentEvent]),n!==r.startTime&&(t=e-r.startTime)}r.currentEvent++}if(r.lineEndCallback&&r.lineEndTimings.length>r.currentLine&&r.lineEndTimings[r.currentLine].milliseconds<t&&r.currentEvent<r.noteTimings.length){var i=r.noteTimings[r.currentEvent].milliseconds===t?r.noteTimings[r.currentEvent]:r.noteTimings[r.currentEvent-1];r.lineEndCallback(r.lineEndTimings[r.currentLine],i,{line:r.currentLine,endTimings:r.lineEndTimings,currentTime:t}),r.currentLine++}if(t<r.lastMoment){if(requestAnimationFrame(r.doTiming),r.currentBeat*r.millisecondsPerBeat<t){var a=r.doBeatCallback(e);null!==a&&(t=a)}}else if(r.currentBeat<=r.totalBeats&&r.beatCallback){var s=r.doBeatCallback(e);null!==s&&(t=s),requestAnimationFrame(r.doTiming)}if(t>=r.lastMoment)if(r.eventCallback){var o=r.eventCallback(null);r.shouldStop(o).then((function(e){e&&r.stop()}))}else r.stop()}},r.shouldStop=function(e){return new Promise((function(t){return e?"continue"===e?t(!1):void(e.then&&e.then((function(e){t("continue"!==e)}))):t(!0)}))},r.doBeatCallback=function(e){if(r.beatCallback){for(var t,n,i=r.currentEvent;i<r.noteTimings.length&&null===r.noteTimings[i].left;)i++;if(i<r.noteTimings.length){for(t=r.noteTimings[i].milliseconds,i=r.currentEvent-1;i>=0&&null===r.noteTimings[i].left;)i--;n=r.noteTimings[i]}var a={},s={};if(n){a.top=n.top,a.height=n.height;var o=Math.max(0,e-r.startTime-n.milliseconds),c=t-n.milliseconds,l=n.endX-n.left,h=o*l/c;a.left=n.left+h,s={timestamp:e,startTime:r.startTime,ev:n,endMs:t,offMs:o,offPs:h,gapMs:c,gapPx:l}}else s={timestamp:e,startTime:r.startTime};var u=r.startTime;if(r.beatCallback(r.currentBeat/r.beatSubdivisions,r.totalBeats/r.beatSubdivisions,r.lastMoment,a,s),u!==r.startTime)return e-r.startTime;r.currentBeat++}return null},r.animationJogger=function(){r.isRunning&&(r.doTiming(performance.now()),r.joggerTimer=setTimeout(r.animationJogger,60))},r.start=function(e){if(r.isRunning=!0,r.isPaused&&(r.isPaused=!1,void 0===e&&(r.justUnpaused=!0)),e)r.setProgress(e);else if(0===e)r.reset();else if(null!==r.pausedPercent){var t=performance.now(),n=r.lastMoment*r.pausedPercent;r.startTime=t-n,r.pausedPercent=null,r.reportNext=!0}requestAnimationFrame(r.doTiming),r.joggerTimer=setTimeout(r.animationJogger,60)},r.pause=function(){r.isPaused=!0;var e=performance.now();r.pausedPercent=(e-r.startTime)/r.lastMoment,r.isRunning=!1,r.joggerTimer&&(clearTimeout(r.joggerTimer),r.joggerTimer=null)},r.reset=function(){r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.startTime=null,r.pausedPercent=null},r.stop=function(){r.pause(),r.reset()},r.setProgress=function(e,t){var n,i;switch(t){case"seconds":(n=1e3*e)<0&&(n=0),n>r.lastMoment&&(n=r.lastMoment),i=n/r.lastMoment;break;case"beats":(n=e*r.millisecondsPerBeat*r.beatSubdivisions)<0&&(n=0),n>r.lastMoment&&(n=r.lastMoment),i=n/r.lastMoment;break;default:(i=e)<0&&(i=0),i>1&&(i=1),n=r.lastMoment*i}r.isRunning||(r.pausedPercent=i);var a=performance.now();for(r.startTime=a-n,r.currentEvent,r.currentEvent=0;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].milliseconds<n;)r.currentEvent++;if(r.lineEndCallback)for(r.currentLine=0;r.lineEndTimings.length>r.currentLine&&r.lineEndTimings[r.currentLine].milliseconds+r.lineEndAnticipation<n;)r.currentLine++;var s=r.currentBeat;r.currentBeat=Math.floor(n/r.millisecondsPerBeat),r.beatCallback&&s!==r.currentBeat&&r.doBeatCallback(r.startTime+n),r.eventCallback&&r.currentEvent>=0&&"event"===r.noteTimings[r.currentEvent].type&&r.eventCallback(r.noteTimings[r.currentEvent]),r.lineEndCallback&&r.lineEndCallback(r.lineEndTimings[r.currentLine],r.noteTimings[r.currentEvent],{line:r.currentLine,endTimings:r.lineEndTimings}),r.joggerTimer=setTimeout(r.animationJogger,60)}}},1592:function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(8905),a=r(9565),s={};!function(){"use strict";s.numberOfTunes=function(e){var t=e.split("\nX:").length;return 0===t&&(t=1),t};var e=s.TuneBook=function(e){var t=a(e);this.header=t.header,this.tunes=t.tunes};e.prototype.getTuneById=function(e){for(var t=0;t<this.tunes.length;t++)if(this.tunes[t].id===""+e)return this.tunes[t];return null},e.prototype.getTuneByTitle=function(e){for(var t=0;t<this.tunes.length;t++)if(this.tunes[t].title===e)return this.tunes[t];return null},s.parseOnly=function(e,t){for(var r=s.numberOfTunes(e),n=[],i=0;i<r;i++)n.push(1);return s.renderEngine((function(){}),n,e,t)},s.renderEngine=function(t,r,a,s){var o=[];if(void 0!==r&&void 0!==a){var c;(!(c=r)||c.propertyIsEnumerable("length")||"object"!==n(c)||"number"!=typeof c.length)&&(r=[r]),void 0===s&&(s={});for(var l=s.startingTune?parseInt(s.startingTune,10):0,h=new e(a),u=new i,d=0;d<r.length;d++){var f=r[d];if("*"===f||"string"==typeof f&&(f=document.getElementById(f)),f)if(l>=0&&l<h.tunes.length){u.parse(h.tunes[l].abc,s,h.tunes[l].startPos-h.header.length);var p=u.getTune(),m=u.getWarnings();m&&(p.warnings=m);var g=t(f,p,d,h.tunes[l].abc);o.push(g||p)}else f.innerHTML&&(f.innerHTML="");l++}return o}},s.extractMeasures=function(t){for(var r=[],n=new e(t),i=0;i<n.tunes.length;i++){for(var a=n.tunes[i],o=a.abc.split("K:"),c=o[1].split("\n"),l=o[0]+"K:"+c[0]+"\n",h=null,u=null,d=null,f=[],p=!1,m=s.parseOnly(a.abc)[0],g=m.getPickupLength()>0,v=0;v<m.lines.length;v++){var b=m.lines[v];if(b.staff)for(var y=0;y<1;y++)for(var w=b.staff[y],k=0;k<1;k++)for(var x=w.voices[k],T=0;T<x.length;T++){var C=x[T];if(null===d&&C.startChar>=0&&(d=C.startChar,u=void 0===C.chord?h:null),C.chord&&(h=C),"bar"===C.el_type){if(p){var A={abc:a.abc.substring(d,C.endChar)};(h=u&&u.chord&&u.chord.length>0?u.chord[0].name:null)&&(A.lastChord=h),C.startEnding&&(A.startEnding=C.startEnding),C.endEnding&&(A.endEnding=C.endEnding),f.push(A),d=null,p=!1}}else"note"===C.el_type&&(p=!0)}}r.push({header:l,measures:f,hasPickup:g})}return r}}(),e.exports=s},6859:function(e,t,r){var n=r(1592),i=r(6780),a=r(5132),s=r(8905),o=r(1756),c=r(5008),l={};function h(){var e=window.innerWidth;for(var t in l)if(l.hasOwnProperty(t)){var r=l[t];e-=2*r.offsetLeft,r.style.width=e+"px"}}try{window.addEventListener("resize",h),window.addEventListener("orientationChange",h)}catch(e){}function u(e,t,r,n){r.viewportHorizontal?(e.innerHTML='<div class="abcjs-inner"></div>',r.scrollHorizontal?(e.style.overflowX="auto",e.style.overflowY="hidden"):e.style.overflow="hidden",l[e.id]=e,e=e.children[0]):r.viewportVertical?(e.innerHTML='<div class="abcjs-inner scroll-amount"></div>',e.style.overflowX="hidden",e.style.overflowY="auto",e=e.children[0]):e.innerHTML="";var i=new a(e,r);i.engraveABC(t,n),t.engraver=i,(r.viewportVertical||r.viewportHorizontal)&&(e.parentNode.style.width=e.style.width)}function d(e,t,r,n){function a(e){var t=new i;return t.formatting=e.formatting,t.media=e.media,t.version=e.version,t.metaText={},t.lines=[],t}for(var s,o=[],l=0;l<t.lines.length;l++){var h=t.lines[l];s||(s=a(t)),0===l&&(s.metaText.tempo=t.metaText.tempo,s.metaText.title=t.metaText.title,s.metaText.header=t.metaText.header,s.metaText.rhythm=t.metaText.rhythm,s.metaText.origin=t.metaText.origin,s.metaText.composer=t.metaText.composer,s.metaText.author=t.metaText.author,s.metaText.partOrder=t.metaText.partOrder),s.lines.push(h),h.staff&&(o.push(s),s=void 0)}if(s)for(var d=o[o.length-1],f=0;f<s.lines.length;f++)d.lines.push(s.lines[f]);(s=o[o.length-1]).metaText.unalignedWords=t.metaText.unalignedWords,s.metaText.book=t.metaText.book,s.metaText.source=t.metaText.source,s.metaText.discography=t.metaText.discography,s.metaText.notes=t.metaText.notes,s.metaText.transcription=t.metaText.transcription,s.metaText.history=t.metaText.history,s.metaText["abc-copyright"]=t.metaText["abc-copyright"],s.metaText["abc-creator"]=t.metaText["abc-creator"],s.metaText["abc-edited-by"]=t.metaText["abc-edited-by"],s.metaText.footer=t.metaText.footer;var p={};for(var m in r)r.hasOwnProperty(m)&&(p[m]=r[m]);var g=p.paddingtop,v=p.paddingbottom;e.innerHTML="";for(var b=0;b<o.length;b++){var y=document.createElement("div");e.appendChild(y),0===b?(p.paddingtop=g,p.paddingbottom=-20):b===o.length-1?(p.paddingtop=10,p.paddingbottom=v):(p.paddingtop=10,p.paddingbottom=-20),b<o.length-1&&(o[b].formatting=c.clone(o[b].formatting),o[b].formatting.stretchlast=!0),u(y,o[b],p,n),0===b?t.engraver=o[b].engraver:t.engraver.staffgroups?o[b].engraver.staffgroups.length>0&&t.engraver.staffgroups.push(o[b].engraver.staffgroups[0]):t.engraver.staffgroups=o[b].engraver.staffgroups}}e.exports=function(e,t,r,i,c){var l,h={};if(r)for(l in r)r.hasOwnProperty(l)&&(h[l]=r[l]);if(i)for(l in i)i.hasOwnProperty(l)&&("listener"===l?i[l].highlight&&(h.clickListener=i[l].highlight):h[l]=i[l]);if(c)for(l in c)c.hasOwnProperty(l)&&(h[l]=c[l]);return n.renderEngine((function(e,t,r,n){var i=!1;return"*"===e&&(i=!0,(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e)),h.afterParsing&&h.afterParsing(t,r,n),!i&&h.wrap&&h.staffwidth?t=function(e,t,r,n,i){var c=new a(e,i).getMeasureWidths(t),l=o.calcLineWraps(t,c,i);if(l.reParse){var h=new s;h.parse(n,l.revisedParams),t=h.getTune()}return!i.oneSvgPerLine||t.lines.length<2?u(e,t,l.revisedParams,r):d(e,t,l.revisedParams,r),t.explanation=l.explanation,t}(e,t,r,n,h):(i||!h.oneSvgPerLine||t.lines.length<2?u(e,t,h,r):d(e,t,h,r),i&&e.parentNode.removeChild(e),null)}),e,t,h)}},6780:function(e,t,r){var n=r(5008),i=r(8613),a=r(1028),s=r(9716),o=r(351);e.exports=function(){function e(e,t){for(;t<e.length&&null===e[t].left;)t++;return e[t]}this.getBeatLength=function(){var e=this.getMeterFraction(),t=1;return(6===e.num||9===e.num||12===e.num||3===e.num&&8===e.den)&&(t=3),t/e.den},this.getPickupLength=function(){var e=this.getBarLength(),t=function(e,t){for(var r=0,n=0;n<e.length;n++)if(e[n].staff)for(var i=0;i<e[n].staff.length;i++)for(var a=0;a<e[n].staff[i].voices.length;a++)for(var s=e[n].staff[i].voices[a],o=1,c=0;c<s.length;c++){var l=s[c].rest&&"spacer"===s[c].rest.type;if(s[c].startTriplet&&(o=s[c].tripletMultiplier),s[c].duration&&!l&&"tempo"!==s[c].el_type&&(r+=s[c].duration*o),s[c].endTriplet&&(o=1),r>=t&&(r-=t),"bar"===s[c].el_type)return r}return r}(this.lines,e);return t<1e-8||e-t<1e-8?0:t},this.getBarLength=function(){var e=this.getMeterFraction();return e.num/e.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(e){var t;if(e)t=e;else{var r=this.metaText?this.metaText.tempo:null;t=this.getBpm(r)}return t<=0&&(t=1),this.getBeatsPerMeasure()/t*6e4},this.getBeatsPerMeasure=function(){var e=this.getBeatLength();return this.getBarLength()/e},this.getMeter=function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e];if(t.staff)for(var r=0;r<t.staff.length;r++){var n=t.staff[r].meter;if(n)return n}}return{type:"common_time"}},this.getMeterFraction=function(){var e=this.getMeter(),t=4,r=4;return e&&("specified"===e.type?(t=parseInt(e.value[0].num,10),r=parseInt(e.value[0].den,10)):"cut_time"===e.type?(t=2,r=2):"common_time"===e.type&&(t=4,r=4)),this.meter={num:t,den:r},this.meter},this.getKeySignature=function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e];if(t.staff)for(var r=0;r<t.staff.length;r++)if(t.staff[r].key)return t.staff[r].key}return{}},this.getElementFromChar=function(e){for(var t=0;t<this.lines.length;t++){var r=this.lines[t];if(r.staff)for(var n=0;n<r.staff.length;n++)for(var i=r.staff[n],a=0;a<i.voices.length;a++)for(var s=i.voices[a],o=0;o<s.length;o++){var c=s[o];if(c.startChar&&c.endChar&&c.startChar<=e&&c.endChar>e)return c}}return null},this.addElementToEvents=function(e,t,r,i,a,s,o,c,l,h){if(t.hint)return{isTiedState:void 0,duration:0};var u=t.durationClass?t.durationClass:t.duration;if(t.abcelem.rest&&"spacer"===t.abcelem.rest.type&&(u=0),u>0){for(var d=[],f=0;f<t.elemset.length;f++)null!==t.elemset[f]&&d.push(t.elemset[f]);var p=t.startTie;if(void 0!==l)e["event"+l].elements.push(d),h&&(e["event"+r]||(e["event"+r]={type:"event",milliseconds:r,line:s,measureNumber:o,top:i,height:a,left:null,width:0,elements:[],startChar:null,endChar:null,startCharArray:[],endCharArray:[]}),e["event"+r].measureStart=!0,h=!1),p||(l=void 0);else{if(e["event"+r]){if(e["event"+r].left?e["event"+r].left=Math.min(e["event"+r].left,t.x):e["event"+r].left=t.x,e["event"+r].elements.push(d),e["event"+r].startCharArray.push(t.abcelem.startChar),e["event"+r].endCharArray.push(t.abcelem.endChar),null===e["event"+r].startChar&&(e["event"+r].startChar=t.abcelem.startChar),null===e["event"+r].endChar&&(e["event"+r].endChar=t.abcelem.endChar),t.abcelem.midiPitches&&t.abcelem.midiPitches.length)for(e["event"+r].midiPitches||(e["event"+r].midiPitches=[]),f=0;f<t.abcelem.midiPitches.length;f++)e["event"+r].midiPitches.push(t.abcelem.midiPitches[f]);if(t.abcelem.midiGraceNotePitches&&t.abcelem.midiGraceNotePitches.length){e["event"+r].midiGraceNotePitches||(e["event"+r].midiGraceNotePitches=[]);for(var m=0;m<t.abcelem.midiGraceNotePitches.length;m++)e["event"+r].midiGraceNotePitches.push(t.abcelem.midiGraceNotePitches[m])}}else e["event"+r]={type:"event",milliseconds:r,line:s,measureNumber:o,top:i,height:a,left:t.x,width:t.w,elements:[d],startChar:t.abcelem.startChar,endChar:t.abcelem.endChar,startCharArray:[t.abcelem.startChar],endCharArray:[t.abcelem.endChar],midiPitches:t.abcelem.midiPitches?n.cloneArray(t.abcelem.midiPitches):[]},t.abcelem.midiGraceNotePitches&&(e["event"+r].midiGraceNotePitches=n.cloneArray(t.abcelem.midiGraceNotePitches));h&&(e["event"+r].measureStart=!0,h=!1),p&&(l=r)}}return{isTiedState:l,duration:u/c,nextIsBar:h||"bar"===t.type}},this.makeVoicesArray=function(){for(var e=[],t=[],r={},n=0;n<this.engraver.staffgroups.length;n++)for(var a=this.engraver.staffgroups[n],s=a.staffs[0],o=s.absoluteY,c=o-s.top*i.STEP,l=a.staffs[a.staffs.length-1],h=(o=l.absoluteY)-l.bottom*i.STEP-c,u=a.voices,d=0;d<u.length;d++){var f=!1;e[d]||(e[d]=[]),void 0===t[d]&&(t[d]=0);for(var p=u[d].children,m=0;m<p.length;m++)"tempo"===p[m].type&&(r[t[d]]=this.getBpm(p[m].abcelem)),e[d].push({top:c,height:h,line:a.line,measureNumber:t[d],elem:p[m]}),"bar"===p[m].type&&f&&t[d]++,"note"!==p[m].type&&"rest"!==p[m].type||(f=!0)}return this.tempoLocations=r,e},this.setupEvents=function(t,r,n,i){i||(i=1);for(var a,s=[],o={},c=t,l=!0,h=this.makeVoicesArray(),u=0,d=0;d<h.length;d++){var f=c,p=Math.round(1e3*f),m=0,g=-1,v=h[d],b=n;r=this.getBeatLength()*b/60;for(var y=-1,w=0;w<v.length;w++){var k=v[w].measureNumber;y!==k&&this.tempoLocations[k]&&(b=this.tempoLocations[k],r=i*this.getBeatLength()*b/60,y=k);var x,T=v[w].elem,C=this.addElementToEvents(o,T,p,v[w].top,v[w].height,v[w].line,v[w].measureNumber,r,a,l);if(a=C.isTiedState,l=C.nextIsBar,f+=C.duration,T.duration>0&&o["event"+p]&&(x="event"+p),p=Math.round(1e3*f),"bar"===T.type){var A=T.abcelem.type,S="bar_right_repeat"===A||"bar_dbl_repeat"===A,_="1"===T.abcelem.startEnding,M="bar_left_repeat"===A||"bar_dbl_repeat"===A||"bar_right_repeat"===A;if(S){w>0&&(o[x].endX=T.x),-1===g&&(g=w);var E=0;y=-1;for(var N=m;N<g;N++){y!==(k=v[N].measureNumber)&&this.tempoLocations[k]&&(b=this.tempoLocations[k],r=i*this.getBeatLength()*b/60,y=k);var B=v[N].elem;a=(C=this.addElementToEvents(o,B,p,v[N].top,v[N].height,v[N].line,v[N].measureNumber,r,a,l)).isTiedState,l=C.nextIsBar,f+=C.duration,E=p,p=Math.round(1e3*f)}o["event"+E]&&(o["event"+E].endX=v[g].elem.x),l=!0,g=-1}_&&(g=w),M&&(m=w)}}u=Math.max(u,p)}return function(e){for(var t,r,n,i,a=e.length-1;a>=0;a--){var s=e[a];"bar"===s.type?(s.top=n,s.nextTop=t,t=n,s.bottom=i,s.nextBottom=r,r=i):"event"===s.type&&(n=s.top,i=s.top+s.height)}}(s=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t.sort((function(e,t){var r=e.milliseconds-t.milliseconds;return 0!==r?r:"bar"===e.type?-1:1}))}(o)),function(t,r){if(!(r.length<1)){for(var n=0;n<r.length-1;n++){var i=r[n],a=e(r,n+1);if(null!==i.left){var s=a&&i.top===a.top?a.left:t[i.line].staffGroup.w;void 0!==i.endX?s>i.left&&(i.endX=Math.min(i.endX,s)):i.endX=s}}var o=r[r.length-1];o.endX=t[o.line].staffGroup.w}}(this.lines,s),s.push({type:"end",milliseconds:u}),this.addUsefulCallbackInfo(s,b*i),s},this.addUsefulCallbackInfo=function(e,t){for(var r=this.millisecondsPerMeasure(t),n=0;n<e.length;n++)e[n].millisecondsPerMeasure=r},this.getBpm=function(e){var t;if(e){t=e.bpm;var r=this.getBeatLength();t=t*(e.duration&&e.duration.length>0?e.duration[0]:r)/r}if(!t){t=180;var n=this.getMeterFraction();n&&3!==n.num&&n.num%3==0&&(t=120)}return t},this.setTiming=function(e,t){if(t=t||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),void(this.noteTimings=[]);var r=this.metaText?this.metaText.tempo:null,n=this.getBpm(r),i=1;e?r&&(i=e/n):e=n;var a=this.getBeatLength(),s=e/60,o=this.getBarLength()/a*t/s;o&&(o-=this.getPickupLength()/a/s);var c=a*s;return this.noteTimings=this.setupEvents(o,c,e,i),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*s):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(e){e||(e={});var t=a(this,e);return s(t,e,this.formatting.percmap)},this.deline=function(e){return o(this.lines,e)}}},351:function(e){function t(e,t){return"abselem"===e?"abselem":t}function r(e,t){e.el_type="meter",e.startChar=-1,e.endChar=-1;for(var r=0;r<t.length;r++)t[r].unshift(e)}function n(e,t){e.el_type="key",e.startChar=-1,e.endChar=-1;for(var r=0;r<t.length;r++)t[r].unshift(e)}function i(e,t){e.el_type="clef",e.startChar=-1,e.endChar=-1;for(var r=0;r<t.length;r++)t[r].unshift(e)}function a(e,t,r){e.el_type="font",e.type=r,e.startChar=-1,e.endChar=-1;for(var n=0;n<t.length;n++)t[n].unshift(e)}function s(e,r){return!e||JSON.stringify(e,t)===JSON.stringify(r,t)}function o(e){for(var t={},r=Object.keys(e),n=0;n<r.length;n++)if("staff"!==r[n])t[r[n]]=e[r[n]];else{t.staff=[];for(var i=0;i<e.staff.length;i++){for(var a={},s=Object.keys(e.staff[i]),o=0;o<s.length;o++)if("voices"!==s[o])a[s[o]]=e.staff[i][s[o]];else{a.voices=[];for(var c=0;c<e.staff[i].voices.length;c++)a.voices.push([].concat(e.staff[i].voices[c]))}t.staff.push(a)}}return t}e.exports=function(e,t){t||(t={});for(var c=!!t.lineBreaks,l=[],h=!1,u=[],d=[],f=[],p=[],m=[],g=[],v=[],b=0;b<e.length;b++){var y=e[b];if(y.staff){if(h&&!y.vskip)for(var w=l[l.length-1],k=0;k<w.staff.length;k++){var x=y.staff[k],T=w.staff[k];if(x&&(s(x.meter,u[k])||(r(x.meter,x.voices),u[k]=x.meter,delete x.meter),s(x.key,d[k])||(n(x.key,x.voices),d[k]=x.key,delete x.key),x.title&&(T.abbrevTitle=x.title),s(x.clef,f[k])||(i(x.clef,x.voices),f[k]=x.clef,delete x.clef),s(x.vocalfont,p[k])||(a(x.vocalfont,x.voices,"vocalfont"),p[k]=x.vocalfont,delete x.vocalfont),s(x.gchordfont,m[k])||(a(x.gchordfont,x.voices,"gchordfont"),m[k]=x.gchordfont,delete x.gchordfont),s(x.tripletfont,g[k])||(a(x.tripletfont,x.voices,"tripletfont"),g[k]=x.tripletfont,delete x.tripletfont),s(x.annotationfont,v[k])||(a(x.annotationfont,x.voices,"annotationfont"),v[k]=x.annotationfont,delete x.annotationfont)),x)for(var C=0;C<T.voices.length;C++){var A=T.voices[C],S=x.voices[C];c&&A.push({el_type:"break"}),S&&(T.voices[C]=A.concat(S))}}else{for(var _=0;_<y.staff.length;_++)d[_]=y.staff[_].key,u[_]=y.staff[_].meter,f[_]=y.staff[_].clef;l.push(o(y))}h=!0}else h=!1,l.push(y)}return l}},2945:function(e){try{if("function"!=typeof window.CustomEvent){var t=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r};t.prototype=window.Event.prototype,window.CustomEvent=t}}catch(e){}var r=function(e){this.textarea=document.getElementById(e),this.initialText=this.textarea.value,this.isDragging=!1};r.prototype.addSelectionListener=function(e){this.textarea.onmousemove=function(t){this.isDragging&&e.fireSelectionChanged()}},r.prototype.addChangeListener=function(e){this.changelistener=e,this.textarea.onkeyup=function(){e.fireChanged()},this.textarea.onmousedown=function(){this.isDragging=!0,e.fireSelectionChanged()},this.textarea.onmouseup=function(){this.isDragging=!1,e.fireChanged()},this.textarea.onchange=function(){e.fireChanged()}},r.prototype.getSelection=function(){return{start:this.textarea.selectionStart,end:this.textarea.selectionEnd}},r.prototype.setSelection=function(e,t){if(this.textarea.setSelectionRange)this.textarea.setSelectionRange(e,t);else if(this.textarea.createTextRange){var r=this.textarea.createTextRange();r.collapse(!0),r.moveEnd("character",t),r.moveStart("character",e),r.select()}this.textarea.focus()},r.prototype.getString=function(){return this.textarea.value},r.prototype.setString=function(e){this.textarea.value=e,this.initialText=this.getString(),this.changelistener&&this.changelistener.fireChanged()},r.prototype.getElem=function(){return this.textarea},e.exports=r},5294:function(e,t,r){var n=r(5008),i=r(3450),a=r(5049),s=r(6859),o=r(2945),c=function(e,t){this.abcjsParams=function(e){var t,r={};if(e.abcjsParams)for(t in e.abcjsParams)e.abcjsParams.hasOwnProperty(t)&&(r[t]=e.abcjsParams[t]);if(e.midi_options)for(t in e.midi_options)e.midi_options.hasOwnProperty(t)&&(r[t]=e.midi_options[t]);if(e.parser_options)for(t in e.parser_options)e.parser_options.hasOwnProperty(t)&&(r[t]=e.parser_options[t]);if(e.render_options)for(t in e.render_options)e.render_options.hasOwnProperty(t)&&(r[t]=e.render_options[t]);return r}(t),t.indicate_changed&&(this.indicate_changed=!0),this.editarea="string"==typeof e?new o(e):e,this.editarea.addSelectionListener(this),this.editarea.addChangeListener(this),t.canvas_id?this.div=t.canvas_id:t.paper_id?this.div=t.paper_id:(this.div=document.createElement("DIV"),this.editarea.getElem().parentNode.insertBefore(this.div,this.editarea.getElem())),"string"==typeof this.div&&(this.div=document.getElementById(this.div)),t.selectionChangeCallback&&(this.selectionChangeCallback=t.selectionChangeCallback),this.clientClickListener=this.abcjsParams.clickListener,this.abcjsParams.clickListener=this.highlight.bind(this),t.synth&&a()&&(this.synth={el:t.synth.el,cursorControl:t.synth.cursorControl,options:t.synth.options}),t.generate_midi&&(this.generate_midi=t.generate_midi,this.abcjsParams.generateDownload&&("string"==typeof t.midi_download_id?this.downloadMidi=document.getElementById(t.midi_download_id):t.midi_download_id&&(this.downloadMidi=t.midi_download_id)),!1!==this.abcjsParams.generateInline&&("string"==typeof t.midi_id?this.inlineMidi=document.getElementById(t.midi_id):t.midi_id&&(this.inlineMidi=t.midi_id))),t.warnings_id?"string"==typeof t.warnings_id?this.warningsdiv=document.getElementById(t.warnings_id):this.warningsdiv=t.warnings_id:t.generate_warnings&&(this.warningsdiv=document.createElement("div"),this.div.parentNode.insertBefore(this.warningsdiv,this.div)),this.onchangeCallback=t.onchange,this.currentAbc="",this.tunes=[],this.bReentry=!1,this.parseABC(),this.modelChanged(),this.addClassName=function(e,t){return function(e,t){var r=e.className;return r.length>0&&(r===t||new RegExp("(^|\\s)"+t+"(\\s|$)").test(r))}(e,t)||(e.className+=(e.className?" ":"")+t),e},this.removeClassName=function(e,t){return e.className=n.strip(e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ")),e},this.setReadOnly=function(e){var t="abc_textarea_readonly",r=this.editarea.getElem();e?(r.setAttribute("readonly","yes"),this.addClassName(r,t)):(r.removeAttribute("readonly"),this.removeClassName(r,t))}};c.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var e=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(e)}if(this.synth){var t=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new i,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],t,this.synth.options)}},c.prototype.modelChanged=function(){this.bReentry||(this.bReentry=!0,this.timerId=null,this.synth&&this.synth.synthControl&&this.synth.synthControl.disable(!0),this.tunes=s(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi(),this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("<br />"):"No errors"),this.updateSelection(),this.bReentry=!1)},c.prototype.paramChanged=function(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this.abcjsParams[t]=e[t]);this.currentAbc="",this.fireChanged()},c.prototype.synthParamChanged=function(e){if(this.synth.options={},e)for(var t in e)e.hasOwnProperty(t)&&(this.synth.options[t]=e[t]);this.currentAbc="",this.fireChanged()},c.prototype.parseABC=function(){var e=this.editarea.getString();return e===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=e,!0)},c.prototype.updateSelection=function(){var e=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(e.start,e.end)}catch(e){}this.selectionChangeCallback&&this.selectionChangeCallback(e.start,e.end)},c.prototype.fireSelectionChanged=function(){this.updateSelection()},c.prototype.setDirtyStyle=function(e){if(void 0!==this.indicate_changed){var t,r,i="abc_textarea_dirty",a=this.editarea.getElem();e?function(e,t){var r=e.className;return r.length>0&&(r===t||new RegExp("(^|\\s)"+t+"(\\s|$)").test(r))}(t=a,r=i)||(t.className+=(t.className?" ":"")+r):function(e,t){e.className=n.strip(e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," "))}(a,i)}},c.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var e=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout((function(){e.modelChanged()}),300);var t=this.isDirty();this.wasDirty!==t&&(this.wasDirty=t,this.setDirtyStyle(t)),this.onchangeCallback&&this.onchangeCallback(this)}},c.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)},c.prototype.isDirty=function(){return void 0!==this.indicate_changed&&this.editarea.initialText!==this.editarea.getString()},c.prototype.highlight=function(e,t,r,n,i,a){this.editarea.setSelection(e.startChar,e.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(e.startChar,e.endChar),this.clientClickListener&&this.clientClickListener(e,t,r,n,i,a)},c.prototype.pause=function(e){this.bIsPaused=e,e||this.fireChanged()},c.prototype.millisecondsPerMeasure=function(){return this.synth.synthControl.visualObj.millisecondsPerMeasure()},c.prototype.pauseMidi=function(e){this.midiPause=e,e||this.redrawMidi()},e.exports=c},3284:function(e,t,r){var n,i=r(9991);!function(){"use strict";function e(e,t,r){for(var n=Object.keys(t),i=0;i<n.length;i++)n[i]=parseFloat(n[i]);n.sort((function(e,t){return e-t}));for(var a=0,s=0;s<n.length;s++){var o=t[n[s]];if(n[s]>a){var c=(n[s]-a)*r;e.addRest(c),a=n[s]}for(var l=0;l<o.length;l++){var h=o[l];h.volume?e.startNote(h.pitch,h.volume,h.cents):e.endNote(h.pitch)}}}n=function(t,r){void 0===r&&(r={});var n=t.setUpAudio(r),a=i(),s=t.metaText?t.metaText.title:void 0;s&&s.length>128&&(s=s.substring(0,124)+"...");var o=t.getKeySignature(),c=t.getMeterFraction();a.setGlobalInfo(n.tempo,s,o,c);for(var l=0;l<n.tracks.length;l++){a.startTrack();for(var h={},u=0;u<n.tracks[l].length;u++){var d=n.tracks[l][u];switch(d.cmd){case"text":a.setText(d.type,d.text);break;case"program":var f=0;r.pan&&r.pan.length>l&&(f=r.pan[l]),a.setChannel(d.channel,f),a.setInstrument(d.instrument);break;case"note":var p=d.start,m=p+d.duration;h[p]||(h[p]=[]),h[p].push({pitch:d.pitch,volume:d.volume,cents:d.cents}),h[m]||(h[m]=[]),h[m].push({pitch:d.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+d.cmd)}}e(a,h,1920),a.endTrack()}return a.getData()}}(),e.exports=n},5008:function(e){var t={clone:function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},cloneArray:function(e){for(var r=[],n=0;n<e.length;n++)r.push(t.clone(e[n]));return r},cloneHashOfHash:function(e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]=t.clone(e[n]));return r},cloneHashOfArrayOfHash:function(e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]=t.cloneArray(e[n]));return r},gsub:function(e,t,r){return e.split(t).join(r)},strip:function(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")},startsWith:function(e,t){return 0===e.indexOf(t)},endsWith:function(e,t){var r=e.length-t.length;return r>=0&&e.lastIndexOf(t)===r},each:function(e,t,r){for(var n=0,i=e.length;n<i;n++)t.apply(r,[e[n],n])},last:function(e){return 0===e.length?null:e[e.length-1]},compact:function(e){for(var t=[],r=0;r<e.length;r++)e[r]&&t.push(e[r]);return t},detect:function(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return!0;return!1}};try{[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})}))}catch(e){}e.exports=t},8905:function(e,t,r){var n=r(5008),i=r(8360),a=r(9928),s=r(6476),o=r(1881),c=r(1756),l=r(6780),h=r(575);e.exports=function(){"use strict";var e,t=new l,r=new h(t),u="",d="";function f(e,t,r){e.positioning||(e.positioning={}),e.positioning[t]=r}function p(e,t,r){e.fonts||(e.fonts={}),e.fonts[t]=r}this.getTune=function(){var e={formatting:t.formatting,lines:t.lines,media:t.media,metaText:t.metaText,version:t.version,addElementToEvents:t.addElementToEvents,addUsefulCallbackInfo:t.addUsefulCallbackInfo,getTotalTime:t.getTotalTime,getTotalBeats:t.getTotalBeats,getBarLength:t.getBarLength,getBeatLength:t.getBeatLength,getBeatsPerMeasure:t.getBeatsPerMeasure,getBpm:t.getBpm,getMeter:t.getMeter,getMeterFraction:t.getMeterFraction,getPickupLength:t.getPickupLength,getKeySignature:t.getKeySignature,getElementFromChar:t.getElementFromChar,makeVoicesArray:t.makeVoicesArray,millisecondsPerMeasure:t.millisecondsPerMeasure,setupEvents:t.setupEvents,setTiming:t.setTiming,setUpAudio:t.setUpAudio,deline:t.deline};return t.lineBreaks&&(e.lineBreaks=t.lineBreaks),t.visualTranspose&&(e.visualTranspose=t.visualTranspose),e};var m,g,v={reset:function(){for(var e in this)this.hasOwnProperty(e)&&"function"!=typeof this[e]&&delete this[e];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.ignoredDecorations=[],this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(e,t){return this[e].decoration!==t[e].decoration||this[e].face!==t[e].face||this[e].size!==t[e].size||this[e].style!==t[e].style||this[e].weight!==t[e].weight},addFormattingOptions:function(e,t,r){"note"===r?("auto"!==this.vocalPosition&&f(e,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("annotationfont",t)&&p(e,"annotationfont",this.annotationfont),this.differentFont("gchordfont",t)&&p(e,"gchordfont",this.gchordfont),this.differentFont("vocalfont",t)&&p(e,"vocalfont",this.vocalfont),this.differentFont("tripletfont",t)&&p(e,"tripletfont",this.tripletfont)):"bar"===r&&("auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("measurefont",t)&&p(e,"measurefont",this.measurefont),this.differentFont("repeatfont",t)&&p(e,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var e=0;e<this.inTie.length;e++){this.endingHoldOver.inTie.push([]);for(var t=0;t<this.inTie[e].length;t++)this.endingHoldOver.inTie[e].push(this.inTie[e][t])}for(var r in this.inTieChord)this.inTieChord.hasOwnProperty(r)&&(this.endingHoldOver.inTieChord[r]=this.inTieChord[r])},restoreStartEndingHoldOvers:function(){if(this.endingHoldOver.inTie){this.inTie=[],this.inTieChord={};for(var e=0;e<this.endingHoldOver.inTie.length;e++){this.inTie.push([]);for(var t=0;t<this.endingHoldOver.inTie[e].length;t++)this.inTie[e].push(this.endingHoldOver.inTie[e][t])}for(var r in this.endingHoldOver.inTieChord)this.endingHoldOver.inTieChord.hasOwnProperty(r)&&(this.inTieChord[r]=this.endingHoldOver.inTieChord[r])}}},b=function(e){var t=n.gsub(e,""," ");return t=n.gsub(t,"&","&amp;"),t=n.gsub(t,"<","&lt;"),n.gsub(t,">","&gt;")},y=function(t,r,n){r||(r=" ");var i=r.charAt(n);" "===i&&(i="SPACE");var a,s=b(r.substring(0,n))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+i+"</span>"+b(r.substring(n+1));!function(e){v.warnings||(v.warnings=[]),v.warnings.push(e)}("Music Line:"+e.lineIndex+":"+(n+1)+": "+t+":  "+s),a={message:t,line:r,startChar:v.iChar+n,column:n},v.warningObjects||(v.warningObjects=[]),v.warningObjects.push(a)};this.getWarnings=function(){return v.warnings},this.getWarningObjects=function(){return v.warningObjects};var w=function(t,r){if(r.indexOf("")>=0)u+=r;else if(r=u+r,u="",t){"-"!==(r=n.strip(r)).charAt(r.length-1)&&(r+=" ");for(var i=[],a=0,s=!1,o=function(t){var o=n.strip(r.substring(a,t));if(a=t+1,o.length>0){s&&(o=n.gsub(o,"~"," "));var c=r.charAt(t);return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c<r.length;c++)switch(r.charAt(c)){case" ":case"":o(c);break;case"-":!o(c)&&i.length>0&&(n.last(i).divider="-",i.push({skip:!0,to:"next"}));break;case"_":o(c),i.push({skip:!0,to:"slur"});break;case"*":o(c),i.push({skip:!0,to:"next"});break;case"|":o(c),i.push({skip:!0,to:"bar"});break;case"~":s=!0}n.each(t,(function(e){if(0!==i.length)if(i[0].skip){switch(i[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&i.shift();break;case"bar":"bar"===e.el_type&&i.shift()}"bar"!==e.el_type&&(void 0===e.lyric?e.lyric=[{syllable:"",divider:" "}]:e.lyric.push({syllable:"",divider:" "}))}else if("note"===e.el_type&&void 0===e.rest){var t=i.shift();t.syllable&&(t.syllable=t.syllable.replace(/ +/g," ")),void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add words before the first line of music",t,0)},k=function(t,r){if(r.indexOf("")>=0)d+=r;else if(r=d+r,d="",t){"-"!==(r=n.strip(r)).charAt(r.length-1)&&(r+=" ");for(var i=[],a=0,s=!1,o=function(t){var o=n.strip(r.substring(a,t));if(a=t+1,o.length>0){s&&(o=n.gsub(o,"~"," "));var c=r.charAt(t);return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c<r.length;c++)switch(r.charAt(c)){case" ":case"":o(c);break;case"-":!o(c)&&i.length>0&&(n.last(i).divider="-",i.push({skip:!0,to:"next"}));break;case"_":o(c),i.push({skip:!0,to:"slur"});break;case"*":o(c),i.push({skip:!0,to:"next"});break;case"|":o(c),i.push({skip:!0,to:"bar"});break;case"~":s=!0}n.each(t,(function(e){if(0!==i.length)if(i[0].skip)switch(i[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&i.shift();break;case"bar":"bar"===e.el_type&&i.shift()}else if("note"===e.el_type&&void 0===e.rest){var t=i.shift();void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add symbols before the first line of music",t,0)},x=function(e){if(n.startsWith(e,"%%")){var t=i.addDirective(e.substring(2));t&&y(t,e,2)}else{var a=e.indexOf("%");if(a>=0&&(e=e.substring(0,a)),0!==(e=e.replace(/\s+$/,"")).length)if(u)w(r.getCurrentVoice(),e.substring(2));else if(d)k(r.getCurrentVoice(),e.substring(2));else if(e.length<2||":"!==e.charAt(1)||g.lineContinuation)g.parseMusic(e);else{var s=m.parseHeader(e);s.regular&&g.parseMusic(e),s.newline&&g.startNewLine(),s.words&&w(r.getCurrentVoice(),e.substring(2)),s.symbols&&k(r.getCurrentVoice(),e.substring(2))}}};function T(e,t){e.push({el_type:"hint"});for(var r=0;r<t.length;r++){var i=t[r],a=n.clone(i);if(e.push(a),"bar"===i.el_type)return}}function C(e,t){for(var r=0;r<e.length;r++){var n=e[r],i=t[r];if(i)for(var a=0;a<i.voices.length;a++){var s=i.voices[a],o=n.voices[a];o&&T(o,s)}}}this.parse=function(l,h,f){h||(h={}),f||(f=0),r.reset();var p=(l=l.replace(/\r\n?/g,"\n")+"\n").split("\n\\");if(p.length>1){for(var b=1;b<p.length;b++)for(;p[b].length>0&&"\n"!==p[b][0];)p[b]=p[b].substr(1),p[b-1]+=" ";l=p.join("  ")}var T=(l=l.replace(/\\([ \t]*)(%.*)*\n/g,(function(e,t,r){return t+""+(r?Array(r.length+1).join(" "):"")+"\n"}))).split("\n");0===n.last(T).length&&T.pop(),e=new o(T,v),m=new a(e,y,v,t,r),g=new s(e,y,v,t,r,m),h.print&&(t.media="print"),v.reset(),v.iChar=f,h.visualTranspose?(v.globalTranspose=parseInt(h.visualTranspose),0===v.globalTranspose?v.globalTranspose=void 0:r.setVisualTranspose(h.visualTranspose)):v.globalTranspose=void 0,h.lineBreaks&&(v.lineBreaks=h.lineBreaks),m.reset(e,y,v,t);try{h.format&&i.globalFormatting(h.format);for(var A=e.nextLine();A;){if(h.header_only&&!1===v.is_in_header)throw"normal_abort";if(h.stop_on_warning&&v.warnings)throw"normal_abort";var S=v.is_in_header;x(A),S&&!v.is_in_header&&(r.setRunningFont("annotationfont",v.annotationfont),r.setRunningFont("gchordfont",v.gchordfont),r.setRunningFont("tripletfont",v.tripletfont),r.setRunningFont("vocalfont",v.vocalfont)),A=e.nextLine()}u&&w(r.getCurrentVoice(),""),d&&k(r.getCurrentVoice(),""),v.openSlurs=r.cleanUp(v.barsperstaff,v.staffnonote,v.openSlurs)}catch(e){if("normal_abort"!==e)throw e}var _=792,M=612;switch(v.papersize){case"legal":_=1008,M=612;break;case"A4":_=842.4,M=597.6}if(v.landscape){var E=_;_=M,M=E}t.formatting.pagewidth||(t.formatting.pagewidth=M),t.formatting.pageheight||(t.formatting.pageheight=_),h.hint_measures&&function(){for(var e=0;e<t.lines.length;e++){var r=t.lines[e].staff;if(r){for(var n=e+1;n<t.lines.length&&void 0===t.lines[n].staff;)n++;n<t.lines.length&&C(r,t.lines[n].staff)}}}(),c.wrapLines(t,v.lineBreaks)}}},9565:function(e,t,r){var n=r(5008);e.exports=function(e){"use strict";for(var t="",r=(e=n.strip(e)).split("\nX:"),i=1;i<r.length;i++)r[i]="X:"+r[i];var a=0,s=[];if(n.each(r,(function(e){s.push({abc:e,startPos:a}),a+=e.length+1})),s.length>1&&!n.startsWith(s[0].abc,"X:")){var o=s.shift().abc.split("\n");n.each(o,(function(e){n.startsWith(e,"%%")&&(t+=e+"\n")}))}var c=t;return n.each(s,(function(e){var r=e.abc.indexOf("\n\n");r>0&&(e.abc=e.abc.substring(0,r)),e.pure=e.abc,e.abc=t+e.abc,e.title="";var i=e.pure.split("T:");i.length>1&&(i=i[1].split("\n"),e.title=n.strip(i[0]));var a=e.pure.substring(2,e.pure.indexOf("\n"));e.id=n.strip(a)})),{header:c,tunes:s}}},8360:function(e,t,r){var n=r(5008),i={};!function(){"use strict";var e,t,r,a,s;i.initialize=function(n,i,o,c,l){e=n,t=i,a=c,s=l,(r=o).annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},r.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},r.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},r.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},r.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},a.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},a.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},a.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},a.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},a.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},a.formatting.annotationfont=r.annotationfont,a.formatting.gchordfont=r.gchordfont,a.formatting.historyfont=r.historyfont,a.formatting.infofont=r.infofont,a.formatting.measurefont=r.measurefont,a.formatting.partsfont=r.partsfont,a.formatting.repeatfont=r.repeatfont,a.formatting.textfont=r.textfont,a.formatting.tripletfont=r.tripletfont,a.formatting.vocalfont=r.vocalfont,a.formatting.wordsfont=r.wordsfont};var o={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},c=function(e,r,n,i,a){function s(){var s=parseInt(e[0].token);return e.shift(),r?0===e.length?{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s}:1===e.length&&"box"===e[0].token&&o[a]?{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s,box:!0}:(t("Extra parameters in font definition.",n,i),{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s}):(t("Can't set just the size of the font since there is no default value.",n,i),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:s})}if("*"===e[0].token){if(e.shift(),"number"===e[0].type)return s();t("Expected font size number after *.",n,i)}if("number"===e[0].type)return s();for(var c,l=[],h="normal",u="normal",d="none",f=!1,p="face",m=!1;e.length;){var g=e.shift(),v=g.token.toLowerCase();switch(p){case"face":m||"utf"!==v&&"number"!==g.type&&"bold"!==v&&"italic"!==v&&"underline"!==v&&"box"!==v?l.length>0&&"-"===g.token?(m=!0,l[l.length-1]=l[l.length-1]+g.token):m?(m=!1,l[l.length-1]=l[l.length-1]+g.token):l.push(g.token):"number"===g.type?(c?t("Font size specified twice in font definition.",n,i):c=g.token,p="modifier"):"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[a]?f=!0:t('This font style doesn\'t support "box"',n,i),p="finished"):"utf"===v?(g=e.shift(),p="size"):t("Unknown parameter "+g.token+" in font definition.",n,i);break;case"size":"number"===g.type?c?t("Font size specified twice in font definition.",n,i):c=g.token:t("Expected font size in font definition.",n,i),p="modifier";break;case"modifier":"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[a]?f=!0:t('This font style doesn\'t support "box"',n,i),p="finished"):t("Unknown parameter "+g.token+" in font definition.",n,i);break;case"finished":t('Extra characters found after "box" in font definition.',n,i)}}void 0===c?r?c=r.size:(t("Must specify the size of the font since there is no default value.",n,i),c=12):c=parseFloat(c),""===(l=l.join(" "))&&(r?l=r.face:(t("Must specify the name of the font since there is no default value.",n,i),l="sans-serif"));var b=function(e){switch(e){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}}(l),y={};return b?(y.face=b.face,y.weight=b.weight,y.style=b.style,y.decoration=b.decoration,y.size=c,f&&(y.box=!0),y):(y.face=l,y.weight=h,y.style=u,y.decoration=d,y.size=c,f&&(y.box=!0),y)},l=function(e,t,n){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(r[e]=c(t,r[e],n,0,e),r.is_in_header&&(a.formatting[e]=r[e]),null)},h=function(e,t){var r="";n.each(t,(function(e){r+=e.token}));var i=parseFloat(r);if(isNaN(i)||0===i)return'Directive "'+e+'" requires a number as a parameter.';a.formatting.scale=i},u=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],d=function(e,t,n,i,a){if(1!==n.length||"number"!==n[0].type)return'Directive "'+t+'" requires a number as a parameter.';var s=n[0].intt;return void 0!==i&&s<i?'Directive "'+t+'" requires a number greater than or equal to '+i+" as a parameter.":void 0!==a&&s>a?'Directive "'+t+'" requires a number less than or equal to '+a+" as a parameter.":(r[e]=s,null)},f=function(e,t,n){if(1===n.length&&("true"===n[0].token||"false"===n[0].token))return r[e]="true"===n[0].token,null;var i=d(e,t,n,0,1);return null!==i?i:(r[e]=1===r[e],null)},p=function(e,t,n,i){if(1!==n.length)return'Directive "'+t+'" requires one of [ '+i.join(", ")+" ] as a parameter.";for(var a=n[0].token,s=!1,o=0;!s&&o<i.length;o++)i[o]===a&&(s=!0);return s?(r[e]=a,null):'Directive "'+t+'" requires one of [ '+i.join(", ")+" ] as a parameter."},m=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],g=["gchord","ptstress","beatstring"],v=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc"],b=["program"],y=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],w=["beat"],k=["drone"],x=["portamento"],T=["expand","grace","trim"],C=["drum","chordname"];i.parseFontChangeLine=function(e){var t=e.split("$");if(t.length>1&&r.setfont){for(var n=[{text:t[0]}],i=1;i<t.length;i++)"0"===t[i].charAt(0)?n.push({text:t[i].substring(1)}):"1"===t[i].charAt(0)&&r.setfont[1]?n.push({font:r.setfont[1],text:t[i].substring(1)}):"2"===t[i].charAt(0)&&r.setfont[2]?n.push({font:r.setfont[2],text:t[i].substring(1)}):"3"===t[i].charAt(0)&&r.setfont[3]?n.push({font:r.setfont[3],text:t[i].substring(1)}):"4"===t[i].charAt(0)&&r.setfont[4]?n.push({font:r.setfont[4],text:t[i].substring(1)}):n[n.length-1].text+="$"+t[i];if(n.length>1)return n}return e};var A=["auto","above","below","hidden"];function S(e){if(0===e.length)return{value:1};if(1===e.length)if("number"===e[0].type){if(e[0].floatt>=0||e[0].floatt<=1)return{value:e[0].floatt}}else{if("false"===e[0].token)return{value:0};if("true"===e[0].token)return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+e[0].token+")"}}i.addDirective=function(o){var _=e.tokenize(o,0,o.length);if(0===_.length||"alpha"!==_[0].type)return null;var M=o.substring(o.indexOf(_[0].token)+_[0].token.length);M=e.stripComment(M);var E,N=_.shift().token.toLowerCase(),B="";switch(N){case"bagpipes":a.formatting.bagpipes=!0;break;case"flatbeams":a.formatting.flatbeams=!0;break;case"landscape":r.landscape=!0;break;case"papersize":r.papersize=M;break;case"graceslurs":if(1!==_.length)return"Directive graceslurs requires one parameter: 0 or 1";if("0"===_[0].token||"false"===_[0].token)a.formatting.graceSlurs=!1;else{if("1"!==_[0].token&&"true"!==_[0].token)return"Directive graceslurs requires one parameter: 0 or 1 (received "+_[0].token+")";a.formatting.graceSlurs=!0}break;case"stretchlast":var P=S(_);if(void 0!==P.value&&(a.formatting.stretchlast=P.value),P.error)return P.error;break;case"titlecaps":r.titlecaps=!0;break;case"titleleft":a.formatting.titleleft=!0;break;case"measurebox":a.formatting.measurebox=!0;break;case"vocal":return p("vocalPosition",N,_,A);case"dynamic":return p("dynamicPosition",N,_,A);case"gchord":return p("chordPosition",N,_,A);case"ornament":return p("ornamentPosition",N,_,A);case"volume":return p("volumePosition",N,_,A);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return function(t,r){var n=e.getMeasurement(r);return 0===n.used||0!==r.length?'Directive "'+t+'" requires a measurement as a parameter.':(a.formatting[t]=n.value,null)}(N,_);case"voicescale":if(1!==_.length||"number"!==_[0].type)return"voicescale requires one float as a parameter";var L=_.shift();return r.currentVoice&&(r.currentVoice.scale=L.floatt,s.changeVoiceScale(r.currentVoice.scale)),null;case"vskip":var H=Math.round(function(t,r){var n=e.getMeasurement(r);return 0===n.used||0!==r.length?{error:'Directive "'+t+'" requires a measurement as a parameter.'}:n.value}(N,_));return H.error?H.error:(s.addSpacing(H),null);case"scale":h(N,_);break;case"sep":if(0===_.length)s.addSeparator(14,14,85);else{var O=e.getMeasurement(_);if(0===O.used)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var z=O.value;if(0===(O=e.getMeasurement(_)).used)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var D=O.value;if(0===(O=e.getMeasurement(_)).used||0!==_.length)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var I=O.value;s.addSeparator(z,D,I)}break;case"barsperstaff":if(null!==(B=d("barsperstaff",N,_)))return B;break;case"staffnonote":if(1!==_.length)return"Directive staffnonote requires one parameter: 0 or 1";if("0"===_[0].token)r.staffnonote=!0;else{if("1"!==_[0].token)return"Directive staffnonote requires one parameter: 0 or 1 (received "+_[0].token+")";r.staffnonote=!1}break;case"printtempo":if(null!==(B=f("printTempo",N,_)))return B;break;case"partsbox":if(null!==(B=f("partsBox",N,_)))return B;r.partsfont.box=r.partsBox;break;case"freegchord":if(null!==(B=f("freegchord",N,_)))return B;break;case"measurenb":case"barnumbers":if(null!==(B=d("barNumbers",N,_)))return B;break;case"setbarnb":if(1!==_.length||"number"!==_[0].type)return"Directive setbarnb requires a number as a parameter.";r.currBarNumber=s.setBarNumberImmediate(_[0].intt);break;case"begintext":var F="";for(E=e.nextLine();E&&0!==E.indexOf("%%endtext");)n.startsWith(E,"%%")?F+=E.substring(2)+"\n":F+=E+"\n",E=e.nextLine();s.addText(F);break;case"continueall":r.continueall=!0;break;case"beginps":for(E=e.nextLine();E&&0!==E.indexOf("%%endps");)e.nextLine();t("Postscript ignored",o,0);break;case"deco":M.length>0&&r.ignoredDecorations.push(M.substring(0,M.indexOf(" "))),t("Decoration redefinition ignored",o,0);break;case"text":var j=e.translateString(M);s.addText(i.parseFontChangeLine(j));break;case"center":var V=e.translateString(M);s.addCentered(i.parseFontChangeLine(V));break;case"font":break;case"setfont":var Y=e.tokenize(M,0,M.length);if(Y.length>=4&&"-"===Y[0].token&&"number"===Y[1].type){var q=parseInt(Y[1].token);q>=1&&q<=4&&(r.setfont||(r.setfont=[]),Y.shift(),Y.shift(),r.setfont[q]=c(Y,r.setfont[q],o,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return l(N,_,o);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return function(e,t,r){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(a.formatting[e]=c(t,a.formatting[e],r,0,e),null)}(N,_,o);case"barlabelfont":case"barnumberfont":case"barnumfont":return l("measurefont",_,o);case"staves":case"score":r.score_is_present=!0;for(var G,W=function(e,t,i,a,s){(t||0===r.staves.length)&&r.staves.push({index:r.staves.length,numVoices:0});var o=n.last(r.staves);void 0!==i&&void 0===o.bracket&&(o.bracket=i),void 0!==a&&void 0===o.brace&&(o.brace=a),s&&(o.connectBarLines="end"),void 0===r.voices[e]&&(r.voices[e]={staffNum:o.index,index:o.numVoices},o.numVoices++)},R=!1,X=!1,U=!1,K=!1,Q=!1,$=!1,J=!1,Z=function(){if(J=!0,G){var e="start";G.staffNum>0&&("start"!==r.staves[G.staffNum-1].connectBarLines&&"continue"!==r.staves[G.staffNum-1].connectBarLines||(e="continue")),r.staves[G.staffNum].connectBarLines=e}};_.length;){var ee=_.shift();switch(ee.token){case"(":R?t("Can't nest parenthesis in %%score",o,ee.start):(R=!0,K=!0);break;case")":!R||K?t("Unexpected close parenthesis in %%score",o,ee.start):R=!1;break;case"[":X?t("Can't nest brackets in %%score",o,ee.start):(X=!0,Q=!0);break;case"]":!X||Q?t("Unexpected close bracket in %%score",o,ee.start):(X=!1,r.staves[G.staffNum].bracket="end");break;case"{":U?t("Can't nest braces in %%score",o,ee.start):(U=!0,$=!0);break;case"}":!U||$?t("Unexpected close brace in %%score",o,ee.start):(U=!1,r.staves[G.staffNum].brace="end");break;case"|":Z();break;default:for(var te="";("alpha"===ee.type||"number"===ee.type)&&(te+=ee.token,ee.continueId);)ee=_.shift();W(te,!R||K,Q?"start":X?"continue":void 0,$?"start":U?"continue":void 0,J),K=!1,Q=!1,$=!1,J=!1,G=r.voices[te],"staves"===N&&Z()}}break;case"newpage":var re=e.getInt(M);s.addNewPage(0===re.digits?-1:re.value);break;case"abc":var ne=M.split(" ");switch(ne[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var ie=ne.shift();s.addMetaText(N+ie,ne.join(" "));break;default:return"Unknown directive: "+N+ne[0]}break;case"header":case"footer":var ae=e.getMeat(M,0,M.length);'"'===(ae=M.substring(ae.start,ae.end)).charAt(0)&&'"'===ae.charAt(ae.length-1)&&(ae=ae.substring(1,ae.length-1));var se=ae.split("\t"),oe={};oe=1===se.length?{left:"",center:se[0],right:""}:2===se.length?{left:se[0],center:se[1],right:""}:{left:se[0],center:se[1],right:se[2]},se.length>3&&t("Too many tabs in "+N+": "+se.length+" found.",M,0),s.addMetaTextObj(N,oe);break;case"midi":var ce=e.tokenize(M,0,M.length,!0);ce.length>0&&"="===ce[0].token&&ce.shift(),0===ce.length?t("Expected midi command",M,0):function(e,r,n){var i=e.shift().token,a=[];if(m.indexOf(i)>=0)0!==e.length&&t("Unexpected parameter in MIDI "+i,n,0);else if(g.indexOf(i)>=0)1!==e.length?t("Expected one parameter in MIDI "+i,n,0):a.push(e[0].token);else if(v.indexOf(i)>=0)1!==e.length?t("Expected one parameter in MIDI "+i,n,0):"number"!==e[0].type?t("Expected one integer parameter in MIDI "+i,n,0):a.push(e[0].intt);else if(b.indexOf(i)>=0)1!==e.length&&2!==e.length?t("Expected one or two parameters in MIDI "+i,n,0):"number"!==e[0].type||2===e.length&&"number"!==e[1].type?t("Expected integer parameter in MIDI "+i,n,0):(a.push(e[0].intt),2===e.length&&a.push(e[1].intt));else if(y.indexOf(i)>=0)2!==e.length?t("Expected two parameters in MIDI "+i,n,0):"number"!==e[0].type||"number"!==e[1].type?t("Expected two integer parameters in MIDI "+i,n,0):(a.push(e[0].intt),a.push(e[1].intt));else if(x.indexOf(i)>=0)2!==e.length?t("Expected two parameters in MIDI "+i,n,0):"alpha"!==e[0].type||"number"!==e[1].type?t("Expected one string and one integer parameters in MIDI "+i,n,0):(a.push(e[0].token),a.push(e[1].intt));else if("drummap"===i)2===e.length&&"alpha"===e[0].type&&"number"===e[1].type?(r.formatting||(r.formatting={}),r.formatting.midi||(r.formatting.midi={}),r.formatting.midi.drummap||(r.formatting.midi.drummap={}),r.formatting.midi.drummap[e[0].token]=e[1].intt,a=r.formatting.midi.drummap):3===e.length&&"punct"===e[0].type&&"alpha"===e[1].type&&"number"===e[2].type?(r.formatting||(r.formatting={}),r.formatting.midi||(r.formatting.midi={}),r.formatting.midi.drummap||(r.formatting.midi.drummap={}),r.formatting.midi.drummap[e[0].token+e[1].token]=e[2].intt,a=r.formatting.midi.drummap):t("Expected one note name and one integer parameter in MIDI "+i,n,0);else if(T.indexOf(i)>=0)3!==e.length||"number"!==e[0].type||"/"!==e[1].token||"number"!==e[2].type?t("Expected fraction parameter in MIDI "+i,n,0):(a.push(e[0].intt),a.push(e[2].intt));else if(w.indexOf(i)>=0)4!==e.length?t("Expected four parameters in MIDI "+i,n,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type?t("Expected four integer parameters in MIDI "+i,n,0):(a.push(e[0].intt),a.push(e[1].intt),a.push(e[2].intt),a.push(e[3].intt));else if(k.indexOf(i)>=0)5!==e.length?t("Expected five parameters in MIDI "+i,n,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type||"number"!==e[4].type?t("Expected five integer parameters in MIDI "+i,n,0):(a.push(e[0].intt),a.push(e[1].intt),a.push(e[2].intt),a.push(e[3].intt),a.push(e[4].intt));else if(b.indexOf(i)>=0)1!==e.length||4!==e.length?t("Expected one or two parameters in MIDI "+i,n,0):"number"!==e[0].type?t("Expected integer parameter in MIDI "+i,n,0):4===e.length?("octave"!==e[1].token&&t("Expected octave parameter in MIDI "+i,n,0),"="!==e[2].token&&t("Expected octave parameter in MIDI "+i,n,0),"number"!==e[3].type&&t("Expected integer parameter for octave in MIDI "+i,n,0)):(a.push(e[0].intt),4===e.length&&a.push(e[3].intt));else if(C.indexOf(i)>=0)if(e.length<2)t("Expected string parameter and at least one integer parameter in MIDI "+i,n,0);else if("alpha"!==e[0].type)t("Expected string parameter and at least one integer parameter in MIDI "+i,n,0);else{var o=e.shift();for(a.push(o.token);e.length>0;)"number"!==(o=e.shift()).type&&t("Expected integer parameter in MIDI "+i,n,0),a.push(o.intt)}s.hasBeginMusic()?s.appendElement("midi",-1,-1,{cmd:i,params:a}):(void 0===r.formatting.midi&&(r.formatting.midi={}),r.formatting.midi[i]=a)}(ce,a,M);break;case"percmap":var le=function(e){var t=e.split(/\s+/);if(2!==t.length&&3!==t.length)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var r=t[0],n=parseInt(t[1],10);if((isNaN(n)||n<35||n>81)&&t[1]&&(n=u.indexOf(t[1].toLowerCase())+35),isNaN(n)||n<35||n>81)return{error:'Expected drum name, received "'+t[1]+'"'};var i={sound:n};return 3===t.length&&(i.noteHead=t[2]),{key:r,value:i}}(M);le.error?t(le.error,o,8):(a.formatting.percmap||(a.formatting.percmap={}),a.formatting.percmap[le.key]=le.value);break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":a.formatting[N]=M;break;default:return"Unknown directive: "+N}return null},i.globalFormatting=function(n){for(var i in n)if(n.hasOwnProperty(i)){var s,o=""+n[i],c=e.tokenize(o,0,o.length);switch(i){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":l(i,c,o);break;case"scale":h(i,c);break;case"partsbox":null!==(s=f("partsBox",i,c))&&t(s),r.partsfont.box=r.partsBox;break;case"freegchord":null!==(s=f("freegchord",i,c))&&t(s);break;case"fontboxpadding":1===c.length&&"number"===c[0].type||t('Directive "'+i+'" requires a number as a parameter.'),a.formatting.fontboxpadding=c[0].floatt;break;case"stretchlast":var u=S(c);if(void 0!==u.value&&(a.formatting.stretchlast=u.value),u.error)return u.error;break;default:t("Formatting directive unrecognized: ",i,0)}}}}(),e.exports=i},9928:function(e,t,r){var n=r(5008),i=r(8360),a=r(9708);e.exports=function(e,t,r,s,o){this.reset=function(e,t,r,n){a.initialize(e,t,r,n,o),i.initialize(e,t,r,n,o)},this.reset(e,t,r,s),this.setTitle=function(t){if(r.hasMainTitle)o.addSubtitle(e.translateString(e.stripComment(t)));else{var n=e.translateString(e.theReverser(e.stripComment(t)));r.titlecaps&&(n=n.toUpperCase()),o.addMetaText("title",n),r.hasMainTitle=!0}},this.setMeter=function(n){if("C"===(n=e.stripComment(n)))return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"common_time"};if("C|"===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"cut_time"};if("o"===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum"};if("c"===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum"};if("o."===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if("c."===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(0===n.length||"none"===n.toLowerCase())return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),null;var i=e.tokenize(n,0,n.length);try{var a=function(){var e=function(){var e={value:0,num:""},t=i.shift();for("("===t.token&&(t=i.shift());;){if("number"!==t.type)throw"Expected top number of meter";if(e.value+=parseInt(t.token),e.num+=t.token,0===i.length||"/"===i[0].token)return e;if(")"===(t=i.shift()).token){if(0===i.length||"/"===i[0].token)return e;throw"Unexpected paren in meter"}if("."!==t.token&&"+"!==t.token)throw"Expected top number of meter";if(e.num+=t.token,0===i.length)throw"Expected top number of meter";t=i.shift()}return e}();if(0===i.length)return e;var t=i.shift();if("/"!==t.token)throw"Expected slash in meter";if("number"!==(t=i.shift()).type)throw"Expected bottom number of meter";return e.den=t.token,e.value=e.value/parseInt(e.den),e};if(0===i.length)throw"Expected meter definition in M: line";for(var s={type:"specified",value:[]},o=0;;){var c=a();o+=c.value;var l={num:c.num};if(void 0!==c.den&&(l.den=c.den),s.value.push(l),0===i.length)break}return!0===r.havent_set_length&&(r.default_length=o<.75?.0625:.125,r.havent_set_length=!1),s}catch(e){t(e,n,0)}return null},this.calcTempo=function(e){var t=1/4;r.meter&&"specified"===r.meter.type?t=1/parseInt(r.meter.value[0].den):r.origMeter&&"specified"===r.origMeter.type&&(t=1/parseInt(r.origMeter.value[0].den));for(var n=0;n<e.duration;n++)e.duration[n]=t*e.duration[n];return e},this.resolveTempo=function(){r.tempo&&(this.calcTempo(r.tempo),s.metaText.tempo=r.tempo,delete r.tempo)},this.addUserDefinition=function(e,i,a){var s=e.indexOf("=",i);if(-1!==s){var o=n.strip(e.substring(i,s)),c=n.strip(e.substring(s+1));1===o.length?-1!=="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~".indexOf(o)?0!==c.length?(void 0===r.macros&&(r.macros={}),r.macros[o]=c):t("Missing macro definition",e,i):t("Macro definitions must be H-Y, h-w, or tilde",e,i):t("Macro definitions can only be one character",e,i)}else t("Need an = in a macro definition",e,i)},this.setDefaultLength=function(e,t,i){var a=n.gsub(e.substring(t,i)," ","").split("/");if(2===a.length){var s=parseInt(a[0]),o=parseInt(a[1]);o>0&&(r.default_length=s/o,r.havent_set_length=!1)}else 1===a.length&&"1"===a[0]&&(r.default_length=1,r.havent_set_length=!1)};var c={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(n,i,a){try{var s=e.tokenize(n,i,a);if(0===s.length)throw"Missing parameter in Q: field";var o={},l=!0,h=s.shift();if("quote"===h.type&&(o.preString=h.token,h=s.shift(),0===s.length))return c[o.preString.toLowerCase()]&&(o.bpm=c[o.preString.toLowerCase()],o.suppressBpm=!0),{type:"immediate",tempo:o};if("alpha"===h.type&&"C"===h.token){if(0===s.length)throw"Missing tempo after C in Q: field";if("punct"===(h=s.shift()).type&&"="===h.token){if(0===s.length)throw"Missing tempo after = in Q: field";if("number"!==(h=s.shift()).type)throw"Expected number after = in Q: field";o.duration=[1],o.bpm=parseInt(h.token)}else{if("number"!==h.type)throw"Expected number or equal after C in Q: field";if(o.duration=[parseInt(h.token)],0===s.length)throw"Missing = after duration in Q: field";if("punct"!==(h=s.shift()).type||"="!==h.token)throw"Expected = after duration in Q: field";if(0===s.length)throw"Missing tempo after = in Q: field";if("number"!==(h=s.shift()).type)throw"Expected number after = in Q: field";o.bpm=parseInt(h.token)}}else{if("number"!==h.type)throw"Unknown value in Q: field";var u=parseInt(h.token);if(0===s.length||"quote"===s[0].type)o.duration=[1],o.bpm=u;else{if(l=!1,"punct"!==(h=s.shift()).type&&"/"!==h.token)throw"Expected fraction in Q: field";if("number"!==(h=s.shift()).type)throw"Expected fraction in Q: field";var d=parseInt(h.token);for(o.duration=[u/d];s.length>0&&"="!==s[0].token&&"quote"!==s[0].type;){if("number"!==(h=s.shift()).type)throw"Expected fraction in Q: field";if(u=parseInt(h.token),"punct"!==(h=s.shift()).type&&"/"!==h.token)throw"Expected fraction in Q: field";if("number"!==(h=s.shift()).type)throw"Expected fraction in Q: field";d=parseInt(h.token),o.duration.push(u/d)}if("punct"!==(h=s.shift()).type&&"="!==h.token)throw"Expected = in Q: field";if("number"!==(h=s.shift()).type)throw"Expected tempo in Q: field";o.bpm=parseInt(h.token)}}if(0!==s.length&&("quote"===(h=s.shift()).type&&(o.postString=h.token,h=s.shift()),0!==s.length))throw"Unexpected string at end of Q: field";return!1===r.printTempo&&(o.suppress=!0),{type:l?"delaySet":"immediate",tempo:o}}catch(e){return t(e,n,i),{type:"none"}}},this.letter_to_inline_header=function(n,c,l){var h=e.eatWhiteSpace(n,c);if(c+=h,n.length>=c+5&&"["===n.charAt(c)&&":"===n.charAt(c+2)){var u=n.indexOf("]",c),d=r.iChar+c,f=r.iChar+u+1;switch(n.substring(c,c+3)){case"[I:":var p=i.addDirective(n.substring(c+3,u));return p&&t(p,n,c),[u-c+1+h];case"[M:":var m=this.setMeter(n.substring(c+3,u));return o.hasBeginMusic()&&m?o.appendStartingElement("meter",d,f,m):r.meter=m,[u-c+1+h];case"[K:":var g=a.parseKey(n.substring(c+3,u));return g.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",d,f,r.clef),g.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",d,f,a.fixKey(r.clef,r.key)),[u-c+1+h];case"[P:":return l||s.lines.length<=s.lineNum?r.partForNextLine={title:n.substring(c+3,u),startChar:d,endChar:f}:o.appendElement("part",d,f,{title:n.substring(c+3,u)}),[u-c+1+h];case"[L:":return this.setDefaultLength(n,c+3,u),[u-c+1+h];case"[Q:":if(u>0){var v=this.setTempo(n,c+3,u);return"delaySet"===v.type?o.hasBeginMusic()?o.appendElement("tempo",d,f,this.calcTempo(v.tempo)):r.tempoForNextLine=["tempo",d,f,this.calcTempo(v.tempo)]:"immediate"===v.type&&(!l&&o.hasBeginMusic()?o.appendElement("tempo",d,f,v.tempo):r.tempoForNextLine=["tempo",d,f,v.tempo]),[u-c+1+h,n.charAt(c+1),n.substring(c+3,u)]}break;case"[V:":if(u>0)return a.parseVoice(n,c+3,u),[u-c+1+h,n.charAt(c+1),n.substring(c+3,u)]}}return[0]},this.letter_to_body_header=function(e,s){if(e.length>=s+3)switch(e.substring(s,s+2)){case"I:":var c=i.addDirective(e.substring(s+2));return c&&t(c,e,s),[e.length];case"M:":var l=this.setMeter(e.substring(s+2));return o.hasBeginMusic()&&l&&o.appendStartingElement("meter",r.iChar+s,r.iChar+e.length,l),[e.length];case"K:":var h=a.parseKey(e.substring(s+2));return h.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",r.iChar+s,r.iChar+e.length,r.clef),h.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",r.iChar+s,r.iChar+e.length,a.fixKey(r.clef,r.key)),[e.length];case"P:":return o.hasBeginMusic()&&o.appendElement("part",r.iChar+s,r.iChar+e.length,{title:e.substring(s+2)}),[e.length];case"L:":return this.setDefaultLength(e,s+2,e.length),[e.length];case"Q:":var u=e.indexOf("",s+2);-1===u&&(u=e.length);var d=this.setTempo(e,s+2,u);return"delaySet"===d.type?o.appendElement("tempo",r.iChar+s,r.iChar+e.length,this.calcTempo(d.tempo)):"immediate"===d.type&&o.appendElement("tempo",r.iChar+s,r.iChar+e.length,d.tempo),[u,e.charAt(s),n.strip(e.substring(s+2))];case"V:":return a.parseVoice(e,s+2,e.length),[e.length,e.charAt(s),n.strip(e.substring(s+2))]}return[0]};var l={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(n){var c=l[n.charAt(0)];if(void 0!==c)return"unalignedWords"===c?o.addMetaTextArray(c,i.parseFontChangeLine(e.translateString(e.stripComment(n.substring(2))))):o.addMetaText(c,e.translateString(e.stripComment(n.substring(2)))),{};var h=r.iChar,u=h+n.length;switch(n.charAt(0)){case"H":for(o.addMetaText("history",e.translateString(e.stripComment(n.substring(2)))),n=e.peekLine();n&&":"!==n.charAt(1);)e.nextLine(),o.addMetaText("history",e.translateString(e.stripComment(n))),n=e.peekLine();break;case"K":this.resolveTempo();var d=a.parseKey(n.substring(2));!r.is_in_header&&o.hasBeginMusic()&&(d.foundClef&&o.appendStartingElement("clef",h,u,r.clef),d.foundKey&&o.appendStartingElement("key",h,u,a.fixKey(r.clef,r.key))),r.is_in_header=!1;break;case"L":this.setDefaultLength(n,2,n.length);break;case"M":r.origMeter=r.meter=this.setMeter(n.substring(2));break;case"P":r.is_in_header?o.addMetaText("partOrder",e.translateString(e.stripComment(n.substring(2)))):r.partForNextLine={title:e.translateString(e.stripComment(n.substring(2))),startChar:h,endChar:u};break;case"Q":var f=this.setTempo(n,2,n.length);"delaySet"===f.type?r.tempo=f.tempo:"immediate"===f.type&&(s.metaText.tempo?r.tempoForNextLine=["tempo",h,u,f.tempo]:s.metaText.tempo=f.tempo);break;case"T":this.setTitle(n.substring(2));break;case"U":this.addUserDefinition(n,2,n.length);break;case"V":if(a.parseVoice(n,2,n.length),!r.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":t("Ignored header",n,0);break;default:return{regular:!0}}return{}}}},9708:function(e,t,r){var n=r(5008),i=r(8360),a=r(2821),s={};!function(){var e,t,r,o;s.initialize=function(n,i,a,s,c){e=n,t=i,r=a,o=c},s.standardKey=function(e,t,n,i){var s={acc:"sharp",note:"f"},o={acc:"sharp",note:"c"},c={acc:"sharp",note:"g"},l={acc:"sharp",note:"d"},h={acc:"sharp",note:"A"},u={acc:"sharp",note:"e"},d={acc:"sharp",note:"B"},f={acc:"flat",note:"B"},p={acc:"flat",note:"e"},m={acc:"flat",note:"A"},g={acc:"flat",note:"d"},v={acc:"flat",note:"G"},b={acc:"flat",note:"c"},y={acc:"flat",note:"F"},w={"C#":[s,o,c,l,h,u,d],"A#m":[s,o,c,l,h,u,d],"G#Mix":[s,o,c,l,h,u,d],"D#Dor":[s,o,c,l,h,u,d],"E#Phr":[s,o,c,l,h,u,d],"F#Lyd":[s,o,c,l,h,u,d],"B#Loc":[s,o,c,l,h,u,d],"F#":[s,o,c,l,h,u],"D#m":[s,o,c,l,h,u],"C#Mix":[s,o,c,l,h,u],"G#Dor":[s,o,c,l,h,u],"A#Phr":[s,o,c,l,h,u],BLyd:[s,o,c,l,h,u],"E#Loc":[s,o,c,l,h,u],B:[s,o,c,l,h],"G#m":[s,o,c,l,h],"F#Mix":[s,o,c,l,h],"C#Dor":[s,o,c,l,h],"D#Phr":[s,o,c,l,h],ELyd:[s,o,c,l,h],"A#Loc":[s,o,c,l,h],E:[s,o,c,l],"C#m":[s,o,c,l],BMix:[s,o,c,l],"F#Dor":[s,o,c,l],"G#Phr":[s,o,c,l],ALyd:[s,o,c,l],"D#Loc":[s,o,c,l],A:[s,o,c],"F#m":[s,o,c],EMix:[s,o,c],BDor:[s,o,c],"C#Phr":[s,o,c],DLyd:[s,o,c],"G#Loc":[s,o,c],D:[s,o],Bm:[s,o],AMix:[s,o],EDor:[s,o],"F#Phr":[s,o],GLyd:[s,o],"C#Loc":[s,o],G:[s],Em:[s],DMix:[s],ADor:[s],BPhr:[s],CLyd:[s],"F#Loc":[s],C:[],Am:[],GMix:[],DDor:[],EPhr:[],FLyd:[],BLoc:[],F:[f],Dm:[f],CMix:[f],GDor:[f],APhr:[f],BbLyd:[f],ELoc:[f],Bb:[f,p],Gm:[f,p],FMix:[f,p],CDor:[f,p],DPhr:[f,p],EbLyd:[f,p],ALoc:[f,p],Eb:[f,p,m],Cm:[f,p,m],BbMix:[f,p,m],FDor:[f,p,m],GPhr:[f,p,m],AbLyd:[f,p,m],DLoc:[f,p,m],Ab:[f,p,m,g],Fm:[f,p,m,g],EbMix:[f,p,m,g],BbDor:[f,p,m,g],CPhr:[f,p,m,g],DbLyd:[f,p,m,g],GLoc:[f,p,m,g],Db:[f,p,m,g,v],Bbm:[f,p,m,g,v],AbMix:[f,p,m,g,v],EbDor:[f,p,m,g,v],FPhr:[f,p,m,g,v],GbLyd:[f,p,m,g,v],CLoc:[f,p,m,g,v],Gb:[f,p,m,g,v,b],Ebm:[f,p,m,g,v,b],DbMix:[f,p,m,g,v,b],AbDor:[f,p,m,g,v,b],BbPhr:[f,p,m,g,v,b],CbLyd:[f,p,m,g,v,b],FLoc:[f,p,m,g,v,b],Cb:[f,p,m,g,v,b,y],Abm:[f,p,m,g,v,b,y],GbMix:[f,p,m,g,v,b,y],DbDor:[f,p,m,g,v,b,y],EbPhr:[f,p,m,g,v,b,y],FbLyd:[f,p,m,g,v,b,y],BbLoc:[f,p,m,g,v,b,y],"A#":[f,p],"B#":[],"D#":[f,p,m],"E#":[f],"G#":[f,p,m,g],Gbm:[s,o,c,l,h,u,d],none:[]};return a.keySignature(r,w,e,t,n,i)};var c={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},l=function(e,t){var r=c[e];return(r?r.mid:0)+t};s.fixClef=function(e){var t=c[e.type];t&&(e.clefPos=t.pitch,e.type=t.clef)},s.deepCopyKey=function(e){var t={accidentals:[],root:e.root,acc:e.acc,mode:e.mode};return n.each(e.accidentals,(function(e){t.accidentals.push(n.clone(e))})),t};var h={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};s.addPosToKey=function(e,t){var r=e.verticalPos;n.each(t.accidentals,(function(e){var t=h[e.note];t-=r,e.verticalPos=t})),t.impliedNaturals&&n.each(t.impliedNaturals,(function(e){var t=h[e.note];t-=r,e.verticalPos=t})),r<-10?(n.each(t.accidentals,(function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&n.each(t.impliedNaturals,(function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)}))):r<-4?(n.each(t.accidentals,(function(e){e.verticalPos-=7,-8!==r||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&n.each(t.impliedNaturals,(function(e){e.verticalPos-=7,-8!==r||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)}))):r>=7&&(n.each(t.accidentals,(function(e){e.verticalPos+=7})),t.impliedNaturals&&n.each(t.impliedNaturals,(function(e){e.verticalPos+=7})))},s.fixKey=function(e,t){var r=n.clone(t);return s.addPosToKey(e,r),r};var u=function(e){var t=0,r=e.charAt(t++);"^"!==r&&"_"!==r||(r=e.charAt(t++));var n=h[r];for(void 0===n&&(n=6);t<e.length;t++)if(","===e.charAt(t))n-=7;else{if("'"!==e.charAt(t))break;n+=7}return{mid:n-6,str:e.substring(t)}};s.parseKey=function(n){0===n.length&&(n="none");var a=e.tokenize(n,0,n.length),o={};if(0===a.length)return t("Must pass in key signature.",n,0),o;switch(a[0].token){case"HP":i.addDirective("bagpipes"),r.key={root:"HP",accidentals:[],acc:"",mode:""},o.foundKey=!0,a.shift();break;case"Hp":i.addDirective("bagpipes"),r.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},o.foundKey=!0,a.shift();break;case"none":r.key={root:"none",accidentals:[],acc:"",mode:""},o.foundKey=!0,a.shift();break;default:var c=e.getKeyPitch(a[0].token);if(c.len>0){o.foundKey=!0;var h="",u="";a[0].token.length>1?a[0].token=a[0].token.substring(1):a.shift();var d=c.token;if(a.length>0){var f=e.getSharpFlat(a[0].token);if(f.len>0&&(a[0].token.length>1?a[0].token=a[0].token.substring(1):a.shift(),d+=f.token,h=f.token),a.length>0){var p=e.getMode(a[0].token);p.len>0&&(a.shift(),d+=p.token,u=p.token)}if(void 0===s.standardKey(d,c.token,h,0))return t("Unsupported key signature: "+d,n,0),o}var m=s.deepCopyKey(r.key),g=r.globalTranspose?-r.globalTranspose:0;if(r.key=s.deepCopyKey(s.standardKey(d,c.token,h,g)),r.key.mode=u,m){for(var v,b=0;b<r.key.accidentals.length;b++)for(v=0;v<m.accidentals.length;v++)m.accidentals[v].note&&r.key.accidentals[b].note.toLowerCase()===m.accidentals[v].note.toLowerCase()&&(m.accidentals[v].note=null);for(v=0;v<m.accidentals.length;v++)m.accidentals[v].note&&(r.key.impliedNaturals||(r.key.impliedNaturals=[]),r.key.impliedNaturals.push({acc:"natural",note:m.accidentals[v].note}))}}}if(0===a.length)return o;if("exp"===a[0].token&&a.shift(),0===a.length)return o;if("oct"===a[0].token&&a.shift(),0===a.length)return o;var y,w=e.getKeyAccidentals2(a);if(w.warn&&t(w.warn,n,0),w.accs){o.foundKey||(o.foundKey=!0,r.key={root:"none",acc:"",mode:"",accidentals:[]}),function(e){for(var t=0;t<e.length;t++)"b"===e[t].note?e[t].note="B":"a"===e[t].note?e[t].note="A":"F"===e[t].note?e[t].note="f":"E"===e[t].note?e[t].note="e":"D"===e[t].note?e[t].note="d":"C"===e[t].note?e[t].note="c":"G"===e[t].note&&"sharp"===e[t].acc?e[t].note="g":"g"===e[t].note&&"flat"===e[t].acc&&(e[t].note="G")}(w.accs);for(var k=0;k<w.accs.length;k++){for(var x=!1,T=0;T<r.key.accidentals.length&&!x;T++)r.key.accidentals[T].note===w.accs[k].note&&(x=!0,r.key.accidentals[T].acc!==w.accs[k].acc&&(r.key.accidentals[T].acc=w.accs[k].acc,r.key.explicitAccidentals||(r.key.explicitAccidentals=[]),r.key.explicitAccidentals.push(w.accs[k])));if(!x&&(r.key.explicitAccidentals||(r.key.explicitAccidentals=[]),r.key.explicitAccidentals.push(w.accs[k]),r.key.accidentals.push(w.accs[k]),r.key.impliedNaturals))for(var C=0;C<r.key.impliedNaturals.length;C++)r.key.impliedNaturals[C].note===w.accs[k].note&&r.key.impliedNaturals.splice(C,1)}}for(;a.length>0;)switch(a[0].token){case"m":case"middle":if(a.shift(),0===a.length)return t("Expected = after middle",n,0),o;if("="!==(y=a.shift()).token){t("Expected = after middle",n,y.start);break}if(0===a.length)return t("Expected parameter after middle=",n,0),o;var A=e.getPitchFromTokens(a);A.warn&&t(A.warn,n,0),A.position&&(r.clef.verticalPos=A.position-6);break;case"transpose":if(a.shift(),0===a.length)return t("Expected = after transpose",n,0),o;if("="!==(y=a.shift()).token){t("Expected = after transpose",n,y.start);break}if(0===a.length)return t("Expected parameter after transpose=",n,0),o;if("number"!==a[0].type){t("Expected number after transpose",n,a[0].start);break}r.clef.transpose=a[0].intt,a.shift();break;case"stafflines":if(a.shift(),0===a.length)return t("Expected = after stafflines",n,0),o;if("="!==(y=a.shift()).token){t("Expected = after stafflines",n,y.start);break}if(0===a.length)return t("Expected parameter after stafflines=",n,0),o;if("number"!==a[0].type){t("Expected number after stafflines",n,a[0].start);break}r.clef.stafflines=a[0].intt,a.shift();break;case"staffscale":if(a.shift(),0===a.length)return t("Expected = after staffscale",n,0),o;if("="!==(y=a.shift()).token){t("Expected = after staffscale",n,y.start);break}if(0===a.length)return t("Expected parameter after staffscale=",n,0),o;if("number"!==a[0].type){t("Expected number after staffscale",n,a[0].start);break}r.clef.staffscale=a[0].floatt,a.shift();break;case"style":if(a.shift(),0===a.length)return t("Expected = after style",n,0),o;if("="!==(y=a.shift()).token){t("Expected = after style",n,y.start);break}if(0===a.length)return t("Expected parameter after style=",n,0),o;switch(a[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":r.style=a[0].token,a.shift();break;default:t("error parsing style element: "+a[0].token,n,a[0].start)}break;case"clef":if(a.shift(),0===a.length)return t("Expected = after clef",n,0),o;if("="!==(y=a.shift()).token){t("Expected = after clef",n,y.start);break}if(0===a.length)return t("Expected parameter after clef=",n,0),o;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var S=a.shift();switch(S.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":S.token="alto";break;case"F":S.token="bass";break;case"G":S.token="treble";break;case"c":S.token="alto";break;case"f":S.token="bass";break;case"g":S.token="treble";break;default:t("Expected clef name. Found "+S.token,n,S.start)}a.length>0&&"number"===a[0].type&&(S.token+=a[0].token,a.shift()),a.length>1&&("-"===a[0].token||"+"===a[0].token||"^"===a[0].token||"_"===a[0].token)&&"8"===a[1].token&&(S.token+=a[0].token+a[1].token,a.shift(),a.shift()),r.clef={type:S.token,verticalPos:l(S.token,0)},r.currentVoice&&void 0!==r.currentVoice.transpose&&(r.clef.transpose=r.currentVoice.transpose),o.foundClef=!0;break;default:t("Unknown parameter: "+a[0].token,n,a[0].start),a.shift()}return o},s.parseVoice=function(n,i,a){var s=e.getMeat(n,i,a),c=s.start,h=s.end,d=e.getToken(n,c,h);if(0!==d.length){var f=!1;void 0===r.voices[d]&&(r.voices[d]={},f=!0,r.score_is_present&&t("Can't have an unknown V: id when the %score directive is present",n,c)),c+=d.length,c+=e.eatWhiteSpace(n,c);for(var p={startStaff:f},m=function(r){var i=e.getVoiceToken(n,c,h);void 0!==i.warn?t("Expected value for "+r+" in voice: "+i.warn,n,c):void 0!==i.err?t("Expected value for "+r+" in voice: "+i.err,n,c):0===i.token.length&&'"'!==n.charAt(c)?t("Expected value for "+r+" in voice",n,c):p[r]=i.token,c+=i.len},g=function(i,a,s){var o=e.getVoiceToken(n,c,h);void 0!==o.warn?t("Expected value for "+a+" in voice: "+o.warn,n,c):void 0!==o.err?t("Expected value for "+a+" in voice: "+o.err,n,c):0===o.token.length&&'"'!==n.charAt(c)?t("Expected value for "+a+" in voice",n,c):("number"===s&&(o.token=parseFloat(o.token)),r.voices[i][a]=o.token),c+=o.len},v=function(r,i){var a=e.getVoiceToken(n,c,h);if(void 0!==a.warn)t("Expected value for "+r+" in voice: "+a.warn,n,c);else if(void 0!==a.err)t("Expected value for "+r+" in voice: "+a.err,n,c);else{if(0!==a.token.length||'"'===n.charAt(c))return"number"===i&&(a.token=parseFloat(a.token)),a.token;t("Expected value for "+r+" in voice",n,c)}c+=a.len},b=function(i,a){var s=e.getVoiceToken(n,c,h);if(void 0!==s.warn)t("Expected one of (_B, _E, _b, _e) for "+a+" in voice: "+s.warn,n,c);else if(0===s.token.length&&'"'!==n.charAt(c))t("Expected one of (_B, _E, _b, _e) for "+a+" in voice",n,c);else{var o={_B:2,_E:9,_b:-10,_e:-3}[s.token];o?r.voices[i][a]=o:t("Expected one of (_B, _E, _b, _e) for "+a+" in voice",n,c)}c+=s.len};c<h;){var y=e.getVoiceToken(n,c,h);if(c+=y.len,y.warn)t("Error parsing voice: "+y.warn,n,c);else{var w=null;switch(y.token){case"clef":case"cl":m("clef");var k=0;void 0!==p.clef&&(p.clef=p.clef.replace(/[',]/g,""),-1!==p.clef.indexOf("+16")&&(k+=14,p.clef=p.clef.replace("+16","")),p.verticalPos=l(p.clef,k));break;case"treble":case"bass":case"tenor":case"alto":case"perc":case"none":case"treble'":case"bass'":case"tenor'":case"alto'":case"none'":case"treble''":case"bass''":case"tenor''":case"alto''":case"none''":case"treble,":case"bass,":case"tenor,":case"alto,":case"none,":case"treble,,":case"bass,,":case"tenor,,":case"alto,,":case"none,,":p.clef=y.token.replace(/[',]/g,""),p.verticalPos=l(p.clef,0),r.voices[d].clef=y.token;break;case"staves":case"stave":case"stv":m("staves");break;case"brace":case"brc":m("brace");break;case"bracket":case"brk":m("bracket");break;case"name":case"nm":m("name");break;case"subname":case"sname":case"snm":m("subname");break;case"merge":p.startStaff=!1;break;case"stem":case"stems":void 0!==(w=e.getVoiceToken(n,c,h)).warn?t("Expected value for stems in voice: "+w.warn,n,c):void 0!==w.err?t("Expected value for stems in voice: "+w.err,n,c):"up"===w.token||"down"===w.token?r.voices[d].stem=w.token:t("Expected up or down for voice stem",n,c),c+=w.len;break;case"up":case"down":r.voices[d].stem=y.token;break;case"middle":case"m":m("verticalPos"),p.verticalPos=u(p.verticalPos).mid;break;case"gchords":case"gch":r.voices[d].suppressChords=!0,"0"===(w=e.getVoiceToken(n,c,h)).token&&(c+=w.len);break;case"space":case"spc":m("spacing");break;case"scale":g(d,"scale","number");break;case"score":b(d,"scoreTranspose");break;case"transpose":g(d,"transpose","number");break;case"stafflines":g(d,"stafflines","number");break;case"staffscale":g(d,"staffscale","number");break;case"octave":g(d,"octave","number");break;case"volume":g(d,"volume","number");break;case"cue":var x=v("cue","string");r.voices[d].scale="on"===x?.6:1;break;case"style":void 0!==(w=e.getVoiceToken(n,c,h)).warn?t("Expected value for style in voice: "+w.warn,n,c):void 0!==w.err?t("Expected value for style in voice: "+w.err,n,c):"normal"===w.token||"harmonic"===w.token||"rhythm"===w.token||"x"===w.token||"triangle"===w.token?r.voices[d].style=w.token:t("Expected one of [normal, harmonic, rhythm, x, triangle] for voice style",n,c),c+=w.len}}c+=e.eatWhiteSpace(n,c)}if((p.startStaff||0===r.staves.length)&&(r.staves.push({index:r.staves.length,meter:r.origMeter}),r.score_is_present||(r.staves[r.staves.length-1].numVoices=0)),void 0===r.voices[d].staffNum){r.voices[d].staffNum=r.staves.length-1;var T=0;for(var C in r.voices)r.voices.hasOwnProperty(C)&&r.voices[C].staffNum===r.voices[d].staffNum&&T++;r.voices[d].index=T-1}var A=r.staves[r.voices[d].staffNum];r.score_is_present||A.numVoices++,p.clef&&(A.clef={type:p.clef,verticalPos:p.verticalPos}),p.spacing&&(A.spacing_below_offset=p.spacing),p.verticalPos&&(A.verticalPos=p.verticalPos),p.name&&(A.name?A.name.push(p.name):A.name=[p.name]),p.subname&&(A.subname?A.subname.push(p.subname):A.subname=[p.subname]),function(e){r.currentVoice=r.voices[e],o.setCurrentVoice(r.currentVoice.staffNum,r.currentVoice.index)}(d)}else t("Expected a voice id",n,c)}}(),e.exports=s},6476:function(e,t,r){var n,i,a,s,o,c,l=r(5008),h=r(9708),u=r(2821),d=function(e,t,r,l,h,u){n=e,i=t,a=r,s=l,o=h,c=u,this.lineContinuation=!1},f=function(e,t,r){if(void 0===e.inTie[t])return!1;var n=e.currentVoice?e.currentVoice.index:0;return!(!e.inTie[t][n]||void 0===r.pitches&&"spacer"===r.rest.type)},p={};d.prototype.parseMusic=function(e){c.resolveTempo(),a.is_in_header=!1;for(var t=0,r=a.iChar;n.isWhiteSpace(e.charAt(t))&&t<e.length;)t++;if(t!==e.length&&"%"!==e.charAt(t)){var h=a.start_new_line;void 0===a.continueall?a.start_new_line=!0:a.start_new_line=!1;var u=0,d=c.letter_to_body_header(e,t);d[0]>0&&(t+=d[0],"V"===d[1]&&this.startNewLine());for(var w=0;t<e.length;){var k=t;if("%"===e.charAt(t))break;var x=c.letter_to_inline_header(e,t,h);if(x[0]>0)t+=x[0],"V"===x[1]&&(h=!0);else{var T;for((!o.hasBeginMusic()||h&&!this.lineContinuation)&&(this.startNewLine(),h=!1);;)if((T=n.eatWhiteSpace(e,t))>0&&(t+=T),t>0&&""===e.charAt(t-1)&&(T=c.letter_to_body_header(e,t))[0]>0&&("V"===T[1]&&this.startNewLine(),t=T[0],a.start_new_line=!1),(T=S(e,t))[0]>0&&(t+=T[0]),(T=g(e,t))[0]>0){p.chord||(p.chord=[]);var C=n.translateString(T[1]);C=C.replace(/;/g,"\n");for(var M=!1,B=0;B<p.chord.length;B++)p.chord[B].position===T[2]&&(M=!0,p.chord[B].name+="\n"+C);!1===M&&(null===T[2]&&T[3]?p.chord.push({name:C,rel_position:T[3]}):p.chord.push({name:C,position:T[2]})),t+=T[0];var P=n.skipWhiteSpace(e.substring(t));P>0&&(p.force_end_beam_last=!0),t+=P}else if((T=-1==="ABCDEFGabcdefgxyzZ[]|^_{".indexOf(e.charAt(t))?A(e,t):[0])[0]>0)null===T[1]?t+1<e.length&&this.startNewLine():T[1].length>0&&(0===T[1].indexOf("style=")?p.style=T[1].substr(6):(void 0===p.decoration&&(p.decoration=[]),"beambr1"===T[1]?p.beambr=1:"beambr2"===T[1]?p.beambr=2:p.decoration.push(T[1]))),t+=T[0];else{if(!((T=v(e,t))[0]>0))break;p.gracenotes=T[1],t+=T[0]}if((T=_(e,t))[0]>0){w=0,void 0!==p.gracenotes&&(p.rest={type:"spacer"},p.duration=.125,a.addFormattingOptions(p,s.formatting,"note"),o.appendElement("note",r+t,r+t+T[0],p),a.measureNotEmpty=!0,p={});var O={type:T[1]};0===O.type.length?i("Unknown bar type",e,t):(a.inEnding&&"bar_thin"!==O.type&&(O.endEnding=!0,a.inEnding=!1),T[2]&&(O.startEnding=T[2],a.inEnding&&(O.endEnding=!0),a.inEnding=!0,"bar_right_repeat"===T[1]?a.restoreStartEndingHoldOvers():a.duplicateStartEndingHoldOvers()),void 0!==p.decoration&&(O.decoration=p.decoration),void 0!==p.chord&&(O.chord=p.chord),O.startEnding&&void 0===a.barFirstEndingNum?a.barFirstEndingNum=a.currBarNumber:O.startEnding&&O.endEnding&&a.barFirstEndingNum?a.currBarNumber=a.barFirstEndingNum:O.endEnding&&(a.barFirstEndingNum=void 0),"bar_invisible"!==O.type&&a.measureNotEmpty&&(void 0===a.currentVoice||0===a.currentVoice.staffNum&&0===a.currentVoice.index)&&(a.currBarNumber++,a.barNumbers&&a.currBarNumber%a.barNumbers==0&&(O.barNumber=a.currBarNumber)),a.addFormattingOptions(p,s.formatting,"bar"),o.appendElement("bar",r+t,r+t+T[0],O),a.measureNotEmpty=!1,p={}),t+=T[0]}else if("&"===e[t])(T=b(e,t))[0]>0&&(o.appendElement("overlay",r,r+1,{}),t+=1,w++);else{if((T=E(e,t)).consumed>0&&(void 0!==T.startSlur&&(p.startSlur=T.startSlur),T.dottedSlur&&(p.dottedSlur=!0),void 0!==T.triplet&&(u>0?i("Can't nest triplets",e,t):(p.startTriplet=T.triplet,p.tripletMultiplier=T.tripletQ/T.triplet,u=void 0===T.num_notes?T.triplet:T.num_notes)),t+=T.consumed),"["===e.charAt(t)){t++;for(var z=null,D=!1,I=!1;!I;){var F=A(e,t);F[0]>0&&(t+=F[0]);var j=L(e,t,{},!1);if(null!==j&&void 0!==j.pitch)F[0]>0&&0!==F[1].indexOf("style=")&&(void 0===p.decoration&&(p.decoration=[]),p.decoration.push(F[1])),j.end_beam&&(p.end_beam=!0,delete j.end_beam),void 0===p.pitches?(p.duration=j.duration,p.pitches=[j]):p.pitches.push(j),delete j.duration,F[0]>0&&0===F[1].indexOf("style=")&&(p.pitches[p.pitches.length-1].style=F[1].substr(6)),a.inTieChord[p.pitches.length]&&(j.endTie=!0,a.inTieChord[p.pitches.length]=void 0),j.startTie&&(a.inTieChord[p.pitches.length]=!0),t=j.endChar,delete j.endChar;else if(" "===e.charAt(t))i("Spaces are not allowed in chords",e,t),t++;else{if(t<e.length&&"]"===e.charAt(t)){t++,0!==a.next_note_duration&&(p.duration=p.duration*a.next_note_duration,a.next_note_duration=0),f(a,w,p)&&(l.each(p.pitches,(function(e){e.endTie=!0})),m(a,w,!1)),u>0&&(!p.rest||"spacer"!==p.rest.type)&&0==--u&&(p.endTriplet=!0);for(var V=!1;t<e.length&&!V;){switch(e.charAt(t)){case" ":case"\t":N(p);break;case")":void 0===p.endSlur?p.endSlur=1:p.endSlur++;break;case"-":l.each(p.pitches,(function(e){e.startTie={}})),m(a,w,!0);break;case">":case"<":var Y=H(e,t);t+=Y[0]-1,a.next_note_duration=Y[2],z?z*=Y[1]:z=Y[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var q=n.getFraction(e,t);z=q.value,t=q.index," "===e.charAt(t)&&(D=!0),"-"===e.charAt(t)||")"===e.charAt(t)||" "===e.charAt(t)||"<"===e.charAt(t)||">"===e.charAt(t)?t--:V=!0;break;default:V=!0}V||t++}}else i("Expected ']' to end the chords",e,t);void 0!==p.pitches&&(null!==z&&(p.duration=p.duration*z,D&&N(p)),a.addFormattingOptions(p,s.formatting,"note"),o.appendElement("note",r+k,r+t,p),a.measureNotEmpty=!0,p={}),I=!0}}}else{var G={},W=L(e,t,G,!0);void 0!==G.endTie&&m(a,w,!0),null!==W&&(void 0!==W.pitch?(p.pitches=[{}],void 0!==W.accidental&&(p.pitches[0].accidental=W.accidental),p.pitches[0].pitch=W.pitch,(W.midipitch||0===W.midipitch)&&(p.pitches[0].midipitch=W.midipitch),void 0!==W.endSlur&&(p.pitches[0].endSlur=W.endSlur),void 0!==W.endTie&&(p.pitches[0].endTie=W.endTie),void 0!==W.startSlur&&(p.pitches[0].startSlur=W.startSlur),void 0!==p.startSlur&&(p.pitches[0].startSlur=p.startSlur),void 0!==p.dottedSlur&&(p.pitches[0].dottedSlur=!0),void 0!==W.startTie&&(p.pitches[0].startTie=W.startTie),void 0!==p.startTie&&(p.pitches[0].startTie=p.startTie)):(p.rest=W.rest,void 0!==W.endSlur&&(p.endSlur=W.endSlur),void 0!==W.endTie&&(p.rest.endTie=W.endTie),void 0!==W.startSlur&&(p.startSlur=W.startSlur),void 0!==W.startTie&&(p.rest.startTie=W.startTie),void 0!==p.startTie&&(p.rest.startTie=p.startTie)),void 0!==W.chord&&(p.chord=W.chord),void 0!==W.duration&&(p.duration=W.duration),void 0!==W.decoration&&(p.decoration=W.decoration),void 0!==W.graceNotes&&(p.graceNotes=W.graceNotes),delete p.startSlur,delete p.dottedSlur,f(a,w,p)&&(void 0!==p.pitches?p.pitches[0].endTie=!0:"spacer"!==p.rest.type&&(p.rest.endTie=!0),m(a,w,!1)),(W.startTie||p.startTie)&&m(a,w,!0),t=W.endChar,u>0&&(!W.rest||"spacer"!==W.rest.type)&&0==--u&&(p.endTriplet=!0),W.end_beam&&N(p),p.rest&&"rest"===p.rest.type&&1===p.duration&&y(a)<=1&&(p.rest.type="whole",p.duration=y(a)),p.duration<1&&-1===[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875].indexOf(p.duration)&&0!==p.duration&&(p.rest&&"spacer"===p.rest.type||i("Duration not representable: "+e.substring(k,t),e,t)),a.addFormattingOptions(p,s.formatting,"note"),o.appendElement("note",r+k,r+t,p),a.measureNotEmpty=!0,p={})}t===k&&(" "!==e.charAt(t)&&"`"!==e.charAt(t)&&i("Unknown character ignored",e,t),t++)}}}this.lineContinuation=e.indexOf("")>=0||d[0]>0,this.lineContinuation||(p={})}};var m=function(e,t,r){var n=e.currentVoice?e.currentVoice.index:0;void 0===e.inTie[t]&&(e.inTie[t]=[]),e.inTie[t][n]=r},g=function(e,t){if('"'===e.charAt(t)){var r=n.getBrackettedSubstring(e,t,5);if(r[2]||i("Missing the closing quote while parsing the chord symbol",e,t),r[0]>0&&r[1].length>0&&"^"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="above";else if(r[0]>0&&r[1].length>0&&"_"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="below";else if(r[0]>0&&r[1].length>0&&"<"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="left";else if(r[0]>0&&r[1].length>0&&">"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="right";else if(r[0]>0&&r[1].length>0&&"@"===r[1].charAt(0)){r[1]=r[1].substring(1);var s=n.getFloat(r[1]);0===s.digits&&i("Missing first position in absolutely positioned annotation.",e,t),r[1]=r[1].substring(s.digits),","!==r[1][0]&&i("Missing comma absolutely positioned annotation.",e,t),r[1]=r[1].substring(1);var o=n.getFloat(r[1]);0===o.digits&&i("Missing second position in absolutely positioned annotation.",e,t),r[1]=r[1].substring(o.digits);var c=n.skipWhiteSpace(r[1]);r[1]=r[1].substring(c),r[2]=null,r[3]={x:s.value,y:o.value}}else!0!==a.freegchord&&(r[1]=r[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),r[1]=r[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),r[2]="default",r[1]=u.chordName(a,r[1]);return r}return[0,""]},v=function(e,t){if("{"===e.charAt(t)){var r=n.getBrackettedSubstring(e,t,1,"}");r[2]||i("Missing the closing '}' while parsing grace note",e,t),")"===e[t+r[0]]&&(r[0]++,r[1]+=")");for(var s=[],o=0,c=!1;o<r[1].length;){var l=!1;"/"===r[1].charAt(o)&&(l=!0,o++);var h=L(r[1],o,{},!1);null!==h?(h.duration=h.duration/(8*a.default_length),l&&(h.acciaccatura=!0),s.push(h),c&&(h.endTie=!0,c=!1),h.startTie&&(c=!0),o=h.endChar,delete h.endChar):(" "===r[1].charAt(o)?s.length>0&&(s[s.length-1].end_beam=!0):i("Unknown character '"+r[1].charAt(o)+"' while parsing grace note",e,t),o++)}if(s.length)return[r[0],s]}return[0]};function b(e,t){if("&"===e.charAt(t)){for(var r=t;e.charAt(t)&&":"!==e.charAt(t)&&"|"!==e.charAt(t);)t++;return[t-r,e.substring(r+1,t)]}return[0]}function y(e){var t=e.origMeter;return t&&"specified"===t.type&&t.value&&0!==t.value.length?parseInt(t.value[0].num,10)/parseInt(t.value[0].den,10):1}var w=["trill","lowermordent","uppermordent","mordent","pralltriller","accent","fermata","invertedfermata","tenuto","0","1","2","3","4","5","+","wedge","open","thumb","snap","turn","roll","breath","shortphrase","mediumphrase","longphrase","segno","coda","D.S.","D.C.","fine","beambr1","beambr2","slide","marcato","upbow","downbow","/","//","///","////","trem1","trem2","trem3","trem4","turnx","invertedturn","invertedturnx","trill(","trill)","arpeggio","xstem","mark","umarcato","style=normal","style=harmonic","style=rhythm","style=x","style=triangle"],k=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],x=["crescendo(","crescendo)","diminuendo(","diminuendo)"],T=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],C=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],A=function(e,t){var r=a.macros[e.charAt(t)];if(void 0!==r)return"!"!==r.charAt(0)&&"+"!==r.charAt(0)||(r=r.substring(1)),"!"!==r.charAt(r.length-1)&&"+"!==r.charAt(r.length-1)||(r=r.substring(0,r.length-1)),l.detect(w,(function(e){return r===e}))?[1,r]:l.detect(k,(function(e){return r===e}))?("hidden"===a.volumePosition&&(r=""),[1,r]):l.detect(x,(function(e){return"hidden"===a.dynamicPosition&&(r=""),r===e}))?[1,r]:(l.detect(a.ignoredDecorations,(function(e){return r===e}))||i("Unknown macro: "+r,e,t),[1,""]);switch(e.charAt(t)){case".":if("("===e[t+1]||"-"===e[t+1])break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var s=n.getBrackettedSubstring(e,t,5);return s[1].length>1&&("^"===s[1].charAt(0)||"_"===s[1].charAt(0))&&(s[1]=s[1].substring(1)),l.detect(w,(function(e){return s[1]===e}))?s:l.detect(k,(function(e){return s[1]===e}))?("hidden"===a.volumePosition&&(s[1]=""),s):l.detect(x,(function(e){return s[1]===e}))?("hidden"===a.dynamicPosition&&(s[1]=""),s):l.detect(T,(function(e){return s[1]===e[0]&&(s[1]=e[1],!0)}))?s:l.detect(C,(function(e){return s[1]===e[0]&&(s[1]=e[1],!0)}))?("hidden"===a.dynamicPosition&&(s[1]=""),s):"!"!==e.charAt(t)||1!==s[0]&&"!"===e.charAt(t+s[0]-1)?(i("Unknown decoration: "+s[1],e,t),s[1]="",s):[1,null];case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"]}return[0,0]},S=function(e,t){for(var r=t;n.isWhiteSpace(e.charAt(t));)t++;return[t-r]},_=function(e,t){var r=n.getBarLine(e,t);if(0===r.len)return[0,""];if(r.warn)return i(r.warn,e,t),[r.len,""];for(var a=0;a<e.length&&" "===e.charAt(t+r.len+a);a++);var s=r.len;if("["===e.charAt(t+r.len+a)&&(r.len+=a+1),'"'===e.charAt(t+r.len)&&"["===e.charAt(t+r.len-1)){var o=n.getBrackettedSubstring(e,t+r.len,5);return[r.len+o[0],r.token,o[1]]}var c=n.getTokenOf(e.substring(t+r.len),"1234567890-,");return 0===c.len||"-"===c.token[0]?[s,r.token]:[r.len+c.len,r.token,c.token]},M={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2},E=function(e,t){var r={},a=t;for("."===e[t]&&"("===e[t+1]&&(r.dottedSlur=!0,t++);"("===e.charAt(t)||n.isWhiteSpace(e.charAt(t));)"("===e.charAt(t)&&(t+1<e.length&&e.charAt(t+1)>="2"&&e.charAt(t+1)<="9"?(void 0!==r.triplet?i("Can't nest triplets",e,t):(r.triplet=e.charAt(t+1)-"0",r.tripletQ=M[r.triplet],r.num_notes=r.triplet,t+2<e.length&&":"===e.charAt(t+2)&&(t+3<e.length&&":"===e.charAt(t+3)?t+4<e.length&&e.charAt(t+4)>="1"&&e.charAt(t+4)<="9"?(r.num_notes=e.charAt(t+4)-"0",t+=3):i("expected number after the two colons after the triplet to mark the duration",e,t):t+3<e.length&&e.charAt(t+3)>="1"&&e.charAt(t+3)<="9"?(r.tripletQ=e.charAt(t+3)-"0",t+4<e.length&&":"===e.charAt(t+4)?t+5<e.length&&e.charAt(t+5)>="1"&&e.charAt(t+5)<="9"&&(r.num_notes=e.charAt(t+5)-"0",t+=4):t+=2):i("expected number after the triplet to mark the duration",e,t))),t++):void 0===r.startSlur?r.startSlur=1:r.startSlur++),t++;return r.consumed=t-a,r};d.prototype.startNewLine=function(){var e={startChar:-1,endChar:-1};a.partForNextLine.title&&(e.part=a.partForNextLine),e.clef=a.currentVoice&&void 0!==a.staves[a.currentVoice.staffNum].clef?l.clone(a.staves[a.currentVoice.staffNum].clef):l.clone(a.clef);var t=a.currentVoice?a.currentVoice.scoreTranspose:0;if(e.key=h.standardKey(a.key.root+a.key.acc+a.key.mode,a.key.root,a.key.acc,t),e.key.mode=a.key.mode,a.key.impliedNaturals&&(e.key.impliedNaturals=a.key.impliedNaturals),a.key.explicitAccidentals)for(var r=0;r<a.key.explicitAccidentals.length;r++){for(var n=!1,i=0;i<e.key.accidentals.length;i++)e.key.accidentals[i].note===a.key.explicitAccidentals[r].note&&(e.key.accidentals[i].acc=a.key.explicitAccidentals[r].acc,n=!0);n||e.key.accidentals.push(a.key.explicitAccidentals[r])}if(a.targetKey=e.key,e.key.explicitAccidentals&&delete e.key.explicitAccidentals,h.addPosToKey(e.clef,e.key),null!==a.meter?(a.currentVoice?(l.each(a.staves,(function(e){e.meter=a.meter})),e.meter=a.staves[a.currentVoice.staffNum].meter,a.staves[a.currentVoice.staffNum].meter=null):e.meter=a.meter,a.meter=null):a.currentVoice&&a.staves[a.currentVoice.staffNum].meter&&(e.meter=a.staves[a.currentVoice.staffNum].meter,a.staves[a.currentVoice.staffNum].meter=null),a.currentVoice&&a.currentVoice.name&&(e.name=a.currentVoice.name),a.vocalfont&&(e.vocalfont=a.vocalfont),a.tripletfont&&(e.tripletfont=a.tripletfont),a.gchordfont&&(e.gchordfont=a.gchordfont),a.style&&(e.style=a.style),a.currentVoice){var s=a.staves[a.currentVoice.staffNum];s.brace&&(e.brace=s.brace),s.bracket&&(e.bracket=s.bracket),s.connectBarLines&&(e.connectBarLines=s.connectBarLines),s.name&&(e.name=s.name[a.currentVoice.index]),s.subname&&(e.subname=s.subname[a.currentVoice.index]),a.currentVoice.stem&&(e.stem=a.currentVoice.stem),a.currentVoice.stafflines&&(e.stafflines=a.currentVoice.stafflines),a.currentVoice.staffscale&&(e.staffscale=a.currentVoice.staffscale),a.currentVoice.scale&&(e.scale=a.currentVoice.scale),a.currentVoice.style&&(e.style=a.currentVoice.style),a.currentVoice.transpose&&(e.clef.transpose=a.currentVoice.transpose)}var c=void 0===a.currentVoice||0===a.currentVoice.staffNum&&0===a.currentVoice.index;0===a.barNumbers&&c&&1!==a.currBarNumber&&(e.barNumber=a.currBarNumber),o.startNewLine(e),a.key.impliedNaturals&&delete a.key.impliedNaturals,a.partForNextLine={},4===a.tempoForNextLine.length&&o.appendElement(a.tempoForNextLine[0],a.tempoForNextLine[1],a.tempoForNextLine[2],a.tempoForNextLine[3]),a.tempoForNextLine=[]};var N=function(e){return void 0!==e.duration&&e.duration<.25&&(e.end_beam=!0),e},B={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},P={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},L=function(e,t,r,i){var c,l=function(e){return"octave"===e||"duration"===e||"Zduration"===e||"broken_rhythm"===e||"end_slur"===e};"."===e[t]&&"-"===e[t+1]&&(c=!0,t++);for(var h="startSlur",d=!1;;){switch(e.charAt(t)){case"(":if("startSlur"!==h)return l(h)?(r.endChar=t,r):null;void 0===r.startSlur?r.startSlur=1:r.startSlur++;break;case")":if(!l(h))return null;void 0===r.endSlur?r.endSlur=1:r.endSlur++;break;case"^":if("startSlur"===h)r.accidental="sharp",h="sharp2";else{if("sharp2"!==h)return l(h)?(r.endChar=t,r):null;r.accidental="dblsharp",h="pitch"}break;case"_":if("startSlur"===h)r.accidental="flat",h="flat2";else{if("flat2"!==h)return l(h)?(r.endChar=t,r):null;r.accidental="dblflat",h="pitch"}break;case"=":if("startSlur"!==h)return l(h)?(r.endChar=t,r):null;r.accidental="natural",h="pitch";break;case"A":case"B":case"C":case"D":case"E":case"F":case"G":case"a":case"b":case"c":case"d":case"e":case"f":case"g":if("startSlur"!==h&&"sharp2"!==h&&"flat2"!==h&&"pitch"!==h)return l(h)?(r.endChar=t,r):null;if(r.pitch=B[e.charAt(t)],u.note(a,r),h="octave",i&&0!==a.next_note_duration?(r.duration=a.default_length*a.next_note_duration,a.next_note_duration=0,d=!0):r.duration=a.default_length,a.clef&&"perc"===a.clef.type||a.currentVoice&&"perc"===a.currentVoice.clef){var f=e.charAt(t);r.accidental&&(f={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^"}[r.accidental]+f),s.formatting&&s.formatting.midi&&s.formatting.midi.drummap&&(r.midipitch=s.formatting.midi.drummap[f])}break;case",":if("octave"!==h)return l(h)?(r.endChar=t,r):null;r.pitch-=7;break;case"'":if("octave"!==h)return l(h)?(r.endChar=t,r):null;r.pitch+=7;break;case"x":case"X":case"y":case"z":case"Z":if("startSlur"!==h)return l(h)?(r.endChar=t,r):null;r.rest={type:P[e.charAt(t)]},delete r.accidental,delete r.startSlur,delete r.startTie,delete r.endSlur,delete r.endTie,delete r.end_beam,delete r.grace_notes,r.rest.type.indexOf("multimeasure")>=0?(r.duration=s.getBarLength(),r.rest.text=1,h="Zduration"):(i&&0!==a.next_note_duration?(r.duration=a.default_length*a.next_note_duration,a.next_note_duration=0,d=!0):r.duration=a.default_length,h="duration");break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if("octave"===h||"duration"===h){var p=n.getFraction(e,t);for(r.duration=r.duration*p.value,r.endChar=p.index;p.index<e.length&&(n.isWhiteSpace(e.charAt(p.index))||"-"===e.charAt(p.index));)"-"===e.charAt(p.index)?r.startTie={}:r=N(r),p.index++;t=p.index-1,h="broken_rhythm"}else if("sharp2"===h)r.accidental="quartersharp",h="pitch";else{if("flat2"!==h){if("Zduration"===h){var m=n.getNumber(e,t);return r.duration=m.num*s.getBarLength(),r.rest.text=m.num,r.endChar=m.index,r}return null}r.accidental="quarterflat",h="pitch"}break;case"-":if("startSlur"===h)o.addTieToLastNote(c),r.endTie=!0;else{if("octave"!==h&&"duration"!==h&&"end_slur"!==h)return"broken_rhythm"===h?(r.endChar=t,r):null;if(r.startTie={},d||!i)return n.isWhiteSpace(e.charAt(t+1))&&N(r),r.endChar=t+1,r;h="broken_rhythm"}break;case" ":case"\t":if(!l(h))return null;r.end_beam=!0,c=!1;do{"."===e.charAt(t)&&"-"===e.charAt(t+1)&&(c=!0,t++),"-"===e.charAt(t)&&(r.startTie={},c&&(r.startTie.style="dotted")),t++}while(t<e.length&&(n.isWhiteSpace(e.charAt(t))||"-"===e.charAt(t))||"."===e.charAt(t)&&"-"===e.charAt(t+1));if(r.endChar=t,d||!i||"<"!==e.charAt(t)&&">"!==e.charAt(t))return r;t--,h="broken_rhythm";break;case">":case"<":if(!l(h))return null;if(!i)return r.endChar=t,r;var g=H(e,t);t+=g[0]-1,a.next_note_duration=g[2],r.duration=g[1]*r.duration,h="end_slur";break;default:return l(h)?(r.endChar=t,r):null}if(++t===e.length)return l(h)?(r.endChar=t,r):null}return null},H=function(e,t){switch(e.charAt(t)){case">":return t<e.length-2&&">"===e.charAt(t+1)&&">"===e.charAt(t+2)?[3,1.875,.125]:t<e.length-1&&">"===e.charAt(t+1)?[2,1.75,.25]:[1,1.5,.5];case"<":return t<e.length-2&&"<"===e.charAt(t+1)&&"<"===e.charAt(t+2)?[3,.125,1.875]:t<e.length-1&&"<"===e.charAt(t+1)?[2,.25,1.75]:[1,.5,1.5]}return null};e.exports=d},1881:function(e,t,r){var n=r(5008),i=function(e,t){this.lineIndex=0,this.lines=e,this.multilineVars=t,this.skipWhiteSpace=function(e){for(var t=0;t<e.length;t++)if(!this.isWhiteSpace(e.charAt(t)))return t;return e.length};var r=function(e,t){return t>=e.length};this.eatWhiteSpace=function(e,t){for(var r=t;r<e.length;r++)if(!this.isWhiteSpace(e.charAt(r)))return r-t;return r-t},this.getKeyPitch=function(e){var t=this.skipWhiteSpace(e);if(r(e,t))return{len:0};switch(e.charAt(t)){case"A":return{len:t+1,token:"A"};case"B":return{len:t+1,token:"B"};case"C":return{len:t+1,token:"C"};case"D":return{len:t+1,token:"D"};case"E":return{len:t+1,token:"E"};case"F":return{len:t+1,token:"F"};case"G":return{len:t+1,token:"G"}}return{len:0}},this.getSharpFlat=function(e){if("bass"===e)return{len:0};switch(e.charAt(0)){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(e){var t=function(e,t){for(;t<e.length&&(e.charAt(t)>="a"&&e.charAt(t)<="z"||e.charAt(t)>="A"&&e.charAt(t)<="Z");)t++;return t},n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var i=e.substring(n,n+3).toLowerCase();switch((i.length>1&&" "===i.charAt(1)||"^"===i.charAt(1)||"_"===i.charAt(1)||"="===i.charAt(1))&&(i=i.charAt(0)),i){case"mix":return{len:t(e,n),token:"Mix"};case"dor":return{len:t(e,n),token:"Dor"};case"phr":return{len:t(e,n),token:"Phr"};case"lyd":return{len:t(e,n),token:"Lyd"};case"loc":return{len:t(e,n),token:"Loc"};case"aeo":return{len:t(e,n),token:"m"};case"maj":case"ion":return{len:t(e,n),token:""};case"min":case"m":return{len:t(e,n),token:"m"}}return{len:0}},this.getClef=function(e,t){var i=e,a=this.skipWhiteSpace(e);if(r(e,a))return{len:0};var s=!1,o=e.substring(a);if(n.startsWith(o,"clef=")&&(s=!0,o=o.substring(5),a+=5),0===o.length&&s)return{len:a+5,warn:"No clef specified: "+i};var c=this.skipWhiteSpace(o);if(r(o,c))return{len:0};c>0&&(a+=c,o=o.substring(c));var l=null;if(n.startsWith(o,"treble"))l="treble";else if(n.startsWith(o,"bass3"))l="bass3";else if(n.startsWith(o,"bass"))l="bass";else if(n.startsWith(o,"tenor"))l="tenor";else if(n.startsWith(o,"alto2"))l="alto2";else if(n.startsWith(o,"alto1"))l="alto1";else if(n.startsWith(o,"alto"))l="alto";else if(!t&&s&&n.startsWith(o,"none"))l="none";else if(n.startsWith(o,"perc"))l="perc";else if(!t&&s&&n.startsWith(o,"C"))l="tenor";else if(!t&&s&&n.startsWith(o,"F"))l="bass";else{if(t||!s||!n.startsWith(o,"G"))return{len:a+5,warn:"Unknown clef specified: "+i};l="treble"}return o=o.substring(l.length),(c=this.isMatch(o,"+8"))>0?l+="+8":(c=this.isMatch(o,"-8"))>0&&(l+="-8"),{len:a+l.length,token:l,explicit:s}},this.getBarLine=function(e,t){switch(e.charAt(t)){case"]":switch(++t,e.charAt(t)){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++t,e.charAt(t)>="1"&&e.charAt(t)<="9"||'"'===e.charAt(t)?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}break;case":":switch(++t,e.charAt(t)){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++t,e.charAt(t)){case"]":switch(++t,e.charAt(t)){case"|":return++t,":"===e.charAt(t)?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:3,token:"bar_right_repeat"}}break;case"|":return++t,":"===e.charAt(t)?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}break;default:return{len:1,warn:"Unknown bar symbol"}}break;case"[":if(++t,"|"!==e.charAt(t))return e.charAt(t)>="1"&&e.charAt(t)<="9"||'"'===e.charAt(t)?{len:1,token:"bar_invisible"}:{len:0};switch(++t,e.charAt(t)){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}break;case"|":switch(++t,e.charAt(t)){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++t,":"===e.charAt(t)?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var r=0;":"===e.charAt(t+r);)r++;return{len:1+r,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(e,t){for(var r=0;r<e.length;r++)if(t.indexOf(e.charAt(r))<0)return{len:r,token:e.substring(0,r)};return{len:r,token:e}},this.getToken=function(e,t,r){for(var n=t;n<r&&!this.isWhiteSpace(e.charAt(n));)n++;return e.substring(t,n)},this.isMatch=function(e,t){var i=this.skipWhiteSpace(e);return r(e,i)?0:n.startsWith(e.substring(i),t)?i+t.length:0},this.getPitchFromTokens=function(e){var t={};if(t.position={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11}[e[0].token],void 0===t.position)return{warn:"Pitch expected. Found: "+e[0].token};for(e.shift();e.length;)switch(e[0].token){case",":t.position-=7,e.shift();break;case"'":t.position+=7,e.shift();break;default:return t}return t},this.getKeyAccidentals2=function(e){for(var t;e.length>0;){var r;if("^"===e[0].token){if(r="sharp",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token){case"^":r="dblsharp",e.shift();break;case"/":r="quartersharp",e.shift()}}else if("="===e[0].token)r="natural",e.shift();else{if("_"!==e[0].token)return{accs:t};if(r="flat",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token){case"_":r="dblflat",e.shift();break;case"/":r="quarterflat",e.shift()}}if(0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token.charAt(0)){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":void 0===t&&(t=[]),t.push({acc:r,note:e[0].token.charAt(0)}),1===e[0].token.length?e.shift():e[0].token=e[0].token.substring(1);break;default:return{accs:t,warn:"Expected note name after "+r+" Found: "+e[0].token}}}return{accs:t}},this.getKeyAccidental=function(e){var t={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var i=null;switch(e.charAt(n)){case"^":case"_":case"=":i=e.charAt(n);break;default:return{len:0}}if(n++,r(e,n))return{len:1,warn:"Expected note name after accidental"};switch(e.charAt(n)){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:n+1,token:{acc:t[i],note:e.charAt(n)}};case"^":case"_":case"/":if(i+=e.charAt(n),n++,r(e,n))return{len:2,warn:"Expected note name after accidental"};switch(e.charAt(n)){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:n+1,token:{acc:t[i],note:e.charAt(n)}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(e){return" "===e||"\t"===e||""===e},this.getMeat=function(e,t,r){var n=e.indexOf("%",t);for(n>=0&&n<r&&(r=n);t<r&&(" "===e.charAt(t)||"\t"===e.charAt(t)||""===e.charAt(t));)t++;for(;t<r&&(" "===e.charAt(r-1)||"\t"===e.charAt(r-1)||""===e.charAt(r-1));)r--;return{start:t,end:r}};var i=function(e){return e>="A"&&e<="Z"||e>="a"&&e<="z"},a=function(e){return e>="0"&&e<="9"};this.tokenize=function(e,t,r,n){var s=this.getMeat(e,t,r);t=s.start,r=s.end;for(var o,c=[];t<r;){if('"'===e.charAt(t)){for(o=t+1;o<r&&'"'!==e.charAt(o);)o++;c.push({type:"quote",token:e.substring(t+1,o),start:t+1,end:o}),o++}else if(i(e.charAt(t))){if(o=t+1,n)for(;o<r&&!this.isWhiteSpace(e.charAt(o));)o++;else for(;o<r&&i(e.charAt(o));)o++;c.push({type:"alpha",token:e.substring(t,o),continueId:a(e.charAt(o)),start:t,end:o}),t=o+1}else if("."===e.charAt(t)&&a(e.charAt(o+1))){o=t+1;for(var l;o<r&&a(e.charAt(o));)o++;l=parseFloat(e.substring(t,o)),c.push({type:"number",token:e.substring(t,o),intt:null,floatt:l,continueId:i(e.charAt(o)),start:t,end:o}),t=o+1}else if(a(e.charAt(t))||"-"===e.charAt(t)&&a(e.charAt(o+1))){o=t+1;for(var h,u=null;o<r&&a(e.charAt(o));)o++;if("."===e.charAt(o)&&a(e.charAt(o+1)))for(o++;o<r&&a(e.charAt(o));)o++;else u=parseInt(e.substring(t,o));h=parseFloat(e.substring(t,o)),c.push({type:"number",token:e.substring(t,o),intt:u,floatt:h,continueId:i(e.charAt(o)),start:t,end:o}),t=o+1}else" "===e.charAt(t)||"\t"===e.charAt(t)||c.push({type:"punct",token:e.charAt(t),start:t,end:t+1}),o=t+1;t=o}return c},this.getVoiceToken=function(e,t,r){for(var n=t;n<r&&this.isWhiteSpace(e.charAt(n))||"="===e.charAt(n);)n++;if('"'===e.charAt(n)){var i=e.indexOf('"',n+1);return-1===i||i>=r?{len:1,err:"Missing close quote"}:{len:i-t+1,token:this.translateString(e.substring(n+1,i))}}for(var a=n;a<r&&!this.isWhiteSpace(e.charAt(a))&&"="!==e.charAt(a);)a++;return{len:a-t+1,token:e.substring(n,a)}};var s={"`a":"à","'a":"á","^a":"â","~a":"ã",'"a':"ä",oa:"å",aa:"å","=a":"ā",ua:"ă",";a":"ą","`e":"è","'e":"é","^e":"ê",'"e':"ë","=e":"ē",ue:"ĕ",";e":"ę",".e":"ė","`i":"ì","'i":"í","^i":"î",'"i':"ï","=i":"ī",ui:"ĭ",";i":"į","`o":"ò","'o":"ó","^o":"ô","~o":"õ",'"o':"ö","=o":"ō",uo:"ŏ","/o":"ø","`u":"ù","'u":"ú","^u":"û","~u":"ũ",'"u':"ü",ou:"ů","=u":"ū",uu:"ŭ",";u":"ų","`A":"À","'A":"Á","^A":"Â","~A":"Ã",'"A':"Ä",oA:"Å",AA:"Å","=A":"Ā",uA:"Ă",";A":"Ą","`E":"È","'E":"É","^E":"Ê",'"E':"Ë","=E":"Ē",uE:"Ĕ",";E":"Ę",".E":"Ė","`I":"Ì","'I":"Í","^I":"Î","~I":"Ĩ",'"I':"Ï","=I":"Ī",uI:"Ĭ",";I":"Į",".I":"İ","`O":"Ò","'O":"Ó","^O":"Ô","~O":"Õ",'"O':"Ö","=O":"Ō",uO:"Ŏ","/O":"Ø","`U":"Ù","'U":"Ú","^U":"Û","~U":"Ũ",'"U':"Ü",oU:"Ů","=U":"Ū",uU:"Ŭ",";U":"Ų",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",ss:"ß","'c":"ć","^c":"ĉ",uc:"č",cc:"ç",".c":"ċ",cC:"Ç","'C":"Ć","^C":"Ĉ",uC:"Č",".C":"Ċ","~N":"Ñ","~n":"ñ","=s":"š",vs:"š",DH:"Ð",dh:"ð",HO:"Ő",Ho:"ő",HU:"Ű",Hu:"ű","'Y":"Ý","'y":"ý","^Y":"Ŷ","^y":"ŷ",'"Y':"Ÿ",'"y':"ÿ",vS:"Š",vZ:"Ž",vz:"ž"},o={"#":"♯",b:"♭","=":"♮"},c={201:"♯",202:"♭",203:"♮",241:"¡",242:"¢",252:"a",262:"2",272:"o",302:"Â",312:"Ê",322:"Ò",332:"Ú",342:"â",352:"ê",362:"ò",372:"ú",243:"£",253:"«",263:"3",273:"»",303:"Ã",313:"Ë",323:"Ó",333:"Û",343:"ã",353:"ë",363:"ó",373:"û",244:"¤",254:"¬",264:"  ́",274:"1⁄4",304:"Ä",314:"Ì",324:"Ô",334:"Ü",344:"ä",354:"ì",364:"ô",374:"ü",245:"¥",255:"-",265:"μ",275:"1⁄2",305:"Å",315:"Í",325:"Õ",335:"Ý",345:"å",355:"í",365:"õ",375:"ý",246:"¦",256:"®",266:"¶",276:"3⁄4",306:"Æ",316:"Î",326:"Ö",336:"Þ",346:"æ",356:"î",366:"ö",376:"þ",247:"§",257:" ̄",267:"·",277:"¿",307:"Ç",317:"Ï",327:"×",337:"ß",347:"ç",357:"ï",367:"÷",377:"ÿ",250:" ̈",260:"°",270:" ̧",300:"À",310:"È",320:"Ð",330:"Ø",340:"à",350:"è",360:"ð",370:"ø",251:"©",261:"±",271:"1",301:"Á",311:"É",321:"Ñ",331:"Ù",341:"á",351:"é",361:"ñ",371:"ù"};this.translateString=function(e){var t=e.split("\\");if(1===t.length)return e;var r=null;return n.each(t,(function(e){if(null===r)r=e;else{var t=s[e.substring(0,2)];void 0!==t?r+=t+e.substring(2):void 0!==(t=c[e.substring(0,3)])?r+=t+e.substring(3):(t=o[e.substring(0,1)],r+=void 0!==t?t+e.substring(1):"\\"+e)}})),r},this.getNumber=function(e,t){for(var r=0;t<e.length;)switch(e.charAt(t)){case"0":r*=10,t++;break;case"1":r=10*r+1,t++;break;case"2":r=10*r+2,t++;break;case"3":r=10*r+3,t++;break;case"4":r=10*r+4,t++;break;case"5":r=10*r+5,t++;break;case"6":r=10*r+6,t++;break;case"7":r=10*r+7,t++;break;case"8":r=10*r+8,t++;break;case"9":r=10*r+9,t++;break;default:return{num:r,index:t}}return{num:r,index:t}},this.getFraction=function(e,t){var r=1,n=1;if("/"!==e.charAt(t)){var i=this.getNumber(e,t);r=i.num,t=i.index}if("/"===e.charAt(t)){if(t++,"/"===e.charAt(t)){for(var a=.5;"/"===e.charAt(t++);)a/=2;return{value:r*a,index:t-1}}var s=t,o=this.getNumber(e,t);0===o.num&&s===t&&(o.num=2),0!==o.num&&(n=o.num),t=o.index}return{value:r/n,index:t}},this.theReverser=function(e){return n.endsWith(e,", The")?"The "+e.substring(0,e.length-5):n.endsWith(e,", A")?"A "+e.substring(0,e.length-3):e},this.stripComment=function(e){var t=e.indexOf("%");return t>=0?n.strip(e.substring(0,t)):n.strip(e)},this.getInt=function(e){var t=parseInt(e);if(isNaN(t))return{digits:0};var r=""+t;return{value:t,digits:e.indexOf(r)+r.length}},this.getFloat=function(e){var t=parseFloat(e);if(isNaN(t))return{digits:0};var r=""+t;return{value:t,digits:e.indexOf(r)+r.length}},this.getMeasurement=function(e){if(0===e.length)return{used:0};var t=1,r="";if("-"===e[0].token)e.shift(),r="-",t++;else if("number"!==e[0].type)return{used:0};if(r+=e.shift().token,0===e.length)return{used:1,value:parseInt(r)};var n=e.shift();if("."===n.token){if(t++,0===e.length)return{used:t,value:parseInt(r)};if("number"===e[0].type&&(r=r+"."+(n=e.shift()).token,t++,0===e.length))return{used:t,value:parseFloat(r)};n=e.shift()}switch(n.token){case"pt":return{used:t+1,value:parseFloat(r)};case"cm":return{used:t+1,value:parseFloat(r)/2.54*72};case"in":return{used:t+1,value:72*parseFloat(r)};default:return e.unshift(n),{used:t,value:parseFloat(r)}}return{used:0}};var l=function(e){for(;-1!==e.indexOf("\\n");)e=e.replace("\\n","\n");return e};this.getBrackettedSubstring=function(e,t,r,n){for(var i=n||e.charAt(t),a=t+1;a<e.length&&e.charAt(a)!==i;)++a;return e.charAt(a)===i?[a-t+1,l(e.substring(t+1,a)),!0]:((a=t+r)>e.length-1&&(a=e.length-1),[a-t+1,l(e.substring(t+1,a)),!1])}};i.prototype.peekLine=function(){return this.lines[this.lineIndex]},i.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex<this.lines.length){var e=this.lines[this.lineIndex];return this.lineIndex++,e}return null},e.exports=i},2821:function(e){var t={},r={C:0,"C#":1,Db:1,D:2,"D#":3,Eb:3,E:4,F:5,"F#":6,Gb:6,G:7,"G#":8,Ab:8,A:9,"A#":10,Bb:10,B:11},n=["C","Db","D","Eb","E","F","F#","G","Ab","A","Bb","B"],i=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];t.keySignature=function(e,t,a,s,o,c){if("perc"===e.clef.type)return{accidentals:t[a],root:s,acc:o};c||(c=0),e.localTransposeVerticalMovement=0,e.localTransposePreferFlats=!1;var l=t[a];if(!l)return e.key;if(e.localTranspose=(e.globalTranspose?e.globalTranspose:0)+c,!e.localTranspose)return{accidentals:l,root:s,acc:o};if(e.globalTransposeOrigKeySig=l,e.localTranspose%12==0)return e.localTransposeVerticalMovement=e.localTranspose/12*7,{accidentals:l,root:s,acc:o};var h=a[0];"b"===a[1]||"#"===a[1]?(h+=a[1],a=a.substr(2)):a=a.substr(1);for(var u=r[h]+e.localTranspose;u<0;)u+=12;u>11&&(u%=12);var d="m"===a[0]?i[u]:n[u],f=d+a,p=t[f];p.length>0&&"flat"===p[0].acc&&(e.localTransposePreferFlats=!0);var m=f.charCodeAt(0)-h.charCodeAt(0);return e.localTranspose>0?m<0?m+=7:0===m&&("#"!==h[1]&&"b"!==f[1]||(m+=7)):e.localTranspose<0&&(m>0?m-=7:0===m&&("b"!==h[1]&&"#"!==f[1]||(m-=7))),e.localTranspose>0?e.localTransposeVerticalMovement=m+7*Math.floor(e.localTranspose/12):e.localTransposeVerticalMovement=m+7*Math.ceil(e.localTranspose/12),{accidentals:p,root:d[0],acc:d.length>1?d[1]:""}};var a=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],s=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],o=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],c=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];t.chordName=function(e,t){if(e.localTranspose&&e.localTranspose%12!=0){for(var r=e.localTranspose;r<0;)r+=12;r>11&&(r%=12);for(var n=(t=(t=(t=(t=(t=(t=(t=(t=e.freegchord?(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/Cb/g,"`~11`")).replace(/Db/g,"`~1`")).replace(/Eb/g,"`~3`")).replace(/Fb/g,"`~4`")).replace(/Gb/g,"`~6`")).replace(/Ab/g,"`~8`")).replace(/Bb/g,"`~10`")).replace(/C#/g,"`~1`")).replace(/D#/g,"`~3`")).replace(/E#/g,"`~5`")).replace(/F#/g,"`~6`")).replace(/G#/g,"`~8`")).replace(/A#/g,"`~10`")).replace(/B#/g,"`~0`"):(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/C♭/g,"`~11`")).replace(/D♭/g,"`~1`")).replace(/E♭/g,"`~3`")).replace(/F♭/g,"`~4`")).replace(/G♭/g,"`~6`")).replace(/A♭/g,"`~8`")).replace(/B♭/g,"`~10`")).replace(/C♯/g,"`~1`")).replace(/D♯/g,"`~3`")).replace(/E♯/g,"`~5`")).replace(/F♯/g,"`~6`")).replace(/G♯/g,"`~8`")).replace(/A♯/g,"`~10`")).replace(/B♯/g,"`~0`")).replace(/C/g,"`~0`")).replace(/D/g,"`~2`")).replace(/E/g,"`~4`")).replace(/F/g,"`~5`")).replace(/G/g,"`~7`")).replace(/A/g,"`~9`")).replace(/B/g,"`~11`")).split("`"),i=0;i<n.length;i++)if("~"===n[i][0]){var l=parseInt(n[i].substr(1),10);(l+=r)>11&&(l-=12),e.freegchord?n[i]=e.localTransposePreferFlats?c[l]:o[l]:n[i]=e.localTransposePreferFlats?s[l]:a[l]}t=n.join("")}return t};var l=["c","d","e","f","g","a","b"],h={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},u={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"};t.note=function(e,t){if(e.localTranspose&&"perc"!==e.clef.type){var r=t.pitch;if(t.pitch=t.pitch+e.localTransposeVerticalMovement,t.accidental){var n=function(e,t,r,n,i){for(var a=l[(e+49)%7],s=0,o=0;o<n.length;o++)n[o].note.toLowerCase()===a&&(s=h[n[o].acc]);for(var c=h[r]-s,u=l[(t+49)%7],d=0,f=0;f<i.accidentals.length;f++)i.accidentals[f].note.toLowerCase()===u&&(d=h[i.accidentals[f].acc]);var p=c+d;return p<-2&&(t--,p+="c"===u||"f"===u?1:2),p>2&&(t++,p-="b"===u||"e"===u?1:2),[t,p]}(r,t.pitch,t.accidental,e.globalTransposeOrigKeySig,e.targetKey);t.pitch=n[0],t.accidental=u[n[1]]}}},e.exports=t},575:function(e,t,r){var n=r(9708),i=r(5008);e.exports=function(e){var t=this;function r(e,t){for(var r=t-1;r>0&&"bar"!==e[r].el_type;r--);return r}this.reset=function(){e.version="1.1.0",e.media="screen",e.metaText={},e.formatting={},e.lines=[],e.staffNum=0,e.voiceNum=0,e.lineNum=0,e.runningFonts={},delete e.visualTranspose},this.setVisualTranspose=function(t){t&&(e.visualTranspose=t)},this.resolveOverlays=function(){for(var t=!1,n=[],a=0;a<e.lines.length;a++){var s=e.lines[a];if(s.staff)for(var o=0;o<s.staff.length;o++){for(var c=s.staff[o],l=[],h=0;h<c.voices.length;h++){var u=c.voices[h];l.push({hasOverlay:!1,voice:[],snip:[]}),n[a]=0;for(var d=0,f=!1,p=0,m=-1,g=0;g<u.length;g++){var v=u[g];if("overlay"!==v.el_type||f)"bar"===v.el_type?(f?(f=!1,l[h].snip.push({start:m,len:g-m}),l[h].voice.push(v)):(d>0&&l[h].voice.push({el_type:"note",duration:d,rest:{type:"invisible"},startChar:v.startChar,endChar:v.endChar}),l[h].voice.push(v)),d=0):"note"===v.el_type?f?l[h].voice.push(v):(d+=v.duration,n[a]+=v.duration):"scale"!==v.el_type&&"stem"!==v.el_type&&"overlay"!==v.el_type&&"style"!==v.el_type&&"transpose"!==v.el_type||l[h].voice.push(v);else{t=!0,f=!0,m=g,l[h].hasOverlay=!0,0===p&&(p=n[a]);for(var b=0;b<a;b++)n[b]&&e.lines[b].staff&&c.voices.length>=e.lines[b].staff[0].voices.length&&e.lines[b].staff[0].voices.push([{el_type:"note",duration:n[b],rest:{type:"invisible"},startChar:v.startChar,endChar:v.endChar}])}}l[h].hasOverlay&&0===l[h].snip.length&&l[h].snip.push({start:m,len:u.length-m})}for(h=0;h<l.length;h++){var y=l[h];if(y.hasOverlay){y.voice.splice(0,0,{el_type:"stem",direction:"down"}),c.voices.push(y.voice);for(var w=y.snip.length-1;w>=0;w--){var k=y.snip[w];c.voices[h].splice(k.start,k.len),c.voices[h].splice(k.start+1,0,{el_type:"stem",direction:"auto"});var x=r(c.voices[h],k.start);c.voices[h].splice(x,0,{el_type:"stem",direction:"up"})}for(w=0;w<c.voices[c.voices.length-1].length;w++){c.voices[c.voices.length-1][w]=i.clone(c.voices[c.voices.length-1][w]);var T=c.voices[c.voices.length-1][w];"bar"===T.el_type&&T.startEnding&&delete T.startEnding,"bar"===T.el_type&&T.endEnding&&delete T.endEnding}}}}}return t},this.cleanUp=function(t,r,a){this.closeLine(),delete e.runningFonts,e.metaText.tempo&&e.metaText.tempo.bpm&&!e.metaText.tempo.duration&&(e.metaText.tempo.duration=[e.getBeatLength()]);var s,o,c,l=!1;for(s=0;s<e.lines.length;s++)if(void 0!==e.lines[s].staff){var h=!1;for(o=0;o<e.lines[s].staff.length;o++)if(void 0===e.lines[s].staff[o])l=!0,e.lines[s].staff[o]=null;else for(c=0;c<e.lines[s].staff[o].voices.length;c++)void 0===e.lines[s].staff[o].voices[c]?e.lines[s].staff[o].voices[c]=[]:this.containsNotes(e.lines[s].staff[o].voices[c])&&(h=!0);h||(e.lines[s]=null,l=!0)}if(l&&(e.lines=i.compact(e.lines),i.each(e.lines,(function(e){e.staff&&(e.staff=i.compact(e.staff))}))),t)for(;p(e.lines,t););if(r){for(l=!1,s=0;s<e.lines.length;s++)if(void 0!==e.lines[s].staff)for(o=0;o<e.lines[s].staff.length;o++){var u=!1;for(c=0;c<e.lines[s].staff[o].voices.length;c++)this.containsNotesStrict(e.lines[s].staff[o].voices[c])&&(u=!0);u||(l=!0,e.lines[s].staff[o]=null)}l&&i.each(e.lines,(function(e){e.staff&&(e.staff=i.compact(e.staff))}))}for(function(e){for(var t=!0,r=0;r<e.length;r++){var n=e[r];if(n.staff){for(var i=0;i<n.staff.length;i++){var a=n.staff[i];if(a.title){for(var s=!1,o=0;o<a.title.length;o++)a.title[o]?(a.title[o]=t?a.title[o].name:a.title[o].subname,a.title[o]?s=!0:a.title[o]=""):a.title[o]="";s||delete a.title}}t=!1}}}(e.lines),s=0;s<e.lines.length;s++)if(e.lines[s].staff)for(o=0;o<e.lines[s].staff.length;o++)delete e.lines[s].staff[o].workingClef;for(;this.resolveOverlays(););function d(e,t,r){var n;a[t]||(a[t]=[]),a[t][r]||(a[t][r]=[]);for(var s=function(e,s,o){if(void 0===a[t][r][o]){for(n=0;n<a[t][r].length;n++)if(void 0!==a[t][r][n]){o=n;break}if(void 0===a[t][r][o]){var c=100*o+1;i.each(e.endSlur,(function(e){c===e&&--c})),a[t][r][o]=[c]}}for(var l,h=0;h<s;h++)l=a[t][r][o].pop(),e.endSlur.push(l);return 0===a[t][r][o].length&&delete a[t][r][o],l},o=function(e,n,s,o){e.startSlur=[],void 0===a[t][r][s]&&(a[t][r][s]=[]);for(var c=100*s+1,l=0;l<n;l++)o&&(i.each(o,(function(e){c===e&&++c})),i.each(o,(function(e){c===e&&++c})),i.each(o,(function(e){c===e&&++c}))),i.each(a[t][r][s],(function(e){c===e&&++c})),i.each(a[t][r][s],(function(e){c===e&&++c})),a[t][r][s].push(c),e.startSlur.push({label:c}),e.dottedSlur&&(e.startSlur[e.startSlur.length-1].style="dotted",delete e.dottedSlur),c++},c=0;c<e.length;c++){var l=e[c];if("note"===l.el_type){if(l.gracenotes)for(var h=0;h<l.gracenotes.length;h++){if(l.gracenotes[h].endSlur){var u=l.gracenotes[h].endSlur;l.gracenotes[h].endSlur=[];for(var d=0;d<u;d++)s(l.gracenotes[h],1,20)}l.gracenotes[h].startSlur&&(n=l.gracenotes[h].startSlur,o(l.gracenotes[h],n,20))}if(l.endSlur&&(n=l.endSlur,l.endSlur=[],s(l,n,0)),l.startSlur&&o(l,n=l.startSlur,0),l.pitches){for(var f=[],p=0;p<l.pitches.length;p++)if(l.pitches[p].endSlur){var m=l.pitches[p].endSlur;l.pitches[p].endSlur=[];for(var g=0;g<m;g++){var v=s(l.pitches[p],1,p+1);f.push(v)}}for(p=0;p<l.pitches.length;p++)l.pitches[p].startSlur&&(n=l.pitches[p].startSlur,o(l.pitches[p],n,p+1,f));l.gracenotes&&l.pitches[0].endSlur&&100===l.pitches[0].endSlur[0]&&l.pitches[0].startSlur&&(l.gracenotes[0].endSlur?l.gracenotes[0].endSlur.push(l.pitches[0].startSlur[0].label):l.gracenotes[0].endSlur=[l.pitches[0].startSlur[0].label],1===l.pitches[0].endSlur.length?delete l.pitches[0].endSlur:100===l.pitches[0].endSlur[0]?l.pitches[0].endSlur.shift():100===l.pitches[0].endSlur[l.pitches[0].endSlur.length-1]&&l.pitches[0].endSlur.pop(),1===a[t][r][1].length?delete a[t][r][1]:a[t][r][1].pop())}}}}function f(e){n.fixClef(e)}function p(e,t){for(s=0;s<e.length;s++)if(void 0!==e[s].staff)for(o=0;o<e[s].staff.length;o++){var r=[];for(c=0;c<e[s].staff[o].voices.length;c++)for(var n=e[s].staff[o].voices[c],a=0,l=0;l<n.length;l++)if("bar"===n[l].el_type){if(++a>=t&&l<n.length-1){var h=m(e,s);if(!h){var u=JSON.parse(JSON.stringify(e[s]));e.push(i.clone(u)),h=e[e.length-1];for(var d=0;d<h.staff.length;d++)for(var f=0;f<h.staff[d].voices.length;f++)h.staff[d].voices[f]=[]}var p=l+1,g=e[s].staff[o].voices[c].slice(p);return e[s].staff[o].voices[c]=e[s].staff[o].voices[c].slice(0,p),h.staff[o].voices[c]=r.concat(g.concat(h.staff[o].voices[c])),!0}}else n[l].duration||r.push(n[l])}return!1}function m(e,t){for(t++;e.length>t;){if(e[t].staff)return e[t];t++}return null}for(e.lineNum=0;e.lineNum<e.lines.length;e.lineNum++){var g=e.lines[e.lineNum].staff;if(g)for(e.staffNum=0;e.staffNum<g.length;e.staffNum++)for(g[e.staffNum].clef&&f(g[e.staffNum].clef),e.voiceNum=0;e.voiceNum<g[e.staffNum].voices.length;e.voiceNum++){var v=g[e.staffNum].voices[e.voiceNum];d(v,e.staffNum,e.voiceNum);for(var b=0;b<v.length;b++)"clef"===v[b].el_type&&f(v[b]);if(v.length>0&&v[v.length-1].barNumber){var y=m(e.lines,e.lineNum);y&&(y.staff[0].barNumber=v[v.length-1].barNumber),delete v[v.length-1].barNumber}}}return delete e.staffNum,delete e.voiceNum,delete e.lineNum,delete e.potentialStartBeam,delete e.potentialEndBeam,delete e.vskipPending,a},this.reset(),this.getLastNote=function(){if(e.lines[e.lineNum]&&e.lines[e.lineNum].staff&&e.lines[e.lineNum].staff[e.staffNum]&&e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum])for(var t=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum].length-1;t>=0;t--){var r=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum][t];if("note"===r.el_type)return r}return null},this.addTieToLastNote=function(e){var t=this.getLastNote();return!!(t&&t.pitches&&t.pitches.length>0)&&(t.pitches[0].startTie={},e&&(t.pitches[0].startTie.style="dotted"),!0)},this.getDuration=function(e){return e.duration?e.duration:0},this.closeLine=function(){e.potentialStartBeam&&e.potentialEndBeam&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam},this.appendElement=function(r,n,a,s){var o=e;s.el_type=r,null!==n&&(s.startChar=n),null!==a&&(s.endChar=a);var c=function(){void 0!==o.potentialStartBeam&&void 0!==o.potentialEndBeam&&(o.potentialStartBeam.startBeam=!0,o.potentialEndBeam.endBeam=!0),delete o.potentialStartBeam,delete o.potentialEndBeam};"note"===r?t.getDuration(s)>=.25||s.force_end_beam_last&&void 0!==o.potentialStartBeam?c():s.end_beam&&void 0!==o.potentialStartBeam?void 0===s.rest?(o.potentialStartBeam.startBeam=!0,s.endBeam=!0,delete o.potentialStartBeam,delete o.potentialEndBeam):c():void 0===s.rest&&(void 0===o.potentialStartBeam?s.end_beam||(o.potentialStartBeam=s,delete o.potentialEndBeam):o.potentialEndBeam=s):c(),delete s.end_beam,delete s.force_end_beam_last,function(e){var t=o.lines[o.lineNum].staff[o.staffNum];if(t){if(void 0!==e.pitches){var r=t.workingClef.verticalPos;i.each(e.pitches,(function(e){e.verticalPos=e.pitch-r}))}if(void 0!==e.gracenotes){var n=t.workingClef.verticalPos;i.each(e.gracenotes,(function(e){e.verticalPos=e.pitch-n}))}t.voices[o.voiceNum].push(e)}}(s)},this.appendStartingElement=function(t,r,n,a){var s;this.closeLine(),"key"===t&&(s=a.impliedNaturals,delete a.impliedNaturals,delete a.explicitAccidentals);var o=i.clone(a);if(e.lines[e.lineNum]&&e.lines[e.lineNum].staff){e.lines[e.lineNum].staff.length<=e.staffNum&&(e.lines[e.lineNum].staff[e.staffNum]={},e.lines[e.lineNum].staff[e.staffNum].clef=i.clone(e.lines[e.lineNum].staff[0].clef),e.lines[e.lineNum].staff[e.staffNum].key=i.clone(e.lines[e.lineNum].staff[0].key),e.lines[e.lineNum].staff[0].meter&&(e.lines[e.lineNum].staff[e.staffNum].meter=i.clone(e.lines[e.lineNum].staff[0].meter)),e.lines[e.lineNum].staff[e.staffNum].workingClef=i.clone(e.lines[e.lineNum].staff[0].workingClef),e.lines[e.lineNum].staff[e.staffNum].voices=[[]]),"clef"===t&&(e.lines[e.lineNum].staff[e.staffNum].workingClef=o);for(var c=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum],l=0;l<c.length;l++){if("note"===c[l].el_type||"bar"===c[l].el_type)return o.el_type=t,o.startChar=r,o.endChar=n,s&&(o.accidentals=s.concat(o.accidentals)),void c.push(o);if(c[l].el_type===t)return o.el_type=t,o.startChar=r,o.endChar=n,s&&(o.accidentals=s.concat(o.accidentals)),void(c[l]=o)}e.lines[e.lineNum].staff[e.staffNum][t]=a}},this.pushLine=function(t){e.vskipPending&&(t.vskip=e.vskipPending,delete e.vskipPending),e.lines.push(t)},this.addSubtitle=function(e){this.pushLine({subtitle:e})},this.addSpacing=function(t){e.vskipPending=t},this.addNewPage=function(e){this.pushLine({newpage:e})},this.addSeparator=function(e,t,r){this.pushLine({separator:{spaceAbove:Math.round(e),spaceBelow:Math.round(t),lineLength:Math.round(r)}})},this.addText=function(e){this.pushLine({text:e})},this.addCentered=function(e){this.pushLine({text:[{text:e,center:!0}]})},this.containsNotes=function(e){for(var t=0;t<e.length;t++)if("note"===e[t].el_type||"bar"===e[t].el_type)return!0;return!1},this.containsNotesStrict=function(e){for(var t=0;t<e.length;t++)if("note"===e[t].el_type&&void 0===e[t].rest)return!0;return!1},this.changeVoiceScale=function(e){t.appendElement("scale",null,null,{size:e})},this.startNewLine=function(r){var n=e;this.closeLine();var i=function(e){var r=n.lines[n.lineNum].staff[n.staffNum];if(r.voices[n.voiceNum]=[],r.title||(r.title=[]),r.title[n.voiceNum]={name:e.name,subname:e.subname},e.style&&t.appendElement("style",null,null,{head:e.style}),e.stem)t.appendElement("stem",null,null,{direction:e.stem});else if(n.voiceNum>0){if(void 0!==r.voices[0]){for(var i=!1,a=0;a<r.voices[0].length;a++)"stem"===r.voices[0].el_type&&(i=!0);i||r.voices[0].splice(0,0,{el_type:"stem",direction:"up"})}t.appendElement("stem",null,null,{direction:"down"})}e.scale&&t.appendElement("scale",null,null,{size:e.scale})},a=function(e){e.key&&e.key.impliedNaturals&&(e.key.accidentals=e.key.accidentals.concat(e.key.impliedNaturals),delete e.key.impliedNaturals),n.lines[n.lineNum].staff[n.staffNum]={voices:[],clef:e.clef,key:e.key,workingClef:e.clef},void 0!==e.stafflines&&(n.lines[n.lineNum].staff[n.staffNum].clef.stafflines=e.stafflines,n.lines[n.lineNum].staff[n.staffNum].workingClef.stafflines=e.stafflines),e.staffscale&&(n.lines[n.lineNum].staff[n.staffNum].staffscale=e.staffscale),e.annotationfont&&t.setLineFont("annotationfont",e.annotationfont),e.gchordfont&&t.setLineFont("gchordfont",e.gchordfont),e.tripletfont&&t.setLineFont("tripletfont",e.tripletfont),e.vocalfont&&t.setLineFont("vocalfont",e.vocalfont),e.bracket&&(n.lines[n.lineNum].staff[n.staffNum].bracket=e.bracket),e.brace&&(n.lines[n.lineNum].staff[n.staffNum].brace=e.brace),e.connectBarLines&&(n.lines[n.lineNum].staff[n.staffNum].connectBarLines=e.connectBarLines),e.barNumber&&(n.lines[n.lineNum].staff[n.staffNum].barNumber=e.barNumber),i(e),e.part&&t.appendElement("part",e.part.startChar,e.part.endChar,{title:e.part.title}),void 0!==e.meter&&(n.lines[n.lineNum].staff[n.staffNum].meter=e.meter),n.vskipPending&&(n.lines[n.lineNum].vskip=n.vskipPending,delete n.vskipPending)};void 0===e.lines[e.lineNum]?function(e){n.lines[n.lineNum]={staff:[]},a(e)}(r):void 0===e.lines[e.lineNum].staff?(e.lineNum++,this.startNewLine(r)):void 0===e.lines[e.lineNum].staff[e.staffNum]?a(r):void 0===e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum]?i(r):this.containsNotes(e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum])?(e.lineNum++,this.startNewLine(r)):r.part&&t.appendElement("part",r.part.startChar,r.part.endChar,{title:r.part.title})},this.setRunningFont=function(t,r){e.runningFonts[t]=r},this.setLineFont=function(t,r){if(e.runningFonts[t]){for(var n=!1,i=Object.keys(r),a=0;a<i.length;a++)e.runningFonts[t][i[a]]!==r[i[a]]&&(n=!0);n&&(e.lines[e.lineNum].staff[e.staffNum][t]=r)}e.runningFonts[t]=r},this.setBarNumberImmediate=function(e){var t=this.getCurrentVoice();if(t&&t.length>0){var r=t[t.length-1];if("bar"!==r.el_type)return e-1;void 0!==r.barNumber&&(r.barNumber=e)}return e},this.hasBeginMusic=function(){for(var t=0;t<e.lines.length;t++)if(e.lines[t].staff)return!0;return!1},this.isFirstLine=function(t){for(var r=t-1;r>=0;r--)if(void 0!==e.lines[r].staff)return!1;return!0},this.getCurrentVoice=function(){var t=e.lines[e.lineNum];if(!t)return null;var r=t.staff[e.staffNum];return r&&void 0!==r.voices[e.voiceNum]?r.voices[e.voiceNum]:null},this.setCurrentVoice=function(t,r){e.staffNum=t,e.voiceNum=r;for(var n=0;n<e.lines.length;n++)if(e.lines[n].staff&&(void 0===e.lines[n].staff[t]||void 0===e.lines[n].staff[t].voices[r]||!this.containsNotes(e.lines[n].staff[t].voices[r])))return void(e.lineNum=n);e.lineNum=n},this.addMetaText=function(t,r){void 0===e.metaText[t]?e.metaText[t]=r:e.metaText[t]+="\n"+r},this.addMetaTextArray=function(t,r){void 0===e.metaText[t]?e.metaText[t]=[r]:e.metaText[t].push(r)},this.addMetaTextObj=function(t,r){e.metaText[t]=r}}},1756:function(e){function t(e,t){for(var r=[],n=[],i=0,a=0;a<e.length;a++){var s=e[a],o=i+s;o<t?i=o:t-i<o-t&&i>0?(r.push(a-1),n.push(Math.round(i-s)),i=s):a<e.length-1&&(r.push(a),n.push(Math.round(i)),i=0)}return n.push(Math.round(i)),{lineBreaks:r,totals:n}}function r(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r]);return t}function n(e,t,n,i,a,s,o,c,l,h,u){for(var d=h;d<e.length;d++){var f=e[d];n+=f,i+=f;var p=Math.abs(n-t[c]);if(Math.abs(p-s)<t[0]/10)if(p<s){var m=r(a),g=r(l);g.push(d-1),m.push(i-f),u.push({accumulator:n,lineAccumulator:f,lineWidths:m,lastVariance:Math.abs(n-t[c+1]),highestVariance:Math.max(o,s),currLine:c+1,lineBreaks:g,startIndex:d+1})}else p>s&&d<e.length-1&&(m=r(a),g=r(l),u.push({accumulator:n,lineAccumulator:i,lineWidths:m,lastVariance:p,highestVariance:Math.max(o,p),currLine:c,lineBreaks:g,startIndex:d+1}));p>s?(l.push(d-1),c++,o=Math.max(o,s),s=Math.abs(n-t[c]),a.push(i-f),i=f):s=p}a.push(i)}function i(e,t,r,i){for(var a=Math.ceil(e.total/t),s=Math.floor(e.total/a),o=[],c=0;c<a;c++)o.push(s*(c+1));var l=[];l.push({accumulator:0,lineAccumulator:0,lineWidths:[],lastVariance:999999,highestVariance:0,currLine:0,lineBreaks:[],startIndex:0});for(var h=0;h<l.length;)n(e.measureWidths,o,l[h].accumulator,l[h].lineAccumulator,l[h].lineWidths,l[h].lastVariance,l[h].highestVariance,l[h].currLine,l[h].lineBreaks,l[h].startIndex,l),h++;for(c=0;c<l.length;c++){var u=l[c];u.variances=[],u.aveVariance=0;for(var d=0;d<u.lineWidths.length;d++){var f=u.lineWidths[d];u.variances.push(f-o[0]),u.aveVariance+=Math.abs(f-o[0])}u.aveVariance=u.aveVariance/u.lineWidths.length,i.attempts.push({type:"optimizeLineWidths",lineBreaks:u.lineBreaks,variances:u.variances,aveVariance:u.aveVariance,widths:e.measureWidths})}var p=9999999,m=-1;for(c=0;c<l.length;c++)(u=l[c]).aveVariance<p&&(p=u.aveVariance,m=c);return{failed:!1,lineBreaks:l[m].lineBreaks,variance:l[m].highestVariance}}function a(e,t,r){for(var n=[],i=[],a=0,s=!1,o=0;o<e.length;o++)(a+=e[o])>t&&(s=!0),o%r==r-1&&(o!==e.length-1&&n.push(o),i.push(Math.round(a)),a=0);return{failed:s,totals:i,lineBreaks:n}}e.exports={wrapLines:function(e,t){if(t&&0!==e.lines.length){var r=e.deline({lineBreaks:!1}),n=function(e,t){for(var r=[],n=0,i=0,a=0,s=0;s<e.length;s++){var o=e[s];if(o.staff){var c=i,l=t[n];n++;for(var h=0;h<o.staff.length;h++)for(var u=o.staff[h],d=0;d<u.voices.length;d++){a=c;for(var f=0,p=0,m=u.voices[d],g=0,v=0;v<m.length;v++)"bar"===m[v].el_type&&(l[p]===f&&(r.push({ogLine:s,line:a,staff:h,voice:d,start:g,end:v}),g=v+1,a++,i=Math.max(i,a),p++),f++);r.push({ogLine:s,line:a,staff:h,voice:d,start:g,end:m.length}),a++,i=Math.max(i,a)}}else r.push({ogLine:s,line:a}),a++,i=Math.max(i,a)}return r}(r,t);e.lines=function(e,t){for(var r=[],n=[],i=[],a=0;a<t.length;a++){var s=t[a];if(e[s.ogLine].staff){var o=e[s.ogLine].staff[s.staff];if(r[s.line]||(r[s.line]={staff:[]}),!r[s.line].staff[s.staff]){r[s.line].staff[s.staff]={voices:[]};for(var c=Object.keys(o),l=0;l<c.length;l++){var h="voices"===c[l];"meter"===c[l]&&0!==s.line&&(h=!0),h||(r[s.line].staff[s.staff][c[l]]=o[c[l]])}n[s.staff]&&(r[s.line].staff[s.staff].key=n[s.staff])}r[s.line].staff[s.staff].voices[s.voice]||(r[s.line].staff[s.staff].voices[s.voice]=[]),r[s.line].staff[s.staff].voices[s.voice]=e[s.ogLine].staff[s.staff].voices[s.voice].slice(s.start,s.end+1),i[10*s.staff+s.voice]&&r[s.line].staff[s.staff].voices[s.voice].unshift({el_type:"stem",direction:i[10*s.staff+s.voice].direction});for(var u=r[s.line].staff[s.staff].voices[s.voice],d=u.length-1;d>=0;d--)if("key"===u[d].el_type){n[s.staff]={root:u[d].root,acc:u[d].acc,mode:u[d].mode,accidentals:u[d].accidentals.filter((function(e){return"natural"!==e.acc}))};break}for(d=u.length-1;d>=0;d--)if("stem"===u[d].el_type){i[10*s.staff+s.voice]={direction:u[d].direction};break}}else r[s.line]=e[s.ogLine]}for(var f=0;f<r.length;f++)r[f].staff&&(r[f].staff=r[f].staff.filter((function(e){return null!=e})));return r}(r,n),e.lineBreaks=n}},calcLineWraps:function(e,r,n){if(0===r.length||n.staffwidth<r[0].left)return{reParse:!1,explanation:"Staff width is narrower than the margin",revisedParams:n};var s=n.scale?Math.max(n.scale,.1):1,o=n.wrap.minSpacing?Math.max(parseFloat(n.wrap.minSpacing),1):1,c=n.wrap.minSpacingLimit?Math.max(parseFloat(n.wrap.minSpacingLimit),1):o-.1,l=n.wrap.maxSpacing?Math.max(parseFloat(n.wrap.maxSpacing),1):void 0;n.wrap.lastLineLimit&&!l&&(l=Math.max(parseFloat(n.wrap.lastLineLimit),1));for(var h=n.wrap.preferredMeasuresPerLine?Math.max(parseInt(n.wrap.preferredMeasuresPerLine,10),0):void 0,u=[],d=[],f=0;f<r.length;f++){var p=r[f],m=n.staffwidth-p.left,g=m/o/s,v=m/c/s,b={widths:p,lineBreakPoint:g,minLineSize:m/l/s,attempts:[],staffWidth:n.staffwidth,minWidth:Math.round(v)},y=null;if(h){var w=a(p.measureWidths,g,h);b.attempts.push({type:"Fixed Measures Per Line",preferredMeasuresPerLine:h,lineBreaks:w.lineBreaks,failed:w.failed,totals:w.totals}),w.failed||(y=w.lineBreaks)}if(!y){var k=t(p.measureWidths,g);b.attempts.push({type:"Free Form",lineBreaks:k.lineBreaks,totals:k.totals}),(y=k.lineBreaks).length>0&&p.measureWidths.length<25&&(k=i(p,g,0,b),b.attempts.push({type:"Optimize",failed:k.failed,reason:k.reason,lineBreaks:k.lineBreaks,totals:k.totals}),k.failed||(y=k.lineBreaks))}u.push(y),d.push(b)}var x=function(e,t,r){var n={lineBreaks:e,staffwidth:t};for(var i in r)r.hasOwnProperty(i)&&"wrap"!==i&&"staffwidth"!==i&&(n[i]=r[i]);return{revisedParams:n}}(u,n.staffwidth,n);return x.explanation=d,x.reParse=!0,x}}},9716:function(e,t,r){var n,i=r(5008),a=r(5058);!function(){"use strict";var e,t,r,s,o,c,l,h,u,d,f,p,m,g,v,b,y,w,k,x,T,C,A,S=1,_={num:4,den:4},M=64,E=48,N=!1,B=!1,P=!0,L=105,H=95,O=85,z=.25,D=0,I={},F=0;function j(e){for(var t=u.length-1;t>=0;t--)if("program"===u[t].cmd)return void(u[t].channel=e)}function V(e){return e/1e6}function Y(e){return Math.round(e*S*1e6)/1e6}function q(e){switch(parseInt(e.den,10)){case 2:return.5;case 4:return.25;case 8:return e.num%3==0?.375:.125;case 16:return.125}return.25}n=function(n,i,a){i||(i={}),e=[],t=[0,0,0,0,0,0,0],s=[],o=i.qpm,c=void 0,S=1,l=void 0,h=void 0,u=void 0,d=void 0,f=0,A=a,_={num:4,den:4},p=[],m=!1,v=n.length,g=!1,b=[],M=64,E=48,y=void 0,w=void 0,N=!!i.chordsOff,B=!1,P=!0,L=105,H=95,O=85,z=.25,x=void 0,T=void 0,D=0,C=[],I={},n.length>0&&n[0].length>0&&(F=n[0][0].pickupLength),function(e,t){for(var r=0;r<e.length;r++){for(var n=e[r],i={},a=t.qpm,s=0,o=1,c=0;c<n.length;c++){var l=n[c];if("tempo"!==l.el_type){l.time=s;var h=l.duration?l.duration:0;if(s+=Math.round(h*o*1e6),l.pitches){for(var u=0;u<l.pitches.length;u++){var d=l.pitches[u];if(d)if(d.duration=l.duration,d.startTie)void 0===i[d.pitch]?i[d.pitch]={el:c,pitch:u}:(n[i[d.pitch].el].pitches[i[d.pitch].pitch].duration+=d.duration,l.pitches[u]=null);else if(d.endTie){var f=i[d.pitch];if(f){var p=d.duration;delete n[f.el].pitches[f.pitch].startTie,n[f.el].pitches[f.pitch].duration+=p,l.pitches[u]=null,delete i[d.pitch]}else delete d.endTie}}delete l.duration}}else a?o=l.qpm?a/l.qpm:1:a=l.qpm}for(var m in i)if(i.hasOwnProperty(m)){var g=i[m];delete n[g.el].pitches[g.pitch].startTie}}}(n,i);for(var Y=0;Y<n.length;Y++){r=0;var G=n[Y];u=[{cmd:"program",channel:Y,instrument:l}],d=void 0,k=0;var W=!1;(!0===i.voicesOff||i.voicesOff&&i.voicesOff.length&&i.voicesOff.indexOf(Y)>=0)&&(W=!0);for(var R=0;R<G.length;R++){var X=G[R];switch(X.el_type){case"name":d={cmd:"text",type:"name",text:X.trackName};break;case"note":U(X,W)&&(m=Y);break;case"key":t=$(X);break;case"meter":c||(c=X),z=q(_=X);break;case"tempo":o?S=X.qpm?o/X.qpm:1:o=X.qpm;break;case"transpose":r=X.transpose;break;case"bar":p.length>0&&(!1===m||Y===m)&&(se(k,V(X.time)),b=[]),e=[],0===Y&&ce(n.length+1),B=!1,w=y,k=V(X.time);break;case"bagpipes":break;case"instrument":if(void 0===l&&(l=X.program),h=X.program,u.length>0&&"program"===u[u.length-1].cmd)u[u.length-1].instrument=X.program;else{var K;for(K=u.length-1;K>=0&&"program"!==u[K].cmd;K--);(K<0||u[K].instrument!==X.program)&&u.push({cmd:"program",channel:0,instrument:X.program})}break;case"channel":j(X.channel);break;case"drum":I=oe(X.params);break;case"gchord":i.chordsOff||(N=X.tacet);break;case"beat":L=X.beats[0],H=X.beats[1],O=X.beats[2];break;case"vol":x=X.volume;break;case"volinc":T=X.volume;break;case"beataccents":P=X.value;break;default:console.log("MIDI creation. Unknown el_type: "+X.el_type+"\n")}}void 0===u[0].instrument&&(u[0].instrument=l||0),d&&u.unshift(d),s.push(u),p.length>0&&(g=!0),C.length}return i.detuneOctave&&function(e,t){for(var r={},n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++){var a=e[n][i];"note"===a.cmd&&(void 0===r[a.start]&&(r[a.start]=[]),r[a.start].push({track:n,event:i,pitch:a.pitch}))}var s=Object.keys(r);for(n=0;n<s.length;n++){var o=r[s[n]];if(o.length>1){var c=(o=o.sort((function(e,t){return e.pitch-t.pitch})))[o.length-1],l=c.pitch%12,h=!1;for(i=0;!h&&i<o.length-1;i++)o[i].pitch%12===l&&(h=!0);if(h){var u=e[c.track][c.event];u.cents||(u.cents=0),u.cents+=t}}}}(s,parseInt(i.detuneOctave,10)),p.length>0&&s.push(p),C.length>0&&s.push(C),{tempo:o,instrument:l,tracks:s,totalDuration:f}};var G=["break","(break)","no chord","n.c.","tacet"];function W(e,t,r){return(r-e)/t}function R(e){var t=!1,n=function(e){if(N)return"break";if(g||!e.chord||0===e.chord.length)return null;for(var t=0;t<e.chord.length;t++){var r=e.chord[t];if("default"===r.position)return r.name;if(G.indexOf(r.name.toLowerCase())>=0)return"break"}return null}(e);if(n){var i=function(e){if(0!==e.length){if("break"===e)return{chick:[]};var t=e.substring(0,1);if("("===t){if(0===(e=e.substring(1,e.length-2)).length)return;t=e.substring(0,1)}var n=ee[t];if(n){for(var i=r;i<-8;)i+=12;for(;i>8;)i-=12;var a,s=(n+=i)-5;1===e.length&&(a=re(n,""));var o=e.substring(1),c=o.substring(0,1);"b"===c||"♭"===c?(n--,s--,o=o.substring(1)):"#"!==c&&"♯"!==c||(n++,s++,o=o.substring(1));var l=o.split("/");if((a=re(n,l[0])).length>=3&&(s=s+(a[2]-a[0])-7),2===l.length&&ee[l[1].substring(0,1)]){var h={"#":1,"♯":1,b:-1,"♭":-1}[l[1].substring(1)]||0;s=n=ee[l[1].substring(0,1)]+h+i}return{boom:n,boom2:s,chick:a}}}}(n);if(i){0===p.length&&(t=!0,p.push({cmd:"program",channel:v,instrument:0})),y=i;var a=W(k,q(_),V(e.time));b.push({chord:y,beat:a,start:V(e.time)})}}return t}function X(e,t){var r=t.start,n=t.duration,i=Y(1/32);switch(e){case"trill":for(var a=1;n>0;)u.push({cmd:"note",pitch:t.pitch+a,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),a=1===a?0:1,n-=i,r+=i;break;case"mordent":u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),n-=i,r+=i,u.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),n-=i,r+=i,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:n,gap:0,instrument:h});break;case"lowermordent":u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),n-=i,r+=i,u.push({cmd:"note",pitch:t.pitch-1,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),n-=i,r+=i,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:n,gap:0,instrument:h});break;case"turn":i=t.duration/5,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:r+i,duration:i,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r+2*i,duration:i,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:r+3*i,duration:i,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r+4*i,duration:i,gap:0,instrument:h});break;case"roll":for(;n>0;)u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),n-=2*i,r+=2*i}}function U(e,t){u.length;var r,n=function(e,t){if(t)return 0;var r;if(x)r=x,x=void 0;else if(P)if(F>e)r=O;else{_.num,_.den;var n=W(k,q(_),e);r=0===n?L:parseInt(n,10)===n?H:O}else r=H;return T&&(r+=T,T=void 0),r<0&&(r=0),r>127&&(r=127),t?0:r}(V(e.time),t),s=R(e);if(e.gracenotes&&e.pitches&&e.pitches.length>0&&e.pitches[0]&&(r=function(e,t){for(var r,n=0,i=[],a=0;a<e.length;a++)n+=(r=e[a]).duration;var s=t/2/n;for(a=0;a<e.length;a++){var o={pitch:Q(r=e[a]),duration:r.duration*s};o=J(o),i.push(o)}return i}(e.gracenotes,e.pitches[0].duration),e.elem&&(e.elem.midiGraceNotePitches=function(e,t,r,n){var i=[];r=Math.round(r);for(var a=0;a<e.length;a++){var s=e[a];u.push({cmd:"note",pitch:s.pitch,volume:r,start:t,duration:s.duration,gap:0,instrument:n,style:"grace"}),i.push({pitch:s.pitch,durationInMeasures:s.duration,volume:r,instrument:n}),t+=s.duration}return i}(r,V(e.time),2*n/3,h))),e.elem){var c=V(e.time),l=c/z/o*60*1e3;if(void 0===e.elem.currentTrackMilliseconds)e.elem.currentTrackMilliseconds=l,e.elem.currentTrackWholeNotes=c;else if(void 0===e.elem.currentTrackMilliseconds.length)e.elem.currentTrackMilliseconds!==l&&(e.elem.currentTrackMilliseconds=[e.elem.currentTrackMilliseconds,l],e.elem.currentTrackWholeNotes=[e.elem.currentTrackWholeNotes,c]);else{for(var d=!1,p=0;p<e.elem.currentTrackMilliseconds.length;p++)e.elem.currentTrackMilliseconds[p]===l&&(d=!0);d||(e.elem.currentTrackMilliseconds.push(l),e.elem.currentTrackWholeNotes.push(c))}}if(e.pitches){var m="",g=function(e,t){var r={};if(e.decoration)for(var n=0;n<e.decoration.length;n++)"staccato"===e.decoration[n]?r.thisBreakBetweenNotes="staccato":"tenuto"===e.decoration[n]?r.thisBreakBetweenNotes="tenuto":"accent"===e.decoration[n]?r.velocity=Math.min(127,1.5*t):"trill"===e.decoration[n]?r.noteModification="trill":"lowermordent"===e.decoration[n]?r.noteModification="lowermordent":"uppermordent"===e.decoration[n]||"mordent"===e.decoration[n]?r.noteModification="mordent":"turn"===e.decoration[n]?r.noteModification="turn":"roll"===e.decoration[n]&&(r.noteModification="roll");return r}(e,n);g.thisBreakBetweenNotes&&(m=g.thisBreakBetweenNotes),g.velocity&&(n=g.velocity);var v=e.pitches;if("rhythm"===e.style&&(B=!0,y&&y.chick)){v=[];for(var b=0;b<y.chick.length;b++){var w=i.clone(e.pitches[0]);w.actualPitch=y.chick[b],v.push(w)}}e.elem&&(e.elem.midiPitches=[]);for(var C=0;C<v.length;C++){var S=v[C];if(S){S.startSlur&&(D+=S.startSlur.length),S.endSlur&&(D-=S.endSlur.length);var M=S.actualPitch?S.actualPitch:Q(S);if(128===h&&A){var E=a(S);E&&A[E]&&(M=A[E].sound)}var N={cmd:"note",pitch:M,volume:n,start:V(e.time),duration:Y(S.duration),instrument:h};if(N=J(N),e.gracenotes&&(N.duration=N.duration/2,N.start=N.start+N.duration),e.elem&&e.elem.midiPitches.push(N),g.noteModification)X(g.noteModification,N);else{switch(D>0?N.endType="tenuto":m&&(N.endType=m),N.endType){case"tenuto":N.gap=-.001;break;case"staccato":var I=.4*N.duration;N.gap=o/60*I;break;default:N.gap=0}u.push(N)}}}u.length}var j=function(e){return e.pitches&&e.pitches.length>0&&e.pitches[0]?e.pitches[0].duration:e.elem?e.elem.duration:e.duration}(e);return f=Math.max(f,V(e.time)+Y(j)),s}var K=[0,2,4,5,7,9,11];function Q(n){if(void 0!==n.midipitch)return n.midipitch;var i=n.pitch;if(n.accidental)switch(n.accidental){case"sharp":e[i]=1;break;case"flat":e[i]=-1;break;case"natural":e[i]=0;break;case"dblsharp":e[i]=2;break;case"dblflat":e[i]=-2;break;case"quartersharp":e[i]=.25;break;case"quarterflat":e[i]=-.25}var a=12*function(e){return Math.floor(e/7)}(i)+K[Z(i)]+60;return void 0!==e[i]?a+=e[i]:a+=t[Z(i)],a+=r}function $(e){var t=[0,0,0,0,0,0,0];if(!e.accidentals)return t;for(var r=0;r<e.accidentals.length;r++){var n,i=e.accidentals[r];switch(i.acc){case"flat":n=-1;break;case"quarterflat":n=-.25;break;case"sharp":n=1;break;case"quartersharp":n=.25;break;default:n=0}t[Z(i.note.toLowerCase().charCodeAt(0)-"c".charCodeAt(0))]+=n}return t}function J(e){var t=""+e.pitch;return t.indexOf(".75")>=0?(e.pitch=Math.round(e.pitch),e.cents=-50):t.indexOf(".25")>=0&&(e.pitch=Math.round(e.pitch),e.cents=50),e}function Z(e){return(e%=7)<0&&(e+=7),e}var ee={A:33,B:35,C:36,D:38,E:40,F:41,G:43},te={dim:[0,3,6],"°":[0,3,6],"˚":[0,3,6],dim7:[0,3,6,9],"°7":[0,3,6,9],"˚7":[0,3,6,9],"ø7":[0,3,6,10],"m7(b5)":[0,3,6,10],m7b5:[0,3,6,10],"m7♭5":[0,3,6,10],"-7(b5)":[0,3,6,10],"-7b5":[0,3,6,10],"7b5":[0,4,6,10],"7(b5)":[0,4,6,10],"7♭5":[0,4,6,10],"7(b9,b5)":[0,4,6,10,13],"7b9,b5":[0,4,6,10,13],"7(#9,b5)":[0,4,6,10,15],"7#9b5":[0,4,6,10,15],"maj7(b5)":[0,4,6,11],maj7b5:[0,4,6,11],"13(b5)":[0,4,6,10,14,21],"13b5":[0,4,6,10,14,21],m:[0,3,7],"-":[0,3,7],m6:[0,3,7,9],"-6":[0,3,7,9],m7:[0,3,7,10],"-7":[0,3,7,10],"-(b6)":[0,3,7,8],"-b6":[0,3,7,8],"-6/9":[0,3,7,9,14],"-7(b9)":[0,3,7,10,13],"-7b9":[0,3,7,10,13],"-maj7":[0,3,7,11],"-9+7":[0,3,7,11,13],"-11":[0,3,7,11,14,17],m11:[0,3,7,11,14,17],"-maj9":[0,3,7,11,14],"-∆9":[0,3,7,11,14],mM9:[0,3,7,11,14],M:[0,4,7],6:[0,4,7,9],"6/9":[0,4,7,9,14],"6add9":[0,4,7,9,14],69:[0,4,7,9,14],7:[0,4,7,10],9:[0,4,7,10,14],11:[0,7,10,14,17],13:[0,4,7,10,14,21],"7b9":[0,4,7,10,13],"7♭9":[0,4,7,10,13],"7(b9)":[0,4,7,10,13],"7(#9)":[0,4,7,10,15],"7#9":[0,4,7,10,15],"(13)":[0,4,7,10,14,21],"7(9,13)":[0,4,7,10,14,21],"7(#9,b13)":[0,4,7,10,15,20],"7(#11)":[0,4,7,10,14,18],"7#11":[0,4,7,10,14,18],"7(b13)":[0,4,7,10,20],"7b13":[0,4,7,10,20],"9(#11)":[0,4,7,10,14,18],"9#11":[0,4,7,10,14,18],"13(#11)":[0,4,7,10,18,21],"13#11":[0,4,7,10,18,21],maj7:[0,4,7,11],"∆7":[0,4,7,11],"Δ7":[0,4,7,11],maj9:[0,4,7,11,14],"maj7(9)":[0,4,7,11,14],"maj7(11)":[0,4,7,11,17],"maj7(#11)":[0,4,7,11,18],"maj7(13)":[0,4,7,14,21],"maj7(9,13)":[0,4,7,11,14,21],"7sus4":[0,5,7,10],m7sus4:[0,3,7,10,17],sus4:[0,5,7],sus2:[0,2,7],"7sus2":[0,2,7,10],"9sus4":[0,5,7,10,14],"13sus4":[0,5,7,10,14,21],aug7:[0,4,8,10],"+7":[0,4,8,10],"+":[0,4,8],"7#5":[0,4,8,10],"7♯5":[0,4,8,10],"7+5":[0,4,8,10],"9#5":[0,4,8,10,14],"9♯5":[0,4,8,10,14],"9+5":[0,4,8,10,14],"-7(#5)":[0,3,8,10],"-7#5":[0,3,8,10],"7(#5)":[0,4,8,10],"7(b9,#5)":[0,4,8,10,13],"7b9#5":[0,4,8,10,13],"maj7(#5)":[0,4,8,11],"maj7#5":[0,4,8,11],"maj7(#5,#11)":[0,4,8,11,18],"maj7#5#11":[0,4,8,11,18],"9(#5)":[0,4,8,10,14],"13(#5)":[0,4,8,10,14,21],"13#5":[0,4,8,10,14,21]};function re(e,t){var r=te[t];r||(r="ma"===t.slice(0,2).toLowerCase()||"M"===t.charAt(0)?te.M:"m"===t.charAt(0)||"-"===t.charAt(0)?te.m:te.M),e+=12;for(var n=[],i=0;i<r.length;i++)n.push(e+r[i]);return n}function ne(e,t,r,n,i){void 0!==e&&p.push({cmd:"note",pitch:e,volume:r,start:k+n*Y(t),duration:Y(i),gap:0,instrument:0})}function ie(e,t,r,n,i){for(var a=0;a<e.length;a++)p.push({cmd:"note",pitch:e[a],volume:r,start:k+n*Y(t),duration:Y(i),gap:0,instrument:0})}var ae={"2/2":["boom","chick"],"2/4":["boom","chick"],"3/4":["boom","chick","chick"],"4/4":["boom","chick","boom2","chick"],"5/4":["boom","chick","chick","boom2","chick"],"6/8":["boom","","chick","boom2","","chick"],"9/8":["boom","","chick","boom2","","chick","boom2","","chick"],"12/8":["boom","","chick","boom2","","chick","boom","","chick","boom2","","chick"]};function se(e,t){var r=_.num,n=_.den,i=1/n,a=i/2,s=ae[r+"/"+n],o=parseInt(r,10)/parseInt(n,10)-(t-e)/S;if(Math.abs(o)<1e-5&&(o=!1),!s||o){s=[];for(var c=(t-e)/S/i,l=0;l<c;l++)s.push("chick")}if(0===b.length&&b.push({beat:0,chord:y}),0!==b[0].beat&&y&&w&&b.unshift({beat:0,chord:w}),1!==b.length){for(var h=.125===i?3:1,u={},d=0;d<b.length;d++){var f=b[d];u[""+Math.round(f.beat*h)]=f}for(var p=0;p<s.length;p++){var m,g;if(u[""+p]&&(m=u[""+p]),!B&&m)switch(s[p]){case"boom":u[""+(p+1)]?ie(m.chord.chick,i,E,p,a):(ne(m.chord.boom,i,M,p,a),g=m.chord.boom);break;case"boom2":u[""+(p+1)]?ie(m.chord.chick,i,E,p,a):g===m.chord.boom?(ne(m.chord.boom2,i,M,p,a),g=void 0):(ne(m.chord.boom,i,M,p,a),g=m.chord.boom);break;case"chick":ie(m.chord.chick,i,E,p,a);break;case"":u[""+p]&&ie(m.chord.chick,i,E,p,a)}}}else for(var v=b[0].beat;v<s.length;v++)if(!B)switch(s[v]){case"boom":ne(b[0].chord.boom,i,M,v,a);break;case"boom2":ne(b[0].chord.boom2,i,M,v,a);break;case"chick":ie(b[0].chord.chick,i,E,v,a)}}function oe(e){if(0===e.pattern.length||!1===e.on)return{on:!1};for(var t=e.pattern[0],r=[],n="",i=0,a=0;a<t.length;a++)if("d"===t[a]&&i++,"d"===t[a]||"z"===t[a])0!==n.length?(r.push(n),n=t[a]):n+=t[a];else{if(0===n.length)return{on:!1};n+=t[a]}if(0!==n.length&&r.push(n),e.pattern.length!==2*i+1)return{on:!1};for(var s={on:!0,bars:e.bars,pattern:[]},o=q(_),c=0,l=0;l<r.length;l++){n=r[l];for(var h=1,u=!1,d=0,f=1;f<n.length;f++)switch(n[f]){case"/":0!==d&&(h*=d),d=0,u=!0;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":d=10*d+n[f];break;default:return{on:!1}}u?(0===d&&(d=2),h/=d):d&&(h*=d),"d"===n[0]?(s.pattern.push({len:h*o,pitch:e.pattern[1+c],velocity:e.pattern[1+c+i]}),c++):s.pattern.push({len:h*o,pitch:null})}for(var p=0,m=_.num/_.den,g=0;g<s.pattern.length;g++)p+=s.pattern[g].len;var v=p/(e.bars?e.bars:1)/m;for(g=0;g<s.pattern.length;g++)s.pattern[g].len=s.pattern[g].len/v;return s}function ce(e){if(0!==C.length||I.on){var t=_.num/_.den;if(0===C.length){if(f<t)return;C.push({cmd:"program",channel:e,instrument:128})}if(I.on)for(var r=k,n=0;n<I.pattern.length;n++){var i=Y(I.pattern[n].len);I.pattern[n].pitch&&C.push({cmd:"note",pitch:I.pattern[n].pitch,volume:I.pattern[n].velocity,start:r,duration:i,gap:0,instrument:128}),r+=i}}}}(),e.exports=n},9991:function(e,t,r){var n,i=r(819);!function(){"use strict";function e(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setAttribute(r,t[r]);return e}function t(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90",this.noteOffAndChannel="%80"}function r(e,t){for(var r="",n=0;n<e.length;n++)r+=a(e.charCodeAt(n),2);return"%00%FF"+t+a(r.length/3,2)+r}function a(e,t){var r=e.toString(16);for(r=r.split(".")[0];r.length<t;)r="0"+r;return r.length>t&&(r=r.substring(0,t)),function(e){for(var t="",r=0;r<e.length;r+=2)t+="%",t+=e.substr(r,2);return t}(r)}function s(e){var t=(e=Math.round(e))%128;return a(2*(e-t)+t,4)}function o(e){var t=0,r=[];for(e=Math.round(e);0!==e;)r.push(127&e),e>>=7;for(var n=r.length-1;n>=0;n--){t<<=8;var i=r[n];0!==n&&(i|=128),t|=i}var s=t.toString(16).length;return a(t,s+=s%2)}t.prototype.setTempo=function(e){0===this.trackcount&&(this.startTrack(),this.track+="%00%FF%51%03"+a(Math.round(6e7/e),6),this.endTrack())},t.prototype.setGlobalInfo=function(e,t,n,i){if(0===this.trackcount){this.startTrack();var s=Math.round(6e7/e);this.track+="%00%FF%51%03"+a(s,6),n&&(this.track+=function(e){if(!e||!e.accidentals)return"";for(var t="%00%FF%59%02",r=0,n=256,i=0;i<e.accidentals.length;i++)"sharp"===e.accidentals[i].acc?r++:"flat"===e.accidentals[i].acc&&n--;var s=a(256!==n?n:r,2),o="m"===e.mode?"%01":"%00";return t+s+o}(n)),i&&(this.track+=function(e){var t,r="%00%FF%58%04"+a(e.num,2),n={1:0,2:1,4:2,8:3,16:4,32:5}[e.den];if(!n)return"";switch(r+=a(n,2),e.num+"/"+e.den){case"2/4":case"3/4":case"4/4":case"5/4":t=24;break;case"6/4":t=72;break;case"2/2":case"3/2":case"4/2":t=48;break;case"3/8":case"6/8":case"9/8":case"12/8":t=36}return t?(r+=a(t,2))+"%08":""}(i)),t&&(this.track+=r(t,"%01")),this.endTrack()}},t.prototype.startTrack=function(){this.noteWarped={},this.track="",this.trackName="",this.trackInstrument="",this.silencelength=0,this.trackcount++,this.instrument&&this.setInstrument(this.instrument)},t.prototype.endTrack=function(){this.track=this.trackName+this.trackInstrument+this.track;var e=a(this.track.length/3+4,8);this.track="MTrk"+e+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},t.prototype.setText=function(e,t){switch(e){case"name":this.trackName=r(t,"%03")}},t.prototype.setInstrument=function(e){this.trackInstrument="%00%C0"+a(e,2),this.instrument=e},t.prototype.setChannel=function(e,t){this.channel=e;var r="%00%B"+this.channel.toString(16);this.track+=r+"%79%00",this.track+=r+"%40%00",this.track+=r+"%5B%30",t||(t=0),t=Math.round(64*(t+1)),this.track+=r+"%0A"+a(t,2),this.track+=r+"%07%64",this.noteOnAndChannel="%9"+this.channel.toString(16),this.noteOffAndChannel="%8"+this.channel.toString(16)},t.prototype.startNote=function(e,t,r){if(this.track+=o(this.silencelength),this.silencelength=0,r){this.track+="%e"+this.channel.toString(16);var n=Math.round(4096*i(r));this.track+=s(8192+n),this.track+=o(0),this.noteWarped[e]=!0}this.track+=this.noteOnAndChannel,this.track+="%"+e.toString(16)+a(t,2)},t.prototype.endNote=function(e){this.track+=o(this.silencelength),this.silencelength=0,this.noteWarped[e]&&(this.track+="%e"+this.channel.toString(16),this.track+=s(8192),this.track+=o(0),this.noteWarped[e]=!1),this.track+=this.noteOffAndChannel,this.track+="%"+e.toString(16)+"%00"},t.prototype.addRest=function(e){this.silencelength+=e,this.silencelength<0&&(this.silencelength=0)},t.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+a(this.trackcount,4)+"%01%e0"+this.trackstrings},t.prototype.embed=function(t,r){var n=this.getData(),i=e(document.createElement("a"),{href:n});if(i.innerHTML="download midi",t.insertBefore(i,t.firstChild),!r){var a=e(document.createElement("embed"),{src:n,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});t.insertBefore(a,t.firstChild)}},n=function(){return new t}}(),e.exports=n},1028:function(e,t,r){var n,i=r(5008);!function(){"use strict";var e,t=128;function r(e,t,r){for(var n=0,i=t+1;i<e.length;i++)if("note"===e[i].el_type&&n++,e[i].decoration&&e[i].decoration.indexOf(r)>=0)return n;return n}function a(e,t,r){for(var n=Math.min(e.length,t+3),i=t;i<n;i++)if("note"===e[i].el_type&&e[i].decoration)for(var a=0;a<e[i].decoration.length;a++)if(r.indexOf(e[i].decoration[a])>=0)return e[i].decoration[a];return null}function s(e){for(var t=0;t<e.length;t++)for(var r=e[t],n=r.length-1;n>=0&&"bar"!==r[n].el_type;)r[n].noChordVoice=!0,n--}function o(e,t){if(e&&!(e.length<=t)&&e[t].title)return e[t].title.join(" ")}function c(e,t){var r=1/4;e.duration&&(r=e.duration[0]);var n=60;return e.bpm&&(n=e.bpm),r*n/t}function l(t){var r;switch(t.type){case"common_time":r={el_type:"meter",num:4,den:4};break;case"cut_time":r={el_type:"meter",num:2,den:2};break;case"specified":r={el_type:"meter",num:t.value[0].num,den:t.value[0].den};break;default:r={el_type:"meter"}}return e=r.num/r.den,r}function h(e){for(var t=[],r=0;r<e.length;r++)"natural"!==e[r].acc&&t.push(e[r]);return t}function u(e,t){f(e,"HP"===t.root?{el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}:{el_type:"key",accidentals:h(t.accidentals)})}function d(e,t){f(e,l(t))}function f(e,t){for(var r=e.length-1;r>=0;r--)if(e[r].el_type===t.el_type)return void(JSON.stringify(e[r])!==JSON.stringify(t)&&e.push(t));e.push(t)}n=function(n,h){var p,m=(h=h||{}).program||0,g=h.midiTranspose||0;n.visualTranspose&&(g-=n.visualTranspose);var v=h.channel||0,b=!1,y=h.drum||"",w=h.drumBars||1,k=h.drumIntro||0,x=""!==y,T=[];m=parseInt(m,10),g=parseInt(g,10),10===(v=parseInt(v,10))&&(m=t),y=y.split(" "),w=parseInt(w,10),k=parseInt(k,10);var C=n.formatting.bagpipes;C&&(m=71);var A=[];if(n.formatting.midi){var S=n.formatting.midi;S.program&&S.program.length>0&&(m=S.program[0],S.program.length>1&&(m=S.program[1],v=S.program[0]),b=!0),S.transpose&&(g=S.transpose[0]),S.channel&&(v=S.channel[0],b=!0),S.drum&&(y=S.drum),S.drumbars&&(w=S.drumbars[0]),S.drumon&&(x=!0),10===v&&(m=t),S.beat&&A.push({el_type:"beat",beats:S.beat}),S.nobeataccents&&A.push({el_type:"beataccents",value:!1})}p=h.qpm?parseInt(h.qpm,10):n.metaText.tempo?c(n.metaText.tempo,n.getBeatLength()):h.defaultQpm?h.defaultQpm:180;var _=[];C&&_.push({el_type:"bagpipes"}),_.push({el_type:"instrument",program:m}),v&&_.push({el_type:"channel",channel:v}),g&&_.push({el_type:"transpose",transpose:g}),_.push({el_type:"tempo",qpm:p});for(var M=0;M<A.length;M++)_.push(A[M]);var E,N=[],B=[],P=[],L=[0],H={};H[0]={el_type:"tempo",qpm:p,timing:0};for(var O=[],z=[],D=!1,I=n.lines,F=0;F<I.length;F++){var j=I[F];if(j.staff)for(var V=function(e){var t,n={pppp:[15,10,5,1],ppp:[30,20,10,1],pp:[45,35,20,1],p:[60,50,35,1],mp:[75,65,50,1],mf:[90,80,65,1],f:[105,95,80,1],ff:[120,110,95,1],fff:[127,125,110,1],ffff:[127,125,110,1]};if(e.decoration)if(e.decoration.indexOf("pppp")>=0?t="pppp":e.decoration.indexOf("ppp")>=0?t="ppp":e.decoration.indexOf("pp")>=0?t="pp":e.decoration.indexOf("p")>=0?t="p":e.decoration.indexOf("mp")>=0?t="mp":e.decoration.indexOf("mf")>=0?t="mf":e.decoration.indexOf("f")>=0?t="f":e.decoration.indexOf("ff")>=0?t="ff":e.decoration.indexOf("fff")>=0?t="fff":e.decoration.indexOf("ffff")>=0&&(t="ffff"),t&&(E=n[t].slice(0),N[q].push({el_type:"beat",beats:E.slice(0)}),B[R]=!1,P[R]=!1),e.decoration.indexOf("crescendo(")>=0){var i=r(X,ee,"crescendo)"),s=Math.min(127,E[0]+50),o=a(X,ee+i+1,Object.keys(n));o&&(s=n[o][0]),B[R]=i>0&&Math.floor((s-E[0])/i),P[R]=!1}else if(e.decoration.indexOf("crescendo)")>=0)B[R]=!1;else if(e.decoration.indexOf("diminuendo(")>=0){var c=r(X,ee,"diminuendo)"),l=Math.max(15,E[0]-50),h=a(X,ee+c+1,Object.keys(n));h&&(l=n[h][0]),B[R]=!1,P[R]=c>0&&Math.floor((l-E[0])/c)}else e.decoration.indexOf("diminuendo)")>=0&&(P[R]=!1)},Y=j.staff,q=0,G=0;G<Y.length;G++)for(var W=Y[G],R=0;R<W.voices.length;R++){var X=W.voices[R];if(!N[q]){N[q]=[].concat(JSON.parse(JSON.stringify(_)));var U=o(j.staff,q);U&&N[q].unshift({el_type:"name",trackName:U})}if(g&&"perc"===W.clef.type&&N[q].push({el_type:"transpose",transpose:0}),W.clef&&"perc"===W.clef.type&&!b)for(var K=0;K<N[q].length;K++)"instrument"===N[q][K].el_type&&(N[q][K].program=t);else W.key&&u(N[q],W.key);W.meter&&d(N[q],W.meter),!D&&x&&(N[q].push({el_type:"drum",params:{pattern:y,bars:w,on:x,intro:k}}),D=!0),W.clef&&"perc"!==W.clef.type&&W.clef.transpose&&(W.clef.el_type="clef",N[q].push({el_type:"transpose",transpose:W.clef.transpose})),W.clef&&W.clef.type&&(W.clef.type.indexOf("-8")>=0?N[q].push({el_type:"transpose",transpose:-12}):W.clef.type.indexOf("+8")>=0&&N[q].push({el_type:"transpose",transpose:12})),n.formatting.midi&&n.formatting.midi.drumoff&&(N[q].push({el_type:"bar"}),N[q].push({el_type:"drum",params:{pattern:"",on:!1}}));var Q=0,$=0,J=0,Z=0;E=[105,95,85,1];for(var ee=0;ee<X.length;ee++){var te=X[ee];switch(te.el_type){case"note":if(B[R]&&(E[0]+=B[R],E[1]+=B[R],E[2]+=B[R],N[q].push({el_type:"beat",beats:E.slice(0)})),P[R]&&(E[0]+=P[R],E[1]+=P[R],E[2]+=P[R],N[q].push({el_type:"beat",beats:E.slice(0)})),V(te),!te.rest||"spacer"!==te.rest.type){var re={elem:te,el_type:"note",timing:L[q]};te.style?re.style=te.style:T[q]&&(re.style=T[q]),re.duration=0===te.duration?.25:te.duration,te.startTriplet?($=te.tripletMultiplier,J=te.startTriplet*$*te.duration,re.duration=re.duration*$,re.duration=Math.round(1e6*re.duration)/1e6,Z=re.duration):$&&(te.endTriplet?($=0,re.duration=Math.round(1e6*(J-Z))/1e6):(re.duration=re.duration*$,re.duration=Math.round(1e6*re.duration)/1e6,Z+=re.duration)),te.rest&&(re.rest=te.rest),te.decoration&&(re.decoration=te.decoration.slice(0)),te.pitches&&(re.pitches=i.cloneArray(te.pitches)),te.gracenotes&&(re.gracenotes=i.cloneArray(te.gracenotes)),te.chord&&(re.chord=i.cloneArray(te.chord)),N[q].push(re),"rhythm"===te.style&&s(N),Q++,L[q]+=re.duration}break;case"key":u(N[q],te);break;case"meter":d(N[q],te);break;case"clef":te.transpose&&N[q].push({el_type:"transpose",transpose:te.transpose}),te.type&&(te.type.indexOf("-8")>=0?N[q].push({el_type:"transpose",transpose:-12}):te.type.indexOf("+8")>=0&&N[q].push({el_type:"transpose",transpose:12}));break;case"tempo":p=c(te,n.getBeatLength()),N[q].push({el_type:"tempo",qpm:p,timing:L[q]}),H[""+L[q]]={el_type:"tempo",qpm:p,timing:L[q]};break;case"bar":Q>0&&N[q].push({el_type:"bar"}),V(te),Q=0;var ne="bar_right_repeat"===te.type||"bar_dbl_repeat"===te.type,ie="1"===te.startEnding,ae="bar_left_repeat"===te.type||"bar_dbl_repeat"===te.type||"bar_right_repeat"===te.type;if(ne){var se=O[q];se||(se=0);var oe=z[q];oe||(oe=N[q].length);for(var ce=se;ce<oe;ce++){var le=i.clone(N[q][ce]);le.pitches&&(le.pitches=i.cloneArray(le.pitches)),N[q].push(le)}z[q]=void 0,O[q]=void 0}ie&&(z[q]=N[q].length),ae&&(O[q]=N[q].length);break;case"style":T[q]=te.head;break;case"timeSignature":N[q].push(l(te));break;case"part":break;case"stem":case"scale":case"break":case"font":break;case"midi":var he=!1;switch(te.cmd){case"drumon":x=!0,he=!0;break;case"drumoff":x=!1,he=!0;break;case"drum":y=te.params,he=!0;break;case"drumbars":w=te.params[0],he=!0;break;case"drummap":break;case"channel":10===te.params[0]&&N[q].push({el_type:"instrument",program:t});break;case"program":f(N[q],{el_type:"instrument",program:te.params[0]}),b=!0;break;case"transpose":N[q].push({el_type:"transpose",transpose:te.params[0]});break;case"gchordoff":N[q].push({el_type:"gchord",tacet:!0});break;case"gchordon":N[q].push({el_type:"gchord",tacet:!1});break;case"beat":N[q].push({el_type:"beat",beats:te.params});break;case"nobeataccents":N[q].push({el_type:"beataccents",value:!1});break;case"beataccents":N[q].push({el_type:"beataccents",value:!0});break;case"vol":N[q].push({el_type:"vol",volume:te.params[0]});break;case"volinc":N[q].push({el_type:"volinc",volume:te.params[0]});break;default:console.log("MIDI seq: midi cmd not handled: ",te.cmd,te)}he&&(N[0].push({el_type:"drum",params:{pattern:y,bars:w,intro:k,on:x}}),D=!0);break;default:console.log("MIDI: element type "+te.el_type+" not handled.")}}L[++q]||(L[q]=0)}}if(function(e,t){if(t&&0!==t.length)for(var r=Object.keys(t),n=0;n<e.length;n++)for(var i=e[n],a=t[0]?t[0].qpm:0,s=0;s<i.length;s++){var o=i[s];"tempo"===o.el_type&&(a=o.qpm),r.indexOf(""+o.timing)>=0&&a!==t[""+o.timing].qpm&&(a=t[""+o.timing].qpm,"tempo"===o.el_type?(o.qpm=t[""+o.timing].qpm,s++):(e[n].splice(s,0,{el_type:"tempo",qpm:t[""+o.timing].qpm,timing:o.timing}),s+=2))}}(N,H),k)for(var ue=n.getPickupLength(),de=0;de<N.length;de++){for(var fe=0;"note"!==N[de][fe].el_type&&N[de].length>fe;)fe++;if(N[de].length>fe)for(var pe=0;pe<k;pe++)0===ue||pe<k-1?N[de].splice(fe,0,{el_type:"note",rest:{type:"rest"},duration:e},{el_type:"bar"}):N[de].splice(fe,0,{el_type:"note",rest:{type:"rest"},duration:e-ue})}return N.length>0&&N[0].length>0&&(N[0][0].pickupLength=n.getPickupLength()),N}}(),e.exports=n},8702:function(e,t,r){var n=r(5281);e.exports=function(){return window.abcjsAudioContext||n(),window.abcjsAudioContext}},819:function(e){e.exports=function(e){return Math.pow(2,e/1200)}},9143:function(e,t,r){var n=r(8471);e.exports=function(e){for(var t=[],r=0;r<e.tracks.length;r++)t.push([]);var i=n[0];return e.tracks.forEach((function(e,r){e.forEach((function(e){switch(e.cmd){case"note":if(e.duration>0){var a=e.gap?e.gap:0,s=e.duration;a=Math.min(a,2*s/3);var o={pitch:e.pitch,instrument:i,start:Math.round(1e6*e.start)/1e6,end:Math.round(1e6*(e.start+s-a))/1e6,volume:e.volume};e.style&&(o.style=e.style),e.cents&&(o.cents=e.cents),t[r].push(o)}break;case"program":i=n[e.instrument];break;case"text":break;default:console.log("Unhandled midi event",e)}}))})),t}},6313:function(e,t,r){var n=r(5049),i=r(5281),a=r(8702),s=r(5008),o=r(1225),c=r(9733),l=r(5075),h=r(5343),u=r(6987);function d(e,t,r,s,o){var c=!0;if(a()?c="suspended"===a().state:i(),!n())throw{status:"NotSupported",message:"This browser does not support audio."};(c||o)&&r&&r.classList.add("abcjs-loading"),c?a().resume().then((function(){s?s().then((function(n){f(e,t,r,o)})):f(e,t,r,o)})):f(e,t,r,o)}function f(e,t,r,n){n?e(t).then((function(){r&&r.classList.remove("abcjs-loading")})):(e(t),r&&r.classList.remove("abcjs-loading"))}e.exports=function(e,t){var r=this;if("string"==typeof e){var n=e;if(!(e=document.querySelector(n)))throw new Error('Cannot find element "'+n+'" in the DOM.')}else if(!(e instanceof HTMLElement))throw new Error("The first parameter must be a valid element or selector in the DOM.");if(r.parent=e,r.options={},t&&(r.options=s.clone(t)),r.options.ac&&i(r.options.ac),function(e,t){var r=!!t.loopHandler,n=!!t.restartHandler,i=!!t.playHandler||!!t.playPromiseHandler,a=!!t.progressHandler,s=!!t.warpHandler,d=!1!==t.hasClock,f='<div class="abcjs-inline-audio">\n';if(r){var p=t.repeatTitle?t.repeatTitle:"Click to toggle play once/repeat.";f+='<button type="button" class="abcjs-midi-loop abcjs-btn" title="'+p+'" aria-label="'+(t.repeatAria?t.repeatAria:p)+'">'+o+"</button>\n"}if(n){var m=t.restartTitle?t.restartTitle:"Click to go to beginning.";f+='<button type="button" class="abcjs-midi-reset abcjs-btn" title="'+m+'" aria-label="'+(t.restartAria?t.restartAria:m)+'">'+u+"</button>\n"}if(i){var g=t.playTitle?t.playTitle:"Click to play/pause.";f+='<button type="button" class="abcjs-midi-start abcjs-btn" title="'+g+'" aria-label="'+(t.playAria?t.playAria:g)+'">'+c+l+h+"</button>\n"}if(a){var v=t.randomTitle?t.randomTitle:"Click to change the playback position.";f+='<button type="button" class="abcjs-midi-progress-background" title="'+v+'" aria-label="'+(t.randomAria?t.randomAria:v)+'"><span class="abcjs-midi-progress-indicator"></span></button>\n'}if(d&&(f+='<span class="abcjs-midi-clock"></span>\n'),s){var b=t.warpTitle?t.warpTitle:"Change the playback speed.";f+='<span class="abcjs-tempo-wrapper"><label><input class="abcjs-midi-tempo" type="number" min="1" max="300" value="100" title="'+b+'" aria-label="'+(t.warpAria?t.warpAria:b)+'">%</label><span>&nbsp;(<span class="abcjs-midi-current-tempo"></span> '+(t.bpm?t.bpm:"BPM")+")</span></span>\n"}f+='<div class="abcjs-css-warning" style="font-size: 12px;color:red;border: 1px solid red;text-align: center;width: 300px;margin-top: 4px;font-weight: bold;border-radius: 4px;">CSS required: load abcjs-audio.css</div>',f+="</div>\n",e.innerHTML=f}(r.parent,r.options),function(e){var t=!!e.options.loopHandler,r=!!e.options.restartHandler,n=!!e.options.playHandler||!!e.options.playPromiseHandler,i=!!e.options.progressHandler,a=!!e.options.warpHandler,s=e.parent.querySelector(".abcjs-midi-start");t&&e.parent.querySelector(".abcjs-midi-loop").addEventListener("click",(function(t){d(e.options.loopHandler,t,s,e.options.afterResume)})),r&&e.parent.querySelector(".abcjs-midi-reset").addEventListener("click",(function(t){d(e.options.restartHandler,t,s,e.options.afterResume)})),n&&s.addEventListener("click",(function(t){d(e.options.playPromiseHandler||e.options.playHandler,t,s,e.options.afterResume,!!e.options.playPromiseHandler)})),i&&e.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",(function(t){d(e.options.progressHandler,t,s,e.options.afterResume)})),a&&e.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",(function(t){d(e.options.warpHandler,t,s,e.options.afterResume)}))}(r),r.disable=function(e){var t=r.parent.querySelector(".abcjs-inline-audio");e?t.classList.add("abcjs-disabled"):t.classList.remove("abcjs-disabled")},r.setWarp=function(e,t){r.parent.querySelector(".abcjs-midi-tempo").value=Math.round(t),r.setTempo(e)},r.setTempo=function(e){var t=r.parent.querySelector(".abcjs-midi-current-tempo");t&&(t.innerHTML=Math.round(e))},r.resetAll=function(){for(var e=r.parent.querySelectorAll(".abcjs-pushed"),t=0;t<e.length;t++)e[t].classList.remove("abcjs-pushed")},r.pushPlay=function(e){var t=r.parent.querySelector(".abcjs-midi-start");t&&(e?t.classList.add("abcjs-pushed"):t.classList.remove("abcjs-pushed"))},r.pushLoop=function(e){var t=r.parent.querySelector(".abcjs-midi-loop");t&&(e?t.classList.add("abcjs-pushed"):t.classList.remove("abcjs-pushed"))},r.setProgress=function(e,t){var n=r.parent.querySelector(".abcjs-midi-progress-background"),i=r.parent.querySelector(".abcjs-midi-progress-indicator");if(n&&i){var a=n.clientWidth*e;i.style.left=a+"px";var s=r.parent.querySelector(".abcjs-midi-clock");if(s){var o=t*e/1e3,c=Math.floor(o/60),l=Math.floor(o%60),h=l<10?"0"+l:l;s.innerHTML=c+":"+h}}},r.options.afterResume){var f=!1;r.options.ac?f="suspended"!==r.options.ac.state:a()&&(f="suspended"!==a().state),f&&r.options.afterResume()}}},5594:function(e,t,r){var n=r(2228),i=r(9143),a=r(5281),s=r(8702),o=r(5049),c=r(522),l=r(8471),h=r(873),u=r(4586),d=r(4771),f="MIDI is not supported in this browser.",p="https://paulrosen.github.io/midi-js-soundfonts/abcjs/";e.exports=function(){var e=this;e.audioBufferPossible=void 0,e.directSource=[],e.startTimeSec=void 0,e.pausedTimeSec=void 0,e.audioBuffers=[],e.duration=void 0,e.isRunning=!1,e.init=function(t){t||(t={}),a(t.audioContext);var r=s().currentTime;if(e.debugCallback=t.debugCallback,e.debugCallback&&e.debugCallback("init called"),e.audioBufferPossible=e._deviceCapable(),!e.audioBufferPossible)return Promise.reject({status:"NotSupported",message:f});var n=t.options?t.options:{};e.soundFontUrl=n.soundFontUrl?n.soundFontUrl:p,"/"!==e.soundFontUrl[e.soundFontUrl.length-1]&&(e.soundFontUrl+="/"),n.soundFontVolumeMultiplier?e.soundFontVolumeMultiplier=n.soundFontVolumeMultiplier:"https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/"===e.soundFontUrl||"https://paulrosen.github.io/midi-js-soundfonts/MusyngKite/"===e.soundFontUrl?e.soundFontVolumeMultiplier=5:e.soundFontUrl===p?e.soundFontVolumeMultiplier=.5:e.soundFontVolumeMultiplier=1,n.programOffsets?e.programOffsets=n.programOffsets:e.soundFontUrl===p?e.programOffsets={violin:113,trombone:200}:e.programOffsets={};var i=void 0!==n.fadeLength?parseInt(n.fadeLength,10):NaN;if(e.fadeLength=isNaN(i)?200:i,i=void 0!==n.noteEnd?parseInt(n.noteEnd,10):NaN,e.noteEnd=isNaN(i)?0:i,e.pan=n.pan,e.meterSize=1,t.visualObj)e.flattened=t.visualObj.setUpAudio(n),t.visualObj.getMeterFraction().den&&(e.meterSize=t.visualObj.getMeterFraction().num/t.visualObj.getMeterFraction().den);else{if(!t.sequence)return Promise.reject(new Error("Must pass in either a visualObj or a sequence"));e.flattened=t.sequence}e.millisecondsPerMeasure=t.millisecondsPerMeasure?t.millisecondsPerMeasure:t.visualObj?t.visualObj.millisecondsPerMeasure(e.flattened.tempo):1e3,e.beatsPerMeasure=t.visualObj?t.visualObj.getBeatsPerMeasure():4,e.sequenceCallback=n.sequenceCallback,e.callbackContext=n.callbackContext,e.onEnded=n.onEnded;var o={},h=[],u=l[0];e.flattened.tracks.forEach((function(e){e.forEach((function(e){if("program"===e.cmd&&l[e.instrument]&&(u=l[e.instrument]),void 0!==e.pitch){var t=e.pitch,r=c[t];r?(o[u]||(o[u]={}),d[u]&&d[u][r]?h.push(u+":"+r):o[u][r]=!0):console.log("Can't find note: ",t)}}))})),e.debugCallback&&e.debugCallback("note gathering time = "+Math.floor(1e3*(s().currentTime-r))+"ms"),r=s().currentTime;var m=[];Object.keys(o).forEach((function(e){Object.keys(o[e]).forEach((function(t){m.push({instrument:e,note:t})}))}));for(var g=[],v=0;v<m.length;v+=256)g.push(m.slice(v,v+256));return new Promise((function(t,n){var i={cached:h,error:[],loaded:[]},a=0;!function o(){a<g.length?e._loadBatch(g[a],e.soundFontUrl,r).then((function(e){r=s().currentTime,e&&(e.error&&(i.error=i.error.concat(e.error)),e.loaded&&(i.loaded=i.loaded.concat(e.loaded))),a++,o()}),n):t(i)}()}))},e._loadBatch=function(t,r,i,a){var o=[];return t.forEach((function(e){o.push(n(r,e.instrument,e.note,s()))})),Promise.all(o).then((function(n){e.debugCallback&&e.debugCallback("mp3 load time = "+Math.floor(1e3*(s().currentTime-i))+"ms");for(var o=[],c=[],l=[],h=[],u=0;u<n.length;u++){var d=n[u],f=d.instrument+":"+d.name;"loaded"===d.status?o.push(f):"pending"===d.status?l.push(f):"cached"===d.status?c.push(f):h.push(f+" "+d.message)}if(l.length>0){if(a?a*=2:a=50,a<9e4)return new Promise((function(t,n){setTimeout((function(){var s=[];for(u=0;u<l.length;u++)f=l[u].split(":"),s.push({instrument:f[0],note:f[1]});e._loadBatch(s,r,i,a).then((function(e){t(e)})).catch((function(e){n(e)}))}),a)}));for(var p=[],m=0;m<t.length;m++)p.push(t[m].instrument+"/"+t[m].note);return Promise.reject(new Error("timeout attempting to load: "+p.join(", ")))}return Promise.resolve({loaded:o,cached:c,error:h})})).catch((function(e){}))},e.prime=function(){var t=e.fadeLength/1e3;return e.isRunning=!1,e.audioBufferPossible?(e.debugCallback&&e.debugCallback("prime called"),new Promise((function(r){var n=s().currentTime,a=e.millisecondsPerMeasure/1e3/e.meterSize;if(e.duration=e.flattened.totalDuration*a,e.duration<=0)return e.audioBuffers=[],r({status:"empty",seconds:0});e.duration+=t;var o=Math.floor(s().sampleRate*e.duration);e.stop();var c=i(e.flattened);e.sequenceCallback&&e.sequenceCallback(c,e.callbackContext);var l=function(e,t){if(null==t)return null;var r=[];if(!t.length){var n=parseFloat(t);if(n*(e-1)>2)return null;for(var i=e%2==0,a=i?0-n/2:0,s=a+n,o=0;o<e;o++)(i=o%2==0)?(r.push(a),a-=n):(r.push(s),s+=n);return r}if(e===t.length){for(var c=!0,l=0;l<t.length;l++){var h=parseFloat(t[l]);h>=-1&&h<=1?r.push(h):c=!1}if(c)return r}return null}(c.length,e.pan),h={};c.forEach((function(e,t){var r=l&&l.length>t?l[t]:0;e.forEach((function(e){var t=e.instrument+":"+e.pitch+":"+e.volume+":"+Math.round(1e3*(e.end-e.start))/1e3+":"+r+":"+a+":"+e.cents;h[t]||(h[t]=[]),h[t].push(e.start)}))}));for(var d=[],f=s().createBuffer(2,o,s().sampleRate),p=0;p<Object.keys(h).length;p++){var m=Object.keys(h)[p],g=m.split(":"),v=void 0!==g[6]?parseFloat(g[6]):0;g={instrument:g[0],pitch:parseInt(g[1],10),volume:parseInt(g[2],10),len:parseFloat(g[3]),pan:parseFloat(g[4]),tempoMultiplier:parseFloat(g[5]),cents:v},d.push(u(f,s().sampleRate,g,h[m],e.soundFontVolumeMultiplier,e.programOffsets[g.instrument],t,e.noteEnd/1e3))}e.audioBuffers=[f],e.debugCallback&&(e.debugCallback("sampleRate = "+s().sampleRate),e.debugCallback("totalSamples = "+o),e.debugCallback("creationTime = "+Math.floor(1e3*(s().currentTime-n))+"ms")),Promise.all(d).then((function(){r({status:"ok",seconds:0})}))}))):Promise.reject(new Error(f))},e.start=function(){if(!e.audioBufferPossible)throw new Error(f);e.debugCallback&&e.debugCallback("start called");var t=e.pausedTimeSec?e.pausedTimeSec:0;e._kickOffSound(t),e.startTimeSec=s().currentTime-t,e.pausedTimeSec=void 0,e.debugCallback&&e.debugCallback("MIDI STARTED",e.startTimeSec)},e.pause=function(){if(!e.audioBufferPossible)throw new Error(f);e.debugCallback&&e.debugCallback("pause called"),e.stop(),e.pausedTimeSec=s().currentTime-e.startTimeSec},e.resume=function(){e.start()},e.seek=function(t,r){var n;switch(r){case"seconds":n=t;break;case"beats":n=t*e.millisecondsPerMeasure/e.beatsPerMeasure/1e3;break;default:n=(e.duration-e.fadeLength/1e3)*t}if(!e.audioBufferPossible)throw new Error(f);e.debugCallback&&e.debugCallback("seek called sec="+n),e.isRunning?(e.stop(),e._kickOffSound(n)):e.pausedTimeSec=n,e.pausedTimeSec=n},e.stop=function(){e.isRunning=!1,e.pausedTimeSec=void 0,e.directSource.forEach((function(e){try{e.stop()}catch(e){console.log("direct source didn't stop:",e)}})),e.directSource=[]},e.finished=function(){e.startTimeSec=void 0,e.pausedTimeSec=void 0,e.isRunning=!1},e.download=function(){return h(e)},e._deviceCapable=function(){return!!o()||(console.warn(f),e.debugCallback&&e.debugCallback(f),!1)},e._kickOffSound=function(t){e.isRunning=!0,e.directSource=[],e.audioBuffers.forEach((function(t,r){e.directSource[r]=s().createBufferSource(),e.directSource[r].buffer=t,e.directSource[r].connect(s().destination)})),e.directSource.forEach((function(e){e.start(0,t)})),e.onEnded&&(e.directSource[0].onended=function(){e.onEnded(e.callbackContext)})}}},873:function(e){e.exports=function(e){return window.URL.createObjectURL(function(e){var t,r,n=e[0],i=n.numberOfChannels,a=n.length*i*2+44,s=new ArrayBuffer(a),o=new DataView(s),c=[],l=0,h=0;for(d(1179011410),d(a-8),d(1163280727),d(544501094),d(16),u(1),u(i),d(n.sampleRate),d(2*n.sampleRate*i),u(2*i),u(16),d(1635017060),d(a-h-4),t=0;t<i;t++)c.push(n.getChannelData(t));for(;h<a;){for(t=0;t<c.length;t++)r=0|(.5+(r=Math.max(-1,Math.min(1,c[t][l])))<0?32768*r:32767*r),o.setInt16(h,r,!0),h+=2;l++}return new Blob([s],{type:"audio/wav"});function u(e){o.setUint16(h,e,!0),h+=2}function d(e){o.setUint32(h,e,!0),h+=4}}(e.audioBuffers))}},562:function(e,t,r){var n=r(1592),i=r(3284),a=function(e,t,r,n){var i=["abcjs-download-midi","abcjs-midi-"+n];t.downloadClass&&i.push(t.downloadClass);var a='<div class="'+i.join(" ")+'">';t.preTextDownload&&(a+=t.preTextDownload);var s,o,c=e.metaText&&e.metaText.title?e.metaText.title:"Untitled";return s=t.downloadLabel&&(o=t.downloadLabel)&&"[object Function]"==={}.toString.call(o)?t.downloadLabel(e,n):t.downloadLabel?t.downloadLabel.replace(/%T/,c):'Download MIDI for "'+c+'"',c=c.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_"),a+='<a download="'+(t.fileName?t.fileName:c+".midi")+'" href="'+r+'">'+s+"</a>",t.postTextDownload&&(a+=t.postTextDownload),a+"</div>"};e.exports=function(e,t){var r={};if(t)for(var s in t)t.hasOwnProperty(s)&&(r[s]=t[s]);function o(e,t,n){var s=i(t,r);switch(r.midiOutputType){case"encoded":return s;case"binary":var o=s.replace("data:audio/midi,","");o=(o=o.replace(/MThd/g,"%4d%54%68%64")).replace(/MTrk/g,"%4d%54%72%6b");for(var c=new ArrayBuffer(o.length/3),l=new Uint8Array(c),h=0;h<o.length/3;h++){var u=3*h+1,d=parseInt(o.substring(u,u+2),16);l[h]=d}return l;case"link":default:return a(t,r,s,n)}}return r.generateInline=!1,"string"==typeof e?n.renderEngine(o,"*",e,r):o(0,e,0)}},5343:function(e){e.exports='\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" class="abcjs-loading-svg">\n    <circle cx="50" cy="50" fill="none" stroke-width="20" r="35" stroke-dasharray="160 55"></circle>\n</svg>\n'},1225:function(e){e.exports='\n<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 700" preserveAspectRatio="xMidYMid meet">\n\t<g transform="translate(0,700) scale(0.1,-0.1)" >\n\t<path d="M3111 6981 c-20 -37 -90 -55 -364 -96 -120 -18 -190 -33 -244 -55\n\t-42 -17 -124 -42 -182 -56 -78 -18 -119 -34 -157 -60 -28 -19 -86 -46 -128\n\t-60 -43 -13 -107 -42 -144 -64 -37 -23 -84 -46 -106 -52 -21 -7 -56 -29 -79\n\t-50 -22 -22 -61 -50 -86 -63 -26 -13 -67 -40 -91 -60 -24 -20 -65 -47 -90 -60\n\t-25 -13 -53 -31 -61 -41 -8 -9 -32 -30 -54 -46 -75 -54 -486 -460 -512 -507\n\t-15 -25 -48 -69 -75 -98 -26 -28 -48 -57 -48 -63 0 -6 -18 -29 -39 -53 -21\n\t-23 -56 -71 -77 -107 -20 -36 -50 -80 -65 -97 -16 -18 -33 -52 -40 -75 -12\n\t-47 -47 -115 -84 -166 -13 -18 -30 -56 -38 -83 -8 -27 -34 -80 -56 -118 -33\n\t-53 -46 -91 -62 -167 -12 -63 -34 -127 -59 -179 -42 -84 -60 -166 -60 -270 0\n\t-90 26 -122 125 -154 54 -17 96 -19 430 -20 305 -1 381 2 430 14 82 22 140 51\n\t153 78 6 12 22 47 37 77 14 30 38 77 54 103 15 27 34 73 40 103 7 30 28 78 48\n\t107 19 28 44 74 55 101 10 28 34 67 53 87 18 20 49 61 68 90 19 30 44 63 57\n\t74 13 11 36 40 52 65 59 94 232 270 306 313 20 11 57 37 82 58 25 20 70 52\n\t100 72 30 19 66 47 79 61 13 14 49 35 80 46 30 12 80 37 111 56 31 19 95 45\n\t143 58 48 12 110 37 139 55 63 40 127 55 323 76 83 9 208 28 279 41 156 29\n\t165 29 330 4 453 -71 514 -84 606 -130 31 -16 83 -36 116 -45 32 -9 84 -34\n\t115 -56 31 -21 82 -48 113 -60 32 -11 72 -33 89 -48 18 -16 59 -45 92 -65 33\n\t-21 74 -51 90 -66 17 -15 49 -40 73 -54 52 -32 65 -61 50 -113 -8 -31 -61 -90\n\t-277 -308 -300 -303 -361 -382 -369 -481 -2 -29 0 -66 6 -81 13 -40 88 -138\n\t115 -151 12 -6 54 -26 92 -44 l70 -33 945 -2 c520 -1 975 2 1012 7 64 8 191\n\t50 231 76 11 7 33 34 50 60 22 34 42 51 65 58 l32 9 0 1101 0 1102 -32 9 c-21\n\t7 -44 26 -64 55 -60 84 -77 97 -140 110 -44 9 -76 10 -127 2 -59 -9 -77 -17\n\t-134 -62 -37 -28 -172 -155 -301 -281 -129 -127 -249 -237 -267 -245 -25 -10\n\t-41 -11 -71 -2 -58 15 -112 45 -124 69 -6 11 -35 35 -64 54 -28 18 -58 41 -66\n\t50 -8 9 -41 35 -75 58 -33 22 -77 56 -99 75 -21 18 -64 46 -95 61 -31 14 -73\n\t39 -93 55 -20 15 -70 40 -110 55 -40 15 -97 44 -127 64 -29 21 -78 44 -107 53\n\t-30 8 -77 31 -105 51 -42 28 -73 39 -173 60 -68 14 -154 39 -196 58 -95 43\n\t-131 51 -343 76 -209 24 -242 32 -279 70 l-30 29 -328 0 c-312 0 -330 -1 -339\n\t-19z"></path>\n\t<path d="M254 2875 c-89 -16 -107 -26 -145 -78 -32 -44 -62 -66 -91 -67 -17 0\n\t-18 -61 -18 -1140 l0 -1140 24 0 c16 0 41 -17 72 -50 40 -42 61 -55 117 -72\n\tl69 -21 82 23 c44 12 96 30 114 39 18 9 148 132 290 272 141 141 267 261 279\n\t268 51 26 86 14 176 -61 32 -26 62 -48 66 -48 5 0 36 -25 70 -55 34 -30 74\n\t-61 89 -69 15 -8 37 -28 50 -45 12 -17 50 -45 84 -62 34 -17 78 -44 98 -60 19\n\t-16 61 -37 93 -48 32 -11 81 -37 107 -56 27 -20 76 -45 109 -56 33 -12 75 -31\n\t93 -44 62 -45 93 -58 191 -82 54 -12 130 -37 168 -54 68 -29 180 -58 226 -59\n\t62 0 183 -64 183 -96 0 -12 88 -14 639 -14 l639 0 12 30 c18 44 76 66 233 89\n\t89 14 160 30 200 47 34 15 106 42 159 60 54 18 112 44 130 57 47 35 85 52 146\n\t67 29 7 76 28 105 48 29 20 77 48 107 63 30 15 66 39 80 54 14 15 50 40 81 56\n\t31 15 78 46 104 69 26 22 61 46 79 54 17 7 43 26 56 42 14 16 41 41 60 56 64\n\t48 380 362 408 405 15 23 40 51 55 63 15 12 36 38 46 58 11 21 37 57 58 82 22\n\t25 49 62 62 83 13 20 38 56 57 78 19 23 50 74 69 113 19 39 46 86 59 104 14\n\t18 34 62 46 98 12 36 32 77 45 92 31 38 60 97 80 167 9 33 26 76 37 95 29 50\n\t47 103 68 206 10 52 32 117 51 155 29 56 33 74 34 140 0 94 -10 108 -101 138\n\t-61 20 -83 21 -463 21 -226 0 -421 -4 -451 -10 -63 -12 -86 -30 -110 -85 -10\n\t-22 -33 -63 -52 -92 -21 -31 -42 -80 -53 -123 -11 -44 -32 -93 -56 -128 -20\n\t-32 -47 -83 -59 -115 -12 -32 -37 -77 -56 -100 -19 -23 -50 -65 -69 -94 -19\n\t-29 -44 -57 -54 -63 -11 -5 -29 -27 -42 -47 -52 -85 -234 -277 -300 -315 -25\n\t-15 -53 -38 -62 -51 -9 -14 -42 -39 -74 -57 -32 -18 -75 -48 -95 -66 -21 -18\n\t-59 -44 -85 -58 -26 -13 -72 -40 -100 -59 -35 -24 -78 -41 -128 -52 -47 -11\n\t-99 -31 -139 -56 -69 -42 -94 -49 -391 -110 -245 -51 -425 -66 -595 -50 -168\n\t16 -230 27 -330 61 -47 16 -123 35 -170 44 -98 17 -123 25 -172 58 -20 14 -71\n\t37 -114 53 -44 15 -95 40 -115 56 -20 16 -70 42 -110 59 -40 16 -88 45 -108\n\t63 -20 19 -55 46 -78 61 -24 14 -49 35 -55 47 -7 11 -34 33 -60 49 -50 31 -65\n\t61 -53 102 4 13 130 147 281 298 236 238 277 283 299 335 15 32 35 71 46 86\n\t12 18 19 44 19 76 0 42 -8 63 -53 138 -92 151 11 139 -1207 141 -798 2 -1030\n\t0 -1086 -11z"></path>\n\t</g>\n</svg>\n'},5075:function(e){e.exports='\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-pause-svg">\n  <g>\n    <rect width="8.23" height="25"/>\n    <rect width="8.23" height="25" x="17"/>\n  </g>\n</svg>\n'},9733:function(e){e.exports='\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-play-svg">\n    <g>\n    <polygon points="4 0 23 12.5 4 25"/>\n    </g>\n</svg>\n'},6987:function(e){e.exports='\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25">\n  <g>\n    <polygon points="5 12.5 24 0 24 25"/>\n    <rect width="3" height="25" x="0" y="0"/>\n  </g>\n</svg>\n'},8471:function(e){e.exports=["acoustic_grand_piano","bright_acoustic_piano","electric_grand_piano","honkytonk_piano","electric_piano_1","electric_piano_2","harpsichord","clavinet","celesta","glockenspiel","music_box","vibraphone","marimba","xylophone","tubular_bells","dulcimer","drawbar_organ","percussive_organ","rock_organ","church_organ","reed_organ","accordion","harmonica","tango_accordion","acoustic_guitar_nylon","acoustic_guitar_steel","electric_guitar_jazz","electric_guitar_clean","electric_guitar_muted","overdriven_guitar","distortion_guitar","guitar_harmonics","acoustic_bass","electric_bass_finger","electric_bass_pick","fretless_bass","slap_bass_1","slap_bass_2","synth_bass_1","synth_bass_2","violin","viola","cello","contrabass","tremolo_strings","pizzicato_strings","orchestral_harp","timpani","string_ensemble_1","string_ensemble_2","synth_strings_1","synth_strings_2","choir_aahs","voice_oohs","synth_choir","orchestra_hit","trumpet","trombone","tuba","muted_trumpet","french_horn","brass_section","synth_brass_1","synth_brass_2","soprano_sax","alto_sax","tenor_sax","baritone_sax","oboe","english_horn","bassoon","clarinet","piccolo","flute","recorder","pan_flute","blown_bottle","shakuhachi","whistle","ocarina","lead_1_square","lead_2_sawtooth","lead_3_calliope","lead_4_chiff","lead_5_charang","lead_6_voice","lead_7_fifths","lead_8_bass_lead","pad_1_new_age","pad_2_warm","pad_3_polysynth","pad_4_choir","pad_5_bowed","pad_6_metallic","pad_7_halo","pad_8_sweep","fx_1_rain","fx_2_soundtrack","fx_3_crystal","fx_4_atmosphere","fx_5_brightness","fx_6_goblins","fx_7_echoes","fx_8_scifi","sitar","banjo","shamisen","koto","kalimba","bagpipe","fiddle","shanai","tinkle_bell","agogo","steel_drums","woodblock","taiko_drum","melodic_tom","synth_drum","reverse_cymbal","guitar_fret_noise","breath_noise","seashore","bird_tweet","telephone_ring","helicopter","applause","gunshot","percussion"]},2228:function(e,t,r){var n=r(4771);e.exports=function(e,t,r,i){return new Promise((function(a,s){n[t]||(n[t]={});var o=n[t];if("error"===o[r])return a({instrument:t,name:r,status:"error",message:"Unable to load sound font "+e+" "+t+" "+r});if("pending"===o[r])return a({instrument:t,name:r,status:"pending"});if(o[r])return a({instrument:t,name:r,status:"cached"});o[r]="pending";var c=new XMLHttpRequest;c.open("GET",e+t+"-mp3/"+r+".mp3",!0),c.responseType="arraybuffer";var l=this;function h(e){o[r]=e,a({instrument:t,name:r,status:"loaded"})}function u(n){return n="Can't decode sound. "+e+" "+t+" "+r+" "+n,l.debugCallback&&l.debugCallback(n),a({instrument:t,name:r,status:"error",message:n})}c.onload=function(n){if(200!==this.status){o[r]="error";var c="Onload error loading sound: "+r+" "+e+" "+n.currentTarget.status+" "+n.currentTarget.statusText;return l.debugCallback&&l.debugCallback(c),a({instrument:t,name:r,status:"error",message:c})}try{var d=i.decodeAudioData(this.response,h,u);d&&d.catch&&d.catch((function(){}))}catch(e){s(e)}},c.addEventListener("error",(function(){o[r]="error";var n="Error in loading sound:  "+e;return l.debugCallback&&l.debugCallback(n),a({instrument:t,name:r,status:"error",message:n})}),!1),c.send()}))}},522:function(e){e.exports={21:"A0",22:"Bb0",23:"B0",24:"C1",25:"Db1",26:"D1",27:"Eb1",28:"E1",29:"F1",30:"Gb1",31:"G1",32:"Ab1",33:"A1",34:"Bb1",35:"B1",36:"C2",37:"Db2",38:"D2",39:"Eb2",40:"E2",41:"F2",42:"Gb2",43:"G2",44:"Ab2",45:"A2",46:"Bb2",47:"B2",48:"C3",49:"Db3",50:"D3",51:"Eb3",52:"E3",53:"F3",54:"Gb3",55:"G3",56:"Ab3",57:"A3",58:"Bb3",59:"B3",60:"C4",61:"Db4",62:"D4",63:"Eb4",64:"E4",65:"F4",66:"Gb4",67:"G4",68:"Ab4",69:"A4",70:"Bb4",71:"B4",72:"C5",73:"Db5",74:"D5",75:"Eb5",76:"E5",77:"F5",78:"Gb5",79:"G5",80:"Ab5",81:"A5",82:"Bb5",83:"B5",84:"C6",85:"Db6",86:"D6",87:"Eb6",88:"E6",89:"F6",90:"Gb6",91:"G6",92:"Ab6",93:"A6",94:"Bb6",95:"B6",96:"C7",97:"Db7",98:"D7",99:"Eb7",100:"E7",101:"F7",102:"Gb7",103:"G7",104:"Ab7",105:"A7",106:"Bb7",107:"B7",108:"C8",109:"Db8",110:"D8",111:"Eb8",112:"E8",113:"F8",114:"Gb8",115:"G8",116:"Ab8",117:"A8",118:"Bb8",119:"B8",120:"C9",121:"Db9"}},5058:function(e){var t={f0:"_C",n0:"=C",s0:"^C",x0:"C",f1:"_D",n1:"=D",s1:"^D",x1:"D",f2:"_E",n2:"=E",s2:"^E",x2:"E",f3:"_F",n3:"=F",s3:"^F",x3:"F",f4:"_G",n4:"=G",s4:"^G",x4:"G",f5:"_A",n5:"=A",s5:"^A",x5:"A",f6:"_B",n6:"=B",s6:"^B",x6:"B",f7:"_c",n7:"=c",s7:"^c",x7:"c",f8:"_d",n8:"=d",s8:"^d",x8:"d",f9:"_e",n9:"=e",s9:"^e",x9:"e",f10:"_f",n10:"=f",s10:"^f",x10:"f",f11:"_g",n11:"=g",s11:"^g",x11:"g",f12:"_a",n12:"=a",s12:"^a",x12:"a",f13:"_b",n13:"=b",s13:"^b",x13:"b"};e.exports=function(e){var r=(e.accidental?e.accidental[0]:"x")+e.verticalPos;return t[r]}},4586:function(e,t,r){var n=r(4771),i=r(522),a=r(819),s=function(e,t,r){for(var n=0;n<2;n++)for(var i=t.getChannelData(n),a=e.getChannelData(n),s=0;s<i.length;s++)a[s+r]+=i[s]};e.exports=function(e,t,r,o,c,l,h,u){var d=window.OfflineAudioContext||window.webkitOfflineAudioContext,f=r.len*r.tempoMultiplier;l&&(f+=l/1e3),(f-=u)<0&&(f=.005);var p=new d(2,Math.floor((f+h)*t),t),m=i[r.pitch],g=n[r.instrument][m];if("error"!==g&&"pending"!==g){var v=p.createBufferSource();v.buffer=g;var b,y=r.volume/96*c;return v.gainNode=p.createGain(),r.pan&&p.createStereoPanner&&(v.panNode=p.createStereoPanner(),v.panNode.pan.setValueAtTime(r.pan,0)),v.gainNode.gain.value=y,v.gainNode.gain.linearRampToValueAtTime(v.gainNode.gain.value,f),v.gainNode.gain.linearRampToValueAtTime(0,f+h),r.cents&&(v.playbackRate.value=a(r.cents)),v.panNode?(v.panNode.connect(p.destination),v.gainNode.connect(v.panNode)):v.gainNode.connect(p.destination),v.connect(v.gainNode),v.start(0),v.noteOff?v.noteOff(f+h):v.stop(f+h),p.oncomplete=function(n){if(n.renderedBuffer)for(var i=0;i<o.length;i++){var a=o[i]*r.tempoMultiplier;l&&(a-=l/1e3),a<0&&(a=0),a=Math.floor(a*t),s(e,n.renderedBuffer,a)}b()},p.startRendering(),new Promise((function(e,t){b=e}))}console.log("Didn't load note",r.instrument,m,g)}},4718:function(e,t,r){var n=r(2029),i=r(5594),a=r(8702);function s(e,t){var r=new i;return r.init({sequence:e,millisecondsPerMeasure:t}).then((function(){return r.prime()})).then((function(){return r.start(),Promise.resolve()}))}e.exports=function(e,t,r){for(var i=new n,o=0;o<e.length;o++){var c=e[o],l=i.addTrack();if(i.setInstrument(l,c.instrument),0===o&&t)for(var h=0;h<t.length;h++){var u=t[h];i.appendNote(l,u.pitch,1/64,u.volume,u.cents)}i.appendNote(l,c.pitch,c.duration,c.volume,c.cents)}var d=a();return"suspended"===d.state?d.resume().then((function(){return s(i,r)})):s(i,r)}},5281:function(e){e.exports=function(e){if(e)window.abcjsAudioContext=e;else if(!window.abcjsAudioContext){var t=window.AudioContext||window.webkitAudioContext;window.abcjsAudioContext=new t}return"suspended"!==window.abcjsAudioContext.state}},4771:function(e){e.exports={}},5049:function(e,t,r){var n=r(8702);e.exports=function(){var e=n();return e?void 0!==e.resume:!!window.Promise&&!!(window.AudioContext||window.webkitAudioContext||navigator.mozAudioContext||navigator.msAudioContext)}},3450:function(e,t,r){var n=r(6313),i=r(5594),a=r(5681),s=r(8702);e.exports=function(){var e=this;e.warp=100,e.cursorControl=null,e.visualObj=null,e.timer=null,e.midiBuffer=null,e.options=null,e.currentTempo=null,e.control=null,e.isLooping=!1,e.isStarted=!1,e.isLoaded=!1,e.isLoading=!1,e.load=function(t,r,i){i||(i={}),e.control=new n(t,{loopHandler:i.displayLoop?e.toggleLoop:void 0,restartHandler:i.displayRestart?e.restart:void 0,playPromiseHandler:i.displayPlay?e.play:void 0,progressHandler:i.displayProgress?e.randomAccess:void 0,warpHandler:i.displayWarp?e.onWarp:void 0,afterResume:e.init}),e.cursorControl=r,e.disable(!0)},e.disable=function(t){e.control&&e.control.disable(t)},e.setTune=function(t,r,n){return e.visualObj=t,e.disable(!1),e.options=n,e.control&&(e.pause(),e.setProgress(0,1),e.control.resetAll(),e.restart(),e.isStarted=!1),e.isLooping=!1,r?e.go():Promise.resolve({status:"no-audio-context"})},e.go=function(){e.isLoading=!0;var t,r=100*e.visualObj.millisecondsPerMeasure()/e.warp;return e.currentTempo=Math.round(e.visualObj.getBeatsPerMeasure()/r*6e4),e.control&&e.control.setTempo(e.currentTempo),e.percent=0,e.midiBuffer||(e.midiBuffer=new i),s().resume().then((function(t){return e.midiBuffer.init({visualObj:e.visualObj,options:e.options,millisecondsPerMeasure:r})})).then((function(r){return t=r,e.midiBuffer.prime()})).then((function(){var r=16;return e.cursorControl&&void 0!==e.cursorControl.beatSubdivisions&&parseInt(e.cursorControl.beatSubdivisions,10)>=1&&parseInt(e.cursorControl.beatSubdivisions,10)<=64&&(r=parseInt(e.cursorControl.beatSubdivisions,10)),e.timer=new a(e.visualObj,{beatCallback:e.beatCallback,eventCallback:e.eventCallback,lineEndCallback:e.lineEndCallback,qpm:e.currentTempo,extraMeasuresAtBeginning:e.cursorControl?e.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:e.cursorControl?e.cursorControl.lineEndAnticipation:0,beatSubdivisions:r}),e.cursorControl&&e.cursorControl.onReady&&"function"==typeof e.cursorControl.onReady&&e.cursorControl.onReady(e),e.isLoaded=!0,e.isLoading=!1,Promise.resolve({status:"created",notesStatus:t})}))},e.destroy=function(){e.timer&&(e.timer.reset(),e.timer.stop(),e.timer=null),e.midiBuffer&&(e.midiBuffer.stop(),e.midiBuffer=null),e.setProgress(0,1),e.control&&e.control.resetAll()},e.play=function(){return e.runWhenReady(e._play,void 0)},e.runWhenReady=function(t,r){return e.visualObj?e.isLoading?(n=500,new Promise((function(e){setTimeout(e,n)}))).then((function(){return e.isLoading?e.runWhenReady(t,r):t(r)})):e.isLoaded?t(r):e.go().then((function(){return t(r)})):Promise.resolve({status:"loading"});var n},e._play=function(){return s().resume().then((function(){return e.isStarted=!e.isStarted,e.isStarted?(e.cursorControl&&e.cursorControl.onStart&&"function"==typeof e.cursorControl.onStart&&e.cursorControl.onStart(),e.midiBuffer.start(),e.timer.start(e.percent),e.control&&e.control.pushPlay(!0)):e.pause(),Promise.resolve({status:"ok"})}))},e.pause=function(){e.timer&&(e.timer.pause(),e.midiBuffer.pause(),e.control&&e.control.pushPlay(!1))},e.toggleLoop=function(){e.isLooping=!e.isLooping,e.control&&e.control.pushLoop(e.isLooping)},e.restart=function(){e.timer&&(e.timer.setProgress(0),e.midiBuffer.seek(0))},e.randomAccess=function(t){return e.runWhenReady(e._randomAccess,t)},e._randomAccess=function(t){var r=t.target.classList.contains("abcjs-midi-progress-indicator")?t.target.parentNode:t.target,n=(t.x-r.offsetLeft)/r.offsetWidth;return n<0&&(n=0),n>1&&(n=1),e.seek(n),Promise.resolve({status:"ok"})},e.seek=function(t,r){e.timer&&e.midiBuffer&&(e.timer.setProgress(t,r),e.midiBuffer.seek(t,r))},e.setWarp=function(t){if(parseInt(t,10)>0){e.warp=parseInt(t,10);var r=e.isStarted,n=e.percent;return e.destroy(),e.isStarted=!1,e.go().then((function(){return e.setProgress(n,1e3*e.midiBuffer.duration),e.control&&e.control.setWarp(e.currentTempo,e.warp),r?e.play().then((function(){return e.seek(n),Promise.resolve()})):(e.seek(n),Promise.resolve())}))}return Promise.resolve()},e.onWarp=function(t){var r=t.target.value;return e.setWarp(r)},e.setProgress=function(t,r){e.percent=t,e.control&&e.control.setProgress(t,r)},e.finished=function(){if(e.timer.reset(),e.isLooping)return e.timer.start(0),e.midiBuffer.finished(),e.midiBuffer.start(),"continue";e.timer.stop(),e.isStarted&&(e.control&&e.control.pushPlay(!1),e.isStarted=!1,e.midiBuffer.finished(),e.cursorControl&&e.cursorControl.onFinished&&"function"==typeof e.cursorControl.onFinished&&e.cursorControl.onFinished(),e.setProgress(0,1))},e.beatCallback=function(t,r,n,i){var a=t/r;e.setProgress(a,n),e.cursorControl&&e.cursorControl.onBeat&&"function"==typeof e.cursorControl.onBeat&&e.cursorControl.onBeat(t,r,n,i)},e.eventCallback=function(t){if(!t)return e.finished();e.cursorControl&&e.cursorControl.onEvent&&"function"==typeof e.cursorControl.onEvent&&e.cursorControl.onEvent(t)},e.lineEndCallback=function(t,r){e.cursorControl&&e.cursorControl.onLineEnd&&"function"==typeof e.cursorControl.onLineEnd&&e.cursorControl.onLineEnd(t,r)},e.getUrl=function(){return e.midiBuffer.download()},e.download=function(t){var r=e.getUrl(),n=document.createElement("a");document.body.appendChild(n),n.setAttribute("style","display: none;"),n.href=r,n.download=t||"output.wav",n.click(),window.URL.revokeObjectURL(r),document.body.removeChild(n)}}},2029:function(e){e.exports=function(){var e=this;e.tracks=[],e.totalDuration=0,e.currentInstrument=[],e.starts=[],e.addTrack=function(){return e.tracks.push([]),e.currentInstrument.push(0),e.starts.push(0),e.tracks.length-1},e.setInstrument=function(t,r){e.tracks[t].push({channel:0,cmd:"program",instrument:r}),e.currentInstrument[t]=r},e.appendNote=function(t,r,n,i,a){var s={cmd:"note",duration:n,gap:0,instrument:e.currentInstrument[t],pitch:r,start:e.starts[t],volume:i};a&&(s.cents=a),e.tracks[t].push(s),e.starts[t]+=n,e.totalDuration=Math.max(e.totalDuration,e.starts[t])}}},3255:function(e,t,r){r(1009);var n=r(907),i=r(2080),a=function(e,t,r,n,i,a){a||(a={}),this.tuneNumber=i,this.abcelem=e,this.duration=t,this.durationClass=a.durationClassOveride?a.durationClassOveride:this.duration,this.minspacing=r||0,this.x=0,this.children=[],this.heads=[],this.extra=[],this.extraw=0,this.w=0,this.right=[],this.invisible=!1,this.bottom=void 0,this.top=void 0,this.type=n,this.fixed={w:0,t:void 0,b:void 0},this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};a.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}},a.prototype.addExtra=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),void 0===this.fixed.t?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top),void 0===this.fixed.b?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom),e.dx<this.extraw&&(this.extraw=e.dx),this.extra[this.extra.length]=e,this._addChild(e)},a.prototype.addHead=function(e){e.dx<this.extraw&&(this.extraw=e.dx),this.heads[this.heads.length]=e,this.addRight(e)},a.prototype.addRight=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),void 0!==e.top&&(void 0===this.fixed.t?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top)),void 0!==e.bottom&&(void 0===this.fixed.b?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom)),isNaN(this.fixed.t)||isNaN(this.fixed.b),e.dx+e.w>this.w&&(this.w=e.dx+e.w),this.right[this.right.length]=e,this._addChild(e)},a.prototype.addFixed=function(e){this._addChild(e)},a.prototype.addFixedX=function(e){this._addChild(e)},a.prototype.addCentered=function(e){var t=e.w/2;-t<this.extraw&&(this.extraw=-t),this.extra[this.extra.length]=e,e.dx+t>this.w&&(this.w=e.dx+t),this.right[this.right.length]=e,this._addChild(e)},a.prototype.setLimit=function(e,t){t[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],t[e]):this.specialY[e]=t[e])},a.prototype._addChild=function(e){e.parent=this,this.children[this.children.length]=e,this.pushTop(e.top),this.pushBottom(e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},a.prototype.pushTop=function(e){void 0!==e&&(void 0===this.top?this.top=e:this.top=Math.max(e,this.top))},a.prototype.pushBottom=function(e){void 0!==e&&(void 0===this.bottom?this.bottom=e:this.bottom=Math.min(e,this.bottom))},a.prototype.setX=function(e){this.x=e;for(var t=0;t<this.children.length;t++)this.children[t].setX(e)},a.prototype.center=function(e,t){var r=(t.x-e.x)/2+e.x;this.x=r-this.w/2;for(var n=0;n<this.children.length;n++)this.children[n].setX(this.x)},a.prototype.setHint=function(){this.hint=!0},a.prototype.highlight=function(e,t){n.bind(this)(e,t)},a.prototype.unhighlight=function(e,t){i.bind(this)(e,t)},e.exports=a},6548:function(e,t,r){var n=r(3255),i=r(7669),a=r(355),s=r(7561),o=r(6166),c=r(3268),l=r(313),h=r(7841),u=r(1208),d=r(5245),f=r(1577),p=r(8613),m=r(3208),g=r(8664),v=r(9891),b=r(7193),y=r(8462),w=r(347),k=r(5058),x=r(5008),T=function(e){var t=0;return e.duration&&(t=e.duration),t},C=!1,A={rest:{0:"rests.whole",1:"rests.half",2:"rests.quarter",3:"rests.8th",4:"rests.16th",5:"rests.32nd",6:"rests.64th",7:"rests.128th",multi:"rests.multimeasure"},note:{"-1":"noteheads.dbl",0:"noteheads.whole",1:"noteheads.half",2:"noteheads.quarter",3:"noteheads.quarter",4:"noteheads.quarter",5:"noteheads.quarter",6:"noteheads.quarter",7:"noteheads.quarter",nostem:"noteheads.quarter"},rhythm:{"-1":"noteheads.slash.whole",0:"noteheads.slash.whole",1:"noteheads.slash.whole",2:"noteheads.slash.quarter",3:"noteheads.slash.quarter",4:"noteheads.slash.quarter",5:"noteheads.slash.quarter",6:"noteheads.slash.quarter",7:"noteheads.slash.quarter",nostem:"noteheads.slash.nostem"},x:{"-1":"noteheads.indeterminate",0:"noteheads.indeterminate",1:"noteheads.indeterminate",2:"noteheads.indeterminate",3:"noteheads.indeterminate",4:"noteheads.indeterminate",5:"noteheads.indeterminate",6:"noteheads.indeterminate",7:"noteheads.indeterminate",nostem:"noteheads.indeterminate"},harmonic:{"-1":"noteheads.harmonic.quarter",0:"noteheads.harmonic.quarter",1:"noteheads.harmonic.quarter",2:"noteheads.harmonic.quarter",3:"noteheads.harmonic.quarter",4:"noteheads.harmonic.quarter",5:"noteheads.harmonic.quarter",6:"noteheads.harmonic.quarter",7:"noteheads.harmonic.quarter",nostem:"noteheads.harmonic.quarter"},triangle:{"-1":"noteheads.triangle.quarter",0:"noteheads.triangle.quarter",1:"noteheads.triangle.quarter",2:"noteheads.triangle.quarter",3:"noteheads.triangle.quarter",4:"noteheads.triangle.quarter",5:"noteheads.triangle.quarter",6:"noteheads.triangle.quarter",7:"noteheads.triangle.quarter",nostem:"noteheads.triangle.quarter"},uflags:{3:"flags.u8th",4:"flags.u16th",5:"flags.u32nd",6:"flags.u64th"},dflags:{3:"flags.d8th",4:"flags.d16th",5:"flags.d32nd",6:"flags.d64th"}},S=function(e,t,r){this.decoration=new h,this.getTextSize=e,this.tuneNumber=t,this.isBagpipes=r.bagpipes,this.flatBeams=r.flatbeams,this.graceSlurs=r.graceSlurs,this.percmap=r.percmap,this.reset()};function _(e,t){var r=e[t];if("note"!==r.el_type||!r.startBeam||r.endBeam)return{count:1,elem:r};for(var n=[];t<e.length&&"note"===e[t].el_type&&(n.push(e[t]),!e[t].endBeam);)t++;return{count:n.length,elem:n}}function M(e){if(e.pitches){E(e);for(var t=0,r=0;r<e.pitches.length;r++)t+=e.pitches[r].verticalPos;e.averagepitch=t/e.pitches.length,e.minpitch=e.pitches[0].verticalPos,e.maxpitch=e.pitches[e.pitches.length-1].verticalPos}}S.prototype.reset=function(){this.slurs={},this.ties=[],this.voiceScale=1,this.slursbyvoice={},this.tiesbyvoice={},this.endingsbyvoice={},this.scaleByVoice={},this.tripletmultiplier=1,this.abcline=void 0,this.accidentalSlot=void 0,this.accidentalshiftx=void 0,this.dotshiftx=void 0,this.hasVocals=!1,this.minY=void 0,this.partstartelem=void 0,this.startlimitelem=void 0,this.stemdir=void 0},S.prototype.setStemHeight=function(e){this.stemHeight=Math.round(10*e/p.STEP)/10},S.prototype.getCurrentVoiceId=function(e,t){return"s"+e+"v"+t},S.prototype.pushCrossLineElems=function(e,t){this.slursbyvoice[this.getCurrentVoiceId(e,t)]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId(e,t)]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId(e,t)]=this.partstartelem,this.scaleByVoice[this.getCurrentVoiceId(e,t)]=this.voiceScale},S.prototype.popCrossLineElems=function(e,t){this.slurs=this.slursbyvoice[this.getCurrentVoiceId(e,t)]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId(e,t)]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId(e,t)],this.voiceScale=this.scaleByVoice[this.getCurrentVoiceId(e,t)],void 0===this.voiceScale&&(this.voiceScale=1)},S.prototype.containsLyrics=function(e){for(var t=0;t<e.length;t++)for(var r=0;r<e[t].voices.length;r++)for(var n=0;n<e[t].voices[r].length;n++){var i=e[t].voices[r][n];if(i.lyric)return void(i.positioning&&"below"!==i.positioning.vocalPosition||(this.hasVocals=!0))}},S.prototype.createABCLine=function(e,t){this.minY=2,this.containsLyrics(e);var r=new m(this.getTextSize);this.tempoSet=!1;for(var n=0;n<e.length;n++)C&&this.restoreState(),C=!1,this.createABCStaff(r,e[n],t,n);return r},S.prototype.createABCStaff=function(e,t,r,n){e.getTextSize.updateFonts(t);for(var i=0;i<t.voices.length;i++){var c=new y(i,t.voices.length);0===i?(c.barfrom="start"===t.connectBarLines||"continue"===t.connectBarLines,c.barto="continue"===t.connectBarLines||"end"===t.connectBarLines):c.duplicate=!0,t.title&&t.title[i]&&(c.header=t.title[i].replace(/\\n/g,"\n"),c.headerPosition=6+e.getTextSize.baselineToCenter(c.header,"voicefont","staff-extra voice-name",i,t.voices.length)/p.STEP),t.clef&&"perc"===t.clef.type&&(c.isPercussion=!0);var h=s(t.clef,this.tuneNumber);h&&(0===i&&t.barNumber&&this.addMeasureNumber(t.barNumber,h),c.addChild(h),this.startlimitelem=h);var u=o(t.key,this.tuneNumber);if(u&&(c.addChild(u),this.startlimitelem=u),t.meter){"specified"===t.meter.type?this.measureLength=t.meter.value[0].num/t.meter.value[0].den:this.measureLength=1;var d=l(t.meter,this.tuneNumber);c.addChild(d),this.startlimitelem=d}c.duplicate&&(c.children=[]);var f=t.clef.stafflines||0===t.clef.stafflines?t.clef.stafflines:5;e.addVoice(c,n,f);var m=1===f;this.createABCVoice(t.voices[i],r,n,i,m,c),e.setStaffLimits(c),0===i&&("start"===t.brace||!e.brace&&t.brace?(e.brace||(e.brace=[]),e.brace.push(new a(c,"brace"))):"end"===t.brace&&e.brace?e.brace[e.brace.length-1].setBottomStaff(c):"continue"===t.brace&&e.brace&&e.brace[e.brace.length-1].continuing(c),"start"===t.bracket||!e.bracket&&t.bracket?(e.bracket||(e.bracket=[]),e.bracket.push(new a(c,"bracket"))):"end"===t.bracket&&e.bracket?e.bracket[e.bracket.length-1].setBottomStaff(c):"continue"===t.bracket&&e.bracket&&e.bracket[e.bracket.length-1].continuing(c))}},S.prototype.createABCVoice=function(e,t,r,i,a,s){this.popCrossLineElems(r,i),this.stemdir=this.isBagpipes?"down":null,this.abcline=e,this.partstartelem&&(this.partstartelem=new u("",null,null),s.addOther(this.partstartelem));var o=s.voicetotal<2?-1:s.voicenumber;for(var l in this.slurs)this.slurs.hasOwnProperty(l)&&(this.slurs[l]=new v({force:this.slurs[l].force,voiceNumber:o,stemDir:this.slurs[l].stemDir,style:this.slurs[l].dotted}),C&&this.slurs[l].setHint(),s.addOther(this.slurs[l]));for(var h=0;h<this.ties.length;h++)this.ties[h]=new v({force:this.ties[h].force,stemDir:this.ties[h].stemDir,voiceNumber:o,style:this.ties[h].dotted}),C&&this.ties[h].setHint(),s.addOther(this.ties[h]);for(var d=0;d<this.abcline.length;d++)M(this.abcline[d]),this.minY=Math.min(this.abcline[d].minpitch,this.minY);for(var f=0===r,p=0;p<this.abcline.length;){var m=_(this.abcline,p),b=this.createABCElement(f,a,s,m.elem);if(b)for(h=0;h<b.length;h++){if(!this.tempoSet&&t&&!t.suppress){this.tempoSet=!0;var y=new n(t,0,0,"tempo",this.tuneNumber,{});y.addFixedX(new g(t,this.tuneNumber,c)),s.addChild(y)}s.addChild(b[h])}p+=m.count}this.pushCrossLineElems(r,i)},S.prototype.saveState=function(){this.tiesSave=x.cloneArray(this.ties),this.slursSave=x.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=x.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=x.cloneHashOfArrayOfHash(this.tiesbyvoice)},S.prototype.restoreState=function(){this.ties=x.cloneArray(this.tiesSave),this.slurs=x.cloneHashOfHash(this.slursSave),this.slursbyvoice=x.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=x.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)},S.prototype.createABCElement=function(e,t,r,i){var a=[];switch(i.el_type){case void 0:a=this.createBeam(t,r,i);break;case"note":a[0]=this.createNote(i,!1,t,r),this.triplet&&this.triplet.isClosed()&&(r.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);break;case"bar":a[0]=this.createBarLine(r,i,e),r.duplicate&&a.length>0&&(a[0].invisible=!0);break;case"meter":a[0]=l(i,this.tuneNumber),this.startlimitelem=a[0],r.duplicate&&a.length>0&&(a[0].invisible=!0);break;case"clef":if(a[0]=s(i,this.tuneNumber),!a[0])return null;r.duplicate&&a.length>0&&(a[0].invisible=!0);break;case"key":var h=o(i,this.tuneNumber);h&&(a[0]=h,this.startlimitelem=a[0]),r.duplicate&&a.length>0&&(a[0].invisible=!0);break;case"stem":this.stemdir="auto"===i.direction?void 0:i.direction;break;case"part":var u=new n(i,0,0,"part",this.tuneNumber),d=this.getTextSize.calc(i.title,"partsfont","part");u.addFixedX(new f(i.title,0,0,void 0,{type:"part",height:d.height/p.STEP})),a[0]=u;break;case"tempo":var m=new n(i,0,0,"tempo",this.tuneNumber);m.addFixedX(new g(i,this.tuneNumber,c)),a[0]=m;break;case"style":"normal"===i.head?delete this.style:this.style=i.head;break;case"hint":C=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=i.size;break;default:var v=new n(i,0,0,"unsupported",this.tuneNumber);v.addFixed(new f("element type "+i.el_type,0,0,void 0,{type:"debug"})),a[0]=v}return a},S.prototype.createBeam=function(e,t,r){var n=[],a=new i(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,r[0]);C&&a.setHint();for(var s=0;s<r.length;s++){var o=r[s],c=this.createNote(o,!0,e,t);n.push(c),a.add(c),this.triplet&&this.triplet.isClosed()&&(t.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1)}return a.calcDir(),t.addBeam(a),n};var E=function(e){var t;do{t=!0;for(var r=0;r<e.pitches.length-1;r++)if(e.pitches[r].pitch>e.pitches[r+1].pitch){t=!1;var n=e.pitches[r];e.pitches[r]=e.pitches[r+1],e.pitches[r+1]=n}}while(!t)},N=function(e,t,r,n,i,a,s,o,c){for(var l=r;l>11;l--)l%2!=0||n||e.addFixed(new f(null,o,(i+4)*c,l,{type:"ledger"}));for(l=t;l<1;l++)l%2!=0||n||e.addFixed(new f(null,o,(i+4)*c,l,{type:"ledger"}));for(l=0;l<a.length;l++){var h=i;"down"===s&&(h=-h),e.addFixed(new f(null,h+o,(i+4)*c,a[l],{type:"ledger"}))}};function B(e,t){for(var r=0;r<e.length;r++)if(JSON.stringify(e[r])===JSON.stringify(t))return;e.push(t)}S.prototype.addGraceNotes=function(e,t,r,n,a,s,o){var l=.6;a=Math.round(.7*a);var h,u,p=null;e.gracenotes.length>1&&(p=new i(a,"grace",s),C&&p.setHint(),p.mainNote=r);var m=[];for(u=e.gracenotes.length-1;u>=0;u--)o+=10,m[u]=o,e.gracenotes[u].accidental&&(o+=7);for(u=0;u<e.gracenotes.length;u++){var g=e.gracenotes[u].verticalPos;h=p?null:A.uflags[s?5:3];var b=c(r,"noteheads.quarter",e.gracenotes[u],{dir:"up",headx:-m[u],extrax:-m[u],flag:h,scale:l*this.voiceScale,accidentalSlot:[]});b.notehead.highestVert=b.notehead.pitch+a;var y=b.notehead;if(this.addSlursAndTies(r,e.gracenotes[u],y,t,"up",!0),r.addExtra(y),e.gracenotes[u].acciaccatura){var w=e.gracenotes[u].verticalPos+4.2,k=p?5:6;r.addRight(new f("flags.ugrace",-m[u]+k,0,w,{scalex:l,scaley:l}))}if(p){var x=e.gracenotes[u].duration/2;s&&(x/=2);var T={heads:[y],abcelem:{averagepitch:g,minpitch:g,maxpitch:g,duration:x}};p.add(T)}else{var S=g+1/3*l,_=g+4.2,M=y.dx+y.w;r.addExtra(new f(null,M,0,S,{type:"stem",pitch2:_,linewidth:-.6}))}N(r,g,g,!1,d.getSymbolWidth("noteheads.quarter"),[],!0,y.dx-1,.6);var E=e.rest&&("spacer"===e.rest.type||"invisible"===e.rest.type);0!==u||s||!this.graceSlurs||E||t.addOther(new v({anchor1:y,anchor2:n,isGrace:!0}))}return p&&(p.calcDir(),t.addBeam(p)),o},S.prototype.addNoteToAbcElement=function(e,t,r,n,i,a,s,o,l){var h,u,p,m,g,v=0,b=0,y=0,w=[],x=[],C=0,S=t.averagepitch>=6?"down":"up";for(n&&(S=n),(i=t.style?t.style:i)&&"normal"!==i||(i="note"),(m=a?A[i].nostem:A[i][-s])||console.log("noteSymbol:",i,s,a),g="down"===S?t.pitches.length-2:1;"down"===S?g>=0:g<t.pitches.length;g="down"===S?g-1:g+1){var _=t.pitches["down"===S?g+1:g-1],M=t.pitches[g],E="down"===S?_.pitch-M.pitch:M.pitch-_.pitch;E<=1&&!_.printer_shift&&(M.printer_shift=E?"different":"same",(M.verticalPos>11||M.verticalPos<1)&&w.push(M.verticalPos-M.verticalPos%2),"down"===S?b=d.getSymbolWidth(m)+2:v=d.getSymbolWidth(m)+2)}var N=t.pitches.length;for(g=0;g<t.pitches.length;g++){var P,L;if(o||(P="down"===S&&0!==g||"up"===S&&g!==N-1?null:A["down"===S?"dflags":"uflags"][-s]),t.pitches[g].style)L=A[t.pitches[g].style][-s];else if(l.isPercussion&&this.percmap){L=m;var H=this.percmap[k(t.pitches[g])];H&&H.noteHead&&A[H.noteHead]&&(L=A[H.noteHead][-s])}else L=m;if(t.pitches[g].highestVert=t.pitches[g].verticalPos,("up"===n||"up"===S)&&0===g||("down"===n||"down"===S)&&g===N-1){if((t.startSlur||1===N)&&(t.pitches[g].highestVert=t.pitches[N-1].verticalPos,T(t)<1&&("up"===n||"up"===S)&&(t.pitches[g].highestVert+=6)),t.startSlur)for(t.pitches[g].startSlur||(t.pitches[g].startSlur=[]),p=0;p<t.startSlur.length;p++)B(t.pitches[g].startSlur,t.startSlur[p]);if(t.endSlur)for(t.pitches[g].highestVert=t.pitches[N-1].verticalPos,T(t)<1&&("up"===n||"up"===S)&&(t.pitches[g].highestVert+=6),t.pitches[g].endSlur||(t.pitches[g].endSlur=[]),p=0;p<t.endSlur.length;p++)B(t.pitches[g].endSlur,t.endSlur[p])}var O=!o&&s<=-1,z=c(e,L,t.pitches[g],{dir:S,extrax:-b,flag:P,dot:r,dotshiftx:v,scale:this.voiceScale,accidentalSlot:x,shouldExtendStem:!n,printAccidentals:!l.isPercussion});C=Math.max(d.getSymbolWidth(L),C),e.extraw-=z.extraLeft,(h=z.notehead)&&(this.addSlursAndTies(e,t.pitches[g],h,l,O?S:null,!1),t.gracenotes&&t.gracenotes.length>0&&(h.bottom=h.bottom-1),e.addHead(h)),b+=z.accidentalshiftx,y=Math.max(y,z.dotshiftx)}if(O){var D=Math.round(70*this.voiceScale)/10,I="down"===S?t.minpitch-D:t.minpitch+1/3;I>6&&!n&&(I=6);var F="down"===S?t.maxpitch-1/3:t.maxpitch+D;F<6&&!n&&(F=6);var j="down"===S||0===e.heads.length?0:e.heads[0].w,V="down"===S?1:-1;"noteheads.slash.quarter"===h.c&&("down"===S?F-=1:I+=1),e.addRight(new f(null,j,0,I,{type:"stem",pitch2:F,linewidth:V})),u=Math.min(I,F)}return{noteHead:h,roomTaken:b,roomTakenRight:y,min:u,additionalLedgers:w,dir:S,symbolWidth:C}},S.prototype.addLyric=function(e,t){var r="";x.each(t.lyric,(function(e){var t=" "===e.divider?"":e.divider;r+=e.syllable+t+"\n"}));var n=this.getTextSize.calc(r,"vocalfont","lyric"),i=t.positioning?t.positioning.vocalPosition:"below";e.addCentered(new f(r,0,n.width,void 0,{type:"lyric",position:i,height:n.height/p.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},S.prototype.createNote=function(e,t,r,i){var a,s=null,o=0,l=0,h=0,u=[],p=T(e),m=!1;0===p&&(m=!0,p=.25,t=!0);for(var g=Math.floor(Math.log(p)/Math.log(2)),v=0,y=Math.pow(2,g),k=y/2;y<p;v++,y+=k,k/=2);e.startTriplet&&(this.tripletmultiplier=e.tripletMultiplier);var x=p*this.tripletmultiplier;e.rest&&"multimeasure"===e.rest.type&&(x=1),e.rest&&"invisible-multimeasure"===e.rest.type&&(x=this.measureLength*e.rest.text);var S=e.rest?"rest":"note",_=new n(e,x,1,S,this.tuneNumber,{durationClassOveride:e.duration*this.tripletmultiplier});if(C&&_.setHint(),e.rest){this.measureLength===p&&"invisible"!==e.rest.type&&"spacer"!==e.rest.type&&e.rest.type.indexOf("multimeasure")<0&&(e.rest.type="whole");var M=function(e,t,r,n,i,a,s,o,l){var h,u,p,m,g=7;switch(i&&("down"===a&&(g=3),"up"===a&&(g=11)),s&&(g=r<.5||r<1?7:5),t.rest.type){case"whole":h=A.rest[0],t.averagepitch=g,t.minpitch=g,t.maxpitch=g,n=0;break;case"rest":h="rhythm"===t.style?A.rhythm[-o]:A.rest[-o],t.averagepitch=g,t.minpitch=g,t.maxpitch=g;break;case"invisible":case"invisible-multimeasure":case"spacer":h="",t.averagepitch=g,t.minpitch=g,t.maxpitch=g;break;case"multimeasure":h=A.rest.multi,t.averagepitch=g,t.minpitch=g,t.maxpitch=g,n=0;var v=d.getSymbolWidth(h);e.addHead(new f(h,v,2*v,7));var b=new f(""+t.rest.text,v,v,16,{type:"multimeasure-text"});e.addExtra(b)}if(t.rest.type.indexOf("multimeasure")<0){var y=c(e,h,{verticalPos:g},{dot:n,scale:l});(u=y.notehead)&&(e.addHead(u),p=y.accidentalshiftx,m=y.dotshiftx)}return{noteHead:u,roomTaken:p,roomTakenRight:m}}(_,e,p,v,i.voicetotal>1,this.stemdir,r,g,this.voiceScale);s=M.noteHead,o=M.roomTaken,l=M.roomTakenRight}else{var E=this.addNoteToAbcElement(_,e,v,this.stemdir,this.style,m,g,t,i);void 0!==E.min&&(this.minY=Math.min(E.min,this.minY)),s=E.noteHead,o=E.roomTaken,l=E.roomTakenRight,u=E.additionalLedgers,a=E.dir,h=E.symbolWidth}if(void 0!==e.lyric&&this.addLyric(_,e),void 0!==e.gracenotes&&(o+=this.addGraceNotes(e,i,_,s,this.stemHeight*this.voiceScale,this.isBagpipes,o)),e.decoration&&this.decoration.createDecoration(i,e.decoration,_.top,s?s.w:0,_,o,a,_.bottom,e.positioning,this.hasVocals),e.barNumber&&_.addFixed(new f(e.barNumber,-10,0,0,{type:"barNumber"})),N(_,e.minpitch,e.maxpitch,e.rest,h,u,a,-2,1),void 0!==e.chord){var B=w(this.getTextSize,_,e,o,l,h);o=B.roomTaken,l=B.roomTakenRight}return e.startTriplet&&(this.triplet=new b(e.startTriplet,s,{flatBeams:this.flatBeams})),e.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(s),!this.triplet||e.startTriplet||e.endTriplet||e.rest&&"spacer"===e.rest.type||this.triplet.middleNote(s),_},S.prototype.addSlursAndTies=function(e,t,r,n,i,a){if(t.endTie&&this.ties.length>0){for(var s=!1,o=0;o<this.ties.length;o++)if(this.ties[o].anchor1&&this.ties[o].anchor1.pitch===r.pitch){this.ties[o].setEndAnchor(r),this.ties.splice(o,1),s=!0;break}s||(this.ties[0].setEndAnchor(r),this.ties.splice(0,1))}var c,l,h=n.voicetotal<2?-1:n.voicenumber;if(t.startTie){var u=new v({anchor1:r,force:"down"===this.stemdir||"up"===this.stemdir,stemDir:this.stemdir,isGrace:a,voiceNumber:h,style:t.startTie.style});C&&u.setHint(),this.ties[this.ties.length]=u,n.addOther(u),e.startTie=!0}if(t.endSlur)for(var d=0;d<t.endSlur.length;d++)l=t.endSlur[d],this.slurs[l]?((c=this.slurs[l]).setEndAnchor(r),delete this.slurs[l]):(c=new v({anchor2:r,stemDir:this.stemdir,voiceNumber:h}),C&&c.setHint(),n.addOther(c)),this.startlimitelem&&c.setStartX(this.startlimitelem);else if(!a)for(var f in this.slurs)this.slurs.hasOwnProperty(f)&&this.slurs[f].addInternalNote(r);if(t.startSlur)for(d=0;d<t.startSlur.length;d++)l=t.startSlur[d].label,c=new v({anchor1:r,stemDir:this.stemdir,voiceNumber:h,style:t.startSlur[d].style}),C&&c.setHint(),this.slurs[l]=c,n.addOther(c)},S.prototype.addMeasureNumber=function(e,t){var r=this.getTextSize.calc(e,"measurefont","bar-number"),n=r.width>18&&"treble"===t.abcelem.type?-7:0;t.addFixed(new f(e,n,r.width,11+r.height/p.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},S.prototype.createBarLine=function(e,t,r){var i=new n(t,0,10,"bar",this.tuneNumber),a=null,s=0;t.barNumber&&this.addMeasureNumber(t.barNumber,i);var o="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type,c="bar_left_repeat"!==t.type&&"bar_thick_thin"!==t.type&&"bar_invisible"!==t.type,l="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type||"bar_left_repeat"===t.type||"bar_thin_thick"===t.type||"bar_thick_thin"===t.type,h="bar_left_repeat"===t.type||"bar_thick_thin"===t.type||"bar_thin_thin"===t.type||"bar_dbl_repeat"===t.type,d="bar_left_repeat"===t.type||"bar_dbl_repeat"===t.type;if(o||d){for(var p in this.slurs)this.slurs.hasOwnProperty(p)&&this.slurs[p].setEndX(i);this.startlimitelem=i}if(o&&(i.addRight(new f("dots.dot",s,1,7)),i.addRight(new f("dots.dot",s,1,5)),s+=6),c&&(a=new f(null,s,1,2,{type:"bar",pitch2:10,linewidth:.6}),i.addRight(a)),"bar_invisible"===t.type&&(a=new f(null,s,1,2,{type:"none",pitch2:10,linewidth:.6}),i.addRight(a)),t.decoration&&this.decoration.createDecoration(e,t.decoration,12,l?3:1,i,0,"down",2,t.positioning,this.hasVocals),l&&(a=new f(null,s+=4,4,2,{type:"bar",pitch2:10,linewidth:4}),i.addRight(a),s+=5),this.partstartelem&&t.endEnding&&(this.partstartelem.anchor2=a,this.partstartelem=null),h&&(a=new f(null,s+=3,1,2,{type:"bar",pitch2:10,linewidth:.6}),i.addRight(a)),d&&(s+=3,i.addRight(new f("dots.dot",s,1,7)),i.addRight(new f("dots.dot",s,1,5))),t.startEnding&&r){var m=this.getTextSize.calc(t.startEnding,"repeatfont","").width;i.minspacing+=m+10,this.partstartelem=new u(t.startEnding,a,null),e.addOther(this.partstartelem)}return i.extraw-=5,i},e.exports=S},7669:function(e){var t=function(e,t,r,n){this.type="BeamElem",this.isflat=!!r,this.isgrace=!(!t||"grace"!==t),this.forceup=!!(this.isgrace||t&&"up"===t),this.forcedown=!(!t||"down"!==t),this.elems=[],this.total=0,this.average=6,this.allrests=!0,this.stemHeight=e,this.beams=[],n&&n.duration?(this.duration=n.duration,n.startTriplet&&(this.duration*=n.tripletMultiplier),this.duration=Math.round(1e3*this.duration)/1e3):this.duration=0};t.prototype.setHint=function(){this.hint=!0},t.prototype.add=function(e){var t=e.abcelem.averagepitch;void 0!==t&&(e.abcelem.rest||(this.allrests=!1),e.beam=this,this.elems.push(e),this.total=Math.round(this.total+t),(void 0===this.min||e.abcelem.minpitch<this.min)&&(this.min=e.abcelem.minpitch),(void 0===this.max||e.abcelem.maxpitch>this.max)&&(this.max=e.abcelem.maxpitch))},t.prototype.addBeam=function(e){this.beams.push(e)},t.prototype.calcDir=function(){var e,t;this.average=(e=this.total,(t=this.elems.length)?e/t:0),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6;for(var r=this.stemsUp?"up":"down",n=0;n<this.elems.length;n++)for(var i=0;i<this.elems[n].heads.length;i++)this.elems[n].heads[i].stemDir=r},e.exports=t},355:function(e){var t=function(e,t){this.startVoice=e,this.type=t};t.prototype.setBottomStaff=function(e){this.endVoice=e,this.startVoice.header&&!this.endVoice.header&&(this.header=this.startVoice.header,delete this.startVoice.header)},t.prototype.continuing=function(e){this.lastContinuedVoice=e},t.prototype.getWidth=function(){return 10},t.prototype.isStartVoice=function(e){return!!(this.startVoice&&this.startVoice.staff&&this.startVoice.staff.voices.length>0&&this.startVoice.staff.voices[0]===e)},e.exports=t},7561:function(e,t,r){var n=r(3255),i=r(5245),a=r(1577);e.exports=function(e,t){var r,s=0;e.el_type="clef";var o=new n(e,0,10,"staff-extra clef",t);switch(o.isClef=!0,e.type){case"treble":r="clefs.G";break;case"tenor":case"alto":r="clefs.C";break;case"bass":r="clefs.F";break;case"treble+8":r="clefs.G",s=1;break;case"tenor+8":r="clefs.C",s=1;break;case"bass+8":r="clefs.F",s=1;break;case"alto+8":r="clefs.C",s=1;break;case"treble-8":r="clefs.G",s=-1;break;case"tenor-8":r="clefs.C",s=-1;break;case"bass-8":r="clefs.F",s=-1;break;case"alto-8":r="clefs.C",s=-1;break;case"none":return null;case"perc":r="clefs.perc";break;default:o.addFixed(new a("clef="+e.type,0,0,void 0,{type:"debug"}))}if(r){var c=i.symbolHeightInPitches(r),l=function(e){switch(e){case"clefs.G":return-5;case"clefs.C":case"clefs.F":return-4;case"clefs.perc":return-2;default:return 0}}(r);if(o.addRight(new a(r,5,i.getSymbolWidth(r),e.clefPos,{top:c+e.clefPos+l,bottom:e.clefPos+l})),0!==s){var h=2/3,u=(i.getSymbolWidth(r)-i.getSymbolWidth("8")*h)/2,d=s>0?o.top+3:o.bottom-1,f=s>0?o.top+3:o.bottom-3,p=f-2;"bass-8"===e.type&&(d=3,u=0),o.addRight(new a("8",5+u,i.getSymbolWidth("8")*h,d,{scalex:h,scaley:h,top:f,bottom:p}))}}return o}},6166:function(e,t,r){var n=r(3255),i=r(5245),a=r(1577),s=r(5008);e.exports=function(e,t){if(!e.accidentals||0===e.accidentals.length)return null;var r=new n(e,0,10,"staff-extra key-signature",t);r.isKeySig=!0;var o=0;return s.each(e.accidentals,(function(e){var t,n=0;switch(e.acc){case"sharp":t="accidentals.sharp",n=-3;break;case"natural":t="accidentals.nat";break;case"flat":t="accidentals.flat",n=-1.2;break;case"quartersharp":t="accidentals.halfsharp",n=-2.5;break;case"quarterflat":t="accidentals.halfflat",n=-1.2;break;default:t="accidentals.flat"}r.addRight(new a(t,o,i.getSymbolWidth(t),e.verticalPos,{thickness:i.symbolHeightInPitches(t),top:e.verticalPos+i.symbolHeightInPitches(t)+n,bottom:e.verticalPos+n})),o+=i.getSymbolWidth(t)+2}),this),r}},3268:function(e,t,r){var n=r(5245),i=r(1577);e.exports=function(e,t,r,a){a||(a={});var s,o=void 0!==a.dir?a.dir:null,c=void 0!==a.headx?a.headx:0,l=void 0!==a.extrax?a.extrax:0,h=void 0!==a.flag?a.flag:null,u=void 0!==a.dot?a.dot:0,d=void 0!==a.dotshiftx?a.dotshiftx:0,f=void 0!==a.scale?a.scale:1,p=void 0!==a.accidentalSlot?a.accidentalSlot:[],m=void 0!==a.shouldExtendStem&&a.shouldExtendStem,g=void 0===a.printAccidentals||a.printAccidentals,v=r.verticalPos,b=0,y=0,w=0;if(void 0===t)e.addFixed(new i("pitch is undefined",0,0,0,{type:"debug"}));else if(""===t)s=new i(null,0,0,v);else{var k=c;if(r.printer_shift){var x="same"===r.printer_shift?1:0;k="down"===o?-n.getSymbolWidth(t)*f+x:n.getSymbolWidth(t)*f-x}var T={scalex:f,scaley:f,thickness:n.symbolHeightInPitches(t)*f};if((s=new i(t,k,n.getSymbolWidth(t)*f,v,T)).stemDir=o,h){var C=v+("down"===o?-7:7)*f;m&&("down"===o&&C>6&&(C=6),"up"===o&&C<6&&(C=6));var A="down"===o?c:c+s.w-.6;e.addRight(new i(h,A,n.getSymbolWidth(h)*f,C,{scalex:f,scaley:f}))}for(y=s.w+d-2+5*u;u>0;u--){var S=1-Math.abs(v)%2;e.addRight(new i("dots.dot",s.w+d-2+5*u,n.getSymbolWidth("dots.dot"),v+S))}}if(s&&(s.highestVert=r.highestVert),g&&r.accidental){var _;switch(r.accidental){case"quartersharp":_="accidentals.halfsharp";break;case"dblsharp":_="accidentals.dblsharp";break;case"sharp":_="accidentals.sharp";break;case"quarterflat":_="accidentals.halfflat";break;case"flat":_="accidentals.flat";break;case"dblflat":_="accidentals.dblflat";break;case"natural":_="accidentals.nat"}for(var M=!1,E=l,N=0;N<p.length;N++)if(v-p[N][0]>=6){p[N][0]=v,E=p[N][1],M=!0;break}!1===M&&(E-=n.getSymbolWidth(_)*f+2,p.push([v,E]),b=n.getSymbolWidth(_)*f+2);var B=n.symbolHeightInPitches(_);e.addExtra(new i(_,E,n.getSymbolWidth(_),v,{scalex:f,scaley:f,top:v+B/2,bottom:v-B/2})),w=n.getSymbolWidth(_)/2}return{notehead:s,accidentalshiftx:b,dotshiftx:y,extraLeft:w}}},313:function(e,t,r){var n=r(3255),i=r(5245),a=r(1577);e.exports=function(e,t){e.el_type="timeSignature";var r=new n(e,0,10,"staff-extra time-signature",t);if("specified"===e.type)for(var s=0,o=0;o<e.value.length;o++)if(0!==o&&(r.addRight(new a("+",s+1,i.getSymbolWidth("+"),6,{thickness:i.symbolHeightInPitches("+")})),s+=i.getSymbolWidth("+")+2),e.value[o].den){for(var c=0,l=0;l<e.value[o].num.length;l++)c+=i.getSymbolWidth(e.value[o].num.charAt(l));var h=0;for(l=0;l<e.value[o].num.length;l++)h+=i.getSymbolWidth(e.value[o].den.charAt(l));var u=Math.max(c,h);r.addRight(new a(e.value[o].num,s+(u-c)/2,c,8,{thickness:i.symbolHeightInPitches(e.value[o].num.charAt(0))})),r.addRight(new a(e.value[o].den,s+(u-h)/2,h,4,{thickness:i.symbolHeightInPitches(e.value[o].den.charAt(0))})),s+=u}else{for(var d=0,f=0;f<e.value[o].num.length;f++)d+=i.getSymbolWidth(e.value[o].num.charAt(f));r.addRight(new a(e.value[o].num,s,d,6,{thickness:i.symbolHeightInPitches(e.value[o].num.charAt(0))})),s+=d}else"common_time"===e.type?r.addRight(new a("timesig.common",0,i.getSymbolWidth("timesig.common"),6,{thickness:i.symbolHeightInPitches("timesig.common")})):"cut_time"===e.type?r.addRight(new a("timesig.cut",0,i.getSymbolWidth("timesig.cut"),6,{thickness:i.symbolHeightInPitches("timesig.cut")})):"tempus_imperfectum"===e.type?r.addRight(new a("timesig.imperfectum",0,i.getSymbolWidth("timesig.imperfectum"),6,{thickness:i.symbolHeightInPitches("timesig.imperfectum")})):"tempus_imperfectum_prolatio"===e.type?r.addRight(new a("timesig.imperfectum2",0,i.getSymbolWidth("timesig.imperfectum2"),6,{thickness:i.symbolHeightInPitches("timesig.imperfectum2")})):"tempus_perfectum"===e.type?r.addRight(new a("timesig.perfectum",0,i.getSymbolWidth("timesig.perfectum"),6,{thickness:i.symbolHeightInPitches("timesig.perfectum")})):"tempus_perfectum_prolatio"===e.type?r.addRight(new a("timesig.perfectum2",0,i.getSymbolWidth("timesig.perfectum2"),6,{thickness:i.symbolHeightInPitches("timesig.perfectum2")})):console.log("time signature:",e);return r}},7253:function(e){e.exports=function(e,t,r,n){this.type="CrescendoElem",this.anchor1=e,this.anchor2=t,this.dir=r,"above"===n?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0}},7841:function(e,t,r){var n=r(5672),i=r(7253),a=r(5245),s=r(1577),o=r(9891),c=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0},l=function(e,t,r,n,i){function o(e,t){var o="down"===i?function(){if(0===n.heads.length)return 2;for(var e=n.heads[0].pitch,t=1;t<n.heads.length;t++)e=Math.min(e,n.heads[t].pitch);return e}()+1:function(){if(0===n.heads.length)return 10;for(var e=n.heads[0].pitch,t=1;t<n.heads.length;t++)e=Math.max(e,n.heads[t].pitch);return e}()+9;"down"!==i&&1===t&&o--;var c=r/2;c+="down"===i?-5:3;for(var l=0;l<t;l++)o-=1,n.addFixedX(new s(e,c,a.getSymbolWidth(e),o))}for(var c=0;c<e.length;c++)switch(e[c]){case"/":o("flags.ugrace",1);break;case"//":o("flags.ugrace",2);break;case"///":o("flags.ugrace",3);break;case"////":o("flags.ugrace",4)}};c.prototype.dynamicDecoration=function(e,t,r,n){for(var a,s,o=0;o<t.length;o++)switch(t[o]){case"diminuendo(":this.startDiminuendoX=r,a=void 0;break;case"diminuendo)":a={start:this.startDiminuendoX,stop:r},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=r,s=void 0;break;case"crescendo)":s={start:this.startCrescendoX,stop:r},this.startCrescendoX=void 0}a&&e.addOther(new i(a.start,a.stop,">",n)),s&&e.addOther(new i(s.start,s.stop,"<",n))},c.prototype.createDecoration=function(e,t,r,i,c,h,u,d,f,p){f||(f={ornamentPosition:"above",volumePosition:p?"above":"below",dynamicPosition:p?"above":"below"}),function(e,t,r,i){for(var a=0;a<t.length;a++)switch(t[a]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var s=new n(r,t[a],i);e.addOther(s)}}(e,t,c,f.volumePosition),this.dynamicDecoration(e,t,c,f.dynamicPosition),l(t,0,i,c,u);var m=function(e,t,r,n,i,c,l,h){for(var u,d=0;d<t.length;d++){if("staccato"===t[d]||"tenuto"===t[d]||"accent"===t[d]){var f="scripts."+t[d];if("accent"===t[d]&&(f="scripts.sforzato"),u=void 0===u?"down"===l?r+2:h-2:"down"===l?u+2:u-2,"accent"===t[d])"up"===l?u--:u++;else switch(u){case 2:case 4:case 6:case 8:case 10:"up"===l?u--:u++}r>9&&u++;var p=n/2;"center"!==a.getSymbolAlign(f)&&(p-=a.getSymbolWidth(f)/2),i.addFixedX(new s(f,p,a.getSymbolWidth(f),u))}if("slide"===t[d]&&i.heads[0]){var m=i.heads[0].pitch,g=new s("",-c-15,0,(m-=2)-1),v=new s("",-c-5,0,m+1);i.addFixedX(g),i.addFixedX(v),e.addOther(new o({anchor1:g,anchor2:v,fixedY:!0}))}}return void 0===u&&(u=r),{above:u,below:i.bottom}}(e,t,r,i,c,h,u,d);m.above=Math.max(m.above,this.minTop),function(e,t,r,n,i,o,c){function l(e,t){"above"===e?n.above+=t:n.below-=t}function h(e){var t;return"above"===e?(t=n.above)<o&&(t=o):(t=n.below)>c&&(t=c),t}function u(e,n){var i=h(n);r.addFixedX(new s(e,t/2,0,i+2,{type:"decoration",klass:"ornament",thickness:3})),l(n,5)}function d(e,n){var i=t/2;"center"!==a.getSymbolAlign(e)&&(i-=a.getSymbolWidth(e)/2);var o=a.symbolHeightInPitches(e)+1,c=h(n);c="above"===n?c+o/2:c-o/2,r.addFixedX(new s(e,i,a.getSymbolWidth(e),c,{klass:"ornament",thickness:a.symbolHeightInPitches(e)})),l(n,o)}for(var f={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},p=0;p<e.length;p++)switch(e[p]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":u(e[p],i),!0;break;case"fine":u("FINE",i),!0;break;case"+":case"open":case"snap":case"wedge":case"thumb":case"shortphrase":case"mediumphrase":case"longphrase":case"trill":case"roll":case"irishroll":case"marcato":case"dmarcato":case"turn":case"uppermordent":case"pralltriller":case"mordent":case"lowermordent":case"downbow":case"upbow":case"fermata":case"breath":case"umarcato":case"coda":case"segno":d(f[e[p]],i),!0;break;case"invertedfermata":d(f[e[p]],"below"),!0;break;case"mark":r.klass="mark"}}(t,i,c,m,f.ornamentPosition,this.minTop,this.minBottom),function(e,t,r){for(var n=0;n<e.length;n++)switch(e[n]){case"arpeggio":for(var i=t.abcelem.minpitch-1;i<=t.abcelem.maxpitch;i+=2)t.addExtra(new s("scripts.arpeggio",2*-a.getSymbolWidth("scripts.arpeggio")-r,0,i+2,{klass:"ornament",thickness:a.symbolHeightInPitches("scripts.arpeggio")}))}}(t,c,h)},e.exports=c},5672:function(e){e.exports=function(e,t,r){this.type="DynamicDecoration",this.anchor=e,this.dec=t,"below"===r?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0}},1208:function(e){e.exports=function(e,t,r){this.type="EndingElem",this.text=e,this.anchor1=t,this.anchor2=r,this.endingHeightAbove=5,this.pitch=void 0}},5132:function(e,t,r){var n=r(8613),i=r(6548),a=r(2710),s=r(3891),o=r(5781),c=r(9725),l=r(8135),h=r(5450),u=r(2557),d=r(1564),f=r(6971),p=r(1059),m=r(3460),g=r(5012),v=(r(9989),function(e,t){t=t||{},this.selectionColor=t.selectionColor,this.dragColor=t.dragColor?t.dragColor:t.selectionColor,this.dragging=!!t.dragging,this.selectTypes=t.selectTypes,this.responsive=t.responsive,this.space=3*n.SPACE,this.scale=t.scale?parseFloat(t.scale):0,this.classes=new f({shouldAddClasses:t.add_classes}),this.scale>.1||(this.scale=void 0),t.staffwidth?(this.staffwidthScreen=t.staffwidth,this.staffwidthPrint=t.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],t.clickListener&&this.addSelectListener(t.clickListener),this.renderer=new a(e),this.renderer.setPaddingOverride(t),t.showDebug&&(this.renderer.showDebug=t.showDebug),this.renderer.controller=this,this.renderer.foregroundColor=t.foregroundColor?t.foregroundColor:"currentColor",t.ariaLabel&&(this.renderer.ariaLabel=t.ariaLabel),this.renderer.minPadding=t.minPadding?t.minPadding:0,this.reset()});v.prototype.reset=function(){this.selected=[],this.staffgroups=[],this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset(),this.dragTarget=null,this.dragIndex=-1,this.dragMouseStart={x:-1,y:-1},this.dragYStep=0},v.prototype.engraveABC=function(e,t){void 0===e[0]&&(e=[e]),this.reset();for(var r=0;r<e.length;r++)void 0===t&&(t=r),this.getFontAndAttr=new p(e[r].formatting,this.classes),this.getTextSize=new m(this.getFontAndAttr,this.renderer.paper),this.engraveTune(e[r],t)},v.prototype.adjustNonScaledItems=function(e){this.width/=e,this.renderer.adjustNonScaledItems(e)},v.prototype.getMeasureWidths=function(e){this.reset(),this.getFontAndAttr=new p(e.formatting,this.classes),this.getTextSize=new m(this.getFontAndAttr,this.renderer.paper),this.setupTune(e,0),this.constructTuneElements(e),d(this.renderer,e,0,this.space);for(var t,r=[],n=!0,i=0;i<e.lines.length;i++){var a=e.lines[i];if(a.staff){if(n&&(t={left:0,measureWidths:[],total:0},r.push(t),n=!1),a.staffGroup.voices.length>0)for(var s=a.staffGroup.voices[0],o=!1,c=0,l=0;l<s.children.length;l++){var h=s.children[l];o||h.isClef||h.isKeySig||(o=!0,t.left=h.x,c=h.x),"bar"===h.type&&(t.measureWidths.push(h.x-c),t.total+=h.x-c,c=h.x)}}else n=!0}return r},v.prototype.setupTune=function(e,t){this.classes.reset(),this.renderer.newTune(e),this.engraver=new i(this.getTextSize,t,{bagpipes:e.formatting.bagpipes,flatbeams:e.formatting.flatbeams,graceSlurs:!1!==e.formatting.graceSlurs,percmap:e.formatting.percmap}),this.engraver.setStemHeight(this.renderer.spacing.stemHeight),this.engraver.measureLength=e.getMeterFraction().num/e.getMeterFraction().den,e.formatting.staffwidth?this.width=1.33*e.formatting.staffwidth:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen;var r=e.formatting.scale?e.formatting.scale:this.scale;return"resize"===this.responsive&&(r=void 0),void 0===r&&(r=this.renderer.isPrint?.75:1),this.adjustNonScaledItems(r),r},v.prototype.constructTuneElements=function(e){var t,r;e.topText=new l(e.metaText,e.formatting,e.lines,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.getTextSize);var n=!1,i=!1;for(t=0;t<e.lines.length;t++)if((r=e.lines[t]).staff)i=!0,r.staffGroup=this.engraver.createABCLine(r.staff,n?null:e.metaText.tempo),n=!0;else if(r.subtitle){if(i){var a=this.width/2+this.renderer.padding.left;r.nonMusic=new c(this.renderer.spacing.subtitle,e.formatting,r.subtitle,a,this.renderer.padding.left,this.getTextSize)}}else void 0!==r.text?(i=!0,r.nonMusic=new s(r.text,r.vskip,this.getFontAndAttr,this.renderer.padding.left,this.width,this.getTextSize)):void 0!==r.separator&&r.separator.lineLength&&(i=!0,r.nonMusic=new o(r.separator.spaceAbove,r.separator.lineLength,r.separator.spaceBelow));e.bottomText=new h(e.metaText,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.getTextSize)},v.prototype.engraveTune=function(e,t){var r=this.setupTune(e,t);this.constructTuneElements(e);var n=d(this.renderer,e,this.width,this.space),i=g(this.renderer,this.classes,e,this.width,n,this.responsive,r,this.selectTypes,t);this.staffgroups=i.staffgroups,this.selectables=i.selectables,u(this)},v.prototype.getDim=function(e){if(!e.dim){var t=e.svgEl.getBBox();e.dim={left:Math.round(t.x),top:Math.round(t.y),right:Math.round(t.x+t.width),bottom:Math.round(t.y+t.height)}}return e.dim},v.prototype.addSelectListener=function(e){this.listeners[this.listeners.length]=e},e.exports=v},5245:function(e,t,r){var n=r(8613),i={0:{d:[["M",4.83,-14.97],["c",.33,-.03,1.11,0,1.47,.06],["c",1.68,.36,2.97,1.59,3.78,3.6],["c",1.2,2.97,.81,6.96,-.9,9.27],["c",-.78,1.08,-1.71,1.71,-2.91,1.95],["c",-.45,.09,-1.32,.09,-1.77,0],["c",-.81,-.18,-1.47,-.51,-2.07,-1.02],["c",-2.34,-2.07,-3.15,-6.72,-1.74,-10.2],["c",.87,-2.16,2.28,-3.42,4.14,-3.66],["z"],["m",1.11,.87],["c",-.21,-.06,-.69,-.09,-.87,-.06],["c",-.54,.12,-.87,.42,-1.17,.99],["c",-.36,.66,-.51,1.56,-.6,3],["c",-.03,.75,-.03,4.59,0,5.31],["c",.09,1.5,.27,2.4,.6,3.06],["c",.24,.48,.57,.78,.96,.9],["c",.27,.09,.78,.09,1.05,0],["c",.39,-.12,.72,-.42,.96,-.9],["c",.33,-.66,.51,-1.56,.6,-3.06],["c",.03,-.72,.03,-4.56,0,-5.31],["c",-.09,-1.47,-.27,-2.37,-.6,-3.03],["c",-.24,-.48,-.54,-.78,-.93,-.9],["z"]],w:10.78,h:14.959},1:{d:[["M",3.3,-15.06],["c",.06,-.06,.21,-.03,.66,.15],["c",.81,.39,1.08,.39,1.83,.03],["c",.21,-.09,.39,-.15,.42,-.15],["c",.12,0,.21,.09,.27,.21],["c",.06,.12,.06,.33,.06,5.94],["c",0,3.93,0,5.85,.03,6.03],["c",.06,.36,.15,.69,.27,.96],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.12,-.27,.21,-.6,.27,-.96],["c",.03,-.18,.03,-1.59,.03,-4.29],["c",0,-3.87,0,-4.05,-.06,-4.14],["c",-.09,-.15,-.18,-.24,-.39,-.24],["c",-.12,0,-.15,.03,-.21,.06],["c",-.03,.06,-.45,.99,-.96,2.13],["c",-.48,1.14,-.9,2.1,-.93,2.16],["c",-.06,.15,-.21,.24,-.33,.24],["c",-.24,0,-.42,-.18,-.42,-.39],["c",0,-.06,3.27,-7.62,3.33,-7.74],["z"]],w:8.94,h:15.058},2:{d:[["M",4.23,-14.97],["c",.57,-.06,1.68,0,2.34,.18],["c",.69,.18,1.5,.54,2.01,.9],["c",1.35,.96,1.95,2.25,1.77,3.81],["c",-.15,1.35,-.66,2.34,-1.68,3.15],["c",-.6,.48,-1.44,.93,-3.12,1.65],["c",-1.32,.57,-1.8,.81,-2.37,1.14],["c",-.57,.33,-.57,.33,-.24,.27],["c",.39,-.09,1.26,-.09,1.68,0],["c",.72,.15,1.41,.45,2.1,.9],["c",.99,.63,1.86,.87,2.55,.75],["c",.24,-.06,.42,-.15,.57,-.3],["c",.12,-.09,.3,-.42,.3,-.51],["c",0,-.09,.12,-.21,.24,-.24],["c",.18,-.03,.39,.12,.39,.3],["c",0,.12,-.15,.57,-.3,.87],["c",-.54,1.02,-1.56,1.74,-2.79,2.01],["c",-.42,.09,-1.23,.09,-1.62,.03],["c",-.81,-.18,-1.32,-.45,-2.01,-1.11],["c",-.45,-.45,-.63,-.57,-.96,-.69],["c",-.84,-.27,-1.89,.12,-2.25,.9],["c",-.12,.21,-.21,.54,-.21,.72],["c",0,.12,-.12,.21,-.27,.24],["c",-.15,0,-.27,-.03,-.33,-.15],["c",-.09,-.21,.09,-1.08,.33,-1.71],["c",.24,-.66,.66,-1.26,1.29,-1.89],["c",.45,-.45,.9,-.81,1.92,-1.56],["c",1.29,-.93,1.89,-1.44,2.34,-1.98],["c",.87,-1.05,1.26,-2.19,1.2,-3.63],["c",-.06,-1.29,-.39,-2.31,-.96,-2.91],["c",-.36,-.33,-.72,-.51,-1.17,-.54],["c",-.84,-.03,-1.53,.42,-1.59,1.05],["c",-.03,.33,.12,.6,.57,1.14],["c",.45,.54,.54,.87,.42,1.41],["c",-.15,.63,-.54,1.11,-1.08,1.38],["c",-.63,.33,-1.2,.33,-1.83,0],["c",-.24,-.12,-.33,-.18,-.54,-.39],["c",-.18,-.18,-.27,-.3,-.36,-.51],["c",-.24,-.45,-.27,-.84,-.21,-1.38],["c",.12,-.75,.45,-1.41,1.02,-1.98],["c",.72,-.72,1.74,-1.17,2.85,-1.32],["z"]],w:10.764,h:14.97},3:{d:[["M",3.78,-14.97],["c",.3,-.03,1.41,0,1.83,.06],["c",2.22,.3,3.51,1.32,3.72,2.91],["c",.03,.33,.03,1.26,-.03,1.65],["c",-.12,.84,-.48,1.47,-1.05,1.77],["c",-.27,.15,-.36,.24,-.45,.39],["c",-.09,.21,-.09,.36,0,.57],["c",.09,.15,.18,.24,.51,.39],["c",.75,.42,1.23,1.14,1.41,2.13],["c",.06,.42,.06,1.35,0,1.71],["c",-.18,.81,-.48,1.38,-1.02,1.95],["c",-.75,.72,-1.8,1.2,-3.18,1.38],["c",-.42,.06,-1.56,.06,-1.95,0],["c",-1.89,-.33,-3.18,-1.29,-3.51,-2.64],["c",-.03,-.12,-.03,-.33,-.03,-.6],["c",0,-.36,0,-.42,.06,-.63],["c",.12,-.3,.27,-.51,.51,-.75],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.51,.36,-.63,.54,-.6,.87],["c",.06,.54,.54,.9,1.38,.99],["c",.36,.06,.72,.03,.96,-.06],["c",.81,-.27,1.29,-1.23,1.44,-2.79],["c",.03,-.45,.03,-1.95,-.03,-2.37],["c",-.09,-.75,-.33,-1.23,-.75,-1.44],["c",-.33,-.18,-.45,-.18,-1.98,-.18],["c",-1.35,0,-1.41,0,-1.5,-.06],["c",-.18,-.12,-.24,-.39,-.12,-.6],["c",.12,-.15,.15,-.15,1.68,-.15],["c",1.5,0,1.62,0,1.89,-.15],["c",.18,-.09,.42,-.36,.54,-.57],["c",.18,-.42,.27,-.9,.3,-1.95],["c",.03,-1.2,-.06,-1.8,-.36,-2.37],["c",-.24,-.48,-.63,-.81,-1.14,-.96],["c",-.3,-.06,-1.08,-.06,-1.38,.03],["c",-.6,.15,-.9,.42,-.96,.84],["c",-.03,.3,.06,.45,.63,.84],["c",.33,.24,.42,.39,.45,.63],["c",.03,.72,-.57,1.5,-1.32,1.65],["c",-1.05,.27,-2.1,-.57,-2.1,-1.65],["c",0,-.45,.15,-.96,.39,-1.38],["c",.12,-.21,.54,-.63,.81,-.81],["c",.57,-.42,1.38,-.69,2.25,-.81],["z"]],w:9.735,h:14.967},4:{d:[["M",8.64,-14.94],["c",.27,-.09,.42,-.12,.54,-.03],["c",.09,.06,.15,.21,.15,.3],["c",-.03,.06,-1.92,2.31,-4.23,5.04],["c",-2.31,2.73,-4.23,4.98,-4.26,5.01],["c",-.03,.06,.12,.06,2.55,.06],["l",2.61,0],["l",0,-2.37],["c",0,-2.19,.03,-2.37,.06,-2.46],["c",.03,-.06,.21,-.18,.57,-.42],["c",1.08,-.72,1.38,-1.08,1.86,-2.16],["c",.12,-.3,.24,-.54,.27,-.57],["c",.12,-.12,.39,-.06,.45,.12],["c",.06,.09,.06,.57,.06,3.96],["l",0,3.9],["l",1.08,0],["c",1.05,0,1.11,0,1.2,.06],["c",.24,.15,.24,.54,0,.69],["c",-.09,.06,-.15,.06,-1.2,.06],["l",-1.08,0],["l",0,.33],["c",0,.57,.09,1.11,.3,1.53],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.21,-.42,.3,-.96,.3,-1.53],["l",0,-.33],["l",-2.7,0],["c",-2.91,0,-2.85,0,-3.09,-.15],["c",-.18,-.12,-.3,-.39,-.27,-.54],["c",.03,-.06,.18,-.24,.33,-.45],["c",.75,-.9,1.59,-2.07,2.13,-3.03],["c",.33,-.54,.84,-1.62,1.05,-2.16],["c",.57,-1.41,.84,-2.64,.9,-4.05],["c",.03,-.63,.06,-.72,.24,-.81],["l",.12,-.06],["l",.45,.12],["c",.66,.18,1.02,.24,1.47,.27],["c",.6,.03,1.23,-.09,2.01,-.33],["z"]],w:11.795,h:14.994},5:{d:[["M",1.02,-14.94],["c",.12,-.09,.03,-.09,1.08,.06],["c",2.49,.36,4.35,.36,6.96,-.06],["c",.57,-.09,.66,-.06,.81,.06],["c",.15,.18,.12,.24,-.15,.51],["c",-1.29,1.26,-3.24,2.04,-5.58,2.31],["c",-.6,.09,-1.2,.12,-1.71,.12],["c",-.39,0,-.45,0,-.57,.06],["c",-.09,.06,-.15,.12,-.21,.21],["l",-.06,.12],["l",0,1.65],["l",0,1.65],["l",.21,-.21],["c",.66,-.57,1.41,-.96,2.19,-1.14],["c",.33,-.06,1.41,-.06,1.95,0],["c",2.61,.36,4.02,1.74,4.26,4.14],["c",.03,.45,.03,1.08,-.03,1.44],["c",-.18,1.02,-.78,2.01,-1.59,2.7],["c",-.72,.57,-1.62,1.02,-2.49,1.2],["c",-1.38,.27,-3.03,.06,-4.2,-.54],["c",-1.08,-.54,-1.71,-1.32,-1.86,-2.28],["c",-.09,-.69,.09,-1.29,.57,-1.74],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.18,.12,-.36,.3,-.42,.33],["c",-.36,.42,-.18,.99,.36,1.26],["c",.51,.27,1.47,.36,2.01,.27],["c",.93,-.21,1.47,-1.17,1.65,-2.91],["c",.06,-.45,.06,-1.89,0,-2.31],["c",-.15,-1.2,-.51,-2.1,-1.05,-2.55],["c",-.21,-.18,-.54,-.36,-.81,-.39],["c",-.3,-.06,-.84,-.03,-1.26,.06],["c",-.93,.18,-1.65,.6,-2.16,1.2],["c",-.15,.21,-.27,.3,-.39,.3],["c",-.15,0,-.3,-.09,-.36,-.18],["c",-.06,-.09,-.06,-.15,-.06,-3.66],["c",0,-3.39,0,-3.57,.06,-3.66],["c",.03,-.06,.09,-.15,.15,-.18],["z"]],w:10.212,h:14.997},6:{d:[["M",4.98,-14.97],["c",.36,-.03,1.2,0,1.59,.06],["c",.9,.15,1.68,.51,2.25,1.05],["c",.57,.51,.87,1.23,.84,1.98],["c",-.03,.51,-.21,.9,-.6,1.26],["c",-.24,.24,-.45,.39,-.75,.51],["c",-.21,.06,-.27,.06,-.6,.06],["c",-.33,0,-.39,0,-.6,-.06],["c",-.3,-.12,-.51,-.27,-.75,-.51],["c",-.39,-.36,-.57,-.78,-.57,-1.26],["c",0,-.27,0,-.3,.09,-.42],["c",.03,-.09,.18,-.21,.3,-.3],["c",.12,-.09,.3,-.21,.39,-.27],["c",.09,-.06,.21,-.18,.27,-.24],["c",.06,-.12,.09,-.15,.09,-.33],["c",0,-.18,-.03,-.24,-.09,-.36],["c",-.24,-.39,-.75,-.6,-1.38,-.57],["c",-.54,.03,-.9,.18,-1.23,.48],["c",-.81,.72,-1.08,2.16,-.96,5.37],["l",0,.63],["l",.3,-.12],["c",.78,-.27,1.29,-.33,2.1,-.27],["c",1.47,.12,2.49,.54,3.27,1.29],["c",.48,.51,.81,1.11,.96,1.89],["c",.06,.27,.06,.42,.06,.93],["c",0,.54,0,.69,-.06,.96],["c",-.15,.78,-.48,1.38,-.96,1.89],["c",-.54,.51,-1.17,.87,-1.98,1.08],["c",-1.14,.3,-2.4,.33,-3.24,.03],["c",-1.5,-.48,-2.64,-1.89,-3.27,-4.02],["c",-.36,-1.23,-.51,-2.82,-.42,-4.08],["c",.3,-3.66,2.28,-6.3,4.95,-6.66],["z"],["m",.66,7.41],["c",-.27,-.09,-.81,-.12,-1.08,-.06],["c",-.72,.18,-1.08,.69,-1.23,1.71],["c",-.06,.54,-.06,3,0,3.54],["c",.18,1.26,.72,1.77,1.8,1.74],["c",.39,-.03,.63,-.09,.9,-.27],["c",.66,-.42,.9,-1.32,.9,-3.24],["c",0,-2.22,-.36,-3.12,-1.29,-3.42],["z"]],w:9.956,h:14.982},7:{d:[["M",.21,-14.97],["c",.21,-.06,.45,0,.54,.15],["c",.06,.09,.06,.15,.06,.39],["c",0,.24,0,.33,.06,.42],["c",.06,.12,.21,.24,.27,.24],["c",.03,0,.12,-.12,.24,-.21],["c",.96,-1.2,2.58,-1.35,3.99,-.42],["c",.15,.12,.42,.3,.54,.45],["c",.48,.39,.81,.57,1.29,.6],["c",.69,.03,1.5,-.3,2.13,-.87],["c",.09,-.09,.27,-.3,.39,-.45],["c",.12,-.15,.24,-.27,.3,-.3],["c",.18,-.06,.39,.03,.51,.21],["c",.06,.18,.06,.24,-.27,.72],["c",-.18,.24,-.54,.78,-.78,1.17],["c",-2.37,3.54,-3.54,6.27,-3.87,9],["c",-.03,.33,-.03,.66,-.03,1.26],["c",0,.9,0,1.08,.15,1.89],["c",.06,.45,.06,.48,.03,.6],["c",-.06,.09,-.21,.21,-.3,.21],["c",-.03,0,-.27,-.06,-.54,-.15],["c",-.84,-.27,-1.11,-.3,-1.65,-.3],["c",-.57,0,-.84,.03,-1.56,.27],["c",-.6,.18,-.69,.21,-.81,.15],["c",-.12,-.06,-.21,-.18,-.21,-.3],["c",0,-.15,.6,-1.44,1.2,-2.61],["c",1.14,-2.22,2.73,-4.68,5.1,-8.01],["c",.21,-.27,.36,-.48,.33,-.48],["c",0,0,-.12,.06,-.27,.12],["c",-.54,.3,-.99,.39,-1.56,.39],["c",-.75,.03,-1.2,-.18,-1.83,-.75],["c",-.99,-.9,-1.83,-1.17,-2.31,-.72],["c",-.18,.15,-.36,.51,-.45,.84],["c",-.06,.24,-.06,.33,-.09,1.98],["c",0,1.62,-.03,1.74,-.06,1.8],["c",-.15,.24,-.54,.24,-.69,0],["c",-.06,-.09,-.06,-.15,-.06,-3.57],["c",0,-3.42,0,-3.48,.06,-3.57],["c",.03,-.06,.09,-.12,.15,-.15],["z"]],w:10.561,h:15.093},8:{d:[["M",4.98,-14.97],["c",.33,-.03,1.02,-.03,1.32,0],["c",1.32,.12,2.49,.6,3.21,1.32],["c",.39,.39,.66,.81,.78,1.29],["c",.09,.36,.09,1.08,0,1.44],["c",-.21,.84,-.66,1.59,-1.59,2.55],["l",-.3,.3],["l",.27,.18],["c",1.47,.93,2.31,2.31,2.25,3.75],["c",-.03,.75,-.24,1.35,-.63,1.95],["c",-.45,.66,-1.02,1.14,-1.83,1.53],["c",-1.8,.87,-4.2,.87,-6,.03],["c",-1.62,-.78,-2.52,-2.16,-2.46,-3.66],["c",.06,-.99,.54,-1.77,1.8,-2.97],["c",.54,-.51,.54,-.54,.48,-.57],["c",-.39,-.27,-.96,-.78,-1.2,-1.14],["c",-.75,-1.11,-.87,-2.4,-.3,-3.6],["c",.69,-1.35,2.25,-2.25,4.2,-2.4],["z"],["m",1.53,.69],["c",-.42,-.09,-1.11,-.12,-1.38,-.06],["c",-.3,.06,-.6,.18,-.81,.3],["c",-.21,.12,-.6,.51,-.72,.72],["c",-.51,.87,-.42,1.89,.21,2.52],["c",.21,.21,.36,.3,1.95,1.23],["c",.96,.54,1.74,.99,1.77,1.02],["c",.09,0,.63,-.6,.99,-1.11],["c",.21,-.36,.48,-.87,.57,-1.23],["c",.06,-.24,.06,-.36,.06,-.72],["c",0,-.45,-.03,-.66,-.15,-.99],["c",-.39,-.81,-1.29,-1.44,-2.49,-1.68],["z"],["m",-1.44,8.07],["l",-1.89,-1.08],["c",-.03,0,-.18,.15,-.39,.33],["c",-1.2,1.08,-1.65,1.95,-1.59,3],["c",.09,1.59,1.35,2.85,3.21,3.24],["c",.33,.06,.45,.06,.93,.06],["c",.63,0,.81,-.03,1.29,-.27],["c",.9,-.42,1.47,-1.41,1.41,-2.4],["c",-.06,-.66,-.39,-1.29,-.9,-1.65],["c",-.12,-.09,-1.05,-.63,-2.07,-1.23],["z"]],w:10.926,h:14.989},9:{d:[["M",4.23,-14.97],["c",.42,-.03,1.29,0,1.62,.06],["c",.51,.12,.93,.3,1.38,.57],["c",1.53,1.02,2.52,3.24,2.73,5.94],["c",.18,2.55,-.48,4.98,-1.83,6.57],["c",-1.05,1.26,-2.4,1.89,-3.93,1.83],["c",-1.23,-.06,-2.31,-.45,-3.03,-1.14],["c",-.57,-.51,-.87,-1.23,-.84,-1.98],["c",.03,-.51,.21,-.9,.6,-1.26],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.39,.36,.57,.78,.57,1.26],["c",0,.27,0,.3,-.09,.42],["c",-.03,.09,-.18,.21,-.3,.3],["c",-.12,.09,-.3,.21,-.39,.27],["c",-.09,.06,-.21,.18,-.27,.24],["c",-.06,.12,-.06,.15,-.06,.33],["c",0,.18,0,.24,.06,.36],["c",.24,.39,.75,.6,1.38,.57],["c",.54,-.03,.9,-.18,1.23,-.48],["c",.81,-.72,1.08,-2.16,.96,-5.37],["l",0,-.63],["l",-.3,.12],["c",-.78,.27,-1.29,.33,-2.1,.27],["c",-1.47,-.12,-2.49,-.54,-3.27,-1.29],["c",-.48,-.51,-.81,-1.11,-.96,-1.89],["c",-.06,-.27,-.06,-.42,-.06,-.96],["c",0,-.51,0,-.66,.06,-.93],["c",.15,-.78,.48,-1.38,.96,-1.89],["c",.15,-.12,.33,-.27,.42,-.36],["c",.69,-.51,1.62,-.81,2.76,-.93],["z"],["m",1.17,.66],["c",-.21,-.06,-.57,-.06,-.81,-.03],["c",-.78,.12,-1.26,.69,-1.41,1.74],["c",-.12,.63,-.15,1.95,-.09,2.79],["c",.12,1.71,.63,2.4,1.77,2.46],["c",1.08,.03,1.62,-.48,1.8,-1.74],["c",.06,-.54,.06,-3,0,-3.54],["c",-.15,-1.05,-.51,-1.53,-1.26,-1.68],["z"]],w:9.959,h:14.986},"rests.multimeasure":{d:[["M",0,-4],["l",0,16],["l",1,0],["l",0,-5],["l",40,0],["l",0,5],["l",1,0],["l",0,-16],["l",-1,0],["l",0,5],["l",-40,0],["l",0,-5],["z"]],w:42,h:18},"rests.whole":{d:[["M",.06,.03],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.half":{d:[["M",.06,-4.62],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.quarter":{d:[["M",1.89,-11.82],["c",.12,-.06,.24,-.06,.36,-.03],["c",.09,.06,4.74,5.58,4.86,5.82],["c",.21,.39,.15,.78,-.15,1.26],["c",-.24,.33,-.72,.81,-1.62,1.56],["c",-.45,.36,-.87,.75,-.96,.84],["c",-.93,.99,-1.14,2.49,-.6,3.63],["c",.18,.39,.27,.48,1.32,1.68],["c",1.92,2.25,1.83,2.16,1.83,2.34],["c",0,.18,-.18,.36,-.36,.39],["c",-.15,0,-.27,-.06,-.48,-.27],["c",-.75,-.75,-2.46,-1.29,-3.39,-1.08],["c",-.45,.09,-.69,.27,-.9,.69],["c",-.12,.3,-.21,.66,-.24,1.14],["c",-.03,.66,.09,1.35,.3,2.01],["c",.15,.42,.24,.66,.45,.96],["c",.18,.24,.18,.33,.03,.42],["c",-.12,.06,-.18,.03,-.45,-.3],["c",-1.08,-1.38,-2.07,-3.36,-2.4,-4.83],["c",-.27,-1.05,-.15,-1.77,.27,-2.07],["c",.21,-.12,.42,-.15,.87,-.15],["c",.87,.06,2.1,.39,3.3,.9],["l",.39,.18],["l",-1.65,-1.95],["c",-2.52,-2.97,-2.61,-3.09,-2.7,-3.27],["c",-.09,-.24,-.12,-.48,-.03,-.75],["c",.15,-.48,.57,-.96,1.83,-2.01],["c",.45,-.36,.84,-.72,.93,-.78],["c",.69,-.75,1.02,-1.8,.9,-2.79],["c",-.06,-.33,-.21,-.84,-.39,-1.11],["c",-.09,-.15,-.45,-.6,-.81,-1.05],["c",-.36,-.42,-.69,-.81,-.72,-.87],["c",-.09,-.18,0,-.42,.21,-.51],["z"]],w:7.888,h:21.435},"rests.8th":{d:[["M",1.68,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.33,-.09],["c",.39,-.18,1.32,-1.29,1.68,-1.98],["c",.09,-.21,.24,-.3,.39,-.3],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.27,1.11,-1.86,6.42],["c",-1.02,3.48,-1.89,6.39,-1.92,6.42],["c",0,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.15,-.57,1.68,-4.92],["c",.96,-2.67,1.74,-4.89,1.71,-4.89],["l",-.51,.15],["c",-1.08,.36,-1.74,.48,-2.55,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:7.534,h:13.883},"rests.16th":{d:[["M",3.33,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.87,.42],["c",.39,-.18,1.2,-1.23,1.62,-2.07],["c",.06,-.15,.24,-.24,.36,-.24],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.45,1.86,-2.67,10.17],["c",-1.5,5.55,-2.73,10.14,-2.76,10.17],["c",-.03,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.12,-.57,1.44,-4.92],["c",.81,-2.67,1.47,-4.86,1.47,-4.89],["c",-.03,0,-.27,.06,-.54,.15],["c",-1.08,.36,-1.77,.48,-2.58,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.12,0,.18,0,.33,-.09],["c",.33,-.15,1.02,-.93,1.41,-1.59],["c",.12,-.21,.18,-.39,.39,-1.08],["c",.66,-2.1,1.17,-3.84,1.17,-3.87],["c",0,0,-.21,.06,-.42,.15],["c",-.51,.15,-1.2,.33,-1.68,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:9.724,h:21.383},"rests.32nd":{d:[["M",4.23,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.27,-.06],["c",.33,-.21,.99,-1.11,1.44,-1.98],["c",.09,-.24,.21,-.33,.39,-.33],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.57,2.67,-3.21,13.89],["c",-1.8,7.62,-3.3,13.89,-3.3,13.92],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.09,-.57,1.23,-4.92],["c",.69,-2.67,1.26,-4.86,1.29,-4.89],["c",0,-.03,-.12,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.12,.09,.3,.18,.48,.21],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.29,-1.29,1.56,-1.89],["c",.03,-.12,1.23,-4.59,1.23,-4.65],["c",0,-.03,-.18,.03,-.39,.12],["c",-.63,.18,-1.2,.36,-1.74,.45],["c",-.39,.06,-.54,.06,-1.02,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.18,.18,.51,.27,.72,.15],["c",.3,-.12,.69,-.57,1.08,-1.17],["c",.42,-.6,.39,-.51,1.05,-3.03],["c",.33,-1.26,.6,-2.31,.6,-2.34],["c",0,0,-.21,.03,-.45,.12],["c",-.57,.18,-1.14,.33,-1.62,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:11.373,h:28.883},"rests.64th":{d:[["M",5.13,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.54,.3,.75,.18],["c",.24,-.12,.63,-.66,1.08,-1.56],["c",.33,-.66,.39,-.72,.6,-.72],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.69,3.66,-3.54,17.64],["c",-1.95,9.66,-3.57,17.61,-3.57,17.64],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.06,-.57,1.05,-4.95],["c",.6,-2.7,1.08,-4.89,1.08,-4.92],["c",0,0,-.24,.06,-.51,.15],["c",-.66,.24,-1.2,.36,-1.77,.48],["c",-.42,.06,-.57,.06,-1.05,.06],["c",-.69,0,-.87,-.03,-1.35,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.21,.03,.39,-.09,.72,-.42],["c",.45,-.45,1.02,-1.26,1.17,-1.65],["c",.03,-.09,.27,-1.14,.54,-2.34],["c",.27,-1.2,.48,-2.19,.51,-2.22],["c",0,-.03,-.09,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.9,.42],["c",.36,-.18,1.2,-1.26,1.47,-1.89],["c",.03,-.09,.3,-1.2,.57,-2.43],["l",.51,-2.28],["l",-.54,.18],["c",-1.11,.36,-1.8,.48,-2.61,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.21,.21,.54,.3,.75,.18],["c",.36,-.18,.93,-.93,1.29,-1.68],["c",.12,-.24,.18,-.48,.63,-2.55],["l",.51,-2.31],["c",0,-.03,-.18,.03,-.39,.12],["c",-1.14,.36,-2.1,.54,-2.82,.51],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.453,h:36.383},"rests.128th":{d:[["M",6.03,-21.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.21,0,.33,-.06,.54,-.36],["c",.15,-.21,.54,-.93,.78,-1.47],["c",.15,-.33,.18,-.39,.3,-.48],["c",.18,-.09,.45,0,.51,.15],["c",.03,.09,-7.11,42.75,-7.17,42.84],["c",-.03,.03,-.15,.09,-.24,.15],["c",-.18,.06,-.24,.06,-.45,.06],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.03,-.57,.84,-4.98],["c",.51,-2.7,.93,-4.92,.9,-4.92],["c",0,0,-.15,.06,-.36,.12],["c",-.78,.27,-1.62,.48,-2.31,.57],["c",-.15,.03,-.54,.03,-.81,.03],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.63,.48],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.14,-1.11,1.5,-1.83],["c",.12,-.27,.12,-.27,.54,-2.52],["c",.24,-1.23,.42,-2.25,.39,-2.25],["c",0,0,-.24,.06,-.51,.18],["c",-1.26,.39,-2.25,.57,-3.06,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.51,.3,.75,.18],["c",.36,-.15,1.05,-.99,1.41,-1.77],["l",.15,-.3],["l",.42,-2.25],["c",.21,-1.26,.42,-2.28,.39,-2.28],["l",-.51,.15],["c",-1.11,.39,-1.89,.51,-2.7,.51],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.18,.48,.27,.72,.21],["c",.33,-.12,1.14,-1.26,1.41,-1.95],["c",0,-.09,.21,-1.11,.45,-2.34],["c",.21,-1.2,.39,-2.22,.39,-2.28],["c",.03,-.03,0,-.03,-.45,.12],["c",-.57,.18,-1.2,.33,-1.71,.42],["c",-.3,.06,-.51,.06,-.93,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.18,0,.36,-.09,.57,-.33],["c",.33,-.36,.78,-1.14,.93,-1.56],["c",.03,-.12,.24,-1.2,.45,-2.4],["c",.24,-1.2,.42,-2.22,.42,-2.28],["c",.03,-.03,0,-.03,-.39,.09],["c",-1.05,.36,-1.8,.48,-2.58,.48],["c",-.63,0,-.84,-.03,-1.29,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.992,h:43.883},"accidentals.sharp":{d:[["M",5.73,-11.19],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.31],["c",0,1.23,0,2.22,.03,2.22],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.43],["c",0,1.32,0,2.43,.03,2.43],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.52],["c",0,2.28,-.03,2.55,-.06,2.64],["c",-.21,.36,-.72,.36,-.93,0],["c",-.03,-.09,-.06,-.33,-.06,-2.43],["l",0,-2.31],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.43],["c",0,2.58,0,2.52,-.15,2.67],["c",-.06,.09,-.27,.18,-.36,.18],["c",-.12,0,-.33,-.09,-.39,-.18],["c",-.15,-.15,-.15,-.09,-.15,-2.43],["c",0,-1.23,0,-2.22,-.03,-2.22],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.43],["c",0,-1.32,0,-2.43,-.03,-2.43],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.52],["c",0,-2.28,.03,-2.55,.06,-2.64],["c",.21,-.36,.72,-.36,.93,0],["c",.03,.09,.06,.33,.06,2.43],["l",.03,2.31],["l",1.26,-.51],["l",1.26,-.51],["l",0,-2.43],["c",0,-2.28,0,-2.43,.06,-2.55],["c",.06,-.12,.12,-.18,.27,-.24],["z"],["m",-.33,10.65],["l",0,-2.43],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.46],["l",0,2.43],["l",.09,-.03],["c",.06,-.03,.63,-.27,1.29,-.51],["l",1.17,-.48],["l",0,-2.46],["z"]],w:8.25,h:22.462},"accidentals.halfsharp":{d:[["M",2.43,-10.05],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.01],["c",0,1.05,0,1.89,.03,1.89],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.37],["c",0,1.32,0,2.37,.03,2.37],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.25],["c",0,1.95,0,2.28,-.06,2.37],["c",-.06,.12,-.12,.21,-.24,.27],["c",-.27,.12,-.54,.03,-.69,-.24],["c",-.06,-.12,-.06,-.21,-.06,-2.01],["c",0,-1.05,0,-1.89,-.03,-1.89],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.37],["c",0,-1.32,0,-2.37,-.03,-2.37],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.25],["c",0,-2.13,0,-2.28,.06,-2.4],["c",.06,-.12,.12,-.18,.27,-.24],["z"]],w:5.25,h:20.174},"accidentals.nat":{d:[["M",.21,-11.4],["c",.24,-.06,.78,0,.99,.15],["c",.03,.03,.03,.48,0,2.61],["c",-.03,1.44,-.03,2.61,-.03,2.61],["c",0,.03,.75,-.09,1.68,-.24],["c",.96,-.18,1.71,-.27,1.74,-.27],["c",.15,.03,.27,.15,.36,.3],["l",.06,.12],["l",.09,8.67],["c",.09,6.96,.12,8.67,.09,8.67],["c",-.03,.03,-.12,.06,-.21,.09],["c",-.24,.09,-.72,.09,-.96,0],["c",-.09,-.03,-.18,-.06,-.21,-.09],["c",-.03,-.03,-.03,-.48,0,-2.61],["c",.03,-1.44,.03,-2.61,.03,-2.61],["c",0,-.03,-.75,.09,-1.68,.24],["c",-.96,.18,-1.71,.27,-1.74,.27],["c",-.15,-.03,-.27,-.15,-.36,-.3],["l",-.06,-.15],["l",-.09,-7.53],["c",-.06,-4.14,-.09,-8.04,-.12,-8.67],["l",0,-1.11],["l",.15,-.06],["c",.09,-.03,.21,-.06,.27,-.09],["z"],["m",3.75,8.4],["c",0,-.33,0,-.42,-.03,-.42],["c",-.12,0,-2.79,.45,-2.79,.48],["c",-.03,0,-.09,6.3,-.09,6.33],["c",.03,0,2.79,-.45,2.82,-.48],["c",0,0,.09,-4.53,.09,-5.91],["z"]],w:5.4,h:22.8},"accidentals.flat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:6.75,h:18.801},"accidentals.halfflat":{d:[["M",4.83,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.6,-.12,9.06],["c",-.09,5.55,-.15,9.06,-.18,9.12],["c",-.03,.09,-.09,.18,-.15,.27],["c",-.24,.21,-.54,.24,-.81,.06],["c",-.06,-.03,-.27,-.24,-.45,-.42],["c",-.36,-.42,-.66,-.66,-1.8,-1.44],["c",-1.23,-.84,-1.83,-1.32,-2.25,-1.77],["c",-.66,-.78,-.96,-1.56,-.93,-2.46],["c",.09,-1.41,1.11,-2.58,2.4,-2.79],["c",.3,-.06,.84,-.03,1.23,.06],["c",.54,.12,1.08,.33,1.53,.63],["c",.12,.09,.24,.15,.24,.12],["c",0,0,-.12,-8.37,-.18,-9.75],["l",0,-.66],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",-1.65,10.95],["c",-.6,-.18,-1.08,.09,-1.38,.69],["c",-.27,.6,-.36,1.38,-.18,2.07],["c",.12,.42,.42,.99,.72,1.41],["c",.3,.42,.93,1.05,1.56,1.59],["l",.48,.39],["l",0,-.12],["c",.03,-.09,.03,-.48,.06,-.9],["c",.03,-.57,.03,-1.08,0,-2.22],["c",-.03,-1.62,-.03,-1.62,-.24,-2.07],["c",-.21,-.42,-.6,-.75,-1.02,-.84],["z"]],w:6.728,h:18.801},"accidentals.dblflat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"],["m",3,-11],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:12.1,h:18.804},"accidentals.dblsharp":{d:[["M",-.18,-3.96],["c",.06,-.03,.12,-.06,.15,-.06],["c",.09,0,2.76,.27,2.79,.3],["c",.12,.03,.15,.12,.15,.51],["c",.06,.96,.24,1.59,.57,2.1],["c",.06,.09,.15,.21,.18,.24],["l",.09,.06],["l",.09,-.06],["c",.03,-.03,.12,-.15,.18,-.24],["c",.33,-.51,.51,-1.14,.57,-2.1],["c",0,-.39,.03,-.45,.12,-.51],["c",.03,0,.66,-.09,1.44,-.15],["c",1.47,-.15,1.5,-.15,1.56,-.03],["c",.03,.06,0,.42,-.09,1.44],["c",-.09,.72,-.15,1.35,-.15,1.38],["c",0,.03,-.03,.09,-.06,.12],["c",-.06,.06,-.12,.09,-.51,.09],["c",-1.08,.06,-1.8,.3,-2.28,.75],["l",-.12,.09],["l",.09,.09],["c",.12,.15,.39,.33,.63,.45],["c",.42,.18,.96,.27,1.68,.33],["c",.39,0,.45,.03,.51,.09],["c",.03,.03,.06,.09,.06,.12],["c",0,.03,.06,.66,.15,1.38],["c",.09,1.02,.12,1.38,.09,1.44],["c",-.06,.12,-.09,.12,-1.56,-.03],["c",-.78,-.06,-1.41,-.15,-1.44,-.15],["c",-.09,-.06,-.12,-.12,-.12,-.54],["c",-.06,-.93,-.24,-1.56,-.57,-2.07],["c",-.06,-.09,-.15,-.21,-.18,-.24],["l",-.09,-.06],["l",-.09,.06],["c",-.03,.03,-.12,.15,-.18,.24],["c",-.33,.51,-.51,1.14,-.57,2.07],["c",0,.42,-.03,.48,-.12,.54],["c",-.03,0,-.66,.09,-1.44,.15],["c",-1.47,.15,-1.5,.15,-1.56,.03],["c",-.03,-.06,0,-.42,.09,-1.44],["c",.09,-.72,.15,-1.35,.15,-1.38],["c",0,-.03,.03,-.09,.06,-.12],["c",.06,-.06,.12,-.09,.51,-.09],["c",.72,-.06,1.26,-.15,1.68,-.33],["c",.24,-.12,.51,-.3,.63,-.45],["l",.09,-.09],["l",-.12,-.09],["c",-.48,-.45,-1.2,-.69,-2.28,-.75],["c",-.39,0,-.45,-.03,-.51,-.09],["c",-.03,-.03,-.06,-.09,-.06,-.12],["c",0,-.03,-.06,-.63,-.12,-1.38],["c",-.09,-.72,-.15,-1.35,-.15,-1.38],["z"]],w:7.95,h:7.977},"dots.dot":{d:[["M",1.32,-1.68],["c",.09,-.03,.27,-.06,.39,-.06],["c",.96,0,1.74,.78,1.74,1.71],["c",0,.96,-.78,1.74,-1.71,1.74],["c",-.96,0,-1.74,-.78,-1.74,-1.71],["c",0,-.78,.54,-1.5,1.32,-1.68],["z"]],w:3.45,h:3.45},"noteheads.dbl":{d:[["M",-.69,-4.02],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["c",.06,.15,.06,.18,.06,1.41],["l",0,1.23],["l",.12,-.18],["c",.72,-1.26,2.64,-2.31,4.86,-2.64],["c",.81,-.15,1.11,-.15,2.13,-.15],["c",.99,0,1.29,0,2.1,.15],["c",.75,.12,1.38,.27,2.04,.54],["c",1.35,.51,2.34,1.26,2.82,2.1],["l",.12,.18],["l",0,-1.23],["c",0,-1.2,0,-1.26,.06,-1.38],["c",.09,-.18,.15,-.24,.33,-.33],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,3.54],["l",0,3.54],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.38],["l",0,-1.23],["l",-.12,.18],["c",-.48,.84,-1.47,1.59,-2.82,2.1],["c",-.84,.33,-1.71,.54,-2.85,.66],["c",-.45,.06,-2.16,.06,-2.61,0],["c",-1.14,-.12,-2.01,-.33,-2.85,-.66],["c",-1.35,-.51,-2.34,-1.26,-2.82,-2.1],["l",-.12,-.18],["l",0,1.23],["c",0,1.23,0,1.26,-.06,1.38],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-3.54],["c",0,-3.48,0,-3.54,.06,-3.66],["c",.09,-.18,.15,-.24,.33,-.33],["z"],["m",7.71,.63],["c",-.36,-.06,-.9,-.06,-1.14,0],["c",-.3,.03,-.66,.24,-.87,.42],["c",-.6,.54,-.9,1.62,-.75,2.82],["c",.12,.93,.51,1.68,1.11,2.31],["c",.75,.72,1.83,1.2,2.85,1.26],["c",1.05,.06,1.83,-.54,2.1,-1.65],["c",.21,-.9,.12,-1.95,-.24,-2.82],["c",-.36,-.81,-1.08,-1.53,-1.95,-1.95],["c",-.3,-.15,-.78,-.3,-1.11,-.39],["z"]],w:16.83,h:8.145},"noteheads.whole":{d:[["M",6.51,-4.05],["c",.51,-.03,2.01,0,2.52,.03],["c",1.41,.18,2.64,.51,3.72,1.08],["c",1.2,.63,1.95,1.41,2.19,2.31],["c",.09,.33,.09,.9,0,1.23],["c",-.24,.9,-.99,1.68,-2.19,2.31],["c",-1.08,.57,-2.28,.9,-3.75,1.08],["c",-.66,.06,-2.31,.06,-2.97,0],["c",-1.47,-.18,-2.67,-.51,-3.75,-1.08],["c",-1.2,-.63,-1.95,-1.41,-2.19,-2.31],["c",-.09,-.33,-.09,-.9,0,-1.23],["c",.24,-.9,.99,-1.68,2.19,-2.31],["c",1.2,-.63,2.61,-.99,4.23,-1.11],["z"],["m",.57,.66],["c",-.87,-.15,-1.53,0,-2.04,.51],["c",-.15,.15,-.24,.27,-.33,.48],["c",-.24,.51,-.36,1.08,-.33,1.77],["c",.03,.69,.18,1.26,.42,1.77],["c",.6,1.17,1.74,1.98,3.18,2.22],["c",1.11,.21,1.95,-.15,2.34,-.99],["c",.24,-.51,.36,-1.08,.33,-1.8],["c",-.06,-1.11,-.45,-2.04,-1.17,-2.76],["c",-.63,-.63,-1.47,-1.05,-2.4,-1.2],["z"]],w:14.985,h:8.097},"noteheads.half":{d:[["M",7.44,-4.05],["c",.06,-.03,.27,-.03,.48,-.03],["c",1.05,0,1.71,.24,2.1,.81],["c",.42,.6,.45,1.35,.18,2.4],["c",-.42,1.59,-1.14,2.73,-2.16,3.39],["c",-1.41,.93,-3.18,1.44,-5.4,1.53],["c",-1.17,.03,-1.89,-.21,-2.28,-.81],["c",-.42,-.6,-.45,-1.35,-.18,-2.4],["c",.42,-1.59,1.14,-2.73,2.16,-3.39],["c",.63,-.42,1.23,-.72,1.98,-.96],["c",.9,-.3,1.65,-.42,3.12,-.54],["z"],["m",1.29,.87],["c",-.27,-.09,-.63,-.12,-.9,-.03],["c",-.72,.24,-1.53,.69,-3.27,1.8],["c",-2.34,1.5,-3.3,2.25,-3.57,2.79],["c",-.36,.72,-.06,1.5,.66,1.77],["c",.24,.12,.69,.09,.99,0],["c",.84,-.3,1.92,-.93,4.14,-2.37],["c",1.62,-1.08,2.37,-1.71,2.61,-2.19],["c",.36,-.72,.06,-1.5,-.66,-1.77],["z"]],w:10.37,h:8.132},"noteheads.quarter":{d:[["M",6.09,-4.05],["c",.36,-.03,1.2,0,1.53,.06],["c",1.17,.24,1.89,.84,2.16,1.83],["c",.06,.18,.06,.3,.06,.66],["c",0,.45,0,.63,-.15,1.08],["c",-.66,2.04,-3.06,3.93,-5.52,4.38],["c",-.54,.09,-1.44,.09,-1.83,.03],["c",-1.23,-.27,-1.98,-.87,-2.25,-1.86],["c",-.06,-.18,-.06,-.3,-.06,-.66],["c",0,-.45,0,-.63,.15,-1.08],["c",.24,-.78,.75,-1.53,1.44,-2.22],["c",1.2,-1.2,2.85,-2.01,4.47,-2.22],["z"]],w:9.81,h:8.094},"noteheads.slash.nostem":{d:[["M",9.3,-7.77],["c",.06,-.06,.18,-.06,1.71,-.06],["l",1.65,0],["l",.09,.09],["c",.06,.06,.06,.09,.06,.15],["c",-.03,.12,-9.21,15.24,-9.3,15.33],["c",-.06,.06,-.18,.06,-1.71,.06],["l",-1.65,0],["l",-.09,-.09],["c",-.06,-.06,-.06,-.09,-.06,-.15],["c",.03,-.12,9.21,-15.24,9.3,-15.33],["z"]],w:12.81,h:15.63},"noteheads.indeterminate":{d:[["M",.78,-4.05],["c",.12,-.03,.24,-.03,.36,.03],["c",.03,.03,.93,.72,1.95,1.56],["l",1.86,1.5],["l",1.86,-1.5],["c",1.02,-.84,1.92,-1.53,1.95,-1.56],["c",.21,-.12,.33,-.09,.75,.24],["c",.3,.27,.36,.36,.36,.54],["c",0,.03,-.03,.12,-.06,.18],["c",-.03,.06,-.9,.75,-1.89,1.56],["l",-1.8,1.47],["c",0,.03,.81,.69,1.8,1.5],["c",.99,.81,1.86,1.5,1.89,1.56],["c",.03,.06,.06,.15,.06,.18],["c",0,.18,-.06,.27,-.36,.54],["c",-.42,.33,-.54,.36,-.75,.24],["c",-.03,-.03,-.93,-.72,-1.95,-1.56],["l",-1.86,-1.5],["l",-1.86,1.5],["c",-1.02,.84,-1.92,1.53,-1.95,1.56],["c",-.21,.12,-.33,.09,-.75,-.24],["c",-.3,-.27,-.36,-.36,-.36,-.54],["c",0,-.03,.03,-.12,.06,-.18],["c",.03,-.06,.9,-.75,1.89,-1.56],["l",1.8,-1.47],["c",0,-.03,-.81,-.69,-1.8,-1.5],["c",-.99,-.81,-1.86,-1.5,-1.89,-1.56],["c",-.06,-.12,-.09,-.21,-.03,-.36],["c",.03,-.09,.57,-.57,.72,-.63],["z"]],w:9.843,h:8.139},"scripts.ufermata":{d:[["M",-.75,-10.77],["c",.12,0,.45,-.03,.69,-.03],["c",2.91,-.03,5.55,1.53,7.41,4.35],["c",1.17,1.71,1.95,3.72,2.43,6.03],["c",.12,.51,.12,.57,.03,.69],["c",-.12,.21,-.48,.27,-.69,.12],["c",-.12,-.09,-.18,-.24,-.27,-.69],["c",-.78,-3.63,-3.42,-6.54,-6.78,-7.38],["c",-.78,-.21,-1.2,-.24,-2.07,-.24],["c",-.63,0,-.84,0,-1.2,.06],["c",-1.83,.27,-3.42,1.08,-4.8,2.37],["c",-1.41,1.35,-2.4,3.21,-2.85,5.19],["c",-.09,.45,-.15,.6,-.27,.69],["c",-.21,.15,-.57,.09,-.69,-.12],["c",-.09,-.12,-.09,-.18,.03,-.69],["c",.33,-1.62,.78,-3,1.47,-4.38],["c",1.77,-3.54,4.44,-5.67,7.56,-5.97],["z"],["m",.33,7.47],["c",1.38,-.3,2.58,.9,2.31,2.25],["c",-.15,.72,-.78,1.35,-1.47,1.5],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.748,h:11.289},"scripts.dfermata":{d:[["M",-9.63,-.42],["c",.15,-.09,.36,-.06,.51,.03],["c",.12,.09,.18,.24,.27,.66],["c",.78,3.66,3.42,6.57,6.78,7.41],["c",.78,.21,1.2,.24,2.07,.24],["c",.63,0,.84,0,1.2,-.06],["c",1.83,-.27,3.42,-1.08,4.8,-2.37],["c",1.41,-1.35,2.4,-3.21,2.85,-5.22],["c",.09,-.42,.15,-.57,.27,-.66],["c",.21,-.15,.57,-.09,.69,.12],["c",.09,.12,.09,.18,-.03,.69],["c",-.33,1.62,-.78,3,-1.47,4.38],["c",-1.92,3.84,-4.89,6,-8.31,6],["c",-3.42,0,-6.39,-2.16,-8.31,-6],["c",-.48,-.96,-.84,-1.92,-1.14,-2.97],["c",-.18,-.69,-.42,-1.74,-.42,-1.92],["c",0,-.12,.09,-.27,.24,-.33],["z"],["m",9.21,0],["c",1.2,-.27,2.34,.63,2.34,1.86],["c",0,.9,-.66,1.68,-1.5,1.89],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.744,h:11.274},"scripts.sforzato":{d:[["M",-6.45,-3.69],["c",.06,-.03,.15,-.06,.18,-.06],["c",.06,0,2.85,.72,6.24,1.59],["l",6.33,1.65],["c",.33,.06,.45,.21,.45,.51],["c",0,.3,-.12,.45,-.45,.51],["l",-6.33,1.65],["c",-3.39,.87,-6.18,1.59,-6.21,1.59],["c",-.21,0,-.48,-.24,-.51,-.45],["c",0,-.15,.06,-.36,.18,-.45],["c",.09,-.06,.87,-.27,3.84,-1.05],["c",2.04,-.54,3.84,-.99,4.02,-1.02],["c",.15,-.06,1.14,-.24,2.22,-.42],["c",1.05,-.18,1.92,-.36,1.92,-.36],["c",0,0,-.87,-.18,-1.92,-.36],["c",-1.08,-.18,-2.07,-.36,-2.22,-.42],["c",-.18,-.03,-1.98,-.48,-4.02,-1.02],["c",-2.97,-.78,-3.75,-.99,-3.84,-1.05],["c",-.12,-.09,-.18,-.3,-.18,-.45],["c",.03,-.15,.15,-.3,.3,-.39],["z"]],w:13.5,h:7.5},"scripts.staccato":{d:[["M",-.36,-1.47],["c",.93,-.21,1.86,.51,1.86,1.47],["c",0,.93,-.87,1.65,-1.8,1.47],["c",-.54,-.12,-1.02,-.57,-1.14,-1.08],["c",-.21,-.81,.27,-1.65,1.08,-1.86],["z"]],w:2.989,h:3.004},"scripts.tenuto":{d:[["M",-4.2,-.48],["l",.12,-.06],["l",4.08,0],["l",4.08,0],["l",.12,.06],["c",.39,.21,.39,.75,0,.96],["l",-.12,.06],["l",-4.08,0],["l",-4.08,0],["l",-.12,-.06],["c",-.39,-.21,-.39,-.75,0,-.96],["z"]],w:8.985,h:1.08},"scripts.umarcato":{d:[["M",-.15,-8.19],["c",.15,-.12,.36,-.03,.45,.15],["c",.21,.42,3.45,7.65,3.45,7.71],["c",0,.12,-.12,.27,-.21,.3],["c",-.03,.03,-.51,.03,-1.14,.03],["c",-1.05,0,-1.08,0,-1.17,-.06],["c",-.09,-.06,-.24,-.36,-1.17,-2.4],["c",-.57,-1.29,-1.05,-2.34,-1.08,-2.34],["c",0,-.03,-.51,1.02,-1.08,2.34],["c",-.93,2.07,-1.08,2.34,-1.14,2.4],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.06,3.24,-7.32,3.45,-7.71],["c",.03,-.06,.09,-.15,.15,-.15],["z"]],w:7.5,h:8.245},"scripts.dmarcato":{d:[["M",-3.57,.03],["c",.03,0,.57,-.03,1.17,-.03],["c",1.05,0,1.08,0,1.17,.06],["c",.09,.06,.24,.36,1.17,2.4],["c",.57,1.29,1.05,2.34,1.08,2.34],["c",0,.03,.51,-1.02,1.08,-2.34],["c",.93,-2.07,1.08,-2.34,1.14,-2.4],["c",.06,-.03,.15,-.06,.18,-.06],["c",.15,0,.33,.18,.33,.33],["c",0,.09,-3.45,7.74,-3.54,7.83],["c",-.12,.12,-.3,.12,-.42,0],["c",-.09,-.09,-3.54,-7.74,-3.54,-7.83],["c",0,-.09,.12,-.27,.18,-.3],["z"]],w:7.5,h:8.25},"scripts.stopped":{d:[["M",-.27,-4.08],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.5],["l",0,1.47],["l",1.47,0],["l",1.5,0],["l",.15,.06],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.09,.36,0,.54],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.12,.06,-.18,.06,-1.62,.06],["l",-1.47,0],["l",0,1.47],["l",0,1.47],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-1.47],["l",0,-1.47],["l",-1.47,0],["c",-1.44,0,-1.5,0,-1.62,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.47,0],["l",1.47,0],["l",0,-1.47],["c",0,-1.44,0,-1.5,.06,-1.62],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:8.295,h:8.295},"scripts.upbow":{d:[["M",-4.65,-15.54],["c",.12,-.09,.36,-.06,.48,.03],["c",.03,.03,.09,.09,.12,.15],["c",.03,.06,.66,2.13,1.41,4.62],["c",1.35,4.41,1.38,4.56,2.01,6.96],["l",.63,2.46],["l",.63,-2.46],["c",.63,-2.4,.66,-2.55,2.01,-6.96],["c",.75,-2.49,1.38,-4.56,1.41,-4.62],["c",.06,-.15,.18,-.21,.36,-.24],["c",.15,0,.3,.06,.39,.18],["c",.15,.21,.24,-.18,-2.1,7.56],["c",-1.2,3.96,-2.22,7.32,-2.25,7.41],["c",0,.12,-.06,.27,-.09,.3],["c",-.12,.21,-.6,.21,-.72,0],["c",-.03,-.03,-.09,-.18,-.09,-.3],["c",-.03,-.09,-1.05,-3.45,-2.25,-7.41],["c",-2.34,-7.74,-2.25,-7.35,-2.1,-7.56],["c",.03,-.03,.09,-.09,.15,-.12],["z"]],w:9.73,h:15.608},"scripts.downbow":{d:[["M",-5.55,-9.93],["l",.09,-.06],["l",5.46,0],["l",5.46,0],["l",.09,.06],["l",.06,.09],["l",0,4.77],["c",0,5.28,0,4.89,-.18,5.01],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.06,-.09,-.06,-.18,-.06,-2.97],["l",0,-2.85],["l",-4.83,0],["l",-4.83,0],["l",0,2.85],["c",0,2.79,0,2.88,-.06,2.97],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.21,-.06,-4.89],["l",0,-4.77],["z"]],w:11.22,h:9.992},"scripts.turn":{d:[["M",-4.77,-3.9],["c",.36,-.06,1.05,-.06,1.44,.03],["c",.78,.15,1.5,.51,2.34,1.14],["c",.6,.45,1.05,.87,2.22,2.01],["c",1.11,1.08,1.62,1.5,2.22,1.86],["c",.6,.36,1.32,.57,1.92,.57],["c",.9,0,1.71,-.57,1.89,-1.35],["c",.24,-.93,-.39,-1.89,-1.35,-2.1],["l",-.15,-.06],["l",-.09,.15],["c",-.03,.09,-.15,.24,-.24,.33],["c",-.72,.72,-2.04,.54,-2.49,-.36],["c",-.48,-.93,.03,-1.86,1.17,-2.19],["c",.3,-.09,1.02,-.09,1.35,0],["c",.99,.27,1.74,.87,2.25,1.83],["c",.69,1.41,.63,3,-.21,4.26],["c",-.21,.3,-.69,.81,-.99,1.02],["c",-.3,.21,-.84,.45,-1.17,.54],["c",-1.23,.36,-2.49,.15,-3.72,-.6],["c",-.75,-.48,-1.41,-1.02,-2.85,-2.46],["c",-1.11,-1.08,-1.62,-1.5,-2.22,-1.86],["c",-.6,-.36,-1.32,-.57,-1.92,-.57],["c",-.9,0,-1.71,.57,-1.89,1.35],["c",-.24,.93,.39,1.89,1.35,2.1],["l",.15,.06],["l",.09,-.15],["c",.03,-.09,.15,-.24,.24,-.33],["c",.72,-.72,2.04,-.54,2.49,.36],["c",.48,.93,-.03,1.86,-1.17,2.19],["c",-.3,.09,-1.02,.09,-1.35,0],["c",-.99,-.27,-1.74,-.87,-2.25,-1.83],["c",-.69,-1.41,-.63,-3,.21,-4.26],["c",.21,-.3,.69,-.81,.99,-1.02],["c",.48,-.33,1.11,-.57,1.74,-.66],["z"]],w:16.366,h:7.893},"scripts.trill":{d:[["M",-.51,-16.02],["c",.12,-.09,.21,-.18,.21,-.18],["l",-.81,4.02],["l",-.81,4.02],["c",.03,0,.51,-.27,1.08,-.6],["c",.6,-.3,1.14,-.63,1.26,-.66],["c",1.14,-.54,2.31,-.6,3.09,-.18],["c",.27,.15,.54,.36,.6,.51],["l",.06,.12],["l",.21,-.21],["c",.9,-.81,2.22,-.99,3.12,-.42],["c",.6,.42,.9,1.14,.78,2.07],["c",-.15,1.29,-1.05,2.31,-1.95,2.25],["c",-.48,-.03,-.78,-.3,-.96,-.81],["c",-.09,-.27,-.09,-.9,-.03,-1.2],["c",.21,-.75,.81,-1.23,1.59,-1.32],["l",.24,-.03],["l",-.09,-.12],["c",-.51,-.66,-1.62,-.63,-2.31,.03],["c",-.39,.42,-.3,.09,-1.23,4.77],["l",-.81,4.14],["c",-.03,0,-.12,-.03,-.21,-.09],["c",-.33,-.15,-.54,-.18,-.99,-.18],["c",-.42,0,-.66,.03,-1.05,.18],["c",-.12,.06,-.21,.09,-.21,.09],["c",0,-.03,.36,-1.86,.81,-4.11],["c",.9,-4.47,.87,-4.26,.69,-4.53],["c",-.21,-.36,-.66,-.51,-1.17,-.36],["c",-.15,.06,-2.22,1.14,-2.58,1.38],["c",-.12,.09,-.12,.09,-.21,.6],["l",-.09,.51],["l",.21,.24],["c",.63,.75,1.02,1.47,1.2,2.19],["c",.06,.27,.06,.36,.06,.81],["c",0,.42,0,.54,-.06,.78],["c",-.15,.54,-.33,.93,-.63,1.35],["c",-.18,.24,-.57,.63,-.81,.78],["c",-.24,.15,-.63,.36,-.84,.42],["c",-.27,.06,-.66,.06,-.87,.03],["c",-.81,-.18,-1.32,-1.05,-1.38,-2.46],["c",-.03,-.6,.03,-.99,.33,-2.46],["c",.21,-1.08,.24,-1.32,.21,-1.29],["c",-1.2,.48,-2.4,.75,-3.21,.72],["c",-.69,-.06,-1.17,-.3,-1.41,-.72],["c",-.39,-.75,-.12,-1.8,.66,-2.46],["c",.24,-.18,.69,-.42,1.02,-.51],["c",.69,-.18,1.53,-.15,2.31,.09],["c",.3,.09,.75,.3,.99,.45],["c",.12,.09,.15,.09,.15,.03],["c",.03,-.03,.33,-1.59,.72,-3.45],["c",.36,-1.86,.66,-3.42,.69,-3.45],["c",0,-.03,.03,-.03,.21,.03],["c",.21,.06,.27,.06,.48,.06],["c",.42,-.03,.78,-.18,1.26,-.48],["c",.15,-.12,.36,-.27,.48,-.39],["z"],["m",-5.73,7.68],["c",-.27,-.03,-.96,-.06,-1.2,-.03],["c",-.81,.12,-1.35,.57,-1.5,1.2],["c",-.18,.66,.12,1.14,.75,1.29],["c",.66,.12,1.92,-.12,3.18,-.66],["l",.33,-.15],["l",.09,-.39],["c",.06,-.21,.09,-.42,.09,-.45],["c",0,-.03,-.45,-.3,-.75,-.45],["c",-.27,-.15,-.66,-.27,-.99,-.36],["z"],["m",4.29,3.63],["c",-.24,-.39,-.51,-.75,-.51,-.69],["c",-.06,.12,-.39,1.92,-.45,2.28],["c",-.09,.54,-.12,1.14,-.06,1.38],["c",.06,.42,.21,.6,.51,.57],["c",.39,-.06,.75,-.48,.93,-1.14],["c",.09,-.33,.09,-1.05,0,-1.38],["c",-.09,-.39,-.24,-.69,-.42,-1.02],["z"]],w:17.963,h:16.49},"scripts.segno":{d:[["M",-3.72,-11.22],["c",.78,-.09,1.59,.03,2.31,.42],["c",1.2,.6,2.01,1.71,2.31,3.09],["c",.09,.42,.09,1.2,.03,1.5],["c",-.15,.45,-.39,.81,-.66,.93],["c",-.33,.18,-.84,.21,-1.23,.15],["c",-.81,-.18,-1.32,-.93,-1.26,-1.89],["c",.03,-.36,.09,-.57,.24,-.9],["c",.15,-.33,.45,-.6,.72,-.75],["c",.12,-.06,.18,-.09,.18,-.12],["c",0,-.03,-.03,-.15,-.09,-.24],["c",-.18,-.45,-.54,-.87,-.96,-1.08],["c",-1.11,-.57,-2.34,-.18,-2.88,.9],["c",-.24,.51,-.33,1.11,-.24,1.83],["c",.27,1.92,1.5,3.54,3.93,5.13],["c",.48,.33,1.26,.78,1.29,.78],["c",.03,0,1.35,-2.19,2.94,-4.89],["l",2.88,-4.89],["l",.84,0],["l",.87,0],["l",-.03,.06],["c",-.15,.21,-6.15,10.41,-6.15,10.44],["c",0,0,.21,.15,.48,.27],["c",2.61,1.47,4.35,3.03,5.13,4.65],["c",1.14,2.34,.51,5.07,-1.44,6.39],["c",-.66,.42,-1.32,.63,-2.13,.69],["c",-2.01,.09,-3.81,-1.41,-4.26,-3.54],["c",-.09,-.42,-.09,-1.2,-.03,-1.5],["c",.15,-.45,.39,-.81,.66,-.93],["c",.33,-.18,.84,-.21,1.23,-.15],["c",.81,.18,1.32,.93,1.26,1.89],["c",-.03,.36,-.09,.57,-.24,.9],["c",-.15,.33,-.45,.6,-.72,.75],["c",-.12,.06,-.18,.09,-.18,.12],["c",0,.03,.03,.15,.09,.24],["c",.18,.45,.54,.87,.96,1.08],["c",1.11,.57,2.34,.18,2.88,-.9],["c",.24,-.51,.33,-1.11,.24,-1.83],["c",-.27,-1.92,-1.5,-3.54,-3.93,-5.13],["c",-.48,-.33,-1.26,-.78,-1.29,-.78],["c",-.03,0,-1.35,2.19,-2.91,4.89],["l",-2.88,4.89],["l",-.87,0],["l",-.87,0],["l",.03,-.06],["c",.15,-.21,6.15,-10.41,6.15,-10.44],["c",0,0,-.21,-.15,-.48,-.3],["c",-2.61,-1.44,-4.35,-3,-5.13,-4.62],["c",-.9,-1.89,-.72,-4.02,.48,-5.52],["c",.69,-.84,1.68,-1.41,2.73,-1.53],["z"],["m",8.76,9.09],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"],["m",-10.53,2.61],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"]],w:15,h:22.504},"scripts.coda":{d:[["M",-.21,-10.47],["c",.18,-.12,.42,-.06,.54,.12],["c",.06,.09,.06,.18,.06,1.5],["l",0,1.38],["l",.18,0],["c",.39,.06,.96,.24,1.38,.48],["c",1.68,.93,2.82,3.24,3.03,6.12],["c",.03,.24,.03,.45,.03,.45],["c",0,.03,.6,.03,1.35,.03],["c",1.5,0,1.47,0,1.59,.18],["c",.09,.12,.09,.3,0,.42],["c",-.12,.18,-.09,.18,-1.59,.18],["c",-.75,0,-1.35,0,-1.35,.03],["c",0,0,0,.21,-.03,.42],["c",-.24,3.15,-1.53,5.58,-3.45,6.36],["c",-.27,.12,-.72,.24,-.96,.27],["l",-.18,0],["l",0,1.38],["c",0,1.32,0,1.41,-.06,1.5],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.18,-.06,-1.5],["l",0,-1.38],["l",-.18,0],["c",-.39,-.06,-.96,-.24,-1.38,-.48],["c",-1.68,-.93,-2.82,-3.24,-3.03,-6.15],["c",-.03,-.21,-.03,-.42,-.03,-.42],["c",0,-.03,-.6,-.03,-1.35,-.03],["c",-1.5,0,-1.47,0,-1.59,-.18],["c",-.09,-.12,-.09,-.3,0,-.42],["c",.12,-.18,.09,-.18,1.59,-.18],["c",.75,0,1.35,0,1.35,-.03],["c",0,0,0,-.21,.03,-.45],["c",.24,-3.12,1.53,-5.55,3.45,-6.33],["c",.27,-.12,.72,-.24,.96,-.27],["l",.18,0],["l",0,-1.38],["c",0,-1.53,0,-1.5,.18,-1.62],["z"],["m",-.18,6.93],["c",0,-2.97,0,-3.15,-.06,-3.15],["c",-.09,0,-.51,.15,-.66,.21],["c",-.87,.51,-1.38,1.62,-1.56,3.51],["c",-.06,.54,-.12,1.59,-.12,2.16],["l",0,.42],["l",1.2,0],["l",1.2,0],["l",0,-3.15],["z"],["m",1.17,-3.06],["c",-.09,-.03,-.21,-.06,-.27,-.09],["l",-.12,0],["l",0,3.15],["l",0,3.15],["l",1.2,0],["l",1.2,0],["l",0,-.81],["c",-.06,-2.4,-.33,-3.69,-.93,-4.59],["c",-.27,-.39,-.66,-.69,-1.08,-.81],["z"],["m",-1.17,10.14],["l",0,-3.15],["l",-1.2,0],["l",-1.2,0],["l",0,.81],["c",.03,.96,.06,1.47,.15,2.13],["c",.24,2.04,.96,3.12,2.13,3.36],["l",.12,0],["l",0,-3.15],["z"],["m",3.18,-2.34],["l",0,-.81],["l",-1.2,0],["l",-1.2,0],["l",0,3.15],["l",0,3.15],["l",.12,0],["c",1.17,-.24,1.89,-1.32,2.13,-3.36],["c",.09,-.66,.12,-1.17,.15,-2.13],["z"]],w:16.035,h:21.062},"scripts.comma":{d:[["M",1.14,-4.62],["c",.3,-.12,.69,-.03,.93,.15],["c",.12,.12,.36,.45,.51,.78],["c",.9,1.77,.54,4.05,-1.08,6.75],["c",-.36,.63,-.87,1.38,-.96,1.44],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.09,-.18,-.09,-.3,.12,-.6],["c",.96,-1.44,1.44,-2.97,1.38,-4.35],["c",-.06,-.93,-.3,-1.68,-.78,-2.46],["c",-.27,-.39,-.33,-.63,-.24,-.96],["c",.09,-.27,.36,-.54,.66,-.63],["z"]],w:3.042,h:9.237},"scripts.roll":{d:[["M",1.95,-6],["c",.21,-.09,.36,-.09,.57,0],["c",.39,.15,.63,.39,1.47,1.35],["c",.66,.75,.78,.87,1.08,1.05],["c",.75,.45,1.65,.42,2.4,-.06],["c",.12,-.09,.27,-.27,.54,-.6],["c",.42,-.54,.51,-.63,.69,-.63],["c",.09,0,.3,.12,.36,.21],["c",.09,.12,.12,.3,.03,.42],["c",-.06,.12,-3.15,3.9,-3.3,4.08],["c",-.06,.06,-.18,.12,-.27,.18],["c",-.27,.12,-.6,.06,-.99,-.27],["c",-.27,-.21,-.42,-.39,-1.08,-1.14],["c",-.63,-.72,-.81,-.9,-1.17,-1.08],["c",-.36,-.18,-.57,-.21,-.99,-.21],["c",-.39,0,-.63,.03,-.93,.18],["c",-.36,.15,-.51,.27,-.9,.81],["c",-.24,.27,-.45,.51,-.48,.54],["c",-.12,.09,-.27,.06,-.39,0],["c",-.24,-.15,-.33,-.39,-.21,-.6],["c",.09,-.12,3.18,-3.87,3.33,-4.02],["c",.06,-.06,.18,-.15,.24,-.21],["z"]],w:10.817,h:6.125},"scripts.prall":{d:[["M",-4.38,-3.69],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.57,-.84,1.23,-1.83],["c",1.14,-1.68,1.23,-1.83,1.35,-1.89],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["c",-.03,0,-.57,.84,-1.23,1.83],["c",-1.14,1.68,-1.23,1.83,-1.35,1.89],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["z"]],w:15.011,h:7.5},"scripts.arpeggio":{d:[["M",1.5,0],["c",1.5,2,1.5,3,1.5,3],["s",0,1,-2,1.5],["s",-.5,3,1,5.5],["l",1.5,0],["s",-1.75,-2,-1.9,-3.25],["s",2.15,-.6,2.95,-1.6],["s",.45,-1,.5,-1.25],["s",0,-1,-2,-3.9],["l",-1.5,0],["z"]],w:5,h:10},"scripts.mordent":{d:[["M",-.21,-4.95],["c",.27,-.15,.63,0,.75,.27],["c",.06,.12,.06,.24,.06,1.44],["l",0,1.29],["l",.57,-.84],["c",.51,-.75,.57,-.84,.69,-.9],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.83,-1.89],["c",-.81,-.99,-1.5,-1.8,-1.53,-1.86],["c",-.06,-.03,-.06,-.03,-.12,.03],["c",-.06,.06,-.06,.15,-.06,2.28],["c",0,1.95,0,2.25,-.06,2.34],["c",-.18,.45,-.81,.48,-1.05,.03],["c",-.03,-.06,-.06,-.24,-.06,-1.41],["l",0,-1.35],["l",-.57,.84],["c",-.54,.78,-.6,.87,-.72,.93],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.06,-.06,.09,-.09],["c",.06,-.12,.06,-.15,.06,-2.28],["c",0,-1.92,0,-2.22,.06,-2.31],["c",.06,-.15,.15,-.24,.3,-.3],["z"]],w:15.011,h:10.012},"flags.u8th":{d:[["M",-.42,3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",0,.18],["c",0,.3,.06,.84,.12,1.23],["c",.24,1.53,.9,3.12,2.13,5.16],["l",.99,1.59],["c",.87,1.44,1.38,2.34,1.77,3.09],["c",.81,1.68,1.2,3.06,1.26,4.53],["c",.03,1.53,-.21,3.27,-.75,5.01],["c",-.21,.69,-.51,1.5,-.6,1.59],["c",-.09,.12,-.27,.21,-.42,.21],["c",-.15,0,-.42,-.12,-.51,-.21],["c",-.15,-.18,-.18,-.42,-.09,-.66],["c",.15,-.33,.45,-1.2,.57,-1.62],["c",.42,-1.38,.6,-2.58,.6,-3.9],["c",0,-.66,0,-.81,-.06,-1.11],["c",-.39,-2.07,-1.8,-4.26,-4.59,-7.14],["l",-.42,-.45],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["z"]],w:6.692,h:22.59},"flags.u16th":{d:[["M",-.42,7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,.39],["c",.06,1.08,.39,2.19,.99,3.39],["c",.45,.9,.87,1.59,1.95,3.12],["c",1.29,1.86,1.77,2.64,2.22,3.57],["c",.45,.93,.72,1.8,.87,2.64],["c",.06,.51,.06,1.5,0,1.92],["c",-.12,.6,-.3,1.2,-.54,1.71],["l",-.09,.24],["l",.18,.45],["c",.51,1.2,.72,2.22,.69,3.42],["c",-.06,1.53,-.39,3.03,-.99,4.53],["c",-.3,.75,-.36,.81,-.57,.9],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.12,-.75],["c",.66,-1.41,1.02,-2.88,1.08,-4.32],["c",0,-.6,-.03,-1.05,-.18,-1.59],["c",-.3,-1.2,-.99,-2.4,-2.25,-3.87],["c",-.42,-.48,-1.53,-1.62,-2.19,-2.22],["l",-.45,-.42],["l",-.03,1.11],["l",0,1.11],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["z"],["m",1.65,.09],["c",-.3,-.3,-.69,-.72,-.9,-.87],["l",-.33,-.33],["l",0,.15],["c",0,.3,.06,.81,.15,1.26],["c",.27,1.29,.87,2.61,2.04,4.29],["c",.15,.24,.6,.87,.96,1.38],["l",1.08,1.53],["l",.42,.63],["c",.03,0,.12,-.36,.21,-.72],["c",.06,-.33,.06,-1.2,0,-1.62],["c",-.33,-1.71,-1.44,-3.48,-3.63,-5.7],["z"]],w:6.693,h:26.337},"flags.u32nd":{d:[["M",-.42,11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,.36],["c",.09,1.68,.69,3.27,2.07,5.46],["l",.87,1.35],["c",1.02,1.62,1.47,2.37,1.86,3.18],["c",.48,1.02,.78,1.92,.93,2.88],["c",.06,.48,.06,1.5,0,1.89],["c",-.09,.42,-.21,.87,-.36,1.26],["l",-.12,.3],["l",.15,.39],["c",.69,1.56,.84,2.88,.54,4.38],["c",-.09,.45,-.27,1.08,-.45,1.47],["l",-.12,.24],["l",.18,.36],["c",.33,.72,.57,1.56,.69,2.34],["c",.12,1.02,-.06,2.52,-.42,3.84],["c",-.27,.93,-.75,2.13,-.93,2.31],["c",-.18,.15,-.45,.18,-.66,.09],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.06,-.6],["c",.21,-.36,.42,-.9,.57,-1.38],["c",.51,-1.41,.69,-3.06,.48,-4.08],["c",-.15,-.81,-.57,-1.68,-1.2,-2.55],["c",-.72,-.99,-1.83,-2.13,-3.3,-3.33],["l",-.48,-.42],["l",-.03,1.53],["l",0,1.56],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["z"],["m",1.26,-3.96],["c",-.27,-.3,-.54,-.6,-.66,-.72],["l",-.18,-.21],["l",0,.42],["c",.06,.87,.24,1.74,.66,2.67],["c",.36,.87,.96,1.86,1.92,3.18],["c",.21,.33,.63,.87,.87,1.23],["c",.27,.39,.6,.84,.75,1.08],["l",.27,.39],["l",.03,-.12],["c",.12,-.45,.15,-1.05,.09,-1.59],["c",-.27,-1.86,-1.38,-3.78,-3.75,-6.33],["z"],["m",-.27,6.09],["c",-.27,-.21,-.48,-.42,-.51,-.45],["c",-.06,-.03,-.06,-.03,-.06,.21],["c",0,.9,.3,2.04,.81,3.09],["c",.48,1.02,.96,1.77,2.37,3.63],["c",.6,.78,1.05,1.44,1.29,1.77],["c",.06,.12,.15,.21,.15,.18],["c",.03,-.03,.18,-.57,.24,-.87],["c",.06,-.45,.06,-1.32,-.03,-1.74],["c",-.09,-.48,-.24,-.9,-.51,-1.44],["c",-.66,-1.35,-1.83,-2.7,-3.75,-4.38],["z"]],w:6.697,h:32.145},"flags.u64th":{d:[["M",-.42,15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,.36],["c",.06,1.2,.39,2.37,1.02,3.66],["c",.39,.81,.84,1.56,1.8,3.09],["c",.81,1.26,1.05,1.68,1.35,2.22],["c",.87,1.5,1.35,2.79,1.56,4.08],["c",.06,.54,.06,1.56,-.03,2.04],["c",-.09,.48,-.21,.99,-.36,1.35],["l",-.12,.27],["l",.12,.27],["c",.09,.15,.21,.45,.27,.66],["c",.69,1.89,.63,3.66,-.18,5.46],["l",-.18,.39],["l",.15,.33],["c",.3,.66,.51,1.44,.63,2.1],["c",.06,.48,.06,1.35,0,1.71],["c",-.15,.57,-.42,1.2,-.78,1.68],["l",-.21,.27],["l",.18,.33],["c",.57,1.05,.93,2.13,1.02,3.18],["c",.06,.72,0,1.83,-.21,2.79],["c",-.18,1.02,-.63,2.34,-1.02,3.09],["c",-.15,.33,-.48,.45,-.78,.3],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.03,-.54],["c",.75,-1.5,1.23,-3.45,1.17,-4.89],["c",-.06,-1.02,-.42,-2.01,-1.17,-3.15],["c",-.48,-.72,-1.02,-1.35,-1.89,-2.22],["c",-.57,-.57,-1.56,-1.5,-1.92,-1.77],["l",-.12,-.09],["l",0,1.68],["l",0,1.68],["l",-.21,0],["l",-.21,0],["l",0,-15],["z"],["m",.93,-8.07],["c",-.27,-.3,-.48,-.54,-.51,-.54],["c",0,0,0,.69,.03,1.02],["c",.15,1.47,.75,2.94,2.04,4.83],["l",1.08,1.53],["c",.39,.57,.84,1.2,.99,1.44],["c",.15,.24,.3,.45,.3,.45],["c",0,0,.03,-.09,.06,-.21],["c",.36,-1.59,-.15,-3.33,-1.47,-5.4],["c",-.63,-.93,-1.35,-1.83,-2.52,-3.12],["z"],["m",.06,6.72],["c",-.24,-.21,-.48,-.42,-.51,-.45],["l",-.06,-.06],["l",0,.33],["c",0,1.2,.3,2.34,.93,3.6],["c",.45,.9,.96,1.68,2.25,3.51],["c",.39,.54,.84,1.17,1.02,1.44],["c",.21,.33,.33,.51,.33,.48],["c",.06,-.09,.21,-.63,.3,-.99],["c",.06,-.33,.06,-.45,.06,-.96],["c",0,-.6,-.03,-.84,-.18,-1.35],["c",-.3,-1.08,-1.02,-2.28,-2.13,-3.57],["c",-.39,-.45,-1.44,-1.47,-2.01,-1.98],["z"],["m",0,6.72],["c",-.24,-.21,-.48,-.39,-.51,-.42],["l",-.06,-.06],["l",0,.33],["c",0,1.41,.45,2.82,1.38,4.35],["c",.42,.72,.72,1.14,1.86,2.73],["c",.36,.45,.75,.99,.87,1.2],["c",.15,.21,.3,.36,.3,.36],["c",.06,0,.3,-.48,.39,-.75],["c",.09,-.36,.12,-.63,.12,-1.05],["c",-.06,-1.05,-.45,-2.04,-1.2,-3.18],["c",-.57,-.87,-1.11,-1.53,-2.07,-2.49],["c",-.36,-.33,-.84,-.78,-1.08,-1.02],["z"]],w:6.682,h:39.694},"flags.d8th":{d:[["M",5.67,-21.63],["c",.24,-.12,.54,-.06,.69,.15],["c",.06,.06,.21,.36,.39,.66],["c",.84,1.77,1.26,3.36,1.32,5.1],["c",.03,1.29,-.21,2.37,-.81,3.63],["c",-.6,1.23,-1.26,2.13,-3.21,4.38],["c",-1.35,1.53,-1.86,2.19,-2.4,2.97],["c",-.63,.93,-1.11,1.92,-1.38,2.79],["c",-.15,.54,-.27,1.35,-.27,1.8],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",.48,-.3],["c",1.83,-1.11,3.12,-2.1,4.17,-3.12],["c",.78,-.81,1.32,-1.53,1.71,-2.31],["c",.45,-.93,.6,-1.74,.51,-2.88],["c",-.12,-1.56,-.63,-3.18,-1.47,-4.68],["c",-.12,-.21,-.15,-.33,-.06,-.51],["c",.06,-.15,.15,-.24,.33,-.33],["z"]],w:8.492,h:21.691},"flags.ugrace":{d:[["M",6.03,6.93],["c",.15,-.09,.33,-.06,.51,0],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.06,.39,-.03,.54],["c",-.06,.15,-10.89,8.88,-11.07,8.97],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.06,-.39,.03,-.54],["c",.06,-.15,10.89,-8.88,11.07,-8.97],["z"]],w:12.019,h:9.954},"flags.dgrace":{d:[["M",-6.06,-15.93],["c",.18,-.09,.33,-.12,.48,-.06],["c",.18,.09,14.01,8.04,14.1,8.1],["c",.12,.12,.18,.33,.18,.51],["c",-.03,.21,-.15,.39,-.36,.48],["c",-.18,.09,-.33,.12,-.48,.06],["c",-.18,-.09,-14.01,-8.04,-14.1,-8.1],["c",-.12,-.12,-.18,-.33,-.18,-.51],["c",.03,-.21,.15,-.39,.36,-.48],["z"]],w:15.12,h:9.212},"flags.d16th":{d:[["M",6.84,-22.53],["c",.27,-.12,.57,-.06,.72,.15],["c",.15,.15,.33,.87,.45,1.56],["c",.06,.33,.06,1.35,0,1.65],["c",-.06,.33,-.15,.78,-.27,1.11],["c",-.12,.33,-.45,.96,-.66,1.32],["l",-.18,.27],["l",.09,.18],["c",.48,1.02,.72,2.25,.69,3.3],["c",-.06,1.23,-.42,2.28,-1.26,3.45],["c",-.57,.87,-.99,1.32,-3,3.39],["c",-1.56,1.56,-2.22,2.4,-2.76,3.45],["c",-.42,.84,-.66,1.8,-.66,2.55],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,1.14],["l",0,1.11],["l",.27,-.15],["c",1.11,-.57,1.77,-.99,2.52,-1.47],["c",2.37,-1.56,3.69,-3.15,4.05,-4.83],["c",.03,-.18,.03,-.39,.03,-.78],["c",0,-.6,-.03,-.93,-.24,-1.5],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.5],["c",-.06,-.18,-.15,-.36,-.15,-.36],["c",-.03,0,-.03,.03,-.06,.06],["c",-.06,.12,-.96,1.02,-1.95,1.98],["c",-.63,.57,-1.26,1.17,-1.44,1.35],["c",-1.53,1.62,-2.28,2.85,-2.55,4.32],["c",-.03,.18,-.03,.54,-.06,.99],["l",0,.69],["l",.18,-.09],["c",.93,-.54,2.1,-1.29,2.82,-1.83],["c",.69,-.51,1.02,-.81,1.53,-1.29],["c",1.86,-1.89,2.37,-3.66,1.68,-5.82],["z"]],w:8.475,h:22.591},"flags.d32nd":{d:[["M",6.84,-29.13],["c",.27,-.12,.57,-.06,.72,.15],["c",.12,.12,.27,.63,.36,1.11],["c",.33,1.59,.06,3.06,-.81,4.47],["l",-.18,.27],["l",.09,.15],["c",.12,.24,.33,.69,.45,1.05],["c",.63,1.83,.45,3.57,-.57,5.22],["l",-.18,.3],["l",.15,.27],["c",.42,.87,.6,1.71,.57,2.61],["c",-.06,1.29,-.48,2.46,-1.35,3.78],["c",-.54,.81,-.93,1.29,-2.46,3],["c",-.51,.54,-1.05,1.17,-1.26,1.41],["c",-1.56,1.86,-2.25,3.36,-2.37,5.01],["l",0,.33],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,1.35],["l",.03,1.35],["l",.78,-.39],["c",1.38,-.69,2.34,-1.26,3.24,-1.92],["c",1.38,-1.02,2.28,-2.13,2.64,-3.21],["c",.15,-.48,.18,-.72,.18,-1.29],["c",0,-.57,-.06,-.9,-.24,-1.47],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.2],["c",-.09,-.18,-.12,-.21,-.12,-.15],["c",-.03,.09,-1.02,1.08,-2.04,2.04],["c",-1.17,1.08,-1.65,1.56,-2.07,2.04],["c",-.84,.96,-1.38,1.86,-1.68,2.76],["c",-.21,.57,-.27,.99,-.3,1.65],["l",0,.54],["l",.66,-.33],["c",3.57,-1.86,5.49,-3.69,5.94,-5.7],["c",.06,-.39,.06,-1.2,-.03,-1.65],["c",-.06,-.39,-.24,-.9,-.36,-1.2],["z"],["m",-.06,7.2],["c",-.06,-.15,-.12,-.33,-.15,-.45],["l",-.06,-.18],["l",-.18,.21],["l",-1.83,1.83],["c",-.87,.9,-1.77,1.8,-1.95,2.01],["c",-1.08,1.29,-1.62,2.31,-1.89,3.51],["c",-.06,.3,-.06,.51,-.09,.93],["l",0,.57],["l",.09,-.06],["c",.75,-.45,1.89,-1.26,2.52,-1.74],["c",.81,-.66,1.74,-1.53,2.22,-2.16],["c",1.26,-1.53,1.68,-3.06,1.32,-4.47],["z"]],w:8.385,h:29.191},"flags.d64th":{d:[["M",7.08,-32.88],["c",.3,-.12,.66,-.03,.78,.24],["c",.18,.33,.27,2.1,.15,2.64],["c",-.09,.39,-.21,.78,-.39,1.08],["l",-.15,.3],["l",.09,.27],["c",.03,.12,.09,.45,.12,.69],["c",.27,1.44,.18,2.55,-.3,3.6],["l",-.12,.33],["l",.06,.42],["c",.27,1.35,.33,2.82,.21,3.63],["c",-.12,.6,-.3,1.23,-.57,1.8],["l",-.15,.27],["l",.03,.42],["c",.06,1.02,.06,2.7,.03,3.06],["c",-.15,1.47,-.66,2.76,-1.74,4.41],["c",-.45,.69,-.75,1.11,-1.74,2.37],["c",-1.05,1.38,-1.5,1.98,-1.95,2.73],["c",-.93,1.5,-1.38,2.82,-1.44,4.2],["l",0,.42],["l",-.21,0],["l",-.21,0],["l",0,-15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,1.86],["l",0,1.89],["c",0,0,.21,-.03,.45,-.09],["c",2.22,-.39,4.08,-1.11,5.19,-2.01],["c",.63,-.54,1.02,-1.14,1.2,-1.8],["c",.06,-.3,.06,-1.14,-.03,-1.65],["c",-.03,-.18,-.06,-.39,-.09,-.48],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.45,6.15],["c",-.03,-.18,-.06,-.42,-.06,-.54],["l",-.03,-.18],["l",-.33,.3],["c",-.42,.36,-.87,.72,-1.68,1.29],["c",-1.98,1.38,-2.25,1.59,-2.85,2.16],["c",-.75,.69,-1.23,1.44,-1.47,2.19],["c",-.15,.45,-.18,.63,-.21,1.35],["l",0,.66],["l",.39,-.18],["c",1.83,-.9,3.45,-1.95,4.47,-2.91],["c",.93,-.9,1.53,-1.83,1.74,-2.82],["c",.06,-.33,.06,-.87,.03,-1.32],["z"],["m",-.27,4.86],["c",-.03,-.21,-.06,-.36,-.06,-.36],["c",0,-.03,-.12,.09,-.24,.24],["c",-.39,.48,-.99,1.08,-2.16,2.19],["c",-1.47,1.38,-1.92,1.83,-2.46,2.49],["c",-.66,.87,-1.08,1.74,-1.29,2.58],["c",-.09,.42,-.15,.87,-.15,1.44],["l",0,.54],["l",.48,-.33],["c",1.5,-1.02,2.58,-1.89,3.51,-2.82],["c",1.47,-1.47,2.25,-2.85,2.4,-4.26],["c",.03,-.39,.03,-1.17,-.03,-1.71],["z"],["m",-.66,7.68],["c",.03,-.15,.03,-.6,.03,-.99],["l",0,-.72],["l",-.27,.33],["l",-1.74,1.98],["c",-1.77,1.92,-2.43,2.76,-2.97,3.9],["c",-.51,1.02,-.72,1.77,-.75,2.91],["c",0,.63,0,.63,.06,.6],["c",.03,-.03,.3,-.27,.63,-.54],["c",.66,-.6,1.86,-1.8,2.31,-2.31],["c",1.65,-1.89,2.52,-3.54,2.7,-5.16],["z"]],w:8.485,h:32.932},"clefs.C":{d:[["M",.06,-14.94],["l",.09,-.06],["l",1.92,0],["l",1.92,0],["l",.09,.06],["l",.06,.09],["l",0,14.85],["l",0,14.82],["l",-.06,.09],["l",-.09,.06],["l",-1.92,0],["l",-1.92,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"],["m",5.37,0],["c",.09,-.06,.09,-.06,.57,-.06],["c",.45,0,.45,0,.54,.06],["l",.06,.09],["l",0,7.14],["l",0,7.11],["l",.09,-.06],["c",.18,-.18,.72,-.84,.96,-1.2],["c",.3,-.45,.66,-1.17,.84,-1.65],["c",.36,-.9,.57,-1.83,.6,-2.79],["c",.03,-.48,.03,-.54,.09,-.63],["c",.12,-.18,.36,-.21,.54,-.12],["c",.18,.09,.21,.15,.24,.66],["c",.06,.87,.21,1.56,.57,2.22],["c",.51,1.02,1.26,1.68,2.22,1.92],["c",.21,.06,.33,.06,.78,.06],["c",.45,0,.57,0,.84,-.06],["c",.45,-.12,.81,-.33,1.08,-.6],["c",.57,-.57,.87,-1.41,.99,-2.88],["c",.06,-.54,.06,-3,0,-3.57],["c",-.21,-2.58,-.84,-3.87,-2.16,-4.5],["c",-.48,-.21,-1.17,-.36,-1.77,-.36],["c",-.69,0,-1.29,.27,-1.5,.72],["c",-.06,.15,-.06,.21,-.06,.42],["c",0,.24,0,.3,.06,.45],["c",.12,.24,.24,.39,.63,.66],["c",.42,.3,.57,.48,.69,.72],["c",.06,.15,.06,.21,.06,.48],["c",0,.39,-.03,.63,-.21,.96],["c",-.3,.6,-.87,1.08,-1.5,1.26],["c",-.27,.06,-.87,.06,-1.14,0],["c",-.78,-.24,-1.44,-.87,-1.65,-1.68],["c",-.12,-.42,-.09,-1.17,.09,-1.71],["c",.51,-1.65,1.98,-2.82,3.81,-3.09],["c",.84,-.09,2.46,.03,3.51,.27],["c",2.22,.57,3.69,1.8,4.44,3.75],["c",.36,.93,.57,2.13,.57,3.36],["c",0,1.44,-.48,2.73,-1.38,3.81],["c",-1.26,1.5,-3.27,2.43,-5.28,2.43],["c",-.48,0,-.51,0,-.75,-.09],["c",-.15,-.03,-.48,-.21,-.78,-.36],["c",-.69,-.36,-.87,-.42,-1.26,-.42],["c",-.27,0,-.3,0,-.51,.09],["c",-.57,.3,-.81,.9,-.81,2.1],["c",0,1.23,.24,1.83,.81,2.13],["c",.21,.09,.24,.09,.51,.09],["c",.39,0,.57,-.06,1.26,-.42],["c",.3,-.15,.63,-.33,.78,-.36],["c",.24,-.09,.27,-.09,.75,-.09],["c",2.01,0,4.02,.93,5.28,2.4],["c",.9,1.11,1.38,2.4,1.38,3.84],["c",0,1.5,-.3,2.88,-.84,3.96],["c",-.78,1.59,-2.19,2.64,-4.17,3.15],["c",-1.05,.24,-2.67,.36,-3.51,.27],["c",-1.83,-.27,-3.3,-1.44,-3.81,-3.09],["c",-.18,-.54,-.21,-1.29,-.09,-1.74],["c",.15,-.6,.63,-1.2,1.23,-1.47],["c",.36,-.18,.57,-.21,.99,-.21],["c",.42,0,.63,.03,1.02,.21],["c",.42,.21,.84,.63,1.05,1.05],["c",.18,.36,.21,.6,.21,.96],["c",0,.3,0,.36,-.06,.51],["c",-.12,.24,-.27,.42,-.69,.72],["c",-.57,.42,-.69,.63,-.69,1.08],["c",0,.24,0,.3,.06,.45],["c",.12,.21,.3,.39,.57,.54],["c",.42,.18,.87,.21,1.53,.15],["c",1.08,-.15,1.8,-.57,2.34,-1.32],["c",.54,-.75,.84,-1.83,.99,-3.51],["c",.06,-.57,.06,-3.03,0,-3.57],["c",-.12,-1.47,-.42,-2.31,-.99,-2.88],["c",-.27,-.27,-.63,-.48,-1.08,-.6],["c",-.27,-.06,-.39,-.06,-.84,-.06],["c",-.45,0,-.57,0,-.78,.06],["c",-1.14,.27,-2.01,1.17,-2.46,2.49],["c",-.21,.57,-.3,.99,-.33,1.65],["c",-.03,.51,-.06,.57,-.24,.66],["c",-.12,.06,-.27,.06,-.39,0],["c",-.21,-.09,-.21,-.15,-.24,-.75],["c",-.09,-1.92,-.78,-3.72,-2.01,-5.19],["c",-.18,-.21,-.36,-.42,-.39,-.45],["l",-.09,-.06],["l",0,7.11],["l",0,7.14],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.54,.06],["c",-.48,0,-.48,0,-.57,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"]],w:20.31,h:29.97},"clefs.F":{d:[["M",6.3,-7.8],["c",.36,-.03,1.65,0,2.13,.03],["c",3.6,.42,6.03,2.1,6.93,4.86],["c",.27,.84,.36,1.5,.36,2.58],["c",0,.9,-.03,1.35,-.18,2.16],["c",-.78,3.78,-3.54,7.08,-8.37,9.96],["c",-1.74,1.05,-3.87,2.13,-6.18,3.12],["c",-.39,.18,-.75,.33,-.81,.36],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.15,.06,-.21,.51,-.48],["c",3,-1.77,5.13,-3.21,6.84,-4.74],["c",.51,-.45,1.59,-1.5,1.95,-1.95],["c",1.89,-2.19,2.88,-4.32,3.15,-6.78],["c",.06,-.42,.06,-1.77,0,-2.19],["c",-.24,-2.01,-.93,-3.63,-2.04,-4.71],["c",-.63,-.63,-1.29,-1.02,-2.07,-1.2],["c",-1.62,-.39,-3.36,.15,-4.56,1.44],["c",-.54,.6,-1.05,1.47,-1.32,2.22],["l",-.09,.21],["l",.24,-.12],["c",.39,-.21,.63,-.24,1.11,-.24],["c",.3,0,.45,0,.66,.06],["c",1.92,.48,2.85,2.55,1.95,4.38],["c",-.45,.99,-1.41,1.62,-2.46,1.71],["c",-1.47,.09,-2.91,-.87,-3.39,-2.25],["c",-.18,-.57,-.21,-1.32,-.03,-2.28],["c",.39,-2.25,1.83,-4.2,3.81,-5.19],["c",.69,-.36,1.59,-.6,2.37,-.69],["z"],["m",11.58,2.52],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.3,1.17,-.72,2.19,-1.89,1.89],["c",-.99,-.21,-1.5,-1.32,-1.02,-2.25],["c",.18,-.39,.6,-.69,1.02,-.78],["z"],["m",0,7.5],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.21,.87,-.3,1.71,-1.14,1.89],["c",-.87,.21,-1.71,-.3,-1.89,-1.14],["c",-.21,-.84,.3,-1.71,1.14,-1.89],["z"]],w:20.153,h:23.142},"clefs.G":{d:[["M",9.69,-37.41],["c",.09,-.09,.24,-.06,.36,0],["c",.12,.09,.57,.6,.96,1.11],["c",1.77,2.34,3.21,5.85,3.57,8.73],["c",.21,1.56,.03,3.27,-.45,4.86],["c",-.69,2.31,-1.92,4.47,-4.23,7.44],["c",-.3,.39,-.57,.72,-.6,.75],["c",-.03,.06,0,.15,.18,.78],["c",.54,1.68,1.38,4.44,1.68,5.49],["l",.09,.42],["l",.39,0],["c",1.47,.09,2.76,.51,3.96,1.29],["c",1.83,1.23,3.06,3.21,3.39,5.52],["c",.09,.45,.12,1.29,.06,1.74],["c",-.09,1.02,-.33,1.83,-.75,2.73],["c",-.84,1.71,-2.28,3.06,-4.02,3.72],["l",-.33,.12],["l",.03,1.26],["c",0,1.74,-.06,3.63,-.21,4.62],["c",-.45,3.06,-2.19,5.49,-4.47,6.21],["c",-.57,.18,-.9,.21,-1.59,.21],["c",-.69,0,-1.02,-.03,-1.65,-.21],["c",-1.14,-.27,-2.13,-.84,-2.94,-1.65],["c",-.99,-.99,-1.56,-2.16,-1.71,-3.54],["c",-.09,-.81,.06,-1.53,.45,-2.13],["c",.63,-.99,1.83,-1.56,3,-1.53],["c",1.5,.09,2.64,1.32,2.73,2.94],["c",.06,1.47,-.93,2.7,-2.37,2.97],["c",-.45,.06,-.84,.03,-1.29,-.09],["l",-.21,-.09],["l",.09,.12],["c",.39,.54,.78,.93,1.32,1.26],["c",1.35,.87,3.06,1.02,4.35,.36],["c",1.44,-.72,2.52,-2.28,2.97,-4.35],["c",.15,-.66,.24,-1.5,.3,-3.03],["c",.03,-.84,.03,-2.94,0,-3],["c",-.03,0,-.18,0,-.36,.03],["c",-.66,.12,-.99,.12,-1.83,.12],["c",-1.05,0,-1.71,-.06,-2.61,-.3],["c",-4.02,-.99,-7.11,-4.35,-7.8,-8.46],["c",-.12,-.66,-.12,-.99,-.12,-1.83],["c",0,-.84,0,-1.14,.15,-1.92],["c",.36,-2.28,1.41,-4.62,3.3,-7.29],["l",2.79,-3.6],["c",.54,-.66,.96,-1.2,.96,-1.23],["c",0,-.03,-.09,-.33,-.18,-.69],["c",-.96,-3.21,-1.41,-5.28,-1.59,-7.68],["c",-.12,-1.38,-.15,-3.09,-.06,-3.96],["c",.33,-2.67,1.38,-5.07,3.12,-7.08],["c",.36,-.42,.99,-1.05,1.17,-1.14],["z"],["m",2.01,4.71],["c",-.15,-.3,-.3,-.54,-.3,-.54],["c",-.03,0,-.18,.09,-.3,.21],["c",-2.4,1.74,-3.87,4.2,-4.26,7.11],["c",-.06,.54,-.06,1.41,-.03,1.89],["c",.09,1.29,.48,3.12,1.08,5.22],["c",.15,.42,.24,.78,.24,.81],["c",0,.03,.84,-1.11,1.23,-1.68],["c",1.89,-2.73,2.88,-5.07,3.15,-7.53],["c",.09,-.57,.12,-1.74,.06,-2.37],["c",-.09,-1.23,-.27,-1.92,-.87,-3.12],["z"],["m",-2.94,20.7],["c",-.21,-.72,-.39,-1.32,-.42,-1.32],["c",0,0,-1.2,1.47,-1.86,2.37],["c",-2.79,3.63,-4.02,6.3,-4.35,9.3],["c",-.03,.21,-.03,.69,-.03,1.08],["c",0,.69,0,.75,.06,1.11],["c",.12,.54,.27,.99,.51,1.47],["c",.69,1.38,1.83,2.55,3.42,3.42],["c",.96,.54,2.07,.9,3.21,1.08],["c",.78,.12,2.04,.12,2.94,-.03],["c",.51,-.06,.45,-.03,.42,-.3],["c",-.24,-3.33,-.72,-6.33,-1.62,-10.08],["c",-.09,-.39,-.18,-.75,-.18,-.78],["c",-.03,-.03,-.42,0,-.81,.09],["c",-.9,.18,-1.65,.57,-2.22,1.14],["c",-.72,.72,-1.08,1.65,-1.05,2.64],["c",.06,.96,.48,1.83,1.23,2.58],["c",.36,.36,.72,.63,1.17,.9],["c",.33,.18,.36,.21,.42,.33],["c",.18,.42,-.18,.9,-.6,.87],["c",-.18,-.03,-.84,-.36,-1.26,-.63],["c",-.78,-.51,-1.38,-1.11,-1.86,-1.83],["c",-1.77,-2.7,-.99,-6.42,1.71,-8.19],["c",.3,-.21,.81,-.48,1.17,-.63],["c",.3,-.09,1.02,-.3,1.14,-.3],["c",.06,0,.09,0,.09,-.03],["c",.03,-.03,-.51,-1.92,-1.23,-4.26],["z"],["m",3.78,7.41],["c",-.18,-.03,-.36,-.06,-.39,-.06],["c",-.03,0,0,.21,.18,1.02],["c",.75,3.18,1.26,6.3,1.5,9.09],["c",.06,.72,0,.69,.51,.42],["c",.78,-.36,1.44,-.96,1.98,-1.77],["c",1.08,-1.62,1.2,-3.69,.3,-5.55],["c",-.81,-1.62,-2.31,-2.79,-4.08,-3.15],["z"]],w:19.051,h:57.057},"clefs.perc":{d:[["M",5.07,-7.44],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"],["m",6.63,0],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"]],w:21,h:14.97},"timesig.common":{d:[["M",6.66,-7.83],["c",.72,-.06,1.41,-.03,1.98,.09],["c",1.2,.27,2.34,.96,3.09,1.92],["c",.63,.81,1.08,1.86,1.14,2.73],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,0,-.09,-.12,-.24,-.27],["c",-1.02,-1.11,-2.55,-1.68,-4.08,-1.5],["c",-1.29,.15,-2.04,.69,-2.4,1.74],["c",-.36,.93,-.42,1.89,-.42,5.37],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.63,1.68,1.41,2.07],["c",.81,.39,2.16,.45,3.18,.09],["c",1.29,-.45,2.37,-1.53,3.03,-2.97],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.06,.39,-.42,1.38,-.69,1.89],["c",-.96,1.8,-2.49,2.94,-4.23,3.18],["c",-.99,.12,-2.58,-.06,-3.63,-.45],["c",-.96,-.36,-1.71,-.84,-2.4,-1.5],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.9,-3.45,2.01,-4.56],["c",.69,-.66,1.44,-1.11,2.37,-1.47],["c",.63,-.24,1.47,-.42,2.22,-.48],["z"]],w:13.038,h:15.689},"timesig.cut":{d:[["M",6.24,-10.44],["c",.09,-.06,.09,-.06,.48,-.06],["c",.36,0,.36,0,.45,.06],["l",.06,.09],["l",0,1.23],["l",0,1.26],["l",.27,0],["c",1.26,0,2.49,.45,3.48,1.29],["c",1.05,.87,1.8,2.28,1.89,3.48],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,-.03,-.45,-.51,-.66,-.69],["c",-.87,-.69,-1.83,-1.05,-2.94,-1.11],["l",-.42,0],["l",0,7.17],["l",0,7.14],["l",.42,0],["c",.69,-.03,1.23,-.18,1.86,-.51],["c",1.05,-.51,1.89,-1.47,2.46,-2.7],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.03,.24,-.21,.78,-.39,1.2],["c",-.96,2.37,-2.94,3.9,-5.13,3.9],["l",-.3,0],["l",0,1.26],["l",0,1.23],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.45,.06],["c",-.39,0,-.39,0,-.48,-.06],["l",-.06,-.09],["l",0,-1.29],["l",0,-1.29],["l",-.21,-.03],["c",-1.23,-.21,-2.31,-.63,-3.21,-1.29],["c",-.15,-.09,-.45,-.36,-.66,-.57],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.93,-3.45,2.04,-4.59],["c",.42,-.39,.78,-.66,1.26,-.93],["c",.75,-.45,1.65,-.75,2.61,-.9],["l",.21,-.03],["l",0,-1.29],["l",0,-1.29],["z"],["m",-.06,10.44],["c",0,-5.58,0,-6.99,-.03,-6.99],["c",-.15,0,-.63,.27,-.87,.45],["c",-.45,.36,-.75,.93,-.93,1.77],["c",-.18,.81,-.24,1.8,-.24,4.74],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.66,1.68,1.41,2.07],["c",.12,.06,.3,.12,.33,.15],["l",.09,0],["l",0,-6.96],["z"]],w:13.038,h:20.97},"timesig.imperfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.imperfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},f:{d:[["M",9.93,-14.28],["c",1.53,-.18,2.88,.45,3.12,1.5],["c",.12,.51,0,1.32,-.27,1.86],["c",-.15,.3,-.42,.57,-.63,.69],["c",-.69,.36,-1.56,.03,-1.83,-.69],["c",-.09,-.24,-.09,-.69,0,-.87],["c",.06,-.12,.21,-.24,.45,-.42],["c",.42,-.24,.57,-.45,.6,-.72],["c",.03,-.33,-.09,-.39,-.63,-.42],["c",-.3,0,-.45,0,-.6,.03],["c",-.81,.21,-1.35,.93,-1.74,2.46],["c",-.06,.27,-.48,2.25,-.48,2.31],["c",0,.03,.39,.03,.9,.03],["c",.72,0,.9,0,.99,.06],["c",.42,.15,.45,.72,.03,.9],["c",-.12,.06,-.24,.06,-1.17,.06],["l",-1.05,0],["l",-.78,2.55],["c",-.45,1.41,-.87,2.79,-.96,3.06],["c",-.87,2.37,-2.37,4.74,-3.78,5.91],["c",-1.05,.9,-2.04,1.23,-3.09,1.08],["c",-1.11,-.18,-1.89,-.78,-2.04,-1.59],["c",-.12,-.66,.15,-1.71,.54,-2.19],["c",.69,-.75,1.86,-.54,2.22,.39],["c",.06,.15,.09,.27,.09,.48],["c",0,.24,-.03,.27,-.12,.42],["c",-.03,.09,-.15,.18,-.27,.27],["c",-.09,.06,-.27,.21,-.36,.27],["c",-.24,.18,-.36,.36,-.39,.6],["c",-.03,.33,.09,.39,.63,.42],["c",.42,0,.63,-.03,.9,-.15],["c",.6,-.3,.96,-.96,1.38,-2.64],["c",.09,-.42,.63,-2.55,1.17,-4.77],["l",1.02,-4.08],["c",0,-.03,-.36,-.03,-.81,-.03],["c",-.72,0,-.81,0,-.93,-.06],["c",-.42,-.18,-.39,-.75,.03,-.9],["c",.09,-.06,.27,-.06,1.05,-.06],["l",.96,0],["l",0,-.09],["c",.06,-.18,.3,-.72,.51,-1.17],["c",1.2,-2.46,3.3,-4.23,5.34,-4.5],["z"]],w:16.155,h:19.445},m:{d:[["M",2.79,-8.91],["c",.09,0,.3,-.03,.45,-.03],["c",.24,.03,.3,.03,.45,.12],["c",.36,.15,.63,.54,.75,1.02],["l",.03,.21],["l",.33,-.3],["c",.69,-.69,1.38,-1.02,2.07,-1.02],["c",.27,0,.33,0,.48,.06],["c",.21,.09,.48,.36,.63,.6],["c",.03,.09,.12,.27,.18,.42],["c",.03,.15,.09,.27,.12,.27],["c",0,0,.09,-.09,.18,-.21],["c",.33,-.39,.87,-.81,1.29,-.99],["c",.78,-.33,1.47,-.21,2.01,.33],["c",.3,.33,.48,.69,.6,1.14],["c",.09,.42,.06,.54,-.54,3.06],["c",-.33,1.29,-.57,2.4,-.57,2.43],["c",0,.12,.09,.21,.21,.21],["c",.24,0,.75,-.3,1.2,-.72],["c",.45,-.39,.6,-.45,.78,-.27],["c",.18,.18,.09,.36,-.45,.87],["c",-1.05,.96,-1.83,1.47,-2.58,1.71],["c",-.93,.33,-1.53,.21,-1.8,-.33],["c",-.06,-.15,-.06,-.21,-.06,-.45],["c",0,-.24,.03,-.48,.6,-2.82],["c",.42,-1.71,.6,-2.64,.63,-2.79],["c",.03,-.57,-.3,-.75,-.84,-.48],["c",-.24,.12,-.54,.39,-.66,.63],["c",-.03,.09,-.42,1.38,-.9,3],["c",-.9,3.15,-.84,3,-1.14,3.15],["l",-.15,.09],["l",-.78,0],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.36,-1.38,.84,-2.97],["c",.57,-2.04,.81,-2.97,.84,-3.12],["c",.03,-.54,-.3,-.72,-.84,-.45],["c",-.24,.12,-.57,.42,-.66,.63],["c",-.06,.09,-.51,1.44,-1.05,2.97],["c",-.51,1.56,-.99,2.85,-.99,2.91],["c",-.06,.12,-.21,.24,-.36,.3],["c",-.12,.06,-.21,.06,-.9,.06],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.45,-1.38,.99,-2.97],["c",1.05,-3.18,1.05,-3.18,.93,-3.45],["c",-.12,-.27,-.39,-.3,-.72,-.15],["c",-.54,.27,-1.14,1.17,-1.56,2.4],["c",-.06,.15,-.15,.3,-.18,.36],["c",-.21,.21,-.57,.27,-.72,.09],["c",-.09,-.09,-.06,-.21,.06,-.63],["c",.48,-1.26,1.26,-2.46,2.01,-3.21],["c",.57,-.54,1.2,-.87,1.83,-1.02],["z"]],w:14.687,h:9.126},p:{d:[["M",1.92,-8.7],["c",.27,-.09,.81,-.06,1.11,.03],["c",.54,.18,.93,.51,1.17,.99],["c",.09,.15,.15,.33,.18,.36],["l",0,.12],["l",.3,-.27],["c",.66,-.6,1.35,-1.02,2.13,-1.2],["c",.21,-.06,.33,-.06,.78,-.06],["c",.45,0,.51,0,.84,.09],["c",1.29,.33,2.07,1.32,2.25,2.79],["c",.09,.81,-.09,2.01,-.45,2.79],["c",-.54,1.26,-1.86,2.55,-3.18,3.03],["c",-.45,.18,-.81,.24,-1.29,.24],["c",-.69,-.03,-1.35,-.18,-1.86,-.45],["c",-.3,-.15,-.51,-.18,-.69,-.09],["c",-.09,.03,-.18,.09,-.18,.12],["c",-.09,.12,-1.05,2.94,-1.05,3.06],["c",0,.24,.18,.48,.51,.63],["c",.18,.06,.54,.15,.75,.15],["c",.21,0,.36,.06,.42,.18],["c",.12,.18,.06,.42,-.12,.54],["c",-.09,.03,-.15,.03,-.78,0],["c",-1.98,-.15,-3.81,-.15,-5.79,0],["c",-.63,.03,-.69,.03,-.78,0],["c",-.24,-.15,-.24,-.57,.03,-.66],["c",.06,-.03,.48,-.09,.99,-.12],["c",.87,-.06,1.11,-.09,1.35,-.21],["c",.18,-.06,.33,-.18,.39,-.3],["c",.06,-.12,3.24,-9.42,3.27,-9.6],["c",.06,-.33,.03,-.57,-.15,-.69],["c",-.09,-.06,-.12,-.06,-.3,-.06],["c",-.69,.06,-1.53,1.02,-2.28,2.61],["c",-.09,.21,-.21,.45,-.27,.51],["c",-.09,.12,-.33,.24,-.48,.24],["c",-.18,0,-.36,-.15,-.36,-.3],["c",0,-.24,.78,-1.83,1.26,-2.55],["c",.72,-1.11,1.47,-1.74,2.28,-1.92],["z"],["m",5.37,1.47],["c",-.27,-.12,-.75,-.03,-1.14,.21],["c",-.75,.48,-1.47,1.68,-1.89,3.15],["c",-.45,1.47,-.42,2.34,0,2.7],["c",.45,.39,1.26,.21,1.83,-.36],["c",.51,-.51,.99,-1.68,1.38,-3.27],["c",.3,-1.17,.33,-1.74,.15,-2.13],["c",-.09,-.15,-.15,-.21,-.33,-.3],["z"]],w:14.689,h:13.127},r:{d:[["M",6.33,-9.12],["c",.27,-.03,.93,0,1.2,.06],["c",.84,.21,1.23,.81,1.02,1.53],["c",-.24,.75,-.9,1.17,-1.56,.96],["c",-.33,-.09,-.51,-.3,-.66,-.75],["c",-.03,-.12,-.09,-.24,-.12,-.3],["c",-.09,-.15,-.3,-.24,-.48,-.24],["c",-.57,0,-1.38,.54,-1.65,1.08],["c",-.06,.15,-.33,1.17,-.9,3.27],["c",-.57,2.31,-.81,3.12,-.87,3.21],["c",-.03,.06,-.12,.15,-.18,.21],["l",-.12,.06],["l",-.81,.03],["c",-.69,0,-.81,0,-.9,-.03],["c",-.09,-.06,-.18,-.21,-.18,-.3],["c",0,-.06,.39,-1.62,.9,-3.51],["c",.84,-3.24,.87,-3.45,.87,-3.72],["c",0,-.21,0,-.27,-.03,-.36],["c",-.12,-.15,-.21,-.24,-.42,-.24],["c",-.24,0,-.45,.15,-.78,.42],["c",-.33,.36,-.45,.54,-.72,1.14],["c",-.03,.12,-.21,.24,-.36,.27],["c",-.12,0,-.15,0,-.24,-.06],["c",-.18,-.12,-.18,-.21,-.06,-.54],["c",.21,-.57,.42,-.93,.78,-1.32],["c",.54,-.51,1.2,-.81,1.95,-.87],["c",.81,-.03,1.53,.3,1.92,.87],["l",.12,.18],["l",.09,-.09],["c",.57,-.45,1.41,-.84,2.19,-.96],["z"]],w:9.41,h:9.132},s:{d:[["M",4.47,-8.73],["c",.09,0,.36,-.03,.57,-.03],["c",.75,.03,1.29,.24,1.71,.63],["c",.51,.54,.66,1.26,.36,1.83],["c",-.24,.42,-.63,.57,-1.11,.42],["c",-.33,-.09,-.6,-.36,-.6,-.57],["c",0,-.03,.06,-.21,.15,-.39],["c",.12,-.21,.15,-.33,.18,-.48],["c",0,-.24,-.06,-.48,-.15,-.6],["c",-.15,-.21,-.42,-.24,-.75,-.15],["c",-.27,.06,-.48,.18,-.69,.36],["c",-.39,.39,-.51,.96,-.33,1.38],["c",.09,.21,.42,.51,.78,.72],["c",1.11,.69,1.59,1.11,1.89,1.68],["c",.21,.39,.24,.78,.15,1.29],["c",-.18,1.2,-1.17,2.16,-2.52,2.52],["c",-1.02,.24,-1.95,.12,-2.7,-.42],["c",-.72,-.51,-.99,-1.47,-.6,-2.19],["c",.24,-.48,.72,-.63,1.17,-.42],["c",.33,.18,.54,.45,.57,.81],["c",0,.21,-.03,.3,-.33,.51],["c",-.33,.24,-.39,.42,-.27,.69],["c",.06,.15,.21,.27,.45,.33],["c",.3,.09,.87,.09,1.2,0],["c",.75,-.21,1.23,-.72,1.29,-1.35],["c",.03,-.42,-.15,-.81,-.54,-1.2],["c",-.24,-.24,-.48,-.42,-1.41,-1.02],["c",-.69,-.42,-1.05,-.93,-1.05,-1.47],["c",0,-.39,.12,-.87,.3,-1.23],["c",.27,-.57,.78,-1.05,1.38,-1.35],["c",.24,-.12,.63,-.27,.9,-.3],["z"]],w:6.632,h:8.758},z:{d:[["M",2.64,-7.95],["c",.36,-.09,.81,-.03,1.71,.27],["c",.78,.21,.96,.27,1.74,.3],["c",.87,.06,1.02,.03,1.38,-.21],["c",.21,-.15,.33,-.15,.48,-.06],["c",.15,.09,.21,.3,.15,.45],["c",-.03,.06,-1.26,1.26,-2.76,2.67],["l",-2.73,2.55],["l",.54,.03],["c",.54,.03,.72,.03,2.01,.15],["c",.36,.03,.9,.06,1.2,.09],["c",.66,0,.81,-.03,1.02,-.24],["c",.3,-.3,.39,-.72,.27,-1.23],["c",-.06,-.27,-.06,-.27,-.03,-.39],["c",.15,-.3,.54,-.27,.69,.03],["c",.15,.33,.27,1.02,.27,1.5],["c",0,1.47,-1.11,2.7,-2.52,2.79],["c",-.57,.03,-1.02,-.09,-2.01,-.51],["c",-1.02,-.42,-1.23,-.48,-2.13,-.54],["c",-.81,-.06,-.96,-.03,-1.26,.18],["c",-.12,.06,-.24,.12,-.27,.12],["c",-.27,0,-.45,-.3,-.36,-.51],["c",.03,-.06,1.32,-1.32,2.91,-2.79],["l",2.88,-2.73],["c",-.03,0,-.21,.03,-.42,.06],["c",-.21,.03,-.78,.09,-1.23,.12],["c",-1.11,.12,-1.23,.15,-1.95,.27],["c",-.72,.15,-1.17,.18,-1.29,.09],["c",-.27,-.18,-.21,-.75,.12,-1.26],["c",.39,-.6,.93,-1.02,1.59,-1.2],["z"]],w:8.573,h:8.743},"+":{d:[["M",3.48,-9.3],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.29],["l",0,1.29],["l",1.29,0],["c",1.23,0,1.29,0,1.41,.06],["c",.06,.03,.15,.09,.18,.12],["c",.12,.09,.21,.33,.21,.48],["c",0,.15,-.09,.39,-.21,.48],["c",-.03,.03,-.12,.09,-.18,.12],["c",-.12,.06,-.18,.06,-1.41,.06],["l",-1.29,0],["l",0,1.29],["c",0,1.23,0,1.29,-.06,1.41],["c",-.09,.18,-.15,.24,-.3,.33],["c",-.21,.09,-.39,.09,-.57,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.41],["l",0,-1.29],["l",-1.29,0],["c",-1.23,0,-1.29,0,-1.41,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.26,0],["l",1.29,0],["l",0,-1.29],["c",0,-1.23,0,-1.29,.06,-1.41],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:7.507,h:7.515},",":{d:[["M",1.32,-3.36],["c",.57,-.15,1.17,.03,1.59,.45],["c",.45,.45,.6,.96,.51,1.89],["c",-.09,1.23,-.42,2.46,-.99,3.93],["c",-.3,.72,-.72,1.62,-.78,1.68],["c",-.18,.21,-.51,.18,-.66,-.06],["c",-.03,-.06,-.06,-.15,-.06,-.18],["c",0,-.06,.12,-.33,.24,-.63],["c",.84,-1.8,1.02,-2.61,.69,-3.24],["c",-.12,-.24,-.27,-.36,-.75,-.6],["c",-.36,-.15,-.42,-.21,-.6,-.39],["c",-.69,-.69,-.69,-1.71,0,-2.4],["c",.21,-.21,.51,-.39,.81,-.45],["z"]],w:3.452,h:8.143},"-":{d:[["M",.18,-5.34],["c",.09,-.06,.15,-.06,2.31,-.06],["c",2.46,0,2.37,0,2.46,.21],["c",.12,.21,.03,.42,-.15,.54],["c",-.09,.06,-.15,.06,-2.28,.06],["c",-2.16,0,-2.22,0,-2.31,-.06],["c",-.27,-.15,-.27,-.54,-.03,-.69],["z"]],w:5.001,h:.81},".":{d:[["M",1.32,-3.36],["c",1.05,-.27,2.1,.57,2.1,1.65],["c",0,1.08,-1.05,1.92,-2.1,1.65],["c",-.9,-.21,-1.5,-1.14,-1.26,-2.04],["c",.12,-.63,.63,-1.11,1.26,-1.26],["z"]],w:3.413,h:3.402},"scripts.wedge":{d:[["M",-3.66,-7.44],["c",.06,-.09,0,-.09,.81,.03],["c",1.86,.3,3.84,.3,5.73,0],["c",.78,-.12,.72,-.12,.78,-.03],["c",.15,.15,.12,.24,-.24,.6],["c",-.93,.93,-1.98,2.76,-2.67,4.62],["c",-.3,.78,-.51,1.71,-.51,2.13],["c",0,.15,0,.18,-.06,.27],["c",-.12,.09,-.24,.09,-.36,0],["c",-.06,-.09,-.06,-.12,-.06,-.27],["c",0,-.42,-.21,-1.35,-.51,-2.13],["c",-.69,-1.86,-1.74,-3.69,-2.67,-4.62],["c",-.36,-.36,-.39,-.45,-.24,-.6],["z"]],w:7.49,h:7.752},"scripts.thumb":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.27,1.41,-1.08,2.43,-2.16,2.73],["l",-.18,.06],["l",0,.12],["c",.03,.06,.06,.45,.09,.87],["c",.03,.57,.03,.78,0,.84],["c",-.09,.27,-.39,.48,-.66,.48],["c",-.27,0,-.57,-.21,-.66,-.48],["c",-.03,-.06,-.03,-.27,0,-.84],["c",.03,-.42,.06,-.81,.09,-.87],["l",0,-.12],["l",-.18,-.06],["c",-1.08,-.3,-1.89,-1.32,-2.16,-2.73],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.05,.9],["c",-.15,-.09,-.21,-.09,-.45,-.12],["c",-.15,0,-.3,.03,-.39,.03],["c",-.57,.18,-.9,.72,-1.08,1.74],["c",-.06,.48,-.06,1.8,0,2.28],["c",.15,.9,.42,1.44,.9,1.65],["c",.18,.09,.21,.09,.51,.09],["c",.3,0,.33,0,.51,-.09],["c",.48,-.21,.75,-.75,.9,-1.65],["c",.03,-.27,.03,-.54,.03,-1.14],["c",0,-.6,0,-.87,-.03,-1.14],["c",-.15,-.9,-.45,-1.44,-.9,-1.65],["z"]],w:5.955,h:9.75},"scripts.open":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.33,1.74,-1.47,2.85,-2.91,2.85],["c",-1.44,0,-2.58,-1.11,-2.91,-2.85],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.11,.9],["c",-.21,-.09,-.27,-.09,-.51,-.12],["c",-.3,0,-.42,.03,-.66,.15],["c",-.24,.12,-.51,.39,-.66,.63],["c",-.54,.93,-.63,2.64,-.21,3.81],["c",.21,.54,.51,.9,.93,1.11],["c",.21,.09,.24,.09,.54,.09],["c",.3,0,.33,0,.54,-.09],["c",.42,-.21,.72,-.57,.93,-1.11],["c",.36,-.99,.36,-2.37,0,-3.36],["c",-.21,-.54,-.51,-.9,-.9,-1.11],["z"]],w:5.955,h:7.5},"scripts.longphrase":{d:[["M",1.47,-15.09],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.54,.06,11.25],["l",0,11.25],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-3.39,-.03,-11.25],["l",0,-11.25],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:23.04},"scripts.mediumphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.39,.06,7.5],["l",0,7.5],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-2.28,-.03,-7.5],["l",0,-7.5],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:15.54},"scripts.shortphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.21,.06,3.75],["l",0,3.75],["l",-.42,.09],["c",-.57,.18,-1.65,.45,-1.71,.45],["c",-.03,0,-.03,-.72,-.03,-3.75],["l",0,-3.75],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:8.04},"scripts.snap":{d:[["M",4.5,-3.39],["c",.36,-.03,.96,-.03,1.35,0],["c",1.56,.15,3.15,.9,4.2,2.01],["c",.24,.27,.33,.42,.33,.6],["c",0,.27,.03,.24,-2.46,2.22],["c",-1.29,1.02,-2.4,1.86,-2.49,1.92],["c",-.18,.09,-.3,.09,-.48,0],["c",-.09,-.06,-1.2,-.9,-2.49,-1.92],["c",-2.49,-1.98,-2.46,-1.95,-2.46,-2.22],["c",0,-.18,.09,-.33,.33,-.6],["c",1.05,-1.08,2.64,-1.86,4.17,-2.01],["z"],["m",1.29,1.17],["c",-1.47,-.15,-2.97,.3,-4.14,1.2],["l",-.18,.15],["l",.06,.09],["c",.15,.12,3.63,2.85,3.66,2.85],["c",.03,0,3.51,-2.73,3.66,-2.85],["l",.06,-.09],["l",-.18,-.15],["c",-.84,-.66,-1.89,-1.08,-2.94,-1.2],["z"]],w:10.38,h:6.84},"noteheads.slash.whole":{d:[["M",5,-5],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"],["m",0,-2],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",-4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"]],w:10.81,h:15.63},"noteheads.slash.quarter":{d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9},"noteheads.harmonic.quarter":{d:[["M",3.63,-4.02],["c",.09,-.06,.18,-.09,.24,-.03],["c",.03,.03,.87,.93,1.83,2.01],["c",1.5,1.65,1.8,1.98,1.8,2.04],["c",0,.06,-.3,.39,-1.8,2.04],["c",-.96,1.08,-1.8,1.98,-1.83,2.01],["c",-.06,.06,-.15,.03,-.24,-.03],["c",-.12,-.09,-3.54,-3.84,-3.6,-3.93],["c",-.03,-.03,-.03,-.09,-.03,-.15],["c",.03,-.06,3.45,-3.84,3.63,-3.96],["z"]],w:7.5,h:8.165},"noteheads.triangle.quarter":{d:[["M",0,0],["l",9,0],["l",-4.5,-9],["z"]],w:9,h:9}},a=function(e){for(var t=[],r=0,n=e.length;r<n;r++){t[r]=[];for(var i=0,a=e[r].length;i<a;i++)t[r][i]=e[r][i]}return t},s={printSymbol:function(e,t,r,n,s,o,c){if(!i[r])return null;var l=a(i[r].d);l[0][1]+=e,l[0][2]+=t;for(var h="",u=0;u<l.length;u++)h+=l[u].join(" ");return n.path({path:h,stroke:o,fill:c,class:s})},getPathForSymbol:function(e,t,r,n,s){if(n=n||1,s=s||1,!i[r])return null;var o=a(i[r].d);return 1===n&&1===s||function(e,t,r){for(var n=0,i=e.length;n<i;n++){var a,s,o=e[n];for(a=1,s=o.length;a<s;a++)o[a]*=a%2?t:r}}(o,n,s),o[0][1]+=e,o[0][2]+=t,o},getSymbolWidth:function(e){return i[e]?i[e].w:0},symbolHeightInPitches:function(e){return(i[e]?i[e].h:0)/n.STEP},getSymbolAlign:function(e){return"scripts"===e.substring(0,7)&&"scripts.roll"!==e?"center":"left"},getYCorr:function(e){switch(e){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":return-2;case"timesig.common":case"timesig.cut":return 0;case"flags.d32nd":return-1;case"flags.d64th":return-2;case"flags.u32nd":return 1;case"flags.u64th":return 3;case"rests.whole":return 1;case"rests.half":case"rests.8th":case"rests.quarter":case"rests.16th":case"rests.32nd":case"rests.64th":return-1;case"f":case"m":case"p":case"s":case"z":return-4;case"scripts.trill":case"scripts.upbow":case"scripts.downbow":return-2;case"scripts.ufermata":case"scripts.wedge":case"scripts.roll":case"scripts.shortphrase":case"scripts.longphrase":return-1;case"scripts.dfermata":return 1;default:return 0}},setSymbol:function(e,t){i[e]=t}};e.exports=s},1577:function(e){var t=function(e,t,r,n,i){switch(i=i||{},this.x=0,this.c=e,this.dx=t,this.w=r,this.pitch=n,this.scalex=i.scalex||1,this.scaley=i.scaley||1,this.type=i.type||"symbol",this.pitch2=i.pitch2,this.linewidth=i.linewidth,this.klass=i.klass,this.top=n,void 0!==this.pitch2&&this.pitch2>this.top&&(this.top=this.pitch2),this.bottom=n,void 0!==this.pitch2&&this.pitch2<this.bottom&&(this.bottom=this.pitch2),i.thickness&&(this.top+=i.thickness/2,this.bottom-=i.thickness/2),i.stemHeight&&(i.stemHeight>0?this.top+=i.stemHeight:this.bottom+=i.stemHeight),i.dim&&(this.dim=i.dim),i.position&&(this.position=i.position),this.height=i.height?i.height:4,i.top&&(this.top=i.top),i.bottom&&(this.bottom=i.bottom),i.realWidth?this.realWidth=i.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":i.position&&"below"===i.position?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":void 0===this.pitch?i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height}};t.prototype.getChordDim=function(){if("debug"===this.type)return null;if(!this.chordHeightAbove&&!this.chordHeightBelow)return null;var e=this.dim.font.size/4;1===this.c.length&&(e/=2);var t="chord"===this.type?this.realWidth/2:0,r=this.x-t-e;return{left:r,right:r+this.realWidth+e}},t.prototype.invertLane=function(e){void 0===this.lane&&(this.lane=0),this.lane=e-this.lane-1},t.prototype.putChordInLane=function(e){this.lane=e,this.chordHeightAbove?this.chordHeightAbove=1.25*this.height*this.lane:this.chordHeightBelow=1.25*this.height*this.lane},t.prototype.getLane=function(){return void 0===this.lane?0:this.lane},t.prototype.setX=function(e){this.x=e+this.dx},e.exports=t},2710:function(e,t,r){var n=r(8613),i=r(4101),a=function(e){this.paper=new i(e),this.controller=null,this.space=3*n.SPACE,this.padding={},this.reset()};a.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.initVerticalSpace()},a.prototype.newTune=function(e){this.abctune=e,this.setVerticalSpace(e.formatting),this.isPrint="print"===e.media,this.setPadding(e)},a.prototype.setPaddingOverride=function(e){this.paddingOverride={top:e.paddingtop,bottom:e.paddingbottom,right:e.paddingright,left:e.paddingleft}},a.prototype.setPadding=function(e){function t(t,r,n,i,a){void 0!==e.formatting[n]?t.padding[r]=e.formatting[n]:void 0!==t.paddingOverride[r]?t.padding[r]=t.paddingOverride[r]:t.isPrint?t.padding[r]=i:t.padding[r]=a}t(this,"top","topmargin",38,15),t(this,"bottom","botmargin",38,15),t(this,"left","leftmargin",68,15),t(this,"right","rightmargin",68,15)},a.prototype.adjustNonScaledItems=function(e){this.padding.top/=e,this.padding.bottom/=e,this.padding.left/=e,this.padding.right/=e,this.abctune.formatting.headerfont.size/=e,this.abctune.formatting.footerfont.size/=e},a.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,stemHeight:36.67,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},a.prototype.setVerticalSpace=function(e){void 0!==e.staffsep&&(this.spacing.staffSeparation=4*e.staffsep/3),void 0!==e.composerspace&&(this.spacing.composer=4*e.composerspace/3),void 0!==e.partsspace&&(this.spacing.parts=4*e.partsspace/3),void 0!==e.textspace&&(this.spacing.text=4*e.textspace/3),void 0!==e.musicspace&&(this.spacing.music=4*e.musicspace/3),void 0!==e.titlespace&&(this.spacing.title=4*e.titlespace/3),void 0!==e.sysstaffsep&&(this.spacing.systemStaffSeparation=4*e.sysstaffsep/3),void 0!==e.subtitlespace&&(this.spacing.subtitle=4*e.subtitlespace/3),void 0!==e.topspace&&(this.spacing.top=4*e.topspace/3),void 0!==e.vocalspace&&(this.spacing.vocal=4*e.vocalspace/3),void 0!==e.wordsspace&&(this.spacing.words=4*e.wordsspace/3)},a.prototype.calcY=function(e){return this.y-e*n.STEP},a.prototype.moveY=function(e,t){void 0===t&&(t=1),this.y+=e*t},e.exports=a},8613:function(e){var t={FONTEM:360,FONTSIZE:30};t.STEP=93*t.FONTSIZE/720,t.SPACE=10,t.TOPNOTE=15,t.STAVEHEIGHT=100,t.INDENT=50,e.exports=t},3208:function(e,t,r){var n=r(9989),i=function(e){this.getTextSize=e,this.voices=[],this.staffs=[],this.brace=void 0,this.bracket=void 0};i.prototype.setLimit=function(e,t){t.specialY[e]&&(t.staff.specialY[e]?t.staff.specialY[e]=Math.max(t.staff.specialY[e],t.specialY[e]):t.staff.specialY[e]=t.specialY[e])},i.prototype.addVoice=function(e,t,r){var n=this.voices.length;this.voices[n]=e,this.staffs[t]?this.staffs[t].voices.push(n):this.staffs[this.staffs.length]={top:10,bottom:2,lines:r,voices:[n],specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}},e.staff=this.staffs[t]},i.prototype.setHeight=function(){this.height=n(this)},i.prototype.setWidth=function(e){this.w=e;for(var t=0;t<this.voices.length;t++)this.voices[t].setWidth(e)},i.prototype.setStaffLimits=function(e){e.staff.top=Math.max(e.staff.top,e.top),e.staff.bottom=Math.min(e.staff.bottom,e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},e.exports=i},8664:function(e,t,r){var n=r(3255),i=r(1577),a=function(e,t,r){this.type="TempoElement",this.tempo=e,this.tempo.type="tempo",this.tuneNumber=t,this.totalHeightInPitches=6,this.tempoHeightAbove=this.totalHeightInPitches,this.pitch=void 0,this.tempo.duration&&!this.tempo.suppressBpm&&(this.note=this.createNote(r,e,t))};a.prototype.setX=function(e){this.x=e},a.prototype.createNote=function(e,t,r){var a,s,o,c=.75,l=t.duration[0],h=new n(t,l,1,"tempo",r);l<=1/32?(o="noteheads.quarter",s="flags.u32nd",a=0):l<=1/16?(o="noteheads.quarter",s="flags.u16th",a=0):l<=3/32?(o="noteheads.quarter",s="flags.u16nd",a=1):l<=1/8?(o="noteheads.quarter",s="flags.u8th",a=0):l<=3/16?(o="noteheads.quarter",s="flags.u8th",a=1):l<=1/4?(o="noteheads.quarter",a=0):l<=3/8?(o="noteheads.quarter",a=1):l<=.5?(o="noteheads.half",a=0):l<=3/4?(o="noteheads.half",a=1):l<=1?(o="noteheads.whole",a=0):l<=1.5?(o="noteheads.whole",a=1):l<=2?(o="noteheads.dbl",a=0):(o="noteheads.dbl",a=1);var u,d=e(h,o,{verticalPos:0},{dir:"up",flag:s,dot:a,scale:c}).notehead;if(h.addHead(d),"noteheads.whole"!==o&&"noteheads.dbl"!==o){var f=d.dx+d.w;u=new i(null,f,0,.25,{type:"stem",pitch2:3.75,linewidth:-.6}),h.addRight(u)}return h},e.exports=a},9891:function(e){var t=function(e){this.type="TieElem",this.anchor1=e.anchor1,this.anchor2=e.anchor2,e.isGrace&&(this.isGrace=!0),e.fixedY&&(this.fixedY=!0),e.stemDir&&(this.stemDir=e.stemDir),void 0!==e.voiceNumber&&(this.voiceNumber=e.voiceNumber),void 0!==e.style&&(this.dotted=!0),this.internalNotes=[]};t.prototype.addInternalNote=function(e){this.internalNotes.push(e)},t.prototype.setEndAnchor=function(e){this.anchor2=e},t.prototype.setStartX=function(e){this.startLimitX=e},t.prototype.setEndX=function(e){this.endLimitX=e},t.prototype.setHint=function(){this.hint=!0},t.prototype.calcTieDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e;e=this.anchor1?this.anchor1.pitch:this.anchor2?this.anchor2.pitch:14,this.anchor1&&"down"===this.anchor1.stemDir&&this.anchor2&&"down"===this.anchor2.stemDir?this.above=!0:this.anchor1&&"up"===this.anchor1.stemDir&&this.anchor2&&"up"===this.anchor2.stemDir?this.above=!1:this.anchor1&&this.anchor2?this.above=e>=6:this.anchor1?this.above="down"===this.anchor1.stemDir:this.anchor2?this.above="down"===this.anchor2.stemDir:this.above=e>=6}},t.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e=!1;this.anchor1&&"down"===this.anchor1.stemDir&&(e=!0),this.anchor2&&"down"===this.anchor2.stemDir&&(e=!0);for(var t=0;t<this.internalNotes.length;t++)"down"===this.internalNotes[t].stemDir&&(e=!0);this.above=e}},t.prototype.calcX=function(e,t){this.anchor1?(this.startX=this.anchor1.x,this.anchor1.scalex<1&&(this.startX-=3)):this.startLimitX?this.startX=this.startLimitX.x+this.startLimitX.w:this.startX=e,!this.anchor1&&this.dotted&&(this.startX-=3),this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=t},t.prototype.calcTieY=function(){this.anchor1?this.startY=this.anchor1.pitch:this.anchor2?this.startY=this.anchor2.pitch:this.startY=this.above?14:0,this.anchor2?this.endY=this.anchor2.pitch:this.anchor1?this.endY=this.anchor1.pitch:this.endY=this.above?14:0},t.prototype.calcSlurY=function(){if(this.anchor1&&this.anchor2){this.above&&"up"===this.anchor1.stemDir&&!this.fixedY?(this.startY=(this.anchor1.highestVert+this.anchor1.pitch)/2,this.startX+=this.anchor1.w/2):this.startY=this.anchor1.pitch;var e=this.anchor2.parent.beam&&this.anchor2.parent.beam.stemsUp&&this.anchor2.parent.beam.elems[0]!==this.anchor2.parent,t=(this.anchor2.highestVert+this.anchor2.pitch)/2;this.above&&"up"===this.anchor2.stemDir&&!this.fixedY&&!e&&t<this.startY?(this.endY=t,this.endX+=Math.round(this.anchor2.w/2)):this.endY=this.above&&e?this.anchor2.highestVert:this.anchor2.pitch}else this.anchor1?this.startY=this.endY=this.anchor1.pitch:this.anchor2?this.startY=this.endY=this.anchor2.pitch:(this.startY=this.above?14:0,this.endY=this.above?14:0)},t.prototype.avoidCollisionAbove=function(){if(this.above){for(var e=-50,t=0;t<this.internalNotes.length;t++)this.internalNotes[t].highestVert>e&&(e=this.internalNotes[t].highestVert);e>this.startY&&e>this.endY&&(this.startY=this.endY=e-1)}},e.exports=t},7193:function(e){var t=function(e,t,r){this.type="TripletElem",this.anchor1=t,this.number=e,this.durationClass=("d"+Math.round(1e3*t.parent.durationClass)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=r.flatBeams};t.prototype.isClosed=function(){return!!this.anchor2},t.prototype.middleNote=function(e){this.middleElems.push(e)},t.prototype.setCloseAnchor=function(e){this.anchor2=e,this.anchor1.parent.beam&&(this.endingHeightAbove=4)},e.exports=t},8462:function(e){var t=function(e,t){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=e,this.voicetotal=t,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};t.prototype.addChild=function(e){if("bar"===e.type){for(var t=!0,r=0;t&&r<this.children.length;r++)this.children[r].type.indexOf("staff-extra")<0&&"tempo"!==this.children[r].type&&(t=!1);t||(this.beams.push("bar"),this.otherchildren.push("bar"))}this.children[this.children.length]=e,this.setRange(e)},t.prototype.setLimit=function(e,t){var r=t.specialY;r||(r=t),r[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],r[e]):this.specialY[e]=r[e])},t.prototype.adjustRange=function(e){void 0!==e.bottom&&(this.bottom=Math.min(this.bottom,e.bottom)),void 0!==e.top&&(this.top=Math.max(this.top,e.top))},t.prototype.setRange=function(e){this.adjustRange(e),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},t.prototype.addOther=function(e){this.otherchildren.push(e),this.setRange(e)},t.prototype.addBeam=function(e){this.beams.push(e)},t.prototype.setWidth=function(e){this.w=e},e.exports=t},347:function(e,t,r){var n=r(1577),i=r(8613);e.exports=function(e,t,r,a,s,o){for(var c=0;c<r.chord.length;c++)for(var l=r.chord[c].position,h=r.chord[c].rel_position,u=r.chord[c].name.split("\n"),d=u.length-1;d>=0;d--){var f,p,m,g=u[d],v=0;"left"===l||"right"===l||"below"===l||"above"===l?(p="annotationfont",m="annotation"):(p="gchordfont",m="chord");var b=e.attr(p,m),y=e.calc(g,p,m),w=y.width,k=y.height/i.STEP;switch(l){case"left":v=-(a+=w+7),f=r.averagepitch,t.addExtra(new n(g,v,w+4,f,{type:"text",height:k,dim:b,position:"left"}));break;case"right":v=s+=4,f=r.averagepitch,t.addRight(new n(g,v,w+4,f,{type:"text",height:k,dim:b,position:"right"}));break;case"below":t.addRight(new n(g,0,0,void 0,{type:"text",position:"below",height:k,dim:b,realWidth:w}));break;case"above":t.addRight(new n(g,0,0,void 0,{type:"text",position:"above",height:k,dim:b,realWidth:w}));break;default:if(h){var x=h.y+3*i.STEP;t.addRight(new n(g,v+h.x,0,r.minpitch+x/i.STEP,{position:"relative",type:"text",height:k,dim:b}))}else{var T="above";r.positioning&&r.positioning.chordPosition&&(T=r.positioning.chordPosition),"hidden"!==T&&t.addCentered(new n(g,o/2,w,void 0,{type:"chord",position:T,height:k,dim:b,realWidth:w}))}}}return{roomTaken:a,roomTakenRight:s}}},5450:function(e){function t(e,t,r,n,i,a){this.rows=[],e.unalignedWords&&e.unalignedWords.length>0&&this.unalignedWords(e.unalignedWords,n,i,a),this.extraText(e,n,i,a),e.footer&&r&&this.footer(e.footer,t,n,a)}t.prototype.unalignedWords=function(e,t,r,n){var i="meta-bottom unaligned-words",a="wordsfont";this.rows.push({startGroup:"unalignedWords",klass:"abcjs-meta-bottom abcjs-unaligned-words"});var s=n.calc("i",a,i);this.rows.push({move:r.words});for(var o=0;o<e.length;o++)if(""===e[o])this.rows.push({move:s.height});else if("string"==typeof e[o])this.addTextIf(t+50,e[o],a,i,0,0,"start",n,null,!0);else{for(var c=0,l=0,h=0;h<e[o].length;h++){var u=e[o][h],d=u.font?u.font:a;this.rows.push({left:t+50+l,text:u.text,font:d,anchor:"start"});var f=n.calc(u.text,a,i);c=Math.max(c,f.height),l+=f.width," "===u.text[u.text.length-1]&&(l+=s.width)}this.rows.push({move:c})}this.rows.push({move:2*s.height}),this.rows.push({endGroup:"unalignedWords",absElemType:"unalignedWords"})},t.prototype.extraText=function(e,t,r,n){var i="";e.book&&(i+="Book: "+e.book+"\n"),e.source&&(i+="Source: "+e.source+"\n"),e.discography&&(i+="Discography: "+e.discography+"\n"),e.notes&&(i+="Notes: "+e.notes+"\n"),e.transcription&&(i+="Transcription: "+e.transcription+"\n"),e.history&&(i+="History: "+e.history+"\n"),e["abc-copyright"]&&(i+="Copyright: "+e["abc-copyright"]+"\n"),e["abc-creator"]&&(i+="Creator: "+e["abc-creator"]+"\n"),e["abc-edited-by"]&&(i+="Edited By: "+e["abc-edited-by"]+"\n"),i.length>0&&this.addTextIf(t,i,"historyfont","meta-bottom extra-text",r.info,0,"start",n,"extraText")},t.prototype.footer=function(e,t,r,n){var i="header meta-bottom",a="footerfont";this.rows.push({startGroup:"footer",klass:i}),this.addTextIf(r,e.left,a,i,0,0,"start",n),this.addTextIf(r+t/2,e.center,a,i,0,0,"middle",n),this.addTextIf(r+t,e.right,a,i,0,0,"end",n)},t.prototype.addTextIf=function(e,t,r,n,i,a,s,o,c,l){if(t){i&&this.rows.push({move:i});var h={left:e,text:t,font:r,anchor:s};c&&(h.absElemType=c),l||(h.klass=n),this.rows.push(h);var u=o.calc("A",r,n),d=t.split("\n").length;"\n"===t[t.length-1]&&d--;var f=1.1*u.height*d;this.rows.push({move:Math.round(f)}),a&&this.rows.push({move:a})}},e.exports=t},9989:function(e){e.exports=function(e){for(var t=0,r=0;r<e.voices.length;r++){var n=e.voices[r].staff;e.voices[r].duplicate||(t+=n.top,n.bottom<0&&(t+=-n.bottom))}return t}},6971:function(e){var t=function(e){this.shouldAddClasses=e.shouldAddClasses,this.reset()};t.prototype.reset=function(){this.lineNumber=null,this.voiceNumber=null,this.measureNumber=null,this.measureTotalPerLine=[],this.noteNumber=null},t.prototype.incrLine=function(){null===this.lineNumber?this.lineNumber=0:this.lineNumber++,this.voiceNumber=null,this.measureNumber=null,this.noteNumber=null},t.prototype.incrVoice=function(){null===this.voiceNumber?this.voiceNumber=0:this.voiceNumber++,this.measureNumber=null,this.noteNumber=null},t.prototype.isInMeasure=function(){return null!==this.measureNumber},t.prototype.newMeasure=function(){this.measureNumber&&(this.measureTotalPerLine[this.lineNumber]=this.measureNumber),this.measureNumber=null,this.noteNumber=null},t.prototype.startMeasure=function(){this.measureNumber=0,this.noteNumber=0},t.prototype.incrMeasure=function(){this.measureNumber++,this.noteNumber=0},t.prototype.incrNote=function(){this.noteNumber++},t.prototype.measureTotal=function(){for(var e=0,t=0;t<this.lineNumber;t++)e+=this.measureTotalPerLine[t]?this.measureTotalPerLine[t]:0;return this.measureNumber&&(e+=this.measureNumber),e},t.prototype.getCurrent=function(e){return{line:this.lineNumber,measure:this.measureNumber,measureTotal:this.measureTotal(),voice:this.voiceNumber,note:this.noteNumber}},t.prototype.generate=function(e){if(!this.shouldAddClasses)return"";var t=[];if(e&&e.length>0&&t.push(e),null!==this.lineNumber&&t.push("l"+this.lineNumber),null!==this.measureNumber&&t.push("m"+this.measureNumber),null!==this.measureNumber&&t.push("mm"+this.measureTotal()),null!==this.voiceNumber&&t.push("v"+this.voiceNumber),e&&(e.indexOf("note")>=0||e.indexOf("rest")>=0||e.indexOf("lyric")>=0)&&null!==this.noteNumber&&t.push("n"+this.noteNumber),t.length>0){t=(t=t.join(" ")).split(" ");for(var r=0;r<t.length;r++)0!==t[r].indexOf("abcjs-")&&t[r].length>0&&(t[r]="abcjs-"+t[r])}return t.join(" ")},e.exports=t},4750:function(e,t,r){var n=r(3987),i=r(2435),a=r(8613),s=r(1009),o=r(8832);e.exports=function(e,t,r,c,l){if(!t.invisible){var h=t.children.length>0&&"TempoElement"===t.children[0].type;t.elemset=[],o.beginGroup(e.paper,e.controller);for(var u=0;u<t.children.length;u++){var d,f=t.children[u];switch(f.type){case"TempoElement":(d=n(e,f))&&(t.elemset=t.elemset.concat(d));break;default:(d=i(e,f,r))&&t.elemset.push(d)}}var p=t.type;if(("note"===t.type||"rest"===t.type)&&(t.counters=e.controller.classes.getCurrent(),p=(p+=" d"+Math.round(1e3*t.durationClass)/1e3).replace(/\./g,"-"),t.abcelem.pitches))for(var m=0;m<t.abcelem.pitches.length;m++)p+=" p"+t.abcelem.pitches[m].pitch;var g=o.endGroup(p);if(g?h&&t.elemset.length>0?(e.paper.moveElementToChild(t.elemset[0],g),c.add(t,t.elemset[0],!1,l)):(t.elemset.push(g),c.add(t,g,"note"===t.type,l)):t.elemset.length>0&&c.add(t,t.elemset[0],"note"===t.type,l),t.klass&&s(t.elemset,"mark","","#00ff00"),t.hint&&s(t.elemset,"abcjs-hint","",null),t.abcelem.abselem=t,t.heads&&t.heads.length>0){t.notePositions=[];for(var v=0;v<t.heads.length;v++)t.notePositions.push({x:t.heads[v].x+t.heads[v].w/2,y:l.zero-t.heads[v].pitch*a.STEP})}}}},7489:function(e,t,r){var n=r(6454),i=r(7199);function a(e,t,r,n,a,s){r=i(e.calcY(r)),a=i(e.calcY(a)),t=i(t),n=i(n);var o=i(r+s);return"M"+t+" "+r+" L"+n+" "+a+"L"+n+" "+i(a+s)+" L"+t+" "+o+"z"}function s(e,t,r,n){return t+(n-e)*r}e.exports=function(e,t){if(0!==t.beams.length){for(var r="",i=0;i<t.beams.length;i++){var o=t.beams[i];if(o.split){for(var c=(m=o.startX,g=o.startY,v=o.endX,(o.endY-g)/(v-m)),l=[],h=0;h<o.split.length;h+=2)l.push([o.split[h],o.split[h+1]]);for(h=0;h<l.length;h++){var u=s(o.startX,o.startY,c,l[h][0]),d=s(o.startX,o.startY,c,l[h][1]);r+=a(e,l[h][0],u,l[h][1],d,o.dy)}}else r+=a(e,o.startX,o.startY,o.endX,o.endY,o.dy)}var f=("abcjs-d"+t.duration).replace(/\./g,"-"),p=e.controller.classes.generate("beam-elem "+f);return[n(e,{path:r,stroke:"none",fill:e.foregroundColor,class:p})]}var m,g,v}},129:function(e,t,r){var n=r(6764),i=r(8613),a=r(5759);function s(e,t,r,i){return n("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",e+r[0],t+i[0],e+r[1],t+i[1],e+r[2],t+i[2],e+r[3],t+i[3],e+r[4],t+i[4],e+r[5],t+i[5],e+r[6],t+i[6])}var o=function(e,t,r,o,c,l,h){var u;if(l){e.paper.openGroup({klass:e.controller.classes.generate("staff-extra voice-name")});var d=r+(o-r)/2;d-=e.controller.getTextSize.baselineToCenter(l,"voicefont","staff-extra voice-name",0,1),a(e,{x:e.padding.left,y:d,text:l,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0})}return"brace"===c?u=function(e,t,r,n,i){var a=n-r,o=s(t,r,[7.5,-8,21,0,18.5,-10.5,7.5],[0,a/5.5,a/3.14,a/2,a/2.93,a/4.88,0]);return o+=s(t,r,[0,17.5,-7.5,6.6,-5,20,0],[a/2,a/1.46,a/1.22,a,a/1.19,a/1.42,a/2]),e.paper.path({path:o,stroke:e.foregroundColor,fill:e.foregroundColor,class:e.controller.classes.generate(i)})}(e,t,r,o,c):"bracket"===c&&(u=function(e,t,r,a,s){t+=i.STEP;var o=.75*i.STEP,c=.75*i.STEP,l=a-r,h=n("M %f %f l %f %f l %f %f l %f %f z",t,r-c,0,l+2*c,o,0,0,-(l+2*c)),u=2*i.STEP,d=i.STEP;return h+=n("M %f %f q %f %f %f %f q %f %f %f %f z",t+o,r-c,.6*u,.2*d,u,-d,.1*-u,.3*d,-u,d+i.STEP),h+=n("M %f %f q %f %f %f %f q %f %f %f %f z",t+o,r+c+l,.6*u,.2*-d,u,d,.1*-u,.3*-d,-u,-d-i.STEP),e.paper.path({path:h,stroke:e.foregroundColor,fill:e.foregroundColor,class:e.controller.classes.generate(s)})}(e,t,r,o,c)),l&&(u=e.paper.closeGroup()),h.wrapSvgEl({el_type:c,startChar:-1,endChar:-1},u),u};e.exports=function(e,t,r){var n=t.startVoice.staff.absoluteY-10*i.STEP;return t.endVoice&&t.endVoice.staff?t.endY=t.endVoice.staff.absoluteY-2*i.STEP:t.lastContinuedVoice&&t.lastContinuedVoice.staff?t.endY=t.lastContinuedVoice.staff.absoluteY-2*i.STEP:t.endY=t.startVoice.staff.absoluteY-2*i.STEP,o(e,t.x,n,t.endY,t.type,t.header,r)}},3245:function(e,t,r){var n=r(6764),i=r(6454),a=r(7199),s=function(e,t,r,s,o,c,l){t=a(t),r=a(r),s=a(s),o=a(o),c=a(c),l=a(l);var h=n("M %f %f L %f %f M %f %f L %f %f",c,t,l,r,c,s,l,o);return i(e,{path:h,highlight:"stroke",stroke:e.foregroundColor,class:e.controller.classes.generate("dynamics decoration")})};e.exports=function(e,t,r){void 0===t.pitch&&window.console.error("Crescendo Element y-coordinate not set.");var n,i=e.calcY(t.pitch)+4,a=t.anchor1?t.anchor1.x:0,o=t.anchor2?t.anchor2.x:800;return n="<"===t.dir?s(e,i+4,i,i+4,i+8,a,o):s(e,i,i+4,i+8,i+4,a,o),r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1},n),[n]}},1547:function(e){e.exports=function(e,t,r){var n=e.paper.rectBeneath(t);return r&&e.paper.text(r,{x:0,y:t.y+7,"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),n}},5012:function(e,t,r){var n=r(5537),i=r(7611),a=r(5668),s=r(8613),o=r(3524);function c(e,t,r){n(e,t,r);var i=t.height*s.STEP;return e.y+=i,t}function l(e,t,r,n){var i=-(r.staffs[r.staffs.length-1].bottom-2),a=(n.staffs[0].top-10+i)*s.STEP;a<t&&e.moveY(t-a)}e.exports=function(e,t,r,n,s,h,u,d,f){var p=new o(e.paper,d,f);e.moveY(e.padding.top),a(e,r.topText,p),e.moveY(e.spacing.music);for(var m=[],g=0;g<r.lines.length;g++){t.incrLine();var v=r.lines[g];if(v.staff){v.vskip&&e.moveY(v.vskip),m.length>=1&&l(e,e.spacing.staffSeparation,m[m.length-1],v.staffGroup);var b=c(e,v.staffGroup,p);b.line=g,m.push(b)}else v.nonMusic&&a(e,v.nonMusic,p)}return t.reset(),e.moveY(24),a(e,r.bottomText,p),i(e,s,u,h),{staffgroups:m,selectables:p.getElements()}}},9879:function(e,t,r){var n=r(4777);e.exports=function(e,t,r){void 0===t.pitch&&window.console.error("Dynamic Element y-coordinate not set.");var i=n(e,t.anchor.x,t.pitch,t.dec,1,1,e.controller.classes.generate("decoration dynamics"));return r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:t.dec},i),[i]}},5947:function(e,t,r){var n=r(6764),i=r(5759),a=r(6454),s=r(7199);e.exports=function(e,t,r,o,c){void 0===t.pitch&&window.console.error("Ending Element y-coordinate not set.");var l=s(e.calcY(t.pitch)),h="";t.anchor1&&(r=s(t.anchor1.x+t.anchor1.w),h+=n("M %f %f L %f %f ",r,l,r,s(l+20))),t.anchor2&&(o=s(t.anchor2.x),h+=n("M %f %f L %f %f ",o,l,o,s(l+20))),h+=n("M %f %f L %f %f ",r,l,o,l),e.paper.openGroup({klass:e.controller.classes.generate("ending")}),a(e,{path:h,stroke:e.foregroundColor,fill:e.foregroundColor}),t.anchor1&&i(e,{x:s(r+5),y:s(e.calcY(t.pitch-.5)),text:t.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0});var u=e.paper.closeGroup();return c.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},u),[u]}},8832:function(e,t,r){var n=r(7199);function i(){this.ingroup=!1}i.prototype.beginGroup=function(e,t){this.paper=e,this.controller=t,this.path=[],this.lastM=[0,0],this.ingroup=!0},i.prototype.isInGroup=function(){return this.ingroup},i.prototype.addPath=function(e){if(0!==(e=e||[]).length){e[0][0]="m",e[0][1]=n(e[0][1]-this.lastM[0]),e[0][2]=n(e[0][2]-this.lastM[1]),this.lastM[0]+=e[0][1],this.lastM[1]+=e[0][2],this.path.push(e[0]);for(var t=1,r=e.length;t<r;t++)"m"===e[t][0]&&(this.lastM[0]+=e[t][1],this.lastM[1]+=e[t][2]),this.path.push(e[t])}},i.prototype.endGroup=function(e){if(this.ingroup=!1,0===this.path.length)return null;for(var t="",r=0;r<this.path.length;r++)t+=this.path[r].join(" ");var n=this.paper.path({path:t,stroke:"none",fill:this.controller.renderer.foregroundColor,class:this.controller.classes.generate(e)});return this.path=[],n};var a=new i;e.exports=a},5668:function(e,t,r){var n=r(4169),i=r(5759);e.exports=function(e,t,r){for(var a=0;a<t.rows.length;a++){var s=t.rows[a];if(s.move)e.moveY(s.move);else if(s.text){var o=s.left?s.left:0,c=i(e,{x:o,y:e.y,text:s.text,type:s.font,klass:s.klass,anchor:s.anchor});s.absElemType&&r.wrapSvgEl({el_type:s.absElemType,startChar:-1,endChar:-1,text:s.text},c)}else if(s.separator)n(e,s.separator);else if(s.startGroup)e.paper.openGroup({klass:s.klass});else if(s.endGroup){var l=e.paper.closeGroup();s.absElemType&&r.wrapSvgEl({el_type:s.absElemType,startChar:-1,endChar:-1,text:""},l)}}}},6454:function(e){e.exports=function(e,t,r){return e.paper.path(t)}},3624:function(e,t,r){var n=r(8832),i=r(7199);e.exports=function(e,t,r,a,s){if(r<0||a<s){var o=i(s);s=i(a),a=o}else a=i(a),s=i(s);t=i(t);var c=i(t+r),l=e.foregroundColor,h=[["M",t,a],["L",t,s],["L",c,s],["L",c,a],["z"]];if(!n.isInGroup()){for(var u="",d=0;d<h.length;d++)u+=h[d].join(" ");return e.paper.pathToBack({path:u,stroke:"none",fill:l,class:e.controller.classes.generate("stem")})}n.addPath(h)}},4777:function(e,t,r){var n=r(5759),i=r(5245),a=r(8832);e.exports=function(e,t,r,s,o,c,l){var h,u,d,f,p,m;if(!s)return null;if(s.length>1&&s.indexOf(".")<0){e.paper.openGroup({klass:l});for(var g=0,v=0;v<s.length;v++){var b=s.charAt(v);u=i.getYCorr(b),(h=i.printSymbol(t+g,e.calcY(r+u),b,e.paper,"","none",e.foregroundColor))?v<s.length-1&&(g+=(d=b,f=s.charAt(v+1),p=i.getSymbolWidth(b),m=void 0,m=p,"f"===d&&"f"===f&&(m=2*m/3),"p"===d&&"p"===f&&(m=5*m/6),"f"===d&&"z"===f&&(m=5*m/8),m)):n(e,{x:t,y:e.y,text:"no symbol:"+s,type:"debugfont",klass:"debug-msg",anchor:"start"})}return e.paper.closeGroup()}if(u=i.getYCorr(s),a.isInGroup())a.addPath(i.getPathForSymbol(t,e.calcY(r+u),s,o,c));else{if(h=i.printSymbol(t,e.calcY(r+u),s,e.paper,l,"none",e.foregroundColor))return h;n(e,{x:t,y:e.y,text:"no symbol:"+s,type:"debugfont",klass:"debug-msg",anchor:"start"})}return null}},2435:function(e,t,r){var n=r(5759),i=r(3624),a=r(7865),s=r(4777);e.exports=function(e,t,r){void 0===t.pitch&&window.console.error(t.type+" Relative Element y-coordinate not set.");var o=e.calcY(t.pitch);switch(t.type){case"symbol":if(null===t.c)return null;var c="symbol";t.klass&&(c+=" "+t.klass),t.graphelem=s(e,t.x,t.pitch,t.c,t.scalex,t.scaley,e.controller.classes.generate(c),"none",e.foregroundColor);break;case"debug":t.graphelem=n(e,{x:t.x,y:e.calcY(15),text:""+t.c,type:"debugfont",klass:e.controller.classes.generate("debug-msg"),anchor:"start",centerVertically:!1,dim:t.dim});break;case"barNumber":t.graphelem=n(e,{x:t.x,y:o,text:""+t.c,type:"measurefont",klass:e.controller.classes.generate("bar-number"),anchor:"middle",dim:t.dim});break;case"lyric":t.graphelem=n(e,{x:t.x,y:o,text:t.c,type:"vocalfont",klass:e.controller.classes.generate("lyric"),anchor:"middle",dim:t.dim});break;case"chord":t.graphelem=n(e,{x:t.x,y:o,text:t.c,type:"gchordfont",klass:e.controller.classes.generate("chord"),anchor:"middle",dim:t.dim,lane:t.getLane()});break;case"decoration":t.graphelem=n(e,{x:t.x,y:o+6,text:t.c,type:"annotationfont",klass:e.controller.classes.generate("annotation"),anchor:"middle",centerVertically:!0,dim:t.dim});break;case"text":t.graphelem=n(e,{x:t.x,y:o,text:t.c,type:"annotationfont",klass:e.controller.classes.generate("annotation"),anchor:"start",centerVertically:t.centerVertically,dim:t.dim,lane:t.getLane()});break;case"multimeasure-text":t.graphelem=n(e,{x:t.x+t.w/2,y:o,text:t.c,type:"tempofont",klass:e.controller.classes.generate("rest"),anchor:"middle",centerVertically:!1,dim:t.dim});break;case"part":t.graphelem=n(e,{x:t.x,y:o,text:t.c,type:"partsfont",klass:e.controller.classes.generate("part"),anchor:"start",dim:t.dim});break;case"bar":t.graphelem=i(e,t.x,t.linewidth,o,r||e.calcY(t.pitch2));break;case"stem":t.graphelem=i(e,t.x,t.linewidth,o,e.calcY(t.pitch2));break;case"ledger":t.graphelem=a(e,t.x,t.x+t.w,t.pitch,e.controller.classes.generate("ledger"))}return 1!==t.scalex&&t.graphelem&&function(e,t,r,n,i,a){e.setAttributeOnElement(t,{style:"transform:scale("+r+","+n+");transform-origin:"+i+"px "+a+"px;"})}(e.paper,t.graphelem,t.scalex,t.scaley,t.x,o),t.graphelem}},7199:function(e){e.exports=function(e){return parseFloat(e.toFixed(2))}},3524:function(e,t,r){var n=r(907),i=r(2080);function a(e,t,r){this.elements=[],this.paper=e,this.tuneNumber=r,this.selectTypes=t}a.prototype.getElements=function(){return this.elements},a.prototype.add=function(e,t,r,n){if(this.canSelect(e)){var i;i=void 0===this.selectTypes?{selectable:!1,"data-index":this.elements.length}:{selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(t,i);var a={absEl:e,svgEl:t,isDraggable:r};void 0!==n&&(a.staffPos=n),this.elements.push(a)}},a.prototype.canSelect=function(e){return!(!1===this.selectTypes||!e||!e.abcelem||!0!==this.selectTypes&&!(void 0===this.selectTypes?"note"===e.abcelem.el_type:this.selectTypes.indexOf(e.abcelem.el_type)>=0))},a.prototype.wrapSvgEl=function(e,t){var r={tuneNumber:this.tuneNumber,abcelem:e,elemset:[t],highlight:n,unhighlight:i};this.add(r,t,!1)},e.exports=a},4169:function(e){e.exports=function(e,t){var r=Math.round(e.y),n=(e.controller.width-t)/2,i=n+t,a="M "+n+" "+r+" L "+i+" "+r+" L "+i+" "+(r+1)+" L "+n+" "+(r+1)+" L "+n+" "+r+" z";e.paper.pathToBack({path:a,stroke:"rgba(0,0,0,0)",fill:"rgba(0,0,0,255)",class:e.controller.classes.generate("defined-text")})}},7611:function(e){e.exports=function(e,t,r,n){var i=(t+e.padding.right)*r,a=(e.y+e.padding.bottom)*r;e.isPrint&&(a=Math.max(a,1056));var s="Sheet Music";e.abctune&&e.abctune.metaText&&e.abctune.metaText.title&&(s+=' for "'+e.abctune.metaText.title+'"'),e.paper.setTitle(s);var o=e.ariaLabel?e.ariaLabel:s;e.paper.setAttribute("aria-label",o),e.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"].join(" ")+"}");var c={overflow:"hidden"};"resize"===n?e.paper.setResponsiveWidth(i,a):(c.width="",c.height=a+"px",r<1?(c.width=i+"px",e.paper.setSize(i/r,a/r)):e.paper.setSize(i,a)),e.paper.setScale(r),e.paper.setParentStyles(c)}},6764:function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(){for(var e,r,n,i,a,s=0,o=arguments[s++],c=[];o;){if(r=/^[^\x25]+/.exec(o))c.push(r[0]);else if(r=/^\x25{2}/.exec(o))c.push("%");else{if(!(r=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(o)))throw"Huh ?!";if(null==(e=arguments[r[1]||s++])||null==e)throw"Too few arguments.";if(/[^s]/.test(r[7])&&"number"!=typeof e)throw"Expecting number but found "+t(e);switch(r[7]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e);break;case"e":e=r[6]?e.toExponential(r[6]):e.toExponential();break;case"f":e=r[6]?parseFloat(e).toFixed(r[6]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&r[6]?e.substring(0,r[6]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(r[7])&&r[2]&&e>0?"+"+e:e,i=r[3]?"0"==r[3]?"0":r[3].charAt(1):" ",a=r[5]-String(e).length,n=r[5]?str_repeat(i,a):"",c.push(r[4]?e+n:n+e)}o=o.substring(r[0].length)}return c.join("")}},5537:function(e,t,r){var n=r(8613),i=r(129),a=r(3145),s=r(7641),o=r(1547),c=r(3624);function l(e,t,r,a,s){if(r)for(var o=0;o<r.length;o++)r[o].isStartVoice(a)&&(r[o].startY=t-10*n.STEP,r[o].elemset=i(e,r[o],s))}function h(e,t,r){for(var i=0;i<r.length;i++)for(var a=t[r[i]].children,s=0;s<a.length;s++){var c=a[s],l=c.getFixedCoords();if(!c.invisible&&void 0!==l.t&&void 0!==l.b){var h=(l.t-l.b)*n.STEP;o(e,{x:l.x,y:e.calcY(l.t),width:l.w,height:h,fill:"#88e888","fill-opacity":.4,stroke:"#4aa93d","stroke-opacity":.8});for(var u=0;u<c.children.length;u++){var d=c.children[u],f=d.getChordDim();if(f){var p=e.calcY(d.pitch);p+=d.dim.font.size*d.getLane(),o(e,{x:f.left,y:p,width:f.right-f.left,height:d.dim.font.size,fill:"none",stroke:"#4aa93d","stroke-opacity":.8})}}}}}e.exports=function(e,t,r){var i;!function(e,t){var r=Math.round(e.y);e.paper.pathToBack({path:"M 0 "+r+" L 0 0",stroke:"none",fill:"none","stroke-opacity":0,"fill-opacity":0,class:e.controller.classes.generate(t),"data-vertical":r})}(e,"abcjs-top-of-system");for(var u,d,f=e.y,p=0;p<t.staffs.length;p++){var m=t.staffs[p];e.moveY(n.STEP,m.top),m.absoluteY=e.y,e.showDebug&&(e.showDebug.indexOf("box")>=0&&h(e,t.voices,m.voices),e.showDebug.indexOf("grid")>=0&&(e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:f,y2:f,stroke:"#0000ff"}),o(e,{x:e.padding.left,y:e.calcY(m.originalTop),width:e.controller.width,height:e.calcY(m.originalBottom)-e.calcY(m.originalTop),fill:e.foregroundColor,stroke:e.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),i=0,y(m,"chordHeightAbove"),y(m,"chordHeightBelow"),y(m,"dynamicHeightAbove"),y(m,"dynamicHeightBelow"),y(m,"endingHeightAbove"),y(m,"lyricHeightAbove"),y(m,"lyricHeightBelow"),y(m,"partHeightAbove"),y(m,"tempoHeightAbove"),y(m,"volumeHeightAbove"),y(m,"volumeHeightBelow"))),e.moveY(n.STEP,-m.bottom),e.showDebug&&e.showDebug.indexOf("grid")>=0&&e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:e.y,y2:e.y,stroke:"#0000aa"})}for(var g=0,v=0;v<t.voices.length;v++){var b=t.voices[v].staff;e.y=b.absoluteY,e.controller.classes.incrVoice(),t.voices[v].duplicate||(u||(u=e.calcY(10)),d=e.calcY(2),0!==b.lines&&(e.controller.classes.newMeasure(),s(e,t.startx,t.w,b.lines)),l(e,b.absoluteY,t.brace,v,r),l(e,b.absoluteY,t.bracket,v,r)),a(e,t.voices[v],g,r,{top:f,zero:e.y,height:t.height*n.STEP}),e.controller.classes.newMeasure(),t.voices[v].duplicate||(g=e.calcY(2))}function y(t,r){var a=["rgb(207,27,36)","rgb(168,214,80)","rgb(110,161,224)","rgb(191,119,218)","rgb(195,30,151)","rgb(31,170,177)","rgb(220,166,142)"];if(t.positionY[r]){var s=t.specialY[r]*n.STEP;"chordHeightAbove"===r&&t.specialY.chordLines&&t.specialY.chordLines.above&&(s*=t.specialY.chordLines.above),"chordHeightBelow"===r&&t.specialY.chordLines&&t.specialY.chordLines.below&&(s*=t.specialY.chordLines.below),o(e,{x:e.padding.left,y:e.calcY(t.positionY[r]),width:e.controller.width,height:s,fill:a[i],stroke:a[i],"fill-opacity":.4,"stroke-opacity":.4},r.substr(0,4)),(i+=1)>6&&(i=0)}}e.controller.classes.newMeasure(),t.staffs.length>1&&c(e,t.startx,.6,u,d),e.y=f}},7865:function(e,t,r){var n=r(6764),i=r(7199);e.exports=function(e,t,r,a,s){var o=e.foregroundColor,c=e.calcY(a);t=i(t),r=i(r);var l=i(c-.35),h=i(c+.35),u={path:n("M %f %f L %f %f L %f %f L %f %f z",t,l,r,l,r,h,t,h),stroke:"none",fill:o};return s&&(u.class=s),e.paper.pathToBack(u)}},7641:function(e,t,r){var n=r(7865);e.exports=function(e,t,r,i){var a="abcjs-top-line";if(e.paper.openGroup({prepend:!0,klass:e.controller.classes.generate("abcjs-staff")}),1===i)n(e,t,r,6,a);else for(var s=i-1;s>=0;s--)n(e,t,r,2*(s+1),a),a=void 0;e.paper.closeGroup()}},3987:function(e,t,r){var n=r(2435),i=r(5759);e.exports=function(e,t){var r=t.x;void 0===t.pitch&&window.console.error("Tempo Element y-coordinate not set."),t.tempo.el_type="tempo",e.paper.openGroup({klass:e.controller.classes.generate("tempo")});var a,s=e.calcY(t.pitch)+2;if(t.tempo.preString){a=i(e,{x:r,y:s,text:t.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,"dominant-baseline":"ideographic"});var o=e.controller.getTextSize.calc(t.tempo.preString,"tempofont","tempo",a).width;r+=o+o/t.tempo.preString.length}if(t.note){t.note.setX(r);for(var c=0;c<t.note.children.length;c++)n(e,t.note.children[c],r);r+=t.note.w+5;var l="= "+t.tempo.bpm;a=i(e,{x:r,y:s,text:l,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0});var h=e.controller.getTextSize.calc(l,"tempofont","tempo",a).width;r+=h+h/l.length}return t.tempo.postString&&i(e,{x:r,y:s,text:t.tempo.postString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0}),[e.paper.closeGroup()]}},5759:function(e,t,r){var n=r(7199);e.exports=function(e,t){var r,i=t.y;if(t.lane){var a=.25*t.dim.font.size;i+=(t.dim.font.size+a)*t.lane}t.dim?(r=t.dim).attr.class=t.klass:r=e.controller.getFontAndAttr.calc(t.type,t.klass),t.anchor&&(r.attr["text-anchor"]=t.anchor),r.attr.x=t.x,r.attr.y=i,t.centerVertically||(r.attr.y+=r.font.size),"debugfont"===t.type&&(console.log("Debug msg: "+t.text),r.attr.stroke="#ff0000");var s=t.text.replace(/\n\n/g,"\n \n");s=s.replace(/^\n/," \n"),r.font.box&&(e.paper.openGroup({klass:r.attr.class,fill:e.foregroundColor}),"end"===r.attr["text-anchor"]?r.attr.x-=r.font.padding:"start"===r.attr["text-anchor"]&&(r.attr.x+=r.font.padding),r.attr.y+=r.font.padding,delete r.attr.class),t.noClass&&delete r.attr.class,r.attr.x=n(r.attr.x),r.attr.y=n(r.attr.y);var o=e.paper.text(s,r.attr);if(r.font.box){var c=o.getBBox(),l=0;"middle"===r.attr["text-anchor"]?l=c.width/2+r.font.padding:"end"===r.attr["text-anchor"]&&(l=c.width+2*r.font.padding);var h=0;t.centerVertically&&(h=c.height-r.font.padding),e.paper.rect({x:Math.round(t.x-l),y:Math.round(i-h),width:Math.round(c.width+2*r.font.padding),height:Math.round(c.height+2*r.font.padding)}),o=e.paper.closeGroup()}return o}},3272:function(e,t,r){var n=r(6764),i=r(7199),a=function(e,t,r){e.anchor1&&e.anchor2?e.anchor1.pitch===e.anchor2.pitch&&0===e.internalNotes.length?e.isTie=!0:e.isTie=!1:e.isTie=!0,e.isTie?(e.calcTieDirection(),e.calcX(t,r),e.calcTieY()):(e.calcSlurDirection(),e.calcX(t,r),e.calcSlurY()),e.avoidCollisionAbove()},s=function(e,t,r,a,s,o,c,l,h){var u=l?1.2:1.5;t=i(t+6),r=i(r+4),a+=o?u:-u,s+=o?u:-u;var d,f=i(e.calcY(a)),p=i(e.calcY(s)),m=r-t,g=p-f,v=Math.sqrt(m*m+g*g),b=m/v,y=g/v,w=v/3.5,k=l?10:25,x=(o?-1:1)*Math.min(k,Math.max(4,w)),T=i(t+w*b-x*y),C=i(f+w*y+x*b),A=i(r-w*b-x*y),S=i(p-w*y+x*b);if(c?c+=" slur":c="slur",c+=l?" tie":" legato",h){c+=" dotted";var _=n("M %f %f C %f %f %f %f %f %f",t,f,T,C,A,S,r,p);d=e.paper.path({path:_,stroke:e.foregroundColor,fill:"none","stroke-dasharray":"5 5",class:e.controller.classes.generate(c)})}else{var M=n("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t,f,T,C,A,S,r,p,i(A-2*y),i(S+2*b),i(T-2*y),i(C+2*b),t,f);d=e.paper.path({path:M,stroke:"none",fill:e.foregroundColor,class:e.controller.classes.generate(c)})}return d};e.exports=function(e,t,r,n,i){a(t,r,n);var o="";t.anchor1?o+="abcjs-start-m"+t.anchor1.parent.counters.measure+"-n"+t.anchor1.parent.counters.note:o+="abcjs-start-edge",t.anchor2?o+=" abcjs-end-m"+t.anchor2.parent.counters.measure+"-n"+t.anchor2.parent.counters.note:o+=" abcjs-end-edge",t.hint&&(o="abcjs-hint");var c=t.fixedY?1.5:0,l=s(e,t.startX,t.endX,t.startY+c,t.endY+c,t.above,o,t.isTie,t.dotted);return i.wrapSvgEl({el_type:"slur",startChar:-1,endChar:-1},l),[l]}},4322:function(e,t,r){var n=r(6764),i=r(5759),a=r(6454),s=r(7199);function o(e,t,r,i){return n("M %f %f L %f %f",s(e),s(t),s(r),s(i))}e.exports=function(e,t,r){e.paper.openGroup({klass:e.controller.classes.generate("triplet "+t.durationClass)}),t.hasBeam||function(e,t,r,n,i){r=e.calcY(r),i=e.calcY(i);var s=5,c="";c+=o(t,r,t,r+s),c+=o(n,i,n,i+s);var l=t+(n-t)/2,h=8,u=(i-r)/(n-t),d=l-h;c+=o(t,r,d,r+(d-t)*u);var f=l+h;c+=o(f,r+(f-t)*u,n,i),a(e,{path:c,stroke:e.foregroundColor})}(e,t.anchor1.x,t.startNote,t.anchor2.x+t.anchor2.w,t.endNote),i(e,{x:t.xTextPos,y:e.calcY(t.yTextPos-1),text:""+t.number,type:"tripletfont",anchor:"middle",centerVertically:!0,noClass:!0});var n=e.paper.closeGroup();return r.wrapSvgEl({el_type:"triplet",startChar:-1,endChar:-1},n),n}},3145:function(e,t,r){var n=r(3245),i=r(9879),a=r(4322),s=r(5947),o=r(3272),c=r(7489),l=r(5759),h=r(4750);e.exports=function(e,t,r,u,d){var f,p,m=t.w-1;if(e.staffbottom=t.staff.bottom,t.header){var g=l(e,{x:e.padding.left,y:e.calcY(t.headerPosition),text:t.header,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0});u.wrapSvgEl({el_type:"voiceName",startChar:-1,endChar:-1,text:t.header},g)}var v,b=!1;for(f=0;f<t.children.length;f++){"note"!==(p=t.children[f]).type&&"rest"!==p.type||(b=!0);var y=!1;"staff-extra"===p.type||e.controller.classes.isInMeasure()||(e.controller.classes.startMeasure(),y=!0),p.type,h(e,p,t.barto||f===t.children.length-1?r:0,u,d),("note"===p.type||"rest"===(v=p).type&&!(!v.abcelem||!v.abcelem.rest||"spacer"===v.abcelem.rest.type))&&e.controller.classes.incrNote(),"bar"===p.type&&!y&&b&&e.controller.classes.incrMeasure()}for(e.controller.classes.startMeasure(),f=0;f<t.beams.length;f++){var w=t.beams[f];"bar"===w?e.controller.classes.incrMeasure():c(e,w,u)}for(e.controller.classes.startMeasure(),f=0;f<t.otherchildren.length;f++)if("bar"===(p=t.otherchildren[f]))e.controller.classes.incrMeasure();else switch(p.type){case"CrescendoElem":p.elemset=n(e,p,u);break;case"DynamicDecoration":p.elemset=i(e,p,u);break;case"TripletElem":a(e,p,u);break;case"EndingElem":p.elemset=s(e,p,t.startx+10,m,u);break;case"TieElem":p.elemset=o(e,p,t.startx+10,m,u);break;default:console.log(p),h(e,p,t.startx+10,m,u,d)}}},3891:function(e){e.exports=function(e,t,r,n,i,a){var s;this.rows=[],t&&this.rows.push({move:t});var o=r.calc("textfont","defined-text");if(""===e)this.rows.push({move:2*o.attr["font-size"]});else if("string"==typeof e)this.rows.push({move:o.attr["font-size"]/2}),this.rows.push({left:n,text:e,font:"textfont",klass:"defined-text",anchor:"start",absElemType:"freeText"}),s=a.calc(e,"textfont","defined-text"),this.rows.push({move:s.height});else for(var c="textfont",l=!1,h=0;h<e.length;h++){c=e[h].font?e[h].font:"textfont",e[h].center&&(l=!0);var u=l?"middle":"start",d=l?i/2:n;this.rows.push({left:d,text:e[h].text,font:c,klass:"defined-text",anchor:u,absElemType:"freeText"}),s=a.calc(e[h].text,c,"defined-text"),this.rows.push({move:s.height})}}},1059:function(e){var t=function(e,t){this.formatting=e,this.classes=t};t.prototype.updateFonts=function(e){e.gchordfont&&(this.formatting.gchordfont=e.gchordfont),e.tripletfont&&(this.formatting.tripletfont=e.tripletfont),e.annotationfont&&(this.formatting.annotationfont=e.annotationfont),e.vocalfont&&(this.formatting.vocalfont=e.vocalfont)},t.prototype.calc=function(e,t){var r;r="string"==typeof e?(r=this.formatting[e])?{face:r.face,size:Math.round(4*r.size/3),decoration:r.decoration,style:r.style,weight:r.weight,box:r.box}:{face:"Arial",size:Math.round(16),decoration:"underline",style:"normal",weight:"normal"}:{face:e.face,size:Math.round(4*e.size/3),decoration:e.decoration,style:e.style,weight:e.weight,box:e.box};var n=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;return r.padding=r.size*n,{font:r,attr:{"font-size":r.size,"font-style":r.style,"font-family":r.face,"font-weight":r.weight,"text-decoration":r.decoration,class:this.classes.generate(t)}}},e.exports=t},3460:function(e){var t=function(e,t){this.getFontAndAttr=e,this.svg=t};t.prototype.updateFonts=function(e){this.getFontAndAttr.updateFonts(e)},t.prototype.attr=function(e,t){return this.getFontAndAttr.calc(e,t)},t.prototype.calc=function(e,t,r,n){var i;i="string"==typeof t?this.attr(t,r):{font:{face:t.face,size:t.size,decoration:t.decoration,style:t.style,weight:t.weight},attr:{"font-size":t.size,"font-style":t.style,"font-family":t.face,"font-weight":t.weight,"text-decoration":t.decoration,class:this.getFontAndAttr.classes.generate(r)}};var a=this.svg.getTextSize(e,i.attr,n);return i.font.box?{height:a.height+4*i.font.padding,width:a.width+4*i.font.padding}:a},t.prototype.baselineToCenter=function(e,t,r,n,i){return.5*this.calc(e,t,r).height+(i-n-2)*this.attr(t,r).font.size},e.exports=t},907:function(e,t,r){var n=r(1009);e.exports=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#ff0000"),n(this.elemset,e,"",t)}},1897:function(e){var t=function(){};t.beginLayout=function(e,t){t.i=0,t.durationindex=0,t.startx=e,t.minx=e,t.nextx=e,t.spacingduration=0},t.layoutEnded=function(e){return e.i>=e.children.length},t.getNextX=function(e){return Math.max(e.minx,e.nextx)},t.getSpacingUnits=function(e){return Math.sqrt(8*e.spacingduration)},t.layoutOneItem=function(e,t,r,n){var i=r.children[r.i];if(!i)return 0;var a=e-r.minx,s=function(e,t){var r=0;return"note"!==e.type&&"bar"!==e.type||(r=t),-e.extraw+r}(i,r.durationindex+i.duration>0?n:0);return a<s&&(0===r.i||"bar"!==i.type||"part"!==r.children[r.i-1].type&&"tempo"!==r.children[r.i-1].type)&&(e+=s-a),i.setX(e),r.spacingduration=i.duration,r.minx=e+function(e){return e.w}(i),r.i!==r.children.length-1&&(r.minx+=i.minspacing),this.updateNextX(e,t,r),e},t.shiftRight=function(e,t){var r=t.children[t.i];r&&(r.setX(r.x+e),t.minx+=e,t.nextx+=e)},t.updateNextX=function(e,t,r){r.nextx=e+t*Math.sqrt(8*r.spacingduration)},t.updateIndices=function(e){this.layoutEnded(e)||(e.durationindex+=e.children[e.i].duration,"bar"===e.children[e.i].type&&(e.durationindex=Math.round(64*e.durationindex)/64),e.i++)},e.exports=t},6251:function(e,t,r){var n=r(1577),i=r(8613),a=r(6807),s=function(e){return void 0===e?0:Math.floor(Math.log(e)/Math.log(2))};function o(e,t,r,n){if(!e.children)return n;for(var i=0;i<e.children.length;i++){var a=e.children[i];t&&void 0!==a.top&&"flags.ugrace"===a.c?n=Math.max(n,a.top-r):t||void 0===a.bottom||"flags.ugrace"!==a.c||(n=Math.max(n,r-a.bottom+7))}return n}function c(e,t,r){var n=t.heads[e?0:t.heads.length-1],i=r.heads[e?0:r.heads.length-1],a=n.x;e&&(a+=n.w-.6);var s=i.x;return[a,s+=e?i.w:.6]}e.exports=function(e){if(0!==e.elems.length&&!e.allrests){var t=function(e,t){var r=e?i.STEP:-i.STEP;return t&&(r*=.4),r}(e.stemsUp,e.isgrace),r=e.elems[0],l=e.elems[e.elems.length-1],h=0,u=e.stemsUp?r.abcelem.maxpitch:r.abcelem.minpitch;h=o(r,e.stemsUp,u,h),h=o(l,e.stemsUp,u,h),h=Math.max(e.stemHeight,h+3);var d=(g=e.average,v=e.elems.length,b=h,y=e.stemsUp,w=r.abcelem.averagepitch,k=l.abcelem.averagepitch,x=e.isflat,T=e.min,C=e.max,A=e.isgrace,S=b-2,_=b-2,M=Math.round(y?Math.max(g+S,C+_):Math.min(g-S,T-_)),E=function(e,t,r,n){if(n)return 0;var i=e-t,a=r/2;return i>a&&(i=a),i<-a&&(i=-a),i}(w,k,v,x),N=M+Math.floor(E/2),B=M+Math.floor(-E/2),A||(y&&M<6||!y&&M>6)&&(N=6,B=6),[N,B]),f=c(e.stemsUp,r,l);e.addBeam({startX:f[0],endX:f[1],startY:d[0],endY:d[1],dy:t});for(var p=function(e,t,r,n,i){for(var o=[],l=[],h=0;h<e.length;h++){var u=e[h];if(!u.abcelem.rest){var d=u.heads[t?0:u.heads.length-1],f=d.x+(t?d.w:0),p=a(r.startX,r.startY,r.endX,r.endY,f),m=t?-1.5:1.5;n&&(m=2*m/3);var g=u.abcelem.duration;0===g&&(g=.25);for(var v=s(g);v<-3;v++){var b=-4-v;if(l[b]?l[b].single=!1:l[b]={x:f+(t?-.6:0),y:p+m*(b+1),durlog:v,single:!0},h>0&&u.abcelem.beambr&&u.abcelem.beambr<=b+1){l[b].split||(l[b].split=[l[b].x]);var y=c(t,e[h-1],u);l[b].split[l[b].split.length-1]>=y[0]&&(y[0]+=u.w),l[b].split.push(y[0]),l[b].split.push(y[1])}}for(var w=l.length-1;w>=0;w--)if(h===e.length-1||s(e[h+1].abcelem.duration)>-w-4){var k=f,x=p+m*(w+1);l[w].single&&(k=0===h?f+5:f-5,x=a(r.startX,r.startY,r.endX,r.endY,k)+m*(w+1));var T={startX:l[w].x,endX:k,startY:l[w].y,endY:x,dy:i};if(void 0!==l[w].split){var C=l[w].split;T.endX<=C[C.length-1]&&(C[C.length-1]-=u.w),C.push(T.endX),T.split=l[w].split}o.push(T),l=l.slice(0,w)}}}return o}(e.elems,e.stemsUp,e.beams[0],e.isgrace,t),m=0;m<p.length;m++)e.addBeam(p[m]);!function(e,t,r,s,o){for(var c=0;c<e.length;c++){var l=e[c];if(!l.abcelem.rest){var h=!l.addExtra,u=h?o:l,d=l.heads[t?0:l.heads.length-1],f=.2,p=d.pitch+(t?f:-f),m=t?d.w:0,g=d.x+m,v=a(r.startX,r.startY,r.endX,r.endY,g),b=t?-.6:.6;t||(v-=s/2/i.STEP),h&&(m+=l.heads[0].dx),"noteheads.slash.quarter"===d.c&&(t?p+=1:p-=1);var y=new n(null,m,0,p,{type:"stem",pitch2:v,linewidth:b});y.setX(u.x),u.addRight(y)}}}(e.elems,e.stemsUp,e.beams[0],t,e.mainNote)}var g,v,b,y,w,k,x,T,C,A,S,_,M,E,N,B}},4760:function(e){function t(e,t,r){if(t)for(var n=0;n<t.length;n++)if(t[n].header){var i=r.calc(t[n].header,"voicefont","");e=Math.max(e,i.width)}return e}function r(e,t,r){if(e)for(var i=0;i<e.length;i++)n(t,e[i]),r=Math.max(r,e[i].getWidth());return r}function n(e,t){t.x=e}e.exports=function(e,n,i,a,s){var o,c,l=e.padding.left,h=0;for(o=0;o<i.length;o++)i[o].header&&(c=n.calc(i[o].header,"voicefont",""),h=Math.max(h,c.width));h=t(h,a,n),(h=t(h,s,n))&&(h+=n.calc("A","voicefont","").width);var u=0;return u=r(a,l+=h,u),l+(u=r(s,l,u))}},6807:function(e){e.exports=function(e,t,r,n,i){return t+(n-t)/(r-e)*(i-e)}},1564:function(e,t,r){var n=r(6759),i=r(7590),a=r(2432),s=r(4760),o=function(e,t,r,n,i,o,l){for(var h=s(e,n.getTextSize,n.voices,n.brace,n.bracket),u=r,d=0;d<8;d++){var f=a(u,e,l,n,h);if(u=c(o,i.stretchlast,t+e.padding.left,n.w,u,f.spacingUnits,f.minSpace,e.padding.left+e.padding.right),l&&console.log("setXSpace",d,n.w,u,n.minspace),null===u)break}!function(e){for(var t=0;t<e.length;t++)for(var r=e[t],n=1;n<r.children.length-1;n++){var i=r.children[n];if(i.abcelem.rest&&("whole"===i.abcelem.rest.type||"multimeasure"===i.abcelem.rest.type)){var a=r.children[n-1],s=r.children[n+1];i.center(a,s)}}}(n.voices)};function c(e,t,r,n,i,a,s,o){if(e)if(void 0===t){if(n/r<.66)return null}else if(!(1-(n+o)/r<t))return null;return Math.abs(r-n)<2?null:a>0?((i=(r-(n-a*i))/a)*s>50&&(i=50/s),i):null}e.exports=function(e,t,r,a){var s,c,l=r;for(s=0;s<t.lines.length;s++)(c=t.lines[s]).staff&&(o(e,r,a,c.staffGroup,t.formatting,s===t.lines.length-1,!1),c.staffGroup.w>l&&(l=c.staffGroup.w));for(s=0;s<t.lines.length;s++)if((c=t.lines[s]).staffGroup&&c.staffGroup.voices){for(var h=0;h<c.staffGroup.voices.length;h++)n(c.staffGroup.voices[h]);i(e,c.staffGroup)}for(s=0;s<t.lines.length;s++)(c=t.lines[s]).staffGroup&&c.staffGroup.setHeight();return l}},7590:function(e,t,r){var n=r(8613),i=1;function a(e,t,r,n){if(e.specialY[r]){var a=e.specialY[r];n&&(a*=n),e.top+=a+i,t[r]=e.top}}function s(e,t,r){var n,i;for(n=0;n<t.children.length;n++)o(e,i=t.children[n],r);for(n=0;n<t.otherchildren.length;n++)switch((i=t.otherchildren[n]).type){case"CrescendoElem":c(e,i);break;case"DynamicDecoration":l(e,i);break;case"EndingElem":h(e,i)}}function o(e,t,r){for(var n=0;n<t.children.length;n++){var i=t.children[n];for(var a in t.specialY)t.specialY.hasOwnProperty(a)&&i[a]&&(i.pitch=e[a],void 0===i.top&&("TempoElement"===i.type?u(e,i):d(e,i,r),t.pushTop(i.top),t.pushBottom(i.bottom)))}}function c(e,t){t.dynamicHeightAbove?t.pitch=e.dynamicHeightAbove:t.pitch=e.dynamicHeightBelow}function l(e,t){t.volumeHeightAbove?t.pitch=e.volumeHeightAbove:t.pitch=e.volumeHeightBelow}function h(e,t){t.pitch=e.endingHeightAbove-2}function u(e,t){if(t.pitch=e.tempoHeightAbove,t.top=e.tempoHeightAbove,t.bottom=e.tempoHeightAbove,t.note){var r=t.pitch-t.totalHeightInPitches+1;t.note.top=r,t.note.bottom=r;for(var n=0;n<t.note.children.length;n++){var i=t.note.children[n];i.top+=r,i.bottom+=r,i.pitch+=r,void 0!==i.pitch2&&(i.pitch2+=r)}}}function d(e,t,r){switch(t.type){case"part":t.top=e.partHeightAbove+t.height,t.bottom=e.partHeightAbove;break;case"text":case"chord":t.chordHeightAbove?(t.top=e.chordHeightAbove,t.bottom=e.chordHeightAbove):(t.top=e.chordHeightBelow,t.bottom=e.chordHeightBelow);break;case"lyric":t.lyricHeightAbove?(t.top=e.lyricHeightAbove,t.bottom=e.lyricHeightAbove):(t.top=e.lyricHeightBelow+r.vocal/n.STEP,t.bottom=e.lyricHeightBelow+r.vocal/n.STEP,t.pitch-=r.vocal/n.STEP);break;case"debug":t.top=e.chordHeightAbove,t.bottom=e.chordHeightAbove}void 0!==t.pitch&&void 0!==t.top||console.error("RelativeElement position not set.",t.type,t.pitch,t.top,e)}e.exports=function(e,t){for(var r,o=0;o<t.staffs.length;o++){var c=t.staffs[o],l={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};if(e.showDebug&&e.showDebug.indexOf("box")>=0&&(c.originalTop=c.top,c.originalBottom=c.bottom),a(c,l,"lyricHeightAbove"),a(c,l,"chordHeightAbove",c.specialY.chordLines.above),c.specialY.endingHeightAbove&&(c.specialY.chordHeightAbove?c.top+=2:c.top+=c.specialY.endingHeightAbove+i,l.endingHeightAbove=c.top),c.specialY.dynamicHeightAbove&&c.specialY.volumeHeightAbove?(c.top+=Math.max(c.specialY.dynamicHeightAbove,c.specialY.volumeHeightAbove)+i,l.dynamicHeightAbove=c.top,l.volumeHeightAbove=c.top):(a(c,l,"dynamicHeightAbove"),a(c,l,"volumeHeightAbove")),a(c,l,"partHeightAbove"),a(c,l,"tempoHeightAbove"),c.specialY.lyricHeightBelow&&(c.specialY.lyricHeightBelow+=e.spacing.vocal/n.STEP,l.lyricHeightBelow=c.bottom,c.bottom-=c.specialY.lyricHeightBelow+i),c.specialY.chordHeightBelow){l.chordHeightBelow=c.bottom;var h=c.specialY.chordHeightBelow;c.specialY.chordLines.below&&(h*=c.specialY.chordLines.below),c.bottom-=h+i}c.specialY.volumeHeightBelow&&c.specialY.dynamicHeightBelow?(l.volumeHeightBelow=c.bottom,l.dynamicHeightBelow=c.bottom,c.bottom-=Math.max(c.specialY.volumeHeightBelow,c.specialY.dynamicHeightBelow)+i):c.specialY.volumeHeightBelow?(l.volumeHeightBelow=c.bottom,c.bottom-=c.specialY.volumeHeightBelow+i):c.specialY.dynamicHeightBelow&&(l.dynamicHeightBelow=c.bottom,c.bottom-=c.specialY.dynamicHeightBelow+i),e.showDebug&&e.showDebug.indexOf("box")>=0&&(c.positionY=l);for(var u=0;u<c.voices.length;u++)s(l,t.voices[c.voices[u]],e.spacing);if(void 0!==r){var d=r+(c.top-10),f=e.spacing.systemStaffSeparation/n.STEP-d;f>0&&(c.top+=f)}r=2-c.bottom}}},2432:function(e,t,r){var n=r(1897);function i(e){for(var t=0;t<e.length;t++)if(!n.layoutEnded(e[t]))return!1;return!0}function a(e){return e.durationindex-(e.children[e.i]&&e.children[e.i].duration>0?0:5e-7)}e.exports=function(e,t,r,s,o){var c,l=0,h=1e3,u=o;s.startx=u;var d=0;for(r&&console.log("init layout",e),c=0;c<s.voices.length;c++)n.beginLayout(u,s.voices[c]);for(var f=0;!i(s.voices);){for(d=null,c=0;c<s.voices.length;c++)n.layoutEnded(s.voices[c])||d&&!(a(s.voices[c])<d)||(d=a(s.voices[c]));var p=[],m=[];for(c=0;c<s.voices.length;c++)a(s.voices[c])-d>1e-7?m.push(s.voices[c]):p.push(s.voices[c]);f=0;var g=0;for(c=0;c<p.length;c++)n.getNextX(p[c])>u&&(u=n.getNextX(p[c]),f=n.getSpacingUnits(p[c]),g=p[c].spacingduration);for(l+=f,h=Math.min(h,f),r&&console.log("currentduration: ",d,l,h),c=0;c<p.length;c++){var v=n.layoutOneItem(u,e,p[c],t.minPadding),b=v-u;if(b>0){u=v;for(var y=0;y<c;y++)n.shiftRight(b,p[y])}}for(c=0;c<m.length;c++)m[c].spacingduration-=g,n.updateNextX(u,e,m[c]);for(c=0;c<p.length;c++){var w=p[c];n.updateIndices(w)}}for(c=0;c<s.voices.length;c++)n.getNextX(s.voices[c])>u&&(u=n.getNextX(s.voices[c]),f=n.getSpacingUnits(s.voices[c]));return l+=f,s.setWidth(u),{spacingUnits:l,minSpace:h}}},3294:function(e,t,r){var n=r(6807);function i(e){return e.stemsUp}e.exports=function(e){if(e.anchor1&&e.anchor2){e.hasBeam=!!e.anchor1.parent.beam&&e.anchor1.parent.beam===e.anchor2.parent.beam;var t=e.anchor1.parent.beam;if(!e.hasBeam||t.elems[0]===e.anchor1.parent&&t.elems[t.elems.length-1]===e.anchor2.parent||(e.hasBeam=!1),e.hasBeam){var r=i(t)?e.anchor1.x+e.anchor1.w:e.anchor1.x;e.yTextPos=function(e,t,r){if(0===r.beams.length)return 0;r=r.beams[0];var i=e+(t-e)/2;return n(r.startX,r.startY,r.endX,r.endY,i)}(r,e.anchor2.x,t),e.yTextPos+=i(t)?3:-2,e.xTextPos=(o=r,c=e.anchor2.x,o+(c-o)/2),e.top=e.yTextPos+1,e.bottom=e.yTextPos-2,i(t)&&(e.endingHeightAbove=4)}else{e.startNote=Math.max(e.anchor1.parent.top,9)+4,e.endNote=Math.max(e.anchor2.parent.top,9)+4,"rest"===e.anchor1.parent.type&&"rest"!==e.anchor2.parent.type?e.startNote=e.endNote:"rest"===e.anchor2.parent.type&&"rest"!==e.anchor1.parent.type&&(e.endNote=e.startNote);for(var a=0,s=0;s<e.middleElems.length;s++)a=Math.max(a,e.middleElems[s].top);((a+=4)>e.startNote||a>e.endNote)&&(e.startNote=a,e.endNote=a),e.flatBeams&&(e.startNote=Math.max(e.startNote,e.endNote),e.endNote=Math.max(e.startNote,e.endNote)),e.yTextPos=e.startNote+(e.endNote-e.startNote)/2,e.xTextPos=e.anchor1.x+(e.anchor2.x+e.anchor2.w-e.anchor1.x)/2,e.top=e.yTextPos+1}}var o,c;delete e.middleElems,delete e.flatBeams}},6759:function(e,t,r){var n=r(6251),i=r(6807),a=r(3294);function s(e){for(var t=0;t<e.elems.length;t++){var r=e.elems[t];if(r.top)for(var n=l(r,e),i=0;i<r.children.length;i++){var a=r.children[i];if("ornament"===a.klass&&a.bottom-1.5<n){var s=n-a.bottom+1.5;a.bottom+=s,a.top+=s,a.pitch+=s,n=r.top=a.top}}}}function o(e,t){var r=t.getChordDim();if(r){for(var n=0;n<e.length;n++)if(e[n]<r.left)return n>0&&t.putChordInLane(n),void(e[n]=r.right);e.push(r.right),t.putChordInLane(e.length-1)}}function c(e){for(var t=0,r=0;r<e.children.length;r++)e.children[r].chordHeightBelow&&t++;return t}function l(e,t){return t=t.beams[0],i(t.startX,t.startY,t.endX,t.endY,e.x)}e.exports=function(e){for(var t=0;t<e.beams.length;t++)if("BeamElem"===e.beams[t].type){n(e.beams[t]),s(e.beams[t]);for(var r=0;r<e.beams[t].elems.length;r++)e.adjustRange(e.beams[t].elems[r])}for(e.staff.specialY.chordLines=function(e){var t,r,n,i=[0],a=[0];for(t=0;t<e.length;t++){for(r=0;r<e[t].children.length;r++)(n=e[t].children[r]).chordHeightAbove&&o(i,n);for(r=e[t].children.length-1;r>=0;r--)(n=e[t].children[r]).chordHeightBelow&&o(a,n)}return(i.length>1||a.length>1)&&function(e,t,r){for(var n=0;n<e.length;n++){c(e[n]);for(var i=0;i<e[n].children.length;i++){var a=e[n].children[i];a.chordHeightAbove&&a.invertLane(t)}}}(e,i.length,a.length),{above:i.length,below:a.length}}(e.children),t=0;t<e.otherchildren.length;t++){var i=e.otherchildren[t];"TripletElem"===i.type&&(a(i),e.adjustRange(i))}e.staff.top=Math.max(e.staff.top,e.top),e.staff.bottom=Math.min(e.staff.bottom,e.bottom)}},2557:function(e,t,r){var n=r(8613);function i(e){"keyboard"===this.dragMechanism&&0!==this.dragYStep&&this.dragTarget&&d.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,e),this.dragYStep=0}function a(e){switch(e.keyCode){case 38:case 40:e.preventDefault()}}function s(e){var t=!1,r=e.target.dataset.index;switch(e.keyCode){case 13:case 32:t=!0,this.dragTarget=this.selectables[r],this.dragIndex=r,this.dragMechanism="keyboard",h.bind(this)();break;case 38:t=!0,this.dragTarget=this.selectables[r],this.dragIndex=r,this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep--,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*n.STEP+")"));break;case 40:t=!0,this.dragTarget=this.selectables[r],this.dragIndex=r,this.dragMechanism="keyboard",this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep++,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*n.STEP+")"));break;case 9:0!==this.dragYStep&&h.bind(this)()}t&&e.preventDefault()}function o(e,t){var r,n,i,a=function(e,t){for(var r=0;r<e.length;r++)if(t===e[r].svgEl)return r;return-1}(e.selectables,function(e){if("svg"===e.tagName)return e;for(var t=e.getAttribute("selectable");!t;)t="svg"===(e=e.parentElement).tagName||e.getAttribute("selectable");return e}(t.target));return a>=0?(r=(i=function(e,t,r){return e.x<=t.offsetX&&e.x+e.width>=t.offsetX&&e.y<=t.offsetY&&e.y+e.height>=t.offsetY||Math.abs(t.layerY/r-t.offsetY)<3?[t.offsetX,t.offsetY]:[t.layerX,t.layerY]}(e.selectables[a].svgEl.getBBox(),t,e.scale))[0],n=i[1]):(i=function(e,t){var r,n,i=1,a=1;return t.viewBox.baseVal&&(0!==t.viewBox.baseVal.width&&(i=t.viewBox.baseVal.width/t.clientWidth),0!==t.viewBox.baseVal.height&&(a=t.viewBox.baseVal.height/t.clientHeight)),"svg"===e.target.tagName?(r=e.offsetX,n=e.offsetY):(r=e.layerX,n=e.layerY),[r*=i,n*=a]}(t,e.renderer.paper.svg),a=function(e,t,r){for(var n=9999999,i=-1,a=0;a<e.selectables.length&&n>0;a++){var s=e.selectables[a];if(e.getDim(s),s.dim.left<t&&s.dim.right>t&&s.dim.top<r&&s.dim.bottom>r)i=a,n=0;else if(s.dim.top<r&&s.dim.bottom>r){var o=Math.min(Math.abs(s.dim.left-t),Math.abs(s.dim.right-t));o<n&&(n=o,i=a)}else if(s.dim.left<t&&s.dim.right>t){var c=Math.min(Math.abs(s.dim.top-r),Math.abs(s.dim.bottom-r));c<n&&(n=c,i=a)}else{var l=Math.abs(t-s.dim.left)>Math.abs(t-s.dim.right)?Math.abs(t-s.dim.right):Math.abs(t-s.dim.left),h=Math.abs(r-s.dim.top)>Math.abs(r-s.dim.bottom)?Math.abs(r-s.dim.bottom):Math.abs(r-s.dim.top),u=Math.sqrt(l*l+h*h);u<n&&(n=u,i=a)}}return i>=0&&n<=12?i:-1}(e,r=i[0],n=i[1])),{x:r,y:n,clickedOn:a}}function c(e){var t=o(this,e);t.clickedOn>=0&&0===e.button&&(this.dragTarget=this.selectables[t.clickedOn],this.dragIndex=t.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:t.x,y:t.y},this.dragging&&this.dragTarget.isDraggable&&(function(e,t){if(e){var r=g(e.svg);r[t]=!0,v(e.svg,r)}}(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function l(e){if(this.dragTarget&&this.dragging&&this.dragTarget.isDraggable&&"mouse"===this.dragMechanism){var t=o(this,e),r=Math.round((t.y-this.dragMouseStart.y)/n.STEP);r!==this.dragYStep&&(this.dragYStep=r,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+r*n.STEP+")"))}}function h(e){this.dragTarget&&(p.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),d.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,e),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),function(e,t){if(e){var r=g(e.svg);delete r[t],v(e.svg,r)}}(this.renderer.svg,"abcjs-dragging-in-progress"))}function u(e){e>=0&&e<this.selectables.length&&(this.dragTarget=this.selectables[e],this.dragIndex=e,this.dragMechanism="keyboard",h.bind(this)())}function d(e,t,r,n,i){var a=[];if(e.absEl.elemset){for(var s={},o=0;o<e.absEl.elemset.length;o++){var c=e.absEl.elemset[o];if(c)for(var l=c.getAttribute("class").split(" "),h=0;h<l.length;h++)s[l[h]]=!0}for(var d=0;d<Object.keys(s).length;d++)a.push(Object.keys(s)[d])}for(var p={},m=0;m<a.length;m++)f(a[m],"abcjs-v",p,"voice"),f(a[m],"abcjs-l",p,"line"),f(a[m],"abcjs-m",p,"measure");e.staffPos&&(p.staffPos=e.staffPos);for(var g=0;g<this.listeners.length;g++)this.listeners[g](e.absEl.abcelem,e.absEl.tuneNumber,a.join(" "),p,{step:t,max:r,index:n,setSelection:u.bind(this)},i)}function f(e,t,r,n){if(0===e.indexOf(t)){var i=e.replace(t,""),a=parseInt(i,10);""+a===i&&(r[n]=a)}}function p(){for(var e=0;e<this.selected.length;e++)this.selected[e].unhighlight(void 0,this.renderer.foregroundColor);this.selected=[]}function m(e,t){p.bind(this)();for(var r=0;r<this.staffgroups.length;r++)for(var n=this.staffgroups[r].voices,i=0;i<n.length;i++)for(var a=n[i].children,s=0;s<a.length;s++){var o=a[s].abcelem.startChar,c=a[s].abcelem.endChar;(t>o&&e<c||t===e&&t===c)&&(this.selected[this.selected.length]=a[s],a[s].highlight(void 0,this.selectionColor))}}function g(e){var t=e.getAttribute("class");t||(t="");for(var r=t.split(" "),n={},i=0;i<r.length;i++)n[r[i]]=!0;return n}function v(e,t){var r=[];for(var n in t)t.hasOwnProperty(n)&&r.push(n);e.setAttribute("class",r.join(" "))}e.exports=function(e){if(e.rangeHighlight=m,e.dragging)for(var t=0;t<e.selectables.length;t++){var r=e.selectables[t];r.selectable&&(r.svgEl.setAttribute("tabindex",0),r.svgEl.setAttribute("data-index",t),r.svgEl.addEventListener("keydown",a.bind(e)),r.svgEl.addEventListener("keyup",s.bind(e)),r.svgEl.addEventListener("focus",i.bind(e)))}e.renderer.paper.svg.addEventListener("mousedown",c.bind(e)),e.renderer.paper.svg.addEventListener("mousemove",l.bind(e)),e.renderer.paper.svg.addEventListener("mouseup",h.bind(e))}},5781:function(e){e.exports=function(e,t,r){this.rows=[],e&&this.rows.push({move:e}),this.rows.push({separator:t}),r&&this.rows.push({move:r})}},1009:function(e){e.exports=function(e,t,r,n){if(e)for(var i=0;i<e.length;i++){var a=e[i],s=a.getAttribute("highlight");s||(s="fill"),a.setAttribute(s,n);var o=a.getAttribute("class");o||(o=""),o=(o=o.replace(r,"")).replace(t,""),t.length>0&&(o.length>0&&" "!==o.charAt(o.length-1)&&(o+=" "),o+=t),a.setAttribute("class",o)}}},9725:function(e){e.exports=function(e,t,r,n,i,a){this.rows=[],e&&this.rows.push({move:e});var s=t.titleleft?"start":"middle",o=t.titleleft?i:n;this.rows.push({left:o,text:r,font:"subtitlefont",klass:"text subtitle",anchor:s});var c=a.calc(r,"subtitlefont","text subtitle");this.rows.push({move:c.height})}},4101:function(e){var t="http://www.w3.org/2000/svg";function r(e){this.svg=s(),e.appendChild(this.svg)}function n(e,t,r){var n=r-e;return"M "+e+" "+t+" l "+n+" 0 l 0 1  l "+-n+" 0  z "}function i(e,t,r){var n=r-t;return"M "+e+" "+t+" l 0 "+n+" l 1 0  l 0 "+-n+"  z "}r.prototype.clear=function(){if(this.svg){var e=this.svg.parentNode;this.svg=s(),e&&(e.innerHTML="",e.appendChild(this.svg))}},r.prototype.setTitle=function(e){var t=document.createElement("title"),r=document.createTextNode(e);t.appendChild(r),this.svg.insertBefore(t,this.svg.firstChild)},r.prototype.setResponsiveWidth=function(e,t){if(this.svg.setAttribute("viewBox","0 0 "+e+" "+t),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var r=this.svg.parentNode.getAttribute("class");r?r.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",r+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var n=t/e*100;this.svg.parentNode.style["padding-bottom"]=n+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},r.prototype.setSize=function(e,t){this.svg.setAttribute("width",e),this.svg.setAttribute("height",t)},r.prototype.setAttribute=function(e,t){this.svg.setAttribute(e,t)},r.prototype.setScale=function(e){1!==e?(this.svg.style.transform="scale("+e+","+e+")",this.svg.style["-ms-transform"]="scale("+e+","+e+")",this.svg.style["-webkit-transform"]="scale("+e+","+e+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},r.prototype.insertStyles=function(e){var r=document.createElementNS(t,"style");r.textContent=e,this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.setParentStyles=function(e){for(var t in e)e.hasOwnProperty(t)&&this.svg.parentNode&&(this.svg.parentNode.style[t]=e[t]);this.dummySvg&&(document.querySelector("body").removeChild(this.dummySvg),this.dummySvg=null)},r.prototype.rect=function(e){var t=[],r=e.x,a=e.y,s=e.x+e.width,o=e.y+e.height;return t.push(n(r,a,s)),t.push(n(r,o,s)),t.push(i(s,a,o)),t.push(i(r,o,a)),this.path({path:t.join(" "),stroke:"none"})},r.prototype.dottedLine=function(e){var r=document.createElementNS(t,"line");r.setAttribute("x1",e.x1),r.setAttribute("x2",e.x2),r.setAttribute("y1",e.y1),r.setAttribute("y2",e.y2),r.setAttribute("stroke",e.stroke),r.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.rectBeneath=function(e){var r=document.createElementNS(t,"rect");r.setAttribute("x",e.x),r.setAttribute("width",e.width),r.setAttribute("y",e.y),r.setAttribute("height",e.height),e.stroke&&r.setAttribute("stroke",e.stroke),e["stroke-opacity"]&&r.setAttribute("stroke-opacity",e["stroke-opacity"]),e.fill&&r.setAttribute("fill",e.fill),e["fill-opacity"]&&r.setAttribute("fill-opacity",e["fill-opacity"]),this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.text=function(e,r,n){var i=document.createElementNS(t,"text");for(var a in i.setAttribute("stroke","none"),r)r.hasOwnProperty(a)&&i.setAttribute(a,r[a]);for(var s=(""+e).split("\n"),o=0;o<s.length;o++){var c=document.createElementNS(t,"tspan");c.textContent=s[o],c.setAttribute("x",r.x?r.x:0),0!==o&&c.setAttribute("dy","1.2em"),i.appendChild(c)}return n?n.appendChild(i):this.append(i),i},r.prototype.guessWidth=function(e,t){var r,n=this.createDummySvg(),i=this.text(e,t,n);try{r=i.getBBox(),r=isNaN(r.height)||!r.height?{width:t["font-size"]/2,height:t["font-size"]+2}:{width:r.width,height:r.height}}catch(e){r={width:t["font-size"]/2,height:t["font-size"]+2}}return n.removeChild(i),r},r.prototype.createDummySvg=function(){return this.dummySvg||(this.dummySvg=s(),this.dummySvg.setAttribute("style",["display: block !important;","height: 1px;","width: 1px;","position: absolute;"].join("")),document.querySelector("body").appendChild(this.dummySvg)),this.dummySvg};var a={};function s(){var e=document.createElementNS(t,"svg");return e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),e.setAttribute("role","img"),e.setAttribute("fill","currentColor"),e.setAttribute("stroke","currentColor"),e}r.prototype.getTextSize=function(e,t,r){if("number"==typeof e&&(e=""+e),!e||e.match(/^\s+$/))return{width:0,height:0};var n;if(e.length<20&&(n=e+JSON.stringify(t),a[n]))return a[n];var i,s=!r;r||(r=this.text(e,t));try{i=r.getBBox(),i=isNaN(i.height)||!i.height?this.guessWidth(e,t):{width:i.width,height:i.height}}catch(r){i=this.guessWidth(e,t)}return s&&(this.currentGroup?this.currentGroup.removeChild(r):this.svg.removeChild(r)),n&&(a[n]=i),i},r.prototype.openGroup=function(e){e=e||{};var r=document.createElementNS(t,"g");return e.klass&&r.setAttribute("class",e.klass),e.fill&&r.setAttribute("fill",e.fill),e.stroke&&r.setAttribute("stroke",e.stroke),e.prepend?this.svg.insertBefore(r,this.svg.firstChild):this.svg.appendChild(r),this.currentGroup=r,r},r.prototype.closeGroup=function(){var e=this.currentGroup;return this.currentGroup=null,e},r.prototype.path=function(e){var r=document.createElementNS(t,"path");for(var n in e)e.hasOwnProperty(n)&&("path"===n?r.setAttributeNS(null,"d",e.path):r.setAttributeNS(null,n,e[n]));return this.append(r),r},r.prototype.pathToBack=function(e){var r=document.createElementNS(t,"path");for(var n in e)e.hasOwnProperty(n)&&("path"===n?r.setAttributeNS(null,"d",e.path):r.setAttributeNS(null,n,e[n]));return this.prepend(r),r},r.prototype.append=function(e){this.currentGroup?this.currentGroup.appendChild(e):this.svg.appendChild(e)},r.prototype.prepend=function(e){this.currentGroup?this.currentGroup.appendChild(e):this.svg.insertBefore(e,this.svg.firstChild)},r.prototype.setAttributeOnElement=function(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setAttributeNS(null,r,t[r])},r.prototype.moveElementToChild=function(e,t){e.appendChild(t)},e.exports=r},8135:function(e){function t(e,t,r,n,i,a,s,o){if(this.rows=[],e.header&&i){var c=o.calc("X","headerfont","abcjs-header abcjs-meta-top").height;this.addTextIf(a,e.header.left,"headerfont","header meta-top",-c,0,"start",o),this.addTextIf(a+n/2,e.header.center,"headerfont","header meta-top",-c,null,"middle",o),this.addTextIf(a+n,e.header.right,"headerfont","header meta-top",-c,null,"end",o)}i&&this.rows.push({move:s.top});var l=t.titleleft?"start":"middle",h=t.titleleft?a:a+n/2;if(e.title&&this.addTextIf(h,e.title,"titlefont","title meta-top",s.title,0,l,o,"title"),r[0]&&r[0].subtitle&&this.addTextIf(h,r[0].subtitle,"subtitlefont","text meta-top subtitle",s.subtitle,0,l,o,"subtitle"),e.rhythm||e.origin||e.composer){if(this.rows.push({move:s.composer}),e.rhythm&&e.rhythm.length>0){var u=!(!e.composer&&!e.origin);this.addTextIf(a,e.rhythm,"infofont","meta-top rhythm",0,null,"start",o,"rhythm",u)}var d="";e.composer&&(d+=e.composer),e.origin&&(d+=" ("+e.origin+")"),d.length>0&&this.addTextIf(a+n,d,"composerfont","meta-top composer",0,null,"end",o,"composer")}e.author&&e.author.length>0&&this.addTextIf(a+n,e.author,"composerfont","meta-top author",0,0,"end",o,"author"),e.partOrder&&e.partOrder.length>0&&this.addTextIf(a,e.partOrder,"partsfont","meta-top part-order",0,0,"start",o,"partOrder")}t.prototype.addTextIf=function(e,t,r,n,i,a,s,o,c,l){if(t&&(i&&this.rows.push({move:i}),this.rows.push({left:e,text:t,font:r,klass:n,anchor:s,absElemType:c}),!l)){var h=o.calc(t,r,n);this.rows.push({move:h.height}),a&&this.rows.push({move:a})}},e.exports=t},2080:function(e,t,r){var n=r(1009);e.exports=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#000000"),n(this.elemset,"",e,t)}},1185:function(e){e.exports="6.0.0-beta.33"}},t={},function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}(1045);var e,t}));
flowchart.min.js
wget 'https://sme10.lists2.roe3.org/kodbox/static/app/vender/markdown/flowchart.min.js'
View Content
// flowchart.js, v1.17.1
// Copyright (c)2022 Adriano Raiano (adrai).
// Distributed under MIT license
// http://adrai.github.io/flowchart.js

!function(t,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i(require("Raphael"));else if("function"==typeof define&&define.amd)define(["Raphael"],i);else{var e=i("object"==typeof exports?require("Raphael"):t.Raphael);for(var s in e)("object"==typeof exports?exports:t)[s]=e[s]}}(this,function(t){return function(t){function i(s){if(e[s])return e[s].exports;var n=e[s]={exports:{},id:s,loaded:!1};return t[s].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}var e={};return i.m=t,i.c=e,i.p="",i(0)}([function(t,i,e){e(9);var s=e(4);e(15);var n={parse:s};"undefined"!=typeof window&&(window.flowchart=n),t.exports=n},function(t,i){function e(t,i){if(!t||"function"==typeof t)return i;var s={};for(var n in i)s[n]=i[n];for(n in t)t[n]&&("object"==typeof s[n]?s[n]=e(s[n],t[n]):s[n]=t[n]);return s}function s(t,i){if("function"==typeof Object.create)t.super_=i,t.prototype=Object.create(i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});else{t.super_=i;var e=function(){};e.prototype=i.prototype,t.prototype=new e,t.prototype.constructor=t}}t.exports={defaults:e,inherits:s}},function(t,i,e){function s(t,i,e){this.chart=t,this.group=this.chart.paper.set(),this.symbol=e,this.connectedTo=[],this.symbolType=i.symbolType,this.flowstate=i.flowstate||"future",this.lineStyle=i.lineStyle||{},this.key=i.key||"",this.leftLines=[],this.rightLines=[],this.topLines=[],this.bottomLines=[],this.params=i.params,this.next_direction=i.next&&i.direction_next?i.direction_next:void 0,this.text=this.chart.paper.text(0,0,i.text),i.key&&(this.text.node.id=i.key+"t"),this.text.node.setAttribute("class",this.getAttr("class")+"t"),this.text.attr({"text-anchor":"start",x:this.getAttr("text-margin"),fill:this.getAttr("font-color"),"font-size":this.getAttr("font-size")});var s=this.getAttr("font"),n=this.getAttr("font-family"),o=this.getAttr("font-weight");s&&this.text.attr({font:s}),n&&this.text.attr({"font-family":n}),o&&this.text.attr({"font-weight":o}),i.link&&this.text.attr("href",i.link),i.function&&(this.text.attr({cursor:"pointer"}),this.text.node.addEventListener("click",function(t){window[i.function](t,i)},!1)),i.target&&this.text.attr("target",i.target);var h=this.getAttr("maxWidth");if(h){for(var r=i.text.split(" "),a="",l=0,p=r.length;l<p;l++){var y=r[l];this.text.attr("text",a+" "+y),a+=this.text.getBBox().width>h?"\n"+y:" "+y}this.text.attr("text",a.substring(1))}if(this.group.push(this.text),e){var x=this.getAttr("text-margin");e.attr({fill:this.getAttr("fill"),stroke:this.getAttr("element-color"),"stroke-width":this.getAttr("line-width"),width:this.text.getBBox().width+2*x,height:this.text.getBBox().height+2*x}),e.node.setAttribute("class",this.getAttr("class"));var g=this.getAttr("roundness");isNaN(g)||(e.node.setAttribute("ry",g),e.node.setAttribute("rx",g)),i.link&&e.attr("href",i.link),i.target&&e.attr("target",i.target),i.function&&(e.node.addEventListener("click",function(t){window[i.function](t,i)},!1),e.attr({cursor:"pointer"})),i.key&&(e.node.id=i.key),this.group.push(e),e.insertBefore(this.text),this.text.attr({y:e.getBBox().height/2}),this.initialize()}}var n=e(3),o=n.drawLine,h=n.checkLineIntersection;s.prototype.getAttr=function(t){if(this.chart){var i,e=this.chart.options?this.chart.options[t]:void 0,s=this.chart.options.symbols?this.chart.options.symbols[this.symbolType][t]:void 0;return this.chart.options.flowstate&&this.chart.options.flowstate[this.flowstate]&&(i=this.chart.options.flowstate[this.flowstate][t]),i||s||e}},s.prototype.initialize=function(){this.group.transform("t"+this.getAttr("line-width")+","+this.getAttr("line-width")),this.width=this.group.getBBox().width,this.height=this.group.getBBox().height},s.prototype.getCenter=function(){return{x:this.getX()+this.width/2,y:this.getY()+this.height/2}},s.prototype.getX=function(){return this.group.getBBox().x},s.prototype.getY=function(){return this.group.getBBox().y},s.prototype.shiftX=function(t){this.group.transform("t"+(this.getX()+t)+","+this.getY())},s.prototype.setX=function(t){this.group.transform("t"+t+","+this.getY())},s.prototype.shiftY=function(t){this.group.transform("t"+this.getX()+","+(this.getY()+t))},s.prototype.setY=function(t){this.group.transform("t"+this.getX()+","+t)},s.prototype.getTop=function(){var t=this.getY(),i=this.getX()+this.width/2;return{x:i,y:t}},s.prototype.getBottom=function(){var t=this.getY()+this.height,i=this.getX()+this.width/2;return{x:i,y:t}},s.prototype.getLeft=function(){var t=this.getY()+this.group.getBBox().height/2,i=this.getX();return{x:i,y:t}},s.prototype.getRight=function(){var t=this.getY()+this.group.getBBox().height/2,i=this.getX()+this.group.getBBox().width;return{x:i,y:t}},s.prototype.render=function(){if(this.next){var t=this,i=this.getAttr("line-length");if("right"===this.next_direction){var e=this.getRight();this.next.isPositioned||(this.next.setY(e.y-this.next.height/2),this.next.shiftX(this.group.getBBox().x+this.width+i),function e(){for(var s,n=!1,o=0,h=t.chart.symbols.length;o<h;o++){s=t.chart.symbols[o];var r=Math.abs(s.getCenter().x-t.next.getCenter().x);if(s.getCenter().y>t.next.getCenter().y&&r<=t.next.width/2){n=!0;break}}if(n){if("end"===t.next.symbolType)return;t.next.setX(s.getX()+s.width+i),e()}}(),this.next.isPositioned=!0,this.next.render())}else if("left"===this.next_direction){var s=this.getLeft();this.next.isPositioned||(this.next.setY(s.y-this.next.height/2),this.next.shiftX(-(this.group.getBBox().x+this.width+i)),function e(){for(var s,n=!1,o=0,h=t.chart.symbols.length;o<h;o++){s=t.chart.symbols[o];var r=Math.abs(s.getCenter().x-t.next.getCenter().x);if(s.getCenter().y>t.next.getCenter().y&&r<=t.next.width/2){n=!0;break}}if(n){if("end"===t.next.symbolType)return;t.next.setX(s.getX()+s.width+i),e()}}(),this.next.isPositioned=!0,this.next.render())}else{var n=this.getBottom();this.next.isPositioned||(this.next.shiftY(this.getY()+this.height+i),this.next.setX(n.x-this.next.width/2),this.next.isPositioned=!0,this.next.render())}}},s.prototype.renderLines=function(){this.next&&(this.next_direction?this.drawLineTo(this.next,this.getAttr("arrow-text")||"",this.next_direction):this.drawLineTo(this.next,this.getAttr("arrow-text")||""))},s.prototype.drawLineTo=function(t,i,e){this.connectedTo.indexOf(t)<0&&this.connectedTo.push(t);var s,n,r=this.getCenter().x,a=this.getCenter().y,l=this.getRight(),p=this.getBottom(),y=this.getTop(),x=this.getLeft(),g=t.getCenter().x,f=t.getCenter().y,c=t.getTop(),d=t.getRight(),m=t.getLeft(),u=r===g,b=a===f,_=a<f,v=a>f||this===t,w=r>g,L=r<g,k=0,B=this.getAttr("line-length"),A=this.getAttr("line-width");if(e&&"bottom"!==e||!u||!_)if(e&&"right"!==e||!b||!L)if(e&&"left"!==e||!b||!w)if(e&&"right"!==e||!u||!v)if(e&&"right"!==e||!u||!_)if(e&&"bottom"!==e||!w)if(e&&"bottom"!==e||!L||!_)if(e&&"bottom"!==e||!L)if(e&&"right"===e&&w)n=10*Math.max(t.topLines.length,this.rightLines.length),s=o(this.chart,l,[{x:l.x+B/2,y:l.y},{x:l.x+B/2,y:c.y-B/2-n},{x:c.x,y:c.y-B/2-n},{x:c.x,y:c.y}],i),this.rightLines.push(s),t.topLines.push(s),this.rightStart=!0,t.topEnd=!0,k=l.x+B/2;else if(e&&"right"===e&&L)n=10*Math.max(t.topLines.length,this.rightLines.length),s=o(this.chart,l,[{x:c.x,y:l.y-n},{x:c.x,y:c.y-n}],i),this.rightLines.push(s),t.topLines.push(s),this.rightStart=!0,t.topEnd=!0,k=l.x+B/2;else if(e&&"bottom"===e&&u&&v)n=10*Math.max(t.topLines.length,this.bottomLines.length),s=o(this.chart,p,[{x:p.x,y:p.y+B/2-n},{x:l.x+B/2,y:p.y+B/2-n},{x:l.x+B/2,y:c.y-B/2-n},{x:c.x,y:c.y-B/2-n},{x:c.x,y:c.y}],i),this.bottomLines.push(s),t.topLines.push(s),this.bottomStart=!0,t.topEnd=!0,k=p.x+B/2;else if("left"===e&&u&&v){var M=x.x-B/2;m.x<x.x&&(M=m.x-B/2),n=10*Math.max(t.topLines.length,this.leftLines.length),s=o(this.chart,x,[{x:M,y:x.y-n},{x:M,y:c.y-B/2-n},{x:c.x,y:c.y-B/2-n},{x:c.x,y:c.y}],i),this.leftLines.push(s),t.topLines.push(s),this.leftStart=!0,t.topEnd=!0,k=x.x}else"left"===e?(n=10*Math.max(t.topLines.length,this.leftLines.length),s=o(this.chart,x,[{x:c.x+(x.x-c.x)/2,y:x.y},{x:c.x+(x.x-c.x)/2,y:c.y-B/2-n},{x:c.x,y:c.y-B/2-n},{x:c.x,y:c.y}],i),this.leftLines.push(s),t.topLines.push(s),this.leftStart=!0,t.topEnd=!0,k=x.x):"top"===e&&(n=10*Math.max(t.topLines.length,this.topLines.length),s=o(this.chart,y,[{x:y.x,y:c.y-B/2-n},{x:c.x,y:c.y-B/2-n},{x:c.x,y:c.y}],i),this.topLines.push(s),t.topLines.push(s),this.topStart=!0,t.topEnd=!0,k=y.x);else n=10*Math.max(t.topLines.length,this.bottomLines.length),s=o(this.chart,p,[{x:p.x,y:p.y+B/2-n},{x:p.x+(p.x-c.x)/2,y:p.y+B/2-n},{x:p.x+(p.x-c.x)/2,y:c.y-B/2-n},{x:c.x,y:c.y-B/2-n},{x:c.x,y:c.y}],i),this.bottomLines.push(s),t.topLines.push(s),this.bottomStart=!0,t.topEnd=!0,k=p.x+(p.x-c.x)/2;else n=10*Math.max(t.topLines.length,this.bottomLines.length),s=o(this.chart,p,[{x:p.x,y:c.y-B/2-n},{x:c.x,y:c.y-B/2-n},{x:c.x,y:c.y}],i),this.bottomLines.push(s),t.topLines.push(s),this.bottomStart=!0,t.topEnd=!0,k=p.x,c.x>k&&(k=c.x);else n=10*Math.max(t.topLines.length,this.bottomLines.length),s=this.leftEnd&&v?o(this.chart,p,[{x:p.x,y:p.y+B/2-n},{x:p.x+(p.x-c.x)/2,y:p.y+B/2-n},{x:p.x+(p.x-c.x)/2,y:c.y-B/2-n},{x:c.x,y:c.y-B/2-n},{x:c.x,y:c.y}],i):o(this.chart,p,[{x:p.x,y:c.y-B/2-n},{x:c.x,y:c.y-B/2-n},{x:c.x,y:c.y}],i),this.bottomLines.push(s),t.topLines.push(s),this.bottomStart=!0,t.topEnd=!0,k=p.x+(p.x-c.x)/2;else n=10*Math.max(t.topLines.length,this.rightLines.length),s=o(this.chart,l,[{x:l.x+B/2,y:l.y-n},{x:l.x+B/2,y:c.y-B/2-n},{x:c.x,y:c.y-B/2-n},{x:c.x,y:c.y}],i),this.rightLines.push(s),t.topLines.push(s),this.rightStart=!0,t.topEnd=!0,k=l.x+B/2;else n=10*Math.max(t.topLines.length,this.rightLines.length),s=o(this.chart,l,[{x:l.x+B/2,y:l.y-n},{x:l.x+B/2,y:c.y-B/2-n},{x:c.x,y:c.y-B/2-n},{x:c.x,y:c.y}],i),this.rightLines.push(s),t.topLines.push(s),this.rightStart=!0,t.topEnd=!0,k=l.x+B/2;else 0===t.rightLines.length&&0===this.leftLines.length?s=o(this.chart,x,d,i):(n=10*Math.max(t.rightLines.length,this.leftLines.length),s=o(this.chart,l,[{x:l.x,y:l.y-n},{x:l.x,y:d.y-n},{x:d.x,y:d.y-n},{x:d.x,y:d.y}],i)),this.leftLines.push(s),t.rightLines.push(s),this.leftStart=!0,t.rightEnd=!0,k=d.x;else 0===t.leftLines.length&&0===this.rightLines.length?s=o(this.chart,l,m,i):(n=10*Math.max(t.leftLines.length,this.rightLines.length),s=o(this.chart,l,[{x:l.x,y:l.y-n},{x:l.x,y:m.y-n},{x:m.x,y:m.y-n},{x:m.x,y:m.y}],i)),this.rightLines.push(s),t.leftLines.push(s),this.rightStart=!0,t.leftEnd=!0,k=m.x;else 0===t.topLines.length&&0===this.bottomLines.length?s=o(this.chart,p,c,i):(n=10*Math.max(t.topLines.length,this.bottomLines.length),s=o(this.chart,p,[{x:c.x,y:c.y-n},{x:c.x,y:c.y}],i)),this.bottomLines.push(s),t.topLines.push(s),this.bottomStart=!0,t.topEnd=!0,k=p.x;if(this.lineStyle[t.key]&&s&&s.attr(this.lineStyle[t.key]),s){for(var O=0,X=this.chart.lines.length;O<X;O++)for(var T=this.chart.lines[O],S=T.attr("path"),C=s.attr("path"),Y=0,P=S.length-1;Y<P;Y++){var j=[];j.push(["M",S[Y][1],S[Y][2]]),j.push(["L",S[Y+1][1],S[Y+1][2]]);for(var E=j[0][1],z=j[0][2],F=j[1][1],R=j[1][2],N=0,$=C.length-1;N<$;N++){var V=[];V.push(["M",C[N][1],C[N][2]]),V.push(["L",C[N+1][1],C[N+1][2]]);var G=V[0][1],I=V[0][2],W=V[1][1],Q=V[1][2],q=h(E,z,F,R,G,I,W,Q);if(q.onLine1&&q.onLine2){var J;I===Q?G>W?(J=["L",q.x+2*A,I],C.splice(N+1,0,J),J=["C",q.x+2*A,I,q.x,I-4*A,q.x-2*A,I],C.splice(N+2,0,J),s.attr("path",C)):(J=["L",q.x-2*A,I],C.splice(N+1,0,J),J=["C",q.x-2*A,I,q.x,I-4*A,q.x+2*A,I],C.splice(N+2,0,J),s.attr("path",C)):I>Q?(J=["L",G,q.y+2*A],C.splice(N+1,0,J),J=["C",G,q.y+2*A,G+4*A,q.y,G,q.y-2*A],C.splice(N+2,0,J),s.attr("path",C)):(J=["L",G,q.y-2*A],C.splice(N+1,0,J),J=["C",G,q.y-2*A,G+4*A,q.y,G,q.y+2*A],C.splice(N+2,0,J),s.attr("path",C)),N+=2}}}this.chart.lines.push(s),(void 0===this.chart.minXFromSymbols||this.chart.minXFromSymbols>x.x)&&(this.chart.minXFromSymbols=x.x)}(!this.chart.maxXFromLine||this.chart.maxXFromLine&&k>this.chart.maxXFromLine)&&(this.chart.maxXFromLine=k)},t.exports=s},function(t,i){function e(t,i,e){var s,n,o="M{0},{1}";for(s=2,n=2*e.length+2;s<n;s+=2)o+=" L{"+s+"},{"+(s+1)+"}";var h=[i.x,i.y];for(s=0,n=e.length;s<n;s++)h.push(e[s].x),h.push(e[s].y);var r=t.paper.path(o,h);r.attr("stroke",t.options["element-color"]),r.attr("stroke-width",t.options["line-width"]);var a=t.options.font,l=t.options["font-family"],p=t.options["font-weight"];return a&&r.attr({font:a}),l&&r.attr({"font-family":l}),p&&r.attr({"font-weight":p}),r}function s(t,i,e,s){var n,o;"[object Array]"!==Object.prototype.toString.call(e)&&(e=[e]);var h="M{0},{1}";for(n=2,o=2*e.length+2;n<o;n+=2)h+=" L{"+n+"},{"+(n+1)+"}";var r=[i.x,i.y];for(n=0,o=e.length;n<o;n++)r.push(e[n].x),r.push(e[n].y);var a=t.paper.path(h,r);a.attr({stroke:t.options["line-color"],"stroke-width":t.options["line-width"],"arrow-end":t.options["arrow-end"]});var l=t.options.font,p=t.options["font-family"],y=t.options["font-weight"];if(l&&a.attr({font:l}),p&&a.attr({"font-family":p}),y&&a.attr({"font-weight":y}),s){var x=!1,g=t.paper.text(0,0,s),f="start",c=!1,d=e[0];i.y===d.y&&(c=!0);var m=0,u=0;x?(m=i.x>d.x?i.x-(i.x-d.x)/2:d.x-(d.x-i.x)/2,u=i.y>d.y?i.y-(i.y-d.y)/2:d.y-(d.y-i.y)/2,c?(m-=g.getBBox().width/2,u-=t.options["text-margin"]):(m+=t.options["text-margin"],u-=g.getBBox().height/2)):(m=i.x,u=i.y,c?(i.x>d.x?(m-=t.options["text-margin"]/2,f="end"):m+=t.options["text-margin"]/2,u-=t.options["text-margin"]):(m+=t.options["text-margin"]/2,u+=t.options["text-margin"],i.y>d.y&&(u-=2*t.options["text-margin"]))),g.attr({"text-anchor":f,"font-size":t.options["font-size"],fill:t.options["font-color"],x:m,y:u}),l&&g.attr({font:l}),p&&g.attr({"font-family":p}),y&&g.attr({"font-weight":y})}return a}function n(t,i,e,s,n,o,h,r){var a,l,p,y,x,g={x:null,y:null,onLine1:!1,onLine2:!1};return a=(r-o)*(e-t)-(h-n)*(s-i),0===a?g:(l=i-o,p=t-n,y=(h-n)*l-(r-o)*p,x=(e-t)*l-(s-i)*p,l=y/a,p=x/a,g.x=t+l*(e-t),g.y=i+l*(s-i),l>0&&l<1&&(g.onLine1=!0),p>0&&p<1&&(g.onLine2=!0),g)}t.exports={drawPath:e,drawLine:s,checkLineIntersection:n}},function(t,i,e){function s(t){function i(t){var i=t.indexOf("(")+1,e=t.indexOf(")");return i>=0&&e>=0?t.substring(i,e):"{}"}function e(t){var i=t.indexOf("(")+1,e=t.indexOf(")");return i>=0&&e>=0?t.substring(i,e):""}function s(t){var i=t.indexOf("(")+1,e=t.indexOf(")");return i>=0&&e>=0?f.symbols[t.substring(0,i-1)]:f.symbols[t]}function x(t){var i="next",e=t.indexOf("(")+1,s=t.indexOf(")");return e>=0&&s>=0&&(i=F.substring(e,s),i.indexOf(",")<0&&"yes"!==i&&"no"!==i&&(i="next, "+i)),i}function g(t){var i=t.indexOf("(")+1,e=t.indexOf(")"),s=t.substring(i,e);s.indexOf(",")>0&&(s=s.substring(0,s.indexOf(",")));var n=s.split("@");if(n.length>1)return i>=0&&e>=0?n[1]:""}t=t||"",t=t.trim();for(var f={symbols:{},start:null,drawSVG:function(t,i){function e(t){if(g[t.key])return g[t.key];switch(t.symbolType){case"start":g[t.key]=new o(x,t);break;case"end":g[t.key]=new h(x,t);break;case"operation":g[t.key]=new r(x,t);break;case"inputoutput":g[t.key]=new a(x,t);break;case"subroutine":g[t.key]=new l(x,t);break;case"condition":g[t.key]=new p(x,t);break;case"parallel":g[t.key]=new y(x,t);break;default:return new Error("Wrong symbol type!")}return g[t.key]}var s=this;this.diagram&&this.diagram.clean();var x=new n(t,i);this.diagram=x;var g={};!function t(i,n,o){var h=e(i);return s.start===i?x.startWith(h):n&&o&&!n.pathOk&&(n instanceof p?(o.yes===i&&n.yes(h),o.no===i&&n.no(h)):n instanceof y?(o.path1===i&&n.path1(h),o.path2===i&&n.path2(h),o.path3===i&&n.path3(h)):n.then(h)),h.pathOk?h:(h instanceof p?(i.yes&&t(i.yes,h,i),i.no&&t(i.no,h,i)):h instanceof y?(i.path1&&t(i.path1,h,i),i.path2&&t(i.path2,h,i),i.path3&&t(i.path3,h,i)):i.next&&t(i.next,h,i),h)}(this.start),x.render()},clean:function(){this.diagram.clean()},options:function(){return this.diagram.options}},c=[],d=0,m=1,u=t.length;m<u;m++)if("\n"===t[m]&&"\\"!==t[m-1]){var b=t.substring(d,m);d=m+1,c.push(b.replace(/\\\n/g,"\n"))}d<t.length&&c.push(t.substr(d));for(var _=1,v=c.length;_<v;){var w=c[_];w.indexOf("->")<0&&w.indexOf("=>")<0&&w.indexOf("@>")<0?(c[_-1]+="\n"+w,c.splice(_,1),v--):_++}for(;c.length>0;){var L=c.splice(0,1)[0].trim();if(L.indexOf("=>")>=0){var k=L.split("=>"),B={key:k[0].replace(/\(.*\)/,""),symbolType:k[1],text:null,link:null,target:null,flowstate:null,function:null,lineStyle:{},params:{}},A=k[0].match(/\((.*)\)/);if(A&&A.length>1)for(var M=A[1].split(","),O=0;O<M.length;O++){var X=M[O].split("=");2==X.length&&(B.params[X[0]]=X[1])}var T;if(B.symbolType.indexOf(": ")>=0&&(T=B.symbolType.split(": "),B.symbolType=T.shift(),B.text=T.join(": ")),B.text&&B.text.indexOf(":$")>=0?(T=B.text.split(":$"),B.text=T.shift(),B.function=T.join(":$")):B.symbolType.indexOf(":$")>=0?(T=B.symbolType.split(":$"),B.symbolType=T.shift(),B.function=T.join(":$")):B.text&&B.text.indexOf(":>")>=0?(T=B.text.split(":>"),B.text=T.shift(),B.link=T.join(":>")):B.symbolType.indexOf(":>")>=0&&(T=B.symbolType.split(":>"),B.symbolType=T.shift(),B.link=T.join(":>")),B.symbolType.indexOf("\n")>=0&&(B.symbolType=B.symbolType.split("\n")[0]),B.link){var S=B.link.indexOf("[")+1,C=B.link.indexOf("]");S>=0&&C>=0&&(B.target=B.link.substring(S,C),B.link=B.link.substring(0,S-1))}if(B.text&&B.text.indexOf("|")>=0){var Y=B.text.split("|");B.flowstate=Y.pop().trim(),B.text=Y.join("|")}f.symbols[B.key]=B}else if(L.indexOf("->")>=0){var P=g(L);P&&(L=L.replace("@"+P,""));for(var j=L.split("->"),E=0,z=j.length;E<z;E++){var F=j[E],R=e(F);"true"!==R&&"false"!==R||(F=F.replace("true","yes"),F=F.replace("false","no"));var N=x(F),$=s(F),V=null;if(N.indexOf(",")>=0){var G=N.split(",");N=G[0],V=G[1].trim()}if(P&&("condition"===$.symbolType?"yes"===N||"true"===N?$.yes_annotation=P:$.no_annotation=P:"parallel"===$.symbolType&&("path1"===N?$.path1_annotation=P:"path2"===N?$.path2_annotation=P:"path3"===N&&($.path3_annotation=P)),P=null),f.start||(f.start=$),E+1<z){var I=j[E+1];$[N]=s(I),$["direction_"+N]=V,V=null}}}else if(L.indexOf("@>")>=0)for(var W=L.split("@>"),Q=0,q=W.length;Q<q;Q++)if(Q+1!==q){var J=s(W[Q]),D=s(W[Q+1]);J.lineStyle[D.key]=JSON.parse(i(W[Q+1]))}}return f}var n=e(7),o=e(13),h=e(10),r=e(12),a=e(11),l=e(14),p=e(5),y=e(6);t.exports=s},function(t,i,e){function s(t,i){i=i||{},n.call(this,t,i),this.yes_annotation=i.yes_annotation,this.no_annotation=i.no_annotation,this.textMargin=this.getAttr("text-margin"),this.yes_direction=i.direction_yes,this.no_direction=i.direction_no,this.no_direction||"right"!==this.yes_direction?this.yes_direction||"bottom"!==this.no_direction||(this.yes_direction="right"):this.no_direction="bottom",this.yes_direction=this.yes_direction||"bottom",this.no_direction=this.no_direction||"right",this.text.attr({x:2*this.textMargin});var e=this.text.getBBox().width+3*this.textMargin;e+=e/2;var s=this.text.getBBox().height+2*this.textMargin;s+=s/2,s=Math.max(.5*e,s);var o=e/4,h=s/4;this.text.attr({x:o+this.textMargin/2});var a={x:o,y:h},l=[{x:o-e/4,y:h+s/4},{x:o-e/4+e/2,y:h+s/4+s/2},{x:o-e/4+e,y:h+s/4},{x:o-e/4+e/2,y:h+s/4-s/2},{x:o-e/4,y:h+s/4}],p=r(t,a,l);p.attr({stroke:this.getAttr("element-color"),"stroke-width":this.getAttr("line-width"),fill:this.getAttr("fill")}),i.link&&p.attr("href",i.link),i.target&&p.attr("target",i.target),i.key&&(p.node.id=i.key),p.node.setAttribute("class",this.getAttr("class")),this.text.attr({y:p.getBBox().height/2}),this.group.push(p),p.insertBefore(this.text),this.symbol=p,this.initialize()}var n=e(2),o=e(1).inherits,h=e(3),r=h.drawPath;o(s,n),s.prototype.render=function(){var t=this;this.yes_direction&&(this[this.yes_direction+"_symbol"]=this.yes_symbol),this.no_direction&&(this[this.no_direction+"_symbol"]=this.no_symbol);var i=this.getAttr("line-length");if(this.bottom_symbol){var e=this.getBottom();this.bottom_symbol.isPositioned||(this.bottom_symbol.shiftY(this.getY()+this.height+i),this.bottom_symbol.setX(e.x-this.bottom_symbol.width/2),this.bottom_symbol.isPositioned=!0,this.bottom_symbol.render())}if(this.right_symbol){var s=this.getRight();this.right_symbol.isPositioned||(this.right_symbol.setY(s.y-this.right_symbol.height/2),this.right_symbol.shiftX(this.group.getBBox().x+this.width+i),function e(){for(var s,n=!1,o=0,h=t.chart.symbols.length;o<h;o++)if(s=t.chart.symbols[o],!t.params["align-next"]||"no"!==t.params["align-next"]){var r=Math.abs(s.getCenter().x-t.right_symbol.getCenter().x);if(s.getCenter().y>t.right_symbol.getCenter().y&&r<=t.right_symbol.width/2){n=!0;break}}if(n){if("end"===t.right_symbol.symbolType)return;t.right_symbol.setX(s.getX()+s.width+i),e()}}(),this.right_symbol.isPositioned=!0,this.right_symbol.render())}if(this.left_symbol){var n=this.getLeft();this.left_symbol.isPositioned||(this.left_symbol.setY(n.y-this.left_symbol.height/2),this.left_symbol.shiftX(-(this.group.getBBox().x+this.width+i)),function e(){for(var s,n=!1,o=0,h=t.chart.symbols.length;o<h;o++)if(s=t.chart.symbols[o],!t.params["align-next"]||"no"!==t.params["align-next"]){var r=Math.abs(s.getCenter().x-t.left_symbol.getCenter().x);if(s.getCenter().y>t.left_symbol.getCenter().y&&r<=t.left_symbol.width/2){n=!0;break}}if(n){if("end"===t.left_symbol.symbolType)return;t.left_symbol.setX(s.getX()+s.width+i),e()}}(),this.left_symbol.isPositioned=!0,this.left_symbol.render())}},s.prototype.renderLines=function(){this.yes_symbol&&this.drawLineTo(this.yes_symbol,this.yes_annotation?this.yes_annotation:this.getAttr("yes-text"),this.yes_direction),this.no_symbol&&this.drawLineTo(this.no_symbol,this.no_annotation?this.no_annotation:this.getAttr("no-text"),this.no_direction)},t.exports=s},function(t,i,e){function s(t,i){var e=t.paper.rect(0,0,0,0);i=i||{},n.call(this,t,i,e),this.path1_annotation=i.path1_annotation||"",this.path2_annotation=i.path2_annotation||"",this.path3_annotation=i.path3_annotation||"",this.textMargin=this.getAttr("text-margin"),this.path1_direction="bottom",this.path2_direction="right",this.path3_direction="top",this.params=i.params,"path1"===i.direction_next&&!i[i.direction_next]&&i.next&&(i[i.direction_next]=i.next),"path2"===i.direction_next&&!i[i.direction_next]&&i.next&&(i[i.direction_next]=i.next),"path3"===i.direction_next&&!i[i.direction_next]&&i.next&&(i[i.direction_next]=i.next),i.path1&&i.direction_path1&&i.path2&&!i.direction_path2&&i.path3&&!i.direction_path3?"right"===i.direction_path1?(this.path2_direction="bottom",this.path1_direction="right",this.path3_direction="top"):"top"===i.direction_path1?(this.path2_direction="right",this.path1_direction="top",this.path3_direction="bottom"):"left"===i.direction_path1?(this.path2_direction="right",this.path1_direction="left",this.path3_direction="bottom"):(this.path2_direction="right",this.path1_direction="bottom",this.path3_direction="top"):i.path1&&!i.direction_path1&&i.path2&&i.direction_path2&&i.path3&&!i.direction_path3?"right"===i.direction_path2?(this.path1_direction="bottom",this.path2_direction="right",this.path3_direction="top"):"left"===i.direction_path2?(this.path1_direction="bottom",this.path2_direction="left",this.path3_direction="right"):(this.path1_direction="right",this.path2_direction="bottom",this.path3_direction="top"):i.path1&&!i.direction_path1&&i.path2&&!i.direction_path2&&i.path3&&i.direction_path3?"right"===i.direction_path2?(this.path1_direction="bottom",this.path2_direction="top",this.path3_direction="right"):"left"===i.direction_path2?(this.path1_direction="bottom",this.path2_direction="right",this.path3_direction="left"):(this.path1_direction="right",this.path2_direction="bottom",this.path3_direction="top"):(this.path1_direction=i.direction_path1,this.path2_direction=i.direction_path2,this.path3_direction=i.direction_path3),this.path1_direction=this.path1_direction||"bottom",this.path2_direction=this.path2_direction||"right",this.path3_direction=this.path3_direction||"top",this.initialize()}var n=e(2),o=e(1).inherits;o(s,n),s.prototype.render=function(){this.path1_direction&&(this[this.path1_direction+"_symbol"]=this.path1_symbol),this.path2_direction&&(this[this.path2_direction+"_symbol"]=this.path2_symbol),this.path3_direction&&(this[this.path3_direction+"_symbol"]=this.path3_symbol);var t=this.getAttr("line-length");if(this.bottom_symbol){var i=this.getBottom();this.bottom_symbol.isPositioned||(this.bottom_symbol.shiftY(this.getY()+this.height+t),this.bottom_symbol.setX(i.x-this.bottom_symbol.width/2),this.bottom_symbol.isPositioned=!0,this.bottom_symbol.render())}if(this.top_symbol){var e=this.getTop();this.top_symbol.isPositioned||(this.top_symbol.shiftY(this.getY()-this.top_symbol.height-t),this.top_symbol.setX(e.x+this.top_symbol.width),this.top_symbol.isPositioned=!0,this.top_symbol.render())}var s=this;if(this.left_symbol){var n=this.getLeft();this.left_symbol.isPositioned||(this.left_symbol.setY(n.y-this.left_symbol.height/2),this.left_symbol.shiftX(-(this.group.getBBox().x+this.width+t)),function i(){for(var e,n=!1,o=0,h=s.chart.symbols.length;o<h;o++)if(e=s.chart.symbols[o],!s.params["align-next"]||"no"!==s.params["align-next"]){var r=Math.abs(e.getCenter().x-s.left_symbol.getCenter().x);if(e.getCenter().y>s.left_symbol.getCenter().y&&r<=s.left_symbol.width/2){n=!0;break}}if(n){if("end"===s.left_symbol.symbolType)return;s.left_symbol.setX(e.getX()+e.width+t),i()}}(),this.left_symbol.isPositioned=!0,this.left_symbol.render())}if(this.right_symbol){var o=this.getRight();this.right_symbol.isPositioned||(this.right_symbol.setY(o.y-this.right_symbol.height/2),this.right_symbol.shiftX(this.group.getBBox().x+this.width+t),function i(){for(var e,n=!1,o=0,h=s.chart.symbols.length;o<h;o++)if(e=s.chart.symbols[o],!s.params["align-next"]||"no"!==s.params["align-next"]){var r=Math.abs(e.getCenter().x-s.right_symbol.getCenter().x);if(e.getCenter().y>s.right_symbol.getCenter().y&&r<=s.right_symbol.width/2){n=!0;break}}if(n){if("end"===s.right_symbol.symbolType)return;s.right_symbol.setX(e.getX()+e.width+t),i()}}(),this.right_symbol.isPositioned=!0,this.right_symbol.render())}},s.prototype.renderLines=function(){this.path1_symbol&&this.drawLineTo(this.path1_symbol,this.path1_annotation,this.path1_direction),this.path2_symbol&&this.drawLineTo(this.path2_symbol,this.path2_annotation,this.path2_direction),this.path3_symbol&&this.drawLineTo(this.path3_symbol,this.path3_annotation,this.path3_direction)},t.exports=s},function(t,i,e){function s(t,i){i=i||{},this.paper=new n(t),this.options=o(i,h),this.symbols=[],this.lines=[],this.start=null}var n=e(16),o=e(1).defaults,h=e(8),r=e(5),a=e(6);s.prototype.handle=function(t){this.symbols.indexOf(t)<=-1&&this.symbols.push(t);var i=this;return t instanceof r?(t.yes=function(e){return t.yes_symbol=e,t.no_symbol&&(t.pathOk=!0),i.handle(e)},t.no=function(e){return t.no_symbol=e,t.yes_symbol&&(t.pathOk=!0),i.handle(e)}):t instanceof a?(t.path1=function(e){return t.path1_symbol=e,t.path2_symbol&&(t.pathOk=!0),i.handle(e)},t.path2=function(e){return t.path2_symbol=e,t.path3_symbol&&(t.pathOk=!0),i.handle(e)},t.path3=function(e){return t.path3_symbol=e,t.path1_symbol&&(t.pathOk=!0),i.handle(e)}):t.then=function(e){return t.next=e,t.pathOk=!0,i.handle(e)},t},s.prototype.startWith=function(t){return this.start=t,this.handle(t)},s.prototype.render=function(){var t,i,e=0,s=0,n=0,o=0,h=0,r=0,a=0,l=0;for(n=0,o=this.symbols.length;n<o;n++)t=this.symbols[n],t.width>e&&(e=t.width),t.height>s&&(s=t.height);for(n=0,o=this.symbols.length;n<o;n++)t=this.symbols[n],t.shiftX(this.options.x+(e-t.width)/2+this.options["line-width"]),t.shiftY(this.options.y+(s-t.height)/2+this.options["line-width"]);for(this.start.render(),n=0,o=this.symbols.length;n<o;n++)t=this.symbols[n],t.renderLines();h=this.maxXFromLine;var p,y;for(n=0,o=this.symbols.length;n<o;n++){t=this.symbols[n];var x=t.getX();p=x+t.width,y=t.getY()+t.height,x<a&&(a=x),p>h&&(h=p),y>r&&(r=y)}for(n=0,o=this.lines.length;n<o;n++){i=this.lines[n].getBBox(),p=i.x,y=i.y;var g=i.x2,f=i.y2;p<a&&(a=p),y<l&&(l=y),g>h&&(h=g),f>r&&(r=f)}var c=this.options.scale,d=this.options["line-width"];this.minXFromSymbols<a&&(a=this.minXFromSymbols),a<0&&(a-=d),l<0&&(l-=d);var m=h+d-a,u=r+d-l;this.paper.setSize(m*c,u*c),this.paper.setViewBox(a,l,m,u,!0)},s.prototype.clean=function(){if(this.paper){var t=this.paper.canvas;t.parentNode&&t.parentNode.removeChild(t)}},t.exports=s},function(t,i){t.exports={x:0,y:0,"line-width":3,"line-length":50,"text-margin":10,"font-size":14,"font-color":"black","line-color":"black","element-color":"black",fill:"white","yes-text":"yes","no-text":"no","arrow-end":"block",class:"flowchart",scale:1,symbols:{start:{},end:{},condition:{},inputoutput:{},operation:{},subroutine:{},parallel:{}}}},function(t,i){Array.prototype.indexOf||(Array.prototype.indexOf=function(t){"use strict";if(null===this)throw new TypeError;var i=Object(this),e=i.length>>>0;if(0===e)return-1;var s=0;if(arguments.length>0&&(s=Number(arguments[1]),s!=s?s=0:0!==s&&s!=1/0&&s!=-(1/0)&&(s=(s>0||-1)*Math.floor(Math.abs(s)))),s>=e)return-1;for(var n=s>=0?s:Math.max(e-Math.abs(s),0);n<e;n++)if(n in i&&i[n]===t)return n;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(t){"use strict";if(null===this)throw new TypeError;var i=Object(this),e=i.length>>>0;if(0===e)return-1;var s=e;arguments.length>1&&(s=Number(arguments[1]),s!=s?s=0:0!==s&&s!=1/0&&s!=-(1/0)&&(s=(s>0||-1)*Math.floor(Math.abs(s))));for(var n=s>=0?Math.min(s,e-1):e-Math.abs(s);n>=0;n--)if(n in i&&i[n]===t)return n;return-1}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})},function(t,i,e){function s(t,i){var e=t.paper.rect(0,0,0,0,20);i=i||{},i.text=i.text||"End",n.call(this,t,i,e)}var n=e(2),o=e(1).inherits;o(s,n),t.exports=s},function(t,i,e){function s(t,i){i=i||{},n.call(this,t,i),this.textMargin=this.getAttr("text-margin"),this.text.attr({x:3*this.textMargin});var e=this.text.getBBox().width+4*this.textMargin,s=this.text.getBBox().height+2*this.textMargin,o=this.textMargin,h=s/2,a={x:o,y:h},l=[{x:o-this.textMargin,y:s},{x:o-this.textMargin+e,y:s},{x:o-this.textMargin+e+2*this.textMargin,y:0},{x:o-this.textMargin+2*this.textMargin,y:0},{x:o,y:h}],p=r(t,a,l);p.attr({stroke:this.getAttr("element-color"),"stroke-width":this.getAttr("line-width"),fill:this.getAttr("fill")}),i.link&&p.attr("href",i.link),i.target&&p.attr("target",i.target),i.key&&(p.node.id=i.key),p.node.setAttribute("class",this.getAttr("class")),this.text.attr({y:p.getBBox().height/2}),this.group.push(p),p.insertBefore(this.text),this.symbol=p,this.initialize()}var n=e(2),o=e(1).inherits,h=e(3),r=h.drawPath;o(s,n),s.prototype.getLeft=function(){var t=this.getY()+this.group.getBBox().height/2,i=this.getX()+this.textMargin;return{x:i,y:t}},s.prototype.getRight=function(){var t=this.getY()+this.group.getBBox().height/2,i=this.getX()+this.group.getBBox().width-this.textMargin;return{x:i,y:t}},t.exports=s},function(t,i,e){function s(t,i){var e=t.paper.rect(0,0,0,0);i=i||{},n.call(this,t,i,e)}var n=e(2),o=e(1).inherits;o(s,n),t.exports=s},function(t,i,e){function s(t,i){var e=t.paper.rect(0,0,0,0,20);i=i||{},i.text=i.text||"Start",n.call(this,t,i,e)}var n=e(2),o=e(1).inherits;o(s,n),t.exports=s},function(t,i,e){function s(t,i){var e=t.paper.rect(0,0,0,0);i=i||{},n.call(this,t,i,e),e.attr({width:this.text.getBBox().width+4*this.getAttr("text-margin")}),this.text.attr({x:2*this.getAttr("text-margin")});var s=t.paper.rect(0,0,0,0);s.attr({x:this.getAttr("text-margin"),stroke:this.getAttr("element-color"),"stroke-width":this.getAttr("line-width"),width:this.text.getBBox().width+2*this.getAttr("text-margin"),height:this.text.getBBox().height+2*this.getAttr("text-margin"),fill:this.getAttr("fill")}),i.key&&(s.node.id=i.key+"i");var o=this.getAttr("font"),h=this.getAttr("font-family"),r=this.getAttr("font-weight");o&&s.attr({font:o}),h&&s.attr({"font-family":h}),r&&s.attr({"font-weight":r}),i.link&&s.attr("href",i.link),i.target&&s.attr("target",i.target),this.group.push(s),s.insertBefore(this.text),this.initialize()}var n=e(2),o=e(1).inherits;o(s,n),t.exports=s},function(t,i,e){if("undefined"!=typeof jQuery){var s=e(4);!function(t){function i(t,i){return t==i||Array.isArray(i)&&(i.includes(t)||i.includes(Number(t)))}var e={init:function(i){return this.each(function(){var e=t(this);
	this.chart=s(e.text()),e.html(""),this.chart.drawSVG(this,i)})},setFlowStateByParam:function(t,e,s){return this.each(function(){var n=this.chart,o=["next","yes","no","path1","path2","path3"];for(var h in n.symbols)if(n.symbols.hasOwnProperty(h)){var r=n.symbols[h],a=r.params[t];if(i(a,e)){r.flowstate=s;for(var l=0;l<o.length;l++){var p=o[l];r[p]&&r[p].params&&r[p].params[t]&&i(r[p].params[t],e)&&(r.lineStyle[r[p].key]={stroke:n.options().flowstate[s].fill})}}}n.clean(),n.drawSVG(this)})},clearFlowState:function(){return this.each(function(){var t=this.chart;for(var i in t.symbols)if(t.symbols.hasOwnProperty(i)){var e=t.symbols[i];e.flowstate=""}t.clean(),t.drawSVG(this)})}};t.fn.flowChart=function(i){return e[i]?e[i].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof i&&i?void t.error("Method "+i+" does not exist on jQuery.flowChart"):e.init.apply(this,arguments)}}(jQuery)}},function(i,e){i.exports=t}])});
highlight.min.js
wget 'https://sme10.lists2.roe3.org/kodbox/static/app/vender/markdown/highlight.min.js'
View Content
/*!
Highlight.js v11.9.0 (git: f47103d4f1)
babel 转码; [dist源码/babel转es5/压缩]
https://www.jsdelivr.com/package/gh/highlightjs/cdn-release?tab=files&path=build

https://babeljs.io/repl/#?browsers=&build=&builtIns=false&corejs=3.21&spec=false&loose=false&code_lz=Q&debug=false&forceAllTransforms=false&modules=false&shippedProposals=false&circleciRepo=&evaluate=true&fileSize=false&timeTravel=false&sourceType=module&lineWrap=false&presets=es2015%2Creact%2Cstage-2&prettier=false&targets=&version=7.24.7&externalPlugins=&assumptions=%7B%7D

https://tool.css-js.com/
 */

"use strict";function _createForOfIteratorHelper(a,b){var d,e,f,g,h,c="undefined"!=typeof Symbol&&a[Symbol.iterator]||a["@@iterator"];if(!c){if(Array.isArray(a)||(c=_unsupportedIterableToArray(a))||b&&a&&"number"==typeof a.length)return c&&(a=c),d=0,e=function(){},{s:e,n:function(){return d>=a.length?{done:!0}:{done:!1,value:a[d++]}},e:function(a){throw a},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return g=!0,h=!1,{s:function(){c=c.call(a)},n:function(){var a=c.next();return g=a.done,a},e:function(a){h=!0,f=a},f:function(){try{g||null==c.return||c.return()}finally{if(h)throw f}}}}function _wrapNativeSuper(a){var b="function"==typeof Map?new Map:void 0;return _wrapNativeSuper=function(a){function c(){return _construct(a,arguments,_getPrototypeOf(this).constructor)}if(null===a||!_isNativeFunction(a))return a;if("function"!=typeof a)throw new TypeError("Super expression must either be null or a function");if(void 0!==b){if(b.has(a))return b.get(a);b.set(a,c)}return c.prototype=Object.create(a.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(c,a)},_wrapNativeSuper(a)}function _construct(a,b,c){var d,e;return _isNativeReflectConstruct()?Reflect.construct.apply(null,arguments):(d=[null],d.push.apply(d,b),e=new(a.bind.apply(a,d)),c&&_setPrototypeOf(e,c.prototype),e)}function _isNativeFunction(a){try{return-1!==Function.toString.call(a).indexOf("[native code]")}catch(b){return"function"==typeof a}}function _slicedToArray(a,b){return _arrayWithHoles(a)||_iterableToArrayLimit(a,b)||_unsupportedIterableToArray(a,b)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(a,b){var d,e,f,g,h,i,j,c=null==a?null:"undefined"!=typeof Symbol&&a[Symbol.iterator]||a["@@iterator"];if(null!=c){h=[],i=!0,j=!1;try{if(f=(c=c.call(a)).next,0===b){if(Object(c)!==c)return;i=!1}else for(;!(i=(d=f.call(c)).done)&&(h.push(d.value),h.length!==b);i=!0);}catch(a){j=!0,e=a}finally{try{if(!i&&null!=c.return&&(g=c.return(),Object(g)!==g))return}finally{if(j)throw e}}return h}}function _arrayWithHoles(a){return Array.isArray(a)?a:void 0}function _callSuper(a,b,c){return b=_getPrototypeOf(b),_possibleConstructorReturn(a,_isNativeReflectConstruct()?Reflect.construct(b,c||[],_getPrototypeOf(a).constructor):b.apply(a,c))}function _possibleConstructorReturn(a,b){if(b&&("object"==_typeof(b)||"function"==typeof b))return b;if(void 0!==b)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(a)}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(a){}return(_isNativeReflectConstruct=function(){return!!a})()}function _getPrototypeOf(a){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},_getPrototypeOf(a)}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),b&&_setPrototypeOf(a,b)}function _setPrototypeOf(a,b){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,b){return a.__proto__=b,a},_setPrototypeOf(a,b)}function _toConsumableArray(a){return _arrayWithoutHoles(a)||_iterableToArray(a)||_unsupportedIterableToArray(a)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(a,b){if(a){if("string"==typeof a)return _arrayLikeToArray(a,b);var c={}.toString.call(a).slice(8,-1);return"Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c?Array.from(a):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?_arrayLikeToArray(a,b):void 0}}function _iterableToArray(a){return"undefined"!=typeof Symbol&&null!=a[Symbol.iterator]||null!=a["@@iterator"]?Array.from(a):void 0}function _arrayWithoutHoles(a){return Array.isArray(a)?_arrayLikeToArray(a):void 0}function _arrayLikeToArray(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);b>c;c++)d[c]=a[c];return d}function _classCallCheck(a,b){if(!_instanceof(a,b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){var c,d;for(c=0;c<b.length;c++)d=b[c],d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,_toPropertyKey(d.key),d)}function _createClass(a,b,c){return b&&_defineProperties(a.prototype,b),c&&_defineProperties(a,c),Object.defineProperty(a,"prototype",{writable:!1}),a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==_typeof(b)?b:b+""}function _toPrimitive(a,b){var c,d;if("object"!=_typeof(a)||!a)return a;if(c=a[Symbol.toPrimitive],void 0!==c){if(d=c.call(a,b||"default"),"object"!=_typeof(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function _instanceof(a,b){return null!=b&&"undefined"!=typeof Symbol&&b[Symbol.hasInstance]?!!b[Symbol.hasInstance](a):a instanceof b}var hljs=function(){function a(b){return _instanceof(b,Map)?b.clear=b.delete=b.set=function(){throw Error("map is read-only")}:_instanceof(b,Set)&&(b.add=b.clear=b.delete=function(){throw Error("set is read-only")}),Object.freeze(b),Object.getOwnPropertyNames(b).forEach(function(c){var d=b[c],e=_typeof(d);"object"!==e&&"function"!==e||Object.isFrozen(d)||a(d)}),b}function c(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function d(a){var c,d,e,f,b=Object.create(null);for(c in a)b[c]=a[c];for(d=arguments.length,e=new Array(d>1?d-1:0),f=1;d>f;f++)e[f-1]=arguments[f];return e.forEach(function(a){for(var c in a)b[c]=a[c]}),b}function j(a){return a?"string"==typeof a?a:a.source:null}function k(a){return n("(?=",a,")")}function l(a){return n("(?:",a,")*")}function m(a){return n("(?:",a,")?")}function n(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b.map(function(a){return j(a)}).join("")}function o(){var a,b,c,d;for(a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return d=function(a){var b=a[a.length-1];return"object"==_typeof(b)&&b.constructor===Object?(a.splice(a.length-1,1),b):{}}(b),"("+(d.capture?"":"?:")+b.map(function(a){return j(a)}).join("|")+")"}function p(a){return RegExp(a.toString()+"|").exec("").length-1}function r(a,b){var c=b.joinWith,d=0;return a.map(function(a){var b,c,e,f;for(d+=1,b=d,c=j(a),e="";c.length>0;){if(f=q.exec(c),!f){e+=c;break}e+=c.substring(0,f.index),c=c.substring(f.index+f[0].length),"\\"===f[0][0]&&f[1]?e+="\\"+(Number(f[1])+b):(e+=f[0],"("===f[0]&&d++)}return e}).map(function(a){return"(".concat(a,")")}).join(c)}function F(a,b){"."===a.input[a.index-1]&&b.ignoreMatch()}function G(a){void 0!==a.className&&(a.scope=a.className,delete a.className)}function H(a,b){b&&a.beginKeywords&&(a.begin="\\b("+a.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",a.__beforeBegin=F,a.keywords=a.keywords||a.beginKeywords,delete a.beginKeywords,void 0===a.relevance&&(a.relevance=0))}function I(a){Array.isArray(a.illegal)&&(a.illegal=o.apply(void 0,_toConsumableArray(a.illegal)))}function J(a){if(a.match){if(a.begin||a.end)throw Error("begin & end are not supported with match");a.begin=a.match,delete a.match}}function K(a){void 0===a.relevance&&(a.relevance=1)}function O(a,b){function e(a,c){b&&(c=c.map(function(a){return a.toLowerCase()})),c.forEach(function(b){var c=b.split("|");d[c[0]]=[a,P(c[0],c[1])]})}var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:N,d=Object.create(null);return"string"==typeof a?e(c,a.split(" ")):Array.isArray(a)?e(c,a):Object.keys(a).forEach(function(c){Object.assign(d,O(a[c],b,c))}),d}function P(a,b){return b?Number(b):function(a){return M.includes(a.toLowerCase())}(a)?0:1}function V(a,b,c){var i,d=c.key,e=0,f=a[d],g={},h={};for(i=1;i<=b.length;i++)h[i+e]=f[i],g[i+e]=!0,e+=p(b[i-1]);a[d]=h,a[d]._emit=g,a[d]._multi=!0}function W(a){!function(a){a.scope&&"object"==_typeof(a.scope)&&null!==a.scope&&(a.beginScope=a.scope,delete a.scope)}(a),"string"==typeof a.beginScope&&(a.beginScope={_wrap:a.beginScope}),"string"==typeof a.endScope&&(a.endScope={_wrap:a.endScope}),function(a){if(Array.isArray(a.begin)){if(a.skip||a.excludeBegin||a.returnBegin)throw R("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),U;if("object"!=_typeof(a.beginScope)||null===a.beginScope)throw R("beginScope must be object"),U;V(a,a.begin,{key:"beginScope"}),a.begin=r(a.begin,{joinWith:""})}}(a),function(a){if(Array.isArray(a.end)){if(a.skip||a.excludeEnd||a.returnEnd)throw R("skip, excludeEnd, returnEnd not compatible with endScope: {}"),U;if("object"!=_typeof(a.endScope)||null===a.endScope)throw R("endScope must be object"),U;V(a,a.end,{key:"endScope"}),a.end=r(a.end,{joinWith:""})}}(a)}function X(a){function b(b,c){return RegExp(j(b),"m"+(a.case_insensitive?"i":"")+(a.unicodeRegex?"u":"")+(c?"g":""))}var c=function(){function a(){_classCallCheck(this,a),this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}return _createClass(a,[{key:"addRule",value:function(a,b){b.position=this.position++,this.matchIndexes[this.matchAt]=b,this.regexes.push([b,a]),this.matchAt+=p(a)+1}},{key:"compile",value:function(){0===this.regexes.length&&(this.exec=function(){return null});var a=this.regexes.map(function(a){return a[1]});this.matcherRe=b(r(a,{joinWith:"|"}),!0),this.lastIndex=0}},{key:"exec",value:function(a){var b,c,d;return this.matcherRe.lastIndex=this.lastIndex,(b=this.matcherRe.exec(a))?(c=b.findIndex(function(a,b){return b>0&&void 0!==a}),d=this.matchIndexes[c],b.splice(0,c),Object.assign(b,d)):null}}])}(),e=function(){function a(){_classCallCheck(this,a),this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}return _createClass(a,[{key:"getMatcher",value:function(a){if(this.multiRegexes[a])return this.multiRegexes[a];var b=new c;return this.rules.slice(a).forEach(function(a){var c=_slicedToArray(a,2),d=c[0],e=c[1];return b.addRule(d,e)}),b.compile(),this.multiRegexes[a]=b,b}},{key:"resumingScanAtSamePosition",value:function(){return 0!==this.regexIndex}},{key:"considerAll",value:function(){this.regexIndex=0}},{key:"addRule",value:function(a,b){this.rules.push([a,b]),"begin"===b.type&&this.count++}},{key:"exec",value:function(a){var c,d,b=this.getMatcher(this.regexIndex);return b.lastIndex=this.lastIndex,c=b.exec(a),this.resumingScanAtSamePosition()&&(c&&c.index===this.lastIndex||(d=this.getMatcher(0),d.lastIndex=this.lastIndex+1,c=d.exec(a))),c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}])}();if(a.compilerExtensions||(a.compilerExtensions=[]),a.contains&&a.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language.  See documentation.");return a.classNameAliases=d(a.classNameAliases||{}),function f(c,g,h){var k,i=c;return c.isCompiled?i:([G,J,W,L].forEach(function(a){return a(c,g)}),a.compilerExtensions.forEach(function(a){return a(c,g)}),c.__beforeBegin=null,[H,I,K].forEach(function(a){return a(c,g)}),c.isCompiled=!0,k=null,"object"==_typeof(c.keywords)&&c.keywords.$pattern&&(c.keywords=Object.assign({},c.keywords),k=c.keywords.$pattern,delete c.keywords.$pattern),k=k||/\w+/,c.keywords&&(c.keywords=O(c.keywords,a.case_insensitive)),i.keywordPatternRe=b(k,!0),g&&(c.begin||(c.begin=/\B|\b/),i.beginRe=b(i.begin),c.end||c.endsWithParent||(c.end=/\B|\b/),c.end&&(i.endRe=b(i.end)),i.terminatorEnd=j(i.end)||"",c.endsWithParent&&g.terminatorEnd&&(i.terminatorEnd+=(c.end?"|":"")+g.terminatorEnd)),c.illegal&&(i.illegalRe=b(c.illegal)),c.contains||(c.contains=[]),c.contains=(h=[]).concat.apply(h,_toConsumableArray(c.contains.map(function(a){return function(a){return a.variants&&!a.cachedVariants&&(a.cachedVariants=a.variants.map(function(b){return d(a,{variants:null},b)})),a.cachedVariants?a.cachedVariants:Y(a)?d(a,{starts:a.starts?d(a.starts):null}):Object.isFrozen(a)?d(a):a}("self"===a?c:a)}))),c.contains.forEach(function(a){f(a,i)}),c.starts&&f(c.starts,g),i.matcher=function(a){var b=new e;return a.contains.forEach(function(a){return b.addRule(a.begin,{rule:a,type:"begin"})}),a.terminatorEnd&&b.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&b.addRule(a.illegal,{type:"illegal"}),b}(i),i)}(a)}function Y(a){return!!a&&(a.endsWithParent||Y(a.starts))}function pb(a,b,c){return-1===c?"":a.replace(b,function(){return pb(a,b,c-1)})}function yb(a){var q,r,s,t,u,v,w,x,y,z,A,B,b=a.regex,c=qb,d={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:function(a,b){var e,f,c=a[0].length+a.index,d=a.input[c];return"<"===d||","===d?void b.ignoreMatch():(">"===d&&(function(a,b){var c=b.after,d="</"+a[0].slice(1);return-1!==a.input.indexOf(d,c)}(a,{after:c})||b.ignoreMatch()),f=a.input.substring(c),((e=f.match(/^\s*=/))||(e=f.match(/^\s+extends\s+/))&&0===e.index)&&b.ignoreMatch(),void 0)}},e={$pattern:qb,keyword:rb,literal:sb,built_in:xb,"variable.language":wb},f="[0-9](_?[0-9])*",g="\\.(".concat(f,")"),h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",i={className:"number",variants:[{begin:"(\\b(".concat(h,")((").concat(g,")|\\.)?|(").concat(g,"))[eE][+-]?(").concat(f,")\\b")},{begin:"\\b(".concat(h,")\\b((").concat(g,")\\b|\\.)?|(").concat(g,")\\b")},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},j={className:"subst",begin:"\\$\\{",end:"\\}",keywords:e,contains:[]},k={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[a.BACKSLASH_ESCAPE,j],subLanguage:"xml"}},l={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[a.BACKSLASH_ESCAPE,j],subLanguage:"css"}},m={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[a.BACKSLASH_ESCAPE,j],subLanguage:"graphql"}},n={className:"string",begin:"`",end:"`",contains:[a.BACKSLASH_ESCAPE,j]},o={className:"comment",variants:[a.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:c+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),a.C_BLOCK_COMMENT_MODE,a.C_LINE_COMMENT_MODE]},p=[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,k,l,m,n,{match:/\$\d+/},i];return j.contains=p.concat({begin:/\{/,end:/\}/,keywords:e,contains:["self"].concat(p)}),q=[].concat(o,j.contains),r=q.concat([{begin:/\(/,end:/\)/,keywords:e,contains:["self"].concat(q)}]),s={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:e,contains:r},t={variants:[{match:[/class/,/\s+/,c,/\s+/,/extends/,/\s+/,b.concat(c,"(",b.concat(/\./,c),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,c],scope:{1:"keyword",3:"title.class"}}]},u={relevance:0,match:b.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[].concat(tb,ub)}},v={variants:[{match:[/function/,/\s+/,c,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[s],illegal:/%/},w={match:b.concat(/\b/,(x=[].concat(vb,["super","import"]),b.concat("(?!",x.join("|"),")")),c,b.lookahead(/\(/)),className:"title.function",relevance:0},y={begin:b.concat(/\./,b.lookahead(b.concat(c,/(?![0-9A-Za-z$_(])/))),end:c,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},z={match:[/get|set/,/\s+/,c,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},s]},A="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+a.UNDERSCORE_IDENT_RE+")\\s*=>",B={match:[/const|var|let/,/\s+/,c,/\s*/,/=\s*/,/(async\s*)?/,b.lookahead(A)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[s]},{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:e,exports:{PARAMS_CONTAINS:r,CLASS_REFERENCE:u},illegal:/#(?![$_A-z])/,contains:[a.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,k,l,m,n,o,{match:/\$\d+/},i,u,{className:"attr",begin:c+b.lookahead(":"),relevance:0},B,{begin:"("+a.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[o,a.REGEXP_MODE,{className:"function",begin:A,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:a.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:e,contains:r}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:"<>",end:"</>"},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:d.begin,"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{begin:d.begin,end:d.end,skip:!0,contains:["self"]}]}]},v,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+a.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[s,a.inherit(a.TITLE_MODE,{begin:c,className:"title.function"})]},{match:/\.\.\./,relevance:0},y,{match:"\\$"+c,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[s]},w,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},t,z,{match:/\$[(.]/}]}}var e,f,g,h,i,q,s,t,u,v,w,x,y,z,A,B,C,D,E,L,M,N,Q,R,S,T,U,Z,$,_,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob,qb,rb,sb,tb,ub,vb,wb,xb,zb,Ab,Bb,Cb,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb,Tb,Ub,Vb,Wb;for(function(){function a(b){_classCallCheck(this,a),void 0===b.data&&(b.data={}),this.data=b.data,this.isMatchIgnored=!1}return _createClass(a,[{key:"ignoreMatch",value:function(){this.isMatchIgnored=!0}}])}(),e=function(a){return!!a.scope},f=function(){function a(b,c){_classCallCheck(this,a),this.buffer="",this.classPrefix=c.classPrefix,b.walk(this)}return _createClass(a,[{key:"addText",value:function(a){this.buffer+=c(a)}},{key:"openNode",value:function(a){if(e(a)){var b=function(a,b){var d,c=b.prefix;return a.startsWith("language:")?a.replace("language:","language-"):a.includes(".")?(d=a.split("."),["".concat(c).concat(d.shift())].concat(_toConsumableArray(d.map(function(a,b){return"".concat(a).concat("_".repeat(b+1))}))).join(" ")):"".concat(c).concat(a)}(a.scope,{prefix:this.classPrefix});this.span(b)}}},{key:"closeNode",value:function(a){e(a)&&(this.buffer+="</span>")}},{key:"value",value:function(){return this.buffer}},{key:"span",value:function(a){this.buffer+='<span class="'.concat(a,'">')}}])}(),g=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b={children:[]};return Object.assign(b,a),b},h=function(){function a(){_classCallCheck(this,a),this.rootNode=g(),this.stack=[this.rootNode]}return _createClass(a,[{key:"top",get:function(){return this.stack[this.stack.length-1]}},{key:"root",get:function(){return this.rootNode}},{key:"add",value:function(a){this.top.children.push(a)}},{key:"openNode",value:function(a){var b=g({scope:a});this.add(b),this.stack.push(b)}},{key:"closeNode",value:function(){return this.stack.length>1?this.stack.pop():void 0}},{key:"closeAllNodes",value:function(){for(;this.closeNode(););}},{key:"toJSON",value:function(){return JSON.stringify(this.rootNode,null,4)}},{key:"walk",value:function(a){return this.constructor._walk(a,this.rootNode)}}],[{key:"_walk",value:function(a,b){var c=this;return"string"==typeof b?a.addText(b):b.children&&(a.openNode(b),b.children.forEach(function(b){return c._walk(a,b)}),a.closeNode(b)),a}},{key:"_collapse",value:function(b){"string"!=typeof b&&b.children&&(b.children.every(function(a){return"string"==typeof a})?b.children=[b.children.join("")]:b.children.forEach(function(b){a._collapse(b)}))}}])}(),i=function(a){function b(a){var c;return _classCallCheck(this,b),c=_callSuper(this,b),c.options=a,c}return _inherits(b,a),_createClass(b,[{key:"addText",value:function(a){""!==a&&this.add(a)}},{key:"startScope",value:function(a){this.openNode(a)}},{key:"endScope",value:function(){this.closeNode()}},{key:"__addSublanguage",value:function(a,b){var c=a.root;b&&(c.scope="language:"+b),this.add(c)}},{key:"toHTML",value:function(){return new f(this,this.options).value()}},{key:"finalize",value:function(){return this.closeAllNodes(),!0}}])}(h),q=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,s="[a-zA-Z]\\w*",t="[a-zA-Z_]\\w*",u="\\b\\d+(\\.\\d+)?",v="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",w="\\b(0b[01]+)",x={begin:"\\\\[\\s\\S]",relevance:0},y={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[x]},z={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[x]},A=function(a,b){var f,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},e=d({scope:"comment",begin:a,end:b,contains:[]},c);return e.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0}),f=o("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/),e.contains.push({begin:n(/[ ]+/,"(",f,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),e},B=A("//","$"),C=A("/\\*","\\*/"),D=A("#","$"),E=Object.freeze({__proto__:null,APOS_STRING_MODE:y,BACKSLASH_ESCAPE:x,BINARY_NUMBER_MODE:{scope:"number",begin:w,relevance:0},BINARY_NUMBER_RE:w,COMMENT:A,C_BLOCK_COMMENT_MODE:C,C_LINE_COMMENT_MODE:B,C_NUMBER_MODE:{scope:"number",begin:v,relevance:0},C_NUMBER_RE:v,END_SAME_AS_BEGIN:function(a){return Object.assign(a,{"on:begin":function(a,b){b.data._beginMatch=a[1]},"on:end":function(a,b){b.data._beginMatch!==a[1]&&b.ignoreMatch()}})},HASH_COMMENT_MODE:D,IDENT_RE:s,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:{begin:"\\.\\s*"+t,relevance:0},NUMBER_MODE:{scope:"number",begin:u,relevance:0},NUMBER_RE:u,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},QUOTE_STRING_MODE:z,REGEXP_MODE:{scope:"regexp",begin:/\/(?=[^\/\n]*\/)/,end:/\/[gimuy]*/,contains:[x,{begin:/\[/,end:/\]/,relevance:0,contains:[x]}]},RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=/^#![ ]*\//;return a.binary&&(a.begin=n(b,/.*\b/,a.binary,/\b.*/)),d({scope:"meta",begin:b,end:/$/,relevance:0,"on:begin":function(a,b){0!==a.index&&b.ignoreMatch()}},a)},TITLE_MODE:{scope:"title",begin:s,relevance:0},UNDERSCORE_IDENT_RE:t,UNDERSCORE_TITLE_MODE:{scope:"title",begin:t,relevance:0}}),L=function(a){if(a.beforeMatch){if(a.starts)throw Error("beforeMatch cannot be used with starts");var c=Object.assign({},a);Object.keys(a).forEach(function(b){delete a[b]}),a.keywords=c.keywords,a.begin=n(c.beforeMatch,k(c.begin)),a.starts={relevance:0,contains:[Object.assign(c,{endsParent:!0})]},a.relevance=0,delete c.beforeMatch}},M=["of","and","for","in","not","or","if","then","parent","list","value"],N="keyword",Q={},R=function(a){console.error(a)},S=function(a){var b,c,d,e;for(c=arguments.length,d=new Array(c>1?c-1:0),e=1;c>e;e++)d[e-1]=arguments[e];(b=console).log.apply(b,["WARN: "+a].concat(d))},T=function(a,b){Q["".concat(a,"/").concat(b)]||(console.log("Deprecated as of ".concat(a,". ").concat(b)),Q["".concat(a,"/").concat(b)]=!0)},U=Error(),Z=function(a){function b(a,c){var d;return _classCallCheck(this,b),d=_callSuper(this,b,[a]),d.name="HTMLInjectionError",d.html=c,d}return _inherits(b,a),_createClass(b)}(_wrapNativeSuper(Error)),$=c,_=d,ab=Symbol("nomatch"),bb=function(b){function p(a){return j.noHighlightRe.test(a)}function q(a,b,c){var f,g,d="",e="";return"object"==_typeof(b)?(d=a,c=b.ignoreIllegals,e=b.language):(T("10.7.0","highlight(lang, code, ...args) has been deprecated."),T("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),e=a,d=b),void 0===c&&(c=!0),f={code:d,language:e},z("before:highlight",f),g=f.result?f.result:r(f.language,f.code,c),g.code=f.code,z("after:highlight",g),g}function r(a,b,d,e){function i(){var a,b,c,d,e,f,g,i,j,k;if(!z.keywords)return void B.addText(C);for(a=0,z.keywordPatternRe.lastIndex=0,b=z.keywordPatternRe.exec(C),c="";b;)c+=C.substring(a,b.index),d=v.case_insensitive?b[0].toLowerCase():b[0],k=d,e=z.keywords[k],e?(f=_slicedToArray(e,2),g=f[0],i=f[1],B.addText(c),c="",h[d]=(h[d]||0)+1,h[d]<=7&&(D+=i),g.startsWith("_")?c+=b[0]:(j=v.classNameAliases[g]||g,l(b[0],j))):c+=b[0],a=z.keywordPatternRe.lastIndex,b=z.keywordPatternRe.exec(C);c+=C.substring(a),B.addText(c)}function k(){null!=z.subLanguage?function(){if(""!==C){var a=null;if("string"==typeof z.subLanguage){if(!c[z.subLanguage])return void B.addText(C);a=r(z.subLanguage,C,!0,A[z.subLanguage]),A[z.subLanguage]=a._top}else a=s(C,z.subLanguage.length?z.subLanguage:null);z.relevance>0&&(D+=a.relevance),B.__addSublanguage(a._emitter,a.language)}}():i(),C=""}function l(a,b){""!==a&&(B.startScope(b),B.addText(a),B.endScope())}function m(a,b){for(var e,f,c=1,d=b.length-1;d>=c;)a._emit[c]?(e=v.classNameAliases[a[c]]||a[c],f=b[c],e?l(f,e):(C=f,i(),C=""),c++):c++}function n(a,b){return a.scope&&"string"==typeof a.scope&&B.openNode(v.classNameAliases[a.scope]||a.scope),a.beginScope&&(a.beginScope._wrap?(l(C,v.classNameAliases[a.beginScope._wrap]||a.beginScope._wrap),C=""):a.beginScope._multi&&(m(a.beginScope,b),C="")),z=Object.create(a,{parent:{value:z}})}function o(a,b,c){var e,d=function(a,b){var c=a&&a.exec(b);return c&&0===c.index}(a.endRe,c);if(d&&(a["on:end"]&&(e=new J(a),a["on:end"](b,e),e.isMatchIgnored&&(d=!1)),d)){for(;a.endsParent&&a.parent;)a=a.parent;return a}return a.endsWithParent?o(a.parent,b,c):void 0}function p(a){return 0===z.matcher.regexIndex?(C+=a[0],1):(G=!0,0)}function q(a){var f,c=a[0],d=b.substring(a.index),e=o(z,a,d);if(!e)return ab;f=z,z.endScope&&z.endScope._wrap?(k(),l(c,z.endScope._wrap)):z.endScope&&z.endScope._multi?(k(),m(z.endScope,a)):f.skip?C+=c:(f.returnEnd||f.excludeEnd||(C+=c),k(),f.excludeEnd&&(C=c));do z.scope&&B.closeNode(),z.skip||z.subLanguage||(D+=z.relevance),z=z.parent;while(z!==e.parent);return e.starts&&n(e.starts,a),f.returnEnd?0:c.length}function u(c,e){var h,i,j,g=e&&e[0];if(C+=c,null==g)return k(),0;if("begin"===t.type&&"end"===e.type&&t.index===e.index&&""===g){if(C+=b.slice(e.index,e.index+1),!f)throw h=Error("0 width match regex (".concat(a,")")),h.languageName=a,h.badRule=t.rule,h;return 1}if(t=e,"begin"===e.type)return function(a){var f,g,h,b=a[0],c=a.rule,d=new J(c),e=[c.__beforeBegin,c["on:begin"]];for(f=0,g=e;f<g.length;f++)if(h=g[f],h&&(h(a,d),d.isMatchIgnored))return p(b);return c.skip?C+=b:(c.excludeBegin&&(C+=b),k(),c.returnBegin||c.excludeBegin||(C=b)),n(c,a),c.returnBegin?0:b.length}(e);if("illegal"===e.type&&!d)throw i=Error('Illegal lexeme "'+g+'" for mode "'+(z.scope||"<unnamed>")+'"'),i.mode=z,i;if("end"===e.type&&(j=q(e),j!==ab))return j;if("illegal"===e.type&&""===g)return 1;if(F>1e5&&F>3*e.index)throw Error("potential infinite loop, way more iterations than matches");return C+=g,g.length}var x,y,z,A,B,C,D,E,F,G,H,I,h=Object.create(null),t={},v=w(a);if(!v)throw R(g.replace("{}",a)),Error('Unknown language: "'+a+'"');x=X(v),y="",z=e||x,A={},B=new j.__emitter(j),function(){var b,a=[];for(b=z;b!==v;b=b.parent)b.scope&&a.unshift(b.scope);a.forEach(function(a){return B.openNode(a)})}(),C="",D=0,E=0,F=0,G=!1;try{if(v.__emitTokens)v.__emitTokens(b,B);else{for(z.matcher.considerAll();F++,G?G=!1:z.matcher.considerAll(),z.matcher.lastIndex=E,H=z.matcher.exec(b),H;)I=u(b.substring(E,H.index),H),E=H.index+I;u(b.substring(E))}return B.finalize(),y=B.toHTML(),{language:a,value:y,relevance:D,illegal:!1,_emitter:B,_top:z}}catch(J){if(J.message&&J.message.includes("Illegal"))return{language:a,value:$(b),illegal:!0,relevance:0,_illegalBy:{message:J.message,index:E,context:b.slice(E-100,E+100),mode:J.mode,resultSoFar:y},_emitter:B};if(f)return{language:a,value:$(b),illegal:!1,relevance:0,errorRaised:J,_emitter:B,_top:z};throw J}}function s(a,b){var d,e,f,g,i,k,l;return b=b||j.languages||Object.keys(c),d=function(a){var b={value:$(a),illegal:!1,relevance:0,_top:h,_emitter:new j.__emitter(j)};return b._emitter.addText(a),b}(a),e=b.filter(w).filter(y).map(function(b){return r(b,a,!1)}),e.unshift(d),f=e.sort(function(a,b){if(a.relevance!==b.relevance)return b.relevance-a.relevance;if(a.language&&b.language){if(w(a.language).supersetOf===b.language)return 1;if(w(b.language).supersetOf===a.language)return-1}return 0}),g=_slicedToArray(f,2),i=g[0],k=g[1],l=i,l.secondBest=k,l}function t(a){var e,f,b=null,c=function(a){var c,d,b=a.className+" ";return b+=a.parentNode?a.parentNode.className:"",c=j.languageDetectRe.exec(b),c?(d=w(c[1]),d||(S(g.replace("{}",c[1])),S("Falling back to no-highlight mode for this block.",a)),d?c[1]:"no-highlight"):b.split(/\s+/).find(function(a){return p(a)||w(a)})}(a);if(!p(c)){if(z("before:highlightElement",{el:a,language:c}),a.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",a);if(a.children.length>0&&(j.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(a)),j.throwUnescapedHTML))throw new Z("One of your code blocks includes unescaped HTML.",a.innerHTML);b=a,e=b.textContent,f=c?q(e,{language:c,ignoreIllegals:!0}):s(e),a.innerHTML=f.value,a.dataset.highlighted="yes",function(a,b,c){var e=b&&d[b]||c;a.classList.add("hljs"),a.classList.add("language-"+e)}(a,c,f.language),a.result={language:f.language,re:f.relevance,relevance:f.relevance},f.secondBest&&(a.secondBest={language:f.secondBest.language,relevance:f.secondBest.relevance}),z("after:highlightElement",{el:a,result:f,text:e})}}function v(){"loading"!==document.readyState?document.querySelectorAll(j.cssSelector).forEach(t):u=!0}function w(a){return a=(a||"").toLowerCase(),c[a]||c[d[a]]}function x(a,b){var c=b.languageName;"string"==typeof a&&(a=[a]),a.forEach(function(a){d[a.toLowerCase()]=c})}function y(a){var b=w(a);return b&&!b.disableAutodetect}function z(a,b){var c=a;e.forEach(function(a){a[c]&&a[c](b)})}var A,c=Object.create(null),d=Object.create(null),e=[],f=!0,g="Could not find the language '{}', did you forget to load/include a language module?",h={disableAutodetect:!0,name:"Plain text",contains:[]},j={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:i},u=!1;
"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",function(){u&&v()},!1),Object.assign(b,{highlight:q,highlightAuto:s,highlightAll:v,highlightElement:t,highlightBlock:function(a){return T("10.7.0","highlightBlock will be removed entirely in v12.0"),T("10.7.0","Please use highlightElement now."),t(a)},configure:function(a){j=_(j,a)},initHighlighting:function(){v(),T("10.6.0","initHighlighting() deprecated.  Use highlightAll() now.")},initHighlightingOnLoad:function(){v(),T("10.6.0","initHighlightingOnLoad() deprecated.  Use highlightAll() now.")},registerLanguage:function(a,d){var e=null;try{e=d(b)}catch(d){if(R("Language definition for '{}' could not be registered.".replace("{}",a)),!f)throw d;R(d),e=h}e.name||(e.name=a),c[a]=e,e.rawDefinition=d.bind(null,b),e.aliases&&x(e.aliases,{languageName:a})},unregisterLanguage:function(a){var b,e,f;for(delete c[a],b=0,e=Object.keys(d);b<e.length;b++)f=e[b],d[f]===a&&delete d[f]},listLanguages:function(){return Object.keys(c)},getLanguage:w,registerAliases:x,autoDetection:y,inherit:_,addPlugin:function(a){!function(a){a["before:highlightBlock"]&&!a["before:highlightElement"]&&(a["before:highlightElement"]=function(b){a["before:highlightBlock"](Object.assign({block:b.el},b))}),a["after:highlightBlock"]&&!a["after:highlightElement"]&&(a["after:highlightElement"]=function(b){a["after:highlightBlock"](Object.assign({block:b.el},b))})}(a),e.push(a)},removePlugin:function(a){var b=e.indexOf(a);-1!==b&&e.splice(b,1)}}),b.debugMode=function(){f=!1},b.safeMode=function(){f=!0},b.versionString="11.9.0",b.regex={concat:n,lookahead:k,either:o,optional:m,anyNumberOfTimes:l};for(A in E)"object"==_typeof(E[A])&&a(E[A]);return Object.assign(b,E),b},cb=bb({}),cb.newInstance=function(){return bb({})},db=cb,eb=function(a){return{IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:a.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:a.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}},fb=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],gb=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],hb=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],ib=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],jb=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),kb=hb.concat(ib),lb="[0-9](_*[0-9])*",mb="\\.(".concat(lb,")"),nb="[0-9a-fA-F](_*[0-9a-fA-F])*",ob={className:"number",variants:[{begin:"(\\b(".concat(lb,")((").concat(mb,")|\\.)?|(").concat(mb,"))[eE][+-]?(").concat(lb,")[fFdD]?\\b")},{begin:"\\b(".concat(lb,")((").concat(mb,")[fFdD]?\\b|\\.([fFdD]\\b)?)")},{begin:"(".concat(mb,")[fFdD]?\\b")},{begin:"\\b(".concat(lb,")[fFdD]\\b")},{begin:"\\b0[xX]((".concat(nb,")\\.?|(").concat(nb,")?\\.(").concat(nb,"))[pP][+-]?(").concat(lb,")[fFdD]?\\b")},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:"\\b0[xX](".concat(nb,")[lL]?\\b")},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0},qb="[A-Za-z$_][0-9A-Za-z$_]*",rb=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],sb=["true","false","null","undefined","NaN","Infinity"],tb=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ub=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],vb=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],wb=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],xb=[].concat(vb,tb,ub),zb=function(a){return n(/\b/,a,/\w$/.test(a)?/\b/:/\B/)},Ab=["Protocol","Type"].map(zb),Bb=["init","self"].map(zb),Cb=["Any","Self"],Db=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Eb=["false","nil","true"],Fb=["assignment","associativity","higherThan","left","lowerThan","none","right"],Gb=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Hb=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Ib=o(/[\/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Jb=o(Ib,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Kb=n(Ib,Jb,"*"),Lb=o(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Mb=o(Lb,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Nb=n(Lb,Mb,"*"),Ob=n(/[A-Z]/,Mb,"*"),Pb=["attached","autoclosure",n(/convention\(/,o("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",n(/objc\(/,Nb,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Qb=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"],Rb=Object.freeze({__proto__:null,grmr_bash:function(a){var e,f,g,h,i,j,b=a.regex,c={},d={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[c]}]};return Object.assign(c,{className:"variable",variants:[{begin:b.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},d]}),e={className:"subst",begin:/\$\(/,end:/\)/,contains:[a.BACKSLASH_ESCAPE]},f={begin:/<<-?\s*(?=\w+)/,starts:{contains:[a.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},g={className:"string",begin:/"/,end:/"/,contains:[a.BACKSLASH_ESCAPE,c,e]},e.contains.push(g),h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},a.NUMBER_MODE,c]},i=a.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10}),j={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","for","while","until","in","do","done","case","esac","function","select"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]},contains:[i,a.SHEBANG(),j,h,a.HASH_COMMENT_MODE,f,{match:/(\/[a-z._-]+)+/},g,{match:/\\"/},{className:"string",begin:/'/,end:/'/},{match:/\\'/},c]}},grmr_c:function(a){var b=a.regex,c=a.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),d="decltype\\(auto\\)",e="[a-zA-Z_]\\w*::",f="("+d+"|"+b.optional(e)+"[a-zA-Z_]\\w*"+b.optional("<[^<>]+>")+")",g={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[a.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},a.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},i={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},j={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},a.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},c,a.C_BLOCK_COMMENT_MODE]},k={className:"title",begin:b.optional(e)+a.IDENT_RE,relevance:0},l=b.optional(e)+a.IDENT_RE+"\\s*\\(",m={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},n=[j,g,c,a.C_BLOCK_COMMENT_MODE,i,h],o={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:m,contains:n.concat([{begin:/\(/,end:/\)/,keywords:m,contains:n.concat(["self"]),relevance:0}]),relevance:0},p={begin:"("+f+"[\\*&\\s]+)+"+l,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:m,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:d,keywords:m,relevance:0},{begin:l,returnBegin:!0,contains:[a.inherit(k,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[c,a.C_BLOCK_COMMENT_MODE,h,i,g,{begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:["self",c,a.C_BLOCK_COMMENT_MODE,h,i,g]}]},g,c,a.C_BLOCK_COMMENT_MODE,j]};return{name:"C",aliases:["h"],keywords:m,disableAutodetect:!0,illegal:"</",contains:[].concat(o,p,n,[j,{begin:a.IDENT_RE+"::",keywords:m},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},a.TITLE_MODE]}]),exports:{preprocessor:j,strings:h,keywords:m}}},grmr_cpp:function(a){var b=a.regex,c=a.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),d="decltype\\(auto\\)",e="[a-zA-Z_]\\w*::",f="(?!struct)("+d+"|"+b.optional(e)+"[a-zA-Z_]\\w*"+b.optional("<[^<>]+>")+")",g={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[a.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},a.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},i={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},j={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},a.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},c,a.C_BLOCK_COMMENT_MODE]},k={className:"title",begin:b.optional(e)+a.IDENT_RE,relevance:0},l=b.optional(e)+a.IDENT_RE+"\\s*\\(",m={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},n={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:b.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,a.IDENT_RE,b.lookahead(/(<[^<>]+>|)\s*\(/))},o=[n,j,g,c,a.C_BLOCK_COMMENT_MODE,i,h],p={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:m,contains:o.concat([{begin:/\(/,end:/\)/,keywords:m,contains:o.concat(["self"]),relevance:0}]),relevance:0},q={className:"function",begin:"("+f+"[\\*&\\s]+)+"+l,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:m,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:d,keywords:m,relevance:0},{begin:l,returnBegin:!0,contains:[k],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,i]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[c,a.C_BLOCK_COMMENT_MODE,h,i,g,{begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:["self",c,a.C_BLOCK_COMMENT_MODE,h,i,g]}]},g,c,a.C_BLOCK_COMMENT_MODE,j]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:m,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(p,q,n,o,[j,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:m,contains:["self",g]},{begin:a.IDENT_RE+"::",keywords:m},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}},grmr_csharp:function(a){var l,m,n,o,b={keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},c=a.inherit(a.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},e={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},f=a.inherit(e,{illegal:/\n/}),g={className:"subst",begin:/\{/,end:/\}/,keywords:b},h=a.inherit(g,{illegal:/\n/}),i={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},a.BACKSLASH_ESCAPE,h]},j={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},g]},k=a.inherit(j,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},h]});return g.contains=[j,i,e,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,d,a.C_BLOCK_COMMENT_MODE],h.contains=[k,i,f,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,d,a.inherit(a.C_BLOCK_COMMENT_MODE,{illegal:/\n/})],l={variants:[j,i,e,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE]},m={begin:"<",end:">",contains:[{beginKeywords:"in out"},c]},n=a.IDENT_RE+"(<"+a.IDENT_RE+"(\\s*,\\s*"+a.IDENT_RE+")*>)?(\\[\\])?",o={begin:"@"+a.IDENT_RE,relevance:0},{name:"C#",aliases:["cs","c#"],keywords:b,illegal:/::/,contains:[a.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},l,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},c,m,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,m,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+n+"\\s+)+"+a.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:b,contains:[{beginKeywords:"public private protected static internal protected abstract async extern override unsafe virtual new sealed partial",relevance:0},{begin:a.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[a.TITLE_MODE,m],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:b,relevance:0,contains:[l,d,a.C_BLOCK_COMMENT_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},o]}
},grmr_css:function(a){var b=a.regex,c=eb(a),d=[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[c.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},c.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},c.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+hb.join("|")+")"},{begin:":(:)?("+ib.join("|")+")"}]},c.CSS_VARIABLE,{className:"attribute",begin:"\\b("+jb.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[c.BLOCK_COMMENT,c.HEXCOLOR,c.IMPORTANT,c.CSS_NUMBER_MODE].concat(d,[{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[].concat(d,[{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}])},c.FUNCTION_DISPATCH])},{begin:b.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:gb.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"}].concat(d,[c.CSS_NUMBER_MODE])}]},{className:"selector-tag",begin:"\\b("+fb.join("|")+")\\b"}]}},grmr_diff:function(a){var b=a.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:b.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:b.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}},grmr_go:function(a){var b={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:b,illegal:"</",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"string",variants:[a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{begin:a.C_NUMBER_RE+"[i]",relevance:1},a.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[a.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:b,illegal:/["']/}]}]}},grmr_graphql:function(a){var b=a.regex;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[a.HASH_COMMENT_MODE,a.QUOTE_STRING_MODE,a.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:b.concat(/[_A-Za-z][_0-9A-Za-z]*/,b.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}},grmr_ini:function(a){var e,f,g,h,i,b=a.regex,c={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:a.NUMBER_RE}]},d=a.COMMENT();return d.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}],e={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},f={className:"literal",begin:/\bon|off|true|false|yes|no\b/},g={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},h={begin:/\[/,end:/\]/,contains:[d,f,e,g,c,"self"],relevance:0},i=b.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/),{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[d,{className:"section",begin:/\[+/,end:/\]+/},{begin:b.concat(i,"(\\s*\\.\\s*",i,")*",b.lookahead(/\s*=\s*[^#\s]/)),className:"attr",starts:{end:/$/,contains:[d,h,f,e,g,c]}}]}},grmr_java:function(a){var b=a.regex,c="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",d=c+pb("(?:<"+c+"~~~(?:\\s*,\\s*"+c+"~~~)*>)?",/~~~/g,2),e={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},f={className:"meta",begin:"@"+c,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},g={className:"params",begin:/\(/,end:/\)/,keywords:e,relevance:0,contains:[a.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:e,illegal:/<\/|#/,contains:[a.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[a.BACKSLASH_ESCAPE]},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,c],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[b.concat(/(?!else)/,c),/\s+/,c,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,c],className:{1:"keyword",3:"title.class"},contains:[g,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+d+"\\s+)",a.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:e,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:e,relevance:0,contains:[f,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,ob,a.C_BLOCK_COMMENT_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},ob,f]}},grmr_javascript:yb,grmr_json:function(a){var b=["true","false","null"],c={scope:"literal",beginKeywords:b.join(" ")};return{name:"JSON",keywords:{literal:b},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},a.QUOTE_STRING_MODE,c,a.C_NUMBER_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE],illegal:"\\S"}},grmr_kotlin:function(a){var g,h,i,j,k,l,b={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},c={className:"symbol",begin:a.UNDERSCORE_IDENT_RE+"@"},d={className:"subst",begin:/\$\{/,end:/\}/,contains:[a.C_NUMBER_MODE]},e={className:"variable",begin:"\\$"+a.UNDERSCORE_IDENT_RE},f={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[e,d]},{begin:"'",end:"'",illegal:/\n/,contains:[a.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[a.BACKSLASH_ESCAPE,e,d]}]};return d.contains.push(f),g={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+a.UNDERSCORE_IDENT_RE+")?"},h={className:"meta",begin:"@"+a.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[a.inherit(f,{className:"string"}),"self"]}]},i=ob,j=a.COMMENT("/\\*","\\*/",{contains:[a.C_BLOCK_COMMENT_MODE]}),k={variants:[{className:"type",begin:a.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},l=k,l.variants[1].contains=[k],k.variants[1].contains=[l],{name:"Kotlin",aliases:["kt","kts"],keywords:b,contains:[a.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.C_LINE_COMMENT_MODE,j,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},c,g,h,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:b,relevance:5,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:b,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[k,a.C_LINE_COMMENT_MODE,j],relevance:0},a.C_LINE_COMMENT_MODE,j,g,h,f,a.C_NUMBER_MODE]},j]},{begin:[/class|interface|trait/,/\s+/,a.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},a.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},g,h]},f,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},i]}},grmr_less:function(a){var l,m,n,o,p,q,r,b=eb(a),c=kb,d="[\\w-]+",e="("+d+"|@\\{"+d+"\\})",f=[],g=[],h=function(a){return{className:"string",begin:"~?"+a+".*?"+a}},i=function(a,b,c){return{className:a,begin:b,relevance:c}},j={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:gb.join(" ")},k={begin:"\\(",end:"\\)",contains:g,keywords:j,relevance:0};return g.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,h("'"),h('"'),b.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},b.HEXCOLOR,k,i("variable","@@?"+d,10),i("variable","@\\{"+d+"\\}"),i("built_in","~?`[^`]*?`"),{className:"attribute",begin:d+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},b.IMPORTANT,{beginKeywords:"and not"},b.FUNCTION_DISPATCH),l=g.concat({begin:/\{/,end:/\}/,contains:f}),m={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(g)},n={begin:e+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},b.CSS_VARIABLE,{className:"attribute",begin:"\\b("+jb.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:g}}]},o={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:j,returnEnd:!0,contains:g,relevance:0}},p={className:"variable",variants:[{begin:"@"+d+"\\s*:",relevance:15},{begin:"@"+d}],starts:{end:"[;}]",returnEnd:!0,contains:l}},q={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:e,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,m,i("keyword","all\\b"),i("variable","@\\{"+d+"\\}"),{begin:"\\b("+fb.join("|")+")\\b",className:"selector-tag"},b.CSS_NUMBER_MODE,i("selector-tag",e,0),i("selector-id","#"+e),i("selector-class","\\."+e,0),i("selector-tag","&",0),b.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+hb.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+ib.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:l},{begin:"!important"},b.FUNCTION_DISPATCH]},r={begin:d+":(:)?"+"(".concat(c.join("|"),")"),returnBegin:!0,contains:[q]},f.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,o,p,r,n,q,m,b.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:f}},grmr_lua:function(a){var b="\\[=*\\[",c="\\]=*\\]",d={begin:b,end:c,contains:["self"]},e=[a.COMMENT("--(?!"+b+")","$"),a.COMMENT("--"+b,c,{contains:[d],relevance:10})];return{name:"Lua",keywords:{$pattern:a.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:e.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[a.inherit(a.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:e}].concat(e)},a.C_NUMBER_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"string",begin:b,end:c,contains:[d],relevance:5}])}},grmr_makefile:function(a){var b={className:"variable",variants:[{begin:"\\$\\("+a.UNDERSCORE_IDENT_RE+"\\)",contains:[a.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},c={className:"string",begin:/"/,end:/"/,contains:[a.BACKSLASH_ESCAPE,b]},d={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[b]},e={begin:"^"+a.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},f={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[b]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[a.HASH_COMMENT_MODE,b,c,d,e,{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},f]}},grmr_markdown:function(a){var h,b={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},c={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:a.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([.\/?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},d={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},e={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},f=a.inherit(d,{contains:[]}),g=a.inherit(e,{contains:[]});return d.contains.push(g),e.contains.push(f),h=[b,c],[d,e,f,g].forEach(function(a){a.contains=a.contains.concat(h)}),h=h.concat(d,e),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:h},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:h}]}]},b,{className:"bullet",begin:"^[ 	]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},d,e,{className:"quote",begin:"^>\\s+",contains:h,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},c,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}},grmr_objectivec:function(a){var b=/[a-zA-Z@][a-zA-Z0-9_]*/,c={$pattern:b,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{"variable.language":["this","super"],$pattern:b,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},illegal:"</",contains:[{className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.C_NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[a.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},a.inherit(a.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+c.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:c,contains:[a.UNDERSCORE_TITLE_MODE]},{begin:"\\."+a.UNDERSCORE_IDENT_RE,relevance:0}]}},grmr_perl:function(a){var b=a.regex,c=/[dualxmsipngr]{0,12}/,d={$pattern:/[\w.]+/,keyword:"abs accept alarm and atan2 bind binmode bless break caller chdir chmod chomp chop chown chr chroot close closedir connect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoent endpwent endservent eof eval exec exists exit exp fcntl fileno flock for foreach fork format formline getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt given glob gmtime goto grep gt hex if index int ioctl join keys kill last lc lcfirst length link listen local localtime log lstat lt ma map mkdir msgctl msgget msgrcv msgsnd my ne next no not oct open opendir or ord our pack package pipe pop pos print printf prototype push q|0 qq quotemeta qw qx rand read readdir readline readlink readpipe recv redo ref rename require reset return reverse rewinddir rindex rmdir say scalar seek seekdir select semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat state study sub substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unless unlink unpack unshift untie until use utime values vec wait waitpid wantarray warn when while write x|0 xor y|0"},e={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:d},f={begin:/->\{/,end:/\}/},g={variants:[{begin:/\$\d/},{begin:b.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@][^\s\w{]/,relevance:0}]},h=[a.BACKSLASH_ESCAPE,e,g],i=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],j=function(a,d){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\\1",f="\\1"===e?e:b.concat(e,d);return b.concat(b.concat("(?:",a,")"),d,/(?:\\.|[^\\\/])*?/,f,/(?:\\.|[^\\\/])*?/,e,c)},k=function(a,d,e){return b.concat(b.concat("(?:",a,")"),d,/(?:\\.|[^\\\/])*?/,e,c)},l=[g,a.HASH_COMMENT_MODE,a.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),f,{className:"string",contains:h,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[a.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[a.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+a.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[a.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:j("s|tr|y",b.either.apply(b,i.concat([{capture:!0}])))},{begin:j("s|tr|y","\\(","\\)")},{begin:j("s|tr|y","\\[","\\]")},{begin:j("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:k("(?:m|qr)?",/\//,/\//)},{begin:k("m|qr",b.either.apply(b,i.concat([{capture:!0}])),/\1/)},{begin:k("m|qr",/\(/,/\)/)},{begin:k("m|qr",/\[/,/\]/)},{begin:k("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[a.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return e.contains=l,f.contains=l,{name:"Perl",aliases:["pl","pm"],keywords:d,contains:l}},grmr_php:function(a){var w,b=a.regex,c=/(?![A-Za-z0-9])(?![$])/,d=b.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,c),e=b.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,c),f={scope:"variable",match:"\\$+"+d},g={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},h=a.inherit(a.APOS_STRING_MODE,{illegal:null}),i="[ 	\n]",j={scope:"string",variants:[a.inherit(a.QUOTE_STRING_MODE,{illegal:null,contains:a.QUOTE_STRING_MODE.contains.concat(g)}),h,{begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:a.QUOTE_STRING_MODE.contains.concat(g),"on:begin":function(a,b){b.data._beginMatch=a[1]||a[2]},"on:end":function(a,b){b.data._beginMatch!==a[1]&&b.ignoreMatch()}},a.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/})]},k={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},l=["false","null","true"],m=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],n=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],o={keyword:m,literal:function(a){var b=[];return a.forEach(function(a){b.push(a),a.toLowerCase()===a?b.push(a.toUpperCase()):b.push(a.toLowerCase())}),b}(l),built_in:n},p=function(a){return a.map(function(a){return a.replace(/\|\d+$/,"")})},q={variants:[{match:[/new/,b.concat(i,"+"),b.concat("(?!",p(n).join("\\b|"),"\\b)"),e],scope:{1:"keyword",4:"title.class"}}]},r=b.concat(d,"\\b(?!\\()"),s={variants:[{match:[b.concat(/::/,b.lookahead(/(?!class\b)/)),r],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[e,b.concat(/::/,b.lookahead(/(?!class\b)/)),r],scope:{1:"title.class",3:"variable.constant"}},{match:[e,b.concat("::",b.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[e,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},t={scope:"attr",match:b.concat(d,b.lookahead(":"),b.lookahead(/(?!::)/))},u={relevance:0,begin:/\(/,end:/\)/,keywords:o,contains:[t,f,s,a.C_BLOCK_COMMENT_MODE,j,k,q]},v={relevance:0,match:[/\b/,b.concat("(?!fn\\b|function\\b|",p(m).join("\\b|"),"|",p(n).join("\\b|"),"\\b)"),d,b.concat(i,"*"),b.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[u]};return u.contains.push(v),w=[t,s,a.C_BLOCK_COMMENT_MODE,j,k,q],{case_insensitive:!1,keywords:o,contains:[{begin:b.concat(/#\[\s*/,e),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:l,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:l,keyword:["new","array"]},contains:["self"].concat(w)}].concat(w,[{scope:"meta",match:e}])},a.HASH_COMMENT_MODE,a.COMMENT("//","$"),a.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:a.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},f,v,s,{match:[/const/,/\s/,d],scope:{1:"keyword",3:"variable.constant"}},q,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},a.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",f,s,a.C_BLOCK_COMMENT_MODE,j,k]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[a.inherit(a.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},a.UNDERSCORE_TITLE_MODE]},j,k]}},grmr_php_template:function(a){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},a.inherit(a.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}},grmr_plaintext:function(){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}},grmr_python:function(a){var b=a.regex,c=/(?:[A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037B-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFC5D\uFC64-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDF9\uFE71\uFE73\uFE77\uFE79\uFE7B\uFE7D\uFE7F-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037B-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFC5D\uFC64-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDF9\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE71\uFE73\uFE77\uFE79\uFE7B\uFE7D\uFE7F-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF65-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDEFD-\uDF1C\uDF27\uDF30-\uDF50\uDF70-\uDF85\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E-\uDE41\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF59\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDCD0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]|\uDB40[\uDD00-\uDDEF])*/,d=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],e={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:d,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},f={className:"meta",begin:/^(>>>|\.\.\.) /},g={className:"subst",begin:/\{/,end:/\}/,keywords:e,illegal:/#/},h={begin:/\{\{/,relevance:0},i={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[a.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[a.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[a.BACKSLASH_ESCAPE,f,h,g]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[a.BACKSLASH_ESCAPE,f,h,g]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[a.BACKSLASH_ESCAPE,h,g]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[a.BACKSLASH_ESCAPE,h,g]},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE]},j="[0-9](_?[0-9])*",k="(\\b(".concat(j,"))?\\.(").concat(j,")|\\b(").concat(j,")\\."),l="\\b|"+d.join("|"),m={className:"number",relevance:0,variants:[{begin:"(\\b(".concat(j,")|(").concat(k,"))[eE][+-]?(").concat(j,")[jJ]?(?=").concat(l,")")},{begin:"(".concat(k,")[jJ]?")},{begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=".concat(l,")")},{begin:"\\b0[bB](_?[01])+[lL]?(?=".concat(l,")")},{begin:"\\b0[oO](_?[0-7])+[lL]?(?=".concat(l,")")},{begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=".concat(l,")")},{begin:"\\b(".concat(j,")[jJ](?=").concat(l,")")}]},n={className:"comment",begin:b.lookahead(/# type:/),end:/$/,keywords:e,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},o={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:e,contains:["self",f,m,i,a.HASH_COMMENT_MODE]}]};
return g.contains=[i,m,f],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:e,illegal:/(<\/|\?)|=>/,contains:[f,m,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},i,n,a.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,c],scope:{1:"keyword",3:"title.function"},contains:[o]},{variants:[{match:[/\bclass/,/\s+/,c,/\s*/,/\(\s*/,c,/\s*\)/]},{match:[/\bclass/,/\s+/,c]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,o,i]}]}},grmr_python_repl:function(){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}},grmr_r:function(a){var b=a.regex,c=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,d=b.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),e=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,f=b.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:c,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[a.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:b.lookahead(b.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:c},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),a.HASH_COMMENT_MODE,{scope:"string",contains:[a.BACKSLASH_ESCAPE],variants:[a.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),a.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),a.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),a.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),a.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),a.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[e,d]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,d]},{scope:{1:"punctuation",2:"number"},match:[f,d]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,d]}]},{scope:{3:"operator"},match:[c,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:e},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:f},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}},grmr_ruby:function(a){var p,b=a.regex,c="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",d=b.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),e=b.concat(d,/(::\w+)*/),f={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield","include","extend","prepend","public","private","protected","raise","throw"],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},g={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},i=[a.COMMENT("#","$",{contains:[g]}),a.COMMENT("^=begin","^=end",{contains:[g],relevance:10}),a.COMMENT("^__END__",a.MATCH_NOTHING_RE)],j={className:"subst",begin:/#\{/,end:/\}/,keywords:f},k={className:"string",contains:[a.BACKSLASH_ESCAPE,j],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:b.concat(/<<[-~]?'?/,b.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[a.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[a.BACKSLASH_ESCAPE,j]})]}]},l="[0-9](_?[0-9])*",m={className:"number",relevance:0,variants:[{begin:"\\b([1-9](_?[0-9])*|0)(\\.(".concat(l,"))?([eE][+-]?(").concat(l,")|r)?i?\\b")},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},n={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:f}]},o=[k,{variants:[{match:[/class\s+/,e,/\s+<\s+/,e]},{match:[/\b(class|module)\s+/,e]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:f},{match:[/(include|extend)\s+/,e],scope:{2:"title.class"},keywords:f},{relevance:0,match:[e,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:d,scope:"title.class"},{match:[/def/,/\s+/,c],scope:{1:"keyword",3:"title.function"},contains:[n]},{begin:a.IDENT_RE+"::"},{className:"symbol",begin:a.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[k,{begin:c}],relevance:0},m,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:f},{begin:"("+a.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[a.BACKSLASH_ESCAPE,j],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(h,i),relevance:0}].concat(h,i);return j.contains=o,n.contains=o,p=[{begin:/^\s*=>/,starts:{end:"$",contains:o}},{className:"meta.prompt",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",starts:{end:"$",keywords:f,contains:o}}],i.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:f,illegal:/\/\*/,contains:[a.SHEBANG({binary:"ruby"})].concat(p).concat(i).concat(o)}},grmr_rust:function(a){var b=a.regex,c={className:"title.function.invoke",relevance:0,begin:b.concat(/\b/,/(?!let|for|while|if|else|match\b)/,a.IDENT_RE,b.lookahead(/\s*\(/))},d="([ui](8|16|32|64|128|size)|f(32|64))?",e=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],f=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:a.IDENT_RE+"!?",type:f,keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:e},illegal:"</",contains:[a.C_LINE_COMMENT_MODE,a.COMMENT("/\\*","\\*/",{contains:["self"]}),a.inherit(a.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+d},{begin:"\\b0o([0-7_]+)"+d},{begin:"\\b0x([A-Fa-f0-9_]+)"+d},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+d}],relevance:0},{begin:[/fn/,/\s+/,a.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a.UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:a.IDENT_RE+"::",keywords:{keyword:"Self",built_in:e,type:f}},{className:"punctuation",begin:"->"},c]}},grmr_scss:function(a){var b=eb(a),c=ib,d=hb,e="@[a-z-]+",f={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,b.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},b.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+fb.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+d.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+c.join("|")+")"},f,{begin:/\(/,end:/\)/,contains:[b.CSS_NUMBER_MODE]},b.CSS_VARIABLE,{className:"attribute",begin:"\\b("+jb.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[b.BLOCK_COMMENT,f,b.HEXCOLOR,b.CSS_NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,b.IMPORTANT,b.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:e,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:gb.join(" ")},contains:[{begin:e,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},f,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,b.HEXCOLOR,b.CSS_NUMBER_MODE]},b.FUNCTION_DISPATCH]}},grmr_shell:function(){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[\/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}},grmr_sql:function(a){var b=a.regex,c=a.COMMENT("--","$"),d=["true","false","unknown"],e=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],f=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],g=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],h=f,i=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter(function(a){return!f.includes(a)}),j={begin:b.concat(/\b/,b.either.apply(b,h),/\s*\(/),relevance:0,keywords:{built_in:h}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=b.exceptions,d=b.when,e=d;return c=c||[],a.map(function(a){return a.match(/\|\d+$/)||c.includes(a)?a:e(a)?a+"|0":a})}(i,{when:function(a){return a.length<3}}),literal:d,type:e,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:b.either.apply(b,g),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:i.concat(g),literal:d,type:e}},{className:"type",begin:b.either("double precision","large object","with timezone","without timezone")},j,{className:"variable",begin:/@[a-z0-9][a-z0-9_]*/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},a.C_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE,c,{className:"operator",begin:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}},grmr_swift:function(a){var I,J,K,L,M,N,O,Q,P,R,S,T,b={match:/\s+/,relevance:0},c=a.COMMENT("/\\*","\\*/",{contains:["self"]}),d=[a.C_LINE_COMMENT_MODE,c],e={match:[/\./,o.apply(void 0,_toConsumableArray(Ab).concat(_toConsumableArray(Bb)))],className:{2:"keyword"}},f={match:n(/\./,o.apply(void 0,Db)),relevance:0},g=Db.filter(function(a){return"string"==typeof a}).concat(["_|0"]),h={variants:[{className:"keyword",match:o.apply(void 0,_toConsumableArray(Db.filter(function(a){return"string"!=typeof a}).concat(Cb).map(zb)).concat(_toConsumableArray(Bb)))}]},i={$pattern:o(/\b\w+/,/#\w+/),keyword:g.concat(Gb),literal:Eb},j=[e,f,h],l=[{match:n(/\./,o.apply(void 0,Hb)),relevance:0},{className:"built_in",match:n(/\b/,o.apply(void 0,Hb),/(?=\()/)}],m={match:/->/,relevance:0},p=[m,{className:"operator",relevance:0,variants:[{match:Kb},{match:"\\.(\\.|".concat(Jb,")+")}]}],q="([0-9]_*)+",r="([0-9a-fA-F]_*)+",s={className:"number",relevance:0,variants:[{match:"\\b(".concat(q,")(\\.(").concat(q,"))?([eE][+-]?(").concat(q,"))?\\b")},{match:"\\b0x(".concat(r,")(\\.(").concat(r,"))?([pP][+-]?(").concat(q,"))?\\b")},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},t=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{className:"subst",variants:[{match:n(/\\/,a,/[0\\tnr"']/)},{match:n(/\\/,a,/u\{[0-9a-fA-F]{1,8}\}/)}]}},u=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{className:"subst",match:n(/\\/,a,/[\t ]*(?:[\r\n]|\r\n)/)}},v=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{className:"subst",label:"interpol",begin:n(/\\/,a,/\(/),end:/\)/}},w=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{begin:n(a,/"""/),end:n(/"""/,a),contains:[t(a),u(a),v(a)]}},x=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{begin:n(a,/"/),end:n(/"/,a),contains:[t(a),v(a)]}},y={className:"string",variants:[w(),w("#"),w("##"),w("###"),x(),x("#"),x("##"),x("###")]},z=[a.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[a.BACKSLASH_ESCAPE]}],A={begin:/\/[^\s](?=[^\/\n]*\/)/,end:/\//,contains:z},B=function(a){var b=n(a,/\//),c=n(/\//,a);return{begin:b,end:c,contains:[].concat(z,[{scope:"comment",begin:"#(?!.*".concat(c,")"),end:/$/}])}},C={scope:"regexp",variants:[B("###"),B("##"),B("#"),A]},D={match:n(/`/,Nb,/`/)},E=[D,{className:"variable",match:/\$\d+/},{className:"variable",match:"\\$".concat(Mb,"+")}],F=[{match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Qb,contains:[].concat(p,[s,y])}]}},{scope:"keyword",match:n(/@/,o.apply(void 0,Pb))},{scope:"meta",match:n(/@/,Nb)}],G={match:k(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:n(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Mb,"+")},{className:"type",match:Ob,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,k(Ob)),relevance:0}]},H={begin:/</,end:/>/,keywords:i,contains:[].concat(d,j,F,[m,G])};G.contains.push(H),I={begin:/\(/,end:/\)/,relevance:0,keywords:i,contains:["self",{match:n(Nb,/\s*:/),keywords:"_|0",relevance:0}].concat(d,[C],j,l,p,[s,y],E,F,[G])},J={begin:/</,end:/>/,keywords:"repeat each",contains:[].concat(d,[G])},K={begin:/\(/,end:/\)/,keywords:i,contains:[{begin:o(k(n(Nb,/\s*:/)),k(n(Nb,/\s+/,Nb,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Nb}]}].concat(d,j,p,[s,y],F,[G,I]),endsParent:!0,illegal:/["']/},L={match:[/(func|macro)/,/\s+/,o(D.match,Nb,Kb)],className:{1:"keyword",3:"title.function"},contains:[J,K,b],illegal:[/\[/,/%/]},M={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[J,K,b],illegal:/\[|%/},N={match:[/operator/,/\s+/,Kb],className:{1:"keyword",3:"title"}},O={begin:[/precedencegroup/,/\s+/,Ob],className:{1:"keyword",3:"title"},contains:[G],keywords:[].concat(Fb,Eb),end:/}/},P=_createForOfIteratorHelper(y.variants);try{for(P.s();!(Q=P.n()).done;)R=Q.value,S=R.contains.find(function(a){return"interpol"===a.label}),S.keywords=i,T=[].concat(j,l,p,[s,y],E),S.contains=[].concat(_toConsumableArray(T),[{begin:/\(/,end:/\)/,contains:["self"].concat(_toConsumableArray(T))}])}catch(U){P.e(U)}finally{P.f()}return{name:"Swift",keywords:i,contains:[].concat(d,[L,M,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:i,contains:[a.inherit(a.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})].concat(j)},N,O,{beginKeywords:"import",end:/$/,contains:[].concat(d),relevance:0},C],j,l,p,[s,y],E,F,[G,I])}},grmr_typescript:function(a){var b=yb(a),c=qb,d=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],e={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[b.exports.CLASS_REFERENCE]},f={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:d},contains:[b.exports.CLASS_REFERENCE]},g={$pattern:qb,keyword:rb.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]),literal:sb,built_in:xb.concat(d),"variable.language":wb},h={className:"meta",begin:"@"+c},i=function(a,b,c){var d=a.contains.findIndex(function(a){return a.label===b});if(-1===d)throw Error("can not find mode to replace");a.contains.splice(d,1,c)};return Object.assign(b.keywords,g),b.exports.PARAMS_CONTAINS.push(h),b.contains=b.contains.concat([h,e,f]),i(b,"shebang",a.SHEBANG()),i(b,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/}),b.contains.find(function(a){return"func.def"===a.label}).relevance=0,Object.assign(b,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),b},grmr_vbnet:function(a){var b=a.regex,c=/\d{1,2}\/\d{1,2}\/\d{4}/,d=/\d{4}-\d{1,2}-\d{1,2}/,e=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,f=/\d{1,2}(:\d{1,2}){1,2}/,g={className:"literal",variants:[{begin:b.concat(/# */,b.either(d,c),/ *#/)},{begin:b.concat(/# */,f,/ *#/)},{begin:b.concat(/# */,e,/ *#/)},{begin:b.concat(/# */,b.either(d,c),/ +/,b.either(e,f),/ *#/)}]},h=a.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),i=a.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[{className:"string",begin:/"(""|[^\/n])"C\b/},{className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},g,{className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},{className:"label",begin:/^\w+:/},h,i,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[i]}]}},grmr_wasm:function(a){a.regex;var b=a.COMMENT(/\(;/,/;\)/);return b.contains.push("self"),{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"]},contains:[a.COMMENT(/;;/,/$/),b,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},{className:"variable",begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},{className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/},{className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/}]}},grmr_xml:function(a){var b=a.regex,c=b.concat(/(?:[A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/,b.optional(/(?:[\x2D\.0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])*:/),/(?:[\x2D\.0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])*/),d={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},e={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},f=a.inherit(e,{begin:/\(/,end:/\)/}),g=a.inherit(a.APOS_STRING_MODE,{className:"string"}),h=a.inherit(a.QUOTE_STRING_MODE,{className:"string"}),i={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/(?:[\x2D\.0-:A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])+/,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[d]},{begin:/'/,end:/'/,contains:[d]},{begin:/[^\s"'=<>`]+/}]}]}]};
return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[e,h,g,f,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[e,f,h,g]}]}]},a.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},d,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[i],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[i],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:b.concat(/</,b.lookahead(b.concat(c,b.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:c,relevance:0,starts:i}]},{className:"tag",begin:b.concat(/<\//,b.lookahead(b.concat(c,/>/))),contains:[{className:"name",begin:c,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}},grmr_yaml:function(a){var b="true false yes no null",c="[\\w#;/?:@&=+$,.~*'()[\\]]+",d={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[a.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},e=a.inherit(d,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={end:",",endsWithParent:!0,excludeEnd:!0,keywords:b,relevance:0},g={begin:/\{/,end:/\}/,contains:[f],illegal:"\\n",relevance:0},h={begin:"\\[",end:"\\]",contains:[f],illegal:"\\n",relevance:0},i=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ 	]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ 	]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ 	]|$)"}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+c},{className:"type",begin:"!<"+c+">"},{className:"type",begin:"!"+c},{className:"type",begin:"!!"+c},{className:"meta",begin:"&"+a.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+a.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},a.HASH_COMMENT_MODE,{beginKeywords:b,keywords:{literal:b}},{className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},{className:"number",begin:a.C_NUMBER_RE+"\\b",relevance:0},g,h,d],j=[].concat(i);return j.pop(),j.push(e),f.contains=j,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:i}}}),Sb=db,Tb=0,Ub=Object.keys(Rb);Tb<Ub.length;Tb++)Vb=Ub[Tb],Wb=Vb.replace("grmr_","").replace("_","-"),Sb.registerLanguage(Wb,Rb[Vb]);return Sb}();"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module&&(module.exports=hljs);

// 转换调用方式: 9.9 => 11.3.1; 兼容ie9,10
var hljsHighlight = hljs.highlight;
var hljsHighlightAll  = hljs.listLanguages();
if(!hljs.highlightElement){hljs.highlightElement = hljs.highlightBlock;}
hljs.highlight = function(code,options){ // 确保支持该高亮语言;
	if(!options){options = {language:'ini'};}
	if(typeof(options) == 'string'){options = {language:options};}
	options.language = hljsHighlightAll.indexOf(options.language) !== -1 ? options.language : 'ini';
	return hljsHighlight.apply(hljs,[code,options]);
}
markdown-it.min.js
wget 'https://sme10.lists2.roe3.org/kodbox/static/app/vender/markdown/markdown-it.min.js'
View Content
/*! markdown-it 13.0.1 https://github.com/markdown-it/markdown-it @license MIT */
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(e="undefined"!=typeof globalThis?globalThis:e||self).markdownit=r()}(this,(function(){"use strict";function e(e){if(e.__esModule)return e;var r=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var r={Aacute:"\xc1",aacute:"\xe1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223e",acd:"\u223f",acE:"\u223e\u0333",Acirc:"\xc2",acirc:"\xe2",acute:"\xb4",Acy:"\u0410",acy:"\u0430",AElig:"\xc6",aelig:"\xe6",af:"\u2061",Afr:"\ud835\udd04",afr:"\ud835\udd1e",Agrave:"\xc0",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03b1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2a3f",amp:"&",AMP:"&",andand:"\u2a55",And:"\u2a53",and:"\u2227",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angmsd:"\u2221",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",Aogon:"\u0104",aogon:"\u0105",Aopf:"\ud835\udd38",aopf:"\ud835\udd52",apacir:"\u2a6f",ap:"\u2248",apE:"\u2a70",ape:"\u224a",apid:"\u224b",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224a",Aring:"\xc5",aring:"\xe5",Ascr:"\ud835\udc9c",ascr:"\ud835\udcb6",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224d",Atilde:"\xc3",atilde:"\xe3",Auml:"\xc4",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",Backslash:"\u2216",Barv:"\u2ae7",barvee:"\u22bd",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",Bernoullis:"\u212c",Beta:"\u0392",beta:"\u03b2",beth:"\u2136",between:"\u226c",Bfr:"\ud835\udd05",bfr:"\ud835\udd1f",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bNot:"\u2aed",bnot:"\u2310",Bopf:"\ud835\udd39",bopf:"\ud835\udd53",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxbox:"\u29c9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250c",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252c",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxhu:"\u2534",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxul:"\u2518",boxuL:"\u255b",boxUl:"\u255c",boxUL:"\u255d",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255a",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253c",boxvH:"\u256a",boxVh:"\u256b",boxVH:"\u256c",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251c",boxvR:"\u255e",boxVr:"\u255f",boxVR:"\u2560",bprime:"\u2035",breve:"\u02d8",Breve:"\u02d8",brvbar:"\xa6",bscr:"\ud835\udcb7",Bscr:"\u212c",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsolb:"\u29c5",bsol:"\\",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",Bumpeq:"\u224e",bumpeq:"\u224f",Cacute:"\u0106",cacute:"\u0107",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",cap:"\u2229",Cap:"\u22d2",capcup:"\u2a47",capdot:"\u2a40",CapitalDifferentialD:"\u2145",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",Cayleys:"\u212d",ccaps:"\u2a4d",Ccaron:"\u010c",ccaron:"\u010d",Ccedil:"\xc7",ccedil:"\xe7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2a4c",ccupssm:"\u2a50",Cdot:"\u010a",cdot:"\u010b",cedil:"\xb8",Cedilla:"\xb8",cemptyv:"\u29b2",cent:"\xa2",centerdot:"\xb7",CenterDot:"\xb7",cfr:"\ud835\udd20",Cfr:"\u212d",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03a7",chi:"\u03c7",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",CircleDot:"\u2299",circledR:"\xae",circledS:"\u24c8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cir:"\u25cb",cirE:"\u29c3",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",Colone:"\u2a74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",Congruent:"\u2261",conint:"\u222e",Conint:"\u222f",ContourIntegral:"\u222e",copf:"\ud835\udd54",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xa9",COPY:"\xa9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21b5",cross:"\u2717",Cross:"\u2a2f",Cscr:"\ud835\udc9e",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",cupbrcap:"\u2a48",cupcap:"\u2a46",CupCap:"\u224d",cup:"\u222a",Cup:"\u22d3",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",Darr:"\u21a1",dArr:"\u21d3",dash:"\u2010",Dashv:"\u2ae4",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",Dcaron:"\u010e",dcaron:"\u010f",Dcy:"\u0414",dcy:"\u0434",ddagger:"\u2021",ddarr:"\u21ca",DD:"\u2145",dd:"\u2146",DDotrahd:"\u2911",ddotseq:"\u2a77",deg:"\xb0",Del:"\u2207",Delta:"\u0394",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",Dfr:"\ud835\udd07",dfr:"\ud835\udd21",dHar:"\u2965",dharl:"\u21c3",dharr:"\u21c2",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",diam:"\u22c4",diamond:"\u22c4",Diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",DifferentialD:"\u2146",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",Dopf:"\ud835\udd3b",dopf:"\ud835\udd55",Dot:"\xa8",dot:"\u02d9",DotDot:"\u20dc",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrowBar:"\u2913",downarrow:"\u2193",DownArrow:"\u2193",Downarrow:"\u21d3",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVectorBar:"\u2956",DownLeftVector:"\u21bd",DownRightTeeVector:"\u295f",DownRightVectorBar:"\u2957",DownRightVector:"\u21c1",DownTeeArrow:"\u21a7",DownTee:"\u22a4",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",Dscr:"\ud835\udc9f",dscr:"\ud835\udcb9",DScy:"\u0405",dscy:"\u0455",dsol:"\u29f6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",DZcy:"\u040f",dzcy:"\u045f",dzigrarr:"\u27ff",Eacute:"\xc9",eacute:"\xe9",easter:"\u2a6e",Ecaron:"\u011a",ecaron:"\u011b",Ecirc:"\xca",ecirc:"\xea",ecir:"\u2256",ecolon:"\u2255",Ecy:"\u042d",ecy:"\u044d",eDDot:"\u2a77",Edot:"\u0116",edot:"\u0117",eDot:"\u2251",ee:"\u2147",efDot:"\u2252",Efr:"\ud835\udd08",efr:"\ud835\udd22",eg:"\u2a9a",Egrave:"\xc8",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",Element:"\u2208",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25fb",emptyv:"\u2205",EmptyVerySmallSquare:"\u25ab",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",ENG:"\u014a",eng:"\u014b",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\ud835\udd3c",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",Epsilon:"\u0395",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",Equal:"\u2a75",equals:"=",EqualTilde:"\u2242",equest:"\u225f",Equilibrium:"\u21cc",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erarr:"\u2971",erDot:"\u2253",escr:"\u212f",Escr:"\u2130",esdot:"\u2250",Esim:"\u2a73",esim:"\u2242",Eta:"\u0397",eta:"\u03b7",ETH:"\xd0",eth:"\xf0",Euml:"\xcb",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",Ffr:"\ud835\udd09",ffr:"\ud835\udd23",filig:"\ufb01",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",Fopf:"\ud835\udd3d",fopf:"\ud835\udd57",forall:"\u2200",ForAll:"\u2200",fork:"\u22d4",forkv:"\u2ad9",Fouriertrf:"\u2131",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",fscr:"\ud835\udcbb",Fscr:"\u2131",gacute:"\u01f5",Gamma:"\u0393",gamma:"\u03b3",Gammad:"\u03dc",gammad:"\u03dd",gap:"\u2a86",Gbreve:"\u011e",gbreve:"\u011f",Gcedil:"\u0122",Gcirc:"\u011c",gcirc:"\u011d",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",ge:"\u2265",gE:"\u2267",gEl:"\u2a8c",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",gescc:"\u2aa9",ges:"\u2a7e",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",Gfr:"\ud835\udd0a",gfr:"\ud835\udd24",gg:"\u226b",Gg:"\u22d9",ggg:"\u22d9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gla:"\u2aa5",gl:"\u2277",glE:"\u2a92",glj:"\u2aa4",gnap:"\u2a8a",gnapprox:"\u2a8a",gne:"\u2a88",gnE:"\u2269",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",Gopf:"\ud835\udd3e",gopf:"\ud835\udd58",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\ud835\udca2",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",gtcc:"\u2aa7",gtcir:"\u2a7a",gt:">",GT:">",Gt:"\u226b",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",Hacek:"\u02c7",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",HARDcy:"\u042a",hardcy:"\u044a",harrcir:"\u2948",harr:"\u2194",hArr:"\u21d4",harrw:"\u21ad",Hat:"^",hbar:"\u210f",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",hfr:"\ud835\udd25",Hfr:"\u210c",HilbertSpace:"\u210b",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",hopf:"\ud835\udd59",Hopf:"\u210d",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\ud835\udcbd",Hscr:"\u210b",hslash:"\u210f",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224e",HumpEqual:"\u224f",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xcd",iacute:"\xed",ic:"\u2063",Icirc:"\xce",icirc:"\xee",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",ifr:"\ud835\udd26",Ifr:"\u2111",Igrave:"\xcc",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Imacr:"\u012a",imacr:"\u012b",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",Im:"\u2111",imof:"\u22b7",imped:"\u01b5",Implies:"\u21d2",incare:"\u2105",in:"\u2208",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",intcal:"\u22ba",int:"\u222b",Int:"\u222c",integers:"\u2124",Integral:"\u222b",intercal:"\u22ba",Intersection:"\u22c2",intlarhk:"\u2a17",intprod:"\u2a3c",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012e",iogon:"\u012f",Iopf:"\ud835\udd40",iopf:"\ud835\udd5a",Iota:"\u0399",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",iscr:"\ud835\udcbe",Iscr:"\u2110",isin:"\u2208",isindot:"\u22f5",isinE:"\u22f9",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xcf",iuml:"\xef",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\ud835\udd0d",jfr:"\ud835\udd27",jmath:"\u0237",Jopf:"\ud835\udd41",jopf:"\ud835\udd5b",Jscr:"\ud835\udca5",jscr:"\ud835\udcbf",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039a",kappa:"\u03ba",kappav:"\u03f0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041a",kcy:"\u043a",Kfr:"\ud835\udd0e",kfr:"\ud835\udd28",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040c",kjcy:"\u045c",Kopf:"\ud835\udd42",kopf:"\ud835\udd5c",Kscr:"\ud835\udca6",kscr:"\ud835\udcc0",lAarr:"\u21da",Lacute:"\u0139",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",Lambda:"\u039b",lambda:"\u03bb",lang:"\u27e8",Lang:"\u27ea",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",Laplacetrf:"\u2112",laquo:"\xab",larrb:"\u21e4",larrbfs:"\u291f",larr:"\u2190",Larr:"\u219e",lArr:"\u21d0",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",latail:"\u2919",lAtail:"\u291b",lat:"\u2aab",late:"\u2aad",lates:"\u2aad\ufe00",lbarr:"\u290c",lBarr:"\u290e",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",Lcaron:"\u013d",lcaron:"\u013e",Lcedil:"\u013b",lcedil:"\u013c",lceil:"\u2308",lcub:"{",Lcy:"\u041b",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27e8",LeftArrowBar:"\u21e4",leftarrow:"\u2190",LeftArrow:"\u2190",Leftarrow:"\u21d0",LeftArrowRightArrow:"\u21c6",leftarrowtail:"\u21a2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVectorBar:"\u2959",LeftDownVector:"\u21c3",LeftFloor:"\u230a",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",leftrightarrow:"\u2194",LeftRightArrow:"\u2194",Leftrightarrow:"\u21d4",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",LeftRightVector:"\u294e",LeftTeeArrow:"\u21a4",LeftTee:"\u22a3",LeftTeeVector:"\u295a",leftthreetimes:"\u22cb",LeftTriangleBar:"\u29cf",LeftTriangle:"\u22b2",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVectorBar:"\u2958",LeftUpVector:"\u21bf",LeftVectorBar:"\u2952",LeftVector:"\u21bc",lEg:"\u2a8b",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",lescc:"\u2aa8",les:"\u2a7d",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2aa1",lesssim:"\u2272",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",lfisht:"\u297c",lfloor:"\u230a",Lfr:"\ud835\udd0f",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lHar:"\u2962",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",llarr:"\u21c7",ll:"\u226a",Ll:"\u22d8",llcorner:"\u231e",Lleftarrow:"\u21da",llhard:"\u296b",lltri:"\u25fa",Lmidot:"\u013f",lmidot:"\u0140",lmoustache:"\u23b0",lmoust:"\u23b0",lnap:"\u2a89",lnapprox:"\u2a89",lne:"\u2a87",lnE:"\u2268",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",longleftarrow:"\u27f5",LongLeftArrow:"\u27f5",Longleftarrow:"\u27f8",longleftrightarrow:"\u27f7",LongLeftRightArrow:"\u27f7",Longleftrightarrow:"\u27fa",longmapsto:"\u27fc",longrightarrow:"\u27f6",LongRightArrow:"\u27f6",Longrightarrow:"\u27f9",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",Lopf:"\ud835\udd43",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",lscr:"\ud835\udcc1",Lscr:"\u2112",lsh:"\u21b0",Lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",Lstrok:"\u0141",lstrok:"\u0142",ltcc:"\u2aa6",ltcir:"\u2a79",lt:"<",LT:"<",Lt:"\u226a",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",ltrPar:"\u2996",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",Mcy:"\u041c",mcy:"\u043c",mdash:"\u2014",mDDot:"\u223a",measuredangle:"\u2221",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\xb5",midast:"*",midcir:"\u2af0",mid:"\u2223",middot:"\xb7",minusb:"\u229f",minus:"\u2212",minusd:"\u2238",minusdu:"\u2a2a",MinusPlus:"\u2213",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",Mopf:"\ud835\udd44",mopf:"\ud835\udd5e",mp:"\u2213",mscr:"\ud835\udcc2",Mscr:"\u2133",mstpos:"\u223e",Mu:"\u039c",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natural:"\u266e",naturals:"\u2115",natur:"\u266e",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",Ncy:"\u041d",ncy:"\u043d",ndash:"\u2013",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21d7",nearrow:"\u2197",ne:"\u2260",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",nexist:"\u2204",nexists:"\u2204",Nfr:"\ud835\udd11",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",nGg:"\u22d9\u0338",ngsim:"\u2275",nGt:"\u226b\u20d2",ngt:"\u226f",ngtr:"\u226f",nGtv:"\u226b\u0338",nharr:"\u21ae",nhArr:"\u21ce",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",NJcy:"\u040a",njcy:"\u045a",nlarr:"\u219a",nlArr:"\u21cd",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219a",nLeftarrow:"\u21cd",nleftrightarrow:"\u21ae",nLeftrightarrow:"\u21ce",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nLl:"\u22d8\u0338",nlsim:"\u2274",nLt:"\u226a\u20d2",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nLtv:"\u226a\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xa0",nopf:"\ud835\udd5f",Nopf:"\u2115",Not:"\u2aec",not:"\xac",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",notin:"\u2209",notindot:"\u22f5\u0338",notinE:"\u22f9\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangle:"\u22ea",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangle:"\u22eb",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",nprec:"\u2280",npreceq:"\u2aaf\u0338",npre:"\u2aaf\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219b",nrArr:"\u21cf",nrarrw:"\u219d\u0338",nrightarrow:"\u219b",nRightarrow:"\u21cf",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",Nscr:"\ud835\udca9",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",Ntilde:"\xd1",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",Nu:"\u039d",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224d\u20d2",nvdash:"\u22ac",nvDash:"\u22ad",nVdash:"\u22ae",nVDash:"\u22af",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvHarr:"\u2904",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21d6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xd3",oacute:"\xf3",oast:"\u229b",Ocirc:"\xd4",ocirc:"\xf4",ocir:"\u229a",Ocy:"\u041e",ocy:"\u043e",odash:"\u229d",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29bf",Ofr:"\ud835\udd12",ofr:"\ud835\udd2c",ogon:"\u02db",Ograve:"\xd2",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",Omacr:"\u014c",omacr:"\u014d",Omega:"\u03a9",omega:"\u03c9",Omicron:"\u039f",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",Oopf:"\ud835\udd46",oopf:"\ud835\udd60",opar:"\u29b7",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",operp:"\u29b9",oplus:"\u2295",orarr:"\u21bb",Or:"\u2a54",or:"\u2228",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oS:"\u24c8",Oscr:"\ud835\udcaa",oscr:"\u2134",Oslash:"\xd8",oslash:"\xf8",osol:"\u2298",Otilde:"\xd5",otilde:"\xf5",otimesas:"\u2a36",Otimes:"\u2a37",otimes:"\u2297",Ouml:"\xd6",ouml:"\xf6",ovbar:"\u233d",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",para:"\xb6",parallel:"\u2225",par:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",PartialD:"\u2202",Pcy:"\u041f",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",Pfr:"\ud835\udd13",pfr:"\ud835\udd2d",Phi:"\u03a6",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",Pi:"\u03a0",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plus:"+",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",PlusMinus:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",Poincareplane:"\u210c",pointint:"\u2a15",popf:"\ud835\udd61",Popf:"\u2119",pound:"\xa3",prap:"\u2ab7",Pr:"\u2abb",pr:"\u227a",prcue:"\u227c",precapprox:"\u2ab7",prec:"\u227a",preccurlyeq:"\u227c",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",pre:"\u2aaf",prE:"\u2ab3",precsim:"\u227e",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2ab9",prnE:"\u2ab5",prnsim:"\u22e8",prod:"\u220f",Product:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",Proportional:"\u221d",Proportion:"\u2237",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",Pscr:"\ud835\udcab",pscr:"\ud835\udcc5",Psi:"\u03a8",psi:"\u03c8",puncsp:"\u2008",Qfr:"\ud835\udd14",qfr:"\ud835\udd2e",qint:"\u2a0c",qopf:"\ud835\udd62",Qopf:"\u211a",qprime:"\u2057",Qscr:"\ud835\udcac",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",quot:'"',QUOT:'"',rAarr:"\u21db",race:"\u223d\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",rang:"\u27e9",Rang:"\u27eb",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarr:"\u2192",Rarr:"\u21a0",rArr:"\u21d2",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21a3",rarrw:"\u219d",ratail:"\u291a",rAtail:"\u291c",ratio:"\u2236",rationals:"\u211a",rbarr:"\u290d",rBarr:"\u290f",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",Re:"\u211c",rect:"\u25ad",reg:"\xae",REG:"\xae",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",rfisht:"\u297d",rfloor:"\u230b",rfr:"\ud835\udd2f",Rfr:"\u211c",rHar:"\u2964",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",Rho:"\u03a1",rho:"\u03c1",rhov:"\u03f1",RightAngleBracket:"\u27e9",RightArrowBar:"\u21e5",rightarrow:"\u2192",RightArrow:"\u2192",Rightarrow:"\u21d2",RightArrowLeftArrow:"\u21c4",rightarrowtail:"\u21a3",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVectorBar:"\u2955",RightDownVector:"\u21c2",RightFloor:"\u230b",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",RightTeeArrow:"\u21a6",RightTee:"\u22a2",RightTeeVector:"\u295b",rightthreetimes:"\u22cc",RightTriangleBar:"\u29d0",RightTriangle:"\u22b3",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVectorBar:"\u2954",RightUpVector:"\u21be",RightVectorBar:"\u2953",RightVector:"\u21c0",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoustache:"\u23b1",rmoust:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",ropf:"\ud835\udd63",Ropf:"\u211d",roplus:"\u2a2e",rotimes:"\u2a35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",Rrightarrow:"\u21db",rsaquo:"\u203a",rscr:"\ud835\udcc7",Rscr:"\u211b",rsh:"\u21b1",Rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",RuleDelayed:"\u29f4",ruluhar:"\u2968",rx:"\u211e",Sacute:"\u015a",sacute:"\u015b",sbquo:"\u201a",scap:"\u2ab8",Scaron:"\u0160",scaron:"\u0161",Sc:"\u2abc",sc:"\u227b",sccue:"\u227d",sce:"\u2ab0",scE:"\u2ab4",Scedil:"\u015e",scedil:"\u015f",Scirc:"\u015c",scirc:"\u015d",scnap:"\u2aba",scnE:"\u2ab6",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",Scy:"\u0421",scy:"\u0441",sdotb:"\u22a1",sdot:"\u22c5",sdote:"\u2a66",searhk:"\u2925",searr:"\u2198",seArr:"\u21d8",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\ud835\udd16",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xad",Sigma:"\u03a3",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",SOFTcy:"\u042c",softcy:"\u044c",solbar:"\u233f",solb:"\u29c4",sol:"/",Sopf:"\ud835\udd4a",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",Sqrt:"\u221a",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",square:"\u25a1",Square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25aa",squ:"\u25a1",squf:"\u25aa",srarr:"\u2192",Sscr:"\ud835\udcae",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",Star:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",sub:"\u2282",Sub:"\u22d0",subdot:"\u2abd",subE:"\u2ac5",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",subset:"\u2282",Subset:"\u22d0",subseteq:"\u2286",subseteqq:"\u2ac5",SubsetEqual:"\u2286",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succapprox:"\u2ab8",succ:"\u227b",succcurlyeq:"\u227d",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",SuchThat:"\u220b",sum:"\u2211",Sum:"\u2211",sung:"\u266a",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",sup:"\u2283",Sup:"\u22d1",supdot:"\u2abe",supdsub:"\u2ad8",supE:"\u2ac6",supe:"\u2287",supedot:"\u2ac4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",supset:"\u2283",Supset:"\u22d1",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21d9",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",Tab:"\t",target:"\u2316",Tau:"\u03a4",tau:"\u03c4",tbrk:"\u23b4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",Tfr:"\ud835\udd17",tfr:"\ud835\udd31",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",Theta:"\u0398",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",ThickSpace:"\u205f\u200a",ThinSpace:"\u2009",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223c",THORN:"\xde",thorn:"\xfe",tilde:"\u02dc",Tilde:"\u223c",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",timesbar:"\u2a31",timesb:"\u22a0",times:"\xd7",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",topbot:"\u2336",topcir:"\u2af1",top:"\u22a4",Topf:"\ud835\udd4b",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",TripleDot:"\u20db",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",Tscr:"\ud835\udcaf",tscr:"\ud835\udcc9",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040b",tshcy:"\u045b",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",Uacute:"\xda",uacute:"\xfa",uarr:"\u2191",Uarr:"\u219f",uArr:"\u21d1",Uarrocir:"\u2949",Ubrcy:"\u040e",ubrcy:"\u045e",Ubreve:"\u016c",ubreve:"\u016d",Ucirc:"\xdb",ucirc:"\xfb",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21c5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",Ufr:"\ud835\udd18",ufr:"\ud835\udd32",Ugrave:"\xd9",ugrave:"\xf9",uHar:"\u2963",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",Umacr:"\u016a",umacr:"\u016b",uml:"\xa8",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",uogon:"\u0173",Uopf:"\ud835\udd4c",uopf:"\ud835\udd66",UpArrowBar:"\u2912",uparrow:"\u2191",UpArrow:"\u2191",Uparrow:"\u21d1",UpArrowDownArrow:"\u21c5",updownarrow:"\u2195",UpDownArrow:"\u2195",Updownarrow:"\u21d5",UpEquilibrium:"\u296e",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03c5",Upsi:"\u03d2",upsih:"\u03d2",Upsilon:"\u03a5",upsilon:"\u03c5",UpTeeArrow:"\u21a5",UpTee:"\u22a5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",Uring:"\u016e",uring:"\u016f",urtri:"\u25f9",Uscr:"\ud835\udcb0",uscr:"\ud835\udcca",utdot:"\u22f0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",Uuml:"\xdc",uuml:"\xfc",uwangle:"\u29a7",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",varr:"\u2195",vArr:"\u21d5",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",vBar:"\u2ae8",Vbar:"\u2aeb",vBarv:"\u2ae9",Vcy:"\u0412",vcy:"\u0432",vdash:"\u22a2",vDash:"\u22a8",Vdash:"\u22a9",VDash:"\u22ab",Vdashl:"\u2ae6",veebar:"\u22bb",vee:"\u2228",Vee:"\u22c1",veeeq:"\u225a",vellip:"\u22ee",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",Vopf:"\ud835\udd4d",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",Vscr:"\ud835\udcb1",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",Vvdash:"\u22aa",vzigzag:"\u299a",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2a5f",wedge:"\u2227",Wedge:"\u22c0",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\ud835\udd1a",wfr:"\ud835\udd34",Wopf:"\ud835\udd4e",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\ud835\udcb2",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",Xfr:"\ud835\udd1b",xfr:"\ud835\udd35",xharr:"\u27f7",xhArr:"\u27fa",Xi:"\u039e",xi:"\u03be",xlarr:"\u27f5",xlArr:"\u27f8",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",Xopf:"\ud835\udd4f",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrarr:"\u27f6",xrArr:"\u27f9",Xscr:"\ud835\udcb3",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",Yacute:"\xdd",yacute:"\xfd",YAcy:"\u042f",yacy:"\u044f",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042b",ycy:"\u044b",yen:"\xa5",Yfr:"\ud835\udd1c",yfr:"\ud835\udd36",YIcy:"\u0407",yicy:"\u0457",Yopf:"\ud835\udd50",yopf:"\ud835\udd6a",Yscr:"\ud835\udcb4",yscr:"\ud835\udcce",YUcy:"\u042e",yucy:"\u044e",yuml:"\xff",Yuml:"\u0178",Zacute:"\u0179",zacute:"\u017a",Zcaron:"\u017d",zcaron:"\u017e",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017b",zdot:"\u017c",zeetrf:"\u2128",ZeroWidthSpace:"\u200b",Zeta:"\u0396",zeta:"\u03b6",zfr:"\ud835\udd37",Zfr:"\u2128",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21dd",zopf:"\ud835\udd6b",Zopf:"\u2124",Zscr:"\ud835\udcb5",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"},t=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,n={};function s(e,r,t){var o,i,a,c,l,u="";for("string"!=typeof r&&(t=r,r=s.defaultChars),void 0===t&&(t=!0),l=function(e){var r,t,s=n[e];if(s)return s;for(s=n[e]=[],r=0;r<128;r++)t=String.fromCharCode(r),/^[0-9a-z]$/i.test(t)?s.push(t):s.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2));for(r=0;r<e.length;r++)s[e.charCodeAt(r)]=e[r];return s}(r),o=0,i=e.length;o<i;o++)if(a=e.charCodeAt(o),t&&37===a&&o+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(a<128)u+=l[a];else if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&o+1<i&&(c=e.charCodeAt(o+1))>=56320&&c<=57343){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}s.defaultChars=";/?:@&=+$,-_.!~*'()#",s.componentChars="-_.!~*'()";var o=s,i={};function a(e,r){var t;return"string"!=typeof r&&(r=a.defaultChars),t=function(e){var r,t,n=i[e];if(n)return n;for(n=i[e]=[],r=0;r<128;r++)t=String.fromCharCode(r),n.push(t);for(r=0;r<e.length;r++)n[t=e.charCodeAt(r)]="%"+("0"+t.toString(16).toUpperCase()).slice(-2);return n}(r),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var r,n,s,o,i,a,c,l="";for(r=0,n=e.length;r<n;r+=3)(s=parseInt(e.slice(r+1,r+3),16))<128?l+=t[s]:192==(224&s)&&r+3<n&&128==(192&(o=parseInt(e.slice(r+4,r+6),16)))?(l+=(c=s<<6&1984|63&o)<128?"\ufffd\ufffd":String.fromCharCode(c),r+=3):224==(240&s)&&r+6<n&&(o=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),128==(192&o)&&128==(192&i))?(l+=(c=s<<12&61440|o<<6&4032|63&i)<2048||c>=55296&&c<=57343?"\ufffd\ufffd\ufffd":String.fromCharCode(c),r+=6):240==(248&s)&&r+9<n&&(o=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),a=parseInt(e.slice(r+10,r+12),16),128==(192&o)&&128==(192&i)&&128==(192&a))?((c=s<<18&1835008|o<<12&258048|i<<6&4032|63&a)<65536||c>1114111?l+="\ufffd\ufffd\ufffd\ufffd":(c-=65536,l+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),r+=9):l+="\ufffd";return l}))}a.defaultChars=";/?:@&=+$,#",a.componentChars="";var c=a;function l(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var u=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,f=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),d=["'"].concat(f),m=["%","/","?",";","#"].concat(d),g=["/","?","#"],_=/^[+a-z0-9A-Z_-]{0,63}$/,k=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};l.prototype.parse=function(e,r){var t,n,s,o,i,a=e;if(a=a.trim(),!r&&1===e.split("#").length){var c=h.exec(a);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}var l=u.exec(a);if(l&&(s=(l=l[0]).toLowerCase(),this.protocol=l,a=a.substr(l.length)),(r||l||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(i="//"===a.substr(0,2))||l&&b[l]||(a=a.substr(2),this.slashes=!0)),!b[l]&&(i||l&&!v[l])){var p,f,d=-1;for(t=0;t<g.length;t++)-1!==(o=a.indexOf(g[t]))&&(-1===d||o<d)&&(d=o);for(-1!==(f=-1===d?a.lastIndexOf("@"):a.lastIndexOf("@",d))&&(p=a.slice(0,f),a=a.slice(f+1),this.auth=p),d=-1,t=0;t<m.length;t++)-1!==(o=a.indexOf(m[t]))&&(-1===d||o<d)&&(d=o);-1===d&&(d=a.length),":"===a[d-1]&&d--;var C=a.slice(0,d);a=a.slice(d),this.parseHost(C),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y){var A=this.hostname.split(/\./);for(t=0,n=A.length;t<n;t++){var x=A[t];if(x&&!x.match(_)){for(var D="",w=0,E=x.length;w<E;w++)x.charCodeAt(w)>127?D+="x":D+=x[w];if(!D.match(_)){var q=A.slice(0,t),S=A.slice(t+1),F=x.match(k);F&&(q.push(F[1]),S.unshift(F[2])),S.length&&(a=S.join(".")+a),this.hostname=q.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var L=a.indexOf("#");-1!==L&&(this.hash=a.substr(L),a=a.slice(0,L));var z=a.indexOf("?");return-1!==z&&(this.search=a.substr(z),a=a.slice(0,z)),a&&(this.pathname=a),v[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},l.prototype.parseHost=function(e){var r=p.exec(e);r&&(":"!==(r=r[0])&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)};var C={encode:o,decode:c,format:function(e){var r="";return r+=e.protocol||"",r+=e.slashes?"//":"",r+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?r+="["+e.hostname+"]":r+=e.hostname||"",r+=e.port?":"+e.port:"",r+=e.pathname||"",r+=e.search||"",r+=e.hash||""},parse:function(e,r){if(e&&e instanceof l)return e;var t=new l;return t.parse(e,r),t}},y=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,A=/[\0-\x1F\x7F-\x9F]/,x=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,D={Any:y,Cc:A,Cf:/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,P:t,Z:x},w=function(e,r,t){return t={path:r,exports:{},require:function(e,r){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==r&&t.path)}},e(t,t.exports),t.exports}((function(e,n){var s=Object.prototype.hasOwnProperty;function o(e,r){return s.call(e,r)}function i(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function a(e){if(e>65535){var r=55296+((e-=65536)>>10),t=56320+(1023&e);return String.fromCharCode(r,t)}return String.fromCharCode(e)}var c=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(c.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),u=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;var p=/[&<>"]/,h=/[&<>"]/g,f={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function d(e){return f[e]}var m=/[.?*+^$[\]\\(){}|-]/g;n.lib={},n.lib.mdurl=C,n.lib.ucmicro=D,n.assign=function(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach((function(r){if(r){if("object"!=typeof r)throw new TypeError(r+"must be object");Object.keys(r).forEach((function(t){e[t]=r[t]}))}})),e},n.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},n.has=o,n.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(c,"$1")},n.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,n){return t||function(e,t){var n=0;return o(r,t)?r[t]:35===t.charCodeAt(0)&&u.test(t)&&i(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)}))},n.isValidEntityCode=i,n.fromCodePoint=a,n.escapeHtml=function(e){return p.test(e)?e.replace(h,d):e},n.arrayReplaceAt=function(e,r,t){return[].concat(e.slice(0,r),t,e.slice(r+1))},n.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},n.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},n.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},n.isPunctChar=function(e){return t.test(e)},n.escapeRE=function(e){return e.replace(m,"\\$&")},n.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"\u1e7e"==="\u1e9e".toLowerCase()&&(e=e.replace(/\u1e9e/g,"\xdf")),e.toLowerCase().toUpperCase()}})),E=w.unescapeAll,q=w.unescapeAll,S=function(e,r,t){var n,s,o=r,i={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(r)){for(r++;r<t;){if(10===(n=e.charCodeAt(r)))return i;if(60===n)return i;if(62===n)return i.pos=r+1,i.str=E(e.slice(o+1,r)),i.ok=!0,i;92===n&&r+1<t?r+=2:r++}return i}for(s=0;r<t&&32!==(n=e.charCodeAt(r))&&!(n<32||127===n);)if(92===n&&r+1<t){if(32===e.charCodeAt(r+1))break;r+=2}else{if(40===n&&++s>32)return i;if(41===n){if(0===s)break;s--}r++}return o===r||0!==s||(i.str=E(e.slice(o,r)),i.lines=0,i.pos=r,i.ok=!0),i},F=function(e,r,t){var n,s,o=0,i=r,a={ok:!1,pos:0,lines:0,str:""};if(r>=t)return a;if(34!==(s=e.charCodeAt(r))&&39!==s&&40!==s)return a;for(r++,40===s&&(s=41);r<t;){if((n=e.charCodeAt(r))===s)return a.pos=r+1,a.lines=o,a.str=q(e.slice(i+1,r)),a.ok=!0,a;if(40===n&&41===s)return a;10===n?o++:92===n&&r+1<t&&(r++,10===e.charCodeAt(r)&&o++),r++}return a},L={parseLinkLabel:function(e,r,t){var n,s,o,i,a=-1,c=e.posMax,l=e.pos;for(e.pos=r+1,n=1;e.pos<c;){if(93===(o=e.src.charCodeAt(e.pos))&&0===--n){s=!0;break}if(i=e.pos,e.md.inline.skipToken(e),91===o)if(i===e.pos-1)n++;else if(t)return e.pos=l,-1}return s&&(a=e.pos),e.pos=l,a},parseLinkDestination:S,parseLinkTitle:F},z=w.assign,T=w.unescapeAll,I=w.escapeHtml,M={};function R(){this.rules=z({},M)}M.code_inline=function(e,r,t,n,s){var o=e[r];return"<code"+s.renderAttrs(o)+">"+I(e[r].content)+"</code>"},M.code_block=function(e,r,t,n,s){var o=e[r];return"<pre"+s.renderAttrs(o)+"><code>"+I(e[r].content)+"</code></pre>\n"},M.fence=function(e,r,t,n,s){var o,i,a,c,l,u=e[r],p=u.info?T(u.info).trim():"",h="",f="";return p&&(h=(a=p.split(/(\s+)/g))[0],f=a.slice(2).join("")),0===(o=t.highlight&&t.highlight(u.content,h,f)||I(u.content)).indexOf("<pre")?o+"\n":p?(i=u.attrIndex("class"),c=u.attrs?u.attrs.slice():[],i<0?c.push(["class",t.langPrefix+h]):(c[i]=c[i].slice(),c[i][1]+=" "+t.langPrefix+h),l={attrs:c},"<pre><code"+s.renderAttrs(l)+">"+o+"</code></pre>\n"):"<pre><code"+s.renderAttrs(u)+">"+o+"</code></pre>\n"},M.image=function(e,r,t,n,s){var o=e[r];return o.attrs[o.attrIndex("alt")][1]=s.renderInlineAsText(o.children,t,n),s.renderToken(e,r,t)},M.hardbreak=function(e,r,t){return t.xhtmlOut?"<br />\n":"<br>\n"},M.softbreak=function(e,r,t){return t.breaks?t.xhtmlOut?"<br />\n":"<br>\n":"\n"},M.text=function(e,r){return I(e[r].content)},M.html_block=function(e,r){return e[r].content},M.html_inline=function(e,r){return e[r].content},R.prototype.renderAttrs=function(e){var r,t,n;if(!e.attrs)return"";for(n="",r=0,t=e.attrs.length;r<t;r++)n+=" "+I(e.attrs[r][0])+'="'+I(e.attrs[r][1])+'"';return n},R.prototype.renderToken=function(e,r,t){var n,s="",o=!1,i=e[r];return i.hidden?"":(i.block&&-1!==i.nesting&&r&&e[r-1].hidden&&(s+="\n"),s+=(-1===i.nesting?"</":"<")+i.tag,s+=this.renderAttrs(i),0===i.nesting&&t.xhtmlOut&&(s+=" /"),i.block&&(o=!0,1===i.nesting&&r+1<e.length&&("inline"===(n=e[r+1]).type||n.hidden||-1===n.nesting&&n.tag===i.tag)&&(o=!1)),s+=o?">\n":">")},R.prototype.renderInline=function(e,r,t){for(var n,s="",o=this.rules,i=0,a=e.length;i<a;i++)void 0!==o[n=e[i].type]?s+=o[n](e,i,r,t,this):s+=this.renderToken(e,i,r);return s},R.prototype.renderInlineAsText=function(e,r,t){for(var n="",s=0,o=e.length;s<o;s++)"text"===e[s].type?n+=e[s].content:"image"===e[s].type?n+=this.renderInlineAsText(e[s].children,r,t):"softbreak"===e[s].type&&(n+="\n");return n},R.prototype.render=function(e,r,t){var n,s,o,i="",a=this.rules;for(n=0,s=e.length;n<s;n++)"inline"===(o=e[n].type)?i+=this.renderInline(e[n].children,r,t):void 0!==a[o]?i+=a[e[n].type](e,n,r,t,this):i+=this.renderToken(e,n,r,t);return i};var B=R;function N(){this.__rules__=[],this.__cache__=null}N.prototype.__find__=function(e){for(var r=0;r<this.__rules__.length;r++)if(this.__rules__[r].name===e)return r;return-1},N.prototype.__compile__=function(){var e=this,r=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){r.indexOf(e)<0&&r.push(e)}))})),e.__cache__={},r.forEach((function(r){e.__cache__[r]=[],e.__rules__.forEach((function(t){t.enabled&&(r&&t.alt.indexOf(r)<0||e.__cache__[r].push(t.fn))}))}))},N.prototype.at=function(e,r,t){var n=this.__find__(e),s=t||{};if(-1===n)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=r,this.__rules__[n].alt=s.alt||[],this.__cache__=null},N.prototype.before=function(e,r,t,n){var s=this.__find__(e),o=n||{};if(-1===s)throw new Error("Parser rule not found: "+e);this.__rules__.splice(s,0,{name:r,enabled:!0,fn:t,alt:o.alt||[]}),this.__cache__=null},N.prototype.after=function(e,r,t,n){var s=this.__find__(e),o=n||{};if(-1===s)throw new Error("Parser rule not found: "+e);this.__rules__.splice(s+1,0,{name:r,enabled:!0,fn:t,alt:o.alt||[]}),this.__cache__=null},N.prototype.push=function(e,r,t){var n=t||{};this.__rules__.push({name:e,enabled:!0,fn:r,alt:n.alt||[]}),this.__cache__=null},N.prototype.enable=function(e,r){Array.isArray(e)||(e=[e]);var t=[];return e.forEach((function(e){var n=this.__find__(e);if(n<0){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,t.push(e)}),this),this.__cache__=null,t},N.prototype.enableOnly=function(e,r){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,r)},N.prototype.disable=function(e,r){Array.isArray(e)||(e=[e]);var t=[];return e.forEach((function(e){var n=this.__find__(e);if(n<0){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,t.push(e)}),this),this.__cache__=null,t},N.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]};var O=N,P=/\r\n?|\n/g,j=/\0/g,U=w.arrayReplaceAt;function V(e){return/^<\/a\s*>/i.test(e)}var Z=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,$=/\((c|tm|r)\)/i,G=/\((c|tm|r)\)/gi,H={c:"\xa9",r:"\xae",tm:"\u2122"};function J(e,r){return H[r.toLowerCase()]}function W(e){var r,t,n=0;for(r=e.length-1;r>=0;r--)"text"!==(t=e[r]).type||n||(t.content=t.content.replace(G,J)),"link_open"===t.type&&"auto"===t.info&&n--,"link_close"===t.type&&"auto"===t.info&&n++}function Y(e){var r,t,n=0;for(r=e.length-1;r>=0;r--)"text"!==(t=e[r]).type||n||Z.test(t.content)&&(t.content=t.content.replace(/\+-/g,"\xb1").replace(/\.{2,}/g,"\u2026").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1\u2014").replace(/(^|\s)--(?=\s|$)/gm,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1\u2013")),"link_open"===t.type&&"auto"===t.info&&n--,"link_close"===t.type&&"auto"===t.info&&n++}var K=w.isWhiteSpace,Q=w.isPunctChar,X=w.isMdAsciiPunct,ee=/['"]/,re=/['"]/g;function te(e,r,t){return e.slice(0,r)+t+e.slice(r+1)}function ne(e,r){var t,n,s,o,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,C,y;for(v=[],t=0;t<e.length;t++){for(n=e[t],c=e[t].level,k=v.length-1;k>=0&&!(v[k].level<=c);k--);if(v.length=k+1,"text"===n.type){i=0,a=(s=n.content).length;e:for(;i<a&&(re.lastIndex=i,o=re.exec(s));){if(g=_=!0,i=o.index+1,b="'"===o[0],u=32,o.index-1>=0)u=s.charCodeAt(o.index-1);else for(k=t-1;k>=0&&("softbreak"!==e[k].type&&"hardbreak"!==e[k].type);k--)if(e[k].content){u=e[k].content.charCodeAt(e[k].content.length-1);break}if(p=32,i<a)p=s.charCodeAt(i);else for(k=t+1;k<e.length&&("softbreak"!==e[k].type&&"hardbreak"!==e[k].type);k++)if(e[k].content){p=e[k].content.charCodeAt(0);break}if(h=X(u)||Q(String.fromCharCode(u)),f=X(p)||Q(String.fromCharCode(p)),d=K(u),(m=K(p))?g=!1:f&&(d||h||(g=!1)),d?_=!1:h&&(m||f||(_=!1)),34===p&&'"'===o[0]&&u>=48&&u<=57&&(_=g=!1),g&&_&&(g=h,_=f),g||_){if(_)for(k=v.length-1;k>=0&&(l=v[k],!(v[k].level<c));k--)if(l.single===b&&v[k].level===c){l=v[k],b?(C=r.md.options.quotes[2],y=r.md.options.quotes[3]):(C=r.md.options.quotes[0],y=r.md.options.quotes[1]),n.content=te(n.content,o.index,y),e[l.token].content=te(e[l.token].content,l.pos,C),i+=y.length-1,l.token===t&&(i+=C.length-1),a=(s=n.content).length,v.length=k;continue e}g?v.push({token:t,pos:o.index,single:b,level:c}):_&&b&&(n.content=te(n.content,o.index,"\u2019"))}else b&&(n.content=te(n.content,o.index,"\u2019"))}}}}function se(e,r,t){this.type=e,this.tag=r,this.attrs=null,this.map=null,this.nesting=t,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}se.prototype.attrIndex=function(e){var r,t,n;if(!this.attrs)return-1;for(t=0,n=(r=this.attrs).length;t<n;t++)if(r[t][0]===e)return t;return-1},se.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},se.prototype.attrSet=function(e,r){var t=this.attrIndex(e),n=[e,r];t<0?this.attrPush(n):this.attrs[t]=n},se.prototype.attrGet=function(e){var r=this.attrIndex(e),t=null;return r>=0&&(t=this.attrs[r][1]),t},se.prototype.attrJoin=function(e,r){var t=this.attrIndex(e);t<0?this.attrPush([e,r]):this.attrs[t][1]=this.attrs[t][1]+" "+r};var oe=se;function ie(e,r,t){this.src=e,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=r}ie.prototype.Token=oe;var ae=ie,ce=[["normalize",function(e){var r;r=(r=e.src.replace(P,"\n")).replace(j,"\ufffd"),e.src=r}],["block",function(e){var r;e.inlineMode?((r=new e.Token("inline","",0)).content=e.src,r.map=[0,1],r.children=[],e.tokens.push(r)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["inline",function(e){var r,t,n,s=e.tokens;for(t=0,n=s.length;t<n;t++)"inline"===(r=s[t]).type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}],["linkify",function(e){var r,t,n,s,o,i,a,c,l,u,p,h,f,d,m,g,_,k,b=e.tokens;if(e.md.options.linkify)for(t=0,n=b.length;t<n;t++)if("inline"===b[t].type&&e.md.linkify.pretest(b[t].content))for(f=0,r=(s=b[t].children).length-1;r>=0;r--)if("link_close"!==(i=s[r]).type){if("html_inline"===i.type&&(k=i.content,/^<a[>\s]/i.test(k)&&f>0&&f--,V(i.content)&&f++),!(f>0)&&"text"===i.type&&e.md.linkify.test(i.content)){for(l=i.content,_=e.md.linkify.match(l),a=[],h=i.level,p=0,_.length>0&&0===_[0].index&&r>0&&"text_special"===s[r-1].type&&(_=_.slice(1)),c=0;c<_.length;c++)d=_[c].url,m=e.md.normalizeLink(d),e.md.validateLink(m)&&(g=_[c].text,g=_[c].schema?"mailto:"!==_[c].schema||/^mailto:/i.test(g)?e.md.normalizeLinkText(g):e.md.normalizeLinkText("mailto:"+g).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+g).replace(/^http:\/\//,""),(u=_[c].index)>p&&((o=new e.Token("text","",0)).content=l.slice(p,u),o.level=h,a.push(o)),(o=new e.Token("link_open","a",1)).attrs=[["href",m]],o.level=h++,o.markup="linkify",o.info="auto",a.push(o),(o=new e.Token("text","",0)).content=g,o.level=h,a.push(o),(o=new e.Token("link_close","a",-1)).level=--h,o.markup="linkify",o.info="auto",a.push(o),p=_[c].lastIndex);p<l.length&&((o=new e.Token("text","",0)).content=l.slice(p),o.level=h,a.push(o)),b[t].children=s=U(s,r,a)}}else for(r--;s[r].level!==i.level&&"link_open"!==s[r].type;)r--}],["replacements",function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&($.test(e.tokens[r].content)&&W(e.tokens[r].children),Z.test(e.tokens[r].content)&&Y(e.tokens[r].children))}],["smartquotes",function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&ee.test(e.tokens[r].content)&&ne(e.tokens[r].children,e)}],["text_join",function(e){var r,t,n,s,o,i,a=e.tokens;for(r=0,t=a.length;r<t;r++)if("inline"===a[r].type){for(o=(n=a[r].children).length,s=0;s<o;s++)"text_special"===n[s].type&&(n[s].type="text");for(s=i=0;s<o;s++)"text"===n[s].type&&s+1<o&&"text"===n[s+1].type?n[s+1].content=n[s].content+n[s+1].content:(s!==i&&(n[i]=n[s]),i++);s!==i&&(n.length=i)}}]];function le(){this.ruler=new O;for(var e=0;e<ce.length;e++)this.ruler.push(ce[e][0],ce[e][1])}le.prototype.process=function(e){var r,t,n;for(r=0,t=(n=this.ruler.getRules("")).length;r<t;r++)n[r](e)},le.prototype.State=ae;var ue=le,pe=w.isSpace;function he(e,r){var t=e.bMarks[r]+e.tShift[r],n=e.eMarks[r];return e.src.slice(t,n)}function fe(e){var r,t=[],n=0,s=e.length,o=!1,i=0,a="";for(r=e.charCodeAt(n);n<s;)124===r&&(o?(a+=e.substring(i,n-1),i=n):(t.push(a+e.substring(i,n)),a="",i=n+1)),o=92===r,n++,r=e.charCodeAt(n);return t.push(a+e.substring(i)),t}var de=w.isSpace,me=w.isSpace,ge=w.isSpace;function _e(e,r){var t,n,s,o;return n=e.bMarks[r]+e.tShift[r],s=e.eMarks[r],42!==(t=e.src.charCodeAt(n++))&&45!==t&&43!==t||n<s&&(o=e.src.charCodeAt(n),!ge(o))?-1:n}function ke(e,r){var t,n=e.bMarks[r]+e.tShift[r],s=n,o=e.eMarks[r];if(s+1>=o)return-1;if((t=e.src.charCodeAt(s++))<48||t>57)return-1;for(;;){if(s>=o)return-1;if(!((t=e.src.charCodeAt(s++))>=48&&t<=57)){if(41===t||46===t)break;return-1}if(s-n>=10)return-1}return s<o&&(t=e.src.charCodeAt(s),!ge(t))?-1:s}var be=w.normalizeReference,ve=w.isSpace,Ce="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",ye="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ae={HTML_TAG_RE:new RegExp("^(?:"+Ce+"|"+ye+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),HTML_OPEN_CLOSE_TAG_RE:new RegExp("^(?:"+Ce+"|"+ye+")")},xe=Ae.HTML_OPEN_CLOSE_TAG_RE,De=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"].join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(xe.source+"\\s*$"),/^$/,!1]],we=w.isSpace,Ee=w.isSpace;function qe(e,r,t,n){var s,o,i,a,c,l,u,p;for(this.src=e,this.md=r,this.env=t,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",p=!1,i=a=l=u=0,c=(o=this.src).length;a<c;a++){if(s=o.charCodeAt(a),!p){if(Ee(s)){l++,9===s?u+=4-u%4:u++;continue}p=!0}10!==s&&a!==c-1||(10!==s&&a++,this.bMarks.push(i),this.eMarks.push(a),this.tShift.push(l),this.sCount.push(u),this.bsCount.push(0),p=!1,l=0,u=0,i=a+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}qe.prototype.push=function(e,r,t){var n=new oe(e,r,t);return n.block=!0,t<0&&this.level--,n.level=this.level,t>0&&this.level++,this.tokens.push(n),n},qe.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},qe.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;e<r&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},qe.prototype.skipSpaces=function(e){for(var r,t=this.src.length;e<t&&(r=this.src.charCodeAt(e),Ee(r));e++);return e},qe.prototype.skipSpacesBack=function(e,r){if(e<=r)return e;for(;e>r;)if(!Ee(this.src.charCodeAt(--e)))return e+1;return e},qe.prototype.skipChars=function(e,r){for(var t=this.src.length;e<t&&this.src.charCodeAt(e)===r;e++);return e},qe.prototype.skipCharsBack=function(e,r,t){if(e<=t)return e;for(;e>t;)if(r!==this.src.charCodeAt(--e))return e+1;return e},qe.prototype.getLines=function(e,r,t,n){var s,o,i,a,c,l,u,p=e;if(e>=r)return"";for(l=new Array(r-e),s=0;p<r;p++,s++){for(o=0,u=a=this.bMarks[p],c=p+1<r||n?this.eMarks[p]+1:this.eMarks[p];a<c&&o<t;){if(i=this.src.charCodeAt(a),Ee(i))9===i?o+=4-(o+this.bsCount[p])%4:o++;else{if(!(a-u<this.tShift[p]))break;o++}a++}l[s]=o>t?new Array(o-t+1).join(" ")+this.src.slice(a,c):this.src.slice(a,c)}return l.join("")},qe.prototype.Token=oe;var Se=qe,Fe=[["table",function(e,r,t,n){var s,o,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,C;if(r+2>t)return!1;if(l=r+1,e.sCount[l]<e.blkIndent)return!1;if(e.sCount[l]-e.blkIndent>=4)return!1;if((i=e.bMarks[l]+e.tShift[l])>=e.eMarks[l])return!1;if(124!==(v=e.src.charCodeAt(i++))&&45!==v&&58!==v)return!1;if(i>=e.eMarks[l])return!1;if(124!==(C=e.src.charCodeAt(i++))&&45!==C&&58!==C&&!pe(C))return!1;if(45===v&&pe(C))return!1;for(;i<e.eMarks[l];){if(124!==(s=e.src.charCodeAt(i))&&45!==s&&58!==s&&!pe(s))return!1;i++}for(u=(o=he(e,r+1)).split("|"),f=[],a=0;a<u.length;a++){if(!(d=u[a].trim())){if(0===a||a===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(d))return!1;58===d.charCodeAt(d.length-1)?f.push(58===d.charCodeAt(0)?"center":"right"):58===d.charCodeAt(0)?f.push("left"):f.push("")}if(-1===(o=he(e,r).trim()).indexOf("|"))return!1;if(e.sCount[r]-e.blkIndent>=4)return!1;if((u=fe(o)).length&&""===u[0]&&u.shift(),u.length&&""===u[u.length-1]&&u.pop(),0===(p=u.length)||p!==f.length)return!1;if(n)return!0;for(_=e.parentType,e.parentType="table",b=e.md.block.ruler.getRules("blockquote"),(h=e.push("table_open","table",1)).map=m=[r,0],(h=e.push("thead_open","thead",1)).map=[r,r+1],(h=e.push("tr_open","tr",1)).map=[r,r+1],a=0;a<u.length;a++)h=e.push("th_open","th",1),f[a]&&(h.attrs=[["style","text-align:"+f[a]]]),(h=e.push("inline","",0)).content=u[a].trim(),h.children=[],h=e.push("th_close","th",-1);for(h=e.push("tr_close","tr",-1),h=e.push("thead_close","thead",-1),l=r+2;l<t&&!(e.sCount[l]<e.blkIndent);l++){for(k=!1,a=0,c=b.length;a<c;a++)if(b[a](e,l,t,!0)){k=!0;break}if(k)break;if(!(o=he(e,l).trim()))break;if(e.sCount[l]-e.blkIndent>=4)break;for((u=fe(o)).length&&""===u[0]&&u.shift(),u.length&&""===u[u.length-1]&&u.pop(),l===r+2&&((h=e.push("tbody_open","tbody",1)).map=g=[r+2,0]),(h=e.push("tr_open","tr",1)).map=[l,l+1],a=0;a<p;a++)h=e.push("td_open","td",1),f[a]&&(h.attrs=[["style","text-align:"+f[a]]]),(h=e.push("inline","",0)).content=u[a]?u[a].trim():"",h.children=[],h=e.push("td_close","td",-1);h=e.push("tr_close","tr",-1)}return g&&(h=e.push("tbody_close","tbody",-1),g[1]=l),h=e.push("table_close","table",-1),m[1]=l,e.parentType=_,e.line=l,!0},["paragraph","reference"]],["code",function(e,r,t){var n,s,o;if(e.sCount[r]-e.blkIndent<4)return!1;for(s=n=r+1;n<t;)if(e.isEmpty(n))n++;else{if(!(e.sCount[n]-e.blkIndent>=4))break;s=++n}return e.line=s,(o=e.push("code_block","code",0)).content=e.getLines(r,s,4+e.blkIndent,!1)+"\n",o.map=[r,e.line],!0}],["fence",function(e,r,t,n){var s,o,i,a,c,l,u,p=!1,h=e.bMarks[r]+e.tShift[r],f=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4)return!1;if(h+3>f)return!1;if(126!==(s=e.src.charCodeAt(h))&&96!==s)return!1;if(c=h,(o=(h=e.skipChars(h,s))-c)<3)return!1;if(u=e.src.slice(c,h),i=e.src.slice(h,f),96===s&&i.indexOf(String.fromCharCode(s))>=0)return!1;if(n)return!0;for(a=r;!(++a>=t)&&!((h=c=e.bMarks[a]+e.tShift[a])<(f=e.eMarks[a])&&e.sCount[a]<e.blkIndent);)if(e.src.charCodeAt(h)===s&&!(e.sCount[a]-e.blkIndent>=4||(h=e.skipChars(h,s))-c<o||(h=e.skipSpaces(h))<f)){p=!0;break}return o=e.sCount[r],e.line=a+(p?1:0),(l=e.push("fence","code",0)).info=i,l.content=e.getLines(r+1,a,o,!0),l.markup=u,l.map=[r,e.line],!0},["paragraph","reference","blockquote","list"]],["blockquote",function(e,r,t,n){var s,o,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,C,y,A,x=e.lineMax,D=e.bMarks[r]+e.tShift[r],w=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(D++))return!1;if(n)return!0;for(a=h=e.sCount[r]+1,32===e.src.charCodeAt(D)?(D++,a++,h++,s=!1,b=!0):9===e.src.charCodeAt(D)?(b=!0,(e.bsCount[r]+h)%4==3?(D++,a++,h++,s=!1):s=!0):b=!1,f=[e.bMarks[r]],e.bMarks[r]=D;D<w&&(o=e.src.charCodeAt(D),de(o));)9===o?h+=4-(h+e.bsCount[r]+(s?1:0))%4:h++,D++;for(d=[e.bsCount[r]],e.bsCount[r]=e.sCount[r]+1+(b?1:0),l=D>=w,_=[e.sCount[r]],e.sCount[r]=h-a,k=[e.tShift[r]],e.tShift[r]=D-e.bMarks[r],C=e.md.block.ruler.getRules("blockquote"),g=e.parentType,e.parentType="blockquote",p=r+1;p<t&&(A=e.sCount[p]<e.blkIndent,!((D=e.bMarks[p]+e.tShift[p])>=(w=e.eMarks[p])));p++)if(62!==e.src.charCodeAt(D++)||A){if(l)break;for(v=!1,i=0,c=C.length;i<c;i++)if(C[i](e,p,t,!0)){v=!0;break}if(v){e.lineMax=p,0!==e.blkIndent&&(f.push(e.bMarks[p]),d.push(e.bsCount[p]),k.push(e.tShift[p]),_.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}f.push(e.bMarks[p]),d.push(e.bsCount[p]),k.push(e.tShift[p]),_.push(e.sCount[p]),e.sCount[p]=-1}else{for(a=h=e.sCount[p]+1,32===e.src.charCodeAt(D)?(D++,a++,h++,s=!1,b=!0):9===e.src.charCodeAt(D)?(b=!0,(e.bsCount[p]+h)%4==3?(D++,a++,h++,s=!1):s=!0):b=!1,f.push(e.bMarks[p]),e.bMarks[p]=D;D<w&&(o=e.src.charCodeAt(D),de(o));)9===o?h+=4-(h+e.bsCount[p]+(s?1:0))%4:h++,D++;l=D>=w,d.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(b?1:0),_.push(e.sCount[p]),e.sCount[p]=h-a,k.push(e.tShift[p]),e.tShift[p]=D-e.bMarks[p]}for(m=e.blkIndent,e.blkIndent=0,(y=e.push("blockquote_open","blockquote",1)).markup=">",y.map=u=[r,0],e.md.block.tokenize(e,r,p),(y=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=x,e.parentType=g,u[1]=e.line,i=0;i<k.length;i++)e.bMarks[i+r]=f[i],e.tShift[i+r]=k[i],e.sCount[i+r]=_[i],e.bsCount[i+r]=d[i];return e.blkIndent=m,!0},["paragraph","reference","blockquote","list"]],["hr",function(e,r,t,n){var s,o,i,a,c=e.bMarks[r]+e.tShift[r],l=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4)return!1;if(42!==(s=e.src.charCodeAt(c++))&&45!==s&&95!==s)return!1;for(o=1;c<l;){if((i=e.src.charCodeAt(c++))!==s&&!me(i))return!1;i===s&&o++}return!(o<3)&&(n||(e.line=r+1,(a=e.push("hr","hr",0)).map=[r,e.line],a.markup=Array(o+1).join(String.fromCharCode(s))),!0)},["paragraph","reference","blockquote","list"]],["list",function(e,r,t,n){var s,o,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,C,y,A,x,D,w,E,q,S,F,L,z=!1,T=!0;if(e.sCount[r]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[r]-e.listIndent>=4&&e.sCount[r]<e.blkIndent)return!1;if(n&&"paragraph"===e.parentType&&e.sCount[r]>=e.blkIndent&&(z=!0),(w=ke(e,r))>=0){if(u=!0,q=e.bMarks[r]+e.tShift[r],g=Number(e.src.slice(q,w-1)),z&&1!==g)return!1}else{if(!((w=_e(e,r))>=0))return!1;u=!1}if(z&&e.skipSpaces(w)>=e.eMarks[r])return!1;if(m=e.src.charCodeAt(w-1),n)return!0;for(d=e.tokens.length,u?(L=e.push("ordered_list_open","ol",1),1!==g&&(L.attrs=[["start",g]])):L=e.push("bullet_list_open","ul",1),L.map=f=[r,0],L.markup=String.fromCharCode(m),k=r,E=!1,F=e.md.block.ruler.getRules("list"),C=e.parentType,e.parentType="list";k<t;){for(D=w,_=e.eMarks[k],l=b=e.sCount[k]+w-(e.bMarks[r]+e.tShift[r]);D<_;){if(9===(s=e.src.charCodeAt(D)))b+=4-(b+e.bsCount[k])%4;else{if(32!==s)break;b++}D++}if((c=(o=D)>=_?1:b-l)>4&&(c=1),a=l+c,(L=e.push("list_item_open","li",1)).markup=String.fromCharCode(m),L.map=p=[r,0],u&&(L.info=e.src.slice(q,w-1)),x=e.tight,A=e.tShift[r],y=e.sCount[r],v=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=a,e.tight=!0,e.tShift[r]=o-e.bMarks[r],e.sCount[r]=b,o>=_&&e.isEmpty(r+1)?e.line=Math.min(e.line+2,t):e.md.block.tokenize(e,r,t,!0),e.tight&&!E||(T=!1),E=e.line-r>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=v,e.tShift[r]=A,e.sCount[r]=y,e.tight=x,(L=e.push("list_item_close","li",-1)).markup=String.fromCharCode(m),k=r=e.line,p[1]=k,o=e.bMarks[r],k>=t)break;if(e.sCount[k]<e.blkIndent)break;if(e.sCount[r]-e.blkIndent>=4)break;for(S=!1,i=0,h=F.length;i<h;i++)if(F[i](e,k,t,!0)){S=!0;break}if(S)break;if(u){if((w=ke(e,k))<0)break;q=e.bMarks[k]+e.tShift[k]}else if((w=_e(e,k))<0)break;if(m!==e.src.charCodeAt(w-1))break}return(L=u?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(m),f[1]=k,e.line=k,e.parentType=C,T&&function(e,r){var t,n,s=e.level+2;for(t=r+2,n=e.tokens.length-2;t<n;t++)e.tokens[t].level===s&&"paragraph_open"===e.tokens[t].type&&(e.tokens[t+2].hidden=!0,e.tokens[t].hidden=!0,t+=2)}(e,d),!0},["paragraph","reference","blockquote"]],["reference",function(e,r,t,n){var s,o,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v=0,C=e.bMarks[r]+e.tShift[r],y=e.eMarks[r],A=r+1;if(e.sCount[r]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(C))return!1;for(;++C<y;)if(93===e.src.charCodeAt(C)&&92!==e.src.charCodeAt(C-1)){if(C+1===y)return!1;if(58!==e.src.charCodeAt(C+1))return!1;break}for(a=e.lineMax,k=e.md.block.ruler.getRules("reference"),f=e.parentType,e.parentType="reference";A<a&&!e.isEmpty(A);A++)if(!(e.sCount[A]-e.blkIndent>3||e.sCount[A]<0)){for(_=!1,l=0,u=k.length;l<u;l++)if(k[l](e,A,a,!0)){_=!0;break}if(_)break}for(y=(g=e.getLines(r,A,e.blkIndent,!1).trim()).length,C=1;C<y;C++){if(91===(s=g.charCodeAt(C)))return!1;if(93===s){h=C;break}(10===s||92===s&&++C<y&&10===g.charCodeAt(C))&&v++}if(h<0||58!==g.charCodeAt(h+1))return!1;for(C=h+2;C<y;C++)if(10===(s=g.charCodeAt(C)))v++;else if(!ve(s))break;if(!(d=e.md.helpers.parseLinkDestination(g,C,y)).ok)return!1;if(c=e.md.normalizeLink(d.str),!e.md.validateLink(c))return!1;for(o=C=d.pos,i=v+=d.lines,m=C;C<y;C++)if(10===(s=g.charCodeAt(C)))v++;else if(!ve(s))break;for(d=e.md.helpers.parseLinkTitle(g,C,y),C<y&&m!==C&&d.ok?(b=d.str,C=d.pos,v+=d.lines):(b="",C=o,v=i);C<y&&(s=g.charCodeAt(C),ve(s));)C++;if(C<y&&10!==g.charCodeAt(C)&&b)for(b="",C=o,v=i;C<y&&(s=g.charCodeAt(C),ve(s));)C++;return!(C<y&&10!==g.charCodeAt(C))&&(!!(p=be(g.slice(1,h)))&&(n||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[p]&&(e.env.references[p]={title:b,href:c}),e.parentType=f,e.line=r+v+1),!0))}],["html_block",function(e,r,t,n){var s,o,i,a,c=e.bMarks[r]+e.tShift[r],l=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(a=e.src.slice(c,l),s=0;s<De.length&&!De[s][0].test(a);s++);if(s===De.length)return!1;if(n)return De[s][2];if(o=r+1,!De[s][1].test(a))for(;o<t&&!(e.sCount[o]<e.blkIndent);o++)if(c=e.bMarks[o]+e.tShift[o],l=e.eMarks[o],a=e.src.slice(c,l),De[s][1].test(a)){0!==a.length&&o++;break}return e.line=o,(i=e.push("html_block","",0)).map=[r,o],i.content=e.getLines(r,o,e.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",function(e,r,t,n){var s,o,i,a,c=e.bMarks[r]+e.tShift[r],l=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4)return!1;if(35!==(s=e.src.charCodeAt(c))||c>=l)return!1;for(o=1,s=e.src.charCodeAt(++c);35===s&&c<l&&o<=6;)o++,s=e.src.charCodeAt(++c);return!(o>6||c<l&&!we(s))&&(n||(l=e.skipSpacesBack(l,c),(i=e.skipCharsBack(l,35,c))>c&&we(e.src.charCodeAt(i-1))&&(l=i),e.line=r+1,(a=e.push("heading_open","h"+String(o),1)).markup="########".slice(0,o),a.map=[r,e.line],(a=e.push("inline","",0)).content=e.src.slice(c,l).trim(),a.map=[r,e.line],a.children=[],(a=e.push("heading_close","h"+String(o),-1)).markup="########".slice(0,o)),!0)},["paragraph","reference","blockquote"]],["lheading",function(e,r,t){var n,s,o,i,a,c,l,u,p,h,f=r+1,d=e.md.block.ruler.getRules("paragraph");if(e.sCount[r]-e.blkIndent>=4)return!1;for(h=e.parentType,e.parentType="paragraph";f<t&&!e.isEmpty(f);f++)if(!(e.sCount[f]-e.blkIndent>3)){if(e.sCount[f]>=e.blkIndent&&(c=e.bMarks[f]+e.tShift[f])<(l=e.eMarks[f])&&(45===(p=e.src.charCodeAt(c))||61===p)&&(c=e.skipChars(c,p),(c=e.skipSpaces(c))>=l)){u=61===p?1:2;break}if(!(e.sCount[f]<0)){for(s=!1,o=0,i=d.length;o<i;o++)if(d[o](e,f,t,!0)){s=!0;break}if(s)break}}return!!u&&(n=e.getLines(r,f,e.blkIndent,!1).trim(),e.line=f+1,(a=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(p),a.map=[r,e.line],(a=e.push("inline","",0)).content=n,a.map=[r,e.line-1],a.children=[],(a=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(p),e.parentType=h,!0)}],["paragraph",function(e,r){var t,n,s,o,i,a,c=r+1,l=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(a=e.parentType,e.parentType="paragraph";c<u&&!e.isEmpty(c);c++)if(!(e.sCount[c]-e.blkIndent>3||e.sCount[c]<0)){for(n=!1,s=0,o=l.length;s<o;s++)if(l[s](e,c,u,!0)){n=!0;break}if(n)break}return t=e.getLines(r,c,e.blkIndent,!1).trim(),e.line=c,(i=e.push("paragraph_open","p",1)).map=[r,e.line],(i=e.push("inline","",0)).content=t,i.map=[r,e.line],i.children=[],i=e.push("paragraph_close","p",-1),e.parentType=a,!0}]];function Le(){this.ruler=new O;for(var e=0;e<Fe.length;e++)this.ruler.push(Fe[e][0],Fe[e][1],{alt:(Fe[e][2]||[]).slice()})}Le.prototype.tokenize=function(e,r,t){for(var n,s=this.ruler.getRules(""),o=s.length,i=r,a=!1,c=e.md.options.maxNesting;i<t&&(e.line=i=e.skipEmptyLines(i),!(i>=t))&&!(e.sCount[i]<e.blkIndent);){if(e.level>=c){e.line=t;break}for(n=0;n<o&&!s[n](e,i,t,!1);n++);e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),(i=e.line)<t&&e.isEmpty(i)&&(a=!0,i++,e.line=i)}},Le.prototype.parse=function(e,r,t,n){var s;e&&(s=new this.State(e,r,t,n),this.tokenize(s,s.line,s.lineMax))},Le.prototype.State=Se;var ze=Le;function Te(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}for(var Ie=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,Me=w.isSpace,Re=w.isSpace,Be=[],Ne=0;Ne<256;Ne++)Be.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){Be[e.charCodeAt(0)]=1}));function Oe(e,r){var t,n,s,o,i,a=[],c=r.length;for(t=0;t<c;t++)126===(s=r[t]).marker&&-1!==s.end&&(o=r[s.end],(i=e.tokens[s.token]).type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",(i=e.tokens[o.token]).type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&a.push(o.token-1));for(;a.length;){for(n=(t=a.pop())+1;n<e.tokens.length&&"s_close"===e.tokens[n].type;)n++;t!==--n&&(i=e.tokens[n],e.tokens[n]=e.tokens[t],e.tokens[t]=i)}}var Pe={tokenize:function(e,r){var t,n,s,o,i=e.pos,a=e.src.charCodeAt(i);if(r)return!1;if(126!==a)return!1;if(s=(n=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(a),s<2)return!1;for(s%2&&(e.push("text","",0).content=o,s--),t=0;t<s;t+=2)e.push("text","",0).content=o+o,e.delimiters.push({marker:a,length:0,token:e.tokens.length-1,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0},postProcess:function(e){var r,t=e.tokens_meta,n=e.tokens_meta.length;for(Oe(e,e.delimiters),r=0;r<n;r++)t[r]&&t[r].delimiters&&Oe(e,t[r].delimiters)}};function je(e,r){var t,n,s,o,i,a;for(t=r.length-1;t>=0;t--)95!==(n=r[t]).marker&&42!==n.marker||-1!==n.end&&(s=r[n.end],a=t>0&&r[t-1].end===n.end+1&&r[t-1].marker===n.marker&&r[t-1].token===n.token-1&&r[n.end+1].token===s.token+1,i=String.fromCharCode(n.marker),(o=e.tokens[n.token]).type=a?"strong_open":"em_open",o.tag=a?"strong":"em",o.nesting=1,o.markup=a?i+i:i,o.content="",(o=e.tokens[s.token]).type=a?"strong_close":"em_close",o.tag=a?"strong":"em",o.nesting=-1,o.markup=a?i+i:i,o.content="",a&&(e.tokens[r[t-1].token].content="",e.tokens[r[n.end+1].token].content="",t--))}var Ue={tokenize:function(e,r){var t,n,s=e.pos,o=e.src.charCodeAt(s);if(r)return!1;if(95!==o&&42!==o)return!1;for(n=e.scanDelims(e.pos,42===o),t=0;t<n.length;t++)e.push("text","",0).content=String.fromCharCode(o),e.delimiters.push({marker:o,length:n.length,token:e.tokens.length-1,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0},postProcess:function(e){var r,t=e.tokens_meta,n=e.tokens_meta.length;for(je(e,e.delimiters),r=0;r<n;r++)t[r]&&t[r].delimiters&&je(e,t[r].delimiters)}},Ve=w.normalizeReference,Ze=w.isSpace,$e=w.normalizeReference,Ge=w.isSpace,He=/^([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])?)*)$/,Je=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,We=Ae.HTML_TAG_RE;var Ye=w.has,Ke=w.isValidEntityCode,Qe=w.fromCodePoint,Xe=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,er=/^&([a-z][a-z0-9]{1,31});/i;function rr(e,r){var t,n,s,o,i,a,c,l,u={},p=r.length;if(p){var h=0,f=-2,d=[];for(t=0;t<p;t++)if(s=r[t],d.push(0),r[h].marker===s.marker&&f===s.token-1||(h=t),f=s.token,s.length=s.length||0,s.close){for(u.hasOwnProperty(s.marker)||(u[s.marker]=[-1,-1,-1,-1,-1,-1]),i=u[s.marker][(s.open?3:0)+s.length%3],a=n=h-d[h]-1;n>i;n-=d[n]+1)if((o=r[n]).marker===s.marker&&o.open&&o.end<0&&(c=!1,(o.close||s.open)&&(o.length+s.length)%3==0&&(o.length%3==0&&s.length%3==0||(c=!0)),!c)){l=n>0&&!r[n-1].open?d[n-1]+1:0,d[t]=t-n+l,d[n]=l,s.open=!1,o.end=t,o.close=!1,a=-1,f=-2;break}-1!==a&&(u[s.marker][(s.open?3:0)+(s.length||0)%3]=a)}}}var tr=w.isWhiteSpace,nr=w.isPunctChar,sr=w.isMdAsciiPunct;function or(e,r,t,n){this.src=e,this.env=t,this.md=r,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}or.prototype.pushPending=function(){var e=new oe("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},or.prototype.push=function(e,r,t){this.pending&&this.pushPending();var n=new oe(e,r,t),s=null;return t<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,t>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(s),n},or.prototype.scanDelims=function(e,r){var t,n,s,o,i,a,c,l,u,p=e,h=!0,f=!0,d=this.posMax,m=this.src.charCodeAt(e);for(t=e>0?this.src.charCodeAt(e-1):32;p<d&&this.src.charCodeAt(p)===m;)p++;return s=p-e,n=p<d?this.src.charCodeAt(p):32,c=sr(t)||nr(String.fromCharCode(t)),u=sr(n)||nr(String.fromCharCode(n)),a=tr(t),(l=tr(n))?h=!1:u&&(a||c||(h=!1)),a?f=!1:c&&(l||u||(f=!1)),r?(o=h,i=f):(o=h&&(!f||c),i=f&&(!h||u)),{can_open:o,can_close:i,length:s}},or.prototype.Token=oe;var ir=or,ar=[["text",function(e,r){for(var t=e.pos;t<e.posMax&&!Te(e.src.charCodeAt(t));)t++;return t!==e.pos&&(r||(e.pending+=e.src.slice(e.pos,t)),e.pos=t,!0)}],["linkify",function(e,r){var t,n,s,o,i,a,c;return!!e.md.options.linkify&&(!(e.linkLevel>0)&&(!((t=e.pos)+3>e.posMax)&&(58===e.src.charCodeAt(t)&&(47===e.src.charCodeAt(t+1)&&(47===e.src.charCodeAt(t+2)&&(!!(n=e.pending.match(Ie))&&(s=n[1],!!(o=e.md.linkify.matchAtStart(e.src.slice(t-s.length)))&&(i=(i=o.url).replace(/\*+$/,""),a=e.md.normalizeLink(i),!!e.md.validateLink(a)&&(r||(e.pending=e.pending.slice(0,-s.length),(c=e.push("link_open","a",1)).attrs=[["href",a]],c.markup="linkify",c.info="auto",(c=e.push("text","",0)).content=e.md.normalizeLinkText(i),(c=e.push("link_close","a",-1)).markup="linkify",c.info="auto"),e.pos+=i.length-s.length,!0)))))))))}],["newline",function(e,r){var t,n,s,o=e.pos;if(10!==e.src.charCodeAt(o))return!1;if(t=e.pending.length-1,n=e.posMax,!r)if(t>=0&&32===e.pending.charCodeAt(t))if(t>=1&&32===e.pending.charCodeAt(t-1)){for(s=t-1;s>=1&&32===e.pending.charCodeAt(s-1);)s--;e.pending=e.pending.slice(0,s),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(o++;o<n&&Me(e.src.charCodeAt(o));)o++;return e.pos=o,!0}],["escape",function(e,r){var t,n,s,o,i,a=e.pos,c=e.posMax;if(92!==e.src.charCodeAt(a))return!1;if(++a>=c)return!1;if(10===(t=e.src.charCodeAt(a))){for(r||e.push("hardbreak","br",0),a++;a<c&&(t=e.src.charCodeAt(a),Re(t));)a++;return e.pos=a,!0}return o=e.src[a],t>=55296&&t<=56319&&a+1<c&&(n=e.src.charCodeAt(a+1))>=56320&&n<=57343&&(o+=e.src[a+1],a++),s="\\"+o,r||(i=e.push("text_special","",0),t<256&&0!==Be[t]?i.content=o:i.content=s,i.markup=s,i.info="escape"),e.pos=a+1,!0}],["backticks",function(e,r){var t,n,s,o,i,a,c,l,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(t=u,u++,n=e.posMax;u<n&&96===e.src.charCodeAt(u);)u++;if(c=(s=e.src.slice(t,u)).length,e.backticksScanned&&(e.backticks[c]||0)<=t)return r||(e.pending+=s),e.pos+=c,!0;for(i=a=u;-1!==(i=e.src.indexOf("`",a));){for(a=i+1;a<n&&96===e.src.charCodeAt(a);)a++;if((l=a-i)===c)return r||((o=e.push("code_inline","code",0)).markup=s,o.content=e.src.slice(u,i).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=a,!0;e.backticks[l]=i}return e.backticksScanned=!0,r||(e.pending+=s),e.pos+=c,!0}],["strikethrough",Pe.tokenize],["emphasis",Ue.tokenize],["link",function(e,r){var t,n,s,o,i,a,c,l,u="",p="",h=e.pos,f=e.posMax,d=e.pos,m=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(i=e.pos+1,(o=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((a=o+1)<f&&40===e.src.charCodeAt(a)){for(m=!1,a++;a<f&&(n=e.src.charCodeAt(a),Ze(n)||10===n);a++);if(a>=f)return!1;if(d=a,(c=e.md.helpers.parseLinkDestination(e.src,a,e.posMax)).ok){for(u=e.md.normalizeLink(c.str),e.md.validateLink(u)?a=c.pos:u="",d=a;a<f&&(n=e.src.charCodeAt(a),Ze(n)||10===n);a++);if(c=e.md.helpers.parseLinkTitle(e.src,a,e.posMax),a<f&&d!==a&&c.ok)for(p=c.str,a=c.pos;a<f&&(n=e.src.charCodeAt(a),Ze(n)||10===n);a++);}(a>=f||41!==e.src.charCodeAt(a))&&(m=!0),a++}if(m){if(void 0===e.env.references)return!1;if(a<f&&91===e.src.charCodeAt(a)?(d=a+1,(a=e.md.helpers.parseLinkLabel(e,a))>=0?s=e.src.slice(d,a++):a=o+1):a=o+1,s||(s=e.src.slice(i,o)),!(l=e.env.references[Ve(s)]))return e.pos=h,!1;u=l.href,p=l.title}return r||(e.pos=i,e.posMax=o,e.push("link_open","a",1).attrs=t=[["href",u]],p&&t.push(["title",p]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)),e.pos=a,e.posMax=f,!0}],["image",function(e,r){var t,n,s,o,i,a,c,l,u,p,h,f,d,m="",g=e.pos,_=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(a=e.pos+2,(i=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((c=i+1)<_&&40===e.src.charCodeAt(c)){for(c++;c<_&&(n=e.src.charCodeAt(c),Ge(n)||10===n);c++);if(c>=_)return!1;for(d=c,(u=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok&&(m=e.md.normalizeLink(u.str),e.md.validateLink(m)?c=u.pos:m=""),d=c;c<_&&(n=e.src.charCodeAt(c),Ge(n)||10===n);c++);if(u=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<_&&d!==c&&u.ok)for(p=u.str,c=u.pos;c<_&&(n=e.src.charCodeAt(c),Ge(n)||10===n);c++);else p="";if(c>=_||41!==e.src.charCodeAt(c))return e.pos=g,!1;c++}else{if(void 0===e.env.references)return!1;if(c<_&&91===e.src.charCodeAt(c)?(d=c+1,(c=e.md.helpers.parseLinkLabel(e,c))>=0?o=e.src.slice(d,c++):c=i+1):c=i+1,o||(o=e.src.slice(a,i)),!(l=e.env.references[$e(o)]))return e.pos=g,!1;m=l.href,p=l.title}return r||(s=e.src.slice(a,i),e.md.inline.parse(s,e.md,e.env,f=[]),(h=e.push("image","img",0)).attrs=t=[["src",m],["alt",""]],h.children=f,h.content=s,p&&t.push(["title",p])),e.pos=c,e.posMax=_,!0}],["autolink",function(e,r){var t,n,s,o,i,a,c=e.pos;if(60!==e.src.charCodeAt(c))return!1;for(i=e.pos,a=e.posMax;;){if(++c>=a)return!1;if(60===(o=e.src.charCodeAt(c)))return!1;if(62===o)break}return t=e.src.slice(i+1,c),Je.test(t)?(n=e.md.normalizeLink(t),!!e.md.validateLink(n)&&(r||((s=e.push("link_open","a",1)).attrs=[["href",n]],s.markup="autolink",s.info="auto",(s=e.push("text","",0)).content=e.md.normalizeLinkText(t),(s=e.push("link_close","a",-1)).markup="autolink",s.info="auto"),e.pos+=t.length+2,!0)):!!He.test(t)&&(n=e.md.normalizeLink("mailto:"+t),!!e.md.validateLink(n)&&(r||((s=e.push("link_open","a",1)).attrs=[["href",n]],s.markup="autolink",s.info="auto",(s=e.push("text","",0)).content=e.md.normalizeLinkText(t),(s=e.push("link_close","a",-1)).markup="autolink",s.info="auto"),e.pos+=t.length+2,!0))}],["html_inline",function(e,r){var t,n,s,o,i,a=e.pos;return!!e.md.options.html&&(s=e.posMax,!(60!==e.src.charCodeAt(a)||a+2>=s)&&(!(33!==(t=e.src.charCodeAt(a+1))&&63!==t&&47!==t&&!function(e){var r=32|e;return r>=97&&r<=122}(t))&&(!!(n=e.src.slice(a).match(We))&&(r||((o=e.push("html_inline","",0)).content=e.src.slice(a,a+n[0].length),i=o.content,/^<a[>\s]/i.test(i)&&e.linkLevel++,function(e){return/^<\/a\s*>/i.test(e)}(o.content)&&e.linkLevel--),e.pos+=n[0].length,!0))))}],["entity",function(e,t){var n,s,o,i=e.pos,a=e.posMax;if(38!==e.src.charCodeAt(i))return!1;if(i+1>=a)return!1;if(35===e.src.charCodeAt(i+1)){if(s=e.src.slice(i).match(Xe))return t||(n="x"===s[1][0].toLowerCase()?parseInt(s[1].slice(1),16):parseInt(s[1],10),(o=e.push("text_special","",0)).content=Ke(n)?Qe(n):Qe(65533),o.markup=s[0],o.info="entity"),e.pos+=s[0].length,!0}else if((s=e.src.slice(i).match(er))&&Ye(r,s[1]))return t||((o=e.push("text_special","",0)).content=r[s[1]],o.markup=s[0],o.info="entity"),e.pos+=s[0].length,!0;return!1}]],cr=[["balance_pairs",function(e){var r,t=e.tokens_meta,n=e.tokens_meta.length;for(rr(0,e.delimiters),r=0;r<n;r++)t[r]&&t[r].delimiters&&rr(0,t[r].delimiters)}],["strikethrough",Pe.postProcess],["emphasis",Ue.postProcess],["fragments_join",function(e){var r,t,n=0,s=e.tokens,o=e.tokens.length;for(r=t=0;r<o;r++)s[r].nesting<0&&n--,s[r].level=n,s[r].nesting>0&&n++,"text"===s[r].type&&r+1<o&&"text"===s[r+1].type?s[r+1].content=s[r].content+s[r+1].content:(r!==t&&(s[t]=s[r]),t++);r!==t&&(s.length=t)}]];function lr(){var e;for(this.ruler=new O,e=0;e<ar.length;e++)this.ruler.push(ar[e][0],ar[e][1]);for(this.ruler2=new O,e=0;e<cr.length;e++)this.ruler2.push(cr[e][0],cr[e][1])}lr.prototype.skipToken=function(e){var r,t,n=e.pos,s=this.ruler.getRules(""),o=s.length,i=e.md.options.maxNesting,a=e.cache;if(void 0===a[n]){if(e.level<i)for(t=0;t<o&&(e.level++,r=s[t](e,!0),e.level--,!r);t++);else e.pos=e.posMax;r||e.pos++,a[n]=e.pos}else e.pos=a[n]},lr.prototype.tokenize=function(e){for(var r,t,n=this.ruler.getRules(""),s=n.length,o=e.posMax,i=e.md.options.maxNesting;e.pos<o;){if(e.level<i)for(t=0;t<s&&!(r=n[t](e,!1));t++);if(r){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},lr.prototype.parse=function(e,r,t,n){var s,o,i,a=new this.State(e,r,t,n);for(this.tokenize(a),i=(o=this.ruler2.getRules("")).length,s=0;s<i;s++)o[s](a)},lr.prototype.State=ir;var ur=lr;function pr(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach((function(r){r&&Object.keys(r).forEach((function(t){e[t]=r[t]}))})),e}function hr(e){return Object.prototype.toString.call(e)}function fr(e){return"[object Function]"===hr(e)}function dr(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var mr={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var gr={"http:":{validate:function(e,r,t){var n=e.slice(r);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,r,t){var n=e.slice(r);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(n)?r>=3&&":"===e[r-3]||r>=3&&"/"===e[r-3]?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(e,r,t){var n=e.slice(r);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},_r="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function kr(e){var r=e.re=function(e){var r={};return e=e||{},r.src_Any=y.source,r.src_Cc=A.source,r.src_Z=x.source,r.src_P=t.source,r.src_ZPCc=[r.src_Z,r.src_P,r.src_Cc].join("|"),r.src_ZCc=[r.src_Z,r.src_Cc].join("|"),r.src_pseudo_letter="(?:(?![><\uff5c]|"+r.src_ZPCc+")"+r.src_Any+")",r.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",r.src_auth="(?:(?:(?!"+r.src_ZCc+"|[@/\\[\\]()]).)+@)?",r.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",r.src_host_terminator="(?=$|[><\uff5c]|"+r.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+r.src_ZPCc+"))",r.src_path="(?:[/?#](?:(?!"+r.src_ZCc+"|[><\uff5c]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+r.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+r.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+r.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+r.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+r.src_ZCc+"|[']).)+\\'|\\'(?="+r.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+r.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+r.src_ZCc+"|$)|;(?!"+r.src_ZCc+"|$)|\\!+(?!"+r.src_ZCc+"|[!]|$)|\\?(?!"+r.src_ZCc+"|[?]|$))+|\\/)?",r.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',r.src_xn="xn--[a-z0-9\\-]{1,59}",r.src_domain_root="(?:"+r.src_xn+"|"+r.src_pseudo_letter+"{1,63})",r.src_domain="(?:"+r.src_xn+"|(?:"+r.src_pseudo_letter+")|(?:"+r.src_pseudo_letter+"(?:-|"+r.src_pseudo_letter+"){0,61}"+r.src_pseudo_letter+"))",r.src_host="(?:(?:(?:(?:"+r.src_domain+")\\.)*"+r.src_domain+"))",r.tpl_host_fuzzy="(?:"+r.src_ip4+"|(?:(?:(?:"+r.src_domain+")\\.)+(?:%TLDS%)))",r.tpl_host_no_ip_fuzzy="(?:(?:(?:"+r.src_domain+")\\.)+(?:%TLDS%))",r.src_host_strict=r.src_host+r.src_host_terminator,r.tpl_host_fuzzy_strict=r.tpl_host_fuzzy+r.src_host_terminator,r.src_host_port_strict=r.src_host+r.src_port+r.src_host_terminator,r.tpl_host_port_fuzzy_strict=r.tpl_host_fuzzy+r.src_port+r.src_host_terminator,r.tpl_host_port_no_ip_fuzzy_strict=r.tpl_host_no_ip_fuzzy+r.src_port+r.src_host_terminator,r.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+r.src_ZPCc+"|>|$))",r.tpl_email_fuzzy='(^|[><\uff5c]|"|\\(|'+r.src_ZCc+")("+r.src_email_name+"@"+r.tpl_host_fuzzy_strict+")",r.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|"+r.src_ZPCc+"))((?![$+<=>^`|\uff5c])"+r.tpl_host_port_fuzzy_strict+r.src_path+")",r.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|"+r.src_ZPCc+"))((?![$+<=>^`|\uff5c])"+r.tpl_host_port_no_ip_fuzzy_strict+r.src_path+")",r}(e.__opts__),n=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",r.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),n.push(r.src_xn),r.src_tlds=n.join("|"),r.email_fuzzy=RegExp(s(r.tpl_email_fuzzy),"i"),r.link_fuzzy=RegExp(s(r.tpl_link_fuzzy),"i"),r.link_no_ip_fuzzy=RegExp(s(r.tpl_link_no_ip_fuzzy),"i"),r.host_fuzzy_test=RegExp(s(r.tpl_host_fuzzy_test),"i");var o=[];function i(e,r){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+r)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(r){var t=e.__schemas__[r];if(null!==t){var n={validate:null,link:null};if(e.__compiled__[r]=n,"[object Object]"===hr(t))return!function(e){return"[object RegExp]"===hr(e)}(t.validate)?fr(t.validate)?n.validate=t.validate:i(r,t):n.validate=function(e){return function(r,t){var n=r.slice(t);return e.test(n)?n.match(e)[0].length:0}}(t.validate),void(fr(t.normalize)?n.normalize=t.normalize:t.normalize?i(r,t):n.normalize=function(e,r){r.normalize(e)});!function(e){return"[object String]"===hr(e)}(t)?i(r,t):o.push(r)}})),o.forEach((function(r){e.__compiled__[e.__schemas__[r]]&&(e.__compiled__[r].validate=e.__compiled__[e.__schemas__[r]].validate,e.__compiled__[r].normalize=e.__compiled__[e.__schemas__[r]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,r){r.normalize(e)}};var a=Object.keys(e.__compiled__).filter((function(r){return r.length>0&&e.__compiled__[r]})).map(dr).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><\uff5c]|"+r.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><\uff5c]|"+r.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function br(e,r){var t=e.__index__,n=e.__last_index__,s=e.__text_cache__.slice(t,n);this.schema=e.__schema__.toLowerCase(),this.index=t+r,this.lastIndex=n+r,this.raw=s,this.text=s,this.url=s}function vr(e,r){var t=new br(e,r);return e.__compiled__[t.schema].normalize(t,e),t}function Cr(e,r){if(!(this instanceof Cr))return new Cr(e,r);var t;r||(t=e,Object.keys(t||{}).reduce((function(e,r){return e||mr.hasOwnProperty(r)}),!1)&&(r=e,e={})),this.__opts__=pr({},mr,r),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=pr({},gr,e),this.__compiled__={},this.__tlds__=_r,this.__tlds_replaced__=!1,this.re={},kr(this)}Cr.prototype.add=function(e,r){return this.__schemas__[e]=r,kr(this),this},Cr.prototype.set=function(e){return this.__opts__=pr(this.__opts__,e),this},Cr.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var r,t,n,s,o,i,a,c;if(this.re.schema_test.test(e))for((a=this.re.schema_search).lastIndex=0;null!==(r=a.exec(e));)if(s=this.testSchemaAt(e,r[2],a.lastIndex)){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+s;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||c<this.__index__)&&null!==(t=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=t.index+t[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=t.index+t[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(n=e.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,i=n.index+n[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i)),this.__index__>=0},Cr.prototype.pretest=function(e){return this.re.pretest.test(e)},Cr.prototype.testSchemaAt=function(e,r,t){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,t,this):0},Cr.prototype.match=function(e){var r=0,t=[];this.__index__>=0&&this.__text_cache__===e&&(t.push(vr(this,r)),r=this.__last_index__);for(var n=r?e.slice(r):e;this.test(n);)t.push(vr(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return t.length?t:null},Cr.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;var r=this.re.schema_at_start.exec(e);if(!r)return null;var t=this.testSchemaAt(e,r[2],r[0].length);return t?(this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+t,vr(this,0)):null},Cr.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,r,t){return e!==t[r-1]})).reverse(),kr(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,kr(this),this)},Cr.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},Cr.prototype.onCompile=function(){};var yr=Cr,Ar=2147483647,xr=36,Dr=/^xn--/,wr=/[^\x20-\x7E]/,Er=/[\x2E\u3002\uFF0E\uFF61]/g,qr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Sr=Math.floor,Fr=String.fromCharCode;
/*! https://mths.be/punycode v1.4.1 by @mathias */function Lr(e){throw new RangeError(qr[e])}function zr(e,r){for(var t=e.length,n=[];t--;)n[t]=r(e[t]);return n}function Tr(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+zr((e=e.replace(Er,".")).split("."),r).join(".")}function Ir(e){for(var r,t,n=[],s=0,o=e.length;s<o;)(r=e.charCodeAt(s++))>=55296&&r<=56319&&s<o?56320==(64512&(t=e.charCodeAt(s++)))?n.push(((1023&r)<<10)+(1023&t)+65536):(n.push(r),s--):n.push(r);return n}function Mr(e){return zr(e,(function(e){var r="";return e>65535&&(r+=Fr((e-=65536)>>>10&1023|55296),e=56320|1023&e),r+=Fr(e)})).join("")}function Rr(e,r){return e+22+75*(e<26)-((0!=r)<<5)}function Br(e,r,t){var n=0;for(e=t?Sr(e/700):e>>1,e+=Sr(e/r);e>455;n+=xr)e=Sr(e/35);return Sr(n+36*e/(e+38))}function Nr(e){var r,t,n,s,o,i,a,c,l,u,p,h=[],f=e.length,d=0,m=128,g=72;for((t=e.lastIndexOf("-"))<0&&(t=0),n=0;n<t;++n)e.charCodeAt(n)>=128&&Lr("not-basic"),h.push(e.charCodeAt(n));for(s=t>0?t+1:0;s<f;){for(o=d,i=1,a=xr;s>=f&&Lr("invalid-input"),((c=(p=e.charCodeAt(s++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:xr)>=xr||c>Sr((Ar-d)/i))&&Lr("overflow"),d+=c*i,!(c<(l=a<=g?1:a>=g+26?26:a-g));a+=xr)i>Sr(Ar/(u=xr-l))&&Lr("overflow"),i*=u;g=Br(d-o,r=h.length+1,0==o),Sr(d/r)>Ar-m&&Lr("overflow"),m+=Sr(d/r),d%=r,h.splice(d++,0,m)}return Mr(h)}function Or(e){var r,t,n,s,o,i,a,c,l,u,p,h,f,d,m,g=[];for(h=(e=Ir(e)).length,r=128,t=0,o=72,i=0;i<h;++i)(p=e[i])<128&&g.push(Fr(p));for(n=s=g.length,s&&g.push("-");n<h;){for(a=Ar,i=0;i<h;++i)(p=e[i])>=r&&p<a&&(a=p);for(a-r>Sr((Ar-t)/(f=n+1))&&Lr("overflow"),t+=(a-r)*f,r=a,i=0;i<h;++i)if((p=e[i])<r&&++t>Ar&&Lr("overflow"),p==r){for(c=t,l=xr;!(c<(u=l<=o?1:l>=o+26?26:l-o));l+=xr)m=c-u,d=xr-u,g.push(Fr(Rr(u+m%d,0))),c=Sr(m/d);g.push(Fr(Rr(c,0))),o=Br(t,f,n==s),t=0,++n}++t,++r}return g.join("")}function Pr(e){return Tr(e,(function(e){return Dr.test(e)?Nr(e.slice(4).toLowerCase()):e}))}function jr(e){return Tr(e,(function(e){return wr.test(e)?"xn--"+Or(e):e}))}var Ur="1.4.1",Vr={decode:Ir,encode:Mr},Zr={version:Ur,ucs2:Vr,toASCII:jr,toUnicode:Pr,encode:Or,decode:Nr},$r=e(Object.freeze({__proto__:null,decode:Nr,encode:Or,toUnicode:Pr,toASCII:jr,version:Ur,ucs2:Vr,default:Zr})),Gr={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Hr=/^(vbscript|javascript|file|data):/,Jr=/^data:image\/(gif|png|jpeg|webp);/;function Wr(e){var r=e.trim().toLowerCase();return!Hr.test(r)||!!Jr.test(r)}var Yr=["http:","https:","mailto:"];function Kr(e){var r=C.parse(e,!0);if(r.hostname&&(!r.protocol||Yr.indexOf(r.protocol)>=0))try{r.hostname=$r.toASCII(r.hostname)}catch(e){}return C.encode(C.format(r))}function Qr(e){var r=C.parse(e,!0);if(r.hostname&&(!r.protocol||Yr.indexOf(r.protocol)>=0))try{r.hostname=$r.toUnicode(r.hostname)}catch(e){}return C.decode(C.format(r),C.decode.defaultChars+"%")}function Xr(e,r){if(!(this instanceof Xr))return new Xr(e,r);r||w.isString(e)||(r=e||{},e="default"),this.inline=new ur,this.block=new ze,this.core=new ue,this.renderer=new B,this.linkify=new yr,this.validateLink=Wr,this.normalizeLink=Kr,this.normalizeLinkText=Qr,this.utils=w,this.helpers=w.assign({},L),this.options={},this.configure(e),r&&this.set(r)}return Xr.prototype.set=function(e){return w.assign(this.options,e),this},Xr.prototype.configure=function(e){var r,t=this;if(w.isString(e)&&!(e=Gr[r=e]))throw new Error('Wrong `markdown-it` preset "'+r+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach((function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)})),this},Xr.prototype.enable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(r){t=t.concat(this[r].ruler.enable(e,!0))}),this),t=t.concat(this.inline.ruler2.enable(e,!0));var n=e.filter((function(e){return t.indexOf(e)<0}));if(n.length&&!r)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},Xr.prototype.disable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(r){t=t.concat(this[r].ruler.disable(e,!0))}),this),t=t.concat(this.inline.ruler2.disable(e,!0));var n=e.filter((function(e){return t.indexOf(e)<0}));if(n.length&&!r)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},Xr.prototype.use=function(e){var r=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,r),this},Xr.prototype.parse=function(e,r){if("string"!=typeof e)throw new Error("Input data should be a String");var t=new this.core.State(e,this,r);return this.core.process(t),t.tokens},Xr.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)},Xr.prototype.parseInline=function(e,r){var t=new this.core.State(e,this,r);return t.inlineMode=!0,this.core.process(t),t.tokens},Xr.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)},Xr}));
mermaid.min.js
wget 'https://sme10.lists2.roe3.org/kodbox/static/app/vender/markdown/mermaid.min.js'
View Content
// https://www.jsdelivr.com/package/npm/mermaid?tab=files&path=dist   
// ver 11.10.1 转es5  https://babeljs.io/repl
"use strict";function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==typeof i?i:i+"";}function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}var __esbuild_esm_mermaid_nm;(__esbuild_esm_mermaid_nm||(__esbuild_esm_mermaid_nm={})).mermaid=(_t12=>{var Jxe=Object.create;var Sy=Object.defineProperty;var ebe=Object.getOwnPropertyDescriptor;var tbe=Object.getOwnPropertyNames;var rbe=Object.getPrototypeOf,nbe=Object.prototype.hasOwnProperty;var o=(t,e)=>Sy(t,"name",{value:e,configurable:!0});var N=(t,e)=>()=>(t&&(e=t(t=0)),e);var Ii=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),hr=(t,e)=>{for(var r in e)Sy(t,r,{get:e[r],enumerable:!0});},z4=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of tbe(e))!nbe.call(t,i)&&i!==r&&Sy(t,i,{get:()=>e[i],enumerable:!(n=ebe(e,i))||n.enumerable});return t;},Sr=(t,e,r)=>(z4(t,e,"default"),r&&z4(r,e,"default")),Sa=(t,e,r)=>(r=t!=null?Jxe(rbe(t)):{},z4(e||!t||!t.__esModule?Sy(r,"default",{value:t,enumerable:!0}):r,t)),ibe=t=>z4(Sy({},"__esModule",{value:!0}),t);var abe,a0,GC,h$,G4=N(()=>{"use strict";abe=Object.freeze({left:0,top:0,width:16,height:16}),a0=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),GC=Object.freeze({...abe,...a0}),h$=Object.freeze({...GC,body:"",hidden:!1});});var sbe,f$,d$=N(()=>{"use strict";G4();sbe=Object.freeze({width:null,height:null}),f$=Object.freeze({...sbe,...a0});});var VC,V4,p$=N(()=>{"use strict";VC=o((t,e,r,n="")=>{let i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1);}if(i.length>3||!i.length)return null;if(i.length>1){let l=i.pop(),u=i.pop(),h={provider:i.length>0?i[0]:n,prefix:u,name:l};return e&&!V4(h)?null:h;}let a=i[0],s=a.split("-");if(s.length>1){let l={provider:n,prefix:s.shift(),name:s.join("-")};return e&&!V4(l)?null:l;}if(r&&n===""){let l={provider:n,prefix:"",name:a};return e&&!V4(l,r)?null:l;}return null;},"stringToIcon"),V4=o((t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1,"validateIconName");});function m$(t,e){let r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);let n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r;}var g$=N(()=>{"use strict";o(m$,"mergeIconTransformations");});function UC(t,e){let r=m$(t,e);for(let n in h$)n in a0?n in t&&!(n in r)&&(r[n]=a0[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r;}var y$=N(()=>{"use strict";G4();g$();o(UC,"mergeIconData");});function v$(t,e){let r=t.icons,n=t.aliases||Object.create(null),i=Object.create(null);function a(s){if(r[s])return i[s]=[];if(!(s in i)){i[s]=null;let l=n[s]&&n[s].parent,u=l&&a(l);u&&(i[s]=[l].concat(u));}return i[s];}return o(a,"resolve"),(e||Object.keys(r).concat(Object.keys(n))).forEach(a),i;}var x$=N(()=>{"use strict";o(v$,"getIconsTree");});function b$(t,e,r){let n=t.icons,i=t.aliases||Object.create(null),a={};function s(l){a=UC(n[l]||i[l],a);}return o(s,"parse"),s(e),r.forEach(s),UC(t,a);}function HC(t,e){if(t.icons[e])return b$(t,e,[]);let r=v$(t,[e])[e];return r?b$(t,e,r):null;}var T$=N(()=>{"use strict";y$();x$();o(b$,"internalGetIconData");o(HC,"getIconData");});function WC(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;let n=t.split(obe);if(n===null||!n.length)return t;let i=[],a=n.shift(),s=lbe.test(a);for(;;){if(s){let l=parseFloat(a);isNaN(l)?i.push(a):i.push(Math.ceil(l*e*r)/r);}else i.push(a);if(a=n.shift(),a===void 0)return i.join("");s=!s;}}var obe,lbe,w$=N(()=>{"use strict";obe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,lbe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;o(WC,"calculateSize");});function cbe(t,e="defs"){let r="",n=t.indexOf("<"+e);for(;n>=0;){let i=t.indexOf(">",n),a=t.indexOf("</"+e);if(i===-1||a===-1)break;let s=t.indexOf(">",a);if(s===-1)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(s+1);}return{defs:r,content:t};}function ube(t,e){return t?"<defs>"+t+"</defs>"+e:e;}function k$(t,e,r){let n=cbe(t);return ube(n.defs,e+n.content+r);}var E$=N(()=>{"use strict";o(cbe,"splitSVGDefs");o(ube,"mergeDefsAndContent");o(k$,"wrapSVGContent");});function qC(t,e){let r={...GC,...t},n={...f$,...e},i={left:r.left,top:r.top,width:r.width,height:r.height},a=r.body;[r,n].forEach(y=>{let v=[],x=y.hFlip,b=y.vFlip,T=y.rotate;x?b?T+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):b&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let C;switch(T<0&&(T-=Math.floor(T/4)*4),T=T%4,T){case 1:C=i.height/2+i.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:C=i.width/2+i.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break;}T%2===1&&(i.left!==i.top&&(C=i.left,i.left=i.top,i.top=C),i.width!==i.height&&(C=i.width,i.width=i.height,i.height=C)),v.length&&(a=k$(a,'<g transform="'+v.join(" ")+'">',"</g>"));});let s=n.width,l=n.height,u=i.width,h=i.height,f,d;s===null?(d=l===null?"1em":l==="auto"?h:l,f=WC(d,u/h)):(f=s==="auto"?u:s,d=l===null?WC(f,h/u):l==="auto"?h:l);let p={},m=o((y,v)=>{hbe(v)||(p[y]=v.toString());},"setAttr");m("width",f),m("height",d);let g=[i.left,i.top,u,h];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:a};}var hbe,S$=N(()=>{"use strict";G4();d$();w$();E$();hbe=o(t=>t==="unset"||t==="undefined"||t==="none","isUnsetKeyword");o(qC,"iconToSVG");});function YC(t,e=dbe){let r=[],n;for(;n=fbe.exec(t);)r.push(n[1]);if(!r.length)return t;let i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{let s=typeof e=="function"?e(a):e+(pbe++).toString(),l=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3");}),t=t.replace(new RegExp(i,"g"),""),t;}var fbe,dbe,pbe,C$=N(()=>{"use strict";fbe=/\sid="(\S+)"/g,dbe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),pbe=0;o(YC,"replaceIDs");});function XC(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let n in e)r+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>";}var A$=N(()=>{"use strict";o(XC,"iconToHTML");});var D$=Ii((hat,_$)=>{"use strict";var s0=1e3,o0=s0*60,l0=o0*60,Xf=l0*24,mbe=Xf*7,gbe=Xf*365.25;_$.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return ybe(t);if(r==="number"&&isFinite(t))return e.long?xbe(t):vbe(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t));};function ybe(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*gbe;case"weeks":case"week":case"w":return r*mbe;case"days":case"day":case"d":return r*Xf;case"hours":case"hour":case"hrs":case"hr":case"h":return r*l0;case"minutes":case"minute":case"mins":case"min":case"m":return r*o0;case"seconds":case"second":case"secs":case"sec":case"s":return r*s0;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return;}}}}o(ybe,"parse");function vbe(t){var e=Math.abs(t);return e>=Xf?Math.round(t/Xf)+"d":e>=l0?Math.round(t/l0)+"h":e>=o0?Math.round(t/o0)+"m":e>=s0?Math.round(t/s0)+"s":t+"ms";}o(vbe,"fmtShort");function xbe(t){var e=Math.abs(t);return e>=Xf?U4(t,e,Xf,"day"):e>=l0?U4(t,e,l0,"hour"):e>=o0?U4(t,e,o0,"minute"):e>=s0?U4(t,e,s0,"second"):t+" ms";}o(xbe,"fmtLong");function U4(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"");}o(U4,"plural");});var R$=Ii((dat,L$)=>{"use strict";function bbe(t){r.debug=r,r.default=r,r.coerce=u,r.disable=s,r.enable=i,r.enabled=l,r.humanize=D$(),r.destroy=h,Object.keys(t).forEach(f=>{r[f]=t[f];}),r.names=[],r.skips=[],r.formatters={};function e(f){let d=0;for(let p=0;p<f.length;p++)d=(d<<5)-d+f.charCodeAt(p),d|=0;return r.colors[Math.abs(d)%r.colors.length];}o(e,"selectColor"),r.selectColor=e;function r(f){let d,p=null,m,g;function y(...v){if(!y.enabled)return;let x=y,b=Number(new Date()),T=b-(d||b);x.diff=T,x.prev=d,x.curr=b,d=b,v[0]=r.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let C=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(E,_)=>{if(E==="%%")return"%";C++;let A=r.formatters[_];if(typeof A=="function"){let D=v[C];E=A.call(x,D),v.splice(C,1),C--;}return E;}),r.formatArgs.call(x,v),(x.log||r.log).apply(x,v);}return o(y,"debug"),y.namespace=f,y.useColors=r.useColors(),y.color=r.selectColor(f),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:o(()=>p!==null?p:(m!==r.namespaces&&(m=r.namespaces,g=r.enabled(f)),g),"get"),set:o(v=>{p=v;},"set")}),typeof r.init=="function"&&r.init(y),y;}o(r,"createDebug");function n(f,d){let p=r(this.namespace+(typeof d>"u"?":":d)+f);return p.log=this.log,p;}o(n,"extend");function i(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let d=(typeof f=="string"?f:"").trim().replace(" ",",").split(",").filter(Boolean);for(let p of d)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p);}o(i,"enable");function a(f,d){let p=0,m=0,g=-1,y=0;for(;p<f.length;)if(m<d.length&&(d[m]===f[p]||d[m]==="*"))d[m]==="*"?(g=m,y=p,m++):(p++,m++);else if(g!==-1)m=g+1,y++,p=y;else return!1;for(;m<d.length&&d[m]==="*";)m++;return m===d.length;}o(a,"matchesTemplate");function s(){let f=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),f;}o(s,"disable");function l(f){for(let d of r.skips)if(a(f,d))return!1;for(let d of r.names)if(a(f,d))return!0;return!1;}o(l,"enabled");function u(f){return f instanceof Error?f.stack||f.message:f;}o(u,"coerce");function h(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");}return o(h,"destroy"),r.enable(r.load()),r;}o(bbe,"setup");L$.exports=bbe;});var N$=Ii((Ys,H4)=>{"use strict";Ys.formatArgs=wbe;Ys.save=kbe;Ys.load=Ebe;Ys.useColors=Tbe;Ys.storage=Sbe();Ys.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));};})();Ys.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Tbe(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);}o(Tbe,"useColors");function wbe(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+H4.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r));}),t.splice(n,0,e);}o(wbe,"formatArgs");Ys.log=console.debug||console.log||(()=>{});function kbe(t){try{t?Ys.storage.setItem("debug",t):Ys.storage.removeItem("debug");}catch{}}o(kbe,"save");function Ebe(){let t;try{t=Ys.storage.getItem("debug");}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t;}o(Ebe,"load");function Sbe(){try{return localStorage;}catch{}}o(Sbe,"localstorage");H4.exports=R$()(Ys);var{formatters:Cbe}=H4.exports;Cbe.j=function(t){try{return JSON.stringify(t);}catch(e){return"[UnexpectedJSONParseError]: "+e.message;}};});var yat,M$=N(()=>{"use strict";p$();T$();S$();C$();A$();yat=Sa(N$(),1);});var jC,Gn,c0=N(()=>{"use strict";jC=o((t,e,{depth:r=2,clobber:n=!1}={})=>{let i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>jC(t,a,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a);}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=jC(t[a],e[a],{depth:r-1,clobber:n})):(n||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a]);}),t);},"assignWithDepth"),Gn=jC;});var W4=Ii((KC,QC)=>{"use strict";(function(t,e){typeof KC=="object"&&typeof QC<"u"?QC.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e();})(KC,function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",a="minute",s="hour",l="day",u="week",h="month",f="quarter",d="year",p="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,v={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:o(function(k){var L=["th","st","nd","rd"],S=k%100;return"["+k+(L[(S-20)%10]||L[S]||L[0])+"]";},"ordinal")},x=o(function(k,L,S){var I=String(k);return!I||I.length>=L?k:""+Array(L+1-I.length).join(S)+k;},"m"),b={s:x,z:o(function(k){var L=-k.utcOffset(),S=Math.abs(L),I=Math.floor(S/60),M=S%60;return(L<=0?"+":"-")+x(I,2,"0")+":"+x(M,2,"0");},"z"),m:o(function k(L,S){if(L.date()<S.date())return-k(S,L);var I=12*(S.year()-L.year())+(S.month()-L.month()),M=L.clone().add(I,h),P=S-M<0,B=L.clone().add(I+(P?-1:1),h);return+(-(I+(S-M)/(P?M-B:B-M))||0);},"t"),a:o(function(k){return k<0?Math.ceil(k)||0:Math.floor(k);},"a"),p:o(function(k){return{M:h,y:d,w:u,d:l,D:p,h:s,m:a,s:i,ms:n,Q:f}[k]||String(k||"").toLowerCase().replace(/s$/,"");},"p"),u:o(function(k){return k===void 0;},"u")},T="en",C={};C[T]=v;var w="$isDayjsObject",E=o(function(k){return k instanceof O||!(!k||!k[w]);},"S"),_=o(function k(L,S,I){var M;if(!L)return T;if(typeof L=="string"){var P=L.toLowerCase();C[P]&&(M=P),S&&(C[P]=S,M=P);var B=L.split("-");if(!M&&B.length>1)return k(B[0]);}else{var F=L.name;C[F]=L,M=F;}return!I&&M&&(T=M),M||!I&&T;},"t"),A=o(function(k,L){if(E(k))return k.clone();var S=typeof L=="object"?L:{};return S.date=k,S.args=arguments,new O(S);},"O"),D=b;D.l=_,D.i=E,D.w=function(k,L){return A(k,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset});};var O=function(){function k(S){this.$L=_(S.locale,null,!0),this.parse(S),this.$x=this.$x||S.x||{},this[w]=!0;}o(k,"M");var L=k.prototype;return L.parse=function(S){this.$d=function(I){var M=I.date,P=I.utc;if(M===null)return new Date(NaN);if(D.u(M))return new Date();if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var B=M.match(g);if(B){var F=B[2]-1||0,z=(B[7]||"0").substring(0,3);return P?new Date(Date.UTC(B[1],F,B[3]||1,B[4]||0,B[5]||0,B[6]||0,z)):new Date(B[1],F,B[3]||1,B[4]||0,B[5]||0,B[6]||0,z);}}return new Date(M);}(S),this.init();},L.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds();},L.$utils=function(){return D;},L.isValid=function(){return this.$d.toString()!==m;},L.isSame=function(S,I){var M=A(S);return this.startOf(I)<=M&&M<=this.endOf(I);},L.isAfter=function(S,I){return A(S)<this.startOf(I);},L.isBefore=function(S,I){return this.endOf(I)<A(S);},L.$g=function(S,I,M){return D.u(S)?this[I]:this.set(M,S);},L.unix=function(){return Math.floor(this.valueOf()/1e3);},L.valueOf=function(){return this.$d.getTime();},L.startOf=function(S,I){var M=this,P=!!D.u(I)||I,B=D.p(S),F=o(function(Z,ue){var Q=D.w(M.$u?Date.UTC(M.$y,ue,Z):new Date(M.$y,ue,Z),M);return P?Q:Q.endOf(l);},"l"),z=o(function(Z,ue){return D.w(M.toDate()[Z].apply(M.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(ue)),M);},"$"),$=this.$W,U=this.$M,K=this.$D,ee="set"+(this.$u?"UTC":"");switch(B){case d:return P?F(1,0):F(31,11);case h:return P?F(1,U):F(0,U+1);case u:var Y=this.$locale().weekStart||0,ce=($<Y?$+7:$)-Y;return F(P?K-ce:K+(6-ce),U);case l:case p:return z(ee+"Hours",0);case s:return z(ee+"Minutes",1);case a:return z(ee+"Seconds",2);case i:return z(ee+"Milliseconds",3);default:return this.clone();}},L.endOf=function(S){return this.startOf(S,!1);},L.$set=function(S,I){var M,P=D.p(S),B="set"+(this.$u?"UTC":""),F=(M={},M[l]=B+"Date",M[p]=B+"Date",M[h]=B+"Month",M[d]=B+"FullYear",M[s]=B+"Hours",M[a]=B+"Minutes",M[i]=B+"Seconds",M[n]=B+"Milliseconds",M)[P],z=P===l?this.$D+(I-this.$W):I;if(P===h||P===d){var $=this.clone().set(p,1);$.$d[F](z),$.init(),this.$d=$.set(p,Math.min(this.$D,$.daysInMonth())).$d;}else F&&this.$d[F](z);return this.init(),this;},L.set=function(S,I){return this.clone().$set(S,I);},L.get=function(S){return this[D.p(S)]();},L.add=function(S,I){var M,P=this;S=Number(S);var B=D.p(I),F=o(function(U){var K=A(P);return D.w(K.date(K.date()+Math.round(U*S)),P);},"y");if(B===h)return this.set(h,this.$M+S);if(B===d)return this.set(d,this.$y+S);if(B===l)return F(1);if(B===u)return F(7);var z=(M={},M[a]=e,M[s]=r,M[i]=t,M)[B]||1,$=this.$d.getTime()+S*z;return D.w($,this);},L.subtract=function(S,I){return this.add(-1*S,I);},L.format=function(S){var I=this,M=this.$locale();if(!this.isValid())return M.invalidDate||m;var P=S||"YYYY-MM-DDTHH:mm:ssZ",B=D.z(this),F=this.$H,z=this.$m,$=this.$M,U=M.weekdays,K=M.months,ee=M.meridiem,Y=o(function(ue,Q,j,ne){return ue&&(ue[Q]||ue(I,P))||j[Q].slice(0,ne);},"h"),ce=o(function(ue){return D.s(F%12||12,ue,"0");},"d"),Z=ee||function(ue,Q,j){var ne=ue<12?"AM":"PM";return j?ne.toLowerCase():ne;};return P.replace(y,function(ue,Q){return Q||function(j){switch(j){case"YY":return String(I.$y).slice(-2);case"YYYY":return D.s(I.$y,4,"0");case"M":return $+1;case"MM":return D.s($+1,2,"0");case"MMM":return Y(M.monthsShort,$,K,3);case"MMMM":return Y(K,$);case"D":return I.$D;case"DD":return D.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return Y(M.weekdaysMin,I.$W,U,2);case"ddd":return Y(M.weekdaysShort,I.$W,U,3);case"dddd":return U[I.$W];case"H":return String(F);case"HH":return D.s(F,2,"0");case"h":return ce(1);case"hh":return ce(2);case"a":return Z(F,z,!0);case"A":return Z(F,z,!1);case"m":return String(z);case"mm":return D.s(z,2,"0");case"s":return String(I.$s);case"ss":return D.s(I.$s,2,"0");case"SSS":return D.s(I.$ms,3,"0");case"Z":return B;}return null;}(ue)||B.replace(":","");});},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15);},L.diff=function(S,I,M){var P,B=this,F=D.p(I),z=A(S),$=(z.utcOffset()-this.utcOffset())*e,U=this-z,K=o(function(){return D.m(B,z);},"D");switch(F){case d:P=K()/12;break;case h:P=K();break;case f:P=K()/3;break;case u:P=(U-$)/6048e5;break;case l:P=(U-$)/864e5;break;case s:P=U/r;break;case a:P=U/e;break;case i:P=U/t;break;default:P=U;}return M?P:D.a(P);},L.daysInMonth=function(){return this.endOf(h).$D;},L.$locale=function(){return C[this.$L];},L.locale=function(S,I){if(!S)return this.$L;var M=this.clone(),P=_(S,I,!0);return P&&(M.$L=P),M;},L.clone=function(){return D.w(this.$d,this);},L.toDate=function(){return new Date(this.valueOf());},L.toJSON=function(){return this.isValid()?this.toISOString():null;},L.toISOString=function(){return this.$d.toISOString();},L.toString=function(){return this.$d.toUTCString();},k;}(),R=O.prototype;return A.prototype=R,[["$ms",n],["$s",i],["$m",a],["$H",s],["$W",l],["$M",h],["$y",d],["$D",p]].forEach(function(k){R[k[1]]=function(L){return this.$g(L,k[0],k[1]);};}),A.extend=function(k,L){return k.$i||(k(L,O,A),k.$i=!0),A;},A.locale=_,A.isDayjs=E,A.unix=function(k){return A(1e3*k);},A.en=C[T],A.Ls=C,A.p={},A;});});var I$,ru,X,Cy,To,yt=N(()=>{"use strict";I$=Sa(W4(),1),ru={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},X={trace:o((...t)=>{},"trace"),debug:o((...t)=>{},"debug"),info:o((...t)=>{},"info"),warn:o((...t)=>{},"warn"),error:o((...t)=>{},"error"),fatal:o((...t)=>{},"fatal")},Cy=o(function(t="fatal"){let e=ru.fatal;typeof t=="string"?t.toLowerCase()in ru&&(e=ru[t]):typeof t=="number"&&(e=t),X.trace=()=>{},X.debug=()=>{},X.info=()=>{},X.warn=()=>{},X.error=()=>{},X.fatal=()=>{},e<=ru.fatal&&(X.fatal=console.error?console.error.bind(console,To("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",To("FATAL"))),e<=ru.error&&(X.error=console.error?console.error.bind(console,To("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",To("ERROR"))),e<=ru.warn&&(X.warn=console.warn?console.warn.bind(console,To("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",To("WARN"))),e<=ru.info&&(X.info=console.info?console.info.bind(console,To("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",To("INFO"))),e<=ru.debug&&(X.debug=console.debug?console.debug.bind(console,To("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",To("DEBUG"))),e<=ru.trace&&(X.trace=console.debug?console.debug.bind(console,To("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",To("TRACE")));},"setLogLevel"),To=o(t=>`%c${(0,I$.default)().format("ss.SSS")} : ${t} : `,"format");});var q4,O$,P$=N(()=>{"use strict";q4={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:o(t=>t>=255?255:t<0?0:t,"r"),g:o(t=>t>=255?255:t<0?0:t,"g"),b:o(t=>t>=255?255:t<0?0:t,"b"),h:o(t=>t%360,"h"),s:o(t=>t>=100?100:t<0?0:t,"s"),l:o(t=>t>=100?100:t<0?0:t,"l"),a:o(t=>t>=1?1:t<0?0:t,"a")},toLinear:o(t=>{let e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92;},"toLinear"),hue2rgb:o((t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?t+(e-t)*6*r:r<.5?e:r<.6666666666666666?t+(e-t)*(.6666666666666666-r)*6:t),"hue2rgb"),hsl2rgb:o(({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;let i=r<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return q4.hue2rgb(a,i,t+.3333333333333333)*255;case"g":return q4.hue2rgb(a,i,t)*255;case"b":return q4.hue2rgb(a,i,t-.3333333333333333)*255;}},"hsl2rgb"),rgb2hsl:o(({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;let i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if(n==="l")return s*100;if(i===a)return 0;let l=i-a,u=s>.5?l/(2-i-a):l/(i+a);if(n==="s")return u*100;switch(i){case t:return((e-r)/l+(e<r?6:0))*60;case e:return((r-t)/l+2)*60;case r:return((t-e)/l+4)*60;default:return-1;}},"rgb2hsl")},O$=q4;});var Abe,B$,F$=N(()=>{"use strict";Abe={clamp:o((t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),"clamp"),round:o(t=>Math.round(t*1e10)/1e10,"round")},B$=Abe;});var _be,$$,z$=N(()=>{"use strict";_be={dec2hex:o(t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`;},"dec2hex")},$$=_be;});var Dbe,jt,Yl=N(()=>{"use strict";P$();F$();z$();Dbe={channel:O$,lang:B$,unit:$$},jt=Dbe;});var nu,Oi,Ay=N(()=>{"use strict";Yl();nu={};for(let t=0;t<=255;t++)nu[t]=jt.unit.dec2hex(t);Oi={ALL:0,RGB:1,HSL:2};});var ZC,G$,V$=N(()=>{"use strict";var _Class;Ay();ZC=(_Class=class ZC{constructor(){this.type=Oi.ALL;}get(){return this.type;}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e;}reset(){this.type=Oi.ALL;}is(e){return this.type===e;}},o(_Class,"Type"),_Class),G$=ZC;});var JC,U$,H$=N(()=>{"use strict";var _Class2;Yl();V$();Ay();JC=(_Class2=class JC{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new G$();}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=Oi.ALL,this;}_ensureHSL(){let e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=jt.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=jt.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=jt.channel.rgb2hsl(e,"l"));}_ensureRGB(){let e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=jt.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=jt.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=jt.channel.hsl2rgb(e,"b"));}get r(){let e=this.data,r=e.r;return!this.type.is(Oi.HSL)&&r!==void 0?r:(this._ensureHSL(),jt.channel.hsl2rgb(e,"r"));}get g(){let e=this.data,r=e.g;return!this.type.is(Oi.HSL)&&r!==void 0?r:(this._ensureHSL(),jt.channel.hsl2rgb(e,"g"));}get b(){let e=this.data,r=e.b;return!this.type.is(Oi.HSL)&&r!==void 0?r:(this._ensureHSL(),jt.channel.hsl2rgb(e,"b"));}get h(){let e=this.data,r=e.h;return!this.type.is(Oi.RGB)&&r!==void 0?r:(this._ensureRGB(),jt.channel.rgb2hsl(e,"h"));}get s(){let e=this.data,r=e.s;return!this.type.is(Oi.RGB)&&r!==void 0?r:(this._ensureRGB(),jt.channel.rgb2hsl(e,"s"));}get l(){let e=this.data,r=e.l;return!this.type.is(Oi.RGB)&&r!==void 0?r:(this._ensureRGB(),jt.channel.rgb2hsl(e,"l"));}get a(){return this.data.a;}set r(e){this.type.set(Oi.RGB),this.changed=!0,this.data.r=e;}set g(e){this.type.set(Oi.RGB),this.changed=!0,this.data.g=e;}set b(e){this.type.set(Oi.RGB),this.changed=!0,this.data.b=e;}set h(e){this.type.set(Oi.HSL),this.changed=!0,this.data.h=e;}set s(e){this.type.set(Oi.HSL),this.changed=!0,this.data.s=e;}set l(e){this.type.set(Oi.HSL),this.changed=!0,this.data.l=e;}set a(e){this.changed=!0,this.data.a=e;}},o(_Class2,"Channels"),_Class2),U$=JC;});var Lbe,sh,_y=N(()=>{"use strict";H$();Lbe=new U$({r:0,g:0,b:0,a:0},"transparent"),sh=Lbe;});var W$,jf,e7=N(()=>{"use strict";_y();Ay();W$={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:o(t=>{if(t.charCodeAt(0)!==35)return;let e=t.match(W$.re);if(!e)return;let r=e[1],n=parseInt(r,16),i=r.length,a=i%4===0,s=i>4,l=s?1:17,u=s?8:4,h=a?0:-1,f=s?255:15;return sh.set({r:(n>>u*(h+3)&f)*l,g:(n>>u*(h+2)&f)*l,b:(n>>u*(h+1)&f)*l,a:a?(n&f)*l/255:1},t);},"parse"),stringify:o(t=>{let{r:e,g:r,b:n,a:i}=t;return i<1?`#${nu[Math.round(e)]}${nu[Math.round(r)]}${nu[Math.round(n)]}${nu[Math.round(i*255)]}`:`#${nu[Math.round(e)]}${nu[Math.round(r)]}${nu[Math.round(n)]}`;},"stringify")},jf=W$;});var Y4,Dy,q$=N(()=>{"use strict";Yl();_y();Y4={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:o(t=>{let e=t.match(Y4.hueRe);if(e){let[,r,n]=e;switch(n){case"grad":return jt.channel.clamp.h(parseFloat(r)*.9);case"rad":return jt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return jt.channel.clamp.h(parseFloat(r)*360);}}return jt.channel.clamp.h(parseFloat(t));},"_hue2deg"),parse:o(t=>{let e=t.charCodeAt(0);if(e!==104&&e!==72)return;let r=t.match(Y4.re);if(!r)return;let[,n,i,a,s,l]=r;return sh.set({h:Y4._hue2deg(n),s:jt.channel.clamp.s(parseFloat(i)),l:jt.channel.clamp.l(parseFloat(a)),a:s?jt.channel.clamp.a(l?parseFloat(s)/100:parseFloat(s)):1},t);},"parse"),stringify:o(t=>{let{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${jt.lang.round(e)}, ${jt.lang.round(r)}%, ${jt.lang.round(n)}%, ${i})`:`hsl(${jt.lang.round(e)}, ${jt.lang.round(r)}%, ${jt.lang.round(n)}%)`;},"stringify")},Dy=Y4;});var X4,t7,Y$=N(()=>{"use strict";e7();X4={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:o(t=>{t=t.toLowerCase();let e=X4.colors[t];if(e)return jf.parse(e);},"parse"),stringify:o(t=>{let e=jf.stringify(t);for(let r in X4.colors)if(X4.colors[r]===e)return r;},"stringify")},t7=X4;});var X$,Ly,j$=N(()=>{"use strict";Yl();_y();X$={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:o(t=>{let e=t.charCodeAt(0);if(e!==114&&e!==82)return;let r=t.match(X$.re);if(!r)return;let[,n,i,a,s,l,u,h,f]=r;return sh.set({r:jt.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:jt.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:jt.channel.clamp.b(u?parseFloat(l)*2.55:parseFloat(l)),a:h?jt.channel.clamp.a(f?parseFloat(h)/100:parseFloat(h)):1},t);},"parse"),stringify:o(t=>{let{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${jt.lang.round(e)}, ${jt.lang.round(r)}, ${jt.lang.round(n)}, ${jt.lang.round(i)})`:`rgb(${jt.lang.round(e)}, ${jt.lang.round(r)}, ${jt.lang.round(n)})`;},"stringify")},Ly=X$;});var Rbe,Pi,iu=N(()=>{"use strict";e7();q$();Y$();j$();Ay();Rbe={format:{keyword:t7,hex:jf,rgb:Ly,rgba:Ly,hsl:Dy,hsla:Dy},parse:o(t=>{if(typeof t!="string")return t;let e=jf.parse(t)||Ly.parse(t)||Dy.parse(t)||t7.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`);},"parse"),stringify:o(t=>!t.changed&&t.color?t.color:t.type.is(Oi.HSL)||t.data.r===void 0?Dy.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Ly.stringify(t):jf.stringify(t),"stringify")},Pi=Rbe;});var Nbe,j4,r7=N(()=>{"use strict";Yl();iu();Nbe=o((t,e)=>{let r=Pi.parse(t);for(let n in e)r[n]=jt.channel.clamp[n](e[n]);return Pi.stringify(r);},"change"),j4=Nbe;});var Mbe,Ya,n7=N(()=>{"use strict";Yl();_y();iu();r7();Mbe=o((t,e,r=0,n=1)=>{if(typeof t!="number")return j4(t,{a:e});let i=sh.set({r:jt.channel.clamp.r(t),g:jt.channel.clamp.g(e),b:jt.channel.clamp.b(r),a:jt.channel.clamp.a(n)});return Pi.stringify(i);},"rgba"),Ya=Mbe;});var Ibe,Kf,K$=N(()=>{"use strict";Yl();iu();Ibe=o((t,e)=>jt.lang.round(Pi.parse(t)[e]),"channel"),Kf=Ibe;});var Obe,Q$,Z$=N(()=>{"use strict";Yl();iu();Obe=o(t=>{let{r:e,g:r,b:n}=Pi.parse(t),i=.2126*jt.channel.toLinear(e)+.7152*jt.channel.toLinear(r)+.0722*jt.channel.toLinear(n);return jt.lang.round(i);},"luminance"),Q$=Obe;});var Pbe,J$,ez=N(()=>{"use strict";Z$();Pbe=o(t=>Q$(t)>=.5,"isLight"),J$=Pbe;});var Bbe,sa,tz=N(()=>{"use strict";ez();Bbe=o(t=>!J$(t),"isDark"),sa=Bbe;});var Fbe,K4,i7=N(()=>{"use strict";Yl();iu();Fbe=o((t,e,r)=>{let n=Pi.parse(t),i=n[e],a=jt.channel.clamp[e](i+r);return i!==a&&(n[e]=a),Pi.stringify(n);},"adjustChannel"),K4=Fbe;});var $be,Lt,rz=N(()=>{"use strict";i7();$be=o((t,e)=>K4(t,"l",e),"lighten"),Lt=$be;});var zbe,Ot,nz=N(()=>{"use strict";i7();zbe=o((t,e)=>K4(t,"l",-e),"darken"),Ot=zbe;});var Gbe,Me,iz=N(()=>{"use strict";iu();r7();Gbe=o((t,e)=>{let r=Pi.parse(t),n={};for(let i in e)e[i]&&(n[i]=r[i]+e[i]);return j4(t,n);},"adjust"),Me=Gbe;});var Vbe,az,sz=N(()=>{"use strict";iu();n7();Vbe=o((t,e,r=50)=>{let{r:n,g:i,b:a,a:s}=Pi.parse(t),{r:l,g:u,b:h,a:f}=Pi.parse(e),d=r/100,p=d*2-1,m=s-f,y=((p*m===-1?p:(p+m)/(1+p*m))+1)/2,v=1-y,x=n*y+l*v,b=i*y+u*v,T=a*y+h*v,C=s*d+f*(1-d);return Ya(x,b,T,C);},"mix"),az=Vbe;});var Ube,wt,oz=N(()=>{"use strict";iu();sz();Ube=o((t,e=100)=>{let r=Pi.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,az(r,t,e);},"invert"),wt=Ube;});var lz=N(()=>{"use strict";n7();K$();tz();rz();nz();iz();oz();});var Xs=N(()=>{"use strict";lz();});var oh,lh,Ry=N(()=>{"use strict";oh="#ffffff",lh="#f2f2f2";});var Ei,u0=N(()=>{"use strict";Xs();Ei=o((t,e)=>e?Me(t,{s:-40,l:10}):Me(t,{s:-40,l:-10}),"mkBorder");});var s7,cz,uz=N(()=>{"use strict";var _Class3;Xs();Ry();u0();s7=(_Class3=class s7{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px";}updateColors(){var _this$radar,_this$radar2,_this$radar3,_this$radar4,_this$radar5,_this$radar6,_this$radar7,_this$radar8,_this$radar9,_this$radar0,_this$xyChart,_this$xyChart2,_this$xyChart3,_this$xyChart4,_this$xyChart5,_this$xyChart6,_this$xyChart7,_this$xyChart8,_this$xyChart9,_this$xyChart0,_this$xyChart1;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Me(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Me(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ei(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ei(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ei(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ei(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||wt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||wt(this.tertiaryColor),this.lineColor=this.lineColor||wt(this.background),this.arrowheadColor=this.arrowheadColor||wt(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?Ot(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||Ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||wt(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||Lt(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||Ot(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Ot(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Lt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Lt(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||Me(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Me(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Me(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Me(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Me(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Me(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Me(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Me(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Me(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Ot(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Ot(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||wt(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||Lt(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||Ot(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;let e=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||Me(this.mainBkg,{h:180,s:-15,l:e*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||Me(this.mainBkg,{h:180,s:-15,l:e*(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||Me(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Me(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Me(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Me(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Me(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Me(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Me(this.primaryColor,{l:-10}),this.pie5=this.pie5||Me(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Me(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Me(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Me(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Me(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Me(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Me(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Me(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:((_this$radar=this.radar)===null||_this$radar===void 0?void 0:_this$radar.axisColor)||this.lineColor,axisStrokeWidth:((_this$radar2=this.radar)===null||_this$radar2===void 0?void 0:_this$radar2.axisStrokeWidth)||2,axisLabelFontSize:((_this$radar3=this.radar)===null||_this$radar3===void 0?void 0:_this$radar3.axisLabelFontSize)||12,curveOpacity:((_this$radar4=this.radar)===null||_this$radar4===void 0?void 0:_this$radar4.curveOpacity)||.5,curveStrokeWidth:((_this$radar5=this.radar)===null||_this$radar5===void 0?void 0:_this$radar5.curveStrokeWidth)||2,graticuleColor:((_this$radar6=this.radar)===null||_this$radar6===void 0?void 0:_this$radar6.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_this$radar7=this.radar)===null||_this$radar7===void 0?void 0:_this$radar7.graticuleStrokeWidth)||1,graticuleOpacity:((_this$radar8=this.radar)===null||_this$radar8===void 0?void 0:_this$radar8.graticuleOpacity)||.3,legendBoxSize:((_this$radar9=this.radar)===null||_this$radar9===void 0?void 0:_this$radar9.legendBoxSize)||12,legendFontSize:((_this$radar0=this.radar)===null||_this$radar0===void 0?void 0:_this$radar0.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Me(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Me(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Me(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Me(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Me(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Me(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||sa(this.quadrant1Fill)?Lt(this.quadrant1Fill):Ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((_this$xyChart=this.xyChart)===null||_this$xyChart===void 0?void 0:_this$xyChart.backgroundColor)||this.background,titleColor:((_this$xyChart2=this.xyChart)===null||_this$xyChart2===void 0?void 0:_this$xyChart2.titleColor)||this.primaryTextColor,xAxisTitleColor:((_this$xyChart3=this.xyChart)===null||_this$xyChart3===void 0?void 0:_this$xyChart3.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_this$xyChart4=this.xyChart)===null||_this$xyChart4===void 0?void 0:_this$xyChart4.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_this$xyChart5=this.xyChart)===null||_this$xyChart5===void 0?void 0:_this$xyChart5.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_this$xyChart6=this.xyChart)===null||_this$xyChart6===void 0?void 0:_this$xyChart6.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_this$xyChart7=this.xyChart)===null||_this$xyChart7===void 0?void 0:_this$xyChart7.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_this$xyChart8=this.xyChart)===null||_this$xyChart8===void 0?void 0:_this$xyChart8.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_this$xyChart9=this.xyChart)===null||_this$xyChart9===void 0?void 0:_this$xyChart9.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_this$xyChart0=this.xyChart)===null||_this$xyChart0===void 0?void 0:_this$xyChart0.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_this$xyChart1=this.xyChart)===null||_this$xyChart1===void 0?void 0:_this$xyChart1.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Me(this.primaryColor,{h:-30}),this.git4=this.git4||Me(this.primaryColor,{h:-60}),this.git5=this.git5||Me(this.primaryColor,{h:-90}),this.git6=this.git6||Me(this.primaryColor,{h:60}),this.git7=this.git7||Me(this.primaryColor,{h:120}),this.darkMode?(this.git0=Lt(this.git0,25),this.git1=Lt(this.git1,25),this.git2=Lt(this.git2,25),this.git3=Lt(this.git3,25),this.git4=Lt(this.git4,25),this.git5=Lt(this.git5,25),this.git6=Lt(this.git6,25),this.git7=Lt(this.git7,25)):(this.git0=Ot(this.git0,25),this.git1=Ot(this.git1,25),this.git2=Ot(this.git2,25),this.git3=Ot(this.git3,25),this.git4=Ot(this.git4,25),this.git5=Ot(this.git5,25),this.git6=Ot(this.git6,25),this.git7=Ot(this.git7,25)),this.gitInv0=this.gitInv0||wt(this.git0),this.gitInv1=this.gitInv1||wt(this.git1),this.gitInv2=this.gitInv2||wt(this.git2),this.gitInv3=this.gitInv3||wt(this.git3),this.gitInv4=this.gitInv4||wt(this.git4),this.gitInv5=this.gitInv5||wt(this.git5),this.gitInv6=this.gitInv6||wt(this.git6),this.gitInv7=this.gitInv7||wt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lh;}calculate(e){if(typeof e!="object"){this.updateColors();return;}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n];}),this.updateColors(),r.forEach(n=>{this[n]=e[n];});}},o(_Class3,"Theme"),_Class3),cz=o(t=>{let e=new s7();return e.calculate(t),e;},"getThemeVariables");});var o7,hz,fz=N(()=>{"use strict";var _Class4;Xs();u0();o7=(_Class4=class o7{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Lt(this.primaryColor,16),this.tertiaryColor=Me(this.primaryColor,{h:-160}),this.primaryBorderColor=wt(this.background),this.secondaryBorderColor=Ei(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ei(this.tertiaryColor,this.darkMode),this.primaryTextColor=wt(this.primaryColor),this.secondaryTextColor=wt(this.secondaryColor),this.tertiaryTextColor=wt(this.tertiaryColor),this.lineColor=wt(this.background),this.textColor=wt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Lt(wt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ya(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Ot("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Ot(this.sectionBkgColor,10),this.taskBorderColor=Ya(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ya(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||Lt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Ot(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd";}updateColors(){var _this$xyChart10,_this$xyChart11,_this$xyChart12,_this$xyChart13,_this$xyChart14,_this$xyChart15,_this$xyChart16,_this$xyChart17,_this$xyChart18,_this$xyChart19,_this$xyChart20,_this$radar1,_this$radar10,_this$radar11,_this$radar12,_this$radar13,_this$radar14,_this$radar15,_this$radar16,_this$radar17,_this$radar18;this.secondBkg=Lt(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Lt(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=Lt(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Me(this.primaryColor,{h:64}),this.fillType3=Me(this.secondaryColor,{h:64}),this.fillType4=Me(this.primaryColor,{h:-64}),this.fillType5=Me(this.secondaryColor,{h:-64}),this.fillType6=Me(this.primaryColor,{h:128}),this.fillType7=Me(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Me(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Me(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Me(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Me(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Me(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Me(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Me(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Me(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Me(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||wt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||Lt(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Me(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Me(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Me(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Me(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Me(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Me(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Me(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Me(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||sa(this.quadrant1Fill)?Lt(this.quadrant1Fill):Ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((_this$xyChart10=this.xyChart)===null||_this$xyChart10===void 0?void 0:_this$xyChart10.backgroundColor)||this.background,titleColor:((_this$xyChart11=this.xyChart)===null||_this$xyChart11===void 0?void 0:_this$xyChart11.titleColor)||this.primaryTextColor,xAxisTitleColor:((_this$xyChart12=this.xyChart)===null||_this$xyChart12===void 0?void 0:_this$xyChart12.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_this$xyChart13=this.xyChart)===null||_this$xyChart13===void 0?void 0:_this$xyChart13.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_this$xyChart14=this.xyChart)===null||_this$xyChart14===void 0?void 0:_this$xyChart14.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_this$xyChart15=this.xyChart)===null||_this$xyChart15===void 0?void 0:_this$xyChart15.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_this$xyChart16=this.xyChart)===null||_this$xyChart16===void 0?void 0:_this$xyChart16.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_this$xyChart17=this.xyChart)===null||_this$xyChart17===void 0?void 0:_this$xyChart17.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_this$xyChart18=this.xyChart)===null||_this$xyChart18===void 0?void 0:_this$xyChart18.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_this$xyChart19=this.xyChart)===null||_this$xyChart19===void 0?void 0:_this$xyChart19.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_this$xyChart20=this.xyChart)===null||_this$xyChart20===void 0?void 0:_this$xyChart20.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((_this$radar1=this.radar)===null||_this$radar1===void 0?void 0:_this$radar1.axisColor)||this.lineColor,axisStrokeWidth:((_this$radar10=this.radar)===null||_this$radar10===void 0?void 0:_this$radar10.axisStrokeWidth)||2,axisLabelFontSize:((_this$radar11=this.radar)===null||_this$radar11===void 0?void 0:_this$radar11.axisLabelFontSize)||12,curveOpacity:((_this$radar12=this.radar)===null||_this$radar12===void 0?void 0:_this$radar12.curveOpacity)||.5,curveStrokeWidth:((_this$radar13=this.radar)===null||_this$radar13===void 0?void 0:_this$radar13.curveStrokeWidth)||2,graticuleColor:((_this$radar14=this.radar)===null||_this$radar14===void 0?void 0:_this$radar14.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_this$radar15=this.radar)===null||_this$radar15===void 0?void 0:_this$radar15.graticuleStrokeWidth)||1,graticuleOpacity:((_this$radar16=this.radar)===null||_this$radar16===void 0?void 0:_this$radar16.graticuleOpacity)||.3,legendBoxSize:((_this$radar17=this.radar)===null||_this$radar17===void 0?void 0:_this$radar17.legendBoxSize)||12,legendFontSize:((_this$radar18=this.radar)===null||_this$radar18===void 0?void 0:_this$radar18.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Lt(this.secondaryColor,20),this.git1=Lt(this.pie2||this.secondaryColor,20),this.git2=Lt(this.pie3||this.tertiaryColor,20),this.git3=Lt(this.pie4||Me(this.primaryColor,{h:-30}),20),this.git4=Lt(this.pie5||Me(this.primaryColor,{h:-60}),20),this.git5=Lt(this.pie6||Me(this.primaryColor,{h:-90}),10),this.git6=Lt(this.pie7||Me(this.primaryColor,{h:60}),10),this.git7=Lt(this.pie8||Me(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||wt(this.git0),this.gitInv1=this.gitInv1||wt(this.git1),this.gitInv2=this.gitInv2||wt(this.git2),this.gitInv3=this.gitInv3||wt(this.git3),this.gitInv4=this.gitInv4||wt(this.git4),this.gitInv5=this.gitInv5||wt(this.git5),this.gitInv6=this.gitInv6||wt(this.git6),this.gitInv7=this.gitInv7||wt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||wt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||wt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Lt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Lt(this.background,2),this.nodeBorder=this.nodeBorder||"#999";}calculate(e){if(typeof e!="object"){this.updateColors();return;}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n];}),this.updateColors(),r.forEach(n=>{this[n]=e[n];});}},o(_Class4,"Theme"),_Class4),hz=o(t=>{let e=new o7();return e.calculate(t),e;},"getThemeVariables");});var l7,ch,Ny=N(()=>{"use strict";var _Class5;Xs();u0();Ry();l7=(_Class5=class l7{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Me(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Me(this.primaryColor,{h:-160}),this.primaryBorderColor=Ei(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ei(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ei(this.tertiaryColor,this.darkMode),this.primaryTextColor=wt(this.primaryColor),this.secondaryTextColor=wt(this.secondaryColor),this.tertiaryTextColor=wt(this.tertiaryColor),this.lineColor=wt(this.background),this.textColor=wt(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ya(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors();}updateColors(){var _this$radar19,_this$radar20,_this$radar21,_this$radar22,_this$radar23,_this$radar24,_this$radar25,_this$radar26,_this$radar27,_this$radar28,_this$xyChart21,_this$xyChart22,_this$xyChart23,_this$xyChart24,_this$xyChart25,_this$xyChart26,_this$xyChart27,_this$xyChart28,_this$xyChart29,_this$xyChart30,_this$xyChart31;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Me(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Me(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Me(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Me(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Me(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Me(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Me(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Me(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Me(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Ot(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ot(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=Ot(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||Ot(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Me(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Me(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Me(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||wt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||wt(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor;}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=Lt(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Lt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||Lt(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Me(this.primaryColor,{h:64}),this.fillType3=Me(this.secondaryColor,{h:64}),this.fillType4=Me(this.primaryColor,{h:-64}),this.fillType5=Me(this.secondaryColor,{h:-64}),this.fillType6=Me(this.primaryColor,{h:128}),this.fillType7=Me(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Me(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Me(this.primaryColor,{l:-10}),this.pie5=this.pie5||Me(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Me(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Me(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Me(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Me(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Me(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Me(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Me(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Me(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Me(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Me(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Me(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Me(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Me(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||sa(this.quadrant1Fill)?Lt(this.quadrant1Fill):Ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((_this$radar19=this.radar)===null||_this$radar19===void 0?void 0:_this$radar19.axisColor)||this.lineColor,axisStrokeWidth:((_this$radar20=this.radar)===null||_this$radar20===void 0?void 0:_this$radar20.axisStrokeWidth)||2,axisLabelFontSize:((_this$radar21=this.radar)===null||_this$radar21===void 0?void 0:_this$radar21.axisLabelFontSize)||12,curveOpacity:((_this$radar22=this.radar)===null||_this$radar22===void 0?void 0:_this$radar22.curveOpacity)||.5,curveStrokeWidth:((_this$radar23=this.radar)===null||_this$radar23===void 0?void 0:_this$radar23.curveStrokeWidth)||2,graticuleColor:((_this$radar24=this.radar)===null||_this$radar24===void 0?void 0:_this$radar24.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_this$radar25=this.radar)===null||_this$radar25===void 0?void 0:_this$radar25.graticuleStrokeWidth)||1,graticuleOpacity:((_this$radar26=this.radar)===null||_this$radar26===void 0?void 0:_this$radar26.graticuleOpacity)||.3,legendBoxSize:((_this$radar27=this.radar)===null||_this$radar27===void 0?void 0:_this$radar27.legendBoxSize)||12,legendFontSize:((_this$radar28=this.radar)===null||_this$radar28===void 0?void 0:_this$radar28.legendFontSize)||12},this.xyChart={backgroundColor:((_this$xyChart21=this.xyChart)===null||_this$xyChart21===void 0?void 0:_this$xyChart21.backgroundColor)||this.background,titleColor:((_this$xyChart22=this.xyChart)===null||_this$xyChart22===void 0?void 0:_this$xyChart22.titleColor)||this.primaryTextColor,xAxisTitleColor:((_this$xyChart23=this.xyChart)===null||_this$xyChart23===void 0?void 0:_this$xyChart23.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_this$xyChart24=this.xyChart)===null||_this$xyChart24===void 0?void 0:_this$xyChart24.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_this$xyChart25=this.xyChart)===null||_this$xyChart25===void 0?void 0:_this$xyChart25.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_this$xyChart26=this.xyChart)===null||_this$xyChart26===void 0?void 0:_this$xyChart26.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_this$xyChart27=this.xyChart)===null||_this$xyChart27===void 0?void 0:_this$xyChart27.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_this$xyChart28=this.xyChart)===null||_this$xyChart28===void 0?void 0:_this$xyChart28.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_this$xyChart29=this.xyChart)===null||_this$xyChart29===void 0?void 0:_this$xyChart29.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_this$xyChart30=this.xyChart)===null||_this$xyChart30===void 0?void 0:_this$xyChart30.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_this$xyChart31=this.xyChart)===null||_this$xyChart31===void 0?void 0:_this$xyChart31.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Me(this.primaryColor,{h:-30}),this.git4=this.git4||Me(this.primaryColor,{h:-60}),this.git5=this.git5||Me(this.primaryColor,{h:-90}),this.git6=this.git6||Me(this.primaryColor,{h:60}),this.git7=this.git7||Me(this.primaryColor,{h:120}),this.darkMode?(this.git0=Lt(this.git0,25),this.git1=Lt(this.git1,25),this.git2=Lt(this.git2,25),this.git3=Lt(this.git3,25),this.git4=Lt(this.git4,25),this.git5=Lt(this.git5,25),this.git6=Lt(this.git6,25),this.git7=Lt(this.git7,25)):(this.git0=Ot(this.git0,25),this.git1=Ot(this.git1,25),this.git2=Ot(this.git2,25),this.git3=Ot(this.git3,25),this.git4=Ot(this.git4,25),this.git5=Ot(this.git5,25),this.git6=Ot(this.git6,25),this.git7=Ot(this.git7,25)),this.gitInv0=this.gitInv0||Ot(wt(this.git0),25),this.gitInv1=this.gitInv1||wt(this.git1),this.gitInv2=this.gitInv2||wt(this.git2),this.gitInv3=this.gitInv3||wt(this.git3),this.gitInv4=this.gitInv4||wt(this.git4),this.gitInv5=this.gitInv5||wt(this.git5),this.gitInv6=this.gitInv6||wt(this.git6),this.gitInv7=this.gitInv7||wt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||wt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||wt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lh;}calculate(e){if(Object.keys(this).forEach(n=>{this[n]==="calculated"&&(this[n]=void 0);}),typeof e!="object"){this.updateColors();return;}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n];}),this.updateColors(),r.forEach(n=>{this[n]=e[n];});}},o(_Class5,"Theme"),_Class5),ch=o(t=>{let e=new l7();return e.calculate(t),e;},"getThemeVariables");});var c7,dz,pz=N(()=>{"use strict";var _Class6;Xs();Ry();u0();c7=(_Class6=class c7{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Lt("#cde498",10),this.primaryBorderColor=Ei(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ei(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ei(this.tertiaryColor,this.darkMode),this.primaryTextColor=wt(this.primaryColor),this.secondaryTextColor=wt(this.secondaryColor),this.tertiaryTextColor=wt(this.primaryColor),this.lineColor=wt(this.background),this.textColor=wt(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222";}updateColors(){var _this$radar29,_this$radar30,_this$radar31,_this$radar32,_this$radar33,_this$radar34,_this$radar35,_this$radar36,_this$radar37,_this$radar38,_this$xyChart32,_this$xyChart33,_this$xyChart34,_this$xyChart35,_this$xyChart36,_this$xyChart37,_this$xyChart38,_this$xyChart39,_this$xyChart40,_this$xyChart41,_this$xyChart42;this.actorBorder=Ot(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Me(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Me(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Me(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Me(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Me(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Me(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Me(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Me(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Me(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Ot(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ot(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=Ot(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||Ot(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Me(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Me(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Me(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Lt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Lt(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Me(this.primaryColor,{h:64}),this.fillType3=Me(this.secondaryColor,{h:64}),this.fillType4=Me(this.primaryColor,{h:-64}),this.fillType5=Me(this.secondaryColor,{h:-64}),this.fillType6=Me(this.primaryColor,{h:128}),this.fillType7=Me(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Me(this.primaryColor,{l:-30}),this.pie5=this.pie5||Me(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Me(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Me(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Me(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Me(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Me(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Me(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Me(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Me(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Me(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Me(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Me(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Me(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Me(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||sa(this.quadrant1Fill)?Lt(this.quadrant1Fill):Ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((_this$radar29=this.radar)===null||_this$radar29===void 0?void 0:_this$radar29.axisColor)||this.lineColor,axisStrokeWidth:((_this$radar30=this.radar)===null||_this$radar30===void 0?void 0:_this$radar30.axisStrokeWidth)||2,axisLabelFontSize:((_this$radar31=this.radar)===null||_this$radar31===void 0?void 0:_this$radar31.axisLabelFontSize)||12,curveOpacity:((_this$radar32=this.radar)===null||_this$radar32===void 0?void 0:_this$radar32.curveOpacity)||.5,curveStrokeWidth:((_this$radar33=this.radar)===null||_this$radar33===void 0?void 0:_this$radar33.curveStrokeWidth)||2,graticuleColor:((_this$radar34=this.radar)===null||_this$radar34===void 0?void 0:_this$radar34.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_this$radar35=this.radar)===null||_this$radar35===void 0?void 0:_this$radar35.graticuleStrokeWidth)||1,graticuleOpacity:((_this$radar36=this.radar)===null||_this$radar36===void 0?void 0:_this$radar36.graticuleOpacity)||.3,legendBoxSize:((_this$radar37=this.radar)===null||_this$radar37===void 0?void 0:_this$radar37.legendBoxSize)||12,legendFontSize:((_this$radar38=this.radar)===null||_this$radar38===void 0?void 0:_this$radar38.legendFontSize)||12},this.xyChart={backgroundColor:((_this$xyChart32=this.xyChart)===null||_this$xyChart32===void 0?void 0:_this$xyChart32.backgroundColor)||this.background,titleColor:((_this$xyChart33=this.xyChart)===null||_this$xyChart33===void 0?void 0:_this$xyChart33.titleColor)||this.primaryTextColor,xAxisTitleColor:((_this$xyChart34=this.xyChart)===null||_this$xyChart34===void 0?void 0:_this$xyChart34.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_this$xyChart35=this.xyChart)===null||_this$xyChart35===void 0?void 0:_this$xyChart35.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_this$xyChart36=this.xyChart)===null||_this$xyChart36===void 0?void 0:_this$xyChart36.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_this$xyChart37=this.xyChart)===null||_this$xyChart37===void 0?void 0:_this$xyChart37.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_this$xyChart38=this.xyChart)===null||_this$xyChart38===void 0?void 0:_this$xyChart38.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_this$xyChart39=this.xyChart)===null||_this$xyChart39===void 0?void 0:_this$xyChart39.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_this$xyChart40=this.xyChart)===null||_this$xyChart40===void 0?void 0:_this$xyChart40.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_this$xyChart41=this.xyChart)===null||_this$xyChart41===void 0?void 0:_this$xyChart41.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_this$xyChart42=this.xyChart)===null||_this$xyChart42===void 0?void 0:_this$xyChart42.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Me(this.primaryColor,{h:-30}),this.git4=this.git4||Me(this.primaryColor,{h:-60}),this.git5=this.git5||Me(this.primaryColor,{h:-90}),this.git6=this.git6||Me(this.primaryColor,{h:60}),this.git7=this.git7||Me(this.primaryColor,{h:120}),this.darkMode?(this.git0=Lt(this.git0,25),this.git1=Lt(this.git1,25),this.git2=Lt(this.git2,25),this.git3=Lt(this.git3,25),this.git4=Lt(this.git4,25),this.git5=Lt(this.git5,25),this.git6=Lt(this.git6,25),this.git7=Lt(this.git7,25)):(this.git0=Ot(this.git0,25),this.git1=Ot(this.git1,25),this.git2=Ot(this.git2,25),this.git3=Ot(this.git3,25),this.git4=Ot(this.git4,25),this.git5=Ot(this.git5,25),this.git6=Ot(this.git6,25),this.git7=Ot(this.git7,25)),this.gitInv0=this.gitInv0||wt(this.git0),this.gitInv1=this.gitInv1||wt(this.git1),this.gitInv2=this.gitInv2||wt(this.git2),this.gitInv3=this.gitInv3||wt(this.git3),this.gitInv4=this.gitInv4||wt(this.git4),this.gitInv5=this.gitInv5||wt(this.git5),this.gitInv6=this.gitInv6||wt(this.git6),this.gitInv7=this.gitInv7||wt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||wt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||wt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lh;}calculate(e){if(typeof e!="object"){this.updateColors();return;}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n];}),this.updateColors(),r.forEach(n=>{this[n]=e[n];});}},o(_Class6,"Theme"),_Class6),dz=o(t=>{let e=new c7();return e.calculate(t),e;},"getThemeVariables");});var u7,mz,gz=N(()=>{"use strict";var _Class7;Xs();u0();Ry();u7=(_Class7=class u7{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Lt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Me(this.primaryColor,{h:-160}),this.primaryBorderColor=Ei(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ei(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ei(this.tertiaryColor,this.darkMode),this.primaryTextColor=wt(this.primaryColor),this.secondaryTextColor=wt(this.secondaryColor),this.tertiaryTextColor=wt(this.tertiaryColor),this.lineColor=wt(this.background),this.textColor=wt(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||Lt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222";}updateColors(){var _this$xyChart43,_this$xyChart44,_this$xyChart45,_this$xyChart46,_this$xyChart47,_this$xyChart48,_this$xyChart49,_this$xyChart50,_this$xyChart51,_this$xyChart52,_this$xyChart53,_this$radar39,_this$radar40,_this$radar41,_this$radar42,_this$radar43,_this$radar44,_this$radar45,_this$radar46,_this$radar47,_this$radar48;this.secondBkg=Lt(this.contrast,55),this.border2=this.contrast,this.actorBorder=Lt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||wt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||Lt(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||Ot(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Me(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Me(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=Lt(this.contrast,30),this.sectionBkgColor2=Lt(this.contrast,30),this.taskBorderColor=Ot(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Lt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Ot(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Me(this.primaryColor,{h:64}),this.fillType3=Me(this.secondaryColor,{h:64}),this.fillType4=Me(this.primaryColor,{h:-64}),this.fillType5=Me(this.secondaryColor,{h:-64}),this.fillType6=Me(this.primaryColor,{h:128}),this.fillType7=Me(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Me(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Me(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Me(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Me(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Me(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Me(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||sa(this.quadrant1Fill)?Lt(this.quadrant1Fill):Ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((_this$xyChart43=this.xyChart)===null||_this$xyChart43===void 0?void 0:_this$xyChart43.backgroundColor)||this.background,titleColor:((_this$xyChart44=this.xyChart)===null||_this$xyChart44===void 0?void 0:_this$xyChart44.titleColor)||this.primaryTextColor,xAxisTitleColor:((_this$xyChart45=this.xyChart)===null||_this$xyChart45===void 0?void 0:_this$xyChart45.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_this$xyChart46=this.xyChart)===null||_this$xyChart46===void 0?void 0:_this$xyChart46.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_this$xyChart47=this.xyChart)===null||_this$xyChart47===void 0?void 0:_this$xyChart47.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_this$xyChart48=this.xyChart)===null||_this$xyChart48===void 0?void 0:_this$xyChart48.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_this$xyChart49=this.xyChart)===null||_this$xyChart49===void 0?void 0:_this$xyChart49.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_this$xyChart50=this.xyChart)===null||_this$xyChart50===void 0?void 0:_this$xyChart50.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_this$xyChart51=this.xyChart)===null||_this$xyChart51===void 0?void 0:_this$xyChart51.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_this$xyChart52=this.xyChart)===null||_this$xyChart52===void 0?void 0:_this$xyChart52.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_this$xyChart53=this.xyChart)===null||_this$xyChart53===void 0?void 0:_this$xyChart53.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((_this$radar39=this.radar)===null||_this$radar39===void 0?void 0:_this$radar39.axisColor)||this.lineColor,axisStrokeWidth:((_this$radar40=this.radar)===null||_this$radar40===void 0?void 0:_this$radar40.axisStrokeWidth)||2,axisLabelFontSize:((_this$radar41=this.radar)===null||_this$radar41===void 0?void 0:_this$radar41.axisLabelFontSize)||12,curveOpacity:((_this$radar42=this.radar)===null||_this$radar42===void 0?void 0:_this$radar42.curveOpacity)||.5,curveStrokeWidth:((_this$radar43=this.radar)===null||_this$radar43===void 0?void 0:_this$radar43.curveStrokeWidth)||2,graticuleColor:((_this$radar44=this.radar)===null||_this$radar44===void 0?void 0:_this$radar44.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_this$radar45=this.radar)===null||_this$radar45===void 0?void 0:_this$radar45.graticuleStrokeWidth)||1,graticuleOpacity:((_this$radar46=this.radar)===null||_this$radar46===void 0?void 0:_this$radar46.graticuleOpacity)||.3,legendBoxSize:((_this$radar47=this.radar)===null||_this$radar47===void 0?void 0:_this$radar47.legendBoxSize)||12,legendFontSize:((_this$radar48=this.radar)===null||_this$radar48===void 0?void 0:_this$radar48.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Ot(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||Me(this.primaryColor,{h:-30}),this.git4=this.pie5||Me(this.primaryColor,{h:-60}),this.git5=this.pie6||Me(this.primaryColor,{h:-90}),this.git6=this.pie7||Me(this.primaryColor,{h:60}),this.git7=this.pie8||Me(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||wt(this.git0),this.gitInv1=this.gitInv1||wt(this.git1),this.gitInv2=this.gitInv2||wt(this.git2),this.gitInv3=this.gitInv3||wt(this.git3),this.gitInv4=this.gitInv4||wt(this.git4),this.gitInv5=this.gitInv5||wt(this.git5),this.gitInv6=this.gitInv6||wt(this.git6),this.gitInv7=this.gitInv7||wt(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lh;}calculate(e){if(typeof e!="object"){this.updateColors();return;}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n];}),this.updateColors(),r.forEach(n=>{this[n]=e[n];});}},o(_Class7,"Theme"),_Class7),mz=o(t=>{let e=new u7();return e.calculate(t),e;},"getThemeVariables");});var wo,Q4=N(()=>{"use strict";uz();fz();Ny();pz();gz();wo={base:{getThemeVariables:cz},dark:{getThemeVariables:hz},default:{getThemeVariables:ch},forest:{getThemeVariables:dz},neutral:{getThemeVariables:mz}};});var ll,yz=N(()=>{"use strict";ll={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1};});var vz,xz,bz,lr,Ca=N(()=>{"use strict";Q4();yz();vz={...ll,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:wo.default.getThemeVariables(),sequence:{...ll.sequence,messageFont:o(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight};},"messageFont"),noteFont:o(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight};},"noteFont"),actorFont:o(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight};},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...ll.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ll.c4,useWidth:void 0,personFont:o(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight};},"personFont"),flowchart:{...ll.flowchart,inheritDir:!1},external_personFont:o(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight};},"external_personFont"),systemFont:o(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight};},"systemFont"),external_systemFont:o(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight};},"external_systemFont"),system_dbFont:o(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight};},"system_dbFont"),external_system_dbFont:o(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight};},"external_system_dbFont"),system_queueFont:o(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight};},"system_queueFont"),external_system_queueFont:o(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight};},"external_system_queueFont"),containerFont:o(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight};},"containerFont"),external_containerFont:o(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight};},"external_containerFont"),container_dbFont:o(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight};},"container_dbFont"),external_container_dbFont:o(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight};},"external_container_dbFont"),container_queueFont:o(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight};},"container_queueFont"),external_container_queueFont:o(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight};},"external_container_queueFont"),componentFont:o(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight};},"componentFont"),external_componentFont:o(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight};},"external_componentFont"),component_dbFont:o(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight};},"component_dbFont"),external_component_dbFont:o(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight};},"external_component_dbFont"),component_queueFont:o(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight};},"component_queueFont"),external_component_queueFont:o(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight};},"external_component_queueFont"),boundaryFont:o(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight};},"boundaryFont"),messageFont:o(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight};},"messageFont")},pie:{...ll.pie,useWidth:984},xyChart:{...ll.xyChart,useWidth:void 0},requirement:{...ll.requirement,useWidth:void 0},packet:{...ll.packet},radar:{...ll.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},xz=o((t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...xz(t[n],"")]:[...r,e+n],[]),"keyify"),bz=new Set(xz(vz,"")),lr=vz;});var h0,Hbe,h7=N(()=>{"use strict";Ca();yt();h0=o(t=>{if(X.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>h0(e));return;}for(let e of Object.keys(t)){if(X.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!bz.has(e)||t[e]==null){X.debug("sanitize deleting key: ",e),delete t[e];continue;}if(typeof t[e]=="object"){X.debug("sanitizing object",e),h0(t[e]);continue;}let r=["themeCSS","fontFamily","altFontFamily"];for(let n of r)e.includes(n)&&(X.debug("sanitizing css option",e),t[e]=Hbe(t[e]));}if(t.themeVariables)for(let e of Object.keys(t.themeVariables)){let r=t.themeVariables[e];(r===null||r===void 0?void 0:r.match)&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="");}X.debug("After sanitization",t);}},"sanitizeDirective"),Hbe=o(t=>{let e=0,r=0;for(let n of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?e++:n==="}"&&r++;}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t;},"sanitizeCss");});var uh,bs,wz,f0,My,Z4,f7,kz,Ez,d7,J4,Qt,Sz,Cz,Iy,Wbe,Tz,qbe,Az,Jn=N(()=>{"use strict";c0();yt();Q4();Ca();h7();uh=Object.freeze(lr),bs=Gn({},uh),f0=[],My=Gn({},uh),Z4=o((t,e)=>{let r=Gn({},t),n={};for(let i of e)Sz(i),n=Gn(n,i);if(r=Gn(r,n),n.theme&&n.theme in wo){let i=Gn({},wz),a=Gn(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in wo&&(r.themeVariables=wo[r.theme].getThemeVariables(a));}return My=r,Az(My),My;},"updateCurrentConfig"),f7=o(t=>(bs=Gn({},uh),bs=Gn(bs,t),t.theme&&wo[t.theme]&&(bs.themeVariables=wo[t.theme].getThemeVariables(t.themeVariables)),Z4(bs,f0),bs),"setSiteConfig"),kz=o(t=>{wz=Gn({},t);},"saveConfigFromInitialize"),Ez=o(t=>(bs=Gn(bs,t),Z4(bs,f0),bs),"updateSiteConfig"),d7=o(()=>Gn({},bs),"getSiteConfig"),J4=o(t=>(Az(t),Gn(My,t),Qt()),"setConfig"),Qt=o(()=>Gn({},My),"getConfig"),Sz=o(t=>{var _bs$secure;t&&(["secure",...((_bs$secure=bs.secure)!==null&&_bs$secure!==void 0?_bs$secure:[])].forEach(e=>{Object.hasOwn(t,e)&&(X.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e]);}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e];}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&Sz(t[e]);}));},"sanitize"),Cz=o(t=>{var _t$themeVariables;h0(t),t.fontFamily&&!((_t$themeVariables=t.themeVariables)!==null&&_t$themeVariables!==void 0&&_t$themeVariables.fontFamily)&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),f0.push(t),Z4(bs,f0);},"addDirective"),Iy=o((t=bs)=>{f0=[],Z4(t,f0);},"reset"),Wbe={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Tz={},qbe=o(t=>{Tz[t]||(X.warn(Wbe[t]),Tz[t]=!0);},"issueWarning"),Az=o(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&qbe("LAZY_LOAD_DEPRECATED");},"checkConfig");});function Ka(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return x7(t,e,n);};}function e4e(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return b7(t,r);};}function Ar(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r3;_z&&_z(t,null);let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){let a=r(i);a!==i&&(Ybe(e)||(e[n]=a),i=a);}t[i]=!0;}return t;}function t4e(t){for(let e=0;e<t.length;e++)cl(t,e)||(t[e]=null);return t;}function Qf(t){let e=Fz(null);for(let[r,n]of Bz(t))cl(t,r)&&(Array.isArray(n)?e[r]=t4e(n):n&&typeof n=="object"&&n.constructor===Object?e[r]=Qf(n):e[r]=n);return e;}function Fy(t,e){for(;t!==null;){let n=jbe(t,e);if(n){if(n.get)return Ka(n.get);if(typeof n.value=="function")return Ka(n.value);}t=Xbe(t);}function r(){return null;}return o(r,"fallbackValue"),r;}function Gz(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f4e(),e=o(Dt=>Gz(Dt),"DOMPurify");if(e.version="3.2.5",e.removed=[],!t||!t.document||t.document.nodeType!==$y.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t,n=r,i=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:u,NodeFilter:h,NamedNodeMap:f=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:m}=t,g=u.prototype,y=Fy(g,"cloneNode"),v=Fy(g,"remove"),x=Fy(g,"nextSibling"),b=Fy(g,"childNodes"),T=Fy(g,"parentNode");if(typeof s=="function"){let Dt=r.createElement("template");Dt.content&&Dt.content.ownerDocument&&(r=Dt.content.ownerDocument);}let C,w="",{implementation:E,createNodeIterator:_,createDocumentFragment:A,getElementsByTagName:D}=r,{importNode:O}=n,R=Pz();e.isSupported=typeof Bz=="function"&&typeof T=="function"&&E&&E.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:k,ERB_EXPR:L,TMPLIT_EXPR:S,DATA_ATTR:I,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:P,ATTR_WHITESPACE:B,CUSTOM_ELEMENT:F}=Oz,{IS_ALLOWED_URI:z}=Oz,$=null,U=Ar({},[...Rz,...m7,...g7,...y7,...Nz]),K=null,ee=Ar({},[...Mz,...v7,...Iz,...t3]),Y=Object.seal(Fz(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}})),ce=null,Z=null,ue=!0,Q=!0,j=!1,ne=!0,te=!1,he=!0,le=!1,J=!1,Se=!1,se=!1,ae=!1,Oe=!1,ye=!0,Be=!1,He="user-content-",ze=!0,Le=!1,Ie={},xe=null,q=Ar({},["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"]),de=null,ie=Ar({},["audio","video","img","source","image","track"]),oe=null,V=Ar({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Te="http://www.w3.org/1998/Math/MathML",W="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",ve=pe,Pe=!1,_e=null,be=Ar({},[Te,W,pe],p7),Ve=Ar({},["mi","mo","mn","ms","mtext"]),De=Ar({},["annotation-xml"]),Ye=Ar({},["title","style","font","a","script"]),at=null,Rt=["application/xhtml+xml","text/html"],st="text/html",Ue=null,ut=null,We=r.createElement("form"),lt=o(function(Ce){return Ce instanceof RegExp||Ce instanceof Function;},"isRegexOrFunction"),Xt=o(function(){let Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ut&&ut===Ce)){if((!Ce||typeof Ce!="object")&&(Ce={}),Ce=Qf(Ce),at=Rt.indexOf(Ce.PARSER_MEDIA_TYPE)===-1?st:Ce.PARSER_MEDIA_TYPE,Ue=at==="application/xhtml+xml"?p7:r3,$=cl(Ce,"ALLOWED_TAGS")?Ar({},Ce.ALLOWED_TAGS,Ue):U,K=cl(Ce,"ALLOWED_ATTR")?Ar({},Ce.ALLOWED_ATTR,Ue):ee,_e=cl(Ce,"ALLOWED_NAMESPACES")?Ar({},Ce.ALLOWED_NAMESPACES,p7):be,oe=cl(Ce,"ADD_URI_SAFE_ATTR")?Ar(Qf(V),Ce.ADD_URI_SAFE_ATTR,Ue):V,de=cl(Ce,"ADD_DATA_URI_TAGS")?Ar(Qf(ie),Ce.ADD_DATA_URI_TAGS,Ue):ie,xe=cl(Ce,"FORBID_CONTENTS")?Ar({},Ce.FORBID_CONTENTS,Ue):q,ce=cl(Ce,"FORBID_TAGS")?Ar({},Ce.FORBID_TAGS,Ue):{},Z=cl(Ce,"FORBID_ATTR")?Ar({},Ce.FORBID_ATTR,Ue):{},Ie=cl(Ce,"USE_PROFILES")?Ce.USE_PROFILES:!1,ue=Ce.ALLOW_ARIA_ATTR!==!1,Q=Ce.ALLOW_DATA_ATTR!==!1,j=Ce.ALLOW_UNKNOWN_PROTOCOLS||!1,ne=Ce.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=Ce.SAFE_FOR_TEMPLATES||!1,he=Ce.SAFE_FOR_XML!==!1,le=Ce.WHOLE_DOCUMENT||!1,se=Ce.RETURN_DOM||!1,ae=Ce.RETURN_DOM_FRAGMENT||!1,Oe=Ce.RETURN_TRUSTED_TYPE||!1,Se=Ce.FORCE_BODY||!1,ye=Ce.SANITIZE_DOM!==!1,Be=Ce.SANITIZE_NAMED_PROPS||!1,ze=Ce.KEEP_CONTENT!==!1,Le=Ce.IN_PLACE||!1,z=Ce.ALLOWED_URI_REGEXP||$z,ve=Ce.NAMESPACE||pe,Ve=Ce.MATHML_TEXT_INTEGRATION_POINTS||Ve,De=Ce.HTML_INTEGRATION_POINTS||De,Y=Ce.CUSTOM_ELEMENT_HANDLING||{},Ce.CUSTOM_ELEMENT_HANDLING&&lt(Ce.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Y.tagNameCheck=Ce.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ce.CUSTOM_ELEMENT_HANDLING&&lt(Ce.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Y.attributeNameCheck=Ce.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ce.CUSTOM_ELEMENT_HANDLING&&typeof Ce.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Y.allowCustomizedBuiltInElements=Ce.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(Q=!1),ae&&(se=!0),Ie&&($=Ar({},Nz),K=[],Ie.html===!0&&(Ar($,Rz),Ar(K,Mz)),Ie.svg===!0&&(Ar($,m7),Ar(K,v7),Ar(K,t3)),Ie.svgFilters===!0&&(Ar($,g7),Ar(K,v7),Ar(K,t3)),Ie.mathMl===!0&&(Ar($,y7),Ar(K,Iz),Ar(K,t3))),Ce.ADD_TAGS&&($===U&&($=Qf($)),Ar($,Ce.ADD_TAGS,Ue)),Ce.ADD_ATTR&&(K===ee&&(K=Qf(K)),Ar(K,Ce.ADD_ATTR,Ue)),Ce.ADD_URI_SAFE_ATTR&&Ar(oe,Ce.ADD_URI_SAFE_ATTR,Ue),Ce.FORBID_CONTENTS&&(xe===q&&(xe=Qf(xe)),Ar(xe,Ce.FORBID_CONTENTS,Ue)),ze&&($["#text"]=!0),le&&Ar($,["html","head","body"]),$.table&&(Ar($,["tbody"]),delete ce.tbody),Ce.TRUSTED_TYPES_POLICY){if(typeof Ce.TRUSTED_TYPES_POLICY.createHTML!="function")throw By('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ce.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw By('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=Ce.TRUSTED_TYPES_POLICY,w=C.createHTML("");}else C===void 0&&(C=d4e(m,i)),C!==null&&typeof w=="string"&&(w=C.createHTML(""));ja&&ja(Ce),ut=Ce;}},"_parseConfig"),Tt=Ar({},[...m7,...g7,...r4e]),Mt=Ar({},[...y7,...n4e]),bt=o(function(Ce){let tt=T(Ce);(!tt||!tt.tagName)&&(tt={namespaceURI:ve,tagName:"template"});let Ct=r3(Ce.tagName),yr=r3(tt.tagName);return _e[Ce.namespaceURI]?Ce.namespaceURI===W?tt.namespaceURI===pe?Ct==="svg":tt.namespaceURI===Te?Ct==="svg"&&(yr==="annotation-xml"||Ve[yr]):!!Tt[Ct]:Ce.namespaceURI===Te?tt.namespaceURI===pe?Ct==="math":tt.namespaceURI===W?Ct==="math"&&De[yr]:!!Mt[Ct]:Ce.namespaceURI===pe?tt.namespaceURI===W&&!De[yr]||tt.namespaceURI===Te&&!Ve[yr]?!1:!Mt[Ct]&&(Ye[Ct]||!Tt[Ct]):!!(at==="application/xhtml+xml"&&_e[Ce.namespaceURI]):!1;},"_checkValidNamespace"),ht=o(function(Ce){Oy(e.removed,{element:Ce});try{T(Ce).removeChild(Ce);}catch{v(Ce);}},"_forceRemove"),St=o(function(Ce,tt){try{Oy(e.removed,{attribute:tt.getAttributeNode(Ce),from:tt});}catch{Oy(e.removed,{attribute:null,from:tt});}if(tt.removeAttribute(Ce),Ce==="is")if(se||ae)try{ht(tt);}catch{}else try{tt.setAttribute(Ce,"");}catch{}},"_removeAttribute"),ft=o(function(Ce){let tt=null,Ct=null;if(Se)Ce="<remove></remove>"+Ce;else{let gn=Lz(Ce,/^[\r\n\t ]+/);Ct=gn&&gn[0];}at==="application/xhtml+xml"&&ve===pe&&(Ce='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Ce+"</body></html>");let yr=C?C.createHTML(Ce):Ce;if(ve===pe)try{tt=new p().parseFromString(yr,at);}catch{}if(!tt||!tt.documentElement){tt=E.createDocument(ve,"template",null);try{tt.documentElement.innerHTML=Pe?w:yr;}catch{}}let tn=tt.body||tt.documentElement;return Ce&&Ct&&tn.insertBefore(r.createTextNode(Ct),tn.childNodes[0]||null),ve===pe?D.call(tt,le?"html":"body")[0]:le?tt.documentElement:tn;},"_initDocument"),vt=o(function(Ce){return _.call(Ce.ownerDocument||Ce,Ce,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null);},"_createNodeIterator"),nt=o(function(Ce){return Ce instanceof d&&(typeof Ce.nodeName!="string"||typeof Ce.textContent!="string"||typeof Ce.removeChild!="function"||!(Ce.attributes instanceof f)||typeof Ce.removeAttribute!="function"||typeof Ce.setAttribute!="function"||typeof Ce.namespaceURI!="string"||typeof Ce.insertBefore!="function"||typeof Ce.hasChildNodes!="function");},"_isClobbered"),dn=o(function(Ce){return typeof l=="function"&&Ce instanceof l;},"_isNode");function kt(Dt,Ce,tt){e3(Dt,Ct=>{Ct.call(e,Ce,tt,ut);});}o(kt,"_executeHooks");let In=o(function(Ce){let tt=null;if(kt(R.beforeSanitizeElements,Ce,null),nt(Ce))return ht(Ce),!0;let Ct=Ue(Ce.nodeName);if(kt(R.uponSanitizeElement,Ce,{tagName:Ct,allowedTags:$}),Ce.hasChildNodes()&&!dn(Ce.firstElementChild)&&Xa(/<[/\w!]/g,Ce.innerHTML)&&Xa(/<[/\w!]/g,Ce.textContent)||Ce.nodeType===$y.progressingInstruction||he&&Ce.nodeType===$y.comment&&Xa(/<[/\w]/g,Ce.data))return ht(Ce),!0;if(!$[Ct]||ce[Ct]){if(!ce[Ct]&&Nr(Ct)&&(Y.tagNameCheck instanceof RegExp&&Xa(Y.tagNameCheck,Ct)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(Ct)))return!1;if(ze&&!xe[Ct]){let yr=T(Ce)||Ce.parentNode,tn=b(Ce)||Ce.childNodes;if(tn&&yr){let gn=tn.length;for(let Qr=gn-1;Qr>=0;--Qr){let Mi=y(tn[Qr],!0);Mi.__removalCount=(Ce.__removalCount||0)+1,yr.insertBefore(Mi,x(Ce));}}}return ht(Ce),!0;}return Ce instanceof u&&!bt(Ce)||(Ct==="noscript"||Ct==="noembed"||Ct==="noframes")&&Xa(/<\/no(script|embed|frames)/i,Ce.innerHTML)?(ht(Ce),!0):(te&&Ce.nodeType===$y.text&&(tt=Ce.textContent,e3([k,L,S],yr=>{tt=Py(tt,yr," ");}),Ce.textContent!==tt&&(Oy(e.removed,{element:Ce.cloneNode()}),Ce.textContent=tt)),kt(R.afterSanitizeElements,Ce,null),!1);},"_sanitizeElements"),en=o(function(Ce,tt,Ct){if(ye&&(tt==="id"||tt==="name")&&(Ct in r||Ct in We))return!1;if(!(Q&&!Z[tt]&&Xa(I,tt))){if(!(ue&&Xa(M,tt))){if(!K[tt]||Z[tt]){if(!(Nr(Ce)&&(Y.tagNameCheck instanceof RegExp&&Xa(Y.tagNameCheck,Ce)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(Ce))&&(Y.attributeNameCheck instanceof RegExp&&Xa(Y.attributeNameCheck,tt)||Y.attributeNameCheck instanceof Function&&Y.attributeNameCheck(tt))||tt==="is"&&Y.allowCustomizedBuiltInElements&&(Y.tagNameCheck instanceof RegExp&&Xa(Y.tagNameCheck,Ct)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(Ct))))return!1;}else if(!oe[tt]){if(!Xa(z,Py(Ct,B,""))){if(!((tt==="src"||tt==="xlink:href"||tt==="href")&&Ce!=="script"&&Zbe(Ct,"data:")===0&&de[Ce])){if(!(j&&!Xa(P,Py(Ct,B,"")))){if(Ct)return!1;}}}}}}return!0;},"_isValidAttribute"),Nr=o(function(Ce){return Ce!=="annotation-xml"&&Lz(Ce,F);},"_isBasicCustomElement"),Mr=o(function(Ce){kt(R.beforeSanitizeAttributes,Ce,null);let{attributes:tt}=Ce;if(!tt||nt(Ce))return;let Ct={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K,forceKeepAttr:void 0},yr=tt.length;for(;yr--;){let tn=tt[yr],{name:gn,namespaceURI:Qr,value:Mi}=tn,Zn=Ue(gn),En=gn==="value"?Mi:Jbe(Mi);if(Ct.attrName=Zn,Ct.attrValue=En,Ct.keepAttr=!0,Ct.forceKeepAttr=void 0,kt(R.uponSanitizeAttribute,Ce,Ct),En=Ct.attrValue,Be&&(Zn==="id"||Zn==="name")&&(St(gn,Ce),En=He+En),he&&Xa(/((--!?|])>)|<\/(style|title)/i,En)){St(gn,Ce);continue;}if(Ct.forceKeepAttr||(St(gn,Ce),!Ct.keepAttr))continue;if(!ne&&Xa(/\/>/i,En)){St(gn,Ce);continue;}te&&e3([k,L,S],et=>{En=Py(En,et," ");});let Ur=Ue(Ce.nodeName);if(en(Ur,Zn,En)){if(C&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!Qr)switch(m.getAttributeType(Ur,Zn)){case"TrustedHTML":{En=C.createHTML(En);break;}case"TrustedScriptURL":{En=C.createScriptURL(En);break;}}try{Qr?Ce.setAttributeNS(Qr,gn,En):Ce.setAttribute(gn,En),nt(Ce)?ht(Ce):Dz(e.removed);}catch{}}}kt(R.afterSanitizeAttributes,Ce,null);},"_sanitizeAttributes"),On=o(function Dt(Ce){let tt=null,Ct=vt(Ce);for(kt(R.beforeSanitizeShadowDOM,Ce,null);tt=Ct.nextNode();)kt(R.uponSanitizeShadowNode,tt,null),In(tt),Mr(tt),tt.content instanceof a&&Dt(tt.content);kt(R.afterSanitizeShadowDOM,Ce,null);},"_sanitizeShadowDOM");return e.sanitize=function(Dt){let Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tt=null,Ct=null,yr=null,tn=null;if(Pe=!Dt,Pe&&(Dt="<!-->"),typeof Dt!="string"&&!dn(Dt))if(typeof Dt.toString=="function"){if(Dt=Dt.toString(),typeof Dt!="string")throw By("dirty is not a string, aborting");}else throw By("toString is not a function");if(!e.isSupported)return Dt;if(J||Xt(Ce),e.removed=[],typeof Dt=="string"&&(Le=!1),Le){if(Dt.nodeName){let Mi=Ue(Dt.nodeName);if(!$[Mi]||ce[Mi])throw By("root node is forbidden and cannot be sanitized in-place");}}else if(Dt instanceof l)tt=ft("<!---->"),Ct=tt.ownerDocument.importNode(Dt,!0),Ct.nodeType===$y.element&&Ct.nodeName==="BODY"||Ct.nodeName==="HTML"?tt=Ct:tt.appendChild(Ct);else{if(!se&&!te&&!le&&Dt.indexOf("<")===-1)return C&&Oe?C.createHTML(Dt):Dt;if(tt=ft(Dt),!tt)return se?null:Oe?w:"";}tt&&Se&&ht(tt.firstChild);let gn=vt(Le?Dt:tt);for(;yr=gn.nextNode();)In(yr),Mr(yr),yr.content instanceof a&&On(yr.content);if(Le)return Dt;if(se){if(ae)for(tn=A.call(tt.ownerDocument);tt.firstChild;)tn.appendChild(tt.firstChild);else tn=tt;return(K.shadowroot||K.shadowrootmode)&&(tn=O.call(n,tn,!0)),tn;}let Qr=le?tt.outerHTML:tt.innerHTML;return le&&$["!doctype"]&&tt.ownerDocument&&tt.ownerDocument.doctype&&tt.ownerDocument.doctype.name&&Xa(zz,tt.ownerDocument.doctype.name)&&(Qr="<!DOCTYPE "+tt.ownerDocument.doctype.name+`>
`+Qr),te&&e3([k,L,S],Mi=>{Qr=Py(Qr,Mi," ");}),C&&Oe?C.createHTML(Qr):Qr;},e.setConfig=function(){let Dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Xt(Dt),J=!0;},e.clearConfig=function(){ut=null,J=!1;},e.isValidAttribute=function(Dt,Ce,tt){ut||Xt({});let Ct=Ue(Dt),yr=Ue(Ce);return en(Ct,yr,tt);},e.addHook=function(Dt,Ce){typeof Ce=="function"&&Oy(R[Dt],Ce);},e.removeHook=function(Dt,Ce){if(Ce!==void 0){let tt=Kbe(R[Dt],Ce);return tt===-1?void 0:Qbe(R[Dt],tt,1)[0];}return Dz(R[Dt]);},e.removeHooks=function(Dt){R[Dt]=[];},e.removeAllHooks=function(){R=Pz();},e;}var Bz,_z,Ybe,Xbe,jbe,ja,ko,Fz,x7,b7,e3,Kbe,Dz,Oy,Qbe,r3,p7,Lz,Py,Zbe,Jbe,cl,Xa,By,Rz,m7,g7,r4e,y7,n4e,Nz,Mz,v7,Iz,t3,i4e,a4e,s4e,o4e,l4e,$z,c4e,u4e,zz,h4e,Oz,$y,f4e,d4e,Pz,hh,T7=N(()=>{"use strict";({entries:Bz,setPrototypeOf:_z,isFrozen:Ybe,getPrototypeOf:Xbe,getOwnPropertyDescriptor:jbe}=Object),{freeze:ja,seal:ko,create:Fz}=Object,{apply:x7,construct:b7}=typeof Reflect<"u"&&Reflect;ja||(ja=o(function(e){return e;},"freeze"));ko||(ko=o(function(e){return e;},"seal"));x7||(x7=o(function(e,r,n){return e.apply(r,n);},"apply"));b7||(b7=o(function(e,r){return new e(...r);},"construct"));e3=Ka(Array.prototype.forEach),Kbe=Ka(Array.prototype.lastIndexOf),Dz=Ka(Array.prototype.pop),Oy=Ka(Array.prototype.push),Qbe=Ka(Array.prototype.splice),r3=Ka(String.prototype.toLowerCase),p7=Ka(String.prototype.toString),Lz=Ka(String.prototype.match),Py=Ka(String.prototype.replace),Zbe=Ka(String.prototype.indexOf),Jbe=Ka(String.prototype.trim),cl=Ka(Object.prototype.hasOwnProperty),Xa=Ka(RegExp.prototype.test),By=e4e(TypeError);o(Ka,"unapply");o(e4e,"unconstruct");o(Ar,"addToSet");o(t4e,"cleanArray");o(Qf,"clone");o(Fy,"lookupGetter");Rz=ja(["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"]),m7=ja(["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"]),g7=ja(["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"]),r4e=ja(["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"]),y7=ja(["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"]),n4e=ja(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Nz=ja(["#text"]),Mz=ja(["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"]),v7=ja(["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"]),Iz=ja(["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"]),t3=ja(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),i4e=ko(/\{\{[\w\W]*|[\w\W]*\}\}/gm),a4e=ko(/<%[\w\W]*|[\w\W]*%>/gm),s4e=ko(/\$\{[\w\W]*/gm),o4e=ko(/^data-[\-\w.\u00B7-\uFFFF]+$/),l4e=ko(/^aria-[\-\w]+$/),$z=ko(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),c4e=ko(/^(?:\w+script|data):/i),u4e=ko(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zz=ko(/^html$/i),h4e=ko(/^[a-z][.\w]*(-[.\w]+)+$/i),Oz=Object.freeze({__proto__:null,ARIA_ATTR:l4e,ATTR_WHITESPACE:u4e,CUSTOM_ELEMENT:h4e,DATA_ATTR:o4e,DOCTYPE_NAME:zz,ERB_EXPR:a4e,IS_ALLOWED_URI:$z,IS_SCRIPT_OR_DATA:c4e,MUSTACHE_EXPR:i4e,TMPLIT_EXPR:s4e}),$y={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},f4e=o(function(){return typeof window>"u"?null:window;},"getGlobal"),d4e=o(function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));let a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(s){return s;},createScriptURL(s){return s;}});}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null;}},"_createTrustedTypesPolicy"),Pz=o(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};},"_createHooksMap");o(Gz,"createDOMPurify");hh=Gz();});var xV={};hr(xV,{ParseError:()=>mt,SETTINGS_SCHEMA:()=>Uy,__defineFunction:()=>Nt,__defineMacro:()=>fe,__defineSymbol:()=>G,__domTree:()=>vV,__parse:()=>pV,__renderToDomTree:()=>D3,__renderToHTMLTree:()=>gV,__setFontMetrics:()=>TG,default:()=>i5e,render:()=>uA,renderToString:()=>dV,version:()=>yV});function b4e(t){return String(t).replace(x4e,e=>v4e[e]);}function E4e(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};}}function R4e(t){for(var e=0;e<O7.length;e++)for(var r=O7[e],n=0;n<r.blocks.length;n++){var i=r.blocks[n];if(t>=i[0]&&t<=i[1])return r.name;}return null;}function bG(t){for(var e=0;e<p3.length;e+=2)if(t>=p3[e]&&t<=p3[e+1])return!0;return!1;}function TG(t,e){Kl[t]=e;}function X7(t,e,r){if(!Kl[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=Kl[e][n];if(!i&&t[0]in Uz&&(n=Uz[t[0]].charCodeAt(0),i=Kl[e][n]),!i&&r==="text"&&bG(n)&&(i=Kl[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]};}function V4e(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!w7[e]){var r=w7[e]={cssEmPerMu:n3.quad[e]/18};for(var n in n3)n3.hasOwnProperty(n)&&(r[n]=n3[n][e]);}return w7[e];}function qz(t){if(t instanceof ws)return t;throw new Error("Expected symbolNode but got "+String(t)+".");}function Y4e(t){if(t instanceof ed)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".");}function G(t,e,r,n,i,a){Cn[t][i]={font:e,group:r,replace:n},a&&n&&(Cn[t][n]=Cn[t][i]);}function Nt(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,l={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},u=0;u<r.length;++u)RG[r[u]]=l;e&&(a&&(v3[e]=a),s&&(x3[e]=s));}function td(t){var{type:e,htmlBuilder:r,mathmlBuilder:n}=t;Nt({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.");},htmlBuilder:r,mathmlBuilder:n});}function u3(t,e){var r=cu(["base"],t,e),n=cu(["strut"]);return n.style.height=Et(r.height+r.depth),r.depth&&(n.style.verticalAlign=Et(-r.depth)),r.children.unshift(n),r;}function z7(t,e){var r=null;t.length===1&&t[0].type==="tag"&&(r=t[0].tag,t=t[0].body);var n=Bi(t,e,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var a=[],s=[],l=0;l<n.length;l++)if(s.push(n[l]),n[l].hasClass("mbin")||n[l].hasClass("mrel")||n[l].hasClass("allowbreak")){for(var u=!1;l<n.length-1&&n[l+1].hasClass("mspace")&&!n[l+1].hasClass("newline");)l++,s.push(n[l]),n[l].hasClass("nobreak")&&(u=!0);u||(a.push(u3(s,e)),s=[]);}else n[l].hasClass("newline")&&(s.pop(),s.length>0&&(a.push(u3(s,e)),s=[]),a.push(n[l]));s.length>0&&a.push(u3(s,e));var h;r?(h=u3(Bi(r,e,!0)),h.classes=["tag"],a.push(h)):i&&a.push(i);var f=cu(["katex-html"],a);if(f.setAttribute("aria-hidden","true"),h){var d=h.children[0];d.style.height=Et(f.height+f.depth),f.depth&&(d.style.verticalAlign=Et(-f.depth));}return f;}function MG(t){return new Jf(t);}function S7(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof So&&e.text===".";}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var r=t.children[0];return r instanceof So&&r.text===",";}else return!1;}function Qz(t,e,r,n,i){var a=ks(t,r),s;a.length===1&&a[0]instanceof Qa&&er.contains(["mrow","mtable"],a[0].type)?s=a[0]:s=new dt.MathNode("mrow",a);var l=new dt.MathNode("annotation",[new dt.TextNode(e)]);l.setAttribute("encoding","application/x-tex");var u=new dt.MathNode("semantics",[s,l]),h=new dt.MathNode("math",[u]);h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&h.setAttribute("display","block");var f=i?"katex":"katex-mathml";return Fe.makeSpan([f],[h]);}function xr(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t;}function Z7(t){var e=S3(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e;}function S3(t){return t&&(t.type==="atom"||j4e.hasOwnProperty(t.type))?t:null;}function BG(t,e){var r=Bi(t.body,e,!0);return S3e([t.mclass],r,e);}function FG(t,e){var r,n=ks(t.body,e);return t.mclass==="minner"?r=new dt.MathNode("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new dt.MathNode("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new dt.MathNode("mo",n),t.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):t.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):t.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r;}function _3e(t,e,r){var n=C3e[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[e[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},s=r.callFunction("\\Big",[a],[]),l=r.callFunction("\\\\cdright",[e[1]],[]),u={type:"ordgroup",mode:"math",body:[i,s,l]};return r.callFunction("\\\\cdparent",[u],[]);}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var h={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[h],[]);}default:return{type:"textord",text:" ",mode:"math"};}}function D3e(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if(r==="&"||r==="\\\\")t.consume();else if(r==="\\end"){e[e.length-1].length===0&&e.pop();break;}else throw new mt("Expected \\\\ or \\cr or \\end",t.nextToken);}for(var n=[],i=[n],a=0;a<e.length;a++){for(var s=e[a],l=Zz(),u=0;u<s.length;u++)if(!Jz(s[u]))l.body.push(s[u]);else{n.push(l),u+=1;var h=Z7(s[u]).text,f=new Array(2);if(f[0]={type:"ordgroup",mode:"math",body:[]},f[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(h)>-1))if("<>AV".indexOf(h)>-1)for(var d=0;d<2;d++){for(var p=!0,m=u+1;m<s.length;m++){if(A3e(s[m],h)){p=!1,u=m;break;}if(Jz(s[m]))throw new mt("Missing a "+h+" character to complete a CD arrow.",s[m]);f[d].body.push(s[m]);}if(p)throw new mt("Missing a "+h+" character to complete a CD arrow.",s[u]);}else throw new mt('Expected one of "<>AV=|." after @',s[u]);var g=_3e(h,f,t),y={type:"styling",body:[g],mode:"math",style:"display"};n.push(y),l=Zz();}a%2===0?n.push(l):n.shift(),n=[],i.push(n);}t.gullet.endGroup(),t.gullet.endGroup();var v=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])};}function A3(t,e){var r=S3(t);if(r&&er.contains(V3e,r.text))return r;throw r?new mt("Invalid delimiter '"+r.text+"' after '"+e.funcName+"'",t):new mt("Invalid delimiter type '"+t.type+"'",t);}function tG(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.");}function Zl(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,l={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},u=0;u<r.length;++u)QG[r[u]]=l;a&&(v3[e]=a),s&&(x3[e]=s);}function fe(t,e){ZG[t]=e;}function rG(t){var e=[];t.consumeSpaces();var r=t.fetch().text;for(r==="\\relax"&&(t.consume(),t.consumeSpaces(),r=t.fetch().text);r==="\\hline"||r==="\\hdashline";)t.consume(),e.push(r==="\\hdashline"),t.consumeSpaces(),r=t.fetch().text;return e;}function nA(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1;}function gh(t,e,r){var{hskipBeforeAndAfter:n,addJot:i,cols:a,arraystretch:s,colSeparationType:l,autoTag:u,singleRow:h,emptySingleRow:f,maxNumCols:d,leqno:p}=e;if(t.gullet.beginGroup(),h||t.gullet.macros.set("\\cr","\\\\\\relax"),!s){var m=t.gullet.expandMacroAsText("\\arraystretch");if(m==null)s=1;else if(s=parseFloat(m),!s||s<0)throw new mt("Invalid \\arraystretch: "+m);}t.gullet.beginGroup();var g=[],y=[g],v=[],x=[],b=u!=null?[]:void 0;function T(){u&&t.gullet.macros.set("\\@eqnsw","1",!0);}o(T,"beginRow");function C(){b&&(t.gullet.macros.get("\\df@tag")?(b.push(t.subparse([new Co("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):b.push(!!u&&t.gullet.macros.get("\\@eqnsw")==="1"));}for(o(C,"endRow"),T(),x.push(rG(t));;){var w=t.parseExpression(!1,h?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),w={type:"ordgroup",mode:t.mode,body:w},r&&(w={type:"styling",mode:t.mode,style:r,body:[w]}),g.push(w);var E=t.fetch().text;if(E==="&"){if(d&&g.length===d){if(h||l)throw new mt("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.");}t.consume();}else if(E==="\\end"){C(),g.length===1&&w.type==="styling"&&w.body[0].body.length===0&&(y.length>1||!f)&&y.pop(),x.length<y.length+1&&x.push([]);break;}else if(E==="\\\\"){t.consume();var _=void 0;t.gullet.future().text!==" "&&(_=t.parseSizeGroup(!0)),v.push(_?_.value:null),C(),x.push(rG(t)),g=[],y.push(g),T();}else throw new mt("Expected & or \\\\ or \\cr or \\end",t.nextToken);}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:i,arraystretch:s,body:y,cols:a,rowGaps:v,hskipBeforeAndAfter:n,hLinesBeforeRow:x,colSeparationType:l,tags:b,leqno:p};}function iA(t){return t.slice(0,1)==="d"?"display":"text";}function oV(t,e,r){for(var n=Bi(t,e,!1),i=e.sizeMultiplier/r.sizeMultiplier,a=0;a<n.length;a++){var s=n[a].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[a].classes,e.sizingClasses(r)):n[a].classes[s+1]==="reset-size"+e.size&&(n[a].classes[s+1]="reset-size"+r.size),n[a].height*=i,n[a].depth*=i;}return Fe.makeFragment(n);}var js,Co,mt,p4e,m4e,g4e,y4e,v4e,x4e,xG,T4e,w4e,k4e,er,Uy,Wy,Xl,Y7,m3,m0,ou,qy,Eo,g0,Za,jl,S4e,C4e,A4e,_4e,D4e,L4e,rr,O7,p3,p0,N4e,M4e,I4e,O4e,P4e,B4e,F4e,$4e,z4e,Vz,G4e,Jf,Kl,n3,Uz,w7,U4e,Hz,Wz,g3,P7,H4e,wG,ri,Et,ph,kG,EG,W4e,SG,ed,Yy,B7,q4e,ws,hl,Ql,Xy,X4e,j4e,Cn,H,it,re,ke,Vn,It,Ja,y0,tr,Si,Ks,k3,Ee,hu,Re,CG,Yz,k7,i3,Xz,E7,a3,y3,zy,s3,cr,ei,Aa,au,fh,F7,Gy,o3,l3,jz,K4e,E3,ul,Q4e,Z4e,J4e,e3e,t3e,j7,Ts,AG,r3e,n3e,_G,i3e,a3e,s3e,o3e,c3,DG,LG,l3e,Fe,ti,Zf,su,c3e,u3e,RG,v3,x3,b3,mi,cu,h3e,f3e,d3e,p3e,Bi,Kz,NG,m3e,$7,jy,Fr,Qa,So,G7,dt,Ao,K7,Q7,ks,mh,yn,IG,OG,g3e,y3e,v3e,x3e,b3e,T3e,w3e,k3e,uu,J7,PG,E3e,h3,S3e,C3,C3e,Zz,Jz,A3e,$G,zG,V7,GG,L3e,VG,Vy,eA,UG,R3e,N3e,HG,C7,A7,U7,f3,M3e,I3e,WG,_7,D7,L7,O3e,qG,P3e,YG,Hy,B3e,F3e,$3e,XG,z3e,jG,KG,G3e,lu,eG,V3e,tA,rA,QG,ZG,_3,Jl,U3e,ec,JG,nG,eV,tV,iG,rV,aA,sA,aG,sG,nV,H3e,R7,oG,iV,aV,v0,Ky,W3e,q3e,sV,Y3e,lG,X3e,cG,j3e,lV,N7,M7,uG,hG,fG,K3e,dG,pG,dh,cV,Q3e,Z3e,J3e,e5e,H7,t5e,r5e,T3,W7,n5e,mG,oA,gG,lA,uV,hV,fV,q7,yG,d3,I7,vG,w3,cA,uA,dV,pV,mV,D3,gV,yV,vV,i5e,bV=N(()=>{"use strict";var _t2,_t3,_t4,_Class8,_Class9,_Class0,_t5,_Class1,_Class10,_Class11,_Class12,_Class13,_Class14,_Class15,_Class16,_Class17,_Class18,_Class19,_Class20,_Class21,_t6;js=(_t2=class t{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n;}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new t(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc;}},o(_t2,"SourceLocation"),_t2),Co=(_t3=class t{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r;}range(e,r){return new t(r,js.range(this,e));}},o(_t3,"Token"),_t3),mt=(_t4=class t{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,i,a,s=r&&r.loc;if(s&&s.start<=s.end){var l=s.lexer.input;i=s.start,a=s.end,i===l.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var u=l.slice(i,a).replace(/[^]/g,"$&\u0332"),h;i>15?h="\u2026"+l.slice(i-15,i):h=l.slice(0,i);var f;a+15<l.length?f=l.slice(a,a+15)+"\u2026":f=l.slice(a),n+=h+u+f;}var d=new Error(n);return d.name="ParseError",d.__proto__=t.prototype,d.position=i,i!=null&&a!=null&&(d.length=a-i),d.rawMessage=e,d;}},o(_t4,"ParseError"),_t4);mt.prototype.__proto__=Error.prototype;p4e=o(function(e,r){return e.indexOf(r)!==-1;},"contains"),m4e=o(function(e,r){return e===void 0?r:e;},"deflt"),g4e=/([A-Z])/g,y4e=o(function(e){return e.replace(g4e,"-$1").toLowerCase();},"hyphenate"),v4e={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},x4e=/[&><"']/g;o(b4e,"escape");xG=o(function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e;},"getBaseElem"),T4e=o(function(e){var r=xG(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom";},"isCharacterBox"),w4e=o(function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e;},"assert"),k4e=o(function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative";},"protocolFromUrl"),er={contains:p4e,deflt:m4e,escape:b4e,hyphenate:y4e,getBaseElem:xG,isCharacterBox:T4e,protocolFromUrl:k4e},Uy={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:o(t=>"#"+t,"cliProcessor")},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:o((t,e)=>(e.push(t),e),"cliProcessor")},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:o(t=>Math.max(0,t),"processor"),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:o(t=>Math.max(0,t),"processor"),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:o(t=>Math.max(0,t),"processor"),cli:"-e, --max-expand <n>",cliProcessor:o(t=>t==="Infinity"?1/0:parseInt(t),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}};o(E4e,"getDefaultValue");Wy=(_Class8=class Wy{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r in Uy)if(Uy.hasOwnProperty(r)){var n=Uy[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:E4e(n);}}reportNonstrict(e,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(e,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new mt("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]"));}}useStrictBehavior(e,r,n){var i=this.strict;if(typeof i=="function")try{i=i(e,r,n);}catch{i="error";}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]")),!1);}isTrusted(e){if(e.url&&!e.protocol){var r=er.protocolFromUrl(e.url);if(r==null)return!1;e.protocol=r;}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n;}},o(_Class8,"Settings"),_Class8),Xl=(_Class9=class Xl{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n;}sup(){return jl[S4e[this.id]];}sub(){return jl[C4e[this.id]];}fracNum(){return jl[A4e[this.id]];}fracDen(){return jl[_4e[this.id]];}cramp(){return jl[D4e[this.id]];}text(){return jl[L4e[this.id]];}isTight(){return this.size>=2;}},o(_Class9,"Style"),_Class9),Y7=0,m3=1,m0=2,ou=3,qy=4,Eo=5,g0=6,Za=7,jl=[new Xl(Y7,0,!1),new Xl(m3,0,!0),new Xl(m0,1,!1),new Xl(ou,1,!0),new Xl(qy,2,!1),new Xl(Eo,2,!0),new Xl(g0,3,!1),new Xl(Za,3,!0)],S4e=[qy,Eo,qy,Eo,g0,Za,g0,Za],C4e=[Eo,Eo,Eo,Eo,Za,Za,Za,Za],A4e=[m0,ou,qy,Eo,g0,Za,g0,Za],_4e=[ou,ou,Eo,Eo,Za,Za,Za,Za],D4e=[m3,m3,ou,ou,Eo,Eo,Za,Za],L4e=[Y7,m3,m0,ou,m0,ou,m0,ou],rr={DISPLAY:jl[Y7],TEXT:jl[m0],SCRIPT:jl[qy],SCRIPTSCRIPT:jl[g0]},O7=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];o(R4e,"scriptFromCodepoint");p3=[];O7.forEach(t=>t.blocks.forEach(e=>p3.push(...e)));o(bG,"supportedCodepoint");p0=80,N4e=o(function(e,r){return"M95,"+(622+e+r)+`
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+e/2.075+" -"+e+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+e)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z";},"sqrtMain"),M4e=o(function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+e/2.084+" -"+e+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+e)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z";},"sqrtSize1"),I4e=o(function(e,r){return"M983 "+(10+e+r)+`
l`+e/3.13+" -"+e+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z";},"sqrtSize2"),O4e=o(function(e,r){return"M424,"+(2398+e+r)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+e)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+r+`
h400000v`+(40+e)+"h-400000z";},"sqrtSize3"),P4e=o(function(e,r){return"M473,"+(2713+e+r)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z";},"sqrtSize4"),B4e=o(function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z";},"phasePath"),F4e=o(function(e,r,n){var i=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+`
H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z";},"sqrtTall"),$4e=o(function(e,r,n){r=1e3*r;var i="";switch(e){case"sqrtMain":i=N4e(r,p0);break;case"sqrtSize1":i=M4e(r,p0);break;case"sqrtSize2":i=I4e(r,p0);break;case"sqrtSize3":i=O4e(r,p0);break;case"sqrtSize4":i=P4e(r,p0);break;case"sqrtTall":i=F4e(r,p0,n);}return i;},"sqrtPath"),z4e=o(function(e,r){switch(e){case"\u239C":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"\u2223":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"\u2225":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"\u239F":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"\u23A2":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"\u23A5":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"\u23AA":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"\u23D0":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"\u2016":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return"";}},"innerPath"),Vz={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
 435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},G4e=o(function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z
M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z
M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z
M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+`
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.");}},"tallDelim"),Jf=(_Class0=class Jf{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={};}hasClass(e){return er.contains(this.classes,e);}toNode(){for(var e=document.createDocumentFragment(),r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e;}toMarkup(){for(var e="",r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e;}toText(){var e=o(r=>r.toText(),"toText");return this.children.map(e).join("");}},o(_Class0,"DocumentFragment"),_Class0),Kl={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},n3={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Uz={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};o(TG,"setFontMetrics");o(X7,"getCharacterMetrics");w7={};o(V4e,"getGlobalMetrics");U4e=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Hz=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Wz=o(function(e,r){return r.size<2?e:U4e[e-1][r.size-1];},"sizeAtStyle"),g3=(_t5=class t{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||t.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Hz[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0;}extend(e){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return new t(r);}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Wz(this.textSize,e)});}havingCrampedStyle(){return this.havingStyle(this.style.cramp());}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Hz[e-1]});}havingBaseStyle(e){e=e||this.style.text();var r=Wz(t.BASESIZE,e);return this.size===r&&this.textSize===t.BASESIZE&&this.style===e?this:this.extend({style:e,size:r});}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6;}return this.extend({style:this.style.text(),size:e});}withColor(e){return this.extend({color:e});}withPhantom(){return this.extend({phantom:!0});}withFont(e){return this.extend({font:e});}withTextFontFamily(e){return this.extend({fontFamily:e,font:""});}withTextFontWeight(e){return this.extend({fontWeight:e,font:""});}withTextFontShape(e){return this.extend({fontShape:e,font:""});}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[];}baseSizingClasses(){return this.size!==t.BASESIZE?["sizing","reset-size"+this.size,"size"+t.BASESIZE]:[];}fontMetrics(){return this._fontMetrics||(this._fontMetrics=V4e(this.size)),this._fontMetrics;}getColor(){return this.phantom?"transparent":this.color;}},o(_t5,"Options"),_t5);g3.BASESIZE=6;P7={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},H4e={ex:!0,em:!0,mu:!0},wG=o(function(e){return typeof e!="string"&&(e=e.unit),e in P7||e in H4e||e==="ex";},"validUnit"),ri=o(function(e,r){var n;if(e.unit in P7)n=P7[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,e.unit==="ex")n=i.fontMetrics().xHeight;else if(e.unit==="em")n=i.fontMetrics().quad;else throw new mt("Invalid unit: '"+e.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier);}return Math.min(e.number*n,r.maxSize);},"calculateSize"),Et=o(function(e){return+e.toFixed(4)+"em";},"makeEm"),ph=o(function(e){return e.filter(r=>r).join(" ");},"createClass"),kG=o(function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i);}},"initNode"),EG=o(function(e){var r=document.createElement(e);r.className=ph(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&r.setAttribute(i,this.attributes[i]);for(var a=0;a<this.children.length;a++)r.appendChild(this.children[a].toNode());return r;},"toNode"),W4e=/[\s"'>/=\x00-\x1f]/,SG=o(function(e){var r="<"+e;this.classes.length&&(r+=' class="'+er.escape(ph(this.classes))+'"');var n="";for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=er.hyphenate(i)+":"+this.style[i]+";");n&&(r+=' style="'+er.escape(n)+'"');for(var a in this.attributes)if(this.attributes.hasOwnProperty(a)){if(W4e.test(a))throw new mt("Invalid attribute name '"+a+"'");r+=" "+a+'="'+er.escape(this.attributes[a])+'"';}r+=">";for(var s=0;s<this.children.length;s++)r+=this.children[s].toMarkup();return r+="</"+e+">",r;},"toMarkup"),ed=(_Class1=class ed{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,kG.call(this,e,n,i),this.children=r||[];}setAttribute(e,r){this.attributes[e]=r;}hasClass(e){return er.contains(this.classes,e);}toNode(){return EG.call(this,"span");}toMarkup(){return SG.call(this,"span");}},o(_Class1,"Span"),_Class1),Yy=(_Class10=class Yy{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,kG.call(this,r,i),this.children=n||[],this.setAttribute("href",e);}setAttribute(e,r){this.attributes[e]=r;}hasClass(e){return er.contains(this.classes,e);}toNode(){return EG.call(this,"a");}toMarkup(){return SG.call(this,"a");}},o(_Class10,"Anchor"),_Class10),B7=(_Class11=class B7{constructor(e,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=e,this.classes=["mord"],this.style=n;}hasClass(e){return er.contains(this.classes,e);}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(e.style[r]=this.style[r]);return e;}toMarkup(){var e='<img src="'+er.escape(this.src)+'"'+(' alt="'+er.escape(this.alt)+'"'),r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=er.hyphenate(n)+":"+this.style[n]+";");return r&&(e+=' style="'+er.escape(r)+'"'),e+="'/>",e;}},o(_Class11,"Img"),_Class11),q4e={î:"\u0131\u0302",ï:"\u0131\u0308",í:"\u0131\u0301",ì:"\u0131\u0300"},ws=(_Class12=class ws{constructor(e,r,n,i,a,s,l,u){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=r||0,this.depth=n||0,this.italic=i||0,this.skew=a||0,this.width=s||0,this.classes=l||[],this.style=u||{},this.maxFontSize=0;var h=R4e(this.text.charCodeAt(0));h&&this.classes.push(h+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=q4e[this.text]);}hasClass(e){return er.contains(this.classes,e);}toNode(){var e=document.createTextNode(this.text),r=null;this.italic>0&&(r=document.createElement("span"),r.style.marginRight=Et(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=ph(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(e),r):e;}toMarkup(){var e=!1,r="<span";this.classes.length&&(e=!0,r+=' class="',r+=er.escape(ph(this.classes)),r+='"');var n="";this.italic>0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=er.hyphenate(i)+":"+this.style[i]+";");n&&(e=!0,r+=' style="'+er.escape(n)+'"');var a=er.escape(this.text);return e?(r+=">",r+=a,r+="</span>",r):a;}},o(_Class12,"SymbolNode"),_Class12),hl=(_Class13=class hl{constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{};}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var i=0;i<this.children.length;i++)r.appendChild(this.children[i].toNode());return r;}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+'="'+er.escape(this.attributes[r])+'"');e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e;}},o(_Class13,"SvgNode"),_Class13),Ql=(_Class14=class Ql{constructor(e,r){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=r;}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"path");return this.alternate?r.setAttribute("d",this.alternate):r.setAttribute("d",Vz[this.pathName]),r;}toMarkup(){return this.alternate?'<path d="'+er.escape(this.alternate)+'"/>':'<path d="'+er.escape(Vz[this.pathName])+'"/>';}},o(_Class14,"PathNode"),_Class14),Xy=(_Class15=class Xy{constructor(e){this.attributes=void 0,this.attributes=e||{};}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r;}toMarkup(){var e="<line";for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+'="'+er.escape(this.attributes[r])+'"');return e+="/>",e;}},o(_Class15,"LineNode"),_Class15);o(qz,"assertSymbolDomNode");o(Y4e,"assertSpan");X4e={bin:1,close:1,inner:1,open:1,punct:1,rel:1},j4e={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Cn={math:{},text:{}};o(G,"defineSymbol");H="math",it="text",re="main",ke="ams",Vn="accent-token",It="bin",Ja="close",y0="inner",tr="mathord",Si="op-token",Ks="open",k3="punct",Ee="rel",hu="spacing",Re="textord";G(H,re,Ee,"\u2261","\\equiv",!0);G(H,re,Ee,"\u227A","\\prec",!0);G(H,re,Ee,"\u227B","\\succ",!0);G(H,re,Ee,"\u223C","\\sim",!0);G(H,re,Ee,"\u22A5","\\perp");G(H,re,Ee,"\u2AAF","\\preceq",!0);G(H,re,Ee,"\u2AB0","\\succeq",!0);G(H,re,Ee,"\u2243","\\simeq",!0);G(H,re,Ee,"\u2223","\\mid",!0);G(H,re,Ee,"\u226A","\\ll",!0);G(H,re,Ee,"\u226B","\\gg",!0);G(H,re,Ee,"\u224D","\\asymp",!0);G(H,re,Ee,"\u2225","\\parallel");G(H,re,Ee,"\u22C8","\\bowtie",!0);G(H,re,Ee,"\u2323","\\smile",!0);G(H,re,Ee,"\u2291","\\sqsubseteq",!0);G(H,re,Ee,"\u2292","\\sqsupseteq",!0);G(H,re,Ee,"\u2250","\\doteq",!0);G(H,re,Ee,"\u2322","\\frown",!0);G(H,re,Ee,"\u220B","\\ni",!0);G(H,re,Ee,"\u221D","\\propto",!0);G(H,re,Ee,"\u22A2","\\vdash",!0);G(H,re,Ee,"\u22A3","\\dashv",!0);G(H,re,Ee,"\u220B","\\owns");G(H,re,k3,".","\\ldotp");G(H,re,k3,"\u22C5","\\cdotp");G(H,re,Re,"#","\\#");G(it,re,Re,"#","\\#");G(H,re,Re,"&","\\&");G(it,re,Re,"&","\\&");G(H,re,Re,"\u2135","\\aleph",!0);G(H,re,Re,"\u2200","\\forall",!0);G(H,re,Re,"\u210F","\\hbar",!0);G(H,re,Re,"\u2203","\\exists",!0);G(H,re,Re,"\u2207","\\nabla",!0);G(H,re,Re,"\u266D","\\flat",!0);G(H,re,Re,"\u2113","\\ell",!0);G(H,re,Re,"\u266E","\\natural",!0);G(H,re,Re,"\u2663","\\clubsuit",!0);G(H,re,Re,"\u2118","\\wp",!0);G(H,re,Re,"\u266F","\\sharp",!0);G(H,re,Re,"\u2662","\\diamondsuit",!0);G(H,re,Re,"\u211C","\\Re",!0);G(H,re,Re,"\u2661","\\heartsuit",!0);G(H,re,Re,"\u2111","\\Im",!0);G(H,re,Re,"\u2660","\\spadesuit",!0);G(H,re,Re,"\xA7","\\S",!0);G(it,re,Re,"\xA7","\\S");G(H,re,Re,"\xB6","\\P",!0);G(it,re,Re,"\xB6","\\P");G(H,re,Re,"\u2020","\\dag");G(it,re,Re,"\u2020","\\dag");G(it,re,Re,"\u2020","\\textdagger");G(H,re,Re,"\u2021","\\ddag");G(it,re,Re,"\u2021","\\ddag");G(it,re,Re,"\u2021","\\textdaggerdbl");G(H,re,Ja,"\u23B1","\\rmoustache",!0);G(H,re,Ks,"\u23B0","\\lmoustache",!0);G(H,re,Ja,"\u27EF","\\rgroup",!0);G(H,re,Ks,"\u27EE","\\lgroup",!0);G(H,re,It,"\u2213","\\mp",!0);G(H,re,It,"\u2296","\\ominus",!0);G(H,re,It,"\u228E","\\uplus",!0);G(H,re,It,"\u2293","\\sqcap",!0);G(H,re,It,"\u2217","\\ast");G(H,re,It,"\u2294","\\sqcup",!0);G(H,re,It,"\u25EF","\\bigcirc",!0);G(H,re,It,"\u2219","\\bullet",!0);G(H,re,It,"\u2021","\\ddagger");G(H,re,It,"\u2240","\\wr",!0);G(H,re,It,"\u2A3F","\\amalg");G(H,re,It,"&","\\And");G(H,re,Ee,"\u27F5","\\longleftarrow",!0);G(H,re,Ee,"\u21D0","\\Leftarrow",!0);G(H,re,Ee,"\u27F8","\\Longleftarrow",!0);G(H,re,Ee,"\u27F6","\\longrightarrow",!0);G(H,re,Ee,"\u21D2","\\Rightarrow",!0);G(H,re,Ee,"\u27F9","\\Longrightarrow",!0);G(H,re,Ee,"\u2194","\\leftrightarrow",!0);G(H,re,Ee,"\u27F7","\\longleftrightarrow",!0);G(H,re,Ee,"\u21D4","\\Leftrightarrow",!0);G(H,re,Ee,"\u27FA","\\Longleftrightarrow",!0);G(H,re,Ee,"\u21A6","\\mapsto",!0);G(H,re,Ee,"\u27FC","\\longmapsto",!0);G(H,re,Ee,"\u2197","\\nearrow",!0);G(H,re,Ee,"\u21A9","\\hookleftarrow",!0);G(H,re,Ee,"\u21AA","\\hookrightarrow",!0);G(H,re,Ee,"\u2198","\\searrow",!0);G(H,re,Ee,"\u21BC","\\leftharpoonup",!0);G(H,re,Ee,"\u21C0","\\rightharpoonup",!0);G(H,re,Ee,"\u2199","\\swarrow",!0);G(H,re,Ee,"\u21BD","\\leftharpoondown",!0);G(H,re,Ee,"\u21C1","\\rightharpoondown",!0);G(H,re,Ee,"\u2196","\\nwarrow",!0);G(H,re,Ee,"\u21CC","\\rightleftharpoons",!0);G(H,ke,Ee,"\u226E","\\nless",!0);G(H,ke,Ee,"\uE010","\\@nleqslant");G(H,ke,Ee,"\uE011","\\@nleqq");G(H,ke,Ee,"\u2A87","\\lneq",!0);G(H,ke,Ee,"\u2268","\\lneqq",!0);G(H,ke,Ee,"\uE00C","\\@lvertneqq");G(H,ke,Ee,"\u22E6","\\lnsim",!0);G(H,ke,Ee,"\u2A89","\\lnapprox",!0);G(H,ke,Ee,"\u2280","\\nprec",!0);G(H,ke,Ee,"\u22E0","\\npreceq",!0);G(H,ke,Ee,"\u22E8","\\precnsim",!0);G(H,ke,Ee,"\u2AB9","\\precnapprox",!0);G(H,ke,Ee,"\u2241","\\nsim",!0);G(H,ke,Ee,"\uE006","\\@nshortmid");G(H,ke,Ee,"\u2224","\\nmid",!0);G(H,ke,Ee,"\u22AC","\\nvdash",!0);G(H,ke,Ee,"\u22AD","\\nvDash",!0);G(H,ke,Ee,"\u22EA","\\ntriangleleft");G(H,ke,Ee,"\u22EC","\\ntrianglelefteq",!0);G(H,ke,Ee,"\u228A","\\subsetneq",!0);G(H,ke,Ee,"\uE01A","\\@varsubsetneq");G(H,ke,Ee,"\u2ACB","\\subsetneqq",!0);G(H,ke,Ee,"\uE017","\\@varsubsetneqq");G(H,ke,Ee,"\u226F","\\ngtr",!0);G(H,ke,Ee,"\uE00F","\\@ngeqslant");G(H,ke,Ee,"\uE00E","\\@ngeqq");G(H,ke,Ee,"\u2A88","\\gneq",!0);G(H,ke,Ee,"\u2269","\\gneqq",!0);G(H,ke,Ee,"\uE00D","\\@gvertneqq");G(H,ke,Ee,"\u22E7","\\gnsim",!0);G(H,ke,Ee,"\u2A8A","\\gnapprox",!0);G(H,ke,Ee,"\u2281","\\nsucc",!0);G(H,ke,Ee,"\u22E1","\\nsucceq",!0);G(H,ke,Ee,"\u22E9","\\succnsim",!0);G(H,ke,Ee,"\u2ABA","\\succnapprox",!0);G(H,ke,Ee,"\u2246","\\ncong",!0);G(H,ke,Ee,"\uE007","\\@nshortparallel");G(H,ke,Ee,"\u2226","\\nparallel",!0);G(H,ke,Ee,"\u22AF","\\nVDash",!0);G(H,ke,Ee,"\u22EB","\\ntriangleright");G(H,ke,Ee,"\u22ED","\\ntrianglerighteq",!0);G(H,ke,Ee,"\uE018","\\@nsupseteqq");G(H,ke,Ee,"\u228B","\\supsetneq",!0);G(H,ke,Ee,"\uE01B","\\@varsupsetneq");G(H,ke,Ee,"\u2ACC","\\supsetneqq",!0);G(H,ke,Ee,"\uE019","\\@varsupsetneqq");G(H,ke,Ee,"\u22AE","\\nVdash",!0);G(H,ke,Ee,"\u2AB5","\\precneqq",!0);G(H,ke,Ee,"\u2AB6","\\succneqq",!0);G(H,ke,Ee,"\uE016","\\@nsubseteqq");G(H,ke,It,"\u22B4","\\unlhd");G(H,ke,It,"\u22B5","\\unrhd");G(H,ke,Ee,"\u219A","\\nleftarrow",!0);G(H,ke,Ee,"\u219B","\\nrightarrow",!0);G(H,ke,Ee,"\u21CD","\\nLeftarrow",!0);G(H,ke,Ee,"\u21CF","\\nRightarrow",!0);G(H,ke,Ee,"\u21AE","\\nleftrightarrow",!0);G(H,ke,Ee,"\u21CE","\\nLeftrightarrow",!0);G(H,ke,Ee,"\u25B3","\\vartriangle");G(H,ke,Re,"\u210F","\\hslash");G(H,ke,Re,"\u25BD","\\triangledown");G(H,ke,Re,"\u25CA","\\lozenge");G(H,ke,Re,"\u24C8","\\circledS");G(H,ke,Re,"\xAE","\\circledR");G(it,ke,Re,"\xAE","\\circledR");G(H,ke,Re,"\u2221","\\measuredangle",!0);G(H,ke,Re,"\u2204","\\nexists");G(H,ke,Re,"\u2127","\\mho");G(H,ke,Re,"\u2132","\\Finv",!0);G(H,ke,Re,"\u2141","\\Game",!0);G(H,ke,Re,"\u2035","\\backprime");G(H,ke,Re,"\u25B2","\\blacktriangle");G(H,ke,Re,"\u25BC","\\blacktriangledown");G(H,ke,Re,"\u25A0","\\blacksquare");G(H,ke,Re,"\u29EB","\\blacklozenge");G(H,ke,Re,"\u2605","\\bigstar");G(H,ke,Re,"\u2222","\\sphericalangle",!0);G(H,ke,Re,"\u2201","\\complement",!0);G(H,ke,Re,"\xF0","\\eth",!0);G(it,re,Re,"\xF0","\xF0");G(H,ke,Re,"\u2571","\\diagup");G(H,ke,Re,"\u2572","\\diagdown");G(H,ke,Re,"\u25A1","\\square");G(H,ke,Re,"\u25A1","\\Box");G(H,ke,Re,"\u25CA","\\Diamond");G(H,ke,Re,"\xA5","\\yen",!0);G(it,ke,Re,"\xA5","\\yen",!0);G(H,ke,Re,"\u2713","\\checkmark",!0);G(it,ke,Re,"\u2713","\\checkmark");G(H,ke,Re,"\u2136","\\beth",!0);G(H,ke,Re,"\u2138","\\daleth",!0);G(H,ke,Re,"\u2137","\\gimel",!0);G(H,ke,Re,"\u03DD","\\digamma",!0);G(H,ke,Re,"\u03F0","\\varkappa");G(H,ke,Ks,"\u250C","\\@ulcorner",!0);G(H,ke,Ja,"\u2510","\\@urcorner",!0);G(H,ke,Ks,"\u2514","\\@llcorner",!0);G(H,ke,Ja,"\u2518","\\@lrcorner",!0);G(H,ke,Ee,"\u2266","\\leqq",!0);G(H,ke,Ee,"\u2A7D","\\leqslant",!0);G(H,ke,Ee,"\u2A95","\\eqslantless",!0);G(H,ke,Ee,"\u2272","\\lesssim",!0);G(H,ke,Ee,"\u2A85","\\lessapprox",!0);G(H,ke,Ee,"\u224A","\\approxeq",!0);G(H,ke,It,"\u22D6","\\lessdot");G(H,ke,Ee,"\u22D8","\\lll",!0);G(H,ke,Ee,"\u2276","\\lessgtr",!0);G(H,ke,Ee,"\u22DA","\\lesseqgtr",!0);G(H,ke,Ee,"\u2A8B","\\lesseqqgtr",!0);G(H,ke,Ee,"\u2251","\\doteqdot");G(H,ke,Ee,"\u2253","\\risingdotseq",!0);G(H,ke,Ee,"\u2252","\\fallingdotseq",!0);G(H,ke,Ee,"\u223D","\\backsim",!0);G(H,ke,Ee,"\u22CD","\\backsimeq",!0);G(H,ke,Ee,"\u2AC5","\\subseteqq",!0);G(H,ke,Ee,"\u22D0","\\Subset",!0);G(H,ke,Ee,"\u228F","\\sqsubset",!0);G(H,ke,Ee,"\u227C","\\preccurlyeq",!0);G(H,ke,Ee,"\u22DE","\\curlyeqprec",!0);G(H,ke,Ee,"\u227E","\\precsim",!0);G(H,ke,Ee,"\u2AB7","\\precapprox",!0);G(H,ke,Ee,"\u22B2","\\vartriangleleft");G(H,ke,Ee,"\u22B4","\\trianglelefteq");G(H,ke,Ee,"\u22A8","\\vDash",!0);G(H,ke,Ee,"\u22AA","\\Vvdash",!0);G(H,ke,Ee,"\u2323","\\smallsmile");G(H,ke,Ee,"\u2322","\\smallfrown");G(H,ke,Ee,"\u224F","\\bumpeq",!0);G(H,ke,Ee,"\u224E","\\Bumpeq",!0);G(H,ke,Ee,"\u2267","\\geqq",!0);G(H,ke,Ee,"\u2A7E","\\geqslant",!0);G(H,ke,Ee,"\u2A96","\\eqslantgtr",!0);G(H,ke,Ee,"\u2273","\\gtrsim",!0);G(H,ke,Ee,"\u2A86","\\gtrapprox",!0);G(H,ke,It,"\u22D7","\\gtrdot");G(H,ke,Ee,"\u22D9","\\ggg",!0);G(H,ke,Ee,"\u2277","\\gtrless",!0);G(H,ke,Ee,"\u22DB","\\gtreqless",!0);G(H,ke,Ee,"\u2A8C","\\gtreqqless",!0);G(H,ke,Ee,"\u2256","\\eqcirc",!0);G(H,ke,Ee,"\u2257","\\circeq",!0);G(H,ke,Ee,"\u225C","\\triangleq",!0);G(H,ke,Ee,"\u223C","\\thicksim");G(H,ke,Ee,"\u2248","\\thickapprox");G(H,ke,Ee,"\u2AC6","\\supseteqq",!0);G(H,ke,Ee,"\u22D1","\\Supset",!0);G(H,ke,Ee,"\u2290","\\sqsupset",!0);G(H,ke,Ee,"\u227D","\\succcurlyeq",!0);G(H,ke,Ee,"\u22DF","\\curlyeqsucc",!0);G(H,ke,Ee,"\u227F","\\succsim",!0);G(H,ke,Ee,"\u2AB8","\\succapprox",!0);G(H,ke,Ee,"\u22B3","\\vartriangleright");G(H,ke,Ee,"\u22B5","\\trianglerighteq");G(H,ke,Ee,"\u22A9","\\Vdash",!0);G(H,ke,Ee,"\u2223","\\shortmid");G(H,ke,Ee,"\u2225","\\shortparallel");G(H,ke,Ee,"\u226C","\\between",!0);G(H,ke,Ee,"\u22D4","\\pitchfork",!0);G(H,ke,Ee,"\u221D","\\varpropto");G(H,ke,Ee,"\u25C0","\\blacktriangleleft");G(H,ke,Ee,"\u2234","\\therefore",!0);G(H,ke,Ee,"\u220D","\\backepsilon");G(H,ke,Ee,"\u25B6","\\blacktriangleright");G(H,ke,Ee,"\u2235","\\because",!0);G(H,ke,Ee,"\u22D8","\\llless");G(H,ke,Ee,"\u22D9","\\gggtr");G(H,ke,It,"\u22B2","\\lhd");G(H,ke,It,"\u22B3","\\rhd");G(H,ke,Ee,"\u2242","\\eqsim",!0);G(H,re,Ee,"\u22C8","\\Join");G(H,ke,Ee,"\u2251","\\Doteq",!0);G(H,ke,It,"\u2214","\\dotplus",!0);G(H,ke,It,"\u2216","\\smallsetminus");G(H,ke,It,"\u22D2","\\Cap",!0);G(H,ke,It,"\u22D3","\\Cup",!0);G(H,ke,It,"\u2A5E","\\doublebarwedge",!0);G(H,ke,It,"\u229F","\\boxminus",!0);G(H,ke,It,"\u229E","\\boxplus",!0);G(H,ke,It,"\u22C7","\\divideontimes",!0);G(H,ke,It,"\u22C9","\\ltimes",!0);G(H,ke,It,"\u22CA","\\rtimes",!0);G(H,ke,It,"\u22CB","\\leftthreetimes",!0);G(H,ke,It,"\u22CC","\\rightthreetimes",!0);G(H,ke,It,"\u22CF","\\curlywedge",!0);G(H,ke,It,"\u22CE","\\curlyvee",!0);G(H,ke,It,"\u229D","\\circleddash",!0);G(H,ke,It,"\u229B","\\circledast",!0);G(H,ke,It,"\u22C5","\\centerdot");G(H,ke,It,"\u22BA","\\intercal",!0);G(H,ke,It,"\u22D2","\\doublecap");G(H,ke,It,"\u22D3","\\doublecup");G(H,ke,It,"\u22A0","\\boxtimes",!0);G(H,ke,Ee,"\u21E2","\\dashrightarrow",!0);G(H,ke,Ee,"\u21E0","\\dashleftarrow",!0);G(H,ke,Ee,"\u21C7","\\leftleftarrows",!0);G(H,ke,Ee,"\u21C6","\\leftrightarrows",!0);G(H,ke,Ee,"\u21DA","\\Lleftarrow",!0);G(H,ke,Ee,"\u219E","\\twoheadleftarrow",!0);G(H,ke,Ee,"\u21A2","\\leftarrowtail",!0);G(H,ke,Ee,"\u21AB","\\looparrowleft",!0);G(H,ke,Ee,"\u21CB","\\leftrightharpoons",!0);G(H,ke,Ee,"\u21B6","\\curvearrowleft",!0);G(H,ke,Ee,"\u21BA","\\circlearrowleft",!0);G(H,ke,Ee,"\u21B0","\\Lsh",!0);G(H,ke,Ee,"\u21C8","\\upuparrows",!0);G(H,ke,Ee,"\u21BF","\\upharpoonleft",!0);G(H,ke,Ee,"\u21C3","\\downharpoonleft",!0);G(H,re,Ee,"\u22B6","\\origof",!0);G(H,re,Ee,"\u22B7","\\imageof",!0);G(H,ke,Ee,"\u22B8","\\multimap",!0);G(H,ke,Ee,"\u21AD","\\leftrightsquigarrow",!0);G(H,ke,Ee,"\u21C9","\\rightrightarrows",!0);G(H,ke,Ee,"\u21C4","\\rightleftarrows",!0);G(H,ke,Ee,"\u21A0","\\twoheadrightarrow",!0);G(H,ke,Ee,"\u21A3","\\rightarrowtail",!0);G(H,ke,Ee,"\u21AC","\\looparrowright",!0);G(H,ke,Ee,"\u21B7","\\curvearrowright",!0);G(H,ke,Ee,"\u21BB","\\circlearrowright",!0);G(H,ke,Ee,"\u21B1","\\Rsh",!0);G(H,ke,Ee,"\u21CA","\\downdownarrows",!0);G(H,ke,Ee,"\u21BE","\\upharpoonright",!0);G(H,ke,Ee,"\u21C2","\\downharpoonright",!0);G(H,ke,Ee,"\u21DD","\\rightsquigarrow",!0);G(H,ke,Ee,"\u21DD","\\leadsto");G(H,ke,Ee,"\u21DB","\\Rrightarrow",!0);G(H,ke,Ee,"\u21BE","\\restriction");G(H,re,Re,"\u2018","`");G(H,re,Re,"$","\\$");G(it,re,Re,"$","\\$");G(it,re,Re,"$","\\textdollar");G(H,re,Re,"%","\\%");G(it,re,Re,"%","\\%");G(H,re,Re,"_","\\_");G(it,re,Re,"_","\\_");G(it,re,Re,"_","\\textunderscore");G(H,re,Re,"\u2220","\\angle",!0);G(H,re,Re,"\u221E","\\infty",!0);G(H,re,Re,"\u2032","\\prime");G(H,re,Re,"\u25B3","\\triangle");G(H,re,Re,"\u0393","\\Gamma",!0);G(H,re,Re,"\u0394","\\Delta",!0);G(H,re,Re,"\u0398","\\Theta",!0);G(H,re,Re,"\u039B","\\Lambda",!0);G(H,re,Re,"\u039E","\\Xi",!0);G(H,re,Re,"\u03A0","\\Pi",!0);G(H,re,Re,"\u03A3","\\Sigma",!0);G(H,re,Re,"\u03A5","\\Upsilon",!0);G(H,re,Re,"\u03A6","\\Phi",!0);G(H,re,Re,"\u03A8","\\Psi",!0);G(H,re,Re,"\u03A9","\\Omega",!0);G(H,re,Re,"A","\u0391");G(H,re,Re,"B","\u0392");G(H,re,Re,"E","\u0395");G(H,re,Re,"Z","\u0396");G(H,re,Re,"H","\u0397");G(H,re,Re,"I","\u0399");G(H,re,Re,"K","\u039A");G(H,re,Re,"M","\u039C");G(H,re,Re,"N","\u039D");G(H,re,Re,"O","\u039F");G(H,re,Re,"P","\u03A1");G(H,re,Re,"T","\u03A4");G(H,re,Re,"X","\u03A7");G(H,re,Re,"\xAC","\\neg",!0);G(H,re,Re,"\xAC","\\lnot");G(H,re,Re,"\u22A4","\\top");G(H,re,Re,"\u22A5","\\bot");G(H,re,Re,"\u2205","\\emptyset");G(H,ke,Re,"\u2205","\\varnothing");G(H,re,tr,"\u03B1","\\alpha",!0);G(H,re,tr,"\u03B2","\\beta",!0);G(H,re,tr,"\u03B3","\\gamma",!0);G(H,re,tr,"\u03B4","\\delta",!0);G(H,re,tr,"\u03F5","\\epsilon",!0);G(H,re,tr,"\u03B6","\\zeta",!0);G(H,re,tr,"\u03B7","\\eta",!0);G(H,re,tr,"\u03B8","\\theta",!0);G(H,re,tr,"\u03B9","\\iota",!0);G(H,re,tr,"\u03BA","\\kappa",!0);G(H,re,tr,"\u03BB","\\lambda",!0);G(H,re,tr,"\u03BC","\\mu",!0);G(H,re,tr,"\u03BD","\\nu",!0);G(H,re,tr,"\u03BE","\\xi",!0);G(H,re,tr,"\u03BF","\\omicron",!0);G(H,re,tr,"\u03C0","\\pi",!0);G(H,re,tr,"\u03C1","\\rho",!0);G(H,re,tr,"\u03C3","\\sigma",!0);G(H,re,tr,"\u03C4","\\tau",!0);G(H,re,tr,"\u03C5","\\upsilon",!0);G(H,re,tr,"\u03D5","\\phi",!0);G(H,re,tr,"\u03C7","\\chi",!0);G(H,re,tr,"\u03C8","\\psi",!0);G(H,re,tr,"\u03C9","\\omega",!0);G(H,re,tr,"\u03B5","\\varepsilon",!0);G(H,re,tr,"\u03D1","\\vartheta",!0);G(H,re,tr,"\u03D6","\\varpi",!0);G(H,re,tr,"\u03F1","\\varrho",!0);G(H,re,tr,"\u03C2","\\varsigma",!0);G(H,re,tr,"\u03C6","\\varphi",!0);G(H,re,It,"\u2217","*",!0);G(H,re,It,"+","+");G(H,re,It,"\u2212","-",!0);G(H,re,It,"\u22C5","\\cdot",!0);G(H,re,It,"\u2218","\\circ",!0);G(H,re,It,"\xF7","\\div",!0);G(H,re,It,"\xB1","\\pm",!0);G(H,re,It,"\xD7","\\times",!0);G(H,re,It,"\u2229","\\cap",!0);G(H,re,It,"\u222A","\\cup",!0);G(H,re,It,"\u2216","\\setminus",!0);G(H,re,It,"\u2227","\\land");G(H,re,It,"\u2228","\\lor");G(H,re,It,"\u2227","\\wedge",!0);G(H,re,It,"\u2228","\\vee",!0);G(H,re,Re,"\u221A","\\surd");G(H,re,Ks,"\u27E8","\\langle",!0);G(H,re,Ks,"\u2223","\\lvert");G(H,re,Ks,"\u2225","\\lVert");G(H,re,Ja,"?","?");G(H,re,Ja,"!","!");G(H,re,Ja,"\u27E9","\\rangle",!0);G(H,re,Ja,"\u2223","\\rvert");G(H,re,Ja,"\u2225","\\rVert");G(H,re,Ee,"=","=");G(H,re,Ee,":",":");G(H,re,Ee,"\u2248","\\approx",!0);G(H,re,Ee,"\u2245","\\cong",!0);G(H,re,Ee,"\u2265","\\ge");G(H,re,Ee,"\u2265","\\geq",!0);G(H,re,Ee,"\u2190","\\gets");G(H,re,Ee,">","\\gt",!0);G(H,re,Ee,"\u2208","\\in",!0);G(H,re,Ee,"\uE020","\\@not");G(H,re,Ee,"\u2282","\\subset",!0);G(H,re,Ee,"\u2283","\\supset",!0);G(H,re,Ee,"\u2286","\\subseteq",!0);G(H,re,Ee,"\u2287","\\supseteq",!0);G(H,ke,Ee,"\u2288","\\nsubseteq",!0);G(H,ke,Ee,"\u2289","\\nsupseteq",!0);G(H,re,Ee,"\u22A8","\\models");G(H,re,Ee,"\u2190","\\leftarrow",!0);G(H,re,Ee,"\u2264","\\le");G(H,re,Ee,"\u2264","\\leq",!0);G(H,re,Ee,"<","\\lt",!0);G(H,re,Ee,"\u2192","\\rightarrow",!0);G(H,re,Ee,"\u2192","\\to");G(H,ke,Ee,"\u2271","\\ngeq",!0);G(H,ke,Ee,"\u2270","\\nleq",!0);G(H,re,hu,"\xA0","\\ ");G(H,re,hu,"\xA0","\\space");G(H,re,hu,"\xA0","\\nobreakspace");G(it,re,hu,"\xA0","\\ ");G(it,re,hu,"\xA0"," ");G(it,re,hu,"\xA0","\\space");G(it,re,hu,"\xA0","\\nobreakspace");G(H,re,hu,null,"\\nobreak");G(H,re,hu,null,"\\allowbreak");G(H,re,k3,",",",");G(H,re,k3,";",";");G(H,ke,It,"\u22BC","\\barwedge",!0);G(H,ke,It,"\u22BB","\\veebar",!0);G(H,re,It,"\u2299","\\odot",!0);G(H,re,It,"\u2295","\\oplus",!0);G(H,re,It,"\u2297","\\otimes",!0);G(H,re,Re,"\u2202","\\partial",!0);G(H,re,It,"\u2298","\\oslash",!0);G(H,ke,It,"\u229A","\\circledcirc",!0);G(H,ke,It,"\u22A1","\\boxdot",!0);G(H,re,It,"\u25B3","\\bigtriangleup");G(H,re,It,"\u25BD","\\bigtriangledown");G(H,re,It,"\u2020","\\dagger");G(H,re,It,"\u22C4","\\diamond");G(H,re,It,"\u22C6","\\star");G(H,re,It,"\u25C3","\\triangleleft");G(H,re,It,"\u25B9","\\triangleright");G(H,re,Ks,"{","\\{");G(it,re,Re,"{","\\{");G(it,re,Re,"{","\\textbraceleft");G(H,re,Ja,"}","\\}");G(it,re,Re,"}","\\}");G(it,re,Re,"}","\\textbraceright");G(H,re,Ks,"{","\\lbrace");G(H,re,Ja,"}","\\rbrace");G(H,re,Ks,"[","\\lbrack",!0);G(it,re,Re,"[","\\lbrack",!0);G(H,re,Ja,"]","\\rbrack",!0);G(it,re,Re,"]","\\rbrack",!0);G(H,re,Ks,"(","\\lparen",!0);G(H,re,Ja,")","\\rparen",!0);G(it,re,Re,"<","\\textless",!0);G(it,re,Re,">","\\textgreater",!0);G(H,re,Ks,"\u230A","\\lfloor",!0);G(H,re,Ja,"\u230B","\\rfloor",!0);G(H,re,Ks,"\u2308","\\lceil",!0);G(H,re,Ja,"\u2309","\\rceil",!0);G(H,re,Re,"\\","\\backslash");G(H,re,Re,"\u2223","|");G(H,re,Re,"\u2223","\\vert");G(it,re,Re,"|","\\textbar",!0);G(H,re,Re,"\u2225","\\|");G(H,re,Re,"\u2225","\\Vert");G(it,re,Re,"\u2225","\\textbardbl");G(it,re,Re,"~","\\textasciitilde");G(it,re,Re,"\\","\\textbackslash");G(it,re,Re,"^","\\textasciicircum");G(H,re,Ee,"\u2191","\\uparrow",!0);G(H,re,Ee,"\u21D1","\\Uparrow",!0);G(H,re,Ee,"\u2193","\\downarrow",!0);G(H,re,Ee,"\u21D3","\\Downarrow",!0);G(H,re,Ee,"\u2195","\\updownarrow",!0);G(H,re,Ee,"\u21D5","\\Updownarrow",!0);G(H,re,Si,"\u2210","\\coprod");G(H,re,Si,"\u22C1","\\bigvee");G(H,re,Si,"\u22C0","\\bigwedge");G(H,re,Si,"\u2A04","\\biguplus");G(H,re,Si,"\u22C2","\\bigcap");G(H,re,Si,"\u22C3","\\bigcup");G(H,re,Si,"\u222B","\\int");G(H,re,Si,"\u222B","\\intop");G(H,re,Si,"\u222C","\\iint");G(H,re,Si,"\u222D","\\iiint");G(H,re,Si,"\u220F","\\prod");G(H,re,Si,"\u2211","\\sum");G(H,re,Si,"\u2A02","\\bigotimes");G(H,re,Si,"\u2A01","\\bigoplus");G(H,re,Si,"\u2A00","\\bigodot");G(H,re,Si,"\u222E","\\oint");G(H,re,Si,"\u222F","\\oiint");G(H,re,Si,"\u2230","\\oiiint");G(H,re,Si,"\u2A06","\\bigsqcup");G(H,re,Si,"\u222B","\\smallint");G(it,re,y0,"\u2026","\\textellipsis");G(H,re,y0,"\u2026","\\mathellipsis");G(it,re,y0,"\u2026","\\ldots",!0);G(H,re,y0,"\u2026","\\ldots",!0);G(H,re,y0,"\u22EF","\\@cdots",!0);G(H,re,y0,"\u22F1","\\ddots",!0);G(H,re,Re,"\u22EE","\\varvdots");G(it,re,Re,"\u22EE","\\varvdots");G(H,re,Vn,"\u02CA","\\acute");G(H,re,Vn,"\u02CB","\\grave");G(H,re,Vn,"\xA8","\\ddot");G(H,re,Vn,"~","\\tilde");G(H,re,Vn,"\u02C9","\\bar");G(H,re,Vn,"\u02D8","\\breve");G(H,re,Vn,"\u02C7","\\check");G(H,re,Vn,"^","\\hat");G(H,re,Vn,"\u20D7","\\vec");G(H,re,Vn,"\u02D9","\\dot");G(H,re,Vn,"\u02DA","\\mathring");G(H,re,tr,"\uE131","\\@imath");G(H,re,tr,"\uE237","\\@jmath");G(H,re,Re,"\u0131","\u0131");G(H,re,Re,"\u0237","\u0237");G(it,re,Re,"\u0131","\\i",!0);G(it,re,Re,"\u0237","\\j",!0);G(it,re,Re,"\xDF","\\ss",!0);G(it,re,Re,"\xE6","\\ae",!0);G(it,re,Re,"\u0153","\\oe",!0);G(it,re,Re,"\xF8","\\o",!0);G(it,re,Re,"\xC6","\\AE",!0);G(it,re,Re,"\u0152","\\OE",!0);G(it,re,Re,"\xD8","\\O",!0);G(it,re,Vn,"\u02CA","\\'");G(it,re,Vn,"\u02CB","\\`");G(it,re,Vn,"\u02C6","\\^");G(it,re,Vn,"\u02DC","\\~");G(it,re,Vn,"\u02C9","\\=");G(it,re,Vn,"\u02D8","\\u");G(it,re,Vn,"\u02D9","\\.");G(it,re,Vn,"\xB8","\\c");G(it,re,Vn,"\u02DA","\\r");G(it,re,Vn,"\u02C7","\\v");G(it,re,Vn,"\xA8",'\\"');G(it,re,Vn,"\u02DD","\\H");G(it,re,Vn,"\u25EF","\\textcircled");CG={"--":!0,"---":!0,"``":!0,"''":!0};G(it,re,Re,"\u2013","--",!0);G(it,re,Re,"\u2013","\\textendash");G(it,re,Re,"\u2014","---",!0);G(it,re,Re,"\u2014","\\textemdash");G(it,re,Re,"\u2018","`",!0);G(it,re,Re,"\u2018","\\textquoteleft");G(it,re,Re,"\u2019","'",!0);G(it,re,Re,"\u2019","\\textquoteright");G(it,re,Re,"\u201C","``",!0);G(it,re,Re,"\u201C","\\textquotedblleft");G(it,re,Re,"\u201D","''",!0);G(it,re,Re,"\u201D","\\textquotedblright");G(H,re,Re,"\xB0","\\degree",!0);G(it,re,Re,"\xB0","\\degree");G(it,re,Re,"\xB0","\\textdegree",!0);G(H,re,Re,"\xA3","\\pounds");G(H,re,Re,"\xA3","\\mathsterling",!0);G(it,re,Re,"\xA3","\\pounds");G(it,re,Re,"\xA3","\\textsterling",!0);G(H,ke,Re,"\u2720","\\maltese");G(it,ke,Re,"\u2720","\\maltese");Yz='0123456789/@."';for(i3=0;i3<Yz.length;i3++)k7=Yz.charAt(i3),G(H,re,Re,k7,k7);Xz='0123456789!@*()-=+";:?/.,';for(a3=0;a3<Xz.length;a3++)E7=Xz.charAt(a3),G(it,re,Re,E7,E7);y3="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(s3=0;s3<y3.length;s3++)zy=y3.charAt(s3),G(H,re,tr,zy,zy),G(it,re,Re,zy,zy);G(H,ke,Re,"C","\u2102");G(it,ke,Re,"C","\u2102");G(H,ke,Re,"H","\u210D");G(it,ke,Re,"H","\u210D");G(H,ke,Re,"N","\u2115");G(it,ke,Re,"N","\u2115");G(H,ke,Re,"P","\u2119");G(it,ke,Re,"P","\u2119");G(H,ke,Re,"Q","\u211A");G(it,ke,Re,"Q","\u211A");G(H,ke,Re,"R","\u211D");G(it,ke,Re,"R","\u211D");G(H,ke,Re,"Z","\u2124");G(it,ke,Re,"Z","\u2124");G(H,re,tr,"h","\u210E");G(it,re,tr,"h","\u210E");cr="";for(Aa=0;Aa<y3.length;Aa++)ei=y3.charAt(Aa),cr=String.fromCharCode(55349,56320+Aa),G(H,re,tr,ei,cr),G(it,re,Re,ei,cr),cr=String.fromCharCode(55349,56372+Aa),G(H,re,tr,ei,cr),G(it,re,Re,ei,cr),cr=String.fromCharCode(55349,56424+Aa),G(H,re,tr,ei,cr),G(it,re,Re,ei,cr),cr=String.fromCharCode(55349,56580+Aa),G(H,re,tr,ei,cr),G(it,re,Re,ei,cr),cr=String.fromCharCode(55349,56684+Aa),G(H,re,tr,ei,cr),G(it,re,Re,ei,cr),cr=String.fromCharCode(55349,56736+Aa),G(H,re,tr,ei,cr),G(it,re,Re,ei,cr),cr=String.fromCharCode(55349,56788+Aa),G(H,re,tr,ei,cr),G(it,re,Re,ei,cr),cr=String.fromCharCode(55349,56840+Aa),G(H,re,tr,ei,cr),G(it,re,Re,ei,cr),cr=String.fromCharCode(55349,56944+Aa),G(H,re,tr,ei,cr),G(it,re,Re,ei,cr),Aa<26&&(cr=String.fromCharCode(55349,56632+Aa),G(H,re,tr,ei,cr),G(it,re,Re,ei,cr),cr=String.fromCharCode(55349,56476+Aa),G(H,re,tr,ei,cr),G(it,re,Re,ei,cr));cr="\u{1D55C}";G(H,re,tr,"k",cr);G(it,re,Re,"k",cr);for(fh=0;fh<10;fh++)au=fh.toString(),cr=String.fromCharCode(55349,57294+fh),G(H,re,tr,au,cr),G(it,re,Re,au,cr),cr=String.fromCharCode(55349,57314+fh),G(H,re,tr,au,cr),G(it,re,Re,au,cr),cr=String.fromCharCode(55349,57324+fh),G(H,re,tr,au,cr),G(it,re,Re,au,cr),cr=String.fromCharCode(55349,57334+fh),G(H,re,tr,au,cr),G(it,re,Re,au,cr);F7="\xD0\xDE\xFE";for(o3=0;o3<F7.length;o3++)Gy=F7.charAt(o3),G(H,re,tr,Gy,Gy),G(it,re,Re,Gy,Gy);l3=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],jz=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],K4e=o(function(e,r){var n=e.charCodeAt(0),i=e.charCodeAt(1),a=(n-55296)*1024+(i-56320)+65536,s=r==="math"?0:1;if(119808<=a&&a<120484){var l=Math.floor((a-119808)/26);return[l3[l][2],l3[l][s]];}else if(120782<=a&&a<=120831){var u=Math.floor((a-120782)/10);return[jz[u][2],jz[u][s]];}else{if(a===120485||a===120486)return[l3[0][2],l3[0][s]];if(120486<a&&a<120782)return["",""];throw new mt("Unsupported character: "+e);}},"wideCharacterFont"),E3=o(function(e,r,n){return Cn[n][e]&&Cn[n][e].replace&&(e=Cn[n][e].replace),{value:e,metrics:X7(e,r,n)};},"lookupSymbol"),ul=o(function(e,r,n,i,a){var s=E3(e,r,n),l=s.metrics;e=s.value;var u;if(l){var h=l.italic;(n==="text"||i&&i.font==="mathit")&&(h=0),u=new ws(e,l.height,l.depth,h,l.skew,l.width,a);}else typeof console<"u"&&console.warn("No character metrics "+("for '"+e+"' in style '"+r+"' and mode '"+n+"'")),u=new ws(e,0,0,0,0,0,a);if(i){u.maxFontSize=i.sizeMultiplier,i.style.isTight()&&u.classes.push("mtight");var f=i.getColor();f&&(u.style.color=f);}return u;},"makeSymbol"),Q4e=o(function(e,r,n,i){return i===void 0&&(i=[]),n.font==="boldsymbol"&&E3(e,"Main-Bold",r).metrics?ul(e,"Main-Bold",r,n,i.concat(["mathbf"])):e==="\\"||Cn[r][e].font==="main"?ul(e,"Main-Regular",r,n,i):ul(e,"AMS-Regular",r,n,i.concat(["amsrm"]));},"mathsym"),Z4e=o(function(e,r,n,i,a){return a!=="textord"&&E3(e,"Math-BoldItalic",r).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"};},"boldsymbol"),J4e=o(function(e,r,n){var i=e.mode,a=e.text,s=["mord"],l=i==="math"||i==="text"&&r.font,u=l?r.font:r.fontFamily,h="",f="";if(a.charCodeAt(0)===55349&&([h,f]=K4e(a,i)),h.length>0)return ul(a,h,i,r,s.concat(f));if(u){var d,p;if(u==="boldsymbol"){var m=Z4e(a,i,r,s,n);d=m.fontName,p=[m.fontClass];}else l?(d=DG[u].fontName,p=[u]):(d=c3(u,r.fontWeight,r.fontShape),p=[u,r.fontWeight,r.fontShape]);if(E3(a,d,i).metrics)return ul(a,d,i,r,s.concat(p));if(CG.hasOwnProperty(a)&&d.slice(0,10)==="Typewriter"){for(var g=[],y=0;y<a.length;y++)g.push(ul(a[y],d,i,r,s.concat(p)));return _G(g);}}if(n==="mathord")return ul(a,"Math-Italic",i,r,s.concat(["mathnormal"]));if(n==="textord"){var v=Cn[i][a]&&Cn[i][a].font;if(v==="ams"){var x=c3("amsrm",r.fontWeight,r.fontShape);return ul(a,x,i,r,s.concat("amsrm",r.fontWeight,r.fontShape));}else if(v==="main"||!v){var b=c3("textrm",r.fontWeight,r.fontShape);return ul(a,b,i,r,s.concat(r.fontWeight,r.fontShape));}else{var T=c3(v,r.fontWeight,r.fontShape);return ul(a,T,i,r,s.concat(T,r.fontWeight,r.fontShape));}}else throw new Error("unexpected type: "+n+" in makeOrd");},"makeOrd"),e3e=o((t,e)=>{if(ph(t.classes)!==ph(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")return!1;}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0;},"canCombine"),t3e=o(t=>{for(var e=0;e<t.length-1;e++){var r=t[e],n=t[e+1];r instanceof ws&&n instanceof ws&&e3e(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,t.splice(e+1,1),e--);}return t;},"tryCombineChars"),j7=o(function(e){for(var r=0,n=0,i=0,a=0;a<e.children.length;a++){var s=e.children[a];s.height>r&&(r=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>i&&(i=s.maxFontSize);}e.height=r,e.depth=n,e.maxFontSize=i;},"sizeElementFromChildren"),Ts=o(function(e,r,n,i){var a=new ed(e,r,n,i);return j7(a),a;},"makeSpan"),AG=o((t,e,r,n)=>new ed(t,e,r,n),"makeSvgSpan"),r3e=o(function(e,r,n){var i=Ts([e],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=Et(i.height),i.maxFontSize=1,i;},"makeLineSpan"),n3e=o(function(e,r,n,i){var a=new Yy(e,r,n,i);return j7(a),a;},"makeAnchor"),_G=o(function(e){var r=new Jf(e);return j7(r),r;},"makeFragment"),i3e=o(function(e,r){return e instanceof Jf?Ts([],[e],r):e;},"wrapFragment"),a3e=o(function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,a=i,s=1;s<r.length;s++){var l=-r[s].shift-a-r[s].elem.depth,u=l-(r[s-1].elem.height+r[s-1].elem.depth);a=a+l,n.push({type:"kern",size:u}),n.push(r[s]);}return{children:n,depth:i};}var h;if(e.positionType==="top"){for(var f=e.positionData,d=0;d<e.children.length;d++){var p=e.children[d];f-=p.type==="kern"?p.size:p.elem.height+p.elem.depth;}h=f;}else if(e.positionType==="bottom")h=-e.positionData;else{var m=e.children[0];if(m.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")h=-m.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")h=-m.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".");}return{children:e.children,depth:h};},"getVListChildrenAndDepth"),s3e=o(function(e,r){for(var{children:n,depth:i}=a3e(e),a=0,s=0;s<n.length;s++){var l=n[s];if(l.type==="elem"){var u=l.elem;a=Math.max(a,u.maxFontSize,u.height);}}a+=2;var h=Ts(["pstrut"],[]);h.style.height=Et(a);for(var f=[],d=i,p=i,m=i,g=0;g<n.length;g++){var y=n[g];if(y.type==="kern")m+=y.size;else{var v=y.elem,x=y.wrapperClasses||[],b=y.wrapperStyle||{},T=Ts(x,[h,v],void 0,b);T.style.top=Et(-a-m-v.depth),y.marginLeft&&(T.style.marginLeft=y.marginLeft),y.marginRight&&(T.style.marginRight=y.marginRight),f.push(T),m+=v.height+v.depth;}d=Math.min(d,m),p=Math.max(p,m);}var C=Ts(["vlist"],f);C.style.height=Et(p);var w;if(d<0){var E=Ts([],[]),_=Ts(["vlist"],[E]);_.style.height=Et(-d);var A=Ts(["vlist-s"],[new ws("\u200B")]);w=[Ts(["vlist-r"],[C,A]),Ts(["vlist-r"],[_])];}else w=[Ts(["vlist-r"],[C])];var D=Ts(["vlist-t"],w);return w.length===2&&D.classes.push("vlist-t2"),D.height=p,D.depth=-d,D;},"makeVList"),o3e=o((t,e)=>{var r=Ts(["mspace"],[],e),n=ri(t,e);return r.style.marginRight=Et(n),r;},"makeGlue"),c3=o(function(e,r,n){var i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e;}var a;return r==="textbf"&&n==="textit"?a="BoldItalic":r==="textbf"?a="Bold":r==="textit"?a="Italic":a="Regular",i+"-"+a;},"retrieveTextFontName"),DG={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},LG={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},l3e=o(function(e,r){var[n,i,a]=LG[e],s=new Ql(n),l=new hl([s],{width:Et(i),height:Et(a),style:"width:"+Et(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),u=AG(["overlay"],[l],r);return u.height=a,u.style.height=Et(a),u.style.width=Et(i),u;},"staticSvg"),Fe={fontMap:DG,makeSymbol:ul,mathsym:Q4e,makeSpan:Ts,makeSvgSpan:AG,makeLineSpan:r3e,makeAnchor:n3e,makeFragment:_G,wrapFragment:i3e,makeVList:s3e,makeOrd:J4e,makeGlue:o3e,staticSvg:l3e,svgData:LG,tryCombineChars:t3e},ti={number:3,unit:"mu"},Zf={number:4,unit:"mu"},su={number:5,unit:"mu"},c3e={mord:{mop:ti,mbin:Zf,mrel:su,minner:ti},mop:{mord:ti,mop:ti,mrel:su,minner:ti},mbin:{mord:Zf,mop:Zf,mopen:Zf,minner:Zf},mrel:{mord:su,mop:su,mopen:su,minner:su},mopen:{},mclose:{mop:ti,mbin:Zf,mrel:su,minner:ti},mpunct:{mord:ti,mop:ti,mrel:su,mopen:ti,mclose:ti,mpunct:ti,minner:ti},minner:{mord:ti,mop:ti,mbin:Zf,mrel:su,mopen:ti,mpunct:ti,minner:ti}},u3e={mord:{mop:ti},mop:{mord:ti,mop:ti},mbin:{},mrel:{},mopen:{},mclose:{mop:ti},mpunct:{},minner:{mop:ti}},RG={},v3={},x3={};o(Nt,"defineFunction");o(td,"defineFunctionBuilders");b3=o(function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e;},"normalizeArgument"),mi=o(function(e){return e.type==="ordgroup"?e.body:[e];},"ordargument"),cu=Fe.makeSpan,h3e=["leftmost","mbin","mopen","mrel","mop","mpunct"],f3e=["rightmost","mrel","mclose","mpunct"],d3e={display:rr.DISPLAY,text:rr.TEXT,script:rr.SCRIPT,scriptscript:rr.SCRIPTSCRIPT},p3e={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Bi=o(function(e,r,n,i){i===void 0&&(i=[null,null]);for(var a=[],s=0;s<e.length;s++){var l=Fr(e[s],r);if(l instanceof Jf){var u=l.children;a.push(...u);}else a.push(l);}if(Fe.tryCombineChars(a),!n)return a;var h=r;if(e.length===1){var f=e[0];f.type==="sizing"?h=r.havingSize(f.size):f.type==="styling"&&(h=r.havingStyle(d3e[f.style]));}var d=cu([i[0]||"leftmost"],[],r),p=cu([i[1]||"rightmost"],[],r),m=n==="root";return Kz(a,(g,y)=>{var v=y.classes[0],x=g.classes[0];v==="mbin"&&er.contains(f3e,x)?y.classes[0]="mord":x==="mbin"&&er.contains(h3e,v)&&(g.classes[0]="mord");},{node:d},p,m),Kz(a,(g,y)=>{var v=$7(y),x=$7(g),b=v&&x?g.hasClass("mtight")?u3e[v][x]:c3e[v][x]:null;if(b)return Fe.makeGlue(b,h);},{node:d},p,m),a;},"buildExpression"),Kz=o(function t(e,r,n,i,a){i&&e.push(i);for(var s=0;s<e.length;s++){var l=e[s],u=NG(l);if(u){t(u.children,r,n,null,a);continue;}var h=!l.hasClass("mspace");if(h){var f=r(l,n.node);f&&(n.insertAfter?n.insertAfter(f):(e.unshift(f),s++));}h?n.node=l:a&&l.hasClass("newline")&&(n.node=cu(["leftmost"])),n.insertAfter=(d=>p=>{e.splice(d+1,0,p),s++;})(s);}i&&e.pop();},"traverseNonSpaceNodes"),NG=o(function(e){return e instanceof Jf||e instanceof Yy||e instanceof ed&&e.hasClass("enclosing")?e:null;},"checkPartialGroup"),m3e=o(function t(e,r){var n=NG(e);if(n){var i=n.children;if(i.length){if(r==="right")return t(i[i.length-1],"right");if(r==="left")return t(i[0],"left");}}return e;},"getOutermostNode"),$7=o(function(e,r){return e?(r&&(e=m3e(e,r)),p3e[e.classes[0]]||null):null;},"getTypeOfDomTree"),jy=o(function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return cu(r.concat(n));},"makeNullDelimiter"),Fr=o(function(e,r,n){if(!e)return cu();if(v3[e.type]){var i=v3[e.type](e,r);if(n&&r.size!==n.size){i=cu(r.sizingClasses(n),[i],r);var a=r.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a;}return i;}else throw new mt("Got group of unknown type: '"+e.type+"'");},"buildGroup");o(u3,"buildHTMLUnbreakable");o(z7,"buildHTML");o(MG,"newDocumentFragment");Qa=(_Class16=class Qa{constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[];}setAttribute(e,r){this.attributes[e]=r;}getAttribute(e){return this.attributes[e];}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=ph(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof So&&this.children[n+1]instanceof So){for(var i=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof So;)i+=this.children[++n].toText();e.appendChild(new So(i).toNode());}else e.appendChild(this.children[n].toNode());return e;}toMarkup(){var e="<"+this.type;for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+'="',e+=er.escape(this.attributes[r]),e+='"');this.classes.length>0&&(e+=' class ="'+er.escape(ph(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">",e;}toText(){return this.children.map(e=>e.toText()).join("");}},o(_Class16,"MathNode"),_Class16),So=(_Class17=class So{constructor(e){this.text=void 0,this.text=e;}toNode(){return document.createTextNode(this.text);}toMarkup(){return er.escape(this.toText());}toText(){return this.text;}},o(_Class17,"TextNode"),_Class17),G7=(_Class18=class G7{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="\u200A":e>=.1666&&e<=.1667?this.character="\u2009":e>=.2222&&e<=.2223?this.character="\u2005":e>=.2777&&e<=.2778?this.character="\u2005\u200A":e>=-.05556&&e<=-.05555?this.character="\u200A\u2063":e>=-.1667&&e<=-.1666?this.character="\u2009\u2063":e>=-.2223&&e<=-.2222?this.character="\u205F\u2063":e>=-.2778&&e<=-.2777?this.character="\u2005\u2063":this.character=null;}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",Et(this.width)),e;}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Et(this.width)+'"/>';}toText(){return this.character?this.character:" ";}},o(_Class18,"SpaceNode"),_Class18),dt={MathNode:Qa,TextNode:So,SpaceNode:G7,newDocumentFragment:MG},Ao=o(function(e,r,n){return Cn[r][e]&&Cn[r][e].replace&&e.charCodeAt(0)!==55349&&!(CG.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=Cn[r][e].replace),new dt.TextNode(e);},"makeText"),K7=o(function(e){return e.length===1?e[0]:new dt.MathNode("mrow",e);},"makeRow"),Q7=o(function(e,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var i=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathsfit")return"sans-serif-italic";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var a=e.text;if(er.contains(["\\imath","\\jmath"],a))return null;Cn[i][a]&&Cn[i][a].replace&&(a=Cn[i][a].replace);var s=Fe.fontMap[n].fontName;return X7(a,s,i)?Fe.fontMap[n].variant:null;},"getVariant");o(S7,"isNumberPunctuation");ks=o(function(e,r,n){if(e.length===1){var i=yn(e[0],r);return n&&i instanceof Qa&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i];}for(var a=[],s,l=0;l<e.length;l++){var u=yn(e[l],r);if(u instanceof Qa&&s instanceof Qa){if(u.type==="mtext"&&s.type==="mtext"&&u.getAttribute("mathvariant")===s.getAttribute("mathvariant")){s.children.push(...u.children);continue;}else if(u.type==="mn"&&s.type==="mn"){s.children.push(...u.children);continue;}else if(S7(u)&&s.type==="mn"){s.children.push(...u.children);continue;}else if(u.type==="mn"&&S7(s))u.children=[...s.children,...u.children],a.pop();else if((u.type==="msup"||u.type==="msub")&&u.children.length>=1&&(s.type==="mn"||S7(s))){var h=u.children[0];h instanceof Qa&&h.type==="mn"&&(h.children=[...s.children,...h.children],a.pop());}else if(s.type==="mi"&&s.children.length===1){var f=s.children[0];if(f instanceof So&&f.text==="\u0338"&&(u.type==="mo"||u.type==="mi"||u.type==="mn")){var d=u.children[0];d instanceof So&&d.text.length>0&&(d.text=d.text.slice(0,1)+"\u0338"+d.text.slice(1),a.pop());}}}a.push(u),s=u;}return a;},"buildExpression"),mh=o(function(e,r,n){return K7(ks(e,r,n));},"buildExpressionRow"),yn=o(function(e,r){if(!e)return new dt.MathNode("mrow");if(x3[e.type]){var n=x3[e.type](e,r);return n;}else throw new mt("Got group of unknown type: '"+e.type+"'");},"buildGroup");o(Qz,"buildMathML");IG=o(function(e){return new g3({style:e.displayMode?rr.DISPLAY:rr.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness});},"optionsFromSettings"),OG=o(function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=Fe.makeSpan(n,[e]);}return e;},"displayWrap"),g3e=o(function(e,r,n){var i=IG(n),a;if(n.output==="mathml")return Qz(e,r,i,n.displayMode,!0);if(n.output==="html"){var s=z7(e,i);a=Fe.makeSpan(["katex"],[s]);}else{var l=Qz(e,r,i,n.displayMode,!1),u=z7(e,i);a=Fe.makeSpan(["katex"],[l,u]);}return OG(a,n);},"buildTree"),y3e=o(function(e,r,n){var i=IG(n),a=z7(e,i),s=Fe.makeSpan(["katex"],[a]);return OG(s,n);},"buildHTMLTree"),v3e={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},x3e=o(function(e){var r=new dt.MathNode("mo",[new dt.TextNode(v3e[e.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r;},"mathMLnode"),b3e={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},T3e=o(function(e){return e.type==="ordgroup"?e.body.length:1;},"groupLength"),w3e=o(function(e,r){function n(){var l=4e5,u=e.label.slice(1);if(er.contains(["widehat","widecheck","widetilde","utilde"],u)){var h=e,f=T3e(h.base),d,p,m;if(f>5)u==="widehat"||u==="widecheck"?(d=420,l=2364,m=.42,p=u+"4"):(d=312,l=2340,m=.34,p="tilde4");else{var g=[1,1,2,2,3,3][f];u==="widehat"||u==="widecheck"?(l=[0,1062,2364,2364,2364][g],d=[0,239,300,360,420][g],m=[0,.24,.3,.3,.36,.42][g],p=u+g):(l=[0,600,1033,2339,2340][g],d=[0,260,286,306,312][g],m=[0,.26,.286,.3,.306,.34][g],p="tilde"+g);}var y=new Ql(p),v=new hl([y],{width:"100%",height:Et(m),viewBox:"0 0 "+l+" "+d,preserveAspectRatio:"none"});return{span:Fe.makeSvgSpan([],[v],r),minWidth:0,height:m};}else{var x=[],b=b3e[u],[T,C,w]=b,E=w/1e3,_=T.length,A,D;if(_===1){var O=b[3];A=["hide-tail"],D=[O];}else if(_===2)A=["halfarrow-left","halfarrow-right"],D=["xMinYMin","xMaxYMin"];else if(_===3)A=["brace-left","brace-center","brace-right"],D=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
                    `+_+" children.");for(var R=0;R<_;R++){var k=new Ql(T[R]),L=new hl([k],{width:"400em",height:Et(E),viewBox:"0 0 "+l+" "+w,preserveAspectRatio:D[R]+" slice"}),S=Fe.makeSvgSpan([A[R]],[L],r);if(_===1)return{span:S,minWidth:C,height:E};S.style.height=Et(E),x.push(S);}return{span:Fe.makeSpan(["stretchy"],x,r),minWidth:C,height:E};}}o(n,"buildSvgSpan_");var{span:i,minWidth:a,height:s}=n();return i.height=s,i.style.height=Et(s),a>0&&(i.style.minWidth=Et(a)),i;},"svgSpan"),k3e=o(function(e,r,n,i,a){var s,l=e.height+e.depth+n+i;if(/fbox|color|angl/.test(r)){if(s=Fe.makeSpan(["stretchy",r],[],a),r==="fbox"){var u=a.color&&a.getColor();u&&(s.style.borderColor=u);}}else{var h=[];/^[bx]cancel$/.test(r)&&h.push(new Xy({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&h.push(new Xy({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var f=new hl(h,{width:"100%",height:Et(l)});s=Fe.makeSvgSpan([],[f],a);}return s.height=l,s.style.height=Et(l),s;},"encloseSpan"),uu={encloseSpan:k3e,mathMLnode:x3e,svgSpan:w3e};o(xr,"assertNodeType");o(Z7,"assertSymbolNodeType");o(S3,"checkSymbolNodeType");J7=o((t,e)=>{var r,n,i;t&&t.type==="supsub"?(n=xr(t.base,"accent"),r=n.base,t.base=r,i=Y4e(Fr(t,e)),t.base=n):(n=xr(t,"accent"),r=n.base);var a=Fr(r,e.havingCrampedStyle()),s=n.isShifty&&er.isCharacterBox(r),l=0;if(s){var u=er.getBaseElem(r),h=Fr(u,e.havingCrampedStyle());l=qz(h).skew;}var f=n.label==="\\c",d=f?a.height+a.depth:Math.min(a.height,e.fontMetrics().xHeight),p;if(n.isStretchy)p=uu.svgSpan(n,e),p=Fe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+Et(2*l)+")",marginLeft:Et(2*l)}:void 0}]},e);else{var m,g;n.label==="\\vec"?(m=Fe.staticSvg("vec",e),g=Fe.svgData.vec[1]):(m=Fe.makeOrd({mode:n.mode,text:n.label},e,"textord"),m=qz(m),m.italic=0,g=m.width,f&&(d+=m.depth)),p=Fe.makeSpan(["accent-body"],[m]);var y=n.label==="\\textcircled";y&&(p.classes.push("accent-full"),d=a.height);var v=l;y||(v-=g/2),p.style.left=Et(v),n.label==="\\textcircled"&&(p.style.top=".2em"),p=Fe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-d},{type:"elem",elem:p}]},e);}var x=Fe.makeSpan(["mord","accent"],[p],e);return i?(i.children[0]=x,i.height=Math.max(x.height,i.height),i.classes[0]="mord",i):x;},"htmlBuilder$a"),PG=o((t,e)=>{var r=t.isStretchy?uu.mathMLnode(t.label):new dt.MathNode("mo",[Ao(t.label,t.mode)]),n=new dt.MathNode("mover",[yn(t.base,e),r]);return n.setAttribute("accent","true"),n;},"mathmlBuilder$9"),E3e=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));Nt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:o((t,e)=>{var r=b3(e[0]),n=!E3e.test(t.funcName),i=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r};},"handler"),htmlBuilder:J7,mathmlBuilder:PG});Nt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:o((t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r};},"handler"),htmlBuilder:J7,mathmlBuilder:PG});Nt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i};},"handler"),htmlBuilder:o((t,e)=>{var r=Fr(t.base,e),n=uu.svgSpan(t,e),i=t.label==="\\utilde"?.12:0,a=Fe.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},e);return Fe.makeSpan(["mord","accentunder"],[a],e);},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=uu.mathMLnode(t.label),n=new dt.MathNode("munder",[yn(t.base,e),r]);return n.setAttribute("accentunder","true"),n;},"mathmlBuilder")});h3=o(t=>{var e=new dt.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e;},"paddedNode");Nt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:e[0],below:r[0]};},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),i=Fe.wrapFragment(Fr(t.body,n,e),e),a=t.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var s;t.below&&(n=e.havingStyle(r.sub()),s=Fe.wrapFragment(Fr(t.below,n,e),e),s.classes.push(a+"-arrow-pad"));var l=uu.svgSpan(t,e),u=-e.fontMetrics().axisHeight+.5*l.height,h=-e.fontMetrics().axisHeight-.5*l.height-.111;(i.depth>.25||t.label==="\\xleftequilibrium")&&(h-=i.depth);var f;if(s){var d=-e.fontMetrics().axisHeight+s.height+.5*l.height+.111;f=Fe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:h},{type:"elem",elem:l,shift:u},{type:"elem",elem:s,shift:d}]},e);}else f=Fe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:h},{type:"elem",elem:l,shift:u}]},e);return f.children[0].children[0].children[1].classes.push("svg-align"),Fe.makeSpan(["mrel","x-arrow"],[f],e);},mathmlBuilder(t,e){var r=uu.mathMLnode(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var i=h3(yn(t.body,e));if(t.below){var a=h3(yn(t.below,e));n=new dt.MathNode("munderover",[r,a,i]);}else n=new dt.MathNode("mover",[r,i]);}else if(t.below){var s=h3(yn(t.below,e));n=new dt.MathNode("munder",[r,s]);}else n=h3(),n=new dt.MathNode("mover",[r,n]);return n;}});S3e=Fe.makeSpan;o(BG,"htmlBuilder$9");o(FG,"mathmlBuilder$8");Nt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:mi(i),isCharacterBox:er.isCharacterBox(i)};},htmlBuilder:BG,mathmlBuilder:FG});C3=o(t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord";},"binrelClass");Nt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:C3(e[0]),body:mi(e[1]),isCharacterBox:er.isCharacterBox(e[1])};}});Nt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,i=e[1],a=e[0],s;n!=="\\stackrel"?s=C3(i):s="mrel";var l={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:mi(i)},u={type:"supsub",mode:a.mode,base:l,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:s,body:[u],isCharacterBox:er.isCharacterBox(u)};},htmlBuilder:BG,mathmlBuilder:FG});Nt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:C3(e[0]),body:mi(e[0])};},htmlBuilder(t,e){var r=Bi(t.body,e,!0),n=Fe.makeSpan([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n;},mathmlBuilder(t,e){var r=ks(t.body,e),n=new dt.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n;}});C3e={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Zz=o(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),Jz=o(t=>t.type==="textord"&&t.text==="@","isStartOfArrow"),A3e=o((t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e,"isLabelEnd");o(_3e,"cdArrow");o(D3e,"parseCD");Nt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]};},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=Fe.wrapFragment(Fr(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=Et(.8-n.depth),n.height=0,n.depth=0,n;},mathmlBuilder(t,e){var r=new dt.MathNode("mrow",[yn(t.label,e)]);return r=new dt.MathNode("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new dt.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r;}});Nt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]};},htmlBuilder(t,e){var r=Fe.wrapFragment(Fr(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r;},mathmlBuilder(t,e){return new dt.MathNode("mrow",[yn(t.fragment,e)]);}});Nt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=xr(e[0],"ordgroup"),i=n.body,a="",s=0;s<i.length;s++){var l=xr(i[s],"textord");a+=l.text;}var u=parseInt(a),h;if(isNaN(u))throw new mt("\\@char has non-numeric argument "+a);if(u<0||u>=1114111)throw new mt("\\@char with invalid code point "+a);return u<=65535?h=String.fromCharCode(u):(u-=65536,h=String.fromCharCode((u>>10)+55296,(u&1023)+56320)),{type:"textord",mode:r.mode,text:h};}});$G=o((t,e)=>{var r=Bi(t.body,e.withColor(t.color),!1);return Fe.makeFragment(r);},"htmlBuilder$8"),zG=o((t,e)=>{var r=ks(t.body,e.withColor(t.color)),n=new dt.MathNode("mstyle",r);return n.setAttribute("mathcolor",t.color),n;},"mathmlBuilder$7");Nt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=xr(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:mi(i)};},htmlBuilder:$G,mathmlBuilder:zG});Nt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=xr(e[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a};},htmlBuilder:$G,mathmlBuilder:zG});Nt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&xr(i,"size").value};},htmlBuilder(t,e){var r=Fe.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=Et(ri(t.size,e)))),r;},mathmlBuilder(t,e){var r=new dt.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",Et(ri(t.size,e)))),r;}});V7={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},GG=o(t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new mt("Expected a control sequence",t);return e;},"checkControlSequence"),L3e=o(t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e;},"getRHS"),VG=o((t,e,r,n)=>{var i=t.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n);},"letCommand");Nt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(V7[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=V7[n.text]),xr(e.parseFunction(),"internal");throw new mt("Invalid token after macro prefix",n);}});Nt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new mt("Expected a control sequence",n);for(var a=0,s,l=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){s=e.gullet.future(),l[a].push("{");break;}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new mt('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new mt('Argument number "'+n.text+'" out of order');a++,l.push([]);}else{if(n.text==="EOF")throw new mt("Expected a macro definition");l[a].push(n.text);}var{tokens:u}=e.gullet.consumeArg();return s&&u.unshift(s),(r==="\\edef"||r==="\\xdef")&&(u=e.gullet.expandTokens(u),u.reverse()),e.gullet.macros.set(i,{tokens:u,numArgs:a,delimiters:l},r===V7[r]),{type:"internal",mode:e.mode};}});Nt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=GG(e.gullet.popToken());e.gullet.consumeSpaces();var i=L3e(e);return VG(e,n,i,r==="\\\\globallet"),{type:"internal",mode:e.mode};}});Nt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=GG(e.gullet.popToken()),i=e.gullet.popToken(),a=e.gullet.popToken();return VG(e,n,a,r==="\\\\globalfuture"),e.gullet.pushToken(a),e.gullet.pushToken(i),{type:"internal",mode:e.mode};}});Vy=o(function(e,r,n){var i=Cn.math[e]&&Cn.math[e].replace,a=X7(i||e,r,n);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return a;},"getMetrics"),eA=o(function(e,r,n,i){var a=n.havingBaseStyle(r),s=Fe.makeSpan(i.concat(a.sizingClasses(n)),[e],n),l=a.sizeMultiplier/n.sizeMultiplier;return s.height*=l,s.depth*=l,s.maxFontSize=a.sizeMultiplier,s;},"styleWrap"),UG=o(function(e,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=Et(a),e.height-=a,e.depth+=a;},"centerSpan"),R3e=o(function(e,r,n,i,a,s){var l=Fe.makeSymbol(e,"Main-Regular",a,i),u=eA(l,r,i,s);return n&&UG(u,i,r),u;},"makeSmallDelim"),N3e=o(function(e,r,n,i){return Fe.makeSymbol(e,"Size"+r+"-Regular",n,i);},"mathrmSize"),HG=o(function(e,r,n,i,a,s){var l=N3e(e,r,a,i),u=eA(Fe.makeSpan(["delimsizing","size"+r],[l],i),rr.TEXT,i,s);return n&&UG(u,i,rr.TEXT),u;},"makeLargeDelim"),C7=o(function(e,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=Fe.makeSpan(["delimsizinginner",i],[Fe.makeSpan([],[Fe.makeSymbol(e,r,n)])]);return{type:"elem",elem:a};},"makeGlyphSpan"),A7=o(function(e,r,n){var i=Kl["Size4-Regular"][e.charCodeAt(0)]?Kl["Size4-Regular"][e.charCodeAt(0)][4]:Kl["Size1-Regular"][e.charCodeAt(0)][4],a=new Ql("inner",z4e(e,Math.round(1e3*r))),s=new hl([a],{width:Et(i),height:Et(r),style:"width:"+Et(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),l=Fe.makeSvgSpan([],[s],n);return l.height=r,l.style.height=Et(r),l.style.width=Et(i),{type:"elem",elem:l};},"makeInner"),U7=.008,f3={type:"kern",size:-1*U7},M3e=["|","\\lvert","\\rvert","\\vert"],I3e=["\\|","\\lVert","\\rVert","\\Vert"],WG=o(function(e,r,n,i,a,s){var l,u,h,f,d="",p=0;l=h=f=e,u=null;var m="Size1-Regular";e==="\\uparrow"?h=f="\u23D0":e==="\\Uparrow"?h=f="\u2016":e==="\\downarrow"?l=h="\u23D0":e==="\\Downarrow"?l=h="\u2016":e==="\\updownarrow"?(l="\\uparrow",h="\u23D0",f="\\downarrow"):e==="\\Updownarrow"?(l="\\Uparrow",h="\u2016",f="\\Downarrow"):er.contains(M3e,e)?(h="\u2223",d="vert",p=333):er.contains(I3e,e)?(h="\u2225",d="doublevert",p=556):e==="["||e==="\\lbrack"?(l="\u23A1",h="\u23A2",f="\u23A3",m="Size4-Regular",d="lbrack",p=667):e==="]"||e==="\\rbrack"?(l="\u23A4",h="\u23A5",f="\u23A6",m="Size4-Regular",d="rbrack",p=667):e==="\\lfloor"||e==="\u230A"?(h=l="\u23A2",f="\u23A3",m="Size4-Regular",d="lfloor",p=667):e==="\\lceil"||e==="\u2308"?(l="\u23A1",h=f="\u23A2",m="Size4-Regular",d="lceil",p=667):e==="\\rfloor"||e==="\u230B"?(h=l="\u23A5",f="\u23A6",m="Size4-Regular",d="rfloor",p=667):e==="\\rceil"||e==="\u2309"?(l="\u23A4",h=f="\u23A5",m="Size4-Regular",d="rceil",p=667):e==="("||e==="\\lparen"?(l="\u239B",h="\u239C",f="\u239D",m="Size4-Regular",d="lparen",p=875):e===")"||e==="\\rparen"?(l="\u239E",h="\u239F",f="\u23A0",m="Size4-Regular",d="rparen",p=875):e==="\\{"||e==="\\lbrace"?(l="\u23A7",u="\u23A8",f="\u23A9",h="\u23AA",m="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(l="\u23AB",u="\u23AC",f="\u23AD",h="\u23AA",m="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(l="\u23A7",f="\u23A9",h="\u23AA",m="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(l="\u23AB",f="\u23AD",h="\u23AA",m="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(l="\u23A7",f="\u23AD",h="\u23AA",m="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(l="\u23AB",f="\u23A9",h="\u23AA",m="Size4-Regular");var g=Vy(l,m,a),y=g.height+g.depth,v=Vy(h,m,a),x=v.height+v.depth,b=Vy(f,m,a),T=b.height+b.depth,C=0,w=1;if(u!==null){var E=Vy(u,m,a);C=E.height+E.depth,w=2;}var _=y+T+C,A=Math.max(0,Math.ceil((r-_)/(w*x))),D=_+A*w*x,O=i.fontMetrics().axisHeight;n&&(O*=i.sizeMultiplier);var R=D/2-O,k=[];if(d.length>0){var L=D-y-T,S=Math.round(D*1e3),I=G4e(d,Math.round(L*1e3)),M=new Ql(d,I),P=(p/1e3).toFixed(3)+"em",B=(S/1e3).toFixed(3)+"em",F=new hl([M],{width:P,height:B,viewBox:"0 0 "+p+" "+S}),z=Fe.makeSvgSpan([],[F],i);z.height=S/1e3,z.style.width=P,z.style.height=B,k.push({type:"elem",elem:z});}else{if(k.push(C7(f,m,a)),k.push(f3),u===null){var $=D-y-T+2*U7;k.push(A7(h,$,i));}else{var U=(D-y-T-C)/2+2*U7;k.push(A7(h,U,i)),k.push(f3),k.push(C7(u,m,a)),k.push(f3),k.push(A7(h,U,i));}k.push(f3),k.push(C7(l,m,a));}var K=i.havingBaseStyle(rr.TEXT),ee=Fe.makeVList({positionType:"bottom",positionData:R,children:k},K);return eA(Fe.makeSpan(["delimsizing","mult"],[ee],K),rr.TEXT,i,s);},"makeStackedDelim"),_7=80,D7=.08,L7=o(function(e,r,n,i,a){var s=$4e(e,i,n),l=new Ql(e,s),u=new hl([l],{width:"400em",height:Et(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Fe.makeSvgSpan(["hide-tail"],[u],a);},"sqrtSvg"),O3e=o(function(e,r){var n=r.havingBaseSizing(),i=jG("\\surd",e*n.sizeMultiplier,XG,n),a=n.sizeMultiplier,s=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),l,u=0,h=0,f=0,d;return i.type==="small"?(f=1e3+1e3*s+_7,e<1?a=1:e<1.4&&(a=.7),u=(1+s+D7)/a,h=(1+s)/a,l=L7("sqrtMain",u,f,s,r),l.style.minWidth="0.853em",d=.833/a):i.type==="large"?(f=(1e3+_7)*Hy[i.size],h=(Hy[i.size]+s)/a,u=(Hy[i.size]+s+D7)/a,l=L7("sqrtSize"+i.size,u,f,s,r),l.style.minWidth="1.02em",d=1/a):(u=e+s+D7,h=e+s,f=Math.floor(1e3*e+s)+_7,l=L7("sqrtTall",u,f,s,r),l.style.minWidth="0.742em",d=1.056),l.height=h,l.style.height=Et(u),{span:l,advanceWidth:d,ruleWidth:(r.fontMetrics().sqrtRuleThickness+s)*a};},"makeSqrtImage"),qG=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],P3e=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],YG=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Hy=[0,1.2,1.8,2.4,3],B3e=o(function(e,r,n,i,a){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),er.contains(qG,e)||er.contains(YG,e))return HG(e,r,!1,n,i,a);if(er.contains(P3e,e))return WG(e,Hy[r],!1,n,i,a);throw new mt("Illegal delimiter: '"+e+"'");},"makeSizedDelim"),F3e=[{type:"small",style:rr.SCRIPTSCRIPT},{type:"small",style:rr.SCRIPT},{type:"small",style:rr.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],$3e=[{type:"small",style:rr.SCRIPTSCRIPT},{type:"small",style:rr.SCRIPT},{type:"small",style:rr.TEXT},{type:"stack"}],XG=[{type:"small",style:rr.SCRIPTSCRIPT},{type:"small",style:rr.SCRIPT},{type:"small",style:rr.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],z3e=o(function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.");},"delimTypeToFont"),jG=o(function(e,r,n,i){for(var a=Math.min(2,3-i.style.size),s=a;s<n.length&&n[s].type!=="stack";s++){var l=Vy(e,z3e(n[s]),"math"),u=l.height+l.depth;if(n[s].type==="small"){var h=i.havingBaseStyle(n[s].style);u*=h.sizeMultiplier;}if(u>r)return n[s];}return n[n.length-1];},"traverseSequence"),KG=o(function(e,r,n,i,a,s){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var l;er.contains(YG,e)?l=F3e:er.contains(qG,e)?l=XG:l=$3e;var u=jG(e,r,l,i);return u.type==="small"?R3e(e,u.style,n,i,a,s):u.type==="large"?HG(e,u.size,n,i,a,s):WG(e,r,n,i,a,s);},"makeCustomSizedDelim"),G3e=o(function(e,r,n,i,a,s){var l=i.fontMetrics().axisHeight*i.sizeMultiplier,u=901,h=5/i.fontMetrics().ptPerEm,f=Math.max(r-l,n+l),d=Math.max(f/500*u,2*f-h);return KG(e,d,!0,i,a,s);},"makeLeftRightDelim"),lu={sqrtImage:O3e,sizedDelim:B3e,sizeToMaxHeight:Hy,customSizedDelim:KG,leftRightDelim:G3e},eG={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},V3e=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];o(A3,"checkDelimiter");Nt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:o((t,e)=>{var r=A3(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:eG[t.funcName].size,mclass:eG[t.funcName].mclass,delim:r.text};},"handler"),htmlBuilder:o((t,e)=>t.delim==="."?Fe.makeSpan([t.mclass]):lu.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),"htmlBuilder"),mathmlBuilder:o(t=>{var e=[];t.delim!=="."&&e.push(Ao(t.delim,t.mode));var r=new dt.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=Et(lu.sizeToMaxHeight[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r;},"mathmlBuilder")});o(tG,"assertParsed");Nt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:o((t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new mt("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:A3(e[0],t).text,color:r};},"handler")});Nt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:o((t,e)=>{var r=A3(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=xr(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color};},"handler"),htmlBuilder:o((t,e)=>{tG(t);for(var r=Bi(t.body,e,!0,["mopen","mclose"]),n=0,i=0,a=!1,s=0;s<r.length;s++)r[s].isMiddle?a=!0:(n=Math.max(r[s].height,n),i=Math.max(r[s].depth,i));n*=e.sizeMultiplier,i*=e.sizeMultiplier;var l;if(t.left==="."?l=jy(e,["mopen"]):l=lu.leftRightDelim(t.left,n,i,e,t.mode,["mopen"]),r.unshift(l),a)for(var u=1;u<r.length;u++){var h=r[u],f=h.isMiddle;f&&(r[u]=lu.leftRightDelim(f.delim,n,i,f.options,t.mode,[]));}var d;if(t.right===".")d=jy(e,["mclose"]);else{var p=t.rightColor?e.withColor(t.rightColor):e;d=lu.leftRightDelim(t.right,n,i,p,t.mode,["mclose"]);}return r.push(d),Fe.makeSpan(["minner"],r,e);},"htmlBuilder"),mathmlBuilder:o((t,e)=>{tG(t);var r=ks(t.body,e);if(t.left!=="."){var n=new dt.MathNode("mo",[Ao(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n);}if(t.right!=="."){var i=new dt.MathNode("mo",[Ao(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i);}return K7(r);},"mathmlBuilder")});Nt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:o((t,e)=>{var r=A3(e[0],t);if(!t.parser.leftrightDepth)throw new mt("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text};},"handler"),htmlBuilder:o((t,e)=>{var r;if(t.delim===".")r=jy(e,[]);else{r=lu.sizedDelim(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n;}return r;},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?Ao("|","text"):Ao(t.delim,t.mode),n=new dt.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n;},"mathmlBuilder")});tA=o((t,e)=>{var r=Fe.wrapFragment(Fr(t.body,e),e),n=t.label.slice(1),i=e.sizeMultiplier,a,s=0,l=er.isCharacterBox(t.body);if(n==="sout")a=Fe.makeSpan(["stretchy","sout"]),a.height=e.fontMetrics().defaultRuleThickness/i,s=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var u=ri({number:.6,unit:"pt"},e),h=ri({number:.35,unit:"ex"},e),f=e.havingBaseSizing();i=i/f.sizeMultiplier;var d=r.height+r.depth+u+h;r.style.paddingLeft=Et(d/2+u);var p=Math.floor(1e3*d*i),m=B4e(p),g=new hl([new Ql("phase",m)],{width:"400em",height:Et(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});a=Fe.makeSvgSpan(["hide-tail"],[g],e),a.style.height=Et(d),s=r.depth+u+h;}else{/cancel/.test(n)?l||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var y=0,v=0,x=0;/box/.test(n)?(x=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),y=e.fontMetrics().fboxsep+(n==="colorbox"?0:x),v=y):n==="angl"?(x=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),y=4*x,v=Math.max(0,.25-r.depth)):(y=l?.2:0,v=y),a=uu.encloseSpan(r,n,y,v,e),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=Et(x)):n==="angl"&&x!==.049&&(a.style.borderTopWidth=Et(x),a.style.borderRightWidth=Et(x)),s=r.depth+v,t.backgroundColor&&(a.style.backgroundColor=t.backgroundColor,t.borderColor&&(a.style.borderColor=t.borderColor));}var b;if(t.backgroundColor)b=Fe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:r,shift:0}]},e);else{var T=/cancel|phase/.test(n)?["svg-align"]:[];b=Fe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:s,wrapperClasses:T}]},e);}return /cancel/.test(n)&&(b.height=r.height,b.depth=r.depth),/cancel/.test(n)&&!l?Fe.makeSpan(["mord","cancel-lap"],[b],e):Fe.makeSpan(["mord"],[b],e);},"htmlBuilder$7"),rA=o((t,e)=>{var r=0,n=new dt.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[yn(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\fcolorbox"){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(t.borderColor));}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break;}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n;},"mathmlBuilder$6");Nt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=xr(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:s};},htmlBuilder:tA,mathmlBuilder:rA});Nt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=xr(e[0],"color-token").color,s=xr(e[1],"color-token").color,l=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,borderColor:a,body:l};},htmlBuilder:tA,mathmlBuilder:rA});Nt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]};}});Nt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i};},htmlBuilder:tA,mathmlBuilder:rA});Nt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]};}});QG={};o(Zl,"defineEnvironment");ZG={};o(fe,"defineMacro");o(rG,"getHLines");_3=o(t=>{var e=t.parser.settings;if(!e.displayMode)throw new mt("{"+t.envName+"} can be used only in display mode.");},"validateAmsEnvironmentContext");o(nA,"getAutoTag");o(gh,"parseArray");o(iA,"dCellStyle");Jl=o(function(e,r){var n,i,a=e.body.length,s=e.hLinesBeforeRow,l=0,u=new Array(a),h=[],f=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),d=1/r.fontMetrics().ptPerEm,p=5*d;if(e.colSeparationType&&e.colSeparationType==="small"){var m=r.havingStyle(rr.SCRIPT).sizeMultiplier;p=.2778*(m/r.sizeMultiplier);}var g=e.colSeparationType==="CD"?ri({number:3,unit:"ex"},r):12*d,y=3*d,v=e.arraystretch*g,x=.7*v,b=.3*v,T=0;function C(ae){for(var Oe=0;Oe<ae.length;++Oe)Oe>0&&(T+=.25),h.push({pos:T,isDashed:ae[Oe]});}for(o(C,"setHLinePos"),C(s[0]),n=0;n<e.body.length;++n){var w=e.body[n],E=x,_=b;l<w.length&&(l=w.length);var A=new Array(w.length);for(i=0;i<w.length;++i){var D=Fr(w[i],r);_<D.depth&&(_=D.depth),E<D.height&&(E=D.height),A[i]=D;}var O=e.rowGaps[n],R=0;O&&(R=ri(O,r),R>0&&(R+=b,_<R&&(_=R),R=0)),e.addJot&&(_+=y),A.height=E,A.depth=_,T+=E,A.pos=T,T+=_+R,u[n]=A,C(s[n+1]);}var k=T/2+r.fontMetrics().axisHeight,L=e.cols||[],S=[],I,M,P=[];if(e.tags&&e.tags.some(ae=>ae))for(n=0;n<a;++n){var B=u[n],F=B.pos-k,z=e.tags[n],$=void 0;z===!0?$=Fe.makeSpan(["eqn-num"],[],r):z===!1?$=Fe.makeSpan([],[],r):$=Fe.makeSpan([],Bi(z,r,!0),r),$.depth=B.depth,$.height=B.height,P.push({type:"elem",elem:$,shift:F});}for(i=0,M=0;i<l||M<L.length;++i,++M){for(var U=L[M]||{},K=!0;U.type==="separator";){if(K||(I=Fe.makeSpan(["arraycolsep"],[]),I.style.width=Et(r.fontMetrics().doubleRuleSep),S.push(I)),U.separator==="|"||U.separator===":"){var ee=U.separator==="|"?"solid":"dashed",Y=Fe.makeSpan(["vertical-separator"],[],r);Y.style.height=Et(T),Y.style.borderRightWidth=Et(f),Y.style.borderRightStyle=ee,Y.style.margin="0 "+Et(-f/2);var ce=T-k;ce&&(Y.style.verticalAlign=Et(-ce)),S.push(Y);}else throw new mt("Invalid separator type: "+U.separator);M++,U=L[M]||{},K=!1;}if(!(i>=l)){var Z=void 0;(i>0||e.hskipBeforeAndAfter)&&(Z=er.deflt(U.pregap,p),Z!==0&&(I=Fe.makeSpan(["arraycolsep"],[]),I.style.width=Et(Z),S.push(I)));var ue=[];for(n=0;n<a;++n){var Q=u[n],j=Q[i];if(j){var ne=Q.pos-k;j.depth=Q.depth,j.height=Q.height,ue.push({type:"elem",elem:j,shift:ne});}}ue=Fe.makeVList({positionType:"individualShift",children:ue},r),ue=Fe.makeSpan(["col-align-"+(U.align||"c")],[ue]),S.push(ue),(i<l-1||e.hskipBeforeAndAfter)&&(Z=er.deflt(U.postgap,p),Z!==0&&(I=Fe.makeSpan(["arraycolsep"],[]),I.style.width=Et(Z),S.push(I)));}}if(u=Fe.makeSpan(["mtable"],S),h.length>0){for(var te=Fe.makeLineSpan("hline",r,f),he=Fe.makeLineSpan("hdashline",r,f),le=[{type:"elem",elem:u,shift:0}];h.length>0;){var J=h.pop(),Se=J.pos-k;J.isDashed?le.push({type:"elem",elem:he,shift:Se}):le.push({type:"elem",elem:te,shift:Se});}u=Fe.makeVList({positionType:"individualShift",children:le},r);}if(P.length===0)return Fe.makeSpan(["mord"],[u],r);var se=Fe.makeVList({positionType:"individualShift",children:P},r);return se=Fe.makeSpan(["tag"],[se],r),Fe.makeFragment([u,se]);},"htmlBuilder"),U3e={c:"center ",l:"left ",r:"right "},ec=o(function(e,r){for(var n=[],i=new dt.MathNode("mtd",[],["mtr-glue"]),a=new dt.MathNode("mtd",[],["mml-eqn-num"]),s=0;s<e.body.length;s++){for(var l=e.body[s],u=[],h=0;h<l.length;h++)u.push(new dt.MathNode("mtd",[yn(l[h],r)]));e.tags&&e.tags[s]&&(u.unshift(i),u.push(i),e.leqno?u.unshift(a):u.push(a)),n.push(new dt.MathNode("mtr",u));}var f=new dt.MathNode("mtable",n),d=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);f.setAttribute("rowspacing",Et(d));var p="",m="";if(e.cols&&e.cols.length>0){var g=e.cols,y="",v=!1,x=0,b=g.length;g[0].type==="separator"&&(p+="top ",x=1),g[g.length-1].type==="separator"&&(p+="bottom ",b-=1);for(var T=x;T<b;T++)g[T].type==="align"?(m+=U3e[g[T].align],v&&(y+="none "),v=!0):g[T].type==="separator"&&v&&(y+=g[T].separator==="|"?"solid ":"dashed ",v=!1);f.setAttribute("columnalign",m.trim()),/[sd]/.test(y)&&f.setAttribute("columnlines",y.trim());}if(e.colSeparationType==="align"){for(var C=e.cols||[],w="",E=1;E<C.length;E++)w+=E%2?"0em ":"1em ";f.setAttribute("columnspacing",w.trim());}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?f.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?f.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?f.setAttribute("columnspacing","0.5em"):f.setAttribute("columnspacing","1em");var _="",A=e.hLinesBeforeRow;p+=A[0].length>0?"left ":"",p+=A[A.length-1].length>0?"right ":"";for(var D=1;D<A.length-1;D++)_+=A[D].length===0?"none ":A[D][0]?"dashed ":"solid ";return /[sd]/.test(_)&&f.setAttribute("rowlines",_.trim()),p!==""&&(f=new dt.MathNode("menclose",[f]),f.setAttribute("notation",p.trim())),e.arraystretch&&e.arraystretch<1&&(f=new dt.MathNode("mstyle",[f]),f.setAttribute("scriptlevel","1")),f;},"mathmlBuilder"),JG=o(function(e,r){e.envName.indexOf("ed")===-1&&_3(e);var n=[],i=e.envName.indexOf("at")>-1?"alignat":"align",a=e.envName==="split",s=gh(e.parser,{cols:n,addJot:!0,autoTag:a?void 0:nA(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),l,u=0,h={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var f="",d=0;d<r[0].body.length;d++){var p=xr(r[0].body[d],"textord");f+=p.text;}l=Number(f),u=l*2;}var m=!u;s.body.forEach(function(x){for(var b=1;b<x.length;b+=2){var T=xr(x[b],"styling"),C=xr(T.body[0],"ordgroup");C.body.unshift(h);}if(m)u<x.length&&(u=x.length);else{var w=x.length/2;if(l<w)throw new mt("Too many math in a row: "+("expected "+l+", but got "+w),x[0]);}});for(var g=0;g<u;++g){var y="r",v=0;g%2===1?y="l":g>0&&m&&(v=1),n[g]={type:"align",align:y,pregap:v,postgap:0};}return s.colSeparationType=m?"align":"alignat",s;},"alignedHandler");Zl({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=S3(e[0]),n=r?[e[0]]:xr(e[0],"ordgroup").body,i=n.map(function(s){var l=Z7(s),u=l.text;if("lcr".indexOf(u)!==-1)return{type:"align",align:u};if(u==="|")return{type:"separator",separator:"|"};if(u===":")return{type:"separator",separator:":"};throw new mt("Unknown column alignment: "+u,s);}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return gh(t.parser,a,iA(t.envName));},htmlBuilder:Jl,mathmlBuilder:ec});Zl({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var i=t.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,"lcr".indexOf(r)===-1)throw new mt("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}];}}var a=gh(t.parser,n,iA(t.envName)),s=Math.max(0,...a.body.map(l=>l.length));return a.cols=new Array(s).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[a],left:e[0],right:e[1],rightColor:void 0}:a;},htmlBuilder:Jl,mathmlBuilder:ec});Zl({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=gh(t.parser,e,"script");return r.colSeparationType="small",r;},htmlBuilder:Jl,mathmlBuilder:ec});Zl({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=S3(e[0]),n=r?[e[0]]:xr(e[0],"ordgroup").body,i=n.map(function(s){var l=Z7(s),u=l.text;if("lc".indexOf(u)!==-1)return{type:"align",align:u};throw new mt("Unknown column alignment: "+u,s);});if(i.length>1)throw new mt("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=gh(t.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new mt("{subarray} can contain only one column");return a;},htmlBuilder:Jl,mathmlBuilder:ec});Zl({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=gh(t.parser,e,iA(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0};},htmlBuilder:Jl,mathmlBuilder:ec});Zl({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:JG,htmlBuilder:Jl,mathmlBuilder:ec});Zl({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){er.contains(["gather","gather*"],t.envName)&&_3(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:nA(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return gh(t.parser,e,"display");},htmlBuilder:Jl,mathmlBuilder:ec});Zl({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:JG,htmlBuilder:Jl,mathmlBuilder:ec});Zl({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){_3(t);var e={autoTag:nA(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return gh(t.parser,e,"display");},htmlBuilder:Jl,mathmlBuilder:ec});Zl({type:"array",names:["CD"],props:{numArgs:0},handler(t){return _3(t),D3e(t.parser);},htmlBuilder:Jl,mathmlBuilder:ec});fe("\\nonumber","\\gdef\\@eqnsw{0}");fe("\\notag","\\nonumber");Nt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new mt(t.funcName+" valid only within array environment");}});nG=QG;Nt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];if(i.type!=="ordgroup")throw new mt("Invalid environment name",i);for(var a="",s=0;s<i.body.length;++s)a+=xr(i.body[s],"textord").text;if(n==="\\begin"){if(!nG.hasOwnProperty(a))throw new mt("No such environment: "+a,i);var l=nG[a],{args:u,optArgs:h}=r.parseArguments("\\begin{"+a+"}",l),f={mode:r.mode,envName:a,parser:r},d=l.handler(f,u,h);r.expect("\\end",!1);var p=r.nextToken,m=xr(r.parseFunction(),"environment");if(m.name!==a)throw new mt("Mismatch: \\begin{"+a+"} matched by \\end{"+m.name+"}",p);return d;}return{type:"environment",mode:r.mode,name:a,nameGroup:i};}});eV=o((t,e)=>{var r=t.font,n=e.withFont(r);return Fr(t.body,n);},"htmlBuilder$5"),tV=o((t,e)=>{var r=t.font,n=e.withFont(r);return yn(t.body,n);},"mathmlBuilder$4"),iG={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Nt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=b3(e[0]),a=n;return a in iG&&(a=iG[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i};},"handler"),htmlBuilder:eV,mathmlBuilder:tV});Nt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:o((t,e)=>{var{parser:r}=t,n=e[0],i=er.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:C3(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i};},"handler")});Nt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:o((t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:a}=r,s=r.parseExpression(!0,i),l="math"+n.slice(1);return{type:"font",mode:a,font:l,body:{type:"ordgroup",mode:r.mode,body:s}};},"handler"),htmlBuilder:eV,mathmlBuilder:tV});rV=o((t,e)=>{var r=e;return t==="display"?r=r.id>=rr.SCRIPT.id?r.text():rr.DISPLAY:t==="text"&&r.size===rr.DISPLAY.size?r=rr.TEXT:t==="script"?r=rr.SCRIPT:t==="scriptscript"&&(r=rr.SCRIPTSCRIPT),r;},"adjustStyle"),aA=o((t,e)=>{var r=rV(t.size,e.style),n=r.fracNum(),i=r.fracDen(),a;a=e.havingStyle(n);var s=Fr(t.numer,a,e);if(t.continued){var l=8.5/e.fontMetrics().ptPerEm,u=3.5/e.fontMetrics().ptPerEm;s.height=s.height<l?l:s.height,s.depth=s.depth<u?u:s.depth;}a=e.havingStyle(i);var h=Fr(t.denom,a,e),f,d,p;t.hasBarLine?(t.barSize?(d=ri(t.barSize,e),f=Fe.makeLineSpan("frac-line",e,d)):f=Fe.makeLineSpan("frac-line",e),d=f.height,p=f.height):(f=null,d=0,p=e.fontMetrics().defaultRuleThickness);var m,g,y;r.size===rr.DISPLAY.size||t.size==="display"?(m=e.fontMetrics().num1,d>0?g=3*p:g=7*p,y=e.fontMetrics().denom1):(d>0?(m=e.fontMetrics().num2,g=p):(m=e.fontMetrics().num3,g=3*p),y=e.fontMetrics().denom2);var v;if(f){var b=e.fontMetrics().axisHeight;m-s.depth-(b+.5*d)<g&&(m+=g-(m-s.depth-(b+.5*d))),b-.5*d-(h.height-y)<g&&(y+=g-(b-.5*d-(h.height-y)));var T=-(b-.5*d);v=Fe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:y},{type:"elem",elem:f,shift:T},{type:"elem",elem:s,shift:-m}]},e);}else{var x=m-s.depth-(h.height-y);x<g&&(m+=.5*(g-x),y+=.5*(g-x)),v=Fe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:y},{type:"elem",elem:s,shift:-m}]},e);}a=e.havingStyle(r),v.height*=a.sizeMultiplier/e.sizeMultiplier,v.depth*=a.sizeMultiplier/e.sizeMultiplier;var C;r.size===rr.DISPLAY.size?C=e.fontMetrics().delim1:r.size===rr.SCRIPTSCRIPT.size?C=e.havingStyle(rr.SCRIPT).fontMetrics().delim2:C=e.fontMetrics().delim2;var w,E;return t.leftDelim==null?w=jy(e,["mopen"]):w=lu.customSizedDelim(t.leftDelim,C,!0,e.havingStyle(r),t.mode,["mopen"]),t.continued?E=Fe.makeSpan([]):t.rightDelim==null?E=jy(e,["mclose"]):E=lu.customSizedDelim(t.rightDelim,C,!0,e.havingStyle(r),t.mode,["mclose"]),Fe.makeSpan(["mord"].concat(a.sizingClasses(e)),[w,Fe.makeSpan(["mfrac"],[v]),E],e);},"htmlBuilder$4"),sA=o((t,e)=>{var r=new dt.MathNode("mfrac",[yn(t.numer,e),yn(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=ri(t.barSize,e);r.setAttribute("linethickness",Et(n));}var i=rV(t.size,e.style);if(i.size!==e.style.size){r=new dt.MathNode("mstyle",[r]);var a=i.size===rr.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",a),r.setAttribute("scriptlevel","0");}if(t.leftDelim!=null||t.rightDelim!=null){var s=[];if(t.leftDelim!=null){var l=new dt.MathNode("mo",[new dt.TextNode(t.leftDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l);}if(s.push(r),t.rightDelim!=null){var u=new dt.MathNode("mo",[new dt.TextNode(t.rightDelim.replace("\\",""))]);u.setAttribute("fence","true"),s.push(u);}return K7(s);}return r;},"mathmlBuilder$3");Nt({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1],s,l=null,u=null,h="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,l="(",u=")";break;case"\\\\bracefrac":s=!1,l="\\{",u="\\}";break;case"\\\\brackfrac":s=!1,l="[",u="]";break;default:throw new Error("Unrecognized genfrac command");}switch(n){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text";break;}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:a,hasBarLine:s,leftDelim:l,rightDelim:u,size:h,barSize:null};},"handler"),htmlBuilder:aA,mathmlBuilder:sA});Nt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null};},"handler")});Nt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command");}return{type:"infix",mode:e.mode,replaceWith:i,token:n};}});aG=["display","text","script","scriptscript"],sG=o(function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r;},"delimFromValue");Nt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],i=e[5],a=b3(e[0]),s=a.type==="atom"&&a.family==="open"?sG(a.text):null,l=b3(e[1]),u=l.type==="atom"&&l.family==="close"?sG(l.text):null,h=xr(e[2],"size"),f,d=null;h.isBlank?f=!0:(d=h.value,f=d.number>0);var p="auto",m=e[3];if(m.type==="ordgroup"){if(m.body.length>0){var g=xr(m.body[0],"textord");p=aG[Number(g.text)];}}else m=xr(m,"textord"),p=aG[Number(m.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:f,barSize:d,leftDelim:s,rightDelim:u,size:p};},htmlBuilder:aA,mathmlBuilder:sA});Nt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:i}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:xr(e[0],"size").value,token:i};}});Nt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=w4e(xr(e[1],"infix").size),s=e[2],l=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:s,continued:!1,hasBarLine:l,barSize:a,leftDelim:null,rightDelim:null,size:"auto"};},"handler"),htmlBuilder:aA,mathmlBuilder:sA});nV=o((t,e)=>{var r=e.style,n,i;t.type==="supsub"?(n=t.sup?Fr(t.sup,e.havingStyle(r.sup()),e):Fr(t.sub,e.havingStyle(r.sub()),e),i=xr(t.base,"horizBrace")):i=xr(t,"horizBrace");var a=Fr(i.base,e.havingBaseStyle(rr.DISPLAY)),s=uu.svgSpan(i,e),l;if(i.isOver?(l=Fe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},e),l.children[0].children[0].children[1].classes.push("svg-align")):(l=Fe.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},e),l.children[0].children[0].children[0].classes.push("svg-align")),n){var u=Fe.makeSpan(["mord",i.isOver?"mover":"munder"],[l],e);i.isOver?l=Fe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"kern",size:.2},{type:"elem",elem:n}]},e):l=Fe.makeVList({positionType:"bottom",positionData:u.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:u}]},e);}return Fe.makeSpan(["mord",i.isOver?"mover":"munder"],[l],e);},"htmlBuilder$3"),H3e=o((t,e)=>{var r=uu.mathMLnode(t.label);return new dt.MathNode(t.isOver?"mover":"munder",[yn(t.base,e),r]);},"mathmlBuilder$2");Nt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:e[0]};},htmlBuilder:nV,mathmlBuilder:H3e});Nt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:o((t,e)=>{var{parser:r}=t,n=e[1],i=xr(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:mi(n)}:r.formatUnsupportedCmd("\\href");},"handler"),htmlBuilder:o((t,e)=>{var r=Bi(t.body,e,!1);return Fe.makeAnchor(t.href,[],r,e);},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=mh(t.body,e);return r instanceof Qa||(r=new Qa("mrow",[r])),r.setAttribute("href",t.href),r;},"mathmlBuilder")});Nt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:o((t,e)=>{var{parser:r}=t,n=xr(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a<n.length;a++){var s=n[a];s==="~"&&(s="\\textasciitilde"),i.push({type:"textord",mode:"text",text:s});}var l={type:"text",mode:r.mode,font:"\\texttt",body:i};return{type:"href",mode:r.mode,href:n,body:mi(l)};},"handler")});Nt({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:r}=t;return{type:"hbox",mode:r.mode,body:mi(e[0])};},htmlBuilder(t,e){var r=Bi(t.body,e,!1);return Fe.makeFragment(r);},mathmlBuilder(t,e){return new dt.MathNode("mrow",ks(t.body,e));}});Nt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:o((t,e)=>{var{parser:r,funcName:n,token:i}=t,a=xr(e[0],"raw").string,s=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l,u={};switch(n){case"\\htmlClass":u.class=a,l={command:"\\htmlClass",class:a};break;case"\\htmlId":u.id=a,l={command:"\\htmlId",id:a};break;case"\\htmlStyle":u.style=a,l={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var h=a.split(","),f=0;f<h.length;f++){var d=h[f].split("=");if(d.length!==2)throw new mt("Error parsing key-value for \\htmlData");u["data-"+d[0].trim()]=d[1].trim();}l={command:"\\htmlData",attributes:u};break;}default:throw new Error("Unrecognized html command");}return r.settings.isTrusted(l)?{type:"html",mode:r.mode,attributes:u,body:mi(s)}:r.formatUnsupportedCmd(n);},"handler"),htmlBuilder:o((t,e)=>{var r=Bi(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=Fe.makeSpan(n,r,e);for(var a in t.attributes)a!=="class"&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i;},"htmlBuilder"),mathmlBuilder:o((t,e)=>mh(t.body,e),"mathmlBuilder")});Nt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:o((t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:mi(e[0]),mathml:mi(e[1])};},"handler"),htmlBuilder:o((t,e)=>{var r=Bi(t.html,e,!1);return Fe.makeFragment(r);},"htmlBuilder"),mathmlBuilder:o((t,e)=>mh(t.mathml,e),"mathmlBuilder")});R7=o(function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new mt("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!wG(n))throw new mt("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n;},"sizeData");Nt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:o((t,e,r)=>{var{parser:n}=t,i={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(r[0])for(var u=xr(r[0],"raw").string,h=u.split(","),f=0;f<h.length;f++){var d=h[f].split("=");if(d.length===2){var p=d[1].trim();switch(d[0].trim()){case"alt":l=p;break;case"width":i=R7(p);break;case"height":a=R7(p);break;case"totalheight":s=R7(p);break;default:throw new mt("Invalid key: '"+d[0]+"' in \\includegraphics.");}}}var m=xr(e[0],"url").url;return l===""&&(l=m,l=l.replace(/^.*[\\/]/,""),l=l.substring(0,l.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:m})?{type:"includegraphics",mode:n.mode,alt:l,width:i,height:a,totalheight:s,src:m}:n.formatUnsupportedCmd("\\includegraphics");},"handler"),htmlBuilder:o((t,e)=>{var r=ri(t.height,e),n=0;t.totalheight.number>0&&(n=ri(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=ri(t.width,e));var a={height:Et(r+n)};i>0&&(a.width=Et(i)),n>0&&(a.verticalAlign=Et(-n));var s=new B7(t.src,t.alt,a);return s.height=r,s.depth=n,s;},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=new dt.MathNode("mglyph",[]);r.setAttribute("alt",t.alt);var n=ri(t.height,e),i=0;if(t.totalheight.number>0&&(i=ri(t.totalheight,e)-n,r.setAttribute("valign",Et(-i))),r.setAttribute("height",Et(n+i)),t.width.number>0){var a=ri(t.width,e);r.setAttribute("width",Et(a));}return r.setAttribute("src",t.src),r;},"mathmlBuilder")});Nt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=xr(e[0],"size");if(r.settings.strict){var a=n[1]==="m",s=i.value.unit==="mu";a?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units");}return{type:"kern",mode:r.mode,dimension:i.value};},htmlBuilder(t,e){return Fe.makeGlue(t.dimension,e);},mathmlBuilder(t,e){var r=ri(t.dimension,e);return new dt.SpaceNode(r);}});Nt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i};},"handler"),htmlBuilder:o((t,e)=>{var r;t.alignment==="clap"?(r=Fe.makeSpan([],[Fr(t.body,e)]),r=Fe.makeSpan(["inner"],[r],e)):r=Fe.makeSpan(["inner"],[Fr(t.body,e)]);var n=Fe.makeSpan(["fix"],[]),i=Fe.makeSpan([t.alignment],[r,n],e),a=Fe.makeSpan(["strut"]);return a.style.height=Et(i.height+i.depth),i.depth&&(a.style.verticalAlign=Et(-i.depth)),i.children.unshift(a),i=Fe.makeSpan(["thinbox"],[i],e),Fe.makeSpan(["mord","vbox"],[i],e);},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=new dt.MathNode("mpadded",[yn(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width");}return r.setAttribute("width","0px"),r;},"mathmlBuilder")});Nt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,i=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",s=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:s};}});Nt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new mt("Mismatched "+t.funcName);}});oG=o((t,e)=>{switch(e.style.size){case rr.DISPLAY.size:return t.display;case rr.TEXT.size:return t.text;case rr.SCRIPT.size:return t.script;case rr.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text;}},"chooseMathStyle");Nt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:o((t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:mi(e[0]),text:mi(e[1]),script:mi(e[2]),scriptscript:mi(e[3])};},"handler"),htmlBuilder:o((t,e)=>{var r=oG(t,e),n=Bi(r,e,!1);return Fe.makeFragment(n);},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=oG(t,e);return mh(r,e);},"mathmlBuilder")});iV=o((t,e,r,n,i,a,s)=>{t=Fe.makeSpan([],[t]);var l=r&&er.isCharacterBox(r),u,h;if(e){var f=Fr(e,n.havingStyle(i.sup()),n);h={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-f.depth)};}if(r){var d=Fr(r,n.havingStyle(i.sub()),n);u={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-d.height)};}var p;if(h&&u){var m=n.fontMetrics().bigOpSpacing5+u.elem.height+u.elem.depth+u.kern+t.depth+s;p=Fe.makeVList({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:u.elem,marginLeft:Et(-a)},{type:"kern",size:u.kern},{type:"elem",elem:t},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:Et(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n);}else if(u){var g=t.height-s;p=Fe.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:u.elem,marginLeft:Et(-a)},{type:"kern",size:u.kern},{type:"elem",elem:t}]},n);}else if(h){var y=t.depth+s;p=Fe.makeVList({positionType:"bottom",positionData:y,children:[{type:"elem",elem:t},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:Et(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n);}else return t;var v=[p];if(u&&a!==0&&!l){var x=Fe.makeSpan(["mspace"],[],n);x.style.marginRight=Et(a),v.unshift(x);}return Fe.makeSpan(["mop","op-limits"],v,n);},"assembleSupSub"),aV=["\\smallint"],v0=o((t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=xr(t.base,"op"),i=!0):a=xr(t,"op");var s=e.style,l=!1;s.size===rr.DISPLAY.size&&a.symbol&&!er.contains(aV,a.name)&&(l=!0);var u;if(a.symbol){var h=l?"Size2-Regular":"Size1-Regular",f="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(f=a.name.slice(1),a.name=f==="oiint"?"\\iint":"\\iiint"),u=Fe.makeSymbol(a.name,h,"math",e,["mop","op-symbol",l?"large-op":"small-op"]),f.length>0){var d=u.italic,p=Fe.staticSvg(f+"Size"+(l?"2":"1"),e);u=Fe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:u,shift:0},{type:"elem",elem:p,shift:l?.08:0}]},e),a.name="\\"+f,u.classes.unshift("mop"),u.italic=d;}}else if(a.body){var m=Bi(a.body,e,!0);m.length===1&&m[0]instanceof ws?(u=m[0],u.classes[0]="mop"):u=Fe.makeSpan(["mop"],m,e);}else{for(var g=[],y=1;y<a.name.length;y++)g.push(Fe.mathsym(a.name[y],a.mode,e));u=Fe.makeSpan(["mop"],g,e);}var v=0,x=0;return(u instanceof ws||a.name==="\\oiint"||a.name==="\\oiiint")&&!a.suppressBaseShift&&(v=(u.height-u.depth)/2-e.fontMetrics().axisHeight,x=u.italic),i?iV(u,r,n,e,s,x,v):(v&&(u.style.position="relative",u.style.top=Et(v)),u);},"htmlBuilder$2"),Ky=o((t,e)=>{var r;if(t.symbol)r=new Qa("mo",[Ao(t.name,t.mode)]),er.contains(aV,t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new Qa("mo",ks(t.body,e));else{r=new Qa("mi",[new So(t.name.slice(1))]);var n=new Qa("mo",[Ao("\u2061","text")]);t.parentIsSupSub?r=new Qa("mrow",[r,n]):r=MG([r,n]);}return r;},"mathmlBuilder$1"),W3e={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Nt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=n;return i.length===1&&(i=W3e[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i};},"handler"),htmlBuilder:v0,mathmlBuilder:Ky});Nt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:o((t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:mi(n)};},"handler"),htmlBuilder:v0,mathmlBuilder:Ky});q3e={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Nt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r};},htmlBuilder:v0,mathmlBuilder:Ky});Nt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r};},htmlBuilder:v0,mathmlBuilder:Ky});Nt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=q3e[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n};},htmlBuilder:v0,mathmlBuilder:Ky});sV=o((t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=xr(t.base,"operatorname"),i=!0):a=xr(t,"operatorname");var s;if(a.body.length>0){for(var l=a.body.map(d=>{var p=d.text;return typeof p=="string"?{type:"textord",mode:d.mode,text:p}:d;}),u=Bi(l,e.withFont("mathrm"),!0),h=0;h<u.length;h++){var f=u[h];f instanceof ws&&(f.text=f.text.replace(/\u2212/,"-").replace(/\u2217/,"*"));}s=Fe.makeSpan(["mop"],u,e);}else s=Fe.makeSpan(["mop"],[],e);return i?iV(s,r,n,e,e.style,0,0):s;},"htmlBuilder$1"),Y3e=o((t,e)=>{for(var r=ks(t.body,e.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var a=r[i];if(!(a instanceof dt.SpaceNode))if(a instanceof dt.MathNode)switch(a.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var s=a.children[0];a.children.length===1&&s instanceof dt.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;}default:n=!1;}else n=!1;}if(n){var l=r.map(f=>f.toText()).join("");r=[new dt.TextNode(l)];}var u=new dt.MathNode("mi",r);u.setAttribute("mathvariant","normal");var h=new dt.MathNode("mo",[Ao("\u2061","text")]);return t.parentIsSupSub?new dt.MathNode("mrow",[u,h]):dt.newDocumentFragment([u,h]);},"mathmlBuilder");Nt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:mi(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1};},"handler"),htmlBuilder:sV,mathmlBuilder:Y3e});fe("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");td({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Fe.makeFragment(Bi(t.body,e,!1)):Fe.makeSpan(["mord"],Bi(t.body,e,!0),e);},mathmlBuilder(t,e){return mh(t.body,e,!0);}});Nt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n};},htmlBuilder(t,e){var r=Fr(t.body,e.havingCrampedStyle()),n=Fe.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,a=Fe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},e);return Fe.makeSpan(["mord","overline"],[a],e);},mathmlBuilder(t,e){var r=new dt.MathNode("mo",[new dt.TextNode("\u203E")]);r.setAttribute("stretchy","true");var n=new dt.MathNode("mover",[yn(t.body,e),r]);return n.setAttribute("accent","true"),n;}});Nt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:o((t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:mi(n)};},"handler"),htmlBuilder:o((t,e)=>{var r=Bi(t.body,e.withPhantom(),!1);return Fe.makeFragment(r);},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=ks(t.body,e);return new dt.MathNode("mphantom",r);},"mathmlBuilder")});Nt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:o((t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n};},"handler"),htmlBuilder:o((t,e)=>{var r=Fe.makeSpan([],[Fr(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=Fe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e),Fe.makeSpan(["mord"],[r],e);},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=ks(mi(t.body),e),n=new dt.MathNode("mphantom",r),i=new dt.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i;},"mathmlBuilder")});Nt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:o((t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n};},"handler"),htmlBuilder:o((t,e)=>{var r=Fe.makeSpan(["inner"],[Fr(t.body,e.withPhantom())]),n=Fe.makeSpan(["fix"],[]);return Fe.makeSpan(["mord","rlap"],[r,n],e);},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=ks(mi(t.body),e),n=new dt.MathNode("mphantom",r),i=new dt.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i;},"mathmlBuilder")});Nt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=xr(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i};},htmlBuilder(t,e){var r=Fr(t.body,e),n=ri(t.dy,e);return Fe.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},e);},mathmlBuilder(t,e){var r=new dt.MathNode("mpadded",[yn(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r;}});Nt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode};}});Nt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],a=xr(e[0],"size"),s=xr(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&xr(i,"size").value,width:a.value,height:s.value};},htmlBuilder(t,e){var r=Fe.makeSpan(["mord","rule"],[],e),n=ri(t.width,e),i=ri(t.height,e),a=t.shift?ri(t.shift,e):0;return r.style.borderRightWidth=Et(n),r.style.borderTopWidth=Et(i),r.style.bottom=Et(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*e.sizeMultiplier,r;},mathmlBuilder(t,e){var r=ri(t.width,e),n=ri(t.height,e),i=t.shift?ri(t.shift,e):0,a=e.color&&e.getColor()||"black",s=new dt.MathNode("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",Et(r)),s.setAttribute("height",Et(n));var l=new dt.MathNode("mpadded",[s]);return i>=0?l.setAttribute("height",Et(i)):(l.setAttribute("height",Et(i)),l.setAttribute("depth",Et(-i))),l.setAttribute("voffset",Et(i)),l;}});o(oV,"sizingGroup");lG=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],X3e=o((t,e)=>{var r=e.havingSize(t.size);return oV(t.body,r,e);},"htmlBuilder");Nt({type:"sizing",names:lG,props:{numArgs:0,allowedInText:!0},handler:o((t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:lG.indexOf(n)+1,body:a};},"handler"),htmlBuilder:X3e,mathmlBuilder:o((t,e)=>{var r=e.havingSize(t.size),n=ks(t.body,r),i=new dt.MathNode("mstyle",n);return i.setAttribute("mathsize",Et(r.sizeMultiplier)),i;},"mathmlBuilder")});Nt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:o((t,e,r)=>{var{parser:n}=t,i=!1,a=!1,s=r[0]&&xr(r[0],"ordgroup");if(s)for(var l="",u=0;u<s.body.length;++u){var h=s.body[u];if(l=h.text,l==="t")i=!0;else if(l==="b")a=!0;else{i=!1,a=!1;break;}}else i=!0,a=!0;var f=e[0];return{type:"smash",mode:n.mode,body:f,smashHeight:i,smashDepth:a};},"handler"),htmlBuilder:o((t,e)=>{var r=Fe.makeSpan([],[Fr(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(t.smashDepth&&(r.depth=0,r.children))for(var i=0;i<r.children.length;i++)r.children[i].depth=0;var a=Fe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e);return Fe.makeSpan(["mord"],[a],e);},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=new dt.MathNode("mpadded",[yn(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r;},"mathmlBuilder")});Nt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,i=r[0],a=e[0];return{type:"sqrt",mode:n.mode,body:a,index:i};},htmlBuilder(t,e){var r=Fr(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=Fe.wrapFragment(r,e);var n=e.fontMetrics(),i=n.defaultRuleThickness,a=i;e.style.id<rr.TEXT.id&&(a=e.fontMetrics().xHeight);var s=i+a/4,l=r.height+r.depth+s+i,{span:u,ruleWidth:h,advanceWidth:f}=lu.sqrtImage(l,e),d=u.height-h;d>r.height+r.depth+s&&(s=(s+d-r.height-r.depth)/2);var p=u.height-r.height-s-h;r.style.paddingLeft=Et(f);var m=Fe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+p)},{type:"elem",elem:u},{type:"kern",size:h}]},e);if(t.index){var g=e.havingStyle(rr.SCRIPTSCRIPT),y=Fr(t.index,g,e),v=.6*(m.height-m.depth),x=Fe.makeVList({positionType:"shift",positionData:-v,children:[{type:"elem",elem:y}]},e),b=Fe.makeSpan(["root"],[x]);return Fe.makeSpan(["mord","sqrt"],[b,m],e);}else return Fe.makeSpan(["mord","sqrt"],[m],e);},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new dt.MathNode("mroot",[yn(r,e),yn(n,e)]):new dt.MathNode("msqrt",[yn(r,e)]);}});cG={display:rr.DISPLAY,text:rr.TEXT,script:rr.SCRIPT,scriptscript:rr.SCRIPTSCRIPT};Nt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!0,r),s=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:s,body:a};},htmlBuilder(t,e){var r=cG[t.style],n=e.havingStyle(r).withFont("");return oV(t.body,n,e);},mathmlBuilder(t,e){var r=cG[t.style],n=e.havingStyle(r),i=ks(t.body,n),a=new dt.MathNode("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},l=s[t.style];return a.setAttribute("scriptlevel",l[0]),a.setAttribute("displaystyle",l[1]),a;}});j3e=o(function(e,r){var n=e.base;if(n){if(n.type==="op"){var i=n.limits&&(r.style.size===rr.DISPLAY.size||n.alwaysHandleSupSub);return i?v0:null;}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===rr.DISPLAY.size||n.limits);return a?sV:null;}else{if(n.type==="accent")return er.isCharacterBox(n.base)?J7:null;if(n.type==="horizBrace"){var s=!e.sub;return s===n.isOver?nV:null;}else return null;}}else return null;},"htmlBuilderDelegate");td({type:"supsub",htmlBuilder(t,e){var r=j3e(t,e);if(r)return r(t,e);var{base:n,sup:i,sub:a}=t,s=Fr(n,e),l,u,h=e.fontMetrics(),f=0,d=0,p=n&&er.isCharacterBox(n);if(i){var m=e.havingStyle(e.style.sup());l=Fr(i,m,e),p||(f=s.height-m.fontMetrics().supDrop*m.sizeMultiplier/e.sizeMultiplier);}if(a){var g=e.havingStyle(e.style.sub());u=Fr(a,g,e),p||(d=s.depth+g.fontMetrics().subDrop*g.sizeMultiplier/e.sizeMultiplier);}var y;e.style===rr.DISPLAY?y=h.sup1:e.style.cramped?y=h.sup3:y=h.sup2;var v=e.sizeMultiplier,x=Et(.5/h.ptPerEm/v),b=null;if(u){var T=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(s instanceof ws||T)&&(b=Et(-s.italic));}var C;if(l&&u){f=Math.max(f,y,l.depth+.25*h.xHeight),d=Math.max(d,h.sub2);var w=h.defaultRuleThickness,E=4*w;if(f-l.depth-(u.height-d)<E){d=E-(f-l.depth)+u.height;var _=.8*h.xHeight-(f-l.depth);_>0&&(f+=_,d-=_);}var A=[{type:"elem",elem:u,shift:d,marginRight:x,marginLeft:b},{type:"elem",elem:l,shift:-f,marginRight:x}];C=Fe.makeVList({positionType:"individualShift",children:A},e);}else if(u){d=Math.max(d,h.sub1,u.height-.8*h.xHeight);var D=[{type:"elem",elem:u,marginLeft:b,marginRight:x}];C=Fe.makeVList({positionType:"shift",positionData:d,children:D},e);}else if(l)f=Math.max(f,y,l.depth+.25*h.xHeight),C=Fe.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:l,marginRight:x}]},e);else throw new Error("supsub must have either sup or sub.");var O=$7(s,"right")||"mord";return Fe.makeSpan([O],[s,Fe.makeSpan(["msupsub"],[C])],e);},mathmlBuilder(t,e){var r=!1,n,i;t.base&&t.base.type==="horizBrace"&&(i=!!t.sup,i===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var a=[yn(t.base,e)];t.sub&&a.push(yn(t.sub,e)),t.sup&&a.push(yn(t.sup,e));var s;if(r)s=n?"mover":"munder";else if(t.sub){if(t.sup){var h=t.base;h&&h.type==="op"&&h.limits&&e.style===rr.DISPLAY||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(e.style===rr.DISPLAY||h.limits)?s="munderover":s="msubsup";}else{var u=t.base;u&&u.type==="op"&&u.limits&&(e.style===rr.DISPLAY||u.alwaysHandleSupSub)||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(u.limits||e.style===rr.DISPLAY)?s="munder":s="msub";}}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===rr.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===rr.DISPLAY)?s="mover":s="msup";}return new dt.MathNode(s,a);}});td({type:"atom",htmlBuilder(t,e){return Fe.mathsym(t.text,t.mode,e,["m"+t.family]);},mathmlBuilder(t,e){var r=new dt.MathNode("mo",[Ao(t.text,t.mode)]);if(t.family==="bin"){var n=Q7(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n);}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r;}});lV={mi:"italic",mn:"normal",mtext:"normal"};td({type:"mathord",htmlBuilder(t,e){return Fe.makeOrd(t,e,"mathord");},mathmlBuilder(t,e){var r=new dt.MathNode("mi",[Ao(t.text,t.mode,e)]),n=Q7(t,e)||"italic";return n!==lV[r.type]&&r.setAttribute("mathvariant",n),r;}});td({type:"textord",htmlBuilder(t,e){return Fe.makeOrd(t,e,"textord");},mathmlBuilder(t,e){var r=Ao(t.text,t.mode,e),n=Q7(t,e)||"normal",i;return t.mode==="text"?i=new dt.MathNode("mtext",[r]):/[0-9]/.test(t.text)?i=new dt.MathNode("mn",[r]):t.text==="\\prime"?i=new dt.MathNode("mo",[r]):i=new dt.MathNode("mi",[r]),n!==lV[i.type]&&i.setAttribute("mathvariant",n),i;}});N7={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},M7={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};td({type:"spacing",htmlBuilder(t,e){if(M7.hasOwnProperty(t.text)){var r=M7[t.text].className||"";if(t.mode==="text"){var n=Fe.makeOrd(t,e,"textord");return n.classes.push(r),n;}else return Fe.makeSpan(["mspace",r],[Fe.mathsym(t.text,t.mode,e)],e);}else{if(N7.hasOwnProperty(t.text))return Fe.makeSpan(["mspace",N7[t.text]],[],e);throw new mt('Unknown type of space "'+t.text+'"');}},mathmlBuilder(t,e){var r;if(M7.hasOwnProperty(t.text))r=new dt.MathNode("mtext",[new dt.TextNode("\xA0")]);else{if(N7.hasOwnProperty(t.text))return new dt.MathNode("mspace");throw new mt('Unknown type of space "'+t.text+'"');}return r;}});uG=o(()=>{var t=new dt.MathNode("mtd",[]);return t.setAttribute("width","50%"),t;},"pad");td({type:"tag",mathmlBuilder(t,e){var r=new dt.MathNode("mtable",[new dt.MathNode("mtr",[uG(),new dt.MathNode("mtd",[mh(t.body,e)]),uG(),new dt.MathNode("mtd",[mh(t.tag,e)])])]);return r.setAttribute("width","100%"),r;}});hG={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},fG={"\\textbf":"textbf","\\textmd":"textmd"},K3e={"\\textit":"textit","\\textup":"textup"},dG=o((t,e)=>{var r=t.font;if(r){if(hG[r])return e.withTextFontFamily(hG[r]);if(fG[r])return e.withTextFontWeight(fG[r]);if(r==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit");}else return e;return e.withTextFontShape(K3e[r]);},"optionsWithFont");Nt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"text",mode:r.mode,body:mi(i),font:n};},htmlBuilder(t,e){var r=dG(t,e),n=Bi(t.body,r,!0);return Fe.makeSpan(["mord","text"],n,r);},mathmlBuilder(t,e){var r=dG(t,e);return mh(t.body,r);}});Nt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]};},htmlBuilder(t,e){var r=Fr(t.body,e),n=Fe.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,a=Fe.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]},e);return Fe.makeSpan(["mord","underline"],[a],e);},mathmlBuilder(t,e){var r=new dt.MathNode("mo",[new dt.TextNode("\u203E")]);r.setAttribute("stretchy","true");var n=new dt.MathNode("munder",[yn(t.body,e),r]);return n.setAttribute("accentunder","true"),n;}});Nt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]};},htmlBuilder(t,e){var r=Fr(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return Fe.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},e);},mathmlBuilder(t,e){return new dt.MathNode("mpadded",[yn(t.body,e)],["vcenter"]);}});Nt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new mt("\\verb ended by end of line instead of matching delimiter");},htmlBuilder(t,e){for(var r=pG(t),n=[],i=e.havingStyle(e.style.text()),a=0;a<r.length;a++){var s=r[a];s==="~"&&(s="\\textasciitilde"),n.push(Fe.makeSymbol(s,"Typewriter-Regular",t.mode,i,["mord","texttt"]));}return Fe.makeSpan(["mord","text"].concat(i.sizingClasses(e)),Fe.tryCombineChars(n),i);},mathmlBuilder(t,e){var r=new dt.TextNode(pG(t)),n=new dt.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n;}});pG=o(t=>t.body.replace(/ /g,t.star?"\u2423":"\xA0"),"makeVerb"),dh=RG,cV=`[ \r
	]`,Q3e="\\\\[a-zA-Z@]+",Z3e="\\\\[^\uD800-\uDFFF]",J3e="("+Q3e+")"+cV+"*",e5e=`\\\\(
|[ \r	]+
?)[ \r	]*`,H7="[\u0300-\u036F]",t5e=new RegExp(H7+"+$"),r5e="("+cV+"+)|"+(e5e+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(H7+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(H7+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+J3e)+("|"+Z3e+")"),T3=(_Class19=class T3{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(r5e,"g"),this.catcodes={"%":14,"~":13};}setCatcode(e,r){this.catcodes[e]=r;}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new Co("EOF",new js(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new mt("Unexpected character: '"+e[r]+"'",new Co(e[r],new js(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=e.indexOf(`
`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex();}return new Co(i,new js(this,r,this.tokenRegex.lastIndex));}},o(_Class19,"Lexer"),_Class19),W7=(_Class20=class W7{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[];}beginGroup(){this.undefStack.push({});}endGroup(){if(this.undefStack.length===0)throw new mt("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r]);}endGroups(){for(;this.undefStack.length>0;)this.endGroup();}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e);}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e];}set(e,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i<this.undefStack.length;i++)delete this.undefStack[i][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=r);}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e]);}r==null?delete this.current[e]:this.current[e]=r;}},o(_Class20,"Namespace"),_Class20),n5e=ZG;fe("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0};});fe("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0};});fe("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0};});fe("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0};});fe("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0};});fe("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");fe("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0};});mG={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};fe("\\char",function(t){var e=t.popToken(),r,n="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`"){if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new mt("\\char` missing argument");n=e.text.charCodeAt(0);}}else r=10;if(r){if(n=mG[e.text],n==null||n>=r)throw new mt("Invalid base-"+r+" digit "+e.text);for(var i;(i=mG[t.future().text])!=null&&i<r;)n*=r,n+=i,t.popToken();}return"\\@char{"+n+"}";});oA=o((t,e,r,n)=>{var i=t.consumeArg().tokens;if(i.length!==1)throw new mt("\\newcommand's first argument must be a macro name");var a=i[0].text,s=t.isDefined(a);if(s&&!e)throw new mt("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!s&&!r)throw new mt("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var l=0;if(i=t.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var u="",h=t.expandNextToken();h.text!=="]"&&h.text!=="EOF";)u+=h.text,h=t.expandNextToken();if(!u.match(/^\s*[0-9]+\s*$/))throw new mt("Invalid number of arguments: "+u);l=parseInt(u),i=t.consumeArg().tokens;}return s&&n||t.macros.set(a,{tokens:i,numArgs:l}),"";},"newcommand");fe("\\newcommand",t=>oA(t,!1,!0,!1));fe("\\renewcommand",t=>oA(t,!0,!1,!1));fe("\\providecommand",t=>oA(t,!0,!0,!0));fe("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),"";});fe("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),"";});fe("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),dh[r],Cn.math[r],Cn.text[r]),"";});fe("\\bgroup","{");fe("\\egroup","}");fe("~","\\nobreakspace");fe("\\lq","`");fe("\\rq","'");fe("\\aa","\\r a");fe("\\AA","\\r A");fe("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");fe("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");fe("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");fe("\u212C","\\mathscr{B}");fe("\u2130","\\mathscr{E}");fe("\u2131","\\mathscr{F}");fe("\u210B","\\mathscr{H}");fe("\u2110","\\mathscr{I}");fe("\u2112","\\mathscr{L}");fe("\u2133","\\mathscr{M}");fe("\u211B","\\mathscr{R}");fe("\u212D","\\mathfrak{C}");fe("\u210C","\\mathfrak{H}");fe("\u2128","\\mathfrak{Z}");fe("\\Bbbk","\\Bbb{k}");fe("\xB7","\\cdotp");fe("\\llap","\\mathllap{\\textrm{#1}}");fe("\\rlap","\\mathrlap{\\textrm{#1}}");fe("\\clap","\\mathclap{\\textrm{#1}}");fe("\\mathstrut","\\vphantom{(}");fe("\\underbar","\\underline{\\text{#1}}");fe("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');fe("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");fe("\\ne","\\neq");fe("\u2260","\\neq");fe("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");fe("\u2209","\\notin");fe("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");fe("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");fe("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");fe("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");fe("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");fe("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");fe("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");fe("\u27C2","\\perp");fe("\u203C","\\mathclose{!\\mkern-0.8mu!}");fe("\u220C","\\notni");fe("\u231C","\\ulcorner");fe("\u231D","\\urcorner");fe("\u231E","\\llcorner");fe("\u231F","\\lrcorner");fe("\xA9","\\copyright");fe("\xAE","\\textregistered");fe("\uFE0F","\\textregistered");fe("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');fe("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');fe("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');fe("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');fe("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");fe("\u22EE","\\vdots");fe("\\varGamma","\\mathit{\\Gamma}");fe("\\varDelta","\\mathit{\\Delta}");fe("\\varTheta","\\mathit{\\Theta}");fe("\\varLambda","\\mathit{\\Lambda}");fe("\\varXi","\\mathit{\\Xi}");fe("\\varPi","\\mathit{\\Pi}");fe("\\varSigma","\\mathit{\\Sigma}");fe("\\varUpsilon","\\mathit{\\Upsilon}");fe("\\varPhi","\\mathit{\\Phi}");fe("\\varPsi","\\mathit{\\Psi}");fe("\\varOmega","\\mathit{\\Omega}");fe("\\substack","\\begin{subarray}{c}#1\\end{subarray}");fe("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");fe("\\boxed","\\fbox{$\\displaystyle{#1}$}");fe("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");fe("\\implies","\\DOTSB\\;\\Longrightarrow\\;");fe("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");fe("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");fe("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");gG={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};fe("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in gG?e=gG[r]:(r.slice(0,4)==="\\not"||r in Cn.math&&er.contains(["bin","rel"],Cn.math[r].group))&&(e="\\dotsb"),e;});lA={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};fe("\\dotso",function(t){var e=t.future().text;return e in lA?"\\ldots\\,":"\\ldots";});fe("\\dotsc",function(t){var e=t.future().text;return e in lA&&e!==","?"\\ldots\\,":"\\ldots";});fe("\\cdots",function(t){var e=t.future().text;return e in lA?"\\@cdots\\,":"\\@cdots";});fe("\\dotsb","\\cdots");fe("\\dotsm","\\cdots");fe("\\dotsi","\\!\\cdots");fe("\\dotsx","\\ldots\\,");fe("\\DOTSI","\\relax");fe("\\DOTSB","\\relax");fe("\\DOTSX","\\relax");fe("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");fe("\\,","\\tmspace+{3mu}{.1667em}");fe("\\thinspace","\\,");fe("\\>","\\mskip{4mu}");fe("\\:","\\tmspace+{4mu}{.2222em}");fe("\\medspace","\\:");fe("\\;","\\tmspace+{5mu}{.2777em}");fe("\\thickspace","\\;");fe("\\!","\\tmspace-{3mu}{.1667em}");fe("\\negthinspace","\\!");fe("\\negmedspace","\\tmspace-{4mu}{.2222em}");fe("\\negthickspace","\\tmspace-{5mu}{.277em}");fe("\\enspace","\\kern.5em ");fe("\\enskip","\\hskip.5em\\relax");fe("\\quad","\\hskip1em\\relax");fe("\\qquad","\\hskip2em\\relax");fe("\\tag","\\@ifstar\\tag@literal\\tag@paren");fe("\\tag@paren","\\tag@literal{({#1})}");fe("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new mt("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}";});fe("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");fe("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");fe("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");fe("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");fe("\\newline","\\\\\\relax");fe("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");uV=Et(Kl["Main-Regular"][84][1]-.7*Kl["Main-Regular"][65][1]);fe("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+uV+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");fe("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+uV+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");fe("\\hspace","\\@ifstar\\@hspacer\\@hspace");fe("\\@hspace","\\hskip #1\\relax");fe("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");fe("\\ordinarycolon",":");fe("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");fe("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');fe("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');fe("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');fe("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');fe("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');fe("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');fe("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');fe("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');fe("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');fe("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');fe("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');fe("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');fe("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');fe("\u2237","\\dblcolon");fe("\u2239","\\eqcolon");fe("\u2254","\\coloneqq");fe("\u2255","\\eqqcolon");fe("\u2A74","\\Coloneqq");fe("\\ratio","\\vcentcolon");fe("\\coloncolon","\\dblcolon");fe("\\colonequals","\\coloneqq");fe("\\coloncolonequals","\\Coloneqq");fe("\\equalscolon","\\eqqcolon");fe("\\equalscoloncolon","\\Eqqcolon");fe("\\colonminus","\\coloneq");fe("\\coloncolonminus","\\Coloneq");fe("\\minuscolon","\\eqcolon");fe("\\minuscoloncolon","\\Eqcolon");fe("\\coloncolonapprox","\\Colonapprox");fe("\\coloncolonsim","\\Colonsim");fe("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");fe("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");fe("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");fe("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");fe("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");fe("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");fe("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");fe("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");fe("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");fe("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");fe("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");fe("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");fe("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");fe("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");fe("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");fe("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");fe("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");fe("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");fe("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");fe("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");fe("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");fe("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");fe("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");fe("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");fe("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");fe("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");fe("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");fe("\\imath","\\html@mathml{\\@imath}{\u0131}");fe("\\jmath","\\html@mathml{\\@jmath}{\u0237}");fe("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");fe("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");fe("\u27E6","\\llbracket");fe("\u27E7","\\rrbracket");fe("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");fe("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");fe("\u2983","\\lBrace");fe("\u2984","\\rBrace");fe("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");fe("\u29B5","\\minuso");fe("\\darr","\\downarrow");fe("\\dArr","\\Downarrow");fe("\\Darr","\\Downarrow");fe("\\lang","\\langle");fe("\\rang","\\rangle");fe("\\uarr","\\uparrow");fe("\\uArr","\\Uparrow");fe("\\Uarr","\\Uparrow");fe("\\N","\\mathbb{N}");fe("\\R","\\mathbb{R}");fe("\\Z","\\mathbb{Z}");fe("\\alef","\\aleph");fe("\\alefsym","\\aleph");fe("\\Alpha","\\mathrm{A}");fe("\\Beta","\\mathrm{B}");fe("\\bull","\\bullet");fe("\\Chi","\\mathrm{X}");fe("\\clubs","\\clubsuit");fe("\\cnums","\\mathbb{C}");fe("\\Complex","\\mathbb{C}");fe("\\Dagger","\\ddagger");fe("\\diamonds","\\diamondsuit");fe("\\empty","\\emptyset");fe("\\Epsilon","\\mathrm{E}");fe("\\Eta","\\mathrm{H}");fe("\\exist","\\exists");fe("\\harr","\\leftrightarrow");fe("\\hArr","\\Leftrightarrow");fe("\\Harr","\\Leftrightarrow");fe("\\hearts","\\heartsuit");fe("\\image","\\Im");fe("\\infin","\\infty");fe("\\Iota","\\mathrm{I}");fe("\\isin","\\in");fe("\\Kappa","\\mathrm{K}");fe("\\larr","\\leftarrow");fe("\\lArr","\\Leftarrow");fe("\\Larr","\\Leftarrow");fe("\\lrarr","\\leftrightarrow");fe("\\lrArr","\\Leftrightarrow");fe("\\Lrarr","\\Leftrightarrow");fe("\\Mu","\\mathrm{M}");fe("\\natnums","\\mathbb{N}");fe("\\Nu","\\mathrm{N}");fe("\\Omicron","\\mathrm{O}");fe("\\plusmn","\\pm");fe("\\rarr","\\rightarrow");fe("\\rArr","\\Rightarrow");fe("\\Rarr","\\Rightarrow");fe("\\real","\\Re");fe("\\reals","\\mathbb{R}");fe("\\Reals","\\mathbb{R}");fe("\\Rho","\\mathrm{P}");fe("\\sdot","\\cdot");fe("\\sect","\\S");fe("\\spades","\\spadesuit");fe("\\sub","\\subset");fe("\\sube","\\subseteq");fe("\\supe","\\supseteq");fe("\\Tau","\\mathrm{T}");fe("\\thetasym","\\vartheta");fe("\\weierp","\\wp");fe("\\Zeta","\\mathrm{Z}");fe("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");fe("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");fe("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");fe("\\bra","\\mathinner{\\langle{#1}|}");fe("\\ket","\\mathinner{|{#1}\\rangle}");fe("\\braket","\\mathinner{\\langle{#1}\\rangle}");fe("\\Bra","\\left\\langle#1\\right|");fe("\\Ket","\\left|#1\\right\\rangle");hV=o(t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.consumeArg().tokens,s=e.macros.get("|"),l=e.macros.get("\\|");e.macros.beginGroup();var u=o(d=>p=>{t&&(p.macros.set("|",s),i.length&&p.macros.set("\\|",l));var m=d;if(!d&&i.length){var g=p.future();g.text==="|"&&(p.popToken(),m=!0);}return{tokens:m?i:n,numArgs:0};},"midMacro");e.macros.set("|",u(!1)),i.length&&e.macros.set("\\|",u(!0));var h=e.consumeArg().tokens,f=e.expandTokens([...a,...h,...r]);return e.macros.endGroup(),{tokens:f.reverse(),numArgs:0};},"braketHelper");fe("\\bra@ket",hV(!1));fe("\\bra@set",hV(!0));fe("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");fe("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");fe("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");fe("\\angln","{\\angl n}");fe("\\blue","\\textcolor{##6495ed}{#1}");fe("\\orange","\\textcolor{##ffa500}{#1}");fe("\\pink","\\textcolor{##ff00af}{#1}");fe("\\red","\\textcolor{##df0030}{#1}");fe("\\green","\\textcolor{##28ae7b}{#1}");fe("\\gray","\\textcolor{gray}{#1}");fe("\\purple","\\textcolor{##9d38bd}{#1}");fe("\\blueA","\\textcolor{##ccfaff}{#1}");fe("\\blueB","\\textcolor{##80f6ff}{#1}");fe("\\blueC","\\textcolor{##63d9ea}{#1}");fe("\\blueD","\\textcolor{##11accd}{#1}");fe("\\blueE","\\textcolor{##0c7f99}{#1}");fe("\\tealA","\\textcolor{##94fff5}{#1}");fe("\\tealB","\\textcolor{##26edd5}{#1}");fe("\\tealC","\\textcolor{##01d1c1}{#1}");fe("\\tealD","\\textcolor{##01a995}{#1}");fe("\\tealE","\\textcolor{##208170}{#1}");fe("\\greenA","\\textcolor{##b6ffb0}{#1}");fe("\\greenB","\\textcolor{##8af281}{#1}");fe("\\greenC","\\textcolor{##74cf70}{#1}");fe("\\greenD","\\textcolor{##1fab54}{#1}");fe("\\greenE","\\textcolor{##0d923f}{#1}");fe("\\goldA","\\textcolor{##ffd0a9}{#1}");fe("\\goldB","\\textcolor{##ffbb71}{#1}");fe("\\goldC","\\textcolor{##ff9c39}{#1}");fe("\\goldD","\\textcolor{##e07d10}{#1}");fe("\\goldE","\\textcolor{##a75a05}{#1}");fe("\\redA","\\textcolor{##fca9a9}{#1}");fe("\\redB","\\textcolor{##ff8482}{#1}");fe("\\redC","\\textcolor{##f9685d}{#1}");fe("\\redD","\\textcolor{##e84d39}{#1}");fe("\\redE","\\textcolor{##bc2612}{#1}");fe("\\maroonA","\\textcolor{##ffbde0}{#1}");fe("\\maroonB","\\textcolor{##ff92c6}{#1}");fe("\\maroonC","\\textcolor{##ed5fa6}{#1}");fe("\\maroonD","\\textcolor{##ca337c}{#1}");fe("\\maroonE","\\textcolor{##9e034e}{#1}");fe("\\purpleA","\\textcolor{##ddd7ff}{#1}");fe("\\purpleB","\\textcolor{##c6b9fc}{#1}");fe("\\purpleC","\\textcolor{##aa87ff}{#1}");fe("\\purpleD","\\textcolor{##7854ab}{#1}");fe("\\purpleE","\\textcolor{##543b78}{#1}");fe("\\mintA","\\textcolor{##f5f9e8}{#1}");fe("\\mintB","\\textcolor{##edf2df}{#1}");fe("\\mintC","\\textcolor{##e0e5cc}{#1}");fe("\\grayA","\\textcolor{##f6f7f7}{#1}");fe("\\grayB","\\textcolor{##f0f1f2}{#1}");fe("\\grayC","\\textcolor{##e3e5e6}{#1}");fe("\\grayD","\\textcolor{##d6d8da}{#1}");fe("\\grayE","\\textcolor{##babec2}{#1}");fe("\\grayF","\\textcolor{##888d93}{#1}");fe("\\grayG","\\textcolor{##626569}{#1}");fe("\\grayH","\\textcolor{##3b3e40}{#1}");fe("\\grayI","\\textcolor{##21242c}{#1}");fe("\\kaBlue","\\textcolor{##314453}{#1}");fe("\\kaGreen","\\textcolor{##71B307}{#1}");fV={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},q7=(_Class21=class q7{constructor(e,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(e),this.macros=new W7(n5e,r.macros),this.mode=n,this.stack=[];}feed(e){this.lexer=new T3(e,this.settings);}switchMode(e){this.mode=e;}beginGroup(){this.macros.beginGroup();}endGroup(){this.macros.endGroup();}endGroups(){this.macros.endGroups();}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1];}popToken(){return this.future(),this.stack.pop();}pushToken(e){this.stack.push(e);}pushTokens(e){this.stack.push(...e);}scanArgument(e){var r,n,i;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"]);}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new Co("EOF",n.loc)),this.pushTokens(i),r.range(n,"");}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break;}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var i=this.future(),a,s=0,l=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++s;else if(a.text==="}"){if(--s,s===-1)throw new mt("Extra }",a);}else if(a.text==="EOF")throw new mt("Unexpected end of input in a macro argument, expected '"+(e&&n?e[l]:"}")+"'",a);if(e&&n)if((s===0||s===1&&e[l]==="{")&&a.text===e[l]){if(++l,l===e.length){r.splice(-l,l);break;}}else l=0;}while(s!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:a};}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new mt("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;i<n.length;i++){var a=this.popToken();if(n[i]!==a.text)throw new mt("Use of the macro doesn't match its definition",a);}}for(var s=[],l=0;l<e;l++)s.push(this.consumeArg(r&&r[l+1]).tokens);return s;}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new mt("Too many expansions: infinite loop or need to increase maxExpand setting");}expandOnce(e){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||e&&i.unexpandable){if(e&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new mt("Undefined control sequence: "+n);return this.pushToken(r),!1;}this.countExpansion(1);var a=i.tokens,s=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var l=a.length-1;l>=0;--l){var u=a[l];if(u.text==="#"){if(l===0)throw new mt("Incomplete placeholder at end of macro body",u);if(u=a[--l],u.text==="#")a.splice(l+1,1);else if(/^[1-9]$/.test(u.text))a.splice(l,2,...s[+u.text-1]);else throw new mt("Not a valid argument number",u);}}}return this.pushTokens(a),a.length;}expandAfterFuture(){return this.expandOnce(),this.future();}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e;}throw new Error();}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Co(e)]):void 0;}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i);}return this.countExpansion(r.length),r;}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("");}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return;}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var a=0;if(i.indexOf("#")!==-1)for(var s=i.replace(/##/g,"");s.indexOf("#"+(a+1))!==-1;)++a;for(var l=new T3(i,this.settings),u=[],h=l.lex();h.text!=="EOF";)u.push(h),h=l.lex();u.reverse();var f={tokens:u,numArgs:a};return f;}return i;}isDefined(e){return this.macros.has(e)||dh.hasOwnProperty(e)||Cn.math.hasOwnProperty(e)||Cn.text.hasOwnProperty(e)||fV.hasOwnProperty(e);}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:dh.hasOwnProperty(e)&&!dh[e].primitive;}},o(_Class21,"MacroExpander"),_Class21),yG=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,d3=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",ʰ:"h","\u2071":"i",ʲ:"j","\u1D4F":"k",ˡ:"l","\u1D50":"m",ⁿ:"n","\u1D52":"o","\u1D56":"p",ʳ:"r",ˢ:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",ʷ:"w",ˣ:"x",ʸ:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),I7={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},vG={á:"a\u0301",à:"a\u0300",ä:"a\u0308",ǟ:"a\u0308\u0304",ã:"a\u0303",ā:"a\u0304",ă:"a\u0306",ắ:"a\u0306\u0301",ằ:"a\u0306\u0300",ẵ:"a\u0306\u0303",ǎ:"a\u030C",â:"a\u0302",ấ:"a\u0302\u0301",ầ:"a\u0302\u0300",ẫ:"a\u0302\u0303",ȧ:"a\u0307",ǡ:"a\u0307\u0304",å:"a\u030A",ǻ:"a\u030A\u0301",ḃ:"b\u0307",ć:"c\u0301",ḉ:"c\u0327\u0301",č:"c\u030C",ĉ:"c\u0302",ċ:"c\u0307",ç:"c\u0327",ď:"d\u030C",ḋ:"d\u0307",ḑ:"d\u0327",é:"e\u0301",è:"e\u0300",ë:"e\u0308",ẽ:"e\u0303",ē:"e\u0304",ḗ:"e\u0304\u0301",ḕ:"e\u0304\u0300",ĕ:"e\u0306",ḝ:"e\u0327\u0306",ě:"e\u030C",ê:"e\u0302",ế:"e\u0302\u0301",ề:"e\u0302\u0300",ễ:"e\u0302\u0303",ė:"e\u0307",ȩ:"e\u0327",ḟ:"f\u0307",ǵ:"g\u0301",ḡ:"g\u0304",ğ:"g\u0306",ǧ:"g\u030C",ĝ:"g\u0302",ġ:"g\u0307",ģ:"g\u0327",ḧ:"h\u0308",ȟ:"h\u030C",ĥ:"h\u0302",ḣ:"h\u0307",ḩ:"h\u0327",í:"i\u0301",ì:"i\u0300",ï:"i\u0308",ḯ:"i\u0308\u0301",ĩ:"i\u0303",ī:"i\u0304",ĭ:"i\u0306",ǐ:"i\u030C",î:"i\u0302",ǰ:"j\u030C",ĵ:"j\u0302",ḱ:"k\u0301",ǩ:"k\u030C",ķ:"k\u0327",ĺ:"l\u0301",ľ:"l\u030C",ļ:"l\u0327",ḿ:"m\u0301",ṁ:"m\u0307",ń:"n\u0301",ǹ:"n\u0300",ñ:"n\u0303",ň:"n\u030C",ṅ:"n\u0307",ņ:"n\u0327",ó:"o\u0301",ò:"o\u0300",ö:"o\u0308",ȫ:"o\u0308\u0304",õ:"o\u0303",ṍ:"o\u0303\u0301",ṏ:"o\u0303\u0308",ȭ:"o\u0303\u0304",ō:"o\u0304",ṓ:"o\u0304\u0301",ṑ:"o\u0304\u0300",ŏ:"o\u0306",ǒ:"o\u030C",ô:"o\u0302",ố:"o\u0302\u0301",ồ:"o\u0302\u0300",ỗ:"o\u0302\u0303",ȯ:"o\u0307",ȱ:"o\u0307\u0304",ő:"o\u030B",ṕ:"p\u0301",ṗ:"p\u0307",ŕ:"r\u0301",ř:"r\u030C",ṙ:"r\u0307",ŗ:"r\u0327",ś:"s\u0301",ṥ:"s\u0301\u0307",š:"s\u030C",ṧ:"s\u030C\u0307",ŝ:"s\u0302",ṡ:"s\u0307",ş:"s\u0327",ẗ:"t\u0308",ť:"t\u030C",ṫ:"t\u0307",ţ:"t\u0327",ú:"u\u0301",ù:"u\u0300",ü:"u\u0308",ǘ:"u\u0308\u0301",ǜ:"u\u0308\u0300",ǖ:"u\u0308\u0304",ǚ:"u\u0308\u030C",ũ:"u\u0303",ṹ:"u\u0303\u0301",ū:"u\u0304",ṻ:"u\u0304\u0308",ŭ:"u\u0306",ǔ:"u\u030C",û:"u\u0302",ů:"u\u030A",ű:"u\u030B",ṽ:"v\u0303",ẃ:"w\u0301",ẁ:"w\u0300",ẅ:"w\u0308",ŵ:"w\u0302",ẇ:"w\u0307",ẘ:"w\u030A",ẍ:"x\u0308",ẋ:"x\u0307",ý:"y\u0301",ỳ:"y\u0300",ÿ:"y\u0308",ỹ:"y\u0303",ȳ:"y\u0304",ŷ:"y\u0302",ẏ:"y\u0307",ẙ:"y\u030A",ź:"z\u0301",ž:"z\u030C",ẑ:"z\u0302",ż:"z\u0307",Á:"A\u0301",À:"A\u0300",Ä:"A\u0308",Ǟ:"A\u0308\u0304",Ã:"A\u0303",Ā:"A\u0304",Ă:"A\u0306",Ắ:"A\u0306\u0301",Ằ:"A\u0306\u0300",Ẵ:"A\u0306\u0303",Ǎ:"A\u030C",Â:"A\u0302",Ấ:"A\u0302\u0301",Ầ:"A\u0302\u0300",Ẫ:"A\u0302\u0303",Ȧ:"A\u0307",Ǡ:"A\u0307\u0304",Å:"A\u030A",Ǻ:"A\u030A\u0301",Ḃ:"B\u0307",Ć:"C\u0301",Ḉ:"C\u0327\u0301",Č:"C\u030C",Ĉ:"C\u0302",Ċ:"C\u0307",Ç:"C\u0327",Ď:"D\u030C",Ḋ:"D\u0307",Ḑ:"D\u0327",É:"E\u0301",È:"E\u0300",Ë:"E\u0308",Ẽ:"E\u0303",Ē:"E\u0304",Ḗ:"E\u0304\u0301",Ḕ:"E\u0304\u0300",Ĕ:"E\u0306",Ḝ:"E\u0327\u0306",Ě:"E\u030C",Ê:"E\u0302",Ế:"E\u0302\u0301",Ề:"E\u0302\u0300",Ễ:"E\u0302\u0303",Ė:"E\u0307",Ȩ:"E\u0327",Ḟ:"F\u0307",Ǵ:"G\u0301",Ḡ:"G\u0304",Ğ:"G\u0306",Ǧ:"G\u030C",Ĝ:"G\u0302",Ġ:"G\u0307",Ģ:"G\u0327",Ḧ:"H\u0308",Ȟ:"H\u030C",Ĥ:"H\u0302",Ḣ:"H\u0307",Ḩ:"H\u0327",Í:"I\u0301",Ì:"I\u0300",Ï:"I\u0308",Ḯ:"I\u0308\u0301",Ĩ:"I\u0303",Ī:"I\u0304",Ĭ:"I\u0306",Ǐ:"I\u030C",Î:"I\u0302",İ:"I\u0307",Ĵ:"J\u0302",Ḱ:"K\u0301",Ǩ:"K\u030C",Ķ:"K\u0327",Ĺ:"L\u0301",Ľ:"L\u030C",Ļ:"L\u0327",Ḿ:"M\u0301",Ṁ:"M\u0307",Ń:"N\u0301",Ǹ:"N\u0300",Ñ:"N\u0303",Ň:"N\u030C",Ṅ:"N\u0307",Ņ:"N\u0327",Ó:"O\u0301",Ò:"O\u0300",Ö:"O\u0308",Ȫ:"O\u0308\u0304",Õ:"O\u0303",Ṍ:"O\u0303\u0301",Ṏ:"O\u0303\u0308",Ȭ:"O\u0303\u0304",Ō:"O\u0304",Ṓ:"O\u0304\u0301",Ṑ:"O\u0304\u0300",Ŏ:"O\u0306",Ǒ:"O\u030C",Ô:"O\u0302",Ố:"O\u0302\u0301",Ồ:"O\u0302\u0300",Ỗ:"O\u0302\u0303",Ȯ:"O\u0307",Ȱ:"O\u0307\u0304",Ő:"O\u030B",Ṕ:"P\u0301",Ṗ:"P\u0307",Ŕ:"R\u0301",Ř:"R\u030C",Ṙ:"R\u0307",Ŗ:"R\u0327",Ś:"S\u0301",Ṥ:"S\u0301\u0307",Š:"S\u030C",Ṧ:"S\u030C\u0307",Ŝ:"S\u0302",Ṡ:"S\u0307",Ş:"S\u0327",Ť:"T\u030C",Ṫ:"T\u0307",Ţ:"T\u0327",Ú:"U\u0301",Ù:"U\u0300",Ü:"U\u0308",Ǘ:"U\u0308\u0301",Ǜ:"U\u0308\u0300",Ǖ:"U\u0308\u0304",Ǚ:"U\u0308\u030C",Ũ:"U\u0303",Ṹ:"U\u0303\u0301",Ū:"U\u0304",Ṻ:"U\u0304\u0308",Ŭ:"U\u0306",Ǔ:"U\u030C",Û:"U\u0302",Ů:"U\u030A",Ű:"U\u030B",Ṽ:"V\u0303",Ẃ:"W\u0301",Ẁ:"W\u0300",Ẅ:"W\u0308",Ŵ:"W\u0302",Ẇ:"W\u0307",Ẍ:"X\u0308",Ẋ:"X\u0307",Ý:"Y\u0301",Ỳ:"Y\u0300",Ÿ:"Y\u0308",Ỹ:"Y\u0303",Ȳ:"Y\u0304",Ŷ:"Y\u0302",Ẏ:"Y\u0307",Ź:"Z\u0301",Ž:"Z\u030C",Ẑ:"Z\u0302",Ż:"Z\u0307",ά:"\u03B1\u0301",ὰ:"\u03B1\u0300",ᾱ:"\u03B1\u0304",ᾰ:"\u03B1\u0306",έ:"\u03B5\u0301",ὲ:"\u03B5\u0300",ή:"\u03B7\u0301",ὴ:"\u03B7\u0300",ί:"\u03B9\u0301",ὶ:"\u03B9\u0300",ϊ:"\u03B9\u0308",ΐ:"\u03B9\u0308\u0301",ῒ:"\u03B9\u0308\u0300",ῑ:"\u03B9\u0304",ῐ:"\u03B9\u0306",ό:"\u03BF\u0301",ὸ:"\u03BF\u0300",ύ:"\u03C5\u0301",ὺ:"\u03C5\u0300",ϋ:"\u03C5\u0308",ΰ:"\u03C5\u0308\u0301",ῢ:"\u03C5\u0308\u0300",ῡ:"\u03C5\u0304",ῠ:"\u03C5\u0306",ώ:"\u03C9\u0301",ὼ:"\u03C9\u0300",Ύ:"\u03A5\u0301",Ὺ:"\u03A5\u0300",Ϋ:"\u03A5\u0308",Ῡ:"\u03A5\u0304",Ῠ:"\u03A5\u0306",Ώ:"\u03A9\u0301",Ὼ:"\u03A9\u0300"},w3=(_t6=class t{constructor(e,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new q7(e,r,this.mode),this.settings=r,this.leftrightDepth=0;}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new mt("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume();}consume(){this.nextToken=null;}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken;}switchMode(e){this.mode=e,this.gullet.switchMode(e);}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e;}finally{this.gullet.endGroups();}}subparse(e){var r=this.nextToken;this.consume(),this.gullet.pushToken(new Co("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n;}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(t.endOfExpression.indexOf(i.text)!==-1||r&&i.text===r||e&&dh[i.text]&&dh[i.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue;}else break;n.push(a);}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n);}handleInfixNodes(e){for(var r=-1,n,i=0;i<e.length;i++)if(e[i].type==="infix"){if(r!==-1)throw new mt("only one infix operator per group",e[i].token);r=i,n=e[i].replaceWith;}if(r!==-1&&n){var a,s,l=e.slice(0,r),u=e.slice(r+1);l.length===1&&l[0].type==="ordgroup"?a=l[0]:a={type:"ordgroup",mode:this.mode,body:l},u.length===1&&u[0].type==="ordgroup"?s=u[0]:s={type:"ordgroup",mode:this.mode,body:u};var h;return n==="\\\\abovefrac"?h=this.callFunction(n,[a,e[r],s],[]):h=this.callFunction(n,[a,s],[]),[h];}else return e;}handleSupSubscript(e){var r=this.fetch(),n=r.text;this.consume(),this.consumeSpaces();var i;do{var a;i=this.parseGroup(e);}while(((a=i)==null?void 0:a.type)==="internal");if(!i)throw new mt("Expected group after '"+n+"'",r);return i;}formatUnsupportedCmd(e){for(var r=[],n=0;n<e.length;n++)r.push({type:"textord",mode:"text",text:e[n]});var i={type:"text",mode:this.mode,body:r},a={type:"color",mode:this.mode,color:this.settings.errorColor,body:[i]};return a;}parseAtom(e){var r=this.parseGroup("atom",e);if((r===null||r===void 0?void 0:r.type)==="internal"||this.mode==="text")return r;for(var n,i;;){this.consumeSpaces();var a=this.fetch();if(a.text==="\\limits"||a.text==="\\nolimits"){if(r&&r.type==="op"){var s=a.text==="\\limits";r.limits=s,r.alwaysHandleSupSub=!0;}else if(r&&r.type==="operatorname")r.alwaysHandleSupSub&&(r.limits=a.text==="\\limits");else throw new mt("Limit controls must follow a math operator",a);this.consume();}else if(a.text==="^"){if(n)throw new mt("Double superscript",a);n=this.handleSupSubscript("superscript");}else if(a.text==="_"){if(i)throw new mt("Double subscript",a);i=this.handleSupSubscript("subscript");}else if(a.text==="'"){if(n)throw new mt("Double superscript",a);var l={type:"textord",mode:this.mode,text:"\\prime"},u=[l];for(this.consume();this.fetch().text==="'";)u.push(l),this.consume();this.fetch().text==="^"&&u.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:u};}else if(d3[a.text]){var h=yG.test(a.text),f=[];for(f.push(new Co(d3[a.text])),this.consume();;){var d=this.fetch().text;if(!d3[d]||yG.test(d)!==h)break;f.unshift(new Co(d3[d])),this.consume();}var p=this.subparse(f);h?i={type:"ordgroup",mode:"math",body:p}:n={type:"ordgroup",mode:"math",body:p};}else break;}return n||i?{type:"supsub",mode:this.mode,base:r,sup:n,sub:i}:r;}parseFunction(e,r){var n=this.fetch(),i=n.text,a=dh[i];if(!a)return null;if(this.consume(),r&&r!=="atom"&&!a.allowedInArgument)throw new mt("Got function '"+i+"' with no arguments"+(r?" as "+r:""),n);if(this.mode==="text"&&!a.allowedInText)throw new mt("Can't use function '"+i+"' in text mode",n);if(this.mode==="math"&&a.allowedInMath===!1)throw new mt("Can't use function '"+i+"' in math mode",n);var{args:s,optArgs:l}=this.parseArguments(i,a);return this.callFunction(i,s,l,n,e);}callFunction(e,r,n,i,a){var s={funcName:e,parser:this,token:i,breakOnTokenText:a},l=dh[e];if(l&&l.handler)return l.handler(s,r,n);throw new mt("No function handler for "+e);}parseArguments(e,r){var n=r.numArgs+r.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var i=[],a=[],s=0;s<n;s++){var l=r.argTypes&&r.argTypes[s],u=s<r.numOptionalArgs;(r.primitive&&l==null||r.type==="sqrt"&&s===1&&a[0]==null)&&(l="primitive");var h=this.parseGroupOfType("argument to '"+e+"'",l,u);if(u)a.push(h);else if(h!=null)i.push(h);else throw new mt("Null argument, please report this as a bug");}return{args:i,optArgs:a};}parseGroupOfType(e,r,n){switch(r){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,r);case"hbox":{var i=this.parseArgumentGroup(n,"text");return i!=null?{type:"styling",mode:i.mode,body:[i],style:"text"}:null;}case"raw":{var a=this.parseStringGroup("raw",n);return a!=null?{type:"raw",mode:"text",string:a.text}:null;}case"primitive":{if(n)throw new mt("A primitive argument cannot be optional");var s=this.parseGroup(e);if(s==null)throw new mt("Expected group as "+e,this.fetch());return s;}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new mt("Unknown group type as "+e,this.fetch());}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume();}parseStringGroup(e,r){var n=this.gullet.scanArgument(r);if(n==null)return null;for(var i="",a;(a=this.fetch()).text!=="EOF";)i+=a.text,this.consume();return this.consume(),n.text=i,n;}parseRegexGroup(e,r){for(var n=this.fetch(),i=n,a="",s;(s=this.fetch()).text!=="EOF"&&e.test(a+s.text);)i=s,a+=i.text,this.consume();if(a==="")throw new mt("Invalid "+r+": '"+n.text+"'",n);return n.range(i,a);}parseColorGroup(e){var r=this.parseStringGroup("color",e);if(r==null)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(r.text);if(!n)throw new mt("Invalid color: '"+r.text+"'",r);var i=n[0];return /^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i};}parseSizeGroup(e){var r,n=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?r=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):r=this.parseStringGroup("size",e),!r)return null;!e&&r.text.length===0&&(r.text="0pt",n=!0);var i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r.text);if(!i)throw new mt("Invalid size: '"+r.text+"'",r);var a={number:+(i[1]+i[2]),unit:i[3]};if(!wG(a))throw new mt("Invalid unit: '"+a.unit+"'",r);return{type:"size",mode:this.mode,value:a,isBlank:n};}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),r==null)return null;var n=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n};}parseArgumentGroup(e,r){var n=this.gullet.scanArgument(e);if(n==null)return null;var i=this.mode;r&&this.switchMode(r),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var s={type:"ordgroup",mode:this.mode,loc:n.loc,body:a};return r&&this.switchMode(i),s;}parseGroup(e,r){var n=this.fetch(),i=n.text,a;if(i==="{"||i==="\\begingroup"){this.consume();var s=i==="{"?"}":"\\endgroup";this.gullet.beginGroup();var l=this.parseExpression(!1,s),u=this.fetch();this.expect(s),this.gullet.endGroup(),a={type:"ordgroup",mode:this.mode,loc:js.range(n,u),body:l,semisimple:i==="\\begingroup"||void 0};}else if(a=this.parseFunction(r,e)||this.parseSymbol(),a==null&&i[0]==="\\"&&!fV.hasOwnProperty(i)){if(this.settings.throwOnError)throw new mt("Undefined control sequence: "+i,n);a=this.formatUnsupportedCmd(i),this.consume();}return a;}formLigatures(e){for(var r=e.length-1,n=0;n<r;++n){var i=e[n],a=i.text;a==="-"&&e[n+1].text==="-"&&(n+1<r&&e[n+2].text==="-"?(e.splice(n,3,{type:"textord",mode:"text",loc:js.range(i,e[n+2]),text:"---"}),r-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:js.range(i,e[n+1]),text:"--"}),r-=1)),(a==="'"||a==="`")&&e[n+1].text===a&&(e.splice(n,2,{type:"textord",mode:"text",loc:js.range(i,e[n+1]),text:a+a}),r-=1);}}parseSymbol(){var e=this.fetch(),r=e.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();var n=r.slice(5),i=n.charAt(0)==="*";if(i&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new mt(`\\verb assertion failed --
                    please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:i};}vG.hasOwnProperty(r[0])&&!Cn[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',e),r=vG[r[0]]+r.slice(1));var a=t5e.exec(r);a&&(r=r.substring(0,a.index),r==="i"?r="\u0131":r==="j"&&(r="\u0237"));var s;if(Cn[this.mode][r]){this.settings.strict&&this.mode==="math"&&F7.indexOf(r)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var l=Cn[this.mode][r].group,u=js.range(e),h;if(X4e.hasOwnProperty(l)){var f=l;h={type:"atom",mode:this.mode,family:f,loc:u,text:r};}else h={type:l,mode:this.mode,loc:u,text:r};s=h;}else if(r.charCodeAt(0)>=128)this.settings.strict&&(bG(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),s={type:"textord",mode:"text",loc:js.range(e),text:r};else return null;if(this.consume(),a)for(var d=0;d<a[0].length;d++){var p=a[0][d];if(!I7[p])throw new mt("Unknown accent ' "+p+"'",e);var m=I7[p][this.mode]||I7[p].text;if(!m)throw new mt("Accent "+p+" unsupported in "+this.mode+" mode",e);s={type:"accent",mode:this.mode,loc:js.range(e),label:m,isStretchy:!1,isShifty:!0,base:s};}return s;}},o(_t6,"Parser"),_t6);w3.endOfExpression=["}","\\endgroup","\\end","\\right","&"];cA=o(function(e,r){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new w3(e,r);delete n.gullet.macros.current["\\df@tag"];var i=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new mt("\\tag works only in display equations");i=[{type:"tag",mode:"text",body:i,tag:n.subparse([new Co("\\df@tag")])}];}return i;},"parseTree"),uA=o(function(e,r,n){r.textContent="";var i=D3(e,n).toNode();r.appendChild(i);},"render");typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),uA=o(function(){throw new mt("KaTeX doesn't work in quirks mode.");},"render"));dV=o(function(e,r){var n=D3(e,r).toMarkup();return n;},"renderToString"),pV=o(function(e,r){var n=new Wy(r);return cA(e,n);},"generateParseTree"),mV=o(function(e,r,n){if(n.throwOnError||!(e instanceof mt))throw e;var i=Fe.makeSpan(["katex-error"],[new ws(r)]);return i.setAttribute("title",e.toString()),i.setAttribute("style","color:"+n.errorColor),i;},"renderError"),D3=o(function(e,r){var n=new Wy(r);try{var i=cA(e,n);return g3e(i,e,n);}catch(a){return mV(a,e,n);}},"renderToDomTree"),gV=o(function(e,r){var n=new Wy(r);try{var i=cA(e,n);return y3e(i,e,n);}catch(a){return mV(a,e,n);}},"renderToHTMLTree"),yV="0.16.22",vV={Span:ed,Anchor:Yy,SymbolNode:ws,SvgNode:hl,PathNode:Ql,LineNode:Xy},i5e={version:yV,render:uA,renderToString:dV,ParseError:mt,SETTINGS_SCHEMA:Uy,__parse:pV,__renderToDomTree:D3,__renderToHTMLTree:gV,__setFontMetrics:TG,__defineSymbol:G,__defineFunction:Nt,__defineMacro:fe,__domTree:vV};});function o5e(){let t="data-temp-href-target";hh.addHook("beforeSanitizeAttributes",e=>{var _e$getAttribute;e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,(_e$getAttribute=e.getAttribute("target"))!==null&&_e$getAttribute!==void 0?_e$getAttribute:"");}),hh.addHook("afterSanitizeAttributes",e=>{var _e$getAttribute2;e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",(_e$getAttribute2=e.getAttribute(t))!==null&&_e$getAttribute2!==void 0?_e$getAttribute2:""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"));});}var rd,a5e,s5e,kV,TV,ar,l5e,c5e,u5e,h5e,EV,fu,mr,f5e,d5e,tc,hA,p5e,m5e,wV,L3,gi,nd,g5e,yh,Ze,dr=N(()=>{"use strict";T7();rd=/<br\s*\/?>/gi,a5e=o(t=>t?EV(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),s5e=(()=>{let t=!1;return()=>{t||(o5e(),t=!0);};})();o(o5e,"setupDompurifyHooks");kV=o(t=>(s5e(),hh.sanitize(t)),"removeScript"),TV=o((t,e)=>{var _e$flowchart;if(((_e$flowchart=e.flowchart)===null||_e$flowchart===void 0?void 0:_e$flowchart.htmlLabels)!==!1){let r=e.securityLevel;r==="antiscript"||r==="strict"?t=kV(t):r!=="loose"&&(t=EV(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=h5e(t));}return t;},"sanitizeMore"),ar=o((t,e)=>t&&(e.dompurifyConfig?t=hh.sanitize(TV(t,e),e.dompurifyConfig).toString():t=hh.sanitize(TV(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),l5e=o((t,e)=>typeof t=="string"?ar(t,e):t.flat().map(r=>ar(r,e)),"sanitizeTextOrArray"),c5e=o(t=>rd.test(t),"hasBreaks"),u5e=o(t=>t.split(rd),"splitBreaks"),h5e=o(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),EV=o(t=>t.replace(rd,"#br#"),"breakToPlaceholder"),fu=o(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e;},"getUrl"),mr=o(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),f5e=o(function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e);},"getMax"),d5e=o(function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e);},"getMin"),tc=o(function(t){let e=t.split(/(,)/),r=[];for(let n=0;n<e.length;n++){let i=e[n];if(i===","&&n>0&&n+1<e.length){let a=e[n-1],s=e[n+1];p5e(a,s)&&(i=a+","+s,n++,r.pop());}r.push(m5e(i));}return r.join("");},"parseGenericTypes"),hA=o((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),p5e=o((t,e)=>{let r=hA(t,"~"),n=hA(e,"~");return r===1&&n===1;},"shouldCombineSets"),m5e=o(t=>{let e=hA(t,"~"),r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let n=[...t],i=n.indexOf("~"),a=n.lastIndexOf("~");for(;i!==-1&&a!==-1&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("");},"processSet"),wV=o(()=>window.MathMLElement!==void 0,"isMathMLSupported"),L3=/\$\$(.*)\$\$/g,gi=o(t=>{var _t$match$length,_t$match;return((_t$match$length=(_t$match=t.match(L3))===null||_t$match===void 0?void 0:_t$match.length)!==null&&_t$match$length!==void 0?_t$match$length:0)>0;},"hasKatex"),nd=o(async(t,e)=>{var _document$querySelect;let r=document.createElement("div");r.innerHTML=await yh(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",(_document$querySelect=document.querySelector("body"))===null||_document$querySelect===void 0?void 0:_document$querySelect.insertAdjacentElement("beforeend",r);let i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i;},"calculateMathMLDimensions"),g5e=o(async(t,e)=>{if(!gi(t))return t;if(!(wV()||e.legacyMathML||e.forceLegacyMathML))return t.replace(L3,"MathML is unsupported in this environment.");{let{default:r}=await Promise.resolve().then(()=>(bV(),xV)),n=e.forceLegacyMathML||!wV()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(rd).map(i=>gi(i)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${i}</div>`:`<div>${i}</div>`).join("").replace(L3,(i,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""));}return t.replace(L3,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.");},"renderKatexUnsanitized"),yh=o(async(t,e)=>ar(await g5e(t,e),e),"renderKatexSanitized"),Ze={getRows:a5e,sanitizeText:ar,sanitizeTextOrArray:l5e,hasBreaks:c5e,splitBreaks:u5e,lineBreakRegex:rd,removeScript:kV,getUrl:fu,evaluate:mr,getMax:f5e,getMin:d5e};});var dA,fA,SV,R3,CV,AV,Es,rc=N(()=>{"use strict";M$();Jn();dr();yt();dA={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},fA=new Map(),SV=new Map(),R3=o(t=>{for(let e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(X.debug("Registering icon pack:",e.name),"loader"in e)SV.set(e.name,e.loader);else if("icons"in e)fA.set(e.name,e.icons);else throw X.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');}},"registerIconPacks"),CV=o(async(t,e)=>{let r=VC(t,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${t}`);let n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${t}`);let i=fA.get(n);if(!i){let s=SV.get(n);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...(await s()),prefix:n},fA.set(n,i);}catch(l){throw X.error(l),new Error(`Failed to load icon set: ${r.prefix}`);}}let a=HC(i,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a;},"getRegisteredIconData"),AV=o(async t=>{try{return await CV(t),!0;}catch{return!1;}},"isIconAvailable"),Es=o(async(t,e,r)=>{let n;try{n=await CV(t,e===null||e===void 0?void 0:e.fallbackPrefix);}catch(s){X.error(s),n=dA;}let i=qC(n,e),a=XC(YC(i.body),{...i.attributes,...r});return ar(a,Qt());},"getIconSVG");});function N3(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from(typeof t=="string"?[t]:t);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var i=n.reduce(function(l,u){var h=u.match(/\n([\t ]+|(?!\s).)/g);return h?l.concat(h.map(function(f){var d,p;return(p=(d=f.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0;})):l;},[]);if(i.length){var a=new RegExp(`
[	 ]{`+Math.min.apply(Math,i)+"}","g");n=n.map(function(l){return l.replace(a,`
`);});}n[0]=n[0].replace(/^\r?\n/,"");var s=n[0];return e.forEach(function(l,u){var h=s.match(/(?:^|\n)( *)$/),f=h?h[1]:"",d=l;typeof l=="string"&&l.includes(`
`)&&(d=String(l).split(`
`).map(function(p,m){return m===0?p:""+f+p;}).join(`
`)),s+=d+n[u+1];}),s;}var pA=N(()=>{"use strict";o(N3,"dedent");});var M3,id,_V,I3=N(()=>{"use strict";M3=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,id=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_V=/\s*%%.*\n/gm;});var x0,mA=N(()=>{"use strict";var _Class22;x0=(_Class22=class x0 extends Error{constructor(e){super(e),this.name="UnknownDiagramError";}},o(_Class22,"UnknownDiagramError"),_Class22);});var du,b0,Qy,gA,DV,ad=N(()=>{"use strict";yt();I3();mA();du={},b0=o(function(t,e){t=t.replace(M3,"").replace(id,"").replace(_V,`
`);for(let[r,{detector:n}]of Object.entries(du))if(n(t,e))return r;throw new x0(`No diagram type detected matching given configuration for text: ${t}`);},"detectType"),Qy=o((...t)=>{for(let{id:e,detector:r,loader:n}of t)gA(e,r,n);},"registerLazyLoadedDiagrams"),gA=o((t,e,r)=>{du[t]&&X.warn(`Detector with key ${t} already exists. Overwriting.`),du[t]={detector:e,loader:r},X.debug(`Detector with key ${t} added${r?" with loader":""}`);},"addDetector"),DV=o(t=>du[t].loader,"getDiagramLoader");});var Zy,LV,yA=N(()=>{"use strict";Zy=function(){var t=o(function(ze,Le,Ie,xe){for(Ie=Ie||{},xe=ze.length;xe--;Ie[ze[xe]]=Le);return Ie;},"o"),e=[1,24],r=[1,25],n=[1,26],i=[1,27],a=[1,28],s=[1,63],l=[1,64],u=[1,65],h=[1,66],f=[1,67],d=[1,68],p=[1,69],m=[1,29],g=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],T=[1,35],C=[1,36],w=[1,37],E=[1,38],_=[1,39],A=[1,40],D=[1,41],O=[1,42],R=[1,43],k=[1,44],L=[1,45],S=[1,46],I=[1,47],M=[1,48],P=[1,50],B=[1,51],F=[1,52],z=[1,53],$=[1,54],U=[1,55],K=[1,56],ee=[1,57],Y=[1,58],ce=[1,59],Z=[1,60],ue=[14,42],Q=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],j=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ne=[1,82],te=[1,83],he=[1,84],le=[1,85],J=[12,14,42],Se=[12,14,33,42],se=[12,14,33,42,76,77,79,80],ae=[12,33],Oe=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ye={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:o(function(Le,Ie,xe,q,de,ie,oe){var V=ie.length-1;switch(de){case 3:q.setDirection("TB");break;case 4:q.setDirection("BT");break;case 5:q.setDirection("RL");break;case 6:q.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:q.setC4Type(ie[V-3]);break;case 19:q.setTitle(ie[V].substring(6)),this.$=ie[V].substring(6);break;case 20:q.setAccDescription(ie[V].substring(15)),this.$=ie[V].substring(15);break;case 21:this.$=ie[V].trim(),q.setTitle(this.$);break;case 22:case 23:this.$=ie[V].trim(),q.setAccDescription(this.$);break;case 28:ie[V].splice(2,0,"ENTERPRISE"),q.addPersonOrSystemBoundary(...ie[V]),this.$=ie[V];break;case 29:ie[V].splice(2,0,"SYSTEM"),q.addPersonOrSystemBoundary(...ie[V]),this.$=ie[V];break;case 30:q.addPersonOrSystemBoundary(...ie[V]),this.$=ie[V];break;case 31:ie[V].splice(2,0,"CONTAINER"),q.addContainerBoundary(...ie[V]),this.$=ie[V];break;case 32:q.addDeploymentNode("node",...ie[V]),this.$=ie[V];break;case 33:q.addDeploymentNode("nodeL",...ie[V]),this.$=ie[V];break;case 34:q.addDeploymentNode("nodeR",...ie[V]),this.$=ie[V];break;case 35:q.popBoundaryParseStack();break;case 39:q.addPersonOrSystem("person",...ie[V]),this.$=ie[V];break;case 40:q.addPersonOrSystem("external_person",...ie[V]),this.$=ie[V];break;case 41:q.addPersonOrSystem("system",...ie[V]),this.$=ie[V];break;case 42:q.addPersonOrSystem("system_db",...ie[V]),this.$=ie[V];break;case 43:q.addPersonOrSystem("system_queue",...ie[V]),this.$=ie[V];break;case 44:q.addPersonOrSystem("external_system",...ie[V]),this.$=ie[V];break;case 45:q.addPersonOrSystem("external_system_db",...ie[V]),this.$=ie[V];break;case 46:q.addPersonOrSystem("external_system_queue",...ie[V]),this.$=ie[V];break;case 47:q.addContainer("container",...ie[V]),this.$=ie[V];break;case 48:q.addContainer("container_db",...ie[V]),this.$=ie[V];break;case 49:q.addContainer("container_queue",...ie[V]),this.$=ie[V];break;case 50:q.addContainer("external_container",...ie[V]),this.$=ie[V];break;case 51:q.addContainer("external_container_db",...ie[V]),this.$=ie[V];break;case 52:q.addContainer("external_container_queue",...ie[V]),this.$=ie[V];break;case 53:q.addComponent("component",...ie[V]),this.$=ie[V];break;case 54:q.addComponent("component_db",...ie[V]),this.$=ie[V];break;case 55:q.addComponent("component_queue",...ie[V]),this.$=ie[V];break;case 56:q.addComponent("external_component",...ie[V]),this.$=ie[V];break;case 57:q.addComponent("external_component_db",...ie[V]),this.$=ie[V];break;case 58:q.addComponent("external_component_queue",...ie[V]),this.$=ie[V];break;case 60:q.addRel("rel",...ie[V]),this.$=ie[V];break;case 61:q.addRel("birel",...ie[V]),this.$=ie[V];break;case 62:q.addRel("rel_u",...ie[V]),this.$=ie[V];break;case 63:q.addRel("rel_d",...ie[V]),this.$=ie[V];break;case 64:q.addRel("rel_l",...ie[V]),this.$=ie[V];break;case 65:q.addRel("rel_r",...ie[V]),this.$=ie[V];break;case 66:q.addRel("rel_b",...ie[V]),this.$=ie[V];break;case 67:ie[V].splice(0,1),q.addRel("rel",...ie[V]),this.$=ie[V];break;case 68:q.updateElStyle("update_el_style",...ie[V]),this.$=ie[V];break;case 69:q.updateRelStyle("update_rel_style",...ie[V]),this.$=ie[V];break;case 70:q.updateLayoutConfig("update_layout_config",...ie[V]),this.$=ie[V];break;case 71:this.$=[ie[V]];break;case 72:ie[V].unshift(ie[V-1]),this.$=ie[V];break;case 73:case 75:this.$=ie[V].trim();break;case 74:let Te={};Te[ie[V-1].trim()]=ie[V].trim(),this.$=Te;break;case 76:this.$="";break;}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:C,52:w,53:E,54:_,55:A,56:D,57:O,58:R,59:k,60:L,61:S,62:I,63:M,64:P,65:B,66:F,67:z,68:$,69:U,70:K,71:ee,72:Y,73:ce,74:Z},{13:70,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:C,52:w,53:E,54:_,55:A,56:D,57:O,58:R,59:k,60:L,61:S,62:I,63:M,64:P,65:B,66:F,67:z,68:$,69:U,70:K,71:ee,72:Y,73:ce,74:Z},{13:71,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:C,52:w,53:E,54:_,55:A,56:D,57:O,58:R,59:k,60:L,61:S,62:I,63:M,64:P,65:B,66:F,67:z,68:$,69:U,70:K,71:ee,72:Y,73:ce,74:Z},{13:72,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:C,52:w,53:E,54:_,55:A,56:D,57:O,58:R,59:k,60:L,61:S,62:I,63:M,64:P,65:B,66:F,67:z,68:$,69:U,70:K,71:ee,72:Y,73:ce,74:Z},{13:73,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:C,52:w,53:E,54:_,55:A,56:D,57:O,58:R,59:k,60:L,61:S,62:I,63:M,64:P,65:B,66:F,67:z,68:$,69:U,70:K,71:ee,72:Y,73:ce,74:Z},{14:[1,74]},t(ue,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:h,39:f,40:d,41:p,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:C,52:w,53:E,54:_,55:A,56:D,57:O,58:R,59:k,60:L,61:S,62:I,63:M,64:P,65:B,66:F,67:z,68:$,69:U,70:K,71:ee,72:Y,73:ce,74:Z}),t(ue,[2,14]),t(Q,[2,16],{12:[1,76]}),t(ue,[2,36],{12:[1,77]}),t(j,[2,19]),t(j,[2,20]),{25:[1,78]},{27:[1,79]},t(j,[2,23]),{35:80,75:81,76:ne,77:te,79:he,80:le},{35:86,75:81,76:ne,77:te,79:he,80:le},{35:87,75:81,76:ne,77:te,79:he,80:le},{35:88,75:81,76:ne,77:te,79:he,80:le},{35:89,75:81,76:ne,77:te,79:he,80:le},{35:90,75:81,76:ne,77:te,79:he,80:le},{35:91,75:81,76:ne,77:te,79:he,80:le},{35:92,75:81,76:ne,77:te,79:he,80:le},{35:93,75:81,76:ne,77:te,79:he,80:le},{35:94,75:81,76:ne,77:te,79:he,80:le},{35:95,75:81,76:ne,77:te,79:he,80:le},{35:96,75:81,76:ne,77:te,79:he,80:le},{35:97,75:81,76:ne,77:te,79:he,80:le},{35:98,75:81,76:ne,77:te,79:he,80:le},{35:99,75:81,76:ne,77:te,79:he,80:le},{35:100,75:81,76:ne,77:te,79:he,80:le},{35:101,75:81,76:ne,77:te,79:he,80:le},{35:102,75:81,76:ne,77:te,79:he,80:le},{35:103,75:81,76:ne,77:te,79:he,80:le},{35:104,75:81,76:ne,77:te,79:he,80:le},t(J,[2,59]),{35:105,75:81,76:ne,77:te,79:he,80:le},{35:106,75:81,76:ne,77:te,79:he,80:le},{35:107,75:81,76:ne,77:te,79:he,80:le},{35:108,75:81,76:ne,77:te,79:he,80:le},{35:109,75:81,76:ne,77:te,79:he,80:le},{35:110,75:81,76:ne,77:te,79:he,80:le},{35:111,75:81,76:ne,77:te,79:he,80:le},{35:112,75:81,76:ne,77:te,79:he,80:le},{35:113,75:81,76:ne,77:te,79:he,80:le},{35:114,75:81,76:ne,77:te,79:he,80:le},{35:115,75:81,76:ne,77:te,79:he,80:le},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:C,52:w,53:E,54:_,55:A,56:D,57:O,58:R,59:k,60:L,61:S,62:I,63:M,64:P,65:B,66:F,67:z,68:$,69:U,70:K,71:ee,72:Y,73:ce,74:Z},{12:[1,118],33:[1,117]},{35:119,75:81,76:ne,77:te,79:he,80:le},{35:120,75:81,76:ne,77:te,79:he,80:le},{35:121,75:81,76:ne,77:te,79:he,80:le},{35:122,75:81,76:ne,77:te,79:he,80:le},{35:123,75:81,76:ne,77:te,79:he,80:le},{35:124,75:81,76:ne,77:te,79:he,80:le},{35:125,75:81,76:ne,77:te,79:he,80:le},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(ue,[2,15]),t(Q,[2,17],{21:22,19:130,22:e,23:r,24:n,26:i,28:a}),t(ue,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:n,26:i,28:a,34:s,36:l,37:u,38:h,39:f,40:d,41:p,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:C,52:w,53:E,54:_,55:A,56:D,57:O,58:R,59:k,60:L,61:S,62:I,63:M,64:P,65:B,66:F,67:z,68:$,69:U,70:K,71:ee,72:Y,73:ce,74:Z}),t(j,[2,21]),t(j,[2,22]),t(J,[2,39]),t(Se,[2,71],{75:81,35:132,76:ne,77:te,79:he,80:le}),t(se,[2,73]),{78:[1,133]},t(se,[2,75]),t(se,[2,76]),t(J,[2,40]),t(J,[2,41]),t(J,[2,42]),t(J,[2,43]),t(J,[2,44]),t(J,[2,45]),t(J,[2,46]),t(J,[2,47]),t(J,[2,48]),t(J,[2,49]),t(J,[2,50]),t(J,[2,51]),t(J,[2,52]),t(J,[2,53]),t(J,[2,54]),t(J,[2,55]),t(J,[2,56]),t(J,[2,57]),t(J,[2,58]),t(J,[2,60]),t(J,[2,61]),t(J,[2,62]),t(J,[2,63]),t(J,[2,64]),t(J,[2,65]),t(J,[2,66]),t(J,[2,67]),t(J,[2,68]),t(J,[2,69]),t(J,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(ae,[2,28]),t(ae,[2,29]),t(ae,[2,30]),t(ae,[2,31]),t(ae,[2,32]),t(ae,[2,33]),t(ae,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Q,[2,18]),t(ue,[2,38]),t(Se,[2,72]),t(se,[2,74]),t(J,[2,24]),t(J,[2,35]),t(Oe,[2,25]),t(Oe,[2,26],{12:[1,138]}),t(Oe,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:o(function(Le,Ie){if(Ie.recoverable)this.trace(Le);else{var xe=new Error(Le);throw xe.hash=Ie,xe;}},"parseError"),parse:o(function(Le){var Ie=this,xe=[0],q=[],de=[null],ie=[],oe=this.table,V="",Te=0,W=0,pe=0,ve=2,Pe=1,_e=ie.slice.call(arguments,1),be=Object.create(this.lexer),Ve={yy:{}};for(var De in this.yy)Object.prototype.hasOwnProperty.call(this.yy,De)&&(Ve.yy[De]=this.yy[De]);be.setInput(Le,Ve.yy),Ve.yy.lexer=be,Ve.yy.parser=this,typeof be.yylloc>"u"&&(be.yylloc={});var Ye=be.yylloc;ie.push(Ye);var at=be.options&&be.options.ranges;typeof Ve.yy.parseError=="function"?this.parseError=Ve.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Rt(nt){xe.length=xe.length-2*nt,de.length=de.length-nt,ie.length=ie.length-nt;}o(Rt,"popStack");function st(){var nt;return nt=q.pop()||be.lex()||Pe,typeof nt!="number"&&(nt instanceof Array&&(q=nt,nt=q.pop()),nt=Ie.symbols_[nt]||nt),nt;}o(st,"lex");for(var Ue,ut,We,lt,Xt,Tt,Mt={},bt,ht,St,ft;;){if(We=xe[xe.length-1],this.defaultActions[We]?lt=this.defaultActions[We]:((Ue===null||typeof Ue>"u")&&(Ue=st()),lt=oe[We]&&oe[We][Ue]),typeof lt>"u"||!lt.length||!lt[0]){var vt="";ft=[];for(bt in oe[We])this.terminals_[bt]&&bt>ve&&ft.push("'"+this.terminals_[bt]+"'");be.showPosition?vt="Parse error on line "+(Te+1)+`:
`+be.showPosition()+`
Expecting `+ft.join(", ")+", got '"+(this.terminals_[Ue]||Ue)+"'":vt="Parse error on line "+(Te+1)+": Unexpected "+(Ue==Pe?"end of input":"'"+(this.terminals_[Ue]||Ue)+"'"),this.parseError(vt,{text:be.match,token:this.terminals_[Ue]||Ue,line:be.yylineno,loc:Ye,expected:ft});}if(lt[0]instanceof Array&&lt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+We+", token: "+Ue);switch(lt[0]){case 1:xe.push(Ue),de.push(be.yytext),ie.push(be.yylloc),xe.push(lt[1]),Ue=null,ut?(Ue=ut,ut=null):(W=be.yyleng,V=be.yytext,Te=be.yylineno,Ye=be.yylloc,pe>0&&pe--);break;case 2:if(ht=this.productions_[lt[1]][1],Mt.$=de[de.length-ht],Mt._$={first_line:ie[ie.length-(ht||1)].first_line,last_line:ie[ie.length-1].last_line,first_column:ie[ie.length-(ht||1)].first_column,last_column:ie[ie.length-1].last_column},at&&(Mt._$.range=[ie[ie.length-(ht||1)].range[0],ie[ie.length-1].range[1]]),Tt=this.performAction.apply(Mt,[V,W,Te,Ve.yy,lt[1],de,ie].concat(_e)),typeof Tt<"u")return Tt;ht&&(xe=xe.slice(0,-1*ht*2),de=de.slice(0,-1*ht),ie=ie.slice(0,-1*ht)),xe.push(this.productions_[lt[1]][0]),de.push(Mt.$),ie.push(Mt._$),St=oe[xe[xe.length-2]][xe[xe.length-1]],xe.push(St);break;case 3:return!0;}}return!0;},"parse")},Be=function(){var ze={EOF:1,parseError:o(function(Ie,xe){if(this.yy.parser)this.yy.parser.parseError(Ie,xe);else throw new Error(Ie);},"parseError"),setInput:o(function(Le,Ie){return this.yy=Ie||this.yy||{},this._input=Le,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var Le=this._input[0];this.yytext+=Le,this.yyleng++,this.offset++,this.match+=Le,this.matched+=Le;var Ie=Le.match(/(?:\r\n?|\n).*/g);return Ie?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Le;},"input"),unput:o(function(Le){var Ie=Le.length,xe=Le.split(/(?:\r\n?|\n)/g);this._input=Le+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ie),this.offset-=Ie;var q=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),xe.length-1&&(this.yylineno-=xe.length-1);var de=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:xe?(xe.length===q.length?this.yylloc.first_column:0)+q[q.length-xe.length].length-xe[0].length:this.yylloc.first_column-Ie},this.options.ranges&&(this.yylloc.range=[de[0],de[0]+this.yyleng-Ie]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(Le){this.unput(this.match.slice(Le));},"less"),pastInput:o(function(){var Le=this.matched.substr(0,this.matched.length-this.match.length);return(Le.length>20?"...":"")+Le.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var Le=this.match;return Le.length<20&&(Le+=this._input.substr(0,20-Le.length)),(Le.substr(0,20)+(Le.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var Le=this.pastInput(),Ie=new Array(Le.length+1).join("-");return Le+this.upcomingInput()+`
`+Ie+"^";},"showPosition"),test_match:o(function(Le,Ie){var xe,q,de;if(this.options.backtrack_lexer&&(de={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(de.yylloc.range=this.yylloc.range.slice(0))),q=Le[0].match(/(?:\r\n?|\n).*/g),q&&(this.yylineno+=q.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:q?q[q.length-1].length-q[q.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Le[0].length},this.yytext+=Le[0],this.match+=Le[0],this.matches=Le,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Le[0].length),this.matched+=Le[0],xe=this.performAction.call(this,this.yy,this,Ie,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),xe)return xe;if(this._backtrack){for(var ie in de)this[ie]=de[ie];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Le,Ie,xe,q;this._more||(this.yytext="",this.match="");for(var de=this._currentRules(),ie=0;ie<de.length;ie++)if(xe=this._input.match(this.rules[de[ie]]),xe&&(!Ie||xe[0].length>Ie[0].length)){if(Ie=xe,q=ie,this.options.backtrack_lexer){if(Le=this.test_match(xe,de[ie]),Le!==!1)return Le;if(this._backtrack){Ie=!1;continue;}else return!1;}else if(!this.options.flex)break;}return Ie?(Le=this.test_match(Ie,de[q]),Le!==!1?Le:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var Ie=this.next();return Ie||this.lex();},"lex"),begin:o(function(Ie){this.conditionStack.push(Ie);},"begin"),popState:o(function(){var Ie=this.conditionStack.length-1;return Ie>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function(Ie){return Ie=this.conditionStack.length-1-Math.abs(Ie||0),Ie>=0?this.conditionStack[Ie]:"INITIAL";},"topState"),pushState:o(function(Ie){this.begin(Ie);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{},performAction:o(function(Ie,xe,q,de){var ie=de;switch(q){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14;}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return ze;}();ye.lexer=Be;function He(){this.yy={};}return o(He,"Parser"),He.prototype=ye,ye.Parser=He,new He();}();Zy.parser=Zy;LV=Zy;});var y5e,v5e,hn,_o,yi=N(()=>{"use strict";yt();y5e=o(function(t,e){for(let r of e)t.attr(r[0],r[1]);},"d3Attrs"),v5e=o(function(t,e,r){let n=new Map();return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n;},"calculateSvgSizeAttrs"),hn=o(function(t,e,r,n){let i=v5e(e,r,n);y5e(t,i);},"configureSvgSize"),_o=o(function(t,e,r,n){let i=e.node().getBBox(),a=i.width,s=i.height;X.info(`SVG bounds: ${a}x${s}`,i);let l=0,u=0;X.info(`Graph bounds: ${l}x${u}`,t),l=a+r*2,u=s+r*2,X.info(`Calculated bounds: ${l}x${u}`),hn(e,u,l,n);let h=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",h);},"setupGraphViewbox");});var O3,x5e,RV,NV,vA=N(()=>{"use strict";yt();O3={},x5e=o((t,e,r)=>{let n="";return t in O3&&O3[t]?n=O3[t](r):X.warn(`No theme found for ${t}`),` & {
    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: 1px;
  }
  & .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
   }

  ${n}

  ${e}
`;},"getStyles"),RV=o((t,e)=>{e!==void 0&&(O3[t]=e);},"addStylesForDiagram"),NV=x5e;});var Jy={};hr(Jy,{clear:()=>wr,getAccDescription:()=>Lr,getAccTitle:()=>_r,getDiagramTitle:()=>Rr,setAccDescription:()=>Dr,setAccTitle:()=>Cr,setDiagramTitle:()=>Ir});var xA,bA,TA,wA,wr,Cr,_r,Dr,Lr,Ir,Rr,ci=N(()=>{"use strict";dr();Jn();xA="",bA="",TA="",wA=o(t=>ar(t,Qt()),"sanitizeText"),wr=o(()=>{xA="",TA="",bA="";},"clear"),Cr=o(t=>{xA=wA(t).replace(/^\s+/g,"");},"setAccTitle"),_r=o(()=>xA,"getAccTitle"),Dr=o(t=>{TA=wA(t).replace(/\n\s+/g,`
`);},"setAccDescription"),Lr=o(()=>TA,"getAccDescription"),Ir=o(t=>{bA=wA(t);},"setDiagramTitle"),Rr=o(()=>bA,"getDiagramTitle");});var MV,b5e,ge,ev,B3,tv,EA,T5e,P3,sd,rv,kA,qt=N(()=>{"use strict";var _Class23;ad();yt();Jn();dr();yi();vA();ci();MV=X,b5e=Cy,ge=Qt,ev=J4,B3=uh,tv=o(t=>ar(t,ge()),"sanitizeText"),EA=_o,T5e=o(()=>Jy,"getCommonDb"),P3={},sd=o((t,e,r)=>{var _e$injectUtils;P3[t]&&MV.warn(`Diagram with id ${t} already registered. Overwriting.`),P3[t]=e,r&&gA(t,r),RV(t,e.styles),(_e$injectUtils=e.injectUtils)===null||_e$injectUtils===void 0?void 0:_e$injectUtils.call(e,MV,b5e,ge,tv,EA,T5e(),()=>{});},"registerDiagram"),rv=o(t=>{if(t in P3)return P3[t];throw new kA(t);},"getDiagram"),kA=(_Class23=class kA extends Error{constructor(e){super(`Diagram ${e} not found.`);}},o(_Class23,"DiagramNotFoundError"),_Class23);});var dl,vh,es,fl,nc,nv,SA,CA,F3,$3,IV,w5e,k5e,E5e,S5e,C5e,A5e,_5e,D5e,L5e,R5e,N5e,M5e,I5e,O5e,P5e,B5e,F5e,OV,$5e,z5e,PV,G5e,V5e,U5e,H5e,xh,W5e,q5e,Y5e,X5e,j5e,iv,AA=N(()=>{"use strict";qt();dr();ci();dl=[],vh=[""],es="global",fl="",nc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],nv=[],SA="",CA=!1,F3=4,$3=2,w5e=o(function(){return IV;},"getC4Type"),k5e=o(function(t){IV=ar(t,ge());},"setC4Type"),E5e=o(function(t,e,r,n,i,a,s,l,u){if(t==null||e===void 0||e===null||r===void 0||r===null||n===void 0||n===null)return;let h={},f=nv.find(d=>d.from===e&&d.to===r);if(f?h=f:nv.push(h),h.type=t,h.from=e,h.to=r,h.label={text:n},i==null)h.techn={text:""};else if(typeof i=="object"){let[d,p]=Object.entries(i)[0];h[d]={text:p};}else h.techn={text:i};if(a==null)h.descr={text:""};else if(typeof a=="object"){let[d,p]=Object.entries(a)[0];h[d]={text:p};}else h.descr={text:a};if(typeof s=="object"){let[d,p]=Object.entries(s)[0];h[d]=p;}else h.sprite=s;if(typeof l=="object"){let[d,p]=Object.entries(l)[0];h[d]=p;}else h.tags=l;if(typeof u=="object"){let[d,p]=Object.entries(u)[0];h[d]=p;}else h.link=u;h.wrap=xh();},"addRel"),S5e=o(function(t,e,r,n,i,a,s){if(e===null||r===null)return;let l={},u=dl.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,dl.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.descr={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f};}else l.descr={text:n};if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]=f;}else l.sprite=i;if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]=f;}else l.tags=a;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f;}else l.link=s;l.typeC4Shape={text:t},l.parentBoundary=es,l.wrap=xh();},"addPersonOrSystem"),C5e=o(function(t,e,r,n,i,a,s,l){if(e===null||r===null)return;let u={},h=dl.find(f=>f.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,dl.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d};}else u.techn={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d};}else u.descr={text:i};if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]=d;}else u.sprite=a;if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d;}else u.tags=s;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d;}else u.link=l;u.wrap=xh(),u.typeC4Shape={text:t},u.parentBoundary=es;},"addContainer"),A5e=o(function(t,e,r,n,i,a,s,l){if(e===null||r===null)return;let u={},h=dl.find(f=>f.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,dl.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d};}else u.techn={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d};}else u.descr={text:i};if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]=d;}else u.sprite=a;if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d;}else u.tags=s;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d;}else u.link=l;u.wrap=xh(),u.typeC4Shape={text:t},u.parentBoundary=es;},"addComponent"),_5e=o(function(t,e,r,n,i){if(t===null||e===null)return;let a={},s=nc.find(l=>l.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,nc.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"system"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u};}else a.type={text:r};if(typeof n=="object"){let[l,u]=Object.entries(n)[0];a[l]=u;}else a.tags=n;if(typeof i=="object"){let[l,u]=Object.entries(i)[0];a[l]=u;}else a.link=i;a.parentBoundary=es,a.wrap=xh(),fl=es,es=t,vh.push(fl);},"addPersonOrSystemBoundary"),D5e=o(function(t,e,r,n,i){if(t===null||e===null)return;let a={},s=nc.find(l=>l.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,nc.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"container"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u};}else a.type={text:r};if(typeof n=="object"){let[l,u]=Object.entries(n)[0];a[l]=u;}else a.tags=n;if(typeof i=="object"){let[l,u]=Object.entries(i)[0];a[l]=u;}else a.link=i;a.parentBoundary=es,a.wrap=xh(),fl=es,es=t,vh.push(fl);},"addContainerBoundary"),L5e=o(function(t,e,r,n,i,a,s,l){if(e===null||r===null)return;let u={},h=nc.find(f=>f.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,nc.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.type={text:"node"};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d};}else u.type={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d};}else u.descr={text:i};if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d;}else u.tags=s;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d;}else u.link=l;u.nodeType=t,u.parentBoundary=es,u.wrap=xh(),fl=es,es=e,vh.push(fl);},"addDeploymentNode"),R5e=o(function(){es=fl,vh.pop(),fl=vh.pop(),vh.push(fl);},"popBoundaryParseStack"),N5e=o(function(t,e,r,n,i,a,s,l,u,h,f){let d=dl.find(p=>p.alias===e);if(!(d===void 0&&(d=nc.find(p=>p.alias===e),d===void 0))){if(r!=null)if(typeof r=="object"){let[p,m]=Object.entries(r)[0];d[p]=m;}else d.bgColor=r;if(n!=null)if(typeof n=="object"){let[p,m]=Object.entries(n)[0];d[p]=m;}else d.fontColor=n;if(i!=null)if(typeof i=="object"){let[p,m]=Object.entries(i)[0];d[p]=m;}else d.borderColor=i;if(a!=null)if(typeof a=="object"){let[p,m]=Object.entries(a)[0];d[p]=m;}else d.shadowing=a;if(s!=null)if(typeof s=="object"){let[p,m]=Object.entries(s)[0];d[p]=m;}else d.shape=s;if(l!=null)if(typeof l=="object"){let[p,m]=Object.entries(l)[0];d[p]=m;}else d.sprite=l;if(u!=null)if(typeof u=="object"){let[p,m]=Object.entries(u)[0];d[p]=m;}else d.techn=u;if(h!=null)if(typeof h=="object"){let[p,m]=Object.entries(h)[0];d[p]=m;}else d.legendText=h;if(f!=null)if(typeof f=="object"){let[p,m]=Object.entries(f)[0];d[p]=m;}else d.legendSprite=f;}},"updateElStyle"),M5e=o(function(t,e,r,n,i,a,s){let l=nv.find(u=>u.from===e&&u.to===r);if(l!==void 0){if(n!=null)if(typeof n=="object"){let[u,h]=Object.entries(n)[0];l[u]=h;}else l.textColor=n;if(i!=null)if(typeof i=="object"){let[u,h]=Object.entries(i)[0];l[u]=h;}else l.lineColor=i;if(a!=null)if(typeof a=="object"){let[u,h]=Object.entries(a)[0];l[u]=parseInt(h);}else l.offsetX=parseInt(a);if(s!=null)if(typeof s=="object"){let[u,h]=Object.entries(s)[0];l[u]=parseInt(h);}else l.offsetY=parseInt(s);}},"updateRelStyle"),I5e=o(function(t,e,r){let n=F3,i=$3;if(typeof e=="object"){let a=Object.values(e)[0];n=parseInt(a);}else n=parseInt(e);if(typeof r=="object"){let a=Object.values(r)[0];i=parseInt(a);}else i=parseInt(r);n>=1&&(F3=n),i>=1&&($3=i);},"updateLayoutConfig"),O5e=o(function(){return F3;},"getC4ShapeInRow"),P5e=o(function(){return $3;},"getC4BoundaryInRow"),B5e=o(function(){return es;},"getCurrentBoundaryParse"),F5e=o(function(){return fl;},"getParentBoundaryParse"),OV=o(function(t){return t==null?dl:dl.filter(e=>e.parentBoundary===t);},"getC4ShapeArray"),$5e=o(function(t){return dl.find(e=>e.alias===t);},"getC4Shape"),z5e=o(function(t){return Object.keys(OV(t));},"getC4ShapeKeys"),PV=o(function(t){return t==null?nc:nc.filter(e=>e.parentBoundary===t);},"getBoundaries"),G5e=PV,V5e=o(function(){return nv;},"getRels"),U5e=o(function(){return SA;},"getTitle"),H5e=o(function(t){CA=t;},"setWrap"),xh=o(function(){return CA;},"autoWrap"),W5e=o(function(){dl=[],nc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],fl="",es="global",vh=[""],nv=[],vh=[""],SA="",CA=!1,F3=4,$3=2;},"clear"),q5e={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},Y5e={FILLED:0,OPEN:1},X5e={LEFTOF:0,RIGHTOF:1,OVER:2},j5e=o(function(t){SA=ar(t,ge());},"setTitle"),iv={addPersonOrSystem:S5e,addPersonOrSystemBoundary:_5e,addContainer:C5e,addContainerBoundary:D5e,addComponent:A5e,addDeploymentNode:L5e,popBoundaryParseStack:R5e,addRel:E5e,updateElStyle:N5e,updateRelStyle:M5e,updateLayoutConfig:I5e,autoWrap:xh,setWrap:H5e,getC4ShapeArray:OV,getC4Shape:$5e,getC4ShapeKeys:z5e,getBoundaries:PV,getBoundarys:G5e,getCurrentBoundaryParse:B5e,getParentBoundaryParse:F5e,getRels:V5e,getTitle:U5e,getC4Type:w5e,getC4ShapeInRow:O5e,getC4BoundaryInRow:P5e,setAccTitle:Cr,getAccTitle:_r,getAccDescription:Lr,setAccDescription:Dr,getConfig:o(()=>ge().c4,"getConfig"),clear:W5e,LINETYPE:q5e,ARROWTYPE:Y5e,PLACEMENT:X5e,setTitle:j5e,setC4Type:k5e};});function od(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN;}var _A=N(()=>{"use strict";o(od,"ascending");});function DA(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN;}var BV=N(()=>{"use strict";o(DA,"descending");});function ld(t){let e,r,n;t.length!==2?(e=od,r=o((l,u)=>od(t(l),u),"compare2"),n=o((l,u)=>t(l)-u,"delta")):(e=t===od||t===DA?t:K5e,r=t,n=t);function i(l,u,h=0,f=l.length){if(h<f){if(e(u,u)!==0)return f;do{let d=h+f>>>1;r(l[d],u)<0?h=d+1:f=d;}while(h<f);}return h;}o(i,"left");function a(l,u,h=0,f=l.length){if(h<f){if(e(u,u)!==0)return f;do{let d=h+f>>>1;r(l[d],u)<=0?h=d+1:f=d;}while(h<f);}return h;}o(a,"right");function s(l,u,h=0,f=l.length){let d=i(l,u,h,f-1);return d>h&&n(l[d-1],u)>-n(l[d],u)?d-1:d;}return o(s,"center"),{left:i,center:s,right:a};}function K5e(){return 0;}var LA=N(()=>{"use strict";_A();BV();o(ld,"bisector");o(K5e,"zero");});function RA(t){return t===null?NaN:+t;}var FV=N(()=>{"use strict";o(RA,"number");});var $V,zV,Q5e,Z5e,NA,GV=N(()=>{"use strict";_A();LA();FV();$V=ld(od),zV=$V.right,Q5e=$V.left,Z5e=ld(RA).center,NA=zV;});function VV({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):r;}function J5e({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r);}function eTe({_intern:t,_key:e},r){let n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r;}function tTe(t){return t!==null&&typeof t=="object"?t.valueOf():t;}var T0,UV=N(()=>{"use strict";var _Class24;T0=(_Class24=class T0 extends Map{constructor(e,r=tTe){if(super(),Object.defineProperties(this,{_intern:{value:new Map()},_key:{value:r}}),e!=null)for(let[n,i]of e)this.set(n,i);}get(e){return super.get(VV(this,e));}has(e){return super.has(VV(this,e));}set(e,r){return super.set(J5e(this,e),r);}delete(e){return super.delete(eTe(this,e));}},o(_Class24,"InternMap"),_Class24);o(VV,"intern_get");o(J5e,"intern_set");o(eTe,"intern_delete");o(tTe,"keyof");});function z3(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=rTe?10:a>=nTe?5:a>=iTe?2:1,l,u,h;return i<0?(h=Math.pow(10,-i)/s,l=Math.round(t*h),u=Math.round(e*h),l/h<t&&++l,u/h>e&&--u,h=-h):(h=Math.pow(10,i)*s,l=Math.round(t/h),u=Math.round(e/h),l*h<t&&++l,u*h>e&&--u),u<l&&.5<=r&&r<2?z3(t,e,r*2):[l,u,h];}function G3(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];let n=e<t,[i,a,s]=n?z3(e,t,r):z3(t,e,r);if(!(a>=i))return[];let l=a-i+1,u=new Array(l);if(n){if(s<0)for(let h=0;h<l;++h)u[h]=(a-h)/-s;else for(let h=0;h<l;++h)u[h]=(a-h)*s;}else if(s<0)for(let h=0;h<l;++h)u[h]=(i+h)/-s;else for(let h=0;h<l;++h)u[h]=(i+h)*s;return u;}function av(t,e,r){return e=+e,t=+t,r=+r,z3(t,e,r)[2];}function w0(t,e,r){e=+e,t=+t,r=+r;let n=e<t,i=n?av(e,t,r):av(t,e,r);return(n?-1:1)*(i<0?1/-i:i);}var rTe,nTe,iTe,HV=N(()=>{"use strict";rTe=Math.sqrt(50),nTe=Math.sqrt(10),iTe=Math.sqrt(2);o(z3,"tickSpec");o(G3,"ticks");o(av,"tickIncrement");o(w0,"tickStep");});function V3(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r<i||r===void 0&&i>=i)&&(r=i);}return r;}var WV=N(()=>{"use strict";o(V3,"max");});function U3(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i);}return r;}var qV=N(()=>{"use strict";o(U3,"min");});function H3(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,a=new Array(i);++n<i;)a[n]=t+n*r;return a;}var YV=N(()=>{"use strict";o(H3,"range");});var bh=N(()=>{"use strict";GV();LA();WV();qV();YV();HV();UV();});function MA(t){return t;}var XV=N(()=>{"use strict";o(MA,"default");});function aTe(t){return"translate("+t+",0)";}function sTe(t){return"translate(0,"+t+")";}function oTe(t){return e=>+t(e);}function lTe(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e;}function cTe(){return!this.__axis;}function KV(t,e){var r=[],n=null,i=null,a=6,s=6,l=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=t===q3||t===W3?-1:1,f=t===W3||t===IA?"x":"y",d=t===q3||t===OA?aTe:sTe;function p(m){var g=n!==null&&n!==void 0?n:e.ticks?e.ticks.apply(e,r):e.domain(),y=i!==null&&i!==void 0?i:e.tickFormat?e.tickFormat.apply(e,r):MA,v=Math.max(a,0)+l,x=e.range(),b=+x[0]+u,T=+x[x.length-1]+u,C=(e.bandwidth?lTe:oTe)(e.copy(),u),w=m.selection?m.selection():m,E=w.selectAll(".domain").data([null]),_=w.selectAll(".tick").data(g,e).order(),A=_.exit(),D=_.enter().append("g").attr("class","tick"),O=_.select("line"),R=_.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(D),O=O.merge(D.append("line").attr("stroke","currentColor").attr(f+"2",h*a)),R=R.merge(D.append("text").attr("fill","currentColor").attr(f,h*v).attr("dy",t===q3?"0em":t===OA?"0.71em":"0.32em")),m!==w&&(E=E.transition(m),_=_.transition(m),O=O.transition(m),R=R.transition(m),A=A.transition(m).attr("opacity",jV).attr("transform",function(k){return isFinite(k=C(k))?d(k+u):this.getAttribute("transform");}),D.attr("opacity",jV).attr("transform",function(k){var L=this.parentNode.__axis;return d((L&&isFinite(L=L(k))?L:C(k))+u);})),A.remove(),E.attr("d",t===W3||t===IA?s?"M"+h*s+","+b+"H"+u+"V"+T+"H"+h*s:"M"+u+","+b+"V"+T:s?"M"+b+","+h*s+"V"+u+"H"+T+"V"+h*s:"M"+b+","+u+"H"+T),_.attr("opacity",1).attr("transform",function(k){return d(C(k)+u);}),O.attr(f+"2",h*a),R.attr(f,h*v).text(y),w.filter(cTe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===IA?"start":t===W3?"end":"middle"),w.each(function(){this.__axis=C;});}return o(p,"axis"),p.scale=function(m){return arguments.length?(e=m,p):e;},p.ticks=function(){return r=Array.from(arguments),p;},p.tickArguments=function(m){return arguments.length?(r=m==null?[]:Array.from(m),p):r.slice();},p.tickValues=function(m){return arguments.length?(n=m==null?null:Array.from(m),p):n&&n.slice();},p.tickFormat=function(m){return arguments.length?(i=m,p):i;},p.tickSize=function(m){return arguments.length?(a=s=+m,p):a;},p.tickSizeInner=function(m){return arguments.length?(a=+m,p):a;},p.tickSizeOuter=function(m){return arguments.length?(s=+m,p):s;},p.tickPadding=function(m){return arguments.length?(l=+m,p):l;},p.offset=function(m){return arguments.length?(u=+m,p):u;},p;}function PA(t){return KV(q3,t);}function BA(t){return KV(OA,t);}var q3,IA,OA,W3,jV,QV=N(()=>{"use strict";XV();q3=1,IA=2,OA=3,W3=4,jV=1e-6;o(aTe,"translateX");o(sTe,"translateY");o(oTe,"number");o(lTe,"center");o(cTe,"entering");o(KV,"axis");o(PA,"axisTop");o(BA,"axisBottom");});var ZV=N(()=>{"use strict";QV();});function eU(){for(var t=0,e=arguments.length,r={},n;t<e;++t){if(!(n=arguments[t]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[];}return new Y3(r);}function Y3(t){this._=t;}function hTe(t,e){return t.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n};});}function fTe(t,e){for(var r=0,n=t.length,i;r<n;++r)if((i=t[r]).name===e)return i.value;}function JV(t,e,r){for(var n=0,i=t.length;n<i;++n)if(t[n].name===e){t[n]=uTe,t=t.slice(0,n).concat(t.slice(n+1));break;}return r!=null&&t.push({name:e,value:r}),t;}var uTe,FA,tU=N(()=>{"use strict";uTe={value:o(()=>{},"value")};o(eU,"dispatch");o(Y3,"Dispatch");o(hTe,"parseTypenames");Y3.prototype=eU.prototype={constructor:Y3,on:o(function(t,e){var r=this._,n=hTe(t+"",r),i,a=-1,s=n.length;if(arguments.length<2){for(;++a<s;)if((i=(t=n[a]).type)&&(i=fTe(r[i],t.name)))return i;return;}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<s;)if(i=(t=n[a]).type)r[i]=JV(r[i],t.name,e);else if(e==null)for(i in r)r[i]=JV(r[i],t.name,null);return this;},"on"),copy:o(function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new Y3(t);},"copy"),call:o(function(t,e){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,a;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],n=0,i=a.length;n<i;++n)a[n].value.apply(e,r);},"call"),apply:o(function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r);},"apply")};o(fTe,"get");o(JV,"set");FA=eU;});var $A=N(()=>{"use strict";tU();});var X3,zA,GA=N(()=>{"use strict";X3="http://www.w3.org/1999/xhtml",zA={svg:"http://www.w3.org/2000/svg",xhtml:X3,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};});function ic(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),zA.hasOwnProperty(e)?{space:zA[e],local:t}:t;}var j3=N(()=>{"use strict";GA();o(ic,"default");});function dTe(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===X3&&e.documentElement.namespaceURI===X3?e.createElement(t):e.createElementNS(r,t);};}function pTe(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local);};}function sv(t){var e=ic(t);return(e.local?pTe:dTe)(e);}var VA=N(()=>{"use strict";j3();GA();o(dTe,"creatorInherit");o(pTe,"creatorFixed");o(sv,"default");});function mTe(){}function Th(t){return t==null?mTe:function(){return this.querySelector(t);};}var K3=N(()=>{"use strict";o(mTe,"none");o(Th,"default");});function UA(t){typeof t!="function"&&(t=Th(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],s=a.length,l=n[i]=new Array(s),u,h,f=0;f<s;++f)(u=a[f])&&(h=t.call(u,u.__data__,f,a))&&("__data__"in u&&(h.__data__=u.__data__),l[f]=h);return new ui(n,this._parents);}var rU=N(()=>{"use strict";pl();K3();o(UA,"default");});function HA(t){return t==null?[]:Array.isArray(t)?t:Array.from(t);}var nU=N(()=>{"use strict";o(HA,"array");});function gTe(){return[];}function k0(t){return t==null?gTe:function(){return this.querySelectorAll(t);};}var WA=N(()=>{"use strict";o(gTe,"empty");o(k0,"default");});function yTe(t){return function(){return HA(t.apply(this,arguments));};}function qA(t){typeof t=="function"?t=yTe(t):t=k0(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a<r;++a)for(var s=e[a],l=s.length,u,h=0;h<l;++h)(u=s[h])&&(n.push(t.call(u,u.__data__,h,s)),i.push(u));return new ui(n,i);}var iU=N(()=>{"use strict";pl();nU();WA();o(yTe,"arrayAll");o(qA,"default");});function E0(t){return function(){return this.matches(t);};}function Q3(t){return function(e){return e.matches(t);};}var ov=N(()=>{"use strict";o(E0,"default");o(Q3,"childMatcher");});function xTe(t){return function(){return vTe.call(this.children,t);};}function bTe(){return this.firstElementChild;}function YA(t){return this.select(t==null?bTe:xTe(typeof t=="function"?t:Q3(t)));}var vTe,aU=N(()=>{"use strict";ov();vTe=Array.prototype.find;o(xTe,"childFind");o(bTe,"childFirst");o(YA,"default");});function wTe(){return Array.from(this.children);}function kTe(t){return function(){return TTe.call(this.children,t);};}function XA(t){return this.selectAll(t==null?wTe:kTe(typeof t=="function"?t:Q3(t)));}var TTe,sU=N(()=>{"use strict";ov();TTe=Array.prototype.filter;o(wTe,"children");o(kTe,"childrenFilter");o(XA,"default");});function jA(t){typeof t!="function"&&(t=E0(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],s=a.length,l=n[i]=[],u,h=0;h<s;++h)(u=a[h])&&t.call(u,u.__data__,h,a)&&l.push(u);return new ui(n,this._parents);}var oU=N(()=>{"use strict";pl();ov();o(jA,"default");});function lv(t){return new Array(t.length);}var KA=N(()=>{"use strict";o(lv,"default");});function QA(){return new ui(this._enter||this._groups.map(lv),this._parents);}function cv(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e;}var ZA=N(()=>{"use strict";KA();pl();o(QA,"default");o(cv,"EnterNode");cv.prototype={constructor:cv,appendChild:o(function(t){return this._parent.insertBefore(t,this._next);},"appendChild"),insertBefore:o(function(t,e){return this._parent.insertBefore(t,e);},"insertBefore"),querySelector:o(function(t){return this._parent.querySelector(t);},"querySelector"),querySelectorAll:o(function(t){return this._parent.querySelectorAll(t);},"querySelectorAll")};});function JA(t){return function(){return t;};}var lU=N(()=>{"use strict";o(JA,"default");});function ETe(t,e,r,n,i,a){for(var s=0,l,u=e.length,h=a.length;s<h;++s)(l=e[s])?(l.__data__=a[s],n[s]=l):r[s]=new cv(t,a[s]);for(;s<u;++s)(l=e[s])&&(i[s]=l);}function STe(t,e,r,n,i,a,s){var l,u,h=new Map(),f=e.length,d=a.length,p=new Array(f),m;for(l=0;l<f;++l)(u=e[l])&&(p[l]=m=s.call(u,u.__data__,l,e)+"",h.has(m)?i[l]=u:h.set(m,u));for(l=0;l<d;++l)m=s.call(t,a[l],l,a)+"",(u=h.get(m))?(n[l]=u,u.__data__=a[l],h.delete(m)):r[l]=new cv(t,a[l]);for(l=0;l<f;++l)(u=e[l])&&h.get(p[l])===u&&(i[l]=u);}function CTe(t){return t.__data__;}function e8(t,e){if(!arguments.length)return Array.from(this,CTe);var r=e?STe:ETe,n=this._parents,i=this._groups;typeof t!="function"&&(t=JA(t));for(var a=i.length,s=new Array(a),l=new Array(a),u=new Array(a),h=0;h<a;++h){var f=n[h],d=i[h],p=d.length,m=ATe(t.call(f,f&&f.__data__,h,n)),g=m.length,y=l[h]=new Array(g),v=s[h]=new Array(g),x=u[h]=new Array(p);r(f,d,y,v,x,m,e);for(var b=0,T=0,C,w;b<g;++b)if(C=y[b]){for(b>=T&&(T=b+1);!(w=v[T])&&++T<g;);C._next=w||null;}}return s=new ui(s,n),s._enter=l,s._exit=u,s;}function ATe(t){return typeof t=="object"&&"length"in t?t:Array.from(t);}var cU=N(()=>{"use strict";pl();ZA();lU();o(ETe,"bindIndex");o(STe,"bindKey");o(CTe,"datum");o(e8,"default");o(ATe,"arraylike");});function t8(){return new ui(this._exit||this._groups.map(lv),this._parents);}var uU=N(()=>{"use strict";KA();pl();o(t8,"default");});function r8(t,e,r){var n=this.enter(),i=this,a=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),r==null?a.remove():r(a),n&&i?n.merge(i).order():i;}var hU=N(()=>{"use strict";o(r8,"default");});function n8(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,i=r.length,a=n.length,s=Math.min(i,a),l=new Array(i),u=0;u<s;++u)for(var h=r[u],f=n[u],d=h.length,p=l[u]=new Array(d),m,g=0;g<d;++g)(m=h[g]||f[g])&&(p[g]=m);for(;u<i;++u)l[u]=r[u];return new ui(l,this._parents);}var fU=N(()=>{"use strict";pl();o(n8,"default");});function i8(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n=t[e],i=n.length-1,a=n[i],s;--i>=0;)(s=n[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this;}var dU=N(()=>{"use strict";o(i8,"default");});function a8(t){t||(t=_Te);function e(d,p){return d&&p?t(d.__data__,p.__data__):!d-!p;}o(e,"compareNode");for(var r=this._groups,n=r.length,i=new Array(n),a=0;a<n;++a){for(var s=r[a],l=s.length,u=i[a]=new Array(l),h,f=0;f<l;++f)(h=s[f])&&(u[f]=h);u.sort(e);}return new ui(i,this._parents).order();}function _Te(t,e){return t<e?-1:t>e?1:t>=e?0:NaN;}var pU=N(()=>{"use strict";pl();o(a8,"default");o(_Te,"ascending");});function s8(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this;}var mU=N(()=>{"use strict";o(s8,"default");});function o8(){return Array.from(this);}var gU=N(()=>{"use strict";o(o8,"default");});function l8(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,a=n.length;i<a;++i){var s=n[i];if(s)return s;}return null;}var yU=N(()=>{"use strict";o(l8,"default");});function c8(){let t=0;for(let e of this)++t;return t;}var vU=N(()=>{"use strict";o(c8,"default");});function u8(){return!this.node();}var xU=N(()=>{"use strict";o(u8,"default");});function h8(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var i=e[r],a=0,s=i.length,l;a<s;++a)(l=i[a])&&t.call(l,l.__data__,a,i);return this;}var bU=N(()=>{"use strict";o(h8,"default");});function DTe(t){return function(){this.removeAttribute(t);};}function LTe(t){return function(){this.removeAttributeNS(t.space,t.local);};}function RTe(t,e){return function(){this.setAttribute(t,e);};}function NTe(t,e){return function(){this.setAttributeNS(t.space,t.local,e);};}function MTe(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r);};}function ITe(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r);};}function f8(t,e){var r=ic(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r);}return this.each((e==null?r.local?LTe:DTe:typeof e=="function"?r.local?ITe:MTe:r.local?NTe:RTe)(r,e));}var TU=N(()=>{"use strict";j3();o(DTe,"attrRemove");o(LTe,"attrRemoveNS");o(RTe,"attrConstant");o(NTe,"attrConstantNS");o(MTe,"attrFunction");o(ITe,"attrFunctionNS");o(f8,"default");});function uv(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView;}var d8=N(()=>{"use strict";o(uv,"default");});function OTe(t){return function(){this.style.removeProperty(t);};}function PTe(t,e,r){return function(){this.style.setProperty(t,e,r);};}function BTe(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r);};}function p8(t,e,r){return arguments.length>1?this.each((e==null?OTe:typeof e=="function"?BTe:PTe)(t,e,r!==null&&r!==void 0?r:"")):wh(this.node(),t);}function wh(t,e){return t.style.getPropertyValue(e)||uv(t).getComputedStyle(t,null).getPropertyValue(e);}var m8=N(()=>{"use strict";d8();o(OTe,"styleRemove");o(PTe,"styleConstant");o(BTe,"styleFunction");o(p8,"default");o(wh,"styleValue");});function FTe(t){return function(){delete this[t];};}function $Te(t,e){return function(){this[t]=e;};}function zTe(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r;};}function g8(t,e){return arguments.length>1?this.each((e==null?FTe:typeof e=="function"?zTe:$Te)(t,e)):this.node()[t];}var wU=N(()=>{"use strict";o(FTe,"propertyRemove");o($Te,"propertyConstant");o(zTe,"propertyFunction");o(g8,"default");});function kU(t){return t.trim().split(/^|\s+/);}function y8(t){return t.classList||new EU(t);}function EU(t){this._node=t,this._names=kU(t.getAttribute("class")||"");}function SU(t,e){for(var r=y8(t),n=-1,i=e.length;++n<i;)r.add(e[n]);}function CU(t,e){for(var r=y8(t),n=-1,i=e.length;++n<i;)r.remove(e[n]);}function GTe(t){return function(){SU(this,t);};}function VTe(t){return function(){CU(this,t);};}function UTe(t,e){return function(){(e.apply(this,arguments)?SU:CU)(this,t);};}function v8(t,e){var r=kU(t+"");if(arguments.length<2){for(var n=y8(this.node()),i=-1,a=r.length;++i<a;)if(!n.contains(r[i]))return!1;return!0;}return this.each((typeof e=="function"?UTe:e?GTe:VTe)(r,e));}var AU=N(()=>{"use strict";o(kU,"classArray");o(y8,"classList");o(EU,"ClassList");EU.prototype={add:o(function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")));},"add"),remove:o(function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")));},"remove"),contains:o(function(t){return this._names.indexOf(t)>=0;},"contains")};o(SU,"classedAdd");o(CU,"classedRemove");o(GTe,"classedTrue");o(VTe,"classedFalse");o(UTe,"classedFunction");o(v8,"default");});function HTe(){this.textContent="";}function WTe(t){return function(){this.textContent=t;};}function qTe(t){return function(){var e=t.apply(this,arguments);this.textContent=e!==null&&e!==void 0?e:"";};}function x8(t){return arguments.length?this.each(t==null?HTe:(typeof t=="function"?qTe:WTe)(t)):this.node().textContent;}var _U=N(()=>{"use strict";o(HTe,"textRemove");o(WTe,"textConstant");o(qTe,"textFunction");o(x8,"default");});function YTe(){this.innerHTML="";}function XTe(t){return function(){this.innerHTML=t;};}function jTe(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e!==null&&e!==void 0?e:"";};}function b8(t){return arguments.length?this.each(t==null?YTe:(typeof t=="function"?jTe:XTe)(t)):this.node().innerHTML;}var DU=N(()=>{"use strict";o(YTe,"htmlRemove");o(XTe,"htmlConstant");o(jTe,"htmlFunction");o(b8,"default");});function KTe(){this.nextSibling&&this.parentNode.appendChild(this);}function T8(){return this.each(KTe);}var LU=N(()=>{"use strict";o(KTe,"raise");o(T8,"default");});function QTe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild);}function w8(){return this.each(QTe);}var RU=N(()=>{"use strict";o(QTe,"lower");o(w8,"default");});function k8(t){var e=typeof t=="function"?t:sv(t);return this.select(function(){return this.appendChild(e.apply(this,arguments));});}var NU=N(()=>{"use strict";VA();o(k8,"default");});function ZTe(){return null;}function E8(t,e){var r=typeof t=="function"?t:sv(t),n=e==null?ZTe:typeof e=="function"?e:Th(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null);});}var MU=N(()=>{"use strict";VA();K3();o(ZTe,"constantNull");o(E8,"default");});function JTe(){var t=this.parentNode;t&&t.removeChild(this);}function S8(){return this.each(JTe);}var IU=N(()=>{"use strict";o(JTe,"remove");o(S8,"default");});function ewe(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t;}function twe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t;}function C8(t){return this.select(t?twe:ewe);}var OU=N(()=>{"use strict";o(ewe,"selection_cloneShallow");o(twe,"selection_cloneDeep");o(C8,"default");});function A8(t){return arguments.length?this.property("__data__",t):this.node().__data__;}var PU=N(()=>{"use strict";o(A8,"default");});function rwe(t){return function(e){t.call(this,e,this.__data__);};}function nwe(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r};});}function iwe(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,i=e.length,a;r<i;++r)a=e[r],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++n]=a;++n?e.length=n:delete this.__on;}};}function awe(t,e,r){return function(){var n=this.__on,i,a=rwe(e);if(n){for(var s=0,l=n.length;s<l;++s)if((i=n[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),i.value=e;return;}}this.addEventListener(t.type,a,r),i={type:t.type,name:t.name,value:e,listener:a,options:r},n?n.push(i):this.__on=[i];};}function _8(t,e,r){var n=nwe(t+""),i,a=n.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var u=0,h=l.length,f;u<h;++u)for(i=0,f=l[u];i<a;++i)if((s=n[i]).type===f.type&&s.name===f.name)return f.value;}return;}for(l=e?awe:iwe,i=0;i<a;++i)this.each(l(n[i],e,r));return this;}var BU=N(()=>{"use strict";o(rwe,"contextListener");o(nwe,"parseTypenames");o(iwe,"onRemove");o(awe,"onAdd");o(_8,"default");});function FU(t,e,r){var n=uv(t),i=n.CustomEvent;typeof i=="function"?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i);}function swe(t,e){return function(){return FU(this,t,e);};}function owe(t,e){return function(){return FU(this,t,e.apply(this,arguments));};}function D8(t,e){return this.each((typeof e=="function"?owe:swe)(t,e));}var $U=N(()=>{"use strict";d8();o(FU,"dispatchEvent");o(swe,"dispatchConstant");o(owe,"dispatchFunction");o(D8,"default");});function*L8(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,a=n.length,s;i<a;++i)(s=n[i])&&(yield s);}var zU=N(()=>{"use strict";o(L8,"default");});function ui(t,e){this._groups=t,this._parents=e;}function GU(){return new ui([[document.documentElement]],R8);}function lwe(){return this;}var R8,pu,pl=N(()=>{"use strict";rU();iU();aU();sU();oU();cU();ZA();uU();hU();fU();dU();pU();mU();gU();yU();vU();xU();bU();TU();m8();wU();AU();_U();DU();LU();RU();NU();MU();IU();OU();PU();BU();$U();zU();R8=[null];o(ui,"Selection");o(GU,"selection");o(lwe,"selection_selection");ui.prototype=GU.prototype={constructor:ui,select:UA,selectAll:qA,selectChild:YA,selectChildren:XA,filter:jA,data:e8,enter:QA,exit:t8,join:r8,merge:n8,selection:lwe,order:i8,sort:a8,call:s8,nodes:o8,node:l8,size:c8,empty:u8,each:h8,attr:f8,style:p8,property:g8,classed:v8,text:x8,html:b8,raise:T8,lower:w8,append:k8,insert:E8,remove:S8,clone:C8,datum:A8,on:_8,dispatch:D8,[Symbol.iterator]:L8};pu=GU;});function Ge(t){return typeof t=="string"?new ui([[document.querySelector(t)]],[document.documentElement]):new ui([[t]],R8);}var VU=N(()=>{"use strict";pl();o(Ge,"default");});var ml=N(()=>{"use strict";ov();j3();VU();pl();K3();WA();m8();});var UU=N(()=>{"use strict";});function kh(t,e,r){t.prototype=e.prototype=r,r.constructor=t;}function S0(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r;}var N8=N(()=>{"use strict";o(kh,"default");o(S0,"extend");});function Eh(){}function WU(){return this.rgb().formatHex();}function gwe(){return this.rgb().formatHex8();}function ywe(){return ZU(this).formatHsl();}function qU(){return this.rgb().formatRgb();}function yl(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=cwe.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?YU(e):r===3?new oa(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Z3(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Z3(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=uwe.exec(t))?new oa(e[1],e[2],e[3],1):(e=hwe.exec(t))?new oa(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=fwe.exec(t))?Z3(e[1],e[2],e[3],e[4]):(e=dwe.exec(t))?Z3(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=pwe.exec(t))?KU(e[1],e[2]/100,e[3]/100,1):(e=mwe.exec(t))?KU(e[1],e[2]/100,e[3]/100,e[4]):HU.hasOwnProperty(t)?YU(HU[t]):t==="transparent"?new oa(NaN,NaN,NaN,0):null;}function YU(t){return new oa(t>>16&255,t>>8&255,t&255,1);}function Z3(t,e,r,n){return n<=0&&(t=e=r=NaN),new oa(t,e,r,n);}function I8(t){return t instanceof Eh||(t=yl(t)),t?(t=t.rgb(),new oa(t.r,t.g,t.b,t.opacity)):new oa();}function A0(t,e,r,n){return arguments.length===1?I8(t):new oa(t,e,r,n!==null&&n!==void 0?n:1);}function oa(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n;}function XU(){return`#${cd(this.r)}${cd(this.g)}${cd(this.b)}`;}function vwe(){return`#${cd(this.r)}${cd(this.g)}${cd(this.b)}${cd((isNaN(this.opacity)?1:this.opacity)*255)}`;}function jU(){let t=t5(this.opacity);return`${t===1?"rgb(":"rgba("}${ud(this.r)}, ${ud(this.g)}, ${ud(this.b)}${t===1?")":`, ${t})`}`;}function t5(t){return isNaN(t)?1:Math.max(0,Math.min(1,t));}function ud(t){return Math.max(0,Math.min(255,Math.round(t)||0));}function cd(t){return t=ud(t),(t<16?"0":"")+t.toString(16);}function KU(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new gl(t,e,r,n);}function ZU(t){if(t instanceof gl)return new gl(t.h,t.s,t.l,t.opacity);if(t instanceof Eh||(t=yl(t)),!t)return new gl();if(t instanceof gl)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),s=NaN,l=a-i,u=(a+i)/2;return l?(e===a?s=(r-n)/l+(r<n)*6:r===a?s=(n-e)/l+2:s=(e-r)/l+4,l/=u<.5?a+i:2-a-i,s*=60):l=u>0&&u<1?0:s,new gl(s,l,u,t.opacity);}function JU(t,e,r,n){return arguments.length===1?ZU(t):new gl(t,e,r,n!==null&&n!==void 0?n:1);}function gl(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n;}function QU(t){return t=(t||0)%360,t<0?t+360:t;}function J3(t){return Math.max(0,Math.min(1,t||0));}function M8(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255;}var hv,e5,C0,fv,ac,cwe,uwe,hwe,fwe,dwe,pwe,mwe,HU,O8=N(()=>{"use strict";N8();o(Eh,"Color");hv=.7,e5=1/hv,C0="\\s*([+-]?\\d+)\\s*",fv="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ac="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cwe=/^#([0-9a-f]{3,8})$/,uwe=new RegExp(`^rgb\\(${C0},${C0},${C0}\\)$`),hwe=new RegExp(`^rgb\\(${ac},${ac},${ac}\\)$`),fwe=new RegExp(`^rgba\\(${C0},${C0},${C0},${fv}\\)$`),dwe=new RegExp(`^rgba\\(${ac},${ac},${ac},${fv}\\)$`),pwe=new RegExp(`^hsl\\(${fv},${ac},${ac}\\)$`),mwe=new RegExp(`^hsla\\(${fv},${ac},${ac},${fv}\\)$`),HU={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};kh(Eh,yl,{copy(t){return Object.assign(new this.constructor(),this,t);},displayable(){return this.rgb().displayable();},hex:WU,formatHex:WU,formatHex8:gwe,formatHsl:ywe,formatRgb:qU,toString:qU});o(WU,"color_formatHex");o(gwe,"color_formatHex8");o(ywe,"color_formatHsl");o(qU,"color_formatRgb");o(yl,"color");o(YU,"rgbn");o(Z3,"rgba");o(I8,"rgbConvert");o(A0,"rgb");o(oa,"Rgb");kh(oa,A0,S0(Eh,{brighter(t){return t=t==null?e5:Math.pow(e5,t),new oa(this.r*t,this.g*t,this.b*t,this.opacity);},darker(t){return t=t==null?hv:Math.pow(hv,t),new oa(this.r*t,this.g*t,this.b*t,this.opacity);},rgb(){return this;},clamp(){return new oa(ud(this.r),ud(this.g),ud(this.b),t5(this.opacity));},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1;},hex:XU,formatHex:XU,formatHex8:vwe,formatRgb:jU,toString:jU}));o(XU,"rgb_formatHex");o(vwe,"rgb_formatHex8");o(jU,"rgb_formatRgb");o(t5,"clampa");o(ud,"clampi");o(cd,"hex");o(KU,"hsla");o(ZU,"hslConvert");o(JU,"hsl");o(gl,"Hsl");kh(gl,JU,S0(Eh,{brighter(t){return t=t==null?e5:Math.pow(e5,t),new gl(this.h,this.s,this.l*t,this.opacity);},darker(t){return t=t==null?hv:Math.pow(hv,t),new gl(this.h,this.s,this.l*t,this.opacity);},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new oa(M8(t>=240?t-240:t+120,i,n),M8(t,i,n),M8(t<120?t+240:t-120,i,n),this.opacity);},clamp(){return new gl(QU(this.h),J3(this.s),J3(this.l),t5(this.opacity));},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1;},formatHsl(){let t=t5(this.opacity);return`${t===1?"hsl(":"hsla("}${QU(this.h)}, ${J3(this.s)*100}%, ${J3(this.l)*100}%${t===1?")":`, ${t})`}`;}}));o(QU,"clamph");o(J3,"clampt");o(M8,"hsl2rgb");});var eH,tH,rH=N(()=>{"use strict";eH=Math.PI/180,tH=180/Math.PI;});function lH(t){if(t instanceof sc)return new sc(t.l,t.a,t.b,t.opacity);if(t instanceof mu)return cH(t);t instanceof oa||(t=I8(t));var e=$8(t.r),r=$8(t.g),n=$8(t.b),i=P8((.2225045*e+.7168786*r+.0606169*n)/iH),a,s;return e===r&&r===n?a=s=i:(a=P8((.4360747*e+.3850649*r+.1430804*n)/nH),s=P8((.0139322*e+.0971045*r+.7141733*n)/aH)),new sc(116*i-16,500*(a-i),200*(i-s),t.opacity);}function z8(t,e,r,n){return arguments.length===1?lH(t):new sc(t,e,r,n!==null&&n!==void 0?n:1);}function sc(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n;}function P8(t){return t>xwe?Math.pow(t,1/3):t/oH+sH;}function B8(t){return t>_0?t*t*t:oH*(t-sH);}function F8(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055);}function $8(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);}function bwe(t){if(t instanceof mu)return new mu(t.h,t.c,t.l,t.opacity);if(t instanceof sc||(t=lH(t)),t.a===0&&t.b===0)return new mu(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*tH;return new mu(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity);}function dv(t,e,r,n){return arguments.length===1?bwe(t):new mu(t,e,r,n!==null&&n!==void 0?n:1);}function mu(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n;}function cH(t){if(isNaN(t.h))return new sc(t.l,0,0,t.opacity);var e=t.h*eH;return new sc(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity);}var r5,nH,iH,aH,sH,_0,oH,xwe,uH=N(()=>{"use strict";N8();O8();rH();r5=18,nH=.96422,iH=1,aH=.82521,sH=4/29,_0=6/29,oH=3*_0*_0,xwe=_0*_0*_0;o(lH,"labConvert");o(z8,"lab");o(sc,"Lab");kh(sc,z8,S0(Eh,{brighter(t){return new sc(this.l+r5*(t!==null&&t!==void 0?t:1),this.a,this.b,this.opacity);},darker(t){return new sc(this.l-r5*(t!==null&&t!==void 0?t:1),this.a,this.b,this.opacity);},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=nH*B8(e),t=iH*B8(t),r=aH*B8(r),new oa(F8(3.1338561*e-1.6168667*t-.4906146*r),F8(-.9787684*e+1.9161415*t+.033454*r),F8(.0719453*e-.2289914*t+1.4052427*r),this.opacity);}}));o(P8,"xyz2lab");o(B8,"lab2xyz");o(F8,"lrgb2rgb");o($8,"rgb2lrgb");o(bwe,"hclConvert");o(dv,"hcl");o(mu,"Hcl");o(cH,"hcl2lab");kh(mu,dv,S0(Eh,{brighter(t){return new mu(this.h,this.c,this.l+r5*(t!==null&&t!==void 0?t:1),this.opacity);},darker(t){return new mu(this.h,this.c,this.l-r5*(t!==null&&t!==void 0?t:1),this.opacity);},rgb(){return cH(this).rgb();}}));});var D0=N(()=>{"use strict";O8();uH();});function G8(t,e,r,n,i){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*r+(1+3*t+3*a-3*s)*n+s*i)/6;}function V8(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],a=t[n+1],s=n>0?t[n-1]:2*i-a,l=n<e-1?t[n+2]:2*a-i;return G8((r-n/e)*e,s,i,a,l);};}var U8=N(()=>{"use strict";o(G8,"basis");o(V8,"default");});function H8(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),i=t[(n+e-1)%e],a=t[n%e],s=t[(n+1)%e],l=t[(n+2)%e];return G8((r-n/e)*e,i,a,s,l);};}var hH=N(()=>{"use strict";U8();o(H8,"default");});var L0,W8=N(()=>{"use strict";L0=o(t=>()=>t,"default");});function fH(t,e){return function(r){return t+r*e;};}function Twe(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r);};}function dH(t,e){var r=e-t;return r?fH(t,r>180||r<-180?r-360*Math.round(r/360):r):L0(isNaN(t)?e:t);}function pH(t){return(t=+t)==1?gu:function(e,r){return r-e?Twe(e,r,t):L0(isNaN(e)?r:e);};}function gu(t,e){var r=e-t;return r?fH(t,r):L0(isNaN(t)?e:t);}var q8=N(()=>{"use strict";W8();o(fH,"linear");o(Twe,"exponential");o(dH,"hue");o(pH,"gamma");o(gu,"nogamma");});function mH(t){return function(e){var r=e.length,n=new Array(r),i=new Array(r),a=new Array(r),s,l;for(s=0;s<r;++s)l=A0(e[s]),n[s]=l.r||0,i[s]=l.g||0,a[s]=l.b||0;return n=t(n),i=t(i),a=t(a),l.opacity=1,function(u){return l.r=n(u),l.g=i(u),l.b=a(u),l+"";};};}var hd,wwe,kwe,Y8=N(()=>{"use strict";D0();U8();hH();q8();hd=o(function t(e){var r=pH(e);function n(i,a){var s=r((i=A0(i)).r,(a=A0(a)).r),l=r(i.g,a.g),u=r(i.b,a.b),h=gu(i.opacity,a.opacity);return function(f){return i.r=s(f),i.g=l(f),i.b=u(f),i.opacity=h(f),i+"";};}return o(n,"rgb"),n.gamma=t,n;},"rgbGamma")(1);o(mH,"rgbSpline");wwe=mH(V8),kwe=mH(H8);});function X8(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=t[i]*(1-a)+e[i]*a;return n;};}function gH(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView);}var yH=N(()=>{"use strict";o(X8,"default");o(gH,"isNumberArray");});function vH(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s<n;++s)i[s]=Sh(t[s],e[s]);for(;s<r;++s)a[s]=e[s];return function(l){for(s=0;s<n;++s)a[s]=i[s](l);return a;};}var xH=N(()=>{"use strict";n5();o(vH,"genericArray");});function j8(t,e){var r=new Date();return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r;};}var bH=N(()=>{"use strict";o(j8,"default");});function Xi(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r;};}var pv=N(()=>{"use strict";o(Xi,"default");});function K8(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=Sh(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n;};}var TH=N(()=>{"use strict";n5();o(K8,"default");});function Ewe(t){return function(){return t;};}function Swe(t){return function(e){return t(e)+"";};}function R0(t,e){var r=Z8.lastIndex=Q8.lastIndex=0,n,i,a,s=-1,l=[],u=[];for(t=t+"",e=e+"";(n=Z8.exec(t))&&(i=Q8.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),l[s]?l[s]+=a:l[++s]=a),(n=n[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,u.push({i:s,x:Xi(n,i)})),r=Q8.lastIndex;return r<e.length&&(a=e.slice(r),l[s]?l[s]+=a:l[++s]=a),l.length<2?u[0]?Swe(u[0].x):Ewe(e):(e=u.length,function(h){for(var f=0,d;f<e;++f)l[(d=u[f]).i]=d.x(h);return l.join("");});}var Z8,Q8,J8=N(()=>{"use strict";pv();Z8=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Q8=new RegExp(Z8.source,"g");o(Ewe,"zero");o(Swe,"one");o(R0,"default");});function Sh(t,e){var r=typeof e,n;return e==null||r==="boolean"?L0(e):(r==="number"?Xi:r==="string"?(n=yl(e))?(e=n,hd):R0:e instanceof yl?hd:e instanceof Date?j8:gH(e)?X8:Array.isArray(e)?vH:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?K8:Xi)(t,e);}var n5=N(()=>{"use strict";D0();Y8();xH();bH();pv();TH();J8();W8();yH();o(Sh,"default");});function i5(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r);};}var wH=N(()=>{"use strict";o(i5,"default");});function s5(t,e,r,n,i,a){var s,l,u;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(u=t*r+e*n)&&(r-=t*u,n-=e*u),(l=Math.sqrt(r*r+n*n))&&(r/=l,n/=l,u/=l),t*n<e*r&&(t=-t,e=-e,u=-u,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*kH,skewX:Math.atan(u)*kH,scaleX:s,scaleY:l};}var kH,a5,EH=N(()=>{"use strict";kH=180/Math.PI,a5={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};o(s5,"default");});function SH(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?a5:s5(e.a,e.b,e.c,e.d,e.e,e.f);}function CH(t){return t==null?a5:(o5||(o5=document.createElementNS("http://www.w3.org/2000/svg","g")),o5.setAttribute("transform",t),(t=o5.transform.baseVal.consolidate())?(t=t.matrix,s5(t.a,t.b,t.c,t.d,t.e,t.f)):a5);}var o5,AH=N(()=>{"use strict";EH();o(SH,"parseCss");o(CH,"parseSvg");});function _H(t,e,r,n){function i(h){return h.length?h.pop()+" ":"";}o(i,"pop");function a(h,f,d,p,m,g){if(h!==d||f!==p){var y=m.push("translate(",null,e,null,r);g.push({i:y-4,x:Xi(h,d)},{i:y-2,x:Xi(f,p)});}else(d||p)&&m.push("translate("+d+e+p+r);}o(a,"translate");function s(h,f,d,p){h!==f?(h-f>180?f+=360:f-h>180&&(h+=360),p.push({i:d.push(i(d)+"rotate(",null,n)-2,x:Xi(h,f)})):f&&d.push(i(d)+"rotate("+f+n);}o(s,"rotate");function l(h,f,d,p){h!==f?p.push({i:d.push(i(d)+"skewX(",null,n)-2,x:Xi(h,f)}):f&&d.push(i(d)+"skewX("+f+n);}o(l,"skewX");function u(h,f,d,p,m,g){if(h!==d||f!==p){var y=m.push(i(m)+"scale(",null,",",null,")");g.push({i:y-4,x:Xi(h,d)},{i:y-2,x:Xi(f,p)});}else(d!==1||p!==1)&&m.push(i(m)+"scale("+d+","+p+")");}return o(u,"scale"),function(h,f){var d=[],p=[];return h=t(h),f=t(f),a(h.translateX,h.translateY,f.translateX,f.translateY,d,p),s(h.rotate,f.rotate,d,p),l(h.skewX,f.skewX,d,p),u(h.scaleX,h.scaleY,f.scaleX,f.scaleY,d,p),h=f=null,function(m){for(var g=-1,y=p.length,v;++g<y;)d[(v=p[g]).i]=v.x(m);return d.join("");};};}var e_,t_,DH=N(()=>{"use strict";pv();AH();o(_H,"interpolateTransform");e_=_H(SH,"px, ","px)","deg)"),t_=_H(CH,", ",")",")");});function LH(t){return function(e,r){var n=t((e=dv(e)).h,(r=dv(r)).h),i=gu(e.c,r.c),a=gu(e.l,r.l),s=gu(e.opacity,r.opacity);return function(l){return e.h=n(l),e.c=i(l),e.l=a(l),e.opacity=s(l),e+"";};};}var r_,Cwe,RH=N(()=>{"use strict";D0();q8();o(LH,"hcl");r_=LH(dH),Cwe=LH(gu);});var N0=N(()=>{"use strict";n5();pv();wH();J8();DH();Y8();RH();});function bv(){return fd||(IH(Awe),fd=vv.now()+u5);}function Awe(){fd=0;}function xv(){this._call=this._time=this._next=null;}function h5(t,e,r){var n=new xv();return n.restart(t,e,r),n;}function OH(){bv(),++M0;for(var t=l5,e;t;)(e=fd-t._time)>=0&&t._call.call(void 0,e),t=t._next;--M0;}function NH(){fd=(c5=vv.now())+u5,M0=gv=0;try{OH();}finally{M0=0,Dwe(),fd=0;}}function _we(){var t=vv.now(),e=t-c5;e>MH&&(u5-=e,c5=t);}function Dwe(){for(var t,e=l5,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:l5=r);yv=t,n_(n);}function n_(t){if(!M0){gv&&(gv=clearTimeout(gv));var e=t-fd;e>24?(t<1/0&&(gv=setTimeout(NH,t-vv.now()-u5)),mv&&(mv=clearInterval(mv))):(mv||(c5=vv.now(),mv=setInterval(_we,MH)),M0=1,IH(NH));}}var M0,gv,mv,MH,l5,yv,c5,fd,u5,vv,IH,i_=N(()=>{"use strict";M0=0,gv=0,mv=0,MH=1e3,c5=0,fd=0,u5=0,vv=typeof performance=="object"&&performance.now?performance:Date,IH=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17);};o(bv,"now");o(Awe,"clearNow");o(xv,"Timer");xv.prototype=h5.prototype={constructor:xv,restart:o(function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?bv():+r)+(e==null?0:+e),!this._next&&yv!==this&&(yv?yv._next=this:l5=this,yv=this),this._call=t,this._time=r,n_();},"restart"),stop:o(function(){this._call&&(this._call=null,this._time=1/0,n_());},"stop")};o(h5,"timer");o(OH,"timerFlush");o(NH,"wake");o(_we,"poke");o(Dwe,"nap");o(n_,"sleep");});function Tv(t,e,r){var n=new xv();return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e);},e,r),n;}var PH=N(()=>{"use strict";i_();o(Tv,"default");});var f5=N(()=>{"use strict";i_();PH();});function yu(t,e,r,n,i,a){var s=t.__transition;if(!s)t.__transition={};else if(r in s)return;Nwe(t,r,{name:e,index:n,group:i,on:Lwe,tween:Rwe,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:$H});}function kv(t,e){var r=Fi(t,e);if(r.state>$H)throw new Error("too late; already scheduled");return r;}function la(t,e){var r=Fi(t,e);if(r.state>d5)throw new Error("too late; already running");return r;}function Fi(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r;}function Nwe(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=h5(a,0,r.time);function a(h){r.state=BH,r.timer.restart(s,r.delay,r.time),r.delay<=h&&s(h-r.delay);}o(a,"schedule");function s(h){var f,d,p,m;if(r.state!==BH)return u();for(f in n)if(m=n[f],m.name===r.name){if(m.state===d5)return Tv(s);m.state===FH?(m.state=wv,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete n[f]):+f<e&&(m.state=wv,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete n[f]);}if(Tv(function(){r.state===d5&&(r.state=FH,r.timer.restart(l,r.delay,r.time),l(h));}),r.state=p5,r.on.call("start",t,t.__data__,r.index,r.group),r.state===p5){for(r.state=d5,i=new Array(p=r.tween.length),f=0,d=-1;f<p;++f)(m=r.tween[f].value.call(t,t.__data__,r.index,r.group))&&(i[++d]=m);i.length=d+1;}}o(s,"start");function l(h){for(var f=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(u),r.state=m5,1),d=-1,p=i.length;++d<p;)i[d].call(t,f);r.state===m5&&(r.on.call("end",t,t.__data__,r.index,r.group),u());}o(l,"tick");function u(){r.state=wv,r.timer.stop(),delete n[e];for(var h in n)return;delete t.__transition;}o(u,"stop");}var Lwe,Rwe,$H,BH,p5,d5,FH,m5,wv,Ss=N(()=>{"use strict";$A();f5();Lwe=FA("start","end","cancel","interrupt"),Rwe=[],$H=0,BH=1,p5=2,d5=3,FH=4,m5=5,wv=6;o(yu,"default");o(kv,"init");o(la,"set");o(Fi,"get");o(Nwe,"create");});function Ev(t,e){var r=t.__transition,n,i,a=!0,s;if(r){e=e==null?null:e+"";for(s in r){if((n=r[s]).name!==e){a=!1;continue;}i=n.state>p5&&n.state<m5,n.state=wv,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete r[s];}a&&delete t.__transition;}}var zH=N(()=>{"use strict";Ss();o(Ev,"default");});function a_(t){return this.each(function(){Ev(this,t);});}var GH=N(()=>{"use strict";zH();o(a_,"default");});function Mwe(t,e){var r,n;return function(){var i=la(this,t),a=i.tween;if(a!==r){n=r=a;for(var s=0,l=n.length;s<l;++s)if(n[s].name===e){n=n.slice(),n.splice(s,1);break;}}i.tween=n;};}function Iwe(t,e,r){var n,i;if(typeof r!="function")throw new Error();return function(){var a=la(this,t),s=a.tween;if(s!==n){i=(n=s).slice();for(var l={name:e,value:r},u=0,h=i.length;u<h;++u)if(i[u].name===e){i[u]=l;break;}u===h&&i.push(l);}a.tween=i;};}function s_(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n=Fi(this.node(),r).tween,i=0,a=n.length,s;i<a;++i)if((s=n[i]).name===t)return s.value;return null;}return this.each((e==null?Mwe:Iwe)(r,t,e));}function I0(t,e,r){var n=t._id;return t.each(function(){var i=la(this,n);(i.value||(i.value={}))[e]=r.apply(this,arguments);}),function(i){return Fi(i,n).value[e];};}var Sv=N(()=>{"use strict";Ss();o(Mwe,"tweenRemove");o(Iwe,"tweenFunction");o(s_,"default");o(I0,"tweenValue");});function Cv(t,e){var r;return(typeof e=="number"?Xi:e instanceof yl?hd:(r=yl(e))?(e=r,hd):R0)(t,e);}var o_=N(()=>{"use strict";D0();N0();o(Cv,"default");});function Owe(t){return function(){this.removeAttribute(t);};}function Pwe(t){return function(){this.removeAttributeNS(t.space,t.local);};}function Bwe(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttribute(t);return s===i?null:s===n?a:a=e(n=s,r);};}function Fwe(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===n?a:a=e(n=s,r);};}function $we(t,e,r){var n,i,a;return function(){var s,l=r(this),u;return l==null?void this.removeAttribute(t):(s=this.getAttribute(t),u=l+"",s===u?null:s===n&&u===i?a:(i=u,a=e(n=s,l)));};}function zwe(t,e,r){var n,i,a;return function(){var s,l=r(this),u;return l==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),u=l+"",s===u?null:s===n&&u===i?a:(i=u,a=e(n=s,l)));};}function l_(t,e){var r=ic(t),n=r==="transform"?t_:Cv;return this.attrTween(t,typeof e=="function"?(r.local?zwe:$we)(r,n,I0(this,"attr."+t,e)):e==null?(r.local?Pwe:Owe)(r):(r.local?Fwe:Bwe)(r,n,e));}var VH=N(()=>{"use strict";N0();ml();Sv();o_();o(Owe,"attrRemove");o(Pwe,"attrRemoveNS");o(Bwe,"attrConstant");o(Fwe,"attrConstantNS");o($we,"attrFunction");o(zwe,"attrFunctionNS");o(l_,"default");});function Gwe(t,e){return function(r){this.setAttribute(t,e.call(this,r));};}function Vwe(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r));};}function Uwe(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&Vwe(t,a)),r;}return o(i,"tween"),i._value=e,i;}function Hwe(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&Gwe(t,a)),r;}return o(i,"tween"),i._value=e,i;}function c_(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error();var n=ic(t);return this.tween(r,(n.local?Uwe:Hwe)(n,e));}var UH=N(()=>{"use strict";ml();o(Gwe,"attrInterpolate");o(Vwe,"attrInterpolateNS");o(Uwe,"attrTweenNS");o(Hwe,"attrTween");o(c_,"default");});function Wwe(t,e){return function(){kv(this,t).delay=+e.apply(this,arguments);};}function qwe(t,e){return e=+e,function(){kv(this,t).delay=e;};}function u_(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Wwe:qwe)(e,t)):Fi(this.node(),e).delay;}var HH=N(()=>{"use strict";Ss();o(Wwe,"delayFunction");o(qwe,"delayConstant");o(u_,"default");});function Ywe(t,e){return function(){la(this,t).duration=+e.apply(this,arguments);};}function Xwe(t,e){return e=+e,function(){la(this,t).duration=e;};}function h_(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ywe:Xwe)(e,t)):Fi(this.node(),e).duration;}var WH=N(()=>{"use strict";Ss();o(Ywe,"durationFunction");o(Xwe,"durationConstant");o(h_,"default");});function jwe(t,e){if(typeof e!="function")throw new Error();return function(){la(this,t).ease=e;};}function f_(t){var e=this._id;return arguments.length?this.each(jwe(e,t)):Fi(this.node(),e).ease;}var qH=N(()=>{"use strict";Ss();o(jwe,"easeConstant");o(f_,"default");});function Kwe(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error();la(this,t).ease=r;};}function d_(t){if(typeof t!="function")throw new Error();return this.each(Kwe(this._id,t));}var YH=N(()=>{"use strict";Ss();o(Kwe,"easeVarying");o(d_,"default");});function p_(t){typeof t!="function"&&(t=E0(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],s=a.length,l=n[i]=[],u,h=0;h<s;++h)(u=a[h])&&t.call(u,u.__data__,h,a)&&l.push(u);return new ts(n,this._parents,this._name,this._id);}var XH=N(()=>{"use strict";ml();dd();o(p_,"default");});function m_(t){if(t._id!==this._id)throw new Error();for(var e=this._groups,r=t._groups,n=e.length,i=r.length,a=Math.min(n,i),s=new Array(n),l=0;l<a;++l)for(var u=e[l],h=r[l],f=u.length,d=s[l]=new Array(f),p,m=0;m<f;++m)(p=u[m]||h[m])&&(d[m]=p);for(;l<n;++l)s[l]=e[l];return new ts(s,this._parents,this._name,this._id);}var jH=N(()=>{"use strict";dd();o(m_,"default");});function Qwe(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start";});}function Zwe(t,e,r){var n,i,a=Qwe(e)?kv:la;return function(){var s=a(this,t),l=s.on;l!==n&&(i=(n=l).copy()).on(e,r),s.on=i;};}function g_(t,e){var r=this._id;return arguments.length<2?Fi(this.node(),r).on.on(t):this.each(Zwe(r,t,e));}var KH=N(()=>{"use strict";Ss();o(Qwe,"start");o(Zwe,"onFunction");o(g_,"default");});function Jwe(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this);};}function y_(){return this.on("end.remove",Jwe(this._id));}var QH=N(()=>{"use strict";o(Jwe,"removeFunction");o(y_,"default");});function v_(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Th(t));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s<i;++s)for(var l=n[s],u=l.length,h=a[s]=new Array(u),f,d,p=0;p<u;++p)(f=l[p])&&(d=t.call(f,f.__data__,p,l))&&("__data__"in f&&(d.__data__=f.__data__),h[p]=d,yu(h[p],e,r,p,h,Fi(f,r)));return new ts(a,this._parents,e,r);}var ZH=N(()=>{"use strict";ml();dd();Ss();o(v_,"default");});function x_(t){var e=this._name,r=this._id;typeof t!="function"&&(t=k0(t));for(var n=this._groups,i=n.length,a=[],s=[],l=0;l<i;++l)for(var u=n[l],h=u.length,f,d=0;d<h;++d)if(f=u[d]){for(var p=t.call(f,f.__data__,d,u),m,g=Fi(f,r),y=0,v=p.length;y<v;++y)(m=p[y])&&yu(m,e,r,y,p,g);a.push(p),s.push(f);}return new ts(a,s,e,r);}var JH=N(()=>{"use strict";ml();dd();Ss();o(x_,"default");});function b_(){return new eke(this._groups,this._parents);}var eke,eW=N(()=>{"use strict";ml();eke=pu.prototype.constructor;o(b_,"default");});function tke(t,e){var r,n,i;return function(){var a=wh(this,t),s=(this.style.removeProperty(t),wh(this,t));return a===s?null:a===r&&s===n?i:i=e(r=a,n=s);};}function tW(t){return function(){this.style.removeProperty(t);};}function rke(t,e,r){var n,i=r+"",a;return function(){var s=wh(this,t);return s===i?null:s===n?a:a=e(n=s,r);};}function nke(t,e,r){var n,i,a;return function(){var s=wh(this,t),l=r(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(t),wh(this,t))),s===u?null:s===n&&u===i?a:(i=u,a=e(n=s,l));};}function ike(t,e){var r,n,i,a="style."+e,s="end."+a,l;return function(){var u=la(this,t),h=u.on,f=u.value[a]==null?l||(l=tW(e)):void 0;(h!==r||i!==f)&&(n=(r=h).copy()).on(s,i=f),u.on=n;};}function T_(t,e,r){var n=(t+="")=="transform"?e_:Cv;return e==null?this.styleTween(t,tke(t,n)).on("end.style."+t,tW(t)):typeof e=="function"?this.styleTween(t,nke(t,n,I0(this,"style."+t,e))).each(ike(this._id,t)):this.styleTween(t,rke(t,n,e),r).on("end.style."+t,null);}var rW=N(()=>{"use strict";N0();ml();Ss();Sv();o_();o(tke,"styleNull");o(tW,"styleRemove");o(rke,"styleConstant");o(nke,"styleFunction");o(ike,"styleMaybeRemove");o(T_,"default");});function ake(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r);};}function ske(t,e,r){var n,i;function a(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&ake(t,s,r)),n;}return o(a,"tween"),a._value=e,a;}function w_(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error();return this.tween(n,ske(t,e,r!==null&&r!==void 0?r:""));}var nW=N(()=>{"use strict";o(ake,"styleInterpolate");o(ske,"styleTween");o(w_,"default");});function oke(t){return function(){this.textContent=t;};}function lke(t){return function(){var e=t(this);this.textContent=e!==null&&e!==void 0?e:"";};}function k_(t){return this.tween("text",typeof t=="function"?lke(I0(this,"text",t)):oke(t==null?"":t+""));}var iW=N(()=>{"use strict";Sv();o(oke,"textConstant");o(lke,"textFunction");o(k_,"default");});function cke(t){return function(e){this.textContent=t.call(this,e);};}function uke(t){var e,r;function n(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&cke(i)),e;}return o(n,"tween"),n._value=t,n;}function E_(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error();return this.tween(e,uke(t));}var aW=N(()=>{"use strict";o(cke,"textInterpolate");o(uke,"textTween");o(E_,"default");});function S_(){for(var t=this._name,e=this._id,r=g5(),n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],l=s.length,u,h=0;h<l;++h)if(u=s[h]){var f=Fi(u,e);yu(u,t,r,h,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease});}return new ts(n,this._parents,t,r);}var sW=N(()=>{"use strict";dd();Ss();o(S_,"default");});function C_(){var t,e,r=this,n=r._id,i=r.size();return new Promise(function(a,s){var l={value:s},u={value:o(function(){--i===0&&a();},"value")};r.each(function(){var h=la(this,n),f=h.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(l),e._.interrupt.push(l),e._.end.push(u)),h.on=e;}),i===0&&a();});}var oW=N(()=>{"use strict";Ss();o(C_,"default");});function ts(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n;}function lW(t){return pu().transition(t);}function g5(){return++hke;}var hke,vu,dd=N(()=>{"use strict";ml();VH();UH();HH();WH();qH();YH();XH();jH();KH();QH();ZH();JH();eW();rW();nW();iW();aW();sW();Sv();oW();hke=0;o(ts,"Transition");o(lW,"transition");o(g5,"newId");vu=pu.prototype;ts.prototype=lW.prototype={constructor:ts,select:v_,selectAll:x_,selectChild:vu.selectChild,selectChildren:vu.selectChildren,filter:p_,merge:m_,selection:b_,transition:S_,call:vu.call,nodes:vu.nodes,node:vu.node,size:vu.size,empty:vu.empty,each:vu.each,on:g_,attr:l_,attrTween:c_,style:T_,styleTween:w_,text:k_,textTween:E_,remove:y_,tween:s_,delay:u_,duration:h_,ease:f_,easeVarying:d_,end:C_,[Symbol.iterator]:vu[Symbol.iterator]};});function y5(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2;}var cW=N(()=>{"use strict";o(y5,"cubicInOut");});var A_=N(()=>{"use strict";cW();});function dke(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r;}function __(t){var e,r;t instanceof ts?(e=t._id,t=t._name):(e=g5(),(r=fke).time=bv(),t=t==null?null:t+"");for(var n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],l=s.length,u,h=0;h<l;++h)(u=s[h])&&yu(u,t,e,h,s,r||dke(u,e));return new ts(n,this._parents,t,e);}var fke,uW=N(()=>{"use strict";dd();Ss();A_();f5();fke={time:null,delay:0,duration:250,ease:y5};o(dke,"inherit");o(__,"default");});var hW=N(()=>{"use strict";ml();GH();uW();pu.prototype.interrupt=a_;pu.prototype.transition=__;});var v5=N(()=>{"use strict";hW();});var fW=N(()=>{"use strict";});var dW=N(()=>{"use strict";});var pW=N(()=>{"use strict";});function mW(t){return[+t[0],+t[1]];}function pke(t){return[mW(t[0]),mW(t[1])];}function D_(t){return{type:t};}var ugt,hgt,fgt,dgt,pgt,mgt,gW=N(()=>{"use strict";v5();fW();dW();pW();({abs:ugt,max:hgt,min:fgt}=Math);o(mW,"number1");o(pke,"number2");dgt={name:"x",handles:["w","e"].map(D_),input:o(function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]];},"input"),output:o(function(t){return t&&[t[0][0],t[1][0]];},"output")},pgt={name:"y",handles:["n","s"].map(D_),input:o(function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]];},"input"),output:o(function(t){return t&&[t[0][1],t[1][1]];},"output")},mgt={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(D_),input:o(function(t){return t==null?null:pke(t);},"input"),output:o(function(t){return t;},"output")};o(D_,"type");});var yW=N(()=>{"use strict";gW();});function vW(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e];}function gke(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return vW;let r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i];};}function xW(){return new md();}var L_,R_,pd,mke,md,bW=N(()=>{"use strict";var _Class25;L_=Math.PI,R_=2*L_,pd=1e-6,mke=R_-pd;o(vW,"append");o(gke,"appendRound");md=(_Class25=class md{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?vW:gke(e);}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`;}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`);}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`;}quadraticCurveTo(e,r,n,i){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+i}`;}bezierCurveTo(e,r,n,i,a,s){this._append`C${+e},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`;}arcTo(e,r,n,i,a){if(e=+e,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,l=this._y1,u=n-e,h=i-r,f=s-e,d=l-r,p=f*f+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(p>pd)if(!(Math.abs(d*u-h*f)>pd)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let m=n-s,g=i-l,y=u*u+h*h,v=m*m+g*g,x=Math.sqrt(y),b=Math.sqrt(p),T=a*Math.tan((L_-Math.acos((y+p-v)/(2*x*b)))/2),C=T/b,w=T/x;Math.abs(C-1)>pd&&this._append`L${e+C*f},${r+C*d}`,this._append`A${a},${a},0,0,${+(d*m>f*g)},${this._x1=e+w*u},${this._y1=r+w*h}`;}}arc(e,r,n,i,a,s){if(e=+e,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),u=n*Math.sin(i),h=e+l,f=r+u,d=1^s,p=s?i-a:a-i;this._x1===null?this._append`M${h},${f}`:(Math.abs(this._x1-h)>pd||Math.abs(this._y1-f)>pd)&&this._append`L${h},${f}`,n&&(p<0&&(p=p%R_+R_),p>mke?this._append`A${n},${n},0,1,${d},${e-l},${r-u}A${n},${n},0,1,${d},${this._x1=h},${this._y1=f}`:p>pd&&this._append`A${n},${n},0,${+(p>=L_)},${d},${this._x1=e+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`);}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`;}toString(){return this._;}},o(_Class25,"Path"),_Class25);o(xW,"path");xW.prototype=md.prototype;});var N_=N(()=>{"use strict";bW();});var TW=N(()=>{"use strict";});var wW=N(()=>{"use strict";});var kW=N(()=>{"use strict";});var EW=N(()=>{"use strict";});var SW=N(()=>{"use strict";});var CW=N(()=>{"use strict";});var AW=N(()=>{"use strict";});function M_(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10);}function gd(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)];}var Av=N(()=>{"use strict";o(M_,"default");o(gd,"formatDecimalParts");});function vl(t){return t=gd(Math.abs(t)),t?t[1]:NaN;}var _v=N(()=>{"use strict";Av();o(vl,"default");});function I_(t,e){return function(r,n){for(var i=r.length,a=[],s=0,l=t[0],u=0;i>0&&l>0&&(u+l+1>n&&(l=Math.max(1,n-u)),a.push(r.substring(i-=l,i+l)),!((u+=l+1)>n));)l=t[s=(s+1)%t.length];return a.reverse().join(e);};}var _W=N(()=>{"use strict";o(I_,"default");});function O_(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r];});};}var DW=N(()=>{"use strict";o(O_,"default");});function Ch(t){if(!(e=yke.exec(t)))throw new Error("invalid format: "+t);var e;return new x5({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});}function x5(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+"";}var yke,P_=N(()=>{"use strict";yke=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;o(Ch,"formatSpecifier");Ch.prototype=x5.prototype;o(x5,"FormatSpecifier");x5.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type;};});function B_(t){e:for(var e=t.length,r=1,n=-1,i;r<e;++r)switch(t[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+t[r])break e;n>0&&(n=0);break;}return n>0?t.slice(0,n)+t.slice(i+1):t;}var LW=N(()=>{"use strict";o(B_,"default");});function $_(t,e){var r=gd(t,e);if(!r)return t+"";var n=r[0],i=r[1],a=i-(F_=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+gd(t,Math.max(0,e+a-1))[0];}var F_,z_=N(()=>{"use strict";Av();o($_,"default");});function b5(t,e){var r=gd(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0");}var RW=N(()=>{"use strict";Av();o(b5,"default");});var G_,NW=N(()=>{"use strict";Av();z_();RW();G_={"%":o((t,e)=>(t*100).toFixed(e),"%"),b:o(t=>Math.round(t).toString(2),"b"),c:o(t=>t+"","c"),d:M_,e:o((t,e)=>t.toExponential(e),"e"),f:o((t,e)=>t.toFixed(e),"f"),g:o((t,e)=>t.toPrecision(e),"g"),o:o(t=>Math.round(t).toString(8),"o"),p:o((t,e)=>b5(t*100,e),"p"),r:b5,s:$_,X:o(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:o(t=>Math.round(t).toString(16),"x")};});function T5(t){return t;}var MW=N(()=>{"use strict";o(T5,"default");});function V_(t){var e=t.grouping===void 0||t.thousands===void 0?T5:I_(IW.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?T5:O_(IW.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",l=t.minus===void 0?"\u2212":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function h(d){d=Ch(d);var p=d.fill,m=d.align,g=d.sign,y=d.symbol,v=d.zero,x=d.width,b=d.comma,T=d.precision,C=d.trim,w=d.type;w==="n"?(b=!0,w="g"):G_[w]||(T===void 0&&(T=12),C=!0,w="g"),(v||p==="0"&&m==="=")&&(v=!0,p="0",m="=");var E=y==="$"?r:y==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",_=y==="$"?n:/[%p]/.test(w)?s:"",A=G_[w],D=/[defgprs%]/.test(w);T=T===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function O(R){var k=E,L=_,S,I,M;if(w==="c")L=A(R)+L,R="";else{R=+R;var P=R<0||1/R<0;if(R=isNaN(R)?u:A(Math.abs(R),T),C&&(R=B_(R)),P&&+R==0&&g!=="+"&&(P=!1),k=(P?g==="("?g:l:g==="-"||g==="("?"":g)+k,L=(w==="s"?OW[8+F_/3]:"")+L+(P&&g==="("?")":""),D){for(S=-1,I=R.length;++S<I;)if(M=R.charCodeAt(S),48>M||M>57){L=(M===46?i+R.slice(S+1):R.slice(S))+L,R=R.slice(0,S);break;}}}b&&!v&&(R=e(R,1/0));var B=k.length+R.length+L.length,F=B<x?new Array(x-B+1).join(p):"";switch(b&&v&&(R=e(F+R,F.length?x-L.length:1/0),F=""),m){case"<":R=k+R+L+F;break;case"=":R=k+F+R+L;break;case"^":R=F.slice(0,B=F.length>>1)+k+R+L+F.slice(B);break;default:R=F+k+R+L;break;}return a(R);}return o(O,"format"),O.toString=function(){return d+"";},O;}o(h,"newFormat");function f(d,p){var m=h((d=Ch(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(vl(p)/3)))*3,y=Math.pow(10,-g),v=OW[8+g/3];return function(x){return m(y*x)+v;};}return o(f,"formatPrefix"),{format:h,formatPrefix:f};}var IW,OW,PW=N(()=>{"use strict";_v();_W();DW();P_();LW();NW();z_();MW();IW=Array.prototype.map,OW=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];o(V_,"default");});function U_(t){return w5=V_(t),oc=w5.format,k5=w5.formatPrefix,w5;}var w5,oc,k5,BW=N(()=>{"use strict";PW();U_({thousands:",",grouping:[3],currency:["$",""]});o(U_,"defaultLocale");});function E5(t){return Math.max(0,-vl(Math.abs(t)));}var FW=N(()=>{"use strict";_v();o(E5,"default");});function S5(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vl(e)/3)))*3-vl(Math.abs(t)));}var $W=N(()=>{"use strict";_v();o(S5,"default");});function C5(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,vl(e)-vl(t))+1;}var zW=N(()=>{"use strict";_v();o(C5,"default");});var H_=N(()=>{"use strict";BW();P_();FW();$W();zW();});var GW=N(()=>{"use strict";});function vke(t){var e=0,r=t.children,n=r&&r.length;if(!n)e=1;else for(;--n>=0;)e+=r[n].value;t.value=e;}function W_(){return this.eachAfter(vke);}var VW=N(()=>{"use strict";o(vke,"count");o(W_,"default");});function q_(t,e){let r=-1;for(let n of this)t.call(e,n,++r,this);return this;}var UW=N(()=>{"use strict";o(q_,"default");});function Y_(t,e){for(var r=this,n=[r],i,a,s=-1;r=n.pop();)if(t.call(e,r,++s,this),i=r.children)for(a=i.length-1;a>=0;--a)n.push(i[a]);return this;}var HW=N(()=>{"use strict";o(Y_,"default");});function X_(t,e){for(var r=this,n=[r],i=[],a,s,l,u=-1;r=n.pop();)if(i.push(r),a=r.children)for(s=0,l=a.length;s<l;++s)n.push(a[s]);for(;r=i.pop();)t.call(e,r,++u,this);return this;}var WW=N(()=>{"use strict";o(X_,"default");});function j_(t,e){let r=-1;for(let n of this)if(t.call(e,n,++r,this))return n;}var qW=N(()=>{"use strict";o(j_,"default");});function K_(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r;});}var YW=N(()=>{"use strict";o(K_,"default");});function Q_(t){return this.eachBefore(function(e){e.children&&e.children.sort(t);});}var XW=N(()=>{"use strict";o(Q_,"default");});function Z_(t){for(var e=this,r=xke(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n;}function xke(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;for(t=r.pop(),e=n.pop();t===e;)i=t,t=r.pop(),e=n.pop();return i;}var jW=N(()=>{"use strict";o(Z_,"default");o(xke,"leastCommonAncestor");});function J_(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e;}var KW=N(()=>{"use strict";o(J_,"default");});function eD(){return Array.from(this);}var QW=N(()=>{"use strict";o(eD,"default");});function tD(){var t=[];return this.eachBefore(function(e){e.children||t.push(e);}),t;}var ZW=N(()=>{"use strict";o(tD,"default");});function rD(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r});}),e;}var JW=N(()=>{"use strict";o(rD,"default");});function*nD(){var t=this,e,r=[t],n,i,a;do for(e=r.reverse(),r=[];t=e.pop();)if(yield t,n=t.children)for(i=0,a=n.length;i<a;++i)r.push(n[i]);while(r.length);}var eq=N(()=>{"use strict";o(nD,"default");});function O0(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=wke)):e===void 0&&(e=Tke);for(var r=new Dv(t),n,i=[r],a,s,l,u;n=i.pop();)if((s=e(n.data))&&(u=(s=Array.from(s)).length))for(n.children=s,l=u-1;l>=0;--l)i.push(a=s[l]=new Dv(s[l])),a.parent=n,a.depth=n.depth+1;return r.eachBefore(Eke);}function bke(){return O0(this).eachBefore(kke);}function Tke(t){return t.children;}function wke(t){return Array.isArray(t)?t[1]:null;}function kke(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data;}function Eke(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e);}function Dv(t){this.data=t,this.depth=this.height=0,this.parent=null;}var tq=N(()=>{"use strict";VW();UW();HW();WW();qW();YW();XW();jW();KW();QW();ZW();JW();eq();o(O0,"hierarchy");o(bke,"node_copy");o(Tke,"objectChildren");o(wke,"mapChildren");o(kke,"copyData");o(Eke,"computeHeight");o(Dv,"Node");Dv.prototype=O0.prototype={constructor:Dv,count:W_,each:q_,eachAfter:X_,eachBefore:Y_,find:j_,sum:K_,sort:Q_,path:Z_,ancestors:J_,descendants:eD,leaves:tD,links:rD,copy:bke,[Symbol.iterator]:nD};});function rq(t){if(typeof t!="function")throw new Error();return t;}var nq=N(()=>{"use strict";o(rq,"required");});function P0(){return 0;}function yd(t){return function(){return t;};}var iq=N(()=>{"use strict";o(P0,"constantZero");o(yd,"default");});function iD(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1);}var aq=N(()=>{"use strict";o(iD,"default");});function aD(t,e,r,n,i){for(var a=t.children,s,l=-1,u=a.length,h=t.value&&(n-e)/t.value;++l<u;)s=a[l],s.y0=r,s.y1=i,s.x0=e,s.x1=e+=s.value*h;}var sq=N(()=>{"use strict";o(aD,"default");});function sD(t,e,r,n,i){for(var a=t.children,s,l=-1,u=a.length,h=t.value&&(i-r)/t.value;++l<u;)s=a[l],s.x0=e,s.x1=n,s.y0=r,s.y1=r+=s.value*h;}var oq=N(()=>{"use strict";o(sD,"default");});function Cke(t,e,r,n,i,a){for(var s=[],l=e.children,u,h,f=0,d=0,p=l.length,m,g,y=e.value,v,x,b,T,C,w,E;f<p;){m=i-r,g=a-n;do v=l[d++].value;while(!v&&d<p);for(x=b=v,w=Math.max(g/m,m/g)/(y*t),E=v*v*w,C=Math.max(b/E,E/x);d<p;++d){if(v+=h=l[d].value,h<x&&(x=h),h>b&&(b=h),E=v*v*w,T=Math.max(b/E,E/x),T>C){v-=h;break;}C=T;}s.push(u={value:v,dice:m<g,children:l.slice(f,d)}),u.dice?aD(u,r,n,i,y?n+=g*v/y:a):sD(u,r,n,y?r+=m*v/y:i,a),y-=v,f=d;}return s;}var Ske,lq,cq=N(()=>{"use strict";sq();oq();Ske=(1+Math.sqrt(5))/2;o(Cke,"squarifyRatio");lq=o(function t(e){function r(n,i,a,s,l){Cke(e,n,i,a,s,l);}return o(r,"squarify"),r.ratio=function(n){return t((n=+n)>1?n:1);},r;},"custom")(Ske);});function A5(){var t=lq,e=!1,r=1,n=1,i=[0],a=P0,s=P0,l=P0,u=P0,h=P0;function f(p){return p.x0=p.y0=0,p.x1=r,p.y1=n,p.eachBefore(d),i=[0],e&&p.eachBefore(iD),p;}o(f,"treemap");function d(p){var m=i[p.depth],g=p.x0+m,y=p.y0+m,v=p.x1-m,x=p.y1-m;v<g&&(g=v=(g+v)/2),x<y&&(y=x=(y+x)/2),p.x0=g,p.y0=y,p.x1=v,p.y1=x,p.children&&(m=i[p.depth+1]=a(p)/2,g+=h(p)-m,y+=s(p)-m,v-=l(p)-m,x-=u(p)-m,v<g&&(g=v=(g+v)/2),x<y&&(y=x=(y+x)/2),t(p,g,y,v,x));}return o(d,"positionNode"),f.round=function(p){return arguments.length?(e=!!p,f):e;},f.size=function(p){return arguments.length?(r=+p[0],n=+p[1],f):[r,n];},f.tile=function(p){return arguments.length?(t=rq(p),f):t;},f.padding=function(p){return arguments.length?f.paddingInner(p).paddingOuter(p):f.paddingInner();},f.paddingInner=function(p){return arguments.length?(a=typeof p=="function"?p:yd(+p),f):a;},f.paddingOuter=function(p){return arguments.length?f.paddingTop(p).paddingRight(p).paddingBottom(p).paddingLeft(p):f.paddingTop();},f.paddingTop=function(p){return arguments.length?(s=typeof p=="function"?p:yd(+p),f):s;},f.paddingRight=function(p){return arguments.length?(l=typeof p=="function"?p:yd(+p),f):l;},f.paddingBottom=function(p){return arguments.length?(u=typeof p=="function"?p:yd(+p),f):u;},f.paddingLeft=function(p){return arguments.length?(h=typeof p=="function"?p:yd(+p),f):h;},f;}var uq=N(()=>{"use strict";aq();cq();nq();iq();o(A5,"default");});var hq=N(()=>{"use strict";tq();uq();});var fq=N(()=>{"use strict";});var dq=N(()=>{"use strict";});function Ah(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break;}return this;}var Lv=N(()=>{"use strict";o(Ah,"initRange");});function Qs(){var t=new T0(),e=[],r=[],n=oD;function i(a){let s=t.get(a);if(s===void 0){if(n!==oD)return n;t.set(a,s=e.push(a)-1);}return r[s%r.length];}return o(i,"scale"),i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new T0();for(let s of a)t.has(s)||t.set(s,e.push(s)-1);return i;},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice();},i.unknown=function(a){return arguments.length?(n=a,i):n;},i.copy=function(){return Qs(e,r).unknown(n);},Ah.apply(i,arguments),i;}var oD,lD=N(()=>{"use strict";bh();Lv();oD=Symbol("implicit");o(Qs,"ordinal");});function B0(){var t=Qs().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,a,s,l=!1,u=0,h=0,f=.5;delete t.unknown;function d(){var p=e().length,m=i<n,g=m?i:n,y=m?n:i;a=(y-g)/Math.max(1,p-u+h*2),l&&(a=Math.floor(a)),g+=(y-g-a*(p-u))*f,s=a*(1-u),l&&(g=Math.round(g),s=Math.round(s));var v=H3(p).map(function(x){return g+a*x;});return r(m?v.reverse():v);}return o(d,"rescale"),t.domain=function(p){return arguments.length?(e(p),d()):e();},t.range=function(p){return arguments.length?([n,i]=p,n=+n,i=+i,d()):[n,i];},t.rangeRound=function(p){return[n,i]=p,n=+n,i=+i,l=!0,d();},t.bandwidth=function(){return s;},t.step=function(){return a;},t.round=function(p){return arguments.length?(l=!!p,d()):l;},t.padding=function(p){return arguments.length?(u=Math.min(1,h=+p),d()):u;},t.paddingInner=function(p){return arguments.length?(u=Math.min(1,p),d()):u;},t.paddingOuter=function(p){return arguments.length?(h=+p,d()):h;},t.align=function(p){return arguments.length?(f=Math.max(0,Math.min(1,p)),d()):f;},t.copy=function(){return B0(e(),[n,i]).round(l).paddingInner(u).paddingOuter(h).align(f);},Ah.apply(d(),arguments);}var pq=N(()=>{"use strict";bh();Lv();lD();o(B0,"band");});function cD(t){return function(){return t;};}var mq=N(()=>{"use strict";o(cD,"constants");});function uD(t){return+t;}var gq=N(()=>{"use strict";o(uD,"number");});function F0(t){return t;}function hD(t,e){return(e-=t=+t)?function(r){return(r-t)/e;}:cD(isNaN(e)?NaN:.5);}function Ake(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n));};}function _ke(t,e,r){var n=t[0],i=t[1],a=e[0],s=e[1];return i<n?(n=hD(i,n),a=r(s,a)):(n=hD(n,i),a=r(a,s)),function(l){return a(n(l));};}function Dke(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),a=new Array(n),s=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<n;)i[s]=hD(t[s],t[s+1]),a[s]=r(e[s],e[s+1]);return function(l){var u=NA(t,l,1,n)-1;return a[u](i[u](l));};}function _5(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());}function Lke(){var t=yq,e=yq,r=Sh,n,i,a,s=F0,l,u,h;function f(){var p=Math.min(t.length,e.length);return s!==F0&&(s=Ake(t[0],t[p-1])),l=p>2?Dke:_ke,u=h=null,d;}o(f,"rescale");function d(p){return p==null||isNaN(p=+p)?a:(u||(u=l(t.map(n),e,r)))(n(s(p)));}return o(d,"scale"),d.invert=function(p){return s(i((h||(h=l(e,t.map(n),Xi)))(p)));},d.domain=function(p){return arguments.length?(t=Array.from(p,uD),f()):t.slice();},d.range=function(p){return arguments.length?(e=Array.from(p),f()):e.slice();},d.rangeRound=function(p){return e=Array.from(p),r=i5,f();},d.clamp=function(p){return arguments.length?(s=p?!0:F0,f()):s!==F0;},d.interpolate=function(p){return arguments.length?(r=p,f()):r;},d.unknown=function(p){return arguments.length?(a=p,d):a;},function(p,m){return n=p,i=m,f();};}function Rv(){return Lke()(F0,F0);}var yq,fD=N(()=>{"use strict";bh();N0();mq();gq();yq=[0,1];o(F0,"identity");o(hD,"normalize");o(Ake,"clamper");o(_ke,"bimap");o(Dke,"polymap");o(_5,"copy");o(Lke,"transformer");o(Rv,"continuous");});function dD(t,e,r,n){var i=w0(t,e,r),a;switch(n=Ch(n!==null&&n!==void 0?n:",f"),n.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=S5(i,s))&&(n.precision=a),k5(n,s);}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=C5(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break;}case"f":case"%":{n.precision==null&&!isNaN(a=E5(i))&&(n.precision=a-(n.type==="%")*2);break;}}return oc(n);}var vq=N(()=>{"use strict";bh();H_();o(dD,"tickFormat");});function Rke(t){var e=t.domain;return t.ticks=function(r){var n=e();return G3(n[0],n[n.length-1],r!==null&&r!==void 0?r:10);},t.tickFormat=function(r,n){var i=e();return dD(i[0],i[i.length-1],r!==null&&r!==void 0?r:10,n);},t.nice=function(r){r==null&&(r=10);var n=e(),i=0,a=n.length-1,s=n[i],l=n[a],u,h,f=10;for(l<s&&(h=s,s=l,l=h,h=i,i=a,a=h);f-->0;){if(h=av(s,l,r),h===u)return n[i]=s,n[a]=l,e(n);if(h>0)s=Math.floor(s/h)*h,l=Math.ceil(l/h)*h;else if(h<0)s=Math.ceil(s*h)/h,l=Math.floor(l*h)/h;else break;u=h;}return t;},t;}function xl(){var t=Rv();return t.copy=function(){return _5(t,xl());},Ah.apply(t,arguments),Rke(t);}var xq=N(()=>{"use strict";bh();fD();Lv();vq();o(Rke,"linearish");o(xl,"linear");});function pD(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],s;return a<i&&(s=r,r=n,n=s,s=i,i=a,a=s),t[r]=e.floor(i),t[n]=e.ceil(a),t;}var bq=N(()=>{"use strict";o(pD,"nice");});function vn(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date():new Date(+a)),a;}return o(i,"interval"),i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{let s=i(a),l=i.ceil(a);return a-s<l-a?s:l;},i.offset=(a,s)=>(e(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,l)=>{let u=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<s)||!(l>0))return u;let h;do u.push(h=new Date(+a)),e(a,l),t(a);while(h<a&&a<s);return u;},i.filter=a=>vn(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1);},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;e(s,-1),!a(s););else for(;--l>=0;)for(;e(s,1),!a(s););}),r&&(i.count=(a,s)=>(mD.setTime(+a),gD.setTime(+s),t(mD),t(gD),Math.floor(r(mD,gD))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i;}var mD,gD,xu=N(()=>{"use strict";mD=new Date(),gD=new Date();o(vn,"timeInterval");});var lc,Tq,yD=N(()=>{"use strict";xu();lc=vn(()=>{},(t,e)=>{t.setTime(+t+e);},(t,e)=>e-t);lc.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?vn(e=>{e.setTime(Math.floor(e/t)*t);},(e,r)=>{e.setTime(+e+r*t);},(e,r)=>(r-e)/t):lc);Tq=lc.range;});var Zs,wq,vD=N(()=>{"use strict";xu();Zs=vn(t=>{t.setTime(t-t.getMilliseconds());},(t,e)=>{t.setTime(+t+e*1e3);},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),wq=Zs.range;});var bu,Nke,D5,Mke,xD=N(()=>{"use strict";xu();bu=vn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3);},(t,e)=>{t.setTime(+t+e*6e4);},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),Nke=bu.range,D5=vn(t=>{t.setUTCSeconds(0,0);},(t,e)=>{t.setTime(+t+e*6e4);},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),Mke=D5.range;});var Tu,Ike,L5,Oke,bD=N(()=>{"use strict";xu();Tu=vn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4);},(t,e)=>{t.setTime(+t+e*36e5);},(t,e)=>(e-t)/36e5,t=>t.getHours()),Ike=Tu.range,L5=vn(t=>{t.setUTCMinutes(0,0,0);},(t,e)=>{t.setTime(+t+e*36e5);},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),Oke=L5.range;});var Do,Pke,Mv,Bke,R5,Fke,TD=N(()=>{"use strict";xu();Do=vn(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),Pke=Do.range,Mv=vn(t=>{t.setUTCHours(0,0,0,0);},(t,e)=>{t.setUTCDate(t.getUTCDate()+e);},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),Bke=Mv.range,R5=vn(t=>{t.setUTCHours(0,0,0,0);},(t,e)=>{t.setUTCDate(t.getUTCDate()+e);},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),Fke=R5.range;});function bd(t){return vn(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0);},(e,r)=>{e.setDate(e.getDate()+r*7);},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5);}function Td(t){return vn(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0);},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7);},(e,r)=>(r-e)/6048e5);}var bl,_h,N5,M5,uc,I5,O5,Eq,$ke,zke,Gke,Vke,Uke,Hke,wd,$0,Sq,Cq,Dh,Aq,_q,Dq,Wke,qke,Yke,Xke,jke,Kke,wD=N(()=>{"use strict";xu();o(bd,"timeWeekday");bl=bd(0),_h=bd(1),N5=bd(2),M5=bd(3),uc=bd(4),I5=bd(5),O5=bd(6),Eq=bl.range,$ke=_h.range,zke=N5.range,Gke=M5.range,Vke=uc.range,Uke=I5.range,Hke=O5.range;o(Td,"utcWeekday");wd=Td(0),$0=Td(1),Sq=Td(2),Cq=Td(3),Dh=Td(4),Aq=Td(5),_q=Td(6),Dq=wd.range,Wke=$0.range,qke=Sq.range,Yke=Cq.range,Xke=Dh.range,jke=Aq.range,Kke=_q.range;});var wu,Qke,P5,Zke,kD=N(()=>{"use strict";xu();wu=vn(t=>{t.setDate(1),t.setHours(0,0,0,0);},(t,e)=>{t.setMonth(t.getMonth()+e);},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),Qke=wu.range,P5=vn(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0);},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e);},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),Zke=P5.range;});var Js,Jke,Tl,eEe,ED=N(()=>{"use strict";xu();Js=vn(t=>{t.setMonth(0,1),t.setHours(0,0,0,0);},(t,e)=>{t.setFullYear(t.getFullYear()+e);},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Js.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:vn(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0);},(e,r)=>{e.setFullYear(e.getFullYear()+r*t);});Jke=Js.range,Tl=vn(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e);},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Tl.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:vn(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t);});eEe=Tl.range;});function Rq(t,e,r,n,i,a){let s=[[Zs,1,1e3],[Zs,5,5*1e3],[Zs,15,15*1e3],[Zs,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function l(h,f,d){let p=f<h;p&&([h,f]=[f,h]);let m=d&&typeof d.range=="function"?d:u(h,f,d),g=m?m.range(h,+f+1):[];return p?g.reverse():g;}o(l,"ticks");function u(h,f,d){let p=Math.abs(f-h)/d,m=ld(([,,v])=>v).right(s,p);if(m===s.length)return t.every(w0(h/31536e6,f/31536e6,d));if(m===0)return lc.every(Math.max(w0(h,f,d),1));let[g,y]=s[p/s[m-1][2]<s[m][2]/p?m-1:m];return g.every(y);}return o(u,"tickInterval"),[l,u];}var rEe,nEe,SD,CD,Nq=N(()=>{"use strict";bh();yD();vD();xD();bD();TD();wD();kD();ED();o(Rq,"ticker");[rEe,nEe]=Rq(Tl,P5,wd,R5,L5,D5),[SD,CD]=Rq(Js,wu,bl,Do,Tu,bu);});var B5=N(()=>{"use strict";yD();vD();xD();bD();TD();wD();kD();ED();Nq();});function AD(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e;}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L);}function _D(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e;}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L));}function Iv(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0};}function DD(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,s=t.shortDays,l=t.months,u=t.shortMonths,h=Ov(i),f=Pv(i),d=Ov(a),p=Pv(a),m=Ov(s),g=Pv(s),y=Ov(l),v=Pv(l),x=Ov(u),b=Pv(u),T={a:P,A:B,b:F,B:z,c:null,d:Fq,e:Fq,f:CEe,g:PEe,G:FEe,H:kEe,I:EEe,j:SEe,L:Uq,m:AEe,M:_Ee,p:$,q:U,Q:Gq,s:Vq,S:DEe,u:LEe,U:REe,V:NEe,w:MEe,W:IEe,x:null,X:null,y:OEe,Y:BEe,Z:$Ee,"%":zq},C={a:K,A:ee,b:Y,B:ce,c:null,d:$q,e:$q,f:UEe,g:JEe,G:tSe,H:zEe,I:GEe,j:VEe,L:Wq,m:HEe,M:WEe,p:Z,q:ue,Q:Gq,s:Vq,S:qEe,u:YEe,U:XEe,V:jEe,w:KEe,W:QEe,x:null,X:null,y:ZEe,Y:eSe,Z:rSe,"%":zq},w={a:O,A:R,b:k,B:L,c:S,d:Pq,e:Pq,f:xEe,g:Oq,G:Iq,H:Bq,I:Bq,j:mEe,L:vEe,m:pEe,M:gEe,p:D,q:dEe,Q:TEe,s:wEe,S:yEe,u:lEe,U:cEe,V:uEe,w:oEe,W:hEe,x:I,X:M,y:Oq,Y:Iq,Z:fEe,"%":bEe};T.x=E(r,T),T.X=E(n,T),T.c=E(e,T),C.x=E(r,C),C.X=E(n,C),C.c=E(e,C);function E(Q,j){return function(ne){var te=[],he=-1,le=0,J=Q.length,Se,se,ae;for(ne instanceof Date||(ne=new Date(+ne));++he<J;)Q.charCodeAt(he)===37&&(te.push(Q.slice(le,he)),(se=Mq[Se=Q.charAt(++he)])!=null?Se=Q.charAt(++he):se=Se==="e"?" ":"0",(ae=j[Se])&&(Se=ae(ne,se)),te.push(Se),le=he+1);return te.push(Q.slice(le,he)),te.join("");};}o(E,"newFormat");function _(Q,j){return function(ne){var te=Iv(1900,void 0,1),he=A(te,Q,ne+="",0),le,J;if(he!=ne.length)return null;if("Q"in te)return new Date(te.Q);if("s"in te)return new Date(te.s*1e3+("L"in te?te.L:0));if(j&&!("Z"in te)&&(te.Z=0),"p"in te&&(te.H=te.H%12+te.p*12),te.m===void 0&&(te.m="q"in te?te.q:0),"V"in te){if(te.V<1||te.V>53)return null;"w"in te||(te.w=1),"Z"in te?(le=_D(Iv(te.y,0,1)),J=le.getUTCDay(),le=J>4||J===0?$0.ceil(le):$0(le),le=Mv.offset(le,(te.V-1)*7),te.y=le.getUTCFullYear(),te.m=le.getUTCMonth(),te.d=le.getUTCDate()+(te.w+6)%7):(le=AD(Iv(te.y,0,1)),J=le.getDay(),le=J>4||J===0?_h.ceil(le):_h(le),le=Do.offset(le,(te.V-1)*7),te.y=le.getFullYear(),te.m=le.getMonth(),te.d=le.getDate()+(te.w+6)%7);}else("W"in te||"U"in te)&&("w"in te||(te.w="u"in te?te.u%7:"W"in te?1:0),J="Z"in te?_D(Iv(te.y,0,1)).getUTCDay():AD(Iv(te.y,0,1)).getDay(),te.m=0,te.d="W"in te?(te.w+6)%7+te.W*7-(J+5)%7:te.w+te.U*7-(J+6)%7);return"Z"in te?(te.H+=te.Z/100|0,te.M+=te.Z%100,_D(te)):AD(te);};}o(_,"newParse");function A(Q,j,ne,te){for(var he=0,le=j.length,J=ne.length,Se,se;he<le;){if(te>=J)return-1;if(Se=j.charCodeAt(he++),Se===37){if(Se=j.charAt(he++),se=w[Se in Mq?j.charAt(he++):Se],!se||(te=se(Q,ne,te))<0)return-1;}else if(Se!=ne.charCodeAt(te++))return-1;}return te;}o(A,"parseSpecifier");function D(Q,j,ne){var te=h.exec(j.slice(ne));return te?(Q.p=f.get(te[0].toLowerCase()),ne+te[0].length):-1;}o(D,"parsePeriod");function O(Q,j,ne){var te=m.exec(j.slice(ne));return te?(Q.w=g.get(te[0].toLowerCase()),ne+te[0].length):-1;}o(O,"parseShortWeekday");function R(Q,j,ne){var te=d.exec(j.slice(ne));return te?(Q.w=p.get(te[0].toLowerCase()),ne+te[0].length):-1;}o(R,"parseWeekday");function k(Q,j,ne){var te=x.exec(j.slice(ne));return te?(Q.m=b.get(te[0].toLowerCase()),ne+te[0].length):-1;}o(k,"parseShortMonth");function L(Q,j,ne){var te=y.exec(j.slice(ne));return te?(Q.m=v.get(te[0].toLowerCase()),ne+te[0].length):-1;}o(L,"parseMonth");function S(Q,j,ne){return A(Q,e,j,ne);}o(S,"parseLocaleDateTime");function I(Q,j,ne){return A(Q,r,j,ne);}o(I,"parseLocaleDate");function M(Q,j,ne){return A(Q,n,j,ne);}o(M,"parseLocaleTime");function P(Q){return s[Q.getDay()];}o(P,"formatShortWeekday");function B(Q){return a[Q.getDay()];}o(B,"formatWeekday");function F(Q){return u[Q.getMonth()];}o(F,"formatShortMonth");function z(Q){return l[Q.getMonth()];}o(z,"formatMonth");function $(Q){return i[+(Q.getHours()>=12)];}o($,"formatPeriod");function U(Q){return 1+~~(Q.getMonth()/3);}o(U,"formatQuarter");function K(Q){return s[Q.getUTCDay()];}o(K,"formatUTCShortWeekday");function ee(Q){return a[Q.getUTCDay()];}o(ee,"formatUTCWeekday");function Y(Q){return u[Q.getUTCMonth()];}o(Y,"formatUTCShortMonth");function ce(Q){return l[Q.getUTCMonth()];}o(ce,"formatUTCMonth");function Z(Q){return i[+(Q.getUTCHours()>=12)];}o(Z,"formatUTCPeriod");function ue(Q){return 1+~~(Q.getUTCMonth()/3);}return o(ue,"formatUTCQuarter"),{format:o(function(Q){var j=E(Q+="",T);return j.toString=function(){return Q;},j;},"format"),parse:o(function(Q){var j=_(Q+="",!1);return j.toString=function(){return Q;},j;},"parse"),utcFormat:o(function(Q){var j=E(Q+="",C);return j.toString=function(){return Q;},j;},"utcFormat"),utcParse:o(function(Q){var j=_(Q+="",!0);return j.toString=function(){return Q;},j;},"utcParse")};}function Hr(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i);}function sEe(t){return t.replace(aEe,"\\$&");}function Ov(t){return new RegExp("^(?:"+t.map(sEe).join("|")+")","i");}function Pv(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]));}function oEe(t,e,r){var n=ji.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1;}function lEe(t,e,r){var n=ji.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1;}function cEe(t,e,r){var n=ji.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1;}function uEe(t,e,r){var n=ji.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1;}function hEe(t,e,r){var n=ji.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1;}function Iq(t,e,r){var n=ji.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1;}function Oq(t,e,r){var n=ji.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1;}function fEe(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1;}function dEe(t,e,r){var n=ji.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1;}function pEe(t,e,r){var n=ji.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1;}function Pq(t,e,r){var n=ji.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1;}function mEe(t,e,r){var n=ji.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1;}function Bq(t,e,r){var n=ji.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1;}function gEe(t,e,r){var n=ji.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1;}function yEe(t,e,r){var n=ji.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1;}function vEe(t,e,r){var n=ji.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1;}function xEe(t,e,r){var n=ji.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1;}function bEe(t,e,r){var n=iEe.exec(e.slice(r,r+1));return n?r+n[0].length:-1;}function TEe(t,e,r){var n=ji.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1;}function wEe(t,e,r){var n=ji.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1;}function Fq(t,e){return Hr(t.getDate(),e,2);}function kEe(t,e){return Hr(t.getHours(),e,2);}function EEe(t,e){return Hr(t.getHours()%12||12,e,2);}function SEe(t,e){return Hr(1+Do.count(Js(t),t),e,3);}function Uq(t,e){return Hr(t.getMilliseconds(),e,3);}function CEe(t,e){return Uq(t,e)+"000";}function AEe(t,e){return Hr(t.getMonth()+1,e,2);}function _Ee(t,e){return Hr(t.getMinutes(),e,2);}function DEe(t,e){return Hr(t.getSeconds(),e,2);}function LEe(t){var e=t.getDay();return e===0?7:e;}function REe(t,e){return Hr(bl.count(Js(t)-1,t),e,2);}function Hq(t){var e=t.getDay();return e>=4||e===0?uc(t):uc.ceil(t);}function NEe(t,e){return t=Hq(t),Hr(uc.count(Js(t),t)+(Js(t).getDay()===4),e,2);}function MEe(t){return t.getDay();}function IEe(t,e){return Hr(_h.count(Js(t)-1,t),e,2);}function OEe(t,e){return Hr(t.getFullYear()%100,e,2);}function PEe(t,e){return t=Hq(t),Hr(t.getFullYear()%100,e,2);}function BEe(t,e){return Hr(t.getFullYear()%1e4,e,4);}function FEe(t,e){var r=t.getDay();return t=r>=4||r===0?uc(t):uc.ceil(t),Hr(t.getFullYear()%1e4,e,4);}function $Ee(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Hr(e/60|0,"0",2)+Hr(e%60,"0",2);}function $q(t,e){return Hr(t.getUTCDate(),e,2);}function zEe(t,e){return Hr(t.getUTCHours(),e,2);}function GEe(t,e){return Hr(t.getUTCHours()%12||12,e,2);}function VEe(t,e){return Hr(1+Mv.count(Tl(t),t),e,3);}function Wq(t,e){return Hr(t.getUTCMilliseconds(),e,3);}function UEe(t,e){return Wq(t,e)+"000";}function HEe(t,e){return Hr(t.getUTCMonth()+1,e,2);}function WEe(t,e){return Hr(t.getUTCMinutes(),e,2);}function qEe(t,e){return Hr(t.getUTCSeconds(),e,2);}function YEe(t){var e=t.getUTCDay();return e===0?7:e;}function XEe(t,e){return Hr(wd.count(Tl(t)-1,t),e,2);}function qq(t){var e=t.getUTCDay();return e>=4||e===0?Dh(t):Dh.ceil(t);}function jEe(t,e){return t=qq(t),Hr(Dh.count(Tl(t),t)+(Tl(t).getUTCDay()===4),e,2);}function KEe(t){return t.getUTCDay();}function QEe(t,e){return Hr($0.count(Tl(t)-1,t),e,2);}function ZEe(t,e){return Hr(t.getUTCFullYear()%100,e,2);}function JEe(t,e){return t=qq(t),Hr(t.getUTCFullYear()%100,e,2);}function eSe(t,e){return Hr(t.getUTCFullYear()%1e4,e,4);}function tSe(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Dh(t):Dh.ceil(t),Hr(t.getUTCFullYear()%1e4,e,4);}function rSe(){return"+0000";}function zq(){return"%";}function Gq(t){return+t;}function Vq(t){return Math.floor(+t/1e3);}var Mq,ji,iEe,aEe,Yq=N(()=>{"use strict";B5();o(AD,"localDate");o(_D,"utcDate");o(Iv,"newDate");o(DD,"formatLocale");Mq={"-":"",_:" ",0:"0"},ji=/^\s*\d+/,iEe=/^%/,aEe=/[\\^$*+?|[\]().{}]/g;o(Hr,"pad");o(sEe,"requote");o(Ov,"formatRe");o(Pv,"formatLookup");o(oEe,"parseWeekdayNumberSunday");o(lEe,"parseWeekdayNumberMonday");o(cEe,"parseWeekNumberSunday");o(uEe,"parseWeekNumberISO");o(hEe,"parseWeekNumberMonday");o(Iq,"parseFullYear");o(Oq,"parseYear");o(fEe,"parseZone");o(dEe,"parseQuarter");o(pEe,"parseMonthNumber");o(Pq,"parseDayOfMonth");o(mEe,"parseDayOfYear");o(Bq,"parseHour24");o(gEe,"parseMinutes");o(yEe,"parseSeconds");o(vEe,"parseMilliseconds");o(xEe,"parseMicroseconds");o(bEe,"parseLiteralPercent");o(TEe,"parseUnixTimestamp");o(wEe,"parseUnixTimestampSeconds");o(Fq,"formatDayOfMonth");o(kEe,"formatHour24");o(EEe,"formatHour12");o(SEe,"formatDayOfYear");o(Uq,"formatMilliseconds");o(CEe,"formatMicroseconds");o(AEe,"formatMonthNumber");o(_Ee,"formatMinutes");o(DEe,"formatSeconds");o(LEe,"formatWeekdayNumberMonday");o(REe,"formatWeekNumberSunday");o(Hq,"dISO");o(NEe,"formatWeekNumberISO");o(MEe,"formatWeekdayNumberSunday");o(IEe,"formatWeekNumberMonday");o(OEe,"formatYear");o(PEe,"formatYearISO");o(BEe,"formatFullYear");o(FEe,"formatFullYearISO");o($Ee,"formatZone");o($q,"formatUTCDayOfMonth");o(zEe,"formatUTCHour24");o(GEe,"formatUTCHour12");o(VEe,"formatUTCDayOfYear");o(Wq,"formatUTCMilliseconds");o(UEe,"formatUTCMicroseconds");o(HEe,"formatUTCMonthNumber");o(WEe,"formatUTCMinutes");o(qEe,"formatUTCSeconds");o(YEe,"formatUTCWeekdayNumberMonday");o(XEe,"formatUTCWeekNumberSunday");o(qq,"UTCdISO");o(jEe,"formatUTCWeekNumberISO");o(KEe,"formatUTCWeekdayNumberSunday");o(QEe,"formatUTCWeekNumberMonday");o(ZEe,"formatUTCYear");o(JEe,"formatUTCYearISO");o(eSe,"formatUTCFullYear");o(tSe,"formatUTCFullYearISO");o(rSe,"formatUTCZone");o(zq,"formatLiteralPercent");o(Gq,"formatUnixTimestamp");o(Vq,"formatUnixTimestampSeconds");});function LD(t){return z0=DD(t),kd=z0.format,Xq=z0.parse,jq=z0.utcFormat,Kq=z0.utcParse,z0;}var z0,kd,Xq,jq,Kq,Qq=N(()=>{"use strict";Yq();LD({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});o(LD,"defaultLocale");});var RD=N(()=>{"use strict";Qq();});function nSe(t){return new Date(t);}function iSe(t){return t instanceof Date?+t:+new Date(+t);}function Zq(t,e,r,n,i,a,s,l,u,h){var f=Rv(),d=f.invert,p=f.domain,m=h(".%L"),g=h(":%S"),y=h("%I:%M"),v=h("%I %p"),x=h("%a %d"),b=h("%b %d"),T=h("%B"),C=h("%Y");function w(E){return(u(E)<E?m:l(E)<E?g:s(E)<E?y:a(E)<E?v:n(E)<E?i(E)<E?x:b:r(E)<E?T:C)(E);}return o(w,"tickFormat"),f.invert=function(E){return new Date(d(E));},f.domain=function(E){return arguments.length?p(Array.from(E,iSe)):p().map(nSe);},f.ticks=function(E){var _=p();return t(_[0],_[_.length-1],E!==null&&E!==void 0?E:10);},f.tickFormat=function(E,_){return _==null?w:h(_);},f.nice=function(E){var _=p();return(!E||typeof E.range!="function")&&(E=e(_[0],_[_.length-1],E!==null&&E!==void 0?E:10)),E?p(pD(_,E)):f;},f.copy=function(){return _5(f,Zq(t,e,r,n,i,a,s,l,u,h));},f;}function F5(){return Ah.apply(Zq(SD,CD,Js,wu,bl,Do,Tu,bu,Zs,kd).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments);}var Jq=N(()=>{"use strict";B5();RD();fD();Lv();bq();o(nSe,"date");o(iSe,"number");o(Zq,"calendar");o(F5,"time");});var eY=N(()=>{"use strict";pq();xq();lD();Jq();});function ND(t){for(var e=t.length/6|0,r=new Array(e),n=0;n<e;)r[n]="#"+t.slice(n*6,++n*6);return r;}var tY=N(()=>{"use strict";o(ND,"default");});var MD,rY=N(()=>{"use strict";tY();MD=ND("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");});var nY=N(()=>{"use strict";rY();});function Pn(t){return o(function(){return t;},"constant");}var $5=N(()=>{"use strict";o(Pn,"default");});function aY(t){return t>1?0:t<-1?G0:Math.acos(t);}function OD(t){return t>=1?Bv:t<=-1?-Bv:Math.asin(t);}var ID,ca,Lh,iY,z5,wl,Ed,Ki,G0,Bv,V0,G5=N(()=>{"use strict";ID=Math.abs,ca=Math.atan2,Lh=Math.cos,iY=Math.max,z5=Math.min,wl=Math.sin,Ed=Math.sqrt,Ki=1e-12,G0=Math.PI,Bv=G0/2,V0=2*G0;o(aY,"acos");o(OD,"asin");});function V5(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n;}return t;},()=>new md(e);}var PD=N(()=>{"use strict";N_();o(V5,"withPath");});function aSe(t){return t.innerRadius;}function sSe(t){return t.outerRadius;}function oSe(t){return t.startAngle;}function lSe(t){return t.endAngle;}function cSe(t){return t&&t.padAngle;}function uSe(t,e,r,n,i,a,s,l){var u=r-t,h=n-e,f=s-i,d=l-a,p=d*u-f*h;if(!(p*p<Ki))return p=(f*(e-a)-d*(t-i))/p,[t+p*u,e+p*h];}function U5(t,e,r,n,i,a,s){var l=t-r,u=e-n,h=(s?a:-a)/Ed(l*l+u*u),f=h*u,d=-h*l,p=t+f,m=e+d,g=r+f,y=n+d,v=(p+g)/2,x=(m+y)/2,b=g-p,T=y-m,C=b*b+T*T,w=i-a,E=p*y-g*m,_=(T<0?-1:1)*Ed(iY(0,w*w*C-E*E)),A=(E*T-b*_)/C,D=(-E*b-T*_)/C,O=(E*T+b*_)/C,R=(-E*b+T*_)/C,k=A-v,L=D-x,S=O-v,I=R-x;return k*k+L*L>S*S+I*I&&(A=O,D=R),{cx:A,cy:D,x01:-f,y01:-d,x11:A*(i/w-1),y11:D*(i/w-1)};}function kl(){var t=aSe,e=sSe,r=Pn(0),n=null,i=oSe,a=lSe,s=cSe,l=null,u=V5(h);function h(){var f,d,p=+t.apply(this,arguments),m=+e.apply(this,arguments),g=i.apply(this,arguments)-Bv,y=a.apply(this,arguments)-Bv,v=ID(y-g),x=y>g;if(l||(l=f=u()),m<p&&(d=m,m=p,p=d),!(m>Ki))l.moveTo(0,0);else if(v>V0-Ki)l.moveTo(m*Lh(g),m*wl(g)),l.arc(0,0,m,g,y,!x),p>Ki&&(l.moveTo(p*Lh(y),p*wl(y)),l.arc(0,0,p,y,g,x));else{var b=g,T=y,C=g,w=y,E=v,_=v,A=s.apply(this,arguments)/2,D=A>Ki&&(n?+n.apply(this,arguments):Ed(p*p+m*m)),O=z5(ID(m-p)/2,+r.apply(this,arguments)),R=O,k=O,L,S;if(D>Ki){var I=OD(D/p*wl(A)),M=OD(D/m*wl(A));(E-=I*2)>Ki?(I*=x?1:-1,C+=I,w-=I):(E=0,C=w=(g+y)/2),(_-=M*2)>Ki?(M*=x?1:-1,b+=M,T-=M):(_=0,b=T=(g+y)/2);}var P=m*Lh(b),B=m*wl(b),F=p*Lh(w),z=p*wl(w);if(O>Ki){var $=m*Lh(T),U=m*wl(T),K=p*Lh(C),ee=p*wl(C),Y;if(v<G0)if(Y=uSe(P,B,K,ee,$,U,F,z)){var ce=P-Y[0],Z=B-Y[1],ue=$-Y[0],Q=U-Y[1],j=1/wl(aY((ce*ue+Z*Q)/(Ed(ce*ce+Z*Z)*Ed(ue*ue+Q*Q)))/2),ne=Ed(Y[0]*Y[0]+Y[1]*Y[1]);R=z5(O,(p-ne)/(j-1)),k=z5(O,(m-ne)/(j+1));}else R=k=0;}_>Ki?k>Ki?(L=U5(K,ee,P,B,m,k,x),S=U5($,U,F,z,m,k,x),l.moveTo(L.cx+L.x01,L.cy+L.y01),k<O?l.arc(L.cx,L.cy,k,ca(L.y01,L.x01),ca(S.y01,S.x01),!x):(l.arc(L.cx,L.cy,k,ca(L.y01,L.x01),ca(L.y11,L.x11),!x),l.arc(0,0,m,ca(L.cy+L.y11,L.cx+L.x11),ca(S.cy+S.y11,S.cx+S.x11),!x),l.arc(S.cx,S.cy,k,ca(S.y11,S.x11),ca(S.y01,S.x01),!x))):(l.moveTo(P,B),l.arc(0,0,m,b,T,!x)):l.moveTo(P,B),!(p>Ki)||!(E>Ki)?l.lineTo(F,z):R>Ki?(L=U5(F,z,$,U,p,-R,x),S=U5(P,B,K,ee,p,-R,x),l.lineTo(L.cx+L.x01,L.cy+L.y01),R<O?l.arc(L.cx,L.cy,R,ca(L.y01,L.x01),ca(S.y01,S.x01),!x):(l.arc(L.cx,L.cy,R,ca(L.y01,L.x01),ca(L.y11,L.x11),!x),l.arc(0,0,p,ca(L.cy+L.y11,L.cx+L.x11),ca(S.cy+S.y11,S.cx+S.x11),x),l.arc(S.cx,S.cy,R,ca(S.y11,S.x11),ca(S.y01,S.x01),!x))):l.arc(0,0,p,w,C,x);}if(l.closePath(),f)return l=null,f+""||null;}return o(h,"arc"),h.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-G0/2;return[Lh(d)*f,wl(d)*f];},h.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:Pn(+f),h):t;},h.outerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:Pn(+f),h):e;},h.cornerRadius=function(f){return arguments.length?(r=typeof f=="function"?f:Pn(+f),h):r;},h.padRadius=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Pn(+f),h):n;},h.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:Pn(+f),h):i;},h.endAngle=function(f){return arguments.length?(a=typeof f=="function"?f:Pn(+f),h):a;},h.padAngle=function(f){return arguments.length?(s=typeof f=="function"?f:Pn(+f),h):s;},h.context=function(f){return arguments.length?(l=f!==null&&f!==void 0?f:null,h):l;},h;}var sY=N(()=>{"use strict";$5();G5();PD();o(aSe,"arcInnerRadius");o(sSe,"arcOuterRadius");o(oSe,"arcStartAngle");o(lSe,"arcEndAngle");o(cSe,"arcPadAngle");o(uSe,"intersect");o(U5,"cornerTangents");o(kl,"default");});function Fv(t){return typeof t=="object"&&"length"in t?t:Array.from(t);}var J2t,BD=N(()=>{"use strict";J2t=Array.prototype.slice;o(Fv,"default");});function oY(t){this._context=t;}function ku(t){return new oY(t);}var FD=N(()=>{"use strict";o(oY,"Linear");oY.prototype={areaStart:o(function(){this._line=0;},"areaStart"),areaEnd:o(function(){this._line=NaN;},"areaEnd"),lineStart:o(function(){this._point=0;},"lineStart"),lineEnd:o(function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line;},"lineEnd"),point:o(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break;}},"point")};o(ku,"default");});function lY(t){return t[0];}function cY(t){return t[1];}var uY=N(()=>{"use strict";o(lY,"x");o(cY,"y");});function El(t,e){var r=Pn(!0),n=null,i=ku,a=null,s=V5(l);t=typeof t=="function"?t:t===void 0?lY:Pn(t),e=typeof e=="function"?e:e===void 0?cY:Pn(e);function l(u){var h,f=(u=Fv(u)).length,d,p=!1,m;for(n==null&&(a=i(m=s())),h=0;h<=f;++h)!(h<f&&r(d=u[h],h,u))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+t(d,h,u),+e(d,h,u));if(m)return a=null,m+""||null;}return o(l,"line"),l.x=function(u){return arguments.length?(t=typeof u=="function"?u:Pn(+u),l):t;},l.y=function(u){return arguments.length?(e=typeof u=="function"?u:Pn(+u),l):e;},l.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Pn(!!u),l):r;},l.curve=function(u){return arguments.length?(i=u,n!=null&&(a=i(n)),l):i;},l.context=function(u){return arguments.length?(u==null?n=a=null:a=i(n=u),l):n;},l;}var hY=N(()=>{"use strict";BD();$5();FD();PD();uY();o(El,"default");});function $D(t,e){return e<t?-1:e>t?1:e>=t?0:NaN;}var fY=N(()=>{"use strict";o($D,"default");});function zD(t){return t;}var dY=N(()=>{"use strict";o(zD,"default");});function H5(){var t=zD,e=$D,r=null,n=Pn(0),i=Pn(V0),a=Pn(0);function s(l){var u,h=(l=Fv(l)).length,f,d,p=0,m=new Array(h),g=new Array(h),y=+n.apply(this,arguments),v=Math.min(V0,Math.max(-V0,i.apply(this,arguments)-y)),x,b=Math.min(Math.abs(v)/h,a.apply(this,arguments)),T=b*(v<0?-1:1),C;for(u=0;u<h;++u)(C=g[m[u]=u]=+t(l[u],u,l))>0&&(p+=C);for(e!=null?m.sort(function(w,E){return e(g[w],g[E]);}):r!=null&&m.sort(function(w,E){return r(l[w],l[E]);}),u=0,d=p?(v-h*T)/p:0;u<h;++u,y=x)f=m[u],C=g[f],x=y+(C>0?C*d:0)+T,g[f]={data:l[f],index:u,value:C,startAngle:y,endAngle:x,padAngle:b};return g;}return o(s,"pie"),s.value=function(l){return arguments.length?(t=typeof l=="function"?l:Pn(+l),s):t;},s.sortValues=function(l){return arguments.length?(e=l,r=null,s):e;},s.sort=function(l){return arguments.length?(r=l,e=null,s):r;},s.startAngle=function(l){return arguments.length?(n=typeof l=="function"?l:Pn(+l),s):n;},s.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:Pn(+l),s):i;},s.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:Pn(+l),s):a;},s;}var pY=N(()=>{"use strict";BD();$5();fY();dY();G5();o(H5,"default");});function $v(t){return new W5(t,!0);}function zv(t){return new W5(t,!1);}var W5,mY=N(()=>{"use strict";var _Class26;W5=(_Class26=class W5{constructor(e,r){this._context=e,this._x=r;}areaStart(){this._line=0;}areaEnd(){this._line=NaN;}lineStart(){this._point=0;}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line;}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break;}}this._x0=e,this._y0=r;}},o(_Class26,"Bump"),_Class26);o($v,"bumpX");o(zv,"bumpY");});function eo(){}var Gv=N(()=>{"use strict";o(eo,"default");});function U0(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6);}function Vv(t){this._context=t;}function Lo(t){return new Vv(t);}var Uv=N(()=>{"use strict";o(U0,"point");o(Vv,"Basis");Vv.prototype={areaStart:o(function(){this._line=0;},"areaStart"),areaEnd:o(function(){this._line=NaN;},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0;},"lineStart"),lineEnd:o(function(){switch(this._point){case 3:U0(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break;}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line;},"lineEnd"),point:o(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:U0(this,t,e);break;}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e;},"point")};o(Lo,"default");});function gY(t){this._context=t;}function q5(t){return new gY(t);}var yY=N(()=>{"use strict";Gv();Uv();o(gY,"BasisClosed");gY.prototype={areaStart:eo,areaEnd:eo,lineStart:o(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0;},"lineStart"),lineEnd:o(function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break;}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break;}}},"lineEnd"),point:o(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:U0(this,t,e);break;}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e;},"point")};o(q5,"default");});function vY(t){this._context=t;}function Y5(t){return new vY(t);}var xY=N(()=>{"use strict";Uv();o(vY,"BasisOpen");vY.prototype={areaStart:o(function(){this._line=0;},"areaStart"),areaEnd:o(function(){this._line=NaN;},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0;},"lineStart"),lineEnd:o(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line;},"lineEnd"),point:o(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:U0(this,t,e);break;}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e;},"point")};o(Y5,"default");});function bY(t,e){this._basis=new Vv(t),this._beta=e;}var GD,TY=N(()=>{"use strict";Uv();o(bY,"Bundle");bY.prototype={lineStart:o(function(){this._x=[],this._y=[],this._basis.lineStart();},"lineStart"),lineEnd:o(function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n=t[0],i=e[0],a=t[r]-n,s=e[r]-i,l=-1,u;++l<=r;)u=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(n+u*a),this._beta*e[l]+(1-this._beta)*(i+u*s));this._x=this._y=null,this._basis.lineEnd();},"lineEnd"),point:o(function(t,e){this._x.push(+t),this._y.push(+e);},"point")};GD=o(function t(e){function r(n){return e===1?new Vv(n):new bY(n,e);}return o(r,"bundle"),r.beta=function(n){return t(+n);},r;},"custom")(.85);});function H0(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2);}function X5(t,e){this._context=t,this._k=(1-e)/6;}var Hv,Wv=N(()=>{"use strict";o(H0,"point");o(X5,"Cardinal");X5.prototype={areaStart:o(function(){this._line=0;},"areaStart"),areaEnd:o(function(){this._line=NaN;},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0;},"lineStart"),lineEnd:o(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:H0(this,this._x1,this._y1);break;}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line;},"lineEnd"),point:o(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:H0(this,t,e);break;}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;},"point")};Hv=o(function t(e){function r(n){return new X5(n,e);}return o(r,"cardinal"),r.tension=function(n){return t(+n);},r;},"custom")(0);});function j5(t,e){this._context=t,this._k=(1-e)/6;}var VD,UD=N(()=>{"use strict";Gv();Wv();o(j5,"CardinalClosed");j5.prototype={areaStart:eo,areaEnd:eo,lineStart:o(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0;},"lineStart"),lineEnd:o(function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break;}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break;}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break;}}},"lineEnd"),point:o(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:H0(this,t,e);break;}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;},"point")};VD=o(function t(e){function r(n){return new j5(n,e);}return o(r,"cardinal"),r.tension=function(n){return t(+n);},r;},"custom")(0);});function K5(t,e){this._context=t,this._k=(1-e)/6;}var HD,WD=N(()=>{"use strict";Wv();o(K5,"CardinalOpen");K5.prototype={areaStart:o(function(){this._line=0;},"areaStart"),areaEnd:o(function(){this._line=NaN;},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0;},"lineStart"),lineEnd:o(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line;},"lineEnd"),point:o(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:H0(this,t,e);break;}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;},"point")};HD=o(function t(e){function r(n){return new K5(n,e);}return o(r,"cardinal"),r.tension=function(n){return t(+n);},r;},"custom")(0);});function qv(t,e,r){var n=t._x1,i=t._y1,a=t._x2,s=t._y2;if(t._l01_a>Ki){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/u;}if(t._l23_a>Ki){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*h+t._x1*t._l23_2a-e*t._l12_2a)/f,s=(s*h+t._y1*t._l23_2a-r*t._l12_2a)/f;}t._context.bezierCurveTo(n,i,a,s,t._x2,t._y2);}function wY(t,e){this._context=t,this._alpha=e;}var Yv,Q5=N(()=>{"use strict";G5();Wv();o(qv,"point");o(wY,"CatmullRom");wY.prototype={areaStart:o(function(){this._line=0;},"areaStart"),areaEnd:o(function(){this._line=NaN;},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0;},"lineStart"),lineEnd:o(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break;}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line;},"lineEnd"),point:o(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha));}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:qv(this,t,e);break;}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;},"point")};Yv=o(function t(e){function r(n){return e?new wY(n,e):new X5(n,0);}return o(r,"catmullRom"),r.alpha=function(n){return t(+n);},r;},"custom")(.5);});function kY(t,e){this._context=t,this._alpha=e;}var qD,EY=N(()=>{"use strict";UD();Gv();Q5();o(kY,"CatmullRomClosed");kY.prototype={areaStart:eo,areaEnd:eo,lineStart:o(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0;},"lineStart"),lineEnd:o(function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break;}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break;}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break;}}},"lineEnd"),point:o(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha));}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:qv(this,t,e);break;}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;},"point")};qD=o(function t(e){function r(n){return e?new kY(n,e):new j5(n,0);}return o(r,"catmullRom"),r.alpha=function(n){return t(+n);},r;},"custom")(.5);});function SY(t,e){this._context=t,this._alpha=e;}var YD,CY=N(()=>{"use strict";WD();Q5();o(SY,"CatmullRomOpen");SY.prototype={areaStart:o(function(){this._line=0;},"areaStart"),areaEnd:o(function(){this._line=NaN;},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0;},"lineStart"),lineEnd:o(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line;},"lineEnd"),point:o(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha));}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:qv(this,t,e);break;}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;},"point")};YD=o(function t(e){function r(n){return e?new SY(n,e):new K5(n,0);}return o(r,"catmullRom"),r.alpha=function(n){return t(+n);},r;},"custom")(.5);});function AY(t){this._context=t;}function Z5(t){return new AY(t);}var _Y=N(()=>{"use strict";Gv();o(AY,"LinearClosed");AY.prototype={areaStart:eo,areaEnd:eo,lineStart:o(function(){this._point=0;},"lineStart"),lineEnd:o(function(){this._point&&this._context.closePath();},"lineEnd"),point:o(function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e));},"point")};o(Z5,"default");});function DY(t){return t<0?-1:1;}function LY(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),s=(r-t._y1)/(i||n<0&&-0),l=(a*i+s*n)/(n+i);return(DY(a)+DY(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(l))||0;}function RY(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e;}function XD(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,l=(a-n)/3;t._context.bezierCurveTo(n+l,i+l*e,a-l,s-l*r,a,s);}function J5(t){this._context=t;}function NY(t){this._context=new MY(t);}function MY(t){this._context=t;}function Xv(t){return new J5(t);}function jv(t){return new NY(t);}var IY=N(()=>{"use strict";o(DY,"sign");o(LY,"slope3");o(RY,"slope2");o(XD,"point");o(J5,"MonotoneX");J5.prototype={areaStart:o(function(){this._line=0;},"areaStart"),areaEnd:o(function(){this._line=NaN;},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0;},"lineStart"),lineEnd:o(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:XD(this,this._t0,RY(this,this._t0));break;}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line;},"lineEnd"),point:o(function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,XD(this,RY(this,r=LY(this,t,e)),r);break;default:XD(this,this._t0,r=LY(this,t,e));break;}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r;}},"point")};o(NY,"MonotoneY");(NY.prototype=Object.create(J5.prototype)).point=function(t,e){J5.prototype.point.call(this,e,t);};o(MY,"ReflectContext");MY.prototype={moveTo:o(function(t,e){this._context.moveTo(e,t);},"moveTo"),closePath:o(function(){this._context.closePath();},"closePath"),lineTo:o(function(t,e){this._context.lineTo(e,t);},"lineTo"),bezierCurveTo:o(function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i);},"bezierCurveTo")};o(Xv,"monotoneX");o(jv,"monotoneY");});function PY(t){this._context=t;}function OY(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,s[e]-=n*s[e-1];for(i[r-1]=s[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a];}function W0(t){return new PY(t);}var BY=N(()=>{"use strict";o(PY,"Natural");PY.prototype={areaStart:o(function(){this._line=0;},"areaStart"),areaEnd:o(function(){this._line=NaN;},"areaEnd"),lineStart:o(function(){this._x=[],this._y=[];},"lineStart"),lineEnd:o(function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=OY(t),i=OY(e),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[s],e[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null;},"lineEnd"),point:o(function(t,e){this._x.push(+t),this._y.push(+e);},"point")};o(OY,"controlPoints");o(W0,"default");});function eT(t,e){this._context=t,this._t=e;}function q0(t){return new eT(t,.5);}function Kv(t){return new eT(t,0);}function Qv(t){return new eT(t,1);}var FY=N(()=>{"use strict";o(eT,"Step");eT.prototype={areaStart:o(function(){this._line=0;},"areaStart"),areaEnd:o(function(){this._line=NaN;},"areaEnd"),lineStart:o(function(){this._x=this._y=NaN,this._point=0;},"lineStart"),lineEnd:o(function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line);},"lineEnd"),point:o(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e);}break;}}this._x=t,this._y=e;},"point")};o(q0,"default");o(Kv,"stepBefore");o(Qv,"stepAfter");});var $Y=N(()=>{"use strict";sY();hY();pY();yY();xY();Uv();mY();TY();UD();WD();Wv();EY();CY();Q5();_Y();FD();IY();BY();FY();});var zY=N(()=>{"use strict";});var GY=N(()=>{"use strict";});function Rh(t,e,r){this.k=t,this.x=e,this.y=r;}function KD(t){for(;!t.__zoom;)if(!(t=t.parentNode))return jD;return t.__zoom;}var jD,QD=N(()=>{"use strict";o(Rh,"Transform");Rh.prototype={constructor:Rh,scale:o(function(t){return t===1?this:new Rh(this.k*t,this.x,this.y);},"scale"),translate:o(function(t,e){return t===0&e===0?this:new Rh(this.k,this.x+this.k*t,this.y+this.k*e);},"translate"),apply:o(function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y];},"apply"),applyX:o(function(t){return t*this.k+this.x;},"applyX"),applyY:o(function(t){return t*this.k+this.y;},"applyY"),invert:o(function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k];},"invert"),invertX:o(function(t){return(t-this.x)/this.k;},"invertX"),invertY:o(function(t){return(t-this.y)/this.k;},"invertY"),rescaleX:o(function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t));},"rescaleX"),rescaleY:o(function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t));},"rescaleY"),toString:o(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")";},"toString")};jD=new Rh(1,0,0);KD.prototype=Rh.prototype;o(KD,"transform");});var VY=N(()=>{"use strict";});var UY=N(()=>{"use strict";v5();zY();GY();QD();VY();});var HY=N(()=>{"use strict";UY();QD();});var pr=N(()=>{"use strict";bh();ZV();yW();TW();D0();wW();kW();$A();UU();EW();A_();SW();AW();H_();GW();hq();N0();N_();fq();CW();dq();eY();nY();ml();$Y();B5();RD();f5();v5();HY();});var WY=Ii(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.BLANK_URL=Qi.relativeFirstCharacters=Qi.whitespaceEscapeCharsRegex=Qi.urlSchemeRegex=Qi.ctrlCharactersRegex=Qi.htmlCtrlEntityRegex=Qi.htmlEntitiesRegex=Qi.invalidProtocolRegex=void 0;Qi.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Qi.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Qi.htmlCtrlEntityRegex=/&(newline|tab);/gi;Qi.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Qi.urlSchemeRegex=/^.+(:|&colon;)/gim;Qi.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Qi.relativeFirstCharacters=[".","/"];Qi.BLANK_URL="about:blank";});var Y0=Ii(tT=>{"use strict";Object.defineProperty(tT,"__esModule",{value:!0});tT.sanitizeUrl=void 0;var _a=WY();function hSe(t){return _a.relativeFirstCharacters.indexOf(t[0])>-1;}o(hSe,"isRelativeUrlWithoutProtocol");function fSe(t){var e=t.replace(_a.ctrlCharactersRegex,"");return e.replace(_a.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n);});}o(fSe,"decodeHtmlCharacters");function dSe(t){return URL.canParse(t);}o(dSe,"isValidUrl");function qY(t){try{return decodeURIComponent(t);}catch{return t;}}o(qY,"decodeURI");function pSe(t){if(!t)return _a.BLANK_URL;var e,r=qY(t.trim());do r=fSe(r).replace(_a.htmlCtrlEntityRegex,"").replace(_a.ctrlCharactersRegex,"").replace(_a.whitespaceEscapeCharsRegex,"").trim(),r=qY(r),e=r.match(_a.ctrlCharactersRegex)||r.match(_a.htmlEntitiesRegex)||r.match(_a.htmlCtrlEntityRegex)||r.match(_a.whitespaceEscapeCharsRegex);while(e&&e.length>0);var n=r;if(!n)return _a.BLANK_URL;if(hSe(n))return n;var i=n.trimStart(),a=i.match(_a.urlSchemeRegex);if(!a)return n;var s=a[0].toLowerCase().trim();if(_a.invalidProtocolRegex.test(s))return _a.BLANK_URL;var l=i.replace(/\\/g,"/");if(s==="mailto:"||s.includes("://"))return l;if(s==="http:"||s==="https:"){if(!dSe(l))return _a.BLANK_URL;var u=new URL(l);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString();}return l;}o(pSe,"sanitizeUrl");tT.sanitizeUrl=pSe;});var ZD,Sd,rT,YY,XY,jY,Sl,Zv,Jv=N(()=>{"use strict";ZD=Sa(Y0(),1);dr();Sd=o((t,e)=>{let r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),e.attrs!==void 0)for(let n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r;},"drawRect"),rT=o((t,e)=>{let r={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};Sd(t,r).lower();},"drawBackgroundRect"),YY=o((t,e)=>{let r=e.text.replace(rd," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);let i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n;},"drawText"),XY=o((t,e,r,n)=>{let i=t.append("image");i.attr("x",e),i.attr("y",r);let a=(0,ZD.sanitizeUrl)(n);i.attr("xlink:href",a);},"drawImage"),jY=o((t,e,r,n)=>{let i=t.append("use");i.attr("x",e),i.attr("y",r);let a=(0,ZD.sanitizeUrl)(n);i.attr("xlink:href",`#${a}`);},"drawEmbeddedImage"),Sl=o(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),Zv=o(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj");});var KY,JD,QY,mSe,gSe,ySe,vSe,xSe,bSe,TSe,wSe,kSe,ESe,SSe,CSe,Eu,Cl,ZY=N(()=>{"use strict";dr();Jv();KY=Sa(Y0(),1),JD=o(function(t,e){return Sd(t,e);},"drawRect"),QY=o(function(t,e,r,n,i,a){let s=t.append("image");s.attr("width",e),s.attr("height",r),s.attr("x",n),s.attr("y",i);let l=a.startsWith("data:image/png;base64")?a:(0,KY.sanitizeUrl)(a);s.attr("xlink:href",l);},"drawImage"),mSe=o((t,e,r)=>{let n=t.append("g"),i=0;for(let a of e){let s=a.textColor?a.textColor:"#444444",l=a.lineColor?a.lineColor:"#444444",u=a.offsetX?parseInt(a.offsetX):0,h=a.offsetY?parseInt(a.offsetY):0,f="";if(i===0){let p=n.append("line");p.attr("x1",a.startPoint.x),p.attr("y1",a.startPoint.y),p.attr("x2",a.endPoint.x),p.attr("y2",a.endPoint.y),p.attr("stroke-width","1"),p.attr("stroke",l),p.style("fill","none"),a.type!=="rel_b"&&p.attr("marker-end","url("+f+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&p.attr("marker-start","url("+f+"#arrowend)"),i=-1;}else{let p=n.append("path");p.attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&p.attr("marker-end","url("+f+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&p.attr("marker-start","url("+f+"#arrowend)");}let d=r.messageFont();Eu(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+u,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+h,a.label.width,a.label.height,{fill:s},d),a.techn&&a.techn.text!==""&&(d=r.messageFont(),Eu(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+u,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+h,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:s,"font-style":"italic"},d));}},"drawRels"),gSe=o(function(t,e,r){let n=t.append("g"),i=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1});let u={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l};JD(n,u);let h=r.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=s,Eu(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},h),e.type&&e.type.text!==""&&(h=r.boundaryFont(),h.fontColor=s,Eu(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},h)),e.descr&&e.descr.text!==""&&(h=r.boundaryFont(),h.fontSize=h.fontSize-2,h.fontColor=s,Eu(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},h));},"drawBoundary"),ySe=o(function(t,e,r){var _e$techn;let n=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],i=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],a=e.fontColor?e.fontColor:"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break;}let l=t.append("g");l.attr("class","person-man");let u=Sl();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":u.x=e.x,u.y=e.y,u.fill=n,u.width=e.width,u.height=e.height,u.stroke=i,u.rx=2.5,u.ry=2.5,u.attrs={"stroke-width":.5},JD(l,u);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":l.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break;}let h=CSe(r,e.typeC4Shape.text);switch(l.append("text").attr("fill",a).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":QY(l,48,48,e.x+e.width/2-24,e.y+e.image.Y,s);break;}let f=r[e.typeC4Shape.text+"Font"]();return f.fontWeight="bold",f.fontSize=f.fontSize+2,f.fontColor=a,Eu(r)(e.label.text,l,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},f),f=r[e.typeC4Shape.text+"Font"](),f.fontColor=a,e.techn&&((_e$techn=e.techn)===null||_e$techn===void 0?void 0:_e$techn.text)!==""?Eu(r)(e.techn.text,l,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},f):e.type&&e.type.text!==""&&Eu(r)(e.type.text,l,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},f),e.descr&&e.descr.text!==""&&(f=r.personFont(),f.fontColor=a,Eu(r)(e.descr.text,l,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},f)),e.height;},"drawC4Shape"),vSe=o(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z");},"insertDatabaseIcon"),xSe=o(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z");},"insertComputerIcon"),bSe=o(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z");},"insertClockIcon"),TSe=o(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z");},"insertArrowHead"),wSe=o(function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z");},"insertArrowEnd"),kSe=o(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");},"insertArrowFilledHead"),ESe=o(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6);},"insertDynamicNumber"),SSe=o(function(t){let r=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7");},"insertArrowCrossHead"),CSe=o((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),Eu=function(){function t(i,a,s,l,u,h,f){let d=a.append("text").attr("x",s+u/2).attr("y",l+h/2+5).style("text-anchor","middle").text(i);n(d,f);}o(t,"byText");function e(i,a,s,l,u,h,f,d){let{fontSize:p,fontFamily:m,fontWeight:g}=d,y=i.split(Ze.lineBreakRegex);for(let v=0;v<y.length;v++){let x=v*p-p*(y.length-1)/2,b=a.append("text").attr("x",s+u/2).attr("y",l).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",p).style("font-weight",g).style("font-family",m);b.append("tspan").attr("dy",x).text(y[v]).attr("alignment-baseline","mathematical"),n(b,f);}}o(e,"byTspan");function r(i,a,s,l,u,h,f,d){let p=a.append("switch"),g=p.append("foreignObject").attr("x",s).attr("y",l).attr("width",u).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,s,l,u,h,f,d),n(g,f);}o(r,"byFo");function n(i,a){for(let s in a)a.hasOwnProperty(s)&&i.attr(s,a[s]);}return o(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e;};}(),Cl={drawRect:JD,drawBoundary:gSe,drawC4Shape:ySe,drawRels:mSe,drawImage:QY,insertArrowHead:TSe,insertArrowEnd:wSe,insertArrowFilledHead:kSe,insertDynamicNumber:ESe,insertArrowCrossHead:SSe,insertDatabaseIcon:vSe,insertComputerIcon:xSe,insertClockIcon:bSe};});var ASe,iT,e9=N(()=>{"use strict";ASe=typeof global=="object"&&global&&global.Object===Object&&global,iT=ASe;});var _Se,DSe,hi,Ro=N(()=>{"use strict";e9();_Se=typeof self=="object"&&self&&self.Object===Object&&self,DSe=iT||_Se||Function("return this")(),hi=DSe;});var LSe,Zi,Cd=N(()=>{"use strict";Ro();LSe=hi.Symbol,Zi=LSe;});function MSe(t){var e=RSe.call(t,e2),r=t[e2];try{t[e2]=void 0;var n=!0;}catch{}var i=NSe.call(t);return n&&(e?t[e2]=r:delete t[e2]),i;}var JY,RSe,NSe,e2,eX,tX=N(()=>{"use strict";Cd();JY=Object.prototype,RSe=JY.hasOwnProperty,NSe=JY.toString,e2=Zi?Zi.toStringTag:void 0;o(MSe,"getRawTag");eX=MSe;});function PSe(t){return OSe.call(t);}var ISe,OSe,rX,nX=N(()=>{"use strict";ISe=Object.prototype,OSe=ISe.toString;o(PSe,"objectToString");rX=PSe;});function $Se(t){return t==null?t===void 0?FSe:BSe:iX&&iX in Object(t)?eX(t):rX(t);}var BSe,FSe,iX,ua,Su=N(()=>{"use strict";Cd();tX();nX();BSe="[object Null]",FSe="[object Undefined]",iX=Zi?Zi.toStringTag:void 0;o($Se,"baseGetTag");ua=$Se;});function zSe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function");}var xn,to=N(()=>{"use strict";o(zSe,"isObject");xn=zSe;});function WSe(t){if(!xn(t))return!1;var e=ua(t);return e==VSe||e==USe||e==GSe||e==HSe;}var GSe,VSe,USe,HSe,Ci,t2=N(()=>{"use strict";Su();to();GSe="[object AsyncFunction]",VSe="[object Function]",USe="[object GeneratorFunction]",HSe="[object Proxy]";o(WSe,"isFunction");Ci=WSe;});var qSe,aT,aX=N(()=>{"use strict";Ro();qSe=hi["__core-js_shared__"],aT=qSe;});function YSe(t){return!!sX&&sX in t;}var sX,oX,lX=N(()=>{"use strict";aX();sX=function(){var t=/[^.]+$/.exec(aT&&aT.keys&&aT.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:"";}();o(YSe,"isMasked");oX=YSe;});function KSe(t){if(t!=null){try{return jSe.call(t);}catch{}try{return t+"";}catch{}}return"";}var XSe,jSe,Cu,t9=N(()=>{"use strict";XSe=Function.prototype,jSe=XSe.toString;o(KSe,"toSource");Cu=KSe;});function i6e(t){if(!xn(t)||oX(t))return!1;var e=Ci(t)?n6e:ZSe;return e.test(Cu(t));}var QSe,ZSe,JSe,e6e,t6e,r6e,n6e,cX,uX=N(()=>{"use strict";t2();lX();to();t9();QSe=/[\\^$.*+?()[\]{}|]/g,ZSe=/^\[object .+?Constructor\]$/,JSe=Function.prototype,e6e=Object.prototype,t6e=JSe.toString,r6e=e6e.hasOwnProperty,n6e=RegExp("^"+t6e.call(r6e).replace(QSe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");o(i6e,"baseIsNative");cX=i6e;});function a6e(t,e){return t===null||t===void 0?void 0:t[e];}var hX,fX=N(()=>{"use strict";o(a6e,"getValue");hX=a6e;});function s6e(t,e){var r=hX(t,e);return cX(r)?r:void 0;}var Cs,Nh=N(()=>{"use strict";uX();fX();o(s6e,"getNative");Cs=s6e;});var o6e,Au,r2=N(()=>{"use strict";Nh();o6e=Cs(Object,"create"),Au=o6e;});function l6e(){this.__data__=Au?Au(null):{},this.size=0;}var dX,pX=N(()=>{"use strict";r2();o(l6e,"hashClear");dX=l6e;});function c6e(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e;}var mX,gX=N(()=>{"use strict";o(c6e,"hashDelete");mX=c6e;});function d6e(t){var e=this.__data__;if(Au){var r=e[t];return r===u6e?void 0:r;}return f6e.call(e,t)?e[t]:void 0;}var u6e,h6e,f6e,yX,vX=N(()=>{"use strict";r2();u6e="__lodash_hash_undefined__",h6e=Object.prototype,f6e=h6e.hasOwnProperty;o(d6e,"hashGet");yX=d6e;});function g6e(t){var e=this.__data__;return Au?e[t]!==void 0:m6e.call(e,t);}var p6e,m6e,xX,bX=N(()=>{"use strict";r2();p6e=Object.prototype,m6e=p6e.hasOwnProperty;o(g6e,"hashHas");xX=g6e;});function v6e(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Au&&e===void 0?y6e:e,this;}var y6e,TX,wX=N(()=>{"use strict";r2();y6e="__lodash_hash_undefined__";o(v6e,"hashSet");TX=v6e;});function X0(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1]);}}var r9,kX=N(()=>{"use strict";pX();gX();vX();bX();wX();o(X0,"Hash");X0.prototype.clear=dX;X0.prototype.delete=mX;X0.prototype.get=yX;X0.prototype.has=xX;X0.prototype.set=TX;r9=X0;});function x6e(){this.__data__=[],this.size=0;}var EX,SX=N(()=>{"use strict";o(x6e,"listCacheClear");EX=x6e;});function b6e(t,e){return t===e||t!==t&&e!==e;}var No,Ad=N(()=>{"use strict";o(b6e,"eq");No=b6e;});function T6e(t,e){for(var r=t.length;r--;)if(No(t[r][0],e))return r;return-1;}var Mh,n2=N(()=>{"use strict";Ad();o(T6e,"assocIndexOf");Mh=T6e;});function E6e(t){var e=this.__data__,r=Mh(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():k6e.call(e,r,1),--this.size,!0;}var w6e,k6e,CX,AX=N(()=>{"use strict";n2();w6e=Array.prototype,k6e=w6e.splice;o(E6e,"listCacheDelete");CX=E6e;});function S6e(t){var e=this.__data__,r=Mh(e,t);return r<0?void 0:e[r][1];}var _X,DX=N(()=>{"use strict";n2();o(S6e,"listCacheGet");_X=S6e;});function C6e(t){return Mh(this.__data__,t)>-1;}var LX,RX=N(()=>{"use strict";n2();o(C6e,"listCacheHas");LX=C6e;});function A6e(t,e){var r=this.__data__,n=Mh(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this;}var NX,MX=N(()=>{"use strict";n2();o(A6e,"listCacheSet");NX=A6e;});function j0(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1]);}}var Ih,i2=N(()=>{"use strict";SX();AX();DX();RX();MX();o(j0,"ListCache");j0.prototype.clear=EX;j0.prototype.delete=CX;j0.prototype.get=_X;j0.prototype.has=LX;j0.prototype.set=NX;Ih=j0;});var _6e,Oh,sT=N(()=>{"use strict";Nh();Ro();_6e=Cs(hi,"Map"),Oh=_6e;});function D6e(){this.size=0,this.__data__={hash:new r9(),map:new(Oh||Ih)(),string:new r9()};}var IX,OX=N(()=>{"use strict";kX();i2();sT();o(D6e,"mapCacheClear");IX=D6e;});function L6e(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null;}var PX,BX=N(()=>{"use strict";o(L6e,"isKeyable");PX=L6e;});function R6e(t,e){var r=t.__data__;return PX(e)?r[typeof e=="string"?"string":"hash"]:r.map;}var Ph,a2=N(()=>{"use strict";BX();o(R6e,"getMapData");Ph=R6e;});function N6e(t){var e=Ph(this,t).delete(t);return this.size-=e?1:0,e;}var FX,$X=N(()=>{"use strict";a2();o(N6e,"mapCacheDelete");FX=N6e;});function M6e(t){return Ph(this,t).get(t);}var zX,GX=N(()=>{"use strict";a2();o(M6e,"mapCacheGet");zX=M6e;});function I6e(t){return Ph(this,t).has(t);}var VX,UX=N(()=>{"use strict";a2();o(I6e,"mapCacheHas");VX=I6e;});function O6e(t,e){var r=Ph(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this;}var HX,WX=N(()=>{"use strict";a2();o(O6e,"mapCacheSet");HX=O6e;});function K0(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1]);}}var _d,oT=N(()=>{"use strict";OX();$X();GX();UX();WX();o(K0,"MapCache");K0.prototype.clear=IX;K0.prototype.delete=FX;K0.prototype.get=zX;K0.prototype.has=VX;K0.prototype.set=HX;_d=K0;});function n9(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(P6e);var r=o(function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s;},"memoized");return r.cache=new(n9.Cache||_d)(),r;}var P6e,Q0,i9=N(()=>{"use strict";oT();P6e="Expected a function";o(n9,"memoize");n9.Cache=_d;Q0=n9;});function B6e(){this.__data__=new Ih(),this.size=0;}var qX,YX=N(()=>{"use strict";i2();o(B6e,"stackClear");qX=B6e;});function F6e(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r;}var XX,jX=N(()=>{"use strict";o(F6e,"stackDelete");XX=F6e;});function $6e(t){return this.__data__.get(t);}var KX,QX=N(()=>{"use strict";o($6e,"stackGet");KX=$6e;});function z6e(t){return this.__data__.has(t);}var ZX,JX=N(()=>{"use strict";o(z6e,"stackHas");ZX=z6e;});function V6e(t,e){var r=this.__data__;if(r instanceof Ih){var n=r.__data__;if(!Oh||n.length<G6e-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new _d(n);}return r.set(t,e),this.size=r.size,this;}var G6e,ej,tj=N(()=>{"use strict";i2();sT();oT();G6e=200;o(V6e,"stackSet");ej=V6e;});function Z0(t){var e=this.__data__=new Ih(t);this.size=e.size;}var hc,s2=N(()=>{"use strict";i2();YX();jX();QX();JX();tj();o(Z0,"Stack");Z0.prototype.clear=qX;Z0.prototype.delete=XX;Z0.prototype.get=KX;Z0.prototype.has=ZX;Z0.prototype.set=ej;hc=Z0;});var U6e,J0,a9=N(()=>{"use strict";Nh();U6e=function(){try{var t=Cs(Object,"defineProperty");return t({},"",{}),t;}catch{}}(),J0=U6e;});function H6e(t,e,r){e=="__proto__"&&J0?J0(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r;}var fc,em=N(()=>{"use strict";a9();o(H6e,"baseAssignValue");fc=H6e;});function W6e(t,e,r){(r!==void 0&&!No(t[e],r)||r===void 0&&!(e in t))&&fc(t,e,r);}var o2,s9=N(()=>{"use strict";em();Ad();o(W6e,"assignMergeValue");o2=W6e;});function q6e(t){return function(e,r,n){for(var i=-1,a=Object(e),s=n(e),l=s.length;l--;){var u=s[t?l:++i];if(r(a[u],u,a)===!1)break;}return e;};}var rj,nj=N(()=>{"use strict";o(q6e,"createBaseFor");rj=q6e;});var Y6e,tm,lT=N(()=>{"use strict";nj();Y6e=rj(),tm=Y6e;});function j6e(t,e){if(e)return t.slice();var r=t.length,n=sj?sj(r):new t.constructor(r);return t.copy(n),n;}var oj,ij,X6e,aj,sj,cT,o9=N(()=>{"use strict";Ro();oj=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ij=oj&&typeof module=="object"&&module&&!module.nodeType&&module,X6e=ij&&ij.exports===oj,aj=X6e?hi.Buffer:void 0,sj=aj?aj.allocUnsafe:void 0;o(j6e,"cloneBuffer");cT=j6e;});var K6e,rm,l9=N(()=>{"use strict";Ro();K6e=hi.Uint8Array,rm=K6e;});function Q6e(t){var e=new t.constructor(t.byteLength);return new rm(e).set(new rm(t)),e;}var nm,uT=N(()=>{"use strict";l9();o(Q6e,"cloneArrayBuffer");nm=Q6e;});function Z6e(t,e){var r=e?nm(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length);}var hT,c9=N(()=>{"use strict";uT();o(Z6e,"cloneTypedArray");hT=Z6e;});function J6e(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e;}var fT,u9=N(()=>{"use strict";o(J6e,"copyArray");fT=J6e;});var lj,eCe,cj,uj=N(()=>{"use strict";to();lj=Object.create,eCe=function(){function t(){}return o(t,"object"),function(e){if(!xn(e))return{};if(lj)return lj(e);t.prototype=e;var r=new t();return t.prototype=void 0,r;};}(),cj=eCe;});function tCe(t,e){return function(r){return t(e(r));};}var dT,h9=N(()=>{"use strict";o(tCe,"overArg");dT=tCe;});var rCe,im,pT=N(()=>{"use strict";h9();rCe=dT(Object.getPrototypeOf,Object),im=rCe;});function iCe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||nCe;return t===r;}var nCe,dc,am=N(()=>{"use strict";nCe=Object.prototype;o(iCe,"isPrototype");dc=iCe;});function aCe(t){return typeof t.constructor=="function"&&!dc(t)?cj(im(t)):{};}var mT,f9=N(()=>{"use strict";uj();pT();am();o(aCe,"initCloneObject");mT=aCe;});function sCe(t){return t!=null&&typeof t=="object";}var ni,Mo=N(()=>{"use strict";o(sCe,"isObjectLike");ni=sCe;});function lCe(t){return ni(t)&&ua(t)==oCe;}var oCe,d9,hj=N(()=>{"use strict";Su();Mo();oCe="[object Arguments]";o(lCe,"baseIsArguments");d9=lCe;});var fj,cCe,uCe,hCe,Al,sm=N(()=>{"use strict";hj();Mo();fj=Object.prototype,cCe=fj.hasOwnProperty,uCe=fj.propertyIsEnumerable,hCe=d9(function(){return arguments;}())?d9:function(t){return ni(t)&&cCe.call(t,"callee")&&!uCe.call(t,"callee");},Al=hCe;});var fCe,Pt,Un=N(()=>{"use strict";fCe=Array.isArray,Pt=fCe;});function pCe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=dCe;}var dCe,om,gT=N(()=>{"use strict";dCe=9007199254740991;o(pCe,"isLength");om=pCe;});function mCe(t){return t!=null&&om(t.length)&&!Ci(t);}var fi,Io=N(()=>{"use strict";t2();gT();o(mCe,"isArrayLike");fi=mCe;});function gCe(t){return ni(t)&&fi(t);}var Dd,yT=N(()=>{"use strict";Io();Mo();o(gCe,"isArrayLikeObject");Dd=gCe;});function yCe(){return!1;}var dj,pj=N(()=>{"use strict";o(yCe,"stubFalse");dj=yCe;});var yj,mj,vCe,gj,xCe,bCe,_l,lm=N(()=>{"use strict";Ro();pj();yj=typeof exports=="object"&&exports&&!exports.nodeType&&exports,mj=yj&&typeof module=="object"&&module&&!module.nodeType&&module,vCe=mj&&mj.exports===yj,gj=vCe?hi.Buffer:void 0,xCe=gj?gj.isBuffer:void 0,bCe=xCe||dj,_l=bCe;});function CCe(t){if(!ni(t)||ua(t)!=TCe)return!1;var e=im(t);if(e===null)return!0;var r=ECe.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&vj.call(r)==SCe;}var TCe,wCe,kCe,vj,ECe,SCe,xj,bj=N(()=>{"use strict";Su();pT();Mo();TCe="[object Object]",wCe=Function.prototype,kCe=Object.prototype,vj=wCe.toString,ECe=kCe.hasOwnProperty,SCe=vj.call(Object);o(CCe,"isPlainObject");xj=CCe;});function QCe(t){return ni(t)&&om(t.length)&&!!Bn[ua(t)];}var ACe,_Ce,DCe,LCe,RCe,NCe,MCe,ICe,OCe,PCe,BCe,FCe,$Ce,zCe,GCe,VCe,UCe,HCe,WCe,qCe,YCe,XCe,jCe,KCe,Bn,Tj,wj=N(()=>{"use strict";Su();gT();Mo();ACe="[object Arguments]",_Ce="[object Array]",DCe="[object Boolean]",LCe="[object Date]",RCe="[object Error]",NCe="[object Function]",MCe="[object Map]",ICe="[object Number]",OCe="[object Object]",PCe="[object RegExp]",BCe="[object Set]",FCe="[object String]",$Ce="[object WeakMap]",zCe="[object ArrayBuffer]",GCe="[object DataView]",VCe="[object Float32Array]",UCe="[object Float64Array]",HCe="[object Int8Array]",WCe="[object Int16Array]",qCe="[object Int32Array]",YCe="[object Uint8Array]",XCe="[object Uint8ClampedArray]",jCe="[object Uint16Array]",KCe="[object Uint32Array]",Bn={};Bn[VCe]=Bn[UCe]=Bn[HCe]=Bn[WCe]=Bn[qCe]=Bn[YCe]=Bn[XCe]=Bn[jCe]=Bn[KCe]=!0;Bn[ACe]=Bn[_Ce]=Bn[zCe]=Bn[DCe]=Bn[GCe]=Bn[LCe]=Bn[RCe]=Bn[NCe]=Bn[MCe]=Bn[ICe]=Bn[OCe]=Bn[PCe]=Bn[BCe]=Bn[FCe]=Bn[$Ce]=!1;o(QCe,"baseIsTypedArray");Tj=QCe;});function ZCe(t){return function(e){return t(e);};}var Oo,Ld=N(()=>{"use strict";o(ZCe,"baseUnary");Oo=ZCe;});var kj,l2,JCe,p9,e7e,Po,c2=N(()=>{"use strict";e9();kj=typeof exports=="object"&&exports&&!exports.nodeType&&exports,l2=kj&&typeof module=="object"&&module&&!module.nodeType&&module,JCe=l2&&l2.exports===kj,p9=JCe&&iT.process,e7e=function(){try{var t=l2&&l2.require&&l2.require("util").types;return t||p9&&p9.binding&&p9.binding("util");}catch{}}(),Po=e7e;});var Ej,t7e,Bh,u2=N(()=>{"use strict";wj();Ld();c2();Ej=Po&&Po.isTypedArray,t7e=Ej?Oo(Ej):Tj,Bh=t7e;});function r7e(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e];}var h2,m9=N(()=>{"use strict";o(r7e,"safeGet");h2=r7e;});function a7e(t,e,r){var n=t[e];(!(i7e.call(t,e)&&No(n,r))||r===void 0&&!(e in t))&&fc(t,e,r);}var n7e,i7e,pc,cm=N(()=>{"use strict";em();Ad();n7e=Object.prototype,i7e=n7e.hasOwnProperty;o(a7e,"assignValue");pc=a7e;});function s7e(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var l=e[a],u=n?n(r[l],t[l],l,r,t):void 0;u===void 0&&(u=t[l]),i?fc(r,l,u):pc(r,l,u);}return r;}var Bo,Rd=N(()=>{"use strict";cm();em();o(s7e,"copyObject");Bo=s7e;});function o7e(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n;}var Sj,Cj=N(()=>{"use strict";o(o7e,"baseTimes");Sj=o7e;});function u7e(t,e){var r=typeof t;return e=e!==null&&e!==void 0?e:l7e,!!e&&(r=="number"||r!="symbol"&&c7e.test(t))&&t>-1&&t%1==0&&t<e;}var l7e,c7e,Fh,f2=N(()=>{"use strict";l7e=9007199254740991,c7e=/^(?:0|[1-9]\d*)$/;o(u7e,"isIndex");Fh=u7e;});function d7e(t,e){var r=Pt(t),n=!r&&Al(t),i=!r&&!n&&_l(t),a=!r&&!n&&!i&&Bh(t),s=r||n||i||a,l=s?Sj(t.length,String):[],u=l.length;for(var h in t)(e||f7e.call(t,h))&&!(s&&(h=="length"||i&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Fh(h,u)))&&l.push(h);return l;}var h7e,f7e,vT,g9=N(()=>{"use strict";Cj();sm();Un();lm();f2();u2();h7e=Object.prototype,f7e=h7e.hasOwnProperty;o(d7e,"arrayLikeKeys");vT=d7e;});function p7e(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e;}var Aj,_j=N(()=>{"use strict";o(p7e,"nativeKeysIn");Aj=p7e;});function y7e(t){if(!xn(t))return Aj(t);var e=dc(t),r=[];for(var n in t)n=="constructor"&&(e||!g7e.call(t,n))||r.push(n);return r;}var m7e,g7e,Dj,Lj=N(()=>{"use strict";to();am();_j();m7e=Object.prototype,g7e=m7e.hasOwnProperty;o(y7e,"baseKeysIn");Dj=y7e;});function v7e(t){return fi(t)?vT(t,!0):Dj(t);}var As,$h=N(()=>{"use strict";g9();Lj();Io();o(v7e,"keysIn");As=v7e;});function x7e(t){return Bo(t,As(t));}var Rj,Nj=N(()=>{"use strict";Rd();$h();o(x7e,"toPlainObject");Rj=x7e;});function b7e(t,e,r,n,i,a,s){var l=h2(t,r),u=h2(e,r),h=s.get(u);if(h){o2(t,r,h);return;}var f=a?a(l,u,r+"",t,e,s):void 0,d=f===void 0;if(d){var p=Pt(u),m=!p&&_l(u),g=!p&&!m&&Bh(u);f=u,p||m||g?Pt(l)?f=l:Dd(l)?f=fT(l):m?(d=!1,f=cT(u,!0)):g?(d=!1,f=hT(u,!0)):f=[]:xj(u)||Al(u)?(f=l,Al(l)?f=Rj(l):(!xn(l)||Ci(l))&&(f=mT(u))):d=!1;}d&&(s.set(u,f),i(f,u,n,a,s),s.delete(u)),o2(t,r,f);}var Mj,Ij=N(()=>{"use strict";s9();o9();c9();u9();f9();sm();Un();yT();lm();t2();to();bj();u2();m9();Nj();o(b7e,"baseMergeDeep");Mj=b7e;});function Oj(t,e,r,n,i){t!==e&&tm(e,function(a,s){if(i||(i=new hc()),xn(a))Mj(t,e,s,r,Oj,n,i);else{var l=n?n(h2(t,s),a,s+"",t,e,i):void 0;l===void 0&&(l=a),o2(t,s,l);}},As);}var Pj,Bj=N(()=>{"use strict";s2();s9();lT();Ij();to();$h();m9();o(Oj,"baseMerge");Pj=Oj;});function T7e(t){return t;}var Ji,_u=N(()=>{"use strict";o(T7e,"identity");Ji=T7e;});function w7e(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2]);}return t.apply(e,r);}var Fj,$j=N(()=>{"use strict";o(w7e,"apply");Fj=w7e;});function k7e(t,e,r){return e=zj(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=zj(n.length-e,0),s=Array(a);++i<a;)s[i]=n[e+i];i=-1;for(var l=Array(e+1);++i<e;)l[i]=n[i];return l[e]=r(s),Fj(t,this,l);};}var zj,xT,y9=N(()=>{"use strict";$j();zj=Math.max;o(k7e,"overRest");xT=k7e;});function E7e(t){return function(){return t;};}var _s,v9=N(()=>{"use strict";o(E7e,"constant");_s=E7e;});var S7e,Gj,Vj=N(()=>{"use strict";v9();a9();_u();S7e=J0?function(t,e){return J0(t,"toString",{configurable:!0,enumerable:!1,value:_s(e),writable:!0});}:Ji,Gj=S7e;});function D7e(t){var e=0,r=0;return function(){var n=_7e(),i=A7e-(n-r);if(r=n,i>0){if(++e>=C7e)return arguments[0];}else e=0;return t.apply(void 0,arguments);};}var C7e,A7e,_7e,Uj,Hj=N(()=>{"use strict";C7e=800,A7e=16,_7e=Date.now;o(D7e,"shortOut");Uj=D7e;});var L7e,bT,x9=N(()=>{"use strict";Vj();Hj();L7e=Uj(Gj),bT=L7e;});function R7e(t,e){return bT(xT(t,e,Ji),t+"");}var mc,um=N(()=>{"use strict";_u();y9();x9();o(R7e,"baseRest");mc=R7e;});function N7e(t,e,r){if(!xn(r))return!1;var n=typeof e;return(n=="number"?fi(r)&&Fh(e,r.length):n=="string"&&e in r)?No(r[e],t):!1;}var ro,Nd=N(()=>{"use strict";Ad();Io();f2();to();o(N7e,"isIterateeCall");ro=N7e;});function M7e(t){return mc(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&ro(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var l=r[n];l&&t(e,l,n,a);}return e;});}var TT,b9=N(()=>{"use strict";um();Nd();o(M7e,"createAssigner");TT=M7e;});var I7e,zh,T9=N(()=>{"use strict";Bj();b9();I7e=TT(function(t,e,r){Pj(t,e,r);}),zh=I7e;});function E9(t,e){var _O7e$r;if(!t)return e;let r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return(_O7e$r=O7e[r])!==null&&_O7e$r!==void 0?_O7e$r:e;}function $7e(t,e){let r=t.trim();if(r)return e.securityLevel!=="loose"?(0,Yj.sanitizeUrl)(r):r;}function Kj(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2));}function G7e(t){let e,r=0;t.forEach(i=>{r+=Kj(i,e),e=i;});let n=r/2;return S9(t,n);}function V7e(t){return t.length===1?t[0]:G7e(t);}function H7e(t,e,r){let n=structuredClone(r);X.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();let i=25+t,a=S9(n,i),s=10+t*.5,l=Math.atan2(n[0].y-a.y,n[0].x-a.x),u={x:0,y:0};return e==="start_left"?(u.x=Math.sin(l+Math.PI)*s+(n[0].x+a.x)/2,u.y=-Math.cos(l+Math.PI)*s+(n[0].y+a.y)/2):e==="end_right"?(u.x=Math.sin(l-Math.PI)*s+(n[0].x+a.x)/2-5,u.y=-Math.cos(l-Math.PI)*s+(n[0].y+a.y)/2-5):e==="end_left"?(u.x=Math.sin(l)*s+(n[0].x+a.x)/2-5,u.y=-Math.cos(l)*s+(n[0].y+a.y)/2-5):(u.x=Math.sin(l)*s+(n[0].x+a.x)/2,u.y=-Math.cos(l)*s+(n[0].y+a.y)/2),u;}function C9(t){let e="",r="";for(let n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r};}function W7e(t){let e="",r="0123456789abcdef",n=r.length;for(let i=0;i<t;i++)e+=r.charAt(Math.floor(Math.random()*n));return e;}function kT(t,e){return L9(t,e).height;}function ea(t,e){return L9(t,e).width;}function R9(t){return"str"in t;}function Fn(t,e){return zh({},t,e);}function ii(t){return t!==null&&t!==void 0?t:null;}function Q7e(t,e){let r=Math.round(t.x),n=Math.round(t.y),i=e.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return i.includes(r.toString())||i.includes(n.toString());}var Yj,k9,O7e,P7e,B7e,Xj,jj,F7e,z7e,Wj,S9,U7e,qj,A9,_9,q7e,Y7e,D9,X7e,L9,w9,wT,j7e,K7e,Fo,Vt,Qj,ta,Gh,nr=N(()=>{"use strict";var _Class27;Yj=Sa(Y0(),1);pr();dr();h7();yt();ad();c0();i9();T9();I3();k9="\u200B",O7e={curveBasis:Lo,curveBasisClosed:q5,curveBasisOpen:Y5,curveBumpX:$v,curveBumpY:zv,curveBundle:GD,curveCardinalClosed:VD,curveCardinalOpen:HD,curveCardinal:Hv,curveCatmullRomClosed:qD,curveCatmullRomOpen:YD,curveCatmullRom:Yv,curveLinear:ku,curveLinearClosed:Z5,curveMonotoneX:Xv,curveMonotoneY:jv,curveNatural:W0,curveStep:q0,curveStepAfter:Qv,curveStepBefore:Kv},P7e=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,B7e=o(function(t,e){let r=Xj(t,/(?:init\b)|(?:initialize\b)/),n={};if(Array.isArray(r)){let s=r.map(l=>l.args);h0(s),n=Gn(n,[...s]);}else n=r.args;if(!n)return;let i=b0(t,e),a="config";return n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a]),n;},"detectInit"),Xj=o(function(t,e=null){try{let r=new RegExp(`[%]{2}(?![{]${P7e.source})(?=[}][%]{2}).*
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),X.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let n,i=[];for(;(n=id.exec(t))!==null;){var _n$,_n$2;if(n.index===id.lastIndex&&id.lastIndex++,n&&!e||e&&(_n$=n[1])!==null&&_n$!==void 0&&_n$.match(e)||e&&(_n$2=n[2])!==null&&_n$2!==void 0&&_n$2.match(e)){let a=n[1]?n[1]:n[2],s=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:a,args:s});}}return i.length===0?{type:t,args:null}:i.length===1?i[0]:i;}catch(r){return X.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null};}},"detectDirective"),jj=o(function(t){return t.replace(id,"");},"removeDirectives"),F7e=o(function(t,e){for(let[r,n]of e.entries())if(n.match(t))return r;return-1;},"isSubstringInArray");o(E9,"interpolateToCurve");o($7e,"formatUrl");z7e=o((t,...e)=>{let r=t.split("."),n=r.length-1,i=r[n],a=window;for(let s=0;s<n;s++)if(a=a[r[s]],!a){X.error(`Function name: ${t} not found in window`);return;}a[i](...e);},"runFunc");o(Kj,"distance");o(G7e,"traverseEdge");o(V7e,"calcLabelPosition");Wj=o((t,e=2)=>{let r=Math.pow(10,e);return Math.round(t*r)/r;},"roundNumber"),S9=o((t,e)=>{let r,n=e;for(let i of t){if(r){let a=Kj(i,r);if(a===0)return r;if(a<n)n-=a;else{let s=n/a;if(s<=0)return r;if(s>=1)return{x:i.x,y:i.y};if(s>0&&s<1)return{x:Wj((1-s)*r.x+s*i.x,5),y:Wj((1-s)*r.y+s*i.y,5)};}}r=i;}throw new Error("Could not find a suitable point for the given distance");},"calculatePoint"),U7e=o((t,e,r)=>{X.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let i=S9(e,25),a=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),l={x:0,y:0};return l.x=Math.sin(s)*a+(e[0].x+i.x)/2,l.y=-Math.cos(s)*a+(e[0].y+i.y)/2,l;},"calcCardinalityPosition");o(H7e,"calcTerminalLabelPosition");o(C9,"getStylesFromArray");qj=0,A9=o(()=>(qj++,"id-"+Math.random().toString(36).substr(2,12)+"-"+qj),"generateId");o(W7e,"makeRandomHex");_9=o(t=>W7e(t.length),"random"),q7e=o(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"),Y7e=o(function(t,e){let r=e.text.replace(Ze.lineBreakRegex," "),[,n]=Fo(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",n),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);let a=i.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),i;},"drawSimpleText"),D9=Q0((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ze.lineBreakRegex.test(t)))return t;let n=t.split(" ").filter(Boolean),i=[],a="";return n.forEach((s,l)=>{let u=ea(`${s} `,r),h=ea(a,r);if(u>e){let{hyphenatedStrings:p,remainingWord:m}=X7e(s,e,"-",r);i.push(a,...p),a=m;}else h+u>=e?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");l+1===n.length&&i.push(a);}),i.filter(s=>s!=="").join(r.joinWith);},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),X7e=Q0((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let i=[...t],a=[],s="";return i.forEach((l,u)=>{let h=`${s}${l}`;if(ea(h,n)>=e){let d=u+1,p=i.length===d,m=`${h}${r}`;a.push(p?h:m),s="";}else s=h;}),{hyphenatedStrings:a,remainingWord:s};},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);o(kT,"calculateTextHeight");o(ea,"calculateTextWidth");L9=Q0((t,e)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};let[,a]=Fo(r),s=["sans-serif",n],l=t.split(Ze.lineBreakRegex),u=[],h=Ge("body");if(!h.remove)return{width:0,height:0,lineHeight:0};let f=h.append("svg");for(let p of s){let m=0,g={width:0,height:0,lineHeight:0};for(let y of l){let v=q7e();v.text=y||k9;let x=Y7e(f,v).style("font-size",a).style("font-weight",i).style("font-family",p),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),m=Math.round(b.height),g.height+=m,g.lineHeight=Math.round(Math.max(g.lineHeight,m));}u.push(g);}f.remove();let d=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[d];},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),w9=(_Class27=class w9{constructor(e=!1,r){this.count=0;this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now();}},o(_Class27,"InitIDGenerator"),_Class27),j7e=o(function(t){return wT=wT||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),wT.innerHTML=t,unescape(wT.textContent);},"entityDecode");o(R9,"isDetailedError");K7e=o((t,e,r,n)=>{var _t$node;if(!n)return;let i=(_t$node=t.node())===null||_t$node===void 0?void 0:_t$node.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e);},"insertTitle"),Fo=o(t=>{if(typeof t=="number")return[t,t+"px"];let e=parseInt(t!==null&&t!==void 0?t:"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t];},"parseFontSize");o(Fn,"cleanAndMerge");Vt={assignWithDepth:Gn,wrapLabel:D9,calculateTextHeight:kT,calculateTextWidth:ea,calculateTextDimensions:L9,cleanAndMerge:Fn,detectInit:B7e,detectDirective:Xj,isSubstringInArray:F7e,interpolateToCurve:E9,calcLabelPosition:V7e,calcCardinalityPosition:U7e,calcTerminalLabelPosition:H7e,formatUrl:$7e,getStylesFromArray:C9,generateId:A9,random:_9,runFunc:z7e,entityDecode:j7e,insertTitle:K7e,isLabelCoordinateInPath:Q7e,parseFontSize:Fo,InitIDGenerator:w9},Qj=o(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1);}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1);}),e=e.replace(/#\w+;/g,function(r){let n=r.substring(1,r.length-1);return /^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF";}),e;},"encodeEntities"),ta=o(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";");},"decodeEntities"),Gh=o((t,e,{counter:r=0,prefix:n,suffix:i},a)=>a||`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId");o(ii,"handleUndefinedAttr");o(Q7e,"isLabelCoordinateInPath");});function Dl(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=D9(e[t].text,i,n),e[t].textLines=e[t].text.split(Ze.lineBreakRegex).length,e[t].width=i,e[t].height=kT(e[t].text,n);else{let a=e[t].text.split(Ze.lineBreakRegex);e[t].textLines=a.length;let s=0;e[t].height=0,e[t].width=0;for(let l of a)e[t].width=Math.max(ea(l,n),e[t].width),s=kT(l,n),e[t].height=e[t].height+s;}}function rK(t,e,r,n,i){let a=new AT(i);a.data.widthLimit=r.data.widthLimit/Math.min(N9,n.length);for(let[s,l]of n.entries()){let u=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=u,u=l.image.Y+l.image.height);let h=l.wrap&&Ut.wrap,f=ET(Ut);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",Dl("label",l,h,f,a.data.widthLimit),l.label.Y=u+8,u=l.label.Y+l.label.height,l.type&&l.type.text!==""){l.type.text="["+l.type.text+"]";let g=ET(Ut);Dl("type",l,h,g,a.data.widthLimit),l.type.Y=u+5,u=l.type.Y+l.type.height;}if(l.descr&&l.descr.text!==""){let g=ET(Ut);g.fontSize=g.fontSize-2,Dl("descr",l,h,g,a.data.widthLimit),l.descr.Y=u+20,u=l.descr.Y+l.descr.height;}if(s==0||s%N9===0){let g=r.data.startx+Ut.diagramMarginX,y=r.data.stopy+Ut.diagramMarginY+u;a.setData(g,g,y,y);}else{let g=a.data.stopx!==a.data.startx?a.data.stopx+Ut.diagramMarginX:a.data.startx,y=a.data.starty;a.setData(g,g,y,y);}a.name=l.alias;let d=i.db.getC4ShapeArray(l.alias),p=i.db.getC4ShapeKeys(l.alias);p.length>0&&tK(a,t,d,p),e=l.alias;let m=i.db.getBoundaries(e);m.length>0&&rK(t,e,a,m,i),l.alias!=="global"&&eK(t,l,a),r.data.stopy=Math.max(a.data.stopy+Ut.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+Ut.c4ShapeMargin,r.data.stopx),ST=Math.max(ST,r.data.stopx),CT=Math.max(CT,r.data.stopy);}}var ST,CT,Jj,N9,Ut,AT,M9,d2,ET,Z7e,eK,tK,Ds,Zj,J7e,eAe,tAe,I9,nK=N(()=>{"use strict";var _Class28,_Class29;pr();ZY();yt();yA();dr();AA();qt();c0();nr();yi();ST=0,CT=0,Jj=4,N9=2;Zy.yy=iv;Ut={},AT=(_Class28=class AT{constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,M9(e.db.getConfig());}setData(e,r,n,i){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=i;}updateVal(e,r,n,i){e[r]===void 0?e[r]=n:e[r]=i(n,e[r]);}insert(e){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,n=r+e.width,i=this.nextData.starty+e.margin*2,a=i+e.height;(r>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>Jj)&&(r=this.nextData.startx+e.margin+Ut.nextLinePaddingX,i=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=a=i+e.height,this.nextData.cnt=1),e.x=r,e.y=i,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",a,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",a,Math.max);}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},M9(e.db.getConfig());}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e;}},o(_Class28,"Bounds"),_Class28),M9=o(function(t){Gn(Ut,t),t.fontFamily&&(Ut.personFontFamily=Ut.systemFontFamily=Ut.messageFontFamily=t.fontFamily),t.fontSize&&(Ut.personFontSize=Ut.systemFontSize=Ut.messageFontSize=t.fontSize),t.fontWeight&&(Ut.personFontWeight=Ut.systemFontWeight=Ut.messageFontWeight=t.fontWeight);},"setConf"),d2=o((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),ET=o(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),Z7e=o(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");o(Dl,"calcC4ShapeTextWH");eK=o(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=Ut.c4ShapeMargin-35;let n=e.wrap&&Ut.wrap,i=ET(Ut);i.fontSize=i.fontSize+2,i.fontWeight="bold";let a=ea(e.label.text,i);Dl("label",e,n,i,a),Cl.drawBoundary(t,e,Ut);},"drawBoundary"),tK=o(function(t,e,r,n){let i=0;for(let a of n){i=0;let s=r[a],l=d2(Ut,s.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,s.typeC4Shape.width=ea("\xAB"+s.typeC4Shape.text+"\xBB",l),s.typeC4Shape.height=l.fontSize+2,s.typeC4Shape.Y=Ut.c4ShapePadding,i=s.typeC4Shape.Y+s.typeC4Shape.height-4,s.image={width:0,height:0,Y:0},s.typeC4Shape.text){case"person":case"external_person":s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height;break;}s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height);let u=s.wrap&&Ut.wrap,h=Ut.width-Ut.c4ShapePadding*2,f=d2(Ut,s.typeC4Shape.text);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",Dl("label",s,u,f,h),s.label.Y=i+8,i=s.label.Y+s.label.height,s.type&&s.type.text!==""){s.type.text="["+s.type.text+"]";let m=d2(Ut,s.typeC4Shape.text);Dl("type",s,u,m,h),s.type.Y=i+5,i=s.type.Y+s.type.height;}else if(s.techn&&s.techn.text!==""){s.techn.text="["+s.techn.text+"]";let m=d2(Ut,s.techn.text);Dl("techn",s,u,m,h),s.techn.Y=i+5,i=s.techn.Y+s.techn.height;}let d=i,p=s.label.width;if(s.descr&&s.descr.text!==""){let m=d2(Ut,s.typeC4Shape.text);Dl("descr",s,u,m,h),s.descr.Y=i+20,i=s.descr.Y+s.descr.height,p=Math.max(s.label.width,s.descr.width),d=i-s.descr.textLines*5;}p=p+Ut.c4ShapePadding,s.width=Math.max(s.width||Ut.width,p,Ut.width),s.height=Math.max(s.height||Ut.height,d,Ut.height),s.margin=s.margin||Ut.c4ShapeMargin,t.insert(s),Cl.drawC4Shape(e,s,Ut);}t.bumpLastMargin(Ut.c4ShapeMargin);},"drawC4ShapeArray"),Ds=(_Class29=class Ds{constructor(e,r){this.x=e,this.y=r;}},o(_Class29,"Point"),_Class29),Zj=o(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,s=r+t.width/2,l=n+t.height/2,u=Math.abs(r-i),h=Math.abs(n-a),f=h/u,d=t.height/t.width,p=null;return n==a&&r<i?p=new Ds(r+t.width,l):n==a&&r>i?p=new Ds(r,l):r==i&&n<a?p=new Ds(s,n+t.height):r==i&&n>a&&(p=new Ds(s,n)),r>i&&n<a?d>=f?p=new Ds(r,l+f*t.width/2):p=new Ds(s-u/h*t.height/2,n+t.height):r<i&&n<a?d>=f?p=new Ds(r+t.width,l+f*t.width/2):p=new Ds(s+u/h*t.height/2,n+t.height):r<i&&n>a?d>=f?p=new Ds(r+t.width,l-f*t.width/2):p=new Ds(s+t.height/2*u/h,n):r>i&&n>a&&(d>=f?p=new Ds(r,l-t.width/2*f):p=new Ds(s-t.height/2*u/h,n)),p;},"getIntersectPoint"),J7e=o(function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=Zj(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=Zj(e,r);return{startPoint:n,endPoint:i};},"getIntersectPoints"),eAe=o(function(t,e,r,n){let i=0;for(let a of e){i=i+1;let s=a.wrap&&Ut.wrap,l=Z7e(Ut);n.db.getC4Type()==="C4Dynamic"&&(a.label.text=i+": "+a.label.text);let h=ea(a.label.text,l);Dl("label",a,s,l,h),a.techn&&a.techn.text!==""&&(h=ea(a.techn.text,l),Dl("techn",a,s,l,h)),a.descr&&a.descr.text!==""&&(h=ea(a.descr.text,l),Dl("descr",a,s,l,h));let f=r(a.from),d=r(a.to),p=J7e(f,d);a.startPoint=p.startPoint,a.endPoint=p.endPoint;}Cl.drawRels(t,e,Ut);},"drawRels");o(rK,"drawInsideBoundary");tAe=o(function(t,e,r,n){Ut=ge().c4;let i=ge().securityLevel,a;i==="sandbox"&&(a=Ge("#i"+e));let s=i==="sandbox"?Ge(a.nodes()[0].contentDocument.body):Ge("body"),l=n.db;n.db.setWrap(Ut.wrap),Jj=l.getC4ShapeInRow(),N9=l.getC4BoundaryInRow(),X.debug(`C:${JSON.stringify(Ut,null,2)}`);let u=i==="sandbox"?s.select(`[id="${e}"]`):Ge(`[id="${e}"]`);Cl.insertComputerIcon(u),Cl.insertDatabaseIcon(u),Cl.insertClockIcon(u);let h=new AT(n);h.setData(Ut.diagramMarginX,Ut.diagramMarginX,Ut.diagramMarginY,Ut.diagramMarginY),h.data.widthLimit=screen.availWidth,ST=Ut.diagramMarginX,CT=Ut.diagramMarginY;let f=n.db.getTitle(),d=n.db.getBoundaries("");rK(u,"",h,d,n),Cl.insertArrowHead(u),Cl.insertArrowEnd(u),Cl.insertArrowCrossHead(u),Cl.insertArrowFilledHead(u),eAe(u,n.db.getRels(),n.db.getC4Shape,n),h.data.stopx=ST,h.data.stopy=CT;let p=h.data,g=p.stopy-p.starty+2*Ut.diagramMarginY,v=p.stopx-p.startx+2*Ut.diagramMarginX;f&&u.append("text").text(f).attr("x",(p.stopx-p.startx)/2-4*Ut.diagramMarginX).attr("y",p.starty+Ut.diagramMarginY),hn(u,g,v,Ut.useMaxWidth);let x=f?60:0;u.attr("viewBox",p.startx-Ut.diagramMarginX+" -"+(Ut.diagramMarginY+x)+" "+v+" "+(g+x)),X.debug("models:",p);},"draw"),I9={drawPersonOrSystemArray:tK,drawBoundary:eK,setConf:M9,draw:tAe};});var rAe,iK,aK=N(()=>{"use strict";rAe=o(t=>`.person {
    stroke: ${t.personBorder};
    fill: ${t.personBkg};
  }
`,"getStyles"),iK=rAe;});var sK={};hr(sK,{diagram:()=>nAe});var nAe,oK=N(()=>{"use strict";yA();AA();nK();aK();nAe={parser:LV,db:iv,renderer:I9,styles:iK,init:o(({c4:t,wrap:e})=>{I9.setConf(t),iv.setWrap(e);},"init")};});function SK(t){return typeof t>"u"||t===null;}function oAe(t){return typeof t=="object"&&t!==null;}function lAe(t){return Array.isArray(t)?t:SK(t)?[]:[t];}function cAe(t,e){var r,n,i,a;if(e)for(a=Object.keys(e),r=0,n=a.length;r<n;r+=1)i=a[r],t[i]=e[i];return t;}function uAe(t,e){var r="",n;for(n=0;n<e;n+=1)r+=t;return r;}function hAe(t){return t===0&&Number.NEGATIVE_INFINITY===1/t;}function CK(t,e){var r="",n=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`

`+t.mark.snippet),n+" "+r):n;}function m2(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=CK(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"";}function O9(t,e,r,n,i){var a="",s="",l=Math.floor(i/2)-1;return n-e>l&&(a=" ... ",e=n-l+a.length),r-n>l&&(s=" ...",r=n+l-s.length),{str:a+t.slice(e,r).replace(/\t/g,"\u2192")+s,pos:n-e+a.length};}function P9(t,e){return $i.repeat(" ",e-t.length)+t;}function vAe(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],a,s=-1;a=r.exec(t.buffer);)i.push(a.index),n.push(a.index+a[0].length),t.position<=a.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var l="",u,h,f=Math.min(t.line+e.linesAfter,i.length).toString().length,d=e.maxLength-(e.indent+f+3);for(u=1;u<=e.linesBefore&&!(s-u<0);u++)h=O9(t.buffer,n[s-u],i[s-u],t.position-(n[s]-n[s-u]),d),l=$i.repeat(" ",e.indent)+P9((t.line-u+1).toString(),f)+" | "+h.str+`
`+l;for(h=O9(t.buffer,n[s],i[s],t.position,d),l+=$i.repeat(" ",e.indent)+P9((t.line+1).toString(),f)+" | "+h.str+`
`,l+=$i.repeat("-",e.indent+f+3+h.pos)+`^
`,u=1;u<=e.linesAfter&&!(s+u>=i.length);u++)h=O9(t.buffer,n[s+u],i[s+u],t.position-(n[s]-n[s+u]),d),l+=$i.repeat(" ",e.indent)+P9((t.line+u+1).toString(),f)+" | "+h.str+`
`;return l.replace(/\n$/,"");}function wAe(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r;});}),e;}function kAe(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(bAe.indexOf(r)===-1)throw new Ls('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.');}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0;},this.construct=e.construct||function(r){return r;},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=wAe(e.styleAliases||null),TAe.indexOf(this.kind)===-1)throw new Ls('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.');}function uK(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(a,s){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(i=s);}),r[i]=n;}),r;}function EAe(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i;}for(o(n,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return t;}function F9(t){return this.extend(t);}function LAe(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL");}function RAe(){return null;}function NAe(t){return t===null;}function IAe(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE");}function OAe(t){return t==="true"||t==="True"||t==="TRUE";}function PAe(t){return Object.prototype.toString.call(t)==="[object Boolean]";}function FAe(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102;}function $Ae(t){return 48<=t&&t<=55;}function zAe(t){return 48<=t&&t<=57;}function GAe(t){if(t===null)return!1;var e=t.length,r=0,n=!1,i;if(!e)return!1;if(i=t[r],(i==="-"||i==="+")&&(i=t[++r]),i==="0"){if(r+1===e)return!0;if(i=t[++r],i==="b"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0;}return n&&i!=="_";}if(i==="x"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!FAe(t.charCodeAt(r)))return!1;n=!0;}return n&&i!=="_";}if(i==="o"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!$Ae(t.charCodeAt(r)))return!1;n=!0;}return n&&i!=="_";}}if(i==="_")return!1;for(;r<e;r++)if(i=t[r],i!=="_"){if(!zAe(t.charCodeAt(r)))return!1;n=!0;}return!(!n||i==="_");}function VAe(t){var e=t,r=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8);}return r*parseInt(e,10);}function UAe(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!$i.isNegativeZero(t);}function qAe(t){return!(t===null||!WAe.test(t)||t[t.length-1]==="_");}function YAe(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10);}function jAe(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN";}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf";}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf";}else if($i.isNegativeZero(t))return"-0.0";return r=t.toString(10),XAe.test(r)?r.replace("e",".e"):r;}function KAe(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||$i.isNegativeZero(t));}function JAe(t){return t===null?!1:_K.exec(t)!==null||DK.exec(t)!==null;}function e8e(t){var e,r,n,i,a,s,l,u=0,h=null,f,d,p;if(e=_K.exec(t),e===null&&(e=DK.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(a=+e[4],s=+e[5],l=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u;}return e[9]&&(f=+e[10],d=+(e[11]||0),h=(f*60+d)*6e4,e[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,n,i,a,s,l,u)),h&&p.setTime(p.getTime()-h),p;}function t8e(t){return t.toISOString();}function n8e(t){return t==="<<"||t===null;}function a8e(t){if(t===null)return!1;var e,r,n=0,i=t.length,a=U9;for(r=0;r<i;r++)if(e=a.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;n+=6;}return n%8===0;}function s8e(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=U9,s=0,l=[];for(e=0;e<i;e++)e%4===0&&e&&(l.push(s>>16&255),l.push(s>>8&255),l.push(s&255)),s=s<<6|a.indexOf(n.charAt(e));return r=i%4*6,r===0?(l.push(s>>16&255),l.push(s>>8&255),l.push(s&255)):r===18?(l.push(s>>10&255),l.push(s>>2&255)):r===12&&l.push(s>>4&255),new Uint8Array(l);}function o8e(t){var e="",r=0,n,i,a=t.length,s=U9;for(n=0;n<a;n++)n%3===0&&n&&(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]),r=(r<<8)+t[n];return i=a%3,i===0?(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]):i===2?(e+=s[r>>10&63],e+=s[r>>4&63],e+=s[r<<2&63],e+=s[64]):i===1&&(e+=s[r>>2&63],e+=s[r<<4&63],e+=s[64],e+=s[64]),e;}function l8e(t){return Object.prototype.toString.call(t)==="[object Uint8Array]";}function f8e(t){if(t===null)return!0;var e=[],r,n,i,a,s,l=t;for(r=0,n=l.length;r<n;r+=1){if(i=l[r],s=!1,h8e.call(i)!=="[object Object]")return!1;for(a in i)if(u8e.call(i,a))if(!s)s=!0;else return!1;if(!s)return!1;if(e.indexOf(a)===-1)e.push(a);else return!1;}return!0;}function d8e(t){return t!==null?t:[];}function g8e(t){if(t===null)return!0;var e,r,n,i,a,s=t;for(a=new Array(s.length),e=0,r=s.length;e<r;e+=1){if(n=s[e],m8e.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;a[e]=[i[0],n[i[0]]];}return!0;}function y8e(t){if(t===null)return[];var e,r,n,i,a,s=t;for(a=new Array(s.length),e=0,r=s.length;e<r;e+=1)n=s[e],i=Object.keys(n),a[e]=[i[0],n[i[0]]];return a;}function b8e(t){if(t===null)return!0;var e,r=t;for(e in r)if(x8e.call(r,e)&&r[e]!==null)return!1;return!0;}function T8e(t){return t!==null?t:{};}function fK(t){return Object.prototype.toString.call(t);}function gc(t){return t===10||t===13;}function Id(t){return t===9||t===32;}function Rs(t){return t===9||t===32||t===10||t===13;}function fm(t){return t===44||t===91||t===93||t===123||t===125;}function A8e(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1);}function _8e(t){return t===120?2:t===117?4:t===85?8:0;}function D8e(t){return 48<=t&&t<=57?t-48:-1;}function dK(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?"	":t===110?`
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":"";}function L8e(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320);}function R8e(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||LK,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[];}function BK(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=xAe(r),new Ls(e,r);}function Zt(t,e){throw BK(t,e);}function LT(t,e){t.onWarning&&t.onWarning.call(null,BK(t,e));}function Vh(t,e,r,n){var i,a,s,l;if(e<r){if(l=t.input.slice(e,r),n)for(i=0,a=l.length;i<a;i+=1)s=l.charCodeAt(i),s===9||32<=s&&s<=1114111||Zt(t,"expected valid JSON character");else E8e.test(l)&&Zt(t,"the stream contains non-printable characters");t.result+=l;}}function mK(t,e,r,n){var i,a,s,l;for($i.isObject(r)||Zt(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),s=0,l=i.length;s<l;s+=1)a=i[s],Uh.call(e,a)||(e[a]=r[a],n[a]=!0);}function dm(t,e,r,n,i,a,s,l,u){var h,f;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),h=0,f=i.length;h<f;h+=1)Array.isArray(i[h])&&Zt(t,"nested arrays are not supported inside keys"),typeof i=="object"&&fK(i[h])==="[object Object]"&&(i[h]="[object Object]");if(typeof i=="object"&&fK(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),n==="tag:yaml.org,2002:merge"){if(Array.isArray(a))for(h=0,f=a.length;h<f;h+=1)mK(t,e,a[h],r);else mK(t,e,a,r);}else!t.json&&!Uh.call(r,i)&&Uh.call(e,i)&&(t.line=s||t.line,t.lineStart=l||t.lineStart,t.position=u||t.position,Zt(t,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[i]=a,delete r[i];return e;}function H9(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Zt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1;}function Ai(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);i!==0;){for(;Id(i);)i===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(gc(i))for(H9(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break;}return r!==-1&&n!==0&&t.lineIndent<r&&LT(t,"deficient indentation"),n;}function MT(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Rs(r)));}function W9(t,e){e===1?t.result+=" ":e>1&&(t.result+=$i.repeat(`
`,e-1));}function N8e(t,e,r){var n,i,a,s,l,u,h,f,d=t.kind,p=t.result,m;if(m=t.input.charCodeAt(t.position),Rs(m)||fm(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(i=t.input.charCodeAt(t.position+1),Rs(i)||r&&fm(i)))return!1;for(t.kind="scalar",t.result="",a=s=t.position,l=!1;m!==0;){if(m===58){if(i=t.input.charCodeAt(t.position+1),Rs(i)||r&&fm(i))break;}else if(m===35){if(n=t.input.charCodeAt(t.position-1),Rs(n))break;}else{if(t.position===t.lineStart&&MT(t)||r&&fm(m))break;if(gc(m))if(u=t.line,h=t.lineStart,f=t.lineIndent,Ai(t,!1,-1),t.lineIndent>=e){l=!0,m=t.input.charCodeAt(t.position);continue;}else{t.position=s,t.line=u,t.lineStart=h,t.lineIndent=f;break;}}l&&(Vh(t,a,s,!1),W9(t,t.line-u),a=s=t.position,l=!1),Id(m)||(s=t.position+1),m=t.input.charCodeAt(++t.position);}return Vh(t,a,s,!1),t.result?!0:(t.kind=d,t.result=p,!1);}function M8e(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39){if(Vh(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;}else gc(r)?(Vh(t,n,i,!0),W9(t,Ai(t,!1,e)),n=i=t.position):t.position===t.lineStart&&MT(t)?Zt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Zt(t,"unexpected end of the stream within a single quoted scalar");}function I8e(t,e){var r,n,i,a,s,l;if(l=t.input.charCodeAt(t.position),l!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(l=t.input.charCodeAt(t.position))!==0;){if(l===34)return Vh(t,r,t.position,!0),t.position++,!0;if(l===92){if(Vh(t,r,t.position,!0),l=t.input.charCodeAt(++t.position),gc(l))Ai(t,!1,e);else if(l<256&&OK[l])t.result+=PK[l],t.position++;else if((s=_8e(l))>0){for(i=s,a=0;i>0;i--)l=t.input.charCodeAt(++t.position),(s=A8e(l))>=0?a=(a<<4)+s:Zt(t,"expected hexadecimal character");t.result+=L8e(a),t.position++;}else Zt(t,"unknown escape sequence");r=n=t.position;}else gc(l)?(Vh(t,r,n,!0),W9(t,Ai(t,!1,e)),r=n=t.position):t.position===t.lineStart&&MT(t)?Zt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position);}Zt(t,"unexpected end of the stream within a double quoted scalar");}function O8e(t,e){var r=!0,n,i,a,s=t.tag,l,u=t.anchor,h,f,d,p,m,g=Object.create(null),y,v,x,b;if(b=t.input.charCodeAt(t.position),b===91)f=93,m=!1,l=[];else if(b===123)f=125,m=!0,l={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=l),b=t.input.charCodeAt(++t.position);b!==0;){if(Ai(t,!0,e),b=t.input.charCodeAt(t.position),b===f)return t.position++,t.tag=s,t.anchor=u,t.kind=m?"mapping":"sequence",t.result=l,!0;r?b===44&&Zt(t,"expected the node content, but found ','"):Zt(t,"missed comma between flow collection entries"),v=y=x=null,d=p=!1,b===63&&(h=t.input.charCodeAt(t.position+1),Rs(h)&&(d=p=!0,t.position++,Ai(t,!0,e))),n=t.line,i=t.lineStart,a=t.position,pm(t,e,_T,!1,!0),v=t.tag,y=t.result,Ai(t,!0,e),b=t.input.charCodeAt(t.position),(p||t.line===n)&&b===58&&(d=!0,b=t.input.charCodeAt(++t.position),Ai(t,!0,e),pm(t,e,_T,!1,!0),x=t.result),m?dm(t,l,g,v,y,x,n,i,a):d?l.push(dm(t,null,g,v,y,x,n,i,a)):l.push(y),Ai(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(r=!0,b=t.input.charCodeAt(++t.position)):r=!1;}Zt(t,"unexpected end of the stream within a flow collection");}function P8e(t,e){var r,n,i=B9,a=!1,s=!1,l=e,u=0,h=!1,f,d;if(d=t.input.charCodeAt(t.position),d===124)n=!1;else if(d===62)n=!0;else return!1;for(t.kind="scalar",t.result="";d!==0;)if(d=t.input.charCodeAt(++t.position),d===43||d===45)B9===i?i=d===43?hK:k8e:Zt(t,"repeat of a chomping mode identifier");else if((f=D8e(d))>=0)f===0?Zt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Zt(t,"repeat of an indentation width identifier"):(l=e+f-1,s=!0);else break;if(Id(d)){do d=t.input.charCodeAt(++t.position);while(Id(d));if(d===35)do d=t.input.charCodeAt(++t.position);while(!gc(d)&&d!==0);}for(;d!==0;){for(H9(t),t.lineIndent=0,d=t.input.charCodeAt(t.position);(!s||t.lineIndent<l)&&d===32;)t.lineIndent++,d=t.input.charCodeAt(++t.position);if(!s&&t.lineIndent>l&&(l=t.lineIndent),gc(d)){u++;continue;}if(t.lineIndent<l){i===hK?t.result+=$i.repeat(`
`,a?1+u:u):i===B9&&a&&(t.result+=`
`);break;}for(n?Id(d)?(h=!0,t.result+=$i.repeat(`
`,a?1+u:u)):h?(h=!1,t.result+=$i.repeat(`
`,u+1)):u===0?a&&(t.result+=" "):t.result+=$i.repeat(`
`,u):t.result+=$i.repeat(`
`,a?1+u:u),a=!0,s=!0,u=0,r=t.position;!gc(d)&&d!==0;)d=t.input.charCodeAt(++t.position);Vh(t,r,t.position,!1);}return!0;}function gK(t,e){var r,n=t.tag,i=t.anchor,a=[],s,l=!1,u;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),u=t.input.charCodeAt(t.position);u!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Zt(t,"tab characters must not be used in indentation")),!(u!==45||(s=t.input.charCodeAt(t.position+1),!Rs(s))));){if(l=!0,t.position++,Ai(t,!0,-1)&&t.lineIndent<=e){a.push(null),u=t.input.charCodeAt(t.position);continue;}if(r=t.line,pm(t,e,NK,!1,!0),a.push(t.result),Ai(t,!0,-1),u=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&u!==0)Zt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;}return l?(t.tag=n,t.anchor=i,t.kind="sequence",t.result=a,!0):!1;}function B8e(t,e,r){var n,i,a,s,l,u,h=t.tag,f=t.anchor,d={},p=Object.create(null),m=null,g=null,y=null,v=!1,x=!1,b;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=d),b=t.input.charCodeAt(t.position);b!==0;){if(!v&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Zt(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),a=t.line,(b===63||b===58)&&Rs(n))b===63?(v&&(dm(t,d,p,m,g,null,s,l,u),m=g=y=null),x=!0,v=!0,i=!0):v?(v=!1,i=!0):Zt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,b=n;else{if(s=t.line,l=t.lineStart,u=t.position,!pm(t,r,RK,!1,!0))break;if(t.line===a){for(b=t.input.charCodeAt(t.position);Id(b);)b=t.input.charCodeAt(++t.position);if(b===58)b=t.input.charCodeAt(++t.position),Rs(b)||Zt(t,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(dm(t,d,p,m,g,null,s,l,u),m=g=y=null),x=!0,v=!1,i=!1,m=t.tag,g=t.result;else if(x)Zt(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=h,t.anchor=f,!0;}else if(x)Zt(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=h,t.anchor=f,!0;}if((t.line===a||t.lineIndent>e)&&(v&&(s=t.line,l=t.lineStart,u=t.position),pm(t,e,DT,!0,i)&&(v?g=t.result:y=t.result),v||(dm(t,d,p,m,g,y,s,l,u),m=g=y=null),Ai(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&b!==0)Zt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break;}return v&&dm(t,d,p,m,g,null,s,l,u),x&&(t.tag=h,t.anchor=f,t.kind="mapping",t.result=d),x;}function F8e(t){var e,r=!1,n=!1,i,a,s;if(s=t.input.charCodeAt(t.position),s!==33)return!1;if(t.tag!==null&&Zt(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),s===60?(r=!0,s=t.input.charCodeAt(++t.position)):s===33?(n=!0,i="!!",s=t.input.charCodeAt(++t.position)):i="!",e=t.position,r){do s=t.input.charCodeAt(++t.position);while(s!==0&&s!==62);t.position<t.length?(a=t.input.slice(e,t.position),s=t.input.charCodeAt(++t.position)):Zt(t,"unexpected end of the stream within a verbatim tag");}else{for(;s!==0&&!Rs(s);)s===33&&(n?Zt(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),MK.test(i)||Zt(t,"named tag handle cannot contain such characters"),n=!0,e=t.position+1)),s=t.input.charCodeAt(++t.position);a=t.input.slice(e,t.position),C8e.test(a)&&Zt(t,"tag suffix cannot contain flow indicator characters");}a&&!IK.test(a)&&Zt(t,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a);}catch{Zt(t,"tag name is malformed: "+a);}return r?t.tag=a:Uh.call(t.tagMap,i)?t.tag=t.tagMap[i]+a:i==="!"?t.tag="!"+a:i==="!!"?t.tag="tag:yaml.org,2002:"+a:Zt(t,'undeclared tag handle "'+i+'"'),!0;}function $8e(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Zt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Rs(r)&&!fm(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Zt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0;}function z8e(t){var e,r,n;if(n=t.input.charCodeAt(t.position),n!==42)return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!Rs(n)&&!fm(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&Zt(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Uh.call(t.anchorMap,r)||Zt(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Ai(t,!0,-1),!0;}function pm(t,e,r,n,i){var a,s,l,u=1,h=!1,f=!1,d,p,m,g,y,v;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=s=l=DT===r||NK===r,n&&Ai(t,!0,-1)&&(h=!0,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)),u===1)for(;F8e(t)||$8e(t);)Ai(t,!0,-1)?(h=!0,l=a,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)):l=!1;if(l&&(l=h||i),(u===1||DT===r)&&(_T===r||RK===r?y=e:y=e+1,v=t.position-t.lineStart,u===1?l&&(gK(t,v)||B8e(t,v,y))||O8e(t,y)?f=!0:(s&&P8e(t,y)||M8e(t,y)||I8e(t,y)?f=!0:z8e(t)?(f=!0,(t.tag!==null||t.anchor!==null)&&Zt(t,"alias node should not have any properties")):N8e(t,y,_T===r)&&(f=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):u===0&&(f=l&&gK(t,v))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Zt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),d=0,p=t.implicitTypes.length;d<p;d+=1)if(g=t.implicitTypes[d],g.resolve(t.result)){t.result=g.construct(t.result),t.tag=g.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break;}}else if(t.tag!=="!"){if(Uh.call(t.typeMap[t.kind||"fallback"],t.tag))g=t.typeMap[t.kind||"fallback"][t.tag];else for(g=null,m=t.typeMap.multi[t.kind||"fallback"],d=0,p=m.length;d<p;d+=1)if(t.tag.slice(0,m[d].tag.length)===m[d].tag){g=m[d];break;}g||Zt(t,"unknown tag !<"+t.tag+">"),t.result!==null&&g.kind!==t.kind&&Zt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+g.kind+'", not "'+t.kind+'"'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Zt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag");}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||f;}function G8e(t){var e=t.position,r,n,i,a=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(Ai(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(a=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!Rs(s);)s=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&Zt(t,"directive name must not be less than one character in length");s!==0;){for(;Id(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!gc(s));break;}if(gc(s))break;for(r=t.position;s!==0&&!Rs(s);)s=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position));}s!==0&&H9(t),Uh.call(pK,n)?pK[n](t,n,i):LT(t,'unknown document directive "'+n+'"');}if(Ai(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Ai(t,!0,-1)):a&&Zt(t,"directives end mark is expected"),pm(t,t.lineIndent-1,DT,!1,!0),Ai(t,!0,-1),t.checkLineBreaks&&S8e.test(t.input.slice(e,t.position))&&LT(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&MT(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Ai(t,!0,-1));return;}if(t.position<t.length-1)Zt(t,"end of the stream or a document separator is expected");else return;}function FK(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new R8e(t,e),n=t.indexOf("\0");for(n!==-1&&(r.position=n,Zt(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;)G8e(r);return r.documents;}function V8e(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=FK(t,r);if(typeof e!="function")return n;for(var i=0,a=n.length;i<a;i+=1)e(n[i]);}function U8e(t,e){var r=FK(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new Ls("expected a single document in the stream, but found more");}}function u_e(t,e){var r,n,i,a,s,l,u;if(e===null)return{};for(r={},n=Object.keys(e),i=0,a=n.length;i<a;i+=1)s=n[i],l=String(e[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),u=t.compiledTypeMap.fallback[s],u&&GK.call(u.styleAliases,l)&&(l=u.styleAliases[l]),r[s]=l;return r;}function h_e(t){var e,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r="x",n=2;else if(t<=65535)r="u",n=4;else if(t<=4294967295)r="U",n=8;else throw new Ls("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+$i.repeat("0",n-e.length)+e;}function d_e(t){this.schema=t.schema||LK,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=$i.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=u_e(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?y2:f_e,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null;}function yK(t,e){for(var r=$i.repeat(" ",e),n=0,i=-1,a="",s,l=t.length;n<l;)i=t.indexOf(`
`,n),i===-1?(s=t.slice(n),n=l):(s=t.slice(n,i+1),n=i+1),s.length&&s!==`
`&&(a+=r),a+=s;return a;}function z9(t,e){return`
`+$i.repeat(" ",t.indent*e);}function p_e(t,e){var r,n,i;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(i=t.implicitTypes[r],i.resolve(e))return!0;return!1;}function NT(t){return t===X8e||t===q8e;}function v2(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==q9||65536<=t&&t<=1114111;}function vK(t){return v2(t)&&t!==q9&&t!==Y8e&&t!==g2;}function xK(t,e,r){var n=vK(t),i=n&&!NT(t);return(r?n:n&&t!==VK&&t!==UK&&t!==HK&&t!==WK&&t!==qK)&&t!==$9&&!(e===RT&&!i)||vK(e)&&!NT(e)&&t===$9||e===RT&&i;}function m_e(t){return v2(t)&&t!==q9&&!NT(t)&&t!==t_e&&t!==i_e&&t!==RT&&t!==VK&&t!==UK&&t!==HK&&t!==WK&&t!==qK&&t!==$9&&t!==Z8e&&t!==e_e&&t!==j8e&&t!==o_e&&t!==r_e&&t!==n_e&&t!==J8e&&t!==K8e&&t!==Q8e&&t!==a_e&&t!==s_e;}function g_e(t){return!NT(t)&&t!==RT;}function p2(t,e){var r=t.charCodeAt(e),n;return r>=55296&&r<=56319&&e+1<t.length&&(n=t.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r;}function YK(t){var e=/^\n* /;return e.test(t);}function y_e(t,e,r,n,i,a,s,l){var u,h=0,f=null,d=!1,p=!1,m=n!==-1,g=-1,y=m_e(p2(t,0))&&g_e(p2(t,t.length-1));if(e||s)for(u=0;u<t.length;h>=65536?u+=2:u++){if(h=p2(t,u),!v2(h))return hm;y=y&&xK(h,f,l),f=h;}else{for(u=0;u<t.length;h>=65536?u+=2:u++){if(h=p2(t,u),h===g2)d=!0,m&&(p=p||u-g-1>n&&t[g+1]!==" ",g=u);else if(!v2(h))return hm;y=y&&xK(h,f,l),f=h;}p=p||m&&u-g-1>n&&t[g+1]!==" ";}return!d&&!p?y&&!s&&!i(t)?XK:a===y2?hm:G9:r>9&&YK(t)?hm:s?a===y2?hm:G9:p?KK:jK;}function v_e(t,e,r,n,i){t.dump=function(){if(e.length===0)return t.quotingType===y2?'""':"''";if(!t.noCompatMode&&(l_e.indexOf(e)!==-1||c_e.test(e)))return t.quotingType===y2?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),l=n||t.flowLevel>-1&&r>=t.flowLevel;function u(h){return p_e(t,h);}switch(o(u,"testAmbiguity"),y_e(e,l,t.indent,s,u,t.quotingType,t.forceQuotes&&!n,i)){case XK:return e;case G9:return"'"+e.replace(/'/g,"''")+"'";case jK:return"|"+bK(e,t.indent)+TK(yK(e,a));case KK:return">"+bK(e,t.indent)+TK(yK(x_e(e,s),a));case hm:return'"'+b_e(e)+'"';default:throw new Ls("impossible error: invalid scalar style");}}();}function bK(t,e){var r=YK(t)?String(e):"",n=t[t.length-1]===`
`,i=n&&(t[t.length-2]===`
`||t===`
`),a=i?"+":n?"":"-";return r+a+`
`;}function TK(t){return t[t.length-1]===`
`?t.slice(0,-1):t;}function x_e(t,e){for(var r=/(\n+)([^\n]*)/g,n=function(){var h=t.indexOf(`
`);return h=h!==-1?h:t.length,r.lastIndex=h,wK(t.slice(0,h),e);}(),i=t[0]===`
`||t[0]===" ",a,s;s=r.exec(t);){var l=s[1],u=s[2];a=u[0]===" ",n+=l+(!i&&!a&&u!==""?`
`:"")+wK(u,e),i=a;}return n;}function wK(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,a,s=0,l=0,u="";n=r.exec(t);)l=n.index,l-i>e&&(a=s>i?s:l,u+=`
`+t.slice(i,a),i=a+1),s=l;return u+=`
`,t.length-i>e&&s>i?u+=t.slice(i,s)+`
`+t.slice(s+1):u+=t.slice(i),u.slice(1);}function b_e(t){for(var e="",r=0,n,i=0;i<t.length;r>=65536?i+=2:i++)r=p2(t,i),n=La[r],!n&&v2(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||h_e(r);return e;}function T_e(t,e,r){var n="",i=t.tag,a,s,l;for(a=0,s=r.length;a<s;a+=1)l=r[a],t.replacer&&(l=t.replacer.call(r,String(a),l)),(Du(t,e,l,!1,!1)||typeof l>"u"&&Du(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]";}function kK(t,e,r,n){var i="",a=t.tag,s,l,u;for(s=0,l=r.length;s<l;s+=1)u=r[s],t.replacer&&(u=t.replacer.call(r,String(s),u)),(Du(t,e+1,u,!0,!0,!1,!0)||typeof u>"u"&&Du(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=z9(t,e)),t.dump&&g2===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=a,t.dump=i||"[]";}function w_e(t,e,r){var n="",i=t.tag,a=Object.keys(r),s,l,u,h,f;for(s=0,l=a.length;s<l;s+=1)f="",n!==""&&(f+=", "),t.condenseFlow&&(f+='"'),u=a[s],h=r[u],t.replacer&&(h=t.replacer.call(r,u,h)),Du(t,e,u,!1,!1)&&(t.dump.length>1024&&(f+="? "),f+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Du(t,e,h,!1,!1)&&(f+=t.dump,n+=f));t.tag=i,t.dump="{"+n+"}";}function k_e(t,e,r,n){var i="",a=t.tag,s=Object.keys(r),l,u,h,f,d,p;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new Ls("sortKeys must be a boolean or a function");for(l=0,u=s.length;l<u;l+=1)p="",(!n||i!=="")&&(p+=z9(t,e)),h=s[l],f=r[h],t.replacer&&(f=t.replacer.call(r,h,f)),Du(t,e+1,h,!0,!0,!0)&&(d=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,d&&(t.dump&&g2===t.dump.charCodeAt(0)?p+="?":p+="? "),p+=t.dump,d&&(p+=z9(t,e)),Du(t,e+1,f,!0,d)&&(t.dump&&g2===t.dump.charCodeAt(0)?p+=":":p+=": ",p+=t.dump,i+=p));t.tag=a,t.dump=i||"{}";}function EK(t,e,r){var n,i,a,s,l,u;for(i=r?t.explicitTypes:t.implicitTypes,a=0,s=i.length;a<s;a+=1)if(l=i[a],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof e=="object"&&e instanceof l.instanceOf)&&(!l.predicate||l.predicate(e))){if(r?l.multi&&l.representName?t.tag=l.representName(e):t.tag=l.tag:t.tag="?",l.represent){if(u=t.styleMap[l.tag]||l.defaultStyle,zK.call(l.represent)==="[object Function]")n=l.represent(e,u);else if(GK.call(l.represent,u))n=l.represent[u](e,u);else throw new Ls("!<"+l.tag+'> tag resolver accepts not "'+u+'" style');t.dump=n;}return!0;}return!1;}function Du(t,e,r,n,i,a,s){t.tag=null,t.dump=r,EK(t,r,!1)||EK(t,r,!0);var l=zK.call(t.dump),u=n,h;n&&(n=t.flowLevel<0||t.flowLevel>e);var f=l==="[object Object]"||l==="[object Array]",d,p;if(f&&(d=t.duplicates.indexOf(r),p=d!==-1),(t.tag!==null&&t.tag!=="?"||p||t.indent!==2&&e>0)&&(i=!1),p&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(f&&p&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),l==="[object Object]")n&&Object.keys(t.dump).length!==0?(k_e(t,e,t.dump,i),p&&(t.dump="&ref_"+d+t.dump)):(w_e(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(l==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?kK(t,e-1,t.dump,i):kK(t,e,t.dump,i),p&&(t.dump="&ref_"+d+t.dump)):(T_e(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(l==="[object String]")t.tag!=="?"&&v_e(t,t.dump,e,a,u);else{if(l==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Ls("unacceptable kind of an object to dump "+l);}t.tag!==null&&t.tag!=="?"&&(h=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",t.dump=h+" "+t.dump);}return!0;}function E_e(t,e){var r=[],n=[],i,a;for(V9(t,r,n),i=0,a=n.length;i<a;i+=1)e.duplicates.push(r[n[i]]);e.usedDuplicates=new Array(a);}function V9(t,e,r){var n,i,a;if(t!==null&&typeof t=="object")if(i=e.indexOf(t),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)V9(t[i],e,r);else for(n=Object.keys(t),i=0,a=n.length;i<a;i+=1)V9(t[n[i]],e,r);}function S_e(t,e){e=e||{};var r=new d_e(e);r.noRefs||E_e(t,r);var n=t;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Du(r,0,n,!0,!0)?r.dump+`
`:"";}function Y9(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.");};}var fAe,dAe,pAe,mAe,gAe,yAe,$i,Ls,xAe,bAe,TAe,Da,SAe,CAe,AAe,_Ae,DAe,MAe,BAe,HAe,WAe,XAe,QAe,AK,ZAe,_K,DK,r8e,i8e,U9,c8e,u8e,h8e,p8e,m8e,v8e,x8e,w8e,LK,Uh,_T,RK,NK,DT,B9,k8e,hK,E8e,S8e,C8e,MK,IK,OK,PK,Md,pK,H8e,W8e,$K,zK,GK,q9,q8e,g2,Y8e,X8e,j8e,K8e,$9,Q8e,Z8e,J8e,e_e,VK,t_e,RT,r_e,n_e,i_e,a_e,UK,HK,s_e,WK,o_e,qK,La,l_e,c_e,f_e,y2,XK,G9,jK,KK,hm,C_e,A_e,mm,gm,_St,DSt,LSt,RSt,NSt,IT=N(()=>{"use strict";o(SK,"isNothing");o(oAe,"isObject");o(lAe,"toArray");o(cAe,"extend");o(uAe,"repeat");o(hAe,"isNegativeZero");fAe=SK,dAe=oAe,pAe=lAe,mAe=uAe,gAe=hAe,yAe=cAe,$i={isNothing:fAe,isObject:dAe,toArray:pAe,repeat:mAe,isNegativeZero:gAe,extend:yAe};o(CK,"formatError");o(m2,"YAMLException$1");m2.prototype=Object.create(Error.prototype);m2.prototype.constructor=m2;m2.prototype.toString=o(function(e){return this.name+": "+CK(this,e);},"toString");Ls=m2;o(O9,"getLine");o(P9,"padStart");o(vAe,"makeSnippet");xAe=vAe,bAe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],TAe=["scalar","sequence","mapping"];o(wAe,"compileStyleAliases");o(kAe,"Type$1");Da=kAe;o(uK,"compileList");o(EAe,"compileMap");o(F9,"Schema$1");F9.prototype.extend=o(function(e){var r=[],n=[];if(e instanceof Da)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new Ls("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Da))throw new Ls("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Ls("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Ls("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");}),n.forEach(function(a){if(!(a instanceof Da))throw new Ls("Specified list of YAML types (or a single Type object) contains a non-Type object.");});var i=Object.create(F9.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=uK(i,"implicit"),i.compiledExplicit=uK(i,"explicit"),i.compiledTypeMap=EAe(i.compiledImplicit,i.compiledExplicit),i;},"extend");SAe=F9,CAe=new Da("tag:yaml.org,2002:str",{kind:"scalar",construct:o(function(t){return t!==null?t:"";},"construct")}),AAe=new Da("tag:yaml.org,2002:seq",{kind:"sequence",construct:o(function(t){return t!==null?t:[];},"construct")}),_Ae=new Da("tag:yaml.org,2002:map",{kind:"mapping",construct:o(function(t){return t!==null?t:{};},"construct")}),DAe=new SAe({explicit:[CAe,AAe,_Ae]});o(LAe,"resolveYamlNull");o(RAe,"constructYamlNull");o(NAe,"isNull");MAe=new Da("tag:yaml.org,2002:null",{kind:"scalar",resolve:LAe,construct:RAe,predicate:NAe,represent:{canonical:o(function(){return"~";},"canonical"),lowercase:o(function(){return"null";},"lowercase"),uppercase:o(function(){return"NULL";},"uppercase"),camelcase:o(function(){return"Null";},"camelcase"),empty:o(function(){return"";},"empty")},defaultStyle:"lowercase"});o(IAe,"resolveYamlBoolean");o(OAe,"constructYamlBoolean");o(PAe,"isBoolean");BAe=new Da("tag:yaml.org,2002:bool",{kind:"scalar",resolve:IAe,construct:OAe,predicate:PAe,represent:{lowercase:o(function(t){return t?"true":"false";},"lowercase"),uppercase:o(function(t){return t?"TRUE":"FALSE";},"uppercase"),camelcase:o(function(t){return t?"True":"False";},"camelcase")},defaultStyle:"lowercase"});o(FAe,"isHexCode");o($Ae,"isOctCode");o(zAe,"isDecCode");o(GAe,"resolveYamlInteger");o(VAe,"constructYamlInteger");o(UAe,"isInteger");HAe=new Da("tag:yaml.org,2002:int",{kind:"scalar",resolve:GAe,construct:VAe,predicate:UAe,represent:{binary:o(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1);},"binary"),octal:o(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1);},"octal"),decimal:o(function(t){return t.toString(10);},"decimal"),hexadecimal:o(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1);},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),WAe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");o(qAe,"resolveYamlFloat");o(YAe,"constructYamlFloat");XAe=/^[-+]?[0-9]+e/;o(jAe,"representYamlFloat");o(KAe,"isFloat");QAe=new Da("tag:yaml.org,2002:float",{kind:"scalar",resolve:qAe,construct:YAe,predicate:KAe,represent:jAe,defaultStyle:"lowercase"}),AK=DAe.extend({implicit:[MAe,BAe,HAe,QAe]}),ZAe=AK,_K=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),DK=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");o(JAe,"resolveYamlTimestamp");o(e8e,"constructYamlTimestamp");o(t8e,"representYamlTimestamp");r8e=new Da("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:JAe,construct:e8e,instanceOf:Date,represent:t8e});o(n8e,"resolveYamlMerge");i8e=new Da("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n8e}),U9=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;o(a8e,"resolveYamlBinary");o(s8e,"constructYamlBinary");o(o8e,"representYamlBinary");o(l8e,"isBinary");c8e=new Da("tag:yaml.org,2002:binary",{kind:"scalar",resolve:a8e,construct:s8e,predicate:l8e,represent:o8e}),u8e=Object.prototype.hasOwnProperty,h8e=Object.prototype.toString;o(f8e,"resolveYamlOmap");o(d8e,"constructYamlOmap");p8e=new Da("tag:yaml.org,2002:omap",{kind:"sequence",resolve:f8e,construct:d8e}),m8e=Object.prototype.toString;o(g8e,"resolveYamlPairs");o(y8e,"constructYamlPairs");v8e=new Da("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:g8e,construct:y8e}),x8e=Object.prototype.hasOwnProperty;o(b8e,"resolveYamlSet");o(T8e,"constructYamlSet");w8e=new Da("tag:yaml.org,2002:set",{kind:"mapping",resolve:b8e,construct:T8e}),LK=ZAe.extend({implicit:[r8e,i8e],explicit:[c8e,p8e,v8e,w8e]}),Uh=Object.prototype.hasOwnProperty,_T=1,RK=2,NK=3,DT=4,B9=1,k8e=2,hK=3,E8e=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S8e=/[\x85\u2028\u2029]/,C8e=/[,\[\]\{\}]/,MK=/^(?:!|!!|![a-z\-]+!)$/i,IK=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;o(fK,"_class");o(gc,"is_EOL");o(Id,"is_WHITE_SPACE");o(Rs,"is_WS_OR_EOL");o(fm,"is_FLOW_INDICATOR");o(A8e,"fromHexCode");o(_8e,"escapedHexLen");o(D8e,"fromDecimalCode");o(dK,"simpleEscapeSequence");o(L8e,"charFromCodepoint");OK=new Array(256),PK=new Array(256);for(Md=0;Md<256;Md++)OK[Md]=dK(Md)?1:0,PK[Md]=dK(Md);o(R8e,"State$1");o(BK,"generateError");o(Zt,"throwError");o(LT,"throwWarning");pK={YAML:o(function(e,r,n){var i,a,s;e.version!==null&&Zt(e,"duplication of %YAML directive"),n.length!==1&&Zt(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&Zt(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),s=parseInt(i[2],10),a!==1&&Zt(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&LT(e,"unsupported YAML version of the document");},"handleYamlDirective"),TAG:o(function(e,r,n){var i,a;n.length!==2&&Zt(e,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],MK.test(i)||Zt(e,"ill-formed tag handle (first argument) of the TAG directive"),Uh.call(e.tagMap,i)&&Zt(e,'there is a previously declared suffix for "'+i+'" tag handle'),IK.test(a)||Zt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a);}catch{Zt(e,"tag prefix is malformed: "+a);}e.tagMap[i]=a;},"handleTagDirective")};o(Vh,"captureSegment");o(mK,"mergeMappings");o(dm,"storeMappingPair");o(H9,"readLineBreak");o(Ai,"skipSeparationSpace");o(MT,"testDocumentSeparator");o(W9,"writeFoldedLines");o(N8e,"readPlainScalar");o(M8e,"readSingleQuotedScalar");o(I8e,"readDoubleQuotedScalar");o(O8e,"readFlowCollection");o(P8e,"readBlockScalar");o(gK,"readBlockSequence");o(B8e,"readBlockMapping");o(F8e,"readTagProperty");o($8e,"readAnchorProperty");o(z8e,"readAlias");o(pm,"composeNode");o(G8e,"readDocument");o(FK,"loadDocuments");o(V8e,"loadAll$1");o(U8e,"load$1");H8e=V8e,W8e=U8e,$K={loadAll:H8e,load:W8e},zK=Object.prototype.toString,GK=Object.prototype.hasOwnProperty,q9=65279,q8e=9,g2=10,Y8e=13,X8e=32,j8e=33,K8e=34,$9=35,Q8e=37,Z8e=38,J8e=39,e_e=42,VK=44,t_e=45,RT=58,r_e=61,n_e=62,i_e=63,a_e=64,UK=91,HK=93,s_e=96,WK=123,o_e=124,qK=125,La={};La[0]="\\0";La[7]="\\a";La[8]="\\b";La[9]="\\t";La[10]="\\n";La[11]="\\v";La[12]="\\f";La[13]="\\r";La[27]="\\e";La[34]='\\"';La[92]="\\\\";La[133]="\\N";La[160]="\\_";La[8232]="\\L";La[8233]="\\P";l_e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],c_e=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;o(u_e,"compileStyleMap");o(h_e,"encodeHex");f_e=1,y2=2;o(d_e,"State");o(yK,"indentString");o(z9,"generateNextLine");o(p_e,"testImplicitResolving");o(NT,"isWhitespace");o(v2,"isPrintable");o(vK,"isNsCharOrWhitespace");o(xK,"isPlainSafe");o(m_e,"isPlainSafeFirst");o(g_e,"isPlainSafeLast");o(p2,"codePointAt");o(YK,"needIndentIndicator");XK=1,G9=2,jK=3,KK=4,hm=5;o(y_e,"chooseScalarStyle");o(v_e,"writeScalar");o(bK,"blockHeader");o(TK,"dropEndingNewline");o(x_e,"foldString");o(wK,"foldLine");o(b_e,"escapeString");o(T_e,"writeFlowSequence");o(kK,"writeBlockSequence");o(w_e,"writeFlowMapping");o(k_e,"writeBlockMapping");o(EK,"detectType");o(Du,"writeNode");o(E_e,"getDuplicateReferences");o(V9,"inspectNode");o(S_e,"dump$1");C_e=S_e,A_e={dump:C_e};o(Y9,"renamed");mm=AK,gm=$K.load,_St=$K.loadAll,DSt=A_e.dump,LSt=Y9("safeLoad","load"),RSt=Y9("safeLoadAll","loadAll"),NSt=Y9("safeDump","dump");});function Z9(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};}function rQ(t){Pd=t;}function rn(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:o((i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(rs.caret,"$1"),r=r.replace(i,s),n;},"replace"),getRegex:o(()=>new RegExp(r,e),"getRegex")};return n;}function yc(t,e){if(e){if(rs.escapeTest.test(t))return t.replace(rs.escapeReplace,ZK);}else if(rs.escapeTestNoEncode.test(t))return t.replace(rs.escapeReplaceNoEncode,ZK);return t;}function JK(t){try{t=encodeURI(t).replace(rs.percentDecode,"%");}catch{return null;}return t;}function eQ(t,e){var _n$at;let r=t.replace(rs.findPipe,(a,s,l)=>{let u=!1,h=s;for(;--h>=0&&l[h]==="\\";)u=!u;return u?"|":" |";}),n=r.split(rs.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!((_n$at=n.at(-1))!==null&&_n$at!==void 0&&_n$at.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(rs.slashPipe,"|");return n;}function b2(t,e,r){let n=t.length;if(n===0)return"";let i=0;for(;i<n;){let a=t.charAt(n-i-1);if(a===e&&!r)i++;else if(a!==e&&r)i++;else break;}return t.slice(0,n-i);}function oDe(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1;}function tQ(t,e,r,n,i){let a=e.href,s=e.title||null,l=t[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,u;}function lDe(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let i=n[1];return e.split(`
`).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[l]=s;return l.length>=i.length?a.slice(i.length):a;}).join(`
`);}function Zr(t,e){return Od.parse(t,e);}var Pd,T2,rs,__e,D_e,L_e,w2,R_e,J9,nQ,iQ,N_e,eL,M_e,tL,I_e,O_e,zT,rL,P_e,aQ,B_e,nL,QK,F_e,$_e,z_e,G_e,sQ,V_e,GT,iL,oQ,U_e,lQ,H_e,W_e,q_e,cQ,Y_e,X_e,uQ,j_e,K_e,Q_e,Z_e,J_e,eDe,tDe,BT,rDe,hQ,fQ,nDe,aL,iDe,j9,aDe,OT,x2,sDe,ZK,FT,Lu,$T,sL,Ru,PT,cDe,Od,ISt,OSt,PSt,BSt,FSt,$St,zSt,dQ=N(()=>{"use strict";var _Class30,_K2,_Class31,_Class32,_Q2,_Class33,_Class34;o(Z9,"M");Pd=Z9();o(rQ,"H");T2={exec:o(()=>null,"exec")};o(rn,"h");rs={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:o(t=>new RegExp(`^( {0,3}${t})((?:[	 ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:o(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:o(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:o(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:o(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),"headingBeginRegex"),htmlBeginRegex:o(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},__e=/^(?:[ \t]*(?:\n|$))+/,D_e=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,L_e=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,w2=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,R_e=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,J9=/(?:[*+-]|\d{1,9}[.)])/,nQ=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,iQ=rn(nQ).replace(/bull/g,J9).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),N_e=rn(nQ).replace(/bull/g,J9).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),eL=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,M_e=/^[^\n]+/,tL=/(?!\s*\])(?:\\.|[^\[\]\\])+/,I_e=rn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",tL).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),O_e=rn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,J9).getRegex(),zT="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",rL=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,P_e=rn("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$))","i").replace("comment",rL).replace("tag",zT).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),aQ=rn(eL).replace("hr",w2).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zT).getRegex(),B_e=rn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",aQ).getRegex(),nL={blockquote:B_e,code:D_e,def:I_e,fences:L_e,heading:R_e,hr:w2,html:P_e,lheading:iQ,list:O_e,newline:__e,paragraph:aQ,table:T2,text:M_e},QK=rn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",w2).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}	)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zT).getRegex(),F_e={...nL,lheading:N_e,table:QK,paragraph:rn(eL).replace("hr",w2).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",QK).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zT).getRegex()},$_e={...nL,html:rn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",rL).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:T2,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:rn(eL).replace("hr",w2).replace("heading",` *#{1,6} *[^
]`).replace("lheading",iQ).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},z_e=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,G_e=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,sQ=/^( {2,}|\\)\n(?!\s*$)/,V_e=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,GT=/[\p{P}\p{S}]/u,iL=/[\s\p{P}\p{S}]/u,oQ=/[^\s\p{P}\p{S}]/u,U_e=rn(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,iL).getRegex(),lQ=/(?!~)[\p{P}\p{S}]/u,H_e=/(?!~)[\s\p{P}\p{S}]/u,W_e=/(?:[^\s\p{P}\p{S}]|~)/u,q_e=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,cQ=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Y_e=rn(cQ,"u").replace(/punct/g,GT).getRegex(),X_e=rn(cQ,"u").replace(/punct/g,lQ).getRegex(),uQ="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",j_e=rn(uQ,"gu").replace(/notPunctSpace/g,oQ).replace(/punctSpace/g,iL).replace(/punct/g,GT).getRegex(),K_e=rn(uQ,"gu").replace(/notPunctSpace/g,W_e).replace(/punctSpace/g,H_e).replace(/punct/g,lQ).getRegex(),Q_e=rn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,oQ).replace(/punctSpace/g,iL).replace(/punct/g,GT).getRegex(),Z_e=rn(/\\(punct)/,"gu").replace(/punct/g,GT).getRegex(),J_e=rn(/^<(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(),eDe=rn(rL).replace("(?:-->|$)","-->").getRegex(),tDe=rn("^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",eDe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),BT=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,rDe=rn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",BT).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),hQ=rn(/^!?\[(label)\]\[(ref)\]/).replace("label",BT).replace("ref",tL).getRegex(),fQ=rn(/^!?\[(ref)\](?:\[\])?/).replace("ref",tL).getRegex(),nDe=rn("reflink|nolink(?!\\()","g").replace("reflink",hQ).replace("nolink",fQ).getRegex(),aL={_backpedal:T2,anyPunctuation:Z_e,autolink:J_e,blockSkip:q_e,br:sQ,code:G_e,del:T2,emStrongLDelim:Y_e,emStrongRDelimAst:j_e,emStrongRDelimUnd:Q_e,escape:z_e,link:rDe,nolink:fQ,punctuation:U_e,reflink:hQ,reflinkSearch:nDe,tag:tDe,text:V_e,url:T2},iDe={...aL,link:rn(/^!?\[(label)\]\((.*?)\)/).replace("label",BT).getRegex(),reflink:rn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",BT).getRegex()},j9={...aL,emStrongRDelimAst:K_e,emStrongLDelim:X_e,url:rn(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},aDe={...j9,br:rn(sQ).replace("{2,}","*").getRegex(),text:rn(j9.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},OT={normal:nL,gfm:F_e,pedantic:$_e},x2={normal:aL,gfm:j9,breaks:aDe,pedantic:iDe},sDe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ZK=o(t=>sDe[t],"ge");o(yc,"R");o(JK,"J");o(eQ,"V");o(b2,"A");o(oDe,"fe");o(tQ,"de");o(lDe,"Je");FT=(_Class30=class FT{constructor(t){this.options=t||Pd;}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]};}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:b2(r,`
`)};}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],n=lDe(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n};}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let n=b2(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim());}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)};}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:b2(e[0],`
`)};}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=b2(e[0],`
`).split(`
`),n="",i="",a=[];for(;r.length>0;){let s=!1,l=[],u;for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))l.push(r[u]),s=!0;else if(!s)l.push(r[u]);else break;r=r.slice(u);let h=l.join(`
`),f=h.replace(this.rules.other.blockquoteSetextReplace,`
    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
${h}`:h,i=i?`${i}
${f}`:f;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,a,!0),this.lexer.state.top=d,r.length===0)break;let p=a.at(-1);if((p===null||p===void 0?void 0:p.type)==="code")break;if((p===null||p===void 0?void 0:p.type)==="blockquote"){let m=p,g=m.raw+`
`+r.join(`
`),y=this.blockquote(g);a[a.length-1]=y,n=n.substring(0,n.length-m.raw.length)+y.raw,i=i.substring(0,i.length-m.text.length)+y.text;break;}else if((p===null||p===void 0?void 0:p.type)==="list"){let m=p,g=m.raw+`
`+r.join(`
`),y=this.list(g);a[a.length-1]=y,n=n.substring(0,n.length-p.raw.length)+y.raw,i=i.substring(0,i.length-m.raw.length)+y.raw,r=g.substring(a.at(-1).raw.length).split(`
`);continue;}}return{type:"blockquote",raw:n,tokens:a,text:i};}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;t;){let u=!1,h="",f="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;h=e[0],t=t.substring(h.length);let d=e[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,x=>" ".repeat(3*x.length)),p=t.split(`
`,1)[0],m=!d.trim(),g=0;if(this.options.pedantic?(g=2,f=d.trimStart()):m?g=e[1].length+1:(g=e[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,f=d.slice(g),g+=e[1].length),m&&this.rules.other.blankLine.test(p)&&(h+=p+`
`,t=t.substring(p.length+1),u=!0),!u){let x=this.rules.other.nextBulletRegex(g),b=this.rules.other.hrRegex(g),T=this.rules.other.fencesBeginRegex(g),C=this.rules.other.headingBeginRegex(g),w=this.rules.other.htmlBeginRegex(g);for(;t;){let E=t.split(`
`,1)[0],_;if(p=E,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting,"  "),_=p):_=p.replace(this.rules.other.tabCharGlobal,"    "),T.test(p)||C.test(p)||w.test(p)||x.test(p)||b.test(p))break;if(_.search(this.rules.other.nonSpaceChar)>=g||!p.trim())f+=`
`+_.slice(g);else{if(m||d.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||T.test(d)||C.test(d)||b.test(d))break;f+=`
`+p;}!m&&!p.trim()&&(m=!0),h+=E+`
`,t=t.substring(E.length+1),d=_.slice(g);}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(s=!0));let y=null,v;this.options.gfm&&(y=this.rules.other.listIsTask.exec(f),y&&(v=y[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:h,task:!!y,checked:v,loose:!1,text:f,tokens:[]}),i.raw+=h;}let l=i.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let u=0;u<i.items.length;u++)if(this.lexer.state.top=!1,i.items[u].tokens=this.lexer.blockTokens(i.items[u].text,[]),!i.loose){let h=i.items[u].tokens.filter(d=>d.type==="space"),f=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));i.loose=f;}if(i.loose)for(let u=0;u<i.items.length;u++)i.items[u].loose=!0;return i;}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]};}def(t){let e=this.rules.block.def.exec(t);if(e){let r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:n,title:i};}}table(t){var _e$;let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=eQ(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(_e$=e[3])!==null&&_e$!==void 0&&_e$.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let s of n)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<r.length;s++)a.header.push({text:r[s],tokens:this.lexer.inline(r[s]),header:!0,align:a.align[s]});for(let s of i)a.rows.push(eQ(s,a.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[u]})));return a;}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])};}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)};}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])};}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]};}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]};}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let a=b2(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return;}else{let a=oDe(e[2],"()");if(a===-2)return;if(a>-1){let s=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,s).trim(),e[3]="";}}let n=e[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],i=a[3]);}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),tQ(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules);}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[n.toLowerCase()];if(!i){let a=r[0].charAt(0);return{type:"text",raw:a,text:a};}return tQ(r,i,r[0],this.lexer,this.rules);}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,a,s,l=i,u=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*t.length+i);(n=h.exec(e))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(s=[...a].length,n[3]||n[4]){l+=s;continue;}else if((n[5]||n[6])&&i%3&&!((i+s)%3)){u+=s;continue;}if(l-=s,l>0)continue;s=Math.min(s,s+l+u);let f=[...n[0]][0].length,d=t.slice(0,i+n.index+f+s);if(Math.min(i,s)%2){let m=d.slice(1,-1);return{type:"em",raw:d,text:m,tokens:this.lexer.inlineTokens(m)};}let p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)};}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r};}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]};}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])};}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]};}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let r,n;if(e[2]==="@")r=e[0],n="mailto:"+r;else{let i;do{var _this$rules$inline$_b,_this$rules$inline$_b2;i=e[0],e[0]=(_this$rules$inline$_b=(_this$rules$inline$_b2=this.rules.inline._backpedal.exec(e[0]))===null||_this$rules$inline$_b2===void 0?void 0:_this$rules$inline$_b2[0])!==null&&_this$rules$inline$_b!==void 0?_this$rules$inline$_b:"";}while(i!==e[0]);r=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0];}return{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]};}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r};}}},o(_Class30,"S"),_Class30),Lu=(_K2=class K9{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Pd,this.options.tokenizer=this.options.tokenizer||new FT(),this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:rs,block:OT.normal,inline:x2.normal};this.options.pedantic?(r.block=OT.pedantic,r.inline=x2.pedantic):this.options.gfm&&(r.block=OT.gfm,this.options.breaks?r.inline=x2.breaks:r.inline=x2.gfm),this.tokenizer.rules=r;}static get rules(){return{block:OT,inline:x2};}static lex(e,r){return new K9(r).lex(e);}static lexInline(e,r){return new K9(r).inlineTokens(e);}lex(e){e=e.replace(rs.carriageReturn,`
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens);}return this.inlineQueue=[],this.tokens;}blockTokens(e,r=[],n=!1){for(this.options.pedantic&&(e=e.replace(rs.tabCharGlobal,"    ").replace(rs.spaceLine,""));e;){var _this$options$extensi,_this$options$extensi2;let i;if((_this$options$extensi=this.options.extensions)!==null&&_this$options$extensi!==void 0&&(_this$options$extensi=_this$options$extensi.block)!==null&&_this$options$extensi!==void 0&&_this$options$extensi.some(s=>(i=s.call({lexer:this},e,r))?(e=e.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let s=r.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
`:r.push(i);continue;}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let s=r.at(-1);(s===null||s===void 0?void 0:s.type)==="paragraph"||(s===null||s===void 0?void 0:s.type)==="text"?(s.raw+=`
`+i.raw,s.text+=`
`+i.text,this.inlineQueue.at(-1).src=s.text):r.push(i);continue;}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),r.push(i);continue;}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),r.push(i);continue;}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),r.push(i);continue;}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),r.push(i);continue;}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),r.push(i);continue;}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),r.push(i);continue;}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let s=r.at(-1);(s===null||s===void 0?void 0:s.type)==="paragraph"||(s===null||s===void 0?void 0:s.type)==="text"?(s.raw+=`
`+i.raw,s.text+=`
`+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue;}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),r.push(i);continue;}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),r.push(i);continue;}let a=e;if((_this$options$extensi2=this.options.extensions)!==null&&_this$options$extensi2!==void 0&&_this$options$extensi2.startBlock){let s=1/0,l=e.slice(1),u;this.options.extensions.startBlock.forEach(h=>{u=h.call({lexer:this},l),typeof u=="number"&&u>=0&&(s=Math.min(s,u));}),s<1/0&&s>=0&&(a=e.substring(0,s+1));}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let s=r.at(-1);n&&(s===null||s===void 0?void 0:s.type)==="paragraph"?(s.raw+=`
`+i.raw,s.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue;}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let s=r.at(-1);(s===null||s===void 0?void 0:s.type)==="text"?(s.raw+=`
`+i.raw,s.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i);continue;}if(e){let s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break;}else throw new Error(s);}}return this.state.top=!0,r;}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r;}inlineTokens(e,r=[]){let n=e,i=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)l.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,s="";for(;e;){var _this$options$extensi3,_this$options$extensi4;a||(s=""),a=!1;let l;if((_this$options$extensi3=this.options.extensions)!==null&&_this$options$extensi3!==void 0&&(_this$options$extensi3=_this$options$extensi3.inline)!==null&&_this$options$extensi3!==void 0&&_this$options$extensi3.some(h=>(l=h.call({lexer:this},e,r))?(e=e.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(e)){e=e.substring(l.raw.length),r.push(l);continue;}if(l=this.tokenizer.tag(e)){e=e.substring(l.raw.length),r.push(l);continue;}if(l=this.tokenizer.link(e)){e=e.substring(l.raw.length),r.push(l);continue;}if(l=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&(h===null||h===void 0?void 0:h.type)==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue;}if(l=this.tokenizer.emStrong(e,n,s)){e=e.substring(l.raw.length),r.push(l);continue;}if(l=this.tokenizer.codespan(e)){e=e.substring(l.raw.length),r.push(l);continue;}if(l=this.tokenizer.br(e)){e=e.substring(l.raw.length),r.push(l);continue;}if(l=this.tokenizer.del(e)){e=e.substring(l.raw.length),r.push(l);continue;}if(l=this.tokenizer.autolink(e)){e=e.substring(l.raw.length),r.push(l);continue;}if(!this.state.inLink&&(l=this.tokenizer.url(e))){e=e.substring(l.raw.length),r.push(l);continue;}let u=e;if((_this$options$extensi4=this.options.extensions)!==null&&_this$options$extensi4!==void 0&&_this$options$extensi4.startInline){let h=1/0,f=e.slice(1),d;this.options.extensions.startInline.forEach(p=>{d=p.call({lexer:this},f),typeof d=="number"&&d>=0&&(h=Math.min(h,d));}),h<1/0&&h>=0&&(u=e.substring(0,h+1));}if(l=this.tokenizer.inlineText(u)){e=e.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(s=l.raw.slice(-1)),a=!0;let h=r.at(-1);(h===null||h===void 0?void 0:h.type)==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue;}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break;}else throw new Error(h);}}return r;}},o(_K2,"a"),_K2),$T=(_Class31=class $T{constructor(t){this.options=t||Pd;}space(t){return"";}code({text:t,lang:e,escaped:r}){var _match;let n=(_match=(e||"").match(rs.notSpaceStart))===null||_match===void 0?void 0:_match[0],i=t.replace(rs.endingNewline,"")+`
`;return n?'<pre><code class="language-'+yc(n)+'">'+(r?i:yc(i,!0))+`</code></pre>
`:"<pre><code>"+(r?i:yc(i,!0))+`</code></pre>
`;}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`;}html({text:t}){return t;}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
`;}hr(t){return`<hr>
`;}list(t){let e=t.ordered,r=t.start,n="";for(let s=0;s<t.items.length;s++){let l=t.items[s];n+=this.listitem(l);}let i=e?"ol":"ul",a=e&&r!==1?' start="'+r+'"':"";return"<"+i+a+`>
`+n+"</"+i+`>
`;}listitem(t){let e="";if(t.task){var _t$tokens$;let r=this.checkbox({checked:!!t.checked});t.loose?((_t$tokens$=t.tokens[0])===null||_t$tokens$===void 0?void 0:_t$tokens$.type)==="paragraph"?(t.tokens[0].text=r+" "+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=r+" "+yc(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" ";}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
`;}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">';}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`;}table(t){let e="",r="";for(let i=0;i<t.header.length;i++)r+=this.tablecell(t.header[i]);e+=this.tablerow({text:r});let n="";for(let i=0;i<t.rows.length;i++){let a=t.rows[i];r="";for(let s=0;s<a.length;s++)r+=this.tablecell(a[s]);n+=this.tablerow({text:r});}return n&&(n=`<tbody>${n}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+n+`</table>
`;}tablerow({text:t}){return`<tr>
${t}</tr>
`;}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
`;}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>${yc(t,!0)}</code>`;}br(t){return"<br>";}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`;}link({href:t,title:e,tokens:r}){let n=this.parser.parseInline(r),i=JK(t);if(i===null)return n;t=i;let a='<a href="'+t+'"';return e&&(a+=' title="'+yc(e)+'"'),a+=">"+n+"</a>",a;}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=JK(t);if(i===null)return yc(r);t=i;let a=`<img src="${t}" alt="${r}"`;return e&&(a+=` title="${yc(e)}"`),a+=">",a;}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:yc(t.text);}},o(_Class31,"$"),_Class31),sL=(_Class32=class sL{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"";}},o(_Class32,"_"),_Class32),Ru=(_Q2=class Q9{constructor(e){this.options=e||Pd,this.options.renderer=this.options.renderer||new $T(),this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new sL();}static parse(e,r){return new Q9(r).parse(e);}static parseInline(e,r){return new Q9(r).parseInline(e);}parse(e,r=!0){let n="";for(let i=0;i<e.length;i++){var _this$options$extensi5;let a=e[i];if((_this$options$extensi5=this.options.extensions)!==null&&_this$options$extensi5!==void 0&&(_this$options$extensi5=_this$options$extensi5.renderers)!==null&&_this$options$extensi5!==void 0&&_this$options$extensi5[a.type]){let l=a,u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){n+=u||"";continue;}}let s=a;switch(s.type){case"space":{n+=this.renderer.space(s);continue;}case"hr":{n+=this.renderer.hr(s);continue;}case"heading":{n+=this.renderer.heading(s);continue;}case"code":{n+=this.renderer.code(s);continue;}case"table":{n+=this.renderer.table(s);continue;}case"blockquote":{n+=this.renderer.blockquote(s);continue;}case"list":{n+=this.renderer.list(s);continue;}case"html":{n+=this.renderer.html(s);continue;}case"paragraph":{n+=this.renderer.paragraph(s);continue;}case"text":{let l=s,u=this.renderer.text(l);for(;i+1<e.length&&e[i+1].type==="text";)l=e[++i],u+=`
`+this.renderer.text(l);r?n+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):n+=u;continue;}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l);}}}return n;}parseInline(e,r=this.renderer){let n="";for(let i=0;i<e.length;i++){var _this$options$extensi6;let a=e[i];if((_this$options$extensi6=this.options.extensions)!==null&&_this$options$extensi6!==void 0&&(_this$options$extensi6=_this$options$extensi6.renderers)!==null&&_this$options$extensi6!==void 0&&_this$options$extensi6[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=l||"";continue;}}let s=a;switch(s.type){case"escape":{n+=r.text(s);break;}case"html":{n+=r.html(s);break;}case"link":{n+=r.link(s);break;}case"image":{n+=r.image(s);break;}case"strong":{n+=r.strong(s);break;}case"em":{n+=r.em(s);break;}case"codespan":{n+=r.codespan(s);break;}case"br":{n+=r.br(s);break;}case"del":{n+=r.del(s);break;}case"text":{n+=r.text(s);break;}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l);}}}return n;}},o(_Q2,"a"),_Q2),PT=(_Class33=class PT{constructor(t){this.options=t||Pd;}preprocess(t){return t;}postprocess(t){return t;}processAllTokens(t){return t;}provideLexer(){return this.block?Lu.lex:Lu.lexInline;}provideParser(){return this.block?Ru.parse:Ru.parseInline;}},o(_Class33,"L"),_defineProperty(_Class33,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),_Class33),cDe=(_Class34=class cDe{constructor(...t){_defineProperty(this,"defaults",Z9());_defineProperty(this,"options",this.setOptions);_defineProperty(this,"parse",this.parseMarkdown(!0));_defineProperty(this,"parseInline",this.parseMarkdown(!1));_defineProperty(this,"Parser",Ru);_defineProperty(this,"Renderer",$T);_defineProperty(this,"TextRenderer",sL);_defineProperty(this,"Lexer",Lu);_defineProperty(this,"Tokenizer",FT);_defineProperty(this,"Hooks",PT);this.use(...t);}walkTokens(t,e){let r=[];for(let n of t)switch(r=r.concat(e.call(this,n)),n.type){case"table":{let i=n;for(let a of i.header)r=r.concat(this.walkTokens(a.tokens,e));for(let a of i.rows)for(let s of a)r=r.concat(this.walkTokens(s.tokens,e));break;}case"list":{let i=n;r=r.concat(this.walkTokens(i.items,e));break;}default:{var _this$defaults$extens;let i=n;(_this$defaults$extens=this.defaults.extensions)!==null&&_this$defaults$extens!==void 0&&(_this$defaults$extens=_this$defaults$extens.childTokens)!==null&&_this$defaults$extens!==void 0&&_this$defaults$extens[i.type]?this.defaults.extensions.childTokens[i.type].forEach(a=>{let s=i[a].flat(1/0);r=r.concat(this.walkTokens(s,e));}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,e)));}}return r;}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=e.renderers[i.name];a?e.renderers[i.name]=function(...s){let l=i.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l;}:e.renderers[i.name]=i.renderer;}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=e[i.level];a?a.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]));}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens);}),n.extensions=e),r.renderer){let i=this.defaults.renderer||new $T(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,l=r.renderer[s],u=i[s];i[s]=(...h)=>{let f=l.apply(i,h);return f===!1&&(f=u.apply(i,h)),f||"";};}n.renderer=i;}if(r.tokenizer){let i=this.defaults.tokenizer||new FT(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,l=r.tokenizer[s],u=i[s];i[s]=(...h)=>{let f=l.apply(i,h);return f===!1&&(f=u.apply(i,h)),f;};}n.tokenizer=i;}if(r.hooks){let i=this.defaults.hooks||new PT();for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,l=r.hooks[s],u=i[s];PT.passThroughHooks.has(a)?i[s]=h=>{if(this.defaults.async)return Promise.resolve(l.call(i,h)).then(d=>u.call(i,d));let f=l.call(i,h);return u.call(i,f);}:i[s]=(...h)=>{let f=l.apply(i,h);return f===!1&&(f=u.apply(i,h)),f;};}n.hooks=i;}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),i&&(l=l.concat(i.call(this,s))),l;};}this.defaults={...this.defaults,...n};}),this;}setOptions(t){return this.defaults={...this.defaults,...t},this;}lexer(t,e){return Lu.lex(t,e!==null&&e!==void 0?e:this.defaults);}parser(t,e){return Ru.parse(t,e!==null&&e!==void 0?e:this.defaults);}parseMarkdown(t){return(e,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);let s=i.hooks?i.hooks.provideLexer():t?Lu.lex:Lu.lexInline,l=i.hooks?i.hooks.provideParser():t?Ru.parse:Ru.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then(u=>s(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let u=s(e,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let h=l(u,i);return i.hooks&&(h=i.hooks.postprocess(h)),h;}catch(u){return a(u);}};}onError(t,e){return r=>{if(r.message+=`
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+yc(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n;}if(e)return Promise.reject(r);throw r;};}},o(_Class34,"B"),_Class34),Od=new cDe();o(Zr,"k");Zr.options=Zr.setOptions=function(t){return Od.setOptions(t),Zr.defaults=Od.defaults,rQ(Zr.defaults),Zr;};Zr.getDefaults=Z9;Zr.defaults=Pd;Zr.use=function(...t){return Od.use(...t),Zr.defaults=Od.defaults,rQ(Zr.defaults),Zr;};Zr.walkTokens=function(t,e){return Od.walkTokens(t,e);};Zr.parseInline=Od.parseInline;Zr.Parser=Ru;Zr.parser=Ru.parse;Zr.Renderer=$T;Zr.TextRenderer=sL;Zr.Lexer=Lu;Zr.lexer=Lu.lex;Zr.Tokenizer=FT;Zr.Hooks=PT;Zr.parse=Zr;ISt=Zr.options,OSt=Zr.setOptions,PSt=Zr.use,BSt=Zr.walkTokens,FSt=Zr.parseInline,$St=Ru.parse,zSt=Lu.lex;});function uDe(t,{markdownAutoWrap:e}){let n=t.replace(/<br\/>/g,`
`).replace(/\n{2,}/g,`
`),i=N3(n);return e===!1?i.replace(/ /g,"&nbsp;"):i;}function pQ(t,e={}){let r=uDe(t,e),n=Zr.lexer(r),i=[[]],a=0;function s(l,u="normal"){l.type==="text"?l.text.split(`
`).forEach((f,d)=>{d!==0&&(a++,i.push([])),f.split(" ").forEach(p=>{p=p.replace(/&#39;/g,"'"),p&&i[a].push({content:p,type:u});});}):l.type==="strong"||l.type==="em"?l.tokens.forEach(h=>{s(h,l.type);}):l.type==="html"&&i[a].push({content:l.text,type:"normal"});}return o(s,"processNode"),n.forEach(l=>{var _l$tokens;l.type==="paragraph"?(_l$tokens=l.tokens)===null||_l$tokens===void 0?void 0:_l$tokens.forEach(u=>{s(u);}):l.type==="html"?i[a].push({content:l.text,type:"normal"}):i[a].push({content:l.raw,type:"normal"});}),i;}function mQ(t,{markdownAutoWrap:e}={}){let r=Zr.lexer(t);function n(i){var _i$tokens,_i$tokens2,_i$tokens3;return i.type==="text"?e===!1?i.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):i.text.replace(/\n */g,"<br/>"):i.type==="strong"?`<strong>${(_i$tokens=i.tokens)===null||_i$tokens===void 0?void 0:_i$tokens.map(n).join("")}</strong>`:i.type==="em"?`<em>${(_i$tokens2=i.tokens)===null||_i$tokens2===void 0?void 0:_i$tokens2.map(n).join("")}</em>`:i.type==="paragraph"?`<p>${(_i$tokens3=i.tokens)===null||_i$tokens3===void 0?void 0:_i$tokens3.map(n).join("")}</p>`:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:(X.warn(`Unsupported markdown: ${i.type}`),i.raw);}return o(n,"output"),r.map(n).join("");}var gQ=N(()=>{"use strict";dQ();pA();yt();o(uDe,"preprocessMarkdown");o(pQ,"markdownToLines");o(mQ,"markdownToHTML");});function hDe(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t];}function fDe(t,e){let r=hDe(e.content);return yQ(t,[],r,e.type);}function yQ(t,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];let[i,...a]=r,s=[...e,i];return t([{content:s.join(""),type:n}])?yQ(t,s,a,n):(e.length===0&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}]);}function vQ(t,e){if(t.some(({content:r})=>r.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return oL(t,e);}function oL(t,e,r=[],n=[]){var _t$shift;if(t.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";t[0].content===" "&&(i=" ",t.shift());let a=(_t$shift=t.shift())!==null&&_t$shift!==void 0?_t$shift:{content:" ",type:"normal"},s=[...n];if(i!==""&&s.push({content:i,type:"normal"}),s.push(a),e(s))return oL(t,e,r,s);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){let[l,u]=fDe(e,a);r.push([l]),u.content&&t.unshift(u);}return oL(t,e,r);}var xQ=N(()=>{"use strict";o(hDe,"splitTextToChars");o(fDe,"splitWordToFitWidth");o(yQ,"splitWordToFitWidthRecursion");o(vQ,"splitLineToFitWidth");o(oL,"splitLineToFitWidthRecursion");});function bQ(t,e){e&&t.attr("style",e);}async function dDe(t,e,r,n,i=!1,a=Qt()){let s=t.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);let l=s.append("xhtml:div"),u=gi(e.label)?await yh(e.label.replace(Ze.lineBreakRegex,`
`),a):ar(e.label,a),h=e.isNode?"nodeLabel":"edgeLabel",f=l.append("span");f.html(u),bQ(f,e.labelStyle),f.attr("class",`${h} ${n}`),bQ(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),l.style("max-width",r+"px"),l.style("text-align","center"),l.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&l.attr("class","labelBkg");let d=l.node().getBoundingClientRect();return d.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),d=l.node().getBoundingClientRect()),s.node();}function lL(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");}function pDe(t,e,r){let n=t.append("text"),i=lL(n,1,e);cL(i,r);let a=i.node().getComputedTextLength();return n.remove(),a;}function TQ(t,e,r){var _i$node;let n=t.append("text"),i=lL(n,1,e);cL(i,[{content:r,type:"normal"}]);let a=(_i$node=i.node())===null||_i$node===void 0?void 0:_i$node.getBoundingClientRect();return a&&n.remove(),a;}function mDe(t,e,r,n=!1){let a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1"),u=0;for(let h of r){let f=o(p=>pDe(a,1.1,p)<=t,"checkWidth"),d=f(h)?[h]:vQ(h,f);for(let p of d){let m=lL(l,u,1.1);cL(m,p),u++;}}if(n){let h=l.node().getBBox(),f=2;return s.attr("x",h.x-f).attr("y",h.y-f).attr("width",h.width+2*f).attr("height",h.height+2*f),a.node();}else return l.node();}function cL(t,e){t.text(""),e.forEach((r,n)=>{let i=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(r.content):i.text(" "+r.content);});}async function uL(t,e={}){let r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,a,s)=>(r.push((async()=>{let l=`${a}:${s}`;return(await AV(l))?await Es(l,void 0,{class:"label-icon"}):`<i class='${ar(i,e).replace(":"," ")}'></i>`;})()),i));let n=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>{var _n$shift;return(_n$shift=n.shift())!==null&&_n$shift!==void 0?_n$shift:"";});}var Hn,no=N(()=>{"use strict";pr();dr();yt();gQ();nr();rc();xQ();Jn();o(bQ,"applyStyle");o(dDe,"addHtmlSpan");o(lL,"createTspan");o(pDe,"computeWidthOfText");o(TQ,"computeDimensionOfText");o(mDe,"createFormattedText");o(cL,"updateTextContentAndStyles");o(uL,"replaceIconSubstring");Hn=o(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:l=200,addSvgBackground:u=!1}={},h)=>{if(X.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",u),a){let f=mQ(e,h),d=await uL(ta(f),h),p=e.replace(/\\\\/g,"\\"),m={isNode:s,label:gi(e)?p:d,labelStyle:r.replace("fill:","color:")};return await dDe(t,m,l,i,u,h);}else{let f=e.replace(/<br\s*\/?>/g,"<br/>"),d=pQ(f.replace("<br>","<br/>"),h),p=mDe(l,t,d,e?u:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ge(p).attr("style",m);}else{let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Ge(p).select("rect").attr("style",m.replace(/background:/g,"fill:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ge(p).select("text").attr("style",g);}return p;}},"createText");});function zt(t){let e=t.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ");}function $o(t,e,r,n,i,a){let s=[],u=r-t,h=n-e,f=u/a,d=2*Math.PI/f,p=e+h/2;for(let m=0;m<=50;m++){let g=m/50,y=t+g*u,v=p+i*Math.sin(d*(y-t));s.push({x:y,y:v});}return s;}function Bd(t,e,r,n,i,a){let s=[],l=i*Math.PI/180,f=(a*Math.PI/180-l)/(n-1);for(let d=0;d<n;d++){let p=l+d*f,m=t+r*Math.cos(p),g=e+r*Math.sin(p);s.push({x:-m,y:-g});}return s;}var pt,VT,Ke,ot,Ft=N(()=>{"use strict";no();qt();pr();Ca();dr();nr();pt=o(async(t,e,r)=>{var _ge2,_ge$flowchart,_e$padding;let n,i=e.useHtmlLabels||mr((_ge2=ge())===null||_ge2===void 0?void 0:_ge2.htmlLabels);r?n=r:n="node default";let a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",ii(e.labelStyle)),l;e.label===void 0?l="":l=typeof e.label=="string"?e.label:e.label[0];let u=await Hn(s,ar(ta(l),ge()),{useHtmlLabels:i,width:e.width||((_ge$flowchart=ge().flowchart)===null||_ge$flowchart===void 0?void 0:_ge$flowchart.wrappingWidth),cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),h=u.getBBox(),f=((_e$padding=e===null||e===void 0?void 0:e.padding)!==null&&_e$padding!==void 0?_e$padding:0)/2;if(i){let d=u.children[0],p=Ge(u),m=d.getElementsByTagName("img");if(m){let g=l.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(v=>{function x(){if(y.style.display="flex",y.style.flexDirection="column",g){let b=ge().fontSize?ge().fontSize:window.getComputedStyle(document.body).fontSize,T=5,[C=lr.fontSize]=Fo(b),w=C*T+"px";y.style.minWidth=w,y.style.maxWidth=w;}else y.style.width="100%";v(y);}o(x,"setupImage"),setTimeout(()=>{y.complete&&x();}),y.addEventListener("error",x),y.addEventListener("load",x);})));}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height);}return i?s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):s.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:h,halfPadding:f,label:s};},"labelHelper"),VT=o(async(t,e,r)=>{var _ge3,_ge4,_ge5;let n=r.useHtmlLabels||mr((_ge3=ge())===null||_ge3===void 0||(_ge3=_ge3.flowchart)===null||_ge3===void 0?void 0:_ge3.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Hn(i,ar(ta(e),ge()),{useHtmlLabels:n,width:r.width||((_ge4=ge())===null||_ge4===void 0||(_ge4=_ge4.flowchart)===null||_ge4===void 0?void 0:_ge4.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),l=r.padding/2;if(mr((_ge5=ge())===null||_ge5===void 0||(_ge5=_ge5.flowchart)===null||_ge5===void 0?void 0:_ge5.htmlLabels)){let u=a.children[0],h=Ge(a);s=u.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height);}return n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:l,label:i};},"insertLabel"),Ke=o((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height;},"updateNodeBounds"),ot=o((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");o(zt,"createPathFromPoints");o($o,"generateFullSineWavePoints");o(Bd,"generateCirclePoints");});function gDe(t,e){return t.intersect(e);}var wQ,kQ=N(()=>{"use strict";o(gDe,"intersectNode");wQ=gDe;});function yDe(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,l=a-n.y,u=Math.sqrt(e*e*l*l+r*r*s*s),h=Math.abs(e*r*s/u);n.x<i&&(h=-h);var f=Math.abs(e*r*l/u);return n.y<a&&(f=-f),{x:i+h,y:a+f};}var UT,hL=N(()=>{"use strict";o(yDe,"intersectEllipse");UT=yDe;});function vDe(t,e,r){return UT(t,e,e,r);}var EQ,SQ=N(()=>{"use strict";hL();o(vDe,"intersectCircle");EQ=vDe;});function xDe(t,e,r,n){var i,a,s,l,u,h,f,d,p,m,g,y,v,x,b;if(i=e.y-t.y,s=t.x-e.x,u=e.x*t.y-t.x*e.y,p=i*r.x+s*r.y+u,m=i*n.x+s*n.y+u,!(p!==0&&m!==0&&CQ(p,m))&&(a=n.y-r.y,l=r.x-n.x,h=n.x*r.y-r.x*n.y,f=a*t.x+l*t.y+h,d=a*e.x+l*e.y+h,!(f!==0&&d!==0&&CQ(f,d))&&(g=i*l-a*s,g!==0)))return y=Math.abs(g/2),v=s*h-l*u,x=v<0?(v-y)/g:(v+y)/g,v=a*u-i*h,b=v<0?(v-y)/g:(v+y)/g,{x,y:b};}function CQ(t,e){return t*e>0;}var AQ,_Q=N(()=>{"use strict";o(xDe,"intersectLine");o(CQ,"sameSign");AQ=xDe;});function bDe(t,e,r){let n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(f){s=Math.min(s,f.x),l=Math.min(l,f.y);}):(s=Math.min(s,e.x),l=Math.min(l,e.y));let u=n-t.width/2-s,h=i-t.height/2-l;for(let f=0;f<e.length;f++){let d=e[f],p=e[f<e.length-1?f+1:0],m=AQ(t,r,{x:u+d.x,y:h+d.y},{x:u+p.x,y:h+p.y});m&&a.push(m);}return a.length?(a.length>1&&a.sort(function(f,d){let p=f.x-r.x,m=f.y-r.y,g=Math.sqrt(p*p+m*m),y=d.x-r.x,v=d.y-r.y,x=Math.sqrt(y*y+v*v);return g<x?-1:g===x?0:1;}),a[0]):t;}var DQ,LQ=N(()=>{"use strict";_Q();o(bDe,"intersectPolygon");DQ=bDe;});var TDe,Hh,fL=N(()=>{"use strict";TDe=o((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,l=t.height/2,u,h;return Math.abs(a)*s>Math.abs(i)*l?(a<0&&(l=-l),u=a===0?0:l*i/a,h=l):(i<0&&(s=-s),u=s,h=i===0?0:s*a/i),{x:r+u,y:n+h};},"intersectRect"),Hh=TDe;});var Xe,Ht=N(()=>{"use strict";kQ();SQ();hL();LQ();fL();Xe={node:wQ,circle:EQ,ellipse:UT,polygon:DQ,rect:Hh};});var RQ,vc,wDe,k2,qe,Qe,kDe,Gt=N(()=>{"use strict";qt();RQ=o(t=>{let{handDrawnSeed:e}=ge();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e};},"solidStateFill"),vc=o(t=>{let e=wDe([...(t.cssCompiledStyles||[]),...(t.cssStyles||[])]);return{stylesMap:e,stylesArray:[...e]};},"compileStyles"),wDe=o(t=>{let e=new Map();return t.forEach(r=>{let[n,i]=r.split(":");e.set(n.trim(),i===null||i===void 0?void 0:i.trim());}),e;},"styles2Map"),k2=o(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),qe=o(t=>{let{stylesArray:e}=vc(t),r=[],n=[],i=[],a=[];return e.forEach(s=>{let l=s[0];k2(l)?r.push(s.join(":")+" !important"):(n.push(s.join(":")+" !important"),l.includes("stroke")&&i.push(s.join(":")+" !important"),l==="fill"&&a.push(s.join(":")+" !important"));}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a};},"styles2String"),Qe=o((t,e)=>{var _s$get;let{themeVariables:r,handDrawnSeed:n}=ge(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=vc(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||i,seed:n,strokeWidth:((_s$get=s.get("stroke-width"))===null||_s$get===void 0?void 0:_s$get.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:kDe(s.get("stroke-dasharray"))},e);},"userNodeOverrides"),kDe=o(t=>{if(!t)return[0,0];let e=t.trim().split(/\s+/).map(Number);if(e.length===1){let i=isNaN(e[0])?0:e[0];return[i,i];}let r=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1];return[r,n];},"getStrokeDashArray");});function dL(t,e,r){if(t&&t.length){let[n,i]=e,a=Math.PI/180*r,s=Math.cos(a),l=Math.sin(a);for(let u of t){let[h,f]=u;u[0]=(h-n)*s-(f-i)*l+n,u[1]=(h-n)*l+(f-i)*s+i;}}}function EDe(t,e){return t[0]===e[0]&&t[1]===e[1];}function SDe(t,e,r,n=1){let i=r,a=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,l=[0,0];if(i)for(let h of s)dL(h,l,i);let u=function(h,f,d){let p=[];for(let b of h){let T=[...b];EDe(T[0],T[T.length-1])||T.push([T[0][0],T[0][1]]),T.length>2&&p.push(T);}let m=[];f=Math.max(f,.1);let g=[];for(let b of p)for(let T=0;T<b.length-1;T++){let C=b[T],w=b[T+1];if(C[1]!==w[1]){let E=Math.min(C[1],w[1]);g.push({ymin:E,ymax:Math.max(C[1],w[1]),x:E===C[1]?C[0]:w[0],islope:(w[0]-C[0])/(w[1]-C[1])});}}if(g.sort((b,T)=>b.ymin<T.ymin?-1:b.ymin>T.ymin?1:b.x<T.x?-1:b.x>T.x?1:b.ymax===T.ymax?0:(b.ymax-T.ymax)/Math.abs(b.ymax-T.ymax)),!g.length)return m;let y=[],v=g[0].ymin,x=0;for(;y.length||g.length;){if(g.length){let b=-1;for(let T=0;T<g.length&&!(g[T].ymin>v);T++)b=T;g.splice(0,b+1).forEach(T=>{y.push({s:v,edge:T});});}if(y=y.filter(b=>!(b.edge.ymax<=v)),y.sort((b,T)=>b.edge.x===T.edge.x?0:(b.edge.x-T.edge.x)/Math.abs(b.edge.x-T.edge.x)),(d!==1||x%f==0)&&y.length>1)for(let b=0;b<y.length;b+=2){let T=b+1;if(T>=y.length)break;let C=y[b].edge,w=y[T].edge;m.push([[Math.round(C.x),v],[Math.round(w.x),v]]);}v+=d,y.forEach(b=>{b.edge.x=b.edge.x+d*b.edge.islope;}),x++;}return m;}(s,a,n);if(i){for(let h of s)dL(h,l,-i);(function(h,f,d){let p=[];h.forEach(m=>p.push(...m)),dL(p,f,d);})(u,l,-i);}return u;}function A2(t,e){var r;let n=e.hachureAngle+90,i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=i),SDe(t,i,n,a||1);}function ZT(t){let e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2));}function mL(t,e){return t.type===e;}function DL(t){let e=[],r=function(s){let l=new Array();for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))l[l.length]={type:CDe,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];l[l.length]={type:pL,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length);}return l[l.length]={type:NQ,text:""},l;}(t),n="BOD",i=0,a=r[i];for(;!mL(a,NQ);){let s=0,l=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return DL("M0,0"+t);i++,s=HT[a.text],n=a.text;}else mL(a,pL)?s=HT[n]:(i++,s=HT[a.text],n=a.text);if(!(i+s<r.length))throw new Error("Path data ended short");for(let u=i;u<i+s;u++){let h=r[u];if(!mL(h,pL))throw new Error("Param not a number: "+n+","+h.text);l[l.length]=+h.text;}if(typeof HT[n]!="number")throw new Error("Bad segment: "+n);{let u={key:n,data:l};e.push(u),i+=s,a=r[i],n==="M"&&(n="L"),n==="m"&&(n="l");}}return e;}function zQ(t){let e=0,r=0,n=0,i=0,a=[];for(let{key:s,data:l}of t)switch(s){case"M":a.push({key:"M",data:[...l]}),[e,r]=l,[n,i]=l;break;case"m":e+=l[0],r+=l[1],a.push({key:"M",data:[e,r]}),n=e,i=r;break;case"L":a.push({key:"L",data:[...l]}),[e,r]=l;break;case"l":e+=l[0],r+=l[1],a.push({key:"L",data:[e,r]});break;case"C":a.push({key:"C",data:[...l]}),e=l[4],r=l[5];break;case"c":{let u=l.map((h,f)=>f%2?h+r:h+e);a.push({key:"C",data:u}),e=u[4],r=u[5];break;}case"Q":a.push({key:"Q",data:[...l]}),e=l[2],r=l[3];break;case"q":{let u=l.map((h,f)=>f%2?h+r:h+e);a.push({key:"Q",data:u}),e=u[2],r=u[3];break;}case"A":a.push({key:"A",data:[...l]}),e=l[5],r=l[6];break;case"a":e+=l[5],r+=l[6],a.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],e,r]});break;case"H":a.push({key:"H",data:[...l]}),e=l[0];break;case"h":e+=l[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...l]}),r=l[0];break;case"v":r+=l[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...l]}),e=l[2],r=l[3];break;case"s":{let u=l.map((h,f)=>f%2?h+r:h+e);a.push({key:"S",data:u}),e=u[2],r=u[3];break;}case"T":a.push({key:"T",data:[...l]}),e=l[0],r=l[1];break;case"t":e+=l[0],r+=l[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,r=i;}return a;}function GQ(t){let e=[],r="",n=0,i=0,a=0,s=0,l=0,u=0;for(let{key:h,data:f}of t){switch(h){case"M":e.push({key:"M",data:[...f]}),[n,i]=f,[a,s]=f;break;case"C":e.push({key:"C",data:[...f]}),n=f[4],i=f[5],l=f[2],u=f[3];break;case"L":e.push({key:"L",data:[...f]}),[n,i]=f;break;case"H":n=f[0],e.push({key:"L",data:[n,i]});break;case"V":i=f[0],e.push({key:"L",data:[n,i]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=n+(n-l),p=i+(i-u)):(d=n,p=i),e.push({key:"C",data:[d,p,...f]}),l=f[0],u=f[1],n=f[2],i=f[3];break;}case"T":{let[d,p]=f,m=0,g=0;r==="Q"||r==="T"?(m=n+(n-l),g=i+(i-u)):(m=n,g=i);let y=n+2*(m-n)/3,v=i+2*(g-i)/3,x=d+2*(m-d)/3,b=p+2*(g-p)/3;e.push({key:"C",data:[y,v,x,b,d,p]}),l=m,u=g,n=d,i=p;break;}case"Q":{let[d,p,m,g]=f,y=n+2*(d-n)/3,v=i+2*(p-i)/3,x=m+2*(d-m)/3,b=g+2*(p-g)/3;e.push({key:"C",data:[y,v,x,b,m,g]}),l=d,u=p,n=m,i=g;break;}case"A":{let d=Math.abs(f[0]),p=Math.abs(f[1]),m=f[2],g=f[3],y=f[4],v=f[5],x=f[6];d===0||p===0?(e.push({key:"C",data:[n,i,v,x,v,x]}),n=v,i=x):(n!==v||i!==x)&&(VQ(n,i,v,x,d,p,m,g,y).forEach(function(b){e.push({key:"C",data:b});}),n=v,i=x);break;}case"Z":e.push({key:"Z",data:[]}),n=a,i=s;}r=h;}return e;}function E2(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)];}function VQ(t,e,r,n,i,a,s,l,u,h){let f=(d=s,Math.PI*d/180);var d;let p=[],m=0,g=0,y=0,v=0;if(h)[m,g,y,v]=h;else{[t,e]=E2(t,e,-f),[r,n]=E2(r,n,-f);let L=(t-r)/2,S=(e-n)/2,I=L*L/(i*i)+S*S/(a*a);I>1&&(I=Math.sqrt(I),i*=I,a*=I);let M=i*i,P=a*a,B=M*P-M*S*S-P*L*L,F=M*S*S+P*L*L,z=(l===u?-1:1)*Math.sqrt(Math.abs(B/F));y=z*i*S/a+(t+r)/2,v=z*-a*L/i+(e+n)/2,m=Math.asin(parseFloat(((e-v)/a).toFixed(9))),g=Math.asin(parseFloat(((n-v)/a).toFixed(9))),t<y&&(m=Math.PI-m),r<y&&(g=Math.PI-g),m<0&&(m=2*Math.PI+m),g<0&&(g=2*Math.PI+g),u&&m>g&&(m-=2*Math.PI),!u&&g>m&&(g-=2*Math.PI);}let x=g-m;if(Math.abs(x)>120*Math.PI/180){let L=g,S=r,I=n;g=u&&g>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,p=VQ(r=y+i*Math.cos(g),n=v+a*Math.sin(g),S,I,i,a,s,0,u,[g,L,y,v]);}x=g-m;let b=Math.cos(m),T=Math.sin(m),C=Math.cos(g),w=Math.sin(g),E=Math.tan(x/4),_=4/3*i*E,A=4/3*a*E,D=[t,e],O=[t+_*T,e-A*b],R=[r+_*w,n-A*C],k=[r,n];if(O[0]=2*D[0]-O[0],O[1]=2*D[1]-O[1],h)return[O,R,k].concat(p);{p=[O,R,k].concat(p);let L=[];for(let S=0;S<p.length;S+=3){let I=E2(p[S][0],p[S][1],f),M=E2(p[S+1][0],p[S+1][1],f),P=E2(p[S+2][0],p[S+2][1],f);L.push([I[0],I[1],M[0],M[1],P[0],P[1]]);}return L;}}function UQ(t,e,r,n,i){return{type:"path",ops:Wh(t,e,r,n,i)};}function YT(t,e,r){let n=(t||[]).length;if(n>2){let i=[];for(let a=0;a<n-1;a++)i.push(...Wh(t[a][0],t[a][1],t[a+1][0],t[a+1][1],r));return e&&i.push(...Wh(t[n-1][0],t[n-1][1],t[0][0],t[0][1],r)),{type:"path",ops:i};}return n===2?UQ(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]};}function _De(t,e,r,n,i){return function(a,s){return YT(a,!0,s);}([[t,e],[t+r,e],[t+r,e+n],[t,e+n]],i);}function MQ(t,e){if(t.length){let r=typeof t[0][0]=="number"?[t]:t,n=WT(r[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:WT(r[0],1.5*(1+.22*e.roughness),PQ(e));for(let a=1;a<r.length;a++){let s=r[a];if(s.length){let l=WT(s,1*(1+.2*e.roughness),e),u=e.disableMultiStroke?[]:WT(s,1.5*(1+.22*e.roughness),PQ(e));for(let h of l)h.op!=="move"&&n.push(h);for(let h of u)h.op!=="move"&&i.push(h);}}return{type:"path",ops:n.concat(i)};}return{type:"path",ops:[]};}function HQ(t,e,r){let n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),a=2*Math.PI/i,s=Math.abs(t/2),l=Math.abs(e/2),u=1-r.curveFitting;return s+=sr(s*u,r),l+=sr(l*u,r),{increment:a,rx:s,ry:l};}function EL(t,e,r,n){let[i,a]=BQ(n.increment,t,e,n.rx,n.ry,1,n.increment*jT(.1,jT(.4,1,r),r),r),s=KT(i,null,r);if(!r.disableMultiStroke&&r.roughness!==0){let[l]=BQ(n.increment,t,e,n.rx,n.ry,1.5,0,r),u=KT(l,null,r);s=s.concat(u);}return{estimatedPoints:a,opset:{type:"path",ops:s}};}function IQ(t,e,r,n,i,a,s,l,u){let h=t,f=e,d=Math.abs(r/2),p=Math.abs(n/2);d+=sr(.01*d,u),p+=sr(.01*p,u);let m=i,g=a;for(;m<0;)m+=2*Math.PI,g+=2*Math.PI;g-m>2*Math.PI&&(m=0,g=2*Math.PI);let y=2*Math.PI/u.curveStepCount,v=Math.min(y/2,(g-m)/2),x=FQ(v,h,f,d,p,m,g,1,u);if(!u.disableMultiStroke){let b=FQ(v,h,f,d,p,m,g,1.5,u);x.push(...b);}return s&&(l?x.push(...Wh(h,f,h+d*Math.cos(m),f+p*Math.sin(m),u),...Wh(h,f,h+d*Math.cos(g),f+p*Math.sin(g),u)):x.push({op:"lineTo",data:[h,f]},{op:"lineTo",data:[h+d*Math.cos(m),f+p*Math.sin(m)]})),{type:"path",ops:x};}function OQ(t,e){let r=GQ(zQ(DL(t))),n=[],i=[0,0],a=[0,0];for(let{key:s,data:l}of r)switch(s){case"M":a=[l[0],l[1]],i=[l[0],l[1]];break;case"L":n.push(...Wh(a[0],a[1],l[0],l[1],e)),a=[l[0],l[1]];break;case"C":{let[u,h,f,d,p,m]=l;n.push(...DDe(u,h,f,d,p,m,a,e)),a=[p,m];break;}case"Z":n.push(...Wh(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]];}return{type:"path",ops:n};}function gL(t,e){let r=[];for(let n of t)if(n.length){let i=e.maxRandomnessOffset||0,a=n.length;if(a>2){r.push({op:"move",data:[n[0][0]+sr(i,e),n[0][1]+sr(i,e)]});for(let s=1;s<a;s++)r.push({op:"lineTo",data:[n[s][0]+sr(i,e),n[s][1]+sr(i,e)]});}}return{type:"fillPath",ops:r};}function ym(t,e){return function(r,n){let i=r.fillStyle||"hachure";if(!Ns[i])switch(i){case"zigzag":Ns[i]||(Ns[i]=new vL(n));break;case"cross-hatch":Ns[i]||(Ns[i]=new xL(n));break;case"dots":Ns[i]||(Ns[i]=new bL(n));break;case"dashed":Ns[i]||(Ns[i]=new TL(n));break;case"zigzag-line":Ns[i]||(Ns[i]=new wL(n));break;default:i="hachure",Ns[i]||(Ns[i]=new C2(n));}return Ns[i];}(e,ADe).fillPolygons(t,e);}function PQ(t){let e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e;}function WQ(t){return t.randomizer||(t.randomizer=new kL(t.seed||0)),t.randomizer.next();}function jT(t,e,r,n=1){return r.roughness*n*(WQ(r)*(e-t)+t);}function sr(t,e,r=1){return jT(-t,t,e,r);}function Wh(t,e,r,n,i,a=!1){let s=a?i.disableMultiStrokeFill:i.disableMultiStroke,l=SL(t,e,r,n,i,!0,!1);if(s)return l;let u=SL(t,e,r,n,i,!0,!0);return l.concat(u);}function SL(t,e,r,n,i,a,s){let l=Math.pow(t-r,2)+Math.pow(e-n,2),u=Math.sqrt(l),h=1;h=u<200?1:u>500?.4:-.0016668*u+1.233334;let f=i.maxRandomnessOffset||0;f*f*100>l&&(f=u/10);let d=f/2,p=.2+.2*WQ(i),m=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;m=sr(m,i,h),g=sr(g,i,h);let y=[],v=o(()=>sr(d,i,h),"M"),x=o(()=>sr(f,i,h),"k"),b=i.preserveVertices;return a&&(s?y.push({op:"move",data:[t+(b?0:v()),e+(b?0:v())]}):y.push({op:"move",data:[t+(b?0:sr(f,i,h)),e+(b?0:sr(f,i,h))]})),s?y.push({op:"bcurveTo",data:[m+t+(r-t)*p+v(),g+e+(n-e)*p+v(),m+t+2*(r-t)*p+v(),g+e+2*(n-e)*p+v(),r+(b?0:v()),n+(b?0:v())]}):y.push({op:"bcurveTo",data:[m+t+(r-t)*p+x(),g+e+(n-e)*p+x(),m+t+2*(r-t)*p+x(),g+e+2*(n-e)*p+x(),r+(b?0:x()),n+(b?0:x())]}),y;}function WT(t,e,r){if(!t.length)return[];let n=[];n.push([t[0][0]+sr(e,r),t[0][1]+sr(e,r)]),n.push([t[0][0]+sr(e,r),t[0][1]+sr(e,r)]);for(let i=1;i<t.length;i++)n.push([t[i][0]+sr(e,r),t[i][1]+sr(e,r)]),i===t.length-1&&n.push([t[i][0]+sr(e,r),t[i][1]+sr(e,r)]);return KT(n,null,r);}function KT(t,e,r){let n=t.length,i=[];if(n>3){let a=[],s=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let l=1;l+2<n;l++){let u=t[l];a[0]=[u[0],u[1]],a[1]=[u[0]+(s*t[l+1][0]-s*t[l-1][0])/6,u[1]+(s*t[l+1][1]-s*t[l-1][1])/6],a[2]=[t[l+1][0]+(s*t[l][0]-s*t[l+2][0])/6,t[l+1][1]+(s*t[l][1]-s*t[l+2][1])/6],a[3]=[t[l+1][0],t[l+1][1]],i.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]});}if(e&&e.length===2){let l=r.maxRandomnessOffset;i.push({op:"lineTo",data:[e[0]+sr(l,r),e[1]+sr(l,r)]});}}else n===3?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):n===2&&i.push(...SL(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return i;}function BQ(t,e,r,n,i,a,s,l){let u=[],h=[];if(l.roughness===0){t/=4,h.push([e+n*Math.cos(-t),r+i*Math.sin(-t)]);for(let f=0;f<=2*Math.PI;f+=t){let d=[e+n*Math.cos(f),r+i*Math.sin(f)];u.push(d),h.push(d);}h.push([e+n*Math.cos(0),r+i*Math.sin(0)]),h.push([e+n*Math.cos(t),r+i*Math.sin(t)]);}else{let f=sr(.5,l)-Math.PI/2;h.push([sr(a,l)+e+.9*n*Math.cos(f-t),sr(a,l)+r+.9*i*Math.sin(f-t)]);let d=2*Math.PI+f-.01;for(let p=f;p<d;p+=t){let m=[sr(a,l)+e+n*Math.cos(p),sr(a,l)+r+i*Math.sin(p)];u.push(m),h.push(m);}h.push([sr(a,l)+e+n*Math.cos(f+2*Math.PI+.5*s),sr(a,l)+r+i*Math.sin(f+2*Math.PI+.5*s)]),h.push([sr(a,l)+e+.98*n*Math.cos(f+s),sr(a,l)+r+.98*i*Math.sin(f+s)]),h.push([sr(a,l)+e+.9*n*Math.cos(f+.5*s),sr(a,l)+r+.9*i*Math.sin(f+.5*s)]);}return[h,u];}function FQ(t,e,r,n,i,a,s,l,u){let h=a+sr(.1,u),f=[];f.push([sr(l,u)+e+.9*n*Math.cos(h-t),sr(l,u)+r+.9*i*Math.sin(h-t)]);for(let d=h;d<=s;d+=t)f.push([sr(l,u)+e+n*Math.cos(d),sr(l,u)+r+i*Math.sin(d)]);return f.push([e+n*Math.cos(s),r+i*Math.sin(s)]),f.push([e+n*Math.cos(s),r+i*Math.sin(s)]),KT(f,null,u);}function DDe(t,e,r,n,i,a,s,l){let u=[],h=[l.maxRandomnessOffset||1,(l.maxRandomnessOffset||1)+.3],f=[0,0],d=l.disableMultiStroke?1:2,p=l.preserveVertices;for(let m=0;m<d;m++)m===0?u.push({op:"move",data:[s[0],s[1]]}):u.push({op:"move",data:[s[0]+(p?0:sr(h[0],l)),s[1]+(p?0:sr(h[0],l))]}),f=p?[i,a]:[i+sr(h[m],l),a+sr(h[m],l)],u.push({op:"bcurveTo",data:[t+sr(h[m],l),e+sr(h[m],l),r+sr(h[m],l),n+sr(h[m],l),f[0],f[1]]});return u;}function S2(t){return[...t];}function $Q(t,e=0){let r=t.length;if(r<3)throw new Error("A curve must have at least three points.");let n=[];if(r===3)n.push(S2(t[0]),S2(t[1]),S2(t[2]),S2(t[2]));else{let i=[];i.push(t[0],t[0]);for(let l=1;l<t.length;l++)i.push(t[l]),l===t.length-1&&i.push(t[l]);let a=[],s=1-e;n.push(S2(i[0]));for(let l=1;l+2<i.length;l++){let u=i[l];a[0]=[u[0],u[1]],a[1]=[u[0]+(s*i[l+1][0]-s*i[l-1][0])/6,u[1]+(s*i[l+1][1]-s*i[l-1][1])/6],a[2]=[i[l+1][0]+(s*i[l][0]-s*i[l+2][0])/6,i[l+1][1]+(s*i[l][1]-s*i[l+2][1])/6],a[3]=[i[l+1][0],i[l+1][1]],n.push(a[1],a[2],a[3]);}}return n;}function XT(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2);}function LDe(t,e,r){let n=XT(e,r);if(n===0)return XT(t,e);let i=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/n;return i=Math.max(0,Math.min(1,i)),XT(t,Fd(e,r,i));}function Fd(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r];}function CL(t,e,r,n){let i=n||[];if(function(l,u){let h=l[u+0],f=l[u+1],d=l[u+2],p=l[u+3],m=3*f[0]-2*h[0]-p[0];m*=m;let g=3*f[1]-2*h[1]-p[1];g*=g;let y=3*d[0]-2*p[0]-h[0];y*=y;let v=3*d[1]-2*p[1]-h[1];return v*=v,m<y&&(m=y),g<v&&(g=v),m+g;}(t,e)<r){let l=t[e+0];i.length?(a=i[i.length-1],s=l,Math.sqrt(XT(a,s))>1&&i.push(l)):i.push(l),i.push(t[e+3]);}else{let u=t[e+0],h=t[e+1],f=t[e+2],d=t[e+3],p=Fd(u,h,.5),m=Fd(h,f,.5),g=Fd(f,d,.5),y=Fd(p,m,.5),v=Fd(m,g,.5),x=Fd(y,v,.5);CL([u,p,y,x],0,r,i),CL([x,v,g,d],0,r,i);}var a,s;return i;}function RDe(t,e){return QT(t,0,t.length,e);}function QT(t,e,r,n,i){let a=i||[],s=t[e],l=t[r-1],u=0,h=1;for(let f=e+1;f<r-1;++f){let d=LDe(t[f],s,l);d>u&&(u=d,h=f);}return Math.sqrt(u)>n?(QT(t,e,h+1,n,a),QT(t,h,r,n,a)):(a.length||a.push(s),a.push(l)),a;}function yL(t,e=.15,r){let n=[],i=(t.length-1)/3;for(let a=0;a<i;a++)CL(t,3*a,e,n);return r&&r>0?QT(n,0,n.length,r):n;}var C2,vL,xL,bL,TL,wL,Ns,kL,CDe,pL,NQ,HT,ADe,io,vm,AL,qT,_L,je,Wt=N(()=>{"use strict";var _Class35,_Class36,_Class37,_Class38,_Class39,_Class40,_Class41,_Class42,_Class43,_Class44;o(dL,"t");o(EDe,"e");o(SDe,"s");o(A2,"n");C2=(_Class35=class C2{constructor(e){this.helper=e;}fillPolygons(e,r){return this._fillPolygons(e,r);}_fillPolygons(e,r){let n=A2(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)};}renderLines(e,r){let n=[];for(let i of e)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n;}},o(_Class35,"o"),_Class35);o(ZT,"a");vL=(_Class36=class vL extends C2{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=A2(e,Object.assign({},r,{hachureGap:n})),a=Math.PI/180*r.hachureAngle,s=[],l=.5*n*Math.cos(a),u=.5*n*Math.sin(a);for(let[h,f]of i)ZT([h,f])&&s.push([[h[0]-l,h[1]+u],[...f]],[[h[0]+l,h[1]-u],[...f]]);return{type:"fillSketch",ops:this.renderLines(s,r)};}},o(_Class36,"h"),_Class36),xL=(_Class37=class xL extends C2{fillPolygons(e,r){let n=this._fillPolygons(e,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(e,i);return n.ops=n.ops.concat(a.ops),n;}},o(_Class37,"r"),_Class37),bL=(_Class38=class bL{constructor(e){this.helper=e;}fillPolygons(e,r){let n=A2(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r);}dotsOnLines(e,r){let n=[],i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);let s=i/4;for(let l of e){let u=ZT(l),h=u/i,f=Math.ceil(h)-1,d=u-f*i,p=(l[0][0]+l[1][0])/2-i/4,m=Math.min(l[0][1],l[1][1]);for(let g=0;g<f;g++){let y=m+d+g*i,v=p-s+2*Math.random()*s,x=y-s+2*Math.random()*s,b=this.helper.ellipse(v,x,a,a,r);n.push(...b.ops);}}return{type:"fillSketch",ops:n};}},o(_Class38,"i"),_Class38),TL=(_Class39=class TL{constructor(e){this.helper=e;}fillPolygons(e,r){let n=A2(e,r);return{type:"fillSketch",ops:this.dashedLine(n,r)};}dashedLine(e,r){let n=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,i=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return e.forEach(s=>{let l=ZT(s),u=Math.floor(l/(n+i)),h=(l+i-u*(n+i))/2,f=s[0],d=s[1];f[0]>d[0]&&(f=s[1],d=s[0]);let p=Math.atan((d[1]-f[1])/(d[0]-f[0]));for(let m=0;m<u;m++){let g=m*(n+i),y=g+n,v=[f[0]+g*Math.cos(p)+h*Math.cos(p),f[1]+g*Math.sin(p)+h*Math.sin(p)],x=[f[0]+y*Math.cos(p)+h*Math.cos(p),f[1]+y*Math.sin(p)+h*Math.sin(p)];a.push(...this.helper.doubleLineOps(v[0],v[1],x[0],x[1],r));}}),a;}},o(_Class39,"c"),_Class39),wL=(_Class40=class wL{constructor(e){this.helper=e;}fillPolygons(e,r){let n=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,i=r.zigzagOffset<0?n:r.zigzagOffset,a=A2(e,r=Object.assign({},r,{hachureGap:n+i}));return{type:"fillSketch",ops:this.zigzagLines(a,i,r)};}zigzagLines(e,r,n){let i=[];return e.forEach(a=>{let s=ZT(a),l=Math.round(s/(2*r)),u=a[0],h=a[1];u[0]>h[0]&&(u=a[1],h=a[0]);let f=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let d=0;d<l;d++){let p=2*d*r,m=2*(d+1)*r,g=Math.sqrt(2*Math.pow(r,2)),y=[u[0]+p*Math.cos(f),u[1]+p*Math.sin(f)],v=[u[0]+m*Math.cos(f),u[1]+m*Math.sin(f)],x=[y[0]+g*Math.cos(f+Math.PI/4),y[1]+g*Math.sin(f+Math.PI/4)];i.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],n),...this.helper.doubleLineOps(x[0],x[1],v[0],v[1],n));}}),i;}},o(_Class40,"l"),_Class40),Ns={},kL=(_Class41=class kL{constructor(e){this.seed=e;}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random();}},o(_Class41,"p"),_Class41),CDe=0,pL=1,NQ=2,HT={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};o(mL,"k");o(DL,"b");o(zQ,"y");o(GQ,"m");o(E2,"w");o(VQ,"x");ADe={randOffset:o(function(t,e){return sr(t,e);},"randOffset"),randOffsetWithRange:o(function(t,e,r){return jT(t,e,r);},"randOffsetWithRange"),ellipse:o(function(t,e,r,n,i){let a=HQ(r,n,i);return EL(t,e,i,a).opset;},"ellipse"),doubleLineOps:o(function(t,e,r,n,i){return Wh(t,e,r,n,i,!0);},"doubleLineOps")};o(UQ,"v");o(YT,"S");o(_De,"O");o(MQ,"L");o(HQ,"T");o(EL,"D");o(IQ,"A");o(OQ,"_");o(gL,"I");o(ym,"C");o(PQ,"z");o(WQ,"W");o(jT,"E");o(sr,"G");o(Wh,"$");o(SL,"R");o(WT,"j");o(KT,"q");o(BQ,"F");o(FQ,"V");o(DDe,"Z");o(S2,"Q");o($Q,"H");o(XT,"N");o(LDe,"B");o(Fd,"J");o(CL,"K");o(RDe,"U");o(QT,"X");o(yL,"Y");io="none",vm=(_Class42=class vm{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options));}static newSeed(){return Math.floor(Math.random()*2**31);}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions;}_d(e,r,n){return{shape:e,sets:r||[],options:n||this.defaultOptions};}line(e,r,n,i,a){let s=this._o(a);return this._d("line",[UQ(e,r,n,i,s)],s);}rectangle(e,r,n,i,a){let s=this._o(a),l=[],u=_De(e,r,n,i,s);if(s.fill){let h=[[e,r],[e+n,r],[e+n,r+i],[e,r+i]];s.fillStyle==="solid"?l.push(gL([h],s)):l.push(ym([h],s));}return s.stroke!==io&&l.push(u),this._d("rectangle",l,s);}ellipse(e,r,n,i,a){let s=this._o(a),l=[],u=HQ(n,i,s),h=EL(e,r,s,u);if(s.fill)if(s.fillStyle==="solid"){let f=EL(e,r,s,u).opset;f.type="fillPath",l.push(f);}else l.push(ym([h.estimatedPoints],s));return s.stroke!==io&&l.push(h.opset),this._d("ellipse",l,s);}circle(e,r,n,i){let a=this.ellipse(e,r,n,n,i);return a.shape="circle",a;}linearPath(e,r){let n=this._o(r);return this._d("linearPath",[YT(e,!1,n)],n);}arc(e,r,n,i,a,s,l=!1,u){let h=this._o(u),f=[],d=IQ(e,r,n,i,a,s,l,!0,h);if(l&&h.fill)if(h.fillStyle==="solid"){let p=Object.assign({},h);p.disableMultiStroke=!0;let m=IQ(e,r,n,i,a,s,!0,!1,p);m.type="fillPath",f.push(m);}else f.push(function(p,m,g,y,v,x,b){let T=p,C=m,w=Math.abs(g/2),E=Math.abs(y/2);w+=sr(.01*w,b),E+=sr(.01*E,b);let _=v,A=x;for(;_<0;)_+=2*Math.PI,A+=2*Math.PI;A-_>2*Math.PI&&(_=0,A=2*Math.PI);let D=(A-_)/b.curveStepCount,O=[];for(let R=_;R<=A;R+=D)O.push([T+w*Math.cos(R),C+E*Math.sin(R)]);return O.push([T+w*Math.cos(A),C+E*Math.sin(A)]),O.push([T,C]),ym([O],b);}(e,r,n,i,a,s,h));return h.stroke!==io&&f.push(d),this._d("arc",f,h);}curve(e,r){let n=this._o(r),i=[],a=MQ(e,n);if(n.fill&&n.fill!==io)if(n.fillStyle==="solid"){let s=MQ(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)});}else{let s=[],l=e;if(l.length){let u=typeof l[0][0]=="number"?[l]:l;for(let h of u)h.length<3?s.push(...h):h.length===3?s.push(...yL($Q([h[0],h[0],h[1],h[2]]),10,(1+n.roughness)/2)):s.push(...yL($Q(h),10,(1+n.roughness)/2));}s.length&&i.push(ym([s],n));}return n.stroke!==io&&i.push(a),this._d("curve",i,n);}polygon(e,r){let n=this._o(r),i=[],a=YT(e,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(gL([e],n)):i.push(ym([e],n))),n.stroke!==io&&i.push(a),this._d("polygon",i,n);}path(e,r){let n=this._o(r),i=[];if(!e)return this._d("path",i,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let a=n.fill&&n.fill!=="transparent"&&n.fill!==io,s=n.stroke!==io,l=!!(n.simplification&&n.simplification<1),u=function(f,d,p){let m=GQ(zQ(DL(f))),g=[],y=[],v=[0,0],x=[],b=o(()=>{x.length>=4&&y.push(...yL(x,d)),x=[];},"i"),T=o(()=>{b(),y.length&&(g.push(y),y=[]);},"c");for(let{key:w,data:E}of m)switch(w){case"M":T(),v=[E[0],E[1]],y.push(v);break;case"L":b(),y.push([E[0],E[1]]);break;case"C":if(!x.length){let _=y.length?y[y.length-1]:v;x.push([_[0],_[1]]);}x.push([E[0],E[1]]),x.push([E[2],E[3]]),x.push([E[4],E[5]]);break;case"Z":b(),y.push([v[0],v[1]]);}if(T(),!p)return g;let C=[];for(let w of g){let E=RDe(w,p);E.length&&C.push(E);}return C;}(e,1,l?4-4*(n.simplification||1):(1+n.roughness)/2),h=OQ(e,n);if(a)if(n.fillStyle==="solid"){if(u.length===1){let f=OQ(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(f.ops)});}else i.push(gL(u,n));}else i.push(ym(u,n));return s&&(l?u.forEach(f=>{i.push(YT(f,!1,n));}):i.push(h)),this._d("path",i,n);}opsToPath(e,r){let n="";for(let i of e.ops){let a=typeof r=="number"&&r>=0?i.data.map(s=>+s.toFixed(r)):i.data;switch(i.op){case"move":n+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":n+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":n+=`L${a[0]} ${a[1]} `;}}return n.trim();}toPaths(e){let r=e.sets||[],n=e.options||this.defaultOptions,i=[];for(let a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:io};break;case"fillPath":s={d:this.opsToPath(a),stroke:io,strokeWidth:0,fill:n.fill||io};break;case"fillSketch":s=this.fillSketch(a,n);}s&&i.push(s);}return i;}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||io,strokeWidth:n,fill:io};}_mergedShape(e){return e.filter((r,n)=>n===0||r.op!=="move");}},o(_Class42,"et"),_Class42),AL=(_Class43=class AL{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new vm(r);}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(let s of r)switch(s.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,s,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";let l=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,a,l),i.restore();break;}case"fillSketch":this.fillSketch(i,s,n);}}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=i,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore();}_drawToContext(e,r,n,i="nonzero"){e.beginPath();for(let a of r.ops){let s=typeof n=="number"&&n>=0?a.data.map(l=>+l.toFixed(n)):a.data;switch(a.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1]);}}r.type==="fillPath"?e.fill(i):e.stroke();}get generator(){return this.gen;}getDefaultOptions(){return this.gen.defaultOptions;}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s),s;}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s),s;}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s),s;}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a),a;}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n),n;}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n),n;}arc(e,r,n,i,a,s,l=!1,u){let h=this.gen.arc(e,r,n,i,a,s,l,u);return this.draw(h),h;}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n),n;}path(e,r){let n=this.gen.path(e,r);return this.draw(n),n;}},o(_Class43,"st"),_Class43),qT="http://www.w3.org/2000/svg",_L=(_Class44=class _L{constructor(e,r){this.svg=e,this.gen=new vm(r);}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(qT,"g"),s=e.options.fixedDecimalPlaceDigits;for(let l of r){let u=null;switch(l.type){case"path":u=i.createElementNS(qT,"path"),u.setAttribute("d",this.opsToPath(l,s)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=i.createElementNS(qT,"path"),u.setAttribute("d",this.opsToPath(l,s)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(i,l,n);}u&&a.appendChild(u);}return a;}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);let a=e.createElementNS(qT,"path");return a.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),a.setAttribute("stroke",n.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),n.fillLineDash&&a.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),a;}get generator(){return this.gen;}getDefaultOptions(){return this.gen.defaultOptions;}opsToPath(e,r){return this.gen.opsToPath(e,r);}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s);}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s);}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s);}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a);}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n);}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n);}arc(e,r,n,i,a,s,l=!1,u){let h=this.gen.arc(e,r,n,i,a,s,l,u);return this.draw(h);}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n);}path(e,r){let n=this.gen.path(e,r);return this.draw(n);}},o(_Class44,"ot"),_Class44),je={canvas:o((t,e)=>new AL(t,e),"canvas"),svg:o((t,e)=>new _L(t,e),"svg"),generator:o(t=>new vm(t),"generator"),newSeed:o(()=>vm.newSeed(),"newSeed")};});function qQ(t,e){let{labelStyles:r}=qe(e);e.labelStyle=r;let n=ot(e),i=n;n||(i="anchor");let a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=1,{cssStyles:l}=e,u=je.svg(a),h=Qe(e,{fill:"black",stroke:"none",fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);let f=u.circle(0,0,s*2,h),d=a.insert(()=>f,":first-child");return d.attr("class","anchor").attr("style",ii(l)),Ke(e,d),e.intersect=function(p){return X.info("Circle intersect",e,s,p),Xe.circle(e,s,p);},a;}var YQ=N(()=>{"use strict";yt();Ft();Ht();Gt();Wt();nr();o(qQ,"anchor");});function XQ(t,e,r,n,i,a,s){let u=(t+r)/2,h=(e+n)/2,f=Math.atan2(n-e,r-t),d=(r-t)/2,p=(n-e)/2,m=d/i,g=p/a,y=Math.sqrt(m**2+g**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");let v=Math.sqrt(1-y**2),x=u+v*a*Math.sin(f)*(s?-1:1),b=h-v*i*Math.cos(f)*(s?-1:1),T=Math.atan2((e-b)/a,(t-x)/i),w=Math.atan2((n-b)/a,(r-x)/i)-T;s&&w<0&&(w+=2*Math.PI),!s&&w>0&&(w-=2*Math.PI);let E=[];for(let _=0;_<20;_++){let A=_/19,D=T+A*w,O=x+i*Math.cos(D),R=b+a*Math.sin(D);E.push({x:O,y:R});}return E;}async function jQ(t,e){let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=a.width+e.padding+20,l=a.height+e.padding,u=l/2,h=u/(2.5+l/50),{cssStyles:f}=e,d=[{x:s/2,y:-l/2},{x:-s/2,y:-l/2},...XQ(-s/2,-l/2,-s/2,l/2,h,u,!1),{x:s/2,y:l/2},...XQ(s/2,l/2,s/2,-l/2,h,u,!0)],p=je.svg(i),m=Qe(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=zt(d),y=p.path(g,m),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${h/2}, 0)`),Ke(e,v),e.intersect=function(x){return Xe.polygon(e,d,x);},i;}var KQ=N(()=>{"use strict";Ft();Ht();Gt();Wt();o(XQ,"generateArcPoints");o(jQ,"bowTieRect");});function Ms(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y;}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")");}var qh=N(()=>{"use strict";o(Ms,"insertPolygonShape");});async function QQ(t,e){let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=a.height+e.padding,l=12,u=a.width+e.padding+l,h=0,f=u,d=-s,p=0,m=[{x:h+l,y:d},{x:f,y:d},{x:f,y:p},{x:h,y:p},{x:h,y:d+l},{x:h+l,y:d}],g,{cssStyles:y}=e;if(e.look==="handDrawn"){let v=je.svg(i),x=Qe(e,{}),b=zt(m),T=v.path(b,x);g=i.insert(()=>T,":first-child").attr("transform",`translate(${-u/2}, ${s/2})`),y&&g.attr("style",y);}else g=Ms(i,u,s,m);return n&&g.attr("style",n),Ke(e,g),e.intersect=function(v){return Xe.polygon(e,m,v);},i;}var ZQ=N(()=>{"use strict";Ft();Ht();Gt();Wt();qh();Ft();o(QQ,"card");});function JQ(t,e){var _e$domId,_e$width;let{nodeStyles:r}=qe(e);e.label="";let n=t.insert("g").attr("class",ot(e)).attr("id",(_e$domId=e.domId)!==null&&_e$domId!==void 0?_e$domId:e.id),{cssStyles:i}=e,a=Math.max(28,(_e$width=e.width)!==null&&_e$width!==void 0?_e$width:0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],l=je.svg(n),u=Qe(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=zt(s),f=l.path(h,u),d=n.insert(()=>f,":first-child");return i&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",i),r&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(p){return Xe.polygon(e,s,p);},n;}var eZ=N(()=>{"use strict";Ht();Wt();Gt();Ft();o(JQ,"choice");});async function tZ(t,e){let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await pt(t,e,ot(e)),l=a.width/2+s,u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=je.svg(i),d=Qe(e,{}),p=f.circle(0,0,l*2,d);u=i.insert(()=>p,":first-child"),u.attr("class","basic label-container").attr("style",ii(h));}else u=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0);return Ke(e,u),e.intersect=function(f){return X.info("Circle intersect",e,l,f),Xe.circle(e,l,f);},i;}var rZ=N(()=>{"use strict";yt();Ft();Ht();Gt();Wt();nr();o(tZ,"circle");});function NDe(t){let e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=t*2,i={x:n/2*e,y:n/2*r},a={x:-(n/2)*e,y:n/2*r},s={x:-(n/2)*e,y:-(n/2)*r},l={x:n/2*e,y:-(n/2)*r};return`M ${a.x},${a.y} L ${l.x},${l.y}
                   M ${i.x},${i.y} L ${s.x},${s.y}`;}function nZ(t,e){var _e$domId2,_e$width2;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r,e.label="";let i=t.insert("g").attr("class",ot(e)).attr("id",(_e$domId2=e.domId)!==null&&_e$domId2!==void 0?_e$domId2:e.id),a=Math.max(30,(_e$width2=e===null||e===void 0?void 0:e.width)!==null&&_e$width2!==void 0?_e$width2:0),{cssStyles:s}=e,l=je.svg(i),u=Qe(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=l.circle(0,0,a*2,u),f=NDe(a),d=l.path(f,u),p=i.insert(()=>h,":first-child");return p.insert(()=>d),s&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",s),n&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",n),Ke(e,p),e.intersect=function(m){return X.info("crossedCircle intersect",e,{radius:a,point:m}),Xe.circle(e,a,m);},i;}var iZ=N(()=>{"use strict";yt();Ft();Gt();Wt();Ht();o(NDe,"createLine");o(nZ,"crossedCircle");});function Yh(t,e,r,n=100,i=0,a=180){let s=[],l=i*Math.PI/180,f=(a*Math.PI/180-l)/(n-1);for(let d=0;d<n;d++){let p=l+d*f,m=t+r*Math.cos(p),g=e+r*Math.sin(p);s.push({x:-m,y:-g});}return s;}async function aZ(t,e){var _e$padding2,_e$padding3,_a$left,_e$padding4,_a$top;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=a.width+((_e$padding2=e.padding)!==null&&_e$padding2!==void 0?_e$padding2:0),u=a.height+((_e$padding3=e.padding)!==null&&_e$padding3!==void 0?_e$padding3:0),h=Math.max(5,u*.1),{cssStyles:f}=e,d=[...Yh(l/2,-u/2,h,30,-90,0),{x:-l/2-h,y:h},...Yh(l/2+h*2,-h,h,20,-180,-270),...Yh(l/2+h*2,h,h,20,-90,-180),{x:-l/2-h,y:-u/2},...Yh(l/2,u/2,h,20,0,90)],p=[{x:l/2,y:-u/2-h},{x:-l/2,y:-u/2-h},...Yh(l/2,-u/2,h,20,-90,0),{x:-l/2-h,y:-h},...Yh(l/2+l*.1,-h,h,20,-180,-270),...Yh(l/2+l*.1,h,h,20,-90,-180),{x:-l/2-h,y:u/2},...Yh(l/2,u/2,h,20,0,90),{x:-l/2,y:u/2+h},{x:l/2,y:u/2+h}],m=je.svg(i),g=Qe(e,{fill:"none"});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let v=zt(d).replace("Z",""),x=m.path(v,g),b=zt(p),T=m.path(b,{...g}),C=i.insert("g",":first-child");return C.insert(()=>T,":first-child").attr("stroke-opacity",0),C.insert(()=>x,":first-child"),C.attr("class","text"),f&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(${h}, 0)`),s.attr("transform",`translate(${-l/2+h-(a.x-((_a$left=a.left)!==null&&_a$left!==void 0?_a$left:0))},${-u/2+((_e$padding4=e.padding)!==null&&_e$padding4!==void 0?_e$padding4:0)/2-(a.y-((_a$top=a.top)!==null&&_a$top!==void 0?_a$top:0))})`),Ke(e,C),e.intersect=function(w){return Xe.polygon(e,p,w);},i;}var sZ=N(()=>{"use strict";Ft();Ht();Gt();Wt();o(Yh,"generateCirclePoints");o(aZ,"curlyBraceLeft");});function Xh(t,e,r,n=100,i=0,a=180){let s=[],l=i*Math.PI/180,f=(a*Math.PI/180-l)/(n-1);for(let d=0;d<n;d++){let p=l+d*f,m=t+r*Math.cos(p),g=e+r*Math.sin(p);s.push({x:m,y:g});}return s;}async function oZ(t,e){var _e$padding5,_e$padding6,_e$padding7,_a$left2,_e$padding8,_a$top2;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=a.width+((_e$padding5=e.padding)!==null&&_e$padding5!==void 0?_e$padding5:0),u=a.height+((_e$padding6=e.padding)!==null&&_e$padding6!==void 0?_e$padding6:0),h=Math.max(5,u*.1),{cssStyles:f}=e,d=[...Xh(l/2,-u/2,h,20,-90,0),{x:l/2+h,y:-h},...Xh(l/2+h*2,-h,h,20,-180,-270),...Xh(l/2+h*2,h,h,20,-90,-180),{x:l/2+h,y:u/2},...Xh(l/2,u/2,h,20,0,90)],p=[{x:-l/2,y:-u/2-h},{x:l/2,y:-u/2-h},...Xh(l/2,-u/2,h,20,-90,0),{x:l/2+h,y:-h},...Xh(l/2+h*2,-h,h,20,-180,-270),...Xh(l/2+h*2,h,h,20,-90,-180),{x:l/2+h,y:u/2},...Xh(l/2,u/2,h,20,0,90),{x:l/2,y:u/2+h},{x:-l/2,y:u/2+h}],m=je.svg(i),g=Qe(e,{fill:"none"});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let v=zt(d).replace("Z",""),x=m.path(v,g),b=zt(p),T=m.path(b,{...g}),C=i.insert("g",":first-child");return C.insert(()=>T,":first-child").attr("stroke-opacity",0),C.insert(()=>x,":first-child"),C.attr("class","text"),f&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(${-h}, 0)`),s.attr("transform",`translate(${-l/2+((_e$padding7=e.padding)!==null&&_e$padding7!==void 0?_e$padding7:0)/2-(a.x-((_a$left2=a.left)!==null&&_a$left2!==void 0?_a$left2:0))},${-u/2+((_e$padding8=e.padding)!==null&&_e$padding8!==void 0?_e$padding8:0)/2-(a.y-((_a$top2=a.top)!==null&&_a$top2!==void 0?_a$top2:0))})`),Ke(e,C),e.intersect=function(w){return Xe.polygon(e,p,w);},i;}var lZ=N(()=>{"use strict";Ft();Ht();Gt();Wt();o(Xh,"generateCirclePoints");o(oZ,"curlyBraceRight");});function Ra(t,e,r,n=100,i=0,a=180){let s=[],l=i*Math.PI/180,f=(a*Math.PI/180-l)/(n-1);for(let d=0;d<n;d++){let p=l+d*f,m=t+r*Math.cos(p),g=e+r*Math.sin(p);s.push({x:-m,y:-g});}return s;}async function cZ(t,e){var _e$padding9,_e$padding0,_e$padding1,_a$left3,_e$padding10,_a$top3;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=a.width+((_e$padding9=e.padding)!==null&&_e$padding9!==void 0?_e$padding9:0),u=a.height+((_e$padding0=e.padding)!==null&&_e$padding0!==void 0?_e$padding0:0),h=Math.max(5,u*.1),{cssStyles:f}=e,d=[...Ra(l/2,-u/2,h,30,-90,0),{x:-l/2-h,y:h},...Ra(l/2+h*2,-h,h,20,-180,-270),...Ra(l/2+h*2,h,h,20,-90,-180),{x:-l/2-h,y:-u/2},...Ra(l/2,u/2,h,20,0,90)],p=[...Ra(-l/2+h+h/2,-u/2,h,20,-90,-180),{x:l/2-h/2,y:h},...Ra(-l/2-h/2,-h,h,20,0,90),...Ra(-l/2-h/2,h,h,20,-90,0),{x:l/2-h/2,y:-h},...Ra(-l/2+h+h/2,u/2,h,30,-180,-270)],m=[{x:l/2,y:-u/2-h},{x:-l/2,y:-u/2-h},...Ra(l/2,-u/2,h,20,-90,0),{x:-l/2-h,y:-h},...Ra(l/2+h*2,-h,h,20,-180,-270),...Ra(l/2+h*2,h,h,20,-90,-180),{x:-l/2-h,y:u/2},...Ra(l/2,u/2,h,20,0,90),{x:-l/2,y:u/2+h},{x:l/2-h-h/2,y:u/2+h},...Ra(-l/2+h+h/2,-u/2,h,20,-90,-180),{x:l/2-h/2,y:h},...Ra(-l/2-h/2,-h,h,20,0,90),...Ra(-l/2-h/2,h,h,20,-90,0),{x:l/2-h/2,y:-h},...Ra(-l/2+h+h/2,u/2,h,30,-180,-270)],g=je.svg(i),y=Qe(e,{fill:"none"});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=zt(d).replace("Z",""),b=g.path(x,y),C=zt(p).replace("Z",""),w=g.path(C,y),E=zt(m),_=g.path(E,{...y}),A=i.insert("g",":first-child");return A.insert(()=>_,":first-child").attr("stroke-opacity",0),A.insert(()=>b,":first-child"),A.insert(()=>w,":first-child"),A.attr("class","text"),f&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(${h-h/4}, 0)`),s.attr("transform",`translate(${-l/2+((_e$padding1=e.padding)!==null&&_e$padding1!==void 0?_e$padding1:0)/2-(a.x-((_a$left3=a.left)!==null&&_a$left3!==void 0?_a$left3:0))},${-u/2+((_e$padding10=e.padding)!==null&&_e$padding10!==void 0?_e$padding10:0)/2-(a.y-((_a$top3=a.top)!==null&&_a$top3!==void 0?_a$top3:0))})`),Ke(e,A),e.intersect=function(D){return Xe.polygon(e,m,D);},i;}var uZ=N(()=>{"use strict";Ft();Ht();Gt();Wt();o(Ra,"generateCirclePoints");o(cZ,"curlyBraces");});async function hZ(t,e){var _e$padding11,_e$width3,_e$padding12,_e$height;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=80,l=20,u=Math.max(s,(a.width+((_e$padding11=e.padding)!==null&&_e$padding11!==void 0?_e$padding11:0)*2)*1.25,(_e$width3=e===null||e===void 0?void 0:e.width)!==null&&_e$width3!==void 0?_e$width3:0),h=Math.max(l,a.height+((_e$padding12=e.padding)!==null&&_e$padding12!==void 0?_e$padding12:0)*2,(_e$height=e===null||e===void 0?void 0:e.height)!==null&&_e$height!==void 0?_e$height:0),f=h/2,{cssStyles:d}=e,p=je.svg(i),m=Qe(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=u,y=h,v=g-f,x=y/4,b=[{x:v,y:0},{x,y:0},{x:0,y:y/2},{x,y},{x:v,y},...Bd(-v,-y/2,f,50,270,90)],T=zt(b),C=p.path(T,m),w=i.insert(()=>C,":first-child");return w.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",n),w.attr("transform",`translate(${-u/2}, ${-h/2})`),Ke(e,w),e.intersect=function(E){return Xe.polygon(e,b,E);},i;}var fZ=N(()=>{"use strict";Ft();Ht();Gt();Wt();o(hZ,"curvedTrapezoid");});async function dZ(t,e){var _e$width4,_e$height2,_a$left4,_e$padding13,_a$top4;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=Math.max(a.width+e.padding,(_e$width4=e.width)!==null&&_e$width4!==void 0?_e$width4:0),u=l/2,h=u/(2.5+l/50),f=Math.max(a.height+h+e.padding,(_e$height2=e.height)!==null&&_e$height2!==void 0?_e$height2:0),d,{cssStyles:p}=e;if(e.look==="handDrawn"){let m=je.svg(i),g=IDe(0,0,l,f,u,h),y=ODe(0,h,l,f,u,h),v=m.path(g,Qe(e,{})),x=m.path(y,Qe(e,{fill:"none"}));d=i.insert(()=>x,":first-child"),d=i.insert(()=>v,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p);}else{let m=MDe(0,0,l,f,u,h);d=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",ii(p)).attr("style",n);}return d.attr("label-offset-y",h),d.attr("transform",`translate(${-l/2}, ${-(f/2+h)})`),Ke(e,d),s.attr("transform",`translate(${-(a.width/2)-(a.x-((_a$left4=a.left)!==null&&_a$left4!==void 0?_a$left4:0))}, ${-(a.height/2)+((_e$padding13=e.padding)!==null&&_e$padding13!==void 0?_e$padding13:0)/1.5-(a.y-((_a$top4=a.top)!==null&&_a$top4!==void 0?_a$top4:0))})`),e.intersect=function(m){var _e$x,_e$width5,_e$width6,_e$y,_e$height3;let g=Xe.rect(e,m),y=g.x-((_e$x=e.x)!==null&&_e$x!==void 0?_e$x:0);if(u!=0&&(Math.abs(y)<((_e$width5=e.width)!==null&&_e$width5!==void 0?_e$width5:0)/2||Math.abs(y)==((_e$width6=e.width)!==null&&_e$width6!==void 0?_e$width6:0)/2&&Math.abs(g.y-((_e$y=e.y)!==null&&_e$y!==void 0?_e$y:0))>((_e$height3=e.height)!==null&&_e$height3!==void 0?_e$height3:0)/2-h)){var _e$y2;let v=h*h*(1-y*y/(u*u));v>0&&(v=Math.sqrt(v)),v=h-v,m.y-((_e$y2=e.y)!==null&&_e$y2!==void 0?_e$y2:0)>0&&(v=-v),g.y+=v;}return g;},i;}var MDe,IDe,ODe,pZ=N(()=>{"use strict";Ft();Ht();Gt();Wt();nr();MDe=o((t,e,r,n,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),IDe=o((t,e,r,n,i,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),ODe=o((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");o(dZ,"cylinder");});async function mZ(t,e){var _e$padding14,_a$left5,_e$padding15,_a$top5;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=a.width+e.padding,u=a.height+e.padding,h=u*.2,f=-l/2,d=-u/2-h/2,{cssStyles:p}=e,m=je.svg(i),g=Qe(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:f,y:d+h},{x:-f,y:d+h},{x:-f,y:-d},{x:f,y:-d},{x:f,y:d},{x:-f,y:d},{x:-f,y:d+h}],v=m.polygon(y.map(b=>[b.x,b.y]),g),x=i.insert(()=>v,":first-child");return x.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),s.attr("transform",`translate(${f+((_e$padding14=e.padding)!==null&&_e$padding14!==void 0?_e$padding14:0)/2-(a.x-((_a$left5=a.left)!==null&&_a$left5!==void 0?_a$left5:0))}, ${d+h+((_e$padding15=e.padding)!==null&&_e$padding15!==void 0?_e$padding15:0)/2-(a.y-((_a$top5=a.top)!==null&&_a$top5!==void 0?_a$top5:0))})`),Ke(e,x),e.intersect=function(b){return Xe.rect(e,b);},i;}var gZ=N(()=>{"use strict";Ft();Ht();Gt();Wt();o(mZ,"dividedRectangle");});async function yZ(t,e){let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await pt(t,e,ot(e)),u=a.width/2+s+5,h=a.width/2+s,f,{cssStyles:d}=e;if(e.look==="handDrawn"){var _f$node,_f$node2;let p=je.svg(i),m=Qe(e,{roughness:.2,strokeWidth:2.5}),g=Qe(e,{roughness:.2,strokeWidth:1.5}),y=p.circle(0,0,u*2,m),v=p.circle(0,0,h*2,g);f=i.insert("g",":first-child"),f.attr("class",ii(e.cssClasses)).attr("style",ii(d)),(_f$node=f.node())!==null&&_f$node!==void 0&&_f$node.appendChild(y),(_f$node2=f.node())===null||_f$node2===void 0?void 0:_f$node2.appendChild(v);}else{f=i.insert("g",":first-child");let p=f.insert("circle",":first-child"),m=f.insert("circle");f.attr("class","basic label-container").attr("style",n),p.attr("class","outer-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0);}return Ke(e,f),e.intersect=function(p){return X.info("DoubleCircle intersect",e,u,p),Xe.circle(e,u,p);},i;}var vZ=N(()=>{"use strict";yt();Ft();Ht();Gt();Wt();nr();o(yZ,"doublecircle");});function xZ(t,e,{config:{themeVariables:r}}){var _e$domId3;let{labelStyles:n,nodeStyles:i}=qe(e);e.label="",e.labelStyle=n;let a=t.insert("g").attr("class",ot(e)).attr("id",(_e$domId3=e.domId)!==null&&_e$domId3!==void 0?_e$domId3:e.id),s=7,{cssStyles:l}=e,u=je.svg(a),{nodeBorder:h}=r,f=Qe(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(f.roughness=0);let d=u.circle(0,0,s*2,f),p=a.insert(()=>d,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),l&&l.length>0&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",l),i&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",i),Ke(e,p),e.intersect=function(m){return X.info("filledCircle intersect",e,{radius:s,point:m}),Xe.circle(e,s,m);},a;}var bZ=N(()=>{"use strict";Wt();yt();Ht();Gt();Ft();o(xZ,"filledCircle");});async function TZ(t,e){var _e$padding16,_a$left6,_e$padding17,_a$top6;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=a.width+((_e$padding16=e.padding)!==null&&_e$padding16!==void 0?_e$padding16:0),u=l+a.height,h=l+a.height,f=[{x:0,y:-u},{x:h,y:-u},{x:h/2,y:0}],{cssStyles:d}=e,p=je.svg(i),m=Qe(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=zt(f),y=p.path(g,m),v=i.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return d&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),e.width=l,e.height=u,Ke(e,v),s.attr("transform",`translate(${-a.width/2-(a.x-((_a$left6=a.left)!==null&&_a$left6!==void 0?_a$left6:0))}, ${-u/2+((_e$padding17=e.padding)!==null&&_e$padding17!==void 0?_e$padding17:0)/2+(a.y-((_a$top6=a.top)!==null&&_a$top6!==void 0?_a$top6:0))})`),e.intersect=function(x){return X.info("Triangle intersect",e,f,x),Xe.polygon(e,f,x);},i;}var wZ=N(()=>{"use strict";yt();Ft();Ht();Gt();Wt();Ft();o(TZ,"flippedTriangle");});function kZ(t,e,{dir:r,config:{state:n,themeVariables:i}}){var _e$domId4,_e$width7,_e$height4,_e$width8,_e$height5,_n$padding;let{nodeStyles:a}=qe(e);e.label="";let s=t.insert("g").attr("class",ot(e)).attr("id",(_e$domId4=e.domId)!==null&&_e$domId4!==void 0?_e$domId4:e.id),{cssStyles:l}=e,u=Math.max(70,(_e$width7=e===null||e===void 0?void 0:e.width)!==null&&_e$width7!==void 0?_e$width7:0),h=Math.max(10,(_e$height4=e===null||e===void 0?void 0:e.height)!==null&&_e$height4!==void 0?_e$height4:0);r==="LR"&&(u=Math.max(10,(_e$width8=e===null||e===void 0?void 0:e.width)!==null&&_e$width8!==void 0?_e$width8:0),h=Math.max(70,(_e$height5=e===null||e===void 0?void 0:e.height)!==null&&_e$height5!==void 0?_e$height5:0));let f=-1*u/2,d=-1*h/2,p=je.svg(s),m=Qe(e,{stroke:i.lineColor,fill:i.lineColor});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=p.rectangle(f,d,u,h,m),y=s.insert(()=>g,":first-child");l&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",l),a&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",a),Ke(e,y);let v=(_n$padding=n===null||n===void 0?void 0:n.padding)!==null&&_n$padding!==void 0?_n$padding:0;return e.width&&e.height&&(e.width+=v/2||0,e.height+=v/2||0),e.intersect=function(x){return Xe.rect(e,x);},s;}var EZ=N(()=>{"use strict";Wt();Ht();Gt();Ft();o(kZ,"forkJoin");});async function SZ(t,e){var _e$padding18,_e$width9,_e$padding19,_e$height6;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let i=80,a=50,{shapeSvg:s,bbox:l}=await pt(t,e,ot(e)),u=Math.max(i,l.width+((_e$padding18=e.padding)!==null&&_e$padding18!==void 0?_e$padding18:0)*2,(_e$width9=e===null||e===void 0?void 0:e.width)!==null&&_e$width9!==void 0?_e$width9:0),h=Math.max(a,l.height+((_e$padding19=e.padding)!==null&&_e$padding19!==void 0?_e$padding19:0)*2,(_e$height6=e===null||e===void 0?void 0:e.height)!==null&&_e$height6!==void 0?_e$height6:0),f=h/2,{cssStyles:d}=e,p=je.svg(s),m=Qe(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:-u/2,y:-h/2},{x:u/2-f,y:-h/2},...Bd(-u/2+f,0,f,50,90,270),{x:u/2-f,y:h/2},{x:-u/2,y:h/2}],y=zt(g),v=p.path(y,m),x=s.insert(()=>v,":first-child");return x.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),Ke(e,x),e.intersect=function(b){return X.info("Pill intersect",e,{radius:f,point:b}),Xe.polygon(e,g,b);},s;}var CZ=N(()=>{"use strict";yt();Ft();Ht();Gt();Wt();o(SZ,"halfRoundedRectangle");});async function AZ(t,e){var _e$padding20,_e$padding21;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=a.height+((_e$padding20=e.padding)!==null&&_e$padding20!==void 0?_e$padding20:0),l=a.width+((_e$padding21=e.padding)!==null&&_e$padding21!==void 0?_e$padding21:0)*2.5,{cssStyles:u}=e,h=je.svg(i),f=Qe(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=l/2,p=d/6;d=d+p;let m=s/2,g=m/2,y=d-g,v=[{x:-y,y:-m},{x:0,y:-m},{x:y,y:-m},{x:d,y:0},{x:y,y:m},{x:0,y:m},{x:-y,y:m},{x:-d,y:0}],x=zt(v),b=h.path(x,f),T=i.insert(()=>b,":first-child");return T.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",u),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),e.width=l,e.height=s,Ke(e,T),e.intersect=function(C){return Xe.polygon(e,v,C);},i;}var _Z=N(()=>{"use strict";Ft();Ht();Gt();Wt();o(AZ,"hexagon");});async function DZ(t,e){var _e$width0,_e$height7;let{labelStyles:r,nodeStyles:n}=qe(e);e.label="",e.labelStyle=r;let{shapeSvg:i}=await pt(t,e,ot(e)),a=Math.max(30,(_e$width0=e===null||e===void 0?void 0:e.width)!==null&&_e$width0!==void 0?_e$width0:0),s=Math.max(30,(_e$height7=e===null||e===void 0?void 0:e.height)!==null&&_e$height7!==void 0?_e$height7:0),{cssStyles:l}=e,u=je.svg(i),h=Qe(e,{});e.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let f=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],d=zt(f),p=u.path(d,h),m=i.insert(()=>p,":first-child");return m.attr("class","basic label-container"),l&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),n&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-a/2}, ${-s/2})`),Ke(e,m),e.intersect=function(g){return X.info("Pill intersect",e,{points:f}),Xe.polygon(e,f,g);},i;}var LZ=N(()=>{"use strict";yt();Ft();Ht();Gt();Wt();o(DZ,"hourglass");});async function RZ(t,e,{config:{themeVariables:r,flowchart:n}}){var _e$assetHeight,_e$assetWidth,_f$left;let{labelStyles:i}=qe(e);e.labelStyle=i;let a=(_e$assetHeight=e.assetHeight)!==null&&_e$assetHeight!==void 0?_e$assetHeight:48,s=(_e$assetWidth=e.assetWidth)!==null&&_e$assetWidth!==void 0?_e$assetWidth:48,l=Math.max(a,s),u=n===null||n===void 0?void 0:n.wrappingWidth;e.width=Math.max(l,u!==null&&u!==void 0?u:0);let{shapeSvg:h,bbox:f,label:d}=await pt(t,e,"icon-shape default"),p=e.pos==="t",m=l,g=l,{nodeBorder:y}=r,{stylesMap:v}=vc(e),x=-g/2,b=-m/2,T=e.label?8:0,C=je.svg(h),w=Qe(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let E=C.rectangle(x,b,g,m,w),_=Math.max(g,f.width),A=m+f.height+T,D=C.rectangle(-_/2,-A/2,_,A,{...w,fill:"transparent",stroke:"none"}),O=h.insert(()=>E,":first-child"),R=h.insert(()=>D);if(e.icon){var _v$get;let k=h.append("g");k.html(`<g>${await Es(e.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);let L=k.node().getBBox(),S=L.width,I=L.height,M=L.x,P=L.y;k.attr("transform",`translate(${-S/2-M},${p?f.height/2+T/2-I/2-P:-f.height/2-T/2-I/2-P})`),k.attr("style",`color: ${(_v$get=v.get("stroke"))!==null&&_v$get!==void 0?_v$get:y};`);}return d.attr("transform",`translate(${-f.width/2-(f.x-((_f$left=f.left)!==null&&_f$left!==void 0?_f$left:0))},${p?-A/2:A/2-f.height})`),O.attr("transform",`translate(0,${p?f.height/2+T/2:-f.height/2-T/2})`),Ke(e,R),e.intersect=function(k){var _e$x2,_e$y3,_e$height8;if(X.info("iconSquare intersect",e,k),!e.label)return Xe.rect(e,k);let L=(_e$x2=e.x)!==null&&_e$x2!==void 0?_e$x2:0,S=(_e$y3=e.y)!==null&&_e$y3!==void 0?_e$y3:0,I=(_e$height8=e.height)!==null&&_e$height8!==void 0?_e$height8:0,M=[];return p?M=[{x:L-f.width/2,y:S-I/2},{x:L+f.width/2,y:S-I/2},{x:L+f.width/2,y:S-I/2+f.height+T},{x:L+g/2,y:S-I/2+f.height+T},{x:L+g/2,y:S+I/2},{x:L-g/2,y:S+I/2},{x:L-g/2,y:S-I/2+f.height+T},{x:L-f.width/2,y:S-I/2+f.height+T}]:M=[{x:L-g/2,y:S-I/2},{x:L+g/2,y:S-I/2},{x:L+g/2,y:S-I/2+m},{x:L+f.width/2,y:S-I/2+m},{x:L+f.width/2/2,y:S+I/2},{x:L-f.width/2,y:S+I/2},{x:L-f.width/2,y:S-I/2+m},{x:L-g/2,y:S-I/2+m}],Xe.polygon(e,M,k);},h;}var NZ=N(()=>{"use strict";Wt();yt();rc();Ht();Gt();Ft();o(RZ,"icon");});async function MZ(t,e,{config:{themeVariables:r,flowchart:n}}){var _e$assetHeight2,_e$assetWidth2,_x$get,_f$left2;let{labelStyles:i}=qe(e);e.labelStyle=i;let a=(_e$assetHeight2=e.assetHeight)!==null&&_e$assetHeight2!==void 0?_e$assetHeight2:48,s=(_e$assetWidth2=e.assetWidth)!==null&&_e$assetWidth2!==void 0?_e$assetWidth2:48,l=Math.max(a,s),u=n===null||n===void 0?void 0:n.wrappingWidth;e.width=Math.max(l,u!==null&&u!==void 0?u:0);let{shapeSvg:h,bbox:f,label:d}=await pt(t,e,"icon-shape default"),p=20,m=e.label?8:0,g=e.pos==="t",{nodeBorder:y,mainBkg:v}=r,{stylesMap:x}=vc(e),b=je.svg(h),T=Qe(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let C=x.get("fill");T.stroke=C!==null&&C!==void 0?C:v;let w=h.append("g");e.icon&&w.html(`<g>${await Es(e.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);let E=w.node().getBBox(),_=E.width,A=E.height,D=E.x,O=E.y,R=Math.max(_,A)*Math.SQRT2+p*2,k=b.circle(0,0,R,T),L=Math.max(R,f.width),S=R+f.height+m,I=b.rectangle(-L/2,-S/2,L,S,{...T,fill:"transparent",stroke:"none"}),M=h.insert(()=>k,":first-child"),P=h.insert(()=>I);return w.attr("transform",`translate(${-_/2-D},${g?f.height/2+m/2-A/2-O:-f.height/2-m/2-A/2-O})`),w.attr("style",`color: ${(_x$get=x.get("stroke"))!==null&&_x$get!==void 0?_x$get:y};`),d.attr("transform",`translate(${-f.width/2-(f.x-((_f$left2=f.left)!==null&&_f$left2!==void 0?_f$left2:0))},${g?-S/2:S/2-f.height})`),M.attr("transform",`translate(0,${g?f.height/2+m/2:-f.height/2-m/2})`),Ke(e,P),e.intersect=function(B){return X.info("iconSquare intersect",e,B),Xe.rect(e,B);},h;}var IZ=N(()=>{"use strict";Wt();yt();rc();Ht();Gt();Ft();o(MZ,"iconCircle");});var Is,$d=N(()=>{"use strict";Is=o((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD");});async function OZ(t,e,{config:{themeVariables:r,flowchart:n}}){var _e$assetHeight3,_e$assetWidth3,_f$left3;let{labelStyles:i}=qe(e);e.labelStyle=i;let a=(_e$assetHeight3=e.assetHeight)!==null&&_e$assetHeight3!==void 0?_e$assetHeight3:48,s=(_e$assetWidth3=e.assetWidth)!==null&&_e$assetWidth3!==void 0?_e$assetWidth3:48,l=Math.max(a,s),u=n===null||n===void 0?void 0:n.wrappingWidth;e.width=Math.max(l,u!==null&&u!==void 0?u:0);let{shapeSvg:h,bbox:f,halfPadding:d,label:p}=await pt(t,e,"icon-shape default"),m=e.pos==="t",g=l+d*2,y=l+d*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:b}=vc(e),T=-y/2,C=-g/2,w=e.label?8:0,E=je.svg(h),_=Qe(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let A=b.get("fill");_.stroke=A!==null&&A!==void 0?A:x;let D=E.path(Is(T,C,y,g,5),_),O=Math.max(y,f.width),R=g+f.height+w,k=E.rectangle(-O/2,-R/2,O,R,{..._,fill:"transparent",stroke:"none"}),L=h.insert(()=>D,":first-child").attr("class","icon-shape2"),S=h.insert(()=>k);if(e.icon){var _b$get;let I=h.append("g");I.html(`<g>${await Es(e.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);let M=I.node().getBBox(),P=M.width,B=M.height,F=M.x,z=M.y;I.attr("transform",`translate(${-P/2-F},${m?f.height/2+w/2-B/2-z:-f.height/2-w/2-B/2-z})`),I.attr("style",`color: ${(_b$get=b.get("stroke"))!==null&&_b$get!==void 0?_b$get:v};`);}return p.attr("transform",`translate(${-f.width/2-(f.x-((_f$left3=f.left)!==null&&_f$left3!==void 0?_f$left3:0))},${m?-R/2:R/2-f.height})`),L.attr("transform",`translate(0,${m?f.height/2+w/2:-f.height/2-w/2})`),Ke(e,S),e.intersect=function(I){var _e$x3,_e$y4,_e$height9;if(X.info("iconSquare intersect",e,I),!e.label)return Xe.rect(e,I);let M=(_e$x3=e.x)!==null&&_e$x3!==void 0?_e$x3:0,P=(_e$y4=e.y)!==null&&_e$y4!==void 0?_e$y4:0,B=(_e$height9=e.height)!==null&&_e$height9!==void 0?_e$height9:0,F=[];return m?F=[{x:M-f.width/2,y:P-B/2},{x:M+f.width/2,y:P-B/2},{x:M+f.width/2,y:P-B/2+f.height+w},{x:M+y/2,y:P-B/2+f.height+w},{x:M+y/2,y:P+B/2},{x:M-y/2,y:P+B/2},{x:M-y/2,y:P-B/2+f.height+w},{x:M-f.width/2,y:P-B/2+f.height+w}]:F=[{x:M-y/2,y:P-B/2},{x:M+y/2,y:P-B/2},{x:M+y/2,y:P-B/2+g},{x:M+f.width/2,y:P-B/2+g},{x:M+f.width/2/2,y:P+B/2},{x:M-f.width/2,y:P+B/2},{x:M-f.width/2,y:P-B/2+g},{x:M-y/2,y:P-B/2+g}],Xe.polygon(e,F,I);},h;}var PZ=N(()=>{"use strict";Wt();yt();rc();Ht();Gt();$d();Ft();o(OZ,"iconRounded");});async function BZ(t,e,{config:{themeVariables:r,flowchart:n}}){var _e$assetHeight4,_e$assetWidth4,_f$left4;let{labelStyles:i}=qe(e);e.labelStyle=i;let a=(_e$assetHeight4=e.assetHeight)!==null&&_e$assetHeight4!==void 0?_e$assetHeight4:48,s=(_e$assetWidth4=e.assetWidth)!==null&&_e$assetWidth4!==void 0?_e$assetWidth4:48,l=Math.max(a,s),u=n===null||n===void 0?void 0:n.wrappingWidth;e.width=Math.max(l,u!==null&&u!==void 0?u:0);let{shapeSvg:h,bbox:f,halfPadding:d,label:p}=await pt(t,e,"icon-shape default"),m=e.pos==="t",g=l+d*2,y=l+d*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:b}=vc(e),T=-y/2,C=-g/2,w=e.label?8:0,E=je.svg(h),_=Qe(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let A=b.get("fill");_.stroke=A!==null&&A!==void 0?A:x;let D=E.path(Is(T,C,y,g,.1),_),O=Math.max(y,f.width),R=g+f.height+w,k=E.rectangle(-O/2,-R/2,O,R,{..._,fill:"transparent",stroke:"none"}),L=h.insert(()=>D,":first-child"),S=h.insert(()=>k);if(e.icon){var _b$get2;let I=h.append("g");I.html(`<g>${await Es(e.icon,{height:l,width:l,fallbackPrefix:""})}</g>`);let M=I.node().getBBox(),P=M.width,B=M.height,F=M.x,z=M.y;I.attr("transform",`translate(${-P/2-F},${m?f.height/2+w/2-B/2-z:-f.height/2-w/2-B/2-z})`),I.attr("style",`color: ${(_b$get2=b.get("stroke"))!==null&&_b$get2!==void 0?_b$get2:v};`);}return p.attr("transform",`translate(${-f.width/2-(f.x-((_f$left4=f.left)!==null&&_f$left4!==void 0?_f$left4:0))},${m?-R/2:R/2-f.height})`),L.attr("transform",`translate(0,${m?f.height/2+w/2:-f.height/2-w/2})`),Ke(e,S),e.intersect=function(I){var _e$x4,_e$y5,_e$height0;if(X.info("iconSquare intersect",e,I),!e.label)return Xe.rect(e,I);let M=(_e$x4=e.x)!==null&&_e$x4!==void 0?_e$x4:0,P=(_e$y5=e.y)!==null&&_e$y5!==void 0?_e$y5:0,B=(_e$height0=e.height)!==null&&_e$height0!==void 0?_e$height0:0,F=[];return m?F=[{x:M-f.width/2,y:P-B/2},{x:M+f.width/2,y:P-B/2},{x:M+f.width/2,y:P-B/2+f.height+w},{x:M+y/2,y:P-B/2+f.height+w},{x:M+y/2,y:P+B/2},{x:M-y/2,y:P+B/2},{x:M-y/2,y:P-B/2+f.height+w},{x:M-f.width/2,y:P-B/2+f.height+w}]:F=[{x:M-y/2,y:P-B/2},{x:M+y/2,y:P-B/2},{x:M+y/2,y:P-B/2+g},{x:M+f.width/2,y:P-B/2+g},{x:M+f.width/2/2,y:P+B/2},{x:M-f.width/2,y:P+B/2},{x:M-f.width/2,y:P-B/2+g},{x:M-y/2,y:P-B/2+g}],Xe.polygon(e,F,I);},h;}var FZ=N(()=>{"use strict";Wt();yt();rc();Ht();$d();Gt();Ft();o(BZ,"iconSquare");});async function $Z(t,e,{config:{flowchart:r}}){var _e$img,_e$assetWidth5,_e$assetHeight5,_p$left;let n=new Image();n.src=(_e$img=e===null||e===void 0?void 0:e.img)!==null&&_e$img!==void 0?_e$img:"",await n.decode();let i=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/a;let{labelStyles:s}=qe(e);e.labelStyle=s;let l=r===null||r===void 0?void 0:r.wrappingWidth;e.defaultWidth=r===null||r===void 0?void 0:r.wrappingWidth;let u=Math.max(e.label?l!==null&&l!==void 0?l:0:0,(_e$assetWidth5=e===null||e===void 0?void 0:e.assetWidth)!==null&&_e$assetWidth5!==void 0?_e$assetWidth5:i),h=e.constraint==="on"&&e!==null&&e!==void 0&&e.assetHeight?e.assetHeight*e.imageAspectRatio:u,f=e.constraint==="on"?h/e.imageAspectRatio:(_e$assetHeight5=e===null||e===void 0?void 0:e.assetHeight)!==null&&_e$assetHeight5!==void 0?_e$assetHeight5:a;e.width=Math.max(h,l!==null&&l!==void 0?l:0);let{shapeSvg:d,bbox:p,label:m}=await pt(t,e,"image-shape default"),g=e.pos==="t",y=-h/2,v=-f/2,x=e.label?8:0,b=je.svg(d),T=Qe(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let C=b.rectangle(y,v,h,f,T),w=Math.max(h,p.width),E=f+p.height+x,_=b.rectangle(-w/2,-E/2,w,E,{...T,fill:"none",stroke:"none"}),A=d.insert(()=>C,":first-child"),D=d.insert(()=>_);if(e.img){let O=d.append("image");O.attr("href",e.img),O.attr("width",h),O.attr("height",f),O.attr("preserveAspectRatio","none"),O.attr("transform",`translate(${-h/2},${g?E/2-f:-E/2})`);}return m.attr("transform",`translate(${-p.width/2-(p.x-((_p$left=p.left)!==null&&_p$left!==void 0?_p$left:0))},${g?-f/2-p.height/2-x/2:f/2-p.height/2+x/2})`),A.attr("transform",`translate(0,${g?p.height/2+x/2:-p.height/2-x/2})`),Ke(e,D),e.intersect=function(O){var _e$x5,_e$y6,_e$height1;if(X.info("iconSquare intersect",e,O),!e.label)return Xe.rect(e,O);let R=(_e$x5=e.x)!==null&&_e$x5!==void 0?_e$x5:0,k=(_e$y6=e.y)!==null&&_e$y6!==void 0?_e$y6:0,L=(_e$height1=e.height)!==null&&_e$height1!==void 0?_e$height1:0,S=[];return g?S=[{x:R-p.width/2,y:k-L/2},{x:R+p.width/2,y:k-L/2},{x:R+p.width/2,y:k-L/2+p.height+x},{x:R+h/2,y:k-L/2+p.height+x},{x:R+h/2,y:k+L/2},{x:R-h/2,y:k+L/2},{x:R-h/2,y:k-L/2+p.height+x},{x:R-p.width/2,y:k-L/2+p.height+x}]:S=[{x:R-h/2,y:k-L/2},{x:R+h/2,y:k-L/2},{x:R+h/2,y:k-L/2+f},{x:R+p.width/2,y:k-L/2+f},{x:R+p.width/2/2,y:k+L/2},{x:R-p.width/2,y:k+L/2},{x:R-p.width/2,y:k-L/2+f},{x:R-h/2,y:k-L/2+f}],Xe.polygon(e,S,O);},d;}var zZ=N(()=>{"use strict";Wt();yt();Ht();Gt();Ft();o($Z,"imageSquare");});async function GZ(t,e){var _e$padding22,_e$width1,_e$padding23,_e$height10;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=Math.max(a.width+((_e$padding22=e.padding)!==null&&_e$padding22!==void 0?_e$padding22:0)*2,(_e$width1=e===null||e===void 0?void 0:e.width)!==null&&_e$width1!==void 0?_e$width1:0),l=Math.max(a.height+((_e$padding23=e.padding)!==null&&_e$padding23!==void 0?_e$padding23:0)*2,(_e$height10=e===null||e===void 0?void 0:e.height)!==null&&_e$height10!==void 0?_e$height10:0),u=[{x:0,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:-3*l/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=je.svg(i),p=Qe(e,{}),m=zt(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f);}else h=Ms(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Ke(e,h),e.intersect=function(d){return Xe.polygon(e,u,d);},i;}var VZ=N(()=>{"use strict";Ft();Ht();Gt();Wt();qh();o(GZ,"inv_trapezoid");});async function zd(t,e,r){let{labelStyles:n,nodeStyles:i}=qe(e);e.labelStyle=n;let{shapeSvg:a,bbox:s}=await pt(t,e,ot(e)),l=Math.max(s.width+r.labelPaddingX*2,(e===null||e===void 0?void 0:e.width)||0),u=Math.max(s.height+r.labelPaddingY*2,(e===null||e===void 0?void 0:e.height)||0),h=-l/2,f=-u/2,d,{rx:p,ry:m}=e,{cssStyles:g}=e;if(r!==null&&r!==void 0&&r.rx&&r.ry&&(p=r.rx,m=r.ry),e.look==="handDrawn"){let y=je.svg(a),v=Qe(e,{}),x=p||m?y.path(Is(h,f,l,u,p||0),v):y.rectangle(h,f,l,u,v);d=a.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",ii(g));}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",i).attr("rx",ii(p)).attr("ry",ii(m)).attr("x",h).attr("y",f).attr("width",l).attr("height",u);return Ke(e,d),e.intersect=function(y){return Xe.rect(e,y);},a;}var _2=N(()=>{"use strict";Ft();Ht();$d();Gt();Wt();nr();o(zd,"drawRect");});async function UZ(t,e){var _n$left,_n$top;let{shapeSvg:r,bbox:n,label:i}=await pt(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-((_n$left=n.left)!==null&&_n$left!==void 0?_n$left:0))}, ${-(n.height/2)-(n.y-((_n$top=n.top)!==null&&_n$top!==void 0?_n$top:0))})`),Ke(e,a),e.intersect=function(u){return Xe.rect(e,u);},r;}var HZ=N(()=>{"use strict";_2();Ft();Ht();o(UZ,"labelRect");});async function WZ(t,e){var _e$padding24,_e$width10,_e$padding25,_e$height11;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=Math.max(a.width+((_e$padding24=e.padding)!==null&&_e$padding24!==void 0?_e$padding24:0),(_e$width10=e===null||e===void 0?void 0:e.width)!==null&&_e$width10!==void 0?_e$width10:0),l=Math.max(a.height+((_e$padding25=e.padding)!==null&&_e$padding25!==void 0?_e$padding25:0),(_e$height11=e===null||e===void 0?void 0:e.height)!==null&&_e$height11!==void 0?_e$height11:0),u=[{x:0,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:-(3*l)/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=je.svg(i),p=Qe(e,{}),m=zt(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f);}else h=Ms(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Ke(e,h),e.intersect=function(d){return Xe.polygon(e,u,d);},i;}var qZ=N(()=>{"use strict";Ft();Ht();Gt();Wt();qh();o(WZ,"lean_left");});async function YZ(t,e){var _e$padding26,_e$width11,_e$padding27,_e$height12;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=Math.max(a.width+((_e$padding26=e.padding)!==null&&_e$padding26!==void 0?_e$padding26:0),(_e$width11=e===null||e===void 0?void 0:e.width)!==null&&_e$width11!==void 0?_e$width11:0),l=Math.max(a.height+((_e$padding27=e.padding)!==null&&_e$padding27!==void 0?_e$padding27:0),(_e$height12=e===null||e===void 0?void 0:e.height)!==null&&_e$height12!==void 0?_e$height12:0),u=[{x:-3*l/6,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:0,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=je.svg(i),p=Qe(e,{}),m=zt(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f);}else h=Ms(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Ke(e,h),e.intersect=function(d){return Xe.polygon(e,u,d);},i;}var XZ=N(()=>{"use strict";Ft();Ht();Gt();Wt();qh();o(YZ,"lean_right");});function jZ(t,e){var _e$domId5,_e$width12,_e$height13;let{labelStyles:r,nodeStyles:n}=qe(e);e.label="",e.labelStyle=r;let i=t.insert("g").attr("class",ot(e)).attr("id",(_e$domId5=e.domId)!==null&&_e$domId5!==void 0?_e$domId5:e.id),{cssStyles:a}=e,s=Math.max(35,(_e$width12=e===null||e===void 0?void 0:e.width)!==null&&_e$width12!==void 0?_e$width12:0),l=Math.max(35,(_e$height13=e===null||e===void 0?void 0:e.height)!==null&&_e$height13!==void 0?_e$height13:0),u=7,h=[{x:s,y:0},{x:0,y:l+u/2},{x:s-2*u,y:l+u/2},{x:0,y:2*l},{x:s,y:l-u/2},{x:2*u,y:l-u/2}],f=je.svg(i),d=Qe(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=zt(h),m=f.path(p,d),g=i.insert(()=>m,":first-child");return a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),n&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(-${s/2},${-l})`),Ke(e,g),e.intersect=function(y){return X.info("lightningBolt intersect",e,y),Xe.polygon(e,h,y);},i;}var KZ=N(()=>{"use strict";yt();Ft();Gt();Wt();Ht();Ft();o(jZ,"lightningBolt");});async function QZ(t,e){var _e$padding28,_e$width13,_e$padding29,_e$height14,_a$left7,_a$top7;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=Math.max(a.width+((_e$padding28=e.padding)!==null&&_e$padding28!==void 0?_e$padding28:0),(_e$width13=e.width)!==null&&_e$width13!==void 0?_e$width13:0),u=l/2,h=u/(2.5+l/50),f=Math.max(a.height+h+((_e$padding29=e.padding)!==null&&_e$padding29!==void 0?_e$padding29:0),(_e$height14=e.height)!==null&&_e$height14!==void 0?_e$height14:0),d=f*.1,p,{cssStyles:m}=e;if(e.look==="handDrawn"){let g=je.svg(i),y=BDe(0,0,l,f,u,h,d),v=FDe(0,h,l,f,u,h),x=Qe(e,{}),b=g.path(y,x),T=g.path(v,x);i.insert(()=>T,":first-child").attr("class","line"),p=i.insert(()=>b,":first-child"),p.attr("class","basic label-container"),m&&p.attr("style",m);}else{let g=PDe(0,0,l,f,u,h,d);p=i.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",ii(m)).attr("style",n);}return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(f/2+h)})`),Ke(e,p),s.attr("transform",`translate(${-(a.width/2)-(a.x-((_a$left7=a.left)!==null&&_a$left7!==void 0?_a$left7:0))}, ${-(a.height/2)+h-(a.y-((_a$top7=a.top)!==null&&_a$top7!==void 0?_a$top7:0))})`),e.intersect=function(g){var _e$x6,_e$width14,_e$width15,_e$y7,_e$height15;let y=Xe.rect(e,g),v=y.x-((_e$x6=e.x)!==null&&_e$x6!==void 0?_e$x6:0);if(u!=0&&(Math.abs(v)<((_e$width14=e.width)!==null&&_e$width14!==void 0?_e$width14:0)/2||Math.abs(v)==((_e$width15=e.width)!==null&&_e$width15!==void 0?_e$width15:0)/2&&Math.abs(y.y-((_e$y7=e.y)!==null&&_e$y7!==void 0?_e$y7:0))>((_e$height15=e.height)!==null&&_e$height15!==void 0?_e$height15:0)/2-h)){var _e$y8;let x=h*h*(1-v*v/(u*u));x>0&&(x=Math.sqrt(x)),x=h-x,g.y-((_e$y8=e.y)!==null&&_e$y8!==void 0?_e$y8:0)>0&&(x=-x),y.y+=x;}return y;},i;}var PDe,BDe,FDe,ZZ=N(()=>{"use strict";Ft();Ht();Gt();Wt();nr();PDe=o((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),BDe=o((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),FDe=o((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");o(QZ,"linedCylinder");});async function JZ(t,e){var _e$padding30,_e$width16,_e$padding31,_e$height16,_e$padding32,_a$left8,_e$padding33,_a$top8;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=Math.max(a.width+((_e$padding30=e.padding)!==null&&_e$padding30!==void 0?_e$padding30:0)*2,(_e$width16=e===null||e===void 0?void 0:e.width)!==null&&_e$width16!==void 0?_e$width16:0),u=Math.max(a.height+((_e$padding31=e.padding)!==null&&_e$padding31!==void 0?_e$padding31:0)*2,(_e$height16=e===null||e===void 0?void 0:e.height)!==null&&_e$height16!==void 0?_e$height16:0),h=u/4,f=u+h,{cssStyles:d}=e,p=je.svg(i),m=Qe(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:-l/2-l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:f/2},...$o(-l/2-l/2*.1,f/2,l/2+l/2*.1,f/2,h,.8),{x:l/2+l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:-f/2},{x:-l/2,y:-f/2},{x:-l/2,y:f/2*1.1},{x:-l/2,y:-f/2}],y=p.polygon(g.map(x=>[x.x,x.y]),m),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-l/2+((_e$padding32=e.padding)!==null&&_e$padding32!==void 0?_e$padding32:0)+l/2*.1/2-(a.x-((_a$left8=a.left)!==null&&_a$left8!==void 0?_a$left8:0))},${-u/2+((_e$padding33=e.padding)!==null&&_e$padding33!==void 0?_e$padding33:0)-h/2-(a.y-((_a$top8=a.top)!==null&&_a$top8!==void 0?_a$top8:0))})`),Ke(e,v),e.intersect=function(x){return Xe.polygon(e,g,x);},i;}var eJ=N(()=>{"use strict";Ft();Ht();Wt();Gt();o(JZ,"linedWaveEdgedRect");});async function tJ(t,e){var _e$padding34,_e$width17,_e$padding35,_e$height17,_a$left9,_a$top9;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=Math.max(a.width+((_e$padding34=e.padding)!==null&&_e$padding34!==void 0?_e$padding34:0)*2,(_e$width17=e===null||e===void 0?void 0:e.width)!==null&&_e$width17!==void 0?_e$width17:0),u=Math.max(a.height+((_e$padding35=e.padding)!==null&&_e$padding35!==void 0?_e$padding35:0)*2,(_e$height17=e===null||e===void 0?void 0:e.height)!==null&&_e$height17!==void 0?_e$height17:0),h=5,f=-l/2,d=-u/2,{cssStyles:p}=e,m=je.svg(i),g=Qe(e,{}),y=[{x:f-h,y:d+h},{x:f-h,y:d+u+h},{x:f+l-h,y:d+u+h},{x:f+l-h,y:d+u},{x:f+l,y:d+u},{x:f+l,y:d+u-h},{x:f+l+h,y:d+u-h},{x:f+l+h,y:d-h},{x:f+h,y:d-h},{x:f+h,y:d},{x:f,y:d},{x:f,y:d+h}],v=[{x:f,y:d+h},{x:f+l-h,y:d+h},{x:f+l-h,y:d+u},{x:f+l,y:d+u},{x:f+l,y:d},{x:f,y:d}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=zt(y),b=m.path(x,g),T=zt(v),C=m.path(T,{...g,fill:"none"}),w=i.insert(()=>C,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)-h-(a.x-((_a$left9=a.left)!==null&&_a$left9!==void 0?_a$left9:0))}, ${-(a.height/2)+h-(a.y-((_a$top9=a.top)!==null&&_a$top9!==void 0?_a$top9:0))})`),Ke(e,w),e.intersect=function(E){return Xe.polygon(e,y,E);},i;}var rJ=N(()=>{"use strict";Ft();Gt();Wt();Ht();o(tJ,"multiRect");});async function nJ(t,e){var _e$padding36,_e$width18,_e$padding37,_e$height18,_a$left0,_a$top0;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=Math.max(a.width+((_e$padding36=e.padding)!==null&&_e$padding36!==void 0?_e$padding36:0)*2,(_e$width18=e===null||e===void 0?void 0:e.width)!==null&&_e$width18!==void 0?_e$width18:0),u=Math.max(a.height+((_e$padding37=e.padding)!==null&&_e$padding37!==void 0?_e$padding37:0)*2,(_e$height18=e===null||e===void 0?void 0:e.height)!==null&&_e$height18!==void 0?_e$height18:0),h=u/4,f=u+h,d=-l/2,p=-f/2,m=5,{cssStyles:g}=e,y=$o(d-m,p+f+m,d+l-m,p+f+m,h,.8),v=y===null||y===void 0?void 0:y[y.length-1],x=[{x:d-m,y:p+m},{x:d-m,y:p+f+m},...y,{x:d+l-m,y:v.y-m},{x:d+l,y:v.y-m},{x:d+l,y:v.y-2*m},{x:d+l+m,y:v.y-2*m},{x:d+l+m,y:p-m},{x:d+m,y:p-m},{x:d+m,y:p},{x:d,y:p},{x:d,y:p+m}],b=[{x:d,y:p+m},{x:d+l-m,y:p+m},{x:d+l-m,y:v.y-m},{x:d+l,y:v.y-m},{x:d+l,y:p},{x:d,y:p}],T=je.svg(i),C=Qe(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let w=zt(x),E=T.path(w,C),_=zt(b),A=T.path(_,C),D=i.insert(()=>E,":first-child");return D.insert(()=>A),D.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",g),n&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",n),D.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-(a.width/2)-m-(a.x-((_a$left0=a.left)!==null&&_a$left0!==void 0?_a$left0:0))}, ${-(a.height/2)+m-h/2-(a.y-((_a$top0=a.top)!==null&&_a$top0!==void 0?_a$top0:0))})`),Ke(e,D),e.intersect=function(O){return Xe.polygon(e,x,O);},i;}var iJ=N(()=>{"use strict";Ft();Ht();Wt();Gt();o(nJ,"multiWaveEdgedRectangle");});async function aJ(t,e,{config:{themeVariables:r}}){var _Qt$flowchart,_e$padding38,_e$width19,_e$padding39,_e$height19,_l$left,_l$top;let{labelStyles:n,nodeStyles:i}=qe(e);e.labelStyle=n,e.useHtmlLabels||((_Qt$flowchart=Qt().flowchart)===null||_Qt$flowchart===void 0?void 0:_Qt$flowchart.htmlLabels)!==!1||(e.centerLabel=!0);let{shapeSvg:s,bbox:l,label:u}=await pt(t,e,ot(e)),h=Math.max(l.width+((_e$padding38=e.padding)!==null&&_e$padding38!==void 0?_e$padding38:0)*2,(_e$width19=e===null||e===void 0?void 0:e.width)!==null&&_e$width19!==void 0?_e$width19:0),f=Math.max(l.height+((_e$padding39=e.padding)!==null&&_e$padding39!==void 0?_e$padding39:0)*2,(_e$height19=e===null||e===void 0?void 0:e.height)!==null&&_e$height19!==void 0?_e$height19:0),d=-h/2,p=-f/2,{cssStyles:m}=e,g=je.svg(s),y=Qe(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=g.rectangle(d,p,h,f,y),x=s.insert(()=>v,":first-child");return x.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",m),i&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),u.attr("transform",`translate(${-l.width/2-(l.x-((_l$left=l.left)!==null&&_l$left!==void 0?_l$left:0))}, ${-(l.height/2)-(l.y-((_l$top=l.top)!==null&&_l$top!==void 0?_l$top:0))})`),Ke(e,x),e.intersect=function(b){return Xe.rect(e,b);},s;}var sJ=N(()=>{"use strict";Wt();Ht();Gt();Ft();Jn();o(aJ,"note");});async function oJ(t,e){let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=a.width+e.padding,l=a.height+e.padding,u=s+l,h=.5,f=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],d,{cssStyles:p}=e;if(e.look==="handDrawn"){let m=je.svg(i),g=Qe(e,{}),y=$De(0,0,u),v=m.path(y,g);d=i.insert(()=>v,":first-child").attr("transform",`translate(${-u/2+h}, ${u/2})`),p&&d.attr("style",p);}else d=Ms(i,u,u,f),d.attr("transform",`translate(${-u/2+h}, ${u/2})`);return n&&d.attr("style",n),Ke(e,d),e.intersect=function(m){return X.debug(`APA12 Intersect called SPLIT
point:`,m,`
node:
`,e,`
res:`,Xe.polygon(e,f,m)),Xe.polygon(e,f,m);},i;}var $De,lJ=N(()=>{"use strict";yt();Ft();Ht();Gt();Wt();qh();$De=o((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");o(oJ,"question");});async function cJ(t,e){var _e$padding40,_e$width20,_e$padding41,_e$height20,_a$left1,_a$top1;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=Math.max(a.width+((_e$padding40=e.padding)!==null&&_e$padding40!==void 0?_e$padding40:0),(_e$width20=e===null||e===void 0?void 0:e.width)!==null&&_e$width20!==void 0?_e$width20:0),u=Math.max(a.height+((_e$padding41=e.padding)!==null&&_e$padding41!==void 0?_e$padding41:0),(_e$height20=e===null||e===void 0?void 0:e.height)!==null&&_e$height20!==void 0?_e$height20:0),h=-l/2,f=-u/2,d=f/2,p=[{x:h+d,y:f},{x:h,y:0},{x:h+d,y:-f},{x:-h,y:-f},{x:-h,y:f}],{cssStyles:m}=e,g=je.svg(i),y=Qe(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=zt(p),x=g.path(v,y),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(${-d/2},0)`),s.attr("transform",`translate(${-d/2-a.width/2-(a.x-((_a$left1=a.left)!==null&&_a$left1!==void 0?_a$left1:0))}, ${-(a.height/2)-(a.y-((_a$top1=a.top)!==null&&_a$top1!==void 0?_a$top1:0))})`),Ke(e,b),e.intersect=function(T){return Xe.polygon(e,p,T);},i;}var uJ=N(()=>{"use strict";Ft();Ht();Gt();Wt();o(cJ,"rect_left_inv_arrow");});function zDe(t,e){e&&t.attr("style",e);}async function GDe(t){let e=Ge(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=ge(),i=t.label;t.label&&gi(t.label)&&(i=await yh(t.label.replace(Ze.lineBreakRegex,`
`),n));let s='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>";return r.html(ar(s,n)),zDe(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node();}var VDe,xc,JT=N(()=>{"use strict";pr();qt();dr();yt();nr();o(zDe,"applyStyle");o(GDe,"addHtmlLabel");VDe=o(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),mr(ge().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),X.info("vertexText"+i);let a={isNode:n,label:ta(i).replace(/fa[blrs]?:fa-[\w-]+/g,l=>`<i class='${l.replace(":"," ")}'></i>`),labelStyle:e&&e.replace("fill:","color:")};return await GDe(a);}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?s=i:s=[];for(let l of s){let u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),r?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=l.trim(),a.appendChild(u);}return a;}},"createLabel"),xc=VDe;});async function hJ(t,e){var _ge6;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let i;e.cssClasses?i="node "+e.cssClasses:i="node default";let a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g"),l=a.insert("g").attr("class","label").attr("style",n),u=e.description,h=e.label,f=l.node().appendChild(await xc(h,e.labelStyle,!0,!0)),d={width:0,height:0};if(mr((_ge6=ge())===null||_ge6===void 0||(_ge6=_ge6.flowchart)===null||_ge6===void 0?void 0:_ge6.htmlLabels)){let A=f.children[0],D=Ge(f);d=A.getBoundingClientRect(),D.attr("width",d.width),D.attr("height",d.height);}X.info("Text 2",u);let p=u||[],m=f.getBBox(),g=l.node().appendChild(await xc(p.join?p.join("<br/>"):p,e.labelStyle,!0,!0)),y=g.children[0],v=Ge(g);d=y.getBoundingClientRect(),v.attr("width",d.width),v.attr("height",d.height);let x=(e.padding||0)/2;Ge(g).attr("transform","translate( "+(d.width>m.width?0:(m.width-d.width)/2)+", "+(m.height+x+5)+")"),Ge(f).attr("transform","translate( "+(d.width<m.width?0:-(m.width-d.width)/2)+", 0)"),d=l.node().getBBox(),l.attr("transform","translate("+-d.width/2+", "+(-d.height/2-x+3)+")");let b=d.width+(e.padding||0),T=d.height+(e.padding||0),C=-d.width/2-x,w=-d.height/2-x,E,_;if(e.look==="handDrawn"){let A=je.svg(a),D=Qe(e,{}),O=A.path(Is(C,w,b,T,e.rx||0),D),R=A.line(-d.width/2-x,-d.height/2-x+m.height+x,d.width/2+x,-d.height/2-x+m.height+x,D);_=a.insert(()=>(X.debug("Rough node insert CXC",O),R),":first-child"),E=a.insert(()=>(X.debug("Rough node insert CXC",O),O),":first-child");}else E=s.insert("rect",":first-child"),_=s.insert("line"),E.attr("class","outer title-state").attr("style",n).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(e.padding||0)).attr("height",d.height+(e.padding||0)),_.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+m.height+x).attr("y2",-d.height/2-x+m.height+x);return Ke(e,E),e.intersect=function(A){return Xe.rect(e,A);},a;}var fJ=N(()=>{"use strict";pr();dr();Ft();JT();Ht();Gt();Wt();qt();$d();yt();o(hJ,"rectWithTitle");});function ew(t,e,r,n,i,a,s){let u=(t+r)/2,h=(e+n)/2,f=Math.atan2(n-e,r-t),d=(r-t)/2,p=(n-e)/2,m=d/i,g=p/a,y=Math.sqrt(m**2+g**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");let v=Math.sqrt(1-y**2),x=u+v*a*Math.sin(f)*(s?-1:1),b=h-v*i*Math.cos(f)*(s?-1:1),T=Math.atan2((e-b)/a,(t-x)/i),w=Math.atan2((n-b)/a,(r-x)/i)-T;s&&w<0&&(w+=2*Math.PI),!s&&w>0&&(w-=2*Math.PI);let E=[];for(let _=0;_<20;_++){let A=_/19,D=T+A*w,O=x+i*Math.cos(D),R=b+a*Math.sin(D);E.push({x:O,y:R});}return E;}async function dJ(t,e){var _e$padding42,_e$padding43;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=(_e$padding42=e===null||e===void 0?void 0:e.padding)!==null&&_e$padding42!==void 0?_e$padding42:0,l=(_e$padding43=e===null||e===void 0?void 0:e.padding)!==null&&_e$padding43!==void 0?_e$padding43:0,u=(e!==null&&e!==void 0&&e.width?e===null||e===void 0?void 0:e.width:a.width)+s*2,h=(e!==null&&e!==void 0&&e.height?e===null||e===void 0?void 0:e.height:a.height)+l*2,f=5,d=5,{cssStyles:p}=e,m=je.svg(i),g=Qe(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:-u/2+d,y:-h/2},{x:u/2-d,y:-h/2},...ew(u/2-d,-h/2,u/2,-h/2+d,f,f,!0),{x:u/2,y:-h/2+d},{x:u/2,y:h/2-d},...ew(u/2,h/2-d,u/2-d,h/2,f,f,!0),{x:u/2-d,y:h/2},{x:-u/2+d,y:h/2},...ew(-u/2+d,h/2,-u/2,h/2-d,f,f,!0),{x:-u/2,y:h/2-d},{x:-u/2,y:-h/2+d},...ew(-u/2,-h/2+d,-u/2+d,-h/2,f,f,!0)],v=zt(y),x=m.path(v,g),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),p&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),n&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",n),Ke(e,b),e.intersect=function(T){return Xe.polygon(e,y,T);},i;}var pJ=N(()=>{"use strict";Ft();Ht();Gt();Wt();o(ew,"generateArcPoints");o(dJ,"roundedRect");});async function mJ(t,e){var _e$padding44,_e$padding45,_e$width21,_e$padding46,_e$height21,_e$padding47,_a$left10,_e$padding48,_a$top10;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=(_e$padding44=e===null||e===void 0?void 0:e.padding)!==null&&_e$padding44!==void 0?_e$padding44:0,u=Math.max(a.width+((_e$padding45=e.padding)!==null&&_e$padding45!==void 0?_e$padding45:0)*2,(_e$width21=e===null||e===void 0?void 0:e.width)!==null&&_e$width21!==void 0?_e$width21:0),h=Math.max(a.height+((_e$padding46=e.padding)!==null&&_e$padding46!==void 0?_e$padding46:0)*2,(_e$height21=e===null||e===void 0?void 0:e.height)!==null&&_e$height21!==void 0?_e$height21:0),f=-a.width/2-l,d=-a.height/2-l,{cssStyles:p}=e,m=je.svg(i),g=Qe(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:f,y:d},{x:f+u+8,y:d},{x:f+u+8,y:d+h},{x:f-8,y:d+h},{x:f-8,y:d},{x:f,y:d},{x:f,y:d+h}],v=m.polygon(y.map(b=>[b.x,b.y]),g),x=i.insert(()=>v,":first-child");return x.attr("class","basic label-container").attr("style",ii(p)),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),p&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),s.attr("transform",`translate(${-u/2+4+((_e$padding47=e.padding)!==null&&_e$padding47!==void 0?_e$padding47:0)-(a.x-((_a$left10=a.left)!==null&&_a$left10!==void 0?_a$left10:0))},${-h/2+((_e$padding48=e.padding)!==null&&_e$padding48!==void 0?_e$padding48:0)-(a.y-((_a$top10=a.top)!==null&&_a$top10!==void 0?_a$top10:0))})`),Ke(e,x),e.intersect=function(b){return Xe.rect(e,b);},i;}var gJ=N(()=>{"use strict";Ft();Ht();Gt();Wt();nr();o(mJ,"shadedProcess");});async function yJ(t,e){var _e$padding49,_e$width22,_e$padding50,_e$height22,_e$padding51,_a$left11,_e$padding52,_a$top11;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=Math.max(a.width+((_e$padding49=e.padding)!==null&&_e$padding49!==void 0?_e$padding49:0)*2,(_e$width22=e===null||e===void 0?void 0:e.width)!==null&&_e$width22!==void 0?_e$width22:0),u=Math.max(a.height+((_e$padding50=e.padding)!==null&&_e$padding50!==void 0?_e$padding50:0)*2,(_e$height22=e===null||e===void 0?void 0:e.height)!==null&&_e$height22!==void 0?_e$height22:0),h=-l/2,f=-u/2,{cssStyles:d}=e,p=je.svg(i),m=Qe(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:h,y:f},{x:h,y:f+u},{x:h+l,y:f+u},{x:h+l,y:f-u/2}],y=zt(g),v=p.path(y,m),x=i.insert(()=>v,":first-child");return x.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),x.attr("transform",`translate(0, ${u/4})`),s.attr("transform",`translate(${-l/2+((_e$padding51=e.padding)!==null&&_e$padding51!==void 0?_e$padding51:0)-(a.x-((_a$left11=a.left)!==null&&_a$left11!==void 0?_a$left11:0))}, ${-u/4+((_e$padding52=e.padding)!==null&&_e$padding52!==void 0?_e$padding52:0)-(a.y-((_a$top11=a.top)!==null&&_a$top11!==void 0?_a$top11:0))})`),Ke(e,x),e.intersect=function(b){return Xe.polygon(e,g,b);},i;}var vJ=N(()=>{"use strict";Ft();Ht();Gt();Wt();o(yJ,"slopedRect");});async function xJ(t,e){let r={rx:0,ry:0,classes:"",labelPaddingX:((e===null||e===void 0?void 0:e.padding)||0)*2,labelPaddingY:((e===null||e===void 0?void 0:e.padding)||0)*1};return zd(t,e,r);}var bJ=N(()=>{"use strict";_2();o(xJ,"squareRect");});async function TJ(t,e){let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=a.height+e.padding,l=a.width+s/4+e.padding,u=s/2,{cssStyles:h}=e,f=je.svg(i),d=Qe(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-l/2+u,y:-s/2},{x:l/2-u,y:-s/2},...Bd(-l/2+u,0,u,50,90,270),{x:l/2-u,y:s/2},...Bd(l/2-u,0,u,50,270,450)],m=zt(p),g=f.path(m,d),y=i.insert(()=>g,":first-child");return y.attr("class","basic label-container outer-path"),h&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),Ke(e,y),e.intersect=function(v){return Xe.polygon(e,p,v);},i;}var wJ=N(()=>{"use strict";Ft();Ht();Gt();Wt();o(TJ,"stadium");});async function kJ(t,e){return zd(t,e,{rx:5,ry:5,classes:"flowchart-node"});}var EJ=N(()=>{"use strict";_2();o(kJ,"state");});function SJ(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=qe(e);e.labelStyle=n;let{cssStyles:a}=e,{lineColor:s,stateBorder:l,nodeBorder:u}=r,h=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),f=je.svg(h),d=Qe(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=f.circle(0,0,14,{...d,stroke:s,strokeWidth:2}),m=l!==null&&l!==void 0?l:u,g=f.circle(0,0,5,{...d,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),y=h.insert(()=>p,":first-child");return y.insert(()=>g),a&&y.selectAll("path").attr("style",a),i&&y.selectAll("path").attr("style",i),Ke(e,y),e.intersect=function(v){return Xe.circle(e,7,v);},h;}var CJ=N(()=>{"use strict";Wt();Ht();Gt();Ft();o(SJ,"stateEnd");});function AJ(t,e,{config:{themeVariables:r}}){let{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if(e.look==="handDrawn"){let l=je.svg(i).circle(0,0,14,RQ(n));a=i.insert(()=>l),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);}else a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Ke(e,a),e.intersect=function(s){return Xe.circle(e,7,s);},i;}var _J=N(()=>{"use strict";Wt();Ht();Gt();Ft();o(AJ,"stateStart");});async function DJ(t,e){let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=((e===null||e===void 0?void 0:e.padding)||0)/2,l=a.width+e.padding,u=a.height+e.padding,h=-a.width/2-s,f=-a.height/2-s,d=[{x:0,y:0},{x:l,y:0},{x:l,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if(e.look==="handDrawn"){let p=je.svg(i),m=Qe(e,{}),g=p.rectangle(h-8,f,l+16,u,m),y=p.line(h,f,h,f+u,m),v=p.line(h+l,f,h+l,f+u,m);i.insert(()=>y,":first-child"),i.insert(()=>v,":first-child");let x=i.insert(()=>g,":first-child"),{cssStyles:b}=e;x.attr("class","basic label-container").attr("style",ii(b)),Ke(e,x);}else{let p=Ms(i,l,u,d);n&&p.attr("style",n),Ke(e,p);}return e.intersect=function(p){return Xe.polygon(e,d,p);},i;}var LJ=N(()=>{"use strict";Ft();Ht();Gt();Wt();qh();nr();o(DJ,"subroutine");});async function RJ(t,e){var _e$padding53,_e$width23,_e$padding54,_e$height23;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=Math.max(a.width+((_e$padding53=e.padding)!==null&&_e$padding53!==void 0?_e$padding53:0)*2,(_e$width23=e===null||e===void 0?void 0:e.width)!==null&&_e$width23!==void 0?_e$width23:0),l=Math.max(a.height+((_e$padding54=e.padding)!==null&&_e$padding54!==void 0?_e$padding54:0)*2,(_e$height23=e===null||e===void 0?void 0:e.height)!==null&&_e$height23!==void 0?_e$height23:0),u=-s/2,h=-l/2,f=.2*l,d=.2*l,{cssStyles:p}=e,m=je.svg(i),g=Qe(e,{}),y=[{x:u-f/2,y:h},{x:u+s+f/2,y:h},{x:u+s+f/2,y:h+l},{x:u-f/2,y:h+l}],v=[{x:u+s-f/2,y:h+l},{x:u+s+f/2,y:h+l},{x:u+s+f/2,y:h+l-d}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=zt(y),b=m.path(x,g),T=zt(v),C=m.path(T,{...g,fillStyle:"solid"}),w=i.insert(()=>C,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",n),Ke(e,w),e.intersect=function(E){return Xe.polygon(e,y,E);},i;}var NJ=N(()=>{"use strict";Ft();Gt();Wt();Ht();o(RJ,"taggedRect");});async function MJ(t,e){var _e$padding55,_e$width24,_e$padding56,_e$height24,_e$padding57,_a$left12,_e$padding58,_a$top12;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=Math.max(a.width+((_e$padding55=e.padding)!==null&&_e$padding55!==void 0?_e$padding55:0)*2,(_e$width24=e===null||e===void 0?void 0:e.width)!==null&&_e$width24!==void 0?_e$width24:0),u=Math.max(a.height+((_e$padding56=e.padding)!==null&&_e$padding56!==void 0?_e$padding56:0)*2,(_e$height24=e===null||e===void 0?void 0:e.height)!==null&&_e$height24!==void 0?_e$height24:0),h=u/4,f=.2*l,d=.2*u,p=u+h,{cssStyles:m}=e,g=je.svg(i),y=Qe(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=[{x:-l/2-l/2*.1,y:p/2},...$o(-l/2-l/2*.1,p/2,l/2+l/2*.1,p/2,h,.8),{x:l/2+l/2*.1,y:-p/2},{x:-l/2-l/2*.1,y:-p/2}],x=-l/2+l/2*.1,b=-p/2-d*.4,T=[{x:x+l-f,y:(b+u)*1.4},{x:x+l,y:b+u-d},{x:x+l,y:(b+u)*.9},...$o(x+l,(b+u)*1.3,x+l-f,(b+u)*1.5,-u*.03,.5)],C=zt(v),w=g.path(C,y),E=zt(T),_=g.path(E,{...y,fillStyle:"solid"}),A=i.insert(()=>_,":first-child");return A.insert(()=>w,":first-child"),A.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-l/2+((_e$padding57=e.padding)!==null&&_e$padding57!==void 0?_e$padding57:0)-(a.x-((_a$left12=a.left)!==null&&_a$left12!==void 0?_a$left12:0))},${-u/2+((_e$padding58=e.padding)!==null&&_e$padding58!==void 0?_e$padding58:0)-h/2-(a.y-((_a$top12=a.top)!==null&&_a$top12!==void 0?_a$top12:0))})`),Ke(e,A),e.intersect=function(D){return Xe.polygon(e,v,D);},i;}var IJ=N(()=>{"use strict";Ft();Ht();Wt();Gt();o(MJ,"taggedWaveEdgedRectangle");});async function OJ(t,e){let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=Math.max(a.width+e.padding,(e===null||e===void 0?void 0:e.width)||0),l=Math.max(a.height+e.padding,(e===null||e===void 0?void 0:e.height)||0),u=-s/2,h=-l/2,f=i.insert("rect",":first-child");return f.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",u).attr("y",h).attr("width",s).attr("height",l),Ke(e,f),e.intersect=function(d){return Xe.rect(e,d);},i;}var PJ=N(()=>{"use strict";Ft();Ht();Gt();o(OJ,"text");});async function BJ(t,e){var _a$left13,_a$top13;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s,halfPadding:l}=await pt(t,e,ot(e)),u=e.look==="neo"?l*2:l,h=a.height+u,f=h/2,d=f/(2.5+h/50),p=a.width+d+u,{cssStyles:m}=e,g;if(e.look==="handDrawn"){let y=je.svg(i),v=HDe(0,0,p,h,d,f),x=WDe(0,0,p,h,d,f),b=y.path(v,Qe(e,{})),T=y.path(x,Qe(e,{fill:"none"}));g=i.insert(()=>T,":first-child"),g=i.insert(()=>b,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m);}else{let y=UDe(0,0,p,h,d,f);g=i.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",ii(m)).attr("style",n),g.attr("class","basic label-container"),m&&g.selectAll("path").attr("style",m),n&&g.selectAll("path").attr("style",n);}return g.attr("label-offset-x",d),g.attr("transform",`translate(${-p/2}, ${h/2} )`),s.attr("transform",`translate(${-(a.width/2)-d-(a.x-((_a$left13=a.left)!==null&&_a$left13!==void 0?_a$left13:0))}, ${-(a.height/2)-(a.y-((_a$top13=a.top)!==null&&_a$top13!==void 0?_a$top13:0))})`),Ke(e,g),e.intersect=function(y){var _e$y9,_e$height25,_e$height26,_e$x7,_e$width25;let v=Xe.rect(e,y),x=v.y-((_e$y9=e.y)!==null&&_e$y9!==void 0?_e$y9:0);if(f!=0&&(Math.abs(x)<((_e$height25=e.height)!==null&&_e$height25!==void 0?_e$height25:0)/2||Math.abs(x)==((_e$height26=e.height)!==null&&_e$height26!==void 0?_e$height26:0)/2&&Math.abs(v.x-((_e$x7=e.x)!==null&&_e$x7!==void 0?_e$x7:0))>((_e$width25=e.width)!==null&&_e$width25!==void 0?_e$width25:0)/2-d)){var _e$x8;let b=d*d*(1-x*x/(f*f));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,y.x-((_e$x8=e.x)!==null&&_e$x8!==void 0?_e$x8:0)>0&&(b=-b),v.x+=b;}return v;},i;}var UDe,HDe,WDe,FJ=N(()=>{"use strict";Ft();Gt();Wt();Ht();nr();UDe=o((t,e,r,n,i,a)=>`M${t},${e}
    a${i},${a} 0,0,1 0,${-n}
    l${r},0
    a${i},${a} 0,0,1 0,${n}
    M${r},${-n}
    a${i},${a} 0,0,0 0,${n}
    l${-r},0`,"createCylinderPathD"),HDe=o((t,e,r,n,i,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),WDe=o((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");o(BJ,"tiltedCylinder");});async function $J(t,e){let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=a.width+e.padding,l=a.height+e.padding,u=[{x:-3*l/6,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:0,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=je.svg(i),p=Qe(e,{}),m=zt(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f);}else h=Ms(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Ke(e,h),e.intersect=function(d){return Xe.polygon(e,u,d);},i;}var zJ=N(()=>{"use strict";Ft();Ht();Gt();Wt();qh();o($J,"trapezoid");});async function GJ(t,e){var _e$padding59,_e$width26,_e$padding60,_e$height27;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=60,l=20,u=Math.max(s,a.width+((_e$padding59=e.padding)!==null&&_e$padding59!==void 0?_e$padding59:0)*2,(_e$width26=e===null||e===void 0?void 0:e.width)!==null&&_e$width26!==void 0?_e$width26:0),h=Math.max(l,a.height+((_e$padding60=e.padding)!==null&&_e$padding60!==void 0?_e$padding60:0)*2,(_e$height27=e===null||e===void 0?void 0:e.height)!==null&&_e$height27!==void 0?_e$height27:0),{cssStyles:f}=e,d=je.svg(i),p=Qe(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=[{x:-u/2*.8,y:-h/2},{x:u/2*.8,y:-h/2},{x:u/2,y:-h/2*.6},{x:u/2,y:h/2},{x:-u/2,y:h/2},{x:-u/2,y:-h/2*.6}],g=zt(m),y=d.path(g,p),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),Ke(e,v),e.intersect=function(x){return Xe.polygon(e,m,x);},i;}var VJ=N(()=>{"use strict";Ft();Ht();Gt();Wt();o(GJ,"trapezoidalPentagon");});async function UJ(t,e){var _ge$flowchart2,_e$padding61,_a$left14,_e$padding62,_a$top14;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=mr((_ge$flowchart2=ge().flowchart)===null||_ge$flowchart2===void 0?void 0:_ge$flowchart2.htmlLabels),u=a.width+((_e$padding61=e.padding)!==null&&_e$padding61!==void 0?_e$padding61:0),h=u+a.height,f=u+a.height,d=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-h}],{cssStyles:p}=e,m=je.svg(i),g=Qe(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=zt(d),v=m.path(y,g),x=i.insert(()=>v,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`);return p&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",p),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),e.width=u,e.height=h,Ke(e,x),s.attr("transform",`translate(${-a.width/2-(a.x-((_a$left14=a.left)!==null&&_a$left14!==void 0?_a$left14:0))}, ${h/2-(a.height+((_e$padding62=e.padding)!==null&&_e$padding62!==void 0?_e$padding62:0)/(l?2:1)-(a.y-((_a$top14=a.top)!==null&&_a$top14!==void 0?_a$top14:0)))})`),e.intersect=function(b){return X.info("Triangle intersect",e,d,b),Xe.polygon(e,d,b);},i;}var HJ=N(()=>{"use strict";yt();Ft();Ht();Gt();Wt();Ft();dr();qt();o(UJ,"triangle");});async function WJ(t,e){var _e$padding63,_e$width27,_e$padding64,_e$height28,_e$padding65,_a$left15,_e$padding66,_a$top15;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=Math.max(a.width+((_e$padding63=e.padding)!==null&&_e$padding63!==void 0?_e$padding63:0)*2,(_e$width27=e===null||e===void 0?void 0:e.width)!==null&&_e$width27!==void 0?_e$width27:0),u=Math.max(a.height+((_e$padding64=e.padding)!==null&&_e$padding64!==void 0?_e$padding64:0)*2,(_e$height28=e===null||e===void 0?void 0:e.height)!==null&&_e$height28!==void 0?_e$height28:0),h=u/8,f=u+h,{cssStyles:d}=e,m=70-l,g=m>0?m/2:0,y=je.svg(i),v=Qe(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let x=[{x:-l/2-g,y:f/2},...$o(-l/2-g,f/2,l/2+g,f/2,h,.8),{x:l/2+g,y:-f/2},{x:-l/2-g,y:-f/2}],b=zt(x),T=y.path(b,v),C=i.insert(()=>T,":first-child");return C.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-l/2+((_e$padding65=e.padding)!==null&&_e$padding65!==void 0?_e$padding65:0)-(a.x-((_a$left15=a.left)!==null&&_a$left15!==void 0?_a$left15:0))},${-u/2+((_e$padding66=e.padding)!==null&&_e$padding66!==void 0?_e$padding66:0)-h-(a.y-((_a$top15=a.top)!==null&&_a$top15!==void 0?_a$top15:0))})`),Ke(e,C),e.intersect=function(w){return Xe.polygon(e,x,w);},i;}var qJ=N(()=>{"use strict";Ft();Ht();Wt();Gt();o(WJ,"waveEdgedRectangle");});async function YJ(t,e){var _e$padding67,_e$width28,_e$padding68,_e$height29;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await pt(t,e,ot(e)),s=100,l=50,u=Math.max(a.width+((_e$padding67=e.padding)!==null&&_e$padding67!==void 0?_e$padding67:0)*2,(_e$width28=e===null||e===void 0?void 0:e.width)!==null&&_e$width28!==void 0?_e$width28:0),h=Math.max(a.height+((_e$padding68=e.padding)!==null&&_e$padding68!==void 0?_e$padding68:0)*2,(_e$height29=e===null||e===void 0?void 0:e.height)!==null&&_e$height29!==void 0?_e$height29:0),f=u/h,d=u,p=h;d>p*f?p=d/f:d=p*f,d=Math.max(d,s),p=Math.max(p,l);let m=Math.min(p*.2,p/4),g=p+m*2,{cssStyles:y}=e,v=je.svg(i),x=Qe(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let b=[{x:-d/2,y:g/2},...$o(-d/2,g/2,d/2,g/2,m,1),{x:d/2,y:-g/2},...$o(d/2,-g/2,-d/2,-g/2,m,-1)],T=zt(b),C=v.path(T,x),w=i.insert(()=>C,":first-child");return w.attr("class","basic label-container"),y&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",n),Ke(e,w),e.intersect=function(E){return Xe.polygon(e,b,E);},i;}var XJ=N(()=>{"use strict";Ft();Ht();Gt();Wt();o(YJ,"waveRectangle");});async function jJ(t,e){var _e$padding69,_e$width29,_e$padding70,_e$height30,_a$left16,_a$top16;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await pt(t,e,ot(e)),l=Math.max(a.width+((_e$padding69=e.padding)!==null&&_e$padding69!==void 0?_e$padding69:0)*2,(_e$width29=e===null||e===void 0?void 0:e.width)!==null&&_e$width29!==void 0?_e$width29:0),u=Math.max(a.height+((_e$padding70=e.padding)!==null&&_e$padding70!==void 0?_e$padding70:0)*2,(_e$height30=e===null||e===void 0?void 0:e.height)!==null&&_e$height30!==void 0?_e$height30:0),h=5,f=-l/2,d=-u/2,{cssStyles:p}=e,m=je.svg(i),g=Qe(e,{}),y=[{x:f-h,y:d-h},{x:f-h,y:d+u},{x:f+l,y:d+u},{x:f+l,y:d-h}],v=`M${f-h},${d-h} L${f+l},${d-h} L${f+l},${d+u} L${f-h},${d+u} L${f-h},${d-h}
                M${f-h},${d} L${f+l},${d}
                M${f},${d-h} L${f},${d+u}`;e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=m.path(v,g),b=i.insert(()=>x,":first-child");return b.attr("transform",`translate(${h/2}, ${h/2})`),b.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)+h/2-(a.x-((_a$left16=a.left)!==null&&_a$left16!==void 0?_a$left16:0))}, ${-(a.height/2)+h/2-(a.y-((_a$top16=a.top)!==null&&_a$top16!==void 0?_a$top16:0))})`),Ke(e,b),e.intersect=function(T){return Xe.polygon(e,y,T);},i;}var KJ=N(()=>{"use strict";Ft();Gt();Wt();Ht();o(jJ,"windowPane");});async function LL(t,e){var _n$er$diagramPadding,_n$er,_n$er$entityPadding,_n$er2,_e$label;let r=e;if(r.alias&&(e.label=r.alias),e.look==="handDrawn"){let{themeVariables:U}=Qt(),{background:K}=U,ee={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${K}`]};await LL(t,ee);}let n=Qt();e.useHtmlLabels=n.htmlLabels;let i=(_n$er$diagramPadding=(_n$er=n.er)===null||_n$er===void 0?void 0:_n$er.diagramPadding)!==null&&_n$er$diagramPadding!==void 0?_n$er$diagramPadding:10,a=(_n$er$entityPadding=(_n$er2=n.er)===null||_n$er2===void 0?void 0:_n$er2.entityPadding)!==null&&_n$er$entityPadding!==void 0?_n$er$entityPadding:6,{cssStyles:s}=e,{labelStyles:l,nodeStyles:u}=qe(e);if(r.attributes.length===0&&e.label){let U={rx:0,ry:0,labelPaddingX:i,labelPaddingY:i*1.5,classes:""};ea(e.label,n)+U.labelPaddingX*2<n.er.minEntityWidth&&(e.width=n.er.minEntityWidth);let K=await zd(t,e,U);if(!mr(n.htmlLabels)){var _ee$node;let ee=K.select("text"),Y=(_ee$node=ee.node())===null||_ee$node===void 0?void 0:_ee$node.getBBox();ee.attr("transform",`translate(${-Y.width/2}, 0)`);}return K;}n.htmlLabels||(i*=1.25,a*=1.25);let h=ot(e);h||(h="node default");let f=t.insert("g").attr("class",h).attr("id",e.domId||e.id),d=await D2(f,(_e$label=e.label)!==null&&_e$label!==void 0?_e$label:"",n,0,0,["name"],l);d.height+=a;let p=0,m=[],g=[],y=0,v=0,x=0,b=0,T=!0,C=!0;for(let U of r.attributes){let K=await D2(f,U.type,n,0,p,["attribute-type"],l);y=Math.max(y,K.width+i);let ee=await D2(f,U.name,n,0,p,["attribute-name"],l);v=Math.max(v,ee.width+i);let Y=await D2(f,U.keys.join(),n,0,p,["attribute-keys"],l);x=Math.max(x,Y.width+i);let ce=await D2(f,U.comment,n,0,p,["attribute-comment"],l);b=Math.max(b,ce.width+i);let Z=Math.max(K.height,ee.height,Y.height,ce.height)+a;g.push({yOffset:p,rowHeight:Z}),p+=Z;}let w=4;x<=i&&(T=!1,x=0,w--),b<=i&&(C=!1,b=0,w--);let E=f.node().getBBox();if(d.width+i*2-(y+v+x+b)>0){let U=d.width+i*2-(y+v+x+b);y+=U/w,v+=U/w,x>0&&(x+=U/w),b>0&&(b+=U/w);}let _=y+v+x+b,A=je.svg(f),D=Qe(e,{});e.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");let O=0;g.length>0&&(O=g.reduce((U,K)=>{var _K$rowHeight;return U+((_K$rowHeight=K===null||K===void 0?void 0:K.rowHeight)!==null&&_K$rowHeight!==void 0?_K$rowHeight:0);},0));let R=Math.max(E.width+i*2,(e===null||e===void 0?void 0:e.width)||0,_),k=Math.max((O!==null&&O!==void 0?O:0)+d.height,(e===null||e===void 0?void 0:e.height)||0),L=-R/2,S=-k/2;f.selectAll("g:not(:first-child)").each((U,K,ee)=>{let Y=Ge(ee[K]),ce=Y.attr("transform"),Z=0,ue=0;if(ce){let j=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ce);j&&(Z=parseFloat(j[1]),ue=parseFloat(j[2]),Y.attr("class").includes("attribute-name")?Z+=y:Y.attr("class").includes("attribute-keys")?Z+=y+v:Y.attr("class").includes("attribute-comment")&&(Z+=y+v+x));}Y.attr("transform",`translate(${L+i/2+Z}, ${ue+S+d.height+a/2})`);}),f.select(".name").attr("transform","translate("+-d.width/2+", "+(S+a/2)+")");let I=A.rectangle(L,S,R,k,D),M=f.insert(()=>I,":first-child").attr("style",s.join("")),{themeVariables:P}=Qt(),{rowEven:B,rowOdd:F,nodeBorder:z}=P;m.push(0);for(let[U,K]of g.entries()){let Y=(U+1)%2===0&&K.yOffset!==0,ce=A.rectangle(L,d.height+S+(K===null||K===void 0?void 0:K.yOffset),R,K===null||K===void 0?void 0:K.rowHeight,{...D,fill:Y?B:F,stroke:z});f.insert(()=>ce,"g.label").attr("style",s.join("")).attr("class",`row-rect-${Y?"even":"odd"}`);}let $=A.line(L,d.height+S,R+L,d.height+S,D);f.insert(()=>$).attr("class","divider"),$=A.line(y+L,d.height+S,y+L,k+S,D),f.insert(()=>$).attr("class","divider"),T&&($=A.line(y+v+L,d.height+S,y+v+L,k+S,D),f.insert(()=>$).attr("class","divider")),C&&($=A.line(y+v+x+L,d.height+S,y+v+x+L,k+S,D),f.insert(()=>$).attr("class","divider"));for(let U of m)$=A.line(L,d.height+S+U,R+L,d.height+S+U,D),f.insert(()=>$).attr("class","divider");if(Ke(e,M),u&&e.look!=="handDrawn"){var _u$split;let K=(_u$split=u.split(";"))===null||_u$split===void 0||(_u$split=_u$split.filter(ee=>ee.includes("stroke")))===null||_u$split===void 0?void 0:_u$split.map(ee=>`${ee}`).join("; ");f.selectAll("path").attr("style",K!==null&&K!==void 0?K:""),f.selectAll(".row-rect-even path").attr("style",u);}return e.intersect=function(U){return Xe.rect(e,U);},f;}async function D2(t,e,r,n=0,i=0,a=[],s=""){let l=t.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",s);e!==tc(e)&&(e=tc(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;"));let u=l.node().appendChild(await Hn(l,e,{width:ea(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(e.includes("&lt;")||e.includes("&gt;")){let f=u.children[0];for(f.textContent=f.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");f.childNodes[0];)f=f.childNodes[0],f.textContent=f.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");}let h=u.getBBox();if(mr(r.htmlLabels)){let f=u.children[0];f.style.textAlign="start";let d=Ge(u);h=f.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height);}return h;}var QJ=N(()=>{"use strict";Ft();Ht();Gt();Wt();_2();Jn();no();dr();pr();nr();o(LL,"erBox");o(D2,"addText");});async function ZJ(t,e,r,n,i=(_r$class$padding=>(_r$class$padding=r.class.padding)!==null&&_r$class$padding!==void 0?_r$class$padding:12)()){let a=n?0:3,s=t.insert("g").attr("class",ot(e)).attr("id",e.domId||e.id),l=null,u=null,h=null,f=null,d=0,p=0,m=0;if(l=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let b=e.annotations[0];await tw(l,{text:`\xAB${b}\xBB`},0),d=l.node().getBBox().height;}u=s.insert("g").attr("class","label-group text"),await tw(u,e,0,["font-weight: bolder"]);let g=u.node().getBBox();p=g.height,h=s.insert("g").attr("class","members-group text");let y=0;for(let b of e.members){let T=await tw(h,b,y,[b.parseClassifier()]);y+=T+a;}m=h.node().getBBox().height,m<=0&&(m=i/2),f=s.insert("g").attr("class","methods-group text");let v=0;for(let b of e.methods){let T=await tw(f,b,v,[b.parseClassifier()]);v+=T+a;}let x=s.node().getBBox();if(l!==null){let b=l.node().getBBox();l.attr("transform",`translate(${-b.width/2})`);}return u.attr("transform",`translate(${-g.width/2}, ${d})`),x=s.node().getBBox(),h.attr("transform",`translate(0, ${d+p+i*2})`),x=s.node().getBBox(),f.attr("transform",`translate(0, ${d+p+(m?m+i*4:i*2)})`),x=s.node().getBBox(),{shapeSvg:s,bbox:x};}async function tw(t,e,r,n=[]){var _mr;let i=t.insert("g").attr("class","label").attr("style",n.join("; ")),a=Qt(),s="useHtmlLabels"in e?e.useHtmlLabels:(_mr=mr(a.htmlLabels))!==null&&_mr!==void 0?_mr:!0,l="";"text"in e?l=e.text:l=e.label,!s&&l.startsWith("\\")&&(l=l.substring(1)),gi(l)&&(s=!0);let u=await Hn(i,tv(ta(l)),{width:ea(l,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a),h,f=1;if(s){let d=u.children[0],p=Ge(u);f=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(f+=d.innerHTML.split("<mrow>").length-1);let m=d.getElementsByTagName("img");if(m){let g=l.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(v=>{function x(){if(y.style.display="flex",y.style.flexDirection="column",g){var _a$fontSize$toString,_a$fontSize;let b=(_a$fontSize$toString=(_a$fontSize=a.fontSize)===null||_a$fontSize===void 0?void 0:_a$fontSize.toString())!==null&&_a$fontSize$toString!==void 0?_a$fontSize$toString:window.getComputedStyle(document.body).fontSize,C=parseInt(b,10)*5+"px";y.style.minWidth=C,y.style.maxWidth=C;}else y.style.width="100%";v(y);}o(x,"setupImage"),setTimeout(()=>{y.complete&&x();}),y.addEventListener("error",x),y.addEventListener("load",x);})));}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height);}else{n.includes("font-weight: bolder")&&Ge(u).selectAll("tspan").attr("font-weight",""),f=u.children.length;let d=u.children[0];(u.textContent===""||u.textContent.includes("&gt"))&&(d.textContent=l[0]+l.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),l[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),h=u.getBBox();}return i.attr("transform","translate(0,"+(-h.height/(2*f)+r)+")"),h.height;}var JJ=N(()=>{"use strict";pr();Jn();Ft();nr();qt();no();dr();o(ZJ,"textHelper");o(tw,"addText");});async function eee(t,e){var _r$class$padding2,_ref,_e$useHtmlLabels,_s$annotations,_s$members,_s$methods,_s$styles,_r$class;let r=ge(),n=(_r$class$padding2=r.class.padding)!==null&&_r$class$padding2!==void 0?_r$class$padding2:12,i=n,a=(_ref=(_e$useHtmlLabels=e.useHtmlLabels)!==null&&_e$useHtmlLabels!==void 0?_e$useHtmlLabels:mr(r.htmlLabels))!==null&&_ref!==void 0?_ref:!0,s=e;s.annotations=(_s$annotations=s.annotations)!==null&&_s$annotations!==void 0?_s$annotations:[],s.members=(_s$members=s.members)!==null&&_s$members!==void 0?_s$members:[],s.methods=(_s$methods=s.methods)!==null&&_s$methods!==void 0?_s$methods:[];let{shapeSvg:l,bbox:u}=await ZJ(t,e,r,a,i),{labelStyles:h,nodeStyles:f}=qe(e);e.labelStyle=h,e.cssStyles=s.styles||"";let d=((_s$styles=s.styles)===null||_s$styles===void 0?void 0:_s$styles.join(";"))||f||"";e.cssStyles||(e.cssStyles=d.replaceAll("!important","").split(";"));let p=s.members.length===0&&s.methods.length===0&&!((_r$class=r.class)!==null&&_r$class!==void 0&&_r$class.hideEmptyMembersBox),m=je.svg(l),g=Qe(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=u.width,v=u.height;s.members.length===0&&s.methods.length===0?v+=i:s.members.length>0&&s.methods.length===0&&(v+=i*2);let x=-y/2,b=-v/2,T=m.rectangle(x-n,b-n-(p?n:s.members.length===0&&s.methods.length===0?-n/2:0),y+2*n,v+2*n+(p?n*2:s.members.length===0&&s.methods.length===0?-n:0),g),C=l.insert(()=>T,":first-child");C.attr("class","basic label-container");let w=C.node().getBBox();l.selectAll(".text").each((D,O,R)=>{var _k$node;let k=Ge(R[O]),L=k.attr("transform"),S=0;if(L){let B=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(L);B&&(S=parseFloat(B[2]));}let I=S+b+n-(p?n:s.members.length===0&&s.methods.length===0?-n/2:0);a||(I-=4);let M=x;(k.attr("class").includes("label-group")||k.attr("class").includes("annotation-group"))&&(M=-((_k$node=k.node())===null||_k$node===void 0?void 0:_k$node.getBBox().width)/2||0,l.selectAll("text").each(function(P,B,F){window.getComputedStyle(F[B]).textAnchor==="middle"&&(M=0);})),k.attr("transform",`translate(${M}, ${I})`);});let E=l.select(".annotation-group").node().getBBox().height-(p?n/2:0)||0,_=l.select(".label-group").node().getBBox().height-(p?n/2:0)||0,A=l.select(".members-group").node().getBBox().height-(p?n/2:0)||0;if(s.members.length>0||s.methods.length>0||p){let D=m.line(w.x,E+_+b+n,w.x+w.width,E+_+b+n,g);l.insert(()=>D).attr("class","divider").attr("style",d);}if(p||s.members.length>0||s.methods.length>0){let D=m.line(w.x,E+_+A+b+i*2+n,w.x+w.width,E+_+A+b+n+i*2,g);l.insert(()=>D).attr("class","divider").attr("style",d);}if(s.look!=="handDrawn"&&l.selectAll("path").attr("style",d),C.select(":nth-child(2)").attr("style",d),l.selectAll(".divider").select("path").attr("style",d),e.labelStyle?l.selectAll("span").attr("style",e.labelStyle):l.selectAll("span").attr("style",d),!a){let D=RegExp(/color\s*:\s*([^;]*)/),O=D.exec(d);if(O){let R=O[0].replace("color","fill");l.selectAll("tspan").attr("style",R);}else if(h){let R=D.exec(h);if(R){let k=R[0].replace("color","fill");l.selectAll("tspan").attr("style",k);}}}return Ke(e,C),e.intersect=function(D){return Xe.rect(e,D);},l;}var tee=N(()=>{"use strict";Ft();qt();pr();Wt();Gt();Ht();JJ();dr();o(eee,"classBox");});async function ree(t,e){var _e$domId6,_f$node$getBBox$width,_f$node3,_f$node$getBBox$heigh,_f$node4;let{labelStyles:r,nodeStyles:n}=qe(e);e.labelStyle=r;let i=e,a=e,s=20,l=20,u="verifyMethod"in e,h=ot(e),f=t.insert("g").attr("class",h).attr("id",(_e$domId6=e.domId)!==null&&_e$domId6!==void 0?_e$domId6:e.id),d;u?d=await Nu(f,`&lt;&lt;${i.type}&gt;&gt;`,0,e.labelStyle):d=await Nu(f,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let p=d,m=await Nu(f,i.name,p,e.labelStyle+"; font-weight: bold;");if(p+=m+l,u){let E=await Nu(f,`${i.requirementId?`ID: ${i.requirementId}`:""}`,p,e.labelStyle);p+=E;let _=await Nu(f,`${i.text?`Text: ${i.text}`:""}`,p,e.labelStyle);p+=_;let A=await Nu(f,`${i.risk?`Risk: ${i.risk}`:""}`,p,e.labelStyle);p+=A,await Nu(f,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:""}`,p,e.labelStyle);}else{let E=await Nu(f,`${a.type?`Type: ${a.type}`:""}`,p,e.labelStyle);p+=E,await Nu(f,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,p,e.labelStyle);}let g=((_f$node$getBBox$width=(_f$node3=f.node())===null||_f$node3===void 0?void 0:_f$node3.getBBox().width)!==null&&_f$node$getBBox$width!==void 0?_f$node$getBBox$width:200)+s,y=((_f$node$getBBox$heigh=(_f$node4=f.node())===null||_f$node4===void 0?void 0:_f$node4.getBBox().height)!==null&&_f$node$getBBox$heigh!==void 0?_f$node$getBBox$heigh:200)+s,v=-g/2,x=-y/2,b=je.svg(f),T=Qe(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let C=b.rectangle(v,x,g,y,T),w=f.insert(()=>C,":first-child");if(w.attr("class","basic label-container").attr("style",n),f.selectAll(".label").each((E,_,A)=>{let D=Ge(A[_]),O=D.attr("transform"),R=0,k=0;if(O){let M=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);M&&(R=parseFloat(M[1]),k=parseFloat(M[2]));}let L=k-y/2,S=v+s/2;(_===0||_===1)&&(S=R),D.attr("transform",`translate(${S}, ${L+s})`);}),p>d+m+l){let E=b.line(v,x+d+m+l,v+g,x+d+m+l,T);f.insert(()=>E).attr("style",n);}return Ke(e,w),e.intersect=function(E){return Xe.rect(e,E);},f;}async function Nu(t,e,r,n=""){var _a$htmlLabels;if(e==="")return 0;let i=t.insert("g").attr("class","label").attr("style",n),a=ge(),s=(_a$htmlLabels=a.htmlLabels)!==null&&_a$htmlLabels!==void 0?_a$htmlLabels:!0,l=await Hn(i,tv(ta(e)),{width:ea(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a),u;if(s){let h=l.children[0],f=Ge(l);u=h.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height);}else{let h=l.children[0];for(let f of h.children)f.textContent=f.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),n&&f.setAttribute("style",n);u=l.getBBox(),u.height+=6;}return i.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height;}var nee=N(()=>{"use strict";Ft();Ht();Gt();Wt();nr();qt();no();pr();o(ree,"requirementBox");o(Nu,"addText");});async function iee(t,e,{config:r}){var _e$width30,_r$kanban,_r$kanban2;let{labelStyles:n,nodeStyles:i}=qe(e);e.labelStyle=n||"";let a=10,s=e.width;e.width=((_e$width30=e.width)!==null&&_e$width30!==void 0?_e$width30:200)-10;let{shapeSvg:l,bbox:u,label:h}=await pt(t,e,ot(e)),f=e.padding||10,d="",p;"ticket"in e&&e.ticket&&(r===null||r===void 0||(_r$kanban=r.kanban)===null||_r$kanban===void 0?void 0:_r$kanban.ticketBaseUrl)&&(d=r===null||r===void 0||(_r$kanban2=r.kanban)===null||_r$kanban2===void 0?void 0:_r$kanban2.ticketBaseUrl.replace("#TICKET#",e.ticket),p=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));let m={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},g,y;p?{label:g,bbox:y}=await VT(p,"ticket"in e&&e.ticket||"",m):{label:g,bbox:y}=await VT(l,"ticket"in e&&e.ticket||"",m);let{label:v,bbox:x}=await VT(l,"assigned"in e&&e.assigned||"",m);e.width=s;let b=10,T=(e===null||e===void 0?void 0:e.width)||0,C=Math.max(y.height,x.height)/2,w=Math.max(u.height+b*2,(e===null||e===void 0?void 0:e.height)||0)+C,E=-T/2,_=-w/2;h.attr("transform","translate("+(f-T/2)+", "+(-C-u.height/2)+")"),g.attr("transform","translate("+(f-T/2)+", "+(-C+u.height/2)+")"),v.attr("transform","translate("+(f+T/2-x.width-2*a)+", "+(-C+u.height/2)+")");let A,{rx:D,ry:O}=e,{cssStyles:R}=e;if(e.look==="handDrawn"){let k=je.svg(l),L=Qe(e,{}),S=D||O?k.path(Is(E,_,T,w,D||0),L):k.rectangle(E,_,T,w,L);A=l.insert(()=>S,":first-child"),A.attr("class","basic label-container").attr("style",R||null);}else{A=l.insert("rect",":first-child"),A.attr("class","basic label-container __APA__").attr("style",i).attr("rx",D!==null&&D!==void 0?D:5).attr("ry",O!==null&&O!==void 0?O:5).attr("x",E).attr("y",_).attr("width",T).attr("height",w);let k="priority"in e&&e.priority;if(k){let L=l.append("line"),S=E+2,I=_+Math.floor((D!==null&&D!==void 0?D:0)/2),M=_+w-Math.floor((D!==null&&D!==void 0?D:0)/2);L.attr("x1",S).attr("y1",I).attr("x2",S).attr("y2",M).attr("stroke-width","4").attr("stroke",qDe(k));}}return Ke(e,A),e.height=w,e.intersect=function(k){return Xe.rect(e,k);},l;}var qDe,aee=N(()=>{"use strict";Ft();Ht();$d();Gt();Wt();qDe=o(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue";}},"colorFromPriority");o(iee,"kanbanItem");});function see(t){return t in RL;}var YDe,XDe,RL,NL=N(()=>{"use strict";YQ();KQ();ZQ();eZ();rZ();iZ();sZ();lZ();uZ();fZ();pZ();gZ();vZ();bZ();wZ();EZ();CZ();_Z();LZ();NZ();IZ();PZ();FZ();zZ();VZ();HZ();qZ();XZ();KZ();ZZ();eJ();rJ();iJ();sJ();lJ();uJ();fJ();pJ();gJ();vJ();bJ();wJ();EJ();CJ();_J();LJ();NJ();IJ();PJ();FJ();zJ();VJ();HJ();qJ();XJ();KJ();QJ();tee();nee();aee();YDe=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:xJ},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:dJ},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:TJ},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:DJ},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:dZ},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:tZ},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:oJ},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:AZ},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:YZ},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:WZ},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:$J},{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:GZ},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:yZ},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:OJ},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:QQ},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:mJ},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:AJ},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:SJ},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:kZ},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:DZ},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:aZ},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:oZ},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:cZ},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:jZ},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:WJ},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:SZ},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:BJ},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:QZ},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:hZ},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:mZ},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:UJ},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:jJ},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:xZ},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:GJ},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:TZ},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:yJ},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:nJ},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:tJ},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:jQ},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:nZ},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:MJ},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:RJ},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:YJ},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:cJ},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:JZ}],XDe=o(()=>{let e=[...Object.entries({state:kJ,choice:JQ,note:aJ,rectWithTitle:hJ,labelRect:UZ,iconSquare:BZ,iconCircle:MZ,icon:RZ,iconRounded:OZ,imageSquare:$Z,anchor:qQ,kanbanItem:iee,classBox:eee,erBox:LL,requirementBox:ree}),...YDe.flatMap(r=>[r.shortName,...("aliases"in r?r.aliases:[]),...("internalAliases"in r?r.internalAliases:[])].map(i=>[i,r.handler]))];return Object.fromEntries(e);},"generateShapeMap"),RL=XDe();o(see,"isValidShape");});var jDe,rw,oee=N(()=>{"use strict";var _Class45;pr();IT();qt();yt();NL();nr();dr();ci();jDe="flowchart-",rw=(_Class45=class rw{constructor(){this.vertexCounter=0;this.config=ge();this.vertices=new Map();this.edges=[];this.classes=new Map();this.subGraphs=[];this.subGraphLookup=new Map();this.tooltips=new Map();this.subCount=0;this.firstGraphFlag=!0;this.secCount=-1;this.posCrossRef=[];this.funs=[];this.setAccTitle=Cr;this.setAccDescription=Dr;this.setDiagramTitle=Ir;this.getAccTitle=_r;this.getAccDescription=Lr;this.getDiagramTitle=Rr;this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2");}sanitizeText(e){return Ze.sanitizeText(e,this.config);}lookUpDomId(e){for(let r of this.vertices.values())if(r.id===e)return r.domId;return e;}addVertex(e,r,n,i,a,s,l={},u){if(!e||e.trim().length===0)return;let h;if(u!==void 0){let m;u.includes(`
`)?m=u+`
`:m=`{
`+u+`
}`,h=gm(m,{schema:mm});}let f=this.edges.find(m=>m.id===e);if(f){let m=h;(m===null||m===void 0?void 0:m.animate)!==void 0&&(f.animate=m.animate),(m===null||m===void 0?void 0:m.animation)!==void 0&&(f.animation=m.animation),(m===null||m===void 0?void 0:m.curve)!==void 0&&(f.interpolate=m.curve);return;}let d,p=this.vertices.get(e);if(p===void 0&&(p={id:e,labelType:"text",domId:jDe+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,p)),this.vertexCounter++,r!==void 0?(this.config=ge(),d=this.sanitizeText(r.text.trim()),p.labelType=r.type,d.startsWith('"')&&d.endsWith('"')&&(d=d.substring(1,d.length-1)),p.text=d):p.text===void 0&&(p.text=e),n!==void 0&&(p.type=n),i!==null&&i!==void 0&&i.forEach(m=>{p.styles.push(m);}),a!==null&&a!==void 0&&a.forEach(m=>{p.classes.push(m);}),s!==void 0&&(p.dir=s),p.props===void 0?p.props=l:l!==void 0&&Object.assign(p.props,l),h!==void 0){var _h3,_h4,_h5,_h6,_h$label,_h7,_h8,_h9,_h0,_h1,_h10,_h$label2,_h11;if(h.shape){var _h2;if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!see(h.shape))throw new Error(`No such shape: ${h.shape}.`);p.type=(_h2=h)===null||_h2===void 0?void 0:_h2.shape;}(_h3=h)!==null&&_h3!==void 0&&_h3.label&&(p.text=(_h4=h)===null||_h4===void 0?void 0:_h4.label),(_h5=h)!==null&&_h5!==void 0&&_h5.icon&&(p.icon=(_h6=h)===null||_h6===void 0?void 0:_h6.icon,!((_h$label=h.label)!==null&&_h$label!==void 0&&_h$label.trim())&&p.text===e&&(p.text="")),(_h7=h)!==null&&_h7!==void 0&&_h7.form&&(p.form=(_h8=h)===null||_h8===void 0?void 0:_h8.form),(_h9=h)!==null&&_h9!==void 0&&_h9.pos&&(p.pos=(_h0=h)===null||_h0===void 0?void 0:_h0.pos),(_h1=h)!==null&&_h1!==void 0&&_h1.img&&(p.img=(_h10=h)===null||_h10===void 0?void 0:_h10.img,!((_h$label2=h.label)!==null&&_h$label2!==void 0&&_h$label2.trim())&&p.text===e&&(p.text="")),(_h11=h)!==null&&_h11!==void 0&&_h11.constraint&&(p.constraint=h.constraint),h.w&&(p.assetWidth=Number(h.w)),h.h&&(p.assetHeight=Number(h.h));}}addSingleLink(e,r,n,i){var _this$config$maxEdges;let l={start:e,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};X.info("abc78 Got edge...",l);let u=n.text;if(u!==void 0&&(l.text=this.sanitizeText(u.text.trim()),l.text.startsWith('"')&&l.text.endsWith('"')&&(l.text=l.text.substring(1,l.text.length-1)),l.labelType=u.type),n!==void 0&&(l.type=n.type,l.stroke=n.stroke,l.length=n.length>10?10:n.length),i&&!this.edges.some(h=>h.id===i))l.id=i,l.isUserDefinedId=!0;else{let h=this.edges.filter(f=>f.start===l.start&&f.end===l.end);h.length===0?l.id=Gh(l.start,l.end,{counter:0,prefix:"L"}):l.id=Gh(l.start,l.end,{counter:h.length+1,prefix:"L"});}if(this.edges.length<((_this$config$maxEdges=this.config.maxEdges)!==null&&_this$config$maxEdges!==void 0?_this$config$maxEdges:500))X.info("Pushing edge..."),this.edges.push(l);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.

Initialize mermaid with maxEdges set to a higher number to allow more edges.
You cannot set this config via configuration inside the diagram as it is a secure config.
You have to call mermaid.initialize.`);}isLinkData(e){return e!==null&&typeof e=="object"&&"id"in e&&typeof e.id=="string";}addLink(e,r,n){let i=this.isLinkData(n)?n.id.replace("@",""):void 0;X.info("addLink",e,r,i);for(let a of e)for(let s of r){let l=a===e[e.length-1],u=s===r[0];l&&u?this.addSingleLink(a,s,n,i):this.addSingleLink(a,s,n,void 0);}}updateLinkInterpolate(e,r){e.forEach(n=>{n==="default"?this.edges.defaultInterpolate=r:this.edges[n].interpolate=r;});}updateLink(e,r){e.forEach(n=>{var _this$edges$n$style$l,_this$edges$n,_this$edges$n2,_this$edges$n3;if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);n==="default"?this.edges.defaultStyle=r:(this.edges[n].style=r,((_this$edges$n$style$l=(_this$edges$n=this.edges[n])===null||_this$edges$n===void 0||(_this$edges$n=_this$edges$n.style)===null||_this$edges$n===void 0?void 0:_this$edges$n.length)!==null&&_this$edges$n$style$l!==void 0?_this$edges$n$style$l:0)>0&&!((_this$edges$n2=this.edges[n])!==null&&_this$edges$n2!==void 0&&(_this$edges$n2=_this$edges$n2.style)!==null&&_this$edges$n2!==void 0&&_this$edges$n2.some(i=>i===null||i===void 0?void 0:i.startsWith("fill")))&&((_this$edges$n3=this.edges[n])===null||_this$edges$n3===void 0||(_this$edges$n3=_this$edges$n3.style)===null||_this$edges$n3===void 0?void 0:_this$edges$n3.push("fill:none")));});}addClass(e,r){let n=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach(i=>{let a=this.classes.get(i);a===void 0&&(a={id:i,styles:[],textStyles:[]},this.classes.set(i,a)),n===null||n===void 0?void 0:n.forEach(s=>{if(/color/.exec(s)){let l=s.replace("fill","bgFill");a.textStyles.push(l);}a.styles.push(s);});});}setDirection(e){this.direction=e.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB");}setClass(e,r){for(let n of e.split(",")){let i=this.vertices.get(n);i&&i.classes.push(r);let a=this.edges.find(l=>l.id===n);a&&a.classes.push(r);let s=this.subGraphLookup.get(n);s&&s.classes.push(r);}}setTooltip(e,r){if(r!==void 0){r=this.sanitizeText(r);for(let n of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r);}}setClickFun(e,r,n){let i=this.lookUpDomId(e);if(ge().securityLevel!=="loose"||r===void 0)return;let a=[];if(typeof n=="string"){a=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let l=0;l<a.length;l++){let u=a[l].trim();u.startsWith('"')&&u.endsWith('"')&&(u=u.substr(1,u.length-2)),a[l]=u;}}a.length===0&&a.push(e);let s=this.vertices.get(e);s&&(s.haveCallback=!0,this.funs.push(()=>{let l=document.querySelector(`[id="${i}"]`);l!==null&&l.addEventListener("click",()=>{Vt.runFunc(r,...a);},!1);}));}setLink(e,r,n){e.split(",").forEach(i=>{let a=this.vertices.get(i);a!==void 0&&(a.link=Vt.formatUrl(r,this.config),a.linkTarget=n);}),this.setClass(e,"clickable");}getTooltip(e){return this.tooltips.get(e);}setClickEvent(e,r,n){e.split(",").forEach(i=>{this.setClickFun(i,r,n);}),this.setClass(e,"clickable");}bindFunctions(e){this.funs.forEach(r=>{r(e);});}getDirection(){var _this$direction;return(_this$direction=this.direction)===null||_this$direction===void 0?void 0:_this$direction.trim();}getVertices(){return this.vertices;}getEdges(){return this.edges;}getClasses(){return this.classes;}setupToolTips(e){let r=Ge(".mermaidTooltip");(r._groups||r)[0][0]===null&&(r=Ge("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Ge(e).select("svg").selectAll("g.node").on("mouseover",a=>{var _a$currentTarget;let s=Ge(a.currentTarget);if(s.attr("title")===null)return;let u=(_a$currentTarget=a.currentTarget)===null||_a$currentTarget===void 0?void 0:_a$currentTarget.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(s.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.bottom+"px"),r.html(r.html().replace(/&lt;br\/&gt;/g,"<br/>")),s.classed("hover",!0);}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),Ge(a.currentTarget).classed("hover",!1);});}clear(e="gen-2"){this.vertices=new Map(),this.classes=new Map(),this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map(),this.subCount=0,this.tooltips=new Map(),this.firstGraphFlag=!0,this.version=e,this.config=ge(),wr();}setGen(e){this.version=e||"gen-2";}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";}addSubGraph(e,r,n){var _ge$flowchart3,_ref2,_this$getDirection;let i=e.text.trim(),a=n.text;e===n&&/\s/.exec(n.text)&&(i=void 0);let l=o(p=>{let m={boolean:{},number:{},string:{}},g=[],y;return{nodeList:p.filter(function(x){let b=typeof x;return x.stmt&&x.stmt==="dir"?(y=x.value,!1):x.trim()===""?!1:b in m?m[b].hasOwnProperty(x)?!1:m[b][x]=!0:g.includes(x)?!1:g.push(x);}),dir:y};},"uniq")(r.flat()),u=l.nodeList,h=l.dir,f=(_ge$flowchart3=ge().flowchart)!==null&&_ge$flowchart3!==void 0?_ge$flowchart3:{};if(h=h!==null&&h!==void 0?h:f.inheritDir?(_ref2=(_this$getDirection=this.getDirection())!==null&&_this$getDirection!==void 0?_this$getDirection:ge().direction)!==null&&_ref2!==void 0?_ref2:void 0:void 0,this.version==="gen-1")for(let p=0;p<u.length;p++)u[p]=this.lookUpDomId(u[p]);i=i!==null&&i!==void 0?i:"subGraph"+this.subCount,a=a||"",a=this.sanitizeText(a),this.subCount=this.subCount+1;let d={id:i,nodes:u,title:a.trim(),classes:[],dir:h,labelType:n.type};return X.info("Adding",d.id,d.nodes,d.dir),d.nodes=this.makeUniq(d,this.subGraphs).nodes,this.subGraphs.push(d),this.subGraphLookup.set(i,d),i;}getPosForId(e){for(let[r,n]of this.subGraphs.entries())if(n.id===e)return r;return-1;}indexNodes2(e,r){let n=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let i=0,a=1;for(;i<n.length;){let s=this.getPosForId(n[i]);if(s>=0){let l=this.indexNodes2(e,s);if(l.result)return{result:!0,count:a+l.count};a=a+l.count;}i=i+1;}return{result:!1,count:a};}getDepthFirstPos(e){return this.posCrossRef[e];}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1);}getSubGraphs(){return this.subGraphs;}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1;}destructStartLink(e){let r=e.trim(),n="arrow_open";switch(r[0]){case"<":n="arrow_point",r=r.slice(1);break;case"x":n="arrow_cross",r=r.slice(1);break;case"o":n="arrow_circle",r=r.slice(1);break;}let i="normal";return r.includes("=")&&(i="thick"),r.includes(".")&&(i="dotted"),{type:n,stroke:i};}countChar(e,r){let n=r.length,i=0;for(let a=0;a<n;++a)r[a]===e&&++i;return i;}destructEndLink(e){let r=e.trim(),n=r.slice(0,-1),i="arrow_open";switch(r.slice(-1)){case"x":i="arrow_cross",r.startsWith("x")&&(i="double_"+i,n=n.slice(1));break;case">":i="arrow_point",r.startsWith("<")&&(i="double_"+i,n=n.slice(1));break;case"o":i="arrow_circle",r.startsWith("o")&&(i="double_"+i,n=n.slice(1));break;}let a="normal",s=n.length-1;n.startsWith("=")&&(a="thick"),n.startsWith("~")&&(a="invisible");let l=this.countChar(".",n);return l&&(a="dotted",s=l),{type:i,stroke:a,length:s};}destructLink(e,r){let n=this.destructEndLink(e),i;if(r){if(i=this.destructStartLink(r),i.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if(i.type==="arrow_open")i.type=n.type;else{if(i.type!==n.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type;}return i.type==="double_arrow"&&(i.type="double_arrow_point"),i.length=n.length,i;}return n;}exists(e,r){for(let n of e)if(n.nodes.includes(r))return!0;return!1;}makeUniq(e,r){let n=[];return e.nodes.forEach((i,a)=>{this.exists(r,i)||n.push(e.nodes[a]);}),{nodes:n};}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon)return e.form==="circle"?"iconCircle":e.form==="square"?"iconSquare":e.form==="rounded"?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type;}}findNode(e,r){return e.find(n=>n.id===r);}destructEdgeType(e){let r="none",n="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":n=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),n=r;break;}return{arrowTypeStart:r,arrowTypeEnd:n};}addNodeFromVertex(e,r,n,i,a,s){var _i$get;let l=n.get(e.id),u=(_i$get=i.get(e.id))!==null&&_i$get!==void 0?_i$get:!1,h=this.findNode(r,e.id);if(h)h.cssStyles=e.styles,h.cssCompiledStyles=this.getCompiledStyles(e.classes),h.cssClasses=e.classes.join(" ");else{var _a$flowchart;let f={id:e.id,label:e.text,labelStyle:"",parentId:l,padding:((_a$flowchart=a.flowchart)===null||_a$flowchart===void 0?void 0:_a$flowchart.padding)||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:s,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};u?r.push({...f,isGroup:!0,shape:"rect"}):r.push({...f,isGroup:!1,shape:this.getTypeFromVertex(e)});}}getCompiledStyles(e){let r=[];for(let n of e){var _i$styles,_i$textStyles;let i=this.classes.get(n);i!==null&&i!==void 0&&i.styles&&(r=[...r,...((_i$styles=i.styles)!==null&&_i$styles!==void 0?_i$styles:[])].map(a=>a.trim())),(i===null||i===void 0?void 0:i.textStyles)&&(r=[...r,...((_i$textStyles=i.textStyles)!==null&&_i$textStyles!==void 0?_i$textStyles:[])].map(a=>a.trim()));}return r;}getData(){let e=ge(),r=[],n=[],i=this.getSubGraphs(),a=new Map(),s=new Map();for(let h=i.length-1;h>=0;h--){let f=i[h];f.nodes.length>0&&s.set(f.id,!0);for(let d of f.nodes)a.set(d,f.id);}for(let h=i.length-1;h>=0;h--){let f=i[h];r.push({id:f.id,label:f.title,labelStyle:"",parentId:a.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssClasses:f.classes.join(" "),shape:"rect",dir:f.dir,isGroup:!0,look:e.look});}this.getVertices().forEach(h=>{this.addNodeFromVertex(h,r,a,s,e,e.look||"classic");});let u=this.getEdges();return u.forEach((h,f)=>{var _u$defaultStyle,_h$type,_e$flowchart2;let{arrowTypeStart:d,arrowTypeEnd:p}=this.destructEdgeType(h.type),m=[...((_u$defaultStyle=u.defaultStyle)!==null&&_u$defaultStyle!==void 0?_u$defaultStyle:[])];h.style&&m.push(...h.style);let g={id:Gh(h.start,h.end,{counter:f,prefix:"L"},h.id),isUserDefinedId:h.isUserDefinedId,start:h.start,end:h.end,type:(_h$type=h.type)!==null&&_h$type!==void 0?_h$type:"normal",label:h.text,labelpos:"c",thickness:h.stroke,minlen:h.length,classes:(h===null||h===void 0?void 0:h.stroke)==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:(h===null||h===void 0?void 0:h.stroke)==="invisible"||(h===null||h===void 0?void 0:h.type)==="arrow_open"?"none":d,arrowTypeEnd:(h===null||h===void 0?void 0:h.stroke)==="invisible"||(h===null||h===void 0?void 0:h.type)==="arrow_open"?"none":p,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(h.classes),labelStyle:m,style:m,pattern:h.stroke,look:e.look,animate:h.animate,animation:h.animation,curve:h.interpolate||this.edges.defaultInterpolate||((_e$flowchart2=e.flowchart)===null||_e$flowchart2===void 0?void 0:_e$flowchart2.curve)};n.push(g);}),{nodes:r,edges:n,other:{},config:e};}defaultConfig(){return B3.flowchart;}},o(_Class45,"FlowDB"),_Class45);});var bc,xm=N(()=>{"use strict";pr();bc=o((t,e)=>{let r;return e==="sandbox"&&(r=Ge("#i"+t)),(e==="sandbox"?Ge(r.nodes()[0].contentDocument.body):Ge("body")).select(`[id="${t}"]`);},"getDiagramElement");});var Mu,L2=N(()=>{"use strict";Mu=o(({flowchart:t})=>{var _t$subGraphTitleMargi,_t$subGraphTitleMargi2,_t$subGraphTitleMargi3,_t$subGraphTitleMargi4;let e=(_t$subGraphTitleMargi=t===null||t===void 0||(_t$subGraphTitleMargi2=t.subGraphTitleMargin)===null||_t$subGraphTitleMargi2===void 0?void 0:_t$subGraphTitleMargi2.top)!==null&&_t$subGraphTitleMargi!==void 0?_t$subGraphTitleMargi:0,r=(_t$subGraphTitleMargi3=t===null||t===void 0||(_t$subGraphTitleMargi4=t.subGraphTitleMargin)===null||_t$subGraphTitleMargi4===void 0?void 0:_t$subGraphTitleMargi4.bottom)!==null&&_t$subGraphTitleMargi3!==void 0?_t$subGraphTitleMargi3:0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n};},"getSubGraphTitleMargins");});var lee,KDe,QDe,ZDe,JDe,e9e,t9e,cee,bm,uee,nw=N(()=>{"use strict";qt();dr();yt();L2();pr();Wt();no();fL();JT();$d();Gt();lee=o(async(t,e)=>{X.info("Creating subgraph rect for ",e.id,e);let r=ge(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:f}=qe(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=mr(r.flowchart.htmlLabels),m=d.insert("g").attr("class","cluster-label "),g=await Hn(m,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0}),y=g.getBBox();if(mr(r.flowchart.htmlLabels)){let _=g.children[0],A=Ge(g);y=_.getBoundingClientRect(),A.attr("width",y.width),A.attr("height",y.height);}let v=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-v/2,T=e.y-x/2;X.trace("Data ",e,JSON.stringify(e));let C;if(e.look==="handDrawn"){let _=je.svg(d),A=Qe(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),D=_.path(Is(b,T,v,x,0),A);C=d.insert(()=>(X.debug("Rough node insert CXC",D),D),":first-child"),C.select("path:nth-child(2)").attr("style",h.join(";")),C.select("path").attr("style",f.join(";").replace("fill","stroke"));}else C=d.insert("rect",":first-child"),C.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",T).attr("width",v).attr("height",x);let{subGraphTitleTopMargin:w}=Mu(r);if(m.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+w})`),l){let _=m.select("span");_&&_.attr("style",l);}let E=C.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=y.height-e.padding/2,e.intersect=function(_){return Hh(e,_);},{cluster:d,labelBBox:y};},"rect"),KDe=o((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(l){return Hh(e,l);},{cluster:r,labelBBox:{width:0,height:0}};},"noteGroup"),QDe=o(async(t,e)=>{let r=ge(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:l,nodeBorder:u}=n,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),f=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label"),p=h.append("rect"),m=d.node().appendChild(await xc(e.label,e.labelStyle,void 0,!0)),g=m.getBBox();if(mr(r.flowchart.htmlLabels)){let D=m.children[0],O=Ge(m);g=D.getBoundingClientRect(),O.attr("width",g.width),O.attr("height",g.height);}let y=0*e.padding,v=y/2,x=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+y;e.width<=g.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;let b=e.height+y,T=e.height+y-g.height-6,C=e.x-x/2,w=e.y-b/2;e.width=x;let E=e.y-e.height/2-v+g.height+2,_;if(e.look==="handDrawn"){let D=e.cssClasses.includes("statediagram-cluster-alt"),O=je.svg(h),R=e.rx||e.ry?O.path(Is(C,w,x,b,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):O.rectangle(C,w,x,b,{seed:i});_=h.insert(()=>R,":first-child");let k=O.rectangle(C,E,x,T,{fill:D?a:s,fillStyle:D?"hachure":"solid",stroke:u,seed:i});_=h.insert(()=>R,":first-child"),p=h.insert(()=>k);}else _=f.insert("rect",":first-child"),_.attr("class","outer").attr("x",C).attr("y",w).attr("width",x).attr("height",b).attr("data-look",e.look),p.attr("class","inner").attr("x",C).attr("y",E).attr("width",x).attr("height",T);d.attr("transform",`translate(${e.x-g.width/2}, ${w+1-(mr(r.flowchart.htmlLabels)?0:3)})`);let A=_.node().getBBox();return e.height=A.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(D){return Hh(e,D);},{cluster:h,labelBBox:g};},"roundedWithTitle"),ZDe=o(async(t,e)=>{X.info("Creating subgraph rect for ",e.id,e);let r=ge(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:f}=qe(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=mr(r.flowchart.htmlLabels),m=d.insert("g").attr("class","cluster-label "),g=await Hn(m,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width}),y=g.getBBox();if(mr(r.flowchart.htmlLabels)){let _=g.children[0],A=Ge(g);y=_.getBoundingClientRect(),A.attr("width",y.width),A.attr("height",y.height);}let v=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-v/2,T=e.y-x/2;X.trace("Data ",e,JSON.stringify(e));let C;if(e.look==="handDrawn"){let _=je.svg(d),A=Qe(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),D=_.path(Is(b,T,v,x,e.rx),A);C=d.insert(()=>(X.debug("Rough node insert CXC",D),D),":first-child"),C.select("path:nth-child(2)").attr("style",h.join(";")),C.select("path").attr("style",f.join(";").replace("fill","stroke"));}else C=d.insert("rect",":first-child"),C.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",T).attr("width",v).attr("height",x);let{subGraphTitleTopMargin:w}=Mu(r);if(m.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+w})`),l){let _=m.select("span");_&&_.attr("style",l);}let E=C.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=y.height-e.padding/2,e.intersect=function(_){return Hh(e,_);},{cluster:d,labelBBox:y};},"kanbanSection"),JDe=o((t,e)=>{let r=ge(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=s.insert("g",":first-child"),u=0*e.padding,h=e.width+u;e.diff=-e.padding;let f=e.height+u,d=e.x-h/2,p=e.y-f/2;e.width=h;let m;if(e.look==="handDrawn"){let v=je.svg(s).rectangle(d,p,h,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});m=s.insert(()=>v,":first-child");}else m=l.insert("rect",":first-child"),m.attr("class","divider").attr("x",d).attr("y",p).attr("width",h).attr("height",f).attr("data-look",e.look);let g=m.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(y){return Hh(e,y);},{cluster:s,labelBBox:{}};},"divider"),e9e=lee,t9e={rect:lee,squareRect:e9e,roundedWithTitle:QDe,noteGroup:KDe,divider:JDe,kanbanSection:ZDe},cee=new Map(),bm=o(async(t,e)=>{let r=e.shape||"rect",n=await t9e[r](t,e);return cee.set(e.id,n),n;},"insertCluster"),uee=o(()=>{cee=new Map();},"clear");});function iw(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=Wn(t),e=Wn(e);let[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-r,l=a-n;return{angle:Math.atan(l/s),deltaX:s,deltaY:l};}var zo,Wn,aw,ML=N(()=>{"use strict";zo={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};o(iw,"calculateDeltaAndAngle");Wn=o(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),aw=o(t=>({x:o(function(e,r,n){let i=0,a=Wn(n[0]).x<Wn(n[n.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(zo,t.arrowTypeStart)){let{angle:m,deltaX:g}=iw(n[0],n[1]);i=zo[t.arrowTypeStart]*Math.cos(m)*(g>=0?1:-1);}else if(r===n.length-1&&Object.hasOwn(zo,t.arrowTypeEnd)){let{angle:m,deltaX:g}=iw(n[n.length-1],n[n.length-2]);i=zo[t.arrowTypeEnd]*Math.cos(m)*(g>=0?1:-1);}let s=Math.abs(Wn(e).x-Wn(n[n.length-1]).x),l=Math.abs(Wn(e).y-Wn(n[n.length-1]).y),u=Math.abs(Wn(e).x-Wn(n[0]).x),h=Math.abs(Wn(e).y-Wn(n[0]).y),f=zo[t.arrowTypeStart],d=zo[t.arrowTypeEnd],p=1;if(s<d&&s>0&&l<d){let m=d+p-s;m*=a==="right"?-1:1,i-=m;}if(u<f&&u>0&&h<f){let m=f+p-u;m*=a==="right"?-1:1,i+=m;}return Wn(e).x+i;},"x"),y:o(function(e,r,n){let i=0,a=Wn(n[0]).y<Wn(n[n.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(zo,t.arrowTypeStart)){let{angle:m,deltaY:g}=iw(n[0],n[1]);i=zo[t.arrowTypeStart]*Math.abs(Math.sin(m))*(g>=0?1:-1);}else if(r===n.length-1&&Object.hasOwn(zo,t.arrowTypeEnd)){let{angle:m,deltaY:g}=iw(n[n.length-1],n[n.length-2]);i=zo[t.arrowTypeEnd]*Math.abs(Math.sin(m))*(g>=0?1:-1);}let s=Math.abs(Wn(e).y-Wn(n[n.length-1]).y),l=Math.abs(Wn(e).x-Wn(n[n.length-1]).x),u=Math.abs(Wn(e).y-Wn(n[0]).y),h=Math.abs(Wn(e).x-Wn(n[0]).x),f=zo[t.arrowTypeStart],d=zo[t.arrowTypeEnd],p=1;if(s<d&&s>0&&l<d){let m=d+p-s;m*=a==="up"?-1:1,i-=m;}if(u<f&&u>0&&h<f){let m=f+p-u;m*=a==="up"?-1:1,i+=m;}return Wn(e).y+i;},"y")}),"getLineFunctionsWithOffset");});var fee,r9e,hee,dee=N(()=>{"use strict";yt();fee=o((t,e,r,n,i,a)=>{e.arrowTypeStart&&hee(t,"start",e.arrowTypeStart,r,n,i,a),e.arrowTypeEnd&&hee(t,"end",e.arrowTypeEnd,r,n,i,a);},"addEdgeMarkers"),r9e={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},hee=o((t,e,r,n,i,a,s)=>{let l=r9e[r];if(!l){X.warn(`Unknown arrow type: ${r}`);return;}let u=l.type,f=`${i}_${a}-${u}${e==="start"?"Start":"End"}`;if(s&&s.trim()!==""){let d=s.replace(/[^\dA-Za-z]/g,"_"),p=`${f}_${d}`;if(!document.getElementById(p)){let m=document.getElementById(f);if(m){var _m$parentNode;let g=m.cloneNode(!0);g.id=p,g.querySelectorAll("path, circle, line").forEach(v=>{v.setAttribute("stroke",s),l.fill&&v.setAttribute("fill",s);}),(_m$parentNode=m.parentNode)===null||_m$parentNode===void 0?void 0:_m$parentNode.appendChild(g);}}t.attr(`marker-${e}`,`url(${n}#${p})`);}else t.attr(`marker-${e}`,`url(${n}#${f})`);},"addEdgeMarker");});function sw(t,e){ge().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px");}function a9e(t){let e=[],r=[];for(let n=1;n<t.length-1;n++){let i=t[n-1],a=t[n],s=t[n+1];(i.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(n));}return{cornerPoints:e,cornerPointPositions:r};}var ow,ha,gee,R2,lw,cw,n9e,i9e,pee,mee,s9e,uw,IL=N(()=>{"use strict";qt();dr();yt();no();nr();ML();L2();pr();Wt();JT();dee();Gt();ow=new Map(),ha=new Map(),gee=o(()=>{ow.clear(),ha.clear();},"clear"),R2=o(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),lw=o(async(t,e)=>{let r=mr(ge().flowchart.htmlLabels),n=await Hn(t,e.label,{style:R2(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});X.info("abc82",e,e.labelType);let i=t.insert("g").attr("class","edgeLabel"),a=i.insert("g").attr("class","label");a.node().appendChild(n);let s=n.getBBox();if(r){let u=n.children[0],h=Ge(n);s=u.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height);}a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),ow.set(e.id,i),e.width=s.width,e.height=s.height;let l;if(e.startLabelLeft){let u=await xc(e.startLabelLeft,R2(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),ha.get(e.id)||ha.set(e.id,{}),ha.get(e.id).startLeft=h,sw(l,e.startLabelLeft);}if(e.startLabelRight){let u=await xc(e.startLabelRight,R2(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=h.node().appendChild(u),f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),ha.get(e.id)||ha.set(e.id,{}),ha.get(e.id).startRight=h,sw(l,e.startLabelRight);}if(e.endLabelLeft){let u=await xc(e.endLabelLeft,R2(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),ha.get(e.id)||ha.set(e.id,{}),ha.get(e.id).endLeft=h,sw(l,e.endLabelLeft);}if(e.endLabelRight){let u=await xc(e.endLabelRight,R2(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),ha.get(e.id)||ha.set(e.id,{}),ha.get(e.id).endRight=h,sw(l,e.endLabelRight);}return n;},"insertEdgeLabel");o(sw,"setTerminalWidth");cw=o((t,e)=>{X.debug("Moving label abc88 ",t.id,t.label,ow.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=ge(),{subGraphTitleTotalMargin:i}=Mu(n);if(t.label){let a=ow.get(t.id),s=t.x,l=t.y;if(r){let u=Vt.calcLabelPosition(r);X.debug("Moving label "+t.label+" from (",s,",",l,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(s=u.x,l=u.y);}a.attr("transform",`translate(${s}, ${l+i/2})`);}if(t.startLabelLeft){let a=ha.get(t.id).startLeft,s=t.x,l=t.y;if(r){let u=Vt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=u.x,l=u.y;}a.attr("transform",`translate(${s}, ${l})`);}if(t.startLabelRight){let a=ha.get(t.id).startRight,s=t.x,l=t.y;if(r){let u=Vt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=u.x,l=u.y;}a.attr("transform",`translate(${s}, ${l})`);}if(t.endLabelLeft){let a=ha.get(t.id).endLeft,s=t.x,l=t.y;if(r){let u=Vt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=u.x,l=u.y;}a.attr("transform",`translate(${s}, ${l})`);}if(t.endLabelRight){let a=ha.get(t.id).endRight,s=t.x,l=t.y;if(r){let u=Vt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=u.x,l=u.y;}a.attr("transform",`translate(${s}, ${l})`);}},"positionEdgeLabel"),n9e=o((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,l=t.height/2;return i>=s||a>=l;},"outsideNode"),i9e=o((t,e,r)=>{X.debug(`intersection calc abc89:
  outsidePoint: ${JSON.stringify(e)}
  insidePoint : ${JSON.stringify(r)}
  node        : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2,l=r.x<e.x?s-a:s+a,u=t.height/2,h=Math.abs(e.y-r.y),f=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*s>Math.abs(n-e.x)*u){let d=r.y<e.y?e.y-u-i:i-u-e.y;l=f*d/h;let p={x:r.x<e.x?r.x+l:r.x-f+l,y:r.y<e.y?r.y+h-d:r.y-h+d};return l===0&&(p.x=e.x,p.y=e.y),f===0&&(p.x=e.x),h===0&&(p.y=e.y),X.debug(`abc89 top/bottom calc, Q ${h}, q ${d}, R ${f}, r ${l}`,p),p;}else{r.x<e.x?l=e.x-s-n:l=n-s-e.x;let d=h*l/f,p=r.x<e.x?r.x+f-l:r.x-f+l,m=r.y<e.y?r.y+d:r.y-d;return X.debug(`sides calc abc89, Q ${h}, q ${d}, R ${f}, r ${l}`,{_x:p,_y:m}),l===0&&(p=e.x,m=e.y),f===0&&(p=e.x),h===0&&(m=e.y),{x:p,y:m};}},"intersection"),pee=o((t,e)=>{X.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(X.info("abc88 checking point",a,e),!n9e(e,a)&&!i){let s=i9e(e,n,a);X.debug("abc88 inside",a,n,s),X.debug("abc88 intersection",s,e);let l=!1;r.forEach(u=>{l=l||u.x===s.x&&u.y===s.y;}),r.some(u=>u.x===s.x&&u.y===s.y)?X.warn("abc88 no intersect",s,r):r.push(s),i=!0;}else X.warn("abc88 outside",a,n),n=a,i||r.push(a);}),X.debug("returning points",r),r;},"cutPathAtIntersect");o(a9e,"extractCornerPoints");mee=o(function(t,e,r){let n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),s=r/a;return{x:e.x-s*n,y:e.y-s*i};},"findAdjacentPoint"),s9e=o(function(t){let{cornerPointPositions:e}=a9e(t),r=[];for(let n=0;n<t.length;n++)if(e.includes(n)){let i=t[n-1],a=t[n+1],s=t[n],l=mee(i,s,5),u=mee(a,s,5),h=u.x-l.x,f=u.y-l.y;r.push(l);let d=Math.sqrt(2)*2,p={x:s.x,y:s.y};if(Math.abs(a.x-i.x)>10&&Math.abs(a.y-i.y)>=10){X.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));let m=5;s.x===l.x?p={x:h<0?l.x-m+d:l.x+m-d,y:f<0?l.y-d:l.y+d}:p={x:h<0?l.x-d:l.x+d,y:f<0?l.y-m+d:l.y+m-d};}else X.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(p,u);}else r.push(t[n]);return r;},"fixCorners"),uw=o(function(t,e,r,n,i,a,s){let{handDrawnSeed:l}=ge(),u=e.points,h=!1,f=i;var d=a;let p=[];for(let R in e.cssCompiledStyles)k2(R)||p.push(e.cssCompiledStyles[R]);d.intersect&&f.intersect&&(u=u.slice(1,e.points.length-1),u.unshift(f.intersect(u[0])),X.debug("Last point APA12",e.start,"-->",e.end,u[u.length-1],d,d.intersect(u[u.length-1])),u.push(d.intersect(u[u.length-1]))),e.toCluster&&(X.info("to cluster abc88",r.get(e.toCluster)),u=pee(e.points,r.get(e.toCluster).node),h=!0),e.fromCluster&&(X.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(u,null,2)),u=pee(u.reverse(),r.get(e.fromCluster).node).reverse(),h=!0);let m=u.filter(R=>!Number.isNaN(R.y));m=s9e(m);let g=Lo;switch(g=ku,e.curve){case"linear":g=ku;break;case"basis":g=Lo;break;case"cardinal":g=Hv;break;case"bumpX":g=$v;break;case"bumpY":g=zv;break;case"catmullRom":g=Yv;break;case"monotoneX":g=Xv;break;case"monotoneY":g=jv;break;case"natural":g=W0;break;case"step":g=q0;break;case"stepAfter":g=Qv;break;case"stepBefore":g=Kv;break;default:g=Lo;}let{x:y,y:v}=aw(e),x=El().x(y).y(v).curve(g),b;switch(e.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal";}switch(e.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid";}let T,C=x(m),w=Array.isArray(e.style)?e.style:e.style?[e.style]:[],E=w.find(R=>R===null||R===void 0?void 0:R.startsWith("stroke:"));if(e.look==="handDrawn"){let R=je.svg(t);Object.assign([],m);let k=R.path(C,{roughness:.3,seed:l});b+=" transition",T=Ge(k).select("path").attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")).attr("style",w?w.reduce((S,I)=>S+";"+I,""):"");let L=T.attr("d");T.attr("d",L),t.node().appendChild(T.node());}else{var _S$match;let R=p.join(";"),k=w?w.reduce((I,M)=>I+M+";",""):"",L="";e.animate&&(L=" edge-animation-fast"),e.animation&&(L=" edge-animation-"+e.animation);let S=R?R+";"+k+";":k;T=t.append("path").attr("d",C).attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")+(L!==null&&L!==void 0?L:"")).attr("style",S),E=(_S$match=S.match(/stroke:([^;]+)/))===null||_S$match===void 0?void 0:_S$match[1];}let _="";(ge().flowchart.arrowMarkerAbsolute||ge().state.arrowMarkerAbsolute)&&(_=fu(!0)),X.info("arrowTypeStart",e.arrowTypeStart),X.info("arrowTypeEnd",e.arrowTypeEnd),fee(T,e,_,s,n,E);let A=Math.floor(u.length/2),D=u[A];Vt.isLabelCoordinateInPath(D,T.attr("d"))||(h=!0);let O={};return h&&(O.updatedPath=u),O.originalPath=e.points,O;},"insertEdge");});var o9e,l9e,c9e,u9e,h9e,f9e,d9e,p9e,m9e,g9e,y9e,v9e,x9e,b9e,T9e,w9e,k9e,hw,OL=N(()=>{"use strict";yt();o9e=o((t,e,r,n)=>{e.forEach(i=>{k9e[i](t,r,n);});},"insertMarkers"),l9e=o((t,e,r)=>{X.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z");},"extension"),c9e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z");},"composition"),u9e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z");},"aggregation"),h9e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");},"dependency"),f9e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6);},"lollipop"),d9e=o((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0");},"point"),p9e=o((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0");},"circle"),m9e=o((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0");},"cross"),g9e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z");},"barb"),y9e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18");},"only_one"),v9e=o((t,e,r)=>{let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18");},"zero_or_one"),x9e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18");},"one_or_more"),b9e=o((t,e,r)=>{let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18");},"zero_or_more"),T9e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
      L20,10
      M20,10
      L0,20`);},"requirement_arrow"),w9e=o((t,e,r)=>{let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10);},"requirement_contains"),k9e={extension:l9e,composition:c9e,aggregation:u9e,dependency:h9e,lollipop:f9e,point:d9e,circle:p9e,cross:m9e,barb:g9e,only_one:y9e,zero_or_one:v9e,one_or_more:x9e,zero_or_more:b9e,requirement_arrow:T9e,requirement_contains:w9e},hw=o9e;});async function Tm(t,e,r){let n,i;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let a=e.shape?RL[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;r.config.securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s!==null&&s!==void 0?s:null),i=await a(n,e,r);}else i=await a(t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),fw.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n;}var fw,yee,vee,N2,dw=N(()=>{"use strict";yt();NL();fw=new Map();o(Tm,"insertNode");yee=o((t,e)=>{fw.set(e.id,t);},"setNodeElem"),vee=o(()=>{fw.clear();},"clear"),N2=o(t=>{let e=fw.get(t.id);X.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n;},"positionNode");});var xee,bee=N(()=>{"use strict";Jn();dr();yt();nw();IL();OL();dw();Ft();nr();xee={common:Ze,getConfig:Qt,insertCluster:bm,insertEdge:uw,insertEdgeLabel:lw,insertMarkers:hw,insertNode:Tm,interpolateToCurve:E9,labelHelper:pt,log:X,positionEdgeLabel:cw};});function S9e(t){return typeof t=="symbol"||ni(t)&&ua(t)==E9e;}var E9e,ao,Gd=N(()=>{"use strict";Su();Mo();E9e="[object Symbol]";o(S9e,"isSymbol");ao=S9e;});function C9e(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i;}var Os,Vd=N(()=>{"use strict";o(C9e,"arrayMap");Os=C9e;});function kee(t){if(typeof t=="string")return t;if(Pt(t))return Os(t,kee)+"";if(ao(t))return wee?wee.call(t):"";var e=t+"";return e=="0"&&1/t==-A9e?"-0":e;}var A9e,Tee,wee,Eee,See=N(()=>{"use strict";Cd();Vd();Un();Gd();A9e=1/0,Tee=Zi?Zi.prototype:void 0,wee=Tee?Tee.toString:void 0;o(kee,"baseToString");Eee=kee;});function D9e(t){for(var e=t.length;e--&&_9e.test(t.charAt(e)););return e;}var _9e,Cee,Aee=N(()=>{"use strict";_9e=/\s/;o(D9e,"trimmedEndIndex");Cee=D9e;});function R9e(t){return t&&t.slice(0,Cee(t)+1).replace(L9e,"");}var L9e,_ee,Dee=N(()=>{"use strict";Aee();L9e=/^\s+/;o(R9e,"baseTrim");_ee=R9e;});function P9e(t){if(typeof t=="number")return t;if(ao(t))return Lee;if(xn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=xn(e)?e+"":e;}if(typeof t!="string")return t===0?t:+t;t=_ee(t);var r=M9e.test(t);return r||I9e.test(t)?O9e(t.slice(2),r?2:8):N9e.test(t)?Lee:+t;}var Lee,N9e,M9e,I9e,O9e,Ree,Nee=N(()=>{"use strict";Dee();to();Gd();Lee=NaN,N9e=/^[-+]0x[0-9a-f]+$/i,M9e=/^0b[01]+$/i,I9e=/^0o[0-7]+$/i,O9e=parseInt;o(P9e,"toNumber");Ree=P9e;});function F9e(t){if(!t)return t===0?t:0;if(t=Ree(t),t===Mee||t===-Mee){var e=t<0?-1:1;return e*B9e;}return t===t?t:0;}var Mee,B9e,wm,PL=N(()=>{"use strict";Nee();Mee=1/0,B9e=17976931348623157e292;o(F9e,"toFinite");wm=F9e;});function $9e(t){var e=wm(t),r=e%1;return e===e?r?e-r:e:0;}var Tc,km=N(()=>{"use strict";PL();o($9e,"toInteger");Tc=$9e;});var z9e,pw,Iee=N(()=>{"use strict";Nh();Ro();z9e=Cs(hi,"WeakMap"),pw=z9e;});function G9e(){}var ai,BL=N(()=>{"use strict";o(G9e,"noop");ai=G9e;});function V9e(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t;}var mw,FL=N(()=>{"use strict";o(V9e,"arrayEach");mw=V9e;});function U9e(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a<i;)if(e(t[a],a,t))return a;return-1;}var gw,$L=N(()=>{"use strict";o(U9e,"baseFindIndex");gw=U9e;});function H9e(t){return t!==t;}var Oee,Pee=N(()=>{"use strict";o(H9e,"baseIsNaN");Oee=H9e;});function W9e(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1;}var Bee,Fee=N(()=>{"use strict";o(W9e,"strictIndexOf");Bee=W9e;});function q9e(t,e,r){return e===e?Bee(t,e,r):gw(t,Oee,r);}var Em,yw=N(()=>{"use strict";$L();Pee();Fee();o(q9e,"baseIndexOf");Em=q9e;});function Y9e(t,e){var r=t==null?0:t.length;return!!r&&Em(t,e,0)>-1;}var vw,zL=N(()=>{"use strict";yw();o(Y9e,"arrayIncludes");vw=Y9e;});var X9e,$ee,zee=N(()=>{"use strict";h9();X9e=dT(Object.keys,Object),$ee=X9e;});function Q9e(t){if(!dc(t))return $ee(t);var e=[];for(var r in Object(t))K9e.call(t,r)&&r!="constructor"&&e.push(r);return e;}var j9e,K9e,Sm,xw=N(()=>{"use strict";am();zee();j9e=Object.prototype,K9e=j9e.hasOwnProperty;o(Q9e,"baseKeys");Sm=Q9e;});function Z9e(t){return fi(t)?vT(t):Sm(t);}var $r,wc=N(()=>{"use strict";g9();xw();Io();o(Z9e,"keys");$r=Z9e;});var J9e,eLe,tLe,fa,Gee=N(()=>{"use strict";cm();Rd();b9();Io();am();wc();J9e=Object.prototype,eLe=J9e.hasOwnProperty,tLe=TT(function(t,e){if(dc(e)||fi(e)){Bo(e,$r(e),t);return;}for(var r in e)eLe.call(e,r)&&pc(t,r,e[r]);}),fa=tLe;});function iLe(t,e){if(Pt(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||ao(t)?!0:nLe.test(t)||!rLe.test(t)||e!=null&&t in Object(e);}var rLe,nLe,Cm,bw=N(()=>{"use strict";Un();Gd();rLe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nLe=/^\w*$/;o(iLe,"isKey");Cm=iLe;});function sLe(t){var e=Q0(t,function(n){return r.size===aLe&&r.clear(),n;}),r=e.cache;return e;}var aLe,Vee,Uee=N(()=>{"use strict";i9();aLe=500;o(sLe,"memoizeCapped");Vee=sLe;});var oLe,lLe,cLe,Hee,Wee=N(()=>{"use strict";Uee();oLe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lLe=/\\(\\)?/g,cLe=Vee(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(oLe,function(r,n,i,a){e.push(i?a.replace(lLe,"$1"):n||r);}),e;}),Hee=cLe;});function uLe(t){return t==null?"":Eee(t);}var Tw,GL=N(()=>{"use strict";See();o(uLe,"toString");Tw=uLe;});function hLe(t,e){return Pt(t)?t:Cm(t,e)?[t]:Hee(Tw(t));}var jh,M2=N(()=>{"use strict";Un();bw();Wee();GL();o(hLe,"castPath");jh=hLe;});function dLe(t){if(typeof t=="string"||ao(t))return t;var e=t+"";return e=="0"&&1/t==-fLe?"-0":e;}var fLe,kc,Am=N(()=>{"use strict";Gd();fLe=1/0;o(dLe,"toKey");kc=dLe;});function pLe(t,e){e=jh(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[kc(e[r++])];return r&&r==n?t:void 0;}var Kh,I2=N(()=>{"use strict";M2();Am();o(pLe,"baseGet");Kh=pLe;});function mLe(t,e,r){var n=t==null?void 0:Kh(t,e);return n===void 0?r:n;}var qee,Yee=N(()=>{"use strict";I2();o(mLe,"get");qee=mLe;});function gLe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t;}var _m,ww=N(()=>{"use strict";o(gLe,"arrayPush");_m=gLe;});function yLe(t){return Pt(t)||Al(t)||!!(Xee&&t&&t[Xee]);}var Xee,jee,Kee=N(()=>{"use strict";Cd();sm();Un();Xee=Zi?Zi.isConcatSpreadable:void 0;o(yLe,"isFlattenable");jee=yLe;});function Qee(t,e,r,n,i){var a=-1,s=t.length;for(r||(r=jee),i||(i=[]);++a<s;){var l=t[a];e>0&&r(l)?e>1?Qee(l,e-1,r,n,i):_m(i,l):n||(i[i.length]=l);}return i;}var Ec,Dm=N(()=>{"use strict";ww();Kee();o(Qee,"baseFlatten");Ec=Qee;});function vLe(t){var e=t==null?0:t.length;return e?Ec(t,1):[];}var Wr,kw=N(()=>{"use strict";Dm();o(vLe,"flatten");Wr=vLe;});function xLe(t){return bT(xT(t,void 0,Wr),t+"");}var Zee,Jee=N(()=>{"use strict";kw();y9();x9();o(xLe,"flatRest");Zee=xLe;});function bLe(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=t[n+e];return a;}var Ew,VL=N(()=>{"use strict";o(bLe,"baseSlice");Ew=bLe;});function DLe(t){return _Le.test(t);}var TLe,wLe,kLe,ELe,SLe,CLe,ALe,_Le,ete,tte=N(()=>{"use strict";TLe="\\ud800-\\udfff",wLe="\\u0300-\\u036f",kLe="\\ufe20-\\ufe2f",ELe="\\u20d0-\\u20ff",SLe=wLe+kLe+ELe,CLe="\\ufe0e\\ufe0f",ALe="\\u200d",_Le=RegExp("["+ALe+TLe+SLe+CLe+"]");o(DLe,"hasUnicode");ete=DLe;});function LLe(t,e,r,n){var i=-1,a=t==null?0:t.length;for(n&&a&&(r=t[++i]);++i<a;)r=e(r,t[i],i,t);return r;}var rte,nte=N(()=>{"use strict";o(LLe,"arrayReduce");rte=LLe;});function RLe(t,e){return t&&Bo(e,$r(e),t);}var ite,ate=N(()=>{"use strict";Rd();wc();o(RLe,"baseAssign");ite=RLe;});function NLe(t,e){return t&&Bo(e,As(e),t);}var ste,ote=N(()=>{"use strict";Rd();$h();o(NLe,"baseAssignIn");ste=NLe;});function MLe(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r<n;){var s=t[r];e(s,r,t)&&(a[i++]=s);}return a;}var Lm,Sw=N(()=>{"use strict";o(MLe,"arrayFilter");Lm=MLe;});function ILe(){return[];}var Cw,UL=N(()=>{"use strict";o(ILe,"stubArray");Cw=ILe;});var OLe,PLe,lte,BLe,Rm,Aw=N(()=>{"use strict";Sw();UL();OLe=Object.prototype,PLe=OLe.propertyIsEnumerable,lte=Object.getOwnPropertySymbols,BLe=lte?function(t){return t==null?[]:(t=Object(t),Lm(lte(t),function(e){return PLe.call(t,e);}));}:Cw,Rm=BLe;});function FLe(t,e){return Bo(t,Rm(t),e);}var cte,ute=N(()=>{"use strict";Rd();Aw();o(FLe,"copySymbols");cte=FLe;});var $Le,zLe,_w,HL=N(()=>{"use strict";ww();pT();Aw();UL();$Le=Object.getOwnPropertySymbols,zLe=$Le?function(t){for(var e=[];t;)_m(e,Rm(t)),t=im(t);return e;}:Cw,_w=zLe;});function GLe(t,e){return Bo(t,_w(t),e);}var hte,fte=N(()=>{"use strict";Rd();HL();o(GLe,"copySymbolsIn");hte=GLe;});function VLe(t,e,r){var n=e(t);return Pt(t)?n:_m(n,r(t));}var Dw,WL=N(()=>{"use strict";ww();Un();o(VLe,"baseGetAllKeys");Dw=VLe;});function ULe(t){return Dw(t,$r,Rm);}var O2,qL=N(()=>{"use strict";WL();Aw();wc();o(ULe,"getAllKeys");O2=ULe;});function HLe(t){return Dw(t,As,_w);}var Lw,YL=N(()=>{"use strict";WL();HL();$h();o(HLe,"getAllKeysIn");Lw=HLe;});var WLe,Rw,dte=N(()=>{"use strict";Nh();Ro();WLe=Cs(hi,"DataView"),Rw=WLe;});var qLe,Nw,pte=N(()=>{"use strict";Nh();Ro();qLe=Cs(hi,"Promise"),Nw=qLe;});var YLe,Qh,XL=N(()=>{"use strict";Nh();Ro();YLe=Cs(hi,"Set"),Qh=YLe;});var mte,XLe,gte,yte,vte,xte,jLe,KLe,QLe,ZLe,JLe,Ud,so,Hd=N(()=>{"use strict";dte();sT();pte();XL();Iee();Su();t9();mte="[object Map]",XLe="[object Object]",gte="[object Promise]",yte="[object Set]",vte="[object WeakMap]",xte="[object DataView]",jLe=Cu(Rw),KLe=Cu(Oh),QLe=Cu(Nw),ZLe=Cu(Qh),JLe=Cu(pw),Ud=ua;(Rw&&Ud(new Rw(new ArrayBuffer(1)))!=xte||Oh&&Ud(new Oh())!=mte||Nw&&Ud(Nw.resolve())!=gte||Qh&&Ud(new Qh())!=yte||pw&&Ud(new pw())!=vte)&&(Ud=o(function(t){var e=ua(t),r=e==XLe?t.constructor:void 0,n=r?Cu(r):"";if(n)switch(n){case jLe:return xte;case KLe:return mte;case QLe:return gte;case ZLe:return yte;case JLe:return vte;}return e;},"getTag"));so=Ud;});function rRe(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&tRe.call(t,"index")&&(r.index=t.index,r.input=t.input),r;}var eRe,tRe,bte,Tte=N(()=>{"use strict";eRe=Object.prototype,tRe=eRe.hasOwnProperty;o(rRe,"initCloneArray");bte=rRe;});function nRe(t,e){var r=e?nm(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength);}var wte,kte=N(()=>{"use strict";uT();o(nRe,"cloneDataView");wte=nRe;});function aRe(t){var e=new t.constructor(t.source,iRe.exec(t));return e.lastIndex=t.lastIndex,e;}var iRe,Ete,Ste=N(()=>{"use strict";iRe=/\w*$/;o(aRe,"cloneRegExp");Ete=aRe;});function sRe(t){return Ate?Object(Ate.call(t)):{};}var Cte,Ate,_te,Dte=N(()=>{"use strict";Cd();Cte=Zi?Zi.prototype:void 0,Ate=Cte?Cte.valueOf:void 0;o(sRe,"cloneSymbol");_te=sRe;});function CRe(t,e,r){var n=t.constructor;switch(e){case mRe:return nm(t);case oRe:case lRe:return new n(+t);case gRe:return wte(t,r);case yRe:case vRe:case xRe:case bRe:case TRe:case wRe:case kRe:case ERe:case SRe:return hT(t,r);case cRe:return new n();case uRe:case dRe:return new n(t);case hRe:return Ete(t);case fRe:return new n();case pRe:return _te(t);}}var oRe,lRe,cRe,uRe,hRe,fRe,dRe,pRe,mRe,gRe,yRe,vRe,xRe,bRe,TRe,wRe,kRe,ERe,SRe,Lte,Rte=N(()=>{"use strict";uT();kte();Ste();Dte();c9();oRe="[object Boolean]",lRe="[object Date]",cRe="[object Map]",uRe="[object Number]",hRe="[object RegExp]",fRe="[object Set]",dRe="[object String]",pRe="[object Symbol]",mRe="[object ArrayBuffer]",gRe="[object DataView]",yRe="[object Float32Array]",vRe="[object Float64Array]",xRe="[object Int8Array]",bRe="[object Int16Array]",TRe="[object Int32Array]",wRe="[object Uint8Array]",kRe="[object Uint8ClampedArray]",ERe="[object Uint16Array]",SRe="[object Uint32Array]";o(CRe,"initCloneByTag");Lte=CRe;});function _Re(t){return ni(t)&&so(t)==ARe;}var ARe,Nte,Mte=N(()=>{"use strict";Hd();Mo();ARe="[object Map]";o(_Re,"baseIsMap");Nte=_Re;});var Ite,DRe,Ote,Pte=N(()=>{"use strict";Mte();Ld();c2();Ite=Po&&Po.isMap,DRe=Ite?Oo(Ite):Nte,Ote=DRe;});function RRe(t){return ni(t)&&so(t)==LRe;}var LRe,Bte,Fte=N(()=>{"use strict";Hd();Mo();LRe="[object Set]";o(RRe,"baseIsSet");Bte=RRe;});var $te,NRe,zte,Gte=N(()=>{"use strict";Fte();Ld();c2();$te=Po&&Po.isSet,NRe=$te?Oo($te):Bte,zte=NRe;});function Mw(t,e,r,n,i,a){var s,l=e&MRe,u=e&IRe,h=e&ORe;if(r&&(s=i?r(t,n,i,a):r(t)),s!==void 0)return s;if(!xn(t))return t;var f=Pt(t);if(f){if(s=bte(t),!l)return fT(t,s);}else{var d=so(t),p=d==Ute||d==zRe;if(_l(t))return cT(t,l);if(d==Hte||d==Vte||p&&!i){if(s=u||p?{}:mT(t),!l)return u?hte(t,ste(s,t)):cte(t,ite(s,t));}else{if(!An[d])return i?t:{};s=Lte(t,d,l);}}a||(a=new hc());var m=a.get(t);if(m)return m;a.set(t,s),zte(t)?t.forEach(function(v){s.add(Mw(v,e,r,v,t,a));}):Ote(t)&&t.forEach(function(v,x){s.set(x,Mw(v,e,r,x,t,a));});var g=h?u?Lw:O2:u?As:$r,y=f?void 0:g(t);return mw(y||t,function(v,x){y&&(x=v,v=t[x]),pc(s,x,Mw(v,e,r,x,t,a));}),s;}var MRe,IRe,ORe,Vte,PRe,BRe,FRe,$Re,Ute,zRe,GRe,VRe,Hte,URe,HRe,WRe,qRe,YRe,XRe,jRe,KRe,QRe,ZRe,JRe,eNe,tNe,rNe,nNe,iNe,An,Iw,jL=N(()=>{"use strict";s2();FL();cm();ate();ote();o9();u9();ute();fte();qL();YL();Hd();Tte();Rte();f9();Un();lm();Pte();to();Gte();wc();$h();MRe=1,IRe=2,ORe=4,Vte="[object Arguments]",PRe="[object Array]",BRe="[object Boolean]",FRe="[object Date]",$Re="[object Error]",Ute="[object Function]",zRe="[object GeneratorFunction]",GRe="[object Map]",VRe="[object Number]",Hte="[object Object]",URe="[object RegExp]",HRe="[object Set]",WRe="[object String]",qRe="[object Symbol]",YRe="[object WeakMap]",XRe="[object ArrayBuffer]",jRe="[object DataView]",KRe="[object Float32Array]",QRe="[object Float64Array]",ZRe="[object Int8Array]",JRe="[object Int16Array]",eNe="[object Int32Array]",tNe="[object Uint8Array]",rNe="[object Uint8ClampedArray]",nNe="[object Uint16Array]",iNe="[object Uint32Array]",An={};An[Vte]=An[PRe]=An[XRe]=An[jRe]=An[BRe]=An[FRe]=An[KRe]=An[QRe]=An[ZRe]=An[JRe]=An[eNe]=An[GRe]=An[VRe]=An[Hte]=An[URe]=An[HRe]=An[WRe]=An[qRe]=An[tNe]=An[rNe]=An[nNe]=An[iNe]=!0;An[$Re]=An[Ute]=An[YRe]=!1;o(Mw,"baseClone");Iw=Mw;});function sNe(t){return Iw(t,aNe);}var aNe,nn,KL=N(()=>{"use strict";jL();aNe=4;o(sNe,"clone");nn=sNe;});function cNe(t){return Iw(t,oNe|lNe);}var oNe,lNe,QL,Wte=N(()=>{"use strict";jL();oNe=1,lNe=4;o(cNe,"cloneDeep");QL=cNe;});function uNe(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e<r;){var a=t[e];a&&(i[n++]=a);}return i;}var Sc,qte=N(()=>{"use strict";o(uNe,"compact");Sc=uNe;});function fNe(t){return this.__data__.set(t,hNe),this;}var hNe,Yte,Xte=N(()=>{"use strict";hNe="__lodash_hash_undefined__";o(fNe,"setCacheAdd");Yte=fNe;});function dNe(t){return this.__data__.has(t);}var jte,Kte=N(()=>{"use strict";o(dNe,"setCacheHas");jte=dNe;});function Ow(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new _d();++e<r;)this.add(t[e]);}var Nm,Pw=N(()=>{"use strict";oT();Xte();Kte();o(Ow,"SetCache");Ow.prototype.add=Ow.prototype.push=Yte;Ow.prototype.has=jte;Nm=Ow;});function pNe(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1;}var Bw,ZL=N(()=>{"use strict";o(pNe,"arraySome");Bw=pNe;});function mNe(t,e){return t.has(e);}var Mm,Fw=N(()=>{"use strict";o(mNe,"cacheHas");Mm=mNe;});function vNe(t,e,r,n,i,a){var s=r&gNe,l=t.length,u=e.length;if(l!=u&&!(s&&u>l))return!1;var h=a.get(t),f=a.get(e);if(h&&f)return h==e&&f==t;var d=-1,p=!0,m=r&yNe?new Nm():void 0;for(a.set(t,e),a.set(e,t);++d<l;){var g=t[d],y=e[d];if(n)var v=s?n(y,g,d,e,t,a):n(g,y,d,t,e,a);if(v!==void 0){if(v)continue;p=!1;break;}if(m){if(!Bw(e,function(x,b){if(!Mm(m,b)&&(g===x||i(g,x,r,n,a)))return m.push(b);})){p=!1;break;}}else if(!(g===y||i(g,y,r,n,a))){p=!1;break;}}return a.delete(t),a.delete(e),p;}var gNe,yNe,$w,JL=N(()=>{"use strict";Pw();ZL();Fw();gNe=1,yNe=2;o(vNe,"equalArrays");$w=vNe;});function xNe(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n];}),r;}var Qte,Zte=N(()=>{"use strict";o(xNe,"mapToArray");Qte=xNe;});function bNe(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n;}),r;}var Im,zw=N(()=>{"use strict";o(bNe,"setToArray");Im=bNe;});function INe(t,e,r,n,i,a,s){switch(r){case MNe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case NNe:return!(t.byteLength!=e.byteLength||!a(new rm(t),new rm(e)));case kNe:case ENe:case ANe:return No(+t,+e);case SNe:return t.name==e.name&&t.message==e.message;case _Ne:case LNe:return t==e+"";case CNe:var l=Qte;case DNe:var u=n&TNe;if(l||(l=Im),t.size!=e.size&&!u)return!1;var h=s.get(t);if(h)return h==e;n|=wNe,s.set(t,e);var f=$w(l(t),l(e),n,i,a,s);return s.delete(t),f;case RNe:if(eR)return eR.call(t)==eR.call(e);}return!1;}var TNe,wNe,kNe,ENe,SNe,CNe,ANe,_Ne,DNe,LNe,RNe,NNe,MNe,Jte,eR,ere,tre=N(()=>{"use strict";Cd();l9();Ad();JL();Zte();zw();TNe=1,wNe=2,kNe="[object Boolean]",ENe="[object Date]",SNe="[object Error]",CNe="[object Map]",ANe="[object Number]",_Ne="[object RegExp]",DNe="[object Set]",LNe="[object String]",RNe="[object Symbol]",NNe="[object ArrayBuffer]",MNe="[object DataView]",Jte=Zi?Zi.prototype:void 0,eR=Jte?Jte.valueOf:void 0;o(INe,"equalByTag");ere=INe;});function FNe(t,e,r,n,i,a){var s=r&ONe,l=O2(t),u=l.length,h=O2(e),f=h.length;if(u!=f&&!s)return!1;for(var d=u;d--;){var p=l[d];if(!(s?p in e:BNe.call(e,p)))return!1;}var m=a.get(t),g=a.get(e);if(m&&g)return m==e&&g==t;var y=!0;a.set(t,e),a.set(e,t);for(var v=s;++d<u;){p=l[d];var x=t[p],b=e[p];if(n)var T=s?n(b,x,p,e,t,a):n(x,b,p,t,e,a);if(!(T===void 0?x===b||i(x,b,r,n,a):T)){y=!1;break;}v||(v=p=="constructor");}if(y&&!v){var C=t.constructor,w=e.constructor;C!=w&&"constructor"in t&&"constructor"in e&&!(typeof C=="function"&&C instanceof C&&typeof w=="function"&&w instanceof w)&&(y=!1);}return a.delete(t),a.delete(e),y;}var ONe,PNe,BNe,rre,nre=N(()=>{"use strict";qL();ONe=1,PNe=Object.prototype,BNe=PNe.hasOwnProperty;o(FNe,"equalObjects");rre=FNe;});function GNe(t,e,r,n,i,a){var s=Pt(t),l=Pt(e),u=s?are:so(t),h=l?are:so(e);u=u==ire?Gw:u,h=h==ire?Gw:h;var f=u==Gw,d=h==Gw,p=u==h;if(p&&_l(t)){if(!_l(e))return!1;s=!0,f=!1;}if(p&&!f)return a||(a=new hc()),s||Bh(t)?$w(t,e,r,n,i,a):ere(t,e,u,r,n,i,a);if(!(r&$Ne)){var m=f&&sre.call(t,"__wrapped__"),g=d&&sre.call(e,"__wrapped__");if(m||g){var y=m?t.value():t,v=g?e.value():e;return a||(a=new hc()),i(y,v,r,n,a);}}return p?(a||(a=new hc()),rre(t,e,r,n,i,a)):!1;}var $Ne,ire,are,Gw,zNe,sre,ore,lre=N(()=>{"use strict";s2();JL();tre();nre();Hd();Un();lm();u2();$Ne=1,ire="[object Arguments]",are="[object Array]",Gw="[object Object]",zNe=Object.prototype,sre=zNe.hasOwnProperty;o(GNe,"baseIsEqualDeep");ore=GNe;});function cre(t,e,r,n,i){return t===e?!0:t==null||e==null||!ni(t)&&!ni(e)?t!==t&&e!==e:ore(t,e,r,n,cre,i);}var Vw,tR=N(()=>{"use strict";lre();Mo();o(cre,"baseIsEqual");Vw=cre;});function HNe(t,e,r,n){var i=r.length,a=i,s=!n;if(t==null)return!a;for(t=Object(t);i--;){var l=r[i];if(s&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1;}for(;++i<a;){l=r[i];var u=l[0],h=t[u],f=l[1];if(s&&l[2]){if(h===void 0&&!(u in t))return!1;}else{var d=new hc();if(n)var p=n(h,f,u,t,e,d);if(!(p===void 0?Vw(f,h,VNe|UNe,n,d):p))return!1;}}return!0;}var VNe,UNe,ure,hre=N(()=>{"use strict";s2();tR();VNe=1,UNe=2;o(HNe,"baseIsMatch");ure=HNe;});function WNe(t){return t===t&&!xn(t);}var Uw,rR=N(()=>{"use strict";to();o(WNe,"isStrictComparable");Uw=WNe;});function qNe(t){for(var e=$r(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,Uw(i)];}return e;}var fre,dre=N(()=>{"use strict";rR();wc();o(qNe,"getMatchData");fre=qNe;});function YNe(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r));};}var Hw,nR=N(()=>{"use strict";o(YNe,"matchesStrictComparable");Hw=YNe;});function XNe(t){var e=fre(t);return e.length==1&&e[0][2]?Hw(e[0][0],e[0][1]):function(r){return r===t||ure(r,t,e);};}var pre,mre=N(()=>{"use strict";hre();dre();nR();o(XNe,"baseMatches");pre=XNe;});function jNe(t,e){return t!=null&&e in Object(t);}var gre,yre=N(()=>{"use strict";o(jNe,"baseHasIn");gre=jNe;});function KNe(t,e,r){e=jh(e,t);for(var n=-1,i=e.length,a=!1;++n<i;){var s=kc(e[n]);if(!(a=t!=null&&r(t,s)))break;t=t[s];}return a||++n!=i?a:(i=t==null?0:t.length,!!i&&om(i)&&Fh(s,i)&&(Pt(t)||Al(t)));}var Ww,iR=N(()=>{"use strict";M2();sm();Un();f2();gT();Am();o(KNe,"hasPath");Ww=KNe;});function QNe(t,e){return t!=null&&Ww(t,e,gre);}var qw,aR=N(()=>{"use strict";yre();iR();o(QNe,"hasIn");qw=QNe;});function eMe(t,e){return Cm(t)&&Uw(e)?Hw(kc(t),e):function(r){var n=qee(r,t);return n===void 0&&n===e?qw(r,t):Vw(e,n,ZNe|JNe);};}var ZNe,JNe,vre,xre=N(()=>{"use strict";tR();Yee();aR();bw();rR();nR();Am();ZNe=1,JNe=2;o(eMe,"baseMatchesProperty");vre=eMe;});function tMe(t){return function(e){return e===null||e===void 0?void 0:e[t];};}var Yw,sR=N(()=>{"use strict";o(tMe,"baseProperty");Yw=tMe;});function rMe(t){return function(e){return Kh(e,t);};}var bre,Tre=N(()=>{"use strict";I2();o(rMe,"basePropertyDeep");bre=rMe;});function nMe(t){return Cm(t)?Yw(kc(t)):bre(t);}var wre,kre=N(()=>{"use strict";sR();Tre();bw();Am();o(nMe,"property");wre=nMe;});function iMe(t){return typeof t=="function"?t:t==null?Ji:typeof t=="object"?Pt(t)?vre(t[0],t[1]):pre(t):wre(t);}var pn,ns=N(()=>{"use strict";mre();xre();_u();Un();kre();o(iMe,"baseIteratee");pn=iMe;});function aMe(t,e,r,n){for(var i=-1,a=t==null?0:t.length;++i<a;){var s=t[i];e(n,s,r(s),t);}return n;}var Ere,Sre=N(()=>{"use strict";o(aMe,"arrayAggregator");Ere=aMe;});function sMe(t,e){return t&&tm(t,e,$r);}var Om,Xw=N(()=>{"use strict";lT();wc();o(sMe,"baseForOwn");Om=sMe;});function oMe(t,e){return function(r,n){if(r==null)return r;if(!fi(r))return t(r,n);for(var i=r.length,a=e?i:-1,s=Object(r);(e?a--:++a<i)&&n(s[a],a,s)!==!1;);return r;};}var Cre,Are=N(()=>{"use strict";Io();o(oMe,"createBaseEach");Cre=oMe;});var lMe,Ps,Zh=N(()=>{"use strict";Xw();Are();lMe=Cre(Om),Ps=lMe;});function cMe(t,e,r,n){return Ps(t,function(i,a,s){e(n,i,r(i),s);}),n;}var _re,Dre=N(()=>{"use strict";Zh();o(cMe,"baseAggregator");_re=cMe;});function uMe(t,e){return function(r,n){var i=Pt(r)?Ere:_re,a=e?e():{};return i(r,t,pn(n,2),a);};}var Lre,Rre=N(()=>{"use strict";Sre();Dre();ns();Un();o(uMe,"createAggregator");Lre=uMe;});var hMe,jw,Nre=N(()=>{"use strict";Ro();hMe=o(function(){return hi.Date.now();},"now"),jw=hMe;});var Mre,fMe,dMe,Jh,Ire=N(()=>{"use strict";um();Ad();Nd();$h();Mre=Object.prototype,fMe=Mre.hasOwnProperty,dMe=mc(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&ro(e[0],e[1],i)&&(n=1);++r<n;)for(var a=e[r],s=As(a),l=-1,u=s.length;++l<u;){var h=s[l],f=t[h];(f===void 0||No(f,Mre[h])&&!fMe.call(t,h))&&(t[h]=a[h]);}return t;}),Jh=dMe;});function pMe(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1;}var Kw,oR=N(()=>{"use strict";o(pMe,"arrayIncludesWith");Kw=pMe;});function gMe(t,e,r,n){var i=-1,a=vw,s=!0,l=t.length,u=[],h=e.length;if(!l)return u;r&&(e=Os(e,Oo(r))),n?(a=Kw,s=!1):e.length>=mMe&&(a=Mm,s=!1,e=new Nm(e));e:for(;++i<l;){var f=t[i],d=r==null?f:r(f);if(f=n||f!==0?f:0,s&&d===d){for(var p=h;p--;)if(e[p]===d)continue e;u.push(f);}else a(e,d,n)||u.push(f);}return u;}var mMe,Ore,Pre=N(()=>{"use strict";Pw();zL();oR();Vd();Ld();Fw();mMe=200;o(gMe,"baseDifference");Ore=gMe;});var yMe,ef,Bre=N(()=>{"use strict";Pre();Dm();um();yT();yMe=mc(function(t,e){return Dd(t)?Ore(t,Ec(e,1,Dd,!0)):[];}),ef=yMe;});function vMe(t){var e=t==null?0:t.length;return e?t[e-1]:void 0;}var da,Fre=N(()=>{"use strict";o(vMe,"last");da=vMe;});function xMe(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Tc(e),Ew(t,e<0?0:e,n)):[];}var xi,$re=N(()=>{"use strict";VL();km();o(xMe,"drop");xi=xMe;});function bMe(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Tc(e),e=n-e,Ew(t,0,e<0?0:e)):[];}var Iu,zre=N(()=>{"use strict";VL();km();o(bMe,"dropRight");Iu=bMe;});function TMe(t){return typeof t=="function"?t:Ji;}var Pm,Qw=N(()=>{"use strict";_u();o(TMe,"castFunction");Pm=TMe;});function wMe(t,e){var r=Pt(t)?mw:Ps;return r(t,Pm(e));}var Ae,Zw=N(()=>{"use strict";FL();Zh();Qw();Un();o(wMe,"forEach");Ae=wMe;});var Gre=N(()=>{"use strict";Zw();});function kMe(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0;}var Vre,Ure=N(()=>{"use strict";o(kMe,"arrayEvery");Vre=kMe;});function EMe(t,e){var r=!0;return Ps(t,function(n,i,a){return r=!!e(n,i,a),r;}),r;}var Hre,Wre=N(()=>{"use strict";Zh();o(EMe,"baseEvery");Hre=EMe;});function SMe(t,e,r){var n=Pt(t)?Vre:Hre;return r&&ro(t,e,r)&&(e=void 0),n(t,pn(e,3));}var Na,qre=N(()=>{"use strict";Ure();Wre();ns();Un();Nd();o(SMe,"every");Na=SMe;});function CMe(t,e){var r=[];return Ps(t,function(n,i,a){e(n,i,a)&&r.push(n);}),r;}var Jw,lR=N(()=>{"use strict";Zh();o(CMe,"baseFilter");Jw=CMe;});function AMe(t,e){var r=Pt(t)?Lm:Jw;return r(t,pn(e,3));}var qr,cR=N(()=>{"use strict";Sw();lR();ns();Un();o(AMe,"filter");qr=AMe;});function _Me(t){return function(e,r,n){var i=Object(e);if(!fi(e)){var a=pn(r,3);e=$r(e),r=o(function(l){return a(i[l],l,i);},"predicate");}var s=t(e,r,n);return s>-1?i[a?e[s]:s]:void 0;};}var Yre,Xre=N(()=>{"use strict";ns();Io();wc();o(_Me,"createFind");Yre=_Me;});function LMe(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:Tc(r);return i<0&&(i=DMe(n+i,0)),gw(t,pn(e,3),i);}var DMe,jre,Kre=N(()=>{"use strict";$L();ns();km();DMe=Math.max;o(LMe,"findIndex");jre=LMe;});var RMe,is,Qre=N(()=>{"use strict";Xre();Kre();RMe=Yre(jre),is=RMe;});function NMe(t){return t&&t.length?t[0]:void 0;}var ra,Zre=N(()=>{"use strict";o(NMe,"head");ra=NMe;});var Jre=N(()=>{"use strict";Zre();});function MMe(t,e){var r=-1,n=fi(t)?Array(t.length):[];return Ps(t,function(i,a,s){n[++r]=e(i,a,s);}),n;}var ek,uR=N(()=>{"use strict";Zh();Io();o(MMe,"baseMap");ek=MMe;});function IMe(t,e){var r=Pt(t)?Os:ek;return r(t,pn(e,3));}var Je,Bm=N(()=>{"use strict";Vd();ns();uR();Un();o(IMe,"map");Je=IMe;});function OMe(t,e){return Ec(Je(t,e),1);}var pa,hR=N(()=>{"use strict";Dm();Bm();o(OMe,"flatMap");pa=OMe;});function PMe(t,e){return t==null?t:tm(t,Pm(e),As);}var fR,ene=N(()=>{"use strict";lT();Qw();$h();o(PMe,"forIn");fR=PMe;});function BMe(t,e){return t&&Om(t,Pm(e));}var dR,tne=N(()=>{"use strict";Xw();Qw();o(BMe,"forOwn");dR=BMe;});var FMe,$Me,zMe,pR,rne=N(()=>{"use strict";em();Rre();FMe=Object.prototype,$Me=FMe.hasOwnProperty,zMe=Lre(function(t,e,r){$Me.call(t,r)?t[r].push(e):fc(t,r,[e]);}),pR=zMe;});function GMe(t,e){return t>e;}var nne,ine=N(()=>{"use strict";o(GMe,"baseGt");nne=GMe;});function HMe(t,e){return t!=null&&UMe.call(t,e);}var VMe,UMe,ane,sne=N(()=>{"use strict";VMe=Object.prototype,UMe=VMe.hasOwnProperty;o(HMe,"baseHas");ane=HMe;});function WMe(t,e){return t!=null&&Ww(t,e,ane);}var Bt,one=N(()=>{"use strict";sne();iR();o(WMe,"has");Bt=WMe;});function YMe(t){return typeof t=="string"||!Pt(t)&&ni(t)&&ua(t)==qMe;}var qMe,bi,tk=N(()=>{"use strict";Su();Un();Mo();qMe="[object String]";o(YMe,"isString");bi=YMe;});function XMe(t,e){return Os(e,function(r){return t[r];});}var lne,cne=N(()=>{"use strict";Vd();o(XMe,"baseValues");lne=XMe;});function jMe(t){return t==null?[]:lne(t,$r(t));}var br,mR=N(()=>{"use strict";cne();wc();o(jMe,"values");br=jMe;});function QMe(t,e,r,n){t=fi(t)?t:br(t),r=r&&!n?Tc(r):0;var i=t.length;return r<0&&(r=KMe(i+r,0)),bi(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Em(t,e,r)>-1;}var KMe,qn,une=N(()=>{"use strict";yw();Io();tk();km();mR();KMe=Math.max;o(QMe,"includes");qn=QMe;});function JMe(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:Tc(r);return i<0&&(i=ZMe(n+i,0)),Em(t,e,i);}var ZMe,rk,hne=N(()=>{"use strict";yw();km();ZMe=Math.max;o(JMe,"indexOf");rk=JMe;});function iIe(t){if(t==null)return!0;if(fi(t)&&(Pt(t)||typeof t=="string"||typeof t.splice=="function"||_l(t)||Bh(t)||Al(t)))return!t.length;var e=so(t);if(e==eIe||e==tIe)return!t.size;if(dc(t))return!Sm(t).length;for(var r in t)if(nIe.call(t,r))return!1;return!0;}var eIe,tIe,rIe,nIe,fr,nk=N(()=>{"use strict";xw();Hd();sm();Un();Io();lm();am();u2();eIe="[object Map]",tIe="[object Set]",rIe=Object.prototype,nIe=rIe.hasOwnProperty;o(iIe,"isEmpty");fr=iIe;});function sIe(t){return ni(t)&&ua(t)==aIe;}var aIe,fne,dne=N(()=>{"use strict";Su();Mo();aIe="[object RegExp]";o(sIe,"baseIsRegExp");fne=sIe;});var pne,oIe,Go,mne=N(()=>{"use strict";dne();Ld();c2();pne=Po&&Po.isRegExp,oIe=pne?Oo(pne):fne,Go=oIe;});function lIe(t){return t===void 0;}var gr,gne=N(()=>{"use strict";o(lIe,"isUndefined");gr=lIe;});function cIe(t,e){return t<e;}var ik,gR=N(()=>{"use strict";o(cIe,"baseLt");ik=cIe;});function uIe(t,e){var r={};return e=pn(e,3),Om(t,function(n,i,a){fc(r,i,e(n,i,a));}),r;}var Wd,yne=N(()=>{"use strict";em();Xw();ns();o(uIe,"mapValues");Wd=uIe;});function hIe(t,e,r){for(var n=-1,i=t.length;++n<i;){var a=t[n],s=e(a);if(s!=null&&(l===void 0?s===s&&!ao(s):r(s,l)))var l=s,u=a;}return u;}var Fm,ak=N(()=>{"use strict";Gd();o(hIe,"baseExtremum");Fm=hIe;});function fIe(t){return t&&t.length?Fm(t,Ji,nne):void 0;}var Bs,vne=N(()=>{"use strict";ak();ine();_u();o(fIe,"max");Bs=fIe;});function dIe(t){return t&&t.length?Fm(t,Ji,ik):void 0;}var Ll,yR=N(()=>{"use strict";ak();gR();_u();o(dIe,"min");Ll=dIe;});function pIe(t,e){return t&&t.length?Fm(t,pn(e,2),ik):void 0;}var qd,xne=N(()=>{"use strict";ak();ns();gR();o(pIe,"minBy");qd=pIe;});function gIe(t){if(typeof t!="function")throw new TypeError(mIe);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2]);}return!t.apply(this,e);};}var mIe,bne,Tne=N(()=>{"use strict";mIe="Expected a function";o(gIe,"negate");bne=gIe;});function yIe(t,e,r,n){if(!xn(t))return t;e=jh(e,t);for(var i=-1,a=e.length,s=a-1,l=t;l!=null&&++i<a;){var u=kc(e[i]),h=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(i!=s){var f=l[u];h=n?n(f,u,l):void 0,h===void 0&&(h=xn(f)?f:Fh(e[i+1])?[]:{});}pc(l,u,h),l=l[u];}return t;}var wne,kne=N(()=>{"use strict";cm();M2();f2();to();Am();o(yIe,"baseSet");wne=yIe;});function vIe(t,e,r){for(var n=-1,i=e.length,a={};++n<i;){var s=e[n],l=Kh(t,s);r(l,s)&&wne(a,jh(s,t),l);}return a;}var sk,vR=N(()=>{"use strict";I2();kne();M2();o(vIe,"basePickBy");sk=vIe;});function xIe(t,e){if(t==null)return{};var r=Os(Lw(t),function(n){return[n];});return e=pn(e),sk(t,r,function(n,i){return e(n,i[0]);});}var Fs,Ene=N(()=>{"use strict";Vd();ns();vR();YL();o(xIe,"pickBy");Fs=xIe;});function bIe(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t;}var Sne,Cne=N(()=>{"use strict";o(bIe,"baseSortBy");Sne=bIe;});function TIe(t,e){if(t!==e){var r=t!==void 0,n=t===null,i=t===t,a=ao(t),s=e!==void 0,l=e===null,u=e===e,h=ao(e);if(!l&&!h&&!a&&t>e||a&&s&&u&&!l&&!h||n&&s&&u||!r&&u||!i)return 1;if(!n&&!a&&!h&&t<e||h&&r&&i&&!n&&!a||l&&r&&i||!s&&i||!u)return-1;}return 0;}var Ane,_ne=N(()=>{"use strict";Gd();o(TIe,"compareAscending");Ane=TIe;});function wIe(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,s=i.length,l=r.length;++n<s;){var u=Ane(i[n],a[n]);if(u){if(n>=l)return u;var h=r[n];return u*(h=="desc"?-1:1);}}return t.index-e.index;}var Dne,Lne=N(()=>{"use strict";_ne();o(wIe,"compareMultiple");Dne=wIe;});function kIe(t,e,r){e.length?e=Os(e,function(a){return Pt(a)?function(s){return Kh(s,a.length===1?a[0]:a);}:a;}):e=[Ji];var n=-1;e=Os(e,Oo(pn));var i=ek(t,function(a,s,l){var u=Os(e,function(h){return h(a);});return{criteria:u,index:++n,value:a};});return Sne(i,function(a,s){return Dne(a,s,r);});}var Rne,Nne=N(()=>{"use strict";Vd();I2();ns();uR();Cne();Ld();Lne();_u();Un();o(kIe,"baseOrderBy");Rne=kIe;});var EIe,Mne,Ine=N(()=>{"use strict";sR();EIe=Yw("length"),Mne=EIe;});function PIe(t){for(var e=One.lastIndex=0;One.test(t);)++e;return e;}var Pne,SIe,CIe,AIe,_Ie,DIe,LIe,xR,bR,RIe,Bne,Fne,$ne,NIe,zne,Gne,MIe,IIe,OIe,One,Vne,Une=N(()=>{"use strict";Pne="\\ud800-\\udfff",SIe="\\u0300-\\u036f",CIe="\\ufe20-\\ufe2f",AIe="\\u20d0-\\u20ff",_Ie=SIe+CIe+AIe,DIe="\\ufe0e\\ufe0f",LIe="["+Pne+"]",xR="["+_Ie+"]",bR="\\ud83c[\\udffb-\\udfff]",RIe="(?:"+xR+"|"+bR+")",Bne="[^"+Pne+"]",Fne="(?:\\ud83c[\\udde6-\\uddff]){2}",$ne="[\\ud800-\\udbff][\\udc00-\\udfff]",NIe="\\u200d",zne=RIe+"?",Gne="["+DIe+"]?",MIe="(?:"+NIe+"(?:"+[Bne,Fne,$ne].join("|")+")"+Gne+zne+")*",IIe=Gne+zne+MIe,OIe="(?:"+[Bne+xR+"?",xR,Fne,$ne,LIe].join("|")+")",One=RegExp(bR+"(?="+bR+")|"+OIe+IIe,"g");o(PIe,"unicodeSize");Vne=PIe;});function BIe(t){return ete(t)?Vne(t):Mne(t);}var Hne,Wne=N(()=>{"use strict";Ine();tte();Une();o(BIe,"stringSize");Hne=BIe;});function FIe(t,e){return sk(t,e,function(r,n){return qw(t,n);});}var qne,Yne=N(()=>{"use strict";vR();aR();o(FIe,"basePick");qne=FIe;});var $Ie,Yd,Xne=N(()=>{"use strict";Yne();Jee();$Ie=Zee(function(t,e){return t==null?{}:qne(t,e);}),Yd=$Ie;});function VIe(t,e,r,n){for(var i=-1,a=GIe(zIe((e-t)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=t,t+=r;return s;}var zIe,GIe,jne,Kne=N(()=>{"use strict";zIe=Math.ceil,GIe=Math.max;o(VIe,"baseRange");jne=VIe;});function UIe(t){return function(e,r,n){return n&&typeof n!="number"&&ro(e,r,n)&&(r=n=void 0),e=wm(e),r===void 0?(r=e,e=0):r=wm(r),n=n===void 0?e<r?1:-1:wm(n),jne(e,r,n,t);};}var Qne,Zne=N(()=>{"use strict";Kne();Nd();PL();o(UIe,"createRange");Qne=UIe;});var HIe,Vo,Jne=N(()=>{"use strict";Zne();HIe=Qne(),Vo=HIe;});function WIe(t,e,r,n,i){return i(t,function(a,s,l){r=n?(n=!1,a):e(r,a,s,l);}),r;}var eie,tie=N(()=>{"use strict";o(WIe,"baseReduce");eie=WIe;});function qIe(t,e,r){var n=Pt(t)?rte:eie,i=arguments.length<3;return n(t,pn(e,4),r,i,Ps);}var Yr,TR=N(()=>{"use strict";nte();Zh();ns();tie();Un();o(qIe,"reduce");Yr=qIe;});function YIe(t,e){var r=Pt(t)?Lm:Jw;return r(t,bne(pn(e,3)));}var tf,rie=N(()=>{"use strict";Sw();lR();ns();Un();Tne();o(YIe,"reject");tf=YIe;});function KIe(t){if(t==null)return 0;if(fi(t))return bi(t)?Hne(t):t.length;var e=so(t);return e==XIe||e==jIe?t.size:Sm(t).length;}var XIe,jIe,wR,nie=N(()=>{"use strict";xw();Hd();Io();tk();Wne();XIe="[object Map]",jIe="[object Set]";o(KIe,"size");wR=KIe;});function QIe(t,e){var r;return Ps(t,function(n,i,a){return r=e(n,i,a),!r;}),!!r;}var iie,aie=N(()=>{"use strict";Zh();o(QIe,"baseSome");iie=QIe;});function ZIe(t,e,r){var n=Pt(t)?Bw:iie;return r&&ro(t,e,r)&&(e=void 0),n(t,pn(e,3));}var P2,sie=N(()=>{"use strict";ZL();ns();aie();Un();Nd();o(ZIe,"some");P2=ZIe;});var JIe,Cc,oie=N(()=>{"use strict";Dm();Nne();um();Nd();JIe=mc(function(t,e){if(t==null)return[];var r=e.length;return r>1&&ro(t,e[0],e[1])?e=[]:r>2&&ro(e[0],e[1],e[2])&&(e=[e[0]]),Rne(t,Ec(e,1),[]);}),Cc=JIe;});var eOe,tOe,lie,cie=N(()=>{"use strict";XL();BL();zw();eOe=1/0,tOe=Qh&&1/Im(new Qh([,-0]))[1]==eOe?function(t){return new Qh(t);}:ai,lie=tOe;});function nOe(t,e,r){var n=-1,i=vw,a=t.length,s=!0,l=[],u=l;if(r)s=!1,i=Kw;else if(a>=rOe){var h=e?null:lie(t);if(h)return Im(h);s=!1,i=Mm,u=new Nm();}else u=e?[]:l;e:for(;++n<a;){var f=t[n],d=e?e(f):f;if(f=r||f!==0?f:0,s&&d===d){for(var p=u.length;p--;)if(u[p]===d)continue e;e&&u.push(d),l.push(f);}else i(u,d,r)||(u!==l&&u.push(d),l.push(f));}return l;}var rOe,$m,ok=N(()=>{"use strict";Pw();zL();oR();Fw();cie();zw();rOe=200;o(nOe,"baseUniq");$m=nOe;});var iOe,kR,uie=N(()=>{"use strict";Dm();um();ok();yT();iOe=mc(function(t){return $m(Ec(t,1,Dd,!0));}),kR=iOe;});function aOe(t){return t&&t.length?$m(t):[];}var zm,hie=N(()=>{"use strict";ok();o(aOe,"uniq");zm=aOe;});function sOe(t,e){return t&&t.length?$m(t,pn(e,2)):[];}var fie,die=N(()=>{"use strict";ns();ok();o(sOe,"uniqBy");fie=sOe;});function lOe(t){var e=++oOe;return Tw(t)+e;}var oOe,Xd,pie=N(()=>{"use strict";GL();oOe=0;o(lOe,"uniqueId");Xd=lOe;});function cOe(t,e,r){for(var n=-1,i=t.length,a=e.length,s={};++n<i;){var l=n<a?e[n]:void 0;r(s,t[n],l);}return s;}var mie,gie=N(()=>{"use strict";o(cOe,"baseZipObject");mie=cOe;});function uOe(t,e){return mie(t||[],e||[],pc);}var lk,yie=N(()=>{"use strict";cm();gie();o(uOe,"zipObject");lk=uOe;});var Yt=N(()=>{"use strict";Gee();KL();Wte();qte();v9();Ire();Bre();$re();zre();Gre();qre();cR();Qre();Jre();hR();kw();Zw();ene();tne();rne();one();_u();une();hne();Un();nk();t2();to();mne();tk();gne();wc();Fre();Bm();yne();vne();T9();yR();xne();BL();Nre();Xne();Ene();Jne();TR();rie();nie();sie();oie();uie();hie();pie();mR();yie();});function xie(t,e){t[e]?t[e]++:t[e]=1;}function bie(t,e){--t[e]||delete t[e];}function B2(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s;}return i+vie+a+vie+(gr(n)?hOe:n);}function fOe(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s;}var l={v:i,w:a};return n&&(l.name=n),l;}function ER(t,e){return B2(t,e.v,e.w,e.name);}var hOe,jd,vie,an,ck=N(()=>{"use strict";var _Class46;Yt();hOe="\0",jd="\0",vie="",an=(_Class46=class an{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=_s(void 0),this._defaultEdgeLabelFn=_s(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[jd]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={};}isDirected(){return this._isDirected;}isMultigraph(){return this._isMultigraph;}isCompound(){return this._isCompound;}setGraph(e){return this._label=e,this;}graph(){return this._label;}setDefaultNodeLabel(e){return Ci(e)||(e=_s(e)),this._defaultNodeLabelFn=e,this;}nodeCount(){return this._nodeCount;}nodes(){return $r(this._nodes);}sources(){var e=this;return qr(this.nodes(),function(r){return fr(e._in[r]);});}sinks(){var e=this;return qr(this.nodes(),function(r){return fr(e._out[r]);});}setNodes(e,r){var n=arguments,i=this;return Ae(e,function(a){n.length>1?i.setNode(a,r):i.setNode(a);}),this;}setNode(e,r){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=jd,this._children[e]={},this._children[jd][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this);}node(e){return this._nodes[e];}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e);}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var r=o(n=>this.removeEdge(this._edgeObjs[n]),"removeEdge");delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],Ae(this.children(e),n=>{this.setParent(n);}),delete this._children[e]),Ae($r(this._in[e]),r),delete this._in[e],delete this._preds[e],Ae($r(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount;}return this;}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(gr(r))r=jd;else{r+="";for(var n=r;!gr(n);n=this.parent(n))if(n===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r);}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this;}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e];}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==jd)return r;}}children(e){if(gr(e)&&(e=jd),this._isCompound){var r=this._children[e];if(r)return $r(r);}else{if(e===jd)return this.nodes();if(this.hasNode(e))return[];}}predecessors(e){var r=this._preds[e];if(r)return $r(r);}successors(e){var r=this._sucs[e];if(r)return $r(r);}neighbors(e){var r=this.predecessors(e);if(r)return kR(r,this.successors(e));}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0;}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;Ae(this._nodes,function(s,l){e(l)&&r.setNode(l,s);}),Ae(this._edgeObjs,function(s){r.hasNode(s.v)&&r.hasNode(s.w)&&r.setEdge(s,n.edge(s));});var i={};function a(s){var l=n.parent(s);return l===void 0||r.hasNode(l)?(i[s]=l,l):l in i?i[l]:a(l);}return o(a,"findParent"),this._isCompound&&Ae(r.nodes(),function(s){r.setParent(s,a(s));}),r;}setDefaultEdgeLabel(e){return Ci(e)||(e=_s(e)),this._defaultEdgeLabelFn=e,this;}edgeCount(){return this._edgeCount;}edges(){return br(this._edgeObjs);}setPath(e,r){var n=this,i=arguments;return Yr(e,function(a,s){return i.length>1?n.setEdge(a,s,r):n.setEdge(a,s),s;}),this;}setEdge(){var e,r,n,i,a=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(e=s.v,r=s.w,n=s.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=s,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,gr(n)||(n=""+n);var l=B2(this._isDirected,e,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,l))return a&&(this._edgeLabels[l]=i),this;if(!gr(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[l]=a?i:this._defaultEdgeLabelFn(e,r,n);var u=fOe(this._isDirected,e,r,n);return e=u.v,r=u.w,Object.freeze(u),this._edgeObjs[l]=u,xie(this._preds[r],e),xie(this._sucs[e],r),this._in[r][l]=u,this._out[e][l]=u,this._edgeCount++,this;}edge(e,r,n){var i=arguments.length===1?ER(this._isDirected,arguments[0]):B2(this._isDirected,e,r,n);return this._edgeLabels[i];}hasEdge(e,r,n){var i=arguments.length===1?ER(this._isDirected,arguments[0]):B2(this._isDirected,e,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i);}removeEdge(e,r,n){var i=arguments.length===1?ER(this._isDirected,arguments[0]):B2(this._isDirected,e,r,n),a=this._edgeObjs[i];return a&&(e=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],bie(this._preds[r],e),bie(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this;}inEdges(e,r){var n=this._in[e];if(n){var i=br(n);return r?qr(i,function(a){return a.v===r;}):i;}}outEdges(e,r){var n=this._out[e];if(n){var i=br(n);return r?qr(i,function(a){return a.w===r;}):i;}}nodeEdges(e,r){var n=this.inEdges(e,r);if(n)return n.concat(this.outEdges(e,r));}},o(_Class46,"Graph"),_Class46);an.prototype._nodeCount=0;an.prototype._edgeCount=0;o(xie,"incrementOrInitEntry");o(bie,"decrementOrRemoveEntry");o(B2,"edgeArgsToId");o(fOe,"edgeArgsToObj");o(ER,"edgeObjToId");});var Uo=N(()=>{"use strict";ck();});function Tie(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev;}function dOe(t,e){if(t!=="_next"&&t!=="_prev")return e;}var hk,wie=N(()=>{"use strict";var _Class47;hk=(_Class47=class hk{constructor(){var e={};e._next=e._prev=e,this._sentinel=e;}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return Tie(r),r;}enqueue(e){var r=this._sentinel;e._prev&&e._next&&Tie(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r;}toString(){for(var e=[],r=this._sentinel,n=r._prev;n!==r;)e.push(JSON.stringify(n,dOe)),n=n._prev;return"["+e.join(", ")+"]";}},o(_Class47,"List"),_Class47);o(Tie,"unlink");o(dOe,"filterOutLinks");});function kie(t,e){if(t.nodeCount()<=1)return[];var r=gOe(t,e||pOe),n=mOe(r.graph,r.buckets,r.zeroIdx);return Wr(Je(n,function(i){return t.outEdges(i.v,i.w);}));}function mOe(t,e,r){for(var n=[],i=e[e.length-1],a=e[0],s;t.nodeCount();){for(;s=a.dequeue();)SR(t,e,r,s);for(;s=i.dequeue();)SR(t,e,r,s);if(t.nodeCount()){for(var l=e.length-2;l>0;--l)if(s=e[l].dequeue(),s){n=n.concat(SR(t,e,r,s,!0));break;}}}return n;}function SR(t,e,r,n,i){var a=i?[]:void 0;return Ae(t.inEdges(n.v),function(s){var l=t.edge(s),u=t.node(s.v);i&&a.push({v:s.v,w:s.w}),u.out-=l,CR(e,r,u);}),Ae(t.outEdges(n.v),function(s){var l=t.edge(s),u=s.w,h=t.node(u);h.in-=l,CR(e,r,h);}),t.removeNode(n.v),a;}function gOe(t,e){var r=new an(),n=0,i=0;Ae(t.nodes(),function(l){r.setNode(l,{v:l,in:0,out:0});}),Ae(t.edges(),function(l){var u=r.edge(l.v,l.w)||0,h=e(l),f=u+h;r.setEdge(l.v,l.w,f),i=Math.max(i,r.node(l.v).out+=h),n=Math.max(n,r.node(l.w).in+=h);});var a=Vo(i+n+3).map(function(){return new hk();}),s=n+1;return Ae(r.nodes(),function(l){CR(a,s,r.node(l));}),{graph:r,buckets:a,zeroIdx:s};}function CR(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r);}var pOe,Eie=N(()=>{"use strict";Yt();Uo();wie();pOe=_s(1);o(kie,"greedyFAS");o(mOe,"doGreedyFAS");o(SR,"removeNode");o(gOe,"buildState");o(CR,"assignBucket");});function Sie(t){var e=t.graph().acyclicer==="greedy"?kie(t,r(t)):yOe(t);Ae(e,function(n){var i=t.edge(n);t.removeEdge(n),i.forwardName=n.name,i.reversed=!0,t.setEdge(n.w,n.v,i,Xd("rev"));});function r(n){return function(i){return n.edge(i).weight;};}o(r,"weightFn");}function yOe(t){var e=[],r={},n={};function i(a){Object.prototype.hasOwnProperty.call(n,a)||(n[a]=!0,r[a]=!0,Ae(t.outEdges(a),function(s){Object.prototype.hasOwnProperty.call(r,s.w)?e.push(s):i(s.w);}),delete r[a]);}return o(i,"dfs"),Ae(t.nodes(),i),e;}function Cie(t){Ae(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n);}});}var AR=N(()=>{"use strict";Yt();Eie();o(Sie,"run");o(yOe,"dfsFAS");o(Cie,"undo");});function Ac(t,e,r,n){var i;do i=Xd(n);while(t.hasNode(i));return r.dummy=e,t.setNode(i,r),i;}function _ie(t){var e=new an().setGraph(t.graph());return Ae(t.nodes(),function(r){e.setNode(r,t.node(r));}),Ae(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},i=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)});}),e;}function fk(t){var e=new an({multigraph:t.isMultigraph()}).setGraph(t.graph());return Ae(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r));}),Ae(t.edges(),function(r){e.setEdge(r,t.edge(r));}),e;}function _R(t,e){var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,l=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,h;return Math.abs(a)*s>Math.abs(i)*l?(a<0&&(l=-l),u=l*i/a,h=l):(i<0&&(s=-s),u=s,h=s*a/i),{x:r+u,y:n+h};}function rf(t){var e=Je(Vo(LR(t)+1),function(){return[];});return Ae(t.nodes(),function(r){var n=t.node(r),i=n.rank;gr(i)||(e[i][n.order]=r);}),e;}function Die(t){var e=Ll(Je(t.nodes(),function(r){return t.node(r).rank;}));Ae(t.nodes(),function(r){var n=t.node(r);Bt(n,"rank")&&(n.rank-=e);});}function Lie(t){var e=Ll(Je(t.nodes(),function(a){return t.node(a).rank;})),r=[];Ae(t.nodes(),function(a){var s=t.node(a).rank-e;r[s]||(r[s]=[]),r[s].push(a);});var n=0,i=t.graph().nodeRankFactor;Ae(r,function(a,s){gr(a)&&s%i!==0?--n:n&&Ae(a,function(l){t.node(l).rank+=n;});});}function DR(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),Ac(t,"border",i,e);}function LR(t){return Bs(Je(t.nodes(),function(e){var r=t.node(e).rank;if(!gr(r))return r;}));}function Rie(t,e){var r={lhs:[],rhs:[]};return Ae(t,function(n){e(n)?r.lhs.push(n):r.rhs.push(n);}),r;}function Nie(t,e){var r=jw();try{return e();}finally{console.log(t+" time: "+(jw()-r)+"ms");}}function Mie(t,e){return e();}var _c=N(()=>{"use strict";Yt();Uo();o(Ac,"addDummyNode");o(_ie,"simplify");o(fk,"asNonCompoundGraph");o(_R,"intersectRect");o(rf,"buildLayerMatrix");o(Die,"normalizeRanks");o(Lie,"removeEmptyRanks");o(DR,"addBorderNode");o(LR,"maxRank");o(Rie,"partition");o(Nie,"time");o(Mie,"notime");});function Oie(t){function e(r){var n=t.children(r),i=t.node(r);if(n.length&&Ae(n,e),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,s=i.maxRank+1;a<s;++a)Iie(t,"borderLeft","_bl",r,i,a),Iie(t,"borderRight","_br",r,i,a);}}o(e,"dfs"),Ae(t.children(),e);}function Iie(t,e,r,n,i,a){var s={width:0,height:0,rank:a,borderType:e},l=i[e][a-1],u=Ac(t,"border",s,r);i[e][a]=u,t.setParent(u,n),l&&t.setEdge(l,u,{weight:1});}var Pie=N(()=>{"use strict";Yt();_c();o(Oie,"addBorderSegments");o(Iie,"addBorderNode");});function Fie(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&zie(t);}function $ie(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&vOe(t),(e==="lr"||e==="rl")&&(xOe(t),zie(t));}function zie(t){Ae(t.nodes(),function(e){Bie(t.node(e));}),Ae(t.edges(),function(e){Bie(t.edge(e));});}function Bie(t){var e=t.width;t.width=t.height,t.height=e;}function vOe(t){Ae(t.nodes(),function(e){RR(t.node(e));}),Ae(t.edges(),function(e){var r=t.edge(e);Ae(r.points,RR),Object.prototype.hasOwnProperty.call(r,"y")&&RR(r);});}function RR(t){t.y=-t.y;}function xOe(t){Ae(t.nodes(),function(e){NR(t.node(e));}),Ae(t.edges(),function(e){var r=t.edge(e);Ae(r.points,NR),Object.prototype.hasOwnProperty.call(r,"x")&&NR(r);});}function NR(t){var e=t.x;t.x=t.y,t.y=e;}var Gie=N(()=>{"use strict";Yt();o(Fie,"adjust");o($ie,"undo");o(zie,"swapWidthHeight");o(Bie,"swapWidthHeightOne");o(vOe,"reverseY");o(RR,"reverseYOne");o(xOe,"swapXY");o(NR,"swapXYOne");});function Vie(t){t.graph().dummyChains=[],Ae(t.edges(),function(e){TOe(t,e);});}function TOe(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,s=e.name,l=t.edge(e),u=l.labelRank;if(a!==n+1){t.removeEdge(e);var h=void 0,f,d;for(d=0,++n;n<a;++d,++n)l.points=[],h={width:0,height:0,edgeLabel:l,edgeObj:e,rank:n},f=Ac(t,"edge",h,"_d"),n===u&&(h.width=l.width,h.height=l.height,h.dummy="edge-label",h.labelpos=l.labelpos),t.setEdge(r,f,{weight:l.weight},s),d===0&&t.graph().dummyChains.push(f),r=f;t.setEdge(r,i,{weight:l.weight},s);}}function Uie(t){Ae(t.graph().dummyChains,function(e){var r=t.node(e),n=r.edgeLabel,i;for(t.setEdge(r.edgeObj,n);r.dummy;)i=t.successors(e)[0],t.removeNode(e),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),e=i,r=t.node(e);});}var MR=N(()=>{"use strict";Yt();_c();o(Vie,"run");o(TOe,"normalizeEdge");o(Uie,"undo");});function F2(t){var e={};function r(n){var i=t.node(n);if(Object.prototype.hasOwnProperty.call(e,n))return i.rank;e[n]=!0;var a=Ll(Je(t.outEdges(n),function(s){return r(s.w)-t.edge(s).minlen;}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a;}o(r,"dfs"),Ae(t.sources(),r);}function Kd(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen;}var dk=N(()=>{"use strict";Yt();o(F2,"longestPath");o(Kd,"slack");});function pk(t){var e=new an({directed:!1}),r=t.nodes()[0],n=t.nodeCount();e.setNode(r,{});for(var i,a;wOe(e,t)<n;)i=kOe(e,t),a=e.hasNode(i.v)?Kd(t,i):-Kd(t,i),EOe(e,t,a);return e;}function wOe(t,e){function r(n){Ae(e.nodeEdges(n),function(i){var a=i.v,s=n===a?i.w:a;!t.hasNode(s)&&!Kd(e,i)&&(t.setNode(s,{}),t.setEdge(n,s,{}),r(s));});}return o(r,"dfs"),Ae(t.nodes(),r),t.nodeCount();}function kOe(t,e){return qd(e.edges(),function(r){if(t.hasNode(r.v)!==t.hasNode(r.w))return Kd(e,r);});}function EOe(t,e,r){Ae(t.nodes(),function(n){e.node(n).rank+=r;});}var IR=N(()=>{"use strict";Yt();Uo();dk();o(pk,"feasibleTree");o(wOe,"tightTree");o(kOe,"findMinSlackEdge");o(EOe,"shiftRanks");});var Wie=N(()=>{"use strict";});var OR=N(()=>{"use strict";});var BYt,PR=N(()=>{"use strict";Yt();OR();BYt=_s(1);});var qie=N(()=>{"use strict";PR();});var BR=N(()=>{"use strict";});var Yie=N(()=>{"use strict";BR();});var XYt,Xie=N(()=>{"use strict";Yt();XYt=_s(1);});function FR(t){var e={},r={},n=[];function i(a){if(Object.prototype.hasOwnProperty.call(r,a))throw new $2();Object.prototype.hasOwnProperty.call(e,a)||(r[a]=!0,e[a]=!0,Ae(t.predecessors(a),i),delete r[a],n.push(a));}if(o(i,"visit"),Ae(t.sinks(),i),wR(e)!==t.nodeCount())throw new $2();return n;}function $2(){}var $R=N(()=>{"use strict";Yt();FR.CycleException=$2;o(FR,"topsort");o($2,"CycleException");$2.prototype=new Error();});var jie=N(()=>{"use strict";$R();});function mk(t,e,r){Pt(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return Ae(e,function(s){if(!t.hasNode(s))throw new Error("Graph does not have node: "+s);Kie(t,s,r==="post",a,n,i);}),i;}function Kie(t,e,r,n,i,a){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,r||a.push(e),Ae(i(e),function(s){Kie(t,s,r,n,i,a);}),r&&a.push(e));}var zR=N(()=>{"use strict";Yt();o(mk,"dfs");o(Kie,"doDfs");});function GR(t,e){return mk(t,e,"post");}var Qie=N(()=>{"use strict";zR();o(GR,"postorder");});function VR(t,e){return mk(t,e,"pre");}var Zie=N(()=>{"use strict";zR();o(VR,"preorder");});var Jie=N(()=>{"use strict";OR();ck();});var eae=N(()=>{"use strict";Wie();PR();qie();Yie();Xie();jie();Qie();Zie();Jie();BR();$R();});function af(t){t=_ie(t),F2(t);var e=pk(t);HR(e),UR(e,t);for(var r,n;r=iae(e);)n=aae(e,t,r),sae(e,t,r,n);}function UR(t,e){var r=GR(t,t.nodes());r=r.slice(0,r.length-1),Ae(r,function(n){DOe(t,e,n);});}function DOe(t,e,r){var n=t.node(r),i=n.parent;t.edge(r,i).cutvalue=rae(t,e,r);}function rae(t,e,r){var n=t.node(r),i=n.parent,a=!0,s=e.edge(r,i),l=0;return s||(a=!1,s=e.edge(i,r)),l=s.weight,Ae(e.nodeEdges(r),function(u){var h=u.v===r,f=h?u.w:u.v;if(f!==i){var d=h===a,p=e.edge(u).weight;if(l+=d?p:-p,ROe(t,r,f)){var m=t.edge(r,f).cutvalue;l+=d?-m:m;}}}),l;}function HR(t,e){arguments.length<2&&(e=t.nodes()[0]),nae(t,{},1,e);}function nae(t,e,r,n,i){var a=r,s=t.node(n);return e[n]=!0,Ae(t.neighbors(n),function(l){Object.prototype.hasOwnProperty.call(e,l)||(r=nae(t,e,r,l,n));}),s.low=a,s.lim=r++,i?s.parent=i:delete s.parent,r;}function iae(t){return is(t.edges(),function(e){return t.edge(e).cutvalue<0;});}function aae(t,e,r){var n=r.v,i=r.w;e.hasEdge(n,i)||(n=r.w,i=r.v);var a=t.node(n),s=t.node(i),l=a,u=!1;a.lim>s.lim&&(l=s,u=!0);var h=qr(e.edges(),function(f){return u===tae(t,t.node(f.v),l)&&u!==tae(t,t.node(f.w),l);});return qd(h,function(f){return Kd(e,f);});}function sae(t,e,r,n){var i=r.v,a=r.w;t.removeEdge(i,a),t.setEdge(n.v,n.w,{}),HR(t),UR(t,e),LOe(t,e);}function LOe(t,e){var r=is(t.nodes(),function(i){return!e.node(i).parent;}),n=VR(t,r);n=n.slice(1),Ae(n,function(i){var a=t.node(i).parent,s=e.edge(i,a),l=!1;s||(s=e.edge(a,i),l=!0),e.node(i).rank=e.node(a).rank+(l?s.minlen:-s.minlen);});}function ROe(t,e,r){return t.hasEdge(e,r);}function tae(t,e,r){return r.low<=e.lim&&e.lim<=r.lim;}var oae=N(()=>{"use strict";Yt();eae();_c();IR();dk();af.initLowLimValues=HR;af.initCutValues=UR;af.calcCutValue=rae;af.leaveEdge=iae;af.enterEdge=aae;af.exchangeEdges=sae;o(af,"networkSimplex");o(UR,"initCutValues");o(DOe,"assignCutValue");o(rae,"calcCutValue");o(HR,"initLowLimValues");o(nae,"dfsAssignLowLim");o(iae,"leaveEdge");o(aae,"enterEdge");o(sae,"exchangeEdges");o(LOe,"updateRanks");o(ROe,"isTreeEdge");o(tae,"isDescendant");});function WR(t){switch(t.graph().ranker){case"network-simplex":lae(t);break;case"tight-tree":MOe(t);break;case"longest-path":NOe(t);break;default:lae(t);}}function MOe(t){F2(t),pk(t);}function lae(t){af(t);}var NOe,qR=N(()=>{"use strict";IR();oae();dk();o(WR,"rank");NOe=F2;o(MOe,"tightTreeRanker");o(lae,"networkSimplexRanker");});function cae(t){var e=Ac(t,"root",{},"_root"),r=IOe(t),n=Bs(br(r))-1,i=2*n+1;t.graph().nestingRoot=e,Ae(t.edges(),function(s){t.edge(s).minlen*=i;});var a=OOe(t)+1;Ae(t.children(),function(s){uae(t,e,i,a,n,r,s);}),t.graph().nodeRankFactor=i;}function uae(t,e,r,n,i,a,s){var l=t.children(s);if(!l.length){s!==e&&t.setEdge(e,s,{weight:0,minlen:r});return;}var u=DR(t,"_bt"),h=DR(t,"_bb"),f=t.node(s);t.setParent(u,s),f.borderTop=u,t.setParent(h,s),f.borderBottom=h,Ae(l,function(d){uae(t,e,r,n,i,a,d);var p=t.node(d),m=p.borderTop?p.borderTop:d,g=p.borderBottom?p.borderBottom:d,y=p.borderTop?n:2*n,v=m!==g?1:i-a[s]+1;t.setEdge(u,m,{weight:y,minlen:v,nestingEdge:!0}),t.setEdge(g,h,{weight:y,minlen:v,nestingEdge:!0});}),t.parent(s)||t.setEdge(e,u,{weight:0,minlen:i+a[s]});}function IOe(t){var e={};function r(n,i){var a=t.children(n);a&&a.length&&Ae(a,function(s){r(s,i+1);}),e[n]=i;}return o(r,"dfs"),Ae(t.children(),function(n){r(n,1);}),e;}function OOe(t){return Yr(t.edges(),function(e,r){return e+t.edge(r).weight;},0);}function hae(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,Ae(t.edges(),function(r){var n=t.edge(r);n.nestingEdge&&t.removeEdge(r);});}var fae=N(()=>{"use strict";Yt();_c();o(cae,"run");o(uae,"dfs");o(IOe,"treeDepths");o(OOe,"sumWeights");o(hae,"cleanup");});function dae(t,e,r){var n={},i;Ae(r,function(a){for(var s=t.parent(a),l,u;s;){if(l=t.parent(s),l?(u=n[l],n[l]=s):(u=i,i=s),u&&u!==s){e.setEdge(u,s);return;}s=l;}});}var pae=N(()=>{"use strict";Yt();o(dae,"addSubgraphConstraints");});function mae(t,e,r){var n=BOe(t),i=new an({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(a){return t.node(a);});return Ae(t.nodes(),function(a){var s=t.node(a),l=t.parent(a);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(i.setNode(a),i.setParent(a,l||n),Ae(t[r](a),function(u){var h=u.v===a?u.w:u.v,f=i.edge(h,a),d=gr(f)?0:f.weight;i.setEdge(h,a,{weight:t.edge(u).weight+d});}),Object.prototype.hasOwnProperty.call(s,"minRank")&&i.setNode(a,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}));}),i;}function BOe(t){for(var e;t.hasNode(e=Xd("_root")););return e;}var gae=N(()=>{"use strict";Yt();Uo();o(mae,"buildLayerGraph");o(BOe,"createRootNode");});function yae(t,e){for(var r=0,n=1;n<e.length;++n)r+=FOe(t,e[n-1],e[n]);return r;}function FOe(t,e,r){for(var n=lk(r,Je(r,function(h,f){return f;})),i=Wr(Je(e,function(h){return Cc(Je(t.outEdges(h),function(f){return{pos:n[f.w],weight:t.edge(f).weight};}),"pos");})),a=1;a<r.length;)a<<=1;var s=2*a-1;a-=1;var l=Je(new Array(s),function(){return 0;}),u=0;return Ae(i.forEach(function(h){var f=h.pos+a;l[f]+=h.weight;for(var d=0;f>0;)f%2&&(d+=l[f+1]),f=f-1>>1,l[f]+=h.weight;u+=h.weight*d;})),u;}var vae=N(()=>{"use strict";Yt();o(yae,"crossCount");o(FOe,"twoLayerCrossCount");});function xae(t){var e={},r=qr(t.nodes(),function(l){return!t.children(l).length;}),n=Bs(Je(r,function(l){return t.node(l).rank;})),i=Je(Vo(n+1),function(){return[];});function a(l){if(!Bt(e,l)){e[l]=!0;var u=t.node(l);i[u.rank].push(l),Ae(t.successors(l),a);}}o(a,"dfs");var s=Cc(r,function(l){return t.node(l).rank;});return Ae(s,a),i;}var bae=N(()=>{"use strict";Yt();o(xae,"initOrder");});function Tae(t,e){return Je(e,function(r){var n=t.inEdges(r);if(n.length){var i=Yr(n,function(a,s){var l=t.edge(s),u=t.node(s.v);return{sum:a.sum+l.weight*u.order,weight:a.weight+l.weight};},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight};}else return{v:r};});}var wae=N(()=>{"use strict";Yt();o(Tae,"barycenter");});function kae(t,e){var r={};Ae(t,function(i,a){var s=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};gr(i.barycenter)||(s.barycenter=i.barycenter,s.weight=i.weight);}),Ae(e.edges(),function(i){var a=r[i.v],s=r[i.w];!gr(a)&&!gr(s)&&(s.indegree++,a.out.push(r[i.w]));});var n=qr(r,function(i){return!i.indegree;});return $Oe(n);}function $Oe(t){var e=[];function r(a){return function(s){s.merged||(gr(s.barycenter)||gr(a.barycenter)||s.barycenter>=a.barycenter)&&zOe(a,s);};}o(r,"handleIn");function n(a){return function(s){s.in.push(a),--s.indegree===0&&t.push(s);};}for(o(n,"handleOut");t.length;){var i=t.pop();e.push(i),Ae(i.in.reverse(),r(i)),Ae(i.out,n(i));}return Je(qr(e,function(a){return!a.merged;}),function(a){return Yd(a,["vs","i","barycenter","weight"]);});}function zOe(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0;}var Eae=N(()=>{"use strict";Yt();o(kae,"resolveConflicts");o($Oe,"doResolveConflicts");o(zOe,"mergeEntries");});function Cae(t,e){var r=Rie(t,function(f){return Object.prototype.hasOwnProperty.call(f,"barycenter");}),n=r.lhs,i=Cc(r.rhs,function(f){return-f.i;}),a=[],s=0,l=0,u=0;n.sort(GOe(!!e)),u=Sae(a,i,u),Ae(n,function(f){u+=f.vs.length,a.push(f.vs),s+=f.barycenter*f.weight,l+=f.weight,u=Sae(a,i,u);});var h={vs:Wr(a)};return l&&(h.barycenter=s/l,h.weight=l),h;}function Sae(t,e,r){for(var n;e.length&&(n=da(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r;}function GOe(t){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:t?r.i-e.i:e.i-r.i;};}var Aae=N(()=>{"use strict";Yt();_c();o(Cae,"sort");o(Sae,"consumeUnsortable");o(GOe,"compareWithBias");});function YR(t,e,r,n){var i=t.children(e),a=t.node(e),s=a?a.borderLeft:void 0,l=a?a.borderRight:void 0,u={};s&&(i=qr(i,function(g){return g!==s&&g!==l;}));var h=Tae(t,i);Ae(h,function(g){if(t.children(g.v).length){var y=YR(t,g.v,r,n);u[g.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter")&&UOe(g,y);}});var f=kae(h,r);VOe(f,u);var d=Cae(f,n);if(s&&(d.vs=Wr([s,d.vs,l]),t.predecessors(s).length)){var p=t.node(t.predecessors(s)[0]),m=t.node(t.predecessors(l)[0]);Object.prototype.hasOwnProperty.call(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+p.order+m.order)/(d.weight+2),d.weight+=2;}return d;}function VOe(t,e){Ae(t,function(r){r.vs=Wr(r.vs.map(function(n){return e[n]?e[n].vs:n;}));});}function UOe(t,e){gr(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight);}var _ae=N(()=>{"use strict";Yt();wae();Eae();Aae();o(YR,"sortSubgraph");o(VOe,"expandSubgraphs");o(UOe,"mergeBarycenters");});function Rae(t){var e=LR(t),r=Dae(t,Vo(1,e+1),"inEdges"),n=Dae(t,Vo(e-1,-1,-1),"outEdges"),i=xae(t);Lae(t,i);for(var a=Number.POSITIVE_INFINITY,s,l=0,u=0;u<4;++l,++u){HOe(l%2?r:n,l%4>=2),i=rf(t);var h=yae(t,i);h<a&&(u=0,s=QL(i),a=h);}Lae(t,s);}function Dae(t,e,r){return Je(e,function(n){return mae(t,n,r);});}function HOe(t,e){var r=new an();Ae(t,function(n){var i=n.graph().root,a=YR(n,i,r,e);Ae(a.vs,function(s,l){n.node(s).order=l;}),dae(n,r,a.vs);});}function Lae(t,e){Ae(e,function(r){Ae(r,function(n,i){t.node(n).order=i;});});}var Nae=N(()=>{"use strict";Yt();Uo();_c();pae();gae();vae();bae();_ae();o(Rae,"order");o(Dae,"buildLayerGraphs");o(HOe,"sweepLayerGraphs");o(Lae,"assignOrder");});function Mae(t){var e=qOe(t);Ae(t.graph().dummyChains,function(r){for(var n=t.node(r),i=n.edgeObj,a=WOe(t,e,i.v,i.w),s=a.path,l=a.lca,u=0,h=s[u],f=!0;r!==i.w;){if(n=t.node(r),f){for(;(h=s[u])!==l&&t.node(h).maxRank<n.rank;)u++;h===l&&(f=!1);}if(!f){for(;u<s.length-1&&t.node(h=s[u+1]).minRank<=n.rank;)u++;h=s[u];}t.setParent(r,h),r=t.successors(r)[0];}});}function WOe(t,e,r,n){var i=[],a=[],s=Math.min(e[r].low,e[n].low),l=Math.max(e[r].lim,e[n].lim),u,h;u=r;do u=t.parent(u),i.push(u);while(u&&(e[u].low>s||l>e[u].lim));for(h=u,u=n;(u=t.parent(u))!==h;)a.push(u);return{path:i.concat(a.reverse()),lca:h};}function qOe(t){var e={},r=0;function n(i){var a=r;Ae(t.children(i),n),e[i]={low:a,lim:r++};}return o(n,"dfs"),Ae(t.children(),n),e;}var Iae=N(()=>{"use strict";Yt();o(Mae,"parentDummyChains");o(WOe,"findPath");o(qOe,"postorder");});function YOe(t,e){var r={};function n(i,a){var s=0,l=0,u=i.length,h=da(a);return Ae(a,function(f,d){var p=jOe(t,f),m=p?t.node(p).order:u;(p||f===h)&&(Ae(a.slice(l,d+1),function(g){Ae(t.predecessors(g),function(y){var v=t.node(y),x=v.order;(x<s||m<x)&&!(v.dummy&&t.node(g).dummy)&&Oae(r,y,g);});}),l=d+1,s=m);}),a;}return o(n,"visitLayer"),Yr(e,n),r;}function XOe(t,e){var r={};function n(a,s,l,u,h){var f;Ae(Vo(s,l),function(d){f=a[d],t.node(f).dummy&&Ae(t.predecessors(f),function(p){var m=t.node(p);m.dummy&&(m.order<u||m.order>h)&&Oae(r,p,f);});});}o(n,"scan");function i(a,s){var l=-1,u,h=0;return Ae(s,function(f,d){if(t.node(f).dummy==="border"){var p=t.predecessors(f);p.length&&(u=t.node(p[0]).order,n(s,h,d,l,u),h=d,l=u);}n(s,h,s.length,u,a.length);}),s;}return o(i,"visitLayer"),Yr(e,i),r;}function jOe(t,e){if(t.node(e).dummy)return is(t.predecessors(e),function(r){return t.node(r).dummy;});}function Oae(t,e,r){if(e>r){var n=e;e=r,r=n;}var i=t[e];i||(t[e]=i={}),i[r]=!0;}function KOe(t,e,r){if(e>r){var n=e;e=r,r=n;}return!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],r);}function QOe(t,e,r,n){var i={},a={},s={};return Ae(e,function(l){Ae(l,function(u,h){i[u]=u,a[u]=u,s[u]=h;});}),Ae(e,function(l){var u=-1;Ae(l,function(h){var f=n(h);if(f.length){f=Cc(f,function(y){return s[y];});for(var d=(f.length-1)/2,p=Math.floor(d),m=Math.ceil(d);p<=m;++p){var g=f[p];a[h]===h&&u<s[g]&&!KOe(r,h,g)&&(a[g]=h,a[h]=i[h]=i[g],u=s[g]);}}});}),{root:i,align:a};}function ZOe(t,e,r,n,i){var a={},s=JOe(t,e,r,i),l=i?"borderLeft":"borderRight";function u(d,p){for(var m=s.nodes(),g=m.pop(),y={};g;)y[g]?d(g):(y[g]=!0,m.push(g),m=m.concat(p(g))),g=m.pop();}o(u,"iterate");function h(d){a[d]=s.inEdges(d).reduce(function(p,m){return Math.max(p,a[m.v]+s.edge(m));},0);}o(h,"pass1");function f(d){var p=s.outEdges(d).reduce(function(g,y){return Math.min(g,a[y.w]-s.edge(y));},Number.POSITIVE_INFINITY),m=t.node(d);p!==Number.POSITIVE_INFINITY&&m.borderType!==l&&(a[d]=Math.max(a[d],p));}return o(f,"pass2"),u(h,s.predecessors.bind(s)),u(f,s.successors.bind(s)),Ae(n,function(d){a[d]=a[r[d]];}),a;}function JOe(t,e,r,n){var i=new an(),a=t.graph(),s=nPe(a.nodesep,a.edgesep,n);return Ae(e,function(l){var u;Ae(l,function(h){var f=r[h];if(i.setNode(f),u){var d=r[u],p=i.edge(d,f);i.setEdge(d,f,Math.max(s(t,h,u),p||0));}u=h;});}),i;}function ePe(t,e){return qd(br(e),function(r){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return fR(r,function(a,s){var l=iPe(t,s)/2;n=Math.max(a+l,n),i=Math.min(a-l,i);}),n-i;});}function tPe(t,e){var r=br(e),n=Ll(r),i=Bs(r);Ae(["u","d"],function(a){Ae(["l","r"],function(s){var l=a+s,u=t[l],h;if(u!==e){var f=br(u);h=s==="l"?n-Ll(f):i-Bs(f),h&&(t[l]=Wd(u,function(d){return d+h;}));}});});}function rPe(t,e){return Wd(t.ul,function(r,n){if(e)return t[e.toLowerCase()][n];var i=Cc(Je(t,n));return(i[1]+i[2])/2;});}function Pae(t){var e=rf(t),r=zh(YOe(t,e),XOe(t,e)),n={},i;Ae(["u","d"],function(s){i=s==="u"?e:br(e).reverse(),Ae(["l","r"],function(l){l==="r"&&(i=Je(i,function(d){return br(d).reverse();}));var u=(s==="u"?t.predecessors:t.successors).bind(t),h=QOe(t,i,r,u),f=ZOe(t,i,h.root,h.align,l==="r");l==="r"&&(f=Wd(f,function(d){return-d;})),n[s+l]=f;});});var a=ePe(t,n);return tPe(n,a),rPe(n,t.graph().align);}function nPe(t,e,r){return function(n,i,a){var s=n.node(i),l=n.node(a),u=0,h;if(u+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":h=-s.width/2;break;case"r":h=s.width/2;break;}if(h&&(u+=r?h:-h),h=0,u+=(s.dummy?e:t)/2,u+=(l.dummy?e:t)/2,u+=l.width/2,Object.prototype.hasOwnProperty.call(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":h=l.width/2;break;case"r":h=-l.width/2;break;}return h&&(u+=r?h:-h),h=0,u;};}function iPe(t,e){return t.node(e).width;}var Bae=N(()=>{"use strict";Yt();Uo();_c();o(YOe,"findType1Conflicts");o(XOe,"findType2Conflicts");o(jOe,"findOtherInnerSegmentNode");o(Oae,"addConflict");o(KOe,"hasConflict");o(QOe,"verticalAlignment");o(ZOe,"horizontalCompaction");o(JOe,"buildBlockGraph");o(ePe,"findSmallestWidthAlignment");o(tPe,"alignCoordinates");o(rPe,"balance");o(Pae,"positionX");o(nPe,"sep");o(iPe,"width");});function Fae(t){t=fk(t),aPe(t),dR(Pae(t),function(e,r){t.node(r).x=e;});}function aPe(t){var e=rf(t),r=t.graph().ranksep,n=0;Ae(e,function(i){var a=Bs(Je(i,function(s){return t.node(s).height;}));Ae(i,function(s){t.node(s).y=n+a/2;}),n+=a+r;});}var $ae=N(()=>{"use strict";Yt();_c();Bae();o(Fae,"position");o(aPe,"positionY");});function z2(t,e){var r=e&&e.debugTiming?Nie:Mie;r("layout",()=>{var n=r("  buildLayoutGraph",()=>gPe(t));r("  runLayout",()=>sPe(n,r)),r("  updateInputGraph",()=>oPe(t,n));});}function sPe(t,e){e("    makeSpaceForEdgeLabels",()=>yPe(t)),e("    removeSelfEdges",()=>CPe(t)),e("    acyclic",()=>Sie(t)),e("    nestingGraph.run",()=>cae(t)),e("    rank",()=>WR(fk(t))),e("    injectEdgeLabelProxies",()=>vPe(t)),e("    removeEmptyRanks",()=>Lie(t)),e("    nestingGraph.cleanup",()=>hae(t)),e("    normalizeRanks",()=>Die(t)),e("    assignRankMinMax",()=>xPe(t)),e("    removeEdgeLabelProxies",()=>bPe(t)),e("    normalize.run",()=>Vie(t)),e("    parentDummyChains",()=>Mae(t)),e("    addBorderSegments",()=>Oie(t)),e("    order",()=>Rae(t)),e("    insertSelfEdges",()=>APe(t)),e("    adjustCoordinateSystem",()=>Fie(t)),e("    position",()=>Fae(t)),e("    positionSelfEdges",()=>_Pe(t)),e("    removeBorderNodes",()=>SPe(t)),e("    normalize.undo",()=>Uie(t)),e("    fixupEdgeLabelCoords",()=>kPe(t)),e("    undoCoordinateSystem",()=>$ie(t)),e("    translateGraph",()=>TPe(t)),e("    assignNodeIntersects",()=>wPe(t)),e("    reversePoints",()=>EPe(t)),e("    acyclic.undo",()=>Cie(t));}function oPe(t,e){Ae(t.nodes(),function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height));}),Ae(t.edges(),function(r){var n=t.edge(r),i=e.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y);}),t.graph().width=e.graph().width,t.graph().height=e.graph().height;}function gPe(t){var e=new an({multigraph:!0,compound:!0}),r=jR(t.graph());return e.setGraph(zh({},cPe,XR(r,lPe),Yd(r,uPe))),Ae(t.nodes(),function(n){var i=jR(t.node(n));e.setNode(n,Jh(XR(i,hPe),fPe)),e.setParent(n,t.parent(n));}),Ae(t.edges(),function(n){var i=jR(t.edge(n));e.setEdge(n,zh({},pPe,XR(i,dPe),Yd(i,mPe)));}),e;}function yPe(t){var e=t.graph();e.ranksep/=2,Ae(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset);});}function vPe(t){Ae(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-n.rank)/2+n.rank,e};Ac(t,"edge-proxy",a,"_ep");}});}function xPe(t){var e=0;Ae(t.nodes(),function(r){var n=t.node(r);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,e=Bs(e,n.maxRank));}),t.graph().maxRank=e;}function bPe(t){Ae(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e));});}function TPe(t){var e=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,a=t.graph(),s=a.marginx||0,l=a.marginy||0;function u(h){var f=h.x,d=h.y,p=h.width,m=h.height;e=Math.min(e,f-p/2),r=Math.max(r,f+p/2),n=Math.min(n,d-m/2),i=Math.max(i,d+m/2);}o(u,"getExtremes"),Ae(t.nodes(),function(h){u(t.node(h));}),Ae(t.edges(),function(h){var f=t.edge(h);Object.prototype.hasOwnProperty.call(f,"x")&&u(f);}),e-=s,n-=l,Ae(t.nodes(),function(h){var f=t.node(h);f.x-=e,f.y-=n;}),Ae(t.edges(),function(h){var f=t.edge(h);Ae(f.points,function(d){d.x-=e,d.y-=n;}),Object.prototype.hasOwnProperty.call(f,"x")&&(f.x-=e),Object.prototype.hasOwnProperty.call(f,"y")&&(f.y-=n);}),a.width=r-e+s,a.height=i-n+l;}function wPe(t){Ae(t.edges(),function(e){var r=t.edge(e),n=t.node(e.v),i=t.node(e.w),a,s;r.points?(a=r.points[0],s=r.points[r.points.length-1]):(r.points=[],a=i,s=n),r.points.unshift(_R(n,a)),r.points.push(_R(i,s));});}function kPe(t){Ae(t.edges(),function(e){var r=t.edge(e);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break;}});}function EPe(t){Ae(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse();});}function SPe(t){Ae(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),a=t.node(da(r.borderLeft)),s=t.node(da(r.borderRight));r.width=Math.abs(s.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2;}}),Ae(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e);});}function CPe(t){Ae(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e);}});}function APe(t){var e=rf(t);Ae(e,function(r){var n=0;Ae(r,function(i,a){var s=t.node(i);s.order=a+n,Ae(s.selfEdges,function(l){Ac(t,"selfedge",{width:l.label.width,height:l.label.height,rank:s.rank,order:a+ ++n,e:l.e,label:l.label},"_se");}),delete s.selfEdges;});});}function _Pe(t){Ae(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,s=r.x-i,l=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*s/3,y:a-l},{x:i+5*s/6,y:a-l},{x:i+s,y:a},{x:i+5*s/6,y:a+l},{x:i+2*s/3,y:a+l}],r.label.x=r.x,r.label.y=r.y;}});}function XR(t,e){return Wd(Yd(t,e),Number);}function jR(t){var e={};return Ae(t,function(r,n){e[n.toLowerCase()]=r;}),e;}var lPe,cPe,uPe,hPe,fPe,dPe,pPe,mPe,zae=N(()=>{"use strict";Yt();Uo();Pie();Gie();AR();MR();qR();fae();Nae();Iae();$ae();_c();o(z2,"layout");o(sPe,"runLayout");o(oPe,"updateInputGraph");lPe=["nodesep","edgesep","ranksep","marginx","marginy"],cPe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},uPe=["acyclicer","ranker","rankdir","align"],hPe=["width","height"],fPe={width:0,height:0},dPe=["minlen","weight","width","height","labeloffset"],pPe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},mPe=["labelpos"];o(gPe,"buildLayoutGraph");o(yPe,"makeSpaceForEdgeLabels");o(vPe,"injectEdgeLabelProxies");o(xPe,"assignRankMinMax");o(bPe,"removeEdgeLabelProxies");o(TPe,"translateGraph");o(wPe,"assignNodeIntersects");o(kPe,"fixupEdgeLabelCoords");o(EPe,"reversePointsForReversedEdges");o(SPe,"removeBorderNodes");o(CPe,"removeSelfEdges");o(APe,"insertSelfEdges");o(_Pe,"positionSelfEdges");o(XR,"selectNumberAttrs");o(jR,"canonicalize");});var KR=N(()=>{"use strict";AR();zae();MR();qR();});function Ho(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:DPe(t),edges:LPe(t)};return gr(t.graph())||(e.value=nn(t.graph())),e;}function DPe(t){return Je(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return gr(r)||(i.value=r),gr(n)||(i.parent=n),i;});}function LPe(t){return Je(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return gr(e.name)||(n.name=e.name),gr(r)||(n.value=r),n;});}var QR=N(()=>{"use strict";Yt();ck();o(Ho,"write");o(DPe,"writeNodes");o(LPe,"writeEdges");});var Tr,Qd,Uae,Hae,gk,RPe,Wae,qae,NPe,Gm,Vae,Yae,Xae,jae,Kae,Qae=N(()=>{"use strict";yt();Uo();QR();Tr=new Map(),Qd=new Map(),Uae=new Map(),Hae=o(()=>{Qd.clear(),Uae.clear(),Tr.clear();},"clear"),gk=o((t,e)=>{let r=Qd.get(e)||[];return X.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t);},"isDescendant"),RPe=o((t,e)=>{let r=Qd.get(e)||[];return X.info("Descendants of ",e," is ",r),X.info("Edge is ",t),t.v===e||t.w===e?!1:r?r.includes(t.v)||gk(t.v,e)||gk(t.w,e)||r.includes(t.w):(X.debug("Tilt, ",e,",not in descendants"),!1);},"edgeInCluster"),Wae=o((t,e,r,n)=>{X.warn("Copying children of ",t,"root",n,"data",e.node(t),n);let i=e.children(t)||[];t!==n&&i.push(t),X.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(a=>{if(e.children(a).length>0)Wae(a,e,r,n);else{let s=e.node(a);X.info("cp ",a," to ",n," with parent ",t),r.setNode(a,s),n!==e.parent(a)&&(X.warn("Setting parent",a,e.parent(a)),r.setParent(a,e.parent(a))),t!==n&&a!==t?(X.debug("Setting parent",a,t),r.setParent(a,t)):(X.info("In copy ",t,"root",n,"data",e.node(t),n),X.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==n,"node!==clusterId",a!==t));let l=e.edges(a);X.debug("Copying Edges",l),l.forEach(u=>{X.info("Edge",u);let h=e.edge(u.v,u.w,u.name);X.info("Edge data",h,n);try{RPe(u,n)?(X.info("Copying as ",u.v,u.w,h,u.name),r.setEdge(u.v,u.w,h,u.name),X.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):X.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",n," clusterId:",t);}catch(f){X.error(f);}});}X.debug("Removing node",a),e.removeNode(a);});},"copy"),qae=o((t,e)=>{let r=e.children(t),n=[...r];for(let i of r)Uae.set(i,t),n=[...n,...qae(i,e)];return n;},"extractDescendants"),NPe=o((t,e,r)=>{let n=t.edges().filter(u=>u.v===e||u.w===e),i=t.edges().filter(u=>u.v===r||u.w===r),a=n.map(u=>({v:u.v===e?r:u.v,w:u.w===e?e:u.w})),s=i.map(u=>({v:u.v,w:u.w}));return a.filter(u=>s.some(h=>u.v===h.v&&u.w===h.w));},"findCommonEdges"),Gm=o((t,e,r)=>{let n=e.children(t);if(X.trace("Searching children of id ",t,n),n.length<1)return t;let i;for(let a of n){let s=Gm(a,e,r),l=NPe(e,r,s);if(s)if(l.length>0)i=s;else return s;}return i;},"findNonClusterChild"),Vae=o(t=>!Tr.has(t)||!Tr.get(t).externalConnections?t:Tr.has(t)?Tr.get(t).id:t,"getAnchorId"),Yae=o((t,e)=>{if(!t||e>10){X.debug("Opting out, no graph ");return;}else X.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(X.warn("Cluster identified",r," Replacement id in edges: ",Gm(r,t,r)),Qd.set(r,qae(r,t)),Tr.set(r,{id:Gm(r,t,r),clusterData:t.node(r)}));}),t.nodes().forEach(function(r){let n=t.children(r),i=t.edges();n.length>0?(X.debug("Cluster identified",r,Qd),i.forEach(a=>{let s=gk(a.v,r),l=gk(a.w,r);s^l&&(X.warn("Edge: ",a," leaves cluster ",r),X.warn("Descendants of XXX ",r,": ",Qd.get(r)),Tr.get(r).externalConnections=!0);})):X.debug("Not a cluster ",r,Qd);});for(let r of Tr.keys()){let n=Tr.get(r).id,i=t.parent(n);i!==r&&Tr.has(i)&&!Tr.get(i).externalConnections&&(Tr.get(r).id=i);}t.edges().forEach(function(r){let n=t.edge(r);X.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),X.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,a=r.w;if(X.warn("Fix XXX",Tr,"ids:",r.v,r.w,"Translating: ",Tr.get(r.v)," --- ",Tr.get(r.w)),Tr.get(r.v)||Tr.get(r.w)){if(X.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),i=Vae(r.v),a=Vae(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v){let s=t.parent(i);Tr.get(s).externalConnections=!0,n.fromCluster=r.v;}if(a!==r.w){let s=t.parent(a);Tr.get(s).externalConnections=!0,n.toCluster=r.w;}X.warn("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,n,r.name);}}),X.warn("Adjusted Graph",Ho(t)),Xae(t,0),X.trace(Tr);},"adjustClustersAndEdges"),Xae=o((t,e)=>{if(X.warn("extractor - ",e,Ho(t),t.children("D")),e>10){X.error("Bailing out");return;}let r=t.nodes(),n=!1;for(let i of r){let a=t.children(i);n=n||a.length>0;}if(!n){X.debug("Done, no node has children",t.nodes());return;}X.debug("Nodes = ",r,e);for(let i of r)if(X.debug("Extracting node",i,Tr,Tr.has(i)&&!Tr.get(i).externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),!Tr.has(i))X.debug("Not a cluster",i,e);else if(!Tr.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){var _Tr$get;X.warn("Cluster without external connections, without a parent and with children",i,e);let s=t.graph().rankdir==="TB"?"LR":"TB";((_Tr$get=Tr.get(i))===null||_Tr$get===void 0||(_Tr$get=_Tr$get.clusterData)===null||_Tr$get===void 0?void 0:_Tr$get.dir)&&(s=Tr.get(i).clusterData.dir,X.warn("Fixing dir",Tr.get(i).clusterData.dir,s));let l=new an({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{};});X.warn("Old graph before copy",Ho(t)),Wae(i,t,l,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:Tr.get(i).clusterData,label:Tr.get(i).label,graph:l}),X.warn("New graph after copy node: (",i,")",Ho(l)),X.debug("Old graph after copy",Ho(t));}else X.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!Tr.get(i).externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),X.debug(Tr);r=t.nodes(),X.warn("New list of nodes",r);for(let i of r){let a=t.node(i);X.warn(" Now next level",i,a),(a===null||a===void 0?void 0:a.clusterNode)&&Xae(a.graph,e+1);}},"extractor"),jae=o((t,e)=>{if(e.length===0)return[];let r=Object.assign([],e);return e.forEach(n=>{let i=t.children(n),a=jae(t,i);r=[...r,...a];}),r;},"sorter"),Kae=o(t=>jae(t,t.children()),"sortNodesByHierarchy");});var Jae={};hr(Jae,{render:()=>MPe});var Zae,MPe,ese=N(()=>{"use strict";KR();QR();Uo();OL();Ft();Qae();dw();nw();IL();yt();L2();qt();Zae=o(async(t,e,r,n,i,a)=>{X.warn("Graph in recursive render:XAX",Ho(e),i);let s=e.graph().rankdir;X.trace("Dir in recursive render - dir:",s);let l=t.insert("g").attr("class","root");e.nodes()?X.info("Recursive render XXX",e.nodes()):X.info("No nodes found for",e),e.edges().length>0&&X.info("Recursive edges",e.edge(e.edges()[0]));let u=l.insert("g").attr("class","clusters"),h=l.insert("g").attr("class","edgePaths"),f=l.insert("g").attr("class","edgeLabels"),d=l.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(y){let v=e.node(y);if(i!==void 0){let x=JSON.parse(JSON.stringify(i.clusterData));X.trace(`Setting data for parent cluster XXX
 Node.id = `,y,`
 data=`,x.height,`
Parent cluster`,i.height),e.setNode(i.id,x),e.parent(y)||(X.trace("Setting parent",y,i.id),e.setParent(y,i.id,x));}if(X.info("(Insert) Node XXX"+y+": "+JSON.stringify(e.node(y))),v!==null&&v!==void 0&&v.clusterNode){X.info("Cluster identified XBX",y,v.width,e.node(y));let{ranksep:x,nodesep:b}=e.graph();v.graph.setGraph({...v.graph.graph(),ranksep:x+25,nodesep:b});let T=await Zae(d,v.graph,r,n,e.node(y),a),C=T.elem;Ke(v,C),v.diff=T.diff||0,X.info("New compound node after recursive render XAX",y,"width",v.width,"height",v.height),yee(C,v);}else e.children(y).length>0?(X.trace("Cluster - the non recursive path XBX",y,v.id,v,v.width,"Graph:",e),X.trace(Gm(v.id,e)),Tr.set(v.id,{id:Gm(v.id,e),node:v})):(X.trace("Node - the non recursive path XAX",y,d,e.node(y),s),await Tm(d,e.node(y),{config:a,dir:s}));})),await o(async()=>{let y=e.edges().map(async function(v){let x=e.edge(v.v,v.w,v.name);X.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),X.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(e.edge(v))),X.info("Fix",Tr,"ids:",v.v,v.w,"Translating: ",Tr.get(v.v),Tr.get(v.w)),await lw(f,x);});await Promise.all(y);},"processEdges")(),X.info("Graph before layout:",JSON.stringify(Ho(e))),X.info("############################################# XXX"),X.info("###                Layout                 ### XXX"),X.info("############################################# XXX"),z2(e),X.info("Graph after layout:",JSON.stringify(Ho(e)));let m=0,{subGraphTitleTotalMargin:g}=Mu(a);return await Promise.all(Kae(e).map(async function(y){let v=e.node(y);if(X.info("Position XBX => "+y+": ("+v.x,","+v.y,") width: ",v.width," height: ",v.height),v!==null&&v!==void 0&&v.clusterNode)v.y+=g,X.info("A tainted cluster node XBX1",y,v.id,v.width,v.height,v.x,v.y,e.parent(y)),Tr.get(v.id).node=v,N2(v);else if(e.children(y).length>0){var _v$labelBBox;X.info("A pure cluster node XBX1",y,v.id,v.x,v.y,v.width,v.height,e.parent(y)),v.height+=g,e.node(v.parentId);let x=(v===null||v===void 0?void 0:v.padding)/2||0,b=(v===null||v===void 0||(_v$labelBBox=v.labelBBox)===null||_v$labelBBox===void 0?void 0:_v$labelBBox.height)||0,T=b-x||0;X.debug("OffsetY",T,"labelHeight",b,"halfPadding",x),await bm(u,v),Tr.get(v.id).node=v;}else{let x=e.node(v.parentId);v.y+=g/2,X.info("A regular node XBX1 - using the padding",v.id,"parent",v.parentId,v.width,v.height,v.x,v.y,"offsetY",v.offsetY,"parent",x,x===null||x===void 0?void 0:x.offsetY,v),N2(v);}})),e.edges().forEach(function(y){let v=e.edge(y);X.info("Edge "+y.v+" -> "+y.w+": "+JSON.stringify(v),v),v.points.forEach(C=>C.y+=g/2);let x=e.node(y.v);var b=e.node(y.w);let T=uw(h,v,Tr,r,x,b,n);cw(v,T);}),e.nodes().forEach(function(y){let v=e.node(y);X.info(y,v.type,v.diff),v.isGroup&&(m=v.diff);}),X.warn("Returning from recursive render XAX",l,m),{elem:l,diff:m};},"recursiveRender"),MPe=o(async(t,e)=>{var _t$config,_t$config2,_t$config3,_t$config4;let r=new an({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:((_t$config=t.config)===null||_t$config===void 0?void 0:_t$config.nodeSpacing)||((_t$config2=t.config)===null||_t$config2===void 0||(_t$config2=_t$config2.flowchart)===null||_t$config2===void 0?void 0:_t$config2.nodeSpacing)||t.nodeSpacing,ranksep:((_t$config3=t.config)===null||_t$config3===void 0?void 0:_t$config3.rankSpacing)||((_t$config4=t.config)===null||_t$config4===void 0||(_t$config4=_t$config4.flowchart)===null||_t$config4===void 0?void 0:_t$config4.rankSpacing)||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{};}),n=e.select("g");hw(n,t.markers,t.type,t.diagramId),vee(),gee(),uee(),Hae(),t.nodes.forEach(a=>{r.setNode(a.id,{...a}),a.parentId&&r.setParent(a.id,a.parentId);}),X.debug("Edges:",t.edges),t.edges.forEach(a=>{if(a.start===a.end){let s=a.start,l=s+"---"+s+"---1",u=s+"---"+s+"---2",h=r.node(s);r.setNode(l,{domId:l,id:l,parentId:h.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(l,h.parentId),r.setNode(u,{domId:u,id:u,parentId:h.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(u,h.parentId);let f=structuredClone(a),d=structuredClone(a),p=structuredClone(a);f.label="",f.arrowTypeEnd="none",f.id=s+"-cyclic-special-1",d.arrowTypeStart="none",d.arrowTypeEnd="none",d.id=s+"-cyclic-special-mid",p.label="",h.isGroup&&(f.fromCluster=s,p.toCluster=s),p.id=s+"-cyclic-special-2",p.arrowTypeStart="none",r.setEdge(s,l,f,s+"-cyclic-special-0"),r.setEdge(l,u,d,s+"-cyclic-special-1"),r.setEdge(u,s,p,s+"-cyc<lic-special-2");}else r.setEdge(a.start,a.end,{...a},a.id);}),X.warn("Graph at first:",JSON.stringify(Ho(r))),Yae(r),X.warn("Graph after XAX:",JSON.stringify(Ho(r)));let i=ge();await Zae(n,r,t.type,t.diagramId,void 0,i);},"render");});var G2,ZR,IPe,Dc,sf,Zd=N(()=>{"use strict";bee();yt();G2={},ZR=o(t=>{for(let e of t)G2[e.name]=e;},"registerLayoutLoaders"),IPe=o(()=>{ZR([{name:"dagre",loader:o(async()=>await Promise.resolve().then(()=>(ese(),Jae)),"loader")}]);},"registerDefaultLayoutLoaders");IPe();Dc=o(async(t,e)=>{if(!(t.layoutAlgorithm in G2))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);let r=G2[t.layoutAlgorithm];return(await r.loader()).render(t,e,xee,{algorithm:r.algorithm});},"render"),sf=o((t="",{fallback:e="dagre"}={})=>{if(t in G2)return t;if(e in G2)return X.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`);},"getRegisteredLayoutAlgorithm");});var Wo,OPe,PPe,Jd=N(()=>{"use strict";yi();yt();Wo=o((t,e,r,n)=>{t.attr("class",r);let{width:i,height:a,x:s,y:l}=OPe(t,e);hn(t,a,i,n);let u=PPe(s,l,i,a,e);t.attr("viewBox",u),X.debug(`viewBox configured: ${u} with padding: ${e}`);},"setupViewPortForSVG"),OPe=o((t,e)=>{var _t$node2;let r=((_t$node2=t.node())===null||_t$node2===void 0?void 0:_t$node2.getBBox())||{width:0,height:0,x:0,y:0};return{width:r.width+e*2,height:r.height+e*2,x:r.x,y:r.y};},"calculateDimensionsWithPadding"),PPe=o((t,e,r,n,i)=>`${t-i} ${e-i} ${r} ${n}`,"createViewBox");});var BPe,FPe,tse,rse=N(()=>{"use strict";pr();qt();yt();xm();Zd();Jd();nr();BPe=o(function(t,e){return e.db.getClasses();},"getClasses"),FPe=o(async function(t,e,r,n){var _h$config$flowchart$d,_h$config$flowchart;X.info("REF0:"),X.info("Drawing state diagram (v2)",e);let{securityLevel:i,flowchart:a,layout:s}=ge(),l;i==="sandbox"&&(l=Ge("#i"+e));let u=i==="sandbox"?l.nodes()[0].contentDocument:document;X.debug("Before getData: ");let h=n.db.getData();X.debug("Data: ",h);let f=bc(e,i),d=n.db.getDirection();h.type=n.type,h.layoutAlgorithm=sf(s),h.layoutAlgorithm==="dagre"&&s==="elk"&&X.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),h.direction=d,h.nodeSpacing=(a===null||a===void 0?void 0:a.nodeSpacing)||50,h.rankSpacing=(a===null||a===void 0?void 0:a.rankSpacing)||50,h.markers=["point","circle","cross"],h.diagramId=e,X.debug("REF1:",h),await Dc(h,f);let p=(_h$config$flowchart$d=(_h$config$flowchart=h.config.flowchart)===null||_h$config$flowchart===void 0?void 0:_h$config$flowchart.diagramPadding)!==null&&_h$config$flowchart$d!==void 0?_h$config$flowchart$d:8;Vt.insertTitle(f,"flowchartTitleText",(a===null||a===void 0?void 0:a.titleTopMargin)||0,n.db.getDiagramTitle()),Wo(f,p,"flowchart",(a===null||a===void 0?void 0:a.useMaxWidth)||!1);for(let m of h.nodes){let g=Ge(`#${e} [id="${m.id}"]`);if(!g||!m.link)continue;let y=u.createElementNS("http://www.w3.org/2000/svg","a");y.setAttributeNS("http://www.w3.org/2000/svg","class",m.cssClasses),y.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),i==="sandbox"?y.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):m.linkTarget&&y.setAttributeNS("http://www.w3.org/2000/svg","target",m.linkTarget);let v=g.insert(function(){return y;},":first-child"),x=g.select(".label-container");x&&v.append(function(){return x.node();});let b=g.select(".label");b&&v.append(function(){return b.node();});}},"draw"),tse={getClasses:BPe,draw:FPe};});var JR,eN,nse=N(()=>{"use strict";JR=function(){var t=o(function(Ur,et,gt,Kt){for(gt=gt||{},Kt=Ur.length;Kt--;gt[Ur[Kt]]=et);return gt;},"o"),e=[1,4],r=[1,3],n=[1,5],i=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],a=[2,2],s=[1,13],l=[1,14],u=[1,15],h=[1,16],f=[1,23],d=[1,25],p=[1,26],m=[1,27],g=[1,49],y=[1,48],v=[1,29],x=[1,30],b=[1,31],T=[1,32],C=[1,33],w=[1,44],E=[1,46],_=[1,42],A=[1,47],D=[1,43],O=[1,50],R=[1,45],k=[1,51],L=[1,52],S=[1,34],I=[1,35],M=[1,36],P=[1,37],B=[1,57],F=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],z=[1,61],$=[1,60],U=[1,62],K=[8,9,11,75,77,78],ee=[1,78],Y=[1,91],ce=[1,96],Z=[1,95],ue=[1,92],Q=[1,88],j=[1,94],ne=[1,90],te=[1,97],he=[1,93],le=[1,98],J=[1,89],Se=[8,9,10,11,40,75,77,78],se=[8,9,10,11,40,46,75,77,78],ae=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],Oe=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],ye=[44,60,89,102,105,106,109,111,114,115,116],Be=[1,121],He=[1,122],ze=[1,124],Le=[1,123],Ie=[44,60,62,74,89,102,105,106,109,111,114,115,116],xe=[1,133],q=[1,147],de=[1,148],ie=[1,149],oe=[1,150],V=[1,135],Te=[1,137],W=[1,141],pe=[1,142],ve=[1,143],Pe=[1,144],_e=[1,145],be=[1,146],Ve=[1,151],De=[1,152],Ye=[1,131],at=[1,132],Rt=[1,139],st=[1,134],Ue=[1,138],ut=[1,136],We=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],lt=[1,154],Xt=[1,156],Tt=[8,9,11],Mt=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],bt=[1,176],ht=[1,172],St=[1,173],ft=[1,177],vt=[1,174],nt=[1,175],dn=[77,116,119],kt=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],In=[10,106],en=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Nr=[1,247],Mr=[1,245],On=[1,249],Dt=[1,243],Ce=[1,244],tt=[1,246],Ct=[1,248],yr=[1,250],tn=[1,268],gn=[8,9,11,106],Qr=[8,9,10,11,60,84,105,106,109,110,111,112],Mi={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1]],performAction:o(function(et,gt,Kt,ct,Sn,me,Wf){var we=me.length-1;switch(Sn){case 2:this.$=[];break;case 3:(!Array.isArray(me[we])||me[we].length>0)&&me[we-1].push(me[we]),this.$=me[we-1];break;case 4:case 183:this.$=me[we];break;case 11:ct.setDirection("TB"),this.$="TB";break;case 12:ct.setDirection(me[we-1]),this.$=me[we-1];break;case 27:this.$=me[we-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=ct.addSubGraph(me[we-6],me[we-1],me[we-4]);break;case 34:this.$=ct.addSubGraph(me[we-3],me[we-1],me[we-3]);break;case 35:this.$=ct.addSubGraph(void 0,me[we-1],void 0);break;case 37:this.$=me[we].trim(),ct.setAccTitle(this.$);break;case 38:case 39:this.$=me[we].trim(),ct.setAccDescription(this.$);break;case 43:this.$=me[we-1]+me[we];break;case 44:this.$=me[we];break;case 45:ct.addVertex(me[we-1][me[we-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,me[we]),ct.addLink(me[we-3].stmt,me[we-1],me[we-2]),this.$={stmt:me[we-1],nodes:me[we-1].concat(me[we-3].nodes)};break;case 46:ct.addLink(me[we-2].stmt,me[we],me[we-1]),this.$={stmt:me[we],nodes:me[we].concat(me[we-2].nodes)};break;case 47:ct.addLink(me[we-3].stmt,me[we-1],me[we-2]),this.$={stmt:me[we-1],nodes:me[we-1].concat(me[we-3].nodes)};break;case 48:this.$={stmt:me[we-1],nodes:me[we-1]};break;case 49:ct.addVertex(me[we-1][me[we-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,me[we]),this.$={stmt:me[we-1],nodes:me[we-1],shapeData:me[we]};break;case 50:this.$={stmt:me[we],nodes:me[we]};break;case 51:this.$=[me[we]];break;case 52:ct.addVertex(me[we-5][me[we-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,me[we-4]),this.$=me[we-5].concat(me[we]);break;case 53:this.$=me[we-4].concat(me[we]);break;case 54:this.$=me[we];break;case 55:this.$=me[we-2],ct.setClass(me[we-2],me[we]);break;case 56:this.$=me[we-3],ct.addVertex(me[we-3],me[we-1],"square");break;case 57:this.$=me[we-3],ct.addVertex(me[we-3],me[we-1],"doublecircle");break;case 58:this.$=me[we-5],ct.addVertex(me[we-5],me[we-2],"circle");break;case 59:this.$=me[we-3],ct.addVertex(me[we-3],me[we-1],"ellipse");break;case 60:this.$=me[we-3],ct.addVertex(me[we-3],me[we-1],"stadium");break;case 61:this.$=me[we-3],ct.addVertex(me[we-3],me[we-1],"subroutine");break;case 62:this.$=me[we-7],ct.addVertex(me[we-7],me[we-1],"rect",void 0,void 0,void 0,Object.fromEntries([[me[we-5],me[we-3]]]));break;case 63:this.$=me[we-3],ct.addVertex(me[we-3],me[we-1],"cylinder");break;case 64:this.$=me[we-3],ct.addVertex(me[we-3],me[we-1],"round");break;case 65:this.$=me[we-3],ct.addVertex(me[we-3],me[we-1],"diamond");break;case 66:this.$=me[we-5],ct.addVertex(me[we-5],me[we-2],"hexagon");break;case 67:this.$=me[we-3],ct.addVertex(me[we-3],me[we-1],"odd");break;case 68:this.$=me[we-3],ct.addVertex(me[we-3],me[we-1],"trapezoid");break;case 69:this.$=me[we-3],ct.addVertex(me[we-3],me[we-1],"inv_trapezoid");break;case 70:this.$=me[we-3],ct.addVertex(me[we-3],me[we-1],"lean_right");break;case 71:this.$=me[we-3],ct.addVertex(me[we-3],me[we-1],"lean_left");break;case 72:this.$=me[we],ct.addVertex(me[we]);break;case 73:me[we-1].text=me[we],this.$=me[we-1];break;case 74:case 75:me[we-2].text=me[we-1],this.$=me[we-2];break;case 76:this.$=me[we];break;case 77:var ki=ct.destructLink(me[we],me[we-2]);this.$={type:ki.type,stroke:ki.stroke,length:ki.length,text:me[we-1]};break;case 78:var ki=ct.destructLink(me[we],me[we-2]);this.$={type:ki.type,stroke:ki.stroke,length:ki.length,text:me[we-1],id:me[we-3]};break;case 79:this.$={text:me[we],type:"text"};break;case 80:this.$={text:me[we-1].text+""+me[we],type:me[we-1].type};break;case 81:this.$={text:me[we],type:"string"};break;case 82:this.$={text:me[we],type:"markdown"};break;case 83:var ki=ct.destructLink(me[we]);this.$={type:ki.type,stroke:ki.stroke,length:ki.length};break;case 84:var ki=ct.destructLink(me[we]);this.$={type:ki.type,stroke:ki.stroke,length:ki.length,id:me[we-1]};break;case 85:this.$=me[we-1];break;case 86:this.$={text:me[we],type:"text"};break;case 87:this.$={text:me[we-1].text+""+me[we],type:me[we-1].type};break;case 88:this.$={text:me[we],type:"string"};break;case 89:case 104:this.$={text:me[we],type:"markdown"};break;case 101:this.$={text:me[we],type:"text"};break;case 102:this.$={text:me[we-1].text+""+me[we],type:me[we-1].type};break;case 103:this.$={text:me[we],type:"text"};break;case 105:this.$=me[we-4],ct.addClass(me[we-2],me[we]);break;case 106:this.$=me[we-4],ct.setClass(me[we-2],me[we]);break;case 107:case 115:this.$=me[we-1],ct.setClickEvent(me[we-1],me[we]);break;case 108:case 116:this.$=me[we-3],ct.setClickEvent(me[we-3],me[we-2]),ct.setTooltip(me[we-3],me[we]);break;case 109:this.$=me[we-2],ct.setClickEvent(me[we-2],me[we-1],me[we]);break;case 110:this.$=me[we-4],ct.setClickEvent(me[we-4],me[we-3],me[we-2]),ct.setTooltip(me[we-4],me[we]);break;case 111:this.$=me[we-2],ct.setLink(me[we-2],me[we]);break;case 112:this.$=me[we-4],ct.setLink(me[we-4],me[we-2]),ct.setTooltip(me[we-4],me[we]);break;case 113:this.$=me[we-4],ct.setLink(me[we-4],me[we-2],me[we]);break;case 114:this.$=me[we-6],ct.setLink(me[we-6],me[we-4],me[we]),ct.setTooltip(me[we-6],me[we-2]);break;case 117:this.$=me[we-1],ct.setLink(me[we-1],me[we]);break;case 118:this.$=me[we-3],ct.setLink(me[we-3],me[we-2]),ct.setTooltip(me[we-3],me[we]);break;case 119:this.$=me[we-3],ct.setLink(me[we-3],me[we-2],me[we]);break;case 120:this.$=me[we-5],ct.setLink(me[we-5],me[we-4],me[we]),ct.setTooltip(me[we-5],me[we-2]);break;case 121:this.$=me[we-4],ct.addVertex(me[we-2],void 0,void 0,me[we]);break;case 122:this.$=me[we-4],ct.updateLink([me[we-2]],me[we]);break;case 123:this.$=me[we-4],ct.updateLink(me[we-2],me[we]);break;case 124:this.$=me[we-8],ct.updateLinkInterpolate([me[we-6]],me[we-2]),ct.updateLink([me[we-6]],me[we]);break;case 125:this.$=me[we-8],ct.updateLinkInterpolate(me[we-6],me[we-2]),ct.updateLink(me[we-6],me[we]);break;case 126:this.$=me[we-6],ct.updateLinkInterpolate([me[we-4]],me[we]);break;case 127:this.$=me[we-6],ct.updateLinkInterpolate(me[we-4],me[we]);break;case 128:case 130:this.$=[me[we]];break;case 129:case 131:me[we-2].push(me[we]),this.$=me[we-2];break;case 133:this.$=me[we-1]+me[we];break;case 181:this.$=me[we];break;case 182:this.$=me[we-1]+""+me[we];break;case 184:this.$=me[we-1]+""+me[we];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;}},"anonymous"),table:[{3:1,4:2,9:e,10:r,12:n},{1:[3]},t(i,a,{5:6}),{4:7,9:e,10:r,12:n},{4:8,9:e,10:r,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,33:24,34:d,36:p,38:m,42:28,43:38,44:g,45:39,47:40,60:y,84:v,85:x,86:b,87:T,88:C,89:w,102:E,105:_,106:A,109:D,111:O,113:41,114:R,115:k,116:L,121:S,122:I,123:M,124:P},t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),{8:[1,54],9:[1,55],10:B,15:53,18:56},t(F,[2,3]),t(F,[2,4]),t(F,[2,5]),t(F,[2,6]),t(F,[2,7]),t(F,[2,8]),{8:z,9:$,11:U,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:z,9:$,11:U,21:67},{8:z,9:$,11:U,21:68},{8:z,9:$,11:U,21:69},{8:z,9:$,11:U,21:70},{8:z,9:$,11:U,21:71},{8:z,9:$,10:[1,72],11:U,21:73},t(F,[2,36]),{35:[1,74]},{37:[1,75]},t(F,[2,39]),t(K,[2,50],{18:76,39:77,10:B,40:ee}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:Y,44:ce,60:Z,80:[1,86],89:ue,95:[1,83],97:[1,84],101:85,105:Q,106:j,109:ne,111:te,114:he,115:le,116:J,120:87},t(F,[2,185]),t(F,[2,186]),t(F,[2,187]),t(F,[2,188]),t(Se,[2,51]),t(Se,[2,54],{46:[1,99]}),t(se,[2,72],{113:112,29:[1,100],44:g,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:y,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:w,102:E,105:_,106:A,109:D,111:O,114:R,115:k,116:L}),t(ae,[2,181]),t(ae,[2,142]),t(ae,[2,143]),t(ae,[2,144]),t(ae,[2,145]),t(ae,[2,146]),t(ae,[2,147]),t(ae,[2,148]),t(ae,[2,149]),t(ae,[2,150]),t(ae,[2,151]),t(ae,[2,152]),t(i,[2,12]),t(i,[2,18]),t(i,[2,19]),{9:[1,113]},t(Oe,[2,26],{18:114,10:B}),t(F,[2,27]),{42:115,43:38,44:g,45:39,47:40,60:y,89:w,102:E,105:_,106:A,109:D,111:O,113:41,114:R,115:k,116:L},t(F,[2,40]),t(F,[2,41]),t(F,[2,42]),t(ye,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:Be,81:He,116:ze,119:Le},{75:[1,125],77:[1,126]},t(Ie,[2,83]),t(F,[2,28]),t(F,[2,29]),t(F,[2,30]),t(F,[2,31]),t(F,[2,32]),{10:xe,12:q,14:de,27:ie,28:127,32:oe,44:V,60:Te,75:W,80:[1,129],81:[1,130],83:140,84:pe,85:ve,86:Pe,87:_e,88:be,89:Ve,90:De,91:128,105:Ye,109:at,111:Rt,114:st,115:Ue,116:ut},t(We,a,{5:153}),t(F,[2,37]),t(F,[2,38]),t(K,[2,48],{44:lt}),t(K,[2,49],{18:155,10:B,40:Xt}),t(Se,[2,44]),{44:g,47:157,60:y,89:w,102:E,105:_,106:A,109:D,111:O,113:41,114:R,115:k,116:L},{102:[1,158],103:159,105:[1,160]},{44:g,47:161,60:y,89:w,102:E,105:_,106:A,109:D,111:O,113:41,114:R,115:k,116:L},{44:g,47:162,60:y,89:w,102:E,105:_,106:A,109:D,111:O,113:41,114:R,115:k,116:L},t(Tt,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},t(Tt,[2,115],{120:167,10:[1,166],14:Y,44:ce,60:Z,89:ue,105:Q,106:j,109:ne,111:te,114:he,115:le,116:J}),t(Tt,[2,117],{10:[1,168]}),t(Mt,[2,183]),t(Mt,[2,170]),t(Mt,[2,171]),t(Mt,[2,172]),t(Mt,[2,173]),t(Mt,[2,174]),t(Mt,[2,175]),t(Mt,[2,176]),t(Mt,[2,177]),t(Mt,[2,178]),t(Mt,[2,179]),t(Mt,[2,180]),{44:g,47:169,60:y,89:w,102:E,105:_,106:A,109:D,111:O,113:41,114:R,115:k,116:L},{30:170,67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},{30:178,67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},{30:180,50:[1,179],67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},{30:181,67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},{30:182,67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},{30:183,67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},{109:[1,184]},{30:185,67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},{30:186,65:[1,187],67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},{30:188,67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},{30:189,67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},{30:190,67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},t(ae,[2,182]),t(i,[2,20]),t(Oe,[2,25]),t(K,[2,46],{39:191,18:192,10:B,40:ee}),t(ye,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},{77:[1,196],79:197,116:ze,119:Le},t(dn,[2,79]),t(dn,[2,81]),t(dn,[2,82]),t(dn,[2,168]),t(dn,[2,169]),{76:198,79:120,80:Be,81:He,116:ze,119:Le},t(Ie,[2,84]),{8:z,9:$,10:xe,11:U,12:q,14:de,21:200,27:ie,29:[1,199],32:oe,44:V,60:Te,75:W,83:140,84:pe,85:ve,86:Pe,87:_e,88:be,89:Ve,90:De,91:201,105:Ye,109:at,111:Rt,114:st,115:Ue,116:ut},t(kt,[2,101]),t(kt,[2,103]),t(kt,[2,104]),t(kt,[2,157]),t(kt,[2,158]),t(kt,[2,159]),t(kt,[2,160]),t(kt,[2,161]),t(kt,[2,162]),t(kt,[2,163]),t(kt,[2,164]),t(kt,[2,165]),t(kt,[2,166]),t(kt,[2,167]),t(kt,[2,90]),t(kt,[2,91]),t(kt,[2,92]),t(kt,[2,93]),t(kt,[2,94]),t(kt,[2,95]),t(kt,[2,96]),t(kt,[2,97]),t(kt,[2,98]),t(kt,[2,99]),t(kt,[2,100]),{6:11,7:12,8:s,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,32:[1,202],33:24,34:d,36:p,38:m,42:28,43:38,44:g,45:39,47:40,60:y,84:v,85:x,86:b,87:T,88:C,89:w,102:E,105:_,106:A,109:D,111:O,113:41,114:R,115:k,116:L,121:S,122:I,123:M,124:P},{10:B,18:203},{44:[1,204]},t(Se,[2,43]),{10:[1,205],44:g,60:y,89:w,102:E,105:_,106:A,109:D,111:O,113:112,114:R,115:k,116:L},{10:[1,206]},{10:[1,207],106:[1,208]},t(In,[2,128]),{10:[1,209],44:g,60:y,89:w,102:E,105:_,106:A,109:D,111:O,113:112,114:R,115:k,116:L},{10:[1,210],44:g,60:y,89:w,102:E,105:_,106:A,109:D,111:O,113:112,114:R,115:k,116:L},{80:[1,211]},t(Tt,[2,109],{10:[1,212]}),t(Tt,[2,111],{10:[1,213]}),{80:[1,214]},t(Mt,[2,184]),{80:[1,215],98:[1,216]},t(Se,[2,55],{113:112,44:g,60:y,89:w,102:E,105:_,106:A,109:D,111:O,114:R,115:k,116:L}),{31:[1,217],67:bt,82:218,116:ft,117:vt,118:nt},t(en,[2,86]),t(en,[2,88]),t(en,[2,89]),t(en,[2,153]),t(en,[2,154]),t(en,[2,155]),t(en,[2,156]),{49:[1,219],67:bt,82:218,116:ft,117:vt,118:nt},{30:220,67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},{51:[1,221],67:bt,82:218,116:ft,117:vt,118:nt},{53:[1,222],67:bt,82:218,116:ft,117:vt,118:nt},{55:[1,223],67:bt,82:218,116:ft,117:vt,118:nt},{57:[1,224],67:bt,82:218,116:ft,117:vt,118:nt},{60:[1,225]},{64:[1,226],67:bt,82:218,116:ft,117:vt,118:nt},{66:[1,227],67:bt,82:218,116:ft,117:vt,118:nt},{30:228,67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},{31:[1,229],67:bt,82:218,116:ft,117:vt,118:nt},{67:bt,69:[1,230],71:[1,231],82:218,116:ft,117:vt,118:nt},{67:bt,69:[1,233],71:[1,232],82:218,116:ft,117:vt,118:nt},t(K,[2,45],{18:155,10:B,40:Xt}),t(K,[2,47],{44:lt}),t(ye,[2,75]),t(ye,[2,74]),{62:[1,234],67:bt,82:218,116:ft,117:vt,118:nt},t(ye,[2,77]),t(dn,[2,80]),{77:[1,235],79:197,116:ze,119:Le},{30:236,67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},t(We,a,{5:237}),t(kt,[2,102]),t(F,[2,35]),{43:238,44:g,45:39,47:40,60:y,89:w,102:E,105:_,106:A,109:D,111:O,113:41,114:R,115:k,116:L},{10:B,18:239},{10:Nr,60:Mr,84:On,92:240,105:Dt,107:241,108:242,109:Ce,110:tt,111:Ct,112:yr},{10:Nr,60:Mr,84:On,92:251,104:[1,252],105:Dt,107:241,108:242,109:Ce,110:tt,111:Ct,112:yr},{10:Nr,60:Mr,84:On,92:253,104:[1,254],105:Dt,107:241,108:242,109:Ce,110:tt,111:Ct,112:yr},{105:[1,255]},{10:Nr,60:Mr,84:On,92:256,105:Dt,107:241,108:242,109:Ce,110:tt,111:Ct,112:yr},{44:g,47:257,60:y,89:w,102:E,105:_,106:A,109:D,111:O,113:41,114:R,115:k,116:L},t(Tt,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},t(Tt,[2,116]),t(Tt,[2,118],{10:[1,261]}),t(Tt,[2,119]),t(se,[2,56]),t(en,[2,87]),t(se,[2,57]),{51:[1,262],67:bt,82:218,116:ft,117:vt,118:nt},t(se,[2,64]),t(se,[2,59]),t(se,[2,60]),t(se,[2,61]),{109:[1,263]},t(se,[2,63]),t(se,[2,65]),{66:[1,264],67:bt,82:218,116:ft,117:vt,118:nt},t(se,[2,67]),t(se,[2,68]),t(se,[2,70]),t(se,[2,69]),t(se,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(ye,[2,78]),{31:[1,265],67:bt,82:218,116:ft,117:vt,118:nt},{6:11,7:12,8:s,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,32:[1,266],33:24,34:d,36:p,38:m,42:28,43:38,44:g,45:39,47:40,60:y,84:v,85:x,86:b,87:T,88:C,89:w,102:E,105:_,106:A,109:D,111:O,113:41,114:R,115:k,116:L,121:S,122:I,123:M,124:P},t(Se,[2,53]),{43:267,44:g,45:39,47:40,60:y,89:w,102:E,105:_,106:A,109:D,111:O,113:41,114:R,115:k,116:L},t(Tt,[2,121],{106:tn}),t(gn,[2,130],{108:269,10:Nr,60:Mr,84:On,105:Dt,109:Ce,110:tt,111:Ct,112:yr}),t(Qr,[2,132]),t(Qr,[2,134]),t(Qr,[2,135]),t(Qr,[2,136]),t(Qr,[2,137]),t(Qr,[2,138]),t(Qr,[2,139]),t(Qr,[2,140]),t(Qr,[2,141]),t(Tt,[2,122],{106:tn}),{10:[1,270]},t(Tt,[2,123],{106:tn}),{10:[1,271]},t(In,[2,129]),t(Tt,[2,105],{106:tn}),t(Tt,[2,106],{113:112,44:g,60:y,89:w,102:E,105:_,106:A,109:D,111:O,114:R,115:k,116:L}),t(Tt,[2,110]),t(Tt,[2,112],{10:[1,272]}),t(Tt,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:z,9:$,11:U,21:277},t(F,[2,34]),t(Se,[2,52]),{10:Nr,60:Mr,84:On,105:Dt,107:278,108:242,109:Ce,110:tt,111:Ct,112:yr},t(Qr,[2,133]),{14:Y,44:ce,60:Z,89:ue,101:279,105:Q,106:j,109:ne,111:te,114:he,115:le,116:J,120:87},{14:Y,44:ce,60:Z,89:ue,101:280,105:Q,106:j,109:ne,111:te,114:he,115:le,116:J,120:87},{98:[1,281]},t(Tt,[2,120]),t(se,[2,58]),{30:282,67:bt,80:ht,81:St,82:171,116:ft,117:vt,118:nt},t(se,[2,66]),t(We,a,{5:283}),t(gn,[2,131],{108:269,10:Nr,60:Mr,84:On,105:Dt,109:Ce,110:tt,111:Ct,112:yr}),t(Tt,[2,126],{120:167,10:[1,284],14:Y,44:ce,60:Z,89:ue,105:Q,106:j,109:ne,111:te,114:he,115:le,116:J}),t(Tt,[2,127],{120:167,10:[1,285],14:Y,44:ce,60:Z,89:ue,105:Q,106:j,109:ne,111:te,114:he,115:le,116:J}),t(Tt,[2,114]),{31:[1,286],67:bt,82:218,116:ft,117:vt,118:nt},{6:11,7:12,8:s,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,32:[1,287],33:24,34:d,36:p,38:m,42:28,43:38,44:g,45:39,47:40,60:y,84:v,85:x,86:b,87:T,88:C,89:w,102:E,105:_,106:A,109:D,111:O,113:41,114:R,115:k,116:L,121:S,122:I,123:M,124:P},{10:Nr,60:Mr,84:On,92:288,105:Dt,107:241,108:242,109:Ce,110:tt,111:Ct,112:yr},{10:Nr,60:Mr,84:On,92:289,105:Dt,107:241,108:242,109:Ce,110:tt,111:Ct,112:yr},t(se,[2,62]),t(F,[2,33]),t(Tt,[2,124],{106:tn}),t(Tt,[2,125],{106:tn})],defaultActions:{},parseError:o(function(et,gt){if(gt.recoverable)this.trace(et);else{var Kt=new Error(et);throw Kt.hash=gt,Kt;}},"parseError"),parse:o(function(et){var gt=this,Kt=[0],ct=[],Sn=[null],me=[],Wf=this.table,we="",ki=0,o$=0,l$=0,jxe=2,c$=1,Kxe=me.slice.call(arguments,1),Yi=Object.create(this.lexer),qf={yy:{}};for(var PC in this.yy)Object.prototype.hasOwnProperty.call(this.yy,PC)&&(qf.yy[PC]=this.yy[PC]);Yi.setInput(et,qf.yy),qf.yy.lexer=Yi,qf.yy.parser=this,typeof Yi.yylloc>"u"&&(Yi.yylloc={});var BC=Yi.yylloc;me.push(BC);var Qxe=Yi.options&&Yi.options.ranges;typeof qf.yy.parseError=="function"?this.parseError=qf.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Rit(qs){Kt.length=Kt.length-2*qs,Sn.length=Sn.length-qs,me.length=me.length-qs;}o(Rit,"popStack");function Zxe(){var qs;return qs=ct.pop()||Yi.lex()||c$,typeof qs!="number"&&(qs instanceof Array&&(ct=qs,qs=ct.pop()),qs=gt.symbols_[qs]||qs),qs;}o(Zxe,"lex");for(var qa,FC,Yf,bo,Nit,$C,i0={},F4,tu,u$,$4;;){if(Yf=Kt[Kt.length-1],this.defaultActions[Yf]?bo=this.defaultActions[Yf]:((qa===null||typeof qa>"u")&&(qa=Zxe()),bo=Wf[Yf]&&Wf[Yf][qa]),typeof bo>"u"||!bo.length||!bo[0]){var zC="";$4=[];for(F4 in Wf[Yf])this.terminals_[F4]&&F4>jxe&&$4.push("'"+this.terminals_[F4]+"'");Yi.showPosition?zC="Parse error on line "+(ki+1)+`:
`+Yi.showPosition()+`
Expecting `+$4.join(", ")+", got '"+(this.terminals_[qa]||qa)+"'":zC="Parse error on line "+(ki+1)+": Unexpected "+(qa==c$?"end of input":"'"+(this.terminals_[qa]||qa)+"'"),this.parseError(zC,{text:Yi.match,token:this.terminals_[qa]||qa,line:Yi.yylineno,loc:BC,expected:$4});}if(bo[0]instanceof Array&&bo.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Yf+", token: "+qa);switch(bo[0]){case 1:Kt.push(qa),Sn.push(Yi.yytext),me.push(Yi.yylloc),Kt.push(bo[1]),qa=null,FC?(qa=FC,FC=null):(o$=Yi.yyleng,we=Yi.yytext,ki=Yi.yylineno,BC=Yi.yylloc,l$>0&&l$--);break;case 2:if(tu=this.productions_[bo[1]][1],i0.$=Sn[Sn.length-tu],i0._$={first_line:me[me.length-(tu||1)].first_line,last_line:me[me.length-1].last_line,first_column:me[me.length-(tu||1)].first_column,last_column:me[me.length-1].last_column},Qxe&&(i0._$.range=[me[me.length-(tu||1)].range[0],me[me.length-1].range[1]]),$C=this.performAction.apply(i0,[we,o$,ki,qf.yy,bo[1],Sn,me].concat(Kxe)),typeof $C<"u")return $C;tu&&(Kt=Kt.slice(0,-1*tu*2),Sn=Sn.slice(0,-1*tu),me=me.slice(0,-1*tu)),Kt.push(this.productions_[bo[1]][0]),Sn.push(i0.$),me.push(i0._$),u$=Wf[Kt[Kt.length-2]][Kt[Kt.length-1]],Kt.push(u$);break;case 3:return!0;}}return!0;},"parse")},Zn=function(){var Ur={EOF:1,parseError:o(function(gt,Kt){if(this.yy.parser)this.yy.parser.parseError(gt,Kt);else throw new Error(gt);},"parseError"),setInput:o(function(et,gt){return this.yy=gt||this.yy||{},this._input=et,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var et=this._input[0];this.yytext+=et,this.yyleng++,this.offset++,this.match+=et,this.matched+=et;var gt=et.match(/(?:\r\n?|\n).*/g);return gt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),et;},"input"),unput:o(function(et){var gt=et.length,Kt=et.split(/(?:\r\n?|\n)/g);this._input=et+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-gt),this.offset-=gt;var ct=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Kt.length-1&&(this.yylineno-=Kt.length-1);var Sn=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Kt?(Kt.length===ct.length?this.yylloc.first_column:0)+ct[ct.length-Kt.length].length-Kt[0].length:this.yylloc.first_column-gt},this.options.ranges&&(this.yylloc.range=[Sn[0],Sn[0]+this.yyleng-gt]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(et){this.unput(this.match.slice(et));},"less"),pastInput:o(function(){var et=this.matched.substr(0,this.matched.length-this.match.length);return(et.length>20?"...":"")+et.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var et=this.match;return et.length<20&&(et+=this._input.substr(0,20-et.length)),(et.substr(0,20)+(et.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var et=this.pastInput(),gt=new Array(et.length+1).join("-");return et+this.upcomingInput()+`
`+gt+"^";},"showPosition"),test_match:o(function(et,gt){var Kt,ct,Sn;if(this.options.backtrack_lexer&&(Sn={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Sn.yylloc.range=this.yylloc.range.slice(0))),ct=et[0].match(/(?:\r\n?|\n).*/g),ct&&(this.yylineno+=ct.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ct?ct[ct.length-1].length-ct[ct.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+et[0].length},this.yytext+=et[0],this.match+=et[0],this.matches=et,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(et[0].length),this.matched+=et[0],Kt=this.performAction.call(this,this.yy,this,gt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Kt)return Kt;if(this._backtrack){for(var me in Sn)this[me]=Sn[me];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var et,gt,Kt,ct;this._more||(this.yytext="",this.match="");for(var Sn=this._currentRules(),me=0;me<Sn.length;me++)if(Kt=this._input.match(this.rules[Sn[me]]),Kt&&(!gt||Kt[0].length>gt[0].length)){if(gt=Kt,ct=me,this.options.backtrack_lexer){if(et=this.test_match(Kt,Sn[me]),et!==!1)return et;if(this._backtrack){gt=!1;continue;}else return!1;}else if(!this.options.flex)break;}return gt?(et=this.test_match(gt,Sn[ct]),et!==!1?et:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var gt=this.next();return gt||this.lex();},"lex"),begin:o(function(gt){this.conditionStack.push(gt);},"begin"),popState:o(function(){var gt=this.conditionStack.length-1;return gt>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function(gt){return gt=this.conditionStack.length-1-Math.abs(gt||0),gt>=0?this.conditionStack[gt]:"INITIAL";},"topState"),pushState:o(function(gt){this.begin(gt);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{},performAction:o(function(gt,Kt,ct,Sn){var me=Sn;switch(ct){case 0:return this.begin("acc_title"),34;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),36;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),Kt.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let Wf=/\n\s*/g;return Kt.yytext=Kt.yytext.replace(Wf,"<br/>"),40;break;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return gt.lex.firstGraph()&&this.begin("dir"),12;break;case 36:return gt.lex.firstGraph()&&this.begin("dir"),12;break;case 37:return gt.lex.firstGraph()&&this.begin("dir"),12;break;case 38:return 27;case 39:return 32;case 40:return 98;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return this.popState(),13;break;case 45:return this.popState(),14;break;case 46:return this.popState(),14;break;case 47:return this.popState(),14;break;case 48:return this.popState(),14;break;case 49:return this.popState(),14;break;case 50:return this.popState(),14;break;case 51:return this.popState(),14;break;case 52:return this.popState(),14;break;case 53:return this.popState(),14;break;case 54:return this.popState(),14;break;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 78;case 60:return 105;case 61:return 111;case 62:return 46;case 63:return 60;case 64:return 44;case 65:return 8;case 66:return 106;case 67:return 115;case 68:return this.popState(),77;break;case 69:return this.pushState("edgeText"),75;break;case 70:return 119;case 71:return this.popState(),77;break;case 72:return this.pushState("thickEdgeText"),75;break;case 73:return 119;case 74:return this.popState(),77;break;case 75:return this.pushState("dottedEdgeText"),75;break;case 76:return 119;case 77:return 77;case 78:return this.popState(),53;break;case 79:return"TEXT";case 80:return this.pushState("ellipseText"),52;break;case 81:return this.popState(),55;break;case 82:return this.pushState("text"),54;break;case 83:return this.popState(),57;break;case 84:return this.pushState("text"),56;break;case 85:return 58;case 86:return this.pushState("text"),67;break;case 87:return this.popState(),64;break;case 88:return this.pushState("text"),63;break;case 89:return this.popState(),49;break;case 90:return this.pushState("text"),48;break;case 91:return this.popState(),69;break;case 92:return this.popState(),71;break;case 93:return 117;case 94:return this.pushState("trapText"),68;break;case 95:return this.pushState("trapText"),70;break;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 101:return 115;case 102:return 111;case 103:return 44;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;break;case 108:return this.pushState("text"),62;break;case 109:return this.popState(),51;break;case 110:return this.pushState("text"),50;break;case 111:return this.popState(),31;break;case 112:return this.pushState("text"),29;break;case 113:return this.popState(),66;break;case 114:return this.pushState("text"),65;break;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119:return 11;}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}};return Ur;}();Mi.lexer=Zn;function En(){this.yy={};}return o(En,"Parser"),En.prototype=Mi,Mi.Parser=En,new En();}();JR.parser=JR;eN=JR;});var ise,ase,sse=N(()=>{"use strict";nse();ise=Object.assign({},eN);ise.parse=t=>{let e=t.replace(/}\s*\n/g,`}
`);return eN.parse(e);};ase=ise;});var Lc,Vm=N(()=>{"use strict";Lc=o(()=>`
  /* Font Awesome icon styling - consolidated */
  .label-icon {
    display: inline-block;
    height: 1em;
    overflow: visible;
    vertical-align: -0.125em;
  }
  
  .node .label-icon path {
    fill: currentColor;
    stroke: revert;
    stroke-width: revert;
  }
`,"getIconStyles");});var $Pe,zPe,ose,lse=N(()=>{"use strict";Xs();Vm();$Pe=o((t,e)=>{let r=Kf,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return Ya(n,i,a,e);},"fade"),zPe=o(t=>`.label {
    font-family: ${t.fontFamily};
    color: ${t.nodeTextColor||t.textColor};
  }
  .cluster-label text {
    fill: ${t.titleColor};
  }
  .cluster-label span {
    color: ${t.titleColor};
  }
  .cluster-label span p {
    background-color: transparent;
  }

  .label text,span {
    fill: ${t.nodeTextColor||t.textColor};
    color: ${t.nodeTextColor||t.textColor};
  }

  .node rect,
  .node circle,
  .node ellipse,
  .node polygon,
  .node path {
    fill: ${t.mainBkg};
    stroke: ${t.nodeBorder};
    stroke-width: 1px;
  }
  .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
    text-anchor: middle;
  }
  // .flowchart-label .text-outer-tspan {
  //   text-anchor: middle;
  // }
  // .flowchart-label .text-inner-tspan {
  //   text-anchor: start;
  // }

  .node .katex path {
    fill: #000;
    stroke: #000;
    stroke-width: 1px;
  }

  .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
    text-align: center;
  }
  .node.clickable {
    cursor: pointer;
  }


  .root .anchor path {
    fill: ${t.lineColor} !important;
    stroke-width: 0;
    stroke: ${t.lineColor};
  }

  .arrowheadPath {
    fill: ${t.arrowheadColor};
  }

  .edgePath .path {
    stroke: ${t.lineColor};
    stroke-width: 2.0px;
  }

  .flowchart-link {
    stroke: ${t.lineColor};
    fill: none;
  }

  .edgeLabel {
    background-color: ${t.edgeLabelBackground};
    p {
      background-color: ${t.edgeLabelBackground};
    }
    rect {
      opacity: 0.5;
      background-color: ${t.edgeLabelBackground};
      fill: ${t.edgeLabelBackground};
    }
    text-align: center;
  }

  /* For html labels only */
  .labelBkg {
    background-color: ${$Pe(t.edgeLabelBackground,.5)};
    // background-color:
  }

  .cluster rect {
    fill: ${t.clusterBkg};
    stroke: ${t.clusterBorder};
    stroke-width: 1px;
  }

  .cluster text {
    fill: ${t.titleColor};
  }

  .cluster span {
    color: ${t.titleColor};
  }
  /* .cluster div {
    color: ${t.titleColor};
  } */

  div.mermaidTooltip {
    position: absolute;
    text-align: center;
    max-width: 200px;
    padding: 2px;
    font-family: ${t.fontFamily};
    font-size: 12px;
    background: ${t.tertiaryColor};
    border: 1px solid ${t.border2};
    border-radius: 2px;
    pointer-events: none;
    z-index: 100;
  }

  .flowchartTitleText {
    text-anchor: middle;
    font-size: 18px;
    fill: ${t.textColor};
  }

  rect.text {
    fill: none;
    stroke-width: 0;
  }

  .icon-shape, .image-shape {
    background-color: ${t.edgeLabelBackground};
    p {
      background-color: ${t.edgeLabelBackground};
      padding: 2px;
    }
    rect {
      opacity: 0.5;
      background-color: ${t.edgeLabelBackground};
      fill: ${t.edgeLabelBackground};
    }
    text-align: center;
  }
  ${Lc()}
`,"getStyles"),ose=zPe;});var yk={};hr(yk,{diagram:()=>GPe});var GPe,vk=N(()=>{"use strict";qt();oee();rse();sse();lse();GPe={parser:ase,get db(){return new rw();},renderer:tse,styles:ose,init:o(t=>{t.flowchart||(t.flowchart={}),t.layout&&ev({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ev({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}});},"init")};});var tN,dse,pse=N(()=>{"use strict";tN=function(){var t=o(function(te,he,le,J){for(le=le||{},J=te.length;J--;le[te[J]]=he);return le;},"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],r=[1,10],n=[1,11],i=[1,12],a=[1,13],s=[1,20],l=[1,21],u=[1,22],h=[1,23],f=[1,24],d=[1,19],p=[1,25],m=[1,26],g=[1,18],y=[1,33],v=[1,34],x=[1,35],b=[1,36],T=[1,37],C=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],w=[1,42],E=[1,43],_=[1,52],A=[40,50,68,69],D=[1,63],O=[1,61],R=[1,58],k=[1,62],L=[1,64],S=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],I=[63,64,65,66,67],M=[1,81],P=[1,80],B=[1,78],F=[1,79],z=[6,10,42,47],$=[6,10,13,41,42,47,48,49],U=[1,89],K=[1,88],ee=[1,87],Y=[19,56],ce=[1,98],Z=[1,97],ue=[19,56,58,60],Q={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:o(function(he,le,J,Se,se,ae,Oe){var ye=ae.length-1;switch(se){case 1:break;case 2:this.$=[];break;case 3:ae[ye-1].push(ae[ye]),this.$=ae[ye-1];break;case 4:case 5:this.$=ae[ye];break;case 6:case 7:this.$=[];break;case 8:Se.addEntity(ae[ye-4]),Se.addEntity(ae[ye-2]),Se.addRelationship(ae[ye-4],ae[ye],ae[ye-2],ae[ye-3]);break;case 9:Se.addEntity(ae[ye-8]),Se.addEntity(ae[ye-4]),Se.addRelationship(ae[ye-8],ae[ye],ae[ye-4],ae[ye-5]),Se.setClass([ae[ye-8]],ae[ye-6]),Se.setClass([ae[ye-4]],ae[ye-2]);break;case 10:Se.addEntity(ae[ye-6]),Se.addEntity(ae[ye-2]),Se.addRelationship(ae[ye-6],ae[ye],ae[ye-2],ae[ye-3]),Se.setClass([ae[ye-6]],ae[ye-4]);break;case 11:Se.addEntity(ae[ye-6]),Se.addEntity(ae[ye-4]),Se.addRelationship(ae[ye-6],ae[ye],ae[ye-4],ae[ye-5]),Se.setClass([ae[ye-4]],ae[ye-2]);break;case 12:Se.addEntity(ae[ye-3]),Se.addAttributes(ae[ye-3],ae[ye-1]);break;case 13:Se.addEntity(ae[ye-5]),Se.addAttributes(ae[ye-5],ae[ye-1]),Se.setClass([ae[ye-5]],ae[ye-3]);break;case 14:Se.addEntity(ae[ye-2]);break;case 15:Se.addEntity(ae[ye-4]),Se.setClass([ae[ye-4]],ae[ye-2]);break;case 16:Se.addEntity(ae[ye]);break;case 17:Se.addEntity(ae[ye-2]),Se.setClass([ae[ye-2]],ae[ye]);break;case 18:Se.addEntity(ae[ye-6],ae[ye-4]),Se.addAttributes(ae[ye-6],ae[ye-1]);break;case 19:Se.addEntity(ae[ye-8],ae[ye-6]),Se.addAttributes(ae[ye-8],ae[ye-1]),Se.setClass([ae[ye-8]],ae[ye-3]);break;case 20:Se.addEntity(ae[ye-5],ae[ye-3]);break;case 21:Se.addEntity(ae[ye-7],ae[ye-5]),Se.setClass([ae[ye-7]],ae[ye-2]);break;case 22:Se.addEntity(ae[ye-3],ae[ye-1]);break;case 23:Se.addEntity(ae[ye-5],ae[ye-3]),Se.setClass([ae[ye-5]],ae[ye]);break;case 24:case 25:this.$=ae[ye].trim(),Se.setAccTitle(this.$);break;case 26:case 27:this.$=ae[ye].trim(),Se.setAccDescription(this.$);break;case 32:Se.setDirection("TB");break;case 33:Se.setDirection("BT");break;case 34:Se.setDirection("RL");break;case 35:Se.setDirection("LR");break;case 36:this.$=ae[ye-3],Se.addClass(ae[ye-2],ae[ye-1]);break;case 37:case 38:case 56:case 64:this.$=[ae[ye]];break;case 39:case 40:this.$=ae[ye-2].concat([ae[ye]]);break;case 41:this.$=ae[ye-2],Se.setClass(ae[ye-1],ae[ye]);break;case 42:this.$=ae[ye-3],Se.addCssStyles(ae[ye-2],ae[ye-1]);break;case 43:this.$=[ae[ye]];break;case 44:ae[ye-2].push(ae[ye]),this.$=ae[ye-2];break;case 46:this.$=ae[ye-1]+ae[ye];break;case 54:case 76:case 77:this.$=ae[ye].replace(/"/g,"");break;case 55:case 78:this.$=ae[ye];break;case 57:ae[ye].push(ae[ye-1]),this.$=ae[ye];break;case 58:this.$={type:ae[ye-1],name:ae[ye]};break;case 59:this.$={type:ae[ye-2],name:ae[ye-1],keys:ae[ye]};break;case 60:this.$={type:ae[ye-2],name:ae[ye-1],comment:ae[ye]};break;case 61:this.$={type:ae[ye-3],name:ae[ye-2],keys:ae[ye-1],comment:ae[ye]};break;case 62:case 63:case 66:this.$=ae[ye];break;case 65:ae[ye-2].push(ae[ye]),this.$=ae[ye-2];break;case 67:this.$=ae[ye].replace(/"/g,"");break;case 68:this.$={cardA:ae[ye],relType:ae[ye-1],cardB:ae[ye-2]};break;case 69:this.$=Se.Cardinality.ZERO_OR_ONE;break;case 70:this.$=Se.Cardinality.ZERO_OR_MORE;break;case 71:this.$=Se.Cardinality.ONE_OR_MORE;break;case 72:this.$=Se.Cardinality.ONLY_ONE;break;case 73:this.$=Se.Cardinality.MD_PARENT;break;case 74:this.$=Se.Identification.NON_IDENTIFYING;break;case 75:this.$=Se.Identification.IDENTIFYING;break;}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:n,26:i,28:a,29:14,30:15,31:16,32:17,33:s,34:l,35:u,36:h,37:f,40:d,43:p,44:m,50:g},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:27,11:9,22:r,24:n,26:i,28:a,29:14,30:15,31:16,32:17,33:s,34:l,35:u,36:h,37:f,40:d,43:p,44:m,50:g},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:y,64:v,65:x,66:b,67:T}),{23:[1,38]},{25:[1,39]},{27:[1,40]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(C,[2,54]),t(C,[2,55]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:41,40:w,41:E},{16:44,40:w,41:E},{16:45,40:w,41:E},t(e,[2,4]),{11:46,40:d,50:g},{16:47,40:w,41:E},{18:48,19:[1,49],51:50,52:51,56:_},{11:53,40:d,50:g},{62:54,68:[1,55],69:[1,56]},t(A,[2,69]),t(A,[2,70]),t(A,[2,71]),t(A,[2,72]),t(A,[2,73]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:D,38:57,41:O,42:R,45:59,46:60,48:k,49:L},t(S,[2,37]),t(S,[2,38]),{16:65,40:w,41:E,42:R},{13:D,38:66,41:O,42:R,45:59,46:60,48:k,49:L},{13:[1,67],15:[1,68]},t(e,[2,17],{61:32,12:69,17:[1,70],42:R,63:y,64:v,65:x,66:b,67:T}),{19:[1,71]},t(e,[2,14]),{18:72,19:[2,56],51:50,52:51,56:_},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:y,64:v,65:x,66:b,67:T},t(I,[2,74]),t(I,[2,75]),{6:M,10:P,39:77,42:B,47:F},{40:[1,82],41:[1,83]},t(z,[2,43],{46:84,13:D,41:O,48:k,49:L}),t($,[2,45]),t($,[2,50]),t($,[2,51]),t($,[2,52]),t($,[2,53]),t(e,[2,41],{42:R}),{6:M,10:P,39:85,42:B,47:F},{14:86,40:U,50:K,70:ee},{16:90,40:w,41:E},{11:91,40:d,50:g},{18:92,19:[1,93],51:50,52:51,56:_},t(e,[2,12]),{19:[2,57]},t(Y,[2,58],{54:94,55:95,57:96,59:ce,60:Z}),t([19,56,59,60],[2,63]),t(e,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(e,[2,36]),{13:D,41:O,45:101,46:60,48:k,49:L},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(S,[2,39]),t(S,[2,40]),t($,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,76]),t(e,[2,77]),t(e,[2,78]),{13:[1,102],42:R},{13:[1,104],15:[1,103]},{19:[1,105]},t(e,[2,15]),t(Y,[2,59],{55:106,58:[1,107],60:Z}),t(Y,[2,60]),t(ue,[2,64]),t(Y,[2,67]),t(ue,[2,66]),{18:108,19:[1,109],51:50,52:51,56:_},{16:110,40:w,41:E},t(z,[2,44],{46:84,13:D,41:O,48:k,49:L}),{14:111,40:U,50:K,70:ee},{16:112,40:w,41:E},{14:113,40:U,50:K,70:ee},t(e,[2,13]),t(Y,[2,61]),{57:114,59:ce},{19:[1,115]},t(e,[2,20]),t(e,[2,23],{17:[1,116],42:R}),t(e,[2,11]),{13:[1,117],42:R},t(e,[2,10]),t(ue,[2,65]),t(e,[2,18]),{18:118,19:[1,119],51:50,52:51,56:_},{14:120,40:U,50:K,70:ee},{19:[1,121]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:o(function(he,le){if(le.recoverable)this.trace(he);else{var J=new Error(he);throw J.hash=le,J;}},"parseError"),parse:o(function(he){var le=this,J=[0],Se=[],se=[null],ae=[],Oe=this.table,ye="",Be=0,He=0,ze=0,Le=2,Ie=1,xe=ae.slice.call(arguments,1),q=Object.create(this.lexer),de={yy:{}};for(var ie in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ie)&&(de.yy[ie]=this.yy[ie]);q.setInput(he,de.yy),de.yy.lexer=q,de.yy.parser=this,typeof q.yylloc>"u"&&(q.yylloc={});var oe=q.yylloc;ae.push(oe);var V=q.options&&q.options.ranges;typeof de.yy.parseError=="function"?this.parseError=de.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(ut){J.length=J.length-2*ut,se.length=se.length-ut,ae.length=ae.length-ut;}o(Te,"popStack");function W(){var ut;return ut=Se.pop()||q.lex()||Ie,typeof ut!="number"&&(ut instanceof Array&&(Se=ut,ut=Se.pop()),ut=le.symbols_[ut]||ut),ut;}o(W,"lex");for(var pe,ve,Pe,_e,be,Ve,De={},Ye,at,Rt,st;;){if(Pe=J[J.length-1],this.defaultActions[Pe]?_e=this.defaultActions[Pe]:((pe===null||typeof pe>"u")&&(pe=W()),_e=Oe[Pe]&&Oe[Pe][pe]),typeof _e>"u"||!_e.length||!_e[0]){var Ue="";st=[];for(Ye in Oe[Pe])this.terminals_[Ye]&&Ye>Le&&st.push("'"+this.terminals_[Ye]+"'");q.showPosition?Ue="Parse error on line "+(Be+1)+`:
`+q.showPosition()+`
Expecting `+st.join(", ")+", got '"+(this.terminals_[pe]||pe)+"'":Ue="Parse error on line "+(Be+1)+": Unexpected "+(pe==Ie?"end of input":"'"+(this.terminals_[pe]||pe)+"'"),this.parseError(Ue,{text:q.match,token:this.terminals_[pe]||pe,line:q.yylineno,loc:oe,expected:st});}if(_e[0]instanceof Array&&_e.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Pe+", token: "+pe);switch(_e[0]){case 1:J.push(pe),se.push(q.yytext),ae.push(q.yylloc),J.push(_e[1]),pe=null,ve?(pe=ve,ve=null):(He=q.yyleng,ye=q.yytext,Be=q.yylineno,oe=q.yylloc,ze>0&&ze--);break;case 2:if(at=this.productions_[_e[1]][1],De.$=se[se.length-at],De._$={first_line:ae[ae.length-(at||1)].first_line,last_line:ae[ae.length-1].last_line,first_column:ae[ae.length-(at||1)].first_column,last_column:ae[ae.length-1].last_column},V&&(De._$.range=[ae[ae.length-(at||1)].range[0],ae[ae.length-1].range[1]]),Ve=this.performAction.apply(De,[ye,He,Be,de.yy,_e[1],se,ae].concat(xe)),typeof Ve<"u")return Ve;at&&(J=J.slice(0,-1*at*2),se=se.slice(0,-1*at),ae=ae.slice(0,-1*at)),J.push(this.productions_[_e[1]][0]),se.push(De.$),ae.push(De._$),Rt=Oe[J[J.length-2]][J[J.length-1]],J.push(Rt);break;case 3:return!0;}}return!0;},"parse")},j=function(){var te={EOF:1,parseError:o(function(le,J){if(this.yy.parser)this.yy.parser.parseError(le,J);else throw new Error(le);},"parseError"),setInput:o(function(he,le){return this.yy=le||this.yy||{},this._input=he,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var he=this._input[0];this.yytext+=he,this.yyleng++,this.offset++,this.match+=he,this.matched+=he;var le=he.match(/(?:\r\n?|\n).*/g);return le?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),he;},"input"),unput:o(function(he){var le=he.length,J=he.split(/(?:\r\n?|\n)/g);this._input=he+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-le),this.offset-=le;var Se=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),J.length-1&&(this.yylineno-=J.length-1);var se=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:J?(J.length===Se.length?this.yylloc.first_column:0)+Se[Se.length-J.length].length-J[0].length:this.yylloc.first_column-le},this.options.ranges&&(this.yylloc.range=[se[0],se[0]+this.yyleng-le]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(he){this.unput(this.match.slice(he));},"less"),pastInput:o(function(){var he=this.matched.substr(0,this.matched.length-this.match.length);return(he.length>20?"...":"")+he.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var he=this.match;return he.length<20&&(he+=this._input.substr(0,20-he.length)),(he.substr(0,20)+(he.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var he=this.pastInput(),le=new Array(he.length+1).join("-");return he+this.upcomingInput()+`
`+le+"^";},"showPosition"),test_match:o(function(he,le){var J,Se,se;if(this.options.backtrack_lexer&&(se={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(se.yylloc.range=this.yylloc.range.slice(0))),Se=he[0].match(/(?:\r\n?|\n).*/g),Se&&(this.yylineno+=Se.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Se?Se[Se.length-1].length-Se[Se.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+he[0].length},this.yytext+=he[0],this.match+=he[0],this.matches=he,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(he[0].length),this.matched+=he[0],J=this.performAction.call(this,this.yy,this,le,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),J)return J;if(this._backtrack){for(var ae in se)this[ae]=se[ae];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var he,le,J,Se;this._more||(this.yytext="",this.match="");for(var se=this._currentRules(),ae=0;ae<se.length;ae++)if(J=this._input.match(this.rules[se[ae]]),J&&(!le||J[0].length>le[0].length)){if(le=J,Se=ae,this.options.backtrack_lexer){if(he=this.test_match(J,se[ae]),he!==!1)return he;if(this._backtrack){le=!1;continue;}else return!1;}else if(!this.options.flex)break;}return le?(he=this.test_match(le,se[Se]),he!==!1?he:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var le=this.next();return le||this.lex();},"lex"),begin:o(function(le){this.conditionStack.push(le);},"begin"),popState:o(function(){var le=this.conditionStack.length-1;return le>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function(le){return le=this.conditionStack.length-1-Math.abs(le||0),le>=0?this.conditionStack[le]:"INITIAL";},"topState"),pushState:o(function(le){this.begin(le);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(le,J,Se,se){var ae=se;switch(Se){case 0:return this.begin("acc_title"),24;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),26;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;break;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 59;case 25:return 56;case 26:return 56;case 27:return 60;case 28:break;case 29:return this.popState(),19;break;case 30:return J.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;break;case 34:return this.popState(),10;break;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;break;case 40:return 43;case 41:return 63;case 42:return 65;case 43:return 65;case 44:return 65;case 45:return 63;case 46:return 63;case 47:return 64;case 48:return 64;case 49:return 64;case 50:return 64;case 51:return 64;case 52:return 65;case 53:return 64;case 54:return 65;case 55:return 66;case 56:return 66;case 57:return 66;case 58:return 66;case 59:return 63;case 60:return 64;case 61:return 65;case 62:return 67;case 63:return 68;case 64:return 69;case 65:return 69;case 66:return 68;case 67:return 68;case 68:return 68;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 73:return J.yytext[0];case 74:return 6;}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}};return te;}();Q.lexer=j;function ne(){this.yy={};}return o(ne,"Parser"),ne.prototype=Q,Q.Parser=ne,new ne();}();tN.parser=tN;dse=tN;});var xk,mse=N(()=>{"use strict";var _Class48;yt();qt();ci();nr();xk=(_Class48=class xk{constructor(){this.entities=new Map();this.relationships=[];this.classes=new Map();this.direction="TB";this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"};this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"};this.setAccTitle=Cr;this.getAccTitle=_r;this.setAccDescription=Dr;this.getAccDescription=Lr;this.setDiagramTitle=Ir;this.getDiagramTitle=Rr;this.getConfig=o(()=>ge().er,"getConfig");this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this);}addEntity(e,r=""){var _this$entities$get,_ge$look;return this.entities.has(e)?!((_this$entities$get=this.entities.get(e))!==null&&_this$entities$get!==void 0&&_this$entities$get.alias)&&r&&(this.entities.get(e).alias=r,X.info(`Add alias '${r}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-${this.entities.size}`,label:e,attributes:[],alias:r,shape:"erBox",look:(_ge$look=ge().look)!==null&&_ge$look!==void 0?_ge$look:"default",cssClasses:"default",cssStyles:[]}),X.info("Added new entity :",e)),this.entities.get(e);}getEntity(e){return this.entities.get(e);}getEntities(){return this.entities;}getClasses(){return this.classes;}addAttributes(e,r){let n=this.addEntity(e),i;for(i=r.length-1;i>=0;i--)r[i].keys||(r[i].keys=[]),r[i].comment||(r[i].comment=""),n.attributes.push(r[i]),X.debug("Added attribute ",r[i].name);}addRelationship(e,r,n,i){let a=this.entities.get(e),s=this.entities.get(n);if(!a||!s)return;let l={entityA:a.id,roleA:r,entityB:s.id,relSpec:i};this.relationships.push(l),X.debug("Added new relationship :",l);}getRelationships(){return this.relationships;}getDirection(){return this.direction;}setDirection(e){this.direction=e;}getCompiledStyles(e){let r=[];for(let n of e){var _i$styles2,_i$textStyles2;let i=this.classes.get(n);i!==null&&i!==void 0&&i.styles&&(r=[...r,...((_i$styles2=i.styles)!==null&&_i$styles2!==void 0?_i$styles2:[])].map(a=>a.trim())),(i===null||i===void 0?void 0:i.textStyles)&&(r=[...r,...((_i$textStyles2=i.textStyles)!==null&&_i$textStyles2!==void 0?_i$textStyles2:[])].map(a=>a.trim()));}return r;}addCssStyles(e,r){for(let n of e){let i=this.entities.get(n);if(!r||!i)return;for(let a of r)i.cssStyles.push(a);}}addClass(e,r){e.forEach(n=>{let i=this.classes.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.classes.set(n,i)),r&&r.forEach(function(a){if(/color/.exec(a)){let s=a.replace("fill","bgFill");i.textStyles.push(s);}i.styles.push(a);});});}setClass(e,r){for(let n of e){let i=this.entities.get(n);if(i)for(let a of r)i.cssClasses+=" "+a;}}clear(){this.entities=new Map(),this.classes=new Map(),this.relationships=[],wr();}getData(){let e=[],r=[],n=ge();for(let a of this.entities.keys()){let s=this.entities.get(a);s&&(s.cssCompiledStyles=this.getCompiledStyles(s.cssClasses.split(" ")),e.push(s));}let i=0;for(let a of this.relationships){let s={id:Gh(a.entityA,a.entityB,{prefix:"id",counter:i++}),type:"normal",curve:"basis",start:a.entityA,end:a.entityB,label:a.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:a.relSpec.cardB.toLowerCase(),arrowTypeEnd:a.relSpec.cardA.toLowerCase(),pattern:a.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:n.look};r.push(s);}return{nodes:e,edges:r,other:{},config:n,direction:"TB"};}},o(_Class48,"ErDB"),_Class48);});var rN={};hr(rN,{draw:()=>XPe});var XPe,gse=N(()=>{"use strict";qt();yt();xm();Zd();Jd();nr();pr();XPe=o(async function(t,e,r,n){var _a$titleTopMargin,_a$useMaxWidth;X.info("REF0:"),X.info("Drawing er diagram (unified)",e);let{securityLevel:i,er:a,layout:s}=ge(),l=n.db.getData(),u=bc(e,i);l.type=n.type,l.layoutAlgorithm=sf(s),l.config.flowchart.nodeSpacing=(a===null||a===void 0?void 0:a.nodeSpacing)||140,l.config.flowchart.rankSpacing=(a===null||a===void 0?void 0:a.rankSpacing)||80,l.direction=n.db.getDirection(),l.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],l.diagramId=e,await Dc(l,u),l.layoutAlgorithm==="elk"&&u.select(".edges").lower();let h=u.selectAll('[id*="-background"]');Array.from(h).length>0&&h.each(function(){let d=Ge(this),m=d.attr("id").replace("-background",""),g=u.select(`#${CSS.escape(m)}`);if(!g.empty()){let y=g.attr("transform");d.attr("transform",y);}});let f=8;Vt.insertTitle(u,"erDiagramTitleText",(_a$titleTopMargin=a===null||a===void 0?void 0:a.titleTopMargin)!==null&&_a$titleTopMargin!==void 0?_a$titleTopMargin:25,n.db.getDiagramTitle()),Wo(u,f,"erDiagram",(_a$useMaxWidth=a===null||a===void 0?void 0:a.useMaxWidth)!==null&&_a$useMaxWidth!==void 0?_a$useMaxWidth:!0);},"draw");});var jPe,KPe,yse,vse=N(()=>{"use strict";Xs();jPe=o((t,e)=>{let r=Kf,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return Ya(n,i,a,e);},"fade"),KPe=o(t=>`
  .entityBox {
    fill: ${t.mainBkg};
    stroke: ${t.nodeBorder};
  }

  .relationshipLabelBox {
    fill: ${t.tertiaryColor};
    opacity: 0.7;
    background-color: ${t.tertiaryColor};
      rect {
        opacity: 0.5;
      }
  }

  .labelBkg {
    background-color: ${jPe(t.tertiaryColor,.5)};
  }

  .edgeLabel .label {
    fill: ${t.nodeBorder};
    font-size: 14px;
  }

  .label {
    font-family: ${t.fontFamily};
    color: ${t.nodeTextColor||t.textColor};
  }

  .edge-pattern-dashed {
    stroke-dasharray: 8,8;
  }

  .node rect,
  .node circle,
  .node ellipse,
  .node polygon
  {
    fill: ${t.mainBkg};
    stroke: ${t.nodeBorder};
    stroke-width: 1px;
  }

  .relationshipLine {
    stroke: ${t.lineColor};
    stroke-width: 1;
    fill: none;
  }

  .marker {
    fill: none !important;
    stroke: ${t.lineColor} !important;
    stroke-width: 1;
  }
`,"getStyles"),yse=KPe;});var xse={};hr(xse,{diagram:()=>QPe});var QPe,bse=N(()=>{"use strict";pse();mse();gse();vse();QPe={parser:dse,get db(){return new xk();},renderer:rN,styles:yse};});function si(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string";}function ma(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string";}function nN(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string";}function tp(t){return typeof t=="object"&&t!==null&&si(t.container)&&ma(t.reference)&&typeof t.message=="string";}function Rl(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content);}function of(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object";}function V2(t){return Rl(t)&&typeof t.fullText=="string";}var ep,Nl=N(()=>{"use strict";var _Class49;o(si,"isAstNode");o(ma,"isReference");o(nN,"isAstNodeDescription");o(tp,"isLinkingError");ep=(_Class49=class ep{constructor(){this.subtypes={},this.allSubtypes={};}isInstance(e,r){return si(e)&&this.isSubtype(e.$type,r);}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});let i=n[r];if(i!==void 0)return i;{let a=this.computeIsSubtype(e,r);return n[r]=a,a;}}getAllSubTypes(e){let r=this.allSubtypes[e];if(r)return r;{let n=this.getAllTypes(),i=[];for(let a of n)this.isSubtype(a,e)&&i.push(a);return this.allSubtypes[e]=i,i;}}},o(_Class49,"AbstractAstReflection"),_Class49);o(Rl,"isCompositeCstNode");o(of,"isLeafCstNode");o(V2,"isRootCstNode");});function tBe(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t);}function bk(t){return!!t&&typeof t[Symbol.iterator]=="function";}function Jr(...t){if(t.length===1){let e=t[0];if(e instanceof oo)return e;if(bk(e))return new oo(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new oo(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:Ma);}return t.length>1?new oo(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){let r=e.iterator.next();if(!r.done)return r;e.iterator=void 0;}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0;}if(e.collIndex<t.length){let r=t[e.collIndex++];bk(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r);}}while(e.iterator||e.array||e.collIndex<t.length);return Ma;}):U2;}var oo,U2,Ma,Rc,Um,$s=N(()=>{"use strict";var _t7,_Class50;oo=(_t7=class t{constructor(e,r){this.startFn=e,this.nextFn=r;}iterator(){let e={state:this.startFn(),next:o(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e;}[Symbol.iterator](){return this.iterator();}isEmpty(){return!!this.iterator().next().done;}count(){let e=this.iterator(),r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r;}toArray(){let e=[],r=this.iterator(),n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e;}toSet(){return new Set(this);}toMap(e,r){let n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n);}toString(){return this.join();}concat(e){return new t(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0;}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return Ma;});}join(e=","){let r=this.iterator(),n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=e),n+=tBe(i.value)),a=!0;while(!i.done);return n;}indexOf(e,r=0){let n=this.iterator(),i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===e)return i;a=n.next(),i++;}return-1;}every(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next();}return!0;}some(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next();}return!1;}forEach(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++;}map(e){return new t(this.startFn,r=>{let{done:n,value:i}=this.nextFn(r);return n?Ma:{done:!1,value:e(i)};});}filter(e){return new t(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return Ma;});}nonNullable(){return this.filter(e=>e!=null);}reduce(e,r){let n=this.iterator(),i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=e(i,a.value),a=n.next();return i;}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r);}recursiveReduce(e,r,n){let i=e.next();if(i.done)return n;let a=this.recursiveReduce(e,r,n);return a===void 0?i.value:r(a,i.value);}find(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next();}}findIndex(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++;}return-1;}includes(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next();}return!1;}flatMap(e){return new t(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let a=r.iterator.next();if(a.done)r.iterator=void 0;else return a;}let{done:n,value:i}=this.nextFn(r.this);if(!n){let a=e(i);if(bk(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a};}}while(r.iterator);return Ma;});}flat(e){if(e===void 0&&(e=1),e<=0)return this;let r=e>1?this.flat(e-1):this;return new t(()=>({this:r.startFn()}),n=>{do{if(n.iterator){let s=n.iterator.next();if(s.done)n.iterator=void 0;else return s;}let{done:i,value:a}=r.nextFn(n.this);if(!i)if(bk(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a};}while(n.iterator);return Ma;});}head(){let r=this.iterator().next();if(!r.done)return r.value;}tail(e=1){return new t(()=>{let r=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(r).done)return r;return r;},this.nextFn);}limit(e){return new t(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?Ma:this.nextFn(r.state)));}distinct(e){return new t(()=>({set:new Set(),internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){let i=e?e(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n;}while(!n.done);return Ma;});}exclude(e,r){let n=new Set();for(let i of e){let a=r?r(i):i;n.add(a);}return this.filter(i=>{let a=r?r(i):i;return!n.has(a);});}},o(_t7,"StreamImpl"),_t7);o(tBe,"toString");o(bk,"isIterable");U2=new oo(()=>{},()=>Ma),Ma=Object.freeze({done:!0,value:void 0});o(Jr,"stream");Rc=(_Class50=class Rc extends oo{constructor(e,r,n){super(()=>({iterators:n!==null&&n!==void 0&&n.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){let s=i.iterators[i.iterators.length-1].next();if(s.done)i.iterators.pop();else return i.iterators.push(r(s.value)[Symbol.iterator]()),s;}return Ma;});}iterator(){let e={state:this.startFn(),next:o(()=>this.nextFn(e.state),"next"),prune:o(()=>{e.state.pruned=!0;},"prune"),[Symbol.iterator]:()=>e};return e;}},o(_Class50,"TreeStreamImpl"),_Class50);(function(t){function e(a){return a.reduce((s,l)=>s+l,0);}o(e,"sum"),t.sum=e;function r(a){return a.reduce((s,l)=>s*l,0);}o(r,"product"),t.product=r;function n(a){return a.reduce((s,l)=>Math.min(s,l));}o(n,"min"),t.min=n;function i(a){return a.reduce((s,l)=>Math.max(s,l));}o(i,"max"),t.max=i;})(Um||(Um={}));});var wk={};hr(wk,{DefaultNameRegexp:()=>Tk,RangeComparison:()=>Nc,compareRange:()=>Ese,findCommentNode:()=>oN,findDeclarationNodeAtOffset:()=>nBe,findLeafNodeAtOffset:()=>lN,findLeafNodeBeforeOffset:()=>Sse,flattenCst:()=>rBe,getInteriorNodes:()=>sBe,getNextNode:()=>iBe,getPreviousNode:()=>Ase,getStartlineNode:()=>aBe,inRange:()=>sN,isChildNode:()=>aN,isCommentNode:()=>iN,streamCst:()=>rp,toDocumentSegment:()=>np,tokenToRange:()=>Hm});function rp(t){return new Rc(t,e=>Rl(e)?e.content:[],{includeRoot:!0});}function rBe(t){return rp(t).filter(of);}function aN(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1;}function Hm(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}};}function np(t){if(!t)return;let{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e};}function Ese(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Nc.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Nc.After;let r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?Nc.Inside:r?Nc.OverlapBack:n?Nc.OverlapFront:Nc.Outside;}function sN(t,e){return Ese(t,e)>Nc.After;}function nBe(t,e,r=Tk){if(t){if(e>0){let n=e-t.offset,i=t.text.charAt(n);r.test(i)||e--;}return lN(t,e);}}function oN(t,e){if(t){let r=Ase(t,!0);if(r&&iN(r,e))return r;if(V2(t)){let n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){let a=t.content[i];if(iN(a,e))return a;}}}}function iN(t,e){return of(t)&&e.includes(t.tokenType.name);}function lN(t,e){if(of(t))return t;if(Rl(t)){let r=Cse(t,e,!1);if(r)return lN(r,e);}}function Sse(t,e){if(of(t))return t;if(Rl(t)){let r=Cse(t,e,!0);if(r)return Sse(r,e);}}function Cse(t,e,r){let n=0,i=t.content.length-1,a;for(;n<=i;){let s=Math.floor((n+i)/2),l=t.content[s];if(l.offset<=e&&l.end>e)return l;l.end<=e?(a=r?l:void 0,n=s+1):i=s-1;}return a;}function Ase(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t);for(;n>0;){n--;let i=r.content[n];if(e||!i.hidden)return i;}t=r;}}function iBe(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t),i=r.content.length-1;for(;n<i;){n++;let a=r.content[n];if(e||!a.hidden)return a;}t=r;}}function aBe(t){if(t.range.start.character===0)return t;let e=t.range.start.line,r=t,n;for(;t.container;){let i=t.container,a=n!==null&&n!==void 0?n:i.content.indexOf(t);if(a===0?(t=i,n=void 0):(n=a-1,t=i.content[n]),t.range.start.line!==e)break;r=t;}return r;}function sBe(t,e){let r=oBe(t,e);return r?r.parent.content.slice(r.a+1,r.b):[];}function oBe(t,e){let r=kse(t),n=kse(e),i;for(let a=0;a<r.length&&a<n.length;a++){let s=r[a],l=n[a];if(s.parent===l.parent)i={parent:s.parent,a:s.index,b:l.index};else break;}return i;}function kse(t){let e=[];for(;t.container;){let r=t.container,n=r.content.indexOf(t);e.push({parent:r,index:n}),t=r;}return e.reverse();}var Nc,Tk,Ml=N(()=>{"use strict";Nl();$s();o(rp,"streamCst");o(rBe,"flattenCst");o(aN,"isChildNode");o(Hm,"tokenToRange");o(np,"toDocumentSegment");(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside";})(Nc||(Nc={}));o(Ese,"compareRange");o(sN,"inRange");Tk=/^[\w\p{L}]$/u;o(nBe,"findDeclarationNodeAtOffset");o(oN,"findCommentNode");o(iN,"isCommentNode");o(lN,"findLeafNodeAtOffset");o(Sse,"findLeafNodeBeforeOffset");o(Cse,"binarySearch");o(Ase,"getPreviousNode");o(iBe,"getNextNode");o(aBe,"getStartlineNode");o(sBe,"getInteriorNodes");o(oBe,"getCommonParent");o(kse,"getParentChain");});function Mc(t){throw new Error("Error! The input value was not handled.");}var ip,kk=N(()=>{"use strict";var _Class51;ip=(_Class51=class ip extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r);}},o(_Class51,"ErrorWithLocation"),_Class51);o(Mc,"assertUnreachable");});var Z2={};hr(Z2,{AbstractElement:()=>Ym,AbstractRule:()=>Wm,AbstractType:()=>qm,Action:()=>fg,Alternatives:()=>dg,ArrayLiteral:()=>Xm,ArrayType:()=>jm,Assignment:()=>pg,BooleanLiteral:()=>Km,CharacterRange:()=>mg,Condition:()=>H2,Conjunction:()=>Qm,CrossReference:()=>gg,Disjunction:()=>Zm,EndOfFile:()=>yg,Grammar:()=>Jm,GrammarImport:()=>q2,Group:()=>vg,InferredType:()=>eg,Interface:()=>tg,Keyword:()=>xg,LangiumGrammarAstReflection:()=>Dg,LangiumGrammarTerminals:()=>lBe,NamedArgument:()=>Y2,NegatedToken:()=>bg,Negation:()=>rg,NumberLiteral:()=>ng,Parameter:()=>ig,ParameterReference:()=>ag,ParserRule:()=>sg,ReferenceType:()=>og,RegexToken:()=>Tg,ReturnType:()=>X2,RuleCall:()=>wg,SimpleType:()=>lg,StringLiteral:()=>cg,TerminalAlternatives:()=>kg,TerminalGroup:()=>Eg,TerminalRule:()=>ap,TerminalRuleCall:()=>Sg,Type:()=>ug,TypeAttribute:()=>j2,TypeDefinition:()=>Ek,UnionType:()=>hg,UnorderedGroup:()=>Cg,UntilToken:()=>Ag,ValueLiteral:()=>W2,Wildcard:()=>_g,isAbstractElement:()=>K2,isAbstractRule:()=>cBe,isAbstractType:()=>uBe,isAction:()=>Ou,isAlternatives:()=>_k,isArrayLiteral:()=>mBe,isArrayType:()=>cN,isAssignment:()=>Il,isBooleanLiteral:()=>uN,isCharacterRange:()=>vN,isCondition:()=>hBe,isConjunction:()=>hN,isCrossReference:()=>sp,isDisjunction:()=>fN,isEndOfFile:()=>xN,isFeatureName:()=>fBe,isGrammar:()=>gBe,isGrammarImport:()=>yBe,isGroup:()=>lf,isInferredType:()=>Sk,isInterface:()=>Ck,isKeyword:()=>qo,isNamedArgument:()=>vBe,isNegatedToken:()=>bN,isNegation:()=>dN,isNumberLiteral:()=>xBe,isParameter:()=>bBe,isParameterReference:()=>pN,isParserRule:()=>Ia,isPrimitiveType:()=>_se,isReferenceType:()=>mN,isRegexToken:()=>TN,isReturnType:()=>gN,isRuleCall:()=>Ol,isSimpleType:()=>Ak,isStringLiteral:()=>TBe,isTerminalAlternatives:()=>wN,isTerminalGroup:()=>kN,isTerminalRule:()=>lo,isTerminalRuleCall:()=>Dk,isType:()=>Q2,isTypeAttribute:()=>wBe,isTypeDefinition:()=>dBe,isUnionType:()=>yN,isUnorderedGroup:()=>Lk,isUntilToken:()=>EN,isValueLiteral:()=>pBe,isWildcard:()=>SN,reflection:()=>ur});function cBe(t){return ur.isInstance(t,Wm);}function uBe(t){return ur.isInstance(t,qm);}function hBe(t){return ur.isInstance(t,H2);}function fBe(t){return _se(t)||t==="current"||t==="entry"||t==="extends"||t==="false"||t==="fragment"||t==="grammar"||t==="hidden"||t==="import"||t==="interface"||t==="returns"||t==="terminal"||t==="true"||t==="type"||t==="infer"||t==="infers"||t==="with"||typeof t=="string"&&/\^?[_a-zA-Z][\w_]*/.test(t);}function _se(t){return t==="string"||t==="number"||t==="boolean"||t==="Date"||t==="bigint";}function dBe(t){return ur.isInstance(t,Ek);}function pBe(t){return ur.isInstance(t,W2);}function K2(t){return ur.isInstance(t,Ym);}function mBe(t){return ur.isInstance(t,Xm);}function cN(t){return ur.isInstance(t,jm);}function uN(t){return ur.isInstance(t,Km);}function hN(t){return ur.isInstance(t,Qm);}function fN(t){return ur.isInstance(t,Zm);}function gBe(t){return ur.isInstance(t,Jm);}function yBe(t){return ur.isInstance(t,q2);}function Sk(t){return ur.isInstance(t,eg);}function Ck(t){return ur.isInstance(t,tg);}function vBe(t){return ur.isInstance(t,Y2);}function dN(t){return ur.isInstance(t,rg);}function xBe(t){return ur.isInstance(t,ng);}function bBe(t){return ur.isInstance(t,ig);}function pN(t){return ur.isInstance(t,ag);}function Ia(t){return ur.isInstance(t,sg);}function mN(t){return ur.isInstance(t,og);}function gN(t){return ur.isInstance(t,X2);}function Ak(t){return ur.isInstance(t,lg);}function TBe(t){return ur.isInstance(t,cg);}function lo(t){return ur.isInstance(t,ap);}function Q2(t){return ur.isInstance(t,ug);}function wBe(t){return ur.isInstance(t,j2);}function yN(t){return ur.isInstance(t,hg);}function Ou(t){return ur.isInstance(t,fg);}function _k(t){return ur.isInstance(t,dg);}function Il(t){return ur.isInstance(t,pg);}function vN(t){return ur.isInstance(t,mg);}function sp(t){return ur.isInstance(t,gg);}function xN(t){return ur.isInstance(t,yg);}function lf(t){return ur.isInstance(t,vg);}function qo(t){return ur.isInstance(t,xg);}function bN(t){return ur.isInstance(t,bg);}function TN(t){return ur.isInstance(t,Tg);}function Ol(t){return ur.isInstance(t,wg);}function wN(t){return ur.isInstance(t,kg);}function kN(t){return ur.isInstance(t,Eg);}function Dk(t){return ur.isInstance(t,Sg);}function Lk(t){return ur.isInstance(t,Cg);}function EN(t){return ur.isInstance(t,Ag);}function SN(t){return ur.isInstance(t,_g);}var lBe,Wm,qm,H2,Ek,W2,Ym,Xm,jm,Km,Qm,Zm,Jm,q2,eg,tg,Y2,rg,ng,ig,ag,sg,og,X2,lg,cg,ap,ug,j2,hg,fg,dg,pg,mg,gg,yg,vg,xg,bg,Tg,wg,kg,Eg,Sg,Cg,Ag,_g,Dg,ur,Ic=N(()=>{"use strict";var _Class52;Nl();lBe={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},Wm="AbstractRule";o(cBe,"isAbstractRule");qm="AbstractType";o(uBe,"isAbstractType");H2="Condition";o(hBe,"isCondition");o(fBe,"isFeatureName");o(_se,"isPrimitiveType");Ek="TypeDefinition";o(dBe,"isTypeDefinition");W2="ValueLiteral";o(pBe,"isValueLiteral");Ym="AbstractElement";o(K2,"isAbstractElement");Xm="ArrayLiteral";o(mBe,"isArrayLiteral");jm="ArrayType";o(cN,"isArrayType");Km="BooleanLiteral";o(uN,"isBooleanLiteral");Qm="Conjunction";o(hN,"isConjunction");Zm="Disjunction";o(fN,"isDisjunction");Jm="Grammar";o(gBe,"isGrammar");q2="GrammarImport";o(yBe,"isGrammarImport");eg="InferredType";o(Sk,"isInferredType");tg="Interface";o(Ck,"isInterface");Y2="NamedArgument";o(vBe,"isNamedArgument");rg="Negation";o(dN,"isNegation");ng="NumberLiteral";o(xBe,"isNumberLiteral");ig="Parameter";o(bBe,"isParameter");ag="ParameterReference";o(pN,"isParameterReference");sg="ParserRule";o(Ia,"isParserRule");og="ReferenceType";o(mN,"isReferenceType");X2="ReturnType";o(gN,"isReturnType");lg="SimpleType";o(Ak,"isSimpleType");cg="StringLiteral";o(TBe,"isStringLiteral");ap="TerminalRule";o(lo,"isTerminalRule");ug="Type";o(Q2,"isType");j2="TypeAttribute";o(wBe,"isTypeAttribute");hg="UnionType";o(yN,"isUnionType");fg="Action";o(Ou,"isAction");dg="Alternatives";o(_k,"isAlternatives");pg="Assignment";o(Il,"isAssignment");mg="CharacterRange";o(vN,"isCharacterRange");gg="CrossReference";o(sp,"isCrossReference");yg="EndOfFile";o(xN,"isEndOfFile");vg="Group";o(lf,"isGroup");xg="Keyword";o(qo,"isKeyword");bg="NegatedToken";o(bN,"isNegatedToken");Tg="RegexToken";o(TN,"isRegexToken");wg="RuleCall";o(Ol,"isRuleCall");kg="TerminalAlternatives";o(wN,"isTerminalAlternatives");Eg="TerminalGroup";o(kN,"isTerminalGroup");Sg="TerminalRuleCall";o(Dk,"isTerminalRuleCall");Cg="UnorderedGroup";o(Lk,"isUnorderedGroup");Ag="UntilToken";o(EN,"isUntilToken");_g="Wildcard";o(SN,"isWildcard");Dg=(_Class52=class Dg extends ep{getAllTypes(){return[Ym,Wm,qm,fg,dg,Xm,jm,pg,Km,mg,H2,Qm,gg,Zm,yg,Jm,q2,vg,eg,tg,xg,Y2,bg,rg,ng,ig,ag,sg,og,Tg,X2,wg,lg,cg,kg,Eg,ap,Sg,ug,j2,Ek,hg,Cg,Ag,W2,_g];}computeIsSubtype(e,r){switch(e){case fg:case dg:case pg:case mg:case gg:case yg:case vg:case xg:case bg:case Tg:case wg:case kg:case Eg:case Sg:case Cg:case Ag:case _g:return this.isSubtype(Ym,r);case Xm:case ng:case cg:return this.isSubtype(W2,r);case jm:case og:case lg:case hg:return this.isSubtype(Ek,r);case Km:return this.isSubtype(H2,r)||this.isSubtype(W2,r);case Qm:case Zm:case rg:case ag:return this.isSubtype(H2,r);case eg:case tg:case ug:return this.isSubtype(qm,r);case sg:return this.isSubtype(Wm,r)||this.isSubtype(qm,r);case ap:return this.isSubtype(Wm,r);default:return!1;}}getReferenceType(e){let r=`${e.container.$type}:${e.property}`;switch(r){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return qm;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return Wm;case"Grammar:usedGrammars":return Jm;case"NamedArgument:parameter":case"ParameterReference:parameter":return ig;case"TerminalRuleCall:rule":return ap;default:throw new Error(`${r} is not a valid reference id.`);}}getTypeMetaData(e){switch(e){case Ym:return{name:Ym,properties:[{name:"cardinality"},{name:"lookahead"}]};case Xm:return{name:Xm,properties:[{name:"elements",defaultValue:[]}]};case jm:return{name:jm,properties:[{name:"elementType"}]};case Km:return{name:Km,properties:[{name:"true",defaultValue:!1}]};case Qm:return{name:Qm,properties:[{name:"left"},{name:"right"}]};case Zm:return{name:Zm,properties:[{name:"left"},{name:"right"}]};case Jm:return{name:Jm,properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case q2:return{name:q2,properties:[{name:"path"}]};case eg:return{name:eg,properties:[{name:"name"}]};case tg:return{name:tg,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case Y2:return{name:Y2,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case rg:return{name:rg,properties:[{name:"value"}]};case ng:return{name:ng,properties:[{name:"value"}]};case ig:return{name:ig,properties:[{name:"name"}]};case ag:return{name:ag,properties:[{name:"parameter"}]};case sg:return{name:sg,properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case og:return{name:og,properties:[{name:"referenceType"}]};case X2:return{name:X2,properties:[{name:"name"}]};case lg:return{name:lg,properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case cg:return{name:cg,properties:[{name:"value"}]};case ap:return{name:ap,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case ug:return{name:ug,properties:[{name:"name"},{name:"type"}]};case j2:return{name:j2,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case hg:return{name:hg,properties:[{name:"types",defaultValue:[]}]};case fg:return{name:fg,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case dg:return{name:dg,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case pg:return{name:pg,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case mg:return{name:mg,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case gg:return{name:gg,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case yg:return{name:yg,properties:[{name:"cardinality"},{name:"lookahead"}]};case vg:return{name:vg,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case xg:return{name:xg,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case bg:return{name:bg,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case Tg:return{name:Tg,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case wg:return{name:wg,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case kg:return{name:kg,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Eg:return{name:Eg,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Sg:return{name:Sg,properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case Cg:return{name:Cg,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Ag:return{name:Ag,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case _g:return{name:_g,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]};}}},o(_Class52,"LangiumGrammarAstReflection"),_Class52),ur=new Dg();});var Nk={};hr(Nk,{assignMandatoryProperties:()=>_N,copyAstNode:()=>AN,findLocalReferences:()=>EBe,findRootNode:()=>J2,getContainerOfType:()=>op,getDocument:()=>Oa,hasContainerOfType:()=>kBe,linkContentToContainer:()=>Rk,streamAllContents:()=>Oc,streamAst:()=>Yo,streamContents:()=>ex,streamReferences:()=>Lg});function Rk(t){for(let[e,r]of Object.entries(t))e.startsWith("$")||(Array.isArray(r)?r.forEach((n,i)=>{si(n)&&(n.$container=t,n.$containerProperty=e,n.$containerIndex=i);}):si(r)&&(r.$container=t,r.$containerProperty=e));}function op(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container;}}function kBe(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container;}return!1;}function Oa(t){let r=J2(t).$document;if(!r)throw new Error("AST node has no document.");return r;}function J2(t){for(;t.$container;)t=t.$container;return t;}function ex(t,e){if(!t)throw new Error("Node must be an AstNode.");let r=e===null||e===void 0?void 0:e.range;return new oo(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){let i=n.keys[n.keyIndex];if(!i.startsWith("$")){let a=t[i];if(si(a)){if(n.keyIndex++,CN(a,r))return{done:!1,value:a};}else if(Array.isArray(a)){for(;n.arrayIndex<a.length;){let s=n.arrayIndex++,l=a[s];if(si(l)&&CN(l,r))return{done:!1,value:l};}n.arrayIndex=0;}}n.keyIndex++;}return Ma;});}function Oc(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Rc(t,r=>ex(r,e));}function Yo(t,e){if(t){if(e!==null&&e!==void 0&&e.range&&!CN(t,e.range))return new Rc(t,()=>[]);}else throw new Error("Root node must be an AstNode.");return new Rc(t,r=>ex(r,e),{includeRoot:!0});}function CN(t,e){var r;if(!e)return!0;let n=(r=t.$cstNode)===null||r===void 0?void 0:r.range;return n?sN(n,e):!1;}function Lg(t){return new oo(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){let r=e.keys[e.keyIndex];if(!r.startsWith("$")){let n=t[r];if(ma(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){let i=e.arrayIndex++,a=n[i];if(ma(a))return{done:!1,value:{reference:a,container:t,property:r,index:i}};}e.arrayIndex=0;}}e.keyIndex++;}return Ma;});}function EBe(t,e=Oa(t).parseResult.value){let r=[];return Yo(e).forEach(n=>{Lg(n).forEach(i=>{i.reference.ref===t&&r.push(i.reference);});}),Jr(r);}function _N(t,e){let r=t.getTypeMetaData(e.$type),n=e;for(let i of r.properties)i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=Dse(i.defaultValue));}function Dse(t){return Array.isArray(t)?[...t.map(Dse)]:t;}function AN(t,e){let r={$type:t.$type};for(let[n,i]of Object.entries(t))if(!n.startsWith("$"))if(si(i))r[n]=AN(i,e);else if(ma(i))r[n]=e(r,n,i.$refNode,i.$refText);else if(Array.isArray(i)){let a=[];for(let s of i)si(s)?a.push(AN(s,e)):ma(s)?a.push(e(r,n,s.$refNode,s.$refText)):a.push(s);r[n]=a;}else r[n]=i;return Rk(r),r;}var as=N(()=>{"use strict";Nl();$s();Ml();o(Rk,"linkContentToContainer");o(op,"getContainerOfType");o(kBe,"hasContainerOfType");o(Oa,"getDocument");o(J2,"findRootNode");o(ex,"streamContents");o(Oc,"streamAllContents");o(Yo,"streamAst");o(CN,"isAstNodeInRange");o(Lg,"streamReferences");o(EBe,"findLocalReferences");o(_N,"assignMandatoryProperties");o(Dse,"copyDefaultValue");o(AN,"copyAstNode");});function or(t){return t.charCodeAt(0);}function Mk(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r);}):e.push(t);}function Rg(t,e){if(t[e]===!0)throw"duplicate flag "+e;let r=t[e];t[e]=!0;}function lp(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0;}function tx(){throw Error("Internal Error - Should never get here!");}function DN(t){return t.type==="Character";}var LN=N(()=>{"use strict";o(or,"cc");o(Mk,"insertToSet");o(Rg,"addFlag");o(lp,"ASSERT_EXISTS");o(tx,"ASSERT_NEVER_REACH_HERE");o(DN,"isCharacter");});var rx,nx,RN,Lse=N(()=>{"use strict";LN();rx=[];for(let t=or("0");t<=or("9");t++)rx.push(t);nx=[or("_")].concat(rx);for(let t=or("a");t<=or("z");t++)nx.push(t);for(let t=or("A");t<=or("Z");t++)nx.push(t);RN=[or(" "),or("\f"),or(`
`),or("\r"),or("	"),or("\v"),or("	"),or("\xA0"),or("\u1680"),or("\u2000"),or("\u2001"),or("\u2002"),or("\u2003"),or("\u2004"),or("\u2005"),or("\u2006"),or("\u2007"),or("\u2008"),or("\u2009"),or("\u200A"),or("\u2028"),or("\u2029"),or("\u202F"),or("\u205F"),or("\u3000"),or("\uFEFF")];});var SBe,Ik,CBe,cp,Rse=N(()=>{"use strict";var _Class53;LN();Lse();SBe=/[0-9a-fA-F]/,Ik=/[0-9]/,CBe=/[1-9]/,cp=(_Class53=class cp{constructor(){this.idx=0,this.input="",this.groupIdx=0;}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx};}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx;}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Rg(n,"global");break;case"i":Rg(n,"ignoreCase");break;case"m":Rg(n,"multiLine");break;case"u":Rg(n,"unicode");break;case"y":Rg(n,"sticky");break;}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)};}disjunction(){let e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)};}alternative(){let e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)};}term(){return this.isAssertion()?this.assertion():this.atom();}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)};}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break;}lp(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)};}return tx();}quantifier(e=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),r={atLeast:i,atMost:a}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break;}if(e===!0&&r===void 0)return;lp(r);break;}if(!(e===!0&&r===void 0)&&lp(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r;}atom(){let e,r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break;}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),lp(e)?(e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):tx();}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[or(`
`),or("\r"),or("\u2028"),or("\u2029")]};}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom();}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()};}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=rx;break;case"D":e=rx,r=!0;break;case"s":e=RN;break;case"S":e=RN,r=!0;break;case"w":e=nx;break;case"W":e=nx,r=!0;break;}return lp(e)?{type:"Set",value:e,complement:r}:tx();}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=or("\f");break;case"n":e=or(`
`);break;case"r":e=or("\r");break;case"t":e=or("	");break;case"v":e=or("\v");break;}return lp(e)?{type:"Character",value:e}:tx();}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64};}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:or("\0")};}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2);}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4);}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:or(e)};}classPatternCharacterAtom(){switch(this.peekChar()){case`
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:or(e)};}}characterClass(){let e=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),i=n.type==="Character";if(DN(n)&&this.isRangeDash()){this.consumeChar("-");let a=this.classAtom(),s=a.type==="Character";if(DN(a)){if(a.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:a.value});}else Mk(n.value,e),e.push(or("-")),Mk(a.value,e);}else Mk(n.value,e);}return this.consumeChar("]"),{type:"Set",complement:r,value:e};}classAtom(){switch(this.peekChar()){case"]":case`
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom();}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:or("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom();}}group(){let e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break;}let r=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:e,value:r};return e&&(n.idx=this.groupIdx),n;}positiveInteger(){let e=this.popChar();if(CBe.test(e)===!1)throw Error("Expecting a positive integer");for(;Ik.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10);}integerIncludingZero(){let e=this.popChar();if(Ik.test(e)===!1)throw Error("Expecting an integer");for(;Ik.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10);}patternCharacter(){let e=this.popChar();switch(e){case`
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:or(e)};}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1;}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1);}isDigit(){return Ik.test(this.peekChar(0));}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0;}}isTerm(){return this.isAtom()||this.isAssertion();}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1;}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1;}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!");default:return!1;}}isQuantifier(){let e=this.saveState();try{return this.quantifier(!0)!==void 0;}catch{return!1;}finally{this.restoreState(e);}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0;}}parseHexDigits(e){let r="";for(let i=0;i<e;i++){let a=this.popChar();if(SBe.test(a)===!1)throw Error("Expecting a HexDecimal digits");r+=a;}return{type:"Character",value:parseInt(r,16)};}peekChar(e=0){return this.input[this.idx+e];}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e;}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++;}loc(e){return{begin:e,end:this.idx};}},o(_Class53,"RegExpParser"),_Class53);});var Pc,Nse=N(()=>{"use strict";var _Class54;Pc=(_Class54=class Pc{visitChildren(e){for(let r in e){let n=e[r];e.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(i=>{this.visit(i);},this));}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break;}this.visitChildren(e);}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},o(_Class54,"BaseRegExpVisitor"),_Class54);});var ix=N(()=>{"use strict";Rse();Nse();});var Ok={};hr(Ok,{NEWLINE_REGEXP:()=>MN,escapeRegExp:()=>hp,getCaseInsensitivePattern:()=>ON,getTerminalParts:()=>ABe,isMultilineComment:()=>IN,isWhitespace:()=>Ng,partialMatches:()=>PN,partialRegExp:()=>Ose,whitespaceCharacters:()=>Ise});function ABe(t){try{typeof t!="string"&&(t=t.source),t=`/${t}/`;let e=Mse.pattern(t),r=[];for(let n of e.value.value)up.reset(t),up.visit(n),r.push({start:up.startRegexp,end:up.endRegex});return r;}catch{return[];}}function IN(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),up.reset(t),up.visit(Mse.pattern(t)),up.multiline;}catch{return!1;}}function Ng(t){let e=typeof t=="string"?new RegExp(t):t;return Ise.some(r=>e.test(r));}function hp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");}function ON(t){return Array.prototype.map.call(t,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:hp(e)).join("");}function PN(t,e){let r=Ose(t),n=e.match(r);return!!n&&n[0].length>0;}function Ose(t){typeof t=="string"&&(t=new RegExp(t));let e=t,r=t.source,n=0;function i(){let a="",s;function l(h){a+=r.substr(n,h),n+=h;}o(l,"appendRaw");function u(h){a+="(?:"+r.substr(n,h)+"|$)",n+=h;}for(o(u,"appendOptional");n<r.length;)switch(r[n]){case"\\":switch(r[n+1]){case"c":u(3);break;case"x":u(4);break;case"u":e.unicode?r[n+2]==="{"?u(r.indexOf("}",n)-n+1):u(6):u(2);break;case"p":case"P":e.unicode?u(r.indexOf("}",n)-n+1):u(2);break;case"k":u(r.indexOf(">",n)-n+1);break;default:u(2);break;}break;case"[":s=/\[(?:\\.|.)*?\]/g,s.lastIndex=n,s=s.exec(r)||[],u(s[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":l(1);break;case"{":s=/\{\d+,?\d*\}/g,s.lastIndex=n,s=s.exec(r),s?l(s[0].length):u(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":a+="(?:",n+=3,a+=i()+"|$)";break;case"=":a+="(?=",n+=3,a+=i()+")";break;case"!":s=n,n+=3,i(),a+=r.substr(s,n-s);break;case"<":switch(r[n+3]){case"=":case"!":s=n,n+=4,i(),a+=r.substr(s,n-s);break;default:l(r.indexOf(">",n)-n+1),a+=i()+"|$)";break;}break;}else l(1),a+=i()+"|$)";break;case")":return++n,a;default:u(1);break;}return a;}return o(i,"process"),new RegExp(i(),t.flags);}var MN,Mse,NN,up,Ise,Mg=N(()=>{"use strict";var _Class55;ix();MN=/\r?\n/gm,Mse=new cp(),NN=(_Class55=class NN extends Pc{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1;}get endRegex(){return this.endRegexpStack.join("");}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[];}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[]);}visitCharacter(e){let r=String.fromCharCode(e.value);if(!this.multiline&&r===`
`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let n=hp(r);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n);}}visitSet(e){if(!this.multiline){let r=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(r);this.multiline=!!`
`.match(n);}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r);}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e);}},o(_Class55,"TerminalRegExpVisitor"),_Class55),up=new NN();o(ABe,"getTerminalParts");o(IN,"isMultilineComment");Ise=`\f
\r	\v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("");o(Ng,"isWhitespace");o(hp,"escapeRegExp");o(ON,"getCaseInsensitivePattern");o(PN,"partialMatches");o(Ose,"partialRegExp");});var Bk={};hr(Bk,{findAssignment:()=>WN,findNameAssignment:()=>Pk,findNodeForKeyword:()=>UN,findNodeForProperty:()=>sx,findNodesForKeyword:()=>_Be,findNodesForKeywordInternal:()=>HN,findNodesForProperty:()=>GN,getActionAtElement:()=>zse,getActionType:()=>Vse,getAllReachableRules:()=>ax,getCrossReferenceTerminal:()=>$N,getEntryRule:()=>Pse,getExplicitRuleType:()=>Ig,getHiddenRules:()=>Bse,getRuleType:()=>qN,getRuleTypeName:()=>MBe,getTypeName:()=>lx,isArrayCardinality:()=>LBe,isArrayOperator:()=>RBe,isCommentTerminal:()=>zN,isDataType:()=>NBe,isDataTypeRule:()=>ox,isOptionalCardinality:()=>DBe,terminalRegex:()=>Og});function Pse(t){return t.rules.find(e=>Ia(e)&&e.entry);}function Bse(t){return t.rules.filter(e=>lo(e)&&e.hidden);}function ax(t,e){let r=new Set(),n=Pse(t);if(!n)return new Set(t.rules);let i=[n].concat(Bse(t));for(let s of i)Fse(s,r,e);let a=new Set();for(let s of t.rules)(r.has(s.name)||lo(s)&&s.hidden)&&a.add(s);return a;}function Fse(t,e,r){e.add(t.name),Oc(t).forEach(n=>{if(Ol(n)||r&&Dk(n)){let i=n.rule.ref;i&&!e.has(i.name)&&Fse(i,e,r);}});}function $N(t){if(t.terminal)return t.terminal;if(t.type.ref){let e=Pk(t.type.ref);return e===null||e===void 0?void 0:e.terminal;}}function zN(t){return t.hidden&&!Ng(Og(t));}function GN(t,e){return!t||!e?[]:VN(t,e,t.astNode,!0);}function sx(t,e,r){if(!t||!e)return;let n=VN(t,e,t.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r];}function VN(t,e,r,n){if(!n){let i=op(t.grammarSource,Il);if(i&&i.feature===e)return[t];}return Rl(t)&&t.astNode===r?t.content.flatMap(i=>VN(i,e,r,!1)):[];}function _Be(t,e){return t?HN(t,e,t===null||t===void 0?void 0:t.astNode):[];}function UN(t,e,r){if(!t)return;let n=HN(t,e,t===null||t===void 0?void 0:t.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r];}function HN(t,e,r){if(t.astNode!==r)return[];if(qo(t.grammarSource)&&t.grammarSource.value===e)return[t];let n=rp(t).iterator(),i,a=[];do if(i=n.next(),!i.done){let s=i.value;s.astNode===r?qo(s.grammarSource)&&s.grammarSource.value===e&&a.push(s):n.prune();}while(!i.done);return a;}function WN(t){var e;let r=t.astNode;for(;r===((e=t.container)===null||e===void 0?void 0:e.astNode);){let n=op(t.grammarSource,Il);if(n)return n;t=t.container;}}function Pk(t){let e=t;return Sk(e)&&(Ou(e.$container)?e=e.$container.$container:Ia(e.$container)?e=e.$container:Mc(e.$container)),$se(t,e,new Map());}function $se(t,e,r){var n;function i(a,s){let l;return op(a,Il)||(l=$se(s,s,r)),r.set(t,l),l;}if(o(i,"go"),r.has(t))return r.get(t);r.set(t,void 0);for(let a of Oc(e)){if(Il(a)&&a.feature.toLowerCase()==="name")return r.set(t,a),a;if(Ol(a)&&Ia(a.rule.ref))return i(a,a.rule.ref);if(Ak(a)&&!((n=a.typeRef)===null||n===void 0)&&n.ref)return i(a,a.typeRef.ref);}}function zse(t){let e=t.$container;if(lf(e)){let r=e.elements,n=r.indexOf(t);for(let i=n-1;i>=0;i--){let a=r[i];if(Ou(a))return a;{let s=Oc(r[i]).find(Ou);if(s)return s;}}}if(K2(e))return zse(e);}function DBe(t,e){return t==="?"||t==="*"||lf(e)&&!!e.guardCondition;}function LBe(t){return t==="*"||t==="+";}function RBe(t){return t==="+=";}function ox(t){return Gse(t,new Set());}function Gse(t,e){if(e.has(t))return!0;e.add(t);for(let r of Oc(t))if(Ol(r)){if(!r.rule.ref||Ia(r.rule.ref)&&!Gse(r.rule.ref,e))return!1;}else{if(Il(r))return!1;if(Ou(r))return!1;}return!!t.definition;}function NBe(t){return FN(t.type,new Set());}function FN(t,e){if(e.has(t))return!0;if(e.add(t),cN(t))return!1;if(mN(t))return!1;if(yN(t))return t.types.every(r=>FN(r,e));if(Ak(t)){if(t.primitiveType!==void 0)return!0;if(t.stringType!==void 0)return!0;if(t.typeRef!==void 0){let r=t.typeRef.ref;return Q2(r)?FN(r.type,e):!1;}else return!1;}else return!1;}function Ig(t){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){let e=t.returnType.ref;if(e){if(Ia(e))return e.name;if(Ck(e)||Q2(e))return e.name;}}}function lx(t){var e;if(Ia(t))return ox(t)?t.name:(e=Ig(t))!==null&&e!==void 0?e:t.name;if(Ck(t)||Q2(t)||gN(t))return t.name;if(Ou(t)){let r=Vse(t);if(r)return r;}else if(Sk(t))return t.name;throw new Error("Cannot get name of Unknown Type");}function Vse(t){var e;if(t.inferredType)return t.inferredType.name;if(!((e=t.type)===null||e===void 0)&&e.ref)return lx(t.type.ref);}function MBe(t){var e,r,n;return lo(t)?(r=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&r!==void 0?r:"string":ox(t)?t.name:(n=Ig(t))!==null&&n!==void 0?n:t.name;}function qN(t){var e,r,n;return lo(t)?(r=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&r!==void 0?r:"string":(n=Ig(t))!==null&&n!==void 0?n:t.name;}function Og(t){let e={s:!1,i:!1,u:!1},r=Pg(t.definition,e),n=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(r,n);}function Pg(t,e){if(wN(t))return IBe(t);if(kN(t))return OBe(t);if(vN(t))return FBe(t);if(Dk(t)){let r=t.rule.ref;if(!r)throw new Error("Missing rule reference.");return Pu(Pg(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead});}else{if(bN(t))return BBe(t);if(EN(t))return PBe(t);if(TN(t)){let r=t.regex.lastIndexOf("/"),n=t.regex.substring(1,r),i=t.regex.substring(r+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),Pu(n,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1});}else{if(SN(t))return Pu(YN,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error(`Invalid terminal element: ${t===null||t===void 0?void 0:t.$type}`);}}}function IBe(t){return Pu(t.elements.map(e=>Pg(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead});}function OBe(t){return Pu(t.elements.map(e=>Pg(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead});}function PBe(t){return Pu(`${YN}*?${Pg(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead});}function BBe(t){return Pu(`(?!${Pg(t.terminal)})${YN}*?`,{cardinality:t.cardinality,lookahead:t.lookahead});}function FBe(t){return t.right?Pu(`[${BN(t.left)}-${BN(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):Pu(BN(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1});}function BN(t){return hp(t.value);}function Pu(t,e){var r;return(e.wrap!==!1||e.lookahead)&&(t=`(${(r=e.lookahead)!==null&&r!==void 0?r:""}${t})`),e.cardinality?`${t}${e.cardinality}`:t;}var YN,Pl=N(()=>{"use strict";kk();Ic();Nl();as();Ml();Mg();o(Pse,"getEntryRule");o(Bse,"getHiddenRules");o(ax,"getAllReachableRules");o(Fse,"ruleDfs");o($N,"getCrossReferenceTerminal");o(zN,"isCommentTerminal");o(GN,"findNodesForProperty");o(sx,"findNodeForProperty");o(VN,"findNodesForPropertyInternal");o(_Be,"findNodesForKeyword");o(UN,"findNodeForKeyword");o(HN,"findNodesForKeywordInternal");o(WN,"findAssignment");o(Pk,"findNameAssignment");o($se,"findNameAssignmentInternal");o(zse,"getActionAtElement");o(DBe,"isOptionalCardinality");o(LBe,"isArrayCardinality");o(RBe,"isArrayOperator");o(ox,"isDataTypeRule");o(Gse,"isDataTypeRuleInternal");o(NBe,"isDataType");o(FN,"isDataTypeInternal");o(Ig,"getExplicitRuleType");o(lx,"getTypeName");o(Vse,"getActionType");o(MBe,"getRuleTypeName");o(qN,"getRuleType");o(Og,"terminalRegex");YN=/[\s\S]/.source;o(Pg,"abstractElementToRegex");o(IBe,"terminalAlternativesToRegex");o(OBe,"terminalGroupToRegex");o(PBe,"untilTokenToRegex");o(BBe,"negateTokenToRegex");o(FBe,"characterRangeToRegex");o(BN,"keywordToRegex");o(Pu,"withCardinality");});function XN(t){let e=[],r=t.Grammar;for(let n of r.rules)lo(n)&&zN(n)&&IN(Og(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:Tk};}var jN=N(()=>{"use strict";Ml();Pl();Mg();Ic();o(XN,"createGrammarConfig");});var KN=N(()=>{"use strict";});function Bg(t){console&&console.error&&console.error(`Error: ${t}`);}function cx(t){console&&console.warn&&console.warn(`Warning: ${t}`);}var Use=N(()=>{"use strict";o(Bg,"PRINT_ERROR");o(cx,"PRINT_WARNING");});function ux(t){let e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r};}var Hse=N(()=>{"use strict";o(ux,"timer");});function hx(t){function e(){}o(e,"FakeConstructor"),e.prototype=t;let r=new e();function n(){return typeof r.bar;}return o(n,"fakeAccess"),n(),n(),t;(0,eval)(t);}var Wse=N(()=>{"use strict";o(hx,"toFastProperties");});var Fg=N(()=>{"use strict";Use();Hse();Wse();});function $Be(t){return zBe(t)?t.LABEL:t.name;}function zBe(t){return bi(t.LABEL)&&t.LABEL!=="";}function Fk(t){return Je(t,$g);}function $g(t){function e(r){return Je(r,$g);}if(o(e,"convertDefinition"),t instanceof sn){let r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return bi(t.label)&&(r.label=t.label),r;}else{if(t instanceof _n)return{type:"Alternative",definition:e(t.definition)};if(t instanceof on)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Dn)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Ln)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:$g(new kr({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof bn)return{type:"RepetitionWithSeparator",idx:t.idx,separator:$g(new kr({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Or)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof Tn)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof kr){let r={type:"Terminal",name:t.terminalType.name,label:$Be(t.terminalType),idx:t.idx};bi(t.label)&&(r.terminalLabel=t.label);let n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=Go(n)?n.source:n),r;}else{if(t instanceof ss)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match");}}}var co,sn,ss,_n,on,Dn,Ln,Or,bn,Tn,kr,$k=N(()=>{"use strict";var _Class56,_Class57,_Class58,_Class59,_Class60,_Class61,_Class62,_Class63,_Class64,_Class65,_Class66;Yt();o($Be,"tokenLabel");o(zBe,"hasTokenLabel");co=(_Class56=class co{get definition(){return this._definition;}set definition(e){this._definition=e;}constructor(e){this._definition=e;}accept(e){e.visit(this),Ae(this.definition,r=>{r.accept(e);});}},o(_Class56,"AbstractProduction"),_Class56),sn=(_Class57=class sn extends co{constructor(e){super([]),this.idx=1,fa(this,Fs(e,r=>r!==void 0));}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[];}accept(e){e.visit(this);}},o(_Class57,"NonTerminal"),_Class57),ss=(_Class58=class ss extends co{constructor(e){super(e.definition),this.orgText="",fa(this,Fs(e,r=>r!==void 0));}},o(_Class58,"Rule"),_Class58),_n=(_Class59=class _n extends co{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,fa(this,Fs(e,r=>r!==void 0));}},o(_Class59,"Alternative"),_Class59),on=(_Class60=class on extends co{constructor(e){super(e.definition),this.idx=1,fa(this,Fs(e,r=>r!==void 0));}},o(_Class60,"Option"),_Class60),Dn=(_Class61=class Dn extends co{constructor(e){super(e.definition),this.idx=1,fa(this,Fs(e,r=>r!==void 0));}},o(_Class61,"RepetitionMandatory"),_Class61),Ln=(_Class62=class Ln extends co{constructor(e){super(e.definition),this.idx=1,fa(this,Fs(e,r=>r!==void 0));}},o(_Class62,"RepetitionMandatoryWithSeparator"),_Class62),Or=(_Class63=class Or extends co{constructor(e){super(e.definition),this.idx=1,fa(this,Fs(e,r=>r!==void 0));}},o(_Class63,"Repetition"),_Class63),bn=(_Class64=class bn extends co{constructor(e){super(e.definition),this.idx=1,fa(this,Fs(e,r=>r!==void 0));}},o(_Class64,"RepetitionWithSeparator"),_Class64),Tn=(_Class65=class Tn extends co{get definition(){return this._definition;}set definition(e){this._definition=e;}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,fa(this,Fs(e,r=>r!==void 0));}},o(_Class65,"Alternation"),_Class65),kr=(_Class66=class kr{constructor(e){this.idx=1,fa(this,Fs(e,r=>r!==void 0));}accept(e){e.visit(this);}},o(_Class66,"Terminal"),_Class66);o(Fk,"serializeGrammar");o($g,"serializeProduction");});var os,qse=N(()=>{"use strict";var _Class67;$k();os=(_Class67=class os{visit(e){let r=e;switch(r.constructor){case sn:return this.visitNonTerminal(r);case _n:return this.visitAlternative(r);case on:return this.visitOption(r);case Dn:return this.visitRepetitionMandatory(r);case Ln:return this.visitRepetitionMandatoryWithSeparator(r);case bn:return this.visitRepetitionWithSeparator(r);case Or:return this.visitRepetition(r);case Tn:return this.visitAlternation(r);case kr:return this.visitTerminal(r);case ss:return this.visitRule(r);default:throw Error("non exhaustive match");}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}},o(_Class67,"GAstVisitor"),_Class67);});function QN(t){return t instanceof _n||t instanceof on||t instanceof Or||t instanceof Dn||t instanceof Ln||t instanceof bn||t instanceof kr||t instanceof ss;}function fp(t,e=[]){return t instanceof on||t instanceof Or||t instanceof bn?!0:t instanceof Tn?P2(t.definition,n=>fp(n,e)):t instanceof sn&&qn(e,t)?!1:t instanceof co?(t instanceof sn&&e.push(t),Na(t.definition,n=>fp(n,e))):!1;}function ZN(t){return t instanceof Tn;}function zs(t){if(t instanceof sn)return"SUBRULE";if(t instanceof on)return"OPTION";if(t instanceof Tn)return"OR";if(t instanceof Dn)return"AT_LEAST_ONE";if(t instanceof Ln)return"AT_LEAST_ONE_SEP";if(t instanceof bn)return"MANY_SEP";if(t instanceof Or)return"MANY";if(t instanceof kr)return"CONSUME";throw Error("non exhaustive match");}var Yse=N(()=>{"use strict";Yt();$k();o(QN,"isSequenceProd");o(fp,"isOptionalProd");o(ZN,"isBranchingProd");o(zs,"getProductionDslName");});var ls=N(()=>{"use strict";$k();qse();Yse();});function Xse(t,e,r){return[new on({definition:[new kr({terminalType:t.separator})].concat(t.definition)})].concat(e,r);}var Bu,zk=N(()=>{"use strict";var _Class68;Yt();ls();Bu=(_Class68=class Bu{walk(e,r=[]){Ae(e.definition,(n,i)=>{let a=xi(e.definition,i+1);if(n instanceof sn)this.walkProdRef(n,a,r);else if(n instanceof kr)this.walkTerminal(n,a,r);else if(n instanceof _n)this.walkFlat(n,a,r);else if(n instanceof on)this.walkOption(n,a,r);else if(n instanceof Dn)this.walkAtLeastOne(n,a,r);else if(n instanceof Ln)this.walkAtLeastOneSep(n,a,r);else if(n instanceof bn)this.walkManySep(n,a,r);else if(n instanceof Or)this.walkMany(n,a,r);else if(n instanceof Tn)this.walkOr(n,a,r);else throw Error("non exhaustive match");});}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){let i=r.concat(n);this.walk(e,i);}walkOption(e,r,n){let i=r.concat(n);this.walk(e,i);}walkAtLeastOne(e,r,n){let i=[new on({definition:e.definition})].concat(r,n);this.walk(e,i);}walkAtLeastOneSep(e,r,n){let i=Xse(e,r,n);this.walk(e,i);}walkMany(e,r,n){let i=[new on({definition:e.definition})].concat(r,n);this.walk(e,i);}walkManySep(e,r,n){let i=Xse(e,r,n);this.walk(e,i);}walkOr(e,r,n){let i=r.concat(n);Ae(e.definition,a=>{let s=new _n({definition:[a]});this.walk(s,i);});}},o(_Class68,"RestWalker"),_Class68);o(Xse,"restForRepetitionWithSeparator");});function dp(t){if(t instanceof sn)return dp(t.referencedRule);if(t instanceof kr)return UBe(t);if(QN(t))return GBe(t);if(ZN(t))return VBe(t);throw Error("non exhaustive match");}function GBe(t){let e=[],r=t.definition,n=0,i=r.length>n,a,s=!0;for(;i&&s;)a=r[n],s=fp(a),e=e.concat(dp(a)),n=n+1,i=r.length>n;return zm(e);}function VBe(t){let e=Je(t.definition,r=>dp(r));return zm(Wr(e));}function UBe(t){return[t.terminalType];}var JN=N(()=>{"use strict";Yt();ls();o(dp,"first");o(GBe,"firstForSequence");o(VBe,"firstForBranching");o(UBe,"firstForTerminal");});var Gk,eM=N(()=>{"use strict";Gk="_~IN~_";});function jse(t){let e={};return Ae(t,r=>{let n=new tM(r).startWalking();fa(e,n);}),e;}function HBe(t,e){return t.name+e+Gk;}var tM,Kse=N(()=>{"use strict";var _Class69;zk();JN();Yt();eM();ls();tM=(_Class69=class tM extends Bu{constructor(e){super(),this.topProd=e,this.follows={};}startWalking(){return this.walk(this.topProd),this.follows;}walkTerminal(e,r,n){}walkProdRef(e,r,n){let i=HBe(e.referencedRule,e.idx)+this.topProd.name,a=r.concat(n),s=new _n({definition:a}),l=dp(s);this.follows[i]=l;}},o(_Class69,"ResyncFollowsWalker"),_Class69);o(jse,"computeAllProdsFollows");o(HBe,"buildBetweenProdsFollowPrefix");});function zg(t){let e=t.toString();if(Vk.hasOwnProperty(e))return Vk[e];{let r=WBe.pattern(e);return Vk[e]=r,r;}}function Qse(){Vk={};}var Vk,WBe,Uk=N(()=>{"use strict";ix();Vk={},WBe=new cp();o(zg,"getRegExpAst");o(Qse,"clearRegExpParserCache");});function eoe(t,e=!1){try{let r=zg(t);return rM(r.value,{},r.flags.ignoreCase);}catch(r){if(r.message===Jse)e&&cx(`${fx}	Unable to optimize: < ${t.toString()} >
	Complement Sets cannot be automatically optimized.
	This will disable the lexer's first char optimizations.
	See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";e&&(n=`
	This will disable the lexer's first char optimizations.
	See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Bg(`${fx}
	Failed parsing: < ${t.toString()} >
	Using the @chevrotain/regexp-to-ast library
	Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n);}}return[];}function rM(t,e,r){switch(t.type){case"Disjunction":for(let i=0;i<t.value.length;i++)rM(t.value[i],e,r);break;case"Alternative":let n=t.value;for(let i=0;i<n.length;i++){let a=n[i];switch(a.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue;}let s=a;switch(s.type){case"Character":Hk(s.value,e,r);break;case"Set":if(s.complement===!0)throw Error(Jse);Ae(s.value,u=>{if(typeof u=="number")Hk(u,e,r);else{let h=u;if(r===!0)for(let f=h.from;f<=h.to;f++)Hk(f,e,r);else{for(let f=h.from;f<=h.to&&f<Gg;f++)Hk(f,e,r);if(h.to>=Gg){let f=h.from>=Gg?h.from:Gg,d=h.to,p=Bc(f),m=Bc(d);for(let g=p;g<=m;g++)e[g]=g;}}}});break;case"Group":rM(s.value,e,r);break;default:throw Error("Non Exhaustive Match");}let l=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&nM(s)===!1||s.type!=="Group"&&l===!1)break;}break;default:throw Error("non exhaustive match!");}return br(e);}function Hk(t,e,r){let n=Bc(t);e[n]=n,r===!0&&qBe(t,e);}function qBe(t,e){let r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){let i=Bc(n.charCodeAt(0));e[i]=i;}else{let i=r.toLowerCase();if(i!==r){let a=Bc(i.charCodeAt(0));e[a]=a;}}}function Zse(t,e){return is(t.value,r=>{if(typeof r=="number")return qn(e,r);{let n=r;return is(e,i=>n.from<=i&&i<=n.to)!==void 0;}});}function nM(t){let e=t.quantifier;return e&&e.atLeast===0?!0:t.value?Pt(t.value)?Na(t.value,nM):nM(t.value):!1;}function Wk(t,e){if(e instanceof RegExp){let r=zg(e),n=new iM(t);return n.visit(r),n.found;}else return is(e,r=>qn(t,r.charCodeAt(0)))!==void 0;}var Jse,fx,iM,toe=N(()=>{"use strict";var _Class70;ix();Yt();Fg();Uk();aM();Jse="Complement Sets are not supported for first char optimization",fx=`Unable to use "first char" lexer optimizations:
`;o(eoe,"getOptimizedStartCodesIndices");o(rM,"firstCharOptimizedIndices");o(Hk,"addOptimizedIdxToResult");o(qBe,"handleIgnoreCase");o(Zse,"findCode");o(nM,"isWholeOptional");iM=(_Class70=class iM extends Pc{constructor(e){super(),this.targetCharCodes=e,this.found=!1;}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return;}super.visitChildren(e);}}visitCharacter(e){qn(this.targetCharCodes,e.value)&&(this.found=!0);}visitSet(e){e.complement?Zse(e,this.targetCharCodes)===void 0&&(this.found=!0):Zse(e,this.targetCharCodes)!==void 0&&(this.found=!0);}},o(_Class70,"CharCodeFinder"),_Class70);o(Wk,"canMatchCharCode");});function ioe(t,e){e=Jh(e,{useSticky:oM,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
`],tracer:o((b,T)=>T(),"tracer")});let r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{uFe();});let n;r("Reject Lexer.NA",()=>{n=tf(t,b=>b[pp]===Xn.NA);});let i=!1,a;r("Transform Patterns",()=>{i=!1,a=Je(n,b=>{let T=b[pp];if(Go(T)){let C=T.source;return C.length===1&&C!=="^"&&C!=="$"&&C!=="."&&!T.ignoreCase?C:C.length===2&&C[0]==="\\"&&!qn(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],C[1])?C[1]:e.useSticky?noe(T):roe(T);}else{if(Ci(T))return i=!0,{exec:T};if(typeof T=="object")return i=!0,T;if(typeof T=="string"){if(T.length===1)return T;{let C=T.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),w=new RegExp(C);return e.useSticky?noe(w):roe(w);}}else throw Error("non exhaustive match");}});});let s,l,u,h,f;r("misc mapping",()=>{s=Je(n,b=>b.tokenTypeIdx),l=Je(n,b=>{let T=b.GROUP;if(T!==Xn.SKIPPED){if(bi(T))return T;if(gr(T))return!1;throw Error("non exhaustive match");}}),u=Je(n,b=>{let T=b.LONGER_ALT;if(T)return Pt(T)?Je(T,w=>rk(n,w)):[rk(n,T)];}),h=Je(n,b=>b.PUSH_MODE),f=Je(n,b=>Bt(b,"POP_MODE"));});let d;r("Line Terminator Handling",()=>{let b=foe(e.lineTerminatorCharacters);d=Je(n,T=>!1),e.positionTracking!=="onlyOffset"&&(d=Je(n,T=>Bt(T,"LINE_BREAKS")?!!T.LINE_BREAKS:hoe(T,b)===!1&&Wk(b,T.PATTERN)));});let p,m,g,y;r("Misc Mapping #2",()=>{p=Je(n,coe),m=Je(a,lFe),g=Yr(n,(b,T)=>{let C=T.GROUP;return bi(C)&&C!==Xn.SKIPPED&&(b[C]=[]),b;},{}),y=Je(a,(b,T)=>({pattern:a[T],longerAlt:u[T],canLineTerminator:d[T],isCustom:p[T],short:m[T],group:l[T],push:h[T],pop:f[T],tokenTypeIdx:s[T],tokenType:n[T]}));});let v=!0,x=[];return e.safeMode||r("First Char Optimization",()=>{x=Yr(n,(b,T,C)=>{if(typeof T.PATTERN=="string"){let w=T.PATTERN.charCodeAt(0),E=Bc(w);sM(b,E,y[C]);}else if(Pt(T.START_CHARS_HINT)){let w;Ae(T.START_CHARS_HINT,E=>{let _=typeof E=="string"?E.charCodeAt(0):E,A=Bc(_);w!==A&&(w=A,sM(b,A,y[C]));});}else if(Go(T.PATTERN)){if(T.PATTERN.unicode)v=!1,e.ensureOptimizations&&Bg(`${fx}	Unable to analyze < ${T.PATTERN.toString()} > pattern.
	The regexp unicode flag is not currently supported by the regexp-to-ast library.
	This will disable the lexer's first char optimizations.
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let w=eoe(T.PATTERN,e.ensureOptimizations);fr(w)&&(v=!1),Ae(w,E=>{sM(b,E,y[C]);});}}else e.ensureOptimizations&&Bg(`${fx}	TokenType: <${T.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
	This will disable the lexer's first char optimizations.
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),v=!1;return b;},[]);}),{emptyGroups:g,patternIdxToConfig:y,charCodeToPatternIdxToConfig:x,hasCustom:i,canBeOptimized:v};}function aoe(t,e){let r=[],n=XBe(t);r=r.concat(n.errors);let i=jBe(n.valid),a=i.valid;return r=r.concat(i.errors),r=r.concat(YBe(a)),r=r.concat(nFe(a)),r=r.concat(iFe(a,e)),r=r.concat(aFe(a)),r;}function YBe(t){let e=[],r=qr(t,n=>Go(n[pp]));return e=e.concat(QBe(r)),e=e.concat(eFe(r)),e=e.concat(tFe(r)),e=e.concat(rFe(r)),e=e.concat(ZBe(r)),e;}function XBe(t){let e=qr(t,i=>!Bt(i,pp)),r=Je(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:Yn.MISSING_PATTERN,tokenTypes:[i]})),n=ef(t,e);return{errors:r,valid:n};}function jBe(t){let e=qr(t,i=>{let a=i[pp];return!Go(a)&&!Ci(a)&&!Bt(a,"exec")&&!bi(a);}),r=Je(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Yn.INVALID_PATTERN,tokenTypes:[i]})),n=ef(t,e);return{errors:r,valid:n};}function QBe(t){var _e2;class e extends Pc{constructor(){super(...arguments),this.found=!1;}visitEndAnchor(a){this.found=!0;}}_e2=e;o(_e2,"EndAnchorFinder");let r=qr(t,i=>{let a=i.PATTERN;try{let s=zg(a),l=new e();return l.visit(s),l.found;}catch{return KBe.test(a.source);}});return Je(r,i=>({message:`Unexpected RegExp Anchor Error:
	Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
	See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS	for details.`,type:Yn.EOI_ANCHOR_FOUND,tokenTypes:[i]}));}function ZBe(t){let e=qr(t,n=>n.PATTERN.test(""));return Je(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Yn.EMPTY_MATCH_PATTERN,tokenTypes:[n]}));}function eFe(t){var _e3;class e extends Pc{constructor(){super(...arguments),this.found=!1;}visitStartAnchor(a){this.found=!0;}}_e3=e;o(_e3,"StartAnchorFinder");let r=qr(t,i=>{let a=i.PATTERN;try{let s=zg(a),l=new e();return l.visit(s),l.found;}catch{return JBe.test(a.source);}});return Je(r,i=>({message:`Unexpected RegExp Anchor Error:
	Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
	See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS	for details.`,type:Yn.SOI_ANCHOR_FOUND,tokenTypes:[i]}));}function tFe(t){let e=qr(t,n=>{let i=n[pp];return i instanceof RegExp&&(i.multiline||i.global);});return Je(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Yn.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}));}function rFe(t){let e=[],r=Je(t,a=>Yr(t,(s,l)=>(a.PATTERN.source===l.PATTERN.source&&!qn(e,l)&&l.PATTERN!==Xn.NA&&(e.push(l),s.push(l)),s),[]));r=Sc(r);let n=qr(r,a=>a.length>1);return Je(n,a=>{let s=Je(a,u=>u.name);return{message:`The same RegExp pattern ->${ra(a).PATTERN}<-has been used in all of the following Token Types: ${s.join(", ")} <-`,type:Yn.DUPLICATE_PATTERNS_FOUND,tokenTypes:a};});}function nFe(t){let e=qr(t,n=>{if(!Bt(n,"GROUP"))return!1;let i=n.GROUP;return i!==Xn.SKIPPED&&i!==Xn.NA&&!bi(i);});return Je(e,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Yn.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}));}function iFe(t,e){let r=qr(t,i=>i.PUSH_MODE!==void 0&&!qn(e,i.PUSH_MODE));return Je(r,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:Yn.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}));}function aFe(t){let e=[],r=Yr(t,(n,i,a)=>{let s=i.PATTERN;return s===Xn.NA||(bi(s)?n.push({str:s,idx:a,tokenType:i}):Go(s)&&oFe(s)&&n.push({str:s.source,idx:a,tokenType:i})),n;},[]);return Ae(t,(n,i)=>{Ae(r,({str:a,idx:s,tokenType:l})=>{if(i<s&&sFe(a,n.PATTERN)){let u=`Token: ->${l.name}<- can never be matched.
Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:u,type:Yn.UNREACHABLE_PATTERN,tokenTypes:[n,l]});}});}),e;}function sFe(t,e){if(Go(e)){let r=e.exec(t);return r!==null&&r.index===0;}else{if(Ci(e))return e(t,0,[],{});if(Bt(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match");}}function oFe(t){return is([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0;}function roe(t){let e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e);}function noe(t){let e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e);}function soe(t,e,r){let n=[];return Bt(t,Vg)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Vg+`> property in its definition
`,type:Yn.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Bt(t,qk)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+qk+`> property in its definition
`,type:Yn.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Bt(t,qk)&&Bt(t,Vg)&&!Bt(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Vg}: <${t.defaultMode}>which does not exist
`,type:Yn.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Bt(t,qk)&&Ae(t.modes,(i,a)=>{Ae(i,(s,l)=>{if(gr(s))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${a}> at index: <${l}>
`,type:Yn.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(Bt(s,"LONGER_ALT")){let u=Pt(s.LONGER_ALT)?s.LONGER_ALT:[s.LONGER_ALT];Ae(u,h=>{!gr(h)&&!qn(i,h)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${h.name}> on token <${s.name}> outside of mode <${a}>
`,type:Yn.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE});});}});}),n;}function ooe(t,e,r){let n=[],i=!1,a=Sc(Wr(br(t.modes))),s=tf(a,u=>u[pp]===Xn.NA),l=foe(r);return e&&Ae(s,u=>{let h=hoe(u,l);if(h!==!1){let d={message:cFe(u,h),type:h.issue,tokenType:u};n.push(d);}else Bt(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(i=!0):Wk(l,u.PATTERN)&&(i=!0);}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found.
	This Lexer has been defined to track line and column information,
	But none of the Token Types can be identified as matching a line terminator.
	See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS 
	for details.`,type:Yn.NO_LINE_BREAKS_FLAGS}),n;}function loe(t){let e={},r=$r(t);return Ae(r,n=>{let i=t[n];if(Pt(i))e[n]=[];else throw Error("non exhaustive match");}),e;}function coe(t){let e=t.PATTERN;if(Go(e))return!1;if(Ci(e))return!0;if(Bt(e,"exec"))return!0;if(bi(e))return!1;throw Error("non exhaustive match");}function lFe(t){return bi(t)&&t.length===1?t.charCodeAt(0):!1;}function hoe(t,e){if(Bt(t,"LINE_BREAKS"))return!1;if(Go(t.PATTERN)){try{Wk(e,t.PATTERN);}catch(r){return{issue:Yn.IDENTIFY_TERMINATOR,errMsg:r.message};}return!1;}else{if(bi(t.PATTERN))return!1;if(coe(t))return{issue:Yn.CUSTOM_LINE_BREAK};throw Error("non exhaustive match");}}function cFe(t,e){if(e.issue===Yn.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
	The problem is in the <${t.name}> Token Type
	 Root cause: ${e.errMsg}.
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Yn.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
	The problem is in the <${t.name}> Token Type
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match");}function foe(t){return Je(t,r=>bi(r)?r.charCodeAt(0):r);}function sM(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r);}function Bc(t){return t<Gg?t:Yk[t];}function uFe(){if(fr(Yk)){Yk=new Array(65536);for(let t=0;t<65536;t++)Yk[t]=t>255?255+~~(t/255):t;}}var pp,Vg,qk,oM,KBe,JBe,uoe,Gg,Yk,aM=N(()=>{"use strict";ix();dx();Yt();Fg();toe();Uk();pp="PATTERN",Vg="defaultMode",qk="modes",oM=typeof new RegExp("(?:)").sticky=="boolean";o(ioe,"analyzeTokenTypes");o(aoe,"validatePatterns");o(YBe,"validateRegExpPattern");o(XBe,"findMissingPatterns");o(jBe,"findInvalidPatterns");KBe=/[^\\][$]/;o(QBe,"findEndOfInputAnchor");o(ZBe,"findEmptyMatchRegExps");JBe=/[^\\[][\^]|^\^/;o(eFe,"findStartOfInputAnchor");o(tFe,"findUnsupportedFlags");o(rFe,"findDuplicatePatterns");o(nFe,"findInvalidGroupType");o(iFe,"findModesThatDoNotExist");o(aFe,"findUnreachablePatterns");o(sFe,"testTokenType");o(oFe,"noMetaChar");o(roe,"addStartOfInput");o(noe,"addStickyFlag");o(soe,"performRuntimeChecks");o(ooe,"performWarningRuntimeChecks");o(loe,"cloneEmptyGroups");o(coe,"isCustomPattern");o(lFe,"isShortPattern");uoe={test:o(function(t){let e=t.length;for(let r=this.lastIndex;r<e;r++){let n=t.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return t.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0;}return!1;},"test"),lastIndex:0};o(hoe,"checkLineBreaksIssues");o(cFe,"buildLineBreakIssueMessage");o(foe,"getCharCodes");o(sM,"addToMapOfArrays");Gg=256,Yk=[];o(Bc,"charCodeToOptimizedIndex");o(uFe,"initCharCodeToOptimizedIndexMap");});function Fu(t,e){let r=t.tokenTypeIdx;return r===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[r]===!0;}function Ug(t,e){return t.tokenTypeIdx===e.tokenTypeIdx;}function $u(t){let e=hFe(t);fFe(e),pFe(e),dFe(e),Ae(e,r=>{r.isParent=r.categoryMatches.length>0;});}function hFe(t){let e=nn(t),r=t,n=!0;for(;n;){r=Sc(Wr(Je(r,a=>a.CATEGORIES)));let i=ef(r,e);e=e.concat(i),fr(i)?n=!1:r=i;}return e;}function fFe(t){Ae(t,e=>{lM(e)||(moe[doe]=e,e.tokenTypeIdx=doe++),poe(e)&&!Pt(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),poe(e)||(e.CATEGORIES=[]),mFe(e)||(e.categoryMatches=[]),gFe(e)||(e.categoryMatchesMap={});});}function dFe(t){Ae(t,e=>{e.categoryMatches=[],Ae(e.categoryMatchesMap,(r,n)=>{e.categoryMatches.push(moe[n].tokenTypeIdx);});});}function pFe(t){Ae(t,e=>{goe([],e);});}function goe(t,e){Ae(t,r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0;}),Ae(e.CATEGORIES,r=>{let n=t.concat(e);qn(n,r)||goe(n,r);});}function lM(t){return Bt(t,"tokenTypeIdx");}function poe(t){return Bt(t,"CATEGORIES");}function mFe(t){return Bt(t,"categoryMatches");}function gFe(t){return Bt(t,"categoryMatchesMap");}function yoe(t){return Bt(t,"tokenTypeIdx");}var doe,moe,mp=N(()=>{"use strict";Yt();o(Fu,"tokenStructuredMatcher");o(Ug,"tokenStructuredMatcherNoCategories");doe=1,moe={};o($u,"augmentTokenTypes");o(hFe,"expandCategories");o(fFe,"assignTokenDefaultProps");o(dFe,"assignCategoriesTokensProp");o(pFe,"assignCategoriesMapProp");o(goe,"singleAssignCategoriesToksMap");o(lM,"hasShortKeyProperty");o(poe,"hasCategoriesProperty");o(mFe,"hasExtendingTokensTypesProperty");o(gFe,"hasExtendingTokensTypesMapProperty");o(yoe,"isTokenType");});var Hg,cM=N(()=>{"use strict";Hg={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`;},buildUnexpectedCharactersMessage(t,e,r,n,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`;}};});var Yn,px,Xn,dx=N(()=>{"use strict";var _Class71;aM();Yt();Fg();mp();cM();Uk();(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE";})(Yn||(Yn={}));px={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Hg,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(px);Xn=(_Class71=class Xn{constructor(e,r=px){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,a)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=new Array(this.traceInitIndent+1).join("	");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${s}--> <${i}>`);let{time:l,value:u}=ux(a),h=l>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&h(`${s}<-- <${i}> time: ${l}ms`),this.traceInitIndent--,u;}else return a();},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
a boolean 2nd argument is no longer supported`);this.config=fa({},px,r);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,a=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===px.lineTerminatorsPattern)this.config.lineTerminatorsPattern=uoe;else if(this.config.lineTerminatorCharacters===px.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Pt(e)?i={modes:{defaultMode:nn(e)},defaultMode:Vg}:(a=!1,i=nn(e));}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(soe(i,this.trackStartLines,this.config.lineTerminatorCharacters));}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(ooe(i,this.trackStartLines,this.config.lineTerminatorCharacters));})),i.modes=i.modes?i.modes:{},Ae(i.modes,(l,u)=>{i.modes[u]=tf(l,h=>gr(h));});let s=$r(i.modes);if(Ae(i.modes,(l,u)=>{this.TRACE_INIT(`Mode: <${u}> processing`,()=>{if(this.modes.push(u),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(aoe(l,s));}),fr(this.lexerDefinitionErrors)){$u(l);let h;this.TRACE_INIT("analyzeTokenTypes",()=>{h=ioe(l,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT});}),this.patternIdxToConfig[u]=h.patternIdxToConfig,this.charCodeToPatternIdxToConfig[u]=h.charCodeToPatternIdxToConfig,this.emptyGroups=fa({},this.emptyGroups,h.emptyGroups),this.hasCustom=h.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=h.canBeOptimized;}});}),this.defaultMode=i.defaultMode,!fr(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let u=Je(this.lexerDefinitionErrors,h=>h.message).join(`-----------------------
`);throw new Error(`Errors detected in definition of Lexer:
`+u);}Ae(this.lexerDefinitionWarning,l=>{cx(l.message);}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(oM?(this.chopInput=Ji,this.match=this.matchWithTest):(this.updateLastIndex=ai,this.match=this.matchWithExec),a&&(this.handleModes=ai),this.trackStartLines===!1&&(this.computeNewColumn=Ji),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=ai),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom);}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let l=Yr(this.canModeBeOptimized,(u,h,f)=>(h===!1&&u.push(f),u),[]);if(r.ensureOptimizations&&!fr(l))throw Error(`Lexer Modes: < ${l.join(", ")} > cannot be optimized.
	 Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
	 Or inspect the console log for details on how to resolve these issues.`);}),this.TRACE_INIT("clearRegExpParserCache",()=>{Qse();}),this.TRACE_INIT("toFastProperties",()=>{hx(this);});});}tokenize(e,r=this.defaultMode){if(!fr(this.lexerDefinitionErrors)){let i=Je(this.lexerDefinitionErrors,a=>a.message).join(`-----------------------
`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
`+i);}return this.tokenizeInternal(e,r);}tokenizeInternal(e,r){let n,i,a,s,l,u,h,f,d,p,m,g,y,v,x,b,T=e,C=T.length,w=0,E=0,_=this.hasCustom?0:Math.floor(e.length/10),A=new Array(_),D=[],O=this.trackStartLines?1:void 0,R=this.trackStartLines?1:void 0,k=loe(this.emptyGroups),L=this.trackStartLines,S=this.config.lineTerminatorsPattern,I=0,M=[],P=[],B=[],F=[];Object.freeze(F);let z;function $(){return M;}o($,"getPossiblePatternsSlow");function U(Z){let ue=Bc(Z),Q=P[ue];return Q===void 0?F:Q;}o(U,"getPossiblePatternsOptimized");let K=o(Z=>{if(B.length===1&&Z.tokenType.PUSH_MODE===void 0){let ue=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(Z);D.push({offset:Z.startOffset,line:Z.startLine,column:Z.startColumn,length:Z.image.length,message:ue});}else{B.pop();let ue=da(B);M=this.patternIdxToConfig[ue],P=this.charCodeToPatternIdxToConfig[ue],I=M.length;let Q=this.canModeBeOptimized[ue]&&this.config.safeMode===!1;P&&Q?z=U:z=$;}},"pop_mode");function ee(Z){B.push(Z),P=this.charCodeToPatternIdxToConfig[Z],M=this.patternIdxToConfig[Z],I=M.length,I=M.length;let ue=this.canModeBeOptimized[Z]&&this.config.safeMode===!1;P&&ue?z=U:z=$;}o(ee,"push_mode"),ee.call(this,r);let Y,ce=this.config.recoveryEnabled;for(;w<C;){u=null;let Z=T.charCodeAt(w),ue=z(Z),Q=ue.length;for(n=0;n<Q;n++){Y=ue[n];let j=Y.pattern;h=null;let ne=Y.short;if(ne!==!1?Z===ne&&(u=j):Y.isCustom===!0?(b=j.exec(T,w,A,k),b!==null?(u=b[0],b.payload!==void 0&&(h=b.payload)):u=null):(this.updateLastIndex(j,w),u=this.match(j,e,w)),u!==null){if(l=Y.longerAlt,l!==void 0){let te=l.length;for(a=0;a<te;a++){let he=M[l[a]],le=he.pattern;if(f=null,he.isCustom===!0?(b=le.exec(T,w,A,k),b!==null?(s=b[0],b.payload!==void 0&&(f=b.payload)):s=null):(this.updateLastIndex(le,w),s=this.match(le,e,w)),s&&s.length>u.length){u=s,h=f,Y=he;break;}}}break;}}if(u!==null){if(d=u.length,p=Y.group,p!==void 0&&(m=Y.tokenTypeIdx,g=this.createTokenInstance(u,w,m,Y.tokenType,O,R,d),this.handlePayload(g,h),p===!1?E=this.addToken(A,E,g):k[p].push(g)),e=this.chopInput(e,d),w=w+d,R=this.computeNewColumn(R,d),L===!0&&Y.canLineTerminator===!0){let j=0,ne,te;S.lastIndex=0;do ne=S.test(u),ne===!0&&(te=S.lastIndex-1,j++);while(ne===!0);j!==0&&(O=O+j,R=d-te,this.updateTokenEndLineColumnLocation(g,p,te,j,O,R,d));}this.handleModes(Y,K,ee,g);}else{let j=w,ne=O,te=R,he=ce===!1;for(;he===!1&&w<C;)for(e=this.chopInput(e,1),w++,i=0;i<I;i++){let le=M[i],J=le.pattern,Se=le.short;if(Se!==!1?T.charCodeAt(w)===Se&&(he=!0):le.isCustom===!0?he=J.exec(T,w,A,k)!==null:(this.updateLastIndex(J,w),he=J.exec(e)!==null),he===!0)break;}if(y=w-j,R=this.computeNewColumn(R,y),x=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(T,j,y,ne,te),D.push({offset:j,line:ne,column:te,length:y,message:x}),ce===!1)break;}}return this.hasCustom||(A.length=E),{tokens:A,groups:k,errors:D};}handleModes(e,r,n,i){if(e.pop===!0){let a=e.push;r(i),a!==void 0&&n.call(this,a);}else e.push!==void 0&&n.call(this,e.push);}chopInput(e,r){return e.substring(r);}updateLastIndex(e,r){e.lastIndex=r;}updateTokenEndLineColumnLocation(e,r,n,i,a,s,l){let u,h;r!==void 0&&(u=n===l-1,h=u?-1:0,i===1&&u===!0||(e.endLine=a+h,e.endColumn=s-1+-h));}computeNewColumn(e,r){return e+r;}createOffsetOnlyToken(e,r,n,i){return{image:e,startOffset:r,tokenTypeIdx:n,tokenType:i};}createStartOnlyToken(e,r,n,i,a,s){return{image:e,startOffset:r,startLine:a,startColumn:s,tokenTypeIdx:n,tokenType:i};}createFullToken(e,r,n,i,a,s,l){return{image:e,startOffset:r,endOffset:r+l-1,startLine:a,endLine:a,startColumn:s,endColumn:s+l-1,tokenTypeIdx:n,tokenType:i};}addTokenUsingPush(e,r,n){return e.push(n),r;}addTokenUsingMemberAccess(e,r,n){return e[r]=n,r++,r;}handlePayloadNoCustom(e,r){}handlePayloadWithCustom(e,r){r!==null&&(e.payload=r);}matchWithTest(e,r,n){return e.test(r)===!0?r.substring(n,e.lastIndex):null;}matchWithExec(e,r){let n=e.exec(r);return n!==null?n[0]:null;}},o(_Class71,"Lexer"),_Class71);Xn.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";Xn.NA=/NOT_APPLICABLE/;});function zu(t){return uM(t)?t.LABEL:t.name;}function uM(t){return bi(t.LABEL)&&t.LABEL!=="";}function cf(t){return vFe(t);}function vFe(t){let e=t.pattern,r={};if(r.name=t.name,gr(e)||(r.PATTERN=e),Bt(t,yFe))throw`The parent property is no longer supported.
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Bt(t,voe)&&(r.CATEGORIES=t[voe]),$u([r]),Bt(t,xoe)&&(r.LABEL=t[xoe]),Bt(t,boe)&&(r.GROUP=t[boe]),Bt(t,woe)&&(r.POP_MODE=t[woe]),Bt(t,Toe)&&(r.PUSH_MODE=t[Toe]),Bt(t,koe)&&(r.LONGER_ALT=t[koe]),Bt(t,Eoe)&&(r.LINE_BREAKS=t[Eoe]),Bt(t,Soe)&&(r.START_CHARS_HINT=t[Soe]),r;}function Gu(t,e,r,n,i,a,s,l){return{image:e,startOffset:r,endOffset:n,startLine:i,endLine:a,startColumn:s,endColumn:l,tokenTypeIdx:t.tokenTypeIdx,tokenType:t};}function mx(t,e){return Fu(t,e);}var yFe,voe,xoe,boe,Toe,woe,koe,Eoe,Soe,uo,gp=N(()=>{"use strict";Yt();dx();mp();o(zu,"tokenLabel");o(uM,"hasTokenLabel");yFe="parent",voe="categories",xoe="label",boe="group",Toe="push_mode",woe="pop_mode",koe="longer_alt",Eoe="line_breaks",Soe="start_chars_hint";o(cf,"createToken");o(vFe,"createTokenInternal");uo=cf({name:"EOF",pattern:Xn.NA});$u([uo]);o(Gu,"createTokenInstance");o(mx,"tokenMatcher");});var Vu,Coe,Bl,Wg=N(()=>{"use strict";gp();Yt();ls();Vu={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${uM(t)?`--> ${zu(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`;},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image;},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:i}){let a="Expecting: ",l=`
but found: '`+ra(e).image+"'";if(n)return a+n+l;{let u=Yr(t,(p,m)=>p.concat(m),[]),h=Je(u,p=>`[${Je(p,m=>zu(m)).join(", ")}]`),d=`one of these possible Token sequences:
${Je(h,(p,m)=>`  ${m+1}. ${p}`).join(`
`)}`;return a+d+l;}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){let i="Expecting: ",s=`
but found: '`+ra(e).image+"'";if(r)return i+r+s;{let u=`expecting at least one iteration which starts with one of these possible Token sequences::
  <${Je(t,h=>`[${Je(h,f=>zu(f)).join(",")}]`).join(" ,")}>`;return i+u+s;}}};Object.freeze(Vu);Coe={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
inside top level rule: ->`+t.name+"<-";}},Bl={buildDuplicateFoundError(t,e){function r(f){return f instanceof kr?f.terminalType.name:f instanceof sn?f.nonTerminalName:"";}o(r,"getExtraProductionArgument");let n=t.name,i=ra(e),a=i.idx,s=zs(i),l=r(i),u=a>0,h=`->${s}${u?a:""}<- ${l?`with argument: ->${l}<-`:""}
                  appears more than once (${e.length} times) in the top level rule: ->${n}<-.                  
                  For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES 
                  `;return h=h.replace(/[ \t]+/g," "),h=h.replace(/\s\s+/g,`
`),h;},buildNamespaceConflictError(t){return`Namespace conflict found in grammar.
The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.
To resolve this make sure each Terminal and Non-Terminal names are unique
This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
and Non-Terminal names start with a lower case letter.`;},buildAlternationPrefixAmbiguityError(t){let e=Je(t.prefixPath,i=>zu(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix
in <OR${r}> inside <${t.topLevelRule.name}> Rule,
<${e}> may appears as a prefix path in all these alternatives.
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
For Further details.`;},buildAlternationAmbiguityError(t){let e=Je(t.prefixPath,i=>zu(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${t.topLevelRule.name}> Rule,
<${e}> may appears as a prefix path in all these alternatives.
`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
For Further details.`,n;},buildEmptyRepetitionError(t){let e=zs(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.
This could lead to an infinite loop.`;},buildTokenNameError(t){return"deprecated";},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
Only the last alternative may be an empty alternative.`;},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives:
<OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
 has ${t.alternation.definition.length+1} alternatives.`;},buildLeftRecursionError(t){let e=t.topLevelRule.name,r=Je(t.leftRecursionPath,a=>a.name),n=`${e} --> ${r.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar.
rule: <${e}> can be invoked from itself (directly or indirectly)
without consuming any Tokens. The grammar path that causes this is: 
 ${n}
 To fix this refactor your grammar to remove the left recursion.
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`;},buildInvalidRuleNameError(t){return"deprecated";},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof ss?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`;}};});function Aoe(t,e){let r=new hM(t,e);return r.resolveRefs(),r.errors;}var hM,_oe=N(()=>{"use strict";var _Class72;Gs();Yt();ls();o(Aoe,"resolveGrammar");hM=(_Class72=class hM extends os{constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[];}resolveRefs(){Ae(br(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this);});}visitNonTerminal(e){let r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:zi.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName});}}},o(_Class72,"GastRefResolverVisitor"),_Class72);});function Qk(t,e,r=[]){r=nn(r);let n=[],i=0;function a(l){return l.concat(xi(t,i+1));}o(a,"remainingPathWith");function s(l){let u=Qk(a(l),e,r);return n.concat(u);}for(o(s,"getAlternativesForProd");r.length<e&&i<t.length;){let l=t[i];if(l instanceof _n)return s(l.definition);if(l instanceof sn)return s(l.definition);if(l instanceof on)n=s(l.definition);else if(l instanceof Dn){let u=l.definition.concat([new Or({definition:l.definition})]);return s(u);}else if(l instanceof Ln){let u=[new _n({definition:l.definition}),new Or({definition:[new kr({terminalType:l.separator})].concat(l.definition)})];return s(u);}else if(l instanceof bn){let u=l.definition.concat([new Or({definition:[new kr({terminalType:l.separator})].concat(l.definition)})]);n=s(u);}else if(l instanceof Or){let u=l.definition.concat([new Or({definition:l.definition})]);n=s(u);}else{if(l instanceof Tn)return Ae(l.definition,u=>{fr(u.definition)===!1&&(n=s(u.definition));}),n;if(l instanceof kr)r.push(l.terminalType);else throw Error("non exhaustive match");}i++;}return n.push({partialPath:r,suffixDef:xi(t,i)}),n;}function Zk(t,e,r,n){let i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE",l=!1,u=e.length,h=u-n-1,f=[],d=[];for(d.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!fr(d);){let p=d.pop();if(p===s){l&&da(d).idx<=h&&d.pop();continue;}let m=p.def,g=p.idx,y=p.ruleStack,v=p.occurrenceStack;if(fr(m))continue;let x=m[0];if(x===i){let b={idx:g,def:xi(m),ruleStack:Iu(y),occurrenceStack:Iu(v)};d.push(b);}else if(x instanceof kr){if(g<u-1){let b=g+1,T=e[b];if(r(T,x.terminalType)){let C={idx:b,def:xi(m),ruleStack:y,occurrenceStack:v};d.push(C);}}else if(g===u-1)f.push({nextTokenType:x.terminalType,nextTokenOccurrence:x.idx,ruleStack:y,occurrenceStack:v}),l=!0;else throw Error("non exhaustive match");}else if(x instanceof sn){let b=nn(y);b.push(x.nonTerminalName);let T=nn(v);T.push(x.idx);let C={idx:g,def:x.definition.concat(a,xi(m)),ruleStack:b,occurrenceStack:T};d.push(C);}else if(x instanceof on){let b={idx:g,def:xi(m),ruleStack:y,occurrenceStack:v};d.push(b),d.push(s);let T={idx:g,def:x.definition.concat(xi(m)),ruleStack:y,occurrenceStack:v};d.push(T);}else if(x instanceof Dn){let b=new Or({definition:x.definition,idx:x.idx}),T=x.definition.concat([b],xi(m)),C={idx:g,def:T,ruleStack:y,occurrenceStack:v};d.push(C);}else if(x instanceof Ln){let b=new kr({terminalType:x.separator}),T=new Or({definition:[b].concat(x.definition),idx:x.idx}),C=x.definition.concat([T],xi(m)),w={idx:g,def:C,ruleStack:y,occurrenceStack:v};d.push(w);}else if(x instanceof bn){let b={idx:g,def:xi(m),ruleStack:y,occurrenceStack:v};d.push(b),d.push(s);let T=new kr({terminalType:x.separator}),C=new Or({definition:[T].concat(x.definition),idx:x.idx}),w=x.definition.concat([C],xi(m)),E={idx:g,def:w,ruleStack:y,occurrenceStack:v};d.push(E);}else if(x instanceof Or){let b={idx:g,def:xi(m),ruleStack:y,occurrenceStack:v};d.push(b),d.push(s);let T=new Or({definition:x.definition,idx:x.idx}),C=x.definition.concat([T],xi(m)),w={idx:g,def:C,ruleStack:y,occurrenceStack:v};d.push(w);}else if(x instanceof Tn)for(let b=x.definition.length-1;b>=0;b--){let T=x.definition[b],C={idx:g,def:T.definition.concat(xi(m)),ruleStack:y,occurrenceStack:v};d.push(C),d.push(s);}else if(x instanceof _n)d.push({idx:g,def:x.definition.concat(xi(m)),ruleStack:y,occurrenceStack:v});else if(x instanceof ss)d.push(xFe(x,g,y,v));else throw Error("non exhaustive match");}return f;}function xFe(t,e,r,n){let i=nn(r);i.push(t.name);let a=nn(n);return a.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:a};}var fM,Xk,qg,jk,gx,Kk,yx,vx=N(()=>{"use strict";var _Class73,_Class74,_Class75,_Class76,_Class77,_Class78,_Class79;Yt();JN();zk();ls();fM=(_Class73=class fM extends Bu{constructor(e,r){super(),this.topProd=e,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1;}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=nn(this.path.ruleStack).reverse(),this.occurrenceStack=nn(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes;}walk(e,r=[]){this.found||super.walk(e,r);}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,i);}}updateExpectedNext(){fr(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop());}},o(_Class73,"AbstractNextPossibleTokensWalker"),_Class73),Xk=(_Class74=class Xk extends fM{constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence;}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),a=new _n({definition:i});this.possibleTokTypes=dp(a),this.found=!0;}}},o(_Class74,"NextAfterTokenWalker"),_Class74),qg=(_Class75=class qg extends Bu{constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0};}startWalking(){return this.walk(this.topRule),this.result;}},o(_Class75,"AbstractNextTerminalAfterProductionWalker"),_Class75),jk=(_Class76=class jk extends qg{walkMany(e,r,n){if(e.idx===this.occurrence){let i=ra(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof kr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx);}else super.walkMany(e,r,n);}},o(_Class76,"NextTerminalAfterManyWalker"),_Class76),gx=(_Class77=class gx extends qg{walkManySep(e,r,n){if(e.idx===this.occurrence){let i=ra(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof kr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx);}else super.walkManySep(e,r,n);}},o(_Class77,"NextTerminalAfterManySepWalker"),_Class77),Kk=(_Class78=class Kk extends qg{walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){let i=ra(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof kr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx);}else super.walkAtLeastOne(e,r,n);}},o(_Class78,"NextTerminalAfterAtLeastOneWalker"),_Class78),yx=(_Class79=class yx extends qg{walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){let i=ra(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof kr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx);}else super.walkAtLeastOneSep(e,r,n);}},o(_Class79,"NextTerminalAfterAtLeastOneSepWalker"),_Class79);o(Qk,"possiblePathsFrom");o(Zk,"nextPossibleTokensAfter");o(xFe,"expandTopLevelRule");});function xx(t){if(t instanceof on||t==="Option")return jn.OPTION;if(t instanceof Or||t==="Repetition")return jn.REPETITION;if(t instanceof Dn||t==="RepetitionMandatory")return jn.REPETITION_MANDATORY;if(t instanceof Ln||t==="RepetitionMandatoryWithSeparator")return jn.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof bn||t==="RepetitionWithSeparator")return jn.REPETITION_WITH_SEPARATOR;if(t instanceof Tn||t==="Alternation")return jn.ALTERNATION;throw Error("non exhaustive match");}function eE(t){let{occurrence:e,rule:r,prodType:n,maxLookahead:i}=t,a=xx(n);return a===jn.ALTERNATION?Yg(e,r,i):Xg(e,r,a,i);}function Loe(t,e,r,n,i,a){let s=Yg(t,e,r),l=Poe(s)?Ug:Fu;return a(s,n,l,i);}function Roe(t,e,r,n,i,a){let s=Xg(t,e,i,r),l=Poe(s)?Ug:Fu;return a(s[0],l,n);}function Noe(t,e,r,n){let i=t.length,a=Na(t,s=>Na(s,l=>l.length===1));if(e)return function(s){let l=Je(s,u=>u.GATE);for(let u=0;u<i;u++){let h=t[u],f=h.length,d=l[u];if(!(d!==void 0&&d.call(this)===!1))e:for(let p=0;p<f;p++){let m=h[p],g=m.length;for(let y=0;y<g;y++){let v=this.LA(y+1);if(r(v,m[y])===!1)continue e;}return u;}}};if(a&&!n){let s=Je(t,u=>Wr(u)),l=Yr(s,(u,h,f)=>(Ae(h,d=>{Bt(u,d.tokenTypeIdx)||(u[d.tokenTypeIdx]=f),Ae(d.categoryMatches,p=>{Bt(u,p)||(u[p]=f);});}),u),{});return function(){let u=this.LA(1);return l[u.tokenTypeIdx];};}else return function(){for(let s=0;s<i;s++){let l=t[s],u=l.length;e:for(let h=0;h<u;h++){let f=l[h],d=f.length;for(let p=0;p<d;p++){let m=this.LA(p+1);if(r(m,f[p])===!1)continue e;}return s;}}};}function Moe(t,e,r){let n=Na(t,a=>a.length===1),i=t.length;if(n&&!r){let a=Wr(t);if(a.length===1&&fr(a[0].categoryMatches)){let l=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===l;};}else{let s=Yr(a,(l,u,h)=>(l[u.tokenTypeIdx]=!0,Ae(u.categoryMatches,f=>{l[f]=!0;}),l),[]);return function(){let l=this.LA(1);return s[l.tokenTypeIdx]===!0;};}}else return function(){e:for(let a=0;a<i;a++){let s=t[a],l=s.length;for(let u=0;u<l;u++){let h=this.LA(u+1);if(e(h,s[u])===!1)continue e;}return!0;}return!1;};}function Doe(t){let e=new Array(t);for(let r=0;r<t;r++)e[r]=[];return e;}function dM(t){let e=[""];for(let r=0;r<t.length;r++){let n=t[r],i=[];for(let a=0;a<e.length;a++){let s=e[a];i.push(s+"_"+n.tokenTypeIdx);for(let l=0;l<n.categoryMatches.length;l++){let u="_"+n.categoryMatches[l];i.push(s+u);}}e=i;}return e;}function bFe(t,e,r){for(let n=0;n<t.length;n++){if(n===r)continue;let i=t[n];for(let a=0;a<e.length;a++){let s=e[a];if(i[s]===!0)return!1;}}return!0;}function Ioe(t,e){let r=Je(t,s=>Qk([s],1)),n=Doe(r.length),i=Je(r,s=>{let l={};return Ae(s,u=>{let h=dM(u.partialPath);Ae(h,f=>{l[f]=!0;});}),l;}),a=r;for(let s=1;s<=e;s++){let l=a;a=Doe(l.length);for(let u=0;u<l.length;u++){let h=l[u];for(let f=0;f<h.length;f++){let d=h[f].partialPath,p=h[f].suffixDef,m=dM(d);if(bFe(i,m,u)||fr(p)||d.length===e){let y=n[u];if(tE(y,d)===!1){y.push(d);for(let v=0;v<m.length;v++){let x=m[v];i[u][x]=!0;}}}else{let y=Qk(p,s+1,d);a[u]=a[u].concat(y),Ae(y,v=>{let x=dM(v.partialPath);Ae(x,b=>{i[u][b]=!0;});});}}}}return n;}function Yg(t,e,r,n){let i=new Jk(t,jn.ALTERNATION,n);return e.accept(i),Ioe(i.result,r);}function Xg(t,e,r,n){let i=new Jk(t,r);e.accept(i);let a=i.result,l=new pM(e,t,r).startWalking(),u=new _n({definition:a}),h=new _n({definition:l});return Ioe([u,h],n);}function tE(t,e){e:for(let r=0;r<t.length;r++){let n=t[r];if(n.length===e.length){for(let i=0;i<n.length;i++){let a=e[i],s=n[i];if((a===s||s.categoryMatchesMap[a.tokenTypeIdx]!==void 0)===!1)continue e;}return!0;}}return!1;}function Ooe(t,e){return t.length<e.length&&Na(t,(r,n)=>{let i=e[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx];});}function Poe(t){return Na(t,e=>Na(e,r=>Na(r,n=>fr(n.categoryMatches))));}var jn,pM,Jk,jg=N(()=>{"use strict";var _Class80,_Class81;Yt();vx();zk();mp();ls();(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION";})(jn||(jn={}));o(xx,"getProdType");o(eE,"getLookaheadPaths");o(Loe,"buildLookaheadFuncForOr");o(Roe,"buildLookaheadFuncForOptionalProd");o(Noe,"buildAlternativesLookAheadFunc");o(Moe,"buildSingleAlternativeLookaheadFunction");pM=(_Class80=class pM extends Bu{constructor(e,r,n){super(),this.topProd=e,this.targetOccurrence=r,this.targetProdType=n;}startWalking(){return this.walk(this.topProd),this.restDef;}checkIsTarget(e,r,n,i){return e.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1;}walkOption(e,r,n){this.checkIsTarget(e,jn.OPTION,r,n)||super.walkOption(e,r,n);}walkAtLeastOne(e,r,n){this.checkIsTarget(e,jn.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n);}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,jn.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n);}walkMany(e,r,n){this.checkIsTarget(e,jn.REPETITION,r,n)||super.walkOption(e,r,n);}walkManySep(e,r,n){this.checkIsTarget(e,jn.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n);}},o(_Class80,"RestDefinitionFinderWalker"),_Class80),Jk=(_Class81=class Jk extends os{constructor(e,r,n){super(),this.targetOccurrence=e,this.targetProdType=r,this.targetRef=n,this.result=[];}checkIsTarget(e,r){e.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition);}visitOption(e){this.checkIsTarget(e,jn.OPTION);}visitRepetition(e){this.checkIsTarget(e,jn.REPETITION);}visitRepetitionMandatory(e){this.checkIsTarget(e,jn.REPETITION_MANDATORY);}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,jn.REPETITION_MANDATORY_WITH_SEPARATOR);}visitRepetitionWithSeparator(e){this.checkIsTarget(e,jn.REPETITION_WITH_SEPARATOR);}visitAlternation(e){this.checkIsTarget(e,jn.ALTERNATION);}},o(_Class81,"InsideDefinitionFinderVisitor"),_Class81);o(Doe,"initializeArrayOfArrays");o(dM,"pathToHashKeys");o(bFe,"isUniquePrefixHash");o(Ioe,"lookAheadSequenceFromAlternatives");o(Yg,"getLookaheadPathsForOr");o(Xg,"getLookaheadPathsForOptionalProd");o(tE,"containsPath");o(Ooe,"isStrictPrefixOfPath");o(Poe,"areTokenCategoriesNotUsed");});function Boe(t){let e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return Je(e,r=>Object.assign({type:zi.CUSTOM_LOOKAHEAD_VALIDATION},r));}function Foe(t,e,r,n){let i=pa(t,u=>TFe(u,r)),a=AFe(t,e,r),s=pa(t,u=>EFe(u,r)),l=pa(t,u=>kFe(u,t,n,r));return i.concat(a,s,l);}function TFe(t,e){let r=new mM();t.accept(r);let n=r.allProductions,i=pR(n,wFe),a=Fs(i,l=>l.length>1);return Je(br(a),l=>{let u=ra(l),h=e.buildDuplicateFoundError(t,l),f=zs(u),d={message:h,type:zi.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:f,occurrence:u.idx},p=$oe(u);return p&&(d.parameter=p),d;});}function wFe(t){return`${zs(t)}_#_${t.idx}_#_${$oe(t)}`;}function $oe(t){return t instanceof kr?t.terminalType.name:t instanceof sn?t.nonTerminalName:"";}function kFe(t,e,r,n){let i=[];if(Yr(e,(s,l)=>l.name===t.name?s+1:s,0)>1){let s=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});i.push({message:s,type:zi.DUPLICATE_RULE_NAME,ruleName:t.name});}return i;}function zoe(t,e,r){let n=[],i;return qn(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:zi.INVALID_RULE_OVERRIDE,ruleName:t})),n;}function yM(t,e,r,n=[]){let i=[],a=rE(e.definition);if(fr(a))return[];{let s=t.name;qn(a,t)&&i.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:zi.LEFT_RECURSION,ruleName:s});let u=ef(a,n.concat([t])),h=pa(u,f=>{let d=nn(n);return d.push(f),yM(t,f,r,d);});return i.concat(h);}}function rE(t){let e=[];if(fr(t))return e;let r=ra(t);if(r instanceof sn)e.push(r.referencedRule);else if(r instanceof _n||r instanceof on||r instanceof Dn||r instanceof Ln||r instanceof bn||r instanceof Or)e=e.concat(rE(r.definition));else if(r instanceof Tn)e=Wr(Je(r.definition,a=>rE(a.definition)));else if(!(r instanceof kr))throw Error("non exhaustive match");let n=fp(r),i=t.length>1;if(n&&i){let a=xi(t);return e.concat(rE(a));}else return e;}function Goe(t,e){let r=new bx();t.accept(r);let n=r.alternations;return pa(n,a=>{let s=Iu(a.definition);return pa(s,(l,u)=>{let h=Zk([l],[],Fu,1);return fr(h)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:a,emptyChoiceIdx:u}),type:zi.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:a.idx,alternative:u+1}]:[];});});}function Voe(t,e,r){let n=new bx();t.accept(n);let i=n.alternations;return i=tf(i,s=>s.ignoreAmbiguities===!0),pa(i,s=>{let l=s.idx,u=s.maxLookahead||e,h=Yg(l,t,u,s),f=SFe(h,s,t,r),d=CFe(h,s,t,r);return f.concat(d);});}function EFe(t,e){let r=new bx();t.accept(r);let n=r.alternations;return pa(n,a=>a.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:a}),type:zi.TOO_MANY_ALTS,ruleName:t.name,occurrence:a.idx}]:[]);}function Uoe(t,e,r){let n=[];return Ae(t,i=>{let a=new gM();i.accept(a);let s=a.allProductions;Ae(s,l=>{let u=xx(l),h=l.maxLookahead||e,f=l.idx,p=Xg(f,i,u,h)[0];if(fr(Wr(p))){let m=r.buildEmptyRepetitionError({topLevelRule:i,repetition:l});n.push({message:m,type:zi.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name});}});}),n;}function SFe(t,e,r,n){let i=[],a=Yr(t,(l,u,h)=>(e.definition[h].ignoreAmbiguities===!0||Ae(u,f=>{let d=[h];Ae(t,(p,m)=>{h!==m&&tE(p,f)&&e.definition[m].ignoreAmbiguities!==!0&&d.push(m);}),d.length>1&&!tE(i,f)&&(i.push(f),l.push({alts:d,path:f}));}),l),[]);return Je(a,l=>{let u=Je(l.alts,f=>f+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:u,prefixPath:l.path}),type:zi.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:l.alts};});}function CFe(t,e,r,n){let i=Yr(t,(s,l,u)=>{let h=Je(l,f=>({idx:u,path:f}));return s.concat(h);},[]);return Sc(pa(i,s=>{if(e.definition[s.idx].ignoreAmbiguities===!0)return[];let u=s.idx,h=s.path,f=qr(i,p=>e.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<u&&Ooe(p.path,h));return Je(f,p=>{let m=[p.idx+1,u+1],g=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:m,prefixPath:p.path}),type:zi.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:m};});}));}function AFe(t,e,r){let n=[],i=Je(e,a=>a.name);return Ae(t,a=>{let s=a.name;if(qn(i,s)){let l=r.buildNamespaceConflictError(a);n.push({message:l,type:zi.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s});}}),n;}var mM,bx,gM,Tx=N(()=>{"use strict";var _Class82,_Class83,_Class84;Yt();Gs();ls();jg();vx();mp();o(Boe,"validateLookahead");o(Foe,"validateGrammar");o(TFe,"validateDuplicateProductions");o(wFe,"identifyProductionForDuplicates");o($oe,"getExtraProductionArgument");mM=(_Class82=class mM extends os{constructor(){super(...arguments),this.allProductions=[];}visitNonTerminal(e){this.allProductions.push(e);}visitOption(e){this.allProductions.push(e);}visitRepetitionWithSeparator(e){this.allProductions.push(e);}visitRepetitionMandatory(e){this.allProductions.push(e);}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e);}visitRepetition(e){this.allProductions.push(e);}visitAlternation(e){this.allProductions.push(e);}visitTerminal(e){this.allProductions.push(e);}},o(_Class82,"OccurrenceValidationCollector"),_Class82);o(kFe,"validateRuleDoesNotAlreadyExist");o(zoe,"validateRuleIsOverridden");o(yM,"validateNoLeftRecursion");o(rE,"getFirstNoneTerminal");bx=(_Class83=class bx extends os{constructor(){super(...arguments),this.alternations=[];}visitAlternation(e){this.alternations.push(e);}},o(_Class83,"OrCollector"),_Class83);o(Goe,"validateEmptyOrAlternative");o(Voe,"validateAmbiguousAlternationAlternatives");gM=(_Class84=class gM extends os{constructor(){super(...arguments),this.allProductions=[];}visitRepetitionWithSeparator(e){this.allProductions.push(e);}visitRepetitionMandatory(e){this.allProductions.push(e);}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e);}visitRepetition(e){this.allProductions.push(e);}},o(_Class84,"RepetitionCollector"),_Class84);o(EFe,"validateTooManyAlts");o(Uoe,"validateSomeNonEmptyLookaheadPath");o(SFe,"checkAlternativesAmbiguities");o(CFe,"checkPrefixAlternativesAmbiguities");o(AFe,"checkTerminalAndNoneTerminalsNameSpace");});function Hoe(t){let e=Jh(t,{errMsgProvider:Coe}),r={};return Ae(t.rules,n=>{r[n.name]=n;}),Aoe(r,e.errMsgProvider);}function Woe(t){return t=Jh(t,{errMsgProvider:Bl}),Foe(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName);}var qoe=N(()=>{"use strict";Yt();_oe();Tx();Wg();o(Hoe,"resolveGrammar");o(Woe,"validateGrammar");});function uf(t){return qn(Qoe,t.name);}var Yoe,Xoe,joe,Koe,Qoe,Kg,yp,wx,kx,Ex,Qg=N(()=>{"use strict";var _Class85,_Class86,_Class87,_Class88,_Class89;Yt();Yoe="MismatchedTokenException",Xoe="NoViableAltException",joe="EarlyExitException",Koe="NotAllInputParsedException",Qoe=[Yoe,Xoe,joe,Koe];Object.freeze(Qoe);o(uf,"isRecognitionException");Kg=(_Class85=class Kg extends Error{constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor);}},o(_Class85,"RecognitionException"),_Class85),yp=(_Class86=class yp extends Kg{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=Yoe;}},o(_Class86,"MismatchedTokenException"),_Class86),wx=(_Class87=class wx extends Kg{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=Xoe;}},o(_Class87,"NoViableAltException"),_Class87),kx=(_Class88=class kx extends Kg{constructor(e,r){super(e,r),this.name=Koe;}},o(_Class88,"NotAllInputParsedException"),_Class88),Ex=(_Class89=class Ex extends Kg{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=joe;}},o(_Class89,"EarlyExitException"),_Class89);});function _Fe(t,e,r,n,i,a,s){let l=this.getKeyForAutomaticLookahead(n,i),u=this.firstAfterRepMap[l];if(u===void 0){let p=this.getCurrRuleFullName(),m=this.getGAstProductions()[p];u=new a(m,i).startWalking(),this.firstAfterRepMap[l]=u;}let h=u.token,f=u.occurrence,d=u.isEndOfRule;this.RULE_STACK.length===1&&d&&h===void 0&&(h=uo,f=1),!(h===void 0||f===void 0)&&this.shouldInRepetitionRecoveryBeTried(h,f,s)&&this.tryInRepetitionRecovery(t,e,r,h);}var vM,bM,xM,nE,TM=N(()=>{"use strict";var _Class90,_Class91;gp();Yt();Qg();eM();Gs();vM={},bM="InRuleRecoveryException",xM=(_Class90=class xM extends Error{constructor(e){super(e),this.name=bM;}},o(_Class90,"InRuleRecoveryException"),_Class90),nE=(_Class91=class nE{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Bt(e,"recoveryEnabled")?e.recoveryEnabled:cs.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=_Fe);}getTokenToInsert(e){let r=Gu(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r;}canTokenTypeBeInsertedInRecovery(e){return!0;}canTokenTypeBeDeletedInRecovery(e){return!0;}tryInRepetitionRecovery(e,r,n,i){let a=this.findReSyncTokenType(),s=this.exportLexerState(),l=[],u=!1,h=this.LA(1),f=this.LA(1),d=o(()=>{let p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:h,previous:p,ruleName:this.getCurrRuleFullName()}),g=new yp(m,h,this.LA(0));g.resyncedTokens=Iu(l),this.SAVE_ERROR(g);},"generateErrorMessage");for(;!u;)if(this.tokenMatcher(f,i)){d();return;}else if(n.call(this)){d(),e.apply(this,r);return;}else this.tokenMatcher(f,a)?u=!0:(f=this.SKIP_TOKEN(),this.addToResyncTokens(f,l));this.importLexerState(s);}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)));}getFollowsForInRuleRecovery(e,r){let n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n);}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let n=this.SKIP_TOKEN();return this.consumeToken(),n;}throw new xM("sad sad panda");}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e);}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||fr(r))return!1;let n=this.LA(1);return is(r,a=>this.tokenMatcher(n,a))!==void 0;}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1;}isInCurrentRuleReSyncSet(e){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return qn(n,e);}findReSyncTokenType(){let e=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=is(e,a=>mx(r,a));if(i!==void 0)return i;r=this.LA(n),n++;}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return vM;let e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)};}buildFullFollowKeyStack(){let e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return Je(e,(n,i)=>i===0?vM:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(e[i-1])});}flattenFollowSet(){let e=Je(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return Wr(e);}getFollowSetFromFollowKey(e){if(e===vM)return[uo];let r=e.ruleName+e.idxInCallingRule+Gk+e.inRule;return this.resyncFollows[r];}addToResyncTokens(e,r){return this.tokenMatcher(e,uo)||r.push(e),r;}reSyncTo(e){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return Iu(r);}attemptInRepetitionRecovery(e,r,n,i,a,s,l){}getCurrentGrammarPath(e,r){let n=this.getHumanReadableRuleStack(),i=nn(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:e,lastTokOccurrence:r};}getHumanReadableRuleStack(){return Je(this.RULE_STACK,e=>this.shortRuleNameToFullName(e));}},o(_Class91,"Recoverable"),_Class91);o(_Fe,"attemptInRepetitionRecovery");});function iE(t,e,r){return r|e|t;}var aE=N(()=>{"use strict";o(iE,"getKeyForAutomaticLookahead");});var Uu,wM=N(()=>{"use strict";var _Class92;Yt();Wg();Gs();Tx();jg();Uu=(_Class92=class Uu{constructor(e){var r;this.maxLookahead=(r=e===null||e===void 0?void 0:e.maxLookahead)!==null&&r!==void 0?r:cs.maxLookahead;}validate(e){let r=this.validateNoLeftRecursion(e.rules);if(fr(r)){let n=this.validateEmptyOrAlternatives(e.rules),i=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),a=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...r,...n,...i,...a];}return r;}validateNoLeftRecursion(e){return pa(e,r=>yM(r,r,Bl));}validateEmptyOrAlternatives(e){return pa(e,r=>Goe(r,Bl));}validateAmbiguousAlternationAlternatives(e,r){return pa(e,n=>Voe(n,r,Bl));}validateSomeNonEmptyLookaheadPath(e,r){return Uoe(e,r,Bl);}buildLookaheadForAlternation(e){return Loe(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Noe);}buildLookaheadForOptional(e){return Roe(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,xx(e.prodType),Moe);}},o(_Class92,"LLkLookaheadStrategy"),_Class92);});function DFe(t){sE.reset(),t.accept(sE);let e=sE.dslMethods;return sE.reset(),e;}var oE,kM,sE,Zoe=N(()=>{"use strict";var _Class93,_Class94;Yt();Gs();aE();ls();wM();oE=(_Class93=class oE{initLooksAhead(e){this.dynamicTokensEnabled=Bt(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:cs.dynamicTokensEnabled,this.maxLookahead=Bt(e,"maxLookahead")?e.maxLookahead:cs.maxLookahead,this.lookaheadStrategy=Bt(e,"lookaheadStrategy")?e.lookaheadStrategy:new Uu({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map();}preComputeLookaheadFunctions(e){Ae(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:a,repetitionMandatory:s,repetitionMandatoryWithSeparator:l,repetitionWithSeparator:u}=DFe(r);Ae(n,h=>{let f=h.idx===0?"":h.idx;this.TRACE_INIT(`${zs(h)}${f}`,()=>{let d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:h.idx,rule:r,maxLookahead:h.maxLookahead||this.maxLookahead,hasPredicates:h.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=iE(this.fullRuleNameToShort[r.name],256,h.idx);this.setLaFuncCache(p,d);});}),Ae(i,h=>{this.computeLookaheadFunc(r,h.idx,768,"Repetition",h.maxLookahead,zs(h));}),Ae(a,h=>{this.computeLookaheadFunc(r,h.idx,512,"Option",h.maxLookahead,zs(h));}),Ae(s,h=>{this.computeLookaheadFunc(r,h.idx,1024,"RepetitionMandatory",h.maxLookahead,zs(h));}),Ae(l,h=>{this.computeLookaheadFunc(r,h.idx,1536,"RepetitionMandatoryWithSeparator",h.maxLookahead,zs(h));}),Ae(u,h=>{this.computeLookaheadFunc(r,h.idx,1280,"RepetitionWithSeparator",h.maxLookahead,zs(h));});});});}computeLookaheadFunc(e,r,n,i,a,s){this.TRACE_INIT(`${s}${r===0?"":r}`,()=>{let l=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),u=iE(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(u,l);});}getKeyForAutomaticLookahead(e,r){let n=this.getLastExplicitRuleShortName();return iE(n,e,r);}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e);}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r);}},o(_Class93,"LooksAhead"),_Class93),kM=(_Class94=class kM extends os{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]};}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]};}visitOption(e){this.dslMethods.option.push(e);}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e);}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e);}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e);}visitRepetition(e){this.dslMethods.repetition.push(e);}visitAlternation(e){this.dslMethods.alternation.push(e);}},o(_Class94,"DslMethodsCollectorVisitor"),_Class94),sE=new kM();o(DFe,"collectMethods");});function CM(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset);}function AM(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine);}function Joe(t,e,r){t.children[r]===void 0?t.children[r]=[e]:t.children[r].push(e);}function ele(t,e,r){t.children[e]===void 0?t.children[e]=[r]:t.children[e].push(r);}var tle=N(()=>{"use strict";o(CM,"setNodeLocationOnlyOffset");o(AM,"setNodeLocationFull");o(Joe,"addTerminalToCst");o(ele,"addNoneTerminalToCst");});function _M(t,e){Object.defineProperty(t,LFe,{enumerable:!1,configurable:!0,writable:!1,value:e});}var LFe,rle=N(()=>{"use strict";LFe="name";o(_M,"defineNameProp");});function RFe(t,e){let r=$r(t),n=r.length;for(let i=0;i<n;i++){let a=r[i],s=t[a],l=s.length;for(let u=0;u<l;u++){let h=s[u];h.tokenTypeIdx===void 0&&this[h.name](h.children,e);}}}function nle(t,e){let r=o(function(){},"derivedConstructor");_M(r,t+"BaseSemantics");let n={visit:o(function(i,a){if(Pt(i)&&(i=i[0]),!gr(i))return this[i.name](i.children,a);},"visit"),validateVisitor:o(function(){let i=NFe(this,e);if(!fr(i)){let a=Je(i,s=>s.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
	${a.join(`

`).replace(/\n/g,`
	`)}`);}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r;}function ile(t,e,r){let n=o(function(){},"derivedConstructor");_M(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return Ae(e,a=>{i[a]=RFe;}),n.prototype=i,n.prototype.constructor=n,n;}function NFe(t,e){return MFe(t,e);}function MFe(t,e){let r=qr(e,i=>Ci(t[i])===!1),n=Je(r,i=>({msg:`Missing visitor method: <${i}> on ${t.constructor.name} CST Visitor.`,type:DM.MISSING_METHOD,methodName:i}));return Sc(n);}var DM,ale=N(()=>{"use strict";Yt();rle();o(RFe,"defaultVisit");o(nle,"createBaseSemanticVisitorConstructor");o(ile,"createBaseVisitorConstructorWithDefaults");(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD";})(DM||(DM={}));o(NFe,"validateVisitor");o(MFe,"validateMissingCstMethods");});var hE,sle=N(()=>{"use strict";var _Class95;tle();Yt();ale();Gs();hE=(_Class95=class hE{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Bt(e,"nodeLocationTracking")?e.nodeLocationTracking:cs.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=ai,this.cstFinallyStateUpdate=ai,this.cstPostTerminal=ai,this.cstPostNonTerminal=ai,this.cstPostRule=ai;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=AM,this.setNodeLocationFromNode=AM,this.cstPostRule=ai,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=ai,this.setNodeLocationFromNode=ai,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=CM,this.setNodeLocationFromNode=CM,this.cstPostRule=ai,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=ai,this.setNodeLocationFromNode=ai,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=ai,this.setNodeLocationFromNode=ai,this.cstPostRule=ai,this.setInitialNodeLocation=ai;else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`);}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN};}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN};}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN};}setInitialNodeLocationFullRegular(e){let r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN};}cstInvocationStateUpdate(e){let r={name:e,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r);}cstFinallyStateUpdate(){this.CST_STACK.pop();}cstPostRuleFull(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN);}cstPostRuleOnlyOffset(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN;}cstPostTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];Joe(n,r,e),this.setNodeLocationFromToken(n.location,r);}cstPostNonTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];ele(n,r,e),this.setNodeLocationFromNode(n.location,e.location);}getBaseCstVisitorConstructor(){if(gr(this.baseCstVisitorConstructor)){let e=nle(this.className,$r(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e;}return this.baseCstVisitorConstructor;}getBaseCstVisitorConstructorWithDefaults(){if(gr(this.baseCstVisitorWithDefaultsConstructor)){let e=ile(this.className,$r(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e;}return this.baseCstVisitorWithDefaultsConstructor;}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1];}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2];}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1];}},o(_Class95,"TreeBuilder"),_Class95);});var fE,ole=N(()=>{"use strict";var _Class96;Gs();fE=(_Class96=class fE{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1;}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length;}get input(){return this.tokVector;}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Zg;}LA(e){let r=this.currIdx+e;return r<0||this.tokVectorLength<=r?Zg:this.tokVector[r];}consumeToken(){this.currIdx++;}exportLexerState(){return this.currIdx;}importLexerState(e){this.currIdx=e;}resetLexerState(){this.currIdx=-1;}moveToTerminatedState(){this.currIdx=this.tokVector.length-1;}getLexerPosition(){return this.exportLexerState();}},o(_Class96,"LexerAdapter"),_Class96);});var dE,lle=N(()=>{"use strict";var _Class97;Yt();Qg();Gs();Wg();Tx();ls();dE=(_Class97=class dE{ACTION(e){return e.call(this);}consume(e,r,n){return this.consumeInternal(r,e,n);}subrule(e,r,n){return this.subruleInternal(r,e,n);}option(e,r){return this.optionInternal(r,e);}or(e,r){return this.orInternal(r,e);}many(e,r){return this.manyInternal(e,r);}atLeastOne(e,r){return this.atLeastOneInternal(e,r);}CONSUME(e,r){return this.consumeInternal(e,0,r);}CONSUME1(e,r){return this.consumeInternal(e,1,r);}CONSUME2(e,r){return this.consumeInternal(e,2,r);}CONSUME3(e,r){return this.consumeInternal(e,3,r);}CONSUME4(e,r){return this.consumeInternal(e,4,r);}CONSUME5(e,r){return this.consumeInternal(e,5,r);}CONSUME6(e,r){return this.consumeInternal(e,6,r);}CONSUME7(e,r){return this.consumeInternal(e,7,r);}CONSUME8(e,r){return this.consumeInternal(e,8,r);}CONSUME9(e,r){return this.consumeInternal(e,9,r);}SUBRULE(e,r){return this.subruleInternal(e,0,r);}SUBRULE1(e,r){return this.subruleInternal(e,1,r);}SUBRULE2(e,r){return this.subruleInternal(e,2,r);}SUBRULE3(e,r){return this.subruleInternal(e,3,r);}SUBRULE4(e,r){return this.subruleInternal(e,4,r);}SUBRULE5(e,r){return this.subruleInternal(e,5,r);}SUBRULE6(e,r){return this.subruleInternal(e,6,r);}SUBRULE7(e,r){return this.subruleInternal(e,7,r);}SUBRULE8(e,r){return this.subruleInternal(e,8,r);}SUBRULE9(e,r){return this.subruleInternal(e,9,r);}OPTION(e){return this.optionInternal(e,0);}OPTION1(e){return this.optionInternal(e,1);}OPTION2(e){return this.optionInternal(e,2);}OPTION3(e){return this.optionInternal(e,3);}OPTION4(e){return this.optionInternal(e,4);}OPTION5(e){return this.optionInternal(e,5);}OPTION6(e){return this.optionInternal(e,6);}OPTION7(e){return this.optionInternal(e,7);}OPTION8(e){return this.optionInternal(e,8);}OPTION9(e){return this.optionInternal(e,9);}OR(e){return this.orInternal(e,0);}OR1(e){return this.orInternal(e,1);}OR2(e){return this.orInternal(e,2);}OR3(e){return this.orInternal(e,3);}OR4(e){return this.orInternal(e,4);}OR5(e){return this.orInternal(e,5);}OR6(e){return this.orInternal(e,6);}OR7(e){return this.orInternal(e,7);}OR8(e){return this.orInternal(e,8);}OR9(e){return this.orInternal(e,9);}MANY(e){this.manyInternal(0,e);}MANY1(e){this.manyInternal(1,e);}MANY2(e){this.manyInternal(2,e);}MANY3(e){this.manyInternal(3,e);}MANY4(e){this.manyInternal(4,e);}MANY5(e){this.manyInternal(5,e);}MANY6(e){this.manyInternal(6,e);}MANY7(e){this.manyInternal(7,e);}MANY8(e){this.manyInternal(8,e);}MANY9(e){this.manyInternal(9,e);}MANY_SEP(e){this.manySepFirstInternal(0,e);}MANY_SEP1(e){this.manySepFirstInternal(1,e);}MANY_SEP2(e){this.manySepFirstInternal(2,e);}MANY_SEP3(e){this.manySepFirstInternal(3,e);}MANY_SEP4(e){this.manySepFirstInternal(4,e);}MANY_SEP5(e){this.manySepFirstInternal(5,e);}MANY_SEP6(e){this.manySepFirstInternal(6,e);}MANY_SEP7(e){this.manySepFirstInternal(7,e);}MANY_SEP8(e){this.manySepFirstInternal(8,e);}MANY_SEP9(e){this.manySepFirstInternal(9,e);}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e);}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e);}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e);}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e);}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e);}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e);}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e);}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e);}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e);}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e);}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e);}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e);}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e);}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e);}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e);}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e);}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e);}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e);}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e);}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e);}RULE(e,r,n=Jg){if(qn(this.definedRulesNames,e)){let s={message:Bl.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:zi.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s);}this.definedRulesNames.push(e);let i=this.defineRule(e,r,n);return this[e]=i,i;}OVERRIDE_RULE(e,r,n=Jg){let i=zoe(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let a=this.defineRule(e,r,n);return this[e]=a,a;}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,r),!0;}catch(i){if(uf(i))return!1;throw i;}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop();}};}getGAstProductions(){return this.gastProductionsCache;}getSerializedGastProductions(){return Fk(br(this.gastProductionsCache));}},o(_Class97,"RecognizerApi"),_Class97);});var pE,cle=N(()=>{"use strict";var _Class98;Yt();aE();Qg();jg();vx();Gs();TM();gp();mp();pE=(_Class98=class pE{initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ug,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Bt(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
	See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
	For Further details.`);if(Pt(e)){if(fr(e))throw Error(`A Token Vocabulary cannot be empty.
	Note that the first argument for the parser constructor
	is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
	See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
	For Further details.`);}if(Pt(e))this.tokensMap=Yr(e,(a,s)=>(a[s.name]=s,a),{});else if(Bt(e,"modes")&&Na(Wr(br(e.modes)),yoe)){let a=Wr(br(e.modes)),s=zm(a);this.tokensMap=Yr(s,(l,u)=>(l[u.name]=u,l),{});}else if(xn(e))this.tokensMap=nn(e);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=uo;let n=Bt(e,"modes")?Wr(br(e.modes)):br(e),i=Na(n,a=>fr(a.categoryMatches));this.tokenMatcher=i?Ug:Fu,$u(br(this.tokensMap));}defineRule(e,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=Bt(n,"resyncEnabled")?n.resyncEnabled:Jg.resyncEnabled,a=Bt(n,"recoveryValueFunc")?n.recoveryValueFunc:Jg.recoveryValueFunc,s=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s;let l;return this.outputCst===!0?l=o(function(...f){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,f);let d=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(d),d;}catch(d){return this.invokeRuleCatch(d,i,a);}finally{this.ruleFinallyStateUpdate();}},"invokeRuleWithTry"):l=o(function(...f){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,f);}catch(d){return this.invokeRuleCatch(d,i,a);}finally{this.ruleFinallyStateUpdate();}},"invokeRuleWithTryCst"),Object.assign(l,{ruleName:e,originalGrammarAction:r});}invokeRuleCatch(e,r,n){let i=this.RULE_STACK.length===1,a=r&&!this.isBackTracking()&&this.recoveryEnabled;if(uf(e)){let s=e;if(a){let l=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(l)){if(s.resyncedTokens=this.reSyncTo(l),this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];return u.recoveredNode=!0,u;}else return n(e);}else{if(this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];u.recoveredNode=!0,s.partialCstResult=u;}throw s;}}else{if(i)return this.moveToTerminatedState(),n(e);throw s;}}else throw e;}optionInternal(e,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(e,r,n);}optionInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof e!="function"){a=e.DEF;let s=e.GATE;if(s!==void 0){let l=i;i=o(()=>s.call(this)&&l.call(this),"lookAheadFunc");}}else a=e;if(i.call(this)===!0)return a.call(this);}atLeastOneInternal(e,r){let n=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,r,n);}atLeastOneInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof r!="function"){a=r.DEF;let s=r.GATE;if(s!==void 0){let l=i;i=o(()=>s.call(this)&&l.call(this),"lookAheadFunc");}}else a=r;if(i.call(this)===!0){let s=this.doSingleRepetition(a);for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a);}else throw this.raiseEarlyExitException(e,jn.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],i,1024,e,Kk);}atLeastOneSepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,r,n);}atLeastOneSepFirstInternalLogic(e,r,n){let i=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let l=o(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,l,i,yx],l,1536,e,yx);}else throw this.raiseEarlyExitException(e,jn.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG);}manyInternal(e,r){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,r,n);}manyInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof r!="function"){a=r.DEF;let l=r.GATE;if(l!==void 0){let u=i;i=o(()=>l.call(this)&&u.call(this),"lookaheadFunction");}}else a=r;let s=!0;for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],i,768,e,jk,s);}manySepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,r,n);}manySepFirstInternalLogic(e,r,n){let i=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let l=o(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,l,i,gx],l,1280,e,gx);}}repetitionSepSecondInternal(e,r,n,i,a){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,r,n,i,a],n,1536,e,a);}doSingleRepetition(e){let r=this.getLexerPosition();return e.call(this),this.getLexerPosition()>r;}orInternal(e,r){let n=this.getKeyForAutomaticLookahead(256,r),i=Pt(e)?e:e.DEF,s=this.getLaFuncFromCache(n).call(this,i);if(s!==void 0)return i[s].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG);}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new kx(r,e));}}subruleInternal(e,r,n){let i;try{let a=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=e.apply(this,a),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),i;}catch(a){throw this.subruleInternalError(a,n,e.ruleName);}}subruleInternalError(e,r,n){throw uf(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e;}consumeInternal(e,r,n){let i;try{let a=this.LA(1);this.tokenMatcher(a,e)===!0?(this.consumeToken(),i=a):this.consumeInternalError(e,a,n);}catch(a){i=this.consumeInternalRecovery(e,r,a);}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,i),i;}consumeInternalError(e,r,n){let i,a=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new yp(i,r,a));}consumeInternalRecovery(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,i);}catch(a){throw a.name===bM?n:a;}}else throw n;}saveRecogState(){let e=this.errors,r=nn(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK};}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK;}ruleInvocationStateUpdate(e,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r);}isBackTracking(){return this.isBackTrackingStack.length!==0;}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e];}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e];}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),uo);}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[];}},o(_Class98,"RecognizerEngine"),_Class98);});var mE,ule=N(()=>{"use strict";var _Class99;Qg();Yt();jg();Gs();mE=(_Class99=class mE{initErrorHandler(e){this._errors=[],this.errorMessageProvider=Bt(e,"errorMessageProvider")?e.errorMessageProvider:cs.errorMessageProvider;}SAVE_ERROR(e){if(uf(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:nn(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException");}get errors(){return nn(this._errors);}set errors(e){this._errors=e;}raiseEarlyExitException(e,r,n){let i=this.getCurrRuleFullName(),a=this.getGAstProductions()[i],l=Xg(e,a,r,this.maxLookahead)[0],u=[];for(let f=1;f<=this.maxLookahead;f++)u.push(this.LA(f));let h=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:l,actual:u,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new Ex(h,this.LA(1),this.LA(0)));}raiseNoAltException(e,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],a=Yg(e,i,this.maxLookahead),s=[];for(let h=1;h<=this.maxLookahead;h++)s.push(this.LA(h));let l=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:a,actual:s,previous:l,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new wx(u,this.LA(1),l));}},o(_Class99,"ErrorHandler"),_Class99);});var gE,hle=N(()=>{"use strict";var _Class100;vx();Yt();gE=(_Class100=class gE{initContentAssist(){}computeContentAssist(e,r){let n=this.gastProductionsCache[e];if(gr(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return Zk([n],r,this.tokenMatcher,this.maxLookahead);}getNextPossibleTokenTypes(e){let r=ra(e.ruleStack),i=this.getGAstProductions()[r];return new Xk(i,e).startWalking();}},o(_Class100,"ContentAssist"),_Class100);});function Cx(t,e,r,n=!1){vE(r);let i=da(this.recordingProdStack),a=Ci(e)?e:e.DEF,s=new t({definition:[],idx:r});return n&&(s.separator=e.SEP),Bt(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),i.definition.push(s),this.recordingProdStack.pop(),xE;}function PFe(t,e){vE(e);let r=da(this.recordingProdStack),n=Pt(t)===!1,i=n===!1?t:t.DEF,a=new Tn({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});Bt(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD);let s=P2(i,l=>Ci(l.GATE));return a.hasPredicates=s,r.definition.push(a),Ae(i,l=>{let u=new _n({definition:[]});a.definition.push(u),Bt(l,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:Bt(l,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),l.ALT.call(this),this.recordingProdStack.pop();}),xE;}function ple(t){return t===0?"":`${t}`;}function vE(t){if(t<0||t>dle){let e=new Error(`Invalid DSL Method idx value: <${t}>
	Idx value must be a none negative value smaller than ${dle+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e;}}var xE,fle,dle,mle,gle,OFe,yE,yle=N(()=>{"use strict";var _Class101;Yt();ls();dx();mp();gp();Gs();aE();xE={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(xE);fle=!0,dle=Math.pow(2,8)-1,mle=cf({name:"RECORDING_PHASE_TOKEN",pattern:Xn.NA});$u([mle]);gle=Gu(mle,`This IToken indicates the Parser is in Recording Phase
	See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(gle);OFe={name:`This CSTNode indicates the Parser is in Recording Phase
	See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},yE=(_Class101=class yE{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1;}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let r=e>0?e:"";this[`CONSUME${r}`]=function(n,i){return this.consumeInternalRecord(n,e,i);},this[`SUBRULE${r}`]=function(n,i){return this.subruleInternalRecord(n,e,i);},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,e);},this[`OR${r}`]=function(n){return this.orInternalRecord(n,e);},this[`MANY${r}`]=function(n){this.manyInternalRecord(e,n);},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(e,n);},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(e,n);},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n);};}this.consume=function(e,r,n){return this.consumeInternalRecord(r,e,n);},this.subrule=function(e,r,n){return this.subruleInternalRecord(r,e,n);},this.option=function(e,r){return this.optionInternalRecord(r,e);},this.or=function(e,r){return this.orInternalRecord(r,e);},this.many=function(e,r){this.manyInternalRecord(e,r);},this.atLeastOne=function(e,r){this.atLeastOneInternalRecord(e,r);},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD;});}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`];}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA;});}ACTION_RECORD(e){}BACKTRACK_RECORD(e,r){return()=>!0;}LA_RECORD(e){return Zg;}topLevelRuleRecord(e,r){try{let n=new ss({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n;}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+`
	 This error was thrown during the "grammar recording phase" For more info see:
	https://chevrotain.io/docs/guide/internals.html#grammar-recording`;}catch{throw n;}throw n;}}optionInternalRecord(e,r){return Cx.call(this,on,e,r);}atLeastOneInternalRecord(e,r){Cx.call(this,Dn,r,e);}atLeastOneSepFirstInternalRecord(e,r){Cx.call(this,Ln,r,e,fle);}manyInternalRecord(e,r){Cx.call(this,Or,r,e);}manySepFirstInternalRecord(e,r){Cx.call(this,bn,r,e,fle);}orInternalRecord(e,r){return PFe.call(this,e,r);}subruleInternalRecord(e,r,n){if(vE(r),!e||Bt(e,"ruleName")===!1){let l=new Error(`<SUBRULE${ple(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
 inside top level rule: <${this.recordingProdStack[0].name}>`);throw l.KNOWN_RECORDER_ERROR=!0,l;}let i=da(this.recordingProdStack),a=e.ruleName,s=new sn({idx:r,nonTerminalName:a,label:n===null||n===void 0?void 0:n.LABEL,referencedRule:void 0});return i.definition.push(s),this.outputCst?OFe:xE;}consumeInternalRecord(e,r,n){if(vE(r),!lM(e)){let s=new Error(`<CONSUME${ple(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
 inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s;}let i=da(this.recordingProdStack),a=new kr({idx:r,terminalType:e,label:n===null||n===void 0?void 0:n.LABEL});return i.definition.push(a),gle;}},o(_Class101,"GastRecorder"),_Class101);o(Cx,"recordProd");o(PFe,"recordOrProd");o(ple,"getIdxSuffix");o(vE,"assertMethodIdxIsValid");});var bE,vle=N(()=>{"use strict";var _Class102;Yt();Fg();Gs();bE=(_Class102=class bE{initPerformanceTracer(e){if(Bt(e,"traceInitPerf")){let r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r;}else this.traceInitMaxIdent=0,this.traceInitPerf=cs.traceInitPerf;this.traceInitIndent=-1;}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join("	");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:i,value:a}=ux(r),s=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${n}<-- <${e}> time: ${i}ms`),this.traceInitIndent--,a;}else return r();}},o(_Class102,"PerformanceTracer"),_Class102);});function xle(t,e){e.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let a=Object.getOwnPropertyDescriptor(n,i);a&&(a.get||a.set)?Object.defineProperty(t.prototype,i,a):t.prototype[i]=r.prototype[i];});});}var ble=N(()=>{"use strict";o(xle,"applyMixins");});function TE(t=void 0){return function(){return t;};}var Zg,cs,Jg,zi,Ax,_x,Gs=N(()=>{"use strict";var _t8,_Class103;Yt();Fg();Kse();gp();Wg();qoe();TM();Zoe();sle();ole();lle();cle();ule();hle();yle();vle();ble();Tx();Zg=Gu(uo,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Zg);cs=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Vu,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Jg=Object.freeze({recoveryValueFunc:o(()=>{},"recoveryValueFunc"),resyncEnabled:!0});(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION";})(zi||(zi={}));o(TE,"EMPTY_ALT");Ax=(_t8=class t{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.	\nUse the **instance** method with the same name instead.");}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{hx(this);}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),Ae(this.definedRulesNames,i=>{let s=this[i].originalGrammarAction,l;this.TRACE_INIT(`${i} Rule`,()=>{l=this.topLevelRuleRecord(i,s);}),this.gastProductionsCache[i]=l;});}finally{this.disableRecording();}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=Hoe({rules:br(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n);}),this.TRACE_INIT("Grammar Validations",()=>{if(fr(n)&&this.skipValidations===!1){let i=Woe({rules:br(this.gastProductionsCache),tokenTypes:br(this.tokensMap),errMsgProvider:Bl,grammarName:r}),a=Boe({lookaheadStrategy:this.lookaheadStrategy,rules:br(this.gastProductionsCache),tokenTypes:br(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,a);}}),fr(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=jse(br(this.gastProductionsCache));this.resyncFollows=i;}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,a;(a=(i=this.lookaheadStrategy).initialize)===null||a===void 0||a.call(i,{rules:br(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(br(this.gastProductionsCache));})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!fr(this.definitionErrors))throw e=Je(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected:
 ${e.join(`
-------------------------------
`)}`);});}constructor(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),Bt(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
	Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
	See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
	For further details.`);this.skipValidations=Bt(r,"skipValidations")?r.skipValidations:cs.skipValidations;}},o(_t8,"Parser"),_t8);Ax.DEFER_DEFINITION_ERRORS_HANDLING=!1;xle(Ax,[nE,oE,hE,fE,pE,dE,mE,gE,yE,bE]);_x=(_Class103=class _x extends Ax{constructor(e,r=cs){let n=nn(r);n.outputCst=!1,super(e,n);}},o(_Class103,"EmbeddedActionsParser"),_Class103);});var Tle=N(()=>{"use strict";ls();});var wle=N(()=>{"use strict";});var kle=N(()=>{"use strict";Tle();wle();});var Ele=N(()=>{"use strict";KN();});var hf=N(()=>{"use strict";KN();Gs();dx();gp();jg();wM();Wg();Qg();cM();ls();ls();kle();Ele();});function vp(t,e,r){return`${t.name}_${e}_${r}`;}function _le(t){let e={decisionMap:{},decisionStates:[],ruleToStartState:new Map(),ruleToStopState:new Map(),states:[]};UFe(e,t);let r=t.length;for(let n=0;n<r;n++){let i=t[n],a=xp(e,i,i);a!==void 0&&e$e(e,i,a);}return e;}function UFe(t,e){let r=e.length;for(let n=0;n<r;n++){let i=e[n],a=na(t,i,void 0,{type:FFe}),s=na(t,i,void 0,{type:r1});a.stop=s,t.ruleToStartState.set(i,a),t.ruleToStopState.set(i,s);}}function Dle(t,e,r){return r instanceof kr?RM(t,e,r.terminalType,r):r instanceof sn?JFe(t,e,r):r instanceof Tn?XFe(t,e,r):r instanceof on?jFe(t,e,r):r instanceof Or?HFe(t,e,r):r instanceof bn?WFe(t,e,r):r instanceof Dn?qFe(t,e,r):r instanceof Ln?YFe(t,e,r):xp(t,e,r);}function HFe(t,e,r){let n=na(t,e,r,{type:Cle});df(t,n);let i=n1(t,e,n,r,xp(t,e,r));return Rle(t,e,r,i);}function WFe(t,e,r){let n=na(t,e,r,{type:Cle});df(t,n);let i=n1(t,e,n,r,xp(t,e,r)),a=RM(t,e,r.separator,r);return Rle(t,e,r,i,a);}function qFe(t,e,r){let n=na(t,e,r,{type:Sle});df(t,n);let i=n1(t,e,n,r,xp(t,e,r));return Lle(t,e,r,i);}function YFe(t,e,r){let n=na(t,e,r,{type:Sle});df(t,n);let i=n1(t,e,n,r,xp(t,e,r)),a=RM(t,e,r.separator,r);return Lle(t,e,r,i,a);}function XFe(t,e,r){let n=na(t,e,r,{type:ff});df(t,n);let i=Je(r.definition,s=>Dle(t,e,s));return n1(t,e,n,r,...i);}function jFe(t,e,r){let n=na(t,e,r,{type:ff});df(t,n);let i=n1(t,e,n,r,xp(t,e,r));return KFe(t,e,r,i);}function xp(t,e,r){let n=qr(Je(r.definition,i=>Dle(t,e,i)),i=>i!==void 0);return n.length===1?n[0]:n.length===0?void 0:ZFe(t,n);}function Lle(t,e,r,n,i){let a=n.left,s=n.right,l=na(t,e,r,{type:VFe});df(t,l);let u=na(t,e,r,{type:Ale});return a.loopback=l,u.loopback=l,t.decisionMap[vp(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=l,_i(s,l),i===void 0?(_i(l,a),_i(l,u)):(_i(l,u),_i(l,i.left),_i(i.right,a)),{left:a,right:u};}function Rle(t,e,r,n,i){let a=n.left,s=n.right,l=na(t,e,r,{type:GFe});df(t,l);let u=na(t,e,r,{type:Ale}),h=na(t,e,r,{type:zFe});return l.loopback=h,u.loopback=h,_i(l,a),_i(l,u),_i(s,h),i!==void 0?(_i(h,u),_i(h,i.left),_i(i.right,a)):_i(h,l),t.decisionMap[vp(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=l,{left:l,right:u};}function KFe(t,e,r,n){let i=n.left,a=n.right;return _i(i,a),t.decisionMap[vp(e,"Option",r.idx)]=i,n;}function df(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision;}function n1(t,e,r,n,...i){let a=na(t,e,n,{type:$Fe,start:r});r.end=a;for(let l of i)l!==void 0?(_i(r,l.left),_i(l.right,a)):_i(r,a);let s={left:r,right:a};return t.decisionMap[vp(e,QFe(n),n.idx)]=r,s;}function QFe(t){if(t instanceof Tn)return"Alternation";if(t instanceof on)return"Option";if(t instanceof Or)return"Repetition";if(t instanceof bn)return"RepetitionWithSeparator";if(t instanceof Dn)return"RepetitionMandatory";if(t instanceof Ln)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered");}function ZFe(t,e){let r=e.length;for(let a=0;a<r-1;a++){let s=e[a],l;s.left.transitions.length===1&&(l=s.left.transitions[0]);let u=l instanceof t1,h=l,f=e[a+1].left;s.left.type===ff&&s.right.type===ff&&l!==void 0&&(u&&h.followState===s.right||l.target===s.right)?(u?h.followState=f:l.target=f,t$e(t,s.right)):_i(s.right,f);}let n=e[0],i=e[r-1];return{left:n.left,right:i.right};}function RM(t,e,r,n){let i=na(t,e,n,{type:ff}),a=na(t,e,n,{type:ff});return NM(i,new e1(a,r)),{left:i,right:a};}function JFe(t,e,r){let n=r.referencedRule,i=t.ruleToStartState.get(n),a=na(t,e,r,{type:ff}),s=na(t,e,r,{type:ff}),l=new t1(i,n,s);return NM(a,l),{left:a,right:s};}function e$e(t,e,r){let n=t.ruleToStartState.get(e);_i(n,r.left);let i=t.ruleToStopState.get(e);return _i(r.right,i),{left:n,right:i};}function _i(t,e){let r=new Lx(e);NM(t,r);}function na(t,e,r,n){let i=Object.assign({atn:t,production:r,epsilonOnlyTransitions:!1,rule:e,transitions:[],nextTokenWithinRule:[],stateNumber:t.states.length},n);return t.states.push(i),i;}function NM(t,e){t.transitions.length===0&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e);}function t$e(t,e){t.states.splice(t.states.indexOf(e),1);}var ff,FFe,Sle,Cle,r1,$Fe,zFe,GFe,VFe,Ale,Dx,e1,Lx,t1,Nle=N(()=>{"use strict";var _Class104,_Class105,_Class106,_Class107;Bm();cR();hf();o(vp,"buildATNKey");ff=1,FFe=2,Sle=4,Cle=5,r1=7,$Fe=8,zFe=9,GFe=10,VFe=11,Ale=12,Dx=(_Class104=class Dx{constructor(e){this.target=e;}isEpsilon(){return!1;}},o(_Class104,"AbstractTransition"),_Class104),e1=(_Class105=class e1 extends Dx{constructor(e,r){super(e),this.tokenType=r;}},o(_Class105,"AtomTransition"),_Class105),Lx=(_Class106=class Lx extends Dx{constructor(e){super(e);}isEpsilon(){return!0;}},o(_Class106,"EpsilonTransition"),_Class106),t1=(_Class107=class t1 extends Dx{constructor(e,r,n){super(e),this.rule=r,this.followState=n;}isEpsilon(){return!0;}},o(_Class107,"RuleTransition"),_Class107);o(_le,"createATN");o(UFe,"createRuleStartAndStopATNStates");o(Dle,"atom");o(HFe,"repetition");o(WFe,"repetitionSep");o(qFe,"repetitionMandatory");o(YFe,"repetitionMandatorySep");o(XFe,"alternation");o(jFe,"option");o(xp,"block");o(Lle,"plus");o(Rle,"star");o(KFe,"optional");o(df,"defineDecisionState");o(n1,"makeAlts");o(QFe,"getProdType");o(ZFe,"makeBlock");o(RM,"tokenRef");o(JFe,"ruleRef");o(e$e,"buildRuleHandle");o(_i,"epsilon");o(na,"newState");o(NM,"addTransition");o(t$e,"removeState");});function MM(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(r=>r.stateNumber.toString()).join("_")}`;}var Rx,i1,Mle=N(()=>{"use strict";var _Class108;Bm();Rx={},i1=(_Class108=class i1{constructor(){this.map={},this.configs=[];}get size(){return this.configs.length;}finalize(){this.map={};}add(e){let r=MM(e);r in this.map||(this.map[r]=this.configs.length,this.configs.push(e));}get elements(){return this.configs;}get alts(){return Je(this.configs,e=>e.alt);}get key(){let e="";for(let r in this.map)e+=r+":";return e;}},o(_Class108,"ATNConfigSet"),_Class108);o(MM,"getATNConfigKey");});function r$e(t,e){let r={};return n=>{let i=n.toString(),a=r[i];return a!==void 0||(a={atnStartState:t,decision:e,states:{}},r[i]=a),a;};}function Ole(t,e=!0){let r=new Set();for(let n of t){let i=new Set();for(let a of n){if(a===void 0){if(e)break;return!1;}let s=[a.tokenTypeIdx].concat(a.categoryMatches);for(let l of s)if(r.has(l)){if(!i.has(l))return!1;}else r.add(l),i.add(l);}}return!0;}function n$e(t){let e=t.decisionStates.length,r=Array(e);for(let n=0;n<e;n++)r[n]=r$e(t.decisionStates[n],n);return r;}function IM(t,e,r,n){let i=t[e](r),a=i.start;if(a===void 0){let l=p$e(i.atnStartState);a=Fle(i,Ble(l)),i.start=a;}return i$e.apply(this,[i,a,r,n]);}function i$e(t,e,r,n){let i=e,a=1,s=[],l=this.LA(a++);for(;;){let u=u$e(i,l);if(u===void 0&&(u=a$e.apply(this,[t,i,l,a,r,n])),u===Rx)return c$e(s,i,l);if(u.isAcceptState===!0)return u.prediction;i=u,s.push(l),l=this.LA(a++);}}function a$e(t,e,r,n,i,a){let s=h$e(e.configs,r,i);if(s.size===0)return Ple(t,e,r,Rx),Rx;let l=Ble(s),u=d$e(s,i);if(u!==void 0)l.isAcceptState=!0,l.prediction=u,l.configs.uniqueAlt=u;else if(v$e(s)){let h=Ll(s.alts);l.isAcceptState=!0,l.prediction=h,l.configs.uniqueAlt=h,s$e.apply(this,[t,n,s.alts,a]);}return l=Ple(t,e,r,l),l;}function s$e(t,e,r,n){let i=[];for(let h=1;h<=e;h++)i.push(this.LA(h).tokenType);let a=t.atnStartState,s=a.rule,l=a.production,u=o$e({topLevelRule:s,ambiguityIndices:r,production:l,prefixPath:i});n(u);}function o$e(t){let e=Je(t.prefixPath,i=>zu(i)).join(", "),r=t.production.idx===0?"":t.production.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${l$e(t.production)}${r}> inside <${t.topLevelRule.name}> Rule,
<${e}> may appears as a prefix path in all these alternatives.
`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
For Further details.`,n;}function l$e(t){if(t instanceof sn)return"SUBRULE";if(t instanceof on)return"OPTION";if(t instanceof Tn)return"OR";if(t instanceof Dn)return"AT_LEAST_ONE";if(t instanceof Ln)return"AT_LEAST_ONE_SEP";if(t instanceof bn)return"MANY_SEP";if(t instanceof Or)return"MANY";if(t instanceof kr)return"CONSUME";throw Error("non exhaustive match");}function c$e(t,e,r){let n=pa(e.configs.elements,a=>a.state.transitions),i=fie(n.filter(a=>a instanceof e1).map(a=>a.tokenType),a=>a.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:i,tokenPath:t};}function u$e(t,e){return t.edges[e.tokenTypeIdx];}function h$e(t,e,r){let n=new i1(),i=[];for(let s of t.elements){if(r.is(s.alt)===!1)continue;if(s.state.type===r1){i.push(s);continue;}let l=s.state.transitions.length;for(let u=0;u<l;u++){let h=s.state.transitions[u],f=f$e(h,e);f!==void 0&&n.add({state:f,alt:s.alt,stack:s.stack});}}let a;if(i.length===0&&n.size===1&&(a=n),a===void 0){a=new i1();for(let s of n.elements)kE(s,a);}if(i.length>0&&!g$e(a))for(let s of i)a.add(s);return a;}function f$e(t,e){if(t instanceof e1&&mx(e,t.tokenType))return t.target;}function d$e(t,e){let r;for(let n of t.elements)if(e.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return;}return r;}function Ble(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1};}function Ple(t,e,r,n){return n=Fle(t,n),e.edges[r.tokenTypeIdx]=n,n;}function Fle(t,e){if(e===Rx)return e;let r=e.configs.key,n=t.states[r];return n!==void 0?n:(e.configs.finalize(),t.states[r]=e,e);}function p$e(t){let e=new i1(),r=t.transitions.length;for(let n=0;n<r;n++){let a={state:t.transitions[n].target,alt:n,stack:[]};kE(a,e);}return e;}function kE(t,e){let r=t.state;if(r.type===r1){if(t.stack.length>0){let i=[...t.stack],s={state:i.pop(),alt:t.alt,stack:i};kE(s,e);}else e.add(t);return;}r.epsilonOnlyTransitions||e.add(t);let n=r.transitions.length;for(let i=0;i<n;i++){let a=r.transitions[i],s=m$e(t,a);s!==void 0&&kE(s,e);}}function m$e(t,e){if(e instanceof Lx)return{state:e.target,alt:t.alt,stack:t.stack};if(e instanceof t1){let r=[...t.stack,e.followState];return{state:e.target,alt:t.alt,stack:r};}}function g$e(t){for(let e of t.elements)if(e.state.type===r1)return!0;return!1;}function y$e(t){for(let e of t.elements)if(e.state.type!==r1)return!1;return!0;}function v$e(t){if(y$e(t))return!0;let e=x$e(t.elements);return b$e(e)&&!T$e(e);}function x$e(t){let e=new Map();for(let r of t){let n=MM(r,!1),i=e.get(n);i===void 0&&(i={},e.set(n,i)),i[r.alt]=!0;}return e;}function b$e(t){for(let e of Array.from(t.values()))if(Object.keys(e).length>1)return!0;return!1;}function T$e(t){for(let e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1;}var wE,Ile,Nx,$le=N(()=>{"use strict";var _Class109,_Class110;hf();Nle();Mle();yR();hR();die();Bm();kw();Zw();nk();TR();o(r$e,"createDFACache");wE=(_Class109=class wE{constructor(){this.predicates=[];}is(e){return e>=this.predicates.length||this.predicates[e];}set(e,r){this.predicates[e]=r;}toString(){let e="",r=this.predicates.length;for(let n=0;n<r;n++)e+=this.predicates[n]===!0?"1":"0";return e;}},o(_Class109,"PredicateSet"),_Class109),Ile=new wE(),Nx=(_Class110=class Nx extends Uu{constructor(e){var r;super(),this.logging=(r=e===null||e===void 0?void 0:e.logging)!==null&&r!==void 0?r:n=>console.log(n);}initialize(e){this.atn=_le(e.rules),this.dfas=n$e(this.atn);}validateAmbiguousAlternationAlternatives(){return[];}validateEmptyOrAlternatives(){return[];}buildLookaheadForAlternation(e){let{prodOccurrence:r,rule:n,hasPredicates:i,dynamicTokensEnabled:a}=e,s=this.dfas,l=this.logging,u=vp(n,"Alternation",r),f=this.atn.decisionMap[u].decision,d=Je(eE({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),p=>Je(p,m=>m[0]));if(Ole(d,!1)&&!a){let p=Yr(d,(m,g,y)=>(Ae(g,v=>{v&&(m[v.tokenTypeIdx]=y,Ae(v.categoryMatches,x=>{m[x]=y;}));}),m),{});return i?function(m){var g;let y=this.LA(1),v=p[y.tokenTypeIdx];if(m!==void 0&&v!==void 0){let x=(g=m[v])===null||g===void 0?void 0:g.GATE;if(x!==void 0&&x.call(this)===!1)return;}return v;}:function(){let m=this.LA(1);return p[m.tokenTypeIdx];};}else return i?function(p){let m=new wE(),g=p===void 0?0:p.length;for(let v=0;v<g;v++){let x=p===null||p===void 0?void 0:p[v].GATE;m.set(v,x===void 0||x.call(this));}let y=IM.call(this,s,f,m,l);return typeof y=="number"?y:void 0;}:function(){let p=IM.call(this,s,f,Ile,l);return typeof p=="number"?p:void 0;};}buildLookaheadForOptional(e){let{prodOccurrence:r,rule:n,prodType:i,dynamicTokensEnabled:a}=e,s=this.dfas,l=this.logging,u=vp(n,i,r),f=this.atn.decisionMap[u].decision,d=Je(eE({maxLookahead:1,occurrence:r,prodType:i,rule:n}),p=>Je(p,m=>m[0]));if(Ole(d)&&d[0][0]&&!a){let p=d[0],m=Wr(p);if(m.length===1&&fr(m[0].categoryMatches)){let y=m[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===y;};}else{let g=Yr(m,(y,v)=>(v!==void 0&&(y[v.tokenTypeIdx]=!0,Ae(v.categoryMatches,x=>{y[x]=!0;})),y),{});return function(){let y=this.LA(1);return g[y.tokenTypeIdx]===!0;};}}return function(){let p=IM.call(this,s,f,Ile,l);return typeof p=="object"?!1:p===0;};}},o(_Class110,"LLStarLookaheadStrategy"),_Class110);o(Ole,"isLL1Sequence");o(n$e,"initATNSimulator");o(IM,"adaptivePredict");o(i$e,"performLookahead");o(a$e,"computeLookaheadTarget");o(s$e,"reportLookaheadAmbiguity");o(o$e,"buildAmbiguityError");o(l$e,"getProductionDslName");o(c$e,"buildAdaptivePredictError");o(u$e,"getExistingTargetState");o(h$e,"computeReachSet");o(f$e,"getReachableTarget");o(d$e,"getUniqueAlt");o(Ble,"newDFAState");o(Ple,"addDFAEdge");o(Fle,"addDFAState");o(p$e,"computeStartState");o(kE,"closure");o(m$e,"getEpsilonTarget");o(g$e,"hasConfigInRuleStopState");o(y$e,"allConfigsInRuleStopStates");o(v$e,"hasConflictTerminatingPrediction");o(x$e,"getConflictingAltSets");o(b$e,"hasConflictingAltSet");o(T$e,"hasStateAssociatedWithOneAlt");});var zle=N(()=>{"use strict";$le();});var Gle,OM,Vle,EE,Xr,Pr,SE,Ule,PM,Hle,Wle,qle,Yle,BM,Xle,jle,Kle,CE,a1,s1,FM,o1,Qle,$M,zM,GM,VM,UM,Zle,Jle,HM,ece,WM,Mx,tce,rce,nce,ice,ace,sce,oce,lce,AE,cce,uce,hce,fce,dce,pce,mce,gce,yce,vce,xce,_E,bce,Tce,wce,kce,Ece,Sce,Cce,Ace,_ce,Dce,Lce,Rce,Nce,qM,YM,Mce,Ice,Oce,Pce,Bce,Fce,$ce,zce,Gce,XM,$e,jM=N(()=>{"use strict";var _Class111;(function(t){function e(r){return typeof r=="string";}o(e,"is"),t.is=e;})(Gle||(Gle={}));(function(t){function e(r){return typeof r=="string";}o(e,"is"),t.is=e;})(OM||(OM={}));(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE;}o(e,"is"),t.is=e;})(Vle||(Vle={}));(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE;}o(e,"is"),t.is=e;})(EE||(EE={}));(function(t){function e(n,i){return n===Number.MAX_VALUE&&(n=EE.MAX_VALUE),i===Number.MAX_VALUE&&(i=EE.MAX_VALUE),{line:n,character:i};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.objectLiteral(i)&&$e.uinteger(i.line)&&$e.uinteger(i.character);}o(r,"is"),t.is=r;})(Xr||(Xr={}));(function(t){function e(n,i,a,s){if($e.uinteger(n)&&$e.uinteger(i)&&$e.uinteger(a)&&$e.uinteger(s))return{start:Xr.create(n,i),end:Xr.create(a,s)};if(Xr.is(n)&&Xr.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${a}, ${s}]`);}o(e,"create"),t.create=e;function r(n){let i=n;return $e.objectLiteral(i)&&Xr.is(i.start)&&Xr.is(i.end);}o(r,"is"),t.is=r;})(Pr||(Pr={}));(function(t){function e(n,i){return{uri:n,range:i};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.objectLiteral(i)&&Pr.is(i.range)&&($e.string(i.uri)||$e.undefined(i.uri));}o(r,"is"),t.is=r;})(SE||(SE={}));(function(t){function e(n,i,a,s){return{targetUri:n,targetRange:i,targetSelectionRange:a,originSelectionRange:s};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.objectLiteral(i)&&Pr.is(i.targetRange)&&$e.string(i.targetUri)&&Pr.is(i.targetSelectionRange)&&(Pr.is(i.originSelectionRange)||$e.undefined(i.originSelectionRange));}o(r,"is"),t.is=r;})(Ule||(Ule={}));(function(t){function e(n,i,a,s){return{red:n,green:i,blue:a,alpha:s};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.objectLiteral(i)&&$e.numberRange(i.red,0,1)&&$e.numberRange(i.green,0,1)&&$e.numberRange(i.blue,0,1)&&$e.numberRange(i.alpha,0,1);}o(r,"is"),t.is=r;})(PM||(PM={}));(function(t){function e(n,i){return{range:n,color:i};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.objectLiteral(i)&&Pr.is(i.range)&&PM.is(i.color);}o(r,"is"),t.is=r;})(Hle||(Hle={}));(function(t){function e(n,i,a){return{label:n,textEdit:i,additionalTextEdits:a};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.objectLiteral(i)&&$e.string(i.label)&&($e.undefined(i.textEdit)||s1.is(i))&&($e.undefined(i.additionalTextEdits)||$e.typedArray(i.additionalTextEdits,s1.is));}o(r,"is"),t.is=r;})(Wle||(Wle={}));(function(t){t.Comment="comment",t.Imports="imports",t.Region="region";})(qle||(qle={}));(function(t){function e(n,i,a,s,l,u){let h={startLine:n,endLine:i};return $e.defined(a)&&(h.startCharacter=a),$e.defined(s)&&(h.endCharacter=s),$e.defined(l)&&(h.kind=l),$e.defined(u)&&(h.collapsedText=u),h;}o(e,"create"),t.create=e;function r(n){let i=n;return $e.objectLiteral(i)&&$e.uinteger(i.startLine)&&$e.uinteger(i.startLine)&&($e.undefined(i.startCharacter)||$e.uinteger(i.startCharacter))&&($e.undefined(i.endCharacter)||$e.uinteger(i.endCharacter))&&($e.undefined(i.kind)||$e.string(i.kind));}o(r,"is"),t.is=r;})(Yle||(Yle={}));(function(t){function e(n,i){return{location:n,message:i};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.defined(i)&&SE.is(i.location)&&$e.string(i.message);}o(r,"is"),t.is=r;})(BM||(BM={}));(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4;})(Xle||(Xle={}));(function(t){t.Unnecessary=1,t.Deprecated=2;})(jle||(jle={}));(function(t){function e(r){let n=r;return $e.objectLiteral(n)&&$e.string(n.href);}o(e,"is"),t.is=e;})(Kle||(Kle={}));(function(t){function e(n,i,a,s,l,u){let h={range:n,message:i};return $e.defined(a)&&(h.severity=a),$e.defined(s)&&(h.code=s),$e.defined(l)&&(h.source=l),$e.defined(u)&&(h.relatedInformation=u),h;}o(e,"create"),t.create=e;function r(n){var i;let a=n;return $e.defined(a)&&Pr.is(a.range)&&$e.string(a.message)&&($e.number(a.severity)||$e.undefined(a.severity))&&($e.integer(a.code)||$e.string(a.code)||$e.undefined(a.code))&&($e.undefined(a.codeDescription)||$e.string((i=a.codeDescription)===null||i===void 0?void 0:i.href))&&($e.string(a.source)||$e.undefined(a.source))&&($e.undefined(a.relatedInformation)||$e.typedArray(a.relatedInformation,BM.is));}o(r,"is"),t.is=r;})(CE||(CE={}));(function(t){function e(n,i,...a){let s={title:n,command:i};return $e.defined(a)&&a.length>0&&(s.arguments=a),s;}o(e,"create"),t.create=e;function r(n){let i=n;return $e.defined(i)&&$e.string(i.title)&&$e.string(i.command);}o(r,"is"),t.is=r;})(a1||(a1={}));(function(t){function e(a,s){return{range:a,newText:s};}o(e,"replace"),t.replace=e;function r(a,s){return{range:{start:a,end:a},newText:s};}o(r,"insert"),t.insert=r;function n(a){return{range:a,newText:""};}o(n,"del"),t.del=n;function i(a){let s=a;return $e.objectLiteral(s)&&$e.string(s.newText)&&Pr.is(s.range);}o(i,"is"),t.is=i;})(s1||(s1={}));(function(t){function e(n,i,a){let s={label:n};return i!==void 0&&(s.needsConfirmation=i),a!==void 0&&(s.description=a),s;}o(e,"create"),t.create=e;function r(n){let i=n;return $e.objectLiteral(i)&&$e.string(i.label)&&($e.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&($e.string(i.description)||i.description===void 0);}o(r,"is"),t.is=r;})(FM||(FM={}));(function(t){function e(r){let n=r;return $e.string(n);}o(e,"is"),t.is=e;})(o1||(o1={}));(function(t){function e(a,s,l){return{range:a,newText:s,annotationId:l};}o(e,"replace"),t.replace=e;function r(a,s,l){return{range:{start:a,end:a},newText:s,annotationId:l};}o(r,"insert"),t.insert=r;function n(a,s){return{range:a,newText:"",annotationId:s};}o(n,"del"),t.del=n;function i(a){let s=a;return s1.is(s)&&(FM.is(s.annotationId)||o1.is(s.annotationId));}o(i,"is"),t.is=i;})(Qle||(Qle={}));(function(t){function e(n,i){return{textDocument:n,edits:i};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.defined(i)&&HM.is(i.textDocument)&&Array.isArray(i.edits);}o(r,"is"),t.is=r;})($M||($M={}));(function(t){function e(n,i,a){let s={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),a!==void 0&&(s.annotationId=a),s;}o(e,"create"),t.create=e;function r(n){let i=n;return i&&i.kind==="create"&&$e.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||$e.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||$e.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||o1.is(i.annotationId));}o(r,"is"),t.is=r;})(zM||(zM={}));(function(t){function e(n,i,a,s){let l={kind:"rename",oldUri:n,newUri:i};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(l.options=a),s!==void 0&&(l.annotationId=s),l;}o(e,"create"),t.create=e;function r(n){let i=n;return i&&i.kind==="rename"&&$e.string(i.oldUri)&&$e.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||$e.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||$e.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||o1.is(i.annotationId));}o(r,"is"),t.is=r;})(GM||(GM={}));(function(t){function e(n,i,a){let s={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),a!==void 0&&(s.annotationId=a),s;}o(e,"create"),t.create=e;function r(n){let i=n;return i&&i.kind==="delete"&&$e.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||$e.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||$e.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||o1.is(i.annotationId));}o(r,"is"),t.is=r;})(VM||(VM={}));(function(t){function e(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>$e.string(i.kind)?zM.is(i)||GM.is(i)||VM.is(i):$M.is(i)));}o(e,"is"),t.is=e;})(UM||(UM={}));(function(t){function e(n){return{uri:n};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.defined(i)&&$e.string(i.uri);}o(r,"is"),t.is=r;})(Zle||(Zle={}));(function(t){function e(n,i){return{uri:n,version:i};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.defined(i)&&$e.string(i.uri)&&$e.integer(i.version);}o(r,"is"),t.is=r;})(Jle||(Jle={}));(function(t){function e(n,i){return{uri:n,version:i};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.defined(i)&&$e.string(i.uri)&&(i.version===null||$e.integer(i.version));}o(r,"is"),t.is=r;})(HM||(HM={}));(function(t){function e(n,i,a,s){return{uri:n,languageId:i,version:a,text:s};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.defined(i)&&$e.string(i.uri)&&$e.string(i.languageId)&&$e.integer(i.version)&&$e.string(i.text);}o(r,"is"),t.is=r;})(ece||(ece={}));(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(r){let n=r;return n===t.PlainText||n===t.Markdown;}o(e,"is"),t.is=e;})(WM||(WM={}));(function(t){function e(r){let n=r;return $e.objectLiteral(r)&&WM.is(n.kind)&&$e.string(n.value);}o(e,"is"),t.is=e;})(Mx||(Mx={}));(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25;})(tce||(tce={}));(function(t){t.PlainText=1,t.Snippet=2;})(rce||(rce={}));(function(t){t.Deprecated=1;})(nce||(nce={}));(function(t){function e(n,i,a){return{newText:n,insert:i,replace:a};}o(e,"create"),t.create=e;function r(n){let i=n;return i&&$e.string(i.newText)&&Pr.is(i.insert)&&Pr.is(i.replace);}o(r,"is"),t.is=r;})(ice||(ice={}));(function(t){t.asIs=1,t.adjustIndentation=2;})(ace||(ace={}));(function(t){function e(r){let n=r;return n&&($e.string(n.detail)||n.detail===void 0)&&($e.string(n.description)||n.description===void 0);}o(e,"is"),t.is=e;})(sce||(sce={}));(function(t){function e(r){return{label:r};}o(e,"create"),t.create=e;})(oce||(oce={}));(function(t){function e(r,n){return{items:r||[],isIncomplete:!!n};}o(e,"create"),t.create=e;})(lce||(lce={}));(function(t){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&");}o(e,"fromPlainText"),t.fromPlainText=e;function r(n){let i=n;return $e.string(i)||$e.objectLiteral(i)&&$e.string(i.language)&&$e.string(i.value);}o(r,"is"),t.is=r;})(AE||(AE={}));(function(t){function e(r){let n=r;return!!n&&$e.objectLiteral(n)&&(Mx.is(n.contents)||AE.is(n.contents)||$e.typedArray(n.contents,AE.is))&&(r.range===void 0||Pr.is(r.range));}o(e,"is"),t.is=e;})(cce||(cce={}));(function(t){function e(r,n){return n?{label:r,documentation:n}:{label:r};}o(e,"create"),t.create=e;})(uce||(uce={}));(function(t){function e(r,n,...i){let a={label:r};return $e.defined(n)&&(a.documentation=n),$e.defined(i)?a.parameters=i:a.parameters=[],a;}o(e,"create"),t.create=e;})(hce||(hce={}));(function(t){t.Text=1,t.Read=2,t.Write=3;})(fce||(fce={}));(function(t){function e(r,n){let i={range:r};return $e.number(n)&&(i.kind=n),i;}o(e,"create"),t.create=e;})(dce||(dce={}));(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26;})(pce||(pce={}));(function(t){t.Deprecated=1;})(mce||(mce={}));(function(t){function e(r,n,i,a,s){let l={name:r,kind:n,location:{uri:a,range:i}};return s&&(l.containerName=s),l;}o(e,"create"),t.create=e;})(gce||(gce={}));(function(t){function e(r,n,i,a){return a!==void 0?{name:r,kind:n,location:{uri:i,range:a}}:{name:r,kind:n,location:{uri:i}};}o(e,"create"),t.create=e;})(yce||(yce={}));(function(t){function e(n,i,a,s,l,u){let h={name:n,detail:i,kind:a,range:s,selectionRange:l};return u!==void 0&&(h.children=u),h;}o(e,"create"),t.create=e;function r(n){let i=n;return i&&$e.string(i.name)&&$e.number(i.kind)&&Pr.is(i.range)&&Pr.is(i.selectionRange)&&(i.detail===void 0||$e.string(i.detail))&&(i.deprecated===void 0||$e.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags));}o(r,"is"),t.is=r;})(vce||(vce={}));(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll";})(xce||(xce={}));(function(t){t.Invoked=1,t.Automatic=2;})(_E||(_E={}));(function(t){function e(n,i,a){let s={diagnostics:n};return i!=null&&(s.only=i),a!=null&&(s.triggerKind=a),s;}o(e,"create"),t.create=e;function r(n){let i=n;return $e.defined(i)&&$e.typedArray(i.diagnostics,CE.is)&&(i.only===void 0||$e.typedArray(i.only,$e.string))&&(i.triggerKind===void 0||i.triggerKind===_E.Invoked||i.triggerKind===_E.Automatic);}o(r,"is"),t.is=r;})(bce||(bce={}));(function(t){function e(n,i,a){let s={title:n},l=!0;return typeof i=="string"?(l=!1,s.kind=i):a1.is(i)?s.command=i:s.edit=i,l&&a!==void 0&&(s.kind=a),s;}o(e,"create"),t.create=e;function r(n){let i=n;return i&&$e.string(i.title)&&(i.diagnostics===void 0||$e.typedArray(i.diagnostics,CE.is))&&(i.kind===void 0||$e.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||a1.is(i.command))&&(i.isPreferred===void 0||$e.boolean(i.isPreferred))&&(i.edit===void 0||UM.is(i.edit));}o(r,"is"),t.is=r;})(Tce||(Tce={}));(function(t){function e(n,i){let a={range:n};return $e.defined(i)&&(a.data=i),a;}o(e,"create"),t.create=e;function r(n){let i=n;return $e.defined(i)&&Pr.is(i.range)&&($e.undefined(i.command)||a1.is(i.command));}o(r,"is"),t.is=r;})(wce||(wce={}));(function(t){function e(n,i){return{tabSize:n,insertSpaces:i};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.defined(i)&&$e.uinteger(i.tabSize)&&$e.boolean(i.insertSpaces);}o(r,"is"),t.is=r;})(kce||(kce={}));(function(t){function e(n,i,a){return{range:n,target:i,data:a};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.defined(i)&&Pr.is(i.range)&&($e.undefined(i.target)||$e.string(i.target));}o(r,"is"),t.is=r;})(Ece||(Ece={}));(function(t){function e(n,i){return{range:n,parent:i};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.objectLiteral(i)&&Pr.is(i.range)&&(i.parent===void 0||t.is(i.parent));}o(r,"is"),t.is=r;})(Sce||(Sce={}));(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator";})(Cce||(Cce={}));(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary";})(Ace||(Ace={}));(function(t){function e(r){let n=r;return $e.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number");}o(e,"is"),t.is=e;})(_ce||(_ce={}));(function(t){function e(n,i){return{range:n,text:i};}o(e,"create"),t.create=e;function r(n){let i=n;return i!=null&&Pr.is(i.range)&&$e.string(i.text);}o(r,"is"),t.is=r;})(Dce||(Dce={}));(function(t){function e(n,i,a){return{range:n,variableName:i,caseSensitiveLookup:a};}o(e,"create"),t.create=e;function r(n){let i=n;return i!=null&&Pr.is(i.range)&&$e.boolean(i.caseSensitiveLookup)&&($e.string(i.variableName)||i.variableName===void 0);}o(r,"is"),t.is=r;})(Lce||(Lce={}));(function(t){function e(n,i){return{range:n,expression:i};}o(e,"create"),t.create=e;function r(n){let i=n;return i!=null&&Pr.is(i.range)&&($e.string(i.expression)||i.expression===void 0);}o(r,"is"),t.is=r;})(Rce||(Rce={}));(function(t){function e(n,i){return{frameId:n,stoppedLocation:i};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.defined(i)&&Pr.is(n.stoppedLocation);}o(r,"is"),t.is=r;})(Nce||(Nce={}));(function(t){t.Type=1,t.Parameter=2;function e(r){return r===1||r===2;}o(e,"is"),t.is=e;})(qM||(qM={}));(function(t){function e(n){return{value:n};}o(e,"create"),t.create=e;function r(n){let i=n;return $e.objectLiteral(i)&&(i.tooltip===void 0||$e.string(i.tooltip)||Mx.is(i.tooltip))&&(i.location===void 0||SE.is(i.location))&&(i.command===void 0||a1.is(i.command));}o(r,"is"),t.is=r;})(YM||(YM={}));(function(t){function e(n,i,a){let s={position:n,label:i};return a!==void 0&&(s.kind=a),s;}o(e,"create"),t.create=e;function r(n){let i=n;return $e.objectLiteral(i)&&Xr.is(i.position)&&($e.string(i.label)||$e.typedArray(i.label,YM.is))&&(i.kind===void 0||qM.is(i.kind))&&i.textEdits===void 0||$e.typedArray(i.textEdits,s1.is)&&(i.tooltip===void 0||$e.string(i.tooltip)||Mx.is(i.tooltip))&&(i.paddingLeft===void 0||$e.boolean(i.paddingLeft))&&(i.paddingRight===void 0||$e.boolean(i.paddingRight));}o(r,"is"),t.is=r;})(Mce||(Mce={}));(function(t){function e(r){return{kind:"snippet",value:r};}o(e,"createSnippet"),t.createSnippet=e;})(Ice||(Ice={}));(function(t){function e(r,n,i,a){return{insertText:r,filterText:n,range:i,command:a};}o(e,"create"),t.create=e;})(Oce||(Oce={}));(function(t){function e(r){return{items:r};}o(e,"create"),t.create=e;})(Pce||(Pce={}));(function(t){t.Invoked=0,t.Automatic=1;})(Bce||(Bce={}));(function(t){function e(r,n){return{range:r,text:n};}o(e,"create"),t.create=e;})(Fce||(Fce={}));(function(t){function e(r,n){return{triggerKind:r,selectedCompletionInfo:n};}o(e,"create"),t.create=e;})($ce||($ce={}));(function(t){function e(r){let n=r;return $e.objectLiteral(n)&&OM.is(n.uri)&&$e.string(n.name);}o(e,"is"),t.is=e;})(zce||(zce={}));(function(t){function e(a,s,l,u){return new XM(a,s,l,u);}o(e,"create"),t.create=e;function r(a){let s=a;return!!($e.defined(s)&&$e.string(s.uri)&&($e.undefined(s.languageId)||$e.string(s.languageId))&&$e.uinteger(s.lineCount)&&$e.func(s.getText)&&$e.func(s.positionAt)&&$e.func(s.offsetAt));}o(r,"is"),t.is=r;function n(a,s){let l=a.getText(),u=i(s,(f,d)=>{let p=f.range.start.line-d.range.start.line;return p===0?f.range.start.character-d.range.start.character:p;}),h=l.length;for(let f=u.length-1;f>=0;f--){let d=u[f],p=a.offsetAt(d.range.start),m=a.offsetAt(d.range.end);if(m<=h)l=l.substring(0,p)+d.newText+l.substring(m,l.length);else throw new Error("Overlapping edit");h=p;}return l;}o(n,"applyEdits"),t.applyEdits=n;function i(a,s){if(a.length<=1)return a;let l=a.length/2|0,u=a.slice(0,l),h=a.slice(l);i(u,s),i(h,s);let f=0,d=0,p=0;for(;f<u.length&&d<h.length;)s(u[f],h[d])<=0?a[p++]=u[f++]:a[p++]=h[d++];for(;f<u.length;)a[p++]=u[f++];for(;d<h.length;)a[p++]=h[d++];return a;}o(i,"mergeSort");})(Gce||(Gce={}));XM=(_Class111=class XM{constructor(e,r,n,i){this._uri=e,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0;}get uri(){return this._uri;}get languageId(){return this._languageId;}get version(){return this._version;}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n);}return this._content;}update(e,r){this._content=e.text,this._version=r,this._lineOffsets=void 0;}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],r=this._content,n=!0;for(let i=0;i<r.length;i++){n&&(e.push(i),n=!1);let a=r.charAt(i);n=a==="\r"||a===`
`,a==="\r"&&i+1<r.length&&r.charAt(i+1)===`
`&&i++;}n&&r.length>0&&e.push(r.length),this._lineOffsets=e;}return this._lineOffsets;}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return Xr.create(0,e);for(;n<i;){let s=Math.floor((n+i)/2);r[s]>e?i=s:n=s+1;}let a=n-1;return Xr.create(a,e-r[a]);}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line],i=e.line+1<r.length?r[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n);}get lineCount(){return this.getLineOffsets().length;}},o(_Class111,"FullTextDocument"),_Class111);(function(t){let e=Object.prototype.toString;function r(m){return typeof m<"u";}o(r,"defined"),t.defined=r;function n(m){return typeof m>"u";}o(n,"undefined"),t.undefined=n;function i(m){return m===!0||m===!1;}o(i,"boolean"),t.boolean=i;function a(m){return e.call(m)==="[object String]";}o(a,"string"),t.string=a;function s(m){return e.call(m)==="[object Number]";}o(s,"number"),t.number=s;function l(m,g,y){return e.call(m)==="[object Number]"&&g<=m&&m<=y;}o(l,"numberRange"),t.numberRange=l;function u(m){return e.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647;}o(u,"integer"),t.integer=u;function h(m){return e.call(m)==="[object Number]"&&0<=m&&m<=2147483647;}o(h,"uinteger"),t.uinteger=h;function f(m){return e.call(m)==="[object Function]";}o(f,"func"),t.func=f;function d(m){return m!==null&&typeof m=="object";}o(d,"objectLiteral"),t.objectLiteral=d;function p(m,g){return Array.isArray(m)&&m.every(g);}o(p,"typedArray"),t.typedArray=p;})($e||($e={}));});var Ix,Ox,bp,Tp,KM,l1,DE=N(()=>{"use strict";var _Class112,_Class113,_Class114,_Class115,_t9,_Class116;jM();Ml();Ix=(_Class112=class Ix{constructor(){this.nodeStack=[];}get current(){var e;return(e=this.nodeStack[this.nodeStack.length-1])!==null&&e!==void 0?e:this.rootNode;}buildRootNode(e){return this.rootNode=new l1(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode;}buildCompositeNode(e){let r=new Tp();return r.grammarSource=e,r.root=this.rootNode,this.current.content.push(r),this.nodeStack.push(r),r;}buildLeafNode(e,r){let n=new bp(e.startOffset,e.image.length,Hm(e),e.tokenType,!r);return n.grammarSource=r,n.root=this.rootNode,this.current.content.push(n),n;}removeNode(e){let r=e.container;if(r){let n=r.content.indexOf(e);n>=0&&r.content.splice(n,1);}}addHiddenNodes(e){let r=[];for(let a of e){let s=new bp(a.startOffset,a.image.length,Hm(a),a.tokenType,!0);s.root=this.rootNode,r.push(s);}let n=this.current,i=!1;if(n.content.length>0){n.content.push(...r);return;}for(;n.container;){let a=n.container.content.indexOf(n);if(a>0){n.container.content.splice(a,0,...r),i=!0;break;}n=n.container;}i||this.rootNode.content.unshift(...r);}construct(e){let r=this.current;typeof e.$type=="string"&&(this.current.astNode=e),e.$cstNode=r;let n=this.nodeStack.pop();(n===null||n===void 0?void 0:n.content.length)===0&&this.removeNode(n);}},o(_Class112,"CstNodeBuilder"),_Class112),Ox=(_Class113=class Ox{get parent(){return this.container;}get feature(){return this.grammarSource;}get hidden(){return!1;}get astNode(){var e,r;let n=typeof((e=this._astNode)===null||e===void 0?void 0:e.$type)=="string"?this._astNode:(r=this.container)===null||r===void 0?void 0:r.astNode;if(!n)throw new Error("This node has no associated AST element");return n;}set astNode(e){this._astNode=e;}get element(){return this.astNode;}get text(){return this.root.fullText.substring(this.offset,this.end);}},o(_Class113,"AbstractCstNode"),_Class113),bp=(_Class114=class bp extends Ox{get offset(){return this._offset;}get length(){return this._length;}get end(){return this._offset+this._length;}get hidden(){return this._hidden;}get tokenType(){return this._tokenType;}get range(){return this._range;}constructor(e,r,n,i,a=!1){super(),this._hidden=a,this._offset=e,this._tokenType=i,this._length=r,this._range=n;}},o(_Class114,"LeafCstNodeImpl"),_Class114),Tp=(_Class115=class Tp extends Ox{constructor(){super(...arguments),this.content=new KM(this);}get children(){return this.content;}get offset(){var e,r;return(r=(e=this.firstNonHiddenNode)===null||e===void 0?void 0:e.offset)!==null&&r!==void 0?r:0;}get length(){return this.end-this.offset;}get end(){var e,r;return(r=(e=this.lastNonHiddenNode)===null||e===void 0?void 0:e.end)!==null&&r!==void 0?r:0;}get range(){let e=this.firstNonHiddenNode,r=this.lastNonHiddenNode;if(e&&r){if(this._rangeCache===void 0){let{range:n}=e,{range:i}=r;this._rangeCache={start:n.start,end:i.end.line<n.start.line?n.start:i.end};}return this._rangeCache;}else return{start:Xr.create(0,0),end:Xr.create(0,0)};}get firstNonHiddenNode(){for(let e of this.content)if(!e.hidden)return e;return this.content[0];}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){let r=this.content[e];if(!r.hidden)return r;}return this.content[this.content.length-1];}},o(_Class115,"CompositeCstNodeImpl"),_Class115),KM=(_t9=class t extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype);}push(...e){return this.addParents(e),super.push(...e);}unshift(...e){return this.addParents(e),super.unshift(...e);}splice(e,r,...n){return this.addParents(n),super.splice(e,r,...n);}addParents(e){for(let r of e)r.container=this.parent;}},o(_t9,"CstNodeContainer"),_t9),l1=(_Class116=class l1 extends Tp{get text(){return this._text.substring(this.offset,this.end);}get fullText(){return this._text;}constructor(e){super(),this._text="",this._text=e!==null&&e!==void 0?e:"";}},o(_Class116,"RootCstNodeImpl"),_Class116);});function QM(t){return t.$type===LE;}var LE,Vce,Uce,Px,Bx,RE,c1,Fx,w$e,ZM,$x=N(()=>{"use strict";var _Class117,_Class118,_Class119,_Class120,_Class121,_Class122;hf();zle();Ic();Pl();as();DE();LE=Symbol("Datatype");o(QM,"isDataTypeNode");Vce="\u200B",Uce=o(t=>t.endsWith(Vce)?t:t+Vce,"withRuleSuffix"),Px=(_Class117=class Px{constructor(e){this._unorderedGroups=new Map(),this.allRules=new Map(),this.lexer=e.parser.Lexer;let r=this.lexer.definition,n=e.LanguageMetaData.mode==="production";this.wrapper=new ZM(r,Object.assign(Object.assign({},e.parser.ParserConfig),{skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider}));}alternatives(e,r){this.wrapper.wrapOr(e,r);}optional(e,r){this.wrapper.wrapOption(e,r);}many(e,r){this.wrapper.wrapMany(e,r);}atLeastOne(e,r){this.wrapper.wrapAtLeastOne(e,r);}getRule(e){return this.allRules.get(e);}isRecording(){return this.wrapper.IS_RECORDING;}get unorderedGroups(){return this._unorderedGroups;}getRuleStack(){return this.wrapper.RULE_STACK;}finalize(){this.wrapper.wrapSelfAnalysis();}},o(_Class117,"AbstractLangiumParser"),_Class117),Bx=(_Class118=class Bx extends Px{get current(){return this.stack[this.stack.length-1];}constructor(e){super(e),this.nodeBuilder=new Ix(),this.stack=[],this.assignmentMap=new Map(),this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection;}rule(e,r){let n=this.computeRuleType(e),i=this.wrapper.DEFINE_RULE(Uce(e.name),this.startImplementation(n,r).bind(this));return this.allRules.set(e.name,i),e.entry&&(this.mainRule=i),i;}computeRuleType(e){if(!e.fragment){if(ox(e))return LE;{let r=Ig(e);return r!==null&&r!==void 0?r:e.name;}}}parse(e,r={}){this.nodeBuilder.buildRootNode(e);let n=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=n.tokens;let i=r.rule?this.allRules.get(r.rule):this.mainRule;if(!i)throw new Error(r.rule?`No rule found with name '${r.rule}'`:"No main rule available.");let a=i.call(this.wrapper,{});return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,{value:a,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors};}startImplementation(e,r){return n=>{let i=!this.isRecording()&&e!==void 0;if(i){let s={$type:e};this.stack.push(s),e===LE&&(s.value="");}let a;try{a=r(n);}catch{a=void 0;}return a===void 0&&i&&(a=this.construct()),a;};}extractHiddenTokens(e){let r=this.lexerResult.hidden;if(!r.length)return[];let n=e.startOffset;for(let i=0;i<r.length;i++)if(r[i].startOffset>n)return r.splice(0,i);return r.splice(0,r.length);}consume(e,r,n){let i=this.wrapper.wrapConsume(e,r);if(!this.isRecording()&&this.isValidToken(i)){let a=this.extractHiddenTokens(i);this.nodeBuilder.addHiddenNodes(a);let s=this.nodeBuilder.buildLeafNode(i,n),{assignment:l,isCrossRef:u}=this.getAssignment(n),h=this.current;if(l){let f=qo(n)?i.image:this.converter.convert(i.image,s);this.assign(l.operator,l.feature,f,s,u);}else if(QM(h)){let f=i.image;qo(n)||(f=this.converter.convert(f,s).toString()),h.value+=f;}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset);}subrule(e,r,n,i,a){let s;!this.isRecording()&&!n&&(s=this.nodeBuilder.buildCompositeNode(i));let l=this.wrapper.wrapSubrule(e,r,a);!this.isRecording()&&s&&s.length>0&&this.performSubruleAssignment(l,i,s);}performSubruleAssignment(e,r,n){let{assignment:i,isCrossRef:a}=this.getAssignment(r);if(i)this.assign(i.operator,i.feature,e,n,a);else if(!i){let s=this.current;if(QM(s))s.value+=e.toString();else if(typeof e=="object"&&e){let u=this.assignWithoutOverride(e,s);this.stack.pop(),this.stack.push(u);}}}action(e,r){if(!this.isRecording()){let n=this.current;if(r.feature&&r.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(n.$cstNode);let a={$type:e};this.stack.push(a),this.assign(r.operator,r.feature,n,n.$cstNode,!1);}else n.$type=e;}}construct(){if(this.isRecording())return;let e=this.current;return Rk(e),this.nodeBuilder.construct(e),this.stack.pop(),QM(e)?this.converter.convert(e.value,e.$cstNode):(_N(this.astReflection,e),e);}getAssignment(e){if(!this.assignmentMap.has(e)){let r=op(e,Il);this.assignmentMap.set(e,{assignment:r,isCrossRef:r?sp(r.terminal):!1});}return this.assignmentMap.get(e);}assign(e,r,n,i,a){let s=this.current,l;switch(a&&typeof n=="string"?l=this.linker.buildReference(s,r,i,n):l=n,e){case"=":{s[r]=l;break;}case"?=":{s[r]=!0;break;}case"+=":Array.isArray(s[r])||(s[r]=[]),s[r].push(l);}}assignWithoutOverride(e,r){for(let[i,a]of Object.entries(r)){let s=e[i];s===void 0?e[i]=a:Array.isArray(s)&&Array.isArray(a)&&(a.push(...s),e[i]=a);}let n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e;}get definitionErrors(){return this.wrapper.definitionErrors;}},o(_Class118,"LangiumParser"),_Class118),RE=(_Class119=class RE{buildMismatchTokenMessage(e){return Vu.buildMismatchTokenMessage(e);}buildNotAllInputParsedMessage(e){return Vu.buildNotAllInputParsedMessage(e);}buildNoViableAltMessage(e){return Vu.buildNoViableAltMessage(e);}buildEarlyExitMessage(e){return Vu.buildEarlyExitMessage(e);}},o(_Class119,"AbstractParserErrorMessageProvider"),_Class119),c1=(_Class120=class c1 extends RE{buildMismatchTokenMessage({expected:e,actual:r}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${r.image}\`.`;}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`;}},o(_Class120,"LangiumParserErrorMessageProvider"),_Class120),Fx=(_Class121=class Fx extends Px{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0;}action(){}construct(){}parse(e){this.resetState();let r=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=r.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex};}rule(e,r){let n=this.wrapper.DEFINE_RULE(Uce(e.name),this.startImplementation(r).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n;}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0;}startImplementation(e){return r=>{let n=this.keepStackSize();try{e(r);}finally{this.resetStackSize(n);}};}removeUnexpectedElements(){this.elementStack.splice(this.stackSize);}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e;}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e;}consume(e,r,n){this.wrapper.wrapConsume(e,r),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1);}subrule(e,r,n,i,a){this.before(i),this.wrapper.wrapSubrule(e,r,a),this.after(i);}before(e){this.isRecording()||this.elementStack.push(e);}after(e){if(!this.isRecording()){let r=this.elementStack.lastIndexOf(e);r>=0&&this.elementStack.splice(r);}}get currIdx(){return this.wrapper.currIdx;}},o(_Class121,"LangiumCompletionParser"),_Class121),w$e={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new c1()},ZM=(_Class122=class ZM extends _x{constructor(e,r){let n=r&&"maxLookahead"in r;super(e,Object.assign(Object.assign(Object.assign({},w$e),{lookaheadStrategy:n?new Uu({maxLookahead:r.maxLookahead}):new Nx({logging:r.skipValidations?()=>{}:void 0})}),r));}get IS_RECORDING(){return this.RECORDING_PHASE;}DEFINE_RULE(e,r){return this.RULE(e,r);}wrapSelfAnalysis(){this.performSelfAnalysis();}wrapConsume(e,r){return this.consume(e,r);}wrapSubrule(e,r,n){return this.subrule(e,r,{ARGS:[n]});}wrapOr(e,r){this.or(e,r);}wrapOption(e,r){this.option(e,r);}wrapMany(e,r){this.many(e,r);}wrapAtLeastOne(e,r){this.atLeastOne(e,r);}},o(_Class122,"ChevrotainWrapper"),_Class122);});function zx(t,e,r){return k$e({parser:e,tokens:r,ruleNames:new Map()},t),e;}function k$e(t,e){let r=ax(e,!1),n=Jr(e.rules).filter(Ia).filter(i=>r.has(i));for(let i of n){let a=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});t.parser.rule(i,wp(a,i.definition));}}function wp(t,e,r=!1){let n;if(qo(e))n=L$e(t,e);else if(Ou(e))n=E$e(t,e);else if(Il(e))n=wp(t,e.terminal);else if(sp(e))n=Hce(t,e);else if(Ol(e))n=S$e(t,e);else if(_k(e))n=A$e(t,e);else if(Lk(e))n=_$e(t,e);else if(lf(e))n=D$e(t,e);else if(xN(e)){let i=t.consume++;n=o(()=>t.parser.consume(i,uo,e),"method");}else throw new ip(e.$cstNode,`Unexpected element type: ${e.$type}`);return Wce(t,r?void 0:NE(e),n,e.cardinality);}function E$e(t,e){let r=lx(e);return()=>t.parser.action(r,e);}function S$e(t,e){let r=e.rule.ref;if(Ia(r)){let n=t.subrule++,i=r.fragment,a=e.arguments.length>0?C$e(r,e.arguments):()=>({});return s=>t.parser.subrule(n,qce(t,r),i,e,a(s));}else if(lo(r)){let n=t.consume++,i=JM(t,r.name);return()=>t.parser.consume(n,i,e);}else if(r)Mc(r);else throw new ip(e.$cstNode,`Undefined rule: ${e.rule.$refText}`);}function C$e(t,e){let r=e.map(n=>Hu(n.value));return n=>{let i={};for(let a=0;a<r.length;a++){let s=t.parameters[a],l=r[a];i[s.name]=l(n);}return i;};}function Hu(t){if(fN(t)){let e=Hu(t.left),r=Hu(t.right);return n=>e(n)||r(n);}else if(hN(t)){let e=Hu(t.left),r=Hu(t.right);return n=>e(n)&&r(n);}else if(dN(t)){let e=Hu(t.value);return r=>!e(r);}else if(pN(t)){let e=t.parameter.ref.name;return r=>r!==void 0&&r[e]===!0;}else if(uN(t)){let e=!!t.true;return()=>e;}Mc(t);}function A$e(t,e){if(e.elements.length===1)return wp(t,e.elements[0]);{let r=[];for(let i of e.elements){let a={ALT:wp(t,i,!0)},s=NE(i);s&&(a.GATE=Hu(s)),r.push(a);}let n=t.or++;return i=>t.parser.alternatives(n,r.map(a=>{let s={ALT:o(()=>a.ALT(i),"ALT")},l=a.GATE;return l&&(s.GATE=()=>l(i)),s;}));}}function _$e(t,e){if(e.elements.length===1)return wp(t,e.elements[0]);let r=[];for(let l of e.elements){let u={ALT:wp(t,l,!0)},h=NE(l);h&&(u.GATE=Hu(h)),r.push(u);}let n=t.or++,i=o((l,u)=>{let h=u.getRuleStack().join("-");return`uGroup_${l}_${h}`;},"idFunc"),a=o(l=>t.parser.alternatives(n,r.map((u,h)=>{let f={ALT:o(()=>!0,"ALT")},d=t.parser;f.ALT=()=>{if(u.ALT(l),!d.isRecording()){let m=i(n,d);d.unorderedGroups.get(m)||d.unorderedGroups.set(m,[]);let g=d.unorderedGroups.get(m);typeof(g===null||g===void 0?void 0:g[h])>"u"&&(g[h]=!0);}};let p=u.GATE;return p?f.GATE=()=>p(l):f.GATE=()=>{let m=d.unorderedGroups.get(i(n,d));return!(m!==null&&m!==void 0&&m[h]);},f;})),"alternatives"),s=Wce(t,NE(e),a,"*");return l=>{s(l),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(n,t.parser));};}function D$e(t,e){let r=e.elements.map(n=>wp(t,n));return n=>r.forEach(i=>i(n));}function NE(t){if(lf(t))return t.guardCondition;}function Hce(t,e,r=e.terminal){if(r){if(Ol(r)&&Ia(r.rule.ref)){let n=r.rule.ref,i=t.subrule++;return a=>t.parser.subrule(i,qce(t,n),!1,e,a);}else if(Ol(r)&&lo(r.rule.ref)){let n=t.consume++,i=JM(t,r.rule.ref.name);return()=>t.parser.consume(n,i,e);}else if(qo(r)){let n=t.consume++,i=JM(t,r.value);return()=>t.parser.consume(n,i,e);}else throw new Error("Could not build cross reference parser");}else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);let n=Pk(e.type.ref),i=n===null||n===void 0?void 0:n.terminal;if(!i)throw new Error("Could not find name assignment for type: "+lx(e.type.ref));return Hce(t,e,i);}}function L$e(t,e){let r=t.consume++,n=t.tokens[e.value];if(!n)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(r,n,e);}function Wce(t,e,r,n){let i=e&&Hu(e);if(!n)if(i){let a=t.or++;return s=>t.parser.alternatives(a,[{ALT:o(()=>r(s),"ALT"),GATE:o(()=>i(s),"GATE")},{ALT:TE(),GATE:o(()=>!i(s),"GATE")}]);}else return r;if(n==="*"){let a=t.many++;return s=>t.parser.many(a,{DEF:o(()=>r(s),"DEF"),GATE:i?()=>i(s):void 0});}else if(n==="+"){let a=t.many++;if(i){let s=t.or++;return l=>t.parser.alternatives(s,[{ALT:o(()=>t.parser.atLeastOne(a,{DEF:o(()=>r(l),"DEF")}),"ALT"),GATE:o(()=>i(l),"GATE")},{ALT:TE(),GATE:o(()=>!i(l),"GATE")}]);}else return s=>t.parser.atLeastOne(a,{DEF:o(()=>r(s),"DEF")});}else if(n==="?"){let a=t.optional++;return s=>t.parser.optional(a,{DEF:o(()=>r(s),"DEF"),GATE:i?()=>i(s):void 0});}else Mc(n);}function qce(t,e){let r=R$e(t,e),n=t.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n;}function R$e(t,e){if(Ia(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let r=e,n=r.$container,i=e.$type;for(;!Ia(n);)(lf(n)||_k(n)||Lk(n))&&(i=n.elements.indexOf(r).toString()+":"+i),r=n,n=n.$container;return i=n.name+":"+i,t.ruleNames.set(e,i),i;}}function JM(t,e){let r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r;}var ME=N(()=>{"use strict";hf();Ic();kk();$s();Pl();o(zx,"createParser");o(k$e,"buildRules");o(wp,"buildElement");o(E$e,"buildAction");o(S$e,"buildRuleCall");o(C$e,"buildRuleCallPredicate");o(Hu,"buildPredicate");o(A$e,"buildAlternatives");o(_$e,"buildUnorderedGroup");o(D$e,"buildGroup");o(NE,"getGuardCondition");o(Hce,"buildCrossReference");o(L$e,"buildKeyword");o(Wce,"wrap");o(qce,"getRule");o(R$e,"getRuleName");o(JM,"getToken");});function eI(t){let e=t.Grammar,r=t.parser.Lexer,n=new Fx(t);return zx(e,n,r.definition),n.finalize(),n;}var tI=N(()=>{"use strict";$x();ME();o(eI,"createCompletionParser");});function rI(t){let e=Yce(t);return e.finalize(),e;}function Yce(t){let e=t.Grammar,r=t.parser.Lexer,n=new Bx(t);return zx(e,n,r.definition);}var nI=N(()=>{"use strict";$x();ME();o(rI,"createLangiumParser");o(Yce,"prepareLangiumParser");});var Wu,IE=N(()=>{"use strict";var _Class123;hf();Ic();as();Pl();Mg();$s();Wu=(_Class123=class Wu{constructor(){this.diagnostics=[];}buildTokens(e,r){let n=Jr(ax(e,!1)),i=this.buildTerminalTokens(n),a=this.buildKeywordTokens(n,i,r);return i.forEach(s=>{let l=s.PATTERN;typeof l=="object"&&l&&"test"in l&&Ng(l)?a.unshift(s):a.push(s);}),a;}flushLexingReport(e){return{diagnostics:this.popDiagnostics()};}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e;}buildTerminalTokens(e){return e.filter(lo).filter(r=>!r.fragment).map(r=>this.buildTerminalToken(r)).toArray();}buildTerminalToken(e){let r=Og(e),n=this.requiresCustomPattern(r)?this.regexPatternFunction(r):r,i={name:e.name,PATTERN:n};return typeof n=="function"&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=Ng(r)?Xn.SKIPPED:"hidden"),i;}requiresCustomPattern(e){return e.flags.includes("u")||e.flags.includes("s")?!0:!!(e.source.includes("?<=")||e.source.includes("?<!"));}regexPatternFunction(e){let r=new RegExp(e,e.flags+"y");return(n,i)=>(r.lastIndex=i,r.exec(n));}buildKeywordTokens(e,r,n){return e.filter(Ia).flatMap(i=>Oc(i).filter(qo)).distinct(i=>i.value).toArray().sort((i,a)=>a.value.length-i.value.length).map(i=>this.buildKeywordToken(i,r,!!(n!==null&&n!==void 0&&n.caseInsensitive)));}buildKeywordToken(e,r,n){let i=this.buildKeywordPattern(e,n),a={name:e.value,PATTERN:i,LONGER_ALT:this.findLongerAlt(e,r)};return typeof i=="function"&&(a.LINE_BREAKS=!0),a;}buildKeywordPattern(e,r){return r?new RegExp(ON(e.value)):e.value;}findLongerAlt(e,r){return r.reduce((n,i)=>{let a=i===null||i===void 0?void 0:i.PATTERN;return a!==null&&a!==void 0&&a.source&&PN("^"+a.source+"$",e.value)&&n.push(i),n;},[]);}},o(_Class123,"DefaultTokenBuilder"),_Class123);});var kp,Fc,iI=N(()=>{"use strict";var _Class124;Ic();Pl();kp=(_Class124=class kp{convert(e,r){let n=r.grammarSource;if(sp(n)&&(n=$N(n)),Ol(n)){let i=n.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,r);}return e;}runConverter(e,r,n){var i;switch(e.name.toUpperCase()){case"INT":return Fc.convertInt(r);case"STRING":return Fc.convertString(r);case"ID":return Fc.convertID(r);}switch((i=qN(e))===null||i===void 0?void 0:i.toLowerCase()){case"number":return Fc.convertNumber(r);case"boolean":return Fc.convertBoolean(r);case"bigint":return Fc.convertBigint(r);case"date":return Fc.convertDate(r);default:return r;}}},o(_Class124,"DefaultValueConverter"),_Class124);(function(t){function e(h){let f="";for(let d=1;d<h.length-1;d++){let p=h.charAt(d);if(p==="\\"){let m=h.charAt(++d);f+=r(m);}else f+=p;}return f;}o(e,"convertString"),t.convertString=e;function r(h){switch(h){case"b":return"\b";case"f":return"\f";case"n":return`
`;case"r":return"\r";case"t":return"	";case"v":return"\v";case"0":return"\0";default:return h;}}o(r,"convertEscapeCharacter");function n(h){return h.charAt(0)==="^"?h.substring(1):h;}o(n,"convertID"),t.convertID=n;function i(h){return parseInt(h);}o(i,"convertInt"),t.convertInt=i;function a(h){return BigInt(h);}o(a,"convertBigint"),t.convertBigint=a;function s(h){return new Date(h);}o(s,"convertDate"),t.convertDate=s;function l(h){return Number(h);}o(l,"convertNumber"),t.convertNumber=l;function u(h){return h.toLowerCase()==="true";}o(u,"convertBoolean"),t.convertBoolean=u;})(Fc||(Fc={}));});var lI=Ii(oI=>{"use strict";Object.defineProperty(oI,"__esModule",{value:!0});var aI;function sI(){if(aI===void 0)throw new Error("No runtime abstraction layer installed");return aI;}o(sI,"RAL");(function(t){function e(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");aI=r;}o(e,"install"),t.install=e;})(sI||(sI={}));oI.default=sI;});var Kce=Ii(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.stringArray=Pa.array=Pa.func=Pa.error=Pa.number=Pa.string=Pa.boolean=void 0;function N$e(t){return t===!0||t===!1;}o(N$e,"boolean");Pa.boolean=N$e;function Xce(t){return typeof t=="string"||t instanceof String;}o(Xce,"string");Pa.string=Xce;function M$e(t){return typeof t=="number"||t instanceof Number;}o(M$e,"number");Pa.number=M$e;function I$e(t){return t instanceof Error;}o(I$e,"error");Pa.error=I$e;function O$e(t){return typeof t=="function";}o(O$e,"func");Pa.func=O$e;function jce(t){return Array.isArray(t);}o(jce,"array");Pa.array=jce;function P$e(t){return jce(t)&&t.every(e=>Xce(e));}o(P$e,"stringArray");Pa.stringArray=P$e;});var uI=Ii(u1=>{"use strict";var _Class125,_t0;Object.defineProperty(u1,"__esModule",{value:!0});u1.Emitter=u1.Event=void 0;var B$e=lI(),Qce;(function(t){let e={dispose(){}};t.None=function(){return e;};})(Qce||(u1.Event=Qce={}));var cI=(_Class125=class cI{add(e,r=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(r),Array.isArray(n)&&n.push({dispose:o(()=>this.remove(e,r),"dispose")});}remove(e,r=null){if(!this._callbacks)return;let n=!1;for(let i=0,a=this._callbacks.length;i<a;i++)if(this._callbacks[i]===e)if(this._contexts[i]===r){this._callbacks.splice(i,1),this._contexts.splice(i,1);return;}else n=!0;if(n)throw new Error("When adding a listener with a context, you should remove it with the same context");}invoke(...e){if(!this._callbacks)return[];let r=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let a=0,s=n.length;a<s;a++)try{r.push(n[a].apply(i[a],e));}catch(l){(0,B$e.default)().console.error(l);}return r;}isEmpty(){return!this._callbacks||this._callbacks.length===0;}dispose(){this._callbacks=void 0,this._contexts=void 0;}},o(_Class125,"CallbackList"),_Class125),OE=(_t0=class t{constructor(e){this._options=e;}get event(){return this._event||(this._event=(e,r,n)=>{this._callbacks||(this._callbacks=new cI()),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,r);let i={dispose:o(()=>{this._callbacks&&(this._callbacks.remove(e,r),i.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this));},"dispose")};return Array.isArray(n)&&n.push(i),i;}),this._event;}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e);}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0);}},o(_t0,"Emitter"),_t0);u1.Emitter=OE;OE._noop=function(){};});var Zce=Ii(h1=>{"use strict";var _Class126,_Class127;Object.defineProperty(h1,"__esModule",{value:!0});h1.CancellationTokenSource=h1.CancellationToken=void 0;var F$e=lI(),$$e=Kce(),hI=uI(),PE;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:hI.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:hI.Event.None});function e(r){let n=r;return n&&(n===t.None||n===t.Cancelled||$$e.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested);}o(e,"is"),t.is=e;})(PE||(h1.CancellationToken=PE={}));var z$e=Object.freeze(function(t,e){let r=(0,F$e.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose();}};}),BE=(_Class126=class BE{constructor(){this._isCancelled=!1;}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()));}get isCancellationRequested(){return this._isCancelled;}get onCancellationRequested(){return this._isCancelled?z$e:(this._emitter||(this._emitter=new hI.Emitter()),this._emitter.event);}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0);}},o(_Class126,"MutableToken"),_Class126),fI=(_Class127=class fI{get token(){return this._token||(this._token=new BE()),this._token;}cancel(){this._token?this._token.cancel():this._token=PE.Cancelled;}dispose(){this._token?this._token instanceof BE&&this._token.dispose():this._token=PE.None;}},o(_Class127,"CancellationTokenSource"),_Class127);h1.CancellationTokenSource=fI;});var vr={};var Xo=N(()=>{"use strict";Sr(vr,Sa(Zce(),1));});function dI(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t);});}function $E(){return FE=performance.now(),new vr.CancellationTokenSource();}function eue(t){Jce=t;}function zc(t){return t===$c;}async function Ti(t){if(t===vr.CancellationToken.None)return;let e=performance.now();if(e-FE>=Jce&&(FE=e,await dI(),FE=performance.now()),t.isCancellationRequested)throw $c;}var FE,Jce,$c,us,jo=N(()=>{"use strict";var _Class128;Xo();o(dI,"delayNextTick");FE=0,Jce=10;o($E,"startCancelableOperation");o(eue,"setInterruptionPeriod");$c=Symbol("OperationCancelled");o(zc,"isOperationCancelled");o(Ti,"interruptAndCheck");us=(_Class128=class us{constructor(){this.promise=new Promise((e,r)=>{this.resolve=n=>(e(n),this),this.reject=n=>(r(n),this);});}},o(_Class128,"Deferred"),_Class128);});function pI(t,e){if(t.length<=1)return t;let r=t.length/2|0,n=t.slice(0,r),i=t.slice(r);pI(n,e),pI(i,e);let a=0,s=0,l=0;for(;a<n.length&&s<i.length;)e(n[a],i[s])<=0?t[l++]=n[a++]:t[l++]=i[s++];for(;a<n.length;)t[l++]=n[a++];for(;s<i.length;)t[l++]=i[s++];return t;}function tue(t,e,r=0){let n=e?[r]:[];for(let i=0;i<t.length;i++){let a=t.charCodeAt(i);rue(a)&&(a===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,n.push(r+i+1));}return n;}function rue(t){return t===13||t===10;}function nue(t){let e=t.start,r=t.end;return e.line>r.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t;}function G$e(t){let e=nue(t.range);return e!==t.range?{newText:t.newText,range:e}:t;}var zE,f1,iue=N(()=>{"use strict";var _t1;zE=(_t1=class t{constructor(e,r,n,i){this._uri=e,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0;}get uri(){return this._uri;}get languageId(){return this._languageId;}get version(){return this._version;}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n);}return this._content;}update(e,r){for(let n of e)if(t.isIncremental(n)){let i=nue(n.range),a=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,a)+n.text+this._content.substring(s,this._content.length);let l=Math.max(i.start.line,0),u=Math.max(i.end.line,0),h=this._lineOffsets,f=tue(n.text,!1,a);if(u-l===f.length)for(let p=0,m=f.length;p<m;p++)h[p+l+1]=f[p];else f.length<1e4?h.splice(l+1,u-l,...f):this._lineOffsets=h=h.slice(0,l+1).concat(f,h.slice(u+1));let d=n.text.length-(s-a);if(d!==0)for(let p=l+1+f.length,m=h.length;p<m;p++)h[p]=h[p]+d;}else if(t.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r;}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=tue(this._content,!0)),this._lineOffsets;}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return{line:0,character:e};for(;n<i;){let s=Math.floor((n+i)/2);r[s]>e?i=s:n=s+1;}let a=n-1;return e=this.ensureBeforeEOL(e,r[a]),{line:a,character:e-r[a]};}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line];if(e.character<=0)return n;let i=e.line+1<r.length?r[e.line+1]:this._content.length,a=Math.min(n+e.character,i);return this.ensureBeforeEOL(a,n);}ensureBeforeEOL(e,r){for(;e>r&&rue(this._content.charCodeAt(e-1));)e--;return e;}get lineCount(){return this.getLineOffsets().length;}static isIncremental(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number");}static isFull(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0;}},o(_t1,"FullTextDocument"),_t1);(function(t){function e(i,a,s,l){return new zE(i,a,s,l);}o(e,"create"),t.create=e;function r(i,a,s){if(i instanceof zE)return i.update(a,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create");}o(r,"update"),t.update=r;function n(i,a){let s=i.getText(),l=pI(a.map(G$e),(f,d)=>{let p=f.range.start.line-d.range.start.line;return p===0?f.range.start.character-d.range.start.character:p;}),u=0,h=[];for(let f of l){let d=i.offsetAt(f.range.start);if(d<u)throw new Error("Overlapping edit");d>u&&h.push(s.substring(u,d)),f.newText.length&&h.push(f.newText),u=i.offsetAt(f.range.end);}return h.push(s.substr(u)),h.join("");}o(n,"applyEdits"),t.applyEdits=n;})(f1||(f1={}));o(pI,"mergeSort");o(tue,"computeLineOffsets");o(rue,"isEOL");o(nue,"getWellformedRange");o(G$e,"getWellformedEdit");});var aue,hs,d1,mI=N(()=>{"use strict";(()=>{"use strict";var t={470:i=>{function a(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u));}o(a,"e");function s(u,h){for(var f,d="",p=0,m=-1,g=0,y=0;y<=u.length;++y){if(y<u.length)f=u.charCodeAt(y);else{if(f===47)break;f=47;}if(f===47){if(!(m===y-1||g===1))if(m!==y-1&&g===2){if(d.length<2||p!==2||d.charCodeAt(d.length-1)!==46||d.charCodeAt(d.length-2)!==46){if(d.length>2){var v=d.lastIndexOf("/");if(v!==d.length-1){v===-1?(d="",p=0):p=(d=d.slice(0,v)).length-1-d.lastIndexOf("/"),m=y,g=0;continue;}}else if(d.length===2||d.length===1){d="",p=0,m=y,g=0;continue;}}h&&(d.length>0?d+="/..":d="..",p=2);}else d.length>0?d+="/"+u.slice(m+1,y):d=u.slice(m+1,y),p=y-m-1;m=y,g=0;}else f===46&&g!==-1?++g:g=-1;}return d;}o(s,"r");var l={resolve:o(function(){for(var u,h="",f=!1,d=arguments.length-1;d>=-1&&!f;d--){var p;d>=0?p=arguments[d]:(u===void 0&&(u=process.cwd()),p=u),a(p),p.length!==0&&(h=p+"/"+h,f=p.charCodeAt(0)===47);}return h=s(h,!f),f?h.length>0?"/"+h:"/":h.length>0?h:".";},"resolve"),normalize:o(function(u){if(a(u),u.length===0)return".";var h=u.charCodeAt(0)===47,f=u.charCodeAt(u.length-1)===47;return(u=s(u,!h)).length!==0||h||(u="."),u.length>0&&f&&(u+="/"),h?"/"+u:u;},"normalize"),isAbsolute:o(function(u){return a(u),u.length>0&&u.charCodeAt(0)===47;},"isAbsolute"),join:o(function(){if(arguments.length===0)return".";for(var u,h=0;h<arguments.length;++h){var f=arguments[h];a(f),f.length>0&&(u===void 0?u=f:u+="/"+f);}return u===void 0?".":l.normalize(u);},"join"),relative:o(function(u,h){if(a(u),a(h),u===h||(u=l.resolve(u))===(h=l.resolve(h)))return"";for(var f=1;f<u.length&&u.charCodeAt(f)===47;++f);for(var d=u.length,p=d-f,m=1;m<h.length&&h.charCodeAt(m)===47;++m);for(var g=h.length-m,y=p<g?p:g,v=-1,x=0;x<=y;++x){if(x===y){if(g>y){if(h.charCodeAt(m+x)===47)return h.slice(m+x+1);if(x===0)return h.slice(m+x);}else p>y&&(u.charCodeAt(f+x)===47?v=x:x===0&&(v=0));break;}var b=u.charCodeAt(f+x);if(b!==h.charCodeAt(m+x))break;b===47&&(v=x);}var T="";for(x=f+v+1;x<=d;++x)x!==d&&u.charCodeAt(x)!==47||(T.length===0?T+="..":T+="/..");return T.length>0?T+h.slice(m+v):(m+=v,h.charCodeAt(m)===47&&++m,h.slice(m));},"relative"),_makeLong:o(function(u){return u;},"_makeLong"),dirname:o(function(u){if(a(u),u.length===0)return".";for(var h=u.charCodeAt(0),f=h===47,d=-1,p=!0,m=u.length-1;m>=1;--m)if((h=u.charCodeAt(m))===47){if(!p){d=m;break;}}else p=!1;return d===-1?f?"/":".":f&&d===1?"//":u.slice(0,d);},"dirname"),basename:o(function(u,h){if(h!==void 0&&typeof h!="string")throw new TypeError('"ext" argument must be a string');a(u);var f,d=0,p=-1,m=!0;if(h!==void 0&&h.length>0&&h.length<=u.length){if(h.length===u.length&&h===u)return"";var g=h.length-1,y=-1;for(f=u.length-1;f>=0;--f){var v=u.charCodeAt(f);if(v===47){if(!m){d=f+1;break;}}else y===-1&&(m=!1,y=f+1),g>=0&&(v===h.charCodeAt(g)?--g==-1&&(p=f):(g=-1,p=y));}return d===p?p=y:p===-1&&(p=u.length),u.slice(d,p);}for(f=u.length-1;f>=0;--f)if(u.charCodeAt(f)===47){if(!m){d=f+1;break;}}else p===-1&&(m=!1,p=f+1);return p===-1?"":u.slice(d,p);},"basename"),extname:o(function(u){a(u);for(var h=-1,f=0,d=-1,p=!0,m=0,g=u.length-1;g>=0;--g){var y=u.charCodeAt(g);if(y!==47)d===-1&&(p=!1,d=g+1),y===46?h===-1?h=g:m!==1&&(m=1):h!==-1&&(m=-1);else if(!p){f=g+1;break;}}return h===-1||d===-1||m===0||m===1&&h===d-1&&h===f+1?"":u.slice(h,d);},"extname"),format:o(function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return function(h,f){var d=f.dir||f.root,p=f.base||(f.name||"")+(f.ext||"");return d?d===f.root?d+p:d+"/"+p:p;}(0,u);},"format"),parse:o(function(u){a(u);var h={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return h;var f,d=u.charCodeAt(0),p=d===47;p?(h.root="/",f=1):f=0;for(var m=-1,g=0,y=-1,v=!0,x=u.length-1,b=0;x>=f;--x)if((d=u.charCodeAt(x))!==47)y===-1&&(v=!1,y=x+1),d===46?m===-1?m=x:b!==1&&(b=1):m!==-1&&(b=-1);else if(!v){g=x+1;break;}return m===-1||y===-1||b===0||b===1&&m===y-1&&m===g+1?y!==-1&&(h.base=h.name=g===0&&p?u.slice(1,y):u.slice(g,y)):(g===0&&p?(h.name=u.slice(1,m),h.base=u.slice(1,y)):(h.name=u.slice(g,m),h.base=u.slice(g,y)),h.ext=u.slice(m,y)),g>0?h.dir=u.slice(0,g-1):p&&(h.dir="/"),h;},"parse"),sep:"/",delimiter:":",win32:null,posix:null};l.posix=l,i.exports=l;}},e={};function r(i){var a=e[i];if(a!==void 0)return a.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,r),s.exports;}o(r,"r"),r.d=(i,a)=>{for(var s in a)r.o(a,s)&&!r.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:a[s]});},r.o=(i,a)=>Object.prototype.hasOwnProperty.call(i,a),r.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0});};var n={};((_p2,_g2)=>{let i;r.r(n),r.d(n,{URI:o(()=>p,"URI"),Utils:o(()=>O,"Utils")}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let a=/^\w[\w\d+.-]*$/,s=/^\//,l=/^\/\//;function u(R,k){if(!R.scheme&&k)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${R.authority}", path: "${R.path}", query: "${R.query}", fragment: "${R.fragment}"}`);if(R.scheme&&!a.test(R.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(R.path){if(R.authority){if(!s.test(R.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');}else if(l.test(R.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');}}o(u,"s");let h="",f="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static isUri(k){return k instanceof p||!!k&&typeof k.authority=="string"&&typeof k.fragment=="string"&&typeof k.path=="string"&&typeof k.query=="string"&&typeof k.scheme=="string"&&typeof k.fsPath=="string"&&typeof k.with=="function"&&typeof k.toString=="function";}constructor(k,L,S,I,M,P=!1){typeof k=="object"?(this.scheme=k.scheme||h,this.authority=k.authority||h,this.path=k.path||h,this.query=k.query||h,this.fragment=k.fragment||h):(this.scheme=function(B,F){return B||F?B:"file";}(k,P),this.authority=L||h,this.path=function(B,F){switch(B){case"https":case"http":case"file":F?F[0]!==f&&(F=f+F):F=f;}return F;}(this.scheme,S||h),this.query=I||h,this.fragment=M||h,u(this,P));}get fsPath(){return b(this,!1);}with(k){if(!k)return this;let{scheme:L,authority:S,path:I,query:M,fragment:P}=k;return L===void 0?L=this.scheme:L===null&&(L=h),S===void 0?S=this.authority:S===null&&(S=h),I===void 0?I=this.path:I===null&&(I=h),M===void 0?M=this.query:M===null&&(M=h),P===void 0?P=this.fragment:P===null&&(P=h),L===this.scheme&&S===this.authority&&I===this.path&&M===this.query&&P===this.fragment?this:new g(L,S,I,M,P);}static parse(k,L=!1){let S=d.exec(k);return S?new g(S[2]||h,E(S[4]||h),E(S[5]||h),E(S[7]||h),E(S[9]||h),L):new g(h,h,h,h,h);}static file(k){let L=h;if(i&&(k=k.replace(/\\/g,f)),k[0]===f&&k[1]===f){let S=k.indexOf(f,2);S===-1?(L=k.substring(2),k=f):(L=k.substring(2,S),k=k.substring(S)||f);}return new g("file",L,k,h,h);}static from(k){let L=new g(k.scheme,k.authority,k.path,k.query,k.fragment);return u(L,!0),L;}toString(k=!1){return T(this,k);}toJSON(){return this;}static revive(k){if(k){if(k instanceof p)return k;{let L=new g(k);return L._formatted=k.external,L._fsPath=k._sep===m?k.fsPath:null,L;}}return k;}}_p2=p;o(_p2,"f");let m=i?1:void 0;class g extends p{constructor(...args){super(...args);_defineProperty(this,"_formatted",null);_defineProperty(this,"_fsPath",null);}get fsPath(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath;}toString(k=!1){return k?T(this,!0):(this._formatted||(this._formatted=T(this,!1)),this._formatted);}toJSON(){let k={$mid:1};return this._fsPath&&(k.fsPath=this._fsPath,k._sep=m),this._formatted&&(k.external=this._formatted),this.path&&(k.path=this.path),this.scheme&&(k.scheme=this.scheme),this.authority&&(k.authority=this.authority),this.query&&(k.query=this.query),this.fragment&&(k.fragment=this.fragment),k;}}_g2=g;o(_g2,"l");let y={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function v(R,k,L){let S,I=-1;for(let M=0;M<R.length;M++){let P=R.charCodeAt(M);if(P>=97&&P<=122||P>=65&&P<=90||P>=48&&P<=57||P===45||P===46||P===95||P===126||k&&P===47||L&&P===91||L&&P===93||L&&P===58)I!==-1&&(S+=encodeURIComponent(R.substring(I,M)),I=-1),S!==void 0&&(S+=R.charAt(M));else{S===void 0&&(S=R.substr(0,M));let B=y[P];B!==void 0?(I!==-1&&(S+=encodeURIComponent(R.substring(I,M)),I=-1),S+=B):I===-1&&(I=M);}}return I!==-1&&(S+=encodeURIComponent(R.substring(I))),S!==void 0?S:R;}o(v,"d");function x(R){let k;for(let L=0;L<R.length;L++){let S=R.charCodeAt(L);S===35||S===63?(k===void 0&&(k=R.substr(0,L)),k+=y[S]):k!==void 0&&(k+=R[L]);}return k!==void 0?k:R;}o(x,"p");function b(R,k){let L;return L=R.authority&&R.path.length>1&&R.scheme==="file"?`//${R.authority}${R.path}`:R.path.charCodeAt(0)===47&&(R.path.charCodeAt(1)>=65&&R.path.charCodeAt(1)<=90||R.path.charCodeAt(1)>=97&&R.path.charCodeAt(1)<=122)&&R.path.charCodeAt(2)===58?k?R.path.substr(1):R.path[1].toLowerCase()+R.path.substr(2):R.path,i&&(L=L.replace(/\//g,"\\")),L;}o(b,"m");function T(R,k){let L=k?x:v,S="",{scheme:I,authority:M,path:P,query:B,fragment:F}=R;if(I&&(S+=I,S+=":"),(M||I==="file")&&(S+=f,S+=f),M){let z=M.indexOf("@");if(z!==-1){let $=M.substr(0,z);M=M.substr(z+1),z=$.lastIndexOf(":"),z===-1?S+=L($,!1,!1):(S+=L($.substr(0,z),!1,!1),S+=":",S+=L($.substr(z+1),!1,!0)),S+="@";}M=M.toLowerCase(),z=M.lastIndexOf(":"),z===-1?S+=L(M,!1,!0):(S+=L(M.substr(0,z),!1,!0),S+=M.substr(z));}if(P){if(P.length>=3&&P.charCodeAt(0)===47&&P.charCodeAt(2)===58){let z=P.charCodeAt(1);z>=65&&z<=90&&(P=`/${String.fromCharCode(z+32)}:${P.substr(3)}`);}else if(P.length>=2&&P.charCodeAt(1)===58){let z=P.charCodeAt(0);z>=65&&z<=90&&(P=`${String.fromCharCode(z+32)}:${P.substr(2)}`);}S+=L(P,!0,!1);}return B&&(S+="?",S+=L(B,!1,!1)),F&&(S+="#",S+=k?F:v(F,!1,!1)),S;}o(T,"y");function C(R){try{return decodeURIComponent(R);}catch{return R.length>3?R.substr(0,3)+C(R.substr(3)):R;}}o(C,"v");let w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function E(R){return R.match(w)?R.replace(w,k=>C(k)):R;}o(E,"C");var _=r(470);let A=_.posix||_,D="/";var O;(function(R){R.joinPath=function(k,...L){return k.with({path:A.join(k.path,...L)});},R.resolvePath=function(k,...L){let S=k.path,I=!1;S[0]!==D&&(S=D+S,I=!0);let M=A.resolve(S,...L);return I&&M[0]===D&&!k.authority&&(M=M.substring(1)),k.with({path:M});},R.dirname=function(k){if(k.path.length===0||k.path===D)return k;let L=A.dirname(k.path);return L.length===1&&L.charCodeAt(0)===46&&(L=""),k.with({path:L});},R.basename=function(k){return A.basename(k.path);},R.extname=function(k){return A.extname(k.path);};})(O||(O={}));})(),aue=n;})();({URI:hs,Utils:d1}=aue);});var fs,Gc=N(()=>{"use strict";mI();(function(t){t.basename=d1.basename,t.dirname=d1.dirname,t.extname=d1.extname,t.joinPath=d1.joinPath,t.resolvePath=d1.resolvePath;function e(i,a){return(i===null||i===void 0?void 0:i.toString())===(a===null||a===void 0?void 0:a.toString());}o(e,"equals"),t.equals=e;function r(i,a){let s=typeof i=="string"?i:i.path,l=typeof a=="string"?a:a.path,u=s.split("/").filter(m=>m.length>0),h=l.split("/").filter(m=>m.length>0),f=0;for(;f<u.length&&u[f]===h[f];f++);let d="../".repeat(u.length-f),p=h.slice(f).join("/");return d+p;}o(r,"relative"),t.relative=r;function n(i){return hs.parse(i.toString()).toString();}o(n,"normalize"),t.normalize=n;})(fs||(fs={}));});var wn,Gx,Vx,p1=N(()=>{"use strict";var _Class129,_Class130;iue();p1();Xo();$s();Gc();(function(t){t[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated";})(wn||(wn={}));Gx=(_Class129=class Gx{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider;}async fromUri(e,r=vr.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,r);}fromTextDocument(e,r,n){return r=r!==null&&r!==void 0?r:hs.parse(e.uri),vr.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n);}fromString(e,r,n){return vr.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n);}fromModel(e,r){return this.create(r,{$model:e});}create(e,r,n){if(typeof r=="string"){let i=this.parse(e,r,n);return this.createLangiumDocument(i,e,void 0,r);}else if("$model"in r){let i={value:r.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(i,e);}else{let i=this.parse(e,r.getText(),n);return this.createLangiumDocument(i,e,r);}}async createAsync(e,r,n){if(typeof r=="string"){let i=await this.parseAsync(e,r,n);return this.createLangiumDocument(i,e,void 0,r);}else{let i=await this.parseAsync(e,r.getText(),n);return this.createLangiumDocument(i,e,r);}}createLangiumDocument(e,r,n,i){let a;if(n)a={parseResult:e,uri:r,state:wn.Parsed,references:[],textDocument:n};else{let s=this.createTextDocumentGetter(r,i);a={parseResult:e,uri:r,state:wn.Parsed,references:[],get textDocument(){return s();}};}return e.value.$document=a,a;}async update(e,r){var n,i;let a=(n=e.parseResult.value.$cstNode)===null||n===void 0?void 0:n.root.fullText,s=(i=this.textDocuments)===null||i===void 0?void 0:i.get(e.uri.toString()),l=s?s.getText():await this.fileSystemProvider.readFile(e.uri);if(s)Object.defineProperty(e,"textDocument",{value:s});else{let u=this.createTextDocumentGetter(e.uri,l);Object.defineProperty(e,"textDocument",{get:u});}return a!==l&&(e.parseResult=await this.parseAsync(e.uri,l,r),e.parseResult.value.$document=e),e.state=wn.Parsed,e;}parse(e,r,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(r,n);}parseAsync(e,r,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(r,n);}createTextDocumentGetter(e,r){let n=this.serviceRegistry,i;return()=>i!==null&&i!==void 0?i:i=f1.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,r!==null&&r!==void 0?r:"");}},o(_Class129,"DefaultLangiumDocumentFactory"),_Class129),Vx=(_Class130=class Vx{constructor(e){this.documentMap=new Map(),this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.serviceRegistry=e.ServiceRegistry;}get all(){return Jr(this.documentMap.values());}addDocument(e){let r=e.uri.toString();if(this.documentMap.has(r))throw new Error(`A document with the URI '${r}' is already present.`);this.documentMap.set(r,e);}getDocument(e){let r=e.toString();return this.documentMap.get(r);}async getOrCreateDocument(e,r){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,r),this.addDocument(n),n);}createDocument(e,r,n){if(n)return this.langiumDocumentFactory.fromString(r,e,n).then(i=>(this.addDocument(i),i));{let i=this.langiumDocumentFactory.fromString(r,e);return this.addDocument(i),i;}}hasDocument(e){return this.documentMap.has(e.toString());}invalidateDocument(e){let r=e.toString(),n=this.documentMap.get(r);return n&&(this.serviceRegistry.getServices(e).references.Linker.unlink(n),n.state=wn.Changed,n.precomputedScopes=void 0,n.diagnostics=void 0),n;}deleteDocument(e){let r=e.toString(),n=this.documentMap.get(r);return n&&(n.state=wn.Changed,this.documentMap.delete(r)),n;}},o(_Class130,"DefaultLangiumDocuments"),_Class130);});var gI,Ux,yI=N(()=>{"use strict";var _Class131;Xo();Nl();as();jo();p1();gI=Symbol("ref_resolving"),Ux=(_Class131=class Ux{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator;}async link(e,r=vr.CancellationToken.None){for(let n of Yo(e.parseResult.value))await Ti(r),Lg(n).forEach(i=>this.doLink(i,e));}doLink(e,r){var n;let i=e.reference;if(i._ref===void 0){i._ref=gI;try{let a=this.getCandidate(e);if(tp(a))i._ref=a;else if(i._nodeDescription=a,this.langiumDocuments().hasDocument(a.documentUri)){let s=this.loadAstNode(a);i._ref=s!==null&&s!==void 0?s:this.createLinkingError(e,a);}else i._ref=void 0;}catch(a){console.error(`An error occurred while resolving reference to '${i.$refText}':`,a);let s=(n=a.message)!==null&&n!==void 0?n:String(a);i._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${i.$refText}': ${s}`});}r.references.push(i);}}unlink(e){for(let r of e.references)delete r._ref,delete r._nodeDescription;e.references=[];}getCandidate(e){let n=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return n!==null&&n!==void 0?n:this.createLinkingError(e);}buildReference(e,r,n,i){let a=this,s={$refNode:n,$refText:i,get ref(){var l;if(si(this._ref))return this._ref;if(nN(this._nodeDescription)){let u=a.loadAstNode(this._nodeDescription);this._ref=u!==null&&u!==void 0?u:a.createLinkingError({reference:s,container:e,property:r},this._nodeDescription);}else if(this._ref===void 0){this._ref=gI;let u=J2(e).$document,h=a.getLinkedNode({reference:s,container:e,property:r});if(h.error&&u&&u.state<wn.ComputedScopes)return this._ref=void 0;this._ref=(l=h.node)!==null&&l!==void 0?l:h.error,this._nodeDescription=h.descr,u===null||u===void 0?void 0:u.references.push(this);}else if(this._ref===gI)throw new Error(`Cyclic reference resolution detected: ${a.astNodeLocator.getAstNodePath(e)}/${r} (symbol '${i}')`);return si(this._ref)?this._ref:void 0;},get $nodeDescription(){return this._nodeDescription;},get error(){return tp(this._ref)?this._ref:void 0;}};return s;}getLinkedNode(e){var r;try{let n=this.getCandidate(e);if(tp(n))return{error:n};let i=this.loadAstNode(n);return i?{node:i,descr:n}:{descr:n,error:this.createLinkingError(e,n)};}catch(n){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,n);let i=(r=n.message)!==null&&r!==void 0?r:String(n);return{error:Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${e.reference.$refText}': ${i}`})};}}loadAstNode(e){if(e.node)return e.node;let r=this.langiumDocuments().getDocument(e.documentUri);if(r)return this.astNodeLocator.getAstNode(r.parseResult.value,e.path);}createLinkingError(e,r){let n=J2(e.container).$document;n&&n.state<wn.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`);let i=this.reflection.getReferenceType(e);return Object.assign(Object.assign({},e),{message:`Could not resolve reference to ${i} named '${e.reference.$refText}'.`,targetDescription:r});}},o(_Class131,"DefaultLinker"),_Class131);});function sue(t){return typeof t.name=="string";}var Hx,vI=N(()=>{"use strict";var _Class132;Pl();o(sue,"isNamed");Hx=(_Class132=class Hx{getName(e){if(sue(e))return e.name;}getNameNode(e){return sx(e.$cstNode,"name");}},o(_Class132,"DefaultNameProvider"),_Class132);});var Wx,xI=N(()=>{"use strict";var _Class133;Pl();Nl();as();Ml();$s();Gc();Wx=(_Class133=class Wx{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator;}findDeclaration(e){if(e){let r=WN(e),n=e.astNode;if(r&&n){let i=n[r.feature];if(ma(i))return i.ref;if(Array.isArray(i)){for(let a of i)if(ma(a)&&a.$refNode&&a.$refNode.offset<=e.offset&&a.$refNode.end>=e.end)return a.ref;}}if(n){let i=this.nameProvider.getNameNode(n);if(i&&(i===e||aN(e,i)))return n;}}}findDeclarationNode(e){let r=this.findDeclaration(e);if(r!==null&&r!==void 0&&r.$cstNode){let n=this.nameProvider.getNameNode(r);return n!==null&&n!==void 0?n:r.$cstNode;}}findReferences(e,r){let n=[];if(r.includeDeclaration){let a=this.getReferenceToSelf(e);a&&n.push(a);}let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return r.documentUri&&(i=i.filter(a=>fs.equals(a.sourceUri,r.documentUri))),n.push(...i),Jr(n);}getReferenceToSelf(e){let r=this.nameProvider.getNameNode(e);if(r){let n=Oa(e),i=this.nodeLocator.getAstNodePath(e);return{sourceUri:n.uri,sourcePath:i,targetUri:n.uri,targetPath:i,segment:np(r),local:!0};}}},o(_Class133,"DefaultReferences"),_Class133);});var Fl,Ep,m1=N(()=>{"use strict";var _Class134,_Class135;$s();Fl=(_Class134=class Fl{constructor(e){if(this.map=new Map(),e)for(let[r,n]of e)this.add(r,n);}get size(){return Um.sum(Jr(this.map.values()).map(e=>e.length));}clear(){this.map.clear();}delete(e,r){if(r===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let i=n.indexOf(r);if(i>=0)return n.length===1?this.map.delete(e):n.splice(i,1),!0;}return!1;}}get(e){var r;return(r=this.map.get(e))!==null&&r!==void 0?r:[];}has(e,r){if(r===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(r)>=0:!1;}}add(e,r){return this.map.has(e)?this.map.get(e).push(r):this.map.set(e,[r]),this;}addAll(e,r){return this.map.has(e)?this.map.get(e).push(...r):this.map.set(e,Array.from(r)),this;}forEach(e){this.map.forEach((r,n)=>r.forEach(i=>e(i,n,this)));}[Symbol.iterator](){return this.entries().iterator();}entries(){return Jr(this.map.entries()).flatMap(([e,r])=>r.map(n=>[e,n]));}keys(){return Jr(this.map.keys());}values(){return Jr(this.map.values()).flat();}entriesGroupedByKey(){return Jr(this.map.entries());}},o(_Class134,"MultiMap"),_Class134),Ep=(_Class135=class Ep{get size(){return this.map.size;}constructor(e){if(this.map=new Map(),this.inverse=new Map(),e)for(let[r,n]of e)this.set(r,n);}clear(){this.map.clear(),this.inverse.clear();}set(e,r){return this.map.set(e,r),this.inverse.set(r,e),this;}get(e){return this.map.get(e);}getKey(e){return this.inverse.get(e);}delete(e){let r=this.map.get(e);return r!==void 0?(this.map.delete(e),this.inverse.delete(r),!0):!1;}},o(_Class135,"BiMap"),_Class135);});var qx,bI=N(()=>{"use strict";var _Class136;Xo();as();m1();jo();qx=(_Class136=class qx{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider;}async computeExports(e,r=vr.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,r);}async computeExportsForNode(e,r,n=ex,i=vr.CancellationToken.None){let a=[];this.exportNode(e,a,r);for(let s of n(e))await Ti(i),this.exportNode(s,a,r);return a;}exportNode(e,r,n){let i=this.nameProvider.getName(e);i&&r.push(this.descriptions.createDescription(e,i,n));}async computeLocalScopes(e,r=vr.CancellationToken.None){let n=e.parseResult.value,i=new Fl();for(let a of Oc(n))await Ti(r),this.processNode(a,e,i);return i;}processNode(e,r,n){let i=e.$container;if(i){let a=this.nameProvider.getName(e);a&&n.add(i,this.descriptions.createDescription(e,a,r));}}},o(_Class136,"DefaultScopeComputation"),_Class136);});var g1,Yx,V$e,TI=N(()=>{"use strict";var _Class137,_Class138;$s();g1=(_Class137=class g1{constructor(e,r,n){var i;this.elements=e,this.outerScope=r,this.caseInsensitive=(i=n===null||n===void 0?void 0:n.caseInsensitive)!==null&&i!==void 0?i:!1;}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements;}getElement(e){let r=this.caseInsensitive?this.elements.find(n=>n.name.toLowerCase()===e.toLowerCase()):this.elements.find(n=>n.name===e);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e);}},o(_Class137,"StreamScope"),_Class137),Yx=(_Class138=class Yx{constructor(e,r,n){var i;this.elements=new Map(),this.caseInsensitive=(i=n===null||n===void 0?void 0:n.caseInsensitive)!==null&&i!==void 0?i:!1;for(let a of e){let s=this.caseInsensitive?a.name.toLowerCase():a.name;this.elements.set(s,a);}this.outerScope=r;}getElement(e){let r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e);}getAllElements(){let e=Jr(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e;}},o(_Class138,"MapScope"),_Class138),V$e={getElement(){},getAllElements(){return U2;}};});var y1,Xx,Sp,GE,v1,VE=N(()=>{"use strict";var _Class139,_Class140,_Class141,_Class142,_Class143;y1=(_Class139=class y1{constructor(){this.toDispose=[],this.isDisposed=!1;}onDispose(e){this.toDispose.push(e);}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose());}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed");}},o(_Class139,"DisposableCache"),_Class139),Xx=(_Class140=class Xx extends y1{constructor(){super(...arguments),this.cache=new Map();}has(e){return this.throwIfDisposed(),this.cache.has(e);}set(e,r){this.throwIfDisposed(),this.cache.set(e,r);}get(e,r){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(r){let n=r();return this.cache.set(e,n),n;}else return;}delete(e){return this.throwIfDisposed(),this.cache.delete(e);}clear(){this.throwIfDisposed(),this.cache.clear();}},o(_Class140,"SimpleCache"),_Class140),Sp=(_Class141=class Sp extends y1{constructor(e){super(),this.cache=new Map(),this.converter=e!==null&&e!==void 0?e:r=>r;}has(e,r){return this.throwIfDisposed(),this.cacheForContext(e).has(r);}set(e,r,n){this.throwIfDisposed(),this.cacheForContext(e).set(r,n);}get(e,r,n){this.throwIfDisposed();let i=this.cacheForContext(e);if(i.has(r))return i.get(r);if(n){let a=n();return i.set(r,a),a;}else return;}delete(e,r){return this.throwIfDisposed(),this.cacheForContext(e).delete(r);}clear(e){if(this.throwIfDisposed(),e){let r=this.converter(e);this.cache.delete(r);}else this.cache.clear();}cacheForContext(e){let r=this.converter(e),n=this.cache.get(r);return n||(n=new Map(),this.cache.set(r,n)),n;}},o(_Class141,"ContextCache"),_Class141),GE=(_Class142=class GE extends Sp{constructor(e,r){super(n=>n.toString()),r?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(r,n=>{this.clear(n.uri.toString());})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,i)=>{for(let a of i)this.clear(a);}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,i)=>{let a=n.concat(i);for(let s of a)this.clear(s);}));}},o(_Class142,"DocumentCache"),_Class142),v1=(_Class143=class v1 extends Xx{constructor(e,r){super(),r?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(r,()=>{this.clear();})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,i)=>{i.length>0&&this.clear();}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear();}));}},o(_Class143,"WorkspaceCache"),_Class143);});var jx,wI=N(()=>{"use strict";var _Class144;TI();as();$s();VE();jx=(_Class144=class jx{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new v1(e.shared);}getScope(e){let r=[],n=this.reflection.getReferenceType(e),i=Oa(e.container).precomputedScopes;if(i){let s=e.container;do{let l=i.get(s);l.length>0&&r.push(Jr(l).filter(u=>this.reflection.isSubtype(u.type,n))),s=s.$container;}while(s);}let a=this.getGlobalScope(n,e);for(let s=r.length-1;s>=0;s--)a=this.createScope(r[s],a);return a;}createScope(e,r,n){return new g1(Jr(e),r,n);}createScopeForNodes(e,r,n){let i=Jr(e).map(a=>{let s=this.nameProvider.getName(a);if(s)return this.descriptions.createDescription(a,s);}).nonNullable();return new g1(i,r,n);}getGlobalScope(e,r){return this.globalScopeCache.get(e,()=>new Yx(this.indexManager.allElements(e)));}},o(_Class144,"DefaultScopeProvider"),_Class144);});function kI(t){return typeof t.$comment=="string";}function oue(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t);}var Kx,UE=N(()=>{"use strict";var _Class145;mI();Nl();as();Pl();o(kI,"isAstNodeWithComment");o(oue,"isIntermediateReference");Kx=(_Class145=class Kx{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider;}serialize(e,r){let n=r!==null&&r!==void 0?r:{},i=r===null||r===void 0?void 0:r.replacer,a=o((l,u)=>this.replacer(l,u,n),"defaultReplacer"),s=i?(l,u)=>i(l,u,a):a;try{return this.currentDocument=Oa(e),JSON.stringify(e,s,r===null||r===void 0?void 0:r.space);}finally{this.currentDocument=void 0;}}deserialize(e,r){let n=r!==null&&r!==void 0?r:{},i=JSON.parse(e);return this.linkNode(i,i,n),i;}replacer(e,r,{refText:n,sourceText:i,textRegions:a,comments:s,uriConverter:l}){var u,h,f,d;if(!this.ignoreProperties.has(e))if(ma(r)){let p=r.ref,m=n?r.$refText:void 0;if(p){let g=Oa(p),y="";this.currentDocument&&this.currentDocument!==g&&(l?y=l(g.uri,r):y=g.uri.toString());let v=this.astNodeLocator.getAstNodePath(p);return{$ref:`${y}#${v}`,$refText:m};}else return{$error:(h=(u=r.error)===null||u===void 0?void 0:u.message)!==null&&h!==void 0?h:"Could not resolve reference",$refText:m};}else if(si(r)){var _p3;let p;if(a&&(p=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),(!e||r.$document)&&(_p3=p)!==null&&_p3!==void 0&&_p3.$textRegion&&(p.$textRegion.documentURI=(f=this.currentDocument)===null||f===void 0?void 0:f.uri.toString())),i&&!e&&(p!==null&&p!==void 0?p:p=Object.assign({},r),p.$sourceText=(d=r.$cstNode)===null||d===void 0?void 0:d.text),s){p!==null&&p!==void 0?p:p=Object.assign({},r);let m=this.commentProvider.getComment(r);m&&(p.$comment=m.replace(/\r/g,""));}return p!==null&&p!==void 0?p:r;}else return r;}addAstNodeRegionWithAssignmentsTo(e){let r=o(n=>({offset:n.offset,end:n.end,length:n.length,range:n.range}),"createDocumentSegment");if(e.$cstNode){let n=e.$textRegion=r(e.$cstNode),i=n.assignments={};return Object.keys(e).filter(a=>!a.startsWith("$")).forEach(a=>{let s=GN(e.$cstNode,a).map(r);s.length!==0&&(i[a]=s);}),e;}}linkNode(e,r,n,i,a,s){for(let[u,h]of Object.entries(e))if(Array.isArray(h))for(let f=0;f<h.length;f++){let d=h[f];oue(d)?h[f]=this.reviveReference(e,u,r,d,n):si(d)&&this.linkNode(d,r,n,e,u,f);}else oue(h)?e[u]=this.reviveReference(e,u,r,h,n):si(h)&&this.linkNode(h,r,n,e,u);let l=e;l.$container=i,l.$containerProperty=a,l.$containerIndex=s;}reviveReference(e,r,n,i,a){let s=i.$refText,l=i.$error;if(i.$ref){let u=this.getRefNode(n,i.$ref,a.uriConverter);if(si(u))return s||(s=this.nameProvider.getName(u)),{$refText:s!==null&&s!==void 0?s:"",ref:u};l=u;}if(l){let u={$refText:s!==null&&s!==void 0?s:""};return u.error={container:e,property:r,message:l,reference:u},u;}else return;}getRefNode(e,r,n){try{let i=r.indexOf("#");if(i===0){let u=this.astNodeLocator.getAstNode(e,r.substring(1));return u||"Could not resolve path: "+r;}if(i<0){let u=n?n(r):hs.parse(r),h=this.langiumDocuments.getDocument(u);return h?h.parseResult.value:"Could not find document for URI: "+r;}let a=n?n(r.substring(0,i)):hs.parse(r.substring(0,i)),s=this.langiumDocuments.getDocument(a);if(!s)return"Could not find document for URI: "+r;if(i===r.length-1)return s.parseResult.value;let l=this.astNodeLocator.getAstNode(s.parseResult.value,r.substring(i+1));return l||"Could not resolve URI: "+r;}catch(i){return String(i);}}},o(_Class145,"DefaultJsonSerializer"),_Class145);});var Qx,EI=N(()=>{"use strict";var _Class146;Gc();Qx=(_Class146=class Qx{get map(){return this.fileExtensionMap;}constructor(e){this.languageIdMap=new Map(),this.fileExtensionMap=new Map(),this.textDocuments=e===null||e===void 0?void 0:e.workspace.TextDocuments;}register(e){let r=e.LanguageMetaData;for(let n of r.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(n,e);this.languageIdMap.set(r.languageId,e),this.languageIdMap.size===1?this.singleton=e:this.singleton=void 0;}getServices(e){var r,n;if(this.singleton!==void 0)return this.singleton;if(this.languageIdMap.size===0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");let i=(n=(r=this.textDocuments)===null||r===void 0?void 0:r.get(e))===null||n===void 0?void 0:n.languageId;if(i!==void 0){let l=this.languageIdMap.get(i);if(l)return l;}let a=fs.extname(e),s=this.fileExtensionMap.get(a);if(!s)throw i?new Error(`The service registry contains no services for the extension '${a}' for language '${i}'.`):new Error(`The service registry contains no services for the extension '${a}'.`);return s;}hasServices(e){try{return this.getServices(e),!0;}catch{return!1;}}get all(){return Array.from(this.languageIdMap.values());}},o(_Class146,"DefaultServiceRegistry"),_Class146);});function Cp(t){return{code:t};}var x1,Zx,Jx=N(()=>{"use strict";var _Class147;ho();m1();jo();$s();o(Cp,"diagnosticData");(function(t){t.all=["fast","slow","built-in"];})(x1||(x1={}));Zx=(_Class147=class Zx{constructor(e){this.entries=new Fl(),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection;}register(e,r=this,n="fast"){if(n==="built-in")throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");for(let[i,a]of Object.entries(e)){let s=a;if(Array.isArray(s))for(let l of s){let u={check:this.wrapValidationException(l,r),category:n};this.addEntry(i,u);}else if(typeof s=="function"){let l={check:this.wrapValidationException(s,r),category:n};this.addEntry(i,l);}else Mc(s);}}wrapValidationException(e,r){return async(n,i,a)=>{await this.handleException(()=>e.call(r,n,i,a),"An error occurred during validation",i,n);};}async handleException(e,r,n,i){try{await e();}catch(a){if(zc(a))throw a;console.error(`${r}:`,a),a instanceof Error&&a.stack&&console.error(a.stack);let s=a instanceof Error?a.message:String(a);n("error",`${r}: ${s}`,{node:i});}}addEntry(e,r){if(e==="AstNode"){this.entries.add("AstNode",r);return;}for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,r);}getChecks(e,r){let n=Jr(this.entries.get(e)).concat(this.entries.get("AstNode"));return r&&(n=n.filter(i=>r.includes(i.category))),n.map(i=>i.check);}registerBeforeDocument(e,r=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",r));}registerAfterDocument(e,r=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",r));}wrapPreparationException(e,r,n){return async(i,a,s,l)=>{await this.handleException(()=>e.call(n,i,a,s,l),r,a,i);};}get checksBefore(){return this.entriesBefore;}get checksAfter(){return this.entriesAfter;}},o(_Class147,"ValidationRegistry"),_Class147);});function lue(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=sx(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=UN(t.node.$cstNode,t.keyword,t.index)),e!==null&&e!==void 0?e:e=t.node.$cstNode,e?e.range:{start:{line:0,character:0},end:{line:0,character:0}};}function HE(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t);}}function cue(t){switch(t){case"error":return Cp(Ko.LexingError);case"warning":return Cp(Ko.LexingWarning);case"info":return Cp(Ko.LexingInfo);case"hint":return Cp(Ko.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t);}}var eb,Ko,SI=N(()=>{"use strict";var _Class148;Xo();Pl();as();Ml();jo();Jx();eb=(_Class148=class eb{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData;}async validateDocument(e,r={},n=vr.CancellationToken.None){let i=e.parseResult,a=[];if(await Ti(n),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(i,a,r),r.stopAfterLexingErrors&&a.some(s=>{var l;return((l=s.data)===null||l===void 0?void 0:l.code)===Ko.LexingError;})||(this.processParsingErrors(i,a,r),r.stopAfterParsingErrors&&a.some(s=>{var l;return((l=s.data)===null||l===void 0?void 0:l.code)===Ko.ParsingError;}))||(this.processLinkingErrors(e,a,r),r.stopAfterLinkingErrors&&a.some(s=>{var l;return((l=s.data)===null||l===void 0?void 0:l.code)===Ko.LinkingError;}))))return a;try{a.push(...(await this.validateAst(i.value,r,n)));}catch(s){if(zc(s))throw s;console.error("An error occurred during validation:",s);}return await Ti(n),a;}processLexingErrors(e,r,n){var i,a,s;let l=[...e.lexerErrors,...((a=(i=e.lexerReport)===null||i===void 0?void 0:i.diagnostics)!==null&&a!==void 0?a:[])];for(let u of l){let h=(s=u.severity)!==null&&s!==void 0?s:"error",f={severity:HE(h),range:{start:{line:u.line-1,character:u.column-1},end:{line:u.line-1,character:u.column+u.length-1}},message:u.message,data:cue(h),source:this.getSource()};r.push(f);}}processParsingErrors(e,r,n){for(let i of e.parserErrors){let a;if(isNaN(i.token.startOffset)){if("previousToken"in i){let s=i.previousToken;if(isNaN(s.startOffset)){let l={line:0,character:0};a={start:l,end:l};}else{let l={line:s.endLine-1,character:s.endColumn};a={start:l,end:l};}}}else a=Hm(i.token);if(a){let s={severity:HE("error"),range:a,message:i.message,data:Cp(Ko.ParsingError),source:this.getSource()};r.push(s);}}}processLinkingErrors(e,r,n){for(let i of e.references){let a=i.error;if(a){let s={node:a.container,property:a.property,index:a.index,data:{code:Ko.LinkingError,containerType:a.container.$type,property:a.property,refText:a.reference.$refText}};r.push(this.toDiagnostic("error",a.message,s));}}}async validateAst(e,r,n=vr.CancellationToken.None){let i=[],a=o((s,l,u)=>{i.push(this.toDiagnostic(s,l,u));},"acceptor");return await this.validateAstBefore(e,r,a,n),await this.validateAstNodes(e,r,a,n),await this.validateAstAfter(e,r,a,n),i;}async validateAstBefore(e,r,n,i=vr.CancellationToken.None){var a;let s=this.validationRegistry.checksBefore;for(let l of s)await Ti(i),await l(e,n,(a=r.categories)!==null&&a!==void 0?a:[],i);}async validateAstNodes(e,r,n,i=vr.CancellationToken.None){await Promise.all(Yo(e).map(async a=>{await Ti(i);let s=this.validationRegistry.getChecks(a.$type,r.categories);for(let l of s)await l(a,n,i);}));}async validateAstAfter(e,r,n,i=vr.CancellationToken.None){var a;let s=this.validationRegistry.checksAfter;for(let l of s)await Ti(i),await l(e,n,(a=r.categories)!==null&&a!==void 0?a:[],i);}toDiagnostic(e,r,n){return{message:r,range:lue(n),severity:HE(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()};}getSource(){return this.metadata.languageId;}},o(_Class148,"DefaultDocumentValidator"),_Class148);o(lue,"getDiagnosticRange");o(HE,"toDiagnosticSeverity");o(cue,"toDiagnosticData");(function(t){t.LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error";})(Ko||(Ko={}));});var tb,rb,CI=N(()=>{"use strict";var _Class149,_Class150;Xo();Nl();as();Ml();jo();Gc();tb=(_Class149=class tb{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider;}createDescription(e,r,n){let i=n!==null&&n!==void 0?n:Oa(e);r!==null&&r!==void 0?r:r=this.nameProvider.getName(e);let a=this.astNodeLocator.getAstNodePath(e);if(!r)throw new Error(`Node at path ${a} has no name.`);let s,l=o(()=>{var u;return s!==null&&s!==void 0?s:s=np((u=this.nameProvider.getNameNode(e))!==null&&u!==void 0?u:e.$cstNode);},"nameSegmentGetter");return{node:e,name:r,get nameSegment(){return l();},selectionSegment:np(e.$cstNode),type:e.$type,documentUri:i.uri,path:a};}},o(_Class149,"DefaultAstNodeDescriptionProvider"),_Class149),rb=(_Class150=class rb{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator;}async createDescriptions(e,r=vr.CancellationToken.None){let n=[],i=e.parseResult.value;for(let a of Yo(i))await Ti(r),Lg(a).filter(s=>!tp(s)).forEach(s=>{let l=this.createDescription(s);l&&n.push(l);});return n;}createDescription(e){let r=e.reference.$nodeDescription,n=e.reference.$refNode;if(!r||!n)return;let i=Oa(e.container).uri;return{sourceUri:i,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:r.documentUri,targetPath:r.path,segment:np(n),local:fs.equals(r.documentUri,i)};}},o(_Class150,"DefaultReferenceDescriptionProvider"),_Class150);});var nb,AI=N(()=>{"use strict";var _Class151;nb=(_Class151=class nb{constructor(){this.segmentSeparator="/",this.indexSeparator="@";}getAstNodePath(e){if(e.$container){let r=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return r+this.segmentSeparator+n;}return"";}getPathSegment({$containerProperty:e,$containerIndex:r}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return r!==void 0?e+this.indexSeparator+r:e;}getAstNode(e,r){return r.split(this.segmentSeparator).reduce((i,a)=>{if(!i||a.length===0)return i;let s=a.indexOf(this.indexSeparator);if(s>0){let l=a.substring(0,s),u=parseInt(a.substring(s+1)),h=i[l];return h===null||h===void 0?void 0:h[u];}return i[a];},e);}},o(_Class151,"DefaultAstNodeLocator"),_Class151);});var Kn={};var WE=N(()=>{"use strict";Sr(Kn,Sa(uI(),1));});var ib,_I=N(()=>{"use strict";var _Class152;WE();jo();ib=(_Class152=class ib{constructor(e){this._ready=new us(),this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new Kn.Emitter(),this.serviceRegistry=e.ServiceRegistry;}get ready(){return this._ready.promise;}initialize(e){var r,n;this.workspaceConfig=(n=(r=e.capabilities.workspace)===null||r===void 0?void 0:r.configuration)!==null&&n!==void 0?n:!1;}async initialized(e){if(this.workspaceConfig){if(e.register){let r=this.serviceRegistry.all;e.register({section:r.map(n=>this.toSectionName(n.LanguageMetaData.languageId))});}if(e.fetchConfiguration){let r=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(r);r.forEach((i,a)=>{this.updateSectionConfiguration(i.section,n[a]);});}}this._ready.resolve();}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach(r=>{let n=e.settings[r];this.updateSectionConfiguration(r,n),this.onConfigurationSectionUpdateEmitter.fire({section:r,configuration:n});});}updateSectionConfiguration(e,r){this.settings[e]=r;}async getConfiguration(e,r){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][r];}toSectionName(e){return`${e}`;}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event;}},o(_Class152,"DefaultConfigurationProvider"),_Class152);});var pf,DI=N(()=>{"use strict";(function(t){function e(r){return{dispose:o(async()=>await r(),"dispose")};}o(e,"create"),t.create=e;})(pf||(pf={}));});var ab,LI=N(()=>{"use strict";var _Class153;Xo();DI();m1();jo();$s();Jx();p1();ab=(_Class153=class ab{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Fl(),this.documentPhaseListeners=new Fl(),this.buildState=new Map(),this.documentBuildWaiters=new Map(),this.currentState=wn.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry;}async build(e,r={},n=vr.CancellationToken.None){var i,a;for(let s of e){let l=s.uri.toString();if(s.state===wn.Validated){if(typeof r.validation=="boolean"&&r.validation)s.state=wn.IndexedReferences,s.diagnostics=void 0,this.buildState.delete(l);else if(typeof r.validation=="object"){let u=this.buildState.get(l),h=(i=u===null||u===void 0?void 0:u.result)===null||i===void 0?void 0:i.validationChecks;if(h){let d=((a=r.validation.categories)!==null&&a!==void 0?a:x1.all).filter(p=>!h.includes(p));d.length>0&&(this.buildState.set(l,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:d})},result:u.result}),s.state=wn.IndexedReferences);}}}else this.buildState.delete(l);}this.currentState=wn.Changed,await this.emitUpdate(e.map(s=>s.uri),[]),await this.buildDocuments(e,r,n);}async update(e,r,n=vr.CancellationToken.None){this.currentState=wn.Changed;for(let s of r)this.langiumDocuments.deleteDocument(s),this.buildState.delete(s.toString()),this.indexManager.remove(s);for(let s of e){if(!this.langiumDocuments.invalidateDocument(s)){let u=this.langiumDocumentFactory.fromModel({$type:"INVALID"},s);u.state=wn.Changed,this.langiumDocuments.addDocument(u);}this.buildState.delete(s.toString());}let i=Jr(e).concat(r).map(s=>s.toString()).toSet();this.langiumDocuments.all.filter(s=>!i.has(s.uri.toString())&&this.shouldRelink(s,i)).forEach(s=>{this.serviceRegistry.getServices(s.uri).references.Linker.unlink(s),s.state=Math.min(s.state,wn.ComputedScopes),s.diagnostics=void 0;}),await this.emitUpdate(e,r),await Ti(n);let a=this.sortDocuments(this.langiumDocuments.all.filter(s=>{var l;return s.state<wn.Linked||!(!((l=this.buildState.get(s.uri.toString()))===null||l===void 0)&&l.completed);}).toArray());await this.buildDocuments(a,this.updateBuildOptions,n);}async emitUpdate(e,r){await Promise.all(this.updateListeners.map(n=>n(e,r)));}sortDocuments(e){let r=0,n=e.length-1;for(;r<n;){for(;r<e.length&&this.hasTextDocument(e[r]);)r++;for(;n>=0&&!this.hasTextDocument(e[n]);)n--;r<n&&([e[r],e[n]]=[e[n],e[r]]);}return e;}hasTextDocument(e){var r;return!!(!((r=this.textDocuments)===null||r===void 0)&&r.get(e.uri));}shouldRelink(e,r){return e.references.some(n=>n.error!==void 0)?!0:this.indexManager.isAffected(e,r);}onUpdate(e){return this.updateListeners.push(e),pf.create(()=>{let r=this.updateListeners.indexOf(e);r>=0&&this.updateListeners.splice(r,1);});}async buildDocuments(e,r,n){this.prepareBuild(e,r),await this.runCancelable(e,wn.Parsed,n,a=>this.langiumDocumentFactory.update(a,n)),await this.runCancelable(e,wn.IndexedContent,n,a=>this.indexManager.updateContent(a,n)),await this.runCancelable(e,wn.ComputedScopes,n,async a=>{let s=this.serviceRegistry.getServices(a.uri).references.ScopeComputation;a.precomputedScopes=await s.computeLocalScopes(a,n);}),await this.runCancelable(e,wn.Linked,n,a=>this.serviceRegistry.getServices(a.uri).references.Linker.link(a,n)),await this.runCancelable(e,wn.IndexedReferences,n,a=>this.indexManager.updateReferences(a,n));let i=e.filter(a=>this.shouldValidate(a));await this.runCancelable(i,wn.Validated,n,a=>this.validate(a,n));for(let a of e){let s=this.buildState.get(a.uri.toString());s&&(s.completed=!0);}}prepareBuild(e,r){for(let n of e){let i=n.uri.toString(),a=this.buildState.get(i);(!a||a.completed)&&this.buildState.set(i,{completed:!1,options:r,result:a===null||a===void 0?void 0:a.result});}}async runCancelable(e,r,n,i){let a=e.filter(l=>l.state<r);for(let l of a)await Ti(n),await i(l),l.state=r,await this.notifyDocumentPhase(l,r,n);let s=e.filter(l=>l.state===r);await this.notifyBuildPhase(s,r,n),this.currentState=r;}onBuildPhase(e,r){return this.buildPhaseListeners.add(e,r),pf.create(()=>{this.buildPhaseListeners.delete(e,r);});}onDocumentPhase(e,r){return this.documentPhaseListeners.add(e,r),pf.create(()=>{this.documentPhaseListeners.delete(e,r);});}waitUntil(e,r,n){let i;if(r&&"path"in r?i=r:n=r,n!==null&&n!==void 0?n:n=vr.CancellationToken.None,i){let a=this.langiumDocuments.getDocument(i);if(a&&a.state>e)return Promise.resolve(i);}return this.currentState>=e?Promise.resolve(void 0):n.isCancellationRequested?Promise.reject($c):new Promise((a,s)=>{let l=this.onBuildPhase(e,()=>{if(l.dispose(),u.dispose(),i){let h=this.langiumDocuments.getDocument(i);a(h===null||h===void 0?void 0:h.uri);}else a(void 0);}),u=n.onCancellationRequested(()=>{l.dispose(),u.dispose(),s($c);});});}async notifyDocumentPhase(e,r,n){let a=this.documentPhaseListeners.get(r).slice();for(let s of a)try{await s(e,n);}catch(l){if(!zc(l))throw l;}}async notifyBuildPhase(e,r,n){if(e.length===0)return;let a=this.buildPhaseListeners.get(r).slice();for(let s of a)await Ti(n),await s(e,n);}shouldValidate(e){return!!this.getBuildOptions(e).validation;}async validate(e,r){var n,i;let a=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,s=this.getBuildOptions(e).validation,l=typeof s=="object"?s:void 0,u=await a.validateDocument(e,l,r);e.diagnostics?e.diagnostics.push(...u):e.diagnostics=u;let h=this.buildState.get(e.uri.toString());if(h){(n=h.result)!==null&&n!==void 0||(h.result={});let f=(i=l===null||l===void 0?void 0:l.categories)!==null&&i!==void 0?i:x1.all;h.result.validationChecks?h.result.validationChecks.push(...f):h.result.validationChecks=[...f];}}getBuildOptions(e){var r,n;return(n=(r=this.buildState.get(e.uri.toString()))===null||r===void 0?void 0:r.options)!==null&&n!==void 0?n:{};}},o(_Class153,"DefaultDocumentBuilder"),_Class153);});var sb,RI=N(()=>{"use strict";var _Class154;as();VE();Xo();$s();Gc();sb=(_Class154=class sb{constructor(e){this.symbolIndex=new Map(),this.symbolByTypeIndex=new Sp(),this.referenceIndex=new Map(),this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection;}findAllReferences(e,r){let n=Oa(e).uri,i=[];return this.referenceIndex.forEach(a=>{a.forEach(s=>{fs.equals(s.targetUri,n)&&s.targetPath===r&&i.push(s);});}),Jr(i);}allElements(e,r){let n=Jr(this.symbolIndex.keys());return r&&(n=n.filter(i=>!r||r.has(i))),n.map(i=>this.getFileDescriptions(i,e)).flat();}getFileDescriptions(e,r){var n;return r?this.symbolByTypeIndex.get(e,r,()=>{var a;return((a=this.symbolIndex.get(e))!==null&&a!==void 0?a:[]).filter(l=>this.astReflection.isSubtype(l.type,r));}):(n=this.symbolIndex.get(e))!==null&&n!==void 0?n:[];}remove(e){let r=e.toString();this.symbolIndex.delete(r),this.symbolByTypeIndex.clear(r),this.referenceIndex.delete(r);}async updateContent(e,r=vr.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,r),a=e.uri.toString();this.symbolIndex.set(a,i),this.symbolByTypeIndex.clear(a);}async updateReferences(e,r=vr.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,r);this.referenceIndex.set(e.uri.toString(),i);}isAffected(e,r){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(i=>!i.local&&r.has(i.targetUri.toString())):!1;}},o(_Class154,"DefaultIndexManager"),_Class154);});var ob,NI=N(()=>{"use strict";var _Class155;Xo();jo();Gc();ob=(_Class155=class ob{constructor(e){this.initialBuildOptions={},this._ready=new us(),this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock;}get ready(){return this._ready.promise;}get workspaceFolders(){return this.folders;}initialize(e){var r;this.folders=(r=e.workspaceFolders)!==null&&r!==void 0?r:void 0;}initialized(e){return this.mutex.write(r=>{var n;return this.initializeWorkspace((n=this.folders)!==null&&n!==void 0?n:[],r);});}async initializeWorkspace(e,r=vr.CancellationToken.None){let n=await this.performStartup(e);await Ti(r),await this.documentBuilder.build(n,this.initialBuildOptions,r);}async performStartup(e){let r=this.serviceRegistry.all.flatMap(a=>a.LanguageMetaData.fileExtensions),n=[],i=o(a=>{n.push(a),this.langiumDocuments.hasDocument(a.uri)||this.langiumDocuments.addDocument(a);},"collector");return await this.loadAdditionalDocuments(e,i),await Promise.all(e.map(a=>[a,this.getRootFolder(a)]).map(async a=>this.traverseFolder(...a,r,i))),this._ready.resolve(),n;}loadAdditionalDocuments(e,r){return Promise.resolve();}getRootFolder(e){return hs.parse(e.uri);}async traverseFolder(e,r,n,i){let a=await this.fileSystemProvider.readDirectory(r);await Promise.all(a.map(async s=>{if(this.includeEntry(e,s,n)){if(s.isDirectory)await this.traverseFolder(e,s.uri,n,i);else if(s.isFile){let l=await this.langiumDocuments.getOrCreateDocument(s.uri);i(l);}}}));}includeEntry(e,r,n){let i=fs.basename(r.uri);if(i.startsWith("."))return!1;if(r.isDirectory)return i!=="node_modules"&&i!=="out";if(r.isFile){let a=fs.extname(r.uri);return n.includes(a);}return!1;}},o(_Class155,"DefaultWorkspaceManager"),_Class155);});function YE(t){return Array.isArray(t)&&(t.length===0||"name"in t[0]);}function II(t){return t&&"modes"in t&&"defaultMode"in t;}function MI(t){return!YE(t)&&!II(t);}var lb,qE,Ap,XE=N(()=>{"use strict";var _Class156,_Class157;hf();lb=(_Class156=class lb{buildUnexpectedCharactersMessage(e,r,n,i,a){return Hg.buildUnexpectedCharactersMessage(e,r,n,i,a);}buildUnableToPopLexerModeMessage(e){return Hg.buildUnableToPopLexerModeMessage(e);}},o(_Class156,"DefaultLexerErrorMessageProvider"),_Class156),qE={mode:"full"},Ap=(_Class157=class Ap{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let r=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(r);let n=MI(r)?Object.values(r):r,i=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new Xn(n,{positionTracking:"full",skipValidations:i,errorMessageProvider:this.errorMessageProvider});}get definition(){return this.tokenTypes;}tokenize(e,r=qE){var n,i,a;let s=this.chevrotainLexer.tokenize(e);return{tokens:s.tokens,errors:s.errors,hidden:(n=s.groups.hidden)!==null&&n!==void 0?n:[],report:(a=(i=this.tokenBuilder).flushLexingReport)===null||a===void 0?void 0:a.call(i,e)};}toTokenTypeDictionary(e){if(MI(e))return e;let r=II(e)?Object.values(e.modes).flat():e,n={};return r.forEach(i=>n[i.name]=i),n;}},o(_Class157,"DefaultLexer"),_Class157);o(YE,"isTokenTypeArray");o(II,"isIMultiModeLexerDefinition");o(MI,"isTokenTypeDictionary");});function BI(t,e,r){let n,i;typeof t=="string"?(i=e,n=r):(i=t.range.start,n=e),i||(i=Xr.create(0,0));let a=fue(t),s=$I(n),l=H$e({lines:a,position:i,options:s});return j$e({index:0,tokens:l,position:i});}function FI(t,e){let r=$I(e),n=fue(t);if(n.length===0)return!1;let i=n[0],a=n[n.length-1],s=r.start,l=r.end;return!!(s!==null&&s!==void 0&&s.exec(i))&&!!(l!==null&&l!==void 0&&l.exec(a));}function fue(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(MN);}function H$e(t){var e,r,n;let i=[],a=t.position.line,s=t.position.character;for(let l=0;l<t.lines.length;l++){let u=l===0,h=l===t.lines.length-1,f=t.lines[l],d=0;if(u&&t.options.start){let m=(e=t.options.start)===null||e===void 0?void 0:e.exec(f);m&&(d=m.index+m[0].length);}else{let m=(r=t.options.line)===null||r===void 0?void 0:r.exec(f);m&&(d=m.index+m[0].length);}if(h){let m=(n=t.options.end)===null||n===void 0?void 0:n.exec(f);m&&(f=f.substring(0,m.index));}if(f=f.substring(0,X$e(f)),PI(f,d)>=f.length){if(i.length>0){let m=Xr.create(a,s);i.push({type:"break",content:"",range:Pr.create(m,m)});}}else{uue.lastIndex=d;let m=uue.exec(f);if(m){let g=m[0],y=m[1],v=Xr.create(a,s+d),x=Xr.create(a,s+d+g.length);i.push({type:"tag",content:y,range:Pr.create(v,x)}),d+=g.length,d=PI(f,d);}if(d<f.length){let g=f.substring(d),y=Array.from(g.matchAll(U$e));i.push(...W$e(y,g,a,s+d));}}a++,s=0;}return i.length>0&&i[i.length-1].type==="break"?i.slice(0,-1):i;}function W$e(t,e,r,n){let i=[];if(t.length===0){let a=Xr.create(r,n),s=Xr.create(r,n+e.length);i.push({type:"text",content:e,range:Pr.create(a,s)});}else{let a=0;for(let l of t){let u=l.index,h=e.substring(a,u);h.length>0&&i.push({type:"text",content:e.substring(a,u),range:Pr.create(Xr.create(r,a+n),Xr.create(r,u+n))});let f=h.length+1,d=l[1];if(i.push({type:"inline-tag",content:d,range:Pr.create(Xr.create(r,a+f+n),Xr.create(r,a+f+d.length+n))}),f+=d.length,l.length===4){f+=l[2].length;let p=l[3];i.push({type:"text",content:p,range:Pr.create(Xr.create(r,a+f+n),Xr.create(r,a+f+p.length+n))});}else i.push({type:"text",content:"",range:Pr.create(Xr.create(r,a+f+n),Xr.create(r,a+f+n))});a=u+l[0].length;}let s=e.substring(a);s.length>0&&i.push({type:"text",content:s,range:Pr.create(Xr.create(r,a+n),Xr.create(r,a+n+s.length))});}return i;}function PI(t,e){let r=t.substring(e).match(q$e);return r?e+r.index:t.length;}function X$e(t){let e=t.match(Y$e);if(e&&typeof e.index=="number")return e.index;}function j$e(t){var e,r,n,i;let a=Xr.create(t.position.line,t.position.character);if(t.tokens.length===0)return new jE([],Pr.create(a,a));let s=[];for(;t.index<t.tokens.length;){let h=K$e(t,s[s.length-1]);h&&s.push(h);}let l=(r=(e=s[0])===null||e===void 0?void 0:e.range.start)!==null&&r!==void 0?r:a,u=(i=(n=s[s.length-1])===null||n===void 0?void 0:n.range.end)!==null&&i!==void 0?i:a;return new jE(s,Pr.create(l,u));}function K$e(t,e){let r=t.tokens[t.index];if(r.type==="tag")return pue(t,!1);if(r.type==="text"||r.type==="inline-tag")return due(t);Q$e(r,e),t.index++;}function Q$e(t,e){if(e){let r=new KE("",t.range);"inlines"in e?e.inlines.push(r):e.content.inlines.push(r);}}function due(t){let e=t.tokens[t.index],r=e,n=e,i=[];for(;e&&e.type!=="break"&&e.type!=="tag";)i.push(Z$e(t)),n=e,e=t.tokens[t.index];return new ub(i,Pr.create(r.range.start,n.range.end));}function Z$e(t){return t.tokens[t.index].type==="inline-tag"?pue(t,!0):mue(t);}function pue(t,e){let r=t.tokens[t.index++],n=r.content.substring(1),i=t.tokens[t.index];if((i===null||i===void 0?void 0:i.type)==="text"){if(e){let a=mue(t);return new cb(n,new ub([a],a.range),e,Pr.create(r.range.start,a.range.end));}else{let a=due(t);return new cb(n,a,e,Pr.create(r.range.start,a.range.end));}}else{let a=r.range;return new cb(n,new ub([],a),e,a);}}function mue(t){let e=t.tokens[t.index++];return new KE(e.content,e.range);}function $I(t){if(!t)return $I({start:"/**",end:"*/",line:"*"});let{start:e,end:r,line:n}=t;return{start:OI(e,!0),end:OI(r,!1),line:OI(n,!0)};}function OI(t,e){if(typeof t=="string"||typeof t=="object"){let r=typeof t=="string"?hp(t):t.source;return e?new RegExp(`^\\s*${r}`):new RegExp(`\\s*${r}\\s*$`);}else return t;}function J$e(t,e,r){var n,i;if(t==="linkplain"||t==="linkcode"||t==="link"){let a=e.indexOf(" "),s=e;if(a>0){let u=PI(e,a);s=e.substring(u),e=e.substring(0,a);}return(t==="linkcode"||t==="link"&&r.link==="code")&&(s=`\`${s}\``),(i=(n=r.renderLink)===null||n===void 0?void 0:n.call(r,e,s))!==null&&i!==void 0?i:eze(e,s);}}function eze(t,e){try{return hs.parse(t,!0),`[${e}](${t})`;}catch{return t;}}function hue(t){return t.endsWith(`
`)?`
`:`

`;}var uue,U$e,q$e,Y$e,jE,cb,ub,KE,zI=N(()=>{"use strict";var _Class158,_Class159,_Class160,_Class161;jM();Mg();Gc();o(BI,"parseJSDoc");o(FI,"isJSDoc");o(fue,"getLines");uue=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,U$e=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;o(H$e,"tokenize");o(W$e,"buildInlineTokens");q$e=/\S/,Y$e=/\s*$/;o(PI,"skipWhitespace");o(X$e,"lastCharacter");o(j$e,"parseJSDocComment");o(K$e,"parseJSDocElement");o(Q$e,"appendEmptyLine");o(due,"parseJSDocText");o(Z$e,"parseJSDocInline");o(pue,"parseJSDocTag");o(mue,"parseJSDocLine");o($I,"normalizeOptions");o(OI,"normalizeOption");jE=(_Class158=class jE{constructor(e,r){this.elements=e,this.range=r;}getTag(e){return this.getAllTags().find(r=>r.name===e);}getTags(e){return this.getAllTags().filter(r=>r.name===e);}getAllTags(){return this.elements.filter(e=>"name"in e);}toString(){let e="";for(let r of this.elements)if(e.length===0)e=r.toString();else{let n=r.toString();e+=hue(e)+n;}return e.trim();}toMarkdown(e){let r="";for(let n of this.elements)if(r.length===0)r=n.toMarkdown(e);else{let i=n.toMarkdown(e);r+=hue(r)+i;}return r.trim();}},o(_Class158,"JSDocCommentImpl"),_Class158),cb=(_Class159=class cb{constructor(e,r,n,i){this.name=e,this.content=r,this.inline=n,this.range=i;}toString(){let e=`@${this.name}`,r=this.content.toString();return this.content.inlines.length===1?e=`${e} ${r}`:this.content.inlines.length>1&&(e=`${e}
${r}`),this.inline?`{${e}}`:e;}toMarkdown(e){var r,n;return(n=(r=e===null||e===void 0?void 0:e.renderTag)===null||r===void 0?void 0:r.call(e,this))!==null&&n!==void 0?n:this.toMarkdownDefault(e);}toMarkdownDefault(e){let r=this.content.toMarkdown(e);if(this.inline){let a=J$e(this.name,r,e!==null&&e!==void 0?e:{});if(typeof a=="string")return a;}let n="";(e===null||e===void 0?void 0:e.tag)==="italic"||(e===null||e===void 0?void 0:e.tag)===void 0?n="*":(e===null||e===void 0?void 0:e.tag)==="bold"?n="**":(e===null||e===void 0?void 0:e.tag)==="bold-italic"&&(n="***");let i=`${n}@${this.name}${n}`;return this.content.inlines.length===1?i=`${i} \u2014 ${r}`:this.content.inlines.length>1&&(i=`${i}
${r}`),this.inline?`{${i}}`:i;}},o(_Class159,"JSDocTagImpl"),_Class159);o(J$e,"renderInlineTag");o(eze,"renderLinkDefault");ub=(_Class160=class ub{constructor(e,r){this.inlines=e,this.range=r;}toString(){let e="";for(let r=0;r<this.inlines.length;r++){let n=this.inlines[r],i=this.inlines[r+1];e+=n.toString(),i&&i.range.start.line>n.range.start.line&&(e+=`
`);}return e;}toMarkdown(e){let r="";for(let n=0;n<this.inlines.length;n++){let i=this.inlines[n],a=this.inlines[n+1];r+=i.toMarkdown(e),a&&a.range.start.line>i.range.start.line&&(r+=`
`);}return r;}},o(_Class160,"JSDocTextImpl"),_Class160),KE=(_Class161=class KE{constructor(e,r){this.text=e,this.range=r;}toString(){return this.text;}toMarkdown(){return this.text;}},o(_Class161,"JSDocLineImpl"),_Class161);o(hue,"fillNewlines");});var hb,GI=N(()=>{"use strict";var _Class162;as();zI();hb=(_Class162=class hb{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider;}getDocumentation(e){let r=this.commentProvider.getComment(e);if(r&&FI(r))return BI(r).toMarkdown({renderLink:o((i,a)=>this.documentationLinkRenderer(e,i,a),"renderLink"),renderTag:o(i=>this.documentationTagRenderer(e,i),"renderTag")});}documentationLinkRenderer(e,r,n){var i;let a=(i=this.findNameInPrecomputedScopes(e,r))!==null&&i!==void 0?i:this.findNameInGlobalScope(e,r);if(a&&a.nameSegment){let s=a.nameSegment.range.start.line+1,l=a.nameSegment.range.start.character+1,u=a.documentUri.with({fragment:`L${s},${l}`});return`[${n}](${u.toString()})`;}else return;}documentationTagRenderer(e,r){}findNameInPrecomputedScopes(e,r){let i=Oa(e).precomputedScopes;if(!i)return;let a=e;do{let l=i.get(a).find(u=>u.name===r);if(l)return l;a=a.$container;}while(a);}findNameInGlobalScope(e,r){return this.indexManager.allElements().find(i=>i.name===r);}},o(_Class162,"JSDocDocumentationProvider"),_Class162);});var fb,VI=N(()=>{"use strict";var _Class163;UE();Ml();fb=(_Class163=class fb{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig;}getComment(e){var r;return kI(e)?e.$comment:(r=oN(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||r===void 0?void 0:r.text;}},o(_Class163,"DefaultCommentProvider"),_Class163);});var db,UI,HI,WI=N(()=>{"use strict";var _Class164,_Class165,_Class166;jo();WE();db=(_Class164=class db{constructor(e){this.syncParser=e.parser.LangiumParser;}parse(e,r){return Promise.resolve(this.syncParser.parse(e));}},o(_Class164,"DefaultAsyncParser"),_Class164),UI=(_Class165=class UI{constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator;}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){let e=this.createWorker();e.onReady(()=>{if(this.queue.length>0){let r=this.queue.shift();r&&(e.lock(),r.resolve(e));}}),this.workerPool.push(e);}}async parse(e,r){let n=await this.acquireParserWorker(r),i=new us(),a,s=r.onCancellationRequested(()=>{a=setTimeout(()=>{this.terminateWorker(n);},this.terminationDelay);});return n.parse(e).then(l=>{let u=this.hydrator.hydrate(l);i.resolve(u);}).catch(l=>{i.reject(l);}).finally(()=>{s.dispose(),clearTimeout(a);}),i.promise;}terminateWorker(e){e.terminate();let r=this.workerPool.indexOf(e);r>=0&&this.workerPool.splice(r,1);}async acquireParserWorker(e){this.initializeWorkers();for(let n of this.workerPool)if(n.ready)return n.lock(),n;let r=new us();return e.onCancellationRequested(()=>{let n=this.queue.indexOf(r);n>=0&&this.queue.splice(n,1),r.reject($c);}),this.queue.push(r),r.promise;}},o(_Class165,"AbstractThreadedAsyncParser"),_Class165),HI=(_Class166=class HI{get ready(){return this._ready;}get onReady(){return this.onReadyEmitter.event;}constructor(e,r,n,i){this.onReadyEmitter=new Kn.Emitter(),this.deferred=new us(),this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=i,r(a=>{let s=a;this.deferred.resolve(s),this.unlock();}),n(a=>{this.deferred.reject(a),this.unlock();});}terminate(){this.deferred.reject($c),this._terminate();}lock(){this._ready=!1;}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire();}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new us(),this.sendMessage(e),this.deferred.promise;}},o(_Class166,"ParserWorker"),_Class166);});var pb,qI=N(()=>{"use strict";var _Class167;Xo();jo();pb=(_Class167=class pb{constructor(){this.previousTokenSource=new vr.CancellationTokenSource(),this.writeQueue=[],this.readQueue=[],this.done=!0;}write(e){this.cancelWrite();let r=$E();return this.previousTokenSource=r,this.enqueue(this.writeQueue,e,r.token);}read(e){return this.enqueue(this.readQueue,e);}enqueue(e,r,n=vr.CancellationToken.None){let i=new us(),a={action:r,deferred:i,cancellationToken:n};return e.push(a),this.performNextOperation(),i.promise;}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:r,deferred:n,cancellationToken:i})=>{try{let a=await Promise.resolve().then(()=>r(i));n.resolve(a);}catch(a){zc(a)?n.resolve(void 0):n.reject(a);}})),this.done=!0,this.performNextOperation();}cancelWrite(){this.previousTokenSource.cancel();}},o(_Class167,"DefaultWorkspaceLock"),_Class167);});var mb,YI=N(()=>{"use strict";var _Class168;DE();Ic();Nl();as();m1();Ml();mb=(_Class168=class mb{constructor(e){this.grammarElementIdMap=new Ep(),this.tokenTypeIdMap=new Ep(),this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker;}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(r=>Object.assign(Object.assign({},r),{message:r.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))};}dehydrateLexerReport(e){return e;}createDehyrationContext(e){let r=new Map(),n=new Map();for(let i of Yo(e))r.set(i,{});if(e.$cstNode)for(let i of rp(e.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n};}dehydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,r));for(let[i,a]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(a)){let s=[];n[i]=s;for(let l of a)si(l)?s.push(this.dehydrateAstNode(l,r)):ma(l)?s.push(this.dehydrateReference(l,r)):s.push(l);}else si(a)?n[i]=this.dehydrateAstNode(a,r):ma(a)?n[i]=this.dehydrateReference(a,r):a!==void 0&&(n[i]=a);return n;}dehydrateReference(e,r){let n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=r.cstNodes.get(e.$refNode)),n;}dehydrateCstNode(e,r){let n=r.cstNodes.get(e);return V2(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=r.astNodes.get(e.astNode),Rl(e)?n.content=e.content.map(i=>this.dehydrateCstNode(i,r)):of(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n;}hydrate(e){let r=e.value,n=this.createHydrationContext(r);return"$cstNode"in r&&this.hydrateCstNode(r.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(r,n)};}createHydrationContext(e){let r=new Map(),n=new Map();for(let a of Yo(e))r.set(a,{});let i;if(e.$cstNode)for(let a of rp(e.$cstNode)){let s;"fullText"in a?(s=new l1(a.fullText),i=s):"content"in a?s=new Tp():"tokenType"in a&&(s=this.hydrateCstLeafNode(a)),s&&(n.set(a,s),s.root=i);}return{astNodes:r,cstNodes:n};}hydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=r.cstNodes.get(e.$cstNode));for(let[i,a]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(a)){let s=[];n[i]=s;for(let l of a)si(l)?s.push(this.setParent(this.hydrateAstNode(l,r),n)):ma(l)?s.push(this.hydrateReference(l,n,i,r)):s.push(l);}else si(a)?n[i]=this.setParent(this.hydrateAstNode(a,r),n):ma(a)?n[i]=this.hydrateReference(a,n,i,r):a!==void 0&&(n[i]=a);return n;}setParent(e,r){return e.$container=r,e;}hydrateReference(e,r,n,i){return this.linker.buildReference(r,n,i.cstNodes.get(e.$refNode),e.$refText);}hydrateCstNode(e,r,n=0){let i=r.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=r.astNodes.get(e.astNode),Rl(i))for(let a of e.content){let s=this.hydrateCstNode(a,r,n++);i.content.push(s);}return i;}hydrateCstLeafNode(e){let r=this.getTokenType(e.tokenType),n=e.offset,i=e.length,a=e.startLine,s=e.startColumn,l=e.endLine,u=e.endColumn,h=e.hidden;return new bp(n,i,{start:{line:a,character:s},end:{line:l,character:u}},r,h);}getTokenType(e){return this.lexer.definition[e];}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e);}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e);}createGrammarElementIdMap(){let e=0;for(let r of Yo(this.grammar))K2(r)&&this.grammarElementIdMap.set(r,e++);}},o(_Class168,"DefaultHydrator"),_Class168);});function ga(t){return{documentation:{CommentProvider:o(e=>new fb(e),"CommentProvider"),DocumentationProvider:o(e=>new hb(e),"DocumentationProvider")},parser:{AsyncParser:o(e=>new db(e),"AsyncParser"),GrammarConfig:o(e=>XN(e),"GrammarConfig"),LangiumParser:o(e=>rI(e),"LangiumParser"),CompletionParser:o(e=>eI(e),"CompletionParser"),ValueConverter:o(()=>new kp(),"ValueConverter"),TokenBuilder:o(()=>new Wu(),"TokenBuilder"),Lexer:o(e=>new Ap(e),"Lexer"),ParserErrorMessageProvider:o(()=>new c1(),"ParserErrorMessageProvider"),LexerErrorMessageProvider:o(()=>new lb(),"LexerErrorMessageProvider")},workspace:{AstNodeLocator:o(()=>new nb(),"AstNodeLocator"),AstNodeDescriptionProvider:o(e=>new tb(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:o(e=>new rb(e),"ReferenceDescriptionProvider")},references:{Linker:o(e=>new Ux(e),"Linker"),NameProvider:o(()=>new Hx(),"NameProvider"),ScopeProvider:o(e=>new jx(e),"ScopeProvider"),ScopeComputation:o(e=>new qx(e),"ScopeComputation"),References:o(e=>new Wx(e),"References")},serializer:{Hydrator:o(e=>new mb(e),"Hydrator"),JsonSerializer:o(e=>new Kx(e),"JsonSerializer")},validation:{DocumentValidator:o(e=>new eb(e),"DocumentValidator"),ValidationRegistry:o(e=>new Zx(e),"ValidationRegistry")},shared:o(()=>t.shared,"shared")};}function ya(t){return{ServiceRegistry:o(e=>new Qx(e),"ServiceRegistry"),workspace:{LangiumDocuments:o(e=>new Vx(e),"LangiumDocuments"),LangiumDocumentFactory:o(e=>new Gx(e),"LangiumDocumentFactory"),DocumentBuilder:o(e=>new ab(e),"DocumentBuilder"),IndexManager:o(e=>new sb(e),"IndexManager"),WorkspaceManager:o(e=>new ob(e),"WorkspaceManager"),FileSystemProvider:o(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:o(()=>new pb(),"WorkspaceLock"),ConfigurationProvider:o(e=>new ib(e),"ConfigurationProvider")}};}var XI=N(()=>{"use strict";jN();tI();nI();IE();iI();yI();vI();xI();bI();wI();UE();EI();SI();Jx();CI();AI();_I();LI();p1();RI();NI();XE();GI();VI();$x();WI();qI();YI();o(ga,"createDefaultCoreModule");o(ya,"createDefaultSharedCoreModule");});function $n(t,e,r,n,i,a,s,l,u){let h=[t,e,r,n,i,a,s,l,u].reduce(QE,{});return bue(h);}function xue(t){if(t&&t[vue])for(let e of Object.values(t))xue(e);return t;}function bue(t,e){let r=new Proxy({},{deleteProperty:o(()=>!1,"deleteProperty"),set:o(()=>{throw new Error("Cannot set property on injected service container");},"set"),get:o((n,i)=>i===vue?!0:yue(n,i,t,e||r),"get"),getOwnPropertyDescriptor:o((n,i)=>(yue(n,i,t,e||r),Object.getOwnPropertyDescriptor(n,i)),"getOwnPropertyDescriptor"),has:o((n,i)=>i in t,"has"),ownKeys:o(()=>[...Object.getOwnPropertyNames(t)],"ownKeys")});return r;}function yue(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:t[e]});if(t[e]===gue)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e];}else if(e in r){let i=r[e];t[e]=gue;try{t[e]=typeof i=="function"?i(n):bue(i,n);}catch(a){throw t[e]=a instanceof Error?a:void 0,a;}return t[e];}else return;}function QE(t,e){if(e){for(let[r,n]of Object.entries(e))if(n!==void 0){let i=t[r];i!==null&&n!==null&&typeof i=="object"&&typeof n=="object"?t[r]=QE(i,n):t[r]=n;}}return t;}var jI,vue,gue,KI=N(()=>{"use strict";(function(t){t.merge=(e,r)=>QE(QE({},e),r);})(jI||(jI={}));o($n,"inject");vue=Symbol("isProxy");o(xue,"eagerLoad");o(bue,"_inject");gue=Symbol();o(yue,"_resolve");o(QE,"_merge");});var Tue=N(()=>{"use strict";});var wue=N(()=>{"use strict";VI();GI();zI();});var kue=N(()=>{"use strict";});var Eue=N(()=>{"use strict";jN();kue();});var QI,_p,ZE,ZI,Sue=N(()=>{"use strict";var _Class169,_Class170;hf();IE();XE();QI={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]};(function(t){t.REGULAR="indentation-sensitive",t.IGNORE_INDENTATION="ignore-indentation";})(_p||(_p={}));ZE=(_Class169=class ZE extends Wu{constructor(e=QI){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options=Object.assign(Object.assign({},QI),e),this.indentTokenType=cf({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=cf({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1});}buildTokens(e,r){let n=super.buildTokens(e,r);if(!YE(n))throw new Error("Invalid tokens built by default builder");let{indentTokenName:i,dedentTokenName:a,whitespaceTokenName:s,ignoreIndentationDelimiters:l}=this.options,u,h,f,d=[];for(let p of n){for(let[m,g]of l)p.name===m?p.PUSH_MODE=_p.IGNORE_INDENTATION:p.name===g&&(p.POP_MODE=!0);p.name===a?u=p:p.name===i?h=p:p.name===s?f=p:d.push(p);}if(!u||!h||!f)throw new Error("Some indentation/whitespace tokens not found!");return l.length>0?{modes:{[_p.REGULAR]:[u,h,...d,f],[_p.IGNORE_INDENTATION]:[...d,f]},defaultMode:_p.REGULAR}:[u,h,f,...d];}flushLexingReport(e){let r=super.flushLexingReport(e);return Object.assign(Object.assign({},r),{remainingDedents:this.flushRemainingDedents(e)});}isStartOfLine(e,r){return r===0||`\r
`.includes(e[r-1]);}matchWhitespace(e,r,n,i){var a;this.whitespaceRegExp.lastIndex=r;let s=this.whitespaceRegExp.exec(e);return{currIndentLevel:(a=s===null||s===void 0?void 0:s[0].length)!==null&&a!==void 0?a:0,prevIndentLevel:this.indentationStack.at(-1),match:s};}createIndentationTokenInstance(e,r,n,i){let a=this.getLineNumber(r,i);return Gu(e,n,i,i+n.length,a,a,1,n.length);}getLineNumber(e,r){return e.substring(0,r).split(/\r\n|\r|\n/).length;}indentMatcher(e,r,n,i){if(!this.isStartOfLine(e,r))return null;let{currIndentLevel:a,prevIndentLevel:s,match:l}=this.matchWhitespace(e,r,n,i);return a<=s?null:(this.indentationStack.push(a),l);}dedentMatcher(e,r,n,i){var a,s,l,u;if(!this.isStartOfLine(e,r))return null;let{currIndentLevel:h,prevIndentLevel:f,match:d}=this.matchWhitespace(e,r,n,i);if(h>=f)return null;let p=this.indentationStack.lastIndexOf(h);if(p===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${h} at offset: ${r}. Current indentation stack: ${this.indentationStack}`,offset:r,length:(s=(a=d===null||d===void 0?void 0:d[0])===null||a===void 0?void 0:a.length)!==null&&s!==void 0?s:0,line:this.getLineNumber(e,r),column:1}),null;let m=this.indentationStack.length-p-1,g=(u=(l=e.substring(0,r).match(/[\r\n]+$/))===null||l===void 0?void 0:l[0].length)!==null&&u!==void 0?u:1;for(let y=0;y<m;y++){let v=this.createIndentationTokenInstance(this.dedentTokenType,e,"",r-(g-1));n.push(v),this.indentationStack.pop();}return null;}buildTerminalToken(e){let r=super.buildTerminalToken(e),{indentTokenName:n,dedentTokenName:i,whitespaceTokenName:a}=this.options;return r.name===n?this.indentTokenType:r.name===i?this.dedentTokenType:r.name===a?cf({name:a,pattern:this.whitespaceRegExp,group:Xn.SKIPPED}):r;}flushRemainingDedents(e){let r=[];for(;this.indentationStack.length>1;)r.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],r;}},o(_Class169,"IndentationAwareTokenBuilder"),_Class169),ZI=(_Class170=class ZI extends Ap{constructor(e){if(super(e),e.parser.TokenBuilder instanceof ZE)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder");}tokenize(e,r=qE){let n=super.tokenize(e),i=n.report;(r===null||r===void 0?void 0:r.mode)==="full"&&n.tokens.push(...i.remainingDedents),i.remainingDedents=[];let{indentTokenType:a,dedentTokenType:s}=this.indentationTokenBuilder,l=a.tokenTypeIdx,u=s.tokenTypeIdx,h=[],f=n.tokens.length-1;for(let d=0;d<f;d++){let p=n.tokens[d],m=n.tokens[d+1];if(p.tokenTypeIdx===l&&m.tokenTypeIdx===u){d++;continue;}h.push(p);}return f>=0&&h.push(n.tokens[f]),n.tokens=h,n;}},o(_Class170,"IndentationAwareLexer"),_Class170);});var Cue=N(()=>{"use strict";});var Aue=N(()=>{"use strict";WI();tI();DE();Sue();nI();$x();XE();ME();Cue();IE();iI();});var _ue=N(()=>{"use strict";yI();vI();xI();TI();bI();wI();});var Due=N(()=>{"use strict";YI();UE();});var JE,va,JI=N(()=>{"use strict";var _Class171;JE=(_Class171=class JE{readFile(){throw new Error("No file system is available.");}async readDirectory(){return[];}},o(_Class171,"EmptyFileSystemProvider"),_Class171),va={fileSystemProvider:o(()=>new JE(),"fileSystemProvider")};});function nze(){let t=$n(ya(va),rze),e=$n(ga({shared:t}),tze);return t.ServiceRegistry.register(e),e;}function Vc(t){var e;let r=nze(),n=r.serializer.JsonSerializer.deserialize(t);return r.shared.workspace.LangiumDocumentFactory.fromModel(n,hs.parse(`memory://${(e=n.name)!==null&&e!==void 0?e:"grammar"}.langium`)),n;}var tze,rze,Lue=N(()=>{"use strict";XI();KI();Ic();JI();Gc();tze={Grammar:o(()=>{},"Grammar"),LanguageMetaData:o(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},rze={AstReflection:o(()=>new Dg(),"AstReflection")};o(nze,"createMinimalGrammarServices");o(Vc,"loadGrammarFromJson");});var zr={};hr(zr,{AstUtils:()=>Nk,BiMap:()=>Ep,Cancellation:()=>vr,ContextCache:()=>Sp,CstUtils:()=>wk,DONE_RESULT:()=>Ma,Deferred:()=>us,Disposable:()=>pf,DisposableCache:()=>y1,DocumentCache:()=>GE,EMPTY_STREAM:()=>U2,ErrorWithLocation:()=>ip,GrammarUtils:()=>Bk,MultiMap:()=>Fl,OperationCancelled:()=>$c,Reduction:()=>Um,RegExpUtils:()=>Ok,SimpleCache:()=>Xx,StreamImpl:()=>oo,TreeStreamImpl:()=>Rc,URI:()=>hs,UriUtils:()=>fs,WorkspaceCache:()=>v1,assertUnreachable:()=>Mc,delayNextTick:()=>dI,interruptAndCheck:()=>Ti,isOperationCancelled:()=>zc,loadGrammarFromJson:()=>Vc,setInterruptionPeriod:()=>eue,startCancelableOperation:()=>$E,stream:()=>Jr});var Rue=N(()=>{"use strict";VE();WE();Sr(zr,Kn);m1();DI();kk();Lue();jo();$s();Gc();as();Xo();Ml();Pl();Mg();});var Nue=N(()=>{"use strict";SI();Jx();});var Mue=N(()=>{"use strict";CI();AI();_I();LI();p1();JI();RI();qI();NI();});var xa={};hr(xa,{AbstractAstReflection:()=>ep,AbstractCstNode:()=>Ox,AbstractLangiumParser:()=>Px,AbstractParserErrorMessageProvider:()=>RE,AbstractThreadedAsyncParser:()=>UI,AstUtils:()=>Nk,BiMap:()=>Ep,Cancellation:()=>vr,CompositeCstNodeImpl:()=>Tp,ContextCache:()=>Sp,CstNodeBuilder:()=>Ix,CstUtils:()=>wk,DEFAULT_TOKENIZE_OPTIONS:()=>qE,DONE_RESULT:()=>Ma,DatatypeSymbol:()=>LE,DefaultAstNodeDescriptionProvider:()=>tb,DefaultAstNodeLocator:()=>nb,DefaultAsyncParser:()=>db,DefaultCommentProvider:()=>fb,DefaultConfigurationProvider:()=>ib,DefaultDocumentBuilder:()=>ab,DefaultDocumentValidator:()=>eb,DefaultHydrator:()=>mb,DefaultIndexManager:()=>sb,DefaultJsonSerializer:()=>Kx,DefaultLangiumDocumentFactory:()=>Gx,DefaultLangiumDocuments:()=>Vx,DefaultLexer:()=>Ap,DefaultLexerErrorMessageProvider:()=>lb,DefaultLinker:()=>Ux,DefaultNameProvider:()=>Hx,DefaultReferenceDescriptionProvider:()=>rb,DefaultReferences:()=>Wx,DefaultScopeComputation:()=>qx,DefaultScopeProvider:()=>jx,DefaultServiceRegistry:()=>Qx,DefaultTokenBuilder:()=>Wu,DefaultValueConverter:()=>kp,DefaultWorkspaceLock:()=>pb,DefaultWorkspaceManager:()=>ob,Deferred:()=>us,Disposable:()=>pf,DisposableCache:()=>y1,DocumentCache:()=>GE,DocumentState:()=>wn,DocumentValidator:()=>Ko,EMPTY_SCOPE:()=>V$e,EMPTY_STREAM:()=>U2,EmptyFileSystem:()=>va,EmptyFileSystemProvider:()=>JE,ErrorWithLocation:()=>ip,GrammarAST:()=>Z2,GrammarUtils:()=>Bk,IndentationAwareLexer:()=>ZI,IndentationAwareTokenBuilder:()=>ZE,JSDocDocumentationProvider:()=>hb,LangiumCompletionParser:()=>Fx,LangiumParser:()=>Bx,LangiumParserErrorMessageProvider:()=>c1,LeafCstNodeImpl:()=>bp,LexingMode:()=>_p,MapScope:()=>Yx,Module:()=>jI,MultiMap:()=>Fl,OperationCancelled:()=>$c,ParserWorker:()=>HI,Reduction:()=>Um,RegExpUtils:()=>Ok,RootCstNodeImpl:()=>l1,SimpleCache:()=>Xx,StreamImpl:()=>oo,StreamScope:()=>g1,TextDocument:()=>f1,TreeStreamImpl:()=>Rc,URI:()=>hs,UriUtils:()=>fs,ValidationCategory:()=>x1,ValidationRegistry:()=>Zx,ValueConverter:()=>Fc,WorkspaceCache:()=>v1,assertUnreachable:()=>Mc,createCompletionParser:()=>eI,createDefaultCoreModule:()=>ga,createDefaultSharedCoreModule:()=>ya,createGrammarConfig:()=>XN,createLangiumParser:()=>rI,createParser:()=>zx,delayNextTick:()=>dI,diagnosticData:()=>Cp,eagerLoad:()=>xue,getDiagnosticRange:()=>lue,indentationBuilderDefaultOptions:()=>QI,inject:()=>$n,interruptAndCheck:()=>Ti,isAstNode:()=>si,isAstNodeDescription:()=>nN,isAstNodeWithComment:()=>kI,isCompositeCstNode:()=>Rl,isIMultiModeLexerDefinition:()=>II,isJSDoc:()=>FI,isLeafCstNode:()=>of,isLinkingError:()=>tp,isNamed:()=>sue,isOperationCancelled:()=>zc,isReference:()=>ma,isRootCstNode:()=>V2,isTokenTypeArray:()=>YE,isTokenTypeDictionary:()=>MI,loadGrammarFromJson:()=>Vc,parseJSDoc:()=>BI,prepareLangiumParser:()=>Yce,setInterruptionPeriod:()=>eue,startCancelableOperation:()=>$E,stream:()=>Jr,toDiagnosticData:()=>cue,toDiagnosticSeverity:()=>HE});var ho=N(()=>{"use strict";XI();KI();EI();Tue();Nl();wue();Eue();Aue();_ue();Due();Rue();Sr(xa,zr);Nue();Mue();Ic();});function Gue(t){return $l.isInstance(t,gb);}function Vue(t){return $l.isInstance(t,b1);}function Uue(t){return $l.isInstance(t,T1);}function Hue(t){return $l.isInstance(t,w1);}function Wue(t){return $l.isInstance(t,yb);}function que(t){return $l.isInstance(t,k1);}function Yue(t){return $l.isInstance(t,vb);}function Xue(t){return $l.isInstance(t,xb);}function jue(t){return $l.isInstance(t,bb);}function Kue(t){return $l.isInstance(t,Tb);}function Que(t){return $l.isInstance(t,wb);}var ize,xt,cO,gb,eS,b1,tS,rS,eO,T1,tO,rO,nO,w1,iO,yb,nS,aO,k1,sO,vb,xb,bb,Tb,oS,oO,wb,lO,iS,aS,sS,Zue,$l,Iue,aze,Oue,sze,Pue,oze,Bue,lze,Fue,cze,$ue,uze,zue,hze,fze,dze,pze,mze,gze,yze,vze,ds,uO,hO,fO,dO,pO,mO,gO,xze,bze,Tze,wze,mf,qu,Ba,kze,Fa=N(()=>{"use strict";var _Class172,_Class173,_Class174,_Class175,_Class176;ho();ho();ho();ho();ize=Object.defineProperty,xt=o((t,e)=>ize(t,"name",{value:e,configurable:!0}),"__name"),cO="Statement",gb="Architecture";o(Gue,"isArchitecture");xt(Gue,"isArchitecture");eS="Axis",b1="Branch";o(Vue,"isBranch");xt(Vue,"isBranch");tS="Checkout",rS="CherryPicking",eO="ClassDefStatement",T1="Commit";o(Uue,"isCommit");xt(Uue,"isCommit");tO="Curve",rO="Edge",nO="Entry",w1="GitGraph";o(Hue,"isGitGraph");xt(Hue,"isGitGraph");iO="Group",yb="Info";o(Wue,"isInfo");xt(Wue,"isInfo");nS="Item",aO="Junction",k1="Merge";o(que,"isMerge");xt(que,"isMerge");sO="Option",vb="Packet";o(Yue,"isPacket");xt(Yue,"isPacket");xb="PacketBlock";o(Xue,"isPacketBlock");xt(Xue,"isPacketBlock");bb="Pie";o(jue,"isPie");xt(jue,"isPie");Tb="PieSection";o(Kue,"isPieSection");xt(Kue,"isPieSection");oS="Radar",oO="Service",wb="Treemap";o(Que,"isTreemap");xt(Que,"isTreemap");lO="TreemapRow",iS="Direction",aS="Leaf",sS="Section",Zue=(_Class172=class Zue extends ep{getAllTypes(){return[gb,eS,b1,tS,rS,eO,T1,tO,iS,rO,nO,w1,iO,yb,nS,aO,aS,k1,sO,vb,xb,bb,Tb,oS,sS,oO,cO,wb,lO];}computeIsSubtype(t,e){switch(t){case b1:case tS:case rS:case T1:case k1:return this.isSubtype(cO,e);case iS:return this.isSubtype(w1,e);case aS:case sS:return this.isSubtype(nS,e);default:return!1;}}getReferenceType(t){let e=`${t.container.$type}:${t.property}`;switch(e){case"Entry:axis":return eS;default:throw new Error(`${e} is not a valid reference id.`);}}getTypeMetaData(t){switch(t){case gb:return{name:gb,properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case eS:return{name:eS,properties:[{name:"label"},{name:"name"}]};case b1:return{name:b1,properties:[{name:"name"},{name:"order"}]};case tS:return{name:tS,properties:[{name:"branch"}]};case rS:return{name:rS,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case eO:return{name:eO,properties:[{name:"className"},{name:"styleText"}]};case T1:return{name:T1,properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case tO:return{name:tO,properties:[{name:"entries",defaultValue:[]},{name:"label"},{name:"name"}]};case rO:return{name:rO,properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case nO:return{name:nO,properties:[{name:"axis"},{name:"value"}]};case w1:return{name:w1,properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case iO:return{name:iO,properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case yb:return{name:yb,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case nS:return{name:nS,properties:[{name:"classSelector"},{name:"name"}]};case aO:return{name:aO,properties:[{name:"id"},{name:"in"}]};case k1:return{name:k1,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case sO:return{name:sO,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case vb:return{name:vb,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case xb:return{name:xb,properties:[{name:"bits"},{name:"end"},{name:"label"},{name:"start"}]};case bb:return{name:bb,properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case Tb:return{name:Tb,properties:[{name:"label"},{name:"value"}]};case oS:return{name:oS,properties:[{name:"accDescr"},{name:"accTitle"},{name:"axes",defaultValue:[]},{name:"curves",defaultValue:[]},{name:"options",defaultValue:[]},{name:"title"}]};case oO:return{name:oO,properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case wb:return{name:wb,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"},{name:"TreemapRows",defaultValue:[]}]};case lO:return{name:lO,properties:[{name:"indent"},{name:"item"}]};case iS:return{name:iS,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};case aS:return{name:aS,properties:[{name:"classSelector"},{name:"name"},{name:"value"}]};case sS:return{name:sS,properties:[{name:"classSelector"},{name:"name"}]};default:return{name:t,properties:[]};}}},o(_Class172,"MermaidAstReflection"),xt(_Class172,"MermaidAstReflection"),_Class172),$l=new Zue(),aze=xt(()=>Iue!==null&&Iue!==void 0?Iue:Iue=Vc(`{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"InfoGrammar"),sze=xt(()=>Oue!==null&&Oue!==void 0?Oue:Oue=Vc(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"PacketGrammar"),oze=xt(()=>Pue!==null&&Pue!==void 0?Pue:Pue=Vc(`{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"}}]},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"PieGrammar"),lze=xt(()=>Bue!==null&&Bue!==void 0?Bue:Bue=Vc(`{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"ArchitectureGrammar"),cze=xt(()=>Fue!==null&&Fue!==void 0?Fue:Fue=Vc(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"GitGraphGrammar"),uze=xt(()=>$ue!==null&&$ue!==void 0?$ue:$ue=Vc(`{"$type":"Grammar","isDeclared":true,"name":"Radar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"}}]},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}}}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"types":[],"usedGrammars":[]}`),"RadarGrammar"),hze=xt(()=>zue!==null&&zue!==void 0?zue:zue=Vc(`{"$type":"Grammar","isDeclared":true,"name":"Treemap","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"}},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"}},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","}},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`),"TreemapGrammar"),fze={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},dze={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},pze={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},mze={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},gze={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},yze={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},vze={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ds={AstReflection:xt(()=>new Zue(),"AstReflection")},uO={Grammar:xt(()=>aze(),"Grammar"),LanguageMetaData:xt(()=>fze,"LanguageMetaData"),parser:{}},hO={Grammar:xt(()=>sze(),"Grammar"),LanguageMetaData:xt(()=>dze,"LanguageMetaData"),parser:{}},fO={Grammar:xt(()=>oze(),"Grammar"),LanguageMetaData:xt(()=>pze,"LanguageMetaData"),parser:{}},dO={Grammar:xt(()=>lze(),"Grammar"),LanguageMetaData:xt(()=>mze,"LanguageMetaData"),parser:{}},pO={Grammar:xt(()=>cze(),"Grammar"),LanguageMetaData:xt(()=>gze,"LanguageMetaData"),parser:{}},mO={Grammar:xt(()=>uze(),"Grammar"),LanguageMetaData:xt(()=>yze,"LanguageMetaData"),parser:{}},gO={Grammar:xt(()=>hze(),"Grammar"),LanguageMetaData:xt(()=>vze,"LanguageMetaData"),parser:{}},xze=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,bze=/accTitle[\t ]*:([^\n\r]*)/,Tze=/title([\t ][^\n\r]*|)/,wze={ACC_DESCR:xze,ACC_TITLE:bze,TITLE:Tze},mf=(_Class173=class mf extends kp{runConverter(t,e,r){let n=this.runCommonConverter(t,e,r);return n===void 0&&(n=this.runCustomConverter(t,e,r)),n===void 0?super.runConverter(t,e,r):n;}runCommonConverter(t,e,r){let n=wze[t.name];if(n===void 0)return;let i=n.exec(e);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm," ");if(i[2]!==void 0)return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,`
`);}}},o(_Class173,"AbstractMermaidValueConverter"),xt(_Class173,"AbstractMermaidValueConverter"),_Class173),qu=(_Class174=class qu extends mf{runCustomConverter(t,e,r){}},o(_Class174,"CommonValueConverter"),xt(_Class174,"CommonValueConverter"),_Class174),Ba=(_Class175=class Ba extends Wu{constructor(t){super(),this.keywords=new Set(t);}buildKeywordTokens(t,e,r){let n=super.buildKeywordTokens(t,e,r);return n.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"));}),n;}},o(_Class175,"AbstractMermaidTokenBuilder"),xt(_Class175,"AbstractMermaidTokenBuilder"),_Class175),kze=(_Class176=class kze extends Ba{},o(_Class176,"CommonTokenBuilder"),xt(_Class176,"CommonTokenBuilder"),_Class176);});function cS(t=va){let e=$n(ya(t),ds),r=$n(ga({shared:e}),pO,lS);return e.ServiceRegistry.register(r),{shared:e,GitGraph:r};}var Eze,lS,yO=N(()=>{"use strict";var _Class177;Fa();ho();Eze=(_Class177=class Eze extends Ba{constructor(){super(["gitGraph"]);}},o(_Class177,"GitGraphTokenBuilder"),xt(_Class177,"GitGraphTokenBuilder"),_Class177),lS={parser:{TokenBuilder:xt(()=>new Eze(),"TokenBuilder"),ValueConverter:xt(()=>new qu(),"ValueConverter")}};o(cS,"createGitGraphServices");xt(cS,"createGitGraphServices");});function hS(t=va){let e=$n(ya(t),ds),r=$n(ga({shared:e}),uO,uS);return e.ServiceRegistry.register(r),{shared:e,Info:r};}var Sze,uS,vO=N(()=>{"use strict";var _Class178;Fa();ho();Sze=(_Class178=class Sze extends Ba{constructor(){super(["info","showInfo"]);}},o(_Class178,"InfoTokenBuilder"),xt(_Class178,"InfoTokenBuilder"),_Class178),uS={parser:{TokenBuilder:xt(()=>new Sze(),"TokenBuilder"),ValueConverter:xt(()=>new qu(),"ValueConverter")}};o(hS,"createInfoServices");xt(hS,"createInfoServices");});function dS(t=va){let e=$n(ya(t),ds),r=$n(ga({shared:e}),hO,fS);return e.ServiceRegistry.register(r),{shared:e,Packet:r};}var Cze,fS,xO=N(()=>{"use strict";var _Class179;Fa();ho();Cze=(_Class179=class Cze extends Ba{constructor(){super(["packet"]);}},o(_Class179,"PacketTokenBuilder"),xt(_Class179,"PacketTokenBuilder"),_Class179),fS={parser:{TokenBuilder:xt(()=>new Cze(),"TokenBuilder"),ValueConverter:xt(()=>new qu(),"ValueConverter")}};o(dS,"createPacketServices");xt(dS,"createPacketServices");});function mS(t=va){let e=$n(ya(t),ds),r=$n(ga({shared:e}),fO,pS);return e.ServiceRegistry.register(r),{shared:e,Pie:r};}var Aze,_ze,pS,bO=N(()=>{"use strict";var _Class180,_Class181;Fa();ho();Aze=(_Class180=class Aze extends Ba{constructor(){super(["pie","showData"]);}},o(_Class180,"PieTokenBuilder"),xt(_Class180,"PieTokenBuilder"),_Class180),_ze=(_Class181=class _ze extends mf{runCustomConverter(t,e,r){if(t.name==="PIE_SECTION_LABEL")return e.replace(/"/g,"").trim();}},o(_Class181,"PieValueConverter"),xt(_Class181,"PieValueConverter"),_Class181),pS={parser:{TokenBuilder:xt(()=>new Aze(),"TokenBuilder"),ValueConverter:xt(()=>new _ze(),"ValueConverter")}};o(mS,"createPieServices");xt(mS,"createPieServices");});function yS(t=va){let e=$n(ya(t),ds),r=$n(ga({shared:e}),dO,gS);return e.ServiceRegistry.register(r),{shared:e,Architecture:r};}var Dze,Lze,gS,TO=N(()=>{"use strict";var _Class182,_Class183;Fa();ho();Dze=(_Class182=class Dze extends Ba{constructor(){super(["architecture"]);}},o(_Class182,"ArchitectureTokenBuilder"),xt(_Class182,"ArchitectureTokenBuilder"),_Class182),Lze=(_Class183=class Lze extends mf{runCustomConverter(t,e,r){if(t.name==="ARCH_ICON")return e.replace(/[()]/g,"").trim();if(t.name==="ARCH_TEXT_ICON")return e.replace(/["()]/g,"");if(t.name==="ARCH_TITLE")return e.replace(/[[\]]/g,"").trim();}},o(_Class183,"ArchitectureValueConverter"),xt(_Class183,"ArchitectureValueConverter"),_Class183),gS={parser:{TokenBuilder:xt(()=>new Dze(),"TokenBuilder"),ValueConverter:xt(()=>new Lze(),"ValueConverter")}};o(yS,"createArchitectureServices");xt(yS,"createArchitectureServices");});function xS(t=va){let e=$n(ya(t),ds),r=$n(ga({shared:e}),mO,vS);return e.ServiceRegistry.register(r),{shared:e,Radar:r};}var Rze,vS,wO=N(()=>{"use strict";var _Class184;Fa();ho();Rze=(_Class184=class Rze extends Ba{constructor(){super(["radar-beta"]);}},o(_Class184,"RadarTokenBuilder"),xt(_Class184,"RadarTokenBuilder"),_Class184),vS={parser:{TokenBuilder:xt(()=>new Rze(),"TokenBuilder"),ValueConverter:xt(()=>new qu(),"ValueConverter")}};o(xS,"createRadarServices");xt(xS,"createRadarServices");});function Jue(t){let e=t.validation.TreemapValidator,r=t.validation.ValidationRegistry;if(r){let n={Treemap:e.checkSingleRoot.bind(e)};r.register(n,e);}}function TS(t=va){let e=$n(ya(t),ds),r=$n(ga({shared:e}),gO,bS);return e.ServiceRegistry.register(r),Jue(r),{shared:e,Treemap:r};}var Nze,Mze,Ize,Oze,bS,kO=N(()=>{"use strict";var _Class185,_Class186,_Class187;Fa();ho();Nze=(_Class185=class Nze extends Ba{constructor(){super(["treemap"]);}},o(_Class185,"TreemapTokenBuilder"),xt(_Class185,"TreemapTokenBuilder"),_Class185),Mze=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,Ize=(_Class186=class Ize extends mf{runCustomConverter(t,e,r){if(t.name==="NUMBER2")return parseFloat(e.replace(/,/g,""));if(t.name==="SEPARATOR")return e.substring(1,e.length-1);if(t.name==="STRING2")return e.substring(1,e.length-1);if(t.name==="INDENTATION")return e.length;if(t.name==="ClassDef"){if(typeof e!="string")return e;let n=Mze.exec(e);if(n)return{$type:"ClassDefStatement",className:n[1],styleText:n[2]||void 0};}}},o(_Class186,"TreemapValueConverter"),xt(_Class186,"TreemapValueConverter"),_Class186);o(Jue,"registerValidationChecks");xt(Jue,"registerValidationChecks");Oze=(_Class187=class Oze{checkSingleRoot(t,e){let r;for(let n of t.TreemapRows)n.item&&(r===void 0&&n.indent===void 0?r=0:n.indent===void 0?e("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}):r!==void 0&&r>=parseInt(n.indent,10)&&e("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}));}},o(_Class187,"TreemapValidator"),xt(_Class187,"TreemapValidator"),_Class187),bS={parser:{TokenBuilder:xt(()=>new Nze(),"TokenBuilder"),ValueConverter:xt(()=>new Ize(),"ValueConverter")},validation:{TreemapValidator:xt(()=>new Oze(),"TreemapValidator")}};o(TS,"createTreemapServices");xt(TS,"createTreemapServices");});var ehe={};hr(ehe,{InfoModule:()=>uS,createInfoServices:()=>hS});var the=N(()=>{"use strict";vO();Fa();});var rhe={};hr(rhe,{PacketModule:()=>fS,createPacketServices:()=>dS});var nhe=N(()=>{"use strict";xO();Fa();});var ihe={};hr(ihe,{PieModule:()=>pS,createPieServices:()=>mS});var ahe=N(()=>{"use strict";bO();Fa();});var she={};hr(she,{ArchitectureModule:()=>gS,createArchitectureServices:()=>yS});var ohe=N(()=>{"use strict";TO();Fa();});var lhe={};hr(lhe,{GitGraphModule:()=>lS,createGitGraphServices:()=>cS});var che=N(()=>{"use strict";yO();Fa();});var uhe={};hr(uhe,{RadarModule:()=>vS,createRadarServices:()=>xS});var hhe=N(()=>{"use strict";wO();Fa();});var fhe={};hr(fhe,{TreemapModule:()=>bS,createTreemapServices:()=>TS});var dhe=N(()=>{"use strict";kO();Fa();});async function ps(t,e){let r=Pze[t];if(!r)throw new Error(`Unknown diagram type: ${t}`);Yu[t]||(await r());let i=Yu[t].parse(e);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new Bze(i);return i.value;}var Yu,Pze,Bze,gf=N(()=>{"use strict";var _Class188;yO();vO();xO();bO();TO();wO();kO();Fa();Yu={},Pze={info:xt(async()=>{let{createInfoServices:t}=await Promise.resolve().then(()=>(the(),ehe)),e=t().Info.parser.LangiumParser;Yu.info=e;},"info"),packet:xt(async()=>{let{createPacketServices:t}=await Promise.resolve().then(()=>(nhe(),rhe)),e=t().Packet.parser.LangiumParser;Yu.packet=e;},"packet"),pie:xt(async()=>{let{createPieServices:t}=await Promise.resolve().then(()=>(ahe(),ihe)),e=t().Pie.parser.LangiumParser;Yu.pie=e;},"pie"),architecture:xt(async()=>{let{createArchitectureServices:t}=await Promise.resolve().then(()=>(ohe(),she)),e=t().Architecture.parser.LangiumParser;Yu.architecture=e;},"architecture"),gitGraph:xt(async()=>{let{createGitGraphServices:t}=await Promise.resolve().then(()=>(che(),lhe)),e=t().GitGraph.parser.LangiumParser;Yu.gitGraph=e;},"gitGraph"),radar:xt(async()=>{let{createRadarServices:t}=await Promise.resolve().then(()=>(hhe(),uhe)),e=t().Radar.parser.LangiumParser;Yu.radar=e;},"radar"),treemap:xt(async()=>{let{createTreemapServices:t}=await Promise.resolve().then(()=>(dhe(),fhe)),e=t().Treemap.parser.LangiumParser;Yu.treemap=e;},"treemap")};o(ps,"parse");xt(ps,"parse");Bze=(_Class188=class Bze extends Error{constructor(t){let e=t.lexerErrors.map(n=>n.message).join(`
`),r=t.parserErrors.map(n=>n.message).join(`
`);super(`Parsing failed: ${e} ${r}`),this.result=t;}},o(_Class188,"MermaidParseError"),xt(_Class188,"MermaidParseError"),_Class188);});function Qo(t,e){var _e$setAccDescription,_e$setAccTitle,_e$setDiagramTitle;t.accDescr&&(_e$setAccDescription=e.setAccDescription)!==null&&_e$setAccDescription!==void 0&&_e$setAccDescription.call(e,t.accDescr),t.accTitle&&(_e$setAccTitle=e.setAccTitle)!==null&&_e$setAccTitle!==void 0&&_e$setAccTitle.call(e,t.accTitle),t.title&&((_e$setDiagramTitle=e.setDiagramTitle)===null||_e$setDiagramTitle===void 0?void 0:_e$setDiagramTitle.call(e,t.title));}var Dp=N(()=>{"use strict";o(Qo,"populateCommonDb");});var jr,wS=N(()=>{"use strict";jr={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4};});var E1,EO=N(()=>{"use strict";var _Class189;E1=(_Class189=class E1{constructor(e){this.init=e;this.records=this.init();}reset(){this.records=this.init();}},o(_Class189,"ImperativeState"),_Class189);});function SO(){return _9({length:7});}function $ze(t,e){let r=Object.create(null);return t.reduce((n,i)=>{let a=e(i);return r[a]||(r[a]=!0,n.push(i)),n;},[]);}function phe(t,e,r){let n=t.indexOf(e);n===-1?t.push(r):t.splice(n,1,r);}function ghe(t){let e=t.reduce((i,a)=>i.seq>a.seq?i:a,t[0]),r="";t.forEach(function(i){i===e?r+="	*":r+="	|";});let n=[r,e.id,e.seq];for(let i in At.records.branches)At.records.branches.get(i)===e.id&&n.push(i);if(X.debug(n.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){let i=At.records.commits.get(e.parents[0]);phe(t,e,i),e.parents[1]&&t.push(At.records.commits.get(e.parents[1]));}else{if(e.parents.length==0)return;if(e.parents[0]){let i=At.records.commits.get(e.parents[0]);phe(t,e,i);}}t=$ze(t,i=>i.id),ghe(t);}var Fze,Lp,At,zze,Gze,Vze,Uze,Hze,Wze,qze,mhe,Yze,Xze,jze,Kze,Qze,yhe,Zze,Jze,eGe,kS,CO=N(()=>{"use strict";yt();nr();Jn();dr();ci();wS();EO();Ca();Fze=lr.gitGraph,Lp=o(()=>Fn({...Fze,...Qt().gitGraph}),"getConfig"),At=new E1(()=>{let t=Lp(),e=t.mainBranchName,r=t.mainBranchOrder;return{mainBranchName:e,commits:new Map(),head:null,branchConfig:new Map([[e,{name:e,order:r}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}};});o(SO,"getID");o($ze,"uniqBy");zze=o(function(t){At.records.direction=t;},"setDirection"),Gze=o(function(t){var _t10;X.debug("options str",t),t=(_t10=t)===null||_t10===void 0?void 0:_t10.trim(),t=t||"{}";try{At.records.options=JSON.parse(t);}catch(e){X.error("error while parsing gitGraph options",e.message);}},"setOptions"),Vze=o(function(){return At.records.options;},"getOptions"),Uze=o(function(t){var _i2;let e=t.msg,r=t.id,n=t.type,i=t.tags;X.info("commit",e,r,n,i),X.debug("Entering commit:",e,r,n,i);let a=Lp();r=Ze.sanitizeText(r,a),e=Ze.sanitizeText(e,a),i=(_i2=i)===null||_i2===void 0?void 0:_i2.map(l=>Ze.sanitizeText(l,a));let s={id:r||At.records.seq+"-"+SO(),message:e,seq:At.records.seq++,type:n!==null&&n!==void 0?n:jr.NORMAL,tags:i!==null&&i!==void 0?i:[],parents:At.records.head==null?[]:[At.records.head.id],branch:At.records.currBranch};At.records.head=s,X.info("main branch",a.mainBranchName),At.records.commits.has(s.id)&&X.warn(`Commit ID ${s.id} already exists`),At.records.commits.set(s.id,s),At.records.branches.set(At.records.currBranch,s.id),X.debug("in pushCommit "+s.id);},"commit"),Hze=o(function(t){let e=t.name,r=t.order;if(e=Ze.sanitizeText(e,Lp()),At.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);At.records.branches.set(e,At.records.head!=null?At.records.head.id:null),At.records.branchConfig.set(e,{name:e,order:r}),mhe(e),X.debug("in createBranch");},"branch"),Wze=o(t=>{let e=t.branch,r=t.id,n=t.type,i=t.tags,a=Lp();e=Ze.sanitizeText(e,a),r&&(r=Ze.sanitizeText(r,a));let s=At.records.branches.get(At.records.currBranch),l=At.records.branches.get(e),u=s?At.records.commits.get(s):void 0,h=l?At.records.commits.get(l):void 0;if(u&&h&&u.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(At.records.currBranch===e){let p=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},p;}if(u===void 0||!u){let p=new Error(`Incorrect usage of "merge". Current branch (${At.records.currBranch})has no commits`);throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},p;}if(!At.records.branches.has(e)){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},p;}if(h===void 0||!h){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},p;}if(u===h){let p=new Error('Incorrect usage of "merge". Both branches have same head');throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},p;}if(r&&At.records.commits.has(r)){let p=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id");throw p.hash={text:`merge ${e} ${r} ${n} ${i===null||i===void 0?void 0:i.join(" ")}`,token:`merge ${e} ${r} ${n} ${i===null||i===void 0?void 0:i.join(" ")}`,expected:[`merge ${e} ${r}_UNIQUE ${n} ${i===null||i===void 0?void 0:i.join(" ")}`]},p;}let f=l||"",d={id:r||`${At.records.seq}-${SO()}`,message:`merged branch ${e} into ${At.records.currBranch}`,seq:At.records.seq++,parents:At.records.head==null?[]:[At.records.head.id,f],branch:At.records.currBranch,type:jr.MERGE,customType:n,customId:!!r,tags:i!==null&&i!==void 0?i:[]};At.records.head=d,At.records.commits.set(d.id,d),At.records.branches.set(At.records.currBranch,d.id),X.debug(At.records.branches),X.debug("in mergeBranch");},"merge"),qze=o(function(t){var _n2;let e=t.id,r=t.targetId,n=t.tags,i=t.parent;X.debug("Entering cherryPick:",e,r,n);let a=Lp();if(e=Ze.sanitizeText(e,a),r=Ze.sanitizeText(r,a),n=(_n2=n)===null||_n2===void 0?void 0:_n2.map(u=>Ze.sanitizeText(u,a)),i=Ze.sanitizeText(i,a),!e||!At.records.commits.has(e)){let u=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw u.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},u;}let s=At.records.commits.get(e);if(s===void 0||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&!(Array.isArray(s.parents)&&s.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let l=s.branch;if(s.type===jr.MERGE&&!i)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!At.records.commits.has(r)){if(l===At.records.currBranch){let d=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw d.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},d;}let u=At.records.branches.get(At.records.currBranch);if(u===void 0||!u){let d=new Error(`Incorrect usage of "cherry-pick". Current branch (${At.records.currBranch})has no commits`);throw d.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},d;}let h=At.records.commits.get(u);if(h===void 0||!h){let d=new Error(`Incorrect usage of "cherry-pick". Current branch (${At.records.currBranch})has no commits`);throw d.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},d;}let f={id:At.records.seq+"-"+SO(),message:`cherry-picked ${s===null||s===void 0?void 0:s.message} into ${At.records.currBranch}`,seq:At.records.seq++,parents:At.records.head==null?[]:[At.records.head.id,s.id],branch:At.records.currBranch,type:jr.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===jr.MERGE?`|parent:${i}`:""}`]};At.records.head=f,At.records.commits.set(f.id,f),At.records.branches.set(At.records.currBranch,f.id),X.debug(At.records.branches),X.debug("in cherryPick");}},"cherryPick"),mhe=o(function(t){if(t=Ze.sanitizeText(t,Lp()),At.records.branches.has(t)){var _At$records$commits$g;At.records.currBranch=t;let e=At.records.branches.get(At.records.currBranch);e===void 0||!e?At.records.head=null:At.records.head=(_At$records$commits$g=At.records.commits.get(e))!==null&&_At$records$commits$g!==void 0?_At$records$commits$g:null;}else{let e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e;}},"checkout");o(phe,"upsert");o(ghe,"prettyPrintCommitHistory");Yze=o(function(){X.debug(At.records.commits);let t=yhe()[0];ghe([t]);},"prettyPrint"),Xze=o(function(){At.reset(),wr();},"clear"),jze=o(function(){return[...At.records.branchConfig.values()].map((e,r)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${r}`)}).sort((e,r)=>{var _e$order,_r$order;return((_e$order=e.order)!==null&&_e$order!==void 0?_e$order:0)-((_r$order=r.order)!==null&&_r$order!==void 0?_r$order:0);}).map(({name:e})=>({name:e}));},"getBranchesAsObjArray"),Kze=o(function(){return At.records.branches;},"getBranches"),Qze=o(function(){return At.records.commits;},"getCommits"),yhe=o(function(){let t=[...At.records.commits.values()];return t.forEach(function(e){X.debug(e.id);}),t.sort((e,r)=>e.seq-r.seq),t;},"getCommitsArray"),Zze=o(function(){return At.records.currBranch;},"getCurrentBranch"),Jze=o(function(){return At.records.direction;},"getDirection"),eGe=o(function(){return At.records.head;},"getHead"),kS={commitType:jr,getConfig:Lp,setDirection:zze,setOptions:Gze,getOptions:Vze,commit:Uze,branch:Hze,merge:Wze,cherryPick:qze,checkout:mhe,prettyPrint:Yze,clear:Xze,getBranchesAsObjArray:jze,getBranches:Kze,getCommits:Qze,getCommitsArray:yhe,getCurrentBranch:Zze,getDirection:Jze,getHead:eGe,setAccTitle:Cr,getAccTitle:_r,getAccDescription:Lr,setAccDescription:Dr,setDiagramTitle:Ir,getDiagramTitle:Rr};});var tGe,rGe,nGe,iGe,aGe,sGe,oGe,vhe,xhe=N(()=>{"use strict";gf();yt();Dp();CO();wS();tGe=o((t,e)=>{Qo(t,e),t.dir&&e.setDirection(t.dir);for(let r of t.statements)rGe(r,e);},"populate"),rGe=o((t,e)=>{let n={Commit:o(i=>e.commit(nGe(i)),"Commit"),Branch:o(i=>e.branch(iGe(i)),"Branch"),Merge:o(i=>e.merge(aGe(i)),"Merge"),Checkout:o(i=>e.checkout(sGe(i)),"Checkout"),CherryPicking:o(i=>e.cherryPick(oGe(i)),"CherryPicking")}[t.$type];n?n(t):X.error(`Unknown statement type: ${t.$type}`);},"parseStatement"),nGe=o(t=>{var _t$message,_t$tags;return{id:t.id,msg:(_t$message=t.message)!==null&&_t$message!==void 0?_t$message:"",type:t.type!==void 0?jr[t.type]:jr.NORMAL,tags:(_t$tags=t.tags)!==null&&_t$tags!==void 0?_t$tags:void 0};},"parseCommit"),iGe=o(t=>{var _t$order;return{name:t.name,order:(_t$order=t.order)!==null&&_t$order!==void 0?_t$order:0};},"parseBranch"),aGe=o(t=>{var _t$id,_t$tags2;return{branch:t.branch,id:(_t$id=t.id)!==null&&_t$id!==void 0?_t$id:"",type:t.type!==void 0?jr[t.type]:void 0,tags:(_t$tags2=t.tags)!==null&&_t$tags2!==void 0?_t$tags2:void 0};},"parseMerge"),sGe=o(t=>t.branch,"parseCheckout"),oGe=o(t=>{var _t$tags3;return{id:t.id,targetId:"",tags:((_t$tags3=t.tags)===null||_t$tags3===void 0?void 0:_t$tags3.length)===0?void 0:t.tags,parent:t.parent};},"parseCherryPicking"),vhe={parse:o(async t=>{let e=await ps("gitGraph",t);X.debug(e),tGe(e,kS);},"parse")};});var lGe,Zo,vf,xf,Uc,Xu,Rp,Vs,Us,ES,kb,SS,yf,Br,cGe,The,whe,uGe,hGe,fGe,dGe,pGe,mGe,gGe,yGe,vGe,xGe,bGe,TGe,bhe,wGe,Eb,kGe,EGe,SGe,CGe,AGe,khe,Ehe=N(()=>{"use strict";var _lGe;pr();qt();yt();nr();wS();lGe=ge(),Zo=(_lGe=lGe)===null||_lGe===void 0?void 0:_lGe.gitGraph,vf=10,xf=40,Uc=4,Xu=2,Rp=8,Vs=new Map(),Us=new Map(),ES=30,kb=new Map(),SS=[],yf=0,Br="LR",cGe=o(()=>{Vs.clear(),Us.clear(),kb.clear(),yf=0,SS=[],Br="LR";},"clear"),The=o(t=>{let e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(n=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n.trim(),e.appendChild(i);}),e;},"drawText"),whe=o(t=>{let e,r,n;return Br==="BT"?(r=o((i,a)=>i<=a,"comparisonFunc"),n=1/0):(r=o((i,a)=>i>=a,"comparisonFunc"),n=0),t.forEach(i=>{var _Us$get,_Us$get2;let a=Br==="TB"||Br=="BT"?(_Us$get=Us.get(i))===null||_Us$get===void 0?void 0:_Us$get.y:(_Us$get2=Us.get(i))===null||_Us$get2===void 0?void 0:_Us$get2.x;a!==void 0&&r(a,n)&&(e=i,n=a);}),e;},"findClosestParent"),uGe=o(t=>{let e="",r=1/0;return t.forEach(n=>{let i=Us.get(n).y;i<=r&&(e=n,r=i);}),e||void 0;},"findClosestParentBT"),hGe=o((t,e,r)=>{let n=r,i=r,a=[];t.forEach(s=>{let l=e.get(s);if(!l)throw new Error(`Commit not found for key ${s}`);l.parents.length?(n=dGe(l),i=Math.max(n,i)):a.push(l),pGe(l,n);}),n=i,a.forEach(s=>{mGe(s,n,r);}),t.forEach(s=>{let l=e.get(s);if(l!==null&&l!==void 0&&l.parents.length){let u=uGe(l.parents);n=Us.get(u).y-xf,n<=i&&(i=n);let h=Vs.get(l.branch).pos,f=n-vf;Us.set(l.id,{x:h,y:f});}});},"setParallelBTPos"),fGe=o(t=>{var _Us$get3;let e=whe(t.parents.filter(n=>n!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);let r=(_Us$get3=Us.get(e))===null||_Us$get3===void 0?void 0:_Us$get3.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return r;},"findClosestParentPos"),dGe=o(t=>fGe(t)+xf,"calculateCommitPosition"),pGe=o((t,e)=>{let r=Vs.get(t.branch);if(!r)throw new Error(`Branch not found for commit ${t.id}`);let n=r.pos,i=e+vf;return Us.set(t.id,{x:n,y:i}),{x:n,y:i};},"setCommitPosition"),mGe=o((t,e,r)=>{let n=Vs.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);let i=e+r,a=n.pos;Us.set(t.id,{x:a,y:i});},"setRootPosition"),gGe=o((t,e,r,n,i,a)=>{if(a===jr.HIGHLIGHT)t.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${i%Rp} ${n}-outer`),t.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${i%Rp} ${n}-inner`);else if(a===jr.CHERRY_PICK)t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`);else{let s=t.append("circle");if(s.attr("cx",r.x),s.attr("cy",r.y),s.attr("r",e.type===jr.MERGE?9:10),s.attr("class",`commit ${e.id} commit${i%Rp}`),a===jr.MERGE){let l=t.append("circle");l.attr("cx",r.x),l.attr("cy",r.y),l.attr("r",6),l.attr("class",`commit ${n} ${e.id} commit${i%Rp}`);}a===jr.REVERSE&&t.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},${r.y-5}`).attr("class",`commit ${n} ${e.id} commit${i%Rp}`);}},"drawCommitBullet"),yGe=o((t,e,r,n)=>{var _Zo;if(e.type!==jr.CHERRY_PICK&&(e.customId&&e.type===jr.MERGE||e.type!==jr.MERGE)&&(_Zo=Zo)!==null&&_Zo!==void 0&&_Zo.showCommitLabel){var _s$node;let i=t.append("g"),a=i.insert("rect").attr("class","commit-label-bkg"),s=i.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id),l=(_s$node=s.node())===null||_s$node===void 0?void 0:_s$node.getBBox();if(l&&(a.attr("x",r.posWithOffset-l.width/2-Xu).attr("y",r.y+13.5).attr("width",l.width+2*Xu).attr("height",l.height+2*Xu),Br==="TB"||Br==="BT"?(a.attr("x",r.x-(l.width+4*Uc+5)).attr("y",r.y-12),s.attr("x",r.x-(l.width+4*Uc)).attr("y",r.y+l.height-12)):s.attr("x",r.posWithOffset-l.width/2),Zo.rotateCommitLabel))if(Br==="TB"||Br==="BT")s.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let u=-7.5-(l.width+10)/25*9.5,h=10+l.width/25*8.5;i.attr("transform","translate("+u+", "+h+") rotate(-45, "+n+", "+r.y+")");}}},"drawCommitLabel"),vGe=o((t,e,r,n)=>{if(e.tags.length>0){let i=0,a=0,s=0,l=[];for(let u of e.tags.reverse()){var _d$node;let h=t.insert("polygon"),f=t.append("circle"),d=t.append("text").attr("y",r.y-16-i).attr("class","tag-label").text(u),p=(_d$node=d.node())===null||_d$node===void 0?void 0:_d$node.getBBox();if(!p)throw new Error("Tag bbox not found");a=Math.max(a,p.width),s=Math.max(s,p.height),d.attr("x",r.posWithOffset-p.width/2),l.push({tag:d,hole:f,rect:h,yOffset:i}),i+=20;}for(let{tag:u,hole:h,rect:f,yOffset:d}of l){let p=s/2,m=r.y-19.2-d;if(f.attr("class","tag-label-bkg").attr("points",`
      ${n-a/2-Uc/2},${m+Xu}  
      ${n-a/2-Uc/2},${m-Xu}
      ${r.posWithOffset-a/2-Uc},${m-p-Xu}
      ${r.posWithOffset+a/2+Uc},${m-p-Xu}
      ${r.posWithOffset+a/2+Uc},${m+p+Xu}
      ${r.posWithOffset-a/2-Uc},${m+p+Xu}`),h.attr("cy",m).attr("cx",n-a/2+Uc/2).attr("r",1.5).attr("class","tag-hole"),Br==="TB"||Br==="BT"){let g=n+d;f.attr("class","tag-label-bkg").attr("points",`
        ${r.x},${g+2}
        ${r.x},${g-2}
        ${r.x+vf},${g-p-2}
        ${r.x+vf+a+4},${g-p-2}
        ${r.x+vf+a+4},${g+p+2}
        ${r.x+vf},${g+p+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),h.attr("cx",r.x+Uc/2).attr("cy",g).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),u.attr("x",r.x+5).attr("y",g+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+n+")");}}}},"drawCommitTags"),xGe=o(t=>{var _t$customType;switch((_t$customType=t.customType)!==null&&_t$customType!==void 0?_t$customType:t.type){case jr.NORMAL:return"commit-normal";case jr.REVERSE:return"commit-reverse";case jr.HIGHLIGHT:return"commit-highlight";case jr.MERGE:return"commit-merge";case jr.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal";}},"getCommitClassType"),bGe=o((t,e,r,n)=>{var _n$get3;let i={x:0,y:0};if(t.parents.length>0){let a=whe(t.parents);if(a){var _n$get,_n$get2;let s=(_n$get=n.get(a))!==null&&_n$get!==void 0?_n$get:i;return e==="TB"?s.y+xf:e==="BT"?((_n$get2=n.get(t.id))!==null&&_n$get2!==void 0?_n$get2:i).y-xf:s.x+xf;}}else return e==="TB"?ES:e==="BT"?((_n$get3=n.get(t.id))!==null&&_n$get3!==void 0?_n$get3:i).y-xf:0;return 0;},"calculatePosition"),TGe=o((t,e,r)=>{var _Vs$get,_Vs$get2;let n=Br==="BT"&&r?e:e+vf,i=Br==="TB"||Br==="BT"?n:(_Vs$get=Vs.get(t.branch))===null||_Vs$get===void 0?void 0:_Vs$get.pos,a=Br==="TB"||Br==="BT"?(_Vs$get2=Vs.get(t.branch))===null||_Vs$get2===void 0?void 0:_Vs$get2.pos:n;if(a===void 0||i===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:i,posWithOffset:n};},"getCommitPosition"),bhe=o((t,e,r)=>{var _Zo$parallelCommits,_Zo2;if(!Zo)throw new Error("GitGraph config not found");let n=t.append("g").attr("class","commit-bullets"),i=t.append("g").attr("class","commit-labels"),a=Br==="TB"||Br==="BT"?ES:0,s=[...e.keys()],l=(_Zo$parallelCommits=(_Zo2=Zo)===null||_Zo2===void 0?void 0:_Zo2.parallelCommits)!==null&&_Zo$parallelCommits!==void 0?_Zo$parallelCommits:!1,u=o((f,d)=>{var _e$get,_e$get2;let p=(_e$get=e.get(f))===null||_e$get===void 0?void 0:_e$get.seq,m=(_e$get2=e.get(d))===null||_e$get2===void 0?void 0:_e$get2.seq;return p!==void 0&&m!==void 0?p-m:0;},"sortKeys"),h=s.sort(u);Br==="BT"&&(l&&hGe(h,e,a),h=h.reverse()),h.forEach(f=>{let d=e.get(f);if(!d)throw new Error(`Commit not found for key ${f}`);l&&(a=bGe(d,Br,a,Us));let p=TGe(d,a,l);if(r){var _d$customType,_Vs$get$index,_Vs$get3;let m=xGe(d),g=(_d$customType=d.customType)!==null&&_d$customType!==void 0?_d$customType:d.type,y=(_Vs$get$index=(_Vs$get3=Vs.get(d.branch))===null||_Vs$get3===void 0?void 0:_Vs$get3.index)!==null&&_Vs$get$index!==void 0?_Vs$get$index:0;gGe(n,d,p,m,y,g),yGe(i,d,p,a),vGe(i,d,p,a);}Br==="TB"||Br==="BT"?Us.set(d.id,{x:p.x,y:p.posWithOffset}):Us.set(d.id,{x:p.posWithOffset,y:p.y}),a=Br==="BT"&&l?a+xf:a+xf+vf,a>yf&&(yf=a);});},"drawCommits"),wGe=o((t,e,r,n,i)=>{let s=(Br==="TB"||Br==="BT"?r.x<n.x:r.y<n.y)?e.branch:t.branch,l=o(h=>h.branch===s,"isOnBranchToGetCurve"),u=o(h=>h.seq>t.seq&&h.seq<e.seq,"isBetweenCommits");return[...i.values()].some(h=>u(h)&&l(h));},"shouldRerouteArrow"),Eb=o((t,e,r=0)=>{let n=t+Math.abs(t-e)/2;if(r>5)return n;if(SS.every(s=>Math.abs(s-n)>=10))return SS.push(n),n;let a=Math.abs(t-e);return Eb(t,e-a/5,r+1);},"findLane"),kGe=o((t,e,r,n)=>{var _Vs$get4,_Vs$get5;let i=Us.get(e.id),a=Us.get(r.id);if(i===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${e.id} and ${r.id}`);let s=wGe(e,r,i,a,n),l="",u="",h=0,f=0,d=(_Vs$get4=Vs.get(r.branch))===null||_Vs$get4===void 0?void 0:_Vs$get4.index;r.type===jr.MERGE&&e.id!==r.parents[0]&&(d=(_Vs$get5=Vs.get(e.branch))===null||_Vs$get5===void 0?void 0:_Vs$get5.index);let p;if(s){var _Vs$get6,_Vs$get7,_Vs$get8;l="A 10 10, 0, 0, 0,",u="A 10 10, 0, 0, 1,",h=10,f=10;let m=i.y<a.y?Eb(i.y,a.y):Eb(a.y,i.y),g=i.x<a.x?Eb(i.x,a.x):Eb(a.x,i.x);Br==="TB"?i.x<a.x?p=`M ${i.x} ${i.y} L ${g-h} ${i.y} ${u} ${g} ${i.y+f} L ${g} ${a.y-h} ${l} ${g+f} ${a.y} L ${a.x} ${a.y}`:(d=(_Vs$get6=Vs.get(e.branch))===null||_Vs$get6===void 0?void 0:_Vs$get6.index,p=`M ${i.x} ${i.y} L ${g+h} ${i.y} ${l} ${g} ${i.y+f} L ${g} ${a.y-h} ${u} ${g-f} ${a.y} L ${a.x} ${a.y}`):Br==="BT"?i.x<a.x?p=`M ${i.x} ${i.y} L ${g-h} ${i.y} ${l} ${g} ${i.y-f} L ${g} ${a.y+h} ${u} ${g+f} ${a.y} L ${a.x} ${a.y}`:(d=(_Vs$get7=Vs.get(e.branch))===null||_Vs$get7===void 0?void 0:_Vs$get7.index,p=`M ${i.x} ${i.y} L ${g+h} ${i.y} ${u} ${g} ${i.y-f} L ${g} ${a.y+h} ${l} ${g-f} ${a.y} L ${a.x} ${a.y}`):i.y<a.y?p=`M ${i.x} ${i.y} L ${i.x} ${m-h} ${l} ${i.x+f} ${m} L ${a.x-h} ${m} ${u} ${a.x} ${m+f} L ${a.x} ${a.y}`:(d=(_Vs$get8=Vs.get(e.branch))===null||_Vs$get8===void 0?void 0:_Vs$get8.index,p=`M ${i.x} ${i.y} L ${i.x} ${m+h} ${u} ${i.x+f} ${m} L ${a.x-h} ${m} ${l} ${a.x} ${m-f} L ${a.x} ${a.y}`);}else l="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",h=20,f=20,Br==="TB"?(i.x<a.x&&(r.type===jr.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${a.y-h} ${l} ${i.x+f} ${a.y} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${u} ${a.x} ${i.y+f} L ${a.x} ${a.y}`),i.x>a.x&&(l="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",h=20,f=20,r.type===jr.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${a.y-h} ${u} ${i.x-f} ${a.y} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${a.x+h} ${i.y} ${l} ${a.x} ${i.y+f} L ${a.x} ${a.y}`),i.x===a.x&&(p=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):Br==="BT"?(i.x<a.x&&(r.type===jr.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${a.y+h} ${u} ${i.x+f} ${a.y} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${l} ${a.x} ${i.y-f} L ${a.x} ${a.y}`),i.x>a.x&&(l="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",h=20,f=20,r.type===jr.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${a.y+h} ${l} ${i.x-f} ${a.y} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${l} ${a.x} ${i.y-f} L ${a.x} ${a.y}`),i.x===a.x&&(p=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):(i.y<a.y&&(r.type===jr.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${u} ${a.x} ${i.y+f} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${i.x} ${a.y-h} ${l} ${i.x+f} ${a.y} L ${a.x} ${a.y}`),i.y>a.y&&(r.type===jr.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${l} ${a.x} ${i.y-f} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${i.x} ${a.y+h} ${u} ${i.x+f} ${a.y} L ${a.x} ${a.y}`),i.y===a.y&&(p=`M ${i.x} ${i.y} L ${a.x} ${a.y}`));if(p===void 0)throw new Error("Line definition not found");t.append("path").attr("d",p).attr("class","arrow arrow"+d%Rp);},"drawArrow"),EGe=o((t,e)=>{let r=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(n=>{let i=e.get(n);i.parents&&i.parents.length>0&&i.parents.forEach(a=>{kGe(r,e.get(a),i,e);});});},"drawArrows"),SGe=o((t,e)=>{let r=t.append("g");e.forEach((n,i)=>{var _Vs$get9,_Zo3,_Zo4;let a=i%Rp,s=(_Vs$get9=Vs.get(n.name))===null||_Vs$get9===void 0?void 0:_Vs$get9.pos;if(s===void 0)throw new Error(`Position not found for branch ${n.name}`);let l=r.append("line");l.attr("x1",0),l.attr("y1",s),l.attr("x2",yf),l.attr("y2",s),l.attr("class","branch branch"+a),Br==="TB"?(l.attr("y1",ES),l.attr("x1",s),l.attr("y2",yf),l.attr("x2",s)):Br==="BT"&&(l.attr("y1",yf),l.attr("x1",s),l.attr("y2",ES),l.attr("x2",s)),SS.push(s);let u=n.name,h=The(u),f=r.insert("rect"),p=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);p.node().appendChild(h);let m=h.getBBox();f.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-m.width-4-(((_Zo3=Zo)===null||_Zo3===void 0?void 0:_Zo3.rotateCommitLabel)===!0?30:0)).attr("y",-m.height/2+8).attr("width",m.width+18).attr("height",m.height+4),p.attr("transform","translate("+(-m.width-14-(((_Zo4=Zo)===null||_Zo4===void 0?void 0:_Zo4.rotateCommitLabel)===!0?30:0))+", "+(s-m.height/2-1)+")"),Br==="TB"?(f.attr("x",s-m.width/2-10).attr("y",0),p.attr("transform","translate("+(s-m.width/2-5)+", 0)")):Br==="BT"?(f.attr("x",s-m.width/2-10).attr("y",yf),p.attr("transform","translate("+(s-m.width/2-5)+", "+yf+")")):f.attr("transform","translate(-19, "+(s-m.height/2)+")");});},"drawBranches"),CGe=o(function(t,e,r,n,i){return Vs.set(t,{pos:e,index:r}),e+=50+(i?40:0)+(Br==="TB"||Br==="BT"?n.width/2:0),e;},"setBranchPosition"),AGe=o(function(t,e,r,n){var _Zo$rotateCommitLabel,_Zo$titleTopMargin;if(cGe(),X.debug("in gitgraph renderer",t+`
`,"id:",e,r),!Zo)throw new Error("GitGraph config not found");let i=(_Zo$rotateCommitLabel=Zo.rotateCommitLabel)!==null&&_Zo$rotateCommitLabel!==void 0?_Zo$rotateCommitLabel:!1,a=n.db;kb=a.getCommits();let s=a.getBranchesAsObjArray();Br=a.getDirection();let l=Ge(`[id="${e}"]`),u=0;s.forEach((h,f)=>{var _g$node;let d=The(h.name),p=l.append("g"),m=p.insert("g").attr("class","branchLabel"),g=m.insert("g").attr("class","label branch-label");(_g$node=g.node())===null||_g$node===void 0||_g$node.appendChild(d);let y=d.getBBox();u=CGe(h.name,u,f,y,i),g.remove(),m.remove(),p.remove();}),bhe(l,kb,!1),Zo.showBranches&&SGe(l,s),EGe(l,kb),bhe(l,kb,!0),Vt.insertTitle(l,"gitTitleText",(_Zo$titleTopMargin=Zo.titleTopMargin)!==null&&_Zo$titleTopMargin!==void 0?_Zo$titleTopMargin:0,a.getDiagramTitle()),EA(void 0,l,Zo.diagramPadding,Zo.useMaxWidth);},"draw"),khe={draw:AGe};});var _Ge,She,Che=N(()=>{"use strict";_Ge=o(t=>`
  .commit-id,
  .commit-msg,
  .branch-label {
    fill: lightgrey;
    color: lightgrey;
    font-family: 'trebuchet ms', verdana, arial, sans-serif;
    font-family: var(--mermaid-font-family);
  }
  ${[0,1,2,3,4,5,6,7].map(e=>`
        .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }
        .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }
        .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }
        .label${e}  { fill: ${t["git"+e]}; }
        .arrow${e} { stroke: ${t["git"+e]}; }
        `).join(`
`)}

  .branch {
    stroke-width: 1;
    stroke: ${t.lineColor};
    stroke-dasharray: 2;
  }
  .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
  .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
  .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
  .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
  .tag-hole { fill: ${t.textColor}; }

  .commit-merge {
    stroke: ${t.primaryColor};
    fill: ${t.primaryColor};
  }
  .commit-reverse {
    stroke: ${t.primaryColor};
    fill: ${t.primaryColor};
    stroke-width: 3;
  }
  .commit-highlight-outer {
  }
  .commit-highlight-inner {
    stroke: ${t.primaryColor};
    fill: ${t.primaryColor};
  }

  .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
  .gitTitleText {
    text-anchor: middle;
    font-size: 18px;
    fill: ${t.textColor};
  }
`,"getStyles"),She=_Ge;});var Ahe={};hr(Ahe,{diagram:()=>DGe});var DGe,_he=N(()=>{"use strict";xhe();CO();Ehe();Che();DGe={parser:vhe,db:kS,renderer:khe,styles:She};});var AO,Rhe,Nhe=N(()=>{"use strict";AO=function(){var t=o(function(L,S,I,M){for(I=I||{},M=L.length;M--;I[L[M]]=S);return I;},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],i=[1,28],a=[1,29],s=[1,30],l=[1,31],u=[1,32],h=[1,33],f=[1,34],d=[1,9],p=[1,10],m=[1,11],g=[1,12],y=[1,13],v=[1,14],x=[1,15],b=[1,16],T=[1,19],C=[1,20],w=[1,21],E=[1,22],_=[1,23],A=[1,25],D=[1,35],O={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:o(function(S,I,M,P,B,F,z){var $=F.length-1;switch(B){case 1:return F[$-1];case 2:this.$=[];break;case 3:F[$-1].push(F[$]),this.$=F[$-1];break;case 4:case 5:this.$=F[$];break;case 6:case 7:this.$=[];break;case 8:P.setWeekday("monday");break;case 9:P.setWeekday("tuesday");break;case 10:P.setWeekday("wednesday");break;case 11:P.setWeekday("thursday");break;case 12:P.setWeekday("friday");break;case 13:P.setWeekday("saturday");break;case 14:P.setWeekday("sunday");break;case 15:P.setWeekend("friday");break;case 16:P.setWeekend("saturday");break;case 17:P.setDateFormat(F[$].substr(11)),this.$=F[$].substr(11);break;case 18:P.enableInclusiveEndDates(),this.$=F[$].substr(18);break;case 19:P.TopAxis(),this.$=F[$].substr(8);break;case 20:P.setAxisFormat(F[$].substr(11)),this.$=F[$].substr(11);break;case 21:P.setTickInterval(F[$].substr(13)),this.$=F[$].substr(13);break;case 22:P.setExcludes(F[$].substr(9)),this.$=F[$].substr(9);break;case 23:P.setIncludes(F[$].substr(9)),this.$=F[$].substr(9);break;case 24:P.setTodayMarker(F[$].substr(12)),this.$=F[$].substr(12);break;case 27:P.setDiagramTitle(F[$].substr(6)),this.$=F[$].substr(6);break;case 28:this.$=F[$].trim(),P.setAccTitle(this.$);break;case 29:case 30:this.$=F[$].trim(),P.setAccDescription(this.$);break;case 31:P.addSection(F[$].substr(8)),this.$=F[$].substr(8);break;case 33:P.addTask(F[$-1],F[$]),this.$="task";break;case 34:this.$=F[$-1],P.setClickEvent(F[$-1],F[$],null);break;case 35:this.$=F[$-2],P.setClickEvent(F[$-2],F[$-1],F[$]);break;case 36:this.$=F[$-2],P.setClickEvent(F[$-2],F[$-1],null),P.setLink(F[$-2],F[$]);break;case 37:this.$=F[$-3],P.setClickEvent(F[$-3],F[$-2],F[$-1]),P.setLink(F[$-3],F[$]);break;case 38:this.$=F[$-2],P.setClickEvent(F[$-2],F[$],null),P.setLink(F[$-2],F[$-1]);break;case 39:this.$=F[$-3],P.setClickEvent(F[$-3],F[$-1],F[$]),P.setLink(F[$-3],F[$-2]);break;case 40:this.$=F[$-1],P.setLink(F[$-1],F[$]);break;case 41:case 47:this.$=F[$-1]+" "+F[$];break;case 42:case 43:case 45:this.$=F[$-2]+" "+F[$-1]+" "+F[$];break;case 44:case 46:this.$=F[$-3]+" "+F[$-2]+" "+F[$-1]+" "+F[$];break;}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:i,15:a,16:s,17:l,18:u,19:18,20:h,21:f,22:d,23:p,24:m,25:g,26:y,27:v,28:x,29:b,30:T,31:C,33:w,35:E,36:_,37:24,38:A,40:D},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:r,13:n,14:i,15:a,16:s,17:l,18:u,19:18,20:h,21:f,22:d,23:p,24:m,25:g,26:y,27:v,28:x,29:b,30:T,31:C,33:w,35:E,36:_,37:24,38:A,40:D},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:o(function(S,I){if(I.recoverable)this.trace(S);else{var M=new Error(S);throw M.hash=I,M;}},"parseError"),parse:o(function(S){var I=this,M=[0],P=[],B=[null],F=[],z=this.table,$="",U=0,K=0,ee=0,Y=2,ce=1,Z=F.slice.call(arguments,1),ue=Object.create(this.lexer),Q={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(Q.yy[j]=this.yy[j]);ue.setInput(S,Q.yy),Q.yy.lexer=ue,Q.yy.parser=this,typeof ue.yylloc>"u"&&(ue.yylloc={});var ne=ue.yylloc;F.push(ne);var te=ue.options&&ue.options.ranges;typeof Q.yy.parseError=="function"?this.parseError=Q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function he(q){M.length=M.length-2*q,B.length=B.length-q,F.length=F.length-q;}o(he,"popStack");function le(){var q;return q=P.pop()||ue.lex()||ce,typeof q!="number"&&(q instanceof Array&&(P=q,q=P.pop()),q=I.symbols_[q]||q),q;}o(le,"lex");for(var J,Se,se,ae,Oe,ye,Be={},He,ze,Le,Ie;;){if(se=M[M.length-1],this.defaultActions[se]?ae=this.defaultActions[se]:((J===null||typeof J>"u")&&(J=le()),ae=z[se]&&z[se][J]),typeof ae>"u"||!ae.length||!ae[0]){var xe="";Ie=[];for(He in z[se])this.terminals_[He]&&He>Y&&Ie.push("'"+this.terminals_[He]+"'");ue.showPosition?xe="Parse error on line "+(U+1)+`:
`+ue.showPosition()+`
Expecting `+Ie.join(", ")+", got '"+(this.terminals_[J]||J)+"'":xe="Parse error on line "+(U+1)+": Unexpected "+(J==ce?"end of input":"'"+(this.terminals_[J]||J)+"'"),this.parseError(xe,{text:ue.match,token:this.terminals_[J]||J,line:ue.yylineno,loc:ne,expected:Ie});}if(ae[0]instanceof Array&&ae.length>1)throw new Error("Parse Error: multiple actions possible at state: "+se+", token: "+J);switch(ae[0]){case 1:M.push(J),B.push(ue.yytext),F.push(ue.yylloc),M.push(ae[1]),J=null,Se?(J=Se,Se=null):(K=ue.yyleng,$=ue.yytext,U=ue.yylineno,ne=ue.yylloc,ee>0&&ee--);break;case 2:if(ze=this.productions_[ae[1]][1],Be.$=B[B.length-ze],Be._$={first_line:F[F.length-(ze||1)].first_line,last_line:F[F.length-1].last_line,first_column:F[F.length-(ze||1)].first_column,last_column:F[F.length-1].last_column},te&&(Be._$.range=[F[F.length-(ze||1)].range[0],F[F.length-1].range[1]]),ye=this.performAction.apply(Be,[$,K,U,Q.yy,ae[1],B,F].concat(Z)),typeof ye<"u")return ye;ze&&(M=M.slice(0,-1*ze*2),B=B.slice(0,-1*ze),F=F.slice(0,-1*ze)),M.push(this.productions_[ae[1]][0]),B.push(Be.$),F.push(Be._$),Le=z[M[M.length-2]][M[M.length-1]],M.push(Le);break;case 3:return!0;}}return!0;},"parse")},R=function(){var L={EOF:1,parseError:o(function(I,M){if(this.yy.parser)this.yy.parser.parseError(I,M);else throw new Error(I);},"parseError"),setInput:o(function(S,I){return this.yy=I||this.yy||{},this._input=S,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var I=S.match(/(?:\r\n?|\n).*/g);return I?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),S;},"input"),unput:o(function(S){var I=S.length,M=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-I),this.offset-=I;var P=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),M.length-1&&(this.yylineno-=M.length-1);var B=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:M?(M.length===P.length?this.yylloc.first_column:0)+P[P.length-M.length].length-M[0].length:this.yylloc.first_column-I},this.options.ranges&&(this.yylloc.range=[B[0],B[0]+this.yyleng-I]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(S){this.unput(this.match.slice(S));},"less"),pastInput:o(function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var S=this.match;return S.length<20&&(S+=this._input.substr(0,20-S.length)),(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var S=this.pastInput(),I=new Array(S.length+1).join("-");return S+this.upcomingInput()+`
`+I+"^";},"showPosition"),test_match:o(function(S,I){var M,P,B;if(this.options.backtrack_lexer&&(B={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(B.yylloc.range=this.yylloc.range.slice(0))),P=S[0].match(/(?:\r\n?|\n).*/g),P&&(this.yylineno+=P.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:P?P[P.length-1].length-P[P.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(S[0].length),this.matched+=S[0],M=this.performAction.call(this,this.yy,this,I,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),M)return M;if(this._backtrack){for(var F in B)this[F]=B[F];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var S,I,M,P;this._more||(this.yytext="",this.match="");for(var B=this._currentRules(),F=0;F<B.length;F++)if(M=this._input.match(this.rules[B[F]]),M&&(!I||M[0].length>I[0].length)){if(I=M,P=F,this.options.backtrack_lexer){if(S=this.test_match(M,B[F]),S!==!1)return S;if(this._backtrack){I=!1;continue;}else return!1;}else if(!this.options.flex)break;}return I?(S=this.test_match(I,B[P]),S!==!1?S:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var I=this.next();return I||this.lex();},"lex"),begin:o(function(I){this.conditionStack.push(I);},"begin"),popState:o(function(){var I=this.conditionStack.length-1;return I>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function(I){return I=this.conditionStack.length-1-Math.abs(I||0),I>=0?this.conditionStack[I]:"INITIAL";},"topState"),pushState:o(function(I){this.begin(I);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(I,M,P,B){var F=B;switch(P){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID";}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return L;}();O.lexer=R;function k(){this.yy={};}return o(k,"Parser"),k.prototype=O,O.Parser=k,new k();}();AO.parser=AO;Rhe=AO;});var Mhe=Ii((_O,DO)=>{"use strict";(function(t,e){typeof _O=="object"&&typeof DO<"u"?DO.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isoWeek=e();})(_O,function(){"use strict";var t="day";return function(e,r,n){var i=o(function(l){return l.add(4-l.isoWeekday(),t);},"a"),a=r.prototype;a.isoWeekYear=function(){return i(this).year();},a.isoWeek=function(l){if(!this.$utils().u(l))return this.add(7*(l-this.isoWeek()),t);var u,h,f,d,p=i(this),m=(u=this.isoWeekYear(),h=this.$u,f=(h?n.utc:n)().year(u).startOf("year"),d=4-f.isoWeekday(),f.isoWeekday()>4&&(d+=7),f.add(d,t));return p.diff(m,"week")+1;},a.isoWeekday=function(l){return this.$utils().u(l)?this.day()||7:this.day(this.day()%7?l:l-7);};var s=a.startOf;a.startOf=function(l,u){var h=this.$utils(),f=!!h.u(u)||u;return h.p(l)==="isoweek"?f?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(l,u);};};});});var Ihe=Ii((LO,RO)=>{"use strict";(function(t,e){typeof LO=="object"&&typeof RO<"u"?RO.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e();})(LO,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,s={},l=o(function(g){return(g=+g)+(g>68?1900:2e3);},"a"),u=o(function(g){return function(y){this[g]=+y;};},"f"),h=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var v=y.match(/([+-]|\d\d)/g),x=60*v[1]+(+v[2]||0);return x===0?0:v[0]==="+"?-x:x;}(g);}],f=o(function(g){var y=s[g];return y&&(y.indexOf?y:y.s.concat(y.f));},"u"),d=o(function(g,y){var v,x=s.meridiem;if(x){for(var b=1;b<=24;b+=1)if(g.indexOf(x(b,0,y))>-1){v=b>12;break;}}else v=g===(y?"pm":"PM");return v;},"d"),p={A:[a,function(g){this.afternoon=d(g,!1);}],a:[a,function(g){this.afternoon=d(g,!0);}],Q:[r,function(g){this.month=3*(g-1)+1;}],S:[r,function(g){this.milliseconds=100*+g;}],SS:[n,function(g){this.milliseconds=10*+g;}],SSS:[/\d{3}/,function(g){this.milliseconds=+g;}],s:[i,u("seconds")],ss:[i,u("seconds")],m:[i,u("minutes")],mm:[i,u("minutes")],H:[i,u("hours")],h:[i,u("hours")],HH:[i,u("hours")],hh:[i,u("hours")],D:[i,u("day")],DD:[n,u("day")],Do:[a,function(g){var y=s.ordinal,v=g.match(/\d+/);if(this.day=v[0],y)for(var x=1;x<=31;x+=1)y(x).replace(/\[|\]/g,"")===g&&(this.day=x);}],w:[i,u("week")],ww:[n,u("week")],M:[i,u("month")],MM:[n,u("month")],MMM:[a,function(g){var y=f("months"),v=(f("monthsShort")||y.map(function(x){return x.slice(0,3);})).indexOf(g)+1;if(v<1)throw new Error();this.month=v%12||v;}],MMMM:[a,function(g){var y=f("months").indexOf(g)+1;if(y<1)throw new Error();this.month=y%12||y;}],Y:[/[+-]?\d+/,u("year")],YY:[n,function(g){this.year=l(g);}],YYYY:[/\d{4}/,u("year")],Z:h,ZZ:h};function m(g){var y,v;y=g,v=s&&s.formats;for(var x=(g=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,D,O){var R=O&&O.toUpperCase();return D||v[O]||t[O]||v[R].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(k,L,S){return L||S.slice(1);});})).match(e),b=x.length,T=0;T<b;T+=1){var C=x[T],w=p[C],E=w&&w[0],_=w&&w[1];x[T]=_?{regex:E,parser:_}:C.replace(/^\[|\]$/g,"");}return function(A){for(var D={},O=0,R=0;O<b;O+=1){var k=x[O];if(typeof k=="string")R+=k.length;else{var L=k.regex,S=k.parser,I=A.slice(R),M=L.exec(I)[0];S.call(D,M),A=A.replace(M,"");}}return function(P){var B=P.afternoon;if(B!==void 0){var F=P.hours;B?F<12&&(P.hours+=12):F===12&&(P.hours=0),delete P.afternoon;}}(D),D;};}return o(m,"l"),function(g,y,v){v.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(l=g.parseTwoDigitYear);var x=y.prototype,b=x.parse;x.parse=function(T){var C=T.date,w=T.utc,E=T.args;this.$u=w;var _=E[1];if(typeof _=="string"){var A=E[2]===!0,D=E[3]===!0,O=A||D,R=E[2];D&&(R=E[2]),s=this.$locale(),!A&&R&&(s=v.Ls[R]),this.$d=function(I,M,P,B){try{if(["x","X"].indexOf(M)>-1)return new Date((M==="X"?1e3:1)*I);var F=m(M)(I),z=F.year,$=F.month,U=F.day,K=F.hours,ee=F.minutes,Y=F.seconds,ce=F.milliseconds,Z=F.zone,ue=F.week,Q=new Date(),j=U||(z||$?1:Q.getDate()),ne=z||Q.getFullYear(),te=0;z&&!$||(te=$>0?$-1:Q.getMonth());var he,le=K||0,J=ee||0,Se=Y||0,se=ce||0;return Z?new Date(Date.UTC(ne,te,j,le,J,Se,se+60*Z.offset*1e3)):P?new Date(Date.UTC(ne,te,j,le,J,Se,se)):(he=new Date(ne,te,j,le,J,Se,se),ue&&(he=B(he).week(ue).toDate()),he);}catch{return new Date("");}}(C,_,w,v),this.init(),R&&R!==!0&&(this.$L=this.locale(R).$L),O&&C!=this.format(_)&&(this.$d=new Date("")),s={};}else if(_ instanceof Array)for(var k=_.length,L=1;L<=k;L+=1){E[1]=_[L-1];var S=v.apply(this,E);if(S.isValid()){this.$d=S.$d,this.$L=S.$L,this.init();break;}L===k&&(this.$d=new Date(""));}else b.call(this,T);};};});});var Ohe=Ii((NO,MO)=>{"use strict";(function(t,e){typeof NO=="object"&&typeof MO<"u"?MO.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=e();})(NO,function(){"use strict";return function(t,e){var r=e.prototype,n=r.format;r.format=function(i){var a=this,s=this.$locale();if(!this.isValid())return n.bind(this)(i);var l=this.$utils(),u=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(h){switch(h){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return s.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return s.ordinal(a.week(),"W");case"w":case"ww":return l.s(a.week(),h==="w"?1:2,"0");case"W":case"WW":return l.s(a.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return l.s(String(a.$H===0?24:a.$H),h==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return h;}});return n.bind(this)(u);};};});});function Qhe(t,e,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){let a="^\\s*"+i+"\\s*$",s=new RegExp(a);t[0].match(s)&&(e[i]=!0,t.shift(1),n=!0);});}var Fhe,fo,$he,zhe,Ghe,Phe,Hc,BO,FO,$O,Sb,Cb,zO,GO,_S,C1,VO,Vhe,UO,Ab,HO,WO,DS,IO,MGe,IGe,OGe,PGe,BGe,FGe,$Ge,zGe,GGe,VGe,UGe,HGe,WGe,qGe,YGe,XGe,jGe,KGe,QGe,ZGe,JGe,eVe,tVe,Uhe,rVe,nVe,iVe,Hhe,aVe,OO,Whe,qhe,CS,S1,sVe,oVe,PO,AS,Gi,Yhe,lVe,Np,cVe,Bhe,uVe,Xhe,hVe,jhe,fVe,dVe,Khe,Zhe=N(()=>{"use strict";Fhe=Sa(Y0(),1),fo=Sa(W4(),1),$he=Sa(Mhe(),1),zhe=Sa(Ihe(),1),Ghe=Sa(Ohe(),1);yt();qt();nr();ci();fo.default.extend($he.default);fo.default.extend(zhe.default);fo.default.extend(Ghe.default);Phe={friday:5,saturday:6},Hc="",BO="",$O="",Sb=[],Cb=[],zO=new Map(),GO=[],_S=[],C1="",VO="",Vhe=["active","done","crit","milestone","vert"],UO=[],Ab=!1,HO=!1,WO="sunday",DS="saturday",IO=0,MGe=o(function(){GO=[],_S=[],C1="",UO=[],CS=0,PO=void 0,AS=void 0,Gi=[],Hc="",BO="",VO="",FO=void 0,$O="",Sb=[],Cb=[],Ab=!1,HO=!1,IO=0,zO=new Map(),wr(),WO="sunday",DS="saturday";},"clear"),IGe=o(function(t){BO=t;},"setAxisFormat"),OGe=o(function(){return BO;},"getAxisFormat"),PGe=o(function(t){FO=t;},"setTickInterval"),BGe=o(function(){return FO;},"getTickInterval"),FGe=o(function(t){$O=t;},"setTodayMarker"),$Ge=o(function(){return $O;},"getTodayMarker"),zGe=o(function(t){Hc=t;},"setDateFormat"),GGe=o(function(){Ab=!0;},"enableInclusiveEndDates"),VGe=o(function(){return Ab;},"endDatesAreInclusive"),UGe=o(function(){HO=!0;},"enableTopAxis"),HGe=o(function(){return HO;},"topAxisEnabled"),WGe=o(function(t){VO=t;},"setDisplayMode"),qGe=o(function(){return VO;},"getDisplayMode"),YGe=o(function(){return Hc;},"getDateFormat"),XGe=o(function(t){Sb=t.toLowerCase().split(/[\s,]+/);},"setIncludes"),jGe=o(function(){return Sb;},"getIncludes"),KGe=o(function(t){Cb=t.toLowerCase().split(/[\s,]+/);},"setExcludes"),QGe=o(function(){return Cb;},"getExcludes"),ZGe=o(function(){return zO;},"getLinks"),JGe=o(function(t){C1=t,GO.push(t);},"addSection"),eVe=o(function(){return GO;},"getSections"),tVe=o(function(){let t=Bhe(),e=10,r=0;for(;!t&&r<e;)t=Bhe(),r++;return _S=Gi,_S;},"getTasks"),Uhe=o(function(t,e,r,n){let i=t.format(e.trim()),a=t.format("YYYY-MM-DD");return n.includes(i)||n.includes(a)?!1:r.includes("weekends")&&(t.isoWeekday()===Phe[DS]||t.isoWeekday()===Phe[DS]+1)||r.includes(t.format("dddd").toLowerCase())?!0:r.includes(i)||r.includes(a);},"isInvalidDate"),rVe=o(function(t){WO=t;},"setWeekday"),nVe=o(function(){return WO;},"getWeekday"),iVe=o(function(t){DS=t;},"setWeekend"),Hhe=o(function(t,e,r,n){if(!r.length||t.manualEndTime)return;let i;t.startTime instanceof Date?i=(0,fo.default)(t.startTime):i=(0,fo.default)(t.startTime,e,!0),i=i.add(1,"d");let a;t.endTime instanceof Date?a=(0,fo.default)(t.endTime):a=(0,fo.default)(t.endTime,e,!0);let[s,l]=aVe(i,a,e,r,n);t.endTime=s.toDate(),t.renderEndTime=l;},"checkTaskDates"),aVe=o(function(t,e,r,n,i){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),a=Uhe(t,r,n,i),a&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s];},"fixTaskDates"),OO=o(function(t,e,r){r=r.trim();let i=/^after\s+(?<ids>[\d\w- ]+)/.exec(r);if(i!==null){let s=null;for(let u of i.groups.ids.split(" ")){let h=Np(u);h!==void 0&&(!s||h.endTime>s.endTime)&&(s=h);}if(s)return s.endTime;let l=new Date();return l.setHours(0,0,0,0),l;}let a=(0,fo.default)(r,e.trim(),!0);if(a.isValid())return a.toDate();{X.debug("Invalid date:"+r),X.debug("With date format:"+e.trim());let s=new Date(r);if(s===void 0||isNaN(s.getTime())||s.getFullYear()<-1e4||s.getFullYear()>1e4)throw new Error("Invalid date:"+r);return s;}},"getStartDate"),Whe=o(function(t){let e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"];},"parseDuration"),qhe=o(function(t,e,r,n=!1){r=r.trim();let a=/^until\s+(?<ids>[\d\w- ]+)/.exec(r);if(a!==null){let f=null;for(let p of a.groups.ids.split(" ")){let m=Np(p);m!==void 0&&(!f||m.startTime<f.startTime)&&(f=m);}if(f)return f.startTime;let d=new Date();return d.setHours(0,0,0,0),d;}let s=(0,fo.default)(r,e.trim(),!0);if(s.isValid())return n&&(s=s.add(1,"d")),s.toDate();let l=(0,fo.default)(t),[u,h]=Whe(r);if(!Number.isNaN(u)){let f=l.add(u,h);f.isValid()&&(l=f);}return l.toDate();},"getEndDate"),CS=0,S1=o(function(t){return t===void 0?(CS=CS+1,"task"+CS):t;},"parseId"),sVe=o(function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;let n=r.split(","),i={};Qhe(n,i,Vhe);for(let s=0;s<n.length;s++)n[s]=n[s].trim();let a="";switch(n.length){case 1:i.id=S1(),i.startTime=t.endTime,a=n[0];break;case 2:i.id=S1(),i.startTime=OO(void 0,Hc,n[0]),a=n[1];break;case 3:i.id=S1(n[0]),i.startTime=OO(void 0,Hc,n[1]),a=n[2];break;default:}return a&&(i.endTime=qhe(i.startTime,Hc,a,Ab),i.manualEndTime=(0,fo.default)(a,"YYYY-MM-DD",!0).isValid(),Hhe(i,Hc,Cb,Sb)),i;},"compileData"),oVe=o(function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;let n=r.split(","),i={};Qhe(n,i,Vhe);for(let a=0;a<n.length;a++)n[a]=n[a].trim();switch(n.length){case 1:i.id=S1(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:n[0]};break;case 2:i.id=S1(),i.startTime={type:"getStartDate",startData:n[0]},i.endTime={data:n[1]};break;case 3:i.id=S1(n[0]),i.startTime={type:"getStartDate",startData:n[1]},i.endTime={data:n[2]};break;default:}return i;},"parseData"),Gi=[],Yhe={},lVe=o(function(t,e){let r={section:C1,type:C1,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},n=oVe(AS,e);r.raw.startTime=n.startTime,r.raw.endTime=n.endTime,r.id=n.id,r.prevTaskId=AS,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.vert=n.vert,r.order=IO,IO++;let i=Gi.push(r);AS=r.id,Yhe[r.id]=i-1;},"addTask"),Np=o(function(t){let e=Yhe[t];return Gi[e];},"findTaskById"),cVe=o(function(t,e){let r={section:C1,type:C1,description:t,task:t,classes:[]},n=sVe(PO,e);r.startTime=n.startTime,r.endTime=n.endTime,r.id=n.id,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.vert=n.vert,PO=r,_S.push(r);},"addTaskOrg"),Bhe=o(function(){let t=o(function(r){let n=Gi[r],i="";switch(Gi[r].raw.startTime.type){case"prevTaskEnd":{let a=Np(n.prevTaskId);n.startTime=a.endTime;break;}case"getStartDate":i=OO(void 0,Hc,Gi[r].raw.startTime.startData),i&&(Gi[r].startTime=i);break;}return Gi[r].startTime&&(Gi[r].endTime=qhe(Gi[r].startTime,Hc,Gi[r].raw.endTime.data,Ab),Gi[r].endTime&&(Gi[r].processed=!0,Gi[r].manualEndTime=(0,fo.default)(Gi[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Hhe(Gi[r],Hc,Cb,Sb))),Gi[r].processed;},"compileTask"),e=!0;for(let[r,n]of Gi.entries())t(r),e=e&&n.processed;return e;},"compileTasks"),uVe=o(function(t,e){let r=e;ge().securityLevel!=="loose"&&(r=(0,Fhe.sanitizeUrl)(e)),t.split(",").forEach(function(n){Np(n)!==void 0&&(jhe(n,()=>{window.open(r,"_self");}),zO.set(n,r));}),Xhe(t,"clickable");},"setLink"),Xhe=o(function(t,e){t.split(",").forEach(function(r){let n=Np(r);n!==void 0&&n.classes.push(e);});},"setClass"),hVe=o(function(t,e,r){if(ge().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a<n.length;a++){let s=n[a].trim();s.startsWith('"')&&s.endsWith('"')&&(s=s.substr(1,s.length-2)),n[a]=s;}}n.length===0&&n.push(t),Np(t)!==void 0&&jhe(t,()=>{Vt.runFunc(e,...n);});},"setClickFun"),jhe=o(function(t,e){UO.push(function(){let r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){e();});},function(){let r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){e();});});},"pushFun"),fVe=o(function(t,e,r){t.split(",").forEach(function(n){hVe(n,e,r);}),Xhe(t,"clickable");},"setClickEvent"),dVe=o(function(t){UO.forEach(function(e){e(t);});},"bindFunctions"),Khe={getConfig:o(()=>ge().gantt,"getConfig"),clear:MGe,setDateFormat:zGe,getDateFormat:YGe,enableInclusiveEndDates:GGe,endDatesAreInclusive:VGe,enableTopAxis:UGe,topAxisEnabled:HGe,setAxisFormat:IGe,getAxisFormat:OGe,setTickInterval:PGe,getTickInterval:BGe,setTodayMarker:FGe,getTodayMarker:$Ge,setAccTitle:Cr,getAccTitle:_r,setDiagramTitle:Ir,getDiagramTitle:Rr,setDisplayMode:WGe,getDisplayMode:qGe,setAccDescription:Dr,getAccDescription:Lr,addSection:JGe,getSections:eVe,getTasks:tVe,addTask:lVe,findTaskById:Np,addTaskOrg:cVe,setIncludes:XGe,getIncludes:jGe,setExcludes:KGe,getExcludes:QGe,setClickEvent:fVe,setLink:uVe,getLinks:ZGe,bindFunctions:dVe,parseDuration:Whe,isInvalidDate:Uhe,setWeekday:rVe,getWeekday:nVe,setWeekend:iVe};o(Qhe,"getTaskTags");});var LS,pVe,Jhe,mVe,ju,gVe,efe,tfe=N(()=>{"use strict";LS=Sa(W4(),1);yt();pr();dr();qt();yi();pVe=o(function(){X.debug("Something is calling, setConf, remove the call");},"setConf"),Jhe={monday:_h,tuesday:N5,wednesday:M5,thursday:uc,friday:I5,saturday:O5,sunday:bl},mVe=o((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((a,s)=>a.startTime-s.startTime||a.order-s.order),i=0;for(let a of n)for(let s=0;s<r.length;s++)if(a.startTime>=r[s]){r[s]=a.endTime,a.order=s+e,s>i&&(i=s);break;}return i;},"getMaxIntersections"),gVe=o(function(t,e,r,n){let i=ge().gantt,a=ge().securityLevel,s;a==="sandbox"&&(s=Ge("#i"+e));let l=a==="sandbox"?Ge(s.nodes()[0].contentDocument.body):Ge("body"),u=a==="sandbox"?s.nodes()[0].contentDocument:document,h=u.getElementById(e);ju=h.parentElement.offsetWidth,ju===void 0&&(ju=1200),i.useWidth!==void 0&&(ju=i.useWidth);let f=n.db.getTasks(),d=[];for(let A of f)d.push(A.type);d=_(d);let p={},m=2*i.topPadding;if(n.db.getDisplayMode()==="compact"||i.displayMode==="compact"){let A={};for(let O of f)A[O.section]===void 0?A[O.section]=[O]:A[O.section].push(O);let D=0;for(let O of Object.keys(A)){let R=mVe(A[O],D)+1;D+=R,m+=R*(i.barHeight+i.barGap),p[O]=R;}}else{m+=f.length*(i.barHeight+i.barGap);for(let A of d)p[A]=f.filter(D=>D.type===A).length;}h.setAttribute("viewBox","0 0 "+ju+" "+m);let g=l.select(`[id="${e}"]`),y=F5().domain([U3(f,function(A){return A.startTime;}),V3(f,function(A){return A.endTime;})]).rangeRound([0,ju-i.leftPadding-i.rightPadding]);function v(A,D){let O=A.startTime,R=D.startTime,k=0;return O>R?k=1:O<R&&(k=-1),k;}o(v,"taskCompare"),f.sort(v),x(f,ju,m),hn(g,m,ju,i.useMaxWidth),g.append("text").text(n.db.getDiagramTitle()).attr("x",ju/2).attr("y",i.titleTopMargin).attr("class","titleText");function x(A,D,O){let R=i.barHeight,k=R+i.barGap,L=i.topPadding,S=i.leftPadding,I=xl().domain([0,d.length]).range(["#00B9FA","#F95002"]).interpolate(r_);T(k,L,S,D,O,A,n.db.getExcludes(),n.db.getIncludes()),C(S,L,D,O),b(A,k,L,S,R,I,D,O),w(k,L,S,R,I),E(S,L,D,O);}o(x,"makeGantt");function b(A,D,O,R,k,L,S){A.sort((z,$)=>z.vert===$.vert?0:z.vert?1:-1);let M=[...new Set(A.map(z=>z.order))].map(z=>A.find($=>$.order===z));g.append("g").selectAll("rect").data(M).enter().append("rect").attr("x",0).attr("y",function(z,$){return $=z.order,$*D+O-2;}).attr("width",function(){return S-i.rightPadding/2;}).attr("height",D).attr("class",function(z){for(let[$,U]of d.entries())if(z.type===U)return"section section"+$%i.numberSectionStyles;return"section section0";}).enter();let P=g.append("g").selectAll("rect").data(A).enter(),B=n.db.getLinks();if(P.append("rect").attr("id",function(z){return z.id;}).attr("rx",3).attr("ry",3).attr("x",function(z){return z.milestone?y(z.startTime)+R+.5*(y(z.endTime)-y(z.startTime))-.5*k:y(z.startTime)+R;}).attr("y",function(z,$){return $=z.order,z.vert?i.gridLineStartPadding:$*D+O;}).attr("width",function(z){return z.milestone?k:z.vert?.08*k:y(z.renderEndTime||z.endTime)-y(z.startTime);}).attr("height",function(z){return z.vert?f.length*(i.barHeight+i.barGap)+i.barHeight*2:k;}).attr("transform-origin",function(z,$){return $=z.order,(y(z.startTime)+R+.5*(y(z.endTime)-y(z.startTime))).toString()+"px "+($*D+O+.5*k).toString()+"px";}).attr("class",function(z){let $="task",U="";z.classes.length>0&&(U=z.classes.join(" "));let K=0;for(let[Y,ce]of d.entries())z.type===ce&&(K=Y%i.numberSectionStyles);let ee="";return z.active?z.crit?ee+=" activeCrit":ee=" active":z.done?z.crit?ee=" doneCrit":ee=" done":z.crit&&(ee+=" crit"),ee.length===0&&(ee=" task"),z.milestone&&(ee=" milestone "+ee),z.vert&&(ee=" vert "+ee),ee+=K,ee+=" "+U,$+ee;}),P.append("text").attr("id",function(z){return z.id+"-text";}).text(function(z){return z.task;}).attr("font-size",i.fontSize).attr("x",function(z){let $=y(z.startTime),U=y(z.renderEndTime||z.endTime);if(z.milestone&&($+=.5*(y(z.endTime)-y(z.startTime))-.5*k,U=$+k),z.vert)return y(z.startTime)+R;let K=this.getBBox().width;return K>U-$?U+K+1.5*i.leftPadding>S?$+R-5:U+R+5:(U-$)/2+$+R;}).attr("y",function(z,$){return z.vert?i.gridLineStartPadding+f.length*(i.barHeight+i.barGap)+60:($=z.order,$*D+i.barHeight/2+(i.fontSize/2-2)+O);}).attr("text-height",k).attr("class",function(z){let $=y(z.startTime),U=y(z.endTime);z.milestone&&(U=$+k);let K=this.getBBox().width,ee="";z.classes.length>0&&(ee=z.classes.join(" "));let Y=0;for(let[Z,ue]of d.entries())z.type===ue&&(Y=Z%i.numberSectionStyles);let ce="";return z.active&&(z.crit?ce="activeCritText"+Y:ce="activeText"+Y),z.done?z.crit?ce=ce+" doneCritText"+Y:ce=ce+" doneText"+Y:z.crit&&(ce=ce+" critText"+Y),z.milestone&&(ce+=" milestoneText"),z.vert&&(ce+=" vertText"),K>U-$?U+K+1.5*i.leftPadding>S?ee+" taskTextOutsideLeft taskTextOutside"+Y+" "+ce:ee+" taskTextOutsideRight taskTextOutside"+Y+" "+ce+" width-"+K:ee+" taskText taskText"+Y+" "+ce+" width-"+K;}),ge().securityLevel==="sandbox"){let z;z=Ge("#i"+e);let $=z.nodes()[0].contentDocument;P.filter(function(U){return B.has(U.id);}).each(function(U){var K=$.querySelector("#"+U.id),ee=$.querySelector("#"+U.id+"-text");let Y=K.parentNode;var ce=$.createElement("a");ce.setAttribute("xlink:href",B.get(U.id)),ce.setAttribute("target","_top"),Y.appendChild(ce),ce.appendChild(K),ce.appendChild(ee);});}}o(b,"drawRects");function T(A,D,O,R,k,L,S,I){if(S.length===0&&I.length===0)return;let M,P;for(let{startTime:K,endTime:ee}of L)(M===void 0||K<M)&&(M=K),(P===void 0||ee>P)&&(P=ee);if(!M||!P)return;if((0,LS.default)(P).diff((0,LS.default)(M),"year")>5){X.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return;}let B=n.db.getDateFormat(),F=[],z=null,$=(0,LS.default)(M);for(;$.valueOf()<=P;)n.db.isInvalidDate($,B,S,I)?z?z.end=$:z={start:$,end:$}:z&&(F.push(z),z=null),$=$.add(1,"d");g.append("g").selectAll("rect").data(F).enter().append("rect").attr("id",K=>"exclude-"+K.start.format("YYYY-MM-DD")).attr("x",K=>y(K.start.startOf("day"))+O).attr("y",i.gridLineStartPadding).attr("width",K=>y(K.end.endOf("day"))-y(K.start.startOf("day"))).attr("height",k-D-i.gridLineStartPadding).attr("transform-origin",function(K,ee){return(y(K.start)+O+.5*(y(K.end)-y(K.start))).toString()+"px "+(ee*A+.5*k).toString()+"px";}).attr("class","exclude-range");}o(T,"drawExcludeDays");function C(A,D,O,R){var _i$axisFormat;let k=n.db.getDateFormat(),L=n.db.getAxisFormat(),S;L?S=L:k==="D"?S="%d":S=(_i$axisFormat=i.axisFormat)!==null&&_i$axisFormat!==void 0?_i$axisFormat:"%Y-%m-%d";let I=BA(y).tickSize(-R+D+i.gridLineStartPadding).tickFormat(kd(S)),P=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||i.tickInterval);if(P!==null){let B=P[1],F=P[2],z=n.db.getWeekday()||i.weekday;switch(F){case"millisecond":I.ticks(lc.every(B));break;case"second":I.ticks(Zs.every(B));break;case"minute":I.ticks(bu.every(B));break;case"hour":I.ticks(Tu.every(B));break;case"day":I.ticks(Do.every(B));break;case"week":I.ticks(Jhe[z].every(B));break;case"month":I.ticks(wu.every(B));break;}}if(g.append("g").attr("class","grid").attr("transform","translate("+A+", "+(R-50)+")").call(I).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||i.topAxis){let B=PA(y).tickSize(-R+D+i.gridLineStartPadding).tickFormat(kd(S));if(P!==null){let F=P[1],z=P[2],$=n.db.getWeekday()||i.weekday;switch(z){case"millisecond":B.ticks(lc.every(F));break;case"second":B.ticks(Zs.every(F));break;case"minute":B.ticks(bu.every(F));break;case"hour":B.ticks(Tu.every(F));break;case"day":B.ticks(Do.every(F));break;case"week":B.ticks(Jhe[$].every(F));break;case"month":B.ticks(wu.every(F));break;}}g.append("g").attr("class","grid").attr("transform","translate("+A+", "+D+")").call(B).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10);}}o(C,"makeGrid");function w(A,D){let O=0,R=Object.keys(p).map(k=>[k,p[k]]);g.append("g").selectAll("text").data(R).enter().append(function(k){let L=k[0].split(Ze.lineBreakRegex),S=-(L.length-1)/2,I=u.createElementNS("http://www.w3.org/2000/svg","text");I.setAttribute("dy",S+"em");for(let[M,P]of L.entries()){let B=u.createElementNS("http://www.w3.org/2000/svg","tspan");B.setAttribute("alignment-baseline","central"),B.setAttribute("x","10"),M>0&&B.setAttribute("dy","1em"),B.textContent=P,I.appendChild(B);}return I;}).attr("x",10).attr("y",function(k,L){if(L>0)for(let S=0;S<L;S++)return O+=R[L-1][1],k[1]*A/2+O*A+D;else return k[1]*A/2+D;}).attr("font-size",i.sectionFontSize).attr("class",function(k){for(let[L,S]of d.entries())if(k[0]===S)return"sectionTitle sectionTitle"+L%i.numberSectionStyles;return"sectionTitle";});}o(w,"vertLabels");function E(A,D,O,R){let k=n.db.getTodayMarker();if(k==="off")return;let L=g.append("g").attr("class","today"),S=new Date(),I=L.append("line");I.attr("x1",y(S)+A).attr("x2",y(S)+A).attr("y1",i.titleTopMargin).attr("y2",R-i.titleTopMargin).attr("class","today"),k!==""&&I.attr("style",k.replace(/,/g,";"));}o(E,"drawToday");function _(A){let D={},O=[];for(let R=0,k=A.length;R<k;++R)Object.prototype.hasOwnProperty.call(D,A[R])||(D[A[R]]=!0,O.push(A[R]));return O;}o(_,"checkUnique");},"draw"),efe={setConf:pVe,draw:gVe};});var yVe,rfe,nfe=N(()=>{"use strict";yVe=o(t=>`
  .mermaid-main-font {
        font-family: ${t.fontFamily};
  }

  .exclude-range {
    fill: ${t.excludeBkgColor};
  }

  .section {
    stroke: none;
    opacity: 0.2;
  }

  .section0 {
    fill: ${t.sectionBkgColor};
  }

  .section2 {
    fill: ${t.sectionBkgColor2};
  }

  .section1,
  .section3 {
    fill: ${t.altSectionBkgColor};
    opacity: 0.2;
  }

  .sectionTitle0 {
    fill: ${t.titleColor};
  }

  .sectionTitle1 {
    fill: ${t.titleColor};
  }

  .sectionTitle2 {
    fill: ${t.titleColor};
  }

  .sectionTitle3 {
    fill: ${t.titleColor};
  }

  .sectionTitle {
    text-anchor: start;
    font-family: ${t.fontFamily};
  }


  /* Grid and axis */

  .grid .tick {
    stroke: ${t.gridColor};
    opacity: 0.8;
    shape-rendering: crispEdges;
  }

  .grid .tick text {
    font-family: ${t.fontFamily};
    fill: ${t.textColor};
  }

  .grid path {
    stroke-width: 0;
  }


  /* Today line */

  .today {
    fill: none;
    stroke: ${t.todayLineColor};
    stroke-width: 2px;
  }


  /* Task styling */

  /* Default task */

  .task {
    stroke-width: 2;
  }

  .taskText {
    text-anchor: middle;
    font-family: ${t.fontFamily};
  }

  .taskTextOutsideRight {
    fill: ${t.taskTextDarkColor};
    text-anchor: start;
    font-family: ${t.fontFamily};
  }

  .taskTextOutsideLeft {
    fill: ${t.taskTextDarkColor};
    text-anchor: end;
  }


  /* Special case clickable */

  .task.clickable {
    cursor: pointer;
  }

  .taskText.clickable {
    cursor: pointer;
    fill: ${t.taskTextClickableColor} !important;
    font-weight: bold;
  }

  .taskTextOutsideLeft.clickable {
    cursor: pointer;
    fill: ${t.taskTextClickableColor} !important;
    font-weight: bold;
  }

  .taskTextOutsideRight.clickable {
    cursor: pointer;
    fill: ${t.taskTextClickableColor} !important;
    font-weight: bold;
  }


  /* Specific task settings for the sections*/

  .taskText0,
  .taskText1,
  .taskText2,
  .taskText3 {
    fill: ${t.taskTextColor};
  }

  .task0,
  .task1,
  .task2,
  .task3 {
    fill: ${t.taskBkgColor};
    stroke: ${t.taskBorderColor};
  }

  .taskTextOutside0,
  .taskTextOutside2
  {
    fill: ${t.taskTextOutsideColor};
  }

  .taskTextOutside1,
  .taskTextOutside3 {
    fill: ${t.taskTextOutsideColor};
  }


  /* Active task */

  .active0,
  .active1,
  .active2,
  .active3 {
    fill: ${t.activeTaskBkgColor};
    stroke: ${t.activeTaskBorderColor};
  }

  .activeText0,
  .activeText1,
  .activeText2,
  .activeText3 {
    fill: ${t.taskTextDarkColor} !important;
  }


  /* Completed task */

  .done0,
  .done1,
  .done2,
  .done3 {
    stroke: ${t.doneTaskBorderColor};
    fill: ${t.doneTaskBkgColor};
    stroke-width: 2;
  }

  .doneText0,
  .doneText1,
  .doneText2,
  .doneText3 {
    fill: ${t.taskTextDarkColor} !important;
  }


  /* Tasks on the critical line */

  .crit0,
  .crit1,
  .crit2,
  .crit3 {
    stroke: ${t.critBorderColor};
    fill: ${t.critBkgColor};
    stroke-width: 2;
  }

  .activeCrit0,
  .activeCrit1,
  .activeCrit2,
  .activeCrit3 {
    stroke: ${t.critBorderColor};
    fill: ${t.activeTaskBkgColor};
    stroke-width: 2;
  }

  .doneCrit0,
  .doneCrit1,
  .doneCrit2,
  .doneCrit3 {
    stroke: ${t.critBorderColor};
    fill: ${t.doneTaskBkgColor};
    stroke-width: 2;
    cursor: pointer;
    shape-rendering: crispEdges;
  }

  .milestone {
    transform: rotate(45deg) scale(0.8,0.8);
  }

  .milestoneText {
    font-style: italic;
  }
  .doneCritText0,
  .doneCritText1,
  .doneCritText2,
  .doneCritText3 {
    fill: ${t.taskTextDarkColor} !important;
  }

  .vert {
    stroke: ${t.vertLineColor};
  }

  .vertText {
    font-size: 15px;
    text-anchor: middle;
    fill: ${t.vertLineColor} !important;
  }

  .activeCritText0,
  .activeCritText1,
  .activeCritText2,
  .activeCritText3 {
    fill: ${t.taskTextDarkColor} !important;
  }

  .titleText {
    text-anchor: middle;
    font-size: 18px;
    fill: ${t.titleColor||t.textColor};
    font-family: ${t.fontFamily};
  }
`,"getStyles"),rfe=yVe;});var ife={};hr(ife,{diagram:()=>vVe});var vVe,afe=N(()=>{"use strict";Nhe();Zhe();tfe();nfe();vVe={parser:Rhe,db:Khe,renderer:efe,styles:rfe};});var lfe,cfe=N(()=>{"use strict";gf();yt();lfe={parse:o(async t=>{let e=await ps("info",t);X.debug(e);},"parse")};});var _b,qO=N(()=>{_b={name:"mermaid",version:"11.10.1",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.0.0",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.0",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}};});var kVe,EVe,ufe,hfe=N(()=>{"use strict";qO();kVe={version:_b.version+""},EVe=o(()=>kVe.version,"getVersion"),ufe={getVersion:EVe};});var Di,zl=N(()=>{"use strict";pr();qt();Di=o(t=>{let{securityLevel:e}=ge(),r=Ge("body");if(e==="sandbox"){var _Ge$node$contentDocum,_Ge$node;let a=(_Ge$node$contentDocum=(_Ge$node=Ge(`#i${t}`).node())===null||_Ge$node===void 0?void 0:_Ge$node.contentDocument)!==null&&_Ge$node$contentDocum!==void 0?_Ge$node$contentDocum:document;r=Ge(a.body);}return r.select(`#${t}`);},"selectSvgElement");});var SVe,ffe,dfe=N(()=>{"use strict";yt();zl();yi();SVe=o((t,e,r)=>{X.debug(`rendering info diagram
`+t);let n=Di(e);hn(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`);},"draw"),ffe={draw:SVe};});var pfe={};hr(pfe,{diagram:()=>CVe});var CVe,mfe=N(()=>{"use strict";cfe();hfe();dfe();CVe={parser:lfe,db:ufe,renderer:ffe};});var vfe,YO,RS,XO,DVe,LVe,RVe,NVe,MVe,IVe,OVe,NS,jO=N(()=>{"use strict";yt();ci();Ca();vfe=lr.pie,YO={sections:new Map(),showData:!1,config:vfe},RS=YO.sections,XO=YO.showData,DVe=structuredClone(vfe),LVe=o(()=>structuredClone(DVe),"getConfig"),RVe=o(()=>{RS=new Map(),XO=YO.showData,wr();},"clear"),NVe=o(({label:t,value:e})=>{if(e<0)throw new Error(`"${t}" has invalid value: ${e}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);RS.has(t)||(RS.set(t,e),X.debug(`added new section: ${t}, with value: ${e}`));},"addSection"),MVe=o(()=>RS,"getSections"),IVe=o(t=>{XO=t;},"setShowData"),OVe=o(()=>XO,"getShowData"),NS={getConfig:LVe,clear:RVe,setDiagramTitle:Ir,getDiagramTitle:Rr,setAccTitle:Cr,getAccTitle:_r,setAccDescription:Dr,getAccDescription:Lr,addSection:NVe,getSections:MVe,setShowData:IVe,getShowData:OVe};});var PVe,xfe,bfe=N(()=>{"use strict";gf();yt();Dp();jO();PVe=o((t,e)=>{Qo(t,e),e.setShowData(t.showData),t.sections.map(e.addSection);},"populateDb"),xfe={parse:o(async t=>{let e=await ps("pie",t);X.debug(e),PVe(e,NS);},"parse")};});var BVe,Tfe,wfe=N(()=>{"use strict";BVe=o(t=>`
  .pieCircle{
    stroke: ${t.pieStrokeColor};
    stroke-width : ${t.pieStrokeWidth};
    opacity : ${t.pieOpacity};
  }
  .pieOuterCircle{
    stroke: ${t.pieOuterStrokeColor};
    stroke-width: ${t.pieOuterStrokeWidth};
    fill: none;
  }
  .pieTitleText {
    text-anchor: middle;
    font-size: ${t.pieTitleTextSize};
    fill: ${t.pieTitleTextColor};
    font-family: ${t.fontFamily};
  }
  .slice {
    font-family: ${t.fontFamily};
    fill: ${t.pieSectionTextColor};
    font-size:${t.pieSectionTextSize};
    // fill: white;
  }
  .legend text {
    fill: ${t.pieLegendTextColor};
    font-family: ${t.fontFamily};
    font-size: ${t.pieLegendTextSize};
  }
`,"getStyles"),Tfe=BVe;});var FVe,$Ve,kfe,Efe=N(()=>{"use strict";pr();qt();yt();zl();yi();nr();FVe=o(t=>{let e=[...t.values()].reduce((i,a)=>i+a,0),r=[...t.entries()].map(([i,a])=>({label:i,value:a})).filter(i=>i.value/e*100>=1).sort((i,a)=>a.value-i.value);return H5().value(i=>i.value)(r);},"createPieArcs"),$Ve=o((t,e,r,n)=>{X.debug(`rendering pie chart
`+t);let i=n.db,a=ge(),s=Fn(i.getConfig(),a.pie),l=40,u=18,h=4,f=450,d=f,p=Di(e),m=p.append("g");m.attr("transform","translate("+d/2+","+f/2+")");let{themeVariables:g}=a,[y]=Fo(g.pieOuterStrokeWidth);y!==null&&y!==void 0?y:y=2;let v=s.textPosition,x=Math.min(d,f)/2-l,b=kl().innerRadius(0).outerRadius(x),T=kl().innerRadius(x*v).outerRadius(x*v);m.append("circle").attr("cx",0).attr("cy",0).attr("r",x+y/2).attr("class","pieOuterCircle");let C=i.getSections(),w=FVe(C),E=[g.pie1,g.pie2,g.pie3,g.pie4,g.pie5,g.pie6,g.pie7,g.pie8,g.pie9,g.pie10,g.pie11,g.pie12],_=0;C.forEach(S=>{_+=S;});let A=w.filter(S=>(S.data.value/_*100).toFixed(0)!=="0"),D=Qs(E);m.selectAll("mySlices").data(A).enter().append("path").attr("d",b).attr("fill",S=>D(S.data.label)).attr("class","pieCircle"),m.selectAll("mySlices").data(A).enter().append("text").text(S=>(S.data.value/_*100).toFixed(0)+"%").attr("transform",S=>"translate("+T.centroid(S)+")").style("text-anchor","middle").attr("class","slice"),m.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-(f-50)/2).attr("class","pieTitleText");let O=[...C.entries()].map(([S,I])=>({label:S,value:I})),R=m.selectAll(".legend").data(O).enter().append("g").attr("class","legend").attr("transform",(S,I)=>{let M=u+h,P=M*O.length/2,B=12*u,F=I*M-P;return"translate("+B+","+F+")";});R.append("rect").attr("width",u).attr("height",u).style("fill",S=>D(S.label)).style("stroke",S=>D(S.label)),R.append("text").attr("x",u+h).attr("y",u-h).text(S=>i.getShowData()?`${S.label} [${S.value}]`:S.label);let k=Math.max(...R.selectAll("text").nodes().map(S=>{var _S$getBoundingClientR;return(_S$getBoundingClientR=S===null||S===void 0?void 0:S.getBoundingClientRect().width)!==null&&_S$getBoundingClientR!==void 0?_S$getBoundingClientR:0;})),L=d+l+u+h+k;p.attr("viewBox",`0 0 ${L} ${f}`),hn(p,f,L,s.useMaxWidth);},"draw"),kfe={draw:$Ve};});var Sfe={};hr(Sfe,{diagram:()=>zVe});var zVe,Cfe=N(()=>{"use strict";bfe();jO();wfe();Efe();zVe={parser:xfe,db:NS,renderer:kfe,styles:Tfe};});var KO,Dfe,Lfe=N(()=>{"use strict";KO=function(){var t=o(function(Te,W,pe,ve){for(pe=pe||{},ve=Te.length;ve--;pe[Te[ve]]=W);return pe;},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[1,7],s=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],u=[55,56,57],h=[2,36],f=[1,37],d=[1,36],p=[1,38],m=[1,35],g=[1,43],y=[1,41],v=[1,14],x=[1,23],b=[1,18],T=[1,19],C=[1,20],w=[1,21],E=[1,22],_=[1,24],A=[1,25],D=[1,26],O=[1,27],R=[1,28],k=[1,29],L=[1,32],S=[1,33],I=[1,34],M=[1,39],P=[1,40],B=[1,42],F=[1,44],z=[1,62],$=[1,61],U=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],K=[1,65],ee=[1,66],Y=[1,67],ce=[1,68],Z=[1,69],ue=[1,70],Q=[1,71],j=[1,72],ne=[1,73],te=[1,74],he=[1,75],le=[1,76],J=[4,5,6,7,8,9,10,11,12,13,14,15,18],Se=[1,90],se=[1,91],ae=[1,92],Oe=[1,99],ye=[1,93],Be=[1,96],He=[1,94],ze=[1,95],Le=[1,97],Ie=[1,98],xe=[1,102],q=[10,55,56,57],de=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ie={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(W,pe,ve,Pe,_e,be,Ve){var De=be.length-1;switch(_e){case 23:this.$=be[De];break;case 24:this.$=be[De-1]+""+be[De];break;case 26:this.$=be[De-1]+be[De];break;case 27:this.$=[be[De].trim()];break;case 28:be[De-2].push(be[De].trim()),this.$=be[De-2];break;case 29:this.$=be[De-4],Pe.addClass(be[De-2],be[De]);break;case 37:this.$=[];break;case 42:this.$=be[De].trim(),Pe.setDiagramTitle(this.$);break;case 43:this.$=be[De].trim(),Pe.setAccTitle(this.$);break;case 44:case 45:this.$=be[De].trim(),Pe.setAccDescription(this.$);break;case 46:Pe.addSection(be[De].substr(8)),this.$=be[De].substr(8);break;case 47:Pe.addPoint(be[De-3],"",be[De-1],be[De],[]);break;case 48:Pe.addPoint(be[De-4],be[De-3],be[De-1],be[De],[]);break;case 49:Pe.addPoint(be[De-4],"",be[De-2],be[De-1],be[De]);break;case 50:Pe.addPoint(be[De-5],be[De-4],be[De-2],be[De-1],be[De]);break;case 51:Pe.setXAxisLeftText(be[De-2]),Pe.setXAxisRightText(be[De]);break;case 52:be[De-1].text+=" \u27F6 ",Pe.setXAxisLeftText(be[De-1]);break;case 53:Pe.setXAxisLeftText(be[De]);break;case 54:Pe.setYAxisBottomText(be[De-2]),Pe.setYAxisTopText(be[De]);break;case 55:be[De-1].text+=" \u27F6 ",Pe.setYAxisBottomText(be[De-1]);break;case 56:Pe.setYAxisBottomText(be[De]);break;case 57:Pe.setQuadrant1Text(be[De]);break;case 58:Pe.setQuadrant2Text(be[De]);break;case 59:Pe.setQuadrant3Text(be[De]);break;case 60:Pe.setQuadrant4Text(be[De]);break;case 64:this.$={text:be[De],type:"text"};break;case 65:this.$={text:be[De-1].text+""+be[De],type:be[De-1].type};break;case 66:this.$={text:be[De],type:"text"};break;case 67:this.$={text:be[De],type:"markdown"};break;case 68:this.$=be[De];break;case 69:this.$=be[De-1]+""+be[De];break;}},"anonymous"),table:[{18:e,26:1,27:2,28:r,55:n,56:i,57:a},{1:[3]},{18:e,26:8,27:2,28:r,55:n,56:i,57:a},{18:e,26:9,27:2,28:r,55:n,56:i,57:a},t(s,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(u,h,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:f,5:d,10:p,12:m,13:g,14:y,18:v,25:x,35:b,37:T,39:C,41:w,42:E,48:_,50:A,51:D,52:O,53:R,54:k,60:L,61:S,63:I,64:M,65:P,66:B,67:F}),t(s,[2,34]),{27:45,55:n,56:i,57:a},t(u,[2,37]),t(u,h,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:f,5:d,10:p,12:m,13:g,14:y,18:v,25:x,35:b,37:T,39:C,41:w,42:E,48:_,50:A,51:D,52:O,53:R,54:k,60:L,61:S,63:I,64:M,65:P,66:B,67:F}),t(u,[2,39]),t(u,[2,40]),t(u,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(u,[2,45]),t(u,[2,46]),{18:[1,50]},{4:f,5:d,10:p,12:m,13:g,14:y,43:51,58:31,60:L,61:S,63:I,64:M,65:P,66:B,67:F},{4:f,5:d,10:p,12:m,13:g,14:y,43:52,58:31,60:L,61:S,63:I,64:M,65:P,66:B,67:F},{4:f,5:d,10:p,12:m,13:g,14:y,43:53,58:31,60:L,61:S,63:I,64:M,65:P,66:B,67:F},{4:f,5:d,10:p,12:m,13:g,14:y,43:54,58:31,60:L,61:S,63:I,64:M,65:P,66:B,67:F},{4:f,5:d,10:p,12:m,13:g,14:y,43:55,58:31,60:L,61:S,63:I,64:M,65:P,66:B,67:F},{4:f,5:d,10:p,12:m,13:g,14:y,43:56,58:31,60:L,61:S,63:I,64:M,65:P,66:B,67:F},{4:f,5:d,8:z,10:p,12:m,13:g,14:y,18:$,44:[1,57],47:[1,58],58:60,59:59,63:I,64:M,65:P,66:B,67:F},t(U,[2,64]),t(U,[2,66]),t(U,[2,67]),t(U,[2,70]),t(U,[2,71]),t(U,[2,72]),t(U,[2,73]),t(U,[2,74]),t(U,[2,75]),t(U,[2,76]),t(U,[2,77]),t(U,[2,78]),t(U,[2,79]),t(U,[2,80]),t(s,[2,35]),t(u,[2,38]),t(u,[2,42]),t(u,[2,43]),t(u,[2,44]),{3:64,4:K,5:ee,6:Y,7:ce,8:Z,9:ue,10:Q,11:j,12:ne,13:te,14:he,15:le,21:63},t(u,[2,53],{59:59,58:60,4:f,5:d,8:z,10:p,12:m,13:g,14:y,18:$,49:[1,77],63:I,64:M,65:P,66:B,67:F}),t(u,[2,56],{59:59,58:60,4:f,5:d,8:z,10:p,12:m,13:g,14:y,18:$,49:[1,78],63:I,64:M,65:P,66:B,67:F}),t(u,[2,57],{59:59,58:60,4:f,5:d,8:z,10:p,12:m,13:g,14:y,18:$,63:I,64:M,65:P,66:B,67:F}),t(u,[2,58],{59:59,58:60,4:f,5:d,8:z,10:p,12:m,13:g,14:y,18:$,63:I,64:M,65:P,66:B,67:F}),t(u,[2,59],{59:59,58:60,4:f,5:d,8:z,10:p,12:m,13:g,14:y,18:$,63:I,64:M,65:P,66:B,67:F}),t(u,[2,60],{59:59,58:60,4:f,5:d,8:z,10:p,12:m,13:g,14:y,18:$,63:I,64:M,65:P,66:B,67:F}),{45:[1,79]},{44:[1,80]},t(U,[2,65]),t(U,[2,81]),t(U,[2,82]),t(U,[2,83]),{3:82,4:K,5:ee,6:Y,7:ce,8:Z,9:ue,10:Q,11:j,12:ne,13:te,14:he,15:le,18:[1,81]},t(J,[2,23]),t(J,[2,1]),t(J,[2,2]),t(J,[2,3]),t(J,[2,4]),t(J,[2,5]),t(J,[2,6]),t(J,[2,7]),t(J,[2,8]),t(J,[2,9]),t(J,[2,10]),t(J,[2,11]),t(J,[2,12]),t(u,[2,52],{58:31,43:83,4:f,5:d,10:p,12:m,13:g,14:y,60:L,61:S,63:I,64:M,65:P,66:B,67:F}),t(u,[2,55],{58:31,43:84,4:f,5:d,10:p,12:m,13:g,14:y,60:L,61:S,63:I,64:M,65:P,66:B,67:F}),{46:[1,85]},{45:[1,86]},{4:Se,5:se,6:ae,8:Oe,11:ye,13:Be,16:89,17:He,18:ze,19:Le,20:Ie,22:88,23:87},t(J,[2,24]),t(u,[2,51],{59:59,58:60,4:f,5:d,8:z,10:p,12:m,13:g,14:y,18:$,63:I,64:M,65:P,66:B,67:F}),t(u,[2,54],{59:59,58:60,4:f,5:d,8:z,10:p,12:m,13:g,14:y,18:$,63:I,64:M,65:P,66:B,67:F}),t(u,[2,47],{22:88,16:89,23:100,4:Se,5:se,6:ae,8:Oe,11:ye,13:Be,17:He,18:ze,19:Le,20:Ie}),{46:[1,101]},t(u,[2,29],{10:xe}),t(q,[2,27],{16:103,4:Se,5:se,6:ae,8:Oe,11:ye,13:Be,17:He,18:ze,19:Le,20:Ie}),t(de,[2,25]),t(de,[2,13]),t(de,[2,14]),t(de,[2,15]),t(de,[2,16]),t(de,[2,17]),t(de,[2,18]),t(de,[2,19]),t(de,[2,20]),t(de,[2,21]),t(de,[2,22]),t(u,[2,49],{10:xe}),t(u,[2,48],{22:88,16:89,23:104,4:Se,5:se,6:ae,8:Oe,11:ye,13:Be,17:He,18:ze,19:Le,20:Ie}),{4:Se,5:se,6:ae,8:Oe,11:ye,13:Be,16:89,17:He,18:ze,19:Le,20:Ie,22:105},t(de,[2,26]),t(u,[2,50],{10:xe}),t(q,[2,28],{16:103,4:Se,5:se,6:ae,8:Oe,11:ye,13:Be,17:He,18:ze,19:Le,20:Ie})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(W,pe){if(pe.recoverable)this.trace(W);else{var ve=new Error(W);throw ve.hash=pe,ve;}},"parseError"),parse:o(function(W){var pe=this,ve=[0],Pe=[],_e=[null],be=[],Ve=this.table,De="",Ye=0,at=0,Rt=0,st=2,Ue=1,ut=be.slice.call(arguments,1),We=Object.create(this.lexer),lt={yy:{}};for(var Xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xt)&&(lt.yy[Xt]=this.yy[Xt]);We.setInput(W,lt.yy),lt.yy.lexer=We,lt.yy.parser=this,typeof We.yylloc>"u"&&(We.yylloc={});var Tt=We.yylloc;be.push(Tt);var Mt=We.options&&We.options.ranges;typeof lt.yy.parseError=="function"?this.parseError=lt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function bt(Ce){ve.length=ve.length-2*Ce,_e.length=_e.length-Ce,be.length=be.length-Ce;}o(bt,"popStack");function ht(){var Ce;return Ce=Pe.pop()||We.lex()||Ue,typeof Ce!="number"&&(Ce instanceof Array&&(Pe=Ce,Ce=Pe.pop()),Ce=pe.symbols_[Ce]||Ce),Ce;}o(ht,"lex");for(var St,ft,vt,nt,dn,kt,In={},en,Nr,Mr,On;;){if(vt=ve[ve.length-1],this.defaultActions[vt]?nt=this.defaultActions[vt]:((St===null||typeof St>"u")&&(St=ht()),nt=Ve[vt]&&Ve[vt][St]),typeof nt>"u"||!nt.length||!nt[0]){var Dt="";On=[];for(en in Ve[vt])this.terminals_[en]&&en>st&&On.push("'"+this.terminals_[en]+"'");We.showPosition?Dt="Parse error on line "+(Ye+1)+`:
`+We.showPosition()+`
Expecting `+On.join(", ")+", got '"+(this.terminals_[St]||St)+"'":Dt="Parse error on line "+(Ye+1)+": Unexpected "+(St==Ue?"end of input":"'"+(this.terminals_[St]||St)+"'"),this.parseError(Dt,{text:We.match,token:this.terminals_[St]||St,line:We.yylineno,loc:Tt,expected:On});}if(nt[0]instanceof Array&&nt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+vt+", token: "+St);switch(nt[0]){case 1:ve.push(St),_e.push(We.yytext),be.push(We.yylloc),ve.push(nt[1]),St=null,ft?(St=ft,ft=null):(at=We.yyleng,De=We.yytext,Ye=We.yylineno,Tt=We.yylloc,Rt>0&&Rt--);break;case 2:if(Nr=this.productions_[nt[1]][1],In.$=_e[_e.length-Nr],In._$={first_line:be[be.length-(Nr||1)].first_line,last_line:be[be.length-1].last_line,first_column:be[be.length-(Nr||1)].first_column,last_column:be[be.length-1].last_column},Mt&&(In._$.range=[be[be.length-(Nr||1)].range[0],be[be.length-1].range[1]]),kt=this.performAction.apply(In,[De,at,Ye,lt.yy,nt[1],_e,be].concat(ut)),typeof kt<"u")return kt;Nr&&(ve=ve.slice(0,-1*Nr*2),_e=_e.slice(0,-1*Nr),be=be.slice(0,-1*Nr)),ve.push(this.productions_[nt[1]][0]),_e.push(In.$),be.push(In._$),Mr=Ve[ve[ve.length-2]][ve[ve.length-1]],ve.push(Mr);break;case 3:return!0;}}return!0;},"parse")},oe=function(){var Te={EOF:1,parseError:o(function(pe,ve){if(this.yy.parser)this.yy.parser.parseError(pe,ve);else throw new Error(pe);},"parseError"),setInput:o(function(W,pe){return this.yy=pe||this.yy||{},this._input=W,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var W=this._input[0];this.yytext+=W,this.yyleng++,this.offset++,this.match+=W,this.matched+=W;var pe=W.match(/(?:\r\n?|\n).*/g);return pe?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),W;},"input"),unput:o(function(W){var pe=W.length,ve=W.split(/(?:\r\n?|\n)/g);this._input=W+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-pe),this.offset-=pe;var Pe=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ve.length-1&&(this.yylineno-=ve.length-1);var _e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ve?(ve.length===Pe.length?this.yylloc.first_column:0)+Pe[Pe.length-ve.length].length-ve[0].length:this.yylloc.first_column-pe},this.options.ranges&&(this.yylloc.range=[_e[0],_e[0]+this.yyleng-pe]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(W){this.unput(this.match.slice(W));},"less"),pastInput:o(function(){var W=this.matched.substr(0,this.matched.length-this.match.length);return(W.length>20?"...":"")+W.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var W=this.match;return W.length<20&&(W+=this._input.substr(0,20-W.length)),(W.substr(0,20)+(W.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var W=this.pastInput(),pe=new Array(W.length+1).join("-");return W+this.upcomingInput()+`
`+pe+"^";},"showPosition"),test_match:o(function(W,pe){var ve,Pe,_e;if(this.options.backtrack_lexer&&(_e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_e.yylloc.range=this.yylloc.range.slice(0))),Pe=W[0].match(/(?:\r\n?|\n).*/g),Pe&&(this.yylineno+=Pe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Pe?Pe[Pe.length-1].length-Pe[Pe.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+W[0].length},this.yytext+=W[0],this.match+=W[0],this.matches=W,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(W[0].length),this.matched+=W[0],ve=this.performAction.call(this,this.yy,this,pe,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ve)return ve;if(this._backtrack){for(var be in _e)this[be]=_e[be];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var W,pe,ve,Pe;this._more||(this.yytext="",this.match="");for(var _e=this._currentRules(),be=0;be<_e.length;be++)if(ve=this._input.match(this.rules[_e[be]]),ve&&(!pe||ve[0].length>pe[0].length)){if(pe=ve,Pe=be,this.options.backtrack_lexer){if(W=this.test_match(ve,_e[be]),W!==!1)return W;if(this._backtrack){pe=!1;continue;}else return!1;}else if(!this.options.flex)break;}return pe?(W=this.test_match(pe,_e[Pe]),W!==!1?W:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var pe=this.next();return pe||this.lex();},"lex"),begin:o(function(pe){this.conditionStack.push(pe);},"begin"),popState:o(function(){var pe=this.conditionStack.length-1;return pe>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function(pe){return pe=this.conditionStack.length-1-Math.abs(pe||0),pe>=0?this.conditionStack[pe]:"INITIAL";},"topState"),pushState:o(function(pe){this.begin(pe);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(pe,ve,Pe,_e){var be=_e;switch(Pe){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57;}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return Te;}();ie.lexer=oe;function V(){this.yy={};}return o(V,"Parser"),V.prototype=ie,ie.Parser=V,new V();}();KO.parser=KO;Dfe=KO;});var ms,MS,Rfe=N(()=>{"use strict";var _Class190;pr();Ca();yt();Ny();ms=ch(),MS=(_Class190=class MS{constructor(){this.classes=new Map();this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData();}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]};}getDefaultConfig(){var _lr$quadrantChart,_lr$quadrantChart2,_lr$quadrantChart3,_lr$quadrantChart4,_lr$quadrantChart5,_lr$quadrantChart6,_lr$quadrantChart7,_lr$quadrantChart8,_lr$quadrantChart9,_lr$quadrantChart0,_lr$quadrantChart1,_lr$quadrantChart10,_lr$quadrantChart11,_lr$quadrantChart12,_lr$quadrantChart13,_lr$quadrantChart14,_lr$quadrantChart15,_lr$quadrantChart16;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((_lr$quadrantChart=lr.quadrantChart)===null||_lr$quadrantChart===void 0?void 0:_lr$quadrantChart.chartWidth)||500,chartWidth:((_lr$quadrantChart2=lr.quadrantChart)===null||_lr$quadrantChart2===void 0?void 0:_lr$quadrantChart2.chartHeight)||500,titlePadding:((_lr$quadrantChart3=lr.quadrantChart)===null||_lr$quadrantChart3===void 0?void 0:_lr$quadrantChart3.titlePadding)||10,titleFontSize:((_lr$quadrantChart4=lr.quadrantChart)===null||_lr$quadrantChart4===void 0?void 0:_lr$quadrantChart4.titleFontSize)||20,quadrantPadding:((_lr$quadrantChart5=lr.quadrantChart)===null||_lr$quadrantChart5===void 0?void 0:_lr$quadrantChart5.quadrantPadding)||5,xAxisLabelPadding:((_lr$quadrantChart6=lr.quadrantChart)===null||_lr$quadrantChart6===void 0?void 0:_lr$quadrantChart6.xAxisLabelPadding)||5,yAxisLabelPadding:((_lr$quadrantChart7=lr.quadrantChart)===null||_lr$quadrantChart7===void 0?void 0:_lr$quadrantChart7.yAxisLabelPadding)||5,xAxisLabelFontSize:((_lr$quadrantChart8=lr.quadrantChart)===null||_lr$quadrantChart8===void 0?void 0:_lr$quadrantChart8.xAxisLabelFontSize)||16,yAxisLabelFontSize:((_lr$quadrantChart9=lr.quadrantChart)===null||_lr$quadrantChart9===void 0?void 0:_lr$quadrantChart9.yAxisLabelFontSize)||16,quadrantLabelFontSize:((_lr$quadrantChart0=lr.quadrantChart)===null||_lr$quadrantChart0===void 0?void 0:_lr$quadrantChart0.quadrantLabelFontSize)||16,quadrantTextTopPadding:((_lr$quadrantChart1=lr.quadrantChart)===null||_lr$quadrantChart1===void 0?void 0:_lr$quadrantChart1.quadrantTextTopPadding)||5,pointTextPadding:((_lr$quadrantChart10=lr.quadrantChart)===null||_lr$quadrantChart10===void 0?void 0:_lr$quadrantChart10.pointTextPadding)||5,pointLabelFontSize:((_lr$quadrantChart11=lr.quadrantChart)===null||_lr$quadrantChart11===void 0?void 0:_lr$quadrantChart11.pointLabelFontSize)||12,pointRadius:((_lr$quadrantChart12=lr.quadrantChart)===null||_lr$quadrantChart12===void 0?void 0:_lr$quadrantChart12.pointRadius)||5,xAxisPosition:((_lr$quadrantChart13=lr.quadrantChart)===null||_lr$quadrantChart13===void 0?void 0:_lr$quadrantChart13.xAxisPosition)||"top",yAxisPosition:((_lr$quadrantChart14=lr.quadrantChart)===null||_lr$quadrantChart14===void 0?void 0:_lr$quadrantChart14.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((_lr$quadrantChart15=lr.quadrantChart)===null||_lr$quadrantChart15===void 0?void 0:_lr$quadrantChart15.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((_lr$quadrantChart16=lr.quadrantChart)===null||_lr$quadrantChart16===void 0?void 0:_lr$quadrantChart16.quadrantExternalBorderStrokeWidth)||2};}getDefaultThemeConfig(){return{quadrant1Fill:ms.quadrant1Fill,quadrant2Fill:ms.quadrant2Fill,quadrant3Fill:ms.quadrant3Fill,quadrant4Fill:ms.quadrant4Fill,quadrant1TextFill:ms.quadrant1TextFill,quadrant2TextFill:ms.quadrant2TextFill,quadrant3TextFill:ms.quadrant3TextFill,quadrant4TextFill:ms.quadrant4TextFill,quadrantPointFill:ms.quadrantPointFill,quadrantPointTextFill:ms.quadrantPointTextFill,quadrantXAxisTextFill:ms.quadrantXAxisTextFill,quadrantYAxisTextFill:ms.quadrantYAxisTextFill,quadrantTitleFill:ms.quadrantTitleFill,quadrantInternalBorderStrokeFill:ms.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:ms.quadrantExternalBorderStrokeFill};}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map(),X.info("clear called");}setData(e){this.data={...this.data,...e};}addPoints(e){this.data.points=[...e,...this.data.points];}addClass(e,r){this.classes.set(e,r);}setConfig(e){X.trace("setConfig called with: ",e),this.config={...this.config,...e};}setThemeConfig(e){X.trace("setThemeConfig called with: ",e),this.themeConfig={...this.themeConfig,...e};}calculateSpace(e,r,n,i){let a=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,s={top:e==="top"&&r?a:0,bottom:e==="bottom"&&r?a:0},l=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,u={left:this.config.yAxisPosition==="left"&&n?l:0,right:this.config.yAxisPosition==="right"&&n?l:0},h=this.config.titleFontSize+this.config.titlePadding*2,f={top:i?h:0},d=this.config.quadrantPadding+u.left,p=this.config.quadrantPadding+s.top+f.top,m=this.config.chartWidth-this.config.quadrantPadding*2-u.left-u.right,g=this.config.chartHeight-this.config.quadrantPadding*2-s.top-s.bottom-f.top,y=m/2,v=g/2;return{xAxisSpace:s,yAxisSpace:u,titleSpace:f,quadrantSpace:{quadrantLeft:d,quadrantTop:p,quadrantWidth:m,quadrantHalfWidth:y,quadrantHeight:g,quadrantHalfHeight:v}};}getAxisLabels(e,r,n,i){let{quadrantSpace:a,titleSpace:s}=i,{quadrantHalfHeight:l,quadrantHeight:u,quadrantLeft:h,quadrantHalfWidth:f,quadrantTop:d,quadrantWidth:p}=a,m=!!this.data.xAxisRightText,g=!!this.data.yAxisTopText,y=[];return this.data.xAxisLeftText&&r&&y.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+(m?f/2:0),y:e==="top"?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+d+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&r&&y.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+f+(m?f/2:0),y:e==="top"?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+d+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&n&&y.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:d+u-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&n&&y.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:d+l-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),y;}getQuadrants(e){let{quadrantSpace:r}=e,{quadrantHalfHeight:n,quadrantLeft:i,quadrantHalfWidth:a,quadrantTop:s}=r,l=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+a,y:s,width:a,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i,y:s,width:a,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i,y:s+n,width:a,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+a,y:s+n,width:a,height:n,fill:this.themeConfig.quadrant4Fill}];for(let u of l)u.text.x=u.x+u.width/2,this.data.points.length===0?(u.text.y=u.y+u.height/2,u.text.horizontalPos="middle"):(u.text.y=u.y+this.config.quadrantTextTopPadding,u.text.horizontalPos="top");return l;}getQuadrantPoints(e){let{quadrantSpace:r}=e,{quadrantHeight:n,quadrantLeft:i,quadrantTop:a,quadrantWidth:s}=r,l=xl().domain([0,1]).range([i,s+i]),u=xl().domain([0,1]).range([n+a,a]);return this.data.points.map(f=>{var _f$color,_f$radius,_f$strokeColor,_f$strokeWidth;let d=this.classes.get(f.className);return d&&(f={...d,...f}),{x:l(f.x),y:u(f.y),fill:(_f$color=f.color)!==null&&_f$color!==void 0?_f$color:this.themeConfig.quadrantPointFill,radius:(_f$radius=f.radius)!==null&&_f$radius!==void 0?_f$radius:this.config.pointRadius,text:{text:f.text,fill:this.themeConfig.quadrantPointTextFill,x:l(f.x),y:u(f.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:(_f$strokeColor=f.strokeColor)!==null&&_f$strokeColor!==void 0?_f$strokeColor:this.themeConfig.quadrantPointFill,strokeWidth:(_f$strokeWidth=f.strokeWidth)!==null&&_f$strokeWidth!==void 0?_f$strokeWidth:"0px"};});}getBorders(e){let r=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=e,{quadrantHalfHeight:i,quadrantHeight:a,quadrantLeft:s,quadrantHalfWidth:l,quadrantTop:u,quadrantWidth:h}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-r,y1:u,x2:s+h+r,y2:u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+h,y1:u+r,x2:s+h,y2:u+a-r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-r,y1:u+a,x2:s+h+r,y2:u+a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:u+r,x2:s,y2:u+a-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+l,y1:u+r,x2:s+l,y2:u+a-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:u+i,x2:s+h-r,y2:u+i}];}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2};}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),r=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,i=this.data.points.length>0?"bottom":this.config.xAxisPosition,a=this.calculateSpace(i,e,r,n);return{points:this.getQuadrantPoints(a),quadrants:this.getQuadrants(a),axisLabels:this.getAxisLabels(i,e,r,a),borderLines:this.getBorders(a),title:this.getTitle(n)};}},o(_Class190,"QuadrantBuilder"),_Class190);});function QO(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t);}function Nfe(t){return!/^\d+$/.test(t);}function Mfe(t){return!/^\d+px$/.test(t);}var Mp,Ife=N(()=>{"use strict";var _Class191;Mp=(_Class191=class Mp extends Error{constructor(e,r,n){super(`value for ${e} ${r} is invalid, please use a valid ${n}`),this.name="InvalidStyleError";}},o(_Class191,"InvalidStyleError"),_Class191);o(QO,"validateHexCode");o(Nfe,"validateNumber");o(Mfe,"validateSizeInPixels");});function Ku(t){return ar(t.trim(),UVe);}function HVe(t){ba.setData({quadrant1Text:Ku(t.text)});}function WVe(t){ba.setData({quadrant2Text:Ku(t.text)});}function qVe(t){ba.setData({quadrant3Text:Ku(t.text)});}function YVe(t){ba.setData({quadrant4Text:Ku(t.text)});}function XVe(t){ba.setData({xAxisLeftText:Ku(t.text)});}function jVe(t){ba.setData({xAxisRightText:Ku(t.text)});}function KVe(t){ba.setData({yAxisTopText:Ku(t.text)});}function QVe(t){ba.setData({yAxisBottomText:Ku(t.text)});}function ZO(t){let e={};for(let r of t){let[n,i]=r.trim().split(/\s*:\s*/);if(n==="radius"){if(Nfe(i))throw new Mp(n,i,"number");e.radius=parseInt(i);}else if(n==="color"){if(QO(i))throw new Mp(n,i,"hex code");e.color=i;}else if(n==="stroke-color"){if(QO(i))throw new Mp(n,i,"hex code");e.strokeColor=i;}else if(n==="stroke-width"){if(Mfe(i))throw new Mp(n,i,"number of pixels (eg. 10px)");e.strokeWidth=i;}else throw new Error(`style named ${n} is not supported.`);}return e;}function ZVe(t,e,r,n,i){let a=ZO(i);ba.addPoints([{x:r,y:n,text:Ku(t.text),className:e,...a}]);}function JVe(t,e){ba.addClass(t,ZO(e));}function eUe(t){ba.setConfig({chartWidth:t});}function tUe(t){ba.setConfig({chartHeight:t});}function rUe(){let t=ge(),{themeVariables:e,quadrantChart:r}=t;return r&&ba.setConfig(r),ba.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),ba.setData({titleText:Rr()}),ba.build();}var UVe,ba,nUe,Ofe,Pfe=N(()=>{"use strict";qt();dr();ci();Rfe();Ife();UVe=ge();o(Ku,"textSanitizer");ba=new MS();o(HVe,"setQuadrant1Text");o(WVe,"setQuadrant2Text");o(qVe,"setQuadrant3Text");o(YVe,"setQuadrant4Text");o(XVe,"setXAxisLeftText");o(jVe,"setXAxisRightText");o(KVe,"setYAxisTopText");o(QVe,"setYAxisBottomText");o(ZO,"parseStyles");o(ZVe,"addPoint");o(JVe,"addClass");o(eUe,"setWidth");o(tUe,"setHeight");o(rUe,"getQuadrantData");nUe=o(function(){ba.clear(),wr();},"clear"),Ofe={setWidth:eUe,setHeight:tUe,setQuadrant1Text:HVe,setQuadrant2Text:WVe,setQuadrant3Text:qVe,setQuadrant4Text:YVe,setXAxisLeftText:XVe,setXAxisRightText:jVe,setYAxisTopText:KVe,setYAxisBottomText:QVe,parseStyles:ZO,addPoint:ZVe,addClass:JVe,getQuadrantData:rUe,clear:nUe,setAccTitle:Cr,getAccTitle:_r,setDiagramTitle:Ir,getDiagramTitle:Rr,getAccDescription:Lr,setAccDescription:Dr};});var iUe,Bfe,Ffe=N(()=>{"use strict";pr();qt();yt();yi();iUe=o((t,e,r,n)=>{var _l$quadrantChart$char,_l$quadrantChart,_l$quadrantChart$char2,_l$quadrantChart2,_l$quadrantChart$useM,_l$quadrantChart3;function i(A){return A==="top"?"hanging":"middle";}o(i,"getDominantBaseLine");function a(A){return A==="left"?"start":"middle";}o(a,"getTextAnchor");function s(A){return`translate(${A.x}, ${A.y}) rotate(${A.rotation||0})`;}o(s,"getTransformation");let l=ge();X.debug(`Rendering quadrant chart
`+t);let u=l.securityLevel,h;u==="sandbox"&&(h=Ge("#i"+e));let d=(u==="sandbox"?Ge(h.nodes()[0].contentDocument.body):Ge("body")).select(`[id="${e}"]`),p=d.append("g").attr("class","main"),m=(_l$quadrantChart$char=(_l$quadrantChart=l.quadrantChart)===null||_l$quadrantChart===void 0?void 0:_l$quadrantChart.chartWidth)!==null&&_l$quadrantChart$char!==void 0?_l$quadrantChart$char:500,g=(_l$quadrantChart$char2=(_l$quadrantChart2=l.quadrantChart)===null||_l$quadrantChart2===void 0?void 0:_l$quadrantChart2.chartHeight)!==null&&_l$quadrantChart$char2!==void 0?_l$quadrantChart$char2:500;hn(d,g,m,(_l$quadrantChart$useM=(_l$quadrantChart3=l.quadrantChart)===null||_l$quadrantChart3===void 0?void 0:_l$quadrantChart3.useMaxWidth)!==null&&_l$quadrantChart$useM!==void 0?_l$quadrantChart$useM:!0),d.attr("viewBox","0 0 "+m+" "+g),n.db.setHeight(g),n.db.setWidth(m);let y=n.db.getQuadrantData(),v=p.append("g").attr("class","quadrants"),x=p.append("g").attr("class","border"),b=p.append("g").attr("class","data-points"),T=p.append("g").attr("class","labels"),C=p.append("g").attr("class","title");y.title&&C.append("text").attr("x",0).attr("y",0).attr("fill",y.title.fill).attr("font-size",y.title.fontSize).attr("dominant-baseline",i(y.title.horizontalPos)).attr("text-anchor",a(y.title.verticalPos)).attr("transform",s(y.title)).text(y.title.text),y.borderLines&&x.selectAll("line").data(y.borderLines).enter().append("line").attr("x1",A=>A.x1).attr("y1",A=>A.y1).attr("x2",A=>A.x2).attr("y2",A=>A.y2).style("stroke",A=>A.strokeFill).style("stroke-width",A=>A.strokeWidth);let w=v.selectAll("g.quadrant").data(y.quadrants).enter().append("g").attr("class","quadrant");w.append("rect").attr("x",A=>A.x).attr("y",A=>A.y).attr("width",A=>A.width).attr("height",A=>A.height).attr("fill",A=>A.fill),w.append("text").attr("x",0).attr("y",0).attr("fill",A=>A.text.fill).attr("font-size",A=>A.text.fontSize).attr("dominant-baseline",A=>i(A.text.horizontalPos)).attr("text-anchor",A=>a(A.text.verticalPos)).attr("transform",A=>s(A.text)).text(A=>A.text.text),T.selectAll("g.label").data(y.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(A=>A.text).attr("fill",A=>A.fill).attr("font-size",A=>A.fontSize).attr("dominant-baseline",A=>i(A.horizontalPos)).attr("text-anchor",A=>a(A.verticalPos)).attr("transform",A=>s(A));let _=b.selectAll("g.data-point").data(y.points).enter().append("g").attr("class","data-point");_.append("circle").attr("cx",A=>A.x).attr("cy",A=>A.y).attr("r",A=>A.radius).attr("fill",A=>A.fill).attr("stroke",A=>A.strokeColor).attr("stroke-width",A=>A.strokeWidth),_.append("text").attr("x",0).attr("y",0).text(A=>A.text.text).attr("fill",A=>A.text.fill).attr("font-size",A=>A.text.fontSize).attr("dominant-baseline",A=>i(A.text.horizontalPos)).attr("text-anchor",A=>a(A.text.verticalPos)).attr("transform",A=>s(A.text));},"draw"),Bfe={draw:iUe};});var $fe={};hr($fe,{diagram:()=>aUe});var aUe,zfe=N(()=>{"use strict";Lfe();Pfe();Ffe();aUe={parser:Dfe,db:Ofe,renderer:Bfe,styles:o(()=>"","styles")};});var JO,Ufe,Hfe=N(()=>{"use strict";JO=function(){var t=o(function(I,M,P,B){for(P=P||{},B=I.length;B--;P[I[B]]=M);return P;},"o"),e=[1,10,12,14,16,18,19,21,23],r=[2,6],n=[1,3],i=[1,5],a=[1,6],s=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],u=[1,25],h=[1,26],f=[1,28],d=[1,29],p=[1,30],m=[1,31],g=[1,32],y=[1,33],v=[1,34],x=[1,35],b=[1,36],T=[1,37],C=[1,43],w=[1,42],E=[1,47],_=[1,50],A=[1,10,12,14,16,18,19,21,23,34,35,36],D=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],O=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],R=[1,64],k={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:o(function(M,P,B,F,z,$,U){var K=$.length-1;switch(z){case 5:F.setOrientation($[K]);break;case 9:F.setDiagramTitle($[K].text.trim());break;case 12:F.setLineData({text:"",type:"text"},$[K]);break;case 13:F.setLineData($[K-1],$[K]);break;case 14:F.setBarData({text:"",type:"text"},$[K]);break;case 15:F.setBarData($[K-1],$[K]);break;case 16:this.$=$[K].trim(),F.setAccTitle(this.$);break;case 17:case 18:this.$=$[K].trim(),F.setAccDescription(this.$);break;case 19:this.$=$[K-1];break;case 20:this.$=[Number($[K-2]),...$[K]];break;case 21:this.$=[Number($[K])];break;case 22:F.setXAxisTitle($[K]);break;case 23:F.setXAxisTitle($[K-1]);break;case 24:F.setXAxisTitle({type:"text",text:""});break;case 25:F.setXAxisBand($[K]);break;case 26:F.setXAxisRangeData(Number($[K-2]),Number($[K]));break;case 27:this.$=$[K-1];break;case 28:this.$=[$[K-2],...$[K]];break;case 29:this.$=[$[K]];break;case 30:F.setYAxisTitle($[K]);break;case 31:F.setYAxisTitle($[K-1]);break;case 32:F.setYAxisTitle({type:"text",text:""});break;case 33:F.setYAxisRangeData(Number($[K-2]),Number($[K]));break;case 37:this.$={text:$[K],type:"text"};break;case 38:this.$={text:$[K],type:"text"};break;case 39:this.$={text:$[K],type:"markdown"};break;case 40:this.$=$[K];break;case 41:this.$=$[K-1]+""+$[K];break;}},"anonymous"),table:[t(e,r,{3:1,4:2,7:4,5:n,34:i,35:a,36:s}),{1:[3]},t(e,r,{4:2,7:4,3:8,5:n,34:i,35:a,36:s}),t(e,r,{4:2,7:4,6:9,3:10,5:n,8:[1,11],34:i,35:a,36:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(l,[2,34]),t(l,[2,35]),t(l,[2,36]),{1:[2,1]},t(e,r,{4:2,7:4,3:21,5:n,34:i,35:a,36:s}),{1:[2,3]},t(l,[2,5]),t(e,[2,7],{4:22,34:i,35:a,36:s}),{11:23,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:T},{11:39,13:38,24:C,27:w,29:40,30:41,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:T},{11:45,15:44,27:E,33:46,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:T},{11:49,17:48,24:_,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:T},{11:52,17:51,24:_,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:T},{20:[1,53]},{22:[1,54]},t(A,[2,18]),{1:[2,2]},t(A,[2,8]),t(A,[2,9]),t(D,[2,37],{40:55,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:T}),t(D,[2,38]),t(D,[2,39]),t(O,[2,40]),t(O,[2,42]),t(O,[2,43]),t(O,[2,44]),t(O,[2,45]),t(O,[2,46]),t(O,[2,47]),t(O,[2,48]),t(O,[2,49]),t(O,[2,50]),t(O,[2,51]),t(A,[2,10]),t(A,[2,22],{30:41,29:56,24:C,27:w}),t(A,[2,24]),t(A,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:T},t(A,[2,11]),t(A,[2,30],{33:60,27:E}),t(A,[2,32]),{31:[1,61]},t(A,[2,12]),{17:62,24:_},{25:63,27:R},t(A,[2,14]),{17:65,24:_},t(A,[2,16]),t(A,[2,17]),t(O,[2,41]),t(A,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(A,[2,31]),{27:[1,69]},t(A,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(A,[2,15]),t(A,[2,26]),t(A,[2,27]),{11:59,32:72,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:T},t(A,[2,33]),t(A,[2,19]),{25:73,27:R},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:o(function(M,P){if(P.recoverable)this.trace(M);else{var B=new Error(M);throw B.hash=P,B;}},"parseError"),parse:o(function(M){var P=this,B=[0],F=[],z=[null],$=[],U=this.table,K="",ee=0,Y=0,ce=0,Z=2,ue=1,Q=$.slice.call(arguments,1),j=Object.create(this.lexer),ne={yy:{}};for(var te in this.yy)Object.prototype.hasOwnProperty.call(this.yy,te)&&(ne.yy[te]=this.yy[te]);j.setInput(M,ne.yy),ne.yy.lexer=j,ne.yy.parser=this,typeof j.yylloc>"u"&&(j.yylloc={});var he=j.yylloc;$.push(he);var le=j.options&&j.options.ranges;typeof ne.yy.parseError=="function"?this.parseError=ne.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function J(ie){B.length=B.length-2*ie,z.length=z.length-ie,$.length=$.length-ie;}o(J,"popStack");function Se(){var ie;return ie=F.pop()||j.lex()||ue,typeof ie!="number"&&(ie instanceof Array&&(F=ie,ie=F.pop()),ie=P.symbols_[ie]||ie),ie;}o(Se,"lex");for(var se,ae,Oe,ye,Be,He,ze={},Le,Ie,xe,q;;){if(Oe=B[B.length-1],this.defaultActions[Oe]?ye=this.defaultActions[Oe]:((se===null||typeof se>"u")&&(se=Se()),ye=U[Oe]&&U[Oe][se]),typeof ye>"u"||!ye.length||!ye[0]){var de="";q=[];for(Le in U[Oe])this.terminals_[Le]&&Le>Z&&q.push("'"+this.terminals_[Le]+"'");j.showPosition?de="Parse error on line "+(ee+1)+`:
`+j.showPosition()+`
Expecting `+q.join(", ")+", got '"+(this.terminals_[se]||se)+"'":de="Parse error on line "+(ee+1)+": Unexpected "+(se==ue?"end of input":"'"+(this.terminals_[se]||se)+"'"),this.parseError(de,{text:j.match,token:this.terminals_[se]||se,line:j.yylineno,loc:he,expected:q});}if(ye[0]instanceof Array&&ye.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Oe+", token: "+se);switch(ye[0]){case 1:B.push(se),z.push(j.yytext),$.push(j.yylloc),B.push(ye[1]),se=null,ae?(se=ae,ae=null):(Y=j.yyleng,K=j.yytext,ee=j.yylineno,he=j.yylloc,ce>0&&ce--);break;case 2:if(Ie=this.productions_[ye[1]][1],ze.$=z[z.length-Ie],ze._$={first_line:$[$.length-(Ie||1)].first_line,last_line:$[$.length-1].last_line,first_column:$[$.length-(Ie||1)].first_column,last_column:$[$.length-1].last_column},le&&(ze._$.range=[$[$.length-(Ie||1)].range[0],$[$.length-1].range[1]]),He=this.performAction.apply(ze,[K,Y,ee,ne.yy,ye[1],z,$].concat(Q)),typeof He<"u")return He;Ie&&(B=B.slice(0,-1*Ie*2),z=z.slice(0,-1*Ie),$=$.slice(0,-1*Ie)),B.push(this.productions_[ye[1]][0]),z.push(ze.$),$.push(ze._$),xe=U[B[B.length-2]][B[B.length-1]],B.push(xe);break;case 3:return!0;}}return!0;},"parse")},L=function(){var I={EOF:1,parseError:o(function(P,B){if(this.yy.parser)this.yy.parser.parseError(P,B);else throw new Error(P);},"parseError"),setInput:o(function(M,P){return this.yy=P||this.yy||{},this._input=M,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var M=this._input[0];this.yytext+=M,this.yyleng++,this.offset++,this.match+=M,this.matched+=M;var P=M.match(/(?:\r\n?|\n).*/g);return P?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),M;},"input"),unput:o(function(M){var P=M.length,B=M.split(/(?:\r\n?|\n)/g);this._input=M+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-P),this.offset-=P;var F=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),B.length-1&&(this.yylineno-=B.length-1);var z=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:B?(B.length===F.length?this.yylloc.first_column:0)+F[F.length-B.length].length-B[0].length:this.yylloc.first_column-P},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-P]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(M){this.unput(this.match.slice(M));},"less"),pastInput:o(function(){var M=this.matched.substr(0,this.matched.length-this.match.length);return(M.length>20?"...":"")+M.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var M=this.match;return M.length<20&&(M+=this._input.substr(0,20-M.length)),(M.substr(0,20)+(M.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var M=this.pastInput(),P=new Array(M.length+1).join("-");return M+this.upcomingInput()+`
`+P+"^";},"showPosition"),test_match:o(function(M,P){var B,F,z;if(this.options.backtrack_lexer&&(z={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(z.yylloc.range=this.yylloc.range.slice(0))),F=M[0].match(/(?:\r\n?|\n).*/g),F&&(this.yylineno+=F.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:F?F[F.length-1].length-F[F.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+M[0].length},this.yytext+=M[0],this.match+=M[0],this.matches=M,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(M[0].length),this.matched+=M[0],B=this.performAction.call(this,this.yy,this,P,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),B)return B;if(this._backtrack){for(var $ in z)this[$]=z[$];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var M,P,B,F;this._more||(this.yytext="",this.match="");for(var z=this._currentRules(),$=0;$<z.length;$++)if(B=this._input.match(this.rules[z[$]]),B&&(!P||B[0].length>P[0].length)){if(P=B,F=$,this.options.backtrack_lexer){if(M=this.test_match(B,z[$]),M!==!1)return M;if(this._backtrack){P=!1;continue;}else return!1;}else if(!this.options.flex)break;}return P?(M=this.test_match(P,z[F]),M!==!1?M:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var P=this.next();return P||this.lex();},"lex"),begin:o(function(P){this.conditionStack.push(P);},"begin"),popState:o(function(){var P=this.conditionStack.length-1;return P>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function(P){return P=this.conditionStack.length-1-Math.abs(P||0),P>=0?this.conditionStack[P]:"INITIAL";},"topState"),pushState:o(function(P){this.begin(P);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(P,B,F,z){var $=z;switch(F){case 0:break;case 1:break;case 2:return this.popState(),34;break;case 3:return this.popState(),34;break;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 31;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 27;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36;}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\)                                    \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+                  \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return I;}();k.lexer=L;function S(){this.yy={};}return o(S,"Parser"),S.prototype=k,k.Parser=S,new S();}();JO.parser=JO;Ufe=JO;});function eP(t){return t.type==="bar";}function IS(t){return t.type==="band";}function A1(t){return t.type==="linear";}var OS=N(()=>{"use strict";o(eP,"isBarPlot");o(IS,"isBandAxisData");o(A1,"isLinearAxisData");});var _1,tP=N(()=>{"use strict";var _Class192;no();_1=(_Class192=class _1{constructor(e){this.parentGroup=e;}getMaxDimension(e,r){if(!this.parentGroup)return{width:e.reduce((a,s)=>Math.max(s.length,a),0)*r,height:r};let n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",r);for(let a of e){let s=TQ(i,1,a),l=s?s.width:a.length*r,u=s?s.height:r;n.width=Math.max(n.width,l),n.height=Math.max(n.height,u);}return i.remove(),n;}},o(_Class192,"TextDimensionCalculatorWithFont"),_Class192);});var D1,rP=N(()=>{"use strict";var _Class193;D1=(_Class193=class D1{constructor(e,r,n,i){this.axisConfig=e;this.title=r;this.textDimensionCalculator=n;this.axisThemeConfig=i;this.boundingRect={x:0,y:0,width:0,height:0};this.axisPosition="left";this.showTitle=!1;this.showLabel=!1;this.showTick=!1;this.showAxisLine=!1;this.outerPadding=0;this.titleTextHeight=0;this.labelTextHeight=0;this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left";}setRange(e){this.range=e,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale();}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding];}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range);}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length;}getAxisOuterPadding(){return this.outerPadding;}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize);}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale();}calculateSpaceIfDrawnHorizontally(e){let r=e.height;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=.2*e.width;this.outerPadding=Math.min(n.width/2,i);let a=n.height+this.axisConfig.labelPadding*2;this.labelTextHeight=n.height,a<=r&&(r-=a,this.showLabel=!0);}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0);}this.boundingRect.width=e.width,this.boundingRect.height=e.height-r;}calculateSpaceIfDrawnVertical(e){let r=e.width;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=.2*e.height;this.outerPadding=Math.min(n.height/2,i);let a=n.width+this.axisConfig.labelPadding*2;a<=r&&(r-=a,this.showLabel=!0);}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0);}this.boundingRect.width=e.width-r,this.boundingRect.height=e.height;}calculateSpace(e){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height};}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y;}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${r},${this.boundingRect.y} L ${r},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]});}if(this.showLabel&&e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(r),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let r=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${r},${this.getScaleValue(n)} L ${r-this.axisConfig.tickLength},${this.getScaleValue(n)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))});}return this.showTitle&&e.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),e;}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]});}if(this.showLabel&&e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r} L ${this.getScaleValue(n)},${r+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))});}return this.showTitle&&e.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e;}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]});}if(this.showLabel&&e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(n)},${r+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))});}return this.showTitle&&e.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e;}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[];}},o(_Class193,"BaseAxis"),_Class193);});var PS,Wfe=N(()=>{"use strict";var _Class194;pr();yt();rP();PS=(_Class194=class PS extends D1{constructor(e,r,n,i,a){super(e,i,a,r),this.categories=n,this.scale=B0().domain(this.categories).range(this.getRange());}setRange(e){super.setRange(e);}recalculateScale(){this.scale=B0().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),X.trace("BandAxis axis final categories, range: ",this.categories,this.getRange());}getTickValues(){return this.categories;}getScaleValue(e){var _this$scale;return(_this$scale=this.scale(e))!==null&&_this$scale!==void 0?_this$scale:this.getRange()[0];}},o(_Class194,"BandAxis"),_Class194);});var BS,qfe=N(()=>{"use strict";var _Class195;pr();rP();BS=(_Class195=class BS extends D1{constructor(e,r,n,i,a){super(e,i,a,r),this.domain=n,this.scale=xl().domain(this.domain).range(this.getRange());}getTickValues(){return this.scale.ticks();}recalculateScale(){let e=[...this.domain];this.axisPosition==="left"&&e.reverse(),this.scale=xl().domain(e).range(this.getRange());}getScaleValue(e){return this.scale(e);}},o(_Class195,"LinearAxis"),_Class195);});function nP(t,e,r,n){let i=new _1(n);return IS(t)?new PS(e,r,t.categories,t.title,i):new BS(e,r,[t.min,t.max],t.title,i);}var Yfe=N(()=>{"use strict";OS();tP();Wfe();qfe();o(nP,"getAxis");});function Xfe(t,e,r,n){let i=new _1(n);return new iP(i,t,e,r);}var iP,jfe=N(()=>{"use strict";var _Class196;tP();iP=(_Class196=class iP{constructor(e,r,n,i){this.textDimensionCalculator=e;this.chartConfig=r;this.chartData=n;this.chartThemeConfig=i;this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1;}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y;}calculateSpace(e){let r=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(r.width,e.width),i=r.height+2*this.chartConfig.titlePadding;return r.width<=n&&r.height<=i&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=i,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height};}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e;}},o(_Class196,"ChartTitle"),_Class196);o(Xfe,"getChartTitleComponent");});var FS,Kfe=N(()=>{"use strict";var _Class197;pr();FS=(_Class197=class FS{constructor(e,r,n,i,a){this.plotData=e;this.xAxis=r;this.yAxis=n;this.orientation=i;this.plotIndex=a;}getDrawableElement(){let e=this.plotData.data.map(n=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),r;return this.orientation==="horizontal"?r=El().y(n=>n[0]).x(n=>n[1])(e):r=El().x(n=>n[0]).y(n=>n[1])(e),r?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:r,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[];}},o(_Class197,"LinePlot"),_Class197);});var $S,Qfe=N(()=>{"use strict";var _Class198;$S=(_Class198=class $S{constructor(e,r,n,i,a,s){this.barData=e;this.boundingRect=r;this.xAxis=n;this.yAxis=i;this.orientation=a;this.plotIndex=s;}getDrawableElement(){let e=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),n=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),i=n/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(a=>({x:this.boundingRect.x,y:a[0]-i,height:n,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(a=>({x:a[0]-i,y:a[1],width:n,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}];}},o(_Class198,"BarPlot"),_Class198);});function Zfe(t,e,r){return new aP(t,e,r);}var aP,Jfe=N(()=>{"use strict";var _Class199;Kfe();Qfe();aP=(_Class199=class aP{constructor(e,r,n){this.chartConfig=e;this.chartData=r;this.chartThemeConfig=n;this.boundingRect={x:0,y:0,width:0,height:0};}setAxes(e,r){this.xAxis=e,this.yAxis=r;}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y;}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height};}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[r,n]of this.chartData.plots.entries())switch(n.type){case"line":{let i=new FS(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);e.push(...i.getDrawableElement());}break;case"bar":{let i=new $S(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);e.push(...i.getDrawableElement());}break;}return e;}},o(_Class199,"BasePlot"),_Class199);o(Zfe,"getPlotComponent");});var zS,ede=N(()=>{"use strict";var _Class200;Yfe();jfe();Jfe();OS();zS=(_Class200=class zS{constructor(e,r,n,i){this.chartConfig=e;this.chartData=r;this.componentStore={title:Xfe(e,r,n,i),plot:Zfe(e,r,n),xAxis:nP(r.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},i),yAxis:nP(r.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},i)};}calculateVerticalSpace(){let e=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),l=this.componentStore.plot.calculateSpace({width:a,height:s});e-=l.width,r-=l.height,l=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),i=l.height,r-=l.height,this.componentStore.xAxis.setAxisPosition("bottom"),l=this.componentStore.xAxis.calculateSpace({width:e,height:r}),r-=l.height,this.componentStore.yAxis.setAxisPosition("left"),l=this.componentStore.yAxis.calculateSpace({width:e,height:r}),n=l.width,e-=l.width,e>0&&(a+=e,e=0),r>0&&(s+=r,r=0),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.xAxis.setRange([n,n+a]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:i+s}),this.componentStore.yAxis.setRange([i,i+s]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(u=>eP(u))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();}calculateHorizontalSpace(){let e=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,a=0,s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),u=this.componentStore.plot.calculateSpace({width:s,height:l});e-=u.width,r-=u.height,u=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),n=u.height,r-=u.height,this.componentStore.xAxis.setAxisPosition("left"),u=this.componentStore.xAxis.calculateSpace({width:e,height:r}),e-=u.width,i=u.width,this.componentStore.yAxis.setAxisPosition("top"),u=this.componentStore.yAxis.calculateSpace({width:e,height:r}),r-=u.height,a=n+u.height,e>0&&(s+=e,e=0),r>0&&(l+=r,r=0),this.componentStore.plot.calculateSpace({width:s,height:l}),this.componentStore.plot.setBoundingBoxXY({x:i,y:a}),this.componentStore.yAxis.setRange([i,i+s]),this.componentStore.yAxis.setBoundingBoxXY({x:i,y:n}),this.componentStore.xAxis.setRange([a,a+l]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(h=>eP(h))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace();}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let r of Object.values(this.componentStore))e.push(...r.getDrawableElements());return e;}},o(_Class200,"Orchestrator"),_Class200);});var GS,tde=N(()=>{"use strict";var _Class201;ede();GS=(_Class201=class GS{static build(e,r,n,i){return new zS(e,r,n,i).getDrawableElement();}},o(_Class201,"XYChartBuilder"),_Class201);});function nde(){let t=ch(),e=Qt();return Fn(t.xyChart,e.themeVariables.xyChart);}function ide(){let t=Qt();return Fn(lr.xyChart,t.xyChart);}function ade(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]};}function lP(t){let e=Qt();return ar(t.trim(),e);}function cUe(t){rde=t;}function uUe(t){t==="horizontal"?Lb.chartOrientation="horizontal":Lb.chartOrientation="vertical";}function hUe(t){ln.xAxis.title=lP(t.text);}function sde(t,e){ln.xAxis={type:"linear",title:ln.xAxis.title,min:t,max:e},VS=!0;}function fUe(t){ln.xAxis={type:"band",title:ln.xAxis.title,categories:t.map(e=>lP(e.text))},VS=!0;}function dUe(t){ln.yAxis.title=lP(t.text);}function pUe(t,e){ln.yAxis={type:"linear",title:ln.yAxis.title,min:t,max:e},oP=!0;}function mUe(t){let e=Math.min(...t),r=Math.max(...t),n=A1(ln.yAxis)?ln.yAxis.min:1/0,i=A1(ln.yAxis)?ln.yAxis.max:-1/0;ln.yAxis={type:"linear",title:ln.yAxis.title,min:Math.min(n,e),max:Math.max(i,r)};}function ode(t){let e=[];if(t.length===0)return e;if(!VS){let r=A1(ln.xAxis)?ln.xAxis.min:1/0,n=A1(ln.xAxis)?ln.xAxis.max:-1/0;sde(Math.min(r,1),Math.max(n,t.length));}if(oP||mUe(t),IS(ln.xAxis)&&(e=ln.xAxis.categories.map((r,n)=>[r,t[n]])),A1(ln.xAxis)){let r=ln.xAxis.min,n=ln.xAxis.max,i=(n-r)/(t.length-1),a=[];for(let s=r;s<=n;s+=i)a.push(`${s}`);e=a.map((s,l)=>[s,t[l]]);}return e;}function lde(t){return sP[t===0?0:t%sP.length];}function gUe(t,e){let r=ode(e);ln.plots.push({type:"line",strokeFill:lde(Db),strokeWidth:2,data:r}),Db++;}function yUe(t,e){let r=ode(e);ln.plots.push({type:"bar",fill:lde(Db),data:r}),Db++;}function vUe(){if(ln.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return ln.title=Rr(),GS.build(Lb,ln,Rb,rde);}function xUe(){return Rb;}function bUe(){return Lb;}function TUe(){return ln;}var Db,rde,Lb,Rb,ln,sP,VS,oP,wUe,cde,ude=N(()=>{"use strict";Jn();Ca();Ny();nr();dr();ci();tde();OS();Db=0,Lb=ide(),Rb=nde(),ln=ade(),sP=Rb.plotColorPalette.split(",").map(t=>t.trim()),VS=!1,oP=!1;o(nde,"getChartDefaultThemeConfig");o(ide,"getChartDefaultConfig");o(ade,"getChartDefaultData");o(lP,"textSanitizer");o(cUe,"setTmpSVGG");o(uUe,"setOrientation");o(hUe,"setXAxisTitle");o(sde,"setXAxisRangeData");o(fUe,"setXAxisBand");o(dUe,"setYAxisTitle");o(pUe,"setYAxisRangeData");o(mUe,"setYAxisRangeFromPlotData");o(ode,"transformDataWithoutCategory");o(lde,"getPlotColorFromPalette");o(gUe,"setLineData");o(yUe,"setBarData");o(vUe,"getDrawableElem");o(xUe,"getChartThemeConfig");o(bUe,"getChartConfig");o(TUe,"getXYChartData");wUe=o(function(){wr(),Db=0,Lb=ide(),ln=ade(),Rb=nde(),sP=Rb.plotColorPalette.split(",").map(t=>t.trim()),VS=!1,oP=!1;},"clear"),cde={getDrawableElem:vUe,clear:wUe,setAccTitle:Cr,getAccTitle:_r,setDiagramTitle:Ir,getDiagramTitle:Rr,getAccDescription:Lr,setAccDescription:Dr,setOrientation:uUe,setXAxisTitle:hUe,setXAxisRangeData:sde,setXAxisBand:fUe,setYAxisTitle:dUe,setYAxisRangeData:pUe,setLineData:gUe,setBarData:yUe,setTmpSVGG:cUe,getChartThemeConfig:xUe,getChartConfig:bUe,getXYChartData:TUe};});var kUe,hde,fde=N(()=>{"use strict";yt();zl();yi();kUe=o((t,e,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),s=i.getChartConfig(),l=i.getXYChartData().plots[0].data.map(T=>T[1]);function u(T){return T==="top"?"text-before-edge":"middle";}o(u,"getDominantBaseLine");function h(T){return T==="left"?"start":T==="right"?"end":"middle";}o(h,"getTextAnchor");function f(T){return`translate(${T.x}, ${T.y}) rotate(${T.rotation||0})`;}o(f,"getTextTransformation"),X.debug(`Rendering xychart chart
`+t);let d=Di(e),p=d.append("g").attr("class","main"),m=p.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background");hn(d,s.height,s.width,!0),d.attr("viewBox",`0 0 ${s.width} ${s.height}`),m.attr("fill",a.backgroundColor),i.setTmpSVGG(d.append("g").attr("class","mermaid-tmp-group"));let g=i.getDrawableElem(),y={};function v(T){let C=p,w="";for(let[E]of T.entries()){let _=p;E>0&&y[w]&&(_=y[w]),w+=T[E],C=y[w],C||(C=y[w]=_.append("g").attr("class",T[E]));}return C;}o(v,"getGroup");for(let T of g){if(T.data.length===0)continue;let C=v(T.groupTexts);switch(T.type){case"rect":if(C.selectAll("rect").data(T.data).enter().append("rect").attr("x",w=>w.x).attr("y",w=>w.y).attr("width",w=>w.width).attr("height",w=>w.height).attr("fill",w=>w.fill).attr("stroke",w=>w.strokeFill).attr("stroke-width",w=>w.strokeWidth),s.showDataLabel)if(s.chartOrientation==="horizontal"){let _=function(O,R){let{data:k,label:L}=O;return R*L.length*.7<=k.width-10;};var x=_;o(_,"fitsHorizontally");let w=.7,E=T.data.map((O,R)=>({data:O,label:l[R].toString()})).filter(O=>O.data.width>0&&O.data.height>0),A=E.map(O=>{let{data:R}=O,k=R.height*.7;for(;!_(O,k)&&k>0;)k-=1;return k;}),D=Math.floor(Math.min(...A));C.selectAll("text").data(E).enter().append("text").attr("x",O=>O.data.x+O.data.width-10).attr("y",O=>O.data.y+O.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${D}px`).text(O=>O.label);}else{let _=function(O,R,k){let{data:L,label:S}=O,M=R*S.length*.7,P=L.x+L.width/2,B=P-M/2,F=P+M/2,z=B>=L.x&&F<=L.x+L.width,$=L.y+k+R<=L.y+L.height;return z&&$;};var b=_;o(_,"fitsInBar");let w=10,E=T.data.map((O,R)=>({data:O,label:l[R].toString()})).filter(O=>O.data.width>0&&O.data.height>0),A=E.map(O=>{let{data:R,label:k}=O,L=R.width/(k.length*.7);for(;!_(O,L,10)&&L>0;)L-=1;return L;}),D=Math.floor(Math.min(...A));C.selectAll("text").data(E).enter().append("text").attr("x",O=>O.data.x+O.data.width/2).attr("y",O=>O.data.y+10).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",`${D}px`).text(O=>O.label);}break;case"text":C.selectAll("text").data(T.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",w=>w.fill).attr("font-size",w=>w.fontSize).attr("dominant-baseline",w=>u(w.verticalPos)).attr("text-anchor",w=>h(w.horizontalPos)).attr("transform",w=>f(w)).text(w=>w.text);break;case"path":C.selectAll("path").data(T.data).enter().append("path").attr("d",w=>w.path).attr("fill",w=>w.fill?w.fill:"none").attr("stroke",w=>w.strokeFill).attr("stroke-width",w=>w.strokeWidth);break;}}},"draw"),hde={draw:kUe};});var dde={};hr(dde,{diagram:()=>EUe});var EUe,pde=N(()=>{"use strict";Hfe();ude();fde();EUe={parser:Ufe,db:cde,renderer:hde};});var cP,yde,vde=N(()=>{"use strict";cP=function(){var t=o(function(ie,oe,V,Te){for(V=V||{},Te=ie.length;Te--;V[ie[Te]]=oe);return V;},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],l=[2,7],u=[1,26],h=[1,27],f=[1,28],d=[1,29],p=[1,33],m=[1,34],g=[1,35],y=[1,36],v=[1,37],x=[1,38],b=[1,24],T=[1,31],C=[1,32],w=[1,30],E=[1,39],_=[1,40],A=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],D=[1,61],O=[89,90],R=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],L=[1,70],S=[1,71],I=[1,72],M=[1,73],P=[1,74],B=[1,75],F=[1,76],z=[1,83],$=[1,80],U=[1,84],K=[1,85],ee=[1,86],Y=[1,87],ce=[1,88],Z=[1,89],ue=[1,90],Q=[1,91],j=[1,92],ne=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],te=[63,64],he=[1,101],le=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],J=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Se=[1,110],se=[1,106],ae=[1,107],Oe=[1,108],ye=[1,109],Be=[1,111],He=[1,116],ze=[1,117],Le=[1,114],Ie=[1,115],xe={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:o(function(oe,V,Te,W,pe,ve,Pe){var _e=ve.length-1;switch(pe){case 4:this.$=ve[_e].trim(),W.setAccTitle(this.$);break;case 5:case 6:this.$=ve[_e].trim(),W.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:W.setDirection("TB");break;case 18:W.setDirection("BT");break;case 19:W.setDirection("RL");break;case 20:W.setDirection("LR");break;case 21:W.addRequirement(ve[_e-3],ve[_e-4]);break;case 22:W.addRequirement(ve[_e-5],ve[_e-6]),W.setClass([ve[_e-5]],ve[_e-3]);break;case 23:W.setNewReqId(ve[_e-2]);break;case 24:W.setNewReqText(ve[_e-2]);break;case 25:W.setNewReqRisk(ve[_e-2]);break;case 26:W.setNewReqVerifyMethod(ve[_e-2]);break;case 29:this.$=W.RequirementType.REQUIREMENT;break;case 30:this.$=W.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=W.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=W.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=W.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=W.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=W.RiskLevel.LOW_RISK;break;case 36:this.$=W.RiskLevel.MED_RISK;break;case 37:this.$=W.RiskLevel.HIGH_RISK;break;case 38:this.$=W.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=W.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=W.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=W.VerifyType.VERIFY_TEST;break;case 42:W.addElement(ve[_e-3]);break;case 43:W.addElement(ve[_e-5]),W.setClass([ve[_e-5]],ve[_e-3]);break;case 44:W.setNewElementType(ve[_e-2]);break;case 45:W.setNewElementDocRef(ve[_e-2]);break;case 48:W.addRelationship(ve[_e-2],ve[_e],ve[_e-4]);break;case 49:W.addRelationship(ve[_e-2],ve[_e-4],ve[_e]);break;case 50:this.$=W.Relationships.CONTAINS;break;case 51:this.$=W.Relationships.COPIES;break;case 52:this.$=W.Relationships.DERIVES;break;case 53:this.$=W.Relationships.SATISFIES;break;case 54:this.$=W.Relationships.VERIFIES;break;case 55:this.$=W.Relationships.REFINES;break;case 56:this.$=W.Relationships.TRACES;break;case 57:this.$=ve[_e-2],W.defineClass(ve[_e-1],ve[_e]);break;case 58:W.setClass(ve[_e-1],ve[_e]);break;case 59:W.setClass([ve[_e-2]],ve[_e]);break;case 60:case 62:this.$=[ve[_e]];break;case 61:case 63:this.$=ve[_e-2].concat([ve[_e]]);break;case 64:this.$=ve[_e-2],W.setCssStyle(ve[_e-1],ve[_e]);break;case 65:this.$=[ve[_e]];break;case 66:ve[_e-2].push(ve[_e]),this.$=ve[_e-2];break;case 68:this.$=ve[_e-1]+ve[_e];break;}},"anonymous"),table:[{3:1,4:2,6:e,9:r,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(a,[2,6]),{3:12,4:2,6:e,9:r,11:n,13:i},{1:[2,2]},{4:17,5:s,7:13,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:C,77:w,89:E,90:_},t(a,[2,4]),t(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:C,77:w,89:E,90:_},{4:17,5:s,7:43,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:C,77:w,89:E,90:_},{4:17,5:s,7:44,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:C,77:w,89:E,90:_},{4:17,5:s,7:45,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:C,77:w,89:E,90:_},{4:17,5:s,7:46,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:C,77:w,89:E,90:_},{4:17,5:s,7:47,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:C,77:w,89:E,90:_},{4:17,5:s,7:48,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:C,77:w,89:E,90:_},{4:17,5:s,7:49,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:C,77:w,89:E,90:_},{4:17,5:s,7:50,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:C,77:w,89:E,90:_},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(A,[2,17]),t(A,[2,18]),t(A,[2,19]),t(A,[2,20]),{30:60,33:62,75:D,89:E,90:_},{30:63,33:62,75:D,89:E,90:_},{30:64,33:62,75:D,89:E,90:_},t(O,[2,29]),t(O,[2,30]),t(O,[2,31]),t(O,[2,32]),t(O,[2,33]),t(O,[2,34]),t(R,[2,81]),t(R,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(k,[2,79]),t(k,[2,80]),{27:[1,67],29:[1,68]},t(k,[2,85]),t(k,[2,86]),{62:69,65:L,66:S,67:I,68:M,69:P,70:B,71:F},{62:77,65:L,66:S,67:I,68:M,69:P,70:B,71:F},{30:78,33:62,75:D,89:E,90:_},{73:79,75:z,76:$,78:81,79:82,80:U,81:K,82:ee,83:Y,84:ce,85:Z,86:ue,87:Q,88:j},t(ne,[2,60]),t(ne,[2,62]),{73:93,75:z,76:$,78:81,79:82,80:U,81:K,82:ee,83:Y,84:ce,85:Z,86:ue,87:Q,88:j},{30:94,33:62,75:D,76:$,89:E,90:_},{5:[1,95]},{30:96,33:62,75:D,89:E,90:_},{5:[1,97]},{30:98,33:62,75:D,89:E,90:_},{63:[1,99]},t(te,[2,50]),t(te,[2,51]),t(te,[2,52]),t(te,[2,53]),t(te,[2,54]),t(te,[2,55]),t(te,[2,56]),{64:[1,100]},t(A,[2,59],{76:$}),t(A,[2,64],{76:he}),{33:103,75:[1,102],89:E,90:_},t(le,[2,65],{79:104,75:z,80:U,81:K,82:ee,83:Y,84:ce,85:Z,86:ue,87:Q,88:j}),t(J,[2,67]),t(J,[2,69]),t(J,[2,70]),t(J,[2,71]),t(J,[2,72]),t(J,[2,73]),t(J,[2,74]),t(J,[2,75]),t(J,[2,76]),t(J,[2,77]),t(J,[2,78]),t(A,[2,57],{76:he}),t(A,[2,58],{76:$}),{5:Se,28:105,31:se,34:ae,36:Oe,38:ye,40:Be},{27:[1,112],76:$},{5:He,40:ze,56:113,57:Le,59:Ie},{27:[1,118],76:$},{33:119,89:E,90:_},{33:120,89:E,90:_},{75:z,78:121,79:82,80:U,81:K,82:ee,83:Y,84:ce,85:Z,86:ue,87:Q,88:j},t(ne,[2,61]),t(ne,[2,63]),t(J,[2,68]),t(A,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Se,28:126,31:se,34:ae,36:Oe,38:ye,40:Be},t(A,[2,28]),{5:[1,127]},t(A,[2,42]),{32:[1,128]},{32:[1,129]},{5:He,40:ze,56:130,57:Le,59:Ie},t(A,[2,47]),{5:[1,131]},t(A,[2,48]),t(A,[2,49]),t(le,[2,66],{79:104,75:z,80:U,81:K,82:ee,83:Y,84:ce,85:Z,86:ue,87:Q,88:j}),{33:132,89:E,90:_},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(A,[2,27]),{5:Se,28:145,31:se,34:ae,36:Oe,38:ye,40:Be},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(A,[2,46]),{5:He,40:ze,56:152,57:Le,59:Ie},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(A,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(A,[2,43]),{5:Se,28:159,31:se,34:ae,36:Oe,38:ye,40:Be},{5:Se,28:160,31:se,34:ae,36:Oe,38:ye,40:Be},{5:Se,28:161,31:se,34:ae,36:Oe,38:ye,40:Be},{5:Se,28:162,31:se,34:ae,36:Oe,38:ye,40:Be},{5:He,40:ze,56:163,57:Le,59:Ie},{5:He,40:ze,56:164,57:Le,59:Ie},t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,44]),t(A,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:o(function(oe,V){if(V.recoverable)this.trace(oe);else{var Te=new Error(oe);throw Te.hash=V,Te;}},"parseError"),parse:o(function(oe){var V=this,Te=[0],W=[],pe=[null],ve=[],Pe=this.table,_e="",be=0,Ve=0,De=0,Ye=2,at=1,Rt=ve.slice.call(arguments,1),st=Object.create(this.lexer),Ue={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(Ue.yy[ut]=this.yy[ut]);st.setInput(oe,Ue.yy),Ue.yy.lexer=st,Ue.yy.parser=this,typeof st.yylloc>"u"&&(st.yylloc={});var We=st.yylloc;ve.push(We);var lt=st.options&&st.options.ranges;typeof Ue.yy.parseError=="function"?this.parseError=Ue.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Xt(Mr){Te.length=Te.length-2*Mr,pe.length=pe.length-Mr,ve.length=ve.length-Mr;}o(Xt,"popStack");function Tt(){var Mr;return Mr=W.pop()||st.lex()||at,typeof Mr!="number"&&(Mr instanceof Array&&(W=Mr,Mr=W.pop()),Mr=V.symbols_[Mr]||Mr),Mr;}o(Tt,"lex");for(var Mt,bt,ht,St,ft,vt,nt={},dn,kt,In,en;;){if(ht=Te[Te.length-1],this.defaultActions[ht]?St=this.defaultActions[ht]:((Mt===null||typeof Mt>"u")&&(Mt=Tt()),St=Pe[ht]&&Pe[ht][Mt]),typeof St>"u"||!St.length||!St[0]){var Nr="";en=[];for(dn in Pe[ht])this.terminals_[dn]&&dn>Ye&&en.push("'"+this.terminals_[dn]+"'");st.showPosition?Nr="Parse error on line "+(be+1)+`:
`+st.showPosition()+`
Expecting `+en.join(", ")+", got '"+(this.terminals_[Mt]||Mt)+"'":Nr="Parse error on line "+(be+1)+": Unexpected "+(Mt==at?"end of input":"'"+(this.terminals_[Mt]||Mt)+"'"),this.parseError(Nr,{text:st.match,token:this.terminals_[Mt]||Mt,line:st.yylineno,loc:We,expected:en});}if(St[0]instanceof Array&&St.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ht+", token: "+Mt);switch(St[0]){case 1:Te.push(Mt),pe.push(st.yytext),ve.push(st.yylloc),Te.push(St[1]),Mt=null,bt?(Mt=bt,bt=null):(Ve=st.yyleng,_e=st.yytext,be=st.yylineno,We=st.yylloc,De>0&&De--);break;case 2:if(kt=this.productions_[St[1]][1],nt.$=pe[pe.length-kt],nt._$={first_line:ve[ve.length-(kt||1)].first_line,last_line:ve[ve.length-1].last_line,first_column:ve[ve.length-(kt||1)].first_column,last_column:ve[ve.length-1].last_column},lt&&(nt._$.range=[ve[ve.length-(kt||1)].range[0],ve[ve.length-1].range[1]]),vt=this.performAction.apply(nt,[_e,Ve,be,Ue.yy,St[1],pe,ve].concat(Rt)),typeof vt<"u")return vt;kt&&(Te=Te.slice(0,-1*kt*2),pe=pe.slice(0,-1*kt),ve=ve.slice(0,-1*kt)),Te.push(this.productions_[St[1]][0]),pe.push(nt.$),ve.push(nt._$),In=Pe[Te[Te.length-2]][Te[Te.length-1]],Te.push(In);break;case 3:return!0;}}return!0;},"parse")},q=function(){var ie={EOF:1,parseError:o(function(V,Te){if(this.yy.parser)this.yy.parser.parseError(V,Te);else throw new Error(V);},"parseError"),setInput:o(function(oe,V){return this.yy=V||this.yy||{},this._input=oe,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var oe=this._input[0];this.yytext+=oe,this.yyleng++,this.offset++,this.match+=oe,this.matched+=oe;var V=oe.match(/(?:\r\n?|\n).*/g);return V?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),oe;},"input"),unput:o(function(oe){var V=oe.length,Te=oe.split(/(?:\r\n?|\n)/g);this._input=oe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-V),this.offset-=V;var W=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Te.length-1&&(this.yylineno-=Te.length-1);var pe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Te?(Te.length===W.length?this.yylloc.first_column:0)+W[W.length-Te.length].length-Te[0].length:this.yylloc.first_column-V},this.options.ranges&&(this.yylloc.range=[pe[0],pe[0]+this.yyleng-V]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(oe){this.unput(this.match.slice(oe));},"less"),pastInput:o(function(){var oe=this.matched.substr(0,this.matched.length-this.match.length);return(oe.length>20?"...":"")+oe.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var oe=this.match;return oe.length<20&&(oe+=this._input.substr(0,20-oe.length)),(oe.substr(0,20)+(oe.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var oe=this.pastInput(),V=new Array(oe.length+1).join("-");return oe+this.upcomingInput()+`
`+V+"^";},"showPosition"),test_match:o(function(oe,V){var Te,W,pe;if(this.options.backtrack_lexer&&(pe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(pe.yylloc.range=this.yylloc.range.slice(0))),W=oe[0].match(/(?:\r\n?|\n).*/g),W&&(this.yylineno+=W.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:W?W[W.length-1].length-W[W.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+oe[0].length},this.yytext+=oe[0],this.match+=oe[0],this.matches=oe,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(oe[0].length),this.matched+=oe[0],Te=this.performAction.call(this,this.yy,this,V,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Te)return Te;if(this._backtrack){for(var ve in pe)this[ve]=pe[ve];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var oe,V,Te,W;this._more||(this.yytext="",this.match="");for(var pe=this._currentRules(),ve=0;ve<pe.length;ve++)if(Te=this._input.match(this.rules[pe[ve]]),Te&&(!V||Te[0].length>V[0].length)){if(V=Te,W=ve,this.options.backtrack_lexer){if(oe=this.test_match(Te,pe[ve]),oe!==!1)return oe;if(this._backtrack){V=!1;continue;}else return!1;}else if(!this.options.flex)break;}return V?(oe=this.test_match(V,pe[W]),oe!==!1?oe:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var V=this.next();return V||this.lex();},"lex"),begin:o(function(V){this.conditionStack.push(V);},"begin"),popState:o(function(){var V=this.conditionStack.length-1;return V>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function(V){return V=this.conditionStack.length-1-Math.abs(V||0),V>=0?this.conditionStack[V]:"INITIAL";},"topState"),pushState:o(function(V){this.begin(V);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(V,Te,W,pe){var ve=pe;switch(W){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return Te.yytext=Te.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76;}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return ie;}();xe.lexer=q;function de(){this.yy={};}return o(de,"Parser"),de.prototype=xe,xe.Parser=de,new de();}();cP.parser=cP;yde=cP;});var US,xde=N(()=>{"use strict";var _Class202;qt();yt();ci();US=(_Class202=class US{constructor(){this.relations=[];this.latestRequirement=this.getInitialRequirement();this.requirements=new Map();this.latestElement=this.getInitialElement();this.elements=new Map();this.classes=new Map();this.direction="TB";this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"};this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"};this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"};this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"};this.setAccTitle=Cr;this.getAccTitle=_r;this.setAccDescription=Dr;this.getAccDescription=Lr;this.setDiagramTitle=Ir;this.getDiagramTitle=Rr;this.getConfig=o(()=>ge().requirement,"getConfig");this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this);}getDirection(){return this.direction;}setDirection(e){this.direction=e;}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement();}resetLatestElement(){this.latestElement=this.getInitialElement();}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]};}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]};}addRequirement(e,r){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:r,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e);}getRequirements(){return this.requirements;}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e);}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e);}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e);}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e);}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),X.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e);}getElements(){return this.elements;}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e);}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e);}addRelationship(e,r,n){this.relations.push({type:e,src:r,dst:n});}getRelationships(){return this.relations;}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map(),this.resetLatestElement(),this.elements=new Map(),this.classes=new Map(),wr();}setCssStyle(e,r){for(let n of e){var _this$requirements$ge;let i=(_this$requirements$ge=this.requirements.get(n))!==null&&_this$requirements$ge!==void 0?_this$requirements$ge:this.elements.get(n);if(!r||!i)return;for(let a of r)a.includes(",")?i.cssStyles.push(...a.split(",")):i.cssStyles.push(a);}}setClass(e,r){for(let n of e){var _this$requirements$ge2;let i=(_this$requirements$ge2=this.requirements.get(n))!==null&&_this$requirements$ge2!==void 0?_this$requirements$ge2:this.elements.get(n);if(i)for(let a of r){var _this$classes$get;i.classes.push(a);let s=(_this$classes$get=this.classes.get(a))===null||_this$classes$get===void 0?void 0:_this$classes$get.styles;s&&i.cssStyles.push(...s);}}}defineClass(e,r){for(let n of e){let i=this.classes.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.classes.set(n,i)),r&&r.forEach(function(a){if(/color/.exec(a)){let s=a.replace("fill","bgFill");i.textStyles.push(s);}i.styles.push(a);}),this.requirements.forEach(a=>{a.classes.includes(n)&&a.cssStyles.push(...r.flatMap(s=>s.split(",")));}),this.elements.forEach(a=>{a.classes.includes(n)&&a.cssStyles.push(...r.flatMap(s=>s.split(",")));});}}getClasses(){return this.classes;}getData(){let e=ge(),r=[],n=[];for(let i of this.requirements.values()){let a=i;a.id=i.name,a.cssStyles=i.cssStyles,a.cssClasses=i.classes.join(" "),a.shape="requirementBox",a.look=e.look,r.push(a);}for(let i of this.elements.values()){let a=i;a.shape="requirementBox",a.look=e.look,a.id=i.name,a.cssStyles=i.cssStyles,a.cssClasses=i.classes.join(" "),r.push(a);}for(let i of this.relations){var _this$requirements$ge3,_this$requirements$ge4,_this$elements$get,_this$requirements$ge5,_this$requirements$ge6,_this$elements$get2;let a=0,s=i.type===this.Relationships.CONTAINS,l={id:`${i.src}-${i.dst}-${a}`,start:(_this$requirements$ge3=(_this$requirements$ge4=this.requirements.get(i.src))===null||_this$requirements$ge4===void 0?void 0:_this$requirements$ge4.name)!==null&&_this$requirements$ge3!==void 0?_this$requirements$ge3:(_this$elements$get=this.elements.get(i.src))===null||_this$elements$get===void 0?void 0:_this$elements$get.name,end:(_this$requirements$ge5=(_this$requirements$ge6=this.requirements.get(i.dst))===null||_this$requirements$ge6===void 0?void 0:_this$requirements$ge6.name)!==null&&_this$requirements$ge5!==void 0?_this$requirements$ge5:(_this$elements$get2=this.elements.get(i.dst))===null||_this$elements$get2===void 0?void 0:_this$elements$get2.name,label:`&lt;&lt;${i.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",s?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:s?"normal":"dashed",arrowTypeStart:s?"requirement_contains":"",arrowTypeEnd:s?"":"requirement_arrow",look:e.look};n.push(l),a++;}return{nodes:r,edges:n,other:{},config:e,direction:this.getDirection()};}},o(_Class202,"RequirementDB"),_Class202);});var _Ue,bde,Tde=N(()=>{"use strict";_Ue=o(t=>`

  marker {
    fill: ${t.relationColor};
    stroke: ${t.relationColor};
  }

  marker.cross {
    stroke: ${t.lineColor};
  }

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

  .reqBox {
    fill: ${t.requirementBackground};
    fill-opacity: 1.0;
    stroke: ${t.requirementBorderColor};
    stroke-width: ${t.requirementBorderSize};
  }
  
  .reqTitle, .reqLabel{
    fill:  ${t.requirementTextColor};
  }
  .reqLabelBox {
    fill: ${t.relationLabelBackground};
    fill-opacity: 1.0;
  }

  .req-title-line {
    stroke: ${t.requirementBorderColor};
    stroke-width: ${t.requirementBorderSize};
  }
  .relationshipLine {
    stroke: ${t.relationColor};
    stroke-width: 1;
  }
  .relationshipLabel {
    fill: ${t.relationLabelColor};
  }
  .divider {
    stroke: ${t.nodeBorder};
    stroke-width: 1;
  }
  .label {
    font-family: ${t.fontFamily};
    color: ${t.nodeTextColor||t.textColor};
  }
  .label text,span {
    fill: ${t.nodeTextColor||t.textColor};
    color: ${t.nodeTextColor||t.textColor};
  }
  .labelBkg {
    background-color: ${t.edgeLabelBackground};
  }

`,"getStyles"),bde=_Ue;});var uP={};hr(uP,{draw:()=>DUe});var DUe,wde=N(()=>{"use strict";qt();yt();xm();Zd();Jd();nr();DUe=o(async function(t,e,r,n){var _a$nodeSpacing,_a$rankSpacing,_a$titleTopMargin2,_a$useMaxWidth2;X.info("REF0:"),X.info("Drawing requirement diagram (unified)",e);let{securityLevel:i,state:a,layout:s}=ge(),l=n.db.getData(),u=bc(e,i);l.type=n.type,l.layoutAlgorithm=sf(s),l.nodeSpacing=(_a$nodeSpacing=a===null||a===void 0?void 0:a.nodeSpacing)!==null&&_a$nodeSpacing!==void 0?_a$nodeSpacing:50,l.rankSpacing=(_a$rankSpacing=a===null||a===void 0?void 0:a.rankSpacing)!==null&&_a$rankSpacing!==void 0?_a$rankSpacing:50,l.markers=["requirement_contains","requirement_arrow"],l.diagramId=e,await Dc(l,u);let h=8;Vt.insertTitle(u,"requirementDiagramTitleText",(_a$titleTopMargin2=a===null||a===void 0?void 0:a.titleTopMargin)!==null&&_a$titleTopMargin2!==void 0?_a$titleTopMargin2:25,n.db.getDiagramTitle()),Wo(u,h,"requirementDiagram",(_a$useMaxWidth2=a===null||a===void 0?void 0:a.useMaxWidth)!==null&&_a$useMaxWidth2!==void 0?_a$useMaxWidth2:!0);},"draw");});var kde={};hr(kde,{diagram:()=>LUe});var LUe,Ede=N(()=>{"use strict";vde();xde();Tde();wde();LUe={parser:yde,get db(){return new US();},renderer:uP,styles:bde};});var hP,Ade,_de=N(()=>{"use strict";hP=function(){var t=o(function(Q,j,ne,te){for(ne=ne||{},te=Q.length;te--;ne[Q[te]]=j);return ne;},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],l=[1,13],u=[1,14],h=[1,16],f=[1,17],d=[1,18],p=[1,24],m=[1,25],g=[1,26],y=[1,27],v=[1,28],x=[1,29],b=[1,30],T=[1,31],C=[1,32],w=[1,33],E=[1,34],_=[1,35],A=[1,36],D=[1,37],O=[1,38],R=[1,39],k=[1,41],L=[1,42],S=[1,43],I=[1,44],M=[1,45],P=[1,46],B=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],F=[4,5,16,50,52,53],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],U=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],K=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],ee=[68,69,70],Y=[1,122],ce={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:o(function(j,ne,te,he,le,J,Se){var se=J.length-1;switch(le){case 3:return he.apply(J[se]),J[se];break;case 4:case 9:this.$=[];break;case 5:case 10:J[se-1].push(J[se]),this.$=J[se-1];break;case 6:case 7:case 11:case 12:this.$=J[se];break;case 8:case 13:this.$=[];break;case 15:J[se].type="createParticipant",this.$=J[se];break;case 16:J[se-1].unshift({type:"boxStart",boxData:he.parseBoxData(J[se-2])}),J[se-1].push({type:"boxEnd",boxText:J[se-2]}),this.$=J[se-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(J[se-2]),sequenceIndexStep:Number(J[se-1]),sequenceVisible:!0,signalType:he.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(J[se-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:he.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:he.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:he.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:he.LINETYPE.ACTIVE_START,actor:J[se-1].actor};break;case 23:this.$={type:"activeEnd",signalType:he.LINETYPE.ACTIVE_END,actor:J[se-1].actor};break;case 29:he.setDiagramTitle(J[se].substring(6)),this.$=J[se].substring(6);break;case 30:he.setDiagramTitle(J[se].substring(7)),this.$=J[se].substring(7);break;case 31:this.$=J[se].trim(),he.setAccTitle(this.$);break;case 32:case 33:this.$=J[se].trim(),he.setAccDescription(this.$);break;case 34:J[se-1].unshift({type:"loopStart",loopText:he.parseMessage(J[se-2]),signalType:he.LINETYPE.LOOP_START}),J[se-1].push({type:"loopEnd",loopText:J[se-2],signalType:he.LINETYPE.LOOP_END}),this.$=J[se-1];break;case 35:J[se-1].unshift({type:"rectStart",color:he.parseMessage(J[se-2]),signalType:he.LINETYPE.RECT_START}),J[se-1].push({type:"rectEnd",color:he.parseMessage(J[se-2]),signalType:he.LINETYPE.RECT_END}),this.$=J[se-1];break;case 36:J[se-1].unshift({type:"optStart",optText:he.parseMessage(J[se-2]),signalType:he.LINETYPE.OPT_START}),J[se-1].push({type:"optEnd",optText:he.parseMessage(J[se-2]),signalType:he.LINETYPE.OPT_END}),this.$=J[se-1];break;case 37:J[se-1].unshift({type:"altStart",altText:he.parseMessage(J[se-2]),signalType:he.LINETYPE.ALT_START}),J[se-1].push({type:"altEnd",signalType:he.LINETYPE.ALT_END}),this.$=J[se-1];break;case 38:J[se-1].unshift({type:"parStart",parText:he.parseMessage(J[se-2]),signalType:he.LINETYPE.PAR_START}),J[se-1].push({type:"parEnd",signalType:he.LINETYPE.PAR_END}),this.$=J[se-1];break;case 39:J[se-1].unshift({type:"parStart",parText:he.parseMessage(J[se-2]),signalType:he.LINETYPE.PAR_OVER_START}),J[se-1].push({type:"parEnd",signalType:he.LINETYPE.PAR_END}),this.$=J[se-1];break;case 40:J[se-1].unshift({type:"criticalStart",criticalText:he.parseMessage(J[se-2]),signalType:he.LINETYPE.CRITICAL_START}),J[se-1].push({type:"criticalEnd",signalType:he.LINETYPE.CRITICAL_END}),this.$=J[se-1];break;case 41:J[se-1].unshift({type:"breakStart",breakText:he.parseMessage(J[se-2]),signalType:he.LINETYPE.BREAK_START}),J[se-1].push({type:"breakEnd",optText:he.parseMessage(J[se-2]),signalType:he.LINETYPE.BREAK_END}),this.$=J[se-1];break;case 43:this.$=J[se-3].concat([{type:"option",optionText:he.parseMessage(J[se-1]),signalType:he.LINETYPE.CRITICAL_OPTION},J[se]]);break;case 45:this.$=J[se-3].concat([{type:"and",parText:he.parseMessage(J[se-1]),signalType:he.LINETYPE.PAR_AND},J[se]]);break;case 47:this.$=J[se-3].concat([{type:"else",altText:he.parseMessage(J[se-1]),signalType:he.LINETYPE.ALT_ELSE},J[se]]);break;case 48:J[se-3].draw="participant",J[se-3].type="addParticipant",J[se-3].description=he.parseMessage(J[se-1]),this.$=J[se-3];break;case 49:J[se-1].draw="participant",J[se-1].type="addParticipant",this.$=J[se-1];break;case 50:J[se-3].draw="actor",J[se-3].type="addParticipant",J[se-3].description=he.parseMessage(J[se-1]),this.$=J[se-3];break;case 51:J[se-1].draw="actor",J[se-1].type="addParticipant",this.$=J[se-1];break;case 52:J[se-1].type="destroyParticipant",this.$=J[se-1];break;case 53:this.$=[J[se-1],{type:"addNote",placement:J[se-2],actor:J[se-1].actor,text:J[se]}];break;case 54:J[se-2]=[].concat(J[se-1],J[se-1]).slice(0,2),J[se-2][0]=J[se-2][0].actor,J[se-2][1]=J[se-2][1].actor,this.$=[J[se-1],{type:"addNote",placement:he.PLACEMENT.OVER,actor:J[se-2].slice(0,2),text:J[se]}];break;case 55:this.$=[J[se-1],{type:"addLinks",actor:J[se-1].actor,text:J[se]}];break;case 56:this.$=[J[se-1],{type:"addALink",actor:J[se-1].actor,text:J[se]}];break;case 57:this.$=[J[se-1],{type:"addProperties",actor:J[se-1].actor,text:J[se]}];break;case 58:this.$=[J[se-1],{type:"addDetails",actor:J[se-1].actor,text:J[se]}];break;case 61:this.$=[J[se-2],J[se]];break;case 62:this.$=J[se];break;case 63:this.$=he.PLACEMENT.LEFTOF;break;case 64:this.$=he.PLACEMENT.RIGHTOF;break;case 65:this.$=[J[se-4],J[se-1],{type:"addMessage",from:J[se-4].actor,to:J[se-1].actor,signalType:J[se-3],msg:J[se],activate:!0},{type:"activeStart",signalType:he.LINETYPE.ACTIVE_START,actor:J[se-1].actor}];break;case 66:this.$=[J[se-4],J[se-1],{type:"addMessage",from:J[se-4].actor,to:J[se-1].actor,signalType:J[se-3],msg:J[se]},{type:"activeEnd",signalType:he.LINETYPE.ACTIVE_END,actor:J[se-4].actor}];break;case 67:this.$=[J[se-3],J[se-1],{type:"addMessage",from:J[se-3].actor,to:J[se-1].actor,signalType:J[se-2],msg:J[se]}];break;case 68:this.$={type:"addParticipant",actor:J[se]};break;case 69:this.$=he.LINETYPE.SOLID_OPEN;break;case 70:this.$=he.LINETYPE.DOTTED_OPEN;break;case 71:this.$=he.LINETYPE.SOLID;break;case 72:this.$=he.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=he.LINETYPE.DOTTED;break;case 74:this.$=he.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=he.LINETYPE.SOLID_CROSS;break;case 76:this.$=he.LINETYPE.DOTTED_CROSS;break;case 77:this.$=he.LINETYPE.SOLID_POINT;break;case 78:this.$=he.LINETYPE.DOTTED_POINT;break;case 79:this.$=he.parseMessage(J[se].trim().substring(1));break;}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,12:12,13:l,14:u,17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:T,39:C,41:w,43:E,44:_,46:A,50:D,52:O,53:R,54:k,59:L,60:S,61:I,62:M,70:P},t(B,[2,5]),{9:47,12:12,13:l,14:u,17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:T,39:C,41:w,43:E,44:_,46:A,50:D,52:O,53:R,54:k,59:L,60:S,61:I,62:M,70:P},t(B,[2,7]),t(B,[2,8]),t(B,[2,14]),{12:48,50:D,52:O,53:R},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:P},{22:55,70:P},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(B,[2,29]),t(B,[2,30]),{32:[1,61]},{34:[1,62]},t(B,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:P},{22:72,70:P},{22:73,70:P},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:P},{22:90,70:P},{22:91,70:P},{22:92,70:P},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(B,[2,6]),t(B,[2,15]),t(F,[2,9],{10:93}),t(B,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(B,[2,21]),{5:[1,97]},{5:[1,98]},t(B,[2,24]),t(B,[2,25]),t(B,[2,26]),t(B,[2,27]),t(B,[2,28]),t(B,[2,31]),t(B,[2,32]),t(z,i,{7:99}),t(z,i,{7:100}),t(z,i,{7:101}),t($,i,{40:102,7:103}),t(U,i,{42:104,7:105}),t(U,i,{7:105,42:106}),t(K,i,{45:107,7:108}),t(z,i,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:P},t(ee,[2,69]),t(ee,[2,70]),t(ee,[2,71]),t(ee,[2,72]),t(ee,[2,73]),t(ee,[2,74]),t(ee,[2,75]),t(ee,[2,76]),t(ee,[2,77]),t(ee,[2,78]),{22:118,70:P},{22:120,58:119,70:P},{70:[2,63]},{70:[2,64]},{56:121,81:Y},{56:123,81:Y},{56:124,81:Y},{56:125,81:Y},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:D,52:O,53:R},{5:[1,131]},t(B,[2,19]),t(B,[2,20]),t(B,[2,22]),t(B,[2,23]),{4:a,5:s,8:8,9:10,12:12,13:l,14:u,16:[1,132],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:T,39:C,41:w,43:E,44:_,46:A,50:D,52:O,53:R,54:k,59:L,60:S,61:I,62:M,70:P},{4:a,5:s,8:8,9:10,12:12,13:l,14:u,16:[1,133],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:T,39:C,41:w,43:E,44:_,46:A,50:D,52:O,53:R,54:k,59:L,60:S,61:I,62:M,70:P},{4:a,5:s,8:8,9:10,12:12,13:l,14:u,16:[1,134],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:T,39:C,41:w,43:E,44:_,46:A,50:D,52:O,53:R,54:k,59:L,60:S,61:I,62:M,70:P},{16:[1,135]},{4:a,5:s,8:8,9:10,12:12,13:l,14:u,16:[2,46],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:T,39:C,41:w,43:E,44:_,46:A,49:[1,136],50:D,52:O,53:R,54:k,59:L,60:S,61:I,62:M,70:P},{16:[1,137]},{4:a,5:s,8:8,9:10,12:12,13:l,14:u,16:[2,44],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:T,39:C,41:w,43:E,44:_,46:A,48:[1,138],50:D,52:O,53:R,54:k,59:L,60:S,61:I,62:M,70:P},{16:[1,139]},{16:[1,140]},{4:a,5:s,8:8,9:10,12:12,13:l,14:u,16:[2,42],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:T,39:C,41:w,43:E,44:_,46:A,47:[1,141],50:D,52:O,53:R,54:k,59:L,60:S,61:I,62:M,70:P},{4:a,5:s,8:8,9:10,12:12,13:l,14:u,16:[1,142],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:T,39:C,41:w,43:E,44:_,46:A,50:D,52:O,53:R,54:k,59:L,60:S,61:I,62:M,70:P},{15:[1,143]},t(B,[2,49]),{15:[1,144]},t(B,[2,51]),t(B,[2,52]),{22:145,70:P},{22:146,70:P},{56:147,81:Y},{56:148,81:Y},{56:149,81:Y},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(B,[2,16]),t(F,[2,10]),{12:151,50:D,52:O,53:R},t(F,[2,12]),t(F,[2,13]),t(B,[2,18]),t(B,[2,34]),t(B,[2,35]),t(B,[2,36]),t(B,[2,37]),{15:[1,152]},t(B,[2,38]),{15:[1,153]},t(B,[2,39]),t(B,[2,40]),{15:[1,154]},t(B,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:Y},{56:158,81:Y},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:P},t(F,[2,11]),t($,i,{7:103,40:160}),t(U,i,{7:105,42:161}),t(K,i,{7:108,45:162}),t(B,[2,48]),t(B,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:o(function(j,ne){if(ne.recoverable)this.trace(j);else{var te=new Error(j);throw te.hash=ne,te;}},"parseError"),parse:o(function(j){var ne=this,te=[0],he=[],le=[null],J=[],Se=this.table,se="",ae=0,Oe=0,ye=0,Be=2,He=1,ze=J.slice.call(arguments,1),Le=Object.create(this.lexer),Ie={yy:{}};for(var xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xe)&&(Ie.yy[xe]=this.yy[xe]);Le.setInput(j,Ie.yy),Ie.yy.lexer=Le,Ie.yy.parser=this,typeof Le.yylloc>"u"&&(Le.yylloc={});var q=Le.yylloc;J.push(q);var de=Le.options&&Le.options.ranges;typeof Ie.yy.parseError=="function"?this.parseError=Ie.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ie(Rt){te.length=te.length-2*Rt,le.length=le.length-Rt,J.length=J.length-Rt;}o(ie,"popStack");function oe(){var Rt;return Rt=he.pop()||Le.lex()||He,typeof Rt!="number"&&(Rt instanceof Array&&(he=Rt,Rt=he.pop()),Rt=ne.symbols_[Rt]||Rt),Rt;}o(oe,"lex");for(var V,Te,W,pe,ve,Pe,_e={},be,Ve,De,Ye;;){if(W=te[te.length-1],this.defaultActions[W]?pe=this.defaultActions[W]:((V===null||typeof V>"u")&&(V=oe()),pe=Se[W]&&Se[W][V]),typeof pe>"u"||!pe.length||!pe[0]){var at="";Ye=[];for(be in Se[W])this.terminals_[be]&&be>Be&&Ye.push("'"+this.terminals_[be]+"'");Le.showPosition?at="Parse error on line "+(ae+1)+`:
`+Le.showPosition()+`
Expecting `+Ye.join(", ")+", got '"+(this.terminals_[V]||V)+"'":at="Parse error on line "+(ae+1)+": Unexpected "+(V==He?"end of input":"'"+(this.terminals_[V]||V)+"'"),this.parseError(at,{text:Le.match,token:this.terminals_[V]||V,line:Le.yylineno,loc:q,expected:Ye});}if(pe[0]instanceof Array&&pe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+V);switch(pe[0]){case 1:te.push(V),le.push(Le.yytext),J.push(Le.yylloc),te.push(pe[1]),V=null,Te?(V=Te,Te=null):(Oe=Le.yyleng,se=Le.yytext,ae=Le.yylineno,q=Le.yylloc,ye>0&&ye--);break;case 2:if(Ve=this.productions_[pe[1]][1],_e.$=le[le.length-Ve],_e._$={first_line:J[J.length-(Ve||1)].first_line,last_line:J[J.length-1].last_line,first_column:J[J.length-(Ve||1)].first_column,last_column:J[J.length-1].last_column},de&&(_e._$.range=[J[J.length-(Ve||1)].range[0],J[J.length-1].range[1]]),Pe=this.performAction.apply(_e,[se,Oe,ae,Ie.yy,pe[1],le,J].concat(ze)),typeof Pe<"u")return Pe;Ve&&(te=te.slice(0,-1*Ve*2),le=le.slice(0,-1*Ve),J=J.slice(0,-1*Ve)),te.push(this.productions_[pe[1]][0]),le.push(_e.$),J.push(_e._$),De=Se[te[te.length-2]][te[te.length-1]],te.push(De);break;case 3:return!0;}}return!0;},"parse")},Z=function(){var Q={EOF:1,parseError:o(function(ne,te){if(this.yy.parser)this.yy.parser.parseError(ne,te);else throw new Error(ne);},"parseError"),setInput:o(function(j,ne){return this.yy=ne||this.yy||{},this._input=j,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var j=this._input[0];this.yytext+=j,this.yyleng++,this.offset++,this.match+=j,this.matched+=j;var ne=j.match(/(?:\r\n?|\n).*/g);return ne?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),j;},"input"),unput:o(function(j){var ne=j.length,te=j.split(/(?:\r\n?|\n)/g);this._input=j+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ne),this.offset-=ne;var he=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),te.length-1&&(this.yylineno-=te.length-1);var le=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:te?(te.length===he.length?this.yylloc.first_column:0)+he[he.length-te.length].length-te[0].length:this.yylloc.first_column-ne},this.options.ranges&&(this.yylloc.range=[le[0],le[0]+this.yyleng-ne]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(j){this.unput(this.match.slice(j));},"less"),pastInput:o(function(){var j=this.matched.substr(0,this.matched.length-this.match.length);return(j.length>20?"...":"")+j.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var j=this.match;return j.length<20&&(j+=this._input.substr(0,20-j.length)),(j.substr(0,20)+(j.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var j=this.pastInput(),ne=new Array(j.length+1).join("-");return j+this.upcomingInput()+`
`+ne+"^";},"showPosition"),test_match:o(function(j,ne){var te,he,le;if(this.options.backtrack_lexer&&(le={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(le.yylloc.range=this.yylloc.range.slice(0))),he=j[0].match(/(?:\r\n?|\n).*/g),he&&(this.yylineno+=he.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:he?he[he.length-1].length-he[he.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+j[0].length},this.yytext+=j[0],this.match+=j[0],this.matches=j,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(j[0].length),this.matched+=j[0],te=this.performAction.call(this,this.yy,this,ne,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),te)return te;if(this._backtrack){for(var J in le)this[J]=le[J];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var j,ne,te,he;this._more||(this.yytext="",this.match="");for(var le=this._currentRules(),J=0;J<le.length;J++)if(te=this._input.match(this.rules[le[J]]),te&&(!ne||te[0].length>ne[0].length)){if(ne=te,he=J,this.options.backtrack_lexer){if(j=this.test_match(te,le[J]),j!==!1)return j;if(this._backtrack){ne=!1;continue;}else return!1;}else if(!this.options.flex)break;}return ne?(j=this.test_match(ne,le[he]),j!==!1?j:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var ne=this.next();return ne||this.lex();},"lex"),begin:o(function(ne){this.conditionStack.push(ne);},"begin"),popState:o(function(){var ne=this.conditionStack.length-1;return ne>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function(ne){return ne=this.conditionStack.length-1-Math.abs(ne||0),ne>=0?this.conditionStack[ne]:"INITIAL";},"topState"),pushState:o(function(ne){this.begin(ne);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(ne,te,he,le){var J=le;switch(he){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;break;case 8:return this.begin("ID"),50;break;case 9:return this.begin("ID"),52;break;case 10:return 13;case 11:return this.begin("ID"),53;break;case 12:return te.yytext=te.yytext.trim(),this.begin("ALIAS"),70;break;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;break;case 14:return this.popState(),this.popState(),5;break;case 15:return this.begin("LINE"),36;break;case 16:return this.begin("LINE"),37;break;case 17:return this.begin("LINE"),38;break;case 18:return this.begin("LINE"),39;break;case 19:return this.begin("LINE"),49;break;case 20:return this.begin("LINE"),41;break;case 21:return this.begin("LINE"),43;break;case 22:return this.begin("LINE"),48;break;case 23:return this.begin("LINE"),44;break;case 24:return this.begin("LINE"),47;break;case 25:return this.begin("LINE"),46;break;case 26:return this.popState(),15;break;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;break;case 37:return this.begin("ID"),23;break;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;break;case 41:return this.popState(),"acc_title_value";break;case 42:return this.begin("acc_descr"),33;break;case 43:return this.popState(),"acc_descr_value";break;case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return te.yytext=te.yytext.trim(),70;break;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 81;case 65:return 68;case 66:return 69;case 67:return 5;case 68:return"INVALID";}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^<\->\->:\n,;]+?([\-]*[^<\->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68],inclusive:!0}}};return Q;}();ce.lexer=Z;function ue(){this.yy={};}return o(ue,"Parser"),ue.prototype=ce,ce.Parser=ue,new ue();}();hP.parser=hP;Ade=hP;});var IUe,OUe,PUe,HS,Dde=N(()=>{"use strict";var _Class203;qt();yt();EO();dr();ci();IUe={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},OUe={FILLED:0,OPEN:1},PUe={LEFTOF:0,RIGHTOF:1,OVER:2},HS=(_Class203=class HS{constructor(){this.state=new E1(()=>({prevActor:void 0,actors:new Map(),createdActors:new Map(),destroyedActors:new Map(),boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0}));this.setAccTitle=Cr;this.setAccDescription=Dr;this.setDiagramTitle=Ir;this.getAccTitle=_r;this.getAccDescription=Lr;this.getDiagramTitle=Rr;this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(ge().wrap),this.LINETYPE=IUe,this.ARROWTYPE=OUe,this.PLACEMENT=PUe;}addBox(e){var _e$wrap;this.state.records.boxes.push({name:e.text,wrap:(_e$wrap=e.wrap)!==null&&_e$wrap!==void 0?_e$wrap:this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0];}addActor(e,r,n,i){var _n3,_n$wrap;let a=this.state.records.currentBox,s=this.state.records.actors.get(e);if(s){if(this.state.records.currentBox&&s.box&&this.state.records.currentBox!==s.box)throw new Error(`A same participant should only be defined in one Box: ${s.name} can't be in '${s.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=s.box?s.box:this.state.records.currentBox,s.box=a,s&&r===s.name&&n==null)return;}if(((_n3=n)===null||_n3===void 0?void 0:_n3.text)==null&&(n={text:r,type:i}),(i==null||n.text==null)&&(n={text:r,type:i}),this.state.records.actors.set(e,{box:a,name:r,description:n.text,wrap:(_n$wrap=n.wrap)!==null&&_n$wrap!==void 0?_n$wrap:this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i!==null&&i!==void 0?i:"participant"}),this.state.records.prevActor){let l=this.state.records.actors.get(this.state.records.prevActor);l&&(l.nextActor=e);}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e;}activationCount(e){let r,n=0;if(!e)return 0;for(r=0;r<this.state.records.messages.length;r++)this.state.records.messages[r].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[r].from===e&&n++,this.state.records.messages[r].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[r].from===e&&n--;return n;}addMessage(e,r,n,i){var _n$wrap2;this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:r,message:n.text,wrap:(_n$wrap2=n.wrap)!==null&&_n$wrap2!==void 0?_n$wrap2:this.autoWrap(),answer:i});}addSignal(e,r,n,i,a=!1){var _n$text,_n$wrap3;if(i===this.LINETYPE.ACTIVE_END&&this.activationCount(e!==null&&e!==void 0?e:"")<1){let l=new Error("Trying to inactivate an inactive participant ("+e+")");throw l.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},l;}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:r,message:(_n$text=n===null||n===void 0?void 0:n.text)!==null&&_n$text!==void 0?_n$text:"",wrap:(_n$wrap3=n===null||n===void 0?void 0:n.wrap)!==null&&_n$wrap3!==void 0?_n$wrap3:this.autoWrap(),type:i,activate:a}),!0;}hasAtLeastOneBox(){return this.state.records.boxes.length>0;}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name);}getMessages(){return this.state.records.messages;}getBoxes(){return this.state.records.boxes;}getActors(){return this.state.records.actors;}getCreatedActors(){return this.state.records.createdActors;}getDestroyedActors(){return this.state.records.destroyedActors;}getActor(e){return this.state.records.actors.get(e);}getActorKeys(){return[...this.state.records.actors.keys()];}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0;}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1;}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled;}setWrap(e){this.state.records.wrapEnabled=e;}extractWrap(e){if(e===void 0)return{};e=e.trim();let r=/^:?wrap:/.exec(e)!==null?!0:/^:?nowrap:/.exec(e)!==null?!1:void 0;return{cleanedText:(r===void 0?e:e.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:r};}autoWrap(){var _ge$sequence$wrap,_ge$sequence;return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:(_ge$sequence$wrap=(_ge$sequence=ge().sequence)===null||_ge$sequence===void 0?void 0:_ge$sequence.wrap)!==null&&_ge$sequence$wrap!==void 0?_ge$sequence$wrap:!1;}clear(){this.state.reset(),wr();}parseMessage(e){let r=e.trim(),{wrap:n,cleanedText:i}=this.extractWrap(r),a={text:i,wrap:n};return X.debug(`parseMessage: ${JSON.stringify(a)}`),a;}parseBoxData(e){var _window;let r=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),n=r!==null&&r!==void 0&&r[1]?r[1].trim():"transparent",i=r!==null&&r!==void 0&&r[2]?r[2].trim():void 0;if((_window=window)!==null&&_window!==void 0&&_window.CSS)window.CSS.supports("color",n)||(n="transparent",i=e.trim());else{let l=new Option().style;l.color=n,l.color!==n&&(n="transparent",i=e.trim());}let{wrap:a,cleanedText:s}=this.extractWrap(i);return{text:s?ar(s,ge()):void 0,color:n,wrap:a};}addNote(e,r,n){var _n$wrap4,_n$wrap5;let i={actor:e,placement:r,message:n.text,wrap:(_n$wrap4=n.wrap)!==null&&_n$wrap4!==void 0?_n$wrap4:this.autoWrap()},a=[].concat(e,e);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:a[0],to:a[1],message:n.text,wrap:(_n$wrap5=n.wrap)!==null&&_n$wrap5!==void 0?_n$wrap5:this.autoWrap(),type:this.LINETYPE.NOTE,placement:r});}addLinks(e,r){let n=this.getActor(e);try{let i=ar(r.text,ge());i=i.replace(/&equals;/g,"="),i=i.replace(/&amp;/g,"&");let a=JSON.parse(i);this.insertLinks(n,a);}catch(i){X.error("error while parsing actor link text",i);}}addALink(e,r){let n=this.getActor(e);try{let i={},a=ar(r.text,ge()),s=a.indexOf("@");a=a.replace(/&equals;/g,"="),a=a.replace(/&amp;/g,"&");let l=a.slice(0,s-1).trim(),u=a.slice(s+1).trim();i[l]=u,this.insertLinks(n,i);}catch(i){X.error("error while parsing actor link text",i);}}insertLinks(e,r){if(e.links==null)e.links=r;else for(let n in r)e.links[n]=r[n];}addProperties(e,r){let n=this.getActor(e);try{let i=ar(r.text,ge()),a=JSON.parse(i);this.insertProperties(n,a);}catch(i){X.error("error while parsing actor properties text",i);}}insertProperties(e,r){if(e.properties==null)e.properties=r;else for(let n in r)e.properties[n]=r[n];}boxEnd(){this.state.records.currentBox=void 0;}addDetails(e,r){let n=this.getActor(e),i=document.getElementById(r.text);try{let a=i.innerHTML,s=JSON.parse(a);s.properties&&this.insertProperties(n,s.properties),s.links&&this.insertLinks(n,s.links);}catch(a){X.error("error while parsing actor details text",a);}}getActorProperty(e,r){if((e===null||e===void 0?void 0:e.properties)!==void 0)return e.properties[r];}apply(e){if(Array.isArray(e))e.forEach(r=>{this.apply(r);});else switch(e.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":this.addActor(e.actor,e.actor,e.description,e.draw);break;case"createParticipant":if(this.state.records.actors.has(e.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"activeEnd":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"addNote":this.addNote(e.actor,e.placement,e.text);break;case"addLinks":this.addLinks(e.actor,e.text);break;case"addALink":this.addALink(e.actor,e.text);break;case"addProperties":this.addProperties(e.actor,e.text);break;case"addDetails":this.addDetails(e.actor,e.text);break;case"addMessage":if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0;}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0;}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate);break;case"boxStart":this.addBox(e.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"rectStart":this.addSignal(void 0,void 0,e.color,e.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":this.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"else":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"setAccTitle":Cr(e.text);break;case"parStart":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"and":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case"option":this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"breakStart":this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;}}getConfig(){return ge().sequence;}},o(_Class203,"SequenceDB"),_Class203);});var BUe,Lde,Rde=N(()=>{"use strict";BUe=o(t=>`.actor {
    stroke: ${t.actorBorder};
    fill: ${t.actorBkg};
  }

  text.actor > tspan {
    fill: ${t.actorTextColor};
    stroke: none;
  }

  .actor-line {
    stroke: ${t.actorLineColor};
  }

  .messageLine0 {
    stroke-width: 1.5;
    stroke-dasharray: none;
    stroke: ${t.signalColor};
  }

  .messageLine1 {
    stroke-width: 1.5;
    stroke-dasharray: 2, 2;
    stroke: ${t.signalColor};
  }

  #arrowhead path {
    fill: ${t.signalColor};
    stroke: ${t.signalColor};
  }

  .sequenceNumber {
    fill: ${t.sequenceNumberColor};
  }

  #sequencenumber {
    fill: ${t.signalColor};
  }

  #crosshead path {
    fill: ${t.signalColor};
    stroke: ${t.signalColor};
  }

  .messageText {
    fill: ${t.signalTextColor};
    stroke: none;
  }

  .labelBox {
    stroke: ${t.labelBoxBorderColor};
    fill: ${t.labelBoxBkgColor};
  }

  .labelText, .labelText > tspan {
    fill: ${t.labelTextColor};
    stroke: none;
  }

  .loopText, .loopText > tspan {
    fill: ${t.loopTextColor};
    stroke: none;
  }

  .loopLine {
    stroke-width: 2px;
    stroke-dasharray: 2, 2;
    stroke: ${t.labelBoxBorderColor};
    fill: ${t.labelBoxBorderColor};
  }

  .note {
    //stroke: #decc93;
    stroke: ${t.noteBorderColor};
    fill: ${t.noteBkgColor};
  }

  .noteText, .noteText > tspan {
    fill: ${t.noteTextColor};
    stroke: none;
  }

  .activation0 {
    fill: ${t.activationBkgColor};
    stroke: ${t.activationBorderColor};
  }

  .activation1 {
    fill: ${t.activationBkgColor};
    stroke: ${t.activationBorderColor};
  }

  .activation2 {
    fill: ${t.activationBkgColor};
    stroke: ${t.activationBorderColor};
  }

  .actorPopupMenu {
    position: absolute;
  }

  .actorPopupMenuPanel {
    position: absolute;
    fill: ${t.actorBkg};
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
}
  .actor-man line {
    stroke: ${t.actorBorder};
    fill: ${t.actorBkg};
  }
  .actor-man circle, line {
    stroke: ${t.actorBorder};
    fill: ${t.actorBkg};
    stroke-width: 2px;
  }
`,"getStyles"),Lde=BUe;});var fP,bf,Mde,Ide,FUe,Nde,dP,$Ue,zUe,Nb,Ip,Ode,Wc,pP,GUe,VUe,UUe,HUe,WUe,qUe,YUe,Pde,XUe,jUe,KUe,QUe,ZUe,JUe,eHe,Bde,tHe,mP,rHe,di,Fde=N(()=>{"use strict";fP=Sa(Y0(),1);Jn();nr();dr();Jv();bf=18*2,Mde="actor-top",Ide="actor-bottom",FUe="actor-box",Nde="actor-man",dP=o(function(t,e){return Sd(t,e);},"drawRect"),$Ue=o(function(t,e,r,n,i){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};let a=e.links,s=e.actorCnt,l=e.rectData;var u="none";i&&(u="block !important");let h=t.append("g");h.attr("id","actor"+s+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",u);var f="";l.class!==void 0&&(f=" "+l.class);let d=l.width>r?l.width:r,p=h.append("rect");if(p.attr("class","actorPopupMenuPanel"+f),p.attr("x",l.x),p.attr("y",l.height),p.attr("fill",l.fill),p.attr("stroke",l.stroke),p.attr("width",d),p.attr("height",l.height),p.attr("rx",l.rx),p.attr("ry",l.ry),a!=null){var m=20;for(let v in a){var g=h.append("a"),y=(0,fP.sanitizeUrl)(a[v]);g.attr("xlink:href",y),g.attr("target","_blank"),rHe(n)(v,g,l.x+10,l.height+m,d,20,{class:"actor"},n),m+=30;}}return p.attr("height",m),{height:l.height+m,width:d};},"drawPopup"),zUe=o(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";},"popupMenuToggle"),Nb=o(async function(t,e,r=null){let n=t.append("foreignObject"),i=await yh(e.text,Qt()),s=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),e.class==="noteText"){let l=t.node().firstChild;l.setAttribute("height",s.height+2*e.textMargin);let u=l.getBBox();n.attr("x",Math.round(u.x+u.width/2-s.width/2)).attr("y",Math.round(u.y+u.height/2-s.height/2));}else if(r){let{startx:l,stopx:u,starty:h}=r;if(l>u){let f=l;l=u,u=f;}n.attr("x",Math.round(l+Math.abs(l-u)/2-s.width/2)),e.class==="loopText"?n.attr("y",Math.round(h)):n.attr("y",Math.round(h-s.height));}return[n];},"drawKatex"),Ip=o(function(t,e){let r=0,n=0,i=e.text.split(Ze.lineBreakRegex),[a,s]=Fo(e.fontSize),l=[],u=0,h=o(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":h=o(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":h=o(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":h=o(()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin),"yfunc");break;}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;}for(let[f,d]of i.entries()){e.textMargin!==void 0&&e.textMargin===0&&a!==void 0&&(u=f*a);let p=t.append("text");p.attr("x",e.x),p.attr("y",h()),e.anchor!==void 0&&p.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&p.style("font-family",e.fontFamily),s!==void 0&&p.style("font-size",s),e.fontWeight!==void 0&&p.style("font-weight",e.fontWeight),e.fill!==void 0&&p.attr("fill",e.fill),e.class!==void 0&&p.attr("class",e.class),e.dy!==void 0?p.attr("dy",e.dy):u!==0&&p.attr("dy",u);let m=d||k9;if(e.tspan){let g=p.append("tspan");g.attr("x",e.x),e.fill!==void 0&&g.attr("fill",e.fill),g.text(m);}else p.text(m);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(n+=(p._groups||p)[0][0].getBBox().height,r=n),l.push(p);}return l;},"drawText"),Ode=o(function(t,e){function r(i,a,s,l,u){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+l-u)+" "+(i+s-u*1.2)+","+(a+l)+" "+i+","+(a+l);}o(r,"genPoints");let n=t.append("polygon");return n.attr("points",r(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,Ip(t,e),n;},"drawLabel"),Wc=-1,pP=o((t,e,r,n)=>{t.select&&r.forEach(i=>{let a=e.get(i),s=t.select("#actor"+a.actorCnt);!n.mirrorActors&&a.stopy?s.attr("y2",a.stopy+a.height/2):n.mirrorActors&&s.attr("y2",a.stopy);});},"fixLifeLineHeights"),GUe=o(function(t,e,r,n){var _e$properties,_e$properties2;let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height,l=t.append("g").lower();var u=l;n||(Wc++,Object.keys(e.links||{}).length&&!r.forceMenus&&u.attr("onclick",zUe(`actor${Wc}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+Wc).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),u=l.append("g"),e.actorCnt=Wc,e.links!=null&&u.attr("id","root-"+Wc));let h=Sl();var f="actor";(_e$properties=e.properties)!==null&&_e$properties!==void 0&&_e$properties.class?f=e.properties.class:h.fill="#eaeaea",n?f+=` ${Ide}`:f+=` ${Mde}`,h.x=e.x,h.y=i,h.width=e.width,h.height=e.height,h.class=f,h.rx=3,h.ry=3,h.name=e.name;let d=dP(u,h);if(e.rectData=h,(_e$properties2=e.properties)!==null&&_e$properties2!==void 0&&_e$properties2.icon){let m=e.properties.icon.trim();m.charAt(0)==="@"?jY(u,h.x+h.width-20,h.y+10,m.substr(1)):XY(u,h.x+h.width-20,h.y+10,m);}mP(r,gi(e.description))(e.description,u,h.x,h.y,h.width,h.height,{class:`actor ${FUe}`},r);let p=e.height;if(d.node){let m=d.node().getBBox();e.height=m.height,p=m.height;}return p;},"drawActorTypeParticipant"),VUe=o(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+80,l=t.append("g").lower();n||(Wc++,l.append("line").attr("id","actor"+Wc).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=Wc);let u=t.append("g"),h=Nde;n?h+=` ${Ide}`:h+=` ${Mde}`,u.attr("class",h),u.attr("name",e.name);let f=Sl();f.x=e.x,f.y=i,f.fill="#eaeaea",f.width=e.width,f.height=e.height,f.class="actor",f.rx=3,f.ry=3,u.append("line").attr("id","actor-man-torso"+Wc).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),u.append("line").attr("id","actor-man-arms"+Wc).attr("x1",a-bf/2).attr("y1",i+33).attr("x2",a+bf/2).attr("y2",i+33),u.append("line").attr("x1",a-bf/2).attr("y1",i+60).attr("x2",a).attr("y2",i+45),u.append("line").attr("x1",a).attr("y1",i+45).attr("x2",a+bf/2-2).attr("y2",i+60);let d=u.append("circle");d.attr("cx",e.x+e.width/2),d.attr("cy",i+10),d.attr("r",15),d.attr("width",e.width),d.attr("height",e.height);let p=u.node().getBBox();return e.height=p.height,mP(r,gi(e.description))(e.description,u,f.x,f.y+35,f.width,f.height,{class:`actor ${Nde}`},r),e.height;},"drawActorTypeActor"),UUe=o(async function(t,e,r,n){switch(e.type){case"actor":return await VUe(t,e,r,n);case"participant":return await GUe(t,e,r,n);}},"drawActor"),HUe=o(function(t,e,r){let i=t.append("g");Pde(i,e),e.name&&mP(r)(e.name,i,e.x,e.y+r.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),i.lower();},"drawBox"),WUe=o(function(t){return t.append("g");},"anchorElement"),qUe=o(function(t,e,r,n,i){let a=Sl(),s=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=r-e.starty,dP(s,a);},"drawActivation"),YUe=o(async function(t,e,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:l,messageFontFamily:u,messageFontSize:h,messageFontWeight:f}=n,d=t.append("g"),p=o(function(y,v,x,b){return d.append("line").attr("x1",y).attr("y1",v).attr("x2",x).attr("y2",b).attr("class","loopLine");},"drawLoopLine");p(e.startx,e.starty,e.stopx,e.starty),p(e.stopx,e.starty,e.stopx,e.stopy),p(e.startx,e.stopy,e.stopx,e.stopy),p(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(y){p(e.startx,y.y,e.stopx,y.y).style("stroke-dasharray","3, 3");});let m=Zv();m.text=r,m.x=e.startx,m.y=e.starty,m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=l||50,m.height=s||20,m.textMargin=a,m.class="labelText",Ode(d,m),m=Bde(),m.text=e.title,m.x=e.startx+l/2+(e.stopx-e.startx)/2,m.y=e.starty+i+a,m.anchor="middle",m.valign="middle",m.textMargin=a,m.class="loopText",m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.wrap=!0;let g=gi(m.text)?await Nb(d,m,e):Ip(d,m);if(e.sectionTitles!==void 0){for(let[y,v]of Object.entries(e.sectionTitles))if(v.message){m.text=v.message,m.x=e.startx+(e.stopx-e.startx)/2,m.y=e.sections[y].y+i+a,m.class="loopText",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.wrap=e.wrap,gi(m.text)?(e.starty=e.sections[y].y,await Nb(d,m,e)):Ip(d,m);let x=Math.round(g.map(b=>(b._groups||b)[0][0].getBBox().height).reduce((b,T)=>b+T));e.sections[y].height+=x-(i+a);}}return e.height=Math.round(e.stopy-e.starty),d;},"drawLoop"),Pde=o(function(t,e){rT(t,e);},"drawBackgroundRect"),XUe=o(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z");},"insertDatabaseIcon"),jUe=o(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z");},"insertComputerIcon"),KUe=o(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z");},"insertClockIcon"),QUe=o(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z");},"insertArrowHead"),ZUe=o(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");},"insertArrowFilledHead"),JUe=o(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6);},"insertSequenceNumber"),eHe=o(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7");},"insertArrowCrossHead"),Bde=o(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0};},"getTextObj"),tHe=o(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};},"getNoteRect"),mP=function(){function t(a,s,l,u,h,f,d){let p=s.append("text").attr("x",l+h/2).attr("y",u+f/2+5).style("text-anchor","middle").text(a);i(p,d);}o(t,"byText");function e(a,s,l,u,h,f,d,p){let{actorFontSize:m,actorFontFamily:g,actorFontWeight:y}=p,[v,x]=Fo(m),b=a.split(Ze.lineBreakRegex);for(let T=0;T<b.length;T++){let C=T*v-v*(b.length-1)/2,w=s.append("text").attr("x",l+h/2).attr("y",u).style("text-anchor","middle").style("font-size",x).style("font-weight",y).style("font-family",g);w.append("tspan").attr("x",l+h/2).attr("dy",C).text(b[T]),w.attr("y",u+f/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(w,d);}}o(e,"byTspan");function r(a,s,l,u,h,f,d,p){let m=s.append("switch"),y=m.append("foreignObject").attr("x",l).attr("y",u).attr("width",h).attr("height",f).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");y.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(a),e(a,m,l,u,h,f,d,p),i(y,d);}o(r,"byFo");async function n(a,s,l,u,h,f,d,p){let m=await nd(a,Qt()),g=s.append("switch"),v=g.append("foreignObject").attr("x",l+h/2-m.width/2).attr("y",u+f/2-m.height/2).attr("width",m.width).attr("height",m.height).append("xhtml:div").style("height","100%").style("width","100%");v.append("div").style("text-align","center").style("vertical-align","middle").html(await yh(a,Qt())),e(a,g,l,u,h,f,d,p),i(v,d);}o(n,"byKatex");function i(a,s){for(let l in s)s.hasOwnProperty(l)&&a.attr(l,s[l]);}return o(i,"_setTextAttrs"),function(a,s=!1){return s?n:a.textPlacement==="fo"?r:a.textPlacement==="old"?t:e;};}(),rHe=function(){function t(i,a,s,l,u,h,f){let d=a.append("text").attr("x",s).attr("y",l).style("text-anchor","start").text(i);n(d,f);}o(t,"byText");function e(i,a,s,l,u,h,f,d){let{actorFontSize:p,actorFontFamily:m,actorFontWeight:g}=d,y=i.split(Ze.lineBreakRegex);for(let v=0;v<y.length;v++){let x=v*p-p*(y.length-1)/2,b=a.append("text").attr("x",s).attr("y",l).style("text-anchor","start").style("font-size",p).style("font-weight",g).style("font-family",m);b.append("tspan").attr("x",s).attr("dy",x).text(y[v]),b.attr("y",l+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(b,f);}}o(e,"byTspan");function r(i,a,s,l,u,h,f,d){let p=a.append("switch"),g=p.append("foreignObject").attr("x",s).attr("y",l).attr("width",u).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,s,l,u,h,f,d),n(g,f);}o(r,"byFo");function n(i,a){for(let s in a)a.hasOwnProperty(s)&&i.attr(s,a[s]);}return o(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e;};}(),di={drawRect:dP,drawText:Ip,drawLabel:Ode,drawActor:UUe,drawBox:HUe,drawPopup:$Ue,anchorElement:WUe,drawActivation:qUe,drawLoop:YUe,drawBackgroundRect:Pde,insertArrowHead:QUe,insertArrowFilledHead:ZUe,insertSequenceNumber:JUe,insertArrowCrossHead:eHe,insertDatabaseIcon:XUe,insertComputerIcon:jUe,insertClockIcon:KUe,getTextObj:Bde,getNoteRect:tHe,fixLifeLineHeights:pP,sanitizeUrl:fP.sanitizeUrl};});async function iHe(t,e){rt.bumpVerticalPos(10);let{startx:r,stopx:n,message:i}=e,a=Ze.splitBreaks(i).length,s=gi(i),l=s?await nd(i,ge()):Vt.calculateTextDimensions(i,Op(Ne));if(!s){let d=l.height/a;e.height+=d,rt.bumpVerticalPos(d);}let u,h=l.height-10,f=l.width;if(r===n){u=rt.getVerticalPos()+h,Ne.rightAngles||(h+=Ne.boxMargin,u=rt.getVerticalPos()+h),h+=30;let d=Ze.getMax(f/2,Ne.width/2);rt.insert(r-d,rt.getVerticalPos()-10+h,n+d,rt.getVerticalPos()+30+h);}else h+=Ne.boxMargin,u=rt.getVerticalPos()+h,rt.insert(r,u-10,n,u);return rt.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,rt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),u;}function qc(t,e,r,n,i){rt.bumpVerticalPos(r);let a=n;if(e.id&&e.message&&t[e.id]){let s=t[e.id].width,l=Op(Ne);e.message=Vt.wrapLabel(`[${e.message}]`,s-2*Ne.wrapPadding,l),e.width=s,e.wrap=!0;let u=Vt.calculateTextDimensions(e.message,l),h=Ze.getMax(u.height,Ne.labelBoxHeight);a=n+h,X.debug(`${h} - ${e.message}`);}i(e),rt.bumpVerticalPos(a);}function oHe(t,e,r,n,i,a,s){function l(h,f){h.x<i.get(t.from).x?(rt.insert(e.stopx-f,e.starty,e.startx,e.stopy+h.height/2+Ne.noteMargin),e.stopx=e.stopx+f):(rt.insert(e.startx,e.starty,e.stopx+f,e.stopy+h.height/2+Ne.noteMargin),e.stopx=e.stopx-f);}o(l,"receiverAdjustment");function u(h,f){h.x<i.get(t.to).x?(rt.insert(e.startx-f,e.starty,e.stopx,e.stopy+h.height/2+Ne.noteMargin),e.startx=e.startx+f):(rt.insert(e.stopx,e.starty,e.startx+f,e.stopy+h.height/2+Ne.noteMargin),e.startx=e.startx-f);}if(o(u,"senderAdjustment"),a.get(t.to)==n){let h=i.get(t.to),f=h.type=="actor"?bf/2+3:h.width/2+3;l(h,f),h.starty=r-h.height/2,rt.bumpVerticalPos(h.height/2);}else if(s.get(t.from)==n){let h=i.get(t.from);if(Ne.mirrorActors){let f=h.type=="actor"?bf/2:h.width/2;u(h,f);}h.stopy=r-h.height/2,rt.bumpVerticalPos(h.height/2);}else if(s.get(t.to)==n){let h=i.get(t.to);if(Ne.mirrorActors){let f=h.type=="actor"?bf/2+3:h.width/2+3;l(h,f);}h.stopy=r-h.height/2,rt.bumpVerticalPos(h.height/2);}}async function cHe(t,e,r){let n={};for(let i of e)if(t.get(i.to)&&t.get(i.from)){let a=t.get(i.to);if(i.placement===r.db.PLACEMENT.LEFTOF&&!a.prevActor||i.placement===r.db.PLACEMENT.RIGHTOF&&!a.nextActor)continue;let s=i.placement!==void 0,l=!s,u=s?L1(Ne):Op(Ne),h=i.wrap?Vt.wrapLabel(i.message,Ne.width-2*Ne.wrapPadding,u):i.message,d=(gi(h)?await nd(i.message,ge()):Vt.calculateTextDimensions(h,u)).width+2*Ne.wrapPadding;l&&i.from===a.nextActor?n[i.to]=Ze.getMax(n[i.to]||0,d):l&&i.from===a.prevActor?n[i.from]=Ze.getMax(n[i.from]||0,d):l&&i.from===i.to?(n[i.from]=Ze.getMax(n[i.from]||0,d/2),n[i.to]=Ze.getMax(n[i.to]||0,d/2)):i.placement===r.db.PLACEMENT.RIGHTOF?n[i.from]=Ze.getMax(n[i.from]||0,d):i.placement===r.db.PLACEMENT.LEFTOF?n[a.prevActor]=Ze.getMax(n[a.prevActor]||0,d):i.placement===r.db.PLACEMENT.OVER&&(a.prevActor&&(n[a.prevActor]=Ze.getMax(n[a.prevActor]||0,d/2)),a.nextActor&&(n[i.from]=Ze.getMax(n[i.from]||0,d/2)));}return X.debug("maxMessageWidthPerActor:",n),n;}async function hHe(t,e,r){let n=0;for(let a of t.keys()){let s=t.get(a);s.wrap&&(s.description=Vt.wrapLabel(s.description,Ne.width-2*Ne.wrapPadding,gP(Ne)));let l=gi(s.description)?await nd(s.description,ge()):Vt.calculateTextDimensions(s.description,gP(Ne));s.width=s.wrap?Ne.width:Ze.getMax(Ne.width,l.width+2*Ne.wrapPadding),s.height=s.wrap?Ze.getMax(l.height,Ne.height):Ne.height,n=Ze.getMax(n,s.height);}for(let a in e){let s=t.get(a);if(!s)continue;let l=t.get(s.nextActor);if(!l){let d=e[a]+Ne.actorMargin-s.width/2;s.margin=Ze.getMax(d,Ne.actorMargin);continue;}let h=e[a]+Ne.actorMargin-s.width/2-l.width/2;s.margin=Ze.getMax(h,Ne.actorMargin);}let i=0;return r.forEach(a=>{let s=Op(Ne),l=a.actorKeys.reduce((f,d)=>f+=t.get(d).width+(t.get(d).margin||0),0);l-=2*Ne.boxTextMargin,a.wrap&&(a.name=Vt.wrapLabel(a.name,l-2*Ne.wrapPadding,s));let u=Vt.calculateTextDimensions(a.name,s);i=Ze.getMax(u.height,i);let h=Ze.getMax(l,u.width+2*Ne.wrapPadding);if(a.margin=Ne.boxTextMargin,l<h){let f=(h-l)/2;a.margin+=f;}}),r.forEach(a=>a.textMaxHeight=i),Ze.getMax(n,Ne.height);}var Ne,rt,nHe,Op,L1,gP,aHe,sHe,yP,zde,Gde,WS,$de,lHe,uHe,fHe,dHe,pHe,Vde,Ude=N(()=>{"use strict";pr();Fde();yt();dr();dr();Jv();qt();c0();nr();yi();Ne={},rt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:o(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(t=>t.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e));},"getHeight"),clear:o(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[];},"clear"),addBox:o(function(t){this.boxes.push(t);},"addBox"),addActor:o(function(t){this.actors.push(t);},"addActor"),addLoop:o(function(t){this.loops.push(t);},"addLoop"),addMessage:o(function(t){this.messages.push(t);},"addMessage"),addNote:o(function(t){this.notes.push(t);},"addNote"),lastActor:o(function(){return this.actors[this.actors.length-1];},"lastActor"),lastLoop:o(function(){return this.loops[this.loops.length-1];},"lastLoop"),lastMessage:o(function(){return this.messages[this.messages.length-1];},"lastMessage"),lastNote:o(function(){return this.notes[this.notes.length-1];},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:o(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Gde(ge());},"init"),updateVal:o(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e]);},"updateVal"),updateBounds:o(function(t,e,r,n){let i=this,a=0;function s(l){return o(function(h){a++;let f=i.sequenceItems.length-a+1;i.updateVal(h,"starty",e-f*Ne.boxMargin,Math.min),i.updateVal(h,"stopy",n+f*Ne.boxMargin,Math.max),i.updateVal(rt.data,"startx",t-f*Ne.boxMargin,Math.min),i.updateVal(rt.data,"stopx",r+f*Ne.boxMargin,Math.max),l!=="activation"&&(i.updateVal(h,"startx",t-f*Ne.boxMargin,Math.min),i.updateVal(h,"stopx",r+f*Ne.boxMargin,Math.max),i.updateVal(rt.data,"starty",e-f*Ne.boxMargin,Math.min),i.updateVal(rt.data,"stopy",n+f*Ne.boxMargin,Math.max));},"updateItemBounds");}o(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"));},"updateBounds"),insert:o(function(t,e,r,n){let i=Ze.getMin(t,r),a=Ze.getMax(t,r),s=Ze.getMin(e,n),l=Ze.getMax(e,n);this.updateVal(rt.data,"startx",i,Math.min),this.updateVal(rt.data,"starty",s,Math.min),this.updateVal(rt.data,"stopx",a,Math.max),this.updateVal(rt.data,"stopy",l,Math.max),this.updateBounds(i,s,a,l);},"insert"),newActivation:o(function(t,e,r){let n=r.get(t.from),i=WS(t.from).length||0,a=n.x+n.width/2+(i-1)*Ne.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Ne.activationWidth,stopy:void 0,actor:t.from,anchored:di.anchorElement(e)});},"newActivation"),endActivation:o(function(t){let e=this.activations.map(function(r){return r.actor;}).lastIndexOf(t.from);return this.activations.splice(e,1)[0];},"endActivation"),createLoop:o(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e};},"createLoop"),newLoop:o(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e));},"newLoop"),endLoop:o(function(){return this.sequenceItems.pop();},"endLoop"),isLoopOverlap:o(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1;},"isLoopOverlap"),addSectionToLoop:o(function(t){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:rt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e);},"addSectionToLoop"),saveVerticalPos:o(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos);},"saveVerticalPos"),resetVerticalPos:o(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos);},"resetVerticalPos"),bumpVerticalPos:o(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=Ze.getMax(this.data.stopy,this.verticalPos);},"bumpVerticalPos"),getVerticalPos:o(function(){return this.verticalPos;},"getVerticalPos"),getBounds:o(function(){return{bounds:this.data,models:this.models};},"getBounds")},nHe=o(async function(t,e){rt.bumpVerticalPos(Ne.boxMargin),e.height=Ne.boxMargin,e.starty=rt.getVerticalPos();let r=Sl();r.x=e.startx,r.y=e.starty,r.width=e.width||Ne.width,r.class="note";let n=t.append("g"),i=di.drawRect(n,r),a=Zv();a.x=e.startx,a.y=e.starty,a.width=r.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=Ne.noteFontFamily,a.fontSize=Ne.noteFontSize,a.fontWeight=Ne.noteFontWeight,a.anchor=Ne.noteAlign,a.textMargin=Ne.noteMargin,a.valign="center";let s=gi(a.text)?await Nb(n,a):Ip(n,a),l=Math.round(s.map(u=>(u._groups||u)[0][0].getBBox().height).reduce((u,h)=>u+h));i.attr("height",l+2*Ne.noteMargin),e.height+=l+2*Ne.noteMargin,rt.bumpVerticalPos(l+2*Ne.noteMargin),e.stopy=e.starty+l+2*Ne.noteMargin,e.stopx=e.startx+r.width,rt.insert(e.startx,e.starty,e.stopx,e.stopy),rt.models.addNote(e);},"drawNote"),Op=o(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),L1=o(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),gP=o(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");o(iHe,"boundMessage");aHe=o(async function(t,e,r,n){let{startx:i,stopx:a,starty:s,message:l,type:u,sequenceIndex:h,sequenceVisible:f}=e,d=Vt.calculateTextDimensions(l,Op(Ne)),p=Zv();p.x=i,p.y=s+10,p.width=a-i,p.class="messageText",p.dy="1em",p.text=l,p.fontFamily=Ne.messageFontFamily,p.fontSize=Ne.messageFontSize,p.fontWeight=Ne.messageFontWeight,p.anchor=Ne.messageAlign,p.valign="center",p.textMargin=Ne.wrapPadding,p.tspan=!1,gi(p.text)?await Nb(t,p,{startx:i,stopx:a,starty:r}):Ip(t,p);let m=d.width,g;i===a?Ne.rightAngles?g=t.append("path").attr("d",`M  ${i},${r} H ${i+Ze.getMax(Ne.width/2,m/2)} V ${r+25} H ${i}`):g=t.append("path").attr("d","M "+i+","+r+" C "+(i+60)+","+(r-10)+" "+(i+60)+","+(r+30)+" "+i+","+(r+20)):(g=t.append("line"),g.attr("x1",i),g.attr("y1",r),g.attr("x2",a),g.attr("y2",r)),u===n.db.LINETYPE.DOTTED||u===n.db.LINETYPE.DOTTED_CROSS||u===n.db.LINETYPE.DOTTED_POINT||u===n.db.LINETYPE.DOTTED_OPEN||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(g.style("stroke-dasharray","3, 3"),g.attr("class","messageLine1")):g.attr("class","messageLine0");let y="";Ne.arrowMarkerAbsolute&&(y=fu(!0)),g.attr("stroke-width",2),g.attr("stroke","none"),g.style("fill","none"),(u===n.db.LINETYPE.SOLID||u===n.db.LINETYPE.DOTTED)&&g.attr("marker-end","url("+y+"#arrowhead)"),(u===n.db.LINETYPE.BIDIRECTIONAL_SOLID||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(g.attr("marker-start","url("+y+"#arrowhead)"),g.attr("marker-end","url("+y+"#arrowhead)")),(u===n.db.LINETYPE.SOLID_POINT||u===n.db.LINETYPE.DOTTED_POINT)&&g.attr("marker-end","url("+y+"#filled-head)"),(u===n.db.LINETYPE.SOLID_CROSS||u===n.db.LINETYPE.DOTTED_CROSS)&&g.attr("marker-end","url("+y+"#crosshead)"),(f||Ne.showSequenceNumbers)&&((u===n.db.LINETYPE.BIDIRECTIONAL_SOLID||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(i<a?g.attr("x1",i+2*6):g.attr("x1",i+6)),t.append("line").attr("x1",i).attr("y1",r).attr("x2",i).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+y+"#sequencenumber)"),t.append("text").attr("x",i).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h));},"drawMessage"),sHe=o(function(t,e,r,n,i,a,s){let l=0,u=0,h,f=0;for(let d of n){let p=e.get(d),m=p.box;h&&h!=m&&(s||rt.models.addBox(h),u+=Ne.boxMargin+h.margin),m&&m!=h&&(s||(m.x=l+u,m.y=i),u+=m.margin),p.width=p.width||Ne.width,p.height=Ze.getMax(p.height||Ne.height,Ne.height),p.margin=p.margin||Ne.actorMargin,f=Ze.getMax(f,p.height),r.get(p.name)&&(u+=p.width/2),p.x=l+u,p.starty=rt.getVerticalPos(),rt.insert(p.x,i,p.x+p.width,p.height),l+=p.width+u,p.box&&(p.box.width=l+m.margin-p.box.x),u=p.margin,h=p.box,rt.models.addActor(p);}h&&!s&&rt.models.addBox(h),rt.bumpVerticalPos(f);},"addActorRenderingData"),yP=o(async function(t,e,r,n){if(n){let i=0;rt.bumpVerticalPos(Ne.boxMargin*2);for(let a of r){let s=e.get(a);s.stopy||(s.stopy=rt.getVerticalPos());let l=await di.drawActor(t,s,Ne,!0);i=Ze.getMax(i,l);}rt.bumpVerticalPos(i+Ne.boxMargin);}else for(let i of r){let a=e.get(i);await di.drawActor(t,a,Ne,!1);}},"drawActors"),zde=o(function(t,e,r,n){let i=0,a=0;for(let s of r){let l=e.get(s),u=uHe(l),h=di.drawPopup(t,l,u,Ne,Ne.forceMenus,n);h.height>i&&(i=h.height),h.width+l.x>a&&(a=h.width+l.x);}return{maxHeight:i,maxWidth:a};},"drawActorsPopup"),Gde=o(function(t){Gn(Ne,t),t.fontFamily&&(Ne.actorFontFamily=Ne.noteFontFamily=Ne.messageFontFamily=t.fontFamily),t.fontSize&&(Ne.actorFontSize=Ne.noteFontSize=Ne.messageFontSize=t.fontSize),t.fontWeight&&(Ne.actorFontWeight=Ne.noteFontWeight=Ne.messageFontWeight=t.fontWeight);},"setConf"),WS=o(function(t){return rt.activations.filter(function(e){return e.actor===t;});},"actorActivations"),$de=o(function(t,e){let r=e.get(t),n=WS(t),i=n.reduce(function(s,l){return Ze.getMin(s,l.startx);},r.x+r.width/2-1),a=n.reduce(function(s,l){return Ze.getMax(s,l.stopx);},r.x+r.width/2+1);return[i,a];},"activationBounds");o(qc,"adjustLoopHeightForWrap");o(oHe,"adjustCreatedDestroyedData");lHe=o(async function(t,e,r,n){let{securityLevel:i,sequence:a}=ge();Ne=a;let s;i==="sandbox"&&(s=Ge("#i"+e));let l=i==="sandbox"?Ge(s.nodes()[0].contentDocument.body):Ge("body"),u=i==="sandbox"?s.nodes()[0].contentDocument:document;rt.init(),X.debug(n.db);let h=i==="sandbox"?l.select(`[id="${e}"]`):Ge(`[id="${e}"]`),f=n.db.getActors(),d=n.db.getCreatedActors(),p=n.db.getDestroyedActors(),m=n.db.getBoxes(),g=n.db.getActorKeys(),y=n.db.getMessages(),v=n.db.getDiagramTitle(),x=n.db.hasAtLeastOneBox(),b=n.db.hasAtLeastOneBoxWithTitle(),T=await cHe(f,y,n);if(Ne.height=await hHe(f,T,m),di.insertComputerIcon(h),di.insertDatabaseIcon(h),di.insertClockIcon(h),x&&(rt.bumpVerticalPos(Ne.boxMargin),b&&rt.bumpVerticalPos(m[0].textMaxHeight)),Ne.hideUnusedParticipants===!0){let B=new Set();y.forEach(F=>{B.add(F.from),B.add(F.to);}),g=g.filter(F=>B.has(F));}sHe(h,f,d,g,0,y,!1);let C=await pHe(y,f,T,n);di.insertArrowHead(h),di.insertArrowCrossHead(h),di.insertArrowFilledHead(h),di.insertSequenceNumber(h);function w(B,F){let z=rt.endActivation(B);z.starty+18>F&&(z.starty=F-6,F+=12),di.drawActivation(h,z,F,Ne,WS(B.from).length),rt.insert(z.startx,F-10,z.stopx,F);}o(w,"activeEnd");let E=1,_=1,A=[],D=[],O=0;for(let B of y){let F,z,$;switch(B.type){case n.db.LINETYPE.NOTE:rt.resetVerticalPos(),z=B.noteModel,await nHe(h,z);break;case n.db.LINETYPE.ACTIVE_START:rt.newActivation(B,h,f);break;case n.db.LINETYPE.ACTIVE_END:w(B,rt.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:qc(C,B,Ne.boxMargin,Ne.boxMargin+Ne.boxTextMargin,U=>rt.newLoop(U));break;case n.db.LINETYPE.LOOP_END:F=rt.endLoop(),await di.drawLoop(h,F,"loop",Ne),rt.bumpVerticalPos(F.stopy-rt.getVerticalPos()),rt.models.addLoop(F);break;case n.db.LINETYPE.RECT_START:qc(C,B,Ne.boxMargin,Ne.boxMargin,U=>rt.newLoop(void 0,U.message));break;case n.db.LINETYPE.RECT_END:F=rt.endLoop(),D.push(F),rt.models.addLoop(F),rt.bumpVerticalPos(F.stopy-rt.getVerticalPos());break;case n.db.LINETYPE.OPT_START:qc(C,B,Ne.boxMargin,Ne.boxMargin+Ne.boxTextMargin,U=>rt.newLoop(U));break;case n.db.LINETYPE.OPT_END:F=rt.endLoop(),await di.drawLoop(h,F,"opt",Ne),rt.bumpVerticalPos(F.stopy-rt.getVerticalPos()),rt.models.addLoop(F);break;case n.db.LINETYPE.ALT_START:qc(C,B,Ne.boxMargin,Ne.boxMargin+Ne.boxTextMargin,U=>rt.newLoop(U));break;case n.db.LINETYPE.ALT_ELSE:qc(C,B,Ne.boxMargin+Ne.boxTextMargin,Ne.boxMargin,U=>rt.addSectionToLoop(U));break;case n.db.LINETYPE.ALT_END:F=rt.endLoop(),await di.drawLoop(h,F,"alt",Ne),rt.bumpVerticalPos(F.stopy-rt.getVerticalPos()),rt.models.addLoop(F);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:qc(C,B,Ne.boxMargin,Ne.boxMargin+Ne.boxTextMargin,U=>rt.newLoop(U)),rt.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:qc(C,B,Ne.boxMargin+Ne.boxTextMargin,Ne.boxMargin,U=>rt.addSectionToLoop(U));break;case n.db.LINETYPE.PAR_END:F=rt.endLoop(),await di.drawLoop(h,F,"par",Ne),rt.bumpVerticalPos(F.stopy-rt.getVerticalPos()),rt.models.addLoop(F);break;case n.db.LINETYPE.AUTONUMBER:E=B.message.start||E,_=B.message.step||_,B.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:qc(C,B,Ne.boxMargin,Ne.boxMargin+Ne.boxTextMargin,U=>rt.newLoop(U));break;case n.db.LINETYPE.CRITICAL_OPTION:qc(C,B,Ne.boxMargin+Ne.boxTextMargin,Ne.boxMargin,U=>rt.addSectionToLoop(U));break;case n.db.LINETYPE.CRITICAL_END:F=rt.endLoop(),await di.drawLoop(h,F,"critical",Ne),rt.bumpVerticalPos(F.stopy-rt.getVerticalPos()),rt.models.addLoop(F);break;case n.db.LINETYPE.BREAK_START:qc(C,B,Ne.boxMargin,Ne.boxMargin+Ne.boxTextMargin,U=>rt.newLoop(U));break;case n.db.LINETYPE.BREAK_END:F=rt.endLoop(),await di.drawLoop(h,F,"break",Ne),rt.bumpVerticalPos(F.stopy-rt.getVerticalPos()),rt.models.addLoop(F);break;default:try{$=B.msgModel,$.starty=rt.getVerticalPos(),$.sequenceIndex=E,$.sequenceVisible=n.db.showSequenceNumbers();let U=await iHe(h,$);oHe(B,$,U,O,f,d,p),A.push({messageModel:$,lineStartY:U}),rt.models.addMessage($);}catch(U){X.error("error while drawing message",U);}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(B.type)&&(E=E+_),O++;}X.debug("createdActors",d),X.debug("destroyedActors",p),await yP(h,f,g,!1);for(let B of A)await aHe(h,B.messageModel,B.lineStartY,n);Ne.mirrorActors&&(await yP(h,f,g,!0)),D.forEach(B=>di.drawBackgroundRect(h,B)),pP(h,f,g,Ne);for(let B of rt.models.boxes)B.height=rt.getVerticalPos()-B.y,rt.insert(B.x,B.y,B.x+B.width,B.height),B.startx=B.x,B.starty=B.y,B.stopx=B.startx+B.width,B.stopy=B.starty+B.height,B.stroke="rgb(0,0,0, 0.5)",di.drawBox(h,B,Ne);x&&rt.bumpVerticalPos(Ne.boxMargin);let R=zde(h,f,g,u),{bounds:k}=rt.getBounds();k.startx===void 0&&(k.startx=0),k.starty===void 0&&(k.starty=0),k.stopx===void 0&&(k.stopx=0),k.stopy===void 0&&(k.stopy=0);let L=k.stopy-k.starty;L<R.maxHeight&&(L=R.maxHeight);let S=L+2*Ne.diagramMarginY;Ne.mirrorActors&&(S=S-Ne.boxMargin+Ne.bottomMarginAdj);let I=k.stopx-k.startx;I<R.maxWidth&&(I=R.maxWidth);let M=I+2*Ne.diagramMarginX;v&&h.append("text").text(v).attr("x",(k.stopx-k.startx)/2-2*Ne.diagramMarginX).attr("y",-25),hn(h,S,M,Ne.useMaxWidth);let P=v?40:0;h.attr("viewBox",k.startx-Ne.diagramMarginX+" -"+(Ne.diagramMarginY+P)+" "+M+" "+(S+P)),X.debug("models:",rt.models);},"draw");o(cHe,"getMaxMessageWidthPerActor");uHe=o(function(t){let e=0,r=gP(Ne);for(let n in t.links){let a=Vt.calculateTextDimensions(n,r).width+2*Ne.wrapPadding+2*Ne.boxMargin;e<a&&(e=a);}return e;},"getRequiredPopupWidth");o(hHe,"calculateActorMargins");fHe=o(async function(t,e,r){let n=e.get(t.from),i=e.get(t.to),a=n.x,s=i.x,l=t.wrap&&t.message,u=gi(t.message)?await nd(t.message,ge()):Vt.calculateTextDimensions(l?Vt.wrapLabel(t.message,Ne.width,L1(Ne)):t.message,L1(Ne)),h={width:l?Ne.width:Ze.getMax(Ne.width,u.width+2*Ne.noteMargin),height:0,startx:n.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(h.width=l?Ze.getMax(Ne.width,u.width):Ze.getMax(n.width/2+i.width/2,u.width+2*Ne.noteMargin),h.startx=a+(n.width+Ne.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(h.width=l?Ze.getMax(Ne.width,u.width+2*Ne.noteMargin):Ze.getMax(n.width/2+i.width/2,u.width+2*Ne.noteMargin),h.startx=a-h.width+(n.width-Ne.actorMargin)/2):t.to===t.from?(u=Vt.calculateTextDimensions(l?Vt.wrapLabel(t.message,Ze.getMax(Ne.width,n.width),L1(Ne)):t.message,L1(Ne)),h.width=l?Ze.getMax(Ne.width,n.width):Ze.getMax(n.width,Ne.width,u.width+2*Ne.noteMargin),h.startx=a+(n.width-h.width)/2):(h.width=Math.abs(a+n.width/2-(s+i.width/2))+Ne.actorMargin,h.startx=a<s?a+n.width/2-Ne.actorMargin/2:s+i.width/2-Ne.actorMargin/2),l&&(h.message=Vt.wrapLabel(t.message,h.width-2*Ne.wrapPadding,L1(Ne))),X.debug(`NM:[${h.startx},${h.stopx},${h.starty},${h.stopy}:${h.width},${h.height}=${t.message}]`),h;},"buildNoteModel"),dHe=o(function(t,e,r){if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type))return{};let[n,i]=$de(t.from,e),[a,s]=$de(t.to,e),l=n<=a,u=l?i:n,h=l?a:s,f=Math.abs(a-s)>2,d=o(y=>l?-y:y,"adjustValue");t.from===t.to?h=u:(t.activate&&!f&&(h+=d(Ne.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(h+=d(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(u-=d(3)));let p=[n,i,a,s],m=Math.abs(u-h);t.wrap&&t.message&&(t.message=Vt.wrapLabel(t.message,Ze.getMax(m+2*Ne.wrapPadding,Ne.width),Op(Ne)));let g=Vt.calculateTextDimensions(t.message,Op(Ne));return{width:Ze.getMax(t.wrap?0:g.width+2*Ne.wrapPadding,m+2*Ne.wrapPadding,Ne.width),height:0,startx:u,stopx:h,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,p),toBounds:Math.max.apply(null,p)};},"buildMessageModel"),pHe=o(async function(t,e,r,n){let i={},a=[],s,l,u;for(let h of t){switch(h.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:a.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:h.message&&(s=a.pop(),i[s.id]=s,i[h.id]=s,a.push(s));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:s=a.pop(),i[s.id]=s;break;case n.db.LINETYPE.ACTIVE_START:{let d=e.get(h.from?h.from:h.to.actor),p=WS(h.from?h.from:h.to.actor).length,m=d.x+d.width/2+(p-1)*Ne.activationWidth/2,g={startx:m,stopx:m+Ne.activationWidth,actor:h.from,enabled:!0};rt.activations.push(g);}break;case n.db.LINETYPE.ACTIVE_END:{let d=rt.activations.map(p=>p.actor).lastIndexOf(h.from);rt.activations.splice(d,1).splice(0,1);}break;}h.placement!==void 0?(l=await fHe(h,e,n),h.noteModel=l,a.forEach(d=>{s=d,s.from=Ze.getMin(s.from,l.startx),s.to=Ze.getMax(s.to,l.startx+l.width),s.width=Ze.getMax(s.width,Math.abs(s.from-s.to))-Ne.labelBoxWidth;})):(u=dHe(h,e,n),h.msgModel=u,u.startx&&u.stopx&&a.length>0&&a.forEach(d=>{if(s=d,u.startx===u.stopx){let p=e.get(h.from),m=e.get(h.to);s.from=Ze.getMin(p.x-u.width/2,p.x-p.width/2,s.from),s.to=Ze.getMax(m.x+u.width/2,m.x+p.width/2,s.to),s.width=Ze.getMax(s.width,Math.abs(s.to-s.from))-Ne.labelBoxWidth;}else s.from=Ze.getMin(u.startx,s.from),s.to=Ze.getMax(u.stopx,s.to),s.width=Ze.getMax(s.width,u.width)-Ne.labelBoxWidth;}));}return rt.activations=[],X.debug("Loop type widths:",i),i;},"calculateLoopBounds"),Vde={bounds:rt,drawActors:yP,drawActorsPopup:zde,setConf:Gde,draw:lHe};});var Hde={};hr(Hde,{diagram:()=>mHe});var mHe,Wde=N(()=>{"use strict";_de();Dde();Rde();qt();Ude();mHe={parser:Ade,get db(){return new HS();},renderer:Vde,styles:Lde,init:o(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,ev({sequence:{wrap:t.wrap}}));},"init")};});var vP,qS,xP=N(()=>{"use strict";vP=function(){var t=o(function(Ie,xe,q,de){for(q=q||{},de=Ie.length;de--;q[Ie[de]]=xe);return q;},"o"),e=[1,18],r=[1,19],n=[1,20],i=[1,41],a=[1,42],s=[1,26],l=[1,24],u=[1,25],h=[1,32],f=[1,33],d=[1,34],p=[1,45],m=[1,35],g=[1,36],y=[1,37],v=[1,38],x=[1,27],b=[1,28],T=[1,29],C=[1,30],w=[1,31],E=[1,44],_=[1,46],A=[1,43],D=[1,47],O=[1,9],R=[1,8,9],k=[1,58],L=[1,59],S=[1,60],I=[1,61],M=[1,62],P=[1,63],B=[1,64],F=[1,8,9,41],z=[1,76],$=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],U=[1,8,9,12,13,18,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],K=[13,58,84,99,101,102],ee=[13,58,71,72,84,99,101,102],Y=[13,58,66,67,68,69,70,84,99,101,102],ce=[1,99],Z=[1,116],ue=[1,108],Q=[1,114],j=[1,109],ne=[1,110],te=[1,111],he=[1,112],le=[1,113],J=[1,115],Se=[22,58,59,80,84,85,86,87,88,89],se=[1,8,9,39,41,44],ae=[1,8,9,22],Oe=[1,144],ye=[1,8,9,59],Be=[1,8,9,22,58,59,80,84,85,86,87,88,89],He={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[17,1],[53,1]],performAction:o(function(xe,q,de,ie,oe,V,Te){var W=V.length-1;switch(oe){case 8:this.$=V[W-1];break;case 9:case 10:case 13:case 15:this.$=V[W];break;case 11:case 14:this.$=V[W-2]+"."+V[W];break;case 12:case 16:this.$=V[W-1]+V[W];break;case 17:case 18:this.$=V[W-1]+"~"+V[W]+"~";break;case 19:ie.addRelation(V[W]);break;case 20:V[W-1].title=ie.cleanupLabel(V[W]),ie.addRelation(V[W-1]);break;case 31:this.$=V[W].trim(),ie.setAccTitle(this.$);break;case 32:case 33:this.$=V[W].trim(),ie.setAccDescription(this.$);break;case 34:ie.addClassesToNamespace(V[W-3],V[W-1]);break;case 35:ie.addClassesToNamespace(V[W-4],V[W-1]);break;case 36:this.$=V[W],ie.addNamespace(V[W]);break;case 37:this.$=[V[W]];break;case 38:this.$=[V[W-1]];break;case 39:V[W].unshift(V[W-2]),this.$=V[W];break;case 41:ie.setCssClass(V[W-2],V[W]);break;case 42:ie.addMembers(V[W-3],V[W-1]);break;case 43:ie.setCssClass(V[W-5],V[W-3]),ie.addMembers(V[W-5],V[W-1]);break;case 44:this.$=V[W],ie.addClass(V[W]);break;case 45:this.$=V[W-1],ie.addClass(V[W-1]),ie.setClassLabel(V[W-1],V[W]);break;case 46:ie.addAnnotation(V[W],V[W-2]);break;case 47:case 60:this.$=[V[W]];break;case 48:V[W].push(V[W-1]),this.$=V[W];break;case 49:break;case 50:ie.addMember(V[W-1],ie.cleanupLabel(V[W]));break;case 51:break;case 52:break;case 53:this.$={id1:V[W-2],id2:V[W],relation:V[W-1],relationTitle1:"none",relationTitle2:"none"};break;case 54:this.$={id1:V[W-3],id2:V[W],relation:V[W-1],relationTitle1:V[W-2],relationTitle2:"none"};break;case 55:this.$={id1:V[W-3],id2:V[W],relation:V[W-2],relationTitle1:"none",relationTitle2:V[W-1]};break;case 56:this.$={id1:V[W-4],id2:V[W],relation:V[W-2],relationTitle1:V[W-3],relationTitle2:V[W-1]};break;case 57:ie.addNote(V[W],V[W-1]);break;case 58:ie.addNote(V[W]);break;case 59:this.$=V[W-2],ie.defineClass(V[W-1],V[W]);break;case 61:this.$=V[W-2].concat([V[W]]);break;case 62:ie.setDirection("TB");break;case 63:ie.setDirection("BT");break;case 64:ie.setDirection("RL");break;case 65:ie.setDirection("LR");break;case 66:this.$={type1:V[W-2],type2:V[W],lineType:V[W-1]};break;case 67:this.$={type1:"none",type2:V[W],lineType:V[W-1]};break;case 68:this.$={type1:V[W-1],type2:"none",lineType:V[W]};break;case 69:this.$={type1:"none",type2:"none",lineType:V[W]};break;case 70:this.$=ie.relationType.AGGREGATION;break;case 71:this.$=ie.relationType.EXTENSION;break;case 72:this.$=ie.relationType.COMPOSITION;break;case 73:this.$=ie.relationType.DEPENDENCY;break;case 74:this.$=ie.relationType.LOLLIPOP;break;case 75:this.$=ie.lineType.LINE;break;case 76:this.$=ie.lineType.DOTTED_LINE;break;case 77:case 83:this.$=V[W-2],ie.setClickEvent(V[W-1],V[W]);break;case 78:case 84:this.$=V[W-3],ie.setClickEvent(V[W-2],V[W-1]),ie.setTooltip(V[W-2],V[W]);break;case 79:this.$=V[W-2],ie.setLink(V[W-1],V[W]);break;case 80:this.$=V[W-3],ie.setLink(V[W-2],V[W-1],V[W]);break;case 81:this.$=V[W-3],ie.setLink(V[W-2],V[W-1]),ie.setTooltip(V[W-2],V[W]);break;case 82:this.$=V[W-4],ie.setLink(V[W-3],V[W-2],V[W]),ie.setTooltip(V[W-3],V[W-1]);break;case 85:this.$=V[W-3],ie.setClickEvent(V[W-2],V[W-1],V[W]);break;case 86:this.$=V[W-4],ie.setClickEvent(V[W-3],V[W-2],V[W-1]),ie.setTooltip(V[W-3],V[W]);break;case 87:this.$=V[W-3],ie.setLink(V[W-2],V[W]);break;case 88:this.$=V[W-4],ie.setLink(V[W-3],V[W-1],V[W]);break;case 89:this.$=V[W-4],ie.setLink(V[W-3],V[W-1]),ie.setTooltip(V[W-3],V[W]);break;case 90:this.$=V[W-5],ie.setLink(V[W-4],V[W-2],V[W]),ie.setTooltip(V[W-4],V[W-1]);break;case 91:this.$=V[W-2],ie.setCssStyle(V[W-1],V[W]);break;case 92:ie.setCssClass(V[W-1],V[W]);break;case 93:this.$=[V[W]];break;case 94:V[W-2].push(V[W]),this.$=V[W-2];break;case 96:this.$=V[W-1]+V[W];break;}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:i,43:23,46:a,47:s,49:l,50:u,52:h,54:f,55:d,58:p,60:m,61:g,62:y,63:v,73:x,74:b,76:T,80:C,81:w,84:E,99:_,101:A,102:D},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(O,[2,5],{8:[1,48]}),{8:[1,49]},t(R,[2,19],{22:[1,50]}),t(R,[2,21]),t(R,[2,22]),t(R,[2,23]),t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),t(R,[2,27]),t(R,[2,28]),t(R,[2,29]),t(R,[2,30]),{34:[1,51]},{36:[1,52]},t(R,[2,33]),t(R,[2,49],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:k,67:L,68:S,69:I,70:M,71:P,72:B}),{39:[1,65]},t(F,[2,40],{39:[1,67],44:[1,66]}),t(R,[2,51]),t(R,[2,52]),{16:68,58:p,84:E,99:_,101:A},{16:39,17:40,19:69,58:p,84:E,99:_,101:A,102:D},{16:39,17:40,19:70,58:p,84:E,99:_,101:A,102:D},{16:39,17:40,19:71,58:p,84:E,99:_,101:A,102:D},{58:[1,72]},{13:[1,73]},{16:39,17:40,19:74,58:p,84:E,99:_,101:A,102:D},{13:z,53:75},{56:77,58:[1,78]},t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t($,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],58:p,84:E,99:_,101:A,102:D}),t($,[2,15],{20:[1,82]}),{15:83,16:84,17:85,58:p,84:E,99:_,101:A,102:D},{16:39,17:40,19:86,58:p,84:E,99:_,101:A,102:D},t(U,[2,119]),t(U,[2,120]),t(U,[2,121]),t(U,[2,122]),t([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,123]),t(O,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:e,35:r,37:n,42:i,46:a,47:s,49:l,50:u,52:h,54:f,55:d,58:p,60:m,61:g,62:y,63:v,73:x,74:b,76:T,80:C,81:w,84:E,99:_,101:A,102:D}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:i,43:23,46:a,47:s,49:l,50:u,52:h,54:f,55:d,58:p,60:m,61:g,62:y,63:v,73:x,74:b,76:T,80:C,81:w,84:E,99:_,101:A,102:D},t(R,[2,20]),t(R,[2,31]),t(R,[2,32]),{13:[1,90],16:39,17:40,19:89,58:p,84:E,99:_,101:A,102:D},{51:91,64:56,65:57,66:k,67:L,68:S,69:I,70:M,71:P,72:B},t(R,[2,50]),{65:92,71:P,72:B},t(K,[2,69],{64:93,66:k,67:L,68:S,69:I,70:M}),t(ee,[2,70]),t(ee,[2,71]),t(ee,[2,72]),t(ee,[2,73]),t(ee,[2,74]),t(Y,[2,75]),t(Y,[2,76]),{8:[1,95],24:96,40:94,43:23,46:a},{16:97,58:p,84:E,99:_,101:A},{45:98,49:ce},{48:[1,100]},{13:[1,101]},{13:[1,102]},{77:[1,103],79:[1,104]},{22:Z,57:105,58:ue,80:Q,82:106,83:107,84:j,85:ne,86:te,87:he,88:le,89:J},{58:[1,117]},{13:z,53:118},t(R,[2,58]),t(R,[2,124]),{22:Z,57:119,58:ue,59:[1,120],80:Q,82:106,83:107,84:j,85:ne,86:te,87:he,88:le,89:J},t(Se,[2,60]),{16:39,17:40,19:121,58:p,84:E,99:_,101:A,102:D},t($,[2,16]),t($,[2,17]),t($,[2,18]),{39:[2,36]},{15:123,16:84,17:85,18:[1,122],39:[2,9],58:p,84:E,99:_,101:A,102:D},{39:[2,10]},t(se,[2,44],{11:124,12:[1,125]}),t(O,[2,7]),{9:[1,126]},t(ae,[2,53]),{16:39,17:40,19:127,58:p,84:E,99:_,101:A,102:D},{13:[1,129],16:39,17:40,19:128,58:p,84:E,99:_,101:A,102:D},t(K,[2,68],{64:130,66:k,67:L,68:S,69:I,70:M}),t(K,[2,67]),{41:[1,131]},{24:96,40:132,43:23,46:a},{8:[1,133],41:[2,37]},t(F,[2,41],{39:[1,134]}),{41:[1,135]},{41:[2,47],45:136,49:ce},{16:39,17:40,19:137,58:p,84:E,99:_,101:A,102:D},t(R,[2,77],{13:[1,138]}),t(R,[2,79],{13:[1,140],75:[1,139]}),t(R,[2,83],{13:[1,141],78:[1,142]}),{13:[1,143]},t(R,[2,91],{59:Oe}),t(ye,[2,93],{83:145,22:Z,58:ue,80:Q,84:j,85:ne,86:te,87:he,88:le,89:J}),t(Be,[2,95]),t(Be,[2,97]),t(Be,[2,98]),t(Be,[2,99]),t(Be,[2,100]),t(Be,[2,101]),t(Be,[2,102]),t(Be,[2,103]),t(Be,[2,104]),t(Be,[2,105]),t(R,[2,92]),t(R,[2,57]),t(R,[2,59],{59:Oe}),{58:[1,146]},t($,[2,14]),{15:147,16:84,17:85,58:p,84:E,99:_,101:A,102:D},{39:[2,12]},t(se,[2,45]),{13:[1,148]},{1:[2,4]},t(ae,[2,55]),t(ae,[2,54]),{16:39,17:40,19:149,58:p,84:E,99:_,101:A,102:D},t(K,[2,66]),t(R,[2,34]),{41:[1,150]},{24:96,40:151,41:[2,38],43:23,46:a},{45:152,49:ce},t(F,[2,42]),{41:[2,48]},t(R,[2,46]),t(R,[2,78]),t(R,[2,80]),t(R,[2,81],{75:[1,153]}),t(R,[2,84]),t(R,[2,85],{13:[1,154]}),t(R,[2,87],{13:[1,156],75:[1,155]}),{22:Z,58:ue,80:Q,82:157,83:107,84:j,85:ne,86:te,87:he,88:le,89:J},t(Be,[2,96]),t(Se,[2,61]),{39:[2,11]},{14:[1,158]},t(ae,[2,56]),t(R,[2,35]),{41:[2,39]},{41:[1,159]},t(R,[2,82]),t(R,[2,86]),t(R,[2,88]),t(R,[2,89],{75:[1,160]}),t(ye,[2,94],{83:145,22:Z,58:ue,80:Q,84:j,85:ne,86:te,87:he,88:le,89:J}),t(se,[2,8]),t(F,[2,43]),t(R,[2,90])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],123:[2,12],126:[2,4],136:[2,48],147:[2,11],151:[2,39]},parseError:o(function(xe,q){if(q.recoverable)this.trace(xe);else{var de=new Error(xe);throw de.hash=q,de;}},"parseError"),parse:o(function(xe){var q=this,de=[0],ie=[],oe=[null],V=[],Te=this.table,W="",pe=0,ve=0,Pe=0,_e=2,be=1,Ve=V.slice.call(arguments,1),De=Object.create(this.lexer),Ye={yy:{}};for(var at in this.yy)Object.prototype.hasOwnProperty.call(this.yy,at)&&(Ye.yy[at]=this.yy[at]);De.setInput(xe,Ye.yy),Ye.yy.lexer=De,Ye.yy.parser=this,typeof De.yylloc>"u"&&(De.yylloc={});var Rt=De.yylloc;V.push(Rt);var st=De.options&&De.options.ranges;typeof Ye.yy.parseError=="function"?this.parseError=Ye.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ue(kt){de.length=de.length-2*kt,oe.length=oe.length-kt,V.length=V.length-kt;}o(Ue,"popStack");function ut(){var kt;return kt=ie.pop()||De.lex()||be,typeof kt!="number"&&(kt instanceof Array&&(ie=kt,kt=ie.pop()),kt=q.symbols_[kt]||kt),kt;}o(ut,"lex");for(var We,lt,Xt,Tt,Mt,bt,ht={},St,ft,vt,nt;;){if(Xt=de[de.length-1],this.defaultActions[Xt]?Tt=this.defaultActions[Xt]:((We===null||typeof We>"u")&&(We=ut()),Tt=Te[Xt]&&Te[Xt][We]),typeof Tt>"u"||!Tt.length||!Tt[0]){var dn="";nt=[];for(St in Te[Xt])this.terminals_[St]&&St>_e&&nt.push("'"+this.terminals_[St]+"'");De.showPosition?dn="Parse error on line "+(pe+1)+`:
`+De.showPosition()+`
Expecting `+nt.join(", ")+", got '"+(this.terminals_[We]||We)+"'":dn="Parse error on line "+(pe+1)+": Unexpected "+(We==be?"end of input":"'"+(this.terminals_[We]||We)+"'"),this.parseError(dn,{text:De.match,token:this.terminals_[We]||We,line:De.yylineno,loc:Rt,expected:nt});}if(Tt[0]instanceof Array&&Tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Xt+", token: "+We);switch(Tt[0]){case 1:de.push(We),oe.push(De.yytext),V.push(De.yylloc),de.push(Tt[1]),We=null,lt?(We=lt,lt=null):(ve=De.yyleng,W=De.yytext,pe=De.yylineno,Rt=De.yylloc,Pe>0&&Pe--);break;case 2:if(ft=this.productions_[Tt[1]][1],ht.$=oe[oe.length-ft],ht._$={first_line:V[V.length-(ft||1)].first_line,last_line:V[V.length-1].last_line,first_column:V[V.length-(ft||1)].first_column,last_column:V[V.length-1].last_column},st&&(ht._$.range=[V[V.length-(ft||1)].range[0],V[V.length-1].range[1]]),bt=this.performAction.apply(ht,[W,ve,pe,Ye.yy,Tt[1],oe,V].concat(Ve)),typeof bt<"u")return bt;ft&&(de=de.slice(0,-1*ft*2),oe=oe.slice(0,-1*ft),V=V.slice(0,-1*ft)),de.push(this.productions_[Tt[1]][0]),oe.push(ht.$),V.push(ht._$),vt=Te[de[de.length-2]][de[de.length-1]],de.push(vt);break;case 3:return!0;}}return!0;},"parse")},ze=function(){var Ie={EOF:1,parseError:o(function(q,de){if(this.yy.parser)this.yy.parser.parseError(q,de);else throw new Error(q);},"parseError"),setInput:o(function(xe,q){return this.yy=q||this.yy||{},this._input=xe,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var xe=this._input[0];this.yytext+=xe,this.yyleng++,this.offset++,this.match+=xe,this.matched+=xe;var q=xe.match(/(?:\r\n?|\n).*/g);return q?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),xe;},"input"),unput:o(function(xe){var q=xe.length,de=xe.split(/(?:\r\n?|\n)/g);this._input=xe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-q),this.offset-=q;var ie=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),de.length-1&&(this.yylineno-=de.length-1);var oe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:de?(de.length===ie.length?this.yylloc.first_column:0)+ie[ie.length-de.length].length-de[0].length:this.yylloc.first_column-q},this.options.ranges&&(this.yylloc.range=[oe[0],oe[0]+this.yyleng-q]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(xe){this.unput(this.match.slice(xe));},"less"),pastInput:o(function(){var xe=this.matched.substr(0,this.matched.length-this.match.length);return(xe.length>20?"...":"")+xe.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var xe=this.match;return xe.length<20&&(xe+=this._input.substr(0,20-xe.length)),(xe.substr(0,20)+(xe.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var xe=this.pastInput(),q=new Array(xe.length+1).join("-");return xe+this.upcomingInput()+`
`+q+"^";},"showPosition"),test_match:o(function(xe,q){var de,ie,oe;if(this.options.backtrack_lexer&&(oe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(oe.yylloc.range=this.yylloc.range.slice(0))),ie=xe[0].match(/(?:\r\n?|\n).*/g),ie&&(this.yylineno+=ie.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ie?ie[ie.length-1].length-ie[ie.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+xe[0].length},this.yytext+=xe[0],this.match+=xe[0],this.matches=xe,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(xe[0].length),this.matched+=xe[0],de=this.performAction.call(this,this.yy,this,q,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),de)return de;if(this._backtrack){for(var V in oe)this[V]=oe[V];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var xe,q,de,ie;this._more||(this.yytext="",this.match="");for(var oe=this._currentRules(),V=0;V<oe.length;V++)if(de=this._input.match(this.rules[oe[V]]),de&&(!q||de[0].length>q[0].length)){if(q=de,ie=V,this.options.backtrack_lexer){if(xe=this.test_match(de,oe[V]),xe!==!1)return xe;if(this._backtrack){q=!1;continue;}else return!1;}else if(!this.options.flex)break;}return q?(xe=this.test_match(q,oe[ie]),xe!==!1?xe:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var q=this.next();return q||this.lex();},"lex"),begin:o(function(q){this.conditionStack.push(q);},"begin"),popState:o(function(){var q=this.conditionStack.length-1;return q>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function(q){return q=this.conditionStack.length-1-Math.abs(q||0),q>=0?this.conditionStack[q]:"INITIAL";},"topState"),pushState:o(function(q){this.begin(q);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{},performAction:o(function(q,de,ie,oe){var V=oe;switch(ie){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 77;case 22:this.popState();break;case 23:return 78;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:return this.popState(),41;break;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;break;case 39:return this.popState(),8;break;case 40:break;case 41:return this.popState(),this.popState(),41;break;case 42:return this.begin("class-body"),39;break;case 43:return this.popState(),41;break;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 75;case 65:return 75;case 66:return 75;case 67:return 75;case 68:return 67;case 69:return 67;case 70:return 69;case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 18;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:return 88;case 85:return 88;case 86:return 89;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:return 87;case 96:return 87;case 97:return 9;}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return Ie;}();He.lexer=ze;function Le(){this.yy={};}return o(Le,"Parser"),Le.prototype=He,He.Parser=Le,new Le();}();vP.parser=vP;qS=vP;});var Xde,Mb,jde=N(()=>{"use strict";var _Class204;qt();dr();Xde=["#","+","~","-",""],Mb=(_Class204=class Mb{constructor(e,r){this.memberType=r,this.visibility="",this.classifier="",this.text="";let n=ar(e,ge());this.parseMember(n);}getDisplayDetails(){let e=this.visibility+tc(this.id);this.memberType==="method"&&(e+=`(${tc(this.parameters.trim())})`,this.returnType&&(e+=" : "+tc(this.returnType))),e=e.trim();let r=this.parseClassifier();return{displayText:e,cssStyle:r};}parseMember(e){let r="";if(this.memberType==="method"){let a=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(a){let s=a[1]?a[1].trim():"";if(Xde.includes(s)&&(this.visibility=s),this.id=a[2],this.parameters=a[3]?a[3].trim():"",r=a[4]?a[4].trim():"",this.returnType=a[5]?a[5].trim():"",r===""){let l=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(l)&&(r=l,this.returnType=this.returnType.substring(0,this.returnType.length-1));}}}else{let i=e.length,a=e.substring(0,1),s=e.substring(i-1);Xde.includes(a)&&(this.visibility=a),/[$*]/.exec(s)&&(r=s),this.id=e.substring(this.visibility===""?0:1,r===""?i:i-1);}this.classifier=r,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let n=`${this.visibility?"\\"+this.visibility:""}${tc(this.id)}${this.memberType==="method"?`(${tc(this.parameters)})${this.returnType?" : "+tc(this.returnType):""}`:""}`;this.text=n.replaceAll("<","&lt;").replaceAll(">","&gt;"),this.text.startsWith("\\&lt;")&&(this.text=this.text.replace("\\&lt;","~"));}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return"";}}},o(_Class204,"ClassMember"),_Class204);});var YS,Kde,Pp,R1,bP=N(()=>{"use strict";var _Class205;pr();yt();qt();dr();nr();ci();jde();YS="classId-",Kde=0,Pp=o(t=>Ze.sanitizeText(t,ge()),"sanitizeText"),R1=(_Class205=class R1{constructor(){this.relations=[];this.classes=new Map();this.styleClasses=new Map();this.notes=[];this.interfaces=[];this.namespaces=new Map();this.namespaceCounter=0;this.functions=[];this.lineType={LINE:0,DOTTED_LINE:1};this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4};this.setupToolTips=o(e=>{let r=Ge(".mermaidTooltip");(r._groups||r)[0][0]===null&&(r=Ge("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Ge(e).select("svg").selectAll("g.node").on("mouseover",a=>{let s=Ge(a.currentTarget);if(s.attr("title")===null)return;let u=this.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(s.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.top-14+document.body.scrollTop+"px"),r.html(r.html().replace(/&lt;br\/&gt;/g,"<br/>")),s.classed("hover",!0);}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),Ge(a.currentTarget).classed("hover",!1);});},"setupToolTips");this.direction="TB";this.setAccTitle=Cr;this.getAccTitle=_r;this.setAccDescription=Dr;this.getAccDescription=Lr;this.setDiagramTitle=Ir;this.getDiagramTitle=Rr;this.getConfig=o(()=>ge().class,"getConfig");this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this);}splitClassNameAndType(e){let r=Ze.sanitizeText(e,ge()),n="",i=r;if(r.indexOf("~")>0){let a=r.split("~");i=Pp(a[0]),n=Pp(a[1]);}return{className:i,type:n};}setClassLabel(e,r){let n=Ze.sanitizeText(e,ge());r&&(r=Pp(r));let{className:i}=this.splitClassNameAndType(n);this.classes.get(i).label=r,this.classes.get(i).text=`${r}${this.classes.get(i).type?`<${this.classes.get(i).type}>`:""}`;}addClass(e){let r=Ze.sanitizeText(e,ge()),{className:n,type:i}=this.splitClassNameAndType(r);if(this.classes.has(n))return;let a=Ze.sanitizeText(n,ge());this.classes.set(a,{id:a,type:i,label:a,text:`${a}${i?`&lt;${i}&gt;`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:YS+a+"-"+Kde}),Kde++;}addInterface(e,r){let n={id:`interface${this.interfaces.length}`,label:e,classId:r};this.interfaces.push(n);}lookUpDomId(e){let r=Ze.sanitizeText(e,ge());if(this.classes.has(r))return this.classes.get(r).domId;throw new Error("Class not found: "+r);}clear(){this.relations=[],this.classes=new Map(),this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map(),this.namespaceCounter=0,this.direction="TB",wr();}getClass(e){return this.classes.get(e);}getClasses(){return this.classes;}getRelations(){return this.relations;}getNotes(){return this.notes;}addRelation(e){X.debug("Adding relation: "+JSON.stringify(e));let r=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];e.relation.type1===this.relationType.LOLLIPOP&&!r.includes(e.relation.type2)?(this.addClass(e.id2),this.addInterface(e.id1,e.id2),e.id1=`interface${this.interfaces.length-1}`):e.relation.type2===this.relationType.LOLLIPOP&&!r.includes(e.relation.type1)?(this.addClass(e.id1),this.addInterface(e.id2,e.id1),e.id2=`interface${this.interfaces.length-1}`):(this.addClass(e.id1),this.addClass(e.id2)),e.id1=this.splitClassNameAndType(e.id1).className,e.id2=this.splitClassNameAndType(e.id2).className,e.relationTitle1=Ze.sanitizeText(e.relationTitle1.trim(),ge()),e.relationTitle2=Ze.sanitizeText(e.relationTitle2.trim(),ge()),this.relations.push(e);}addAnnotation(e,r){let n=this.splitClassNameAndType(e).className;this.classes.get(n).annotations.push(r);}addMember(e,r){this.addClass(e);let n=this.splitClassNameAndType(e).className,i=this.classes.get(n);if(typeof r=="string"){let a=r.trim();a.startsWith("<<")&&a.endsWith(">>")?i.annotations.push(Pp(a.substring(2,a.length-2))):a.indexOf(")")>0?i.methods.push(new Mb(a,"method")):a&&i.members.push(new Mb(a,"attribute"));}}addMembers(e,r){Array.isArray(r)&&(r.reverse(),r.forEach(n=>this.addMember(e,n)));}addNote(e,r){let n={id:`note${this.notes.length}`,class:r,text:e};this.notes.push(n);}cleanupLabel(e){return e.startsWith(":")&&(e=e.substring(1)),Pp(e.trim());}setCssClass(e,r){e.split(",").forEach(n=>{let i=n;/\d/.exec(n[0])&&(i=YS+i);let a=this.classes.get(i);a&&(a.cssClasses+=" "+r);});}defineClass(e,r){for(let n of e){let i=this.styleClasses.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,i)),r&&r.forEach(a=>{if(/color/.exec(a)){let s=a.replace("fill","bgFill");i.textStyles.push(s);}i.styles.push(a);}),this.classes.forEach(a=>{a.cssClasses.includes(n)&&a.styles.push(...r.flatMap(s=>s.split(",")));});}}setTooltip(e,r){e.split(",").forEach(n=>{r!==void 0&&(this.classes.get(n).tooltip=Pp(r));});}getTooltip(e,r){return r&&this.namespaces.has(r)?this.namespaces.get(r).classes.get(e).tooltip:this.classes.get(e).tooltip;}setLink(e,r,n){let i=ge();e.split(",").forEach(a=>{let s=a;/\d/.exec(a[0])&&(s=YS+s);let l=this.classes.get(s);l&&(l.link=Vt.formatUrl(r,i),i.securityLevel==="sandbox"?l.linkTarget="_top":typeof n=="string"?l.linkTarget=Pp(n):l.linkTarget="_blank");}),this.setCssClass(e,"clickable");}setClickEvent(e,r,n){e.split(",").forEach(i=>{this.setClickFunc(i,r,n),this.classes.get(i).haveCallback=!0;}),this.setCssClass(e,"clickable");}setClickFunc(e,r,n){let i=Ze.sanitizeText(e,ge());if(ge().securityLevel!=="loose"||r===void 0)return;let s=i;if(this.classes.has(s)){let l=this.lookUpDomId(s),u=[];if(typeof n=="string"){u=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let h=0;h<u.length;h++){let f=u[h].trim();f.startsWith('"')&&f.endsWith('"')&&(f=f.substr(1,f.length-2)),u[h]=f;}}u.length===0&&u.push(l),this.functions.push(()=>{let h=document.querySelector(`[id="${l}"]`);h!==null&&h.addEventListener("click",()=>{Vt.runFunc(r,...u);},!1);});}}bindFunctions(e){this.functions.forEach(r=>{r(e);});}getDirection(){return this.direction;}setDirection(e){this.direction=e;}addNamespace(e){this.namespaces.has(e)||(this.namespaces.set(e,{id:e,classes:new Map(),children:{},domId:YS+e+"-"+this.namespaceCounter}),this.namespaceCounter++);}getNamespace(e){return this.namespaces.get(e);}getNamespaces(){return this.namespaces;}addClassesToNamespace(e,r){if(this.namespaces.has(e))for(let n of r){let{className:i}=this.splitClassNameAndType(n);this.classes.get(i).parent=e,this.namespaces.get(e).classes.set(i,this.classes.get(i));}}setCssStyle(e,r){let n=this.classes.get(e);if(!(!r||!n))for(let i of r)i.includes(",")?n.styles.push(...i.split(",")):n.styles.push(i);}getArrowMarker(e){let r;switch(e){case 0:r="aggregation";break;case 1:r="extension";break;case 2:r="composition";break;case 3:r="dependency";break;case 4:r="lollipop";break;default:r="none";}return r;}getData(){let e=[],r=[],n=ge();for(let a of this.namespaces.keys()){let s=this.namespaces.get(a);if(s){var _n$class$padding;let l={id:s.id,label:s.id,isGroup:!0,padding:(_n$class$padding=n.class.padding)!==null&&_n$class$padding!==void 0?_n$class$padding:16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:n.look};e.push(l);}}for(let a of this.classes.keys()){let s=this.classes.get(a);if(s){let l=s;l.parentId=s.parent,l.look=n.look,e.push(l);}}let i=0;for(let a of this.notes){var _n$class$padding2,_this$classes$get$id,_this$classes$get2;i++;let s={id:a.id,label:a.text,isGroup:!1,shape:"note",padding:(_n$class$padding2=n.class.padding)!==null&&_n$class$padding2!==void 0?_n$class$padding2:6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look};e.push(s);let l=(_this$classes$get$id=(_this$classes$get2=this.classes.get(a.class))===null||_this$classes$get2===void 0?void 0:_this$classes$get2.id)!==null&&_this$classes$get$id!==void 0?_this$classes$get$id:"";if(l){let u={id:`edgeNote${i}`,start:a.id,end:l,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:n.look};r.push(u);}}for(let a of this.interfaces){let s={id:a.id,label:a.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:n.look};e.push(s);}i=0;for(let a of this.relations){i++;let s={id:Gh(a.id1,a.id2,{prefix:"id",counter:i}),start:a.id1,end:a.id2,type:"normal",label:a.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(a.relation.type1),arrowTypeEnd:this.getArrowMarker(a.relation.type2),startLabelRight:a.relationTitle1==="none"?"":a.relationTitle1,endLabelLeft:a.relationTitle2==="none"?"":a.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:a.style||"",pattern:a.relation.lineType==1?"dashed":"solid",look:n.look};r.push(s);}return{nodes:e,edges:r,other:{},config:n,direction:this.getDirection()};}},o(_Class205,"ClassDB"),_Class205);});var xHe,XS,TP=N(()=>{"use strict";Vm();xHe=o(t=>`g.classGroup text {
  fill: ${t.nodeBorder||t.classText};
  stroke: none;
  font-family: ${t.fontFamily};
  font-size: 10px;

  .title {
    font-weight: bolder;
  }

}

.nodeLabel, .edgeLabel {
  color: ${t.classText};
}
.edgeLabel .label rect {
  fill: ${t.mainBkg};
}
.label text {
  fill: ${t.classText};
}

.labelBkg {
  background: ${t.mainBkg};
}
.edgeLabel .label span {
  background: ${t.mainBkg};
}

.classTitle {
  font-weight: bolder;
}
.node rect,
  .node circle,
  .node ellipse,
  .node polygon,
  .node path {
    fill: ${t.mainBkg};
    stroke: ${t.nodeBorder};
    stroke-width: 1px;
  }


.divider {
  stroke: ${t.nodeBorder};
  stroke-width: 1;
}

g.clickable {
  cursor: pointer;
}

g.classGroup rect {
  fill: ${t.mainBkg};
  stroke: ${t.nodeBorder};
}

g.classGroup line {
  stroke: ${t.nodeBorder};
  stroke-width: 1;
}

.classLabel .box {
  stroke: none;
  stroke-width: 0;
  fill: ${t.mainBkg};
  opacity: 0.5;
}

.classLabel .label {
  fill: ${t.nodeBorder};
  font-size: 10px;
}

.relation {
  stroke: ${t.lineColor};
  stroke-width: 1;
  fill: none;
}

.dashed-line{
  stroke-dasharray: 3;
}

.dotted-line{
  stroke-dasharray: 1 2;
}

#compositionStart, .composition {
  fill: ${t.lineColor} !important;
  stroke: ${t.lineColor} !important;
  stroke-width: 1;
}

#compositionEnd, .composition {
  fill: ${t.lineColor} !important;
  stroke: ${t.lineColor} !important;
  stroke-width: 1;
}

#dependencyStart, .dependency {
  fill: ${t.lineColor} !important;
  stroke: ${t.lineColor} !important;
  stroke-width: 1;
}

#dependencyStart, .dependency {
  fill: ${t.lineColor} !important;
  stroke: ${t.lineColor} !important;
  stroke-width: 1;
}

#extensionStart, .extension {
  fill: transparent !important;
  stroke: ${t.lineColor} !important;
  stroke-width: 1;
}

#extensionEnd, .extension {
  fill: transparent !important;
  stroke: ${t.lineColor} !important;
  stroke-width: 1;
}

#aggregationStart, .aggregation {
  fill: transparent !important;
  stroke: ${t.lineColor} !important;
  stroke-width: 1;
}

#aggregationEnd, .aggregation {
  fill: transparent !important;
  stroke: ${t.lineColor} !important;
  stroke-width: 1;
}

#lollipopStart, .lollipop {
  fill: ${t.mainBkg} !important;
  stroke: ${t.lineColor} !important;
  stroke-width: 1;
}

#lollipopEnd, .lollipop {
  fill: ${t.mainBkg} !important;
  stroke: ${t.lineColor} !important;
  stroke-width: 1;
}

.edgeTerminals {
  font-size: 11px;
  line-height: initial;
}

.classTitleText {
  text-anchor: middle;
  font-size: 18px;
  fill: ${t.textColor};
}
  ${Lc()}
`,"getStyles"),XS=xHe;});var bHe,THe,wHe,jS,wP=N(()=>{"use strict";qt();yt();xm();Zd();Jd();nr();bHe=o((t,e="TB")=>{if(!t.doc)return e;let r=e;for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r;},"getDir"),THe=o(function(t,e){return e.db.getClasses();},"getClasses"),wHe=o(async function(t,e,r,n){var _a$titleTopMargin3,_a$useMaxWidth3;X.info("REF0:"),X.info("Drawing class diagram (v3)",e);let{securityLevel:i,state:a,layout:s}=ge(),l=n.db.getData(),u=bc(e,i);l.type=n.type,l.layoutAlgorithm=sf(s),l.nodeSpacing=(a===null||a===void 0?void 0:a.nodeSpacing)||50,l.rankSpacing=(a===null||a===void 0?void 0:a.rankSpacing)||50,l.markers=["aggregation","extension","composition","dependency","lollipop"],l.diagramId=e,await Dc(l,u);let h=8;Vt.insertTitle(u,"classDiagramTitleText",(_a$titleTopMargin3=a===null||a===void 0?void 0:a.titleTopMargin)!==null&&_a$titleTopMargin3!==void 0?_a$titleTopMargin3:25,n.db.getDiagramTitle()),Wo(u,h,"classDiagram",(_a$useMaxWidth3=a===null||a===void 0?void 0:a.useMaxWidth)!==null&&_a$useMaxWidth3!==void 0?_a$useMaxWidth3:!0);},"draw"),jS={getClasses:THe,draw:wHe,getDir:bHe};});var Qde={};hr(Qde,{diagram:()=>kHe});var kHe,Zde=N(()=>{"use strict";xP();bP();TP();wP();kHe={parser:qS,get db(){return new R1();},renderer:jS,styles:XS,init:o(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute;},"init")};});var tpe={};hr(tpe,{diagram:()=>AHe});var AHe,rpe=N(()=>{"use strict";xP();bP();TP();wP();AHe={parser:qS,get db(){return new R1();},renderer:jS,styles:XS,init:o(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute;},"init")};});var kP,KS,EP=N(()=>{"use strict";kP=function(){var t=o(function(F,z,$,U){for($=$||{},U=F.length;U--;$[F[U]]=z);return $;},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],l=[1,16],u=[1,17],h=[1,18],f=[1,19],d=[1,33],p=[1,20],m=[1,21],g=[1,22],y=[1,23],v=[1,24],x=[1,26],b=[1,27],T=[1,28],C=[1,29],w=[1,30],E=[1,31],_=[1,32],A=[1,35],D=[1,36],O=[1,37],R=[1,38],k=[1,34],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],S=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],I=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],M={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:o(function(z,$,U,K,ee,Y,ce){var Z=Y.length-1;switch(ee){case 3:return K.setRootDoc(Y[Z]),Y[Z];break;case 4:this.$=[];break;case 5:Y[Z]!="nl"&&(Y[Z-1].push(Y[Z]),this.$=Y[Z-1]);break;case 6:case 7:this.$=Y[Z];break;case 8:this.$="nl";break;case 12:this.$=Y[Z];break;case 13:let ne=Y[Z-1];ne.description=K.trimColon(Y[Z]),this.$=ne;break;case 14:this.$={stmt:"relation",state1:Y[Z-2],state2:Y[Z]};break;case 15:let te=K.trimColon(Y[Z]);this.$={stmt:"relation",state1:Y[Z-3],state2:Y[Z-1],description:te};break;case 19:this.$={stmt:"state",id:Y[Z-3],type:"default",description:"",doc:Y[Z-1]};break;case 20:var ue=Y[Z],Q=Y[Z-2].trim();if(Y[Z].match(":")){var j=Y[Z].split(":");ue=j[0],Q=[Q,j[1]];}this.$={stmt:"state",id:ue,type:"default",description:Q};break;case 21:this.$={stmt:"state",id:Y[Z-3],type:"default",description:Y[Z-5],doc:Y[Z-1]};break;case 22:this.$={stmt:"state",id:Y[Z],type:"fork"};break;case 23:this.$={stmt:"state",id:Y[Z],type:"join"};break;case 24:this.$={stmt:"state",id:Y[Z],type:"choice"};break;case 25:this.$={stmt:"state",id:K.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:Y[Z-1].trim(),note:{position:Y[Z-2].trim(),text:Y[Z].trim()}};break;case 29:this.$=Y[Z].trim(),K.setAccTitle(this.$);break;case 30:case 31:this.$=Y[Z].trim(),K.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:Y[Z-3],url:Y[Z-2],tooltip:Y[Z-1]};break;case 33:this.$={stmt:"click",id:Y[Z-3],url:Y[Z-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:Y[Z-1].trim(),classes:Y[Z].trim()};break;case 36:this.$={stmt:"style",id:Y[Z-1].trim(),styleClass:Y[Z].trim()};break;case 37:this.$={stmt:"applyClass",id:Y[Z-1].trim(),styleClass:Y[Z].trim()};break;case 38:K.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:K.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:K.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:K.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:Y[Z].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:Y[Z-2].trim(),classes:[Y[Z].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:Y[Z-2].trim(),classes:[Y[Z].trim()],type:"default",description:""};break;}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:T,38:C,41:w,45:E,48:_,51:A,52:D,53:O,54:R,57:k},t(L,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:T,38:C,41:w,45:E,48:_,51:A,52:D,53:O,54:R,57:k},t(L,[2,7]),t(L,[2,8]),t(L,[2,9]),t(L,[2,10]),t(L,[2,11]),t(L,[2,12],{14:[1,40],15:[1,41]}),t(L,[2,16]),{18:[1,42]},t(L,[2,18],{20:[1,43]}),{23:[1,44]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(L,[2,28]),{34:[1,49]},{36:[1,50]},t(L,[2,31]),{13:51,24:d,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(S,[2,44],{58:[1,56]}),t(S,[2,45],{58:[1,57]}),t(L,[2,38]),t(L,[2,39]),t(L,[2,40]),t(L,[2,41]),t(L,[2,6]),t(L,[2,13]),{13:58,24:d,57:k},t(L,[2,17]),t(I,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(L,[2,29]),t(L,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(L,[2,14],{14:[1,71]}),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,72],22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:T,38:C,41:w,45:E,48:_,51:A,52:D,53:O,54:R,57:k},t(L,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(L,[2,34]),t(L,[2,35]),t(L,[2,36]),t(L,[2,37]),t(S,[2,46]),t(S,[2,47]),t(L,[2,15]),t(L,[2,19]),t(I,i,{7:78}),t(L,[2,26]),t(L,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,81],22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:T,38:C,41:w,45:E,48:_,51:A,52:D,53:O,54:R,57:k},t(L,[2,32]),t(L,[2,33]),t(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:o(function(z,$){if($.recoverable)this.trace(z);else{var U=new Error(z);throw U.hash=$,U;}},"parseError"),parse:o(function(z){var $=this,U=[0],K=[],ee=[null],Y=[],ce=this.table,Z="",ue=0,Q=0,j=0,ne=2,te=1,he=Y.slice.call(arguments,1),le=Object.create(this.lexer),J={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(J.yy[Se]=this.yy[Se]);le.setInput(z,J.yy),J.yy.lexer=le,J.yy.parser=this,typeof le.yylloc>"u"&&(le.yylloc={});var se=le.yylloc;Y.push(se);var ae=le.options&&le.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Oe(W){U.length=U.length-2*W,ee.length=ee.length-W,Y.length=Y.length-W;}o(Oe,"popStack");function ye(){var W;return W=K.pop()||le.lex()||te,typeof W!="number"&&(W instanceof Array&&(K=W,W=K.pop()),W=$.symbols_[W]||W),W;}o(ye,"lex");for(var Be,He,ze,Le,Ie,xe,q={},de,ie,oe,V;;){if(ze=U[U.length-1],this.defaultActions[ze]?Le=this.defaultActions[ze]:((Be===null||typeof Be>"u")&&(Be=ye()),Le=ce[ze]&&ce[ze][Be]),typeof Le>"u"||!Le.length||!Le[0]){var Te="";V=[];for(de in ce[ze])this.terminals_[de]&&de>ne&&V.push("'"+this.terminals_[de]+"'");le.showPosition?Te="Parse error on line "+(ue+1)+`:
`+le.showPosition()+`
Expecting `+V.join(", ")+", got '"+(this.terminals_[Be]||Be)+"'":Te="Parse error on line "+(ue+1)+": Unexpected "+(Be==te?"end of input":"'"+(this.terminals_[Be]||Be)+"'"),this.parseError(Te,{text:le.match,token:this.terminals_[Be]||Be,line:le.yylineno,loc:se,expected:V});}if(Le[0]instanceof Array&&Le.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ze+", token: "+Be);switch(Le[0]){case 1:U.push(Be),ee.push(le.yytext),Y.push(le.yylloc),U.push(Le[1]),Be=null,He?(Be=He,He=null):(Q=le.yyleng,Z=le.yytext,ue=le.yylineno,se=le.yylloc,j>0&&j--);break;case 2:if(ie=this.productions_[Le[1]][1],q.$=ee[ee.length-ie],q._$={first_line:Y[Y.length-(ie||1)].first_line,last_line:Y[Y.length-1].last_line,first_column:Y[Y.length-(ie||1)].first_column,last_column:Y[Y.length-1].last_column},ae&&(q._$.range=[Y[Y.length-(ie||1)].range[0],Y[Y.length-1].range[1]]),xe=this.performAction.apply(q,[Z,Q,ue,J.yy,Le[1],ee,Y].concat(he)),typeof xe<"u")return xe;ie&&(U=U.slice(0,-1*ie*2),ee=ee.slice(0,-1*ie),Y=Y.slice(0,-1*ie)),U.push(this.productions_[Le[1]][0]),ee.push(q.$),Y.push(q._$),oe=ce[U[U.length-2]][U[U.length-1]],U.push(oe);break;case 3:return!0;}}return!0;},"parse")},P=function(){var F={EOF:1,parseError:o(function($,U){if(this.yy.parser)this.yy.parser.parseError($,U);else throw new Error($);},"parseError"),setInput:o(function(z,$){return this.yy=$||this.yy||{},this._input=z,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var z=this._input[0];this.yytext+=z,this.yyleng++,this.offset++,this.match+=z,this.matched+=z;var $=z.match(/(?:\r\n?|\n).*/g);return $?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),z;},"input"),unput:o(function(z){var $=z.length,U=z.split(/(?:\r\n?|\n)/g);this._input=z+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-$),this.offset-=$;var K=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),U.length-1&&(this.yylineno-=U.length-1);var ee=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:U?(U.length===K.length?this.yylloc.first_column:0)+K[K.length-U.length].length-U[0].length:this.yylloc.first_column-$},this.options.ranges&&(this.yylloc.range=[ee[0],ee[0]+this.yyleng-$]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(z){this.unput(this.match.slice(z));},"less"),pastInput:o(function(){var z=this.matched.substr(0,this.matched.length-this.match.length);return(z.length>20?"...":"")+z.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var z=this.match;return z.length<20&&(z+=this._input.substr(0,20-z.length)),(z.substr(0,20)+(z.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var z=this.pastInput(),$=new Array(z.length+1).join("-");return z+this.upcomingInput()+`
`+$+"^";},"showPosition"),test_match:o(function(z,$){var U,K,ee;if(this.options.backtrack_lexer&&(ee={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ee.yylloc.range=this.yylloc.range.slice(0))),K=z[0].match(/(?:\r\n?|\n).*/g),K&&(this.yylineno+=K.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:K?K[K.length-1].length-K[K.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+z[0].length},this.yytext+=z[0],this.match+=z[0],this.matches=z,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(z[0].length),this.matched+=z[0],U=this.performAction.call(this,this.yy,this,$,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),U)return U;if(this._backtrack){for(var Y in ee)this[Y]=ee[Y];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var z,$,U,K;this._more||(this.yytext="",this.match="");for(var ee=this._currentRules(),Y=0;Y<ee.length;Y++)if(U=this._input.match(this.rules[ee[Y]]),U&&(!$||U[0].length>$[0].length)){if($=U,K=Y,this.options.backtrack_lexer){if(z=this.test_match(U,ee[Y]),z!==!1)return z;if(this._backtrack){$=!1;continue;}else return!1;}else if(!this.options.flex)break;}return $?(z=this.test_match($,ee[K]),z!==!1?z:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var $=this.next();return $||this.lex();},"lex"),begin:o(function($){this.conditionStack.push($);},"begin"),popState:o(function(){var $=this.conditionStack.length-1;return $>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function($){return $=this.conditionStack.length-1-Math.abs($||0),$>=0?this.conditionStack[$]:"INITIAL";},"topState"),pushState:o(function($){this.begin($);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function($,U,K,ee){var Y=ee;switch(K){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:break;case 9:break;case 10:return 5;case 11:break;case 12:break;case 13:break;case 14:break;case 15:return this.pushState("SCALE"),17;break;case 16:return 18;case 17:this.popState();break;case 18:return this.begin("acc_title"),33;break;case 19:return this.popState(),"acc_title_value";break;case 20:return this.begin("acc_descr"),35;break;case 21:return this.popState(),"acc_descr_value";break;case 22:this.begin("acc_descr_multiline");break;case 23:this.popState();break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;break;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 27:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 28:return this.popState(),43;break;case 29:return this.pushState("CLASS"),48;break;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 31:return this.popState(),50;break;case 32:return this.pushState("STYLE"),45;break;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 34:return this.popState(),47;break;case 35:return this.pushState("SCALE"),17;break;case 36:return 18;case 37:this.popState();break;case 38:this.pushState("STATE");break;case 39:return this.popState(),U.yytext=U.yytext.slice(0,-8).trim(),25;break;case 40:return this.popState(),U.yytext=U.yytext.slice(0,-8).trim(),26;break;case 41:return this.popState(),U.yytext=U.yytext.slice(0,-10).trim(),27;break;case 42:return this.popState(),U.yytext=U.yytext.slice(0,-8).trim(),25;break;case 43:return this.popState(),U.yytext=U.yytext.slice(0,-8).trim(),26;break;case 44:return this.popState(),U.yytext=U.yytext.slice(0,-10).trim(),27;break;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";break;case 51:return this.popState(),"ID";break;case 52:this.popState();break;case 53:return"STATE_DESCR";case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState("struct"),20;break;case 57:break;case 58:return this.popState(),21;break;case 59:break;case 60:return this.begin("NOTE"),29;break;case 61:return this.popState(),this.pushState("NOTE_ID"),59;break;case 62:return this.popState(),this.pushState("NOTE_ID"),60;break;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 65:break;case 66:return"NOTE_TEXT";case 67:return this.popState(),"ID";break;case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 69:return this.popState(),U.yytext=U.yytext.substr(2).trim(),31;break;case 70:return this.popState(),U.yytext=U.yytext.slice(0,-8).trim(),31;break;case 71:return 6;case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return U.yytext=U.yytext.trim(),14;break;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81:return"INVALID";}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}};return F;}();M.lexer=P;function B(){this.yy={};}return o(B,"Parser"),B.prototype=M,M.Parser=B,new B();}();kP.parser=kP;KS=kP;});var ape,QS,SP,Tf,Bp,Ib,spe,ope,lpe,Fp,ZS,CP,AP,_P,DP,LP,JS,e6,cpe,upe,RP,NP,hpe,fpe,N1,RHe,dpe,MP,NHe,MHe,ppe,mpe,IHe,gpe,OHe,ype,IP,OP,vpe,t6,xpe,PP,r6=N(()=>{"use strict";ape="TB",QS="TB",SP="dir",Tf="state",Bp="root",Ib="relation",spe="classDef",ope="style",lpe="applyClass",Fp="default",ZS="divider",CP="fill:none",AP="fill: #333",_P="c",DP="text",LP="normal",JS="rect",e6="rectWithTitle",cpe="stateStart",upe="stateEnd",RP="divider",NP="roundedWithTitle",hpe="note",fpe="noteGroup",N1="statediagram",RHe="state",dpe=`${N1}-${RHe}`,MP="transition",NHe="note",MHe="note-edge",ppe=`${MP} ${MHe}`,mpe=`${N1}-${NHe}`,IHe="cluster",gpe=`${N1}-${IHe}`,OHe="cluster-alt",ype=`${N1}-${OHe}`,IP="parent",OP="note",vpe="state",t6="----",xpe=`${t6}${OP}`,PP=`${t6}${IP}`;});function BP(t="",e=0,r="",n=t6){let i=r!==null&&r.length>0?`${n}${r}`:"";return`${vpe}-${t}${i}-${e}`;}function n6(t,e,r){if(!e.id||e.id==="</join></fork>"||e.id==="</choice>")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(i=>{var _e$cssCompiledStyles;let a=r.get(i);a&&(e.cssCompiledStyles=[...((_e$cssCompiledStyles=e.cssCompiledStyles)!==null&&_e$cssCompiledStyles!==void 0?_e$cssCompiledStyles:[]),...a.styles]);}));let n=t.find(i=>i.id===e.id);n?Object.assign(n,e):t.push(e);}function BHe(t){var _t$classes$join,_t$classes;return(_t$classes$join=t===null||t===void 0||(_t$classes=t.classes)===null||_t$classes===void 0?void 0:_t$classes.join(" "))!==null&&_t$classes$join!==void 0?_t$classes$join:"";}function FHe(t){var _t$styles;return(_t$styles=t===null||t===void 0?void 0:t.styles)!==null&&_t$styles!==void 0?_t$styles:[];}var i6,wf,PHe,bpe,M1,Tpe,wpe=N(()=>{"use strict";qt();yt();dr();r6();i6=new Map(),wf=0;o(BP,"stateDomId");PHe=o((t,e,r,n,i,a,s,l)=>{X.trace("items",e),e.forEach(u=>{switch(u.stmt){case Tf:M1(t,u,r,n,i,a,s,l);break;case Fp:M1(t,u,r,n,i,a,s,l);break;case Ib:{var _u$description;M1(t,u.state1,r,n,i,a,s,l),M1(t,u.state2,r,n,i,a,s,l);let h={id:"edge"+wf,start:u.state1.id,end:u.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:CP,labelStyle:"",label:Ze.sanitizeText((_u$description=u.description)!==null&&_u$description!==void 0?_u$description:"",ge()),arrowheadStyle:AP,labelpos:_P,labelType:DP,thickness:LP,classes:MP,look:s};i.push(h),wf++;}break;}});},"setupDoc"),bpe=o((t,e=QS)=>{let r=e;if(t.doc)for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r;},"getDir");o(n6,"insertOrUpdateNode");o(BHe,"getClassesFromDbInfo");o(FHe,"getStylesFromDbInfo");M1=o((t,e,r,n,i,a,s,l)=>{let u=e.id,h=r.get(u),f=BHe(h),d=FHe(h),p=ge();if(X.info("dataFetcher parsedItem",e,h,d),u!=="root"){var _g$description,_g$description2;let m=JS;e.start===!0?m=cpe:e.start===!1&&(m=upe),e.type!==Fp&&(m=e.type),i6.get(u)||i6.set(u,{id:u,shape:m,description:Ze.sanitizeText(u,p),cssClasses:`${f} ${dpe}`,cssStyles:d});let g=i6.get(u);e.description&&(Array.isArray(g.description)?(g.shape=e6,g.description.push(e.description)):(_g$description=g.description)!==null&&_g$description!==void 0&&_g$description.length&&g.description.length>0?(g.shape=e6,g.description===u?g.description=[e.description]:g.description=[g.description,e.description]):(g.shape=JS,g.description=e.description),g.description=Ze.sanitizeTextOrArray(g.description,p)),((_g$description2=g.description)===null||_g$description2===void 0?void 0:_g$description2.length)===1&&g.shape===e6&&(g.type==="group"?g.shape=NP:g.shape=JS),!g.type&&e.doc&&(X.info("Setting cluster for XCX",u,bpe(e)),g.type="group",g.isGroup=!0,g.dir=bpe(e),g.shape=e.type===ZS?RP:NP,g.cssClasses=`${g.cssClasses} ${gpe} ${a?ype:""}`);let y={labelStyle:"",shape:g.shape,label:g.description,cssClasses:g.cssClasses,cssCompiledStyles:[],cssStyles:g.cssStyles,id:u,dir:g.dir,domId:BP(u,wf),type:g.type,isGroup:g.type==="group",padding:8,rx:10,ry:10,look:s};if(y.shape===RP&&(y.label=""),t&&t.id!=="root"&&(X.trace("Setting node ",u," to be child of its parent ",t.id),y.parentId=t.id),y.centerLabel=!0,e.note){var _p$flowchart;let v={labelStyle:"",shape:hpe,label:e.note.text,cssClasses:mpe,cssStyles:[],cssCompiledStyles:[],id:u+xpe+"-"+wf,domId:BP(u,wf,OP),type:g.type,isGroup:g.type==="group",padding:(_p$flowchart=p.flowchart)===null||_p$flowchart===void 0?void 0:_p$flowchart.padding,look:s,position:e.note.position},x=u+PP,b={labelStyle:"",shape:fpe,label:e.note.text,cssClasses:g.cssClasses,cssStyles:[],id:u+PP,domId:BP(u,wf,IP),type:"group",isGroup:!0,padding:16,look:s,position:e.note.position};wf++,b.id=x,v.parentId=x,n6(n,b,l),n6(n,v,l),n6(n,y,l);let T=u,C=v.id;e.note.position==="left of"&&(T=v.id,C=u),i.push({id:T+"-"+C,start:T,end:C,arrowhead:"none",arrowTypeEnd:"",style:CP,labelStyle:"",classes:ppe,arrowheadStyle:AP,labelpos:_P,labelType:DP,thickness:LP,look:s});}else n6(n,y,l);}e.doc&&(X.trace("Adding nodes children "),PHe(e,e.doc,r,n,i,!a,s,l));},"dataFetcher"),Tpe=o(()=>{i6.clear(),wf=0;},"reset");});var FP,$He,zHe,kpe,$P=N(()=>{"use strict";qt();yt();xm();Zd();Jd();nr();r6();FP=o((t,e=QS)=>{if(!t.doc)return e;let r=e;for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r;},"getDir"),$He=o(function(t,e){return e.db.getClasses();},"getClasses"),zHe=o(async function(t,e,r,n){var _a$titleTopMargin4,_a$useMaxWidth4;X.info("REF0:"),X.info("Drawing state diagram (v2)",e);let{securityLevel:i,state:a,layout:s}=ge();n.db.extract(n.db.getRootDocV2());let l=n.db.getData(),u=bc(e,i);l.type=n.type,l.layoutAlgorithm=s,l.nodeSpacing=(a===null||a===void 0?void 0:a.nodeSpacing)||50,l.rankSpacing=(a===null||a===void 0?void 0:a.rankSpacing)||50,l.markers=["barb"],l.diagramId=e,await Dc(l,u);let h=8;try{(typeof n.db.getLinks=="function"?n.db.getLinks():new Map()).forEach((d,p)=>{var _u$node;let m=typeof p=="string"?p:typeof(p===null||p===void 0?void 0:p.id)=="string"?p.id:"";if(!m){X.warn("\u26A0\uFE0F Invalid or missing stateId from key:",JSON.stringify(p));return;}let g=(_u$node=u.node())===null||_u$node===void 0?void 0:_u$node.querySelectorAll("g"),y;if(g!==null&&g!==void 0&&g.forEach(T=>{var _T$textContent;((_T$textContent=T.textContent)===null||_T$textContent===void 0?void 0:_T$textContent.trim())===m&&(y=T);}),!y){X.warn("\u26A0\uFE0F Could not find node matching text:",m);return;}let v=y.parentNode;if(!v){X.warn("\u26A0\uFE0F Node has no parent, cannot wrap:",m);return;}let x=document.createElementNS("http://www.w3.org/2000/svg","a"),b=d.url.replace(/^"+|"+$/g,"");if(x.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",b),x.setAttribute("target","_blank"),d.tooltip){let T=d.tooltip.replace(/^"+|"+$/g,"");x.setAttribute("title",T);}v.replaceChild(x,y),x.appendChild(y),X.info("\u{1F517} Wrapped node in <a> tag for:",m,d.url);});}catch(f){X.error("\u274C Error injecting clickable links:",f);}Vt.insertTitle(u,"statediagramTitleText",(_a$titleTopMargin4=a===null||a===void 0?void 0:a.titleTopMargin)!==null&&_a$titleTopMargin4!==void 0?_a$titleTopMargin4:25,n.db.getDiagramTitle()),Wo(u,h,N1,(_a$useMaxWidth4=a===null||a===void 0?void 0:a.useMaxWidth)!==null&&_a$useMaxWidth4!==void 0?_a$useMaxWidth4:!0);},"draw"),kpe={getClasses:$He,draw:zHe,getDir:FP};});var gs,Epe,Spe,a6,Jo,s6=N(()=>{"use strict";var _Class206;qt();yt();nr();dr();ci();wpe();$P();r6();gs={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Epe=o(()=>new Map(),"newClassesList"),Spe=o(()=>({relations:[],states:new Map(),documents:{}}),"newDoc"),a6=o(t=>JSON.parse(JSON.stringify(t)),"clone"),Jo=(_Class206=class Jo{constructor(e){this.version=e;this.nodes=[];this.edges=[];this.rootDoc=[];this.classes=Epe();this.documents={root:Spe()};this.currentDocument=this.documents.root;this.startEndCount=0;this.dividerCnt=0;this.links=new Map();this.getAccTitle=_r;this.setAccTitle=Cr;this.getAccDescription=Lr;this.setAccDescription=Dr;this.setDiagramTitle=Ir;this.getDiagramTitle=Rr;this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this);}extract(e){this.clear(!0);for(let i of Array.isArray(e)?e:e.doc)switch(i.stmt){case Tf:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case Ib:this.addRelation(i.state1,i.state2,i.description);break;case spe:this.addStyleClass(i.id.trim(),i.classes);break;case ope:this.handleStyleDef(i);break;case lpe:this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip);break;}let r=this.getStates(),n=ge();Tpe(),M1(void 0,this.getRootDocV2(),r,this.nodes,this.edges,!0,n.look,this.classes);for(let i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0];}}handleStyleDef(e){let r=e.id.trim().split(","),n=e.styleClass.split(",");for(let i of r){let a=this.getState(i);if(!a){let s=i.trim();this.addState(s),a=this.getState(s);}a&&(a.styles=n.map(s=>{var _s$replace;return(_s$replace=s.replace(/;/g,""))===null||_s$replace===void 0?void 0:_s$replace.trim();}));}}setRootDoc(e){X.info("Setting root doc",e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2());}docTranslator(e,r,n){if(r.stmt===Ib){this.docTranslator(e,r.state1,!0),this.docTranslator(e,r.state2,!1);return;}if(r.stmt===Tf&&(r.id===gs.START_NODE?(r.id=e.id+(n?"_start":"_end"),r.start=n):r.id=r.id.trim()),r.stmt!==Bp&&r.stmt!==Tf||!r.doc)return;let i=[],a=[];for(let s of r.doc)if(s.type===ZS){let l=a6(s);l.doc=a6(a),i.push(l),a=[];}else a.push(s);if(i.length>0&&a.length>0){let s={stmt:Tf,id:A9(),type:"divider",doc:a6(a)};i.push(a6(s)),r.doc=i;}r.doc.forEach(s=>this.docTranslator(r,s,!0));}getRootDocV2(){return this.docTranslator({id:Bp,stmt:Bp},{id:Bp,stmt:Bp,doc:this.rootDoc},!0),{id:Bp,doc:this.rootDoc};}addState(e,r=Fp,n=void 0,i=void 0,a=void 0,s=void 0,l=void 0,u=void 0){let h=e===null||e===void 0?void 0:e.trim();if(!this.currentDocument.states.has(h))X.info("Adding state ",h,i),this.currentDocument.states.set(h,{stmt:Tf,id:h,descriptions:[],type:r,doc:n,note:a,classes:[],styles:[],textStyles:[]});else{let f=this.currentDocument.states.get(h);if(!f)throw new Error(`State not found: ${h}`);f.doc||(f.doc=n),f.type||(f.type=r);}if(i&&(X.info("Setting state description",h,i),(Array.isArray(i)?i:[i]).forEach(d=>this.addDescription(h,d.trim()))),a){let f=this.currentDocument.states.get(h);if(!f)throw new Error(`State not found: ${h}`);f.note=a,f.note.text=Ze.sanitizeText(f.note.text,ge());}s&&(X.info("Setting state classes",h,s),(Array.isArray(s)?s:[s]).forEach(d=>this.setCssClass(h,d.trim()))),l&&(X.info("Setting state styles",h,l),(Array.isArray(l)?l:[l]).forEach(d=>this.setStyle(h,d.trim()))),u&&(X.info("Setting state styles",h,l),(Array.isArray(u)?u:[u]).forEach(d=>this.setTextStyle(h,d.trim())));}clear(e){this.nodes=[],this.edges=[],this.documents={root:Spe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Epe(),e||(this.links=new Map(),wr());}getState(e){return this.currentDocument.states.get(e);}getStates(){return this.currentDocument.states;}logDocuments(){X.info("Documents = ",this.documents);}getRelations(){return this.currentDocument.relations;}addLink(e,r,n){this.links.set(e,{url:r,tooltip:n}),X.warn("Adding link",e,r,n);}getLinks(){return this.links;}startIdIfNeeded(e=""){return e===gs.START_NODE?(this.startEndCount++,`${gs.START_TYPE}${this.startEndCount}`):e;}startTypeIfNeeded(e="",r=Fp){return e===gs.START_NODE?gs.START_TYPE:r;}endIdIfNeeded(e=""){return e===gs.END_NODE?(this.startEndCount++,`${gs.END_TYPE}${this.startEndCount}`):e;}endTypeIfNeeded(e="",r=Fp){return e===gs.END_NODE?gs.END_TYPE:r;}addRelationObjs(e,r,n=""){let i=this.startIdIfNeeded(e.id.trim()),a=this.startTypeIfNeeded(e.id.trim(),e.type),s=this.startIdIfNeeded(r.id.trim()),l=this.startTypeIfNeeded(r.id.trim(),r.type);this.addState(i,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(s,l,r.doc,r.description,r.note,r.classes,r.styles,r.textStyles),this.currentDocument.relations.push({id1:i,id2:s,relationTitle:Ze.sanitizeText(n,ge())});}addRelation(e,r,n){if(typeof e=="object"&&typeof r=="object")this.addRelationObjs(e,r,n);else if(typeof e=="string"&&typeof r=="string"){let i=this.startIdIfNeeded(e.trim()),a=this.startTypeIfNeeded(e),s=this.endIdIfNeeded(r.trim()),l=this.endTypeIfNeeded(r);this.addState(i,a),this.addState(s,l),this.currentDocument.relations.push({id1:i,id2:s,relationTitle:n?Ze.sanitizeText(n,ge()):void 0});}}addDescription(e,r){var _n$descriptions;let n=this.currentDocument.states.get(e),i=r.startsWith(":")?r.replace(":","").trim():r;n===null||n===void 0||(_n$descriptions=n.descriptions)===null||_n$descriptions===void 0||_n$descriptions.push(Ze.sanitizeText(i,ge()));}cleanupLabel(e){return e.startsWith(":")?e.slice(2).trim():e.trim();}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`;}addStyleClass(e,r=""){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let n=this.classes.get(e);r&&n&&r.split(gs.STYLECLASS_SEP).forEach(i=>{let a=i.replace(/([^;]*);/,"$1").trim();if(RegExp(gs.COLOR_KEYWORD).exec(i)){let l=a.replace(gs.FILL_KEYWORD,gs.BG_FILL).replace(gs.COLOR_KEYWORD,gs.FILL_KEYWORD);n.textStyles.push(l);}n.styles.push(a);});}getClasses(){return this.classes;}setCssClass(e,r){e.split(",").forEach(n=>{var _i3;let i=this.getState(n);if(!i){let a=n.trim();this.addState(a),i=this.getState(a);}(_i3=i)===null||_i3===void 0||(_i3=_i3.classes)===null||_i3===void 0||_i3.push(r);});}setStyle(e,r){var _this$getState;(_this$getState=this.getState(e))===null||_this$getState===void 0||(_this$getState=_this$getState.styles)===null||_this$getState===void 0||_this$getState.push(r);}setTextStyle(e,r){var _this$getState2;(_this$getState2=this.getState(e))===null||_this$getState2===void 0||(_this$getState2=_this$getState2.textStyles)===null||_this$getState2===void 0||_this$getState2.push(r);}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===SP);}getDirection(){var _this$getDirectionSta,_this$getDirectionSta2;return(_this$getDirectionSta=(_this$getDirectionSta2=this.getDirectionStatement())===null||_this$getDirectionSta2===void 0?void 0:_this$getDirectionSta2.value)!==null&&_this$getDirectionSta!==void 0?_this$getDirectionSta:ape;}setDirection(e){let r=this.getDirectionStatement();r?r.value=e:this.rootDoc.unshift({stmt:SP,value:e});}trimColon(e){return e.startsWith(":")?e.slice(1).trim():e.trim();}getData(){let e=ge();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:FP(this.getRootDocV2())};}getConfig(){return ge().state;}},o(_Class206,"StateDB"),_Class206.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},_Class206);});var GHe,o6,zP=N(()=>{"use strict";GHe=o(t=>`
defs #statediagram-barbEnd {
    fill: ${t.transitionColor};
    stroke: ${t.transitionColor};
  }
g.stateGroup text {
  fill: ${t.nodeBorder};
  stroke: none;
  font-size: 10px;
}
g.stateGroup text {
  fill: ${t.textColor};
  stroke: none;
  font-size: 10px;

}
g.stateGroup .state-title {
  font-weight: bolder;
  fill: ${t.stateLabelColor};
}

g.stateGroup rect {
  fill: ${t.mainBkg};
  stroke: ${t.nodeBorder};
}

g.stateGroup line {
  stroke: ${t.lineColor};
  stroke-width: 1;
}

.transition {
  stroke: ${t.transitionColor};
  stroke-width: 1;
  fill: none;
}

.stateGroup .composit {
  fill: ${t.background};
  border-bottom: 1px
}

.stateGroup .alt-composit {
  fill: #e0e0e0;
  border-bottom: 1px
}

.state-note {
  stroke: ${t.noteBorderColor};
  fill: ${t.noteBkgColor};

  text {
    fill: ${t.noteTextColor};
    stroke: none;
    font-size: 10px;
  }
}

.stateLabel .box {
  stroke: none;
  stroke-width: 0;
  fill: ${t.mainBkg};
  opacity: 0.5;
}

.edgeLabel .label rect {
  fill: ${t.labelBackgroundColor};
  opacity: 0.5;
}
.edgeLabel {
  background-color: ${t.edgeLabelBackground};
  p {
    background-color: ${t.edgeLabelBackground};
  }
  rect {
    opacity: 0.5;
    background-color: ${t.edgeLabelBackground};
    fill: ${t.edgeLabelBackground};
  }
  text-align: center;
}
.edgeLabel .label text {
  fill: ${t.transitionLabelColor||t.tertiaryTextColor};
}
.label div .edgeLabel {
  color: ${t.transitionLabelColor||t.tertiaryTextColor};
}

.stateLabel text {
  fill: ${t.stateLabelColor};
  font-size: 10px;
  font-weight: bold;
}

.node circle.state-start {
  fill: ${t.specialStateColor};
  stroke: ${t.specialStateColor};
}

.node .fork-join {
  fill: ${t.specialStateColor};
  stroke: ${t.specialStateColor};
}

.node circle.state-end {
  fill: ${t.innerEndBackground};
  stroke: ${t.background};
  stroke-width: 1.5
}
.end-state-inner {
  fill: ${t.compositeBackground||t.background};
  // stroke: ${t.background};
  stroke-width: 1.5
}

.node rect {
  fill: ${t.stateBkg||t.mainBkg};
  stroke: ${t.stateBorder||t.nodeBorder};
  stroke-width: 1px;
}
.node polygon {
  fill: ${t.mainBkg};
  stroke: ${t.stateBorder||t.nodeBorder};;
  stroke-width: 1px;
}
#statediagram-barbEnd {
  fill: ${t.lineColor};
}

.statediagram-cluster rect {
  fill: ${t.compositeTitleBackground};
  stroke: ${t.stateBorder||t.nodeBorder};
  stroke-width: 1px;
}

.cluster-label, .nodeLabel {
  color: ${t.stateLabelColor};
  // line-height: 1;
}

.statediagram-cluster rect.outer {
  rx: 5px;
  ry: 5px;
}
.statediagram-state .divider {
  stroke: ${t.stateBorder||t.nodeBorder};
}

.statediagram-state .title-state {
  rx: 5px;
  ry: 5px;
}
.statediagram-cluster.statediagram-cluster .inner {
  fill: ${t.compositeBackground||t.background};
}
.statediagram-cluster.statediagram-cluster-alt .inner {
  fill: ${t.altBackground?t.altBackground:"#efefef"};
}

.statediagram-cluster .inner {
  rx:0;
  ry:0;
}

.statediagram-state rect.basic {
  rx: 5px;
  ry: 5px;
}
.statediagram-state rect.divider {
  stroke-dasharray: 10,10;
  fill: ${t.altBackground?t.altBackground:"#efefef"};
}

.note-edge {
  stroke-dasharray: 5;
}

.statediagram-note rect {
  fill: ${t.noteBkgColor};
  stroke: ${t.noteBorderColor};
  stroke-width: 1px;
  rx: 0;
  ry: 0;
}
.statediagram-note rect {
  fill: ${t.noteBkgColor};
  stroke: ${t.noteBorderColor};
  stroke-width: 1px;
  rx: 0;
  ry: 0;
}

.statediagram-note text {
  fill: ${t.noteTextColor};
}

.statediagram-note .nodeLabel {
  color: ${t.noteTextColor};
}
.statediagram .edgeLabel {
  color: red; // ${t.noteTextColor};
}

#dependencyStart, #dependencyEnd {
  fill: ${t.lineColor};
  stroke: ${t.lineColor};
  stroke-width: 1;
}

.statediagramTitleText {
  text-anchor: middle;
  font-size: 18px;
  fill: ${t.textColor};
}
`,"getStyles"),o6=GHe;});var VHe,UHe,HHe,WHe,Ape,qHe,YHe,XHe,jHe,GP,Cpe,_pe,Dpe=N(()=>{"use strict";pr();s6();nr();dr();qt();yt();VHe=o(t=>t.append("circle").attr("class","start-state").attr("r",ge().state.sizeUnit).attr("cx",ge().state.padding+ge().state.sizeUnit).attr("cy",ge().state.padding+ge().state.sizeUnit),"drawStartState"),UHe=o(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",ge().state.textHeight).attr("class","divider").attr("x2",ge().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),HHe=o((t,e)=>{let r=t.append("text").attr("x",2*ge().state.padding).attr("y",ge().state.textHeight+2*ge().state.padding).attr("font-size",ge().state.fontSize).attr("class","state-title").text(e.id),n=r.node().getBBox();return t.insert("rect",":first-child").attr("x",ge().state.padding).attr("y",ge().state.padding).attr("width",n.width+2*ge().state.padding).attr("height",n.height+2*ge().state.padding).attr("rx",ge().state.radius),r;},"drawSimpleState"),WHe=o((t,e)=>{let r=o(function(p,m,g){let y=p.append("tspan").attr("x",2*ge().state.padding).text(m);g||y.attr("dy",ge().state.textHeight);},"addTspan"),i=t.append("text").attr("x",2*ge().state.padding).attr("y",ge().state.textHeight+1.3*ge().state.padding).attr("font-size",ge().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),a=i.height,s=t.append("text").attr("x",ge().state.padding).attr("y",a+ge().state.padding*.4+ge().state.dividerMargin+ge().state.textHeight).attr("class","state-description"),l=!0,u=!0;e.descriptions.forEach(function(p){l||(r(s,p,u),u=!1),l=!1;});let h=t.append("line").attr("x1",ge().state.padding).attr("y1",ge().state.padding+a+ge().state.dividerMargin/2).attr("y2",ge().state.padding+a+ge().state.dividerMargin/2).attr("class","descr-divider"),f=s.node().getBBox(),d=Math.max(f.width,i.width);return h.attr("x2",d+3*ge().state.padding),t.insert("rect",":first-child").attr("x",ge().state.padding).attr("y",ge().state.padding).attr("width",d+2*ge().state.padding).attr("height",f.height+a+2*ge().state.padding).attr("rx",ge().state.radius),t;},"drawDescrState"),Ape=o((t,e,r)=>{let n=ge().state.padding,i=2*ge().state.padding,a=t.node().getBBox(),s=a.width,l=a.x,u=t.append("text").attr("x",0).attr("y",ge().state.titleShift).attr("font-size",ge().state.fontSize).attr("class","state-title").text(e.id),f=u.node().getBBox().width+i,d=Math.max(f,s);d===s&&(d=d+i);let p,m=t.node().getBBox();e.doc,p=l-n,f>s&&(p=(s-d)/2+n),Math.abs(l-m.x)<n&&f>s&&(p=l-(f-s)/2);let g=1-ge().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",g).attr("class",r?"alt-composit":"composit").attr("width",d).attr("height",m.height+ge().state.textHeight+ge().state.titleShift+1).attr("rx","0"),u.attr("x",p+n),f<=s&&u.attr("x",l+(d-i)/2-f/2+n),t.insert("rect",":first-child").attr("x",p).attr("y",ge().state.titleShift-ge().state.textHeight-ge().state.padding).attr("width",d).attr("height",ge().state.textHeight*3).attr("rx",ge().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",ge().state.titleShift-ge().state.textHeight-ge().state.padding).attr("width",d).attr("height",m.height+3+2*ge().state.textHeight).attr("rx",ge().state.radius),t;},"addTitleAndBox"),qHe=o(t=>(t.append("circle").attr("class","end-state-outer").attr("r",ge().state.sizeUnit+ge().state.miniPadding).attr("cx",ge().state.padding+ge().state.sizeUnit+ge().state.miniPadding).attr("cy",ge().state.padding+ge().state.sizeUnit+ge().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",ge().state.sizeUnit).attr("cx",ge().state.padding+ge().state.sizeUnit+2).attr("cy",ge().state.padding+ge().state.sizeUnit+2)),"drawEndState"),YHe=o((t,e)=>{let r=ge().state.forkWidth,n=ge().state.forkHeight;if(e.parentId){let i=r;r=n,n=i;}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",ge().state.padding).attr("y",ge().state.padding);},"drawForkJoinState"),XHe=o((t,e,r,n)=>{let i=0,a=n.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let s=t.replace(/\r\n/g,"<br/>");s=s.replace(/\n/g,"<br/>");let l=s.split(Ze.lineBreakRegex),u=1.25*ge().state.noteMargin;for(let h of l){let f=h.trim();if(f.length>0){let d=a.append("tspan");if(d.text(f),u===0){let p=d.node().getBBox();u+=p.height;}i+=u,d.attr("x",e+ge().state.noteMargin),d.attr("y",r+i+1.25*ge().state.noteMargin);}}return{textWidth:a.node().getBBox().width,textHeight:i};},"_drawLongText"),jHe=o((t,e)=>{e.attr("class","state-note");let r=e.append("rect").attr("x",0).attr("y",ge().state.padding),n=e.append("g"),{textWidth:i,textHeight:a}=XHe(t,0,0,n);return r.attr("height",a+2*ge().state.noteMargin),r.attr("width",i+ge().state.noteMargin*2),r;},"drawNote"),GP=o(function(t,e){let r=e.id,n={id:r,label:e.id,width:0,height:0},i=t.append("g").attr("id",r).attr("class","stateGroup");e.type==="start"&&VHe(i),e.type==="end"&&qHe(i),(e.type==="fork"||e.type==="join")&&YHe(i,e),e.type==="note"&&jHe(e.note.text,i),e.type==="divider"&&UHe(i),e.type==="default"&&e.descriptions.length===0&&HHe(i,e),e.type==="default"&&e.descriptions.length>0&&WHe(i,e);let a=i.node().getBBox();return n.width=a.width+2*ge().state.padding,n.height=a.height+2*ge().state.padding,n;},"drawState"),Cpe=0,_pe=o(function(t,e,r){let n=o(function(u){switch(u){case Jo.relationType.AGGREGATION:return"aggregation";case Jo.relationType.EXTENSION:return"extension";case Jo.relationType.COMPOSITION:return"composition";case Jo.relationType.DEPENDENCY:return"dependency";}},"getRelationType");e.points=e.points.filter(u=>!Number.isNaN(u.y));let i=e.points,a=El().x(function(u){return u.x;}).y(function(u){return u.y;}).curve(Lo),s=t.append("path").attr("d",a(i)).attr("id","edge"+Cpe).attr("class","transition"),l="";if(ge().state.arrowMarkerAbsolute&&(l=fu(!0)),s.attr("marker-end","url("+l+"#"+n(Jo.relationType.DEPENDENCY)+"End)"),r.title!==void 0){let u=t.append("g").attr("class","stateLabel"),{x:h,y:f}=Vt.calcLabelPosition(e.points),d=Ze.getRows(r.title),p=0,m=[],g=0,y=0;for(let b=0;b<=d.length;b++){let T=u.append("text").attr("text-anchor","middle").text(d[b]).attr("x",h).attr("y",f+p),C=T.node().getBBox();g=Math.max(g,C.width),y=Math.min(y,C.x),X.info(C.x,h,f+p),p===0&&(p=T.node().getBBox().height,X.info("Title height",p,f)),m.push(T);}let v=p*d.length;if(d.length>1){let b=(d.length-1)*p*.5;m.forEach((T,C)=>T.attr("y",f+C*p-b)),v=p*d.length;}let x=u.node().getBBox();u.insert("rect",":first-child").attr("class","box").attr("x",h-g/2-ge().state.padding/2).attr("y",f-v/2-ge().state.padding/2-3.5).attr("width",g+ge().state.padding).attr("height",v+ge().state.padding),X.info(x);}Cpe++;},"drawEdge");});var po,VP,KHe,QHe,ZHe,JHe,Lpe,Rpe,Npe=N(()=>{"use strict";pr();KR();Uo();yt();dr();Dpe();qt();yi();VP={},KHe=o(function(){},"setConf"),QHe=o(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z");},"insertMarkers"),ZHe=o(function(t,e,r,n){po=ge().state;let i=ge().securityLevel,a;i==="sandbox"&&(a=Ge("#i"+e));let s=i==="sandbox"?Ge(a.nodes()[0].contentDocument.body):Ge("body"),l=i==="sandbox"?a.nodes()[0].contentDocument:document;X.debug("Rendering diagram "+t);let u=s.select(`[id='${e}']`);QHe(u);let h=n.db.getRootDoc();Lpe(h,u,void 0,!1,s,l,n);let f=po.padding,d=u.node().getBBox(),p=d.width+f*2,m=d.height+f*2,g=p*1.75;hn(u,m,g,po.useMaxWidth),u.attr("viewBox",`${d.x-po.padding}  ${d.y-po.padding} `+p+" "+m);},"draw"),JHe=o(t=>t?t.length*po.fontSizeFactor:1,"getLabelWidth"),Lpe=o((t,e,r,n,i,a,s)=>{let l=new an({compound:!0,multigraph:!0}),u,h=!0;for(u=0;u<t.length;u++)if(t[u].stmt==="relation"){h=!1;break;}r?l.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:po.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):l.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:po.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{};});let f=s.db.getStates(),d=s.db.getRelations(),p=Object.keys(f),m=!0;for(let b of p){let T=f[b];r&&(T.parentId=r);let C;if(T.doc){let w=e.append("g").attr("id",T.id).attr("class","stateGroup");if(C=Lpe(T.doc,w,T.id,!n,i,a,s),m){w=Ape(w,T,n);let E=w.node().getBBox();C.width=E.width,C.height=E.height+po.padding/2,VP[T.id]={y:po.compositTitleSize};}else{let E=w.node().getBBox();C.width=E.width,C.height=E.height;}}else C=GP(e,T,l);if(T.note){let w={descriptions:[],id:T.id+"-note",note:T.note,type:"note"},E=GP(e,w,l);T.note.position==="left of"?(l.setNode(C.id+"-note",E),l.setNode(C.id,C)):(l.setNode(C.id,C),l.setNode(C.id+"-note",E)),l.setParent(C.id,C.id+"-group"),l.setParent(C.id+"-note",C.id+"-group");}else l.setNode(C.id,C);}X.debug("Count=",l.nodeCount(),l);let g=0;d.forEach(function(b){g++,X.debug("Setting edge",b),l.setEdge(b.id1,b.id2,{relation:b,width:JHe(b.title),height:po.labelHeight*Ze.getRows(b.title).length,labelpos:"c"},"id"+g);}),z2(l),X.debug("Graph after layout",l.nodes());let y=e.node();l.nodes().forEach(function(b){b!==void 0&&l.node(b)!==void 0?(X.warn("Node "+b+": "+JSON.stringify(l.node(b))),i.select("#"+y.id+" #"+b).attr("transform","translate("+(l.node(b).x-l.node(b).width/2)+","+(l.node(b).y+(VP[b]?VP[b].y:0)-l.node(b).height/2)+" )"),i.select("#"+y.id+" #"+b).attr("data-x-shift",l.node(b).x-l.node(b).width/2),a.querySelectorAll("#"+y.id+" #"+b+" .divider").forEach(C=>{let w=C.parentElement,E=0,_=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),_=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(_)&&(_=0)),C.setAttribute("x1",0-_+8),C.setAttribute("x2",E-_-8);})):X.debug("No Node "+b+": "+JSON.stringify(l.node(b)));});let v=y.getBBox();l.edges().forEach(function(b){b!==void 0&&l.edge(b)!==void 0&&(X.debug("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(l.edge(b))),_pe(e,l.edge(b),l.edge(b).relation));}),v=y.getBBox();let x={id:r||"root",label:r||"root",width:0,height:0};return x.width=v.width+2*po.padding,x.height=v.height+2*po.padding,X.debug("Doc rendered",x,l),x;},"renderDoc"),Rpe={setConf:KHe,draw:ZHe};});var Mpe={};hr(Mpe,{diagram:()=>eWe});var eWe,Ipe=N(()=>{"use strict";EP();s6();zP();Npe();eWe={parser:KS,get db(){return new Jo(1);},renderer:Rpe,styles:o6,init:o(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute;},"init")};});var Bpe={};hr(Bpe,{diagram:()=>iWe});var iWe,Fpe=N(()=>{"use strict";EP();s6();zP();$P();iWe={parser:KS,get db(){return new Jo(2);},renderer:kpe,styles:o6,init:o(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute;},"init")};});var UP,Gpe,Vpe=N(()=>{"use strict";UP=function(){var t=o(function(d,p,m,g){for(m=m||{},g=d.length;g--;m[d[g]]=p);return m;},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],i=[1,11],a=[1,12],s=[1,13],l=[1,14],u={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:o(function(p,m,g,y,v,x,b){var T=x.length-1;switch(v){case 1:return x[T-1];case 2:this.$=[];break;case 3:x[T-1].push(x[T]),this.$=x[T-1];break;case 4:case 5:this.$=x[T];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(x[T].substr(6)),this.$=x[T].substr(6);break;case 9:this.$=x[T].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=x[T].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(x[T].substr(8)),this.$=x[T].substr(8);break;case 13:y.addTask(x[T-1],x[T]),this.$="task";break;}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:s,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:n,14:i,16:a,17:s,18:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:o(function(p,m){if(m.recoverable)this.trace(p);else{var g=new Error(p);throw g.hash=m,g;}},"parseError"),parse:o(function(p){var m=this,g=[0],y=[],v=[null],x=[],b=this.table,T="",C=0,w=0,E=0,_=2,A=1,D=x.slice.call(arguments,1),O=Object.create(this.lexer),R={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(R.yy[k]=this.yy[k]);O.setInput(p,R.yy),R.yy.lexer=O,R.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var L=O.yylloc;x.push(L);var S=O.options&&O.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function I(Q){g.length=g.length-2*Q,v.length=v.length-Q,x.length=x.length-Q;}o(I,"popStack");function M(){var Q;return Q=y.pop()||O.lex()||A,typeof Q!="number"&&(Q instanceof Array&&(y=Q,Q=y.pop()),Q=m.symbols_[Q]||Q),Q;}o(M,"lex");for(var P,B,F,z,$,U,K={},ee,Y,ce,Z;;){if(F=g[g.length-1],this.defaultActions[F]?z=this.defaultActions[F]:((P===null||typeof P>"u")&&(P=M()),z=b[F]&&b[F][P]),typeof z>"u"||!z.length||!z[0]){var ue="";Z=[];for(ee in b[F])this.terminals_[ee]&&ee>_&&Z.push("'"+this.terminals_[ee]+"'");O.showPosition?ue="Parse error on line "+(C+1)+`:
`+O.showPosition()+`
Expecting `+Z.join(", ")+", got '"+(this.terminals_[P]||P)+"'":ue="Parse error on line "+(C+1)+": Unexpected "+(P==A?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(ue,{text:O.match,token:this.terminals_[P]||P,line:O.yylineno,loc:L,expected:Z});}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+P);switch(z[0]){case 1:g.push(P),v.push(O.yytext),x.push(O.yylloc),g.push(z[1]),P=null,B?(P=B,B=null):(w=O.yyleng,T=O.yytext,C=O.yylineno,L=O.yylloc,E>0&&E--);break;case 2:if(Y=this.productions_[z[1]][1],K.$=v[v.length-Y],K._$={first_line:x[x.length-(Y||1)].first_line,last_line:x[x.length-1].last_line,first_column:x[x.length-(Y||1)].first_column,last_column:x[x.length-1].last_column},S&&(K._$.range=[x[x.length-(Y||1)].range[0],x[x.length-1].range[1]]),U=this.performAction.apply(K,[T,w,C,R.yy,z[1],v,x].concat(D)),typeof U<"u")return U;Y&&(g=g.slice(0,-1*Y*2),v=v.slice(0,-1*Y),x=x.slice(0,-1*Y)),g.push(this.productions_[z[1]][0]),v.push(K.$),x.push(K._$),ce=b[g[g.length-2]][g[g.length-1]],g.push(ce);break;case 3:return!0;}}return!0;},"parse")},h=function(){var d={EOF:1,parseError:o(function(m,g){if(this.yy.parser)this.yy.parser.parseError(m,g);else throw new Error(m);},"parseError"),setInput:o(function(p,m){return this.yy=m||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var m=p.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p;},"input"),unput:o(function(p){var m=p.length,g=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===y.length?this.yylloc.first_column:0)+y[y.length-g.length].length-g[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(p){this.unput(this.match.slice(p));},"less"),pastInput:o(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var p=this.pastInput(),m=new Array(p.length+1).join("-");return p+this.upcomingInput()+`
`+m+"^";},"showPosition"),test_match:o(function(p,m){var g,y,v;if(this.options.backtrack_lexer&&(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(v.yylloc.range=this.yylloc.range.slice(0))),y=p[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],g=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var x in v)this[x]=v[x];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,m,g,y;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),x=0;x<v.length;x++)if(g=this._input.match(this.rules[v[x]]),g&&(!m||g[0].length>m[0].length)){if(m=g,y=x,this.options.backtrack_lexer){if(p=this.test_match(g,v[x]),p!==!1)return p;if(this._backtrack){m=!1;continue;}else return!1;}else if(!this.options.flex)break;}return m?(p=this.test_match(m,v[y]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var m=this.next();return m||this.lex();},"lex"),begin:o(function(m){this.conditionStack.push(m);},"begin"),popState:o(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL";},"topState"),pushState:o(function(m){this.begin(m);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(m,g,y,v){var x=v;switch(y){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID";}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return d;}();u.lexer=h;function f(){this.yy={};}return o(f,"Parser"),f.prototype=u,u.Parser=f,new f();}();UP.parser=UP;Gpe=UP;});var I1,HP,Ob,Pb,lWe,cWe,uWe,hWe,fWe,dWe,pWe,Upe,mWe,WP,Hpe=N(()=>{"use strict";qt();ci();I1="",HP=[],Ob=[],Pb=[],lWe=o(function(){HP.length=0,Ob.length=0,I1="",Pb.length=0,wr();},"clear"),cWe=o(function(t){I1=t,HP.push(t);},"addSection"),uWe=o(function(){return HP;},"getSections"),hWe=o(function(){let t=Upe(),e=100,r=0;for(;!t&&r<e;)t=Upe(),r++;return Ob.push(...Pb),Ob;},"getTasks"),fWe=o(function(){let t=[];return Ob.forEach(r=>{r.people&&t.push(...r.people);}),[...new Set(t)].sort();},"updateActors"),dWe=o(function(t,e){let r=e.substr(1).split(":"),n=0,i=[];r.length===1?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));let a=i.map(l=>l.trim()),s={section:I1,type:I1,people:a,task:t,score:n};Pb.push(s);},"addTask"),pWe=o(function(t){let e={section:I1,type:I1,description:t,task:t,classes:[]};Ob.push(e);},"addTaskOrg"),Upe=o(function(){let t=o(function(r){return Pb[r].processed;},"compileTask"),e=!0;for(let[r,n]of Pb.entries())t(r),e=e&&n.processed;return e;},"compileTasks"),mWe=o(function(){return fWe();},"getActors"),WP={getConfig:o(()=>ge().journey,"getConfig"),clear:lWe,setDiagramTitle:Ir,getDiagramTitle:Rr,setAccTitle:Cr,getAccTitle:_r,setAccDescription:Dr,getAccDescription:Lr,addSection:cWe,getSections:uWe,getTasks:hWe,addTask:dWe,addTaskOrg:pWe,getActors:mWe};});var gWe,Wpe,qpe=N(()=>{"use strict";Vm();gWe=o(t=>`.label {
    font-family: ${t.fontFamily};
    color: ${t.textColor};
  }
  .mouth {
    stroke: #666;
  }

  line {
    stroke: ${t.textColor}
  }

  .legend {
    fill: ${t.textColor};
    font-family: ${t.fontFamily};
  }

  .label text {
    fill: #333;
  }
  .label {
    color: ${t.textColor}
  }

  .face {
    ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
    stroke: #999;
  }

  .node rect,
  .node circle,
  .node ellipse,
  .node polygon,
  .node path {
    fill: ${t.mainBkg};
    stroke: ${t.nodeBorder};
    stroke-width: 1px;
  }

  .node .label {
    text-align: center;
  }
  .node.clickable {
    cursor: pointer;
  }

  .arrowheadPath {
    fill: ${t.arrowheadColor};
  }

  .edgePath .path {
    stroke: ${t.lineColor};
    stroke-width: 1.5px;
  }

  .flowchart-link {
    stroke: ${t.lineColor};
    fill: none;
  }

  .edgeLabel {
    background-color: ${t.edgeLabelBackground};
    rect {
      opacity: 0.5;
    }
    text-align: center;
  }

  .cluster rect {
  }

  .cluster text {
    fill: ${t.titleColor};
  }

  div.mermaidTooltip {
    position: absolute;
    text-align: center;
    max-width: 200px;
    padding: 2px;
    font-family: ${t.fontFamily};
    font-size: 12px;
    background: ${t.tertiaryColor};
    border: 1px solid ${t.border2};
    border-radius: 2px;
    pointer-events: none;
    z-index: 100;
  }

  .task-type-0, .section-type-0  {
    ${t.fillType0?`fill: ${t.fillType0}`:""};
  }
  .task-type-1, .section-type-1  {
    ${t.fillType0?`fill: ${t.fillType1}`:""};
  }
  .task-type-2, .section-type-2  {
    ${t.fillType0?`fill: ${t.fillType2}`:""};
  }
  .task-type-3, .section-type-3  {
    ${t.fillType0?`fill: ${t.fillType3}`:""};
  }
  .task-type-4, .section-type-4  {
    ${t.fillType0?`fill: ${t.fillType4}`:""};
  }
  .task-type-5, .section-type-5  {
    ${t.fillType0?`fill: ${t.fillType5}`:""};
  }
  .task-type-6, .section-type-6  {
    ${t.fillType0?`fill: ${t.fillType6}`:""};
  }
  .task-type-7, .section-type-7  {
    ${t.fillType0?`fill: ${t.fillType7}`:""};
  }

  .actor-0 {
    ${t.actor0?`fill: ${t.actor0}`:""};
  }
  .actor-1 {
    ${t.actor1?`fill: ${t.actor1}`:""};
  }
  .actor-2 {
    ${t.actor2?`fill: ${t.actor2}`:""};
  }
  .actor-3 {
    ${t.actor3?`fill: ${t.actor3}`:""};
  }
  .actor-4 {
    ${t.actor4?`fill: ${t.actor4}`:""};
  }
  .actor-5 {
    ${t.actor5?`fill: ${t.actor5}`:""};
  }
  ${Lc()}
`,"getStyles"),Wpe=gWe;});var qP,yWe,Xpe,jpe,vWe,xWe,Ype,bWe,TWe,Kpe,wWe,O1,Qpe=N(()=>{"use strict";pr();Jv();qP=o(function(t,e){return Sd(t,e);},"drawRect"),yWe=o(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(u){let h=kl().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")");}o(a,"smile");function s(u){let h=kl().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")");}o(s,"sad");function l(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666");}return o(l,"ambivalent"),e.score>3?a(i):e.score<3?s(i):l(i),n;},"drawFace"),Xpe=o(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r;},"drawCircle"),jpe=o(function(t,e){return YY(t,e);},"drawText"),vWe=o(function(t,e){function r(i,a,s,l,u){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+l-u)+" "+(i+s-u*1.2)+","+(a+l)+" "+i+","+(a+l);}o(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,jpe(t,e);},"drawLabel"),xWe=o(function(t,e,r){let n=t.append("g"),i=Sl();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,qP(n,i),Kpe(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour);},"drawSection"),Ype=-1,bWe=o(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");Ype++;let a=300+5*30;i.append("line").attr("id","task"+Ype).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",a).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),yWe(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=Sl();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,qP(i,s);let l=e.x+14;e.people.forEach(u=>{let h=e.actors[u].color,f={cx:l,cy:e.y,r:7,fill:h,stroke:"#000",title:u,pos:e.actors[u].position};Xpe(i,f),l+=10;}),Kpe(r)(e.task,i,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour);},"drawTask"),TWe=o(function(t,e){rT(t,e);},"drawBackgroundRect"),Kpe=function(){function t(i,a,s,l,u,h,f,d){let p=a.append("text").attr("x",s+u/2).attr("y",l+h/2+5).style("font-color",d).style("text-anchor","middle").text(i);n(p,f);}o(t,"byText");function e(i,a,s,l,u,h,f,d,p){let{taskFontSize:m,taskFontFamily:g}=d,y=i.split(/<br\s*\/?>/gi);for(let v=0;v<y.length;v++){let x=v*m-m*(y.length-1)/2,b=a.append("text").attr("x",s+u/2).attr("y",l).attr("fill",p).style("text-anchor","middle").style("font-size",m).style("font-family",g);b.append("tspan").attr("x",s+u/2).attr("dy",x).text(y[v]),b.attr("y",l+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(b,f);}}o(e,"byTspan");function r(i,a,s,l,u,h,f,d){let p=a.append("switch"),g=p.append("foreignObject").attr("x",s).attr("y",l).attr("width",u).attr("height",h).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,s,l,u,h,f,d),n(g,f);}o(r,"byFo");function n(i,a){for(let s in a)s in a&&i.attr(s,a[s]);}return o(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e;};}(),wWe=o(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z");},"initGraphics"),O1={drawRect:qP,drawCircle:Xpe,drawSection:xWe,drawText:jpe,drawLabel:vWe,drawTask:bWe,drawBackgroundRect:TWe,initGraphics:wWe};});function EWe(t){let e=ge().journey,r=e.maxLabelWidth;l6=0;let n=60;Object.keys(Qu).forEach(i=>{let a=Qu[i].color,s={cx:20,cy:n,r:7,fill:a,stroke:"#000",pos:Qu[i].position};O1.drawCircle(t,s);let l=t.append("text").attr("visibility","hidden").text(i),u=l.node().getBoundingClientRect().width;l.remove();let h=[];if(u<=r)h=[i];else{let f=i.split(" "),d="";l=t.append("text").attr("visibility","hidden"),f.forEach(p=>{let m=d?`${d} ${p}`:p;if(l.text(m),l.node().getBoundingClientRect().width>r){if(d&&h.push(d),d=p,l.text(p),l.node().getBoundingClientRect().width>r){let y="";for(let v of p)y+=v,l.text(y+"-"),l.node().getBoundingClientRect().width>r&&(h.push(y.slice(0,-1)+"-"),y=v);d=y;}}else d=m;}),d&&h.push(d),l.remove();}h.forEach((f,d)=>{var _e$boxTextMargin;let p={x:40,y:n+7+d*20,fill:"#666",text:f,textMargin:(_e$boxTextMargin=e.boxTextMargin)!==null&&_e$boxTextMargin!==void 0?_e$boxTextMargin:5},g=O1.drawText(t,p).node().getBoundingClientRect().width;g>l6&&g>e.leftMargin-g&&(l6=g);}),n+=Math.max(20,h.length*20);});}var kWe,Qu,l6,Gl,kf,SWe,el,YP,Zpe,CWe,XP,Jpe=N(()=>{"use strict";pr();Qpe();qt();yi();kWe=o(function(t){Object.keys(t).forEach(function(r){Gl[r]=t[r];});},"setConf"),Qu={},l6=0;o(EWe,"drawActorLegend");Gl=ge().journey,kf=0,SWe=o(function(t,e,r,n){let i=ge(),a=i.journey.titleColor,s=i.journey.titleFontSize,l=i.journey.titleFontFamily,u=i.securityLevel,h;u==="sandbox"&&(h=Ge("#i"+e));let f=u==="sandbox"?Ge(h.nodes()[0].contentDocument.body):Ge("body");el.init();let d=f.select("#"+e);O1.initGraphics(d);let p=n.db.getTasks(),m=n.db.getDiagramTitle(),g=n.db.getActors();for(let C in Qu)delete Qu[C];let y=0;g.forEach(C=>{Qu[C]={color:Gl.actorColours[y%Gl.actorColours.length],position:y},y++;}),EWe(d),kf=Gl.leftMargin+l6,el.insert(0,0,kf,Object.keys(Qu).length*50),CWe(d,p,0);let v=el.getBounds();m&&d.append("text").text(m).attr("x",kf).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",l);let x=v.stopy-v.starty+2*Gl.diagramMarginY,b=kf+v.stopx+2*Gl.diagramMarginX;hn(d,x,b,Gl.useMaxWidth),d.append("line").attr("x1",kf).attr("y1",Gl.height*4).attr("x2",b-kf-4).attr("y2",Gl.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");let T=m?70:0;d.attr("viewBox",`${v.startx} -25 ${b} ${x+T}`),d.attr("preserveAspectRatio","xMinYMin meet"),d.attr("height",x+T+25);},"draw"),el={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:o(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0;},"init"),updateVal:o(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e]);},"updateVal"),updateBounds:o(function(t,e,r,n){let i=ge().journey,a=this,s=0;function l(u){return o(function(f){s++;let d=a.sequenceItems.length-s+1;a.updateVal(f,"starty",e-d*i.boxMargin,Math.min),a.updateVal(f,"stopy",n+d*i.boxMargin,Math.max),a.updateVal(el.data,"startx",t-d*i.boxMargin,Math.min),a.updateVal(el.data,"stopx",r+d*i.boxMargin,Math.max),u!=="activation"&&(a.updateVal(f,"startx",t-d*i.boxMargin,Math.min),a.updateVal(f,"stopx",r+d*i.boxMargin,Math.max),a.updateVal(el.data,"starty",e-d*i.boxMargin,Math.min),a.updateVal(el.data,"stopy",n+d*i.boxMargin,Math.max));},"updateItemBounds");}o(l,"updateFn"),this.sequenceItems.forEach(l());},"updateBounds"),insert:o(function(t,e,r,n){let i=Math.min(t,r),a=Math.max(t,r),s=Math.min(e,n),l=Math.max(e,n);this.updateVal(el.data,"startx",i,Math.min),this.updateVal(el.data,"starty",s,Math.min),this.updateVal(el.data,"stopx",a,Math.max),this.updateVal(el.data,"stopy",l,Math.max),this.updateBounds(i,s,a,l);},"insert"),bumpVerticalPos:o(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos;},"bumpVerticalPos"),getVerticalPos:o(function(){return this.verticalPos;},"getVerticalPos"),getBounds:o(function(){return this.data;},"getBounds")},YP=Gl.sectionFills,Zpe=Gl.sectionColours,CWe=o(function(t,e,r){let n=ge().journey,i="",a=n.height*2+n.diagramMarginY,s=r+a,l=0,u="#CCC",h="black",f=0;for(let[d,p]of e.entries()){if(i!==p.section){u=YP[l%YP.length],f=l%YP.length,h=Zpe[l%Zpe.length];let g=0,y=p.section;for(let x=d;x<e.length&&e[x].section==y;x++)g=g+1;let v={x:d*n.taskMargin+d*n.width+kf,y:50,text:p.section,fill:u,num:f,colour:h,taskCount:g};O1.drawSection(t,v,n),i=p.section,l++;}let m=p.people.reduce((g,y)=>(Qu[y]&&(g[y]=Qu[y]),g),{});p.x=d*n.taskMargin+d*n.width+kf,p.y=s,p.width=n.diagramMarginX,p.height=n.diagramMarginY,p.colour=h,p.fill=u,p.num=f,p.actors=m,O1.drawTask(t,p,n),el.insert(p.x,p.y,p.x+p.width+n.taskMargin,300+5*30);}},"drawTasks"),XP={setConf:kWe,draw:SWe};});var e0e={};hr(e0e,{diagram:()=>AWe});var AWe,t0e=N(()=>{"use strict";Vpe();Hpe();qpe();Jpe();AWe={parser:Gpe,db:WP,renderer:XP,styles:Wpe,init:o(t=>{XP.setConf(t.journey),WP.clear();},"init")};});var KP,l0e,c0e=N(()=>{"use strict";KP=function(){var t=o(function(p,m,g,y){for(g=g||{},y=p.length;y--;g[p[y]]=m);return g;},"o"),e=[6,8,10,11,12,14,16,17,20,21],r=[1,9],n=[1,10],i=[1,11],a=[1,12],s=[1,13],l=[1,16],u=[1,17],h={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:o(function(m,g,y,v,x,b,T){var C=b.length-1;switch(x){case 1:return b[C-1];case 2:this.$=[];break;case 3:b[C-1].push(b[C]),this.$=b[C-1];break;case 4:case 5:this.$=b[C];break;case 6:case 7:this.$=[];break;case 8:v.getCommonDb().setDiagramTitle(b[C].substr(6)),this.$=b[C].substr(6);break;case 9:this.$=b[C].trim(),v.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=b[C].trim(),v.getCommonDb().setAccDescription(this.$);break;case 12:v.addSection(b[C].substr(8)),this.$=b[C].substr(8);break;case 15:v.addTask(b[C],0,""),this.$=b[C];break;case 16:v.addEvent(b[C].substr(2)),this.$=b[C];break;}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:s,18:14,19:15,20:l,21:u},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:r,12:n,14:i,16:a,17:s,18:14,19:15,20:l,21:u},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:o(function(m,g){if(g.recoverable)this.trace(m);else{var y=new Error(m);throw y.hash=g,y;}},"parseError"),parse:o(function(m){var g=this,y=[0],v=[],x=[null],b=[],T=this.table,C="",w=0,E=0,_=0,A=2,D=1,O=b.slice.call(arguments,1),R=Object.create(this.lexer),k={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(k.yy[L]=this.yy[L]);R.setInput(m,k.yy),k.yy.lexer=R,k.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var S=R.yylloc;b.push(S);var I=R.options&&R.options.ranges;typeof k.yy.parseError=="function"?this.parseError=k.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function M(j){y.length=y.length-2*j,x.length=x.length-j,b.length=b.length-j;}o(M,"popStack");function P(){var j;return j=v.pop()||R.lex()||D,typeof j!="number"&&(j instanceof Array&&(v=j,j=v.pop()),j=g.symbols_[j]||j),j;}o(P,"lex");for(var B,F,z,$,U,K,ee={},Y,ce,Z,ue;;){if(z=y[y.length-1],this.defaultActions[z]?$=this.defaultActions[z]:((B===null||typeof B>"u")&&(B=P()),$=T[z]&&T[z][B]),typeof $>"u"||!$.length||!$[0]){var Q="";ue=[];for(Y in T[z])this.terminals_[Y]&&Y>A&&ue.push("'"+this.terminals_[Y]+"'");R.showPosition?Q="Parse error on line "+(w+1)+`:
`+R.showPosition()+`
Expecting `+ue.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Q="Parse error on line "+(w+1)+": Unexpected "+(B==D?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Q,{text:R.match,token:this.terminals_[B]||B,line:R.yylineno,loc:S,expected:ue});}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+B);switch($[0]){case 1:y.push(B),x.push(R.yytext),b.push(R.yylloc),y.push($[1]),B=null,F?(B=F,F=null):(E=R.yyleng,C=R.yytext,w=R.yylineno,S=R.yylloc,_>0&&_--);break;case 2:if(ce=this.productions_[$[1]][1],ee.$=x[x.length-ce],ee._$={first_line:b[b.length-(ce||1)].first_line,last_line:b[b.length-1].last_line,first_column:b[b.length-(ce||1)].first_column,last_column:b[b.length-1].last_column},I&&(ee._$.range=[b[b.length-(ce||1)].range[0],b[b.length-1].range[1]]),K=this.performAction.apply(ee,[C,E,w,k.yy,$[1],x,b].concat(O)),typeof K<"u")return K;ce&&(y=y.slice(0,-1*ce*2),x=x.slice(0,-1*ce),b=b.slice(0,-1*ce)),y.push(this.productions_[$[1]][0]),x.push(ee.$),b.push(ee._$),Z=T[y[y.length-2]][y[y.length-1]],y.push(Z);break;case 3:return!0;}}return!0;},"parse")},f=function(){var p={EOF:1,parseError:o(function(g,y){if(this.yy.parser)this.yy.parser.parseError(g,y);else throw new Error(g);},"parseError"),setInput:o(function(m,g){return this.yy=g||this.yy||{},this._input=m,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var g=m.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m;},"input"),unput:o(function(m){var g=m.length,y=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var v=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var x=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===v.length?this.yylloc.first_column:0)+v[v.length-y.length].length-y[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(m){this.unput(this.match.slice(m));},"less"),pastInput:o(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var m=this.pastInput(),g=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
`+g+"^";},"showPosition"),test_match:o(function(m,g){var y,v,x;if(this.options.backtrack_lexer&&(x={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(x.yylloc.range=this.yylloc.range.slice(0))),v=m[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+m[0].length},this.yytext+=m[0],this.match+=m[0],this.matches=m,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(m[0].length),this.matched+=m[0],y=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var b in x)this[b]=x[b];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,g,y,v;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),b=0;b<x.length;b++)if(y=this._input.match(this.rules[x[b]]),y&&(!g||y[0].length>g[0].length)){if(g=y,v=b,this.options.backtrack_lexer){if(m=this.test_match(y,x[b]),m!==!1)return m;if(this._backtrack){g=!1;continue;}else return!1;}else if(!this.options.flex)break;}return g?(m=this.test_match(g,x[v]),m!==!1?m:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var g=this.next();return g||this.lex();},"lex"),begin:o(function(g){this.conditionStack.push(g);},"begin"),popState:o(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL";},"topState"),pushState:o(function(g){this.begin(g);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(g,y,v,x){var b=x;switch(v){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID";}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return p;}();h.lexer=f;function d(){this.yy={};}return o(d,"Parser"),d.prototype=h,h.Parser=d,new d();}();KP.parser=KP;l0e=KP;});var ZP={};hr(ZP,{addEvent:()=>v0e,addSection:()=>p0e,addTask:()=>y0e,addTaskOrg:()=>x0e,clear:()=>d0e,default:()=>PWe,getCommonDb:()=>f0e,getSections:()=>m0e,getTasks:()=>g0e});var P1,h0e,QP,c6,B1,f0e,d0e,p0e,m0e,g0e,y0e,v0e,x0e,u0e,PWe,b0e=N(()=>{"use strict";ci();P1="",h0e=0,QP=[],c6=[],B1=[],f0e=o(()=>Jy,"getCommonDb"),d0e=o(function(){QP.length=0,c6.length=0,P1="",B1.length=0,wr();},"clear"),p0e=o(function(t){P1=t,QP.push(t);},"addSection"),m0e=o(function(){return QP;},"getSections"),g0e=o(function(){let t=u0e(),e=100,r=0;for(;!t&&r<e;)t=u0e(),r++;return c6.push(...B1),c6;},"getTasks"),y0e=o(function(t,e,r){let n={id:h0e++,section:P1,type:P1,task:t,score:e||0,events:r?[r]:[]};B1.push(n);},"addTask"),v0e=o(function(t){B1.find(r=>r.id===h0e-1).events.push(t);},"addEvent"),x0e=o(function(t){let e={section:P1,type:P1,description:t,task:t,classes:[]};c6.push(e);},"addTaskOrg"),u0e=o(function(){let t=o(function(r){return B1[r].processed;},"compileTask"),e=!0;for(let[r,n]of B1.entries())t(r),e=e&&n.processed;return e;},"compileTasks"),PWe={clear:d0e,getCommonDb:f0e,addSection:p0e,getSections:m0e,getTasks:g0e,addTask:y0e,addTaskOrg:x0e,addEvent:v0e};});function E0e(t,e){t.each(function(){var r=Ge(this),n=r.text().split(/(\s+|<br>)/).reverse(),i,a=[],s=1.1,l=r.attr("y"),u=parseFloat(r.attr("dy")),h=r.text(null).append("tspan").attr("x",0).attr("y",l).attr("dy",u+"em");for(let f=0;f<n.length;f++)i=n[n.length-1-f],a.push(i),h.text(a.join(" ").trim()),(h.node().getComputedTextLength()>e||i==="<br>")&&(a.pop(),h.text(a.join(" ").trim()),i==="<br>"?a=[""]:a=[i],h=r.append("tspan").attr("x",0).attr("y",l).attr("dy",s+"em").text(i));});}var BWe,u6,FWe,$We,w0e,zWe,GWe,T0e,VWe,UWe,HWe,JP,k0e,WWe,qWe,YWe,XWe,Ef,S0e=N(()=>{"use strict";pr();BWe=12,u6=o(function(t,e){let r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r;},"drawRect"),FWe=o(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(u){let h=kl().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")");}o(a,"smile");function s(u){let h=kl().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")");}o(s,"sad");function l(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666");}return o(l,"ambivalent"),e.score>3?a(i):e.score<3?s(i):l(i),n;},"drawFace"),$We=o(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r;},"drawCircle"),w0e=o(function(t,e){let r=e.text.replace(/<br\s*\/?>/gi," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class!==void 0&&n.attr("class",e.class);let i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n;},"drawText"),zWe=o(function(t,e){function r(i,a,s,l,u){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+l-u)+" "+(i+s-u*1.2)+","+(a+l)+" "+i+","+(a+l);}o(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,w0e(t,e);},"drawLabel"),GWe=o(function(t,e,r){let n=t.append("g"),i=JP();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,u6(n,i),k0e(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour);},"drawSection"),T0e=-1,VWe=o(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");T0e++;let a=300+5*30;i.append("line").attr("id","task"+T0e).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",a).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),FWe(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=JP();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,u6(i,s),k0e(r)(e.task,i,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour);},"drawTask"),UWe=o(function(t,e){u6(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower();},"drawBackgroundRect"),HWe=o(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0};},"getTextObj"),JP=o(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0};},"getNoteRect"),k0e=function(){function t(i,a,s,l,u,h,f,d){let p=a.append("text").attr("x",s+u/2).attr("y",l+h/2+5).style("font-color",d).style("text-anchor","middle").text(i);n(p,f);}o(t,"byText");function e(i,a,s,l,u,h,f,d,p){let{taskFontSize:m,taskFontFamily:g}=d,y=i.split(/<br\s*\/?>/gi);for(let v=0;v<y.length;v++){let x=v*m-m*(y.length-1)/2,b=a.append("text").attr("x",s+u/2).attr("y",l).attr("fill",p).style("text-anchor","middle").style("font-size",m).style("font-family",g);b.append("tspan").attr("x",s+u/2).attr("dy",x).text(y[v]),b.attr("y",l+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(b,f);}}o(e,"byTspan");function r(i,a,s,l,u,h,f,d){let p=a.append("switch"),g=p.append("foreignObject").attr("x",s).attr("y",l).attr("width",u).attr("height",h).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,s,l,u,h,f,d),n(g,f);}o(r,"byFo");function n(i,a){for(let s in a)s in a&&i.attr(s,a[s]);}return o(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e;};}(),WWe=o(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z");},"initGraphics");o(E0e,"wrap");qWe=o(function(t,e,r,n){var _n$fontSize;let i=r%BWe-1,a=t.append("g");e.section=i,a.attr("class",(e.class?e.class+" ":"")+"timeline-node "+("section-"+i));let s=a.append("g"),l=a.append("g"),h=l.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(E0e,e.width).node().getBBox(),f=(_n$fontSize=n.fontSize)!==null&&_n$fontSize!==void 0&&_n$fontSize.replace?n.fontSize.replace("px",""):n.fontSize;return e.height=h.height+f*1.1*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,l.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),XWe(s,e,i,n),e;},"drawNode"),YWe=o(function(t,e,r){var _r$fontSize;let n=t.append("g"),a=n.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(E0e,e.width).node().getBBox(),s=(_r$fontSize=r.fontSize)!==null&&_r$fontSize!==void 0&&_r$fontSize.replace?r.fontSize.replace("px",""):r.fontSize;return n.remove(),a.height+s*1.1*.5+e.padding;},"getVirtualNodeHeight"),XWe=o(function(t,e,r){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${-e.height+2*5} q0,-5 5,-5 h${e.width-2*5} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height);},"defaultBkg"),Ef={drawRect:u6,drawCircle:$We,drawSection:GWe,drawText:w0e,drawLabel:zWe,drawTask:VWe,drawBackgroundRect:UWe,getTextObj:HWe,getNoteRect:JP,initGraphics:WWe,drawNode:qWe,getVirtualNodeHeight:YWe};});var jWe,C0e,KWe,A0e,_0e=N(()=>{"use strict";pr();S0e();yt();qt();yi();jWe=o(function(t,e,r,n){var _i$timeline$leftMargi,_i$timeline,_i$timeline$padding,_i$timeline2,_i$timeline$useMaxWid,_i$timeline3;let i=ge(),a=(_i$timeline$leftMargi=(_i$timeline=i.timeline)===null||_i$timeline===void 0?void 0:_i$timeline.leftMargin)!==null&&_i$timeline$leftMargi!==void 0?_i$timeline$leftMargi:50;X.debug("timeline",n.db);let s=i.securityLevel,l;s==="sandbox"&&(l=Ge("#i"+e));let h=(s==="sandbox"?Ge(l.nodes()[0].contentDocument.body):Ge("body")).select("#"+e);h.append("g");let f=n.db.getTasks(),d=n.db.getCommonDb().getDiagramTitle();X.debug("task",f),Ef.initGraphics(h);let p=n.db.getSections();X.debug("sections",p);let m=0,g=0,y=0,v=0,x=50+a,b=50;v=50;let T=0,C=!0;p.forEach(function(D){let O={number:T,descr:D,section:T,width:150,padding:20,maxHeight:m},R=Ef.getVirtualNodeHeight(h,O,i);X.debug("sectionHeight before draw",R),m=Math.max(m,R+20);});let w=0,E=0;X.debug("tasks.length",f.length);for(let[D,O]of f.entries()){let R={number:D,descr:O,section:O.section,width:150,padding:20,maxHeight:g},k=Ef.getVirtualNodeHeight(h,R,i);X.debug("taskHeight before draw",k),g=Math.max(g,k+20),w=Math.max(w,O.events.length);let L=0;for(let S of O.events){let I={descr:S,section:O.section,number:O.section,width:150,padding:20,maxHeight:50};L+=Ef.getVirtualNodeHeight(h,I,i);}O.events.length>0&&(L+=(O.events.length-1)*10),E=Math.max(E,L);}X.debug("maxSectionHeight before draw",m),X.debug("maxTaskHeight before draw",g),p&&p.length>0?p.forEach(D=>{let O=f.filter(S=>S.section===D),R={number:T,descr:D,section:T,width:200*Math.max(O.length,1)-50,padding:20,maxHeight:m};X.debug("sectionNode",R);let k=h.append("g"),L=Ef.drawNode(k,R,T,i);X.debug("sectionNode output",L),k.attr("transform",`translate(${x}, ${v})`),b+=m+50,O.length>0&&C0e(h,O,T,x,b,g,i,w,E,m,!1),x+=200*Math.max(O.length,1),b=v,T++;}):(C=!1,C0e(h,f,T,x,b,g,i,w,E,m,!0));let _=h.node().getBBox();X.debug("bounds",_),d&&h.append("text").text(d).attr("x",_.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),y=C?m+g+150:g+100,h.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",y).attr("x2",_.width+3*a).attr("y2",y).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),_o(void 0,h,(_i$timeline$padding=(_i$timeline2=i.timeline)===null||_i$timeline2===void 0?void 0:_i$timeline2.padding)!==null&&_i$timeline$padding!==void 0?_i$timeline$padding:50,(_i$timeline$useMaxWid=(_i$timeline3=i.timeline)===null||_i$timeline3===void 0?void 0:_i$timeline3.useMaxWidth)!==null&&_i$timeline$useMaxWid!==void 0?_i$timeline$useMaxWid:!1);},"draw"),C0e=o(function(t,e,r,n,i,a,s,l,u,h,f){for(let d of e){var _s$timeline;let p={descr:d.task,section:r,number:r,width:150,padding:20,maxHeight:a};X.debug("taskNode",p);let m=t.append("g").attr("class","taskWrapper"),y=Ef.drawNode(m,p,r,s).height;if(X.debug("taskHeight after draw",y),m.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,y),d.events){let v=t.append("g").attr("class","lineWrapper"),x=a;i+=100,x=x+KWe(t,d.events,r,n,i,s),i-=100,v.append("line").attr("x1",n+190/2).attr("y1",i+a).attr("x2",n+190/2).attr("y2",i+a+100+u+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5");}n=n+200,f&&!((_s$timeline=s.timeline)!==null&&_s$timeline!==void 0&&_s$timeline.disableMulticolor)&&r++;}i=i-10;},"drawTasks"),KWe=o(function(t,e,r,n,i,a){let s=0,l=i;i=i+100;for(let u of e){let h={descr:u,section:r,number:r,width:150,padding:20,maxHeight:50};X.debug("eventNode",h);let f=t.append("g").attr("class","eventWrapper"),p=Ef.drawNode(f,h,r,a).height;s=s+p,f.attr("transform",`translate(${n}, ${i})`),i=i+10+p;}return i=l,s;},"drawEvents"),A0e={setConf:o(()=>{},"setConf"),draw:jWe};});var QWe,ZWe,D0e,L0e=N(()=>{"use strict";Xs();QWe=o(t=>{let e="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)t["lineColor"+r]=t["lineColor"+r]||t["cScaleInv"+r],sa(t["lineColor"+r])?t["lineColor"+r]=Lt(t["lineColor"+r],20):t["lineColor"+r]=Ot(t["lineColor"+r],20);for(let r=0;r<t.THEME_COLOR_LIMIT;r++){let n=""+(17-3*r);e+=`
    .section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} path  {
      fill: ${t["cScale"+r]};
    }
    .section-${r-1} text {
     fill: ${t["cScaleLabel"+r]};
    }
    .node-icon-${r-1} {
      font-size: 40px;
      color: ${t["cScaleLabel"+r]};
    }
    .section-edge-${r-1}{
      stroke: ${t["cScale"+r]};
    }
    .edge-depth-${r-1}{
      stroke-width: ${n};
    }
    .section-${r-1} line {
      stroke: ${t["cScaleInv"+r]} ;
      stroke-width: 3;
    }

    .lineWrapper line{
      stroke: ${t["cScaleLabel"+r]} ;
    }

    .disabled, .disabled circle, .disabled text {
      fill: lightgray;
    }
    .disabled text {
      fill: #efefef;
    }
    `;}return e;},"genSections"),ZWe=o(t=>`
  .edge {
    stroke-width: 3;
  }
  ${QWe(t)}
  .section-root rect, .section-root path, .section-root circle  {
    fill: ${t.git0};
  }
  .section-root text {
    fill: ${t.gitBranchLabel0};
  }
  .icon-container {
    height:100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .edge {
    fill: none;
  }
  .eventWrapper  {
   filter: brightness(120%);
  }
`,"getStyles"),D0e=ZWe;});var R0e={};hr(R0e,{diagram:()=>JWe});var JWe,N0e=N(()=>{"use strict";c0e();b0e();_0e();L0e();JWe={db:ZP,renderer:A0e,parser:l0e,styles:D0e};});var eB,O0e,P0e=N(()=>{"use strict";eB=function(){var t=o(function(C,w,E,_){for(E=E||{},_=C.length;_--;E[C[_]]=w);return E;},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],l=[1,19],u=[6,7,8],h=[1,26],f=[1,24],d=[1,25],p=[6,7,11],m=[1,6,13,15,16,19,22],g=[1,33],y=[1,34],v=[1,6,7,11,13,15,16,19,22],x={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:o(function(w,E,_,A,D,O,R){var k=O.length-1;switch(D){case 6:case 7:return A;case 8:A.getLogger().trace("Stop NL ");break;case 9:A.getLogger().trace("Stop EOF ");break;case 11:A.getLogger().trace("Stop NL2 ");break;case 12:A.getLogger().trace("Stop EOF2 ");break;case 15:A.getLogger().info("Node: ",O[k].id),A.addNode(O[k-1].length,O[k].id,O[k].descr,O[k].type);break;case 16:A.getLogger().trace("Icon: ",O[k]),A.decorateNode({icon:O[k]});break;case 17:case 21:A.decorateNode({class:O[k]});break;case 18:A.getLogger().trace("SPACELIST");break;case 19:A.getLogger().trace("Node: ",O[k].id),A.addNode(0,O[k].id,O[k].descr,O[k].type);break;case 20:A.decorateNode({icon:O[k]});break;case 25:A.getLogger().trace("node found ..",O[k-2]),this.$={id:O[k-1],descr:O[k-1],type:A.getType(O[k-2],O[k])};break;case 26:this.$={id:O[k],descr:O[k],type:A.nodeType.DEFAULT};break;case 27:A.getLogger().trace("node found ..",O[k-3]),this.$={id:O[k-3],descr:O[k-1],type:A.getType(O[k-2],O[k])};break;}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:l},t(u,[2,3]),{1:[2,2]},t(u,[2,4]),t(u,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:l},{6:r,9:22,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:l},{6:h,7:f,10:23,11:d},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:l}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:f,10:32,11:d},{1:[2,7],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:l},t(m,[2,14],{7:g,11:y}),t(v,[2,8]),t(v,[2,9]),t(v,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(m,[2,13],{7:g,11:y}),t(v,[2,11]),t(v,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(w,E){if(E.recoverable)this.trace(w);else{var _=new Error(w);throw _.hash=E,_;}},"parseError"),parse:o(function(w){var E=this,_=[0],A=[],D=[null],O=[],R=this.table,k="",L=0,S=0,I=0,M=2,P=1,B=O.slice.call(arguments,1),F=Object.create(this.lexer),z={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(z.yy[$]=this.yy[$]);F.setInput(w,z.yy),z.yy.lexer=F,z.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var U=F.yylloc;O.push(U);var K=F.options&&F.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ee(ae){_.length=_.length-2*ae,D.length=D.length-ae,O.length=O.length-ae;}o(ee,"popStack");function Y(){var ae;return ae=A.pop()||F.lex()||P,typeof ae!="number"&&(ae instanceof Array&&(A=ae,ae=A.pop()),ae=E.symbols_[ae]||ae),ae;}o(Y,"lex");for(var ce,Z,ue,Q,j,ne,te={},he,le,J,Se;;){if(ue=_[_.length-1],this.defaultActions[ue]?Q=this.defaultActions[ue]:((ce===null||typeof ce>"u")&&(ce=Y()),Q=R[ue]&&R[ue][ce]),typeof Q>"u"||!Q.length||!Q[0]){var se="";Se=[];for(he in R[ue])this.terminals_[he]&&he>M&&Se.push("'"+this.terminals_[he]+"'");F.showPosition?se="Parse error on line "+(L+1)+`:
`+F.showPosition()+`
Expecting `+Se.join(", ")+", got '"+(this.terminals_[ce]||ce)+"'":se="Parse error on line "+(L+1)+": Unexpected "+(ce==P?"end of input":"'"+(this.terminals_[ce]||ce)+"'"),this.parseError(se,{text:F.match,token:this.terminals_[ce]||ce,line:F.yylineno,loc:U,expected:Se});}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ue+", token: "+ce);switch(Q[0]){case 1:_.push(ce),D.push(F.yytext),O.push(F.yylloc),_.push(Q[1]),ce=null,Z?(ce=Z,Z=null):(S=F.yyleng,k=F.yytext,L=F.yylineno,U=F.yylloc,I>0&&I--);break;case 2:if(le=this.productions_[Q[1]][1],te.$=D[D.length-le],te._$={first_line:O[O.length-(le||1)].first_line,last_line:O[O.length-1].last_line,first_column:O[O.length-(le||1)].first_column,last_column:O[O.length-1].last_column},K&&(te._$.range=[O[O.length-(le||1)].range[0],O[O.length-1].range[1]]),ne=this.performAction.apply(te,[k,S,L,z.yy,Q[1],D,O].concat(B)),typeof ne<"u")return ne;le&&(_=_.slice(0,-1*le*2),D=D.slice(0,-1*le),O=O.slice(0,-1*le)),_.push(this.productions_[Q[1]][0]),D.push(te.$),O.push(te._$),J=R[_[_.length-2]][_[_.length-1]],_.push(J);break;case 3:return!0;}}return!0;},"parse")},b=function(){var C={EOF:1,parseError:o(function(E,_){if(this.yy.parser)this.yy.parser.parseError(E,_);else throw new Error(E);},"parseError"),setInput:o(function(w,E){return this.yy=E||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var E=w.match(/(?:\r\n?|\n).*/g);return E?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w;},"input"),unput:o(function(w){var E=w.length,_=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-E),this.offset-=E;var A=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),_.length-1&&(this.yylineno-=_.length-1);var D=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:_?(_.length===A.length?this.yylloc.first_column:0)+A[A.length-_.length].length-_[0].length:this.yylloc.first_column-E},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-E]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(w){this.unput(this.match.slice(w));},"less"),pastInput:o(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var w=this.pastInput(),E=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
`+E+"^";},"showPosition"),test_match:o(function(w,E){var _,A,D;if(this.options.backtrack_lexer&&(D={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(D.yylloc.range=this.yylloc.range.slice(0))),A=w[0].match(/(?:\r\n?|\n).*/g),A&&(this.yylineno+=A.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:A?A[A.length-1].length-A[A.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(w[0].length),this.matched+=w[0],_=this.performAction.call(this,this.yy,this,E,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),_)return _;if(this._backtrack){for(var O in D)this[O]=D[O];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,E,_,A;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),O=0;O<D.length;O++)if(_=this._input.match(this.rules[D[O]]),_&&(!E||_[0].length>E[0].length)){if(E=_,A=O,this.options.backtrack_lexer){if(w=this.test_match(_,D[O]),w!==!1)return w;if(this._backtrack){E=!1;continue;}else return!1;}else if(!this.options.flex)break;}return E?(w=this.test_match(E,D[A]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var E=this.next();return E||this.lex();},"lex"),begin:o(function(E){this.conditionStack.push(E);},"begin"),popState:o(function(){var E=this.conditionStack.length-1;return E>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function(E){return E=this.conditionStack.length-1-Math.abs(E||0),E>=0?this.conditionStack[E]:"INITIAL";},"topState"),pushState:o(function(E){this.begin(E);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(E,_,A,D){var O=D;switch(A){case 0:return E.getLogger().trace("Found comment",_.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:E.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return E.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:E.getLogger().trace("end icon"),this.popState();break;case 10:return E.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return E.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return E.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return E.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:E.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return E.getLogger().trace("description:",_.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),E.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),E.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),E.getLogger().trace("node end ...",_.yytext),"NODE_DEND";break;case 30:return this.popState(),E.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),E.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),E.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),E.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),E.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return E.getLogger().trace("Long description:",_.yytext),20;break;case 36:return E.getLogger().trace("Long description:",_.yytext),20;break;}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return C;}();x.lexer=b;function T(){this.yy={};}return o(T,"Parser"),T.prototype=x,x.Parser=T,new T();}();eB.parser=eB;O0e=eB;});var nqe,h6,B0e=N(()=>{"use strict";var _Class207;qt();dr();yt();Ca();nqe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},h6=(_Class207=class h6{constructor(){this.nodes=[];this.count=0;this.elements={};this.getLogger=this.getLogger.bind(this),this.nodeType=nqe,this.clear(),this.getType=this.getType.bind(this),this.getMindmap=this.getMindmap.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this);}clear(){this.nodes=[],this.count=0,this.elements={};}getParent(e){for(let r=this.nodes.length-1;r>=0;r--)if(this.nodes[r].level<e)return this.nodes[r];return null;}getMindmap(){return this.nodes.length>0?this.nodes[0]:null;}addNode(e,r,n,i){var _a$mindmap$padding,_a$mindmap,_a$mindmap$maxNodeWid,_a$mindmap2;X.info("addNode",e,r,n,i);let a=ge(),s=(_a$mindmap$padding=(_a$mindmap=a.mindmap)===null||_a$mindmap===void 0?void 0:_a$mindmap.padding)!==null&&_a$mindmap$padding!==void 0?_a$mindmap$padding:lr.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:s*=2;break;}let l={id:this.count++,nodeId:ar(r,a),level:e,descr:ar(n,a),type:i,children:[],width:(_a$mindmap$maxNodeWid=(_a$mindmap2=a.mindmap)===null||_a$mindmap2===void 0?void 0:_a$mindmap2.maxNodeWidth)!==null&&_a$mindmap$maxNodeWid!==void 0?_a$mindmap$maxNodeWid:lr.mindmap.maxNodeWidth,padding:s},u=this.getParent(e);if(u)u.children.push(l),this.nodes.push(l);else if(this.nodes.length===0)this.nodes.push(l);else throw new Error(`There can be only one root. No parent could be found for ("${l.descr}")`);}getType(e,r){switch(X.debug("In get type",e,r),e){case"[":return this.nodeType.RECT;case"(":return r===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT;}}setElementForId(e,r){this.elements[e]=r;}getElementById(e){return this.elements[e];}decorateNode(e){if(!e)return;let r=ge(),n=this.nodes[this.nodes.length-1];e.icon&&(n.icon=ar(e.icon,r)),e.class&&(n.class=ar(e.class,r));}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border";}}getLogger(){return X;}},o(_Class207,"MindmapDB"),_Class207);});function Hi(t){"@babel/helpers - typeof";return Hi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e;}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e;},Hi(t);}function Bf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");}function F0e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n);}}function Ff(t,e,r){return e&&F0e(t.prototype,e),r&&F0e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;}function nge(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t;}function Li(t,e){return aqe(t)||oqe(t,e)||IB(t,e)||cqe();}function ige(t){return iqe(t)||sqe(t)||IB(t)||lqe();}function iqe(t){if(Array.isArray(t))return yB(t);}function aqe(t){if(Array.isArray(t))return t;}function sqe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t);}function oqe(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,l;try{for(r=r.call(t);!(i=(s=r.next()).done)&&(n.push(s.value),!(e&&n.length===e));i=!0);}catch(u){a=!0,l=u;}finally{try{!i&&r.return!=null&&r.return();}finally{if(a)throw l;}}return n;}}function IB(t,e){if(t){if(typeof t=="string")return yB(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yB(t,e);}}function yB(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n;}function lqe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}function cqe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}function go(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=IB(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=o(function(){},"F");return{s:i,n:o(function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]};},"n"),e:o(function(u){throw u;},"e"),f:i};}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}var a=!0,s=!1,l;return{s:o(function(){r=r.call(t);},"s"),n:o(function(){var u=r.next();return a=u.done,u;},"n"),e:o(function(u){s=!0,l=u;},"e"),f:o(function(){try{!a&&r.return!=null&&r.return();}finally{if(s)throw l;}},"f")};}function Nqe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function");}function Mqe(t,e){return e={exports:{}},t(e,e.exports),e.exports;}function zqe(t){for(var e=t.length;e--&&$qe.test(t.charAt(e)););return e;}function Uqe(t){return t&&t.slice(0,Gqe(t)+1).replace(Vqe,"");}function Xqe(t){var e=qqe.call(t,Bb),r=t[Bb];try{t[Bb]=void 0;var n=!0;}catch{}var i=Yqe.call(t);return n&&(e?t[Bb]=r:delete t[Bb]),i;}function Zqe(t){return Qqe.call(t);}function rYe(t){return t==null?t===void 0?tYe:eYe:G0e&&G0e in Object(t)?jqe(t):Jqe(t);}function nYe(t){return t!=null&&typeof t=="object";}function sYe(t){return typeof t=="symbol"||iYe(t)&&pge(t)==aYe;}function hYe(t){if(typeof t=="number")return t;if(f4(t))return V0e;if(qp(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=qp(e)?e+"":e;}if(typeof t!="string")return t===0?t:+t;t=Hqe(t);var r=lYe.test(t);return r||cYe.test(t)?uYe(t.slice(2),r?2:8):oYe.test(t)?V0e:+t;}function mYe(t,e,r){var n,i,a,s,l,u,h=0,f=!1,d=!1,p=!0;if(typeof t!="function")throw new TypeError(fYe);e=U0e(e)||0,qp(r)&&(f=!!r.leading,d="maxWait"in r,a=d?dYe(U0e(r.maxWait)||0,e):a,p="trailing"in r?!!r.trailing:p);function m(E){var _=n,A=i;return n=i=void 0,h=E,s=t.apply(A,_),s;}o(m,"invokeFunc");function g(E){return h=E,l=setTimeout(x,e),f?m(E):s;}o(g,"leadingEdge");function y(E){var _=E-u,A=E-h,D=e-_;return d?pYe(D,a-A):D;}o(y,"remainingWait");function v(E){var _=E-u,A=E-h;return u===void 0||_>=e||_<0||d&&A>=a;}o(v,"shouldInvoke");function x(){var E=tB();if(v(E))return b(E);l=setTimeout(x,y(E));}o(x,"timerExpired");function b(E){return l=void 0,p&&n?m(E):(n=i=void 0,s);}o(b,"trailingEdge");function T(){l!==void 0&&clearTimeout(l),h=0,n=u=i=l=void 0;}o(T,"cancel");function C(){return l===void 0?s:b(tB());}o(C,"flush");function w(){var E=tB(),_=v(E);if(n=arguments,i=this,u=E,_){if(l===void 0)return g(u);if(d)return clearTimeout(l),l=setTimeout(x,e),m(u);}return l===void 0&&(l=setTimeout(x,e)),s;}return o(w,"debounced"),w.cancel=T,w.flush=C,w;}function Q6(t,e,r,n,i,a){var s;return li(t)?s=t:s=Z1[t]||Z1.euclidean,e===0&&li(t)?s(i,a):s(e,r,n,i,a);}function oje(t,e){if(Z6(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||f4(t)?!0:sje.test(t)||!aje.test(t)||e!=null&&t in Object(e);}function dje(t){if(!qp(t))return!1;var e=pge(t);return e==uje||e==hje||e==cje||e==fje;}function gje(t){return!!cme&&cme in t;}function bje(t){if(t!=null){try{return xje.call(t);}catch{}try{return t+"";}catch{}}return"";}function Dje(t){if(!qp(t)||yje(t))return!1;var e=pje(t)?_je:kje;return e.test(Tje(t));}function Rje(t,e){return t===null||t===void 0?void 0:t[e];}function Mje(t,e){var r=Nje(t,e);return Lje(r)?r:void 0;}function Oje(){this.__data__=a4?a4(null):{},this.size=0;}function Bje(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e;}function Vje(t){var e=this.__data__;if(a4){var r=e[t];return r===$je?void 0:r;}return Gje.call(e,t)?e[t]:void 0;}function qje(t){var e=this.__data__;return a4?e[t]!==void 0:Wje.call(e,t);}function jje(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=a4&&e===void 0?Xje:e,this;}function ry(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1]);}}function Qje(){this.__data__=[],this.size=0;}function Jje(t,e){return t===e||t!==t&&e!==e;}function eKe(t,e){for(var r=t.length;r--;)if($ge(t[r][0],e))return r;return-1;}function nKe(t){var e=this.__data__,r=J6(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():rKe.call(e,r,1),--this.size,!0;}function aKe(t){var e=this.__data__,r=J6(e,t);return r<0?void 0:e[r][1];}function oKe(t){return J6(this.__data__,t)>-1;}function cKe(t,e){var r=this.__data__,n=J6(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this;}function ny(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1]);}}function pKe(){this.size=0,this.__data__={hash:new ume(),map:new(dKe||hKe)(),string:new ume()};}function gKe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null;}function vKe(t,e){var r=t.__data__;return yKe(e)?r[typeof e=="string"?"string":"hash"]:r.map;}function xKe(t){var e=eC(this,t).delete(t);return this.size-=e?1:0,e;}function TKe(t){return eC(this,t).get(t);}function kKe(t){return eC(this,t).has(t);}function SKe(t,e){var r=eC(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this;}function iy(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1]);}}function WB(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(AKe);var r=o(function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s;},"memoized");return r.cache=new(WB.Cache||zge)(),r;}function LKe(t){var e=_Ke(t,function(n){return r.size===DKe&&r.clear(),n;}),r=e.cache;return e;}function OKe(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i;}function Uge(t){if(typeof t=="string")return t;if(Z6(t))return Vge(t,Uge)+"";if(f4(t))return fme?fme.call(t):"";var e=t+"";return e=="0"&&1/t==-PKe?"-0":e;}function FKe(t){return t==null?"":BKe(t);}function $Ke(t,e){return Z6(t)?t:lje(t,e)?[t]:Gge(Hge(t));}function GKe(t){if(typeof t=="string"||f4(t))return t;var e=t+"";return e=="0"&&1/t==-zKe?"-0":e;}function VKe(t,e){e=Wge(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[qB(e[r++])];return r&&r==n?t:void 0;}function HKe(t,e,r){var n=t==null?void 0:UKe(t,e);return n===void 0?r:n;}function YKe(t,e,r){e=="__proto__"&&dme?dme(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r;}function QKe(t,e,r){var n=t[e];(!(KKe.call(t,e)&&$ge(n,r))||r===void 0&&!(e in t))&&XKe(t,e,r);}function tQe(t,e){var r=typeof t;return e=e!==null&&e!==void 0?e:JKe,!!e&&(r=="number"||r!="symbol"&&eQe.test(t))&&t>-1&&t%1==0&&t<e;}function nQe(t,e,r,n){if(!qp(t))return t;e=Wge(e,t);for(var i=-1,a=e.length,s=a-1,l=t;l!=null&&++i<a;){var u=qB(e[i]),h=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(i!=s){var f=l[u];h=n?n(f,u,l):void 0,h===void 0&&(h=qp(f)?f:rQe(e[i+1])?[]:{});}ZKe(l,u,h),l=l[u];}return t;}function aQe(t,e,r){return t==null?t:iQe(t,e,r);}function oQe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e;}function cQe(t){return Z6(t)?Vge(t,qB):f4(t)?[t]:lQe(Gge(Hge(t)));}function XB(t,e,r,n){for(var i=[],a=new ey(),s=t.cy(),l=s.hasCompoundNodes(),u=0;u<t.length;u++){var h=t[u];r?i.push(h):l&&n(i,a,h);}for(;i.length>0;){var f=i.shift();e(f),a.add(f.id()),l&&n(i,a,f);}return t;}function Yge(t,e,r){if(r.isParent())for(var n=r._private.children,i=0;i<n.length;i++){var a=n[i];e.has(a.id())||t.push(a);}}function Xge(t,e,r){if(r.isChild()){var n=r._private.parent;e.has(n.id())||t.push(n);}}function _Qe(t,e,r){Xge(t,e,r),Yge(t,e,r);}function oB(t){return function(e){var r=this;if(e===void 0&&(e=!0),r.length!==0)if(r.isNode()&&!r.removed()){for(var n=0,i=r[0],a=i._private.edges,s=0;s<a.length;s++){var l=a[s];!e&&l.isLoop()||(n+=t(i,l));}return n;}else return;};}function $1(t,e){return function(r){for(var n,i=this.nodes(),a=0;a<i.length;a++){var s=i[a],l=s[t](r);l!==void 0&&(n===void 0||e(l,n))&&(n=l);}return n;};}function zb(){return!1;}function x6(){return!0;}function rC(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:YQe,e=arguments.length>1?arguments[1]:void 0,r=0;r<xme.length;r++){var n=xme[r];this[n]=t[n]||n1e[n];}this.context=e||this.context,this.listeners=[],this.emitting=0;}function l1e(t,e,r){var n=r._private,i=n.styleCache=n.styleCache||[],a;return(a=i[t])!=null||(a=i[t]=e(r)),a;}function nC(t,e){return t=Nf(t),o(function(n){return l1e(t,e,n);},"cachedStyleFunction");}function iC(t,e){t=Nf(t);var r=o(function(i){return e.call(i);},"selfFn");return o(function(){var i=this[0];if(i)return l1e(t,r,i);},"cachedPrototypeStyleFunction");}function cB(t,e){var r=t._private,n=r.data.parent?t.parents():null;if(n)for(var i=0;i<n.length;i++){var a=n[i];if(!e(a))return!1;}return!0;}function jB(t){var e=t.ok,r=t.edgeOkViaNode||t.ok,n=t.parentOk||t.ok;return function(){var i=this.cy();if(!i.styleEnabled())return!0;var a=this[0],s=i.hasCompoundNodes();if(a){var l=a._private;if(!e(a))return!1;if(a.isNode())return!s||cB(a,n);var u=l.source,h=l.target;return r(u)&&(!s||cB(u,r))&&(u===h||r(h)&&(!s||cB(h,r)));}};}function Tme(t){return function(){var e=arguments,r=[];if(e.length===2){var n=e[0],i=e[1];this.on(t.event,n,i);}else if(e.length===1&&li(e[0])){var a=e[0];this.on(t.event,a);}else if(e.length===0||e.length===1&&kn(e[0])){for(var s=e.length===1?e[0]:null,l=0;l<this.length;l++){var u=this[l],h=!t.ableField||u._private[t.ableField],f=u._private[t.field]!=t.value;if(t.overrideAble){var d=t.overrideAble(u);if(d!==void 0&&(h=d,!d))return this;}h&&(u._private[t.field]=t.value,f&&r.push(u));}var p=this.spawn(r);p.updateStyle(),p.emit(t.event),s&&p.emit(s);}return this;};}function sy(t){Lf[t.field]=function(){var e=this[0];if(e){if(t.overrideField){var r=t.overrideField(e);if(r!==void 0)return r;}return e._private[t.field];}},Lf[t.on]=Tme({event:t.on,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!0}),Lf[t.off]=Tme({event:t.off,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!1});}function Sme(t){return o(function(r){for(var n=[],i=0;i<this.length;i++){var a=this[i],s=a._private[t.attr];s&&n.push(s);}return this.spawn(n,!0).filter(r);},"sourceImpl");}function Cme(t){return o(function(r){var n=[],i=this._private.cy,a=t||{};Jt(r)&&(r=i.$(r));for(var s=0;s<r.length;s++)for(var l=r[s]._private.edges,u=0;u<l.length;u++){var h=l[u],f=h._private.data,d=this.hasElementWithId(f.source)&&r.hasElementWithId(f.target),p=r.hasElementWithId(f.source)&&this.hasElementWithId(f.target),m=d||p;m&&((a.thisIsSrc||a.thisIsTgt)&&(a.thisIsSrc&&!d||a.thisIsTgt&&!p)||n.push(h));}return this.spawn(n,!0);},"edgesWithImpl");}function Ame(t){var e={codirected:!1};return t=ir({},e,t),o(function(n){for(var i=[],a=this.edges(),s=t,l=0;l<a.length;l++)for(var u=a[l],h=u._private,f=h.source,d=f._private.data.id,p=h.data.target,m=f._private.edges,g=0;g<m.length;g++){var y=m[g],v=y._private.data,x=v.target,b=v.source,T=x===p&&b===d,C=d===x&&p===b;(s.codirected&&T||!s.codirected&&(T||C))&&i.push(y);}return this.spawn(i,!0).filter(n);},"parallelEdgesImpl");}function iZe(t,e,r,n){var i=4,a=.001,s=1e-7,l=10,u=11,h=1/(u-1),f=typeof Float32Array<"u";if(arguments.length!==4)return!1;for(var d=0;d<4;++d)if(typeof arguments[d]!="number"||isNaN(arguments[d])||!isFinite(arguments[d]))return!1;t=Math.min(t,1),r=Math.min(r,1),t=Math.max(t,0),r=Math.max(r,0);var p=f?new Float32Array(u):new Array(u);function m(O,R){return 1-3*R+3*O;}o(m,"A");function g(O,R){return 3*R-6*O;}o(g,"B");function y(O){return 3*O;}o(y,"C");function v(O,R,k){return((m(R,k)*O+g(R,k))*O+y(R))*O;}o(v,"calcBezier");function x(O,R,k){return 3*m(R,k)*O*O+2*g(R,k)*O+y(R);}o(x,"getSlope");function b(O,R){for(var k=0;k<i;++k){var L=x(R,t,r);if(L===0)return R;var S=v(R,t,r)-O;R-=S/L;}return R;}o(b,"newtonRaphsonIterate");function T(){for(var O=0;O<u;++O)p[O]=v(O*h,t,r);}o(T,"calcSampleValues");function C(O,R,k){var L,S,I=0;do S=R+(k-R)/2,L=v(S,t,r)-O,L>0?k=S:R=S;while(Math.abs(L)>s&&++I<l);return S;}o(C,"binarySubdivide");function w(O){for(var R=0,k=1,L=u-1;k!==L&&p[k]<=O;++k)R+=h;--k;var S=(O-p[k])/(p[k+1]-p[k]),I=R+S*h,M=x(I,t,r);return M>=a?b(O,I):M===0?I:C(O,R,R+h);}o(w,"getTForX");var E=!1;function _(){E=!0,(t!==e||r!==n)&&T();}o(_,"precompute");var A=o(function(R){return E||_(),t===e&&r===n?R:R===0?0:R===1?1:v(w(R),e,n);},"f");A.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}];};var D="generateBezier("+[t,e,r,n]+")";return A.toString=function(){return D;},A;}function _me(t,e,r,n,i){if(n===1||e===r)return r;var a=i(e,r,n);return t==null||((t.roundValue||t.color)&&(a=Math.round(a)),t.min!==void 0&&(a=Math.max(a,t.min)),t.max!==void 0&&(a=Math.min(a,t.max))),a;}function Dme(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t;}function z1(t,e,r,n,i){var a=i!=null?i.type:null;r<0?r=0:r>1&&(r=1);var s=Dme(t,i),l=Dme(e,i);if(_t(s)&&_t(l))return _me(a,s,l,r,n);if(kn(s)&&kn(l)){for(var u=[],h=0;h<l.length;h++){var f=s[h],d=l[h];if(f!=null&&d!=null){var p=_me(a,f,d,r,n);u.push(p);}else u.push(d);}return u;}}function sZe(t,e,r,n){var i=!n,a=t._private,s=e._private,l=s.easing,u=s.startTime,h=n?t:t.cy(),f=h.style();if(!s.easingImpl)if(l==null)s.easingImpl=L6.linear;else{var d;if(Jt(l)){var p=f.parse("transition-timing-function",l);d=p.value;}else d=l;var m,g;Jt(d)?(m=d,g=[]):(m=d[1],g=d.slice(2).map(function(F){return+F;})),g.length>0?(m==="spring"&&g.push(s.duration),s.easingImpl=L6[m].apply(null,g)):s.easingImpl=L6[m];}var y=s.easingImpl,v;if(s.duration===0?v=1:v=(r-u)/s.duration,s.applying&&(v=s.progress),v<0?v=0:v>1&&(v=1),s.delay==null){var x=s.startPosition,b=s.position;if(b&&i&&!t.locked()){var T={};Gb(x.x,b.x)&&(T.x=z1(x.x,b.x,v,y)),Gb(x.y,b.y)&&(T.y=z1(x.y,b.y,v,y)),t.position(T);}var C=s.startPan,w=s.pan,E=a.pan,_=w!=null&&n;_&&(Gb(C.x,w.x)&&(E.x=z1(C.x,w.x,v,y)),Gb(C.y,w.y)&&(E.y=z1(C.y,w.y,v,y)),t.emit("pan"));var A=s.startZoom,D=s.zoom,O=D!=null&&n;O&&(Gb(A,D)&&(a.zoom=n4(a.minZoom,z1(A,D,v,y),a.maxZoom)),t.emit("zoom")),(_||O)&&t.emit("viewport");var R=s.style;if(R&&R.length>0&&i){for(var k=0;k<R.length;k++){var L=R[k],S=L.name,I=L,M=s.startStyle[S],P=f.properties[M.name],B=z1(M,I,v,y,P);f.overrideBypass(t,S,B);}t.emit("style");}}return s.progress=v,v;}function Gb(t,e){return t==null||e==null?!1:_t(t)&&_t(e)?!0:!!(t&&e);}function oZe(t,e,r,n){var i=e._private;i.started=!0,i.startTime=r-i.progress*i.duration;}function Lme(t,e){var r=e._private.aniEles,n=[];function i(f,d){var p=f._private,m=p.animation.current,g=p.animation.queue,y=!1;if(m.length===0){var v=g.shift();v&&m.push(v);}for(var x=o(function(E){for(var _=E.length-1;_>=0;_--){var A=E[_];A();}E.splice(0,E.length);},"callbacks"),b=m.length-1;b>=0;b--){var T=m[b],C=T._private;if(C.stopped){m.splice(b,1),C.hooked=!1,C.playing=!1,C.started=!1,x(C.frames);continue;}!C.playing&&!C.applying||(C.playing&&C.applying&&(C.applying=!1),C.started||oZe(f,T,t),sZe(f,T,t,d),C.applying&&(C.applying=!1),x(C.frames),C.step!=null&&C.step(t),T.completed()&&(m.splice(b,1),C.hooked=!1,C.playing=!1,C.started=!1,x(C.completes)),y=!0);}return!d&&m.length===0&&g.length===0&&n.push(f),y;}o(i,"stepOne");for(var a=!1,s=0;s<r.length;s++){var l=r[s],u=i(l);a=a||u;}var h=i(e,!0);(a||h)&&(r.length>0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step");}function u1e(t){this.options=ir({},mZe,gZe,t);}function h1e(t){this.options=ir({},yZe,t);}function f1e(t){this.options=ir({},vZe,t);}function oC(t){this.options=ir({},xZe,t),this.options.layout=this;var e=this.options.eles.nodes(),r=this.options.eles.edges(),n=r.filter(function(i){var a=i.source().data("id"),s=i.target().data("id"),l=e.some(function(h){return h.data("id")===a;}),u=e.some(function(h){return h.data("id")===s;});return!l||!u;});this.options.eles=this.options.eles.not(n);}function p1e(t){this.options=ir({},PZe,t);}function ZB(t){this.options=ir({},BZe,t);}function m1e(t){this.options=ir({},FZe,t);}function g1e(t){this.options=ir({},$Ze,t);}function y1e(t){this.options=t,this.notifications=0;}function b1e(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise);}function eF(t,e,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return n===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(VZe(t,e,r,n,i),{cx:CB,cy:AB,radius:Up,startX:v1e,startY:x1e,stopX:_B,stopY:DB,startAngle:Xc.ang+Math.PI/2*Hp,endAngle:tl.ang-Math.PI/2*Hp,counterClockwise:M6});}function T1e(t){var e=[];if(t!=null){for(var r=0;r<t.length;r+=2){var n=t[r],i=t[r+1];e.push({x:n,y:i});}return e;}}function UZe(t,e,r){for(var n=o(function(h,f,d,p){return ia(h,f,d,p);},"qbezierAt$1"),i=e._private,a=i.rstyle.bezierPts,s=0;s<t.bezierProjPcts.length;s++){var l=t.bezierProjPcts[s];a.push({x:n(r[0],r[2],r[4],l),y:n(r[1],r[3],r[5],l)});}}function xJe(t,e){for(var r=0;r<e.length;r++){var n=e[r];t.lineTo(n.x,n.y);}}function bJe(t,e,r){for(var n,i=0;i<e.length;i++){var a=e[i];i===0&&(n=a),t.lineTo(a.x,a.y);}t.quadraticCurveTo(r.x,r.y,n.x,n.y);}function Xme(t,e,r){t.beginPath&&t.beginPath();for(var n=e,i=0;i<n.length;i++){var a=n[i];t.lineTo(a.x,a.y);}var s=r,l=r[0];t.moveTo(l.x,l.y);for(var i=1;i<s.length;i++){var a=s[i];t.lineTo(a.x,a.y);}t.closePath&&t.closePath();}function TJe(t,e,r,n,i){t.beginPath&&t.beginPath(),t.arc(r,n,i,0,Math.PI*2,!1);var a=e,s=a[0];t.moveTo(s.x,s.y);for(var l=0;l<a.length;l++){var u=a[l];t.lineTo(u.x,u.y);}t.closePath&&t.closePath();}function wJe(t,e,r,n){t.arc(e,r,n,0,Math.PI*2,!1);}function dB(t,e,r,n,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,s=arguments.length>6?arguments[6]:void 0;t.beginPath(),t.moveTo(e+a,r),t.lineTo(e+n-a,r),t.quadraticCurveTo(e+n,r,e+n,r+a),t.lineTo(e+n,r+i-a),t.quadraticCurveTo(e+n,r+i,e+n-a,r+i),t.lineTo(e+a,r+i),t.quadraticCurveTo(e,r+i,e,r+i-a),t.lineTo(e,r+a),t.quadraticCurveTo(e,r,e+a,r),t.closePath(),s?t.stroke():t.fill();}function jme(t,e,r){var n=t.createShader(e);if(t.shaderSource(n,r),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(n));return n;}function DJe(t,e,r){var n=jme(t,t.VERTEX_SHADER,e),i=jme(t,t.FRAGMENT_SHADER,r),a=t.createProgram();if(t.attachShader(a,n),t.attachShader(a,i),t.linkProgram(a),!t.getProgramParameter(a,t.LINK_STATUS))throw new Error("Could not initialize shaders");return a;}function LJe(t,e,r){r===void 0&&(r=e);var n=t.makeOffscreenCanvas(e,r),i=n.context=n.getContext("2d");return n.clear=function(){return i.clearRect(0,0,n.width,n.height);},n.clear(),n;}function nF(t){var e=t.pixelRatio,r=t.cy.zoom(),n=t.cy.pan();return{zoom:r*e,pan:{x:n.x*e,y:n.y*e}};}function pB(t,e,r,n,i){var a=n*r+e.x,s=i*r+e.y;return s=Math.round(t.canvasHeight-s),[a,s];}function E6(t,e,r){var n=t[0]/255,i=t[1]/255,a=t[2]/255,s=e,l=r||new Array(4);return l[0]=n*s,l[1]=i*s,l[2]=a*s,l[3]=s,l;}function S6(t,e){var r=e||new Array(4);return r[0]=(t>>0&255)/255,r[1]=(t>>8&255)/255,r[2]=(t>>16&255)/255,r[3]=(t>>24&255)/255,r;}function RJe(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24);}function NJe(t,e){var r=t.createTexture();return r.buffer=function(n){t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null);},r.deleteTexture=function(){t.deleteTexture(r);},r;}function I1e(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4];}}function O1e(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r);}}function MJe(t,e,r,n,i,a){switch(e){case t.FLOAT:return new Float32Array(r.buffer,a*n,i);case t.INT:return new Int32Array(r.buffer,a*n,i);}}function IJe(t,e,r,n){var i=I1e(t,e),a=Li(i,2),s=a[0],l=a[1],u=O1e(t,l,n),h=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,h),t.bufferData(t.ARRAY_BUFFER,u,t.STATIC_DRAW),l===t.FLOAT?t.vertexAttribPointer(r,s,l,!1,0,0):l===t.INT&&t.vertexAttribIPointer(r,s,l,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null),h;}function mo(t,e,r,n){var i=I1e(t,r),a=Li(i,3),s=a[0],l=a[1],u=a[2],h=O1e(t,l,e*s),f=s*u,d=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,d),t.bufferData(t.ARRAY_BUFFER,e*f,t.DYNAMIC_DRAW),t.enableVertexAttribArray(n),l===t.FLOAT?t.vertexAttribPointer(n,s,l,!1,f,0):l===t.INT&&t.vertexAttribIPointer(n,s,l,f,0),t.vertexAttribDivisor(n,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var p=new Array(e),m=0;m<e;m++)p[m]=MJe(t,l,h,f,s,m);return d.dataArray=h,d.stride=f,d.size=s,d.getView=function(g){return p[g];},d.setPoint=function(g,y,v){var x=p[g];x[0]=y,x[1]=v;},d.bufferSubData=function(g){t.bindBuffer(t.ARRAY_BUFFER,d),g?t.bufferSubData(t.ARRAY_BUFFER,0,h,0,g*s):t.bufferSubData(t.ARRAY_BUFFER,0,h);},d;}function OJe(t){var e=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,e);var r=t.createTexture();return t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,r,0),t.bindFramebuffer(t.FRAMEBUFFER,null),e.setFramebufferAttachmentSizes=function(n,i){t.bindTexture(t.TEXTURE_2D,r),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,n,i,0,t.RGBA,t.UNSIGNED_BYTE,null);},e;}function Qb(){var t=new Kme(9);return Kme!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t;}function P1e(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t;}function PJe(t,e,r){var n=e[0],i=e[1],a=e[2],s=e[3],l=e[4],u=e[5],h=e[6],f=e[7],d=e[8],p=r[0],m=r[1],g=r[2],y=r[3],v=r[4],x=r[5],b=r[6],T=r[7],C=r[8];return t[0]=p*n+m*s+g*h,t[1]=p*i+m*l+g*f,t[2]=p*a+m*u+g*d,t[3]=y*n+v*s+x*h,t[4]=y*i+v*l+x*f,t[5]=y*a+v*u+x*d,t[6]=b*n+T*s+C*h,t[7]=b*i+T*l+C*f,t[8]=b*a+T*u+C*d,t;}function q6(t,e,r){var n=e[0],i=e[1],a=e[2],s=e[3],l=e[4],u=e[5],h=e[6],f=e[7],d=e[8],p=r[0],m=r[1];return t[0]=n,t[1]=i,t[2]=a,t[3]=s,t[4]=l,t[5]=u,t[6]=p*n+m*s+h,t[7]=p*i+m*l+f,t[8]=p*a+m*u+d,t;}function B1e(t,e,r){var n=e[0],i=e[1],a=e[2],s=e[3],l=e[4],u=e[5],h=e[6],f=e[7],d=e[8],p=Math.sin(r),m=Math.cos(r);return t[0]=m*n+p*s,t[1]=m*i+p*l,t[2]=m*a+p*u,t[3]=m*s-p*n,t[4]=m*l-p*i,t[5]=m*u-p*a,t[6]=h,t[7]=f,t[8]=d,t;}function iF(t,e,r){var n=r[0],i=r[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t;}function BJe(t,e,r){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t;}function zJe(t,e){return t.intersection?t.intersection(e):new Set(ige(t).filter(function(r){return e.has(r);}));}function Jme(t,e){return"rgba(".concat(t[0],", ").concat(t[1],", ").concat(t[2],", ").concat(e,")");}function HJe(t){var e=t&&t.style&&t.style.backgroundColor||"white";return uge(e);}function WJe(t){{var e=t.render;t.render=function(a){a=a||{};var s=t.cy;t.webgl&&(s.zoom()>D1e?(qJe(t),e.call(t,a)):(YJe(t),z1e(t,a,Zb.SCREEN)));};}{var r=t.matchCanvasSize;t.matchCanvasSize=function(a){r.call(t,a),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0;};}t.findNearestElements=function(a,s,l,u){return JJe(t,a,s);};{var n=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){n.call(t),t.pickingFrameBuffer.needsDraw=!0;};}{var i=t.notify;t.notify=function(a,s){i.call(t,a,s),a==="viewport"||a==="bounds"?t.pickingFrameBuffer.needsDraw=!0:a==="background"&&t.eleDrawing.invalidate(s,{type:"node-body"});};}}function qJe(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT);}function YJe(t){var e=o(function(n){n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.canvasWidth,t.canvasHeight),n.restore();},"clear");e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG]);}function XJe(t){var e=t.canvasWidth,r=t.canvasHeight,n=nF(t),i=n.pan,a=n.zoom,s=Qb();q6(s,s,[i.x,i.y]),iF(s,s,[a,a]);var l=Qb();BJe(l,e,r);var u=Qb();return PJe(u,l,s),u;}function $1e(t,e){var r=t.canvasWidth,n=t.canvasHeight,i=nF(t),a=i.pan,s=i.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,n),e.translate(a.x,a.y),e.scale(s,s);}function jJe(t,e){t.drawSelectionRectangle(e,function(r){return $1e(t,r);});}function KJe(t){var e=t.data.contexts[t.NODE];e.save(),$1e(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore();}function QJe(t){var e=o(function(i,a,s){for(var l=i.atlasManager.getRenderTypeOpts(a),u=t.data.contexts[t.NODE],h=.125,f=l.atlasCollection.atlases,d=0;d<f.length;d++){var p=f[d],m=p.canvas,g=m.width,y=m.height,v=g*d,x=m.height*s;u.save(),u.scale(h,h),u.drawImage(m,v,x),u.strokeStyle="black",u.rect(v,x,g,y),u.stroke(),u.restore();}},"draw"),r=0;e(t.eleDrawing,"node-body",r++),e(t.eleDrawing,"node-label",r++);}function ZJe(t,e,r,n,i){var a,s,l,u,h=nF(t),f=h.pan,d=h.zoom;if(n===void 0||i===void 0){var p=pB(t,f,d,e,r),m=Li(p,2),g=m[0],y=m[1],v=6;a=g-v/2,s=y-v/2,l=v,u=v;}else{var x=pB(t,f,d,e,r),b=Li(x,2),T=b[0],C=b[1],w=pB(t,f,d,n,i),E=Li(w,2),_=E[0],A=E[1];a=T,s=A,l=Math.abs(_-T),u=Math.abs(A-C);}if(l===0||u===0)return[];var D=t.data.contexts[t.WEBGL];D.bindFramebuffer(D.FRAMEBUFFER,t.pickingFrameBuffer),t.pickingFrameBuffer.needsDraw&&(D.viewport(0,0,D.canvas.width,D.canvas.height),z1e(t,null,Zb.PICKING),t.pickingFrameBuffer.needsDraw=!1);var O=l*u,R=new Uint8Array(O*4);D.readPixels(a,s,l,u,D.RGBA,D.UNSIGNED_BYTE,R),D.bindFramebuffer(D.FRAMEBUFFER,null);for(var k=new Set(),L=0;L<O;L++){var S=R.slice(L*4,L*4+4),I=RJe(S)-1;I>=0&&k.add(I);}return k;}function JJe(t,e,r){var n=ZJe(t,e,r),i=t.getCachedZSortedEles(),a,s,l=go(n),u;try{for(l.s();!(u=l.n()).done;){var h=u.value,f=i[h];if(!a&&f.isNode()&&(a=f),!s&&f.isEdge()&&(s=f),a&&s)break;}}catch(d){l.e(d);}finally{l.f();}return[a,s].filter(Boolean);}function z1e(t,e,r){var n,i;t.webglDebug&&(i=[],n=performance.now());var a=t.eleDrawing,s=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&jJe(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var l=o(function(k,L){L+=1,k.isNode()?(a.drawTexture(k,L,"node-underlay"),a.drawTexture(k,L,"node-body"),a.drawTexture(k,L,"node-label"),a.drawTexture(k,L,"node-overlay")):(a.drawEdgeLine(k,L),a.drawEdgeArrow(k,L,"source"),a.drawEdgeArrow(k,L,"target"),a.drawTexture(k,L,"edge-label"));},"draw"),u=t.data.contexts[t.WEBGL];r.screen?(u.clearColor(0,0,0,0),u.enable(u.BLEND),u.blendFunc(u.ONE,u.ONE_MINUS_SRC_ALPHA)):u.disable(u.BLEND),u.clear(u.COLOR_BUFFER_BIT|u.DEPTH_BUFFER_BIT),u.viewport(0,0,u.canvas.width,u.canvas.height);var h=XJe(t),f=t.getCachedZSortedEles();if(s=f.length,a.startFrame(h,i,r),r.screen){for(var d=0;d<f.nondrag.length;d++)l(f.nondrag[d],d);for(var p=0;p<f.drag.length;p++)l(f.drag[p],-1);}else if(r.picking)for(var m=0;m<f.length;m++)l(f[m],m);a.endFrame(),t.data.gc&&(console.log("Garbage Collect!"),t.data.gc=!1,a.gc()),r.screen&&t.webglDebugShowAtlases&&(KJe(t),QJe(t)),t.data.canvasNeedsRedraw[t.NODE]=!1,t.data.canvasNeedsRedraw[t.DRAG]=!1;}if(t.webglDebug){var g=performance.now(),y=!0,v=0,x=0,b=go(i),T;try{for(b.s();!(T=b.n()).done;){var C=T.value;v++,x+=C.count;}}catch(R){b.e(R);}finally{b.f();}var w=Math.ceil(g-n),E="".concat(s," elements, ").concat(x," rectangles, ").concat(v," batches");if(y)console.log("WebGL (".concat(r.name,") - ").concat(E));else{console.log("WebGL render (".concat(r.name,") - frame time ").concat(w,"ms")),console.log("  ".concat(E)),console.log("Texture Atlases Used:");var _=a.getAtlasDebugInfo(),A=go(_),D;try{for(A.s();!(D=A.n()).done;){var O=D.value;console.log("  ".concat(O.type,": ").concat(O.keyCount," keys, ").concat(O.atlasCount," atlases"));}}catch(R){A.e(R);}finally{A.f();}console.log("");}}}function eet(t,e){for(var r=atob(t),n=new ArrayBuffer(r.length),i=new Uint8Array(n),a=0;a<r.length;a++)i[a]=r.charCodeAt(a);return new Blob([n],{type:e});}function rge(t){var e=t.indexOf(",");return t.substr(e+1);}function V1e(t,e,r){var n=o(function(){return e.toDataURL(r,t.quality);},"getB64Uri");switch(t.output){case"blob-promise":return new ty(function(i,a){try{e.toBlob(function(s){s!=null?i(s):a(new Error("`canvas.toBlob()` sent a null value in its callback"));},r,t.quality);}catch(s){a(s);}});case"blob":return eet(rge(n()),r);case"base64":return rge(n());case"base64uri":default:return n();}}function H1e(t){var e=this,r=e.cy.window(),n=r.document;t.webgl&&(Er.CANVAS_LAYERS=e.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),e.data={canvases:new Array(Er.CANVAS_LAYERS),contexts:new Array(Er.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Er.CANVAS_LAYERS),bufferCanvases:new Array(Er.BUFFER_COUNT),bufferContexts:new Array(Er.CANVAS_LAYERS)};var i="-webkit-tap-highlight-color",a="rgba(0,0,0,0)";e.data.canvasContainer=n.createElement("div");var s=e.data.canvasContainer.style;e.data.canvasContainer.style[i]=a,s.position="relative",s.zIndex="0",s.overflow="hidden";var l=t.cy.container();l.appendChild(e.data.canvasContainer),l.style[i]=a;var u={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};xqe()&&(u["-ms-touch-action"]="none",u["touch-action"]="none");for(var h=0;h<Er.CANVAS_LAYERS;h++){var f=e.data.canvases[h]=n.createElement("canvas"),d=Er.CANVAS_TYPES[h];e.data.contexts[h]=f.getContext(d),e.data.contexts[h]||oi("Could not create canvas of type "+d),Object.keys(u).forEach(function(Q){f.style[Q]=u[Q];}),f.style.position="absolute",f.setAttribute("data-id","layer"+h),f.style.zIndex=String(Er.CANVAS_LAYERS-h),e.data.canvasContainer.appendChild(f),e.data.canvasNeedsRedraw[h]=!1;}e.data.topCanvas=e.data.canvases[0],e.data.canvases[Er.NODE].setAttribute("data-id","layer"+Er.NODE+"-node"),e.data.canvases[Er.SELECT_BOX].setAttribute("data-id","layer"+Er.SELECT_BOX+"-selectbox"),e.data.canvases[Er.DRAG].setAttribute("data-id","layer"+Er.DRAG+"-drag"),e.data.canvases[Er.WEBGL]&&e.data.canvases[Er.WEBGL].setAttribute("data-id","layer"+Er.WEBGL+"-webgl");for(var h=0;h<Er.BUFFER_COUNT;h++)e.data.bufferCanvases[h]=n.createElement("canvas"),e.data.bufferContexts[h]=e.data.bufferCanvases[h].getContext("2d"),e.data.bufferCanvases[h].style.position="absolute",e.data.bufferCanvases[h].setAttribute("data-id","buffer"+h),e.data.bufferCanvases[h].style.zIndex=String(-h-1),e.data.bufferCanvases[h].style.visibility="hidden";e.pathsEnabled=!0;var p=Ws(),m=o(function(j){return{x:(j.x1+j.x2)/2,y:(j.y1+j.y2)/2};},"getBoxCenter"),g=o(function(j){return{x:-j.w/2,y:-j.h/2};},"getCenterOffset"),y=o(function(j){var ne=j[0]._private,te=ne.oldBackgroundTimestamp===ne.backgroundTimestamp;return!te;},"backgroundTimestampHasChanged"),v=o(function(j){return j[0]._private.nodeKey;},"getStyleKey"),x=o(function(j){return j[0]._private.labelStyleKey;},"getLabelKey"),b=o(function(j){return j[0]._private.sourceLabelStyleKey;},"getSourceLabelKey"),T=o(function(j){return j[0]._private.targetLabelStyleKey;},"getTargetLabelKey"),C=o(function(j,ne,te,he,le){return e.drawElement(j,ne,te,!1,!1,le);},"drawElement"),w=o(function(j,ne,te,he,le){return e.drawElementText(j,ne,te,he,"main",le);},"drawLabel"),E=o(function(j,ne,te,he,le){return e.drawElementText(j,ne,te,he,"source",le);},"drawSourceLabel"),_=o(function(j,ne,te,he,le){return e.drawElementText(j,ne,te,he,"target",le);},"drawTargetLabel"),A=o(function(j){return j.boundingBox(),j[0]._private.bodyBounds;},"getElementBox"),D=o(function(j){return j.boundingBox(),j[0]._private.labelBounds.main||p;},"getLabelBox"),O=o(function(j){return j.boundingBox(),j[0]._private.labelBounds.source||p;},"getSourceLabelBox"),R=o(function(j){return j.boundingBox(),j[0]._private.labelBounds.target||p;},"getTargetLabelBox"),k=o(function(j,ne){return ne;},"isLabelVisibleAtScale"),L=o(function(j){return m(A(j));},"getElementRotationPoint"),S=o(function(j,ne,te){var he=j?j+"-":"";return{x:ne.x+te.pstyle(he+"text-margin-x").pfValue,y:ne.y+te.pstyle(he+"text-margin-y").pfValue};},"addTextMargin"),I=o(function(j,ne,te){var he=j[0]._private.rscratch;return{x:he[ne],y:he[te]};},"getRsPt"),M=o(function(j){return S("",I(j,"labelX","labelY"),j);},"getLabelRotationPoint"),P=o(function(j){return S("source",I(j,"sourceLabelX","sourceLabelY"),j);},"getSourceLabelRotationPoint"),B=o(function(j){return S("target",I(j,"targetLabelX","targetLabelY"),j);},"getTargetLabelRotationPoint"),F=o(function(j){return g(A(j));},"getElementRotationOffset"),z=o(function(j){return g(O(j));},"getSourceLabelRotationOffset"),$=o(function(j){return g(R(j));},"getTargetLabelRotationOffset"),U=o(function(j){var ne=D(j),te=g(D(j));if(j.isNode()){switch(j.pstyle("text-halign").value){case"left":te.x=-ne.w-(ne.leftPad||0);break;case"right":te.x=-(ne.rightPad||0);break;}switch(j.pstyle("text-valign").value){case"top":te.y=-ne.h-(ne.topPad||0);break;case"bottom":te.y=-(ne.botPad||0);break;}}return te;},"getLabelRotationOffset"),K=e.data.eleTxrCache=new Xb(e,{getKey:v,doesEleInvalidateKey:y,drawElement:C,getBoundingBox:A,getRotationPoint:L,getRotationOffset:F,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),ee=e.data.lblTxrCache=new Xb(e,{getKey:x,drawElement:w,getBoundingBox:D,getRotationPoint:M,getRotationOffset:U,isVisible:k}),Y=e.data.slbTxrCache=new Xb(e,{getKey:b,drawElement:E,getBoundingBox:O,getRotationPoint:P,getRotationOffset:z,isVisible:k}),ce=e.data.tlbTxrCache=new Xb(e,{getKey:T,drawElement:_,getBoundingBox:R,getRotationPoint:B,getRotationOffset:$,isVisible:k}),Z=e.data.lyrTxrCache=new L1e(e);e.onUpdateEleCalcs(o(function(j,ne){K.invalidateElements(ne),ee.invalidateElements(ne),Y.invalidateElements(ne),ce.invalidateElements(ne),Z.invalidateElements(ne);for(var te=0;te<ne.length;te++){var he=ne[te]._private;he.oldBackgroundTimestamp=he.backgroundTimestamp;}},"invalidateTextureCaches"));var ue=o(function(j){for(var ne=0;ne<j.length;ne++)Z.enqueueElementRefinement(j[ne].ele);},"refineInLayers");K.onDequeue(ue),ee.onDequeue(ue),Y.onDequeue(ue),ce.onDequeue(ue),t.webgl&&e.initWebgl(t,{getStyleKey:v,getLabelKey:x,drawElement:C,drawLabel:w,getElementBox:A,getLabelBox:D,getElementRotationPoint:L,getElementRotationOffset:F,getLabelRotationPoint:M,getLabelRotationOffset:U});}function Y1e(t,e,r){var n=r,i=o(function(A){un("Can not register `"+e+"` for `"+t+"` since `"+A+"` already exists in the prototype and can not be overridden");},"overrideErr");if(t==="core"){if(c4.prototype[e])return i(e);c4.prototype[e]=r;}else if(t==="collection"){if(ka.prototype[e])return i(e);ka.prototype[e]=r;}else if(t==="layout"){for(var a=o(function(A){this.options=A,r.call(this,A),Vr(this._private)||(this._private={}),this._private.cy=A.cy,this._private.listeners=[],this.createEmitter();},"Layout"),s=a.prototype=Object.create(r.prototype),l=[],u=0;u<l.length;u++){var h=l[u];s[h]=s[h]||function(){return this;};}s.start&&!s.run?s.run=function(){return this.start(),this;}:!s.start&&s.run&&(s.start=function(){return this.run(),this;});var f=r.prototype.stop;s.stop=function(){var _=this.options;if(_&&_.animate){var A=this.animations;if(A)for(var D=0;D<A.length;D++)A[D].stop();}return f?f.call(this):this.emit("layoutstop"),this;},s.destroy||(s.destroy=function(){return this;}),s.cy=function(){return this._private.cy;};var d=o(function(A){return A._private.cy;},"getCy"),p={addEventFields:o(function(A,D){D.layout=A,D.cy=d(A),D.target=A;},"addEventFields"),bubble:o(function(){return!0;},"bubble"),parent:o(function(A){return d(A);},"parent")};ir(s,{createEmitter:o(function(){return this._private.emitter=new rC(p,this),this;},"createEmitter"),emitter:o(function(){return this._private.emitter;},"emitter"),on:o(function(A,D){return this.emitter().on(A,D),this;},"on"),one:o(function(A,D){return this.emitter().one(A,D),this;},"one"),once:o(function(A,D){return this.emitter().one(A,D),this;},"once"),removeListener:o(function(A,D){return this.emitter().removeListener(A,D),this;},"removeListener"),removeAllListeners:o(function(){return this.emitter().removeAllListeners(),this;},"removeAllListeners"),emit:o(function(A,D){return this.emitter().emit(A,D),this;},"emit")}),cn.eventAliasesOn(s),n=a;}else if(t==="renderer"&&e!=="null"&&e!=="base"){var m=X1e("renderer","base"),g=m.prototype,y=r,v=r.prototype,x=o(function(){m.apply(this,arguments),y.apply(this,arguments);},"Renderer"),b=x.prototype;for(var T in g){var C=g[T],w=v[T]!=null;if(w)return i(T);b[T]=C;}for(var E in v)b[E]=v[E];g.clientFunctions.forEach(function(_){b[_]=b[_]||function(){oi("Renderer does not implement `renderer."+_+"()` on its prototype");};}),n=x;}else if(t==="__proto__"||t==="constructor"||t==="prototype")return oi(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return hge({map:W1e,keys:[t,e],value:n});}function X1e(t,e){return fge({map:W1e,keys:[t,e]});}function aet(t,e,r,n,i){return hge({map:q1e,keys:[t,e,r,n],value:i});}function set(t,e,r,n){return fge({map:q1e,keys:[t,e,r,n]});}var Vi,$0e,uqe,age,hqe,fqe,u4,Jt,li,kn,Vr,dqe,_t,pqe,O6,yo,h4,sge,OB,oge,mqe,Rf,gqe,yqe,vqe,xqe,Jb,PB,Y6,lge,z0e,Ui,bqe,Tqe,wqe,kqe,Eqe,Sqe,cge,Cqe,ir,Aqe,_qe,Dqe,Lqe,uge,Rqe,hge,fge,qp,Hb,Iqe,Oqe,Pqe,Bqe,X6,Fqe,tB,$qe,Gqe,Vqe,Hqe,Wqe,K1,dge,qqe,Yqe,Bb,jqe,Kqe,Qqe,Jqe,eYe,tYe,G0e,pge,iYe,aYe,f4,V0e,oYe,lYe,cYe,uYe,U0e,fYe,dYe,pYe,d4,rB,mge,gYe,P6,Ju,U1,gge,Wb,yge,e4,t4,yYe,Sf,f6,vYe,Nf,vge,xYe,H0e,bYe,TYe,BB,xge,B6,W0e,FB,oi,bge,un,wYe,jc,kYe,Tge,EYe,wge,aa,Mf,$B,SYe,Ul,Af,CYe,Kc,AYe,_Ye,ey,j6,q0e,r4,DYe,p4,LYe,RYe,NYe,MYe,IYe,OYe,PYe,BYe,FYe,$Ye,zYe,nB,GYe,VYe,K6,kge,H1,UYe,HYe,WYe,qYe,YYe,d6,zB,Ege,Yp,Gp,XYe,ia,q1,jYe,n4,Ws,KYe,QYe,ZYe,Sge,JYe,C6,A6,Y0e,GB,Q1,eXe,Cge,Age,tXe,rXe,nXe,iXe,aXe,sXe,Hs,eh,oXe,F6,$6,lXe,Wp,qb,iB,_f,i4,cXe,p6,ys,_ge,vB,Xp,Dge,VB,uXe,xB,hXe,fXe,X0e,Y1,j0e,X1,dXe,bB,pXe,mXe,gXe,yXe,Lge,vXe,xXe,bXe,TXe,wXe,kXe,EXe,K0e,SXe,CXe,Rge,Q0e,Z0e,AXe,_Xe,Fb,Z1,DXe,UB,z6,aB,Nge,Mge,LXe,RXe,NXe,J0e,eme,MXe,IXe,OXe,PXe,BXe,tme,FXe,$Xe,zXe,GXe,rme,m6,VXe,UXe,nme,HXe,WXe,qXe,YXe,XXe,jXe,ime,KXe,ame,QXe,ZXe,JXe,g6,eje,y6,tje,Ige,Oge,Pge,Bge,th,sme,Fge,ome,lme,rje,ty,TB,jp,nje,ije,Z6,aje,sje,lje,cje,uje,hje,fje,pje,mje,sB,cme,yje,vje,xje,Tje,wje,kje,Eje,Sje,Cje,Aje,_je,Lje,Nje,HB,Ije,a4,Pje,Fje,$je,zje,Gje,Uje,Hje,Wje,Yje,Xje,Kje,ume,Zje,$ge,J6,tKe,rKe,iKe,sKe,lKe,uKe,hKe,fKe,dKe,mKe,yKe,eC,bKe,wKe,EKe,CKe,zge,AKe,_Ke,DKe,RKe,NKe,MKe,IKe,Gge,Vge,PKe,hme,fme,BKe,Hge,Wge,zKe,qB,UKe,WKe,qKe,dme,XKe,jKe,KKe,ZKe,JKe,eQe,rQe,iQe,sQe,lQe,uQe,hQe,fQe,cn,dQe,_6,Gr,mn,$t,wB,pQe,mQe,gQe,F1,Cf,kB,yQe,vQe,xQe,bQe,TQe,qge,wQe,kQe,YB,EQe,pi,zn,SQe,CQe,AQe,If,Of,Df,nl,J1,s4,jge,DQe,tC,Hl,Kge,Qge,pme,LQe,j1,$f,rl,Vl,Vp,$b,v6,lB,RQe,NQe,Zge,Jge,mme,o4,gme,yme,MQe,Yb,m4,e1e,IQe,OQe,PQe,BQe,FQe,$Qe,zQe,GQe,VQe,vme,UQe,HQe,WQe,t1e,r1e,qQe,n1e,xme,YQe,Pf,i1e,bme,XQe,jQe,b6,a1e,s1e,Kr,KQe,o1e,G6,QQe,ZQe,D6,wa,ay,JQe,eZe,tZe,rZe,Lf,za,wme,kme,Eme,ka,Nn,nZe,aZe,Rn,L6,lZe,cZe,T6,c1e,EB,R6,uZe,hZe,SB,N6,Va,jb,fZe,g4,KB,Qc,aC,QB,Ta,sC,$a,Ga,dZe,pZe,Kp,l4,c4,V6,mZe,gZe,G1,Rme,yZe,vZe,uB,xZe,bZe,TZe,wZe,kZe,EZe,d1e,SZe,CZe,AZe,Nme,_Ze,DZe,U6,LZe,RZe,NZe,MZe,IZe,OZe,Mme,PZe,BZe,FZe,$Ze,zZe,Ime,Ome,JB,Zp,H6,CB,AB,Xc,tl,Pme,Bme,Hp,M6,Zu,$p,Up,Yc,V1,w6,v1e,x1e,_B,DB,Fme,$me,GZe,VZe,Ua,y4,tF,Zc,w1e,k1e,HZe,E1e,zme,Gme,lC,cC,S1e,C1e,oy,rh,v4,Vme,WZe,A1e,ly,hB,_1e,qZe,Ume,k6,I6,LB,D1e,YZe,XZe,jZe,KZe,QZe,ZZe,JZe,eJe,tJe,rJe,nJe,iJe,aJe,W1,sJe,Xb,Wi,oJe,Kb,W6,lJe,cJe,uJe,hJe,fJe,dJe,pJe,mJe,Hme,gJe,Wme,yJe,L1e,Ea,qme,vJe,R1e,Yme,Jc,kJe,EJe,SJe,CJe,AJe,fB,nh,N1e,rF,Jp,cy,M1e,vs,_Je,Vb,Kme,Zb,Ub,FJe,$Je,GJe,mB,Qme,Zme,gB,VJe,UJe,F1e,zf,ege,tge,RB,NB,G1e,zp,x4,U1e,tet,Er,ret,net,iet,W1e,q1e,MB,j1e,Qp,oet,il,aF=N(()=>{"use strict";o(Hi,"_typeof");o(Bf,"_classCallCheck");o(F0e,"_defineProperties");o(Ff,"_createClass");o(nge,"_defineProperty$1");o(Li,"_slicedToArray");o(ige,"_toConsumableArray");o(iqe,"_arrayWithoutHoles");o(aqe,"_arrayWithHoles");o(sqe,"_iterableToArray");o(oqe,"_iterableToArrayLimit");o(IB,"_unsupportedIterableToArray");o(yB,"_arrayLikeToArray");o(lqe,"_nonIterableSpread");o(cqe,"_nonIterableRest");o(go,"_createForOfIteratorHelper");Vi=typeof window>"u"?null:window,$0e=Vi?Vi.navigator:null;Vi&&Vi.document;uqe=Hi(""),age=Hi({}),hqe=Hi(function(){}),fqe=typeof HTMLElement>"u"?"undefined":Hi(HTMLElement),u4=o(function(e){return e&&e.instanceString&&li(e.instanceString)?e.instanceString():null;},"instanceStr"),Jt=o(function(e){return e!=null&&Hi(e)==uqe;},"string"),li=o(function(e){return e!=null&&Hi(e)===hqe;},"fn"),kn=o(function(e){return!yo(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array);},"array"),Vr=o(function(e){return e!=null&&Hi(e)===age&&!kn(e)&&e.constructor===Object;},"plainObject"),dqe=o(function(e){return e!=null&&Hi(e)===age;},"object"),_t=o(function(e){return e!=null&&Hi(e)===Hi(1)&&!isNaN(e);},"number"),pqe=o(function(e){return _t(e)&&Math.floor(e)===e;},"integer"),O6=o(function(e){if(fqe!=="undefined")return e!=null&&e instanceof HTMLElement;},"htmlElement"),yo=o(function(e){return h4(e)||sge(e);},"elementOrCollection"),h4=o(function(e){return u4(e)==="collection"&&e._private.single;},"element"),sge=o(function(e){return u4(e)==="collection"&&!e._private.single;},"collection"),OB=o(function(e){return u4(e)==="core";},"core"),oge=o(function(e){return u4(e)==="stylesheet";},"stylesheet"),mqe=o(function(e){return u4(e)==="event";},"event"),Rf=o(function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/));},"emptyString"),gqe=o(function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement;},"domElement"),yqe=o(function(e){return Vr(e)&&_t(e.x1)&&_t(e.x2)&&_t(e.y1)&&_t(e.y2);},"boundingBox"),vqe=o(function(e){return dqe(e)&&li(e.then);},"promise"),xqe=o(function(){return $0e&&$0e.userAgent.match(/msie|trident|edge/i);},"ms"),Jb=o(function(e,r){r||(r=o(function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var a=[],s=0;s<arguments.length;s++)a.push(arguments[s]);return a.join("$");},"keyFn"));var n=o(function i(){var a=this,s=arguments,l,u=r.apply(a,s),h=i.cache;return(l=h[u])||(l=h[u]=e.apply(a,s)),l;},"memoizedFn");return n.cache={},n;},"memoize"),PB=Jb(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase();});}),Y6=Jb(function(t){return t.replace(/(-\w)/g,function(e){return e[1].toUpperCase();});}),lge=Jb(function(t,e){return t+e[0].toUpperCase()+e.substring(1);},function(t,e){return t+"$"+e;}),z0e=o(function(e){return Rf(e)?e:e.charAt(0).toUpperCase()+e.substring(1);},"capitalize"),Ui="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",bqe="rgb[a]?\\(("+Ui+"[%]?)\\s*,\\s*("+Ui+"[%]?)\\s*,\\s*("+Ui+"[%]?)(?:\\s*,\\s*("+Ui+"))?\\)",Tqe="rgb[a]?\\((?:"+Ui+"[%]?)\\s*,\\s*(?:"+Ui+"[%]?)\\s*,\\s*(?:"+Ui+"[%]?)(?:\\s*,\\s*(?:"+Ui+"))?\\)",wqe="hsl[a]?\\(("+Ui+")\\s*,\\s*("+Ui+"[%])\\s*,\\s*("+Ui+"[%])(?:\\s*,\\s*("+Ui+"))?\\)",kqe="hsl[a]?\\((?:"+Ui+")\\s*,\\s*(?:"+Ui+"[%])\\s*,\\s*(?:"+Ui+"[%])(?:\\s*,\\s*(?:"+Ui+"))?\\)",Eqe="\\#[0-9a-fA-F]{3}",Sqe="\\#[0-9a-fA-F]{6}",cge=o(function(e,r){return e<r?-1:e>r?1:0;},"ascending"),Cqe=o(function(e,r){return-1*cge(e,r);},"descending"),ir=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var n=e[r];if(n!=null)for(var i=Object.keys(n),a=0;a<i.length;a++){var s=i[a];t[s]=n[s];}}return t;},Aqe=o(function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var r=e.length===4,n,i,a,s=16;return r?(n=parseInt(e[1]+e[1],s),i=parseInt(e[2]+e[2],s),a=parseInt(e[3]+e[3],s)):(n=parseInt(e[1]+e[2],s),i=parseInt(e[3]+e[4],s),a=parseInt(e[5]+e[6],s)),[n,i,a];}},"hex2tuple"),_qe=o(function(e){var r,n,i,a,s,l,u,h;function f(g,y,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?g+(y-g)*6*v:v<1/2?y:v<2/3?g+(y-g)*(2/3-v)*6:g;}o(f,"hue2rgb");var d=new RegExp("^"+wqe+"$").exec(e);if(d){if(n=parseInt(d[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,i=parseFloat(d[2]),i<0||i>100||(i=i/100,a=parseFloat(d[3]),a<0||a>100)||(a=a/100,s=d[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(i===0)l=u=h=Math.round(a*255);else{var p=a<.5?a*(1+i):a+i-a*i,m=2*a-p;l=Math.round(255*f(m,p,n+1/3)),u=Math.round(255*f(m,p,n)),h=Math.round(255*f(m,p,n-1/3));}r=[l,u,h,s];}return r;},"hsl2tuple"),Dqe=o(function(e){var r,n=new RegExp("^"+bqe+"$").exec(e);if(n){r=[];for(var i=[],a=1;a<=3;a++){var s=n[a];if(s[s.length-1]==="%"&&(i[a]=!0),s=parseFloat(s),i[a]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s));}var l=i[1]||i[2]||i[3],u=i[1]&&i[2]&&i[3];if(l&&!u)return;var h=n[4];if(h!==void 0){if(h=parseFloat(h),h<0||h>1)return;r.push(h);}}return r;},"rgb2tuple"),Lqe=o(function(e){return Rqe[e.toLowerCase()];},"colorname2tuple"),uge=o(function(e){return(kn(e)?e:null)||Lqe(e)||Aqe(e)||Dqe(e)||_qe(e);},"color2tuple"),Rqe={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},hge=o(function(e){for(var r=e.map,n=e.keys,i=n.length,a=0;a<i;a++){var s=n[a];if(Vr(s))throw Error("Tried to set map with object key");a<n.length-1?(r[s]==null&&(r[s]={}),r=r[s]):r[s]=e.value;}},"setMap"),fge=o(function(e){for(var r=e.map,n=e.keys,i=n.length,a=0;a<i;a++){var s=n[a];if(Vr(s))throw Error("Tried to get map with object key");if(r=r[s],r==null)return r;}return r;},"getMap");o(Nqe,"isObject");qp=Nqe,Hb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};o(Mqe,"createCommonjsModule");Iqe=typeof Hb=="object"&&Hb&&Hb.Object===Object&&Hb,Oqe=Iqe,Pqe=typeof self=="object"&&self&&self.Object===Object&&self,Bqe=Oqe||Pqe||Function("return this")(),X6=Bqe,Fqe=o(function(){return X6.Date.now();},"now"),tB=Fqe,$qe=/\s/;o(zqe,"trimmedEndIndex");Gqe=zqe,Vqe=/^\s+/;o(Uqe,"baseTrim");Hqe=Uqe,Wqe=X6.Symbol,K1=Wqe,dge=Object.prototype,qqe=dge.hasOwnProperty,Yqe=dge.toString,Bb=K1?K1.toStringTag:void 0;o(Xqe,"getRawTag");jqe=Xqe,Kqe=Object.prototype,Qqe=Kqe.toString;o(Zqe,"objectToString");Jqe=Zqe,eYe="[object Null]",tYe="[object Undefined]",G0e=K1?K1.toStringTag:void 0;o(rYe,"baseGetTag");pge=rYe;o(nYe,"isObjectLike");iYe=nYe,aYe="[object Symbol]";o(sYe,"isSymbol");f4=sYe,V0e=NaN,oYe=/^[-+]0x[0-9a-f]+$/i,lYe=/^0b[01]+$/i,cYe=/^0o[0-7]+$/i,uYe=parseInt;o(hYe,"toNumber");U0e=hYe,fYe="Expected a function",dYe=Math.max,pYe=Math.min;o(mYe,"debounce");d4=mYe,rB=Vi?Vi.performance:null,mge=rB&&rB.now?function(){return rB.now();}:function(){return Date.now();},gYe=function(){if(Vi){if(Vi.requestAnimationFrame)return function(t){Vi.requestAnimationFrame(t);};if(Vi.mozRequestAnimationFrame)return function(t){Vi.mozRequestAnimationFrame(t);};if(Vi.webkitRequestAnimationFrame)return function(t){Vi.webkitRequestAnimationFrame(t);};if(Vi.msRequestAnimationFrame)return function(t){Vi.msRequestAnimationFrame(t);};}return function(t){t&&setTimeout(function(){t(mge());},1e3/60);};}(),P6=o(function(e){return gYe(e);},"requestAnimationFrame"),Ju=mge,U1=9261,gge=65599,Wb=5381,yge=o(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:U1,n=r,i;i=e.next(),!i.done;)n=n*gge+i.value|0;return n;},"hashIterableInts"),e4=o(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:U1;return r*gge+e|0;},"hashInt"),t4=o(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Wb;return(r<<5)+r+e|0;},"hashIntAlt"),yYe=o(function(e,r){return e*2097152+r;},"combineHashes"),Sf=o(function(e){return e[0]*2097152+e[1];},"combineHashesArray"),f6=o(function(e,r){return[e4(e[0],r[0]),t4(e[1],r[1])];},"hashArrays"),vYe=o(function(e,r){var n={value:0,done:!1},i=0,a=e.length,s={next:o(function(){return i<a?n.value=e[i++]:n.done=!0,n;},"next")};return yge(s,r);},"hashIntsArray"),Nf=o(function(e,r){var n={value:0,done:!1},i=0,a=e.length,s={next:o(function(){return i<a?n.value=e.charCodeAt(i++):n.done=!0,n;},"next")};return yge(s,r);},"hashString"),vge=o(function(){return xYe(arguments);},"hashStrings"),xYe=o(function(e){for(var r,n=0;n<e.length;n++){var i=e[n];n===0?r=Nf(i):r=Nf(i,r);}return r;},"hashStringsArray"),H0e=!0,bYe=console.warn!=null,TYe=console.trace!=null,BB=Number.MAX_SAFE_INTEGER||9007199254740991,xge=o(function(){return!0;},"trueify"),B6=o(function(){return!1;},"falsify"),W0e=o(function(){return 0;},"zeroify"),FB=o(function(){},"noop"),oi=o(function(e){throw new Error(e);},"error"),bge=o(function(e){if(e!==void 0)H0e=!!e;else return H0e;},"warnings"),un=o(function(e){bge()&&(bYe?console.warn(e):(console.log(e),TYe&&console.trace()));},"warn"),wYe=o(function(e){return ir({},e);},"clone"),jc=o(function(e){return e==null?e:kn(e)?e.slice():Vr(e)?wYe(e):e;},"copy"),kYe=o(function(e){return e.slice();},"copyArray"),Tge=o(function(e,r){for(r=e="";e++<36;r+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return r;},"uuid"),EYe={},wge=o(function(){return EYe;},"staticEmptyObject"),aa=o(function(e){var r=Object.keys(e);return function(n){for(var i={},a=0;a<r.length;a++){var s=r[a],l=n===null||n===void 0?void 0:n[s];i[s]=l===void 0?e[s]:l;}return i;};},"defaults"),Mf=o(function(e,r,n){for(var i=e.length-1;i>=0&&!(e[i]===r&&(e.splice(i,1),n));i--);},"removeFromArray"),$B=o(function(e){e.splice(0,e.length);},"clearArray"),SYe=o(function(e,r){for(var n=0;n<r.length;n++){var i=r[n];e.push(i);}},"push"),Ul=o(function(e,r,n){return n&&(r=lge(n,r)),e[r];},"getPrefixedProperty"),Af=o(function(e,r,n,i){n&&(r=lge(n,r)),e[r]=i;},"setPrefixedProperty"),CYe=function(){function t(){Bf(this,t),this._obj={};}return o(t,"ObjectMap"),Ff(t,[{key:"set",value:o(function(r,n){return this._obj[r]=n,this;},"set")},{key:"delete",value:o(function(r){return this._obj[r]=void 0,this;},"_delete")},{key:"clear",value:o(function(){this._obj={};},"clear")},{key:"has",value:o(function(r){return this._obj[r]!==void 0;},"has")},{key:"get",value:o(function(r){return this._obj[r];},"get")}]),t;}(),Kc=typeof Map<"u"?Map:CYe,AYe="undefined",_Ye=function(){function t(e){if(Bf(this,t),this._obj=Object.create(null),this.size=0,e!=null){var r;e.instanceString!=null&&e.instanceString()===this.instanceString()?r=e.toArray():r=e;for(var n=0;n<r.length;n++)this.add(r[n]);}}return o(t,"ObjectSet"),Ff(t,[{key:"instanceString",value:o(function(){return"set";},"instanceString")},{key:"add",value:o(function(r){var n=this._obj;n[r]!==1&&(n[r]=1,this.size++);},"add")},{key:"delete",value:o(function(r){var n=this._obj;n[r]===1&&(n[r]=0,this.size--);},"_delete")},{key:"clear",value:o(function(){this._obj=Object.create(null);},"clear")},{key:"has",value:o(function(r){return this._obj[r]===1;},"has")},{key:"toArray",value:o(function(){var r=this;return Object.keys(this._obj).filter(function(n){return r.has(n);});},"toArray")},{key:"forEach",value:o(function(r,n){return this.toArray().forEach(r,n);},"forEach")}]),t;}(),ey=(typeof Set>"u"?"undefined":Hi(Set))!==AYe?Set:_Ye,j6=o(function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!OB(e)){oi("An element must have a core reference and parameters set");return;}var i=r.group;if(i==null&&(r.data&&r.data.source!=null&&r.data.target!=null?i="edges":i="nodes"),i!=="nodes"&&i!=="edges"){oi("An element must be of type `nodes` or `edges`; you specified `"+i+"`");return;}this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:i,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?i==="edges":!!r.pannable,active:!1,classes:new ey(),animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(a.position.x==null&&(a.position.x=0),a.position.y==null&&(a.position.y=0),r.renderedPosition){var s=r.renderedPosition,l=e.pan(),u=e.zoom();a.position={x:(s.x-l.x)/u,y:(s.y-l.y)/u};}var h=[];kn(r.classes)?h=r.classes:Jt(r.classes)&&(h=r.classes.split(/\s+/));for(var f=0,d=h.length;f<d;f++){var p=h[f];!p||p===""||a.classes.add(p);}this.createEmitter();var m=r.style||r.css;m&&(un("Setting a `style` bypass at element creation should be done only when absolutely necessary.  Try to use the stylesheet instead."),this.style(m)),(n===void 0||n)&&this.restore();},"Element"),q0e=o(function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},o(function(n,i,a){var s;Vr(n)&&!yo(n)&&(s=n,n=s.roots||s.root,i=s.visit,a=s.directed),a=arguments.length===2&&!li(i)?i:a,i=li(i)?i:function(){};for(var l=this._private.cy,u=n=Jt(n)?this.filter(n):n,h=[],f=[],d={},p={},m={},g=0,y,v=this.byGroup(),x=v.nodes,b=v.edges,T=0;T<u.length;T++){var C=u[T],w=C.id();C.isNode()&&(h.unshift(C),e.bfs&&(m[w]=!0,f.push(C)),p[w]=0);}for(var E=o(function(){var L=e.bfs?h.shift():h.pop(),S=L.id();if(e.dfs){if(m[S])return"continue";m[S]=!0,f.push(L);}var I=p[S],M=d[S],P=M!=null?M.source():null,B=M!=null?M.target():null,F=M==null?void 0:L.same(P)?B[0]:P[0],z=void 0;if(z=i(L,M,F,g++,I),z===!0)return y=L,"break";if(z===!1)return"break";for(var $=L.connectedEdges().filter(function(ce){return(!a||ce.source().same(L))&&b.has(ce);}),U=0;U<$.length;U++){var K=$[U],ee=K.connectedNodes().filter(function(ce){return!ce.same(L)&&x.has(ce);}),Y=ee.id();ee.length!==0&&!m[Y]&&(ee=ee[0],h.push(ee),e.bfs&&(m[Y]=!0,f.push(ee)),d[Y]=K,p[Y]=p[S]+1);}},"_loop");h.length!==0;){var _=E();if(_!=="continue"&&_==="break")break;}for(var A=l.collection(),D=0;D<f.length;D++){var O=f[D],R=d[O.id()];R!=null&&A.push(R),A.push(O);}return{path:l.collection(A),found:l.collection(y)};},"searchFn");},"defineSearch"),r4={breadthFirstSearch:q0e({bfs:!0}),depthFirstSearch:q0e({dfs:!0})};r4.bfs=r4.breadthFirstSearch;r4.dfs=r4.depthFirstSearch;DYe=Mqe(function(t,e){(function(){var r,n,i,a,s,l,u,h,f,d,p,m,g,y,v;i=Math.floor,d=Math.min,n=o(function(x,b){return x<b?-1:x>b?1:0;},"defaultCmp"),f=o(function(x,b,T,C,w){var E;if(T==null&&(T=0),w==null&&(w=n),T<0)throw new Error("lo must be non-negative");for(C==null&&(C=x.length);T<C;)E=i((T+C)/2),w(b,x[E])<0?C=E:T=E+1;return[].splice.apply(x,[T,T-T].concat(b)),b;},"insort"),l=o(function(x,b,T){return T==null&&(T=n),x.push(b),y(x,0,x.length-1,T);},"heappush"),s=o(function(x,b){var T,C;return b==null&&(b=n),T=x.pop(),x.length?(C=x[0],x[0]=T,v(x,0,b)):C=T,C;},"heappop"),h=o(function(x,b,T){var C;return T==null&&(T=n),C=x[0],x[0]=b,v(x,0,T),C;},"heapreplace"),u=o(function(x,b,T){var C;return T==null&&(T=n),x.length&&T(x[0],b)<0&&(C=[x[0],b],b=C[0],x[0]=C[1],v(x,0,T)),b;},"heappushpop"),a=o(function(x,b){var T,C,w,E,_,A;for(b==null&&(b=n),E=function(){A=[];for(var D=0,O=i(x.length/2);0<=O?D<O:D>O;0<=O?D++:D--)A.push(D);return A;}.apply(this).reverse(),_=[],C=0,w=E.length;C<w;C++)T=E[C],_.push(v(x,T,b));return _;},"heapify"),g=o(function(x,b,T){var C;if(T==null&&(T=n),C=x.indexOf(b),C!==-1)return y(x,0,C,T),v(x,C,T);},"updateItem"),p=o(function(x,b,T){var C,w,E,_,A;if(T==null&&(T=n),w=x.slice(0,b),!w.length)return w;for(a(w,T),A=x.slice(b),E=0,_=A.length;E<_;E++)C=A[E],u(w,C,T);return w.sort(T).reverse();},"nlargest"),m=o(function(x,b,T){var C,w,E,_,A,D,O,R,k;if(T==null&&(T=n),b*10<=x.length){if(E=x.slice(0,b).sort(T),!E.length)return E;for(w=E[E.length-1],O=x.slice(b),_=0,D=O.length;_<D;_++)C=O[_],T(C,w)<0&&(f(E,C,0,null,T),E.pop(),w=E[E.length-1]);return E;}for(a(x,T),k=[],A=0,R=d(b,x.length);0<=R?A<R:A>R;0<=R?++A:--A)k.push(s(x,T));return k;},"nsmallest"),y=o(function(x,b,T,C){var w,E,_;for(C==null&&(C=n),w=x[T];T>b;){if(_=T-1>>1,E=x[_],C(w,E)<0){x[T]=E,T=_;continue;}break;}return x[T]=w;},"_siftdown"),v=o(function(x,b,T){var C,w,E,_,A;for(T==null&&(T=n),w=x.length,A=b,E=x[b],C=2*b+1;C<w;)_=C+1,_<w&&!(T(x[C],x[_])<0)&&(C=_),x[b]=x[C],b=C,C=2*b+1;return x[b]=E,y(x,A,b,T);},"_siftup"),r=function(){x.push=l,x.pop=s,x.replace=h,x.pushpop=u,x.heapify=a,x.updateItem=g,x.nlargest=p,x.nsmallest=m;function x(b){this.cmp=b!==null&&b!==void 0?b:n,this.nodes=[];}return o(x,"Heap"),x.prototype.push=function(b){return l(this.nodes,b,this.cmp);},x.prototype.pop=function(){return s(this.nodes,this.cmp);},x.prototype.peek=function(){return this.nodes[0];},x.prototype.contains=function(b){return this.nodes.indexOf(b)!==-1;},x.prototype.replace=function(b){return h(this.nodes,b,this.cmp);},x.prototype.pushpop=function(b){return u(this.nodes,b,this.cmp);},x.prototype.heapify=function(){return a(this.nodes,this.cmp);},x.prototype.updateItem=function(b){return g(this.nodes,b,this.cmp);},x.prototype.clear=function(){return this.nodes=[];},x.prototype.empty=function(){return this.nodes.length===0;},x.prototype.size=function(){return this.nodes.length;},x.prototype.clone=function(){var b;return b=new x(),b.nodes=this.nodes.slice(0),b;},x.prototype.toArray=function(){return this.nodes.slice(0);},x.prototype.insert=x.prototype.push,x.prototype.top=x.prototype.peek,x.prototype.front=x.prototype.peek,x.prototype.has=x.prototype.contains,x.prototype.copy=x.prototype.clone,x;}(),function(x,b){return t.exports=b();}(this,function(){return r;});}).call(Hb);}),p4=DYe,LYe=aa({root:null,weight:o(function(e){return 1;},"weight"),directed:!1}),RYe={dijkstra:o(function(e){if(!Vr(e)){var r=arguments;e={root:r[0],weight:r[1],directed:r[2]};}var n=LYe(e),i=n.root,a=n.weight,s=n.directed,l=this,u=a,h=Jt(i)?this.filter(i)[0]:i[0],f={},d={},p={},m=this.byGroup(),g=m.nodes,y=m.edges;y.unmergeBy(function(I){return I.isLoop();});for(var v=o(function(M){return f[M.id()];},"getDist"),x=o(function(M,P){f[M.id()]=P,b.updateItem(M);},"setDist"),b=new p4(function(I,M){return v(I)-v(M);}),T=0;T<g.length;T++){var C=g[T];f[C.id()]=C.same(h)?0:1/0,b.push(C);}for(var w=o(function(M,P){for(var B=(s?M.edgesTo(P):M.edgesWith(P)).intersect(y),F=1/0,z,$=0;$<B.length;$++){var U=B[$],K=u(U);(K<F||!z)&&(F=K,z=U);}return{edge:z,dist:F};},"distBetween");b.size()>0;){var E=b.pop(),_=v(E),A=E.id();if(p[A]=_,_!==1/0)for(var D=E.neighborhood().intersect(g),O=0;O<D.length;O++){var R=D[O],k=R.id(),L=w(E,R),S=_+L.dist;S<v(R)&&(x(R,S),d[k]={node:E,edge:L.edge});}}return{distanceTo:o(function(M){var P=Jt(M)?g.filter(M)[0]:M[0];return p[P.id()];},"distanceTo"),pathTo:o(function(M){var P=Jt(M)?g.filter(M)[0]:M[0],B=[],F=P,z=F.id();if(P.length>0)for(B.unshift(P);d[z];){var $=d[z];B.unshift($.edge),B.unshift($.node),F=$.node,z=F.id();}return l.spawn(B);},"pathTo")};},"dijkstra")},NYe={kruskal:o(function(e){e=e||function(T){return 1;};for(var r=this.byGroup(),n=r.nodes,i=r.edges,a=n.length,s=new Array(a),l=n,u=o(function(C){for(var w=0;w<s.length;w++){var E=s[w];if(E.has(C))return w;}},"findSetIndex"),h=0;h<a;h++)s[h]=this.spawn(n[h]);for(var f=i.sort(function(T,C){return e(T)-e(C);}),d=0;d<f.length;d++){var p=f[d],m=p.source()[0],g=p.target()[0],y=u(m),v=u(g),x=s[y],b=s[v];y!==v&&(l.merge(p),x.merge(b),s.splice(v,1));}return l;},"kruskal")},MYe=aa({root:null,goal:null,weight:o(function(e){return 1;},"weight"),heuristic:o(function(e){return 0;},"heuristic"),directed:!1}),IYe={aStar:o(function(e){var r=this.cy(),n=MYe(e),i=n.root,a=n.goal,s=n.heuristic,l=n.directed,u=n.weight;i=r.collection(i)[0],a=r.collection(a)[0];var h=i.id(),f=a.id(),d={},p={},m={},g=new p4(function(z,$){return p[z.id()]-p[$.id()];}),y=new ey(),v={},x={},b=o(function($,U){g.push($),y.add(U);},"addToOpenSet"),T,C,w=o(function(){T=g.pop(),C=T.id(),y.delete(C);},"popFromOpenSet"),E=o(function($){return y.has($);},"isInOpenSet");b(i,h),d[h]=0,p[h]=s(i);for(var _=0;g.size()>0;){if(w(),_++,C===f){for(var A=[],D=a,O=f,R=x[O];A.unshift(D),R!=null&&A.unshift(R),D=v[O],D!=null;)O=D.id(),R=x[O];return{found:!0,distance:d[C],path:this.spawn(A),steps:_};}m[C]=!0;for(var k=T._private.edges,L=0;L<k.length;L++){var S=k[L];if(this.hasElementWithId(S.id())&&!(l&&S.data("source")!==C)){var I=S.source(),M=S.target(),P=I.id()!==C?I:M,B=P.id();if(this.hasElementWithId(B)&&!m[B]){var F=d[C]+u(S);if(!E(B)){d[B]=F,p[B]=F+s(P),b(P,B),v[B]=T,x[B]=S;continue;}F<d[B]&&(d[B]=F,p[B]=F+s(P),v[B]=T,x[B]=S);}}}}return{found:!1,distance:void 0,path:void 0,steps:_};},"aStar")},OYe=aa({weight:o(function(e){return 1;},"weight"),directed:!1}),PYe={floydWarshall:o(function(e){for(var r=this.cy(),n=OYe(e),i=n.weight,a=n.directed,s=i,l=this.byGroup(),u=l.nodes,h=l.edges,f=u.length,d=f*f,p=o(function(K){return u.indexOf(K);},"indexOf"),m=o(function(K){return u[K];},"atIndex"),g=new Array(d),y=0;y<d;y++){var v=y%f,x=(y-v)/f;x===v?g[y]=0:g[y]=1/0;}for(var b=new Array(d),T=new Array(d),C=0;C<h.length;C++){var w=h[C],E=w.source()[0],_=w.target()[0];if(E!==_){var A=p(E),D=p(_),O=A*f+D,R=s(w);if(g[O]>R&&(g[O]=R,b[O]=D,T[O]=w),!a){var k=D*f+A;!a&&g[k]>R&&(g[k]=R,b[k]=A,T[k]=w);}}}for(var L=0;L<f;L++)for(var S=0;S<f;S++)for(var I=S*f+L,M=0;M<f;M++){var P=S*f+M,B=L*f+M;g[I]+g[B]<g[P]&&(g[P]=g[I]+g[B],b[P]=b[I]);}var F=o(function(K){return(Jt(K)?r.filter(K):K)[0];},"getArgEle"),z=o(function(K){return p(F(K));},"indexOfArgEle"),$={distance:o(function(K,ee){var Y=z(K),ce=z(ee);return g[Y*f+ce];},"distance"),path:o(function(K,ee){var Y=z(K),ce=z(ee),Z=m(Y);if(Y===ce)return Z.collection();if(b[Y*f+ce]==null)return r.collection();var ue=r.collection(),Q=Y,j;for(ue.merge(Z);Y!==ce;)Q=Y,Y=b[Y*f+ce],j=T[Q*f+Y],ue.merge(j),ue.merge(m(Y));return ue;},"path")};return $;},"floydWarshall")},BYe=aa({weight:o(function(e){return 1;},"weight"),directed:!1,root:null}),FYe={bellmanFord:o(function(e){var r=this,n=BYe(e),i=n.weight,a=n.directed,s=n.root,l=i,u=this,h=this.cy(),f=this.byGroup(),d=f.edges,p=f.nodes,m=p.length,g=new Kc(),y=!1,v=[];s=h.collection(s)[0],d.unmergeBy(function(se){return se.isLoop();});for(var x=d.length,b=o(function(ae){var Oe=g.get(ae.id());return Oe||(Oe={},g.set(ae.id(),Oe)),Oe;},"getInfo"),T=o(function(ae){return(Jt(ae)?h.$(ae):ae)[0];},"getNodeFromTo"),C=o(function(ae){return b(T(ae)).dist;},"distanceTo"),w=o(function(ae){for(var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s,ye=T(ae),Be=[],He=ye;;){if(He==null)return r.spawn();var ze=b(He),Le=ze.edge,Ie=ze.pred;if(Be.unshift(He[0]),He.same(Oe)&&Be.length>0)break;Le!=null&&Be.unshift(Le),He=Ie;}return u.spawn(Be);},"pathTo"),E=0;E<m;E++){var _=p[E],A=b(_);_.same(s)?A.dist=0:A.dist=1/0,A.pred=null,A.edge=null;}for(var D=!1,O=o(function(ae,Oe,ye,Be,He,ze){var Le=Be.dist+ze;Le<He.dist&&!ye.same(Be.edge)&&(He.dist=Le,He.pred=ae,He.edge=ye,D=!0);},"checkForEdgeReplacement"),R=1;R<m;R++){D=!1;for(var k=0;k<x;k++){var L=d[k],S=L.source(),I=L.target(),M=l(L),P=b(S),B=b(I);O(S,I,L,P,B,M),a||O(I,S,L,B,P,M);}if(!D)break;}if(D)for(var F=[],z=0;z<x;z++){var $=d[z],U=$.source(),K=$.target(),ee=l($),Y=b(U).dist,ce=b(K).dist;if(Y+ee<ce||!a&&ce+ee<Y)if(y||(un("Graph contains a negative weight cycle for Bellman-Ford"),y=!0),e.findNegativeWeightCycles!==!1){var Z=[];Y+ee<ce&&Z.push(U),!a&&ce+ee<Y&&Z.push(K);for(var ue=Z.length,Q=0;Q<ue;Q++){var j=Z[Q],ne=[j];ne.push(b(j).edge);for(var te=b(j).pred;ne.indexOf(te)===-1;)ne.push(te),ne.push(b(te).edge),te=b(te).pred;ne=ne.slice(ne.indexOf(te));for(var he=ne[0].id(),le=0,J=2;J<ne.length;J+=2)ne[J].id()<he&&(he=ne[J].id(),le=J);ne=ne.slice(le).concat(ne.slice(0,le)),ne.push(ne[0]);var Se=ne.map(function(se){return se.id();}).join(",");F.indexOf(Se)===-1&&(v.push(u.spawn(ne)),F.push(Se));}}else break;}return{distanceTo:C,pathTo:w,hasNegativeWeightCycle:y,negativeWeightCycles:v};},"bellmanFord")},$Ye=Math.sqrt(2),zYe=o(function(e,r,n){n.length===0&&oi("Karger-Stein must be run on a connected (sub)graph");for(var i=n[e],a=i[1],s=i[2],l=r[a],u=r[s],h=n,f=h.length-1;f>=0;f--){var d=h[f],p=d[1],m=d[2];(r[p]===l&&r[m]===u||r[p]===u&&r[m]===l)&&h.splice(f,1);}for(var g=0;g<h.length;g++){var y=h[g];y[1]===u?(h[g]=y.slice(),h[g][1]=l):y[2]===u&&(h[g]=y.slice(),h[g][2]=l);}for(var v=0;v<r.length;v++)r[v]===u&&(r[v]=l);return h;},"collapse"),nB=o(function(e,r,n,i){for(;n>i;){var a=Math.floor(Math.random()*r.length);r=zYe(a,e,r),n--;}return r;},"contractUntil"),GYe={kargerStein:o(function(){var e=this,r=this.byGroup(),n=r.nodes,i=r.edges;i.unmergeBy(function(B){return B.isLoop();});var a=n.length,s=i.length,l=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),u=Math.floor(a/$Ye);if(a<2){oi("At least 2 nodes are required for Karger-Stein algorithm");return;}for(var h=[],f=0;f<s;f++){var d=i[f];h.push([f,n.indexOf(d.source()),n.indexOf(d.target())]);}for(var p=1/0,m=[],g=new Array(a),y=new Array(a),v=new Array(a),x=o(function(F,z){for(var $=0;$<a;$++)z[$]=F[$];},"copyNodesMap"),b=0;b<=l;b++){for(var T=0;T<a;T++)y[T]=T;var C=nB(y,h.slice(),a,u),w=C.slice();x(y,v);var E=nB(y,C,u,2),_=nB(v,w,u,2);E.length<=_.length&&E.length<p?(p=E.length,m=E,x(y,g)):_.length<=E.length&&_.length<p&&(p=_.length,m=_,x(v,g));}for(var A=this.spawn(m.map(function(B){return i[B[0]];})),D=this.spawn(),O=this.spawn(),R=g[0],k=0;k<g.length;k++){var L=g[k],S=n[k];L===R?D.merge(S):O.merge(S);}var I=o(function(F){var z=e.spawn();return F.forEach(function($){z.merge($),$.connectedEdges().forEach(function(U){e.contains(U)&&!A.contains(U)&&z.merge(U);});}),z;},"constructComponent"),M=[I(D),I(O)],P={cut:A,components:M,partition1:D,partition2:O};return P;},"kargerStein")},VYe=o(function(e){return{x:e.x,y:e.y};},"copyPosition"),K6=o(function(e,r,n){return{x:e.x*r+n.x,y:e.y*r+n.y};},"modelToRenderedPosition"),kge=o(function(e,r,n){return{x:(e.x-n.x)/r,y:(e.y-n.y)/r};},"renderedToModelPosition"),H1=o(function(e){return{x:e[0],y:e[1]};},"array2point"),UYe=o(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=1/0,a=r;a<n;a++){var s=e[a];isFinite(s)&&(i=Math.min(s,i));}return i;},"min"),HYe=o(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=-1/0,a=r;a<n;a++){var s=e[a];isFinite(s)&&(i=Math.max(s,i));}return i;},"max"),WYe=o(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=0,a=0,s=r;s<n;s++){var l=e[s];isFinite(l)&&(i+=l,a++);}return i/a;},"mean"),qYe=o(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;i?e=e.slice(r,n):(n<e.length&&e.splice(n,e.length-n),r>0&&e.splice(0,r));for(var l=0,u=e.length-1;u>=0;u--){var h=e[u];s?isFinite(h)||(e[u]=-1/0,l++):e.splice(u,1);}a&&e.sort(function(p,m){return p-m;});var f=e.length,d=Math.floor(f/2);return f%2!==0?e[d+1+l]:(e[d-1+l]+e[d+l])/2;},"median"),YYe=o(function(e){return Math.PI*e/180;},"deg2rad"),d6=o(function(e,r){return Math.atan2(r,e)-Math.PI/2;},"getAngleFromDisp"),zB=Math.log2||function(t){return Math.log(t)/Math.log(2);},Ege=o(function(e){return e>0?1:e<0?-1:0;},"signum"),Yp=o(function(e,r){return Math.sqrt(Gp(e,r));},"dist"),Gp=o(function(e,r){var n=r.x-e.x,i=r.y-e.y;return n*n+i*i;},"sqdist"),XYe=o(function(e){for(var r=e.length,n=0,i=0;i<r;i++)n+=e[i];for(var a=0;a<r;a++)e[a]=e[a]/n;return e;},"inPlaceSumNormalize"),ia=o(function(e,r,n,i){return(1-i)*(1-i)*e+2*(1-i)*i*r+i*i*n;},"qbezierAt"),q1=o(function(e,r,n,i){return{x:ia(e.x,r.x,n.x,i),y:ia(e.y,r.y,n.y,i)};},"qbezierPtAt"),jYe=o(function(e,r,n,i){var a={x:r.x-e.x,y:r.y-e.y},s=Yp(e,r),l={x:a.x/s,y:a.y/s};return n=n!==null&&n!==void 0?n:0,i=i!==null&&i!==void 0?i:n*s,{x:e.x+l.x*i,y:e.y+l.y*i};},"lineAt"),n4=o(function(e,r,n){return Math.max(e,Math.min(n,r));},"bound"),Ws=o(function(e){if(e==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(e.x1!=null&&e.y1!=null){if(e.x2!=null&&e.y2!=null&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h};}},"makeBoundingBox"),KYe=o(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h};},"copyBoundingBox"),QYe=o(function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0;},"clearBoundingBox"),ZYe=o(function(e,r,n){return{x1:e.x1+r,x2:e.x2+r,y1:e.y1+n,y2:e.y2+n,w:e.w,h:e.h};},"shiftBoundingBox"),Sge=o(function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1;},"updateBoundingBox"),JYe=o(function(e,r,n){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1;},"expandBoundingBoxByPoint"),C6=o(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e;},"expandBoundingBox"),A6=o(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,i,a,s;if(r.length===1)n=i=a=s=r[0];else if(r.length===2)n=a=r[0],s=i=r[1];else if(r.length===4){var l=Li(r,4);n=l[0],i=l[1],a=l[2],s=l[3];}return e.x1-=s,e.x2+=i,e.y1-=n,e.y2+=a,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e;},"expandBoundingBoxSides"),Y0e=o(function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1;},"assignBoundingBox"),GB=o(function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2<r.x1||r.x2<e.x1||e.y2<r.y1||r.y2<e.y1||e.y1>r.y2||r.y1>e.y2);},"boundingBoxesIntersect"),Q1=o(function(e,r,n){return e.x1<=r&&r<=e.x2&&e.y1<=n&&n<=e.y2;},"inBoundingBox"),eXe=o(function(e,r){return Q1(e,r.x,r.y);},"pointInBoundingBox"),Cge=o(function(e,r){return Q1(e,r.x1,r.y1)&&Q1(e,r.x2,r.y2);},"boundingBoxInBoundingBox"),Age=o(function(e,r,n,i,a,s,l){var u=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",h=u==="auto"?Xp(a,s):u,f=a/2,d=s/2;h=Math.min(h,f,d);var p=h!==f,m=h!==d,g;if(p){var y=n-f+h-l,v=i-d-l,x=n+f-h+l,b=v;if(g=_f(e,r,n,i,y,v,x,b,!1),g.length>0)return g;}if(m){var T=n+f+l,C=i-d+h-l,w=T,E=i+d-h+l;if(g=_f(e,r,n,i,T,C,w,E,!1),g.length>0)return g;}if(p){var _=n-f+h-l,A=i+d+l,D=n+f-h+l,O=A;if(g=_f(e,r,n,i,_,A,D,O,!1),g.length>0)return g;}if(m){var R=n-f-l,k=i-d+h-l,L=R,S=i+d-h+l;if(g=_f(e,r,n,i,R,k,L,S,!1),g.length>0)return g;}var I;{var M=n-f+h,P=i-d+h;if(I=qb(e,r,n,i,M,P,h+l),I.length>0&&I[0]<=M&&I[1]<=P)return[I[0],I[1]];}{var B=n+f-h,F=i-d+h;if(I=qb(e,r,n,i,B,F,h+l),I.length>0&&I[0]>=B&&I[1]<=F)return[I[0],I[1]];}{var z=n+f-h,$=i+d-h;if(I=qb(e,r,n,i,z,$,h+l),I.length>0&&I[0]>=z&&I[1]>=$)return[I[0],I[1]];}{var U=n-f+h,K=i+d-h;if(I=qb(e,r,n,i,U,K,h+l),I.length>0&&I[0]<=U&&I[1]>=K)return[I[0],I[1]];}return[];},"roundRectangleIntersectLine"),tXe=o(function(e,r,n,i,a,s,l){var u=l,h=Math.min(n,a),f=Math.max(n,a),d=Math.min(i,s),p=Math.max(i,s);return h-u<=e&&e<=f+u&&d-u<=r&&r<=p+u;},"inLineVicinity"),rXe=o(function(e,r,n,i,a,s,l,u,h){var f={x1:Math.min(n,l,a)-h,x2:Math.max(n,l,a)+h,y1:Math.min(i,u,s)-h,y2:Math.max(i,u,s)+h};return!(e<f.x1||e>f.x2||r<f.y1||r>f.y2);},"inBezierVicinity"),nXe=o(function(e,r,n,i){n-=i;var a=r*r-4*e*n;if(a<0)return[];var s=Math.sqrt(a),l=2*e,u=(-r+s)/l,h=(-r-s)/l;return[u,h];},"solveQuadratic"),iXe=o(function(e,r,n,i,a){var s=1e-5;e===0&&(e=s),r/=e,n/=e,i/=e;var l,u,h,f,d,p,m,g;if(u=(3*n-r*r)/9,h=-(27*i)+r*(9*n-2*(r*r)),h/=54,l=u*u*u+h*h,a[1]=0,m=r/3,l>0){d=h+Math.sqrt(l),d=d<0?-Math.pow(-d,1/3):Math.pow(d,1/3),p=h-Math.sqrt(l),p=p<0?-Math.pow(-p,1/3):Math.pow(p,1/3),a[0]=-m+d+p,m+=(d+p)/2,a[4]=a[2]=-m,m=Math.sqrt(3)*(-p+d)/2,a[3]=m,a[5]=-m;return;}if(a[5]=a[3]=0,l===0){g=h<0?-Math.pow(-h,1/3):Math.pow(h,1/3),a[0]=-m+2*g,a[4]=a[2]=-(g+m);return;}u=-u,f=u*u*u,f=Math.acos(h/Math.sqrt(f)),g=2*Math.sqrt(u),a[0]=-m+g*Math.cos(f/3),a[2]=-m+g*Math.cos((f+2*Math.PI)/3),a[4]=-m+g*Math.cos((f+4*Math.PI)/3);},"solveCubic"),aXe=o(function(e,r,n,i,a,s,l,u){var h=1*n*n-4*n*a+2*n*l+4*a*a-4*a*l+l*l+i*i-4*i*s+2*i*u+4*s*s-4*s*u+u*u,f=1*9*n*a-3*n*n-3*n*l-6*a*a+3*a*l+9*i*s-3*i*i-3*i*u-6*s*s+3*s*u,d=1*3*n*n-6*n*a+n*l-n*e+2*a*a+2*a*e-l*e+3*i*i-6*i*s+i*u-i*r+2*s*s+2*s*r-u*r,p=1*n*a-n*n+n*e-a*e+i*s-i*i+i*r-s*r,m=[];iXe(h,f,d,p,m);for(var g=1e-7,y=[],v=0;v<6;v+=2)Math.abs(m[v+1])<g&&m[v]>=0&&m[v]<=1&&y.push(m[v]);y.push(1),y.push(0);for(var x=-1,b,T,C,w=0;w<y.length;w++)b=Math.pow(1-y[w],2)*n+2*(1-y[w])*y[w]*a+y[w]*y[w]*l,T=Math.pow(1-y[w],2)*i+2*(1-y[w])*y[w]*s+y[w]*y[w]*u,C=Math.pow(b-e,2)+Math.pow(T-r,2),x>=0?C<x&&(x=C):x=C;return x;},"sqdistToQuadraticBezier"),sXe=o(function(e,r,n,i,a,s){var l=[e-n,r-i],u=[a-n,s-i],h=u[0]*u[0]+u[1]*u[1],f=l[0]*l[0]+l[1]*l[1],d=l[0]*u[0]+l[1]*u[1],p=d*d/h;return d<0?f:p>h?(e-a)*(e-a)+(r-s)*(r-s):f-p;},"sqdistToFiniteLine"),Hs=o(function(e,r,n){for(var i,a,s,l,u,h=0,f=0;f<n.length/2;f++)if(i=n[f*2],a=n[f*2+1],f+1<n.length/2?(s=n[(f+1)*2],l=n[(f+1)*2+1]):(s=n[(f+1-n.length/2)*2],l=n[(f+1-n.length/2)*2+1]),!(i==e&&s==e))if(i>=e&&e>=s||i<=e&&e<=s)u=(e-i)/(s-i)*(l-a)+a,u>r&&h++;else continue;return h%2!==0;},"pointInsidePolygonPoints"),eh=o(function(e,r,n,i,a,s,l,u,h){var f=new Array(n.length),d;u[0]!=null?(d=Math.atan(u[1]/u[0]),u[0]<0?d=d+Math.PI/2:d=-d-Math.PI/2):d=u;for(var p=Math.cos(-d),m=Math.sin(-d),g=0;g<f.length/2;g++)f[g*2]=s/2*(n[g*2]*p-n[g*2+1]*m),f[g*2+1]=l/2*(n[g*2+1]*p+n[g*2]*m),f[g*2]+=i,f[g*2+1]+=a;var y;if(h>0){var v=$6(f,-h);y=F6(v);}else y=f;return Hs(e,r,y);},"pointInsidePolygon"),oXe=o(function(e,r,n,i,a,s,l,u){for(var h=new Array(n.length*2),f=0;f<u.length;f++){var d=u[f];h[f*4+0]=d.startX,h[f*4+1]=d.startY,h[f*4+2]=d.stopX,h[f*4+3]=d.stopY;var p=Math.pow(d.cx-e,2)+Math.pow(d.cy-r,2);if(p<=Math.pow(d.radius,2))return!0;}return Hs(e,r,h);},"pointInsideRoundPolygon"),F6=o(function(e){for(var r=new Array(e.length/2),n,i,a,s,l,u,h,f,d=0;d<e.length/4;d++){n=e[d*4],i=e[d*4+1],a=e[d*4+2],s=e[d*4+3],d<e.length/4-1?(l=e[(d+1)*4],u=e[(d+1)*4+1],h=e[(d+1)*4+2],f=e[(d+1)*4+3]):(l=e[0],u=e[1],h=e[2],f=e[3]);var p=_f(n,i,a,s,l,u,h,f,!0);r[d*2]=p[0],r[d*2+1]=p[1];}return r;},"joinLines"),$6=o(function(e,r){for(var n=new Array(e.length*2),i,a,s,l,u=0;u<e.length/2;u++){i=e[u*2],a=e[u*2+1],u<e.length/2-1?(s=e[(u+1)*2],l=e[(u+1)*2+1]):(s=e[0],l=e[1]);var h=l-a,f=-(s-i),d=Math.sqrt(h*h+f*f),p=h/d,m=f/d;n[u*4]=i+p*r,n[u*4+1]=a+m*r,n[u*4+2]=s+p*r,n[u*4+3]=l+m*r;}return n;},"expandPolygon"),lXe=o(function(e,r,n,i,a,s){var l=n-e,u=i-r;l/=a,u/=s;var h=Math.sqrt(l*l+u*u),f=h-1;if(f<0)return[];var d=f/h;return[(n-e)*d+e,(i-r)*d+r];},"intersectLineEllipse"),Wp=o(function(e,r,n,i,a,s,l){return e-=a,r-=s,e/=n/2+l,r/=i/2+l,e*e+r*r<=1;},"checkInEllipse"),qb=o(function(e,r,n,i,a,s,l){var u=[n-e,i-r],h=[e-a,r-s],f=u[0]*u[0]+u[1]*u[1],d=2*(h[0]*u[0]+h[1]*u[1]),p=h[0]*h[0]+h[1]*h[1]-l*l,m=d*d-4*f*p;if(m<0)return[];var g=(-d+Math.sqrt(m))/(2*f),y=(-d-Math.sqrt(m))/(2*f),v=Math.min(g,y),x=Math.max(g,y),b=[];if(v>=0&&v<=1&&b.push(v),x>=0&&x<=1&&b.push(x),b.length===0)return[];var T=b[0]*u[0]+e,C=b[0]*u[1]+r;if(b.length>1){if(b[0]==b[1])return[T,C];var w=b[1]*u[0]+e,E=b[1]*u[1]+r;return[T,C,w,E];}else return[T,C];},"intersectLineCircle"),iB=o(function(e,r,n){return r<=e&&e<=n||n<=e&&e<=r?e:e<=r&&r<=n||n<=r&&r<=e?r:n;},"midOfThree"),_f=o(function(e,r,n,i,a,s,l,u,h){var f=e-a,d=n-e,p=l-a,m=r-s,g=i-r,y=u-s,v=p*m-y*f,x=d*m-g*f,b=y*d-p*g;if(b!==0){var T=v/b,C=x/b,w=.001,E=0-w,_=1+w;return E<=T&&T<=_&&E<=C&&C<=_?[e+T*d,r+T*g]:h?[e+T*d,r+T*g]:[];}else return v===0||x===0?iB(e,n,l)===l?[l,u]:iB(e,n,a)===a?[a,s]:iB(a,l,n)===n?[n,i]:[]:[];},"finiteLinesIntersect"),i4=o(function(e,r,n,i,a,s,l,u){var h=[],f,d=new Array(n.length),p=!0;s==null&&(p=!1);var m;if(p){for(var g=0;g<d.length/2;g++)d[g*2]=n[g*2]*s+i,d[g*2+1]=n[g*2+1]*l+a;if(u>0){var y=$6(d,-u);m=F6(y);}else m=d;}else m=n;for(var v,x,b,T,C=0;C<m.length/2;C++)v=m[C*2],x=m[C*2+1],C<m.length/2-1?(b=m[(C+1)*2],T=m[(C+1)*2+1]):(b=m[0],T=m[1]),f=_f(e,r,i,a,v,x,b,T),f.length!==0&&h.push(f[0],f[1]);return h;},"polygonIntersectLine"),cXe=o(function(e,r,n,i,a,s,l,u,h){var f=[],d,p=new Array(n.length*2);h.forEach(function(b,T){T===0?(p[p.length-2]=b.startX,p[p.length-1]=b.startY):(p[T*4-2]=b.startX,p[T*4-1]=b.startY),p[T*4]=b.stopX,p[T*4+1]=b.stopY,d=qb(e,r,i,a,b.cx,b.cy,b.radius),d.length!==0&&f.push(d[0],d[1]);});for(var m=0;m<p.length/4;m++)d=_f(e,r,i,a,p[m*4],p[m*4+1],p[m*4+2],p[m*4+3],!1),d.length!==0&&f.push(d[0],d[1]);if(f.length>2){for(var g=[f[0],f[1]],y=Math.pow(g[0]-e,2)+Math.pow(g[1]-r,2),v=1;v<f.length/2;v++){var x=Math.pow(f[v*2]-e,2)+Math.pow(f[v*2+1]-r,2);x<=y&&(g[0]=f[v*2],g[1]=f[v*2+1],y=x);}return g;}return f;},"roundPolygonIntersectLine"),p6=o(function(e,r,n){var i=[e[0]-r[0],e[1]-r[1]],a=Math.sqrt(i[0]*i[0]+i[1]*i[1]),s=(a-n)/a;return s<0&&(s=1e-5),[r[0]+s*i[0],r[1]+s*i[1]];},"shortenIntersection"),ys=o(function(e,r){var n=vB(e,r);return n=_ge(n),n;},"generateUnitNgonPointsFitToSquare"),_ge=o(function(e){for(var r,n,i=e.length/2,a=1/0,s=1/0,l=-1/0,u=-1/0,h=0;h<i;h++)r=e[2*h],n=e[2*h+1],a=Math.min(a,r),l=Math.max(l,r),s=Math.min(s,n),u=Math.max(u,n);for(var f=2/(l-a),d=2/(u-s),p=0;p<i;p++)r=e[2*p]=e[2*p]*f,n=e[2*p+1]=e[2*p+1]*d,a=Math.min(a,r),l=Math.max(l,r),s=Math.min(s,n),u=Math.max(u,n);if(s<-1)for(var m=0;m<i;m++)n=e[2*m+1]=e[2*m+1]+(-1-s);return e;},"fitPolygonToSquare"),vB=o(function(e,r){var n=1/e*2*Math.PI,i=e%2===0?Math.PI/2+n/2:Math.PI/2;i+=r;for(var a=new Array(e*2),s,l=0;l<e;l++)s=l*n+i,a[2*l]=Math.cos(s),a[2*l+1]=Math.sin(-s);return a;},"generateUnitNgonPoints"),Xp=o(function(e,r){return Math.min(e/4,r/4,8);},"getRoundRectangleRadius"),Dge=o(function(e,r){return Math.min(e/10,r/10,8);},"getRoundPolygonRadius"),VB=o(function(){return 8;},"getCutRectangleCornerLength"),uXe=o(function(e,r,n){return[e-2*r+n,2*(r-e),e];},"bezierPtsToQuadCoeff"),xB=o(function(e,r){return{heightOffset:Math.min(15,.05*r),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05};},"getBarrelCurveConstants"),hXe=aa({dampingFactor:.8,precision:1e-6,iterations:200,weight:o(function(e){return 1;},"weight")}),fXe={pageRank:o(function(e){for(var r=hXe(e),n=r.dampingFactor,i=r.precision,a=r.iterations,s=r.weight,l=this._private.cy,u=this.byGroup(),h=u.nodes,f=u.edges,d=h.length,p=d*d,m=f.length,g=new Array(p),y=new Array(d),v=(1-n)/d,x=0;x<d;x++){for(var b=0;b<d;b++){var T=x*d+b;g[T]=0;}y[x]=0;}for(var C=0;C<m;C++){var w=f[C],E=w.data("source"),_=w.data("target");if(E!==_){var A=h.indexOfId(E),D=h.indexOfId(_),O=s(w),R=D*d+A;g[R]+=O,y[A]+=O;}}for(var k=1/d+v,L=0;L<d;L++)if(y[L]===0)for(var S=0;S<d;S++){var I=S*d+L;g[I]=k;}else for(var M=0;M<d;M++){var P=M*d+L;g[P]=g[P]/y[L]+v;}for(var B=new Array(d),F=new Array(d),z,$=0;$<d;$++)B[$]=1;for(var U=0;U<a;U++){for(var K=0;K<d;K++)F[K]=0;for(var ee=0;ee<d;ee++)for(var Y=0;Y<d;Y++){var ce=ee*d+Y;F[ee]+=g[ce]*B[Y];}XYe(F),z=B,B=F,F=z;for(var Z=0,ue=0;ue<d;ue++){var Q=z[ue]-B[ue];Z+=Q*Q;}if(Z<i)break;}var j={rank:o(function(te){return te=l.collection(te)[0],B[h.indexOf(te)];},"rank")};return j;},"pageRank")},X0e=aa({root:null,weight:o(function(e){return 1;},"weight"),directed:!1,alpha:0}),Y1={degreeCentralityNormalized:o(function(e){e=X0e(e);var r=this.cy(),n=this.nodes(),i=n.length;if(e.directed){for(var f={},d={},p=0,m=0,g=0;g<i;g++){var y=n[g],v=y.id();e.root=y;var x=this.degreeCentrality(e);p<x.indegree&&(p=x.indegree),m<x.outdegree&&(m=x.outdegree),f[v]=x.indegree,d[v]=x.outdegree;}return{indegree:o(function(T){return p==0?0:(Jt(T)&&(T=r.filter(T)),f[T.id()]/p);},"indegree"),outdegree:o(function(T){return m===0?0:(Jt(T)&&(T=r.filter(T)),d[T.id()]/m);},"outdegree")};}else{for(var a={},s=0,l=0;l<i;l++){var u=n[l];e.root=u;var h=this.degreeCentrality(e);s<h.degree&&(s=h.degree),a[u.id()]=h.degree;}return{degree:o(function(T){return s===0?0:(Jt(T)&&(T=r.filter(T)),a[T.id()]/s);},"degree")};}},"degreeCentralityNormalized"),degreeCentrality:o(function(e){e=X0e(e);var r=this.cy(),n=this,i=e,a=i.root,s=i.weight,l=i.directed,u=i.alpha;if(a=r.collection(a)[0],l){for(var m=a.connectedEdges(),g=m.filter(function(E){return E.target().same(a)&&n.has(E);}),y=m.filter(function(E){return E.source().same(a)&&n.has(E);}),v=g.length,x=y.length,b=0,T=0,C=0;C<g.length;C++)b+=s(g[C]);for(var w=0;w<y.length;w++)T+=s(y[w]);return{indegree:Math.pow(v,1-u)*Math.pow(b,u),outdegree:Math.pow(x,1-u)*Math.pow(T,u)};}else{for(var h=a.connectedEdges().intersection(n),f=h.length,d=0,p=0;p<h.length;p++)d+=s(h[p]);return{degree:Math.pow(f,1-u)*Math.pow(d,u)};}},"degreeCentrality")};Y1.dc=Y1.degreeCentrality;Y1.dcn=Y1.degreeCentralityNormalised=Y1.degreeCentralityNormalized;j0e=aa({harmonic:!0,weight:o(function(){return 1;},"weight"),directed:!1,root:null}),X1={closenessCentralityNormalized:o(function(e){for(var r=j0e(e),n=r.harmonic,i=r.weight,a=r.directed,s=this.cy(),l={},u=0,h=this.nodes(),f=this.floydWarshall({weight:i,directed:a}),d=0;d<h.length;d++){for(var p=0,m=h[d],g=0;g<h.length;g++)if(d!==g){var y=f.distance(m,h[g]);n?p+=1/y:p+=y;}n||(p=1/p),u<p&&(u=p),l[m.id()]=p;}return{closeness:o(function(x){return u==0?0:(Jt(x)?x=s.filter(x)[0].id():x=x.id(),l[x]/u);},"closeness")};},"closenessCentralityNormalized"),closenessCentrality:o(function(e){var r=j0e(e),n=r.root,i=r.weight,a=r.directed,s=r.harmonic;n=this.filter(n)[0];for(var l=this.dijkstra({root:n,weight:i,directed:a}),u=0,h=this.nodes(),f=0;f<h.length;f++){var d=h[f];if(!d.same(n)){var p=l.distanceTo(d);s?u+=1/p:u+=p;}}return s?u:1/u;},"closenessCentrality")};X1.cc=X1.closenessCentrality;X1.ccn=X1.closenessCentralityNormalised=X1.closenessCentralityNormalized;dXe=aa({weight:null,directed:!1}),bB={betweennessCentrality:o(function(e){for(var r=dXe(e),n=r.directed,i=r.weight,a=i!=null,s=this.cy(),l=this.nodes(),u={},h={},f=0,d={set:o(function(T,C){h[T]=C,C>f&&(f=C);},"set"),get:o(function(T){return h[T];},"get")},p=0;p<l.length;p++){var m=l[p],g=m.id();n?u[g]=m.outgoers().nodes():u[g]=m.openNeighborhood().nodes(),d.set(g,0);}for(var y=o(function(T){for(var C=l[T].id(),w=[],E={},_={},A={},D=new p4(function(Y,ce){return A[Y]-A[ce];}),O=0;O<l.length;O++){var R=l[O].id();E[R]=[],_[R]=0,A[R]=1/0;}for(_[C]=1,A[C]=0,D.push(C);!D.empty();){var k=D.pop();if(w.push(k),a)for(var L=0;L<u[k].length;L++){var S=u[k][L],I=s.getElementById(k),M=void 0;I.edgesTo(S).length>0?M=I.edgesTo(S)[0]:M=S.edgesTo(I)[0];var P=i(M);S=S.id(),A[S]>A[k]+P&&(A[S]=A[k]+P,D.nodes.indexOf(S)<0?D.push(S):D.updateItem(S),_[S]=0,E[S]=[]),A[S]==A[k]+P&&(_[S]=_[S]+_[k],E[S].push(k));}else for(var B=0;B<u[k].length;B++){var F=u[k][B].id();A[F]==1/0&&(D.push(F),A[F]=A[k]+1),A[F]==A[k]+1&&(_[F]=_[F]+_[k],E[F].push(k));}}for(var z={},$=0;$<l.length;$++)z[l[$].id()]=0;for(;w.length>0;){for(var U=w.pop(),K=0;K<E[U].length;K++){var ee=E[U][K];z[ee]=z[ee]+_[ee]/_[U]*(1+z[U]);}U!=l[T].id()&&d.set(U,d.get(U)+z[U]);}},"_loop"),v=0;v<l.length;v++)y(v);var x={betweenness:o(function(T){var C=s.collection(T).id();return d.get(C);},"betweenness"),betweennessNormalized:o(function(T){if(f==0)return 0;var C=s.collection(T).id();return d.get(C)/f;},"betweennessNormalized")};return x.betweennessNormalised=x.betweennessNormalized,x;},"betweennessCentrality")};bB.bc=bB.betweennessCentrality;pXe=aa({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1;}]}),mXe=o(function(e){return pXe(e);},"setOptions"),gXe=o(function(e,r){for(var n=0,i=0;i<r.length;i++)n+=r[i](e);return n;},"getSimilarity"),yXe=o(function(e,r,n){for(var i=0;i<r;i++)e[i*r+i]=n;},"addLoops"),Lge=o(function(e,r){for(var n,i=0;i<r;i++){n=0;for(var a=0;a<r;a++)n+=e[a*r+i];for(var s=0;s<r;s++)e[s*r+i]=e[s*r+i]/n;}},"normalize"),vXe=o(function(e,r,n){for(var i=new Array(n*n),a=0;a<n;a++){for(var s=0;s<n;s++)i[a*n+s]=0;for(var l=0;l<n;l++)for(var u=0;u<n;u++)i[a*n+u]+=e[a*n+l]*r[l*n+u];}return i;},"mmult"),xXe=o(function(e,r,n){for(var i=e.slice(0),a=1;a<n;a++)e=vXe(e,i,r);return e;},"expand"),bXe=o(function(e,r,n){for(var i=new Array(r*r),a=0;a<r*r;a++)i[a]=Math.pow(e[a],n);return Lge(i,r),i;},"inflate"),TXe=o(function(e,r,n,i){for(var a=0;a<n;a++){var s=Math.round(e[a]*Math.pow(10,i))/Math.pow(10,i),l=Math.round(r[a]*Math.pow(10,i))/Math.pow(10,i);if(s!==l)return!1;}return!0;},"hasConverged"),wXe=o(function(e,r,n,i){for(var a=[],s=0;s<r;s++){for(var l=[],u=0;u<r;u++)Math.round(e[s*r+u]*1e3)/1e3>0&&l.push(n[u]);l.length!==0&&a.push(i.collection(l));}return a;},"assign"),kXe=o(function(e,r){for(var n=0;n<e.length;n++)if(!r[n]||e[n].id()!==r[n].id())return!1;return!0;},"isDuplicate"),EXe=o(function(e){for(var r=0;r<e.length;r++)for(var n=0;n<e.length;n++)r!=n&&kXe(e[r],e[n])&&e.splice(n,1);return e;},"removeDuplicates"),K0e=o(function(e){for(var r=this.nodes(),n=this.edges(),i=this.cy(),a=mXe(e),s={},l=0;l<r.length;l++)s[r[l].id()]=l;for(var u=r.length,h=u*u,f=new Array(h),d,p=0;p<h;p++)f[p]=0;for(var m=0;m<n.length;m++){var g=n[m],y=s[g.source().id()],v=s[g.target().id()],x=gXe(g,a.attributes);f[y*u+v]+=x,f[v*u+y]+=x;}yXe(f,u,a.multFactor),Lge(f,u);for(var b=!0,T=0;b&&T<a.maxIterations;)b=!1,d=xXe(f,u,a.expandFactor),f=bXe(d,u,a.inflateFactor),TXe(f,d,h,4)||(b=!0),T++;var C=wXe(f,u,r,i);return C=EXe(C),C;},"markovClustering"),SXe={markovClustering:K0e,mcl:K0e},CXe=o(function(e){return e;},"identity"),Rge=o(function(e,r){return Math.abs(r-e);},"absDiff"),Q0e=o(function(e,r,n){return e+Rge(r,n);},"addAbsDiff"),Z0e=o(function(e,r,n){return e+Math.pow(n-r,2);},"addSquaredDiff"),AXe=o(function(e){return Math.sqrt(e);},"sqrt"),_Xe=o(function(e,r,n){return Math.max(e,Rge(r,n));},"maxAbsDiff"),Fb=o(function(e,r,n,i,a){for(var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:CXe,l=i,u,h,f=0;f<e;f++)u=r(f),h=n(f),l=a(l,u,h);return s(l);},"getDistance"),Z1={euclidean:o(function(e,r,n){return e>=2?Fb(e,r,n,0,Z0e,AXe):Fb(e,r,n,0,Q0e);},"euclidean"),squaredEuclidean:o(function(e,r,n){return Fb(e,r,n,0,Z0e);},"squaredEuclidean"),manhattan:o(function(e,r,n){return Fb(e,r,n,0,Q0e);},"manhattan"),max:o(function(e,r,n){return Fb(e,r,n,-1/0,_Xe);},"max")};Z1["squared-euclidean"]=Z1.squaredEuclidean;Z1.squaredeuclidean=Z1.squaredEuclidean;o(Q6,"clusteringDistance");DXe=aa({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),UB=o(function(e){return DXe(e);},"setOptions"),z6=o(function(e,r,n,i,a){var s=a!=="kMedoids",l=s?function(d){return n[d];}:function(d){return i[d](n);},u=o(function(p){return i[p](r);},"getQ"),h=n,f=r;return Q6(e,i.length,l,u,h,f);},"getDist"),aB=o(function(e,r,n){for(var i=n.length,a=new Array(i),s=new Array(i),l=new Array(r),u=null,h=0;h<i;h++)a[h]=e.min(n[h]).value,s[h]=e.max(n[h]).value;for(var f=0;f<r;f++){u=[];for(var d=0;d<i;d++)u[d]=Math.random()*(s[d]-a[d])+a[d];l[f]=u;}return l;},"randomCentroids"),Nge=o(function(e,r,n,i,a){for(var s=1/0,l=0,u=0;u<r.length;u++){var h=z6(n,e,r[u],i,a);h<s&&(s=h,l=u);}return l;},"classify"),Mge=o(function(e,r,n){for(var i=[],a=null,s=0;s<r.length;s++)a=r[s],n[a.id()]===e&&i.push(a);return i;},"buildCluster"),LXe=o(function(e,r,n){return Math.abs(r-e)<=n;},"haveValuesConverged"),RXe=o(function(e,r,n){for(var i=0;i<e.length;i++)for(var a=0;a<e[i].length;a++){var s=Math.abs(e[i][a]-r[i][a]);if(s>n)return!1;}return!0;},"haveMatricesConverged"),NXe=o(function(e,r,n){for(var i=0;i<n;i++)if(e===r[i])return!0;return!1;},"seenBefore"),J0e=o(function(e,r){var n=new Array(r);if(e.length<50)for(var i=0;i<r;i++){for(var a=e[Math.floor(Math.random()*e.length)];NXe(a,n,i);)a=e[Math.floor(Math.random()*e.length)];n[i]=a;}else for(var s=0;s<r;s++)n[s]=e[Math.floor(Math.random()*e.length)];return n;},"randomMedoids"),eme=o(function(e,r,n){for(var i=0,a=0;a<r.length;a++)i+=z6("manhattan",r[a],e,n,"kMedoids");return i;},"findCost"),MXe=o(function(e){var r=this.cy(),n=this.nodes(),i=null,a=UB(e),s=new Array(a.k),l={},u;a.testMode?typeof a.testCentroids=="number"?(a.testCentroids,u=aB(n,a.k,a.attributes)):Hi(a.testCentroids)==="object"?u=a.testCentroids:u=aB(n,a.k,a.attributes):u=aB(n,a.k,a.attributes);for(var h=!0,f=0;h&&f<a.maxIterations;){for(var d=0;d<n.length;d++)i=n[d],l[i.id()]=Nge(i,u,a.distance,a.attributes,"kMeans");h=!1;for(var p=0;p<a.k;p++){var m=Mge(p,n,l);if(m.length!==0){for(var g=a.attributes.length,y=u[p],v=new Array(g),x=new Array(g),b=0;b<g;b++){x[b]=0;for(var T=0;T<m.length;T++)i=m[T],x[b]+=a.attributes[b](i);v[b]=x[b]/m.length,LXe(v[b],y[b],a.sensitivityThreshold)||(h=!0);}u[p]=v,s[p]=r.collection(m);}}f++;}return s;},"kMeans"),IXe=o(function(e){var r=this.cy(),n=this.nodes(),i=null,a=UB(e),s=new Array(a.k),l,u={},h,f=new Array(a.k);a.testMode?typeof a.testCentroids=="number"||(Hi(a.testCentroids)==="object"?l=a.testCentroids:l=J0e(n,a.k)):l=J0e(n,a.k);for(var d=!0,p=0;d&&p<a.maxIterations;){for(var m=0;m<n.length;m++)i=n[m],u[i.id()]=Nge(i,l,a.distance,a.attributes,"kMedoids");d=!1;for(var g=0;g<l.length;g++){var y=Mge(g,n,u);if(y.length!==0){f[g]=eme(l[g],y,a.attributes);for(var v=0;v<y.length;v++)h=eme(y[v],y,a.attributes),h<f[g]&&(f[g]=h,l[g]=y[v],d=!0);s[g]=r.collection(y);}}p++;}return s;},"kMedoids"),OXe=o(function(e,r,n,i,a){for(var s,l,u=0;u<r.length;u++)for(var h=0;h<e.length;h++)i[u][h]=Math.pow(n[u][h],a.m);for(var f=0;f<e.length;f++)for(var d=0;d<a.attributes.length;d++){s=0,l=0;for(var p=0;p<r.length;p++)s+=i[p][f]*a.attributes[d](r[p]),l+=i[p][f];e[f][d]=s/l;}},"updateCentroids"),PXe=o(function(e,r,n,i,a){for(var s=0;s<e.length;s++)r[s]=e[s].slice();for(var l,u,h,f=2/(a.m-1),d=0;d<n.length;d++)for(var p=0;p<i.length;p++){l=0;for(var m=0;m<n.length;m++)u=z6(a.distance,i[p],n[d],a.attributes,"cmeans"),h=z6(a.distance,i[p],n[m],a.attributes,"cmeans"),l+=Math.pow(u/h,f);e[p][d]=1/l;}},"updateMembership"),BXe=o(function(e,r,n,i){for(var a=new Array(n.k),s=0;s<a.length;s++)a[s]=[];for(var l,u,h=0;h<r.length;h++){l=-1/0,u=-1;for(var f=0;f<r[0].length;f++)r[h][f]>l&&(l=r[h][f],u=f);a[u].push(e[h]);}for(var d=0;d<a.length;d++)a[d]=i.collection(a[d]);return a;},"assign"),tme=o(function(e){var r=this.cy(),n=this.nodes(),i=UB(e),a,s,l,u,h;u=new Array(n.length);for(var f=0;f<n.length;f++)u[f]=new Array(i.k);l=new Array(n.length);for(var d=0;d<n.length;d++)l[d]=new Array(i.k);for(var p=0;p<n.length;p++){for(var m=0,g=0;g<i.k;g++)l[p][g]=Math.random(),m+=l[p][g];for(var y=0;y<i.k;y++)l[p][y]=l[p][y]/m;}s=new Array(i.k);for(var v=0;v<i.k;v++)s[v]=new Array(i.attributes.length);h=new Array(n.length);for(var x=0;x<n.length;x++)h[x]=new Array(i.k);for(var b=!0,T=0;b&&T<i.maxIterations;)b=!1,OXe(s,n,l,h,i),PXe(l,u,s,n,i),RXe(l,u,i.sensitivityThreshold)||(b=!0),T++;return a=BXe(n,l,i,r),{clusters:a,degreeOfMembership:l};},"fuzzyCMeans"),FXe={kMeans:MXe,kMedoids:IXe,fuzzyCMeans:tme,fcm:tme},$Xe=aa({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),zXe={single:"min",complete:"max"},GXe=o(function(e){var r=$Xe(e),n=zXe[r.linkage];return n!=null&&(r.linkage=n),r;},"setOptions"),rme=o(function(e,r,n,i,a){for(var s=0,l=1/0,u,h=a.attributes,f=o(function(D,O){return Q6(a.distance,h.length,function(R){return h[R](D);},function(R){return h[R](O);},D,O);},"getDist"),d=0;d<e.length;d++){var p=e[d].key,m=n[p][i[p]];m<l&&(s=p,l=m);}if(a.mode==="threshold"&&l>=a.threshold||a.mode==="dendrogram"&&e.length===1)return!1;var g=r[s],y=r[i[s]],v;a.mode==="dendrogram"?v={left:g,right:y,key:g.key}:v={value:g.value.concat(y.value),key:g.key},e[g.index]=v,e.splice(y.index,1),r[g.key]=v;for(var x=0;x<e.length;x++){var b=e[x];g.key===b.key?u=1/0:a.linkage==="min"?(u=n[g.key][b.key],n[g.key][b.key]>n[y.key][b.key]&&(u=n[y.key][b.key])):a.linkage==="max"?(u=n[g.key][b.key],n[g.key][b.key]<n[y.key][b.key]&&(u=n[y.key][b.key])):a.linkage==="mean"?u=(n[g.key][b.key]*g.size+n[y.key][b.key]*y.size)/(g.size+y.size):a.mode==="dendrogram"?u=f(b.value,g.value):u=f(b.value[0],g.value[0]),n[g.key][b.key]=n[b.key][g.key]=u;}for(var T=0;T<e.length;T++){var C=e[T].key;if(i[C]===g.key||i[C]===y.key){for(var w=C,E=0;E<e.length;E++){var _=e[E].key;n[C][_]<n[C][w]&&(w=_);}i[C]=w;}e[T].index=T;}return g.key=y.key=g.index=y.index=null,!0;},"mergeClosest"),m6=o(function t(e,r,n){e&&(e.value?r.push(e.value):(e.left&&t(e.left,r),e.right&&t(e.right,r)));},"getAllChildren"),VXe=o(function t(e,r){if(!e)return"";if(e.left&&e.right){var n=t(e.left,r),i=t(e.right,r),a=r.add({group:"nodes",data:{id:n+","+i}});return r.add({group:"edges",data:{source:n,target:a.id()}}),r.add({group:"edges",data:{source:i,target:a.id()}}),a.id();}else if(e.value)return e.value.id();},"buildDendrogram"),UXe=o(function t(e,r,n){if(!e)return[];var i=[],a=[],s=[];return r===0?(e.left&&m6(e.left,i),e.right&&m6(e.right,a),s=i.concat(a),[n.collection(s)]):r===1?e.value?[n.collection(e.value)]:(e.left&&m6(e.left,i),e.right&&m6(e.right,a),[n.collection(i),n.collection(a)]):e.value?[n.collection(e.value)]:(e.left&&(i=t(e.left,r-1,n)),e.right&&(a=t(e.right,r-1,n)),i.concat(a));},"buildClustersFromTree"),nme=o(function(e){for(var r=this.cy(),n=this.nodes(),i=GXe(e),a=i.attributes,s=o(function(T,C){return Q6(i.distance,a.length,function(w){return a[w](T);},function(w){return a[w](C);},T,C);},"getDist"),l=[],u=[],h=[],f=[],d=0;d<n.length;d++){var p={value:i.mode==="dendrogram"?n[d]:[n[d]],key:d,index:d};l[d]=p,f[d]=p,u[d]=[],h[d]=0;}for(var m=0;m<l.length;m++)for(var g=0;g<=m;g++){var y=void 0;i.mode==="dendrogram"?y=m===g?1/0:s(l[m].value,l[g].value):y=m===g?1/0:s(l[m].value[0],l[g].value[0]),u[m][g]=y,u[g][m]=y,y<u[m][h[m]]&&(h[m]=g);}for(var v=rme(l,f,u,h,i);v;)v=rme(l,f,u,h,i);var x;return i.mode==="dendrogram"?(x=UXe(l[0],i.dendrogramDepth,r),i.addDendrogram&&VXe(l[0],r)):(x=new Array(l.length),l.forEach(function(b,T){b.key=b.index=null,x[T]=r.collection(b.value);})),x;},"hierarchicalClustering"),HXe={hierarchicalClustering:nme,hca:nme},WXe=aa({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),qXe=o(function(e){var r=e.damping,n=e.preference;.5<=r&&r<1||oi("Damping must range on [0.5, 1).  Got: ".concat(r));var i=["median","mean","min","max"];return i.some(function(a){return a===n;})||_t(n)||oi("Preference must be one of [".concat(i.map(function(a){return"'".concat(a,"'");}).join(", "),"] or a number.  Got: ").concat(n)),WXe(e);},"setOptions"),YXe=o(function(e,r,n,i){var a=o(function(l,u){return i[u](l);},"attr");return-Q6(e,i.length,function(s){return a(r,s);},function(s){return a(n,s);},r,n);},"getSimilarity"),XXe=o(function(e,r){var n=null;return r==="median"?n=qYe(e):r==="mean"?n=WYe(e):r==="min"?n=UYe(e):r==="max"?n=HYe(e):n=r,n;},"getPreference"),jXe=o(function(e,r,n){for(var i=[],a=0;a<e;a++)r[a*e+a]+n[a*e+a]>0&&i.push(a);return i;},"findExemplars"),ime=o(function(e,r,n){for(var i=[],a=0;a<e;a++){for(var s=-1,l=-1/0,u=0;u<n.length;u++){var h=n[u];r[a*e+h]>l&&(s=h,l=r[a*e+h]);}s>0&&i.push(s);}for(var f=0;f<n.length;f++)i[n[f]]=n[f];return i;},"assignClusters"),KXe=o(function(e,r,n){for(var i=ime(e,r,n),a=0;a<n.length;a++){for(var s=[],l=0;l<i.length;l++)i[l]===n[a]&&s.push(l);for(var u=-1,h=-1/0,f=0;f<s.length;f++){for(var d=0,p=0;p<s.length;p++)d+=r[s[p]*e+s[f]];d>h&&(u=f,h=d);}n[a]=s[u];}return i=ime(e,r,n),i;},"assign"),ame=o(function(e){for(var r=this.cy(),n=this.nodes(),i=qXe(e),a={},s=0;s<n.length;s++)a[n[s].id()]=s;var l,u,h,f,d,p;l=n.length,u=l*l,h=new Array(u);for(var m=0;m<u;m++)h[m]=-1/0;for(var g=0;g<l;g++)for(var y=0;y<l;y++)g!==y&&(h[g*l+y]=YXe(i.distance,n[g],n[y],i.attributes));f=XXe(h,i.preference);for(var v=0;v<l;v++)h[v*l+v]=f;d=new Array(u);for(var x=0;x<u;x++)d[x]=0;p=new Array(u);for(var b=0;b<u;b++)p[b]=0;for(var T=new Array(l),C=new Array(l),w=new Array(l),E=0;E<l;E++)T[E]=0,C[E]=0,w[E]=0;for(var _=new Array(l*i.minIterations),A=0;A<_.length;A++)_[A]=0;var D;for(D=0;D<i.maxIterations;D++){for(var O=0;O<l;O++){for(var R=-1/0,k=-1/0,L=-1,S=0,I=0;I<l;I++)T[I]=d[O*l+I],S=p[O*l+I]+h[O*l+I],S>=R?(k=R,R=S,L=I):S>k&&(k=S);for(var M=0;M<l;M++)d[O*l+M]=(1-i.damping)*(h[O*l+M]-R)+i.damping*T[M];d[O*l+L]=(1-i.damping)*(h[O*l+L]-k)+i.damping*T[L];}for(var P=0;P<l;P++){for(var B=0,F=0;F<l;F++)T[F]=p[F*l+P],C[F]=Math.max(0,d[F*l+P]),B+=C[F];B-=C[P],C[P]=d[P*l+P],B+=C[P];for(var z=0;z<l;z++)p[z*l+P]=(1-i.damping)*Math.min(0,B-C[z])+i.damping*T[z];p[P*l+P]=(1-i.damping)*(B-C[P])+i.damping*T[P];}for(var $=0,U=0;U<l;U++){var K=p[U*l+U]+d[U*l+U]>0?1:0;_[D%i.minIterations*l+U]=K,$+=K;}if($>0&&(D>=i.minIterations-1||D==i.maxIterations-1)){for(var ee=0,Y=0;Y<l;Y++){w[Y]=0;for(var ce=0;ce<i.minIterations;ce++)w[Y]+=_[ce*l+Y];(w[Y]===0||w[Y]===i.minIterations)&&ee++;}if(ee===l)break;}}for(var Z=jXe(l,d,p),ue=KXe(l,h,Z),Q={},j=0;j<Z.length;j++)Q[Z[j]]=[];for(var ne=0;ne<n.length;ne++){var te=a[n[ne].id()],he=ue[te];he!=null&&Q[he].push(n[ne]);}for(var le=new Array(Z.length),J=0;J<Z.length;J++)le[J]=r.collection(Q[Z[J]]);return le;},"affinityPropagation"),QXe={affinityPropagation:ame,ap:ame},ZXe=aa({root:void 0,directed:!1}),JXe={hierholzer:o(function(e){if(!Vr(e)){var r=arguments;e={root:r[0],directed:r[1]};}var n=ZXe(e),i=n.root,a=n.directed,s=this,l=!1,u,h,f;i&&(f=Jt(i)?this.filter(i)[0].id():i[0].id());var d={},p={};a?s.forEach(function(b){var T=b.id();if(b.isNode()){var C=b.indegree(!0),w=b.outdegree(!0),E=C-w,_=w-C;E==1?u?l=!0:u=T:_==1?h?l=!0:h=T:(_>1||E>1)&&(l=!0),d[T]=[],b.outgoers().forEach(function(A){A.isEdge()&&d[T].push(A.id());});}else p[T]=[void 0,b.target().id()];}):s.forEach(function(b){var T=b.id();if(b.isNode()){var C=b.degree(!0);C%2&&(u?h?l=!0:h=T:u=T),d[T]=[],b.connectedEdges().forEach(function(w){return d[T].push(w.id());});}else p[T]=[b.source().id(),b.target().id()];});var m={found:!1,trail:void 0};if(l)return m;if(h&&u){if(a){if(f&&h!=f)return m;f=h;}else{if(f&&h!=f&&u!=f)return m;f||(f=h);}}else f||(f=s[0].id());var g=o(function(T){for(var C=T,w=[T],E,_,A;d[C].length;)E=d[C].shift(),_=p[E][0],A=p[E][1],C!=A?(d[A]=d[A].filter(function(D){return D!=E;}),C=A):!a&&C!=_&&(d[_]=d[_].filter(function(D){return D!=E;}),C=_),w.unshift(E),w.unshift(C);return w;},"walk"),y=[],v=[];for(v=g(f);v.length!=1;)d[v[0]].length==0?(y.unshift(s.getElementById(v.shift())),y.unshift(s.getElementById(v.shift()))):v=g(v.shift()).concat(v);y.unshift(s.getElementById(v.shift()));for(var x in d)if(d[x].length)return m;return m.found=!0,m.trail=this.spawn(y,!0),m;},"hierholzer")},g6=o(function(){var e=this,r={},n=0,i=0,a=[],s=[],l={},u=o(function(p,m){for(var g=s.length-1,y=[],v=e.spawn();s[g].x!=p||s[g].y!=m;)y.push(s.pop().edge),g--;y.push(s.pop().edge),y.forEach(function(x){var b=x.connectedNodes().intersection(e);v.merge(x),b.forEach(function(T){var C=T.id(),w=T.connectedEdges().intersection(e);v.merge(T),r[C].cutVertex?v.merge(w.filter(function(E){return E.isLoop();})):v.merge(w);});}),a.push(v);},"buildComponent"),h=o(function d(p,m,g){p===g&&(i+=1),r[m]={id:n,low:n++,cutVertex:!1};var y=e.getElementById(m).connectedEdges().intersection(e);if(y.size()===0)a.push(e.spawn(e.getElementById(m)));else{var v,x,b,T;y.forEach(function(C){v=C.source().id(),x=C.target().id(),b=v===m?x:v,b!==g&&(T=C.id(),l[T]||(l[T]=!0,s.push({x:m,y:b,edge:C})),b in r?r[m].low=Math.min(r[m].low,r[b].id):(d(p,b,m),r[m].low=Math.min(r[m].low,r[b].low),r[m].id<=r[b].low&&(r[m].cutVertex=!0,u(m,b))));});}},"biconnectedSearch");e.forEach(function(d){if(d.isNode()){var p=d.id();p in r||(i=0,h(p,p),r[p].cutVertex=i>1);}});var f=Object.keys(r).filter(function(d){return r[d].cutVertex;}).map(function(d){return e.getElementById(d);});return{cut:e.spawn(f),components:a};},"hopcroftTarjanBiconnected"),eje={hopcroftTarjanBiconnected:g6,htbc:g6,htb:g6,hopcroftTarjanBiconnectedComponents:g6},y6=o(function(){var e=this,r={},n=0,i=[],a=[],s=e.spawn(e),l=o(function u(h){a.push(h),r[h]={index:n,low:n++,explored:!1};var f=e.getElementById(h).connectedEdges().intersection(e);if(f.forEach(function(y){var v=y.target().id();v!==h&&(v in r||u(v),r[v].explored||(r[h].low=Math.min(r[h].low,r[v].low)));}),r[h].index===r[h].low){for(var d=e.spawn();;){var p=a.pop();if(d.merge(e.getElementById(p)),r[p].low=r[h].index,r[p].explored=!0,p===h)break;}var m=d.edgesWith(d),g=d.merge(m);i.push(g),s=s.difference(g);}},"stronglyConnectedSearch");return e.forEach(function(u){if(u.isNode()){var h=u.id();h in r||l(h);}}),{cut:s,components:i};},"tarjanStronglyConnected"),tje={tarjanStronglyConnected:y6,tsc:y6,tscc:y6,tarjanStronglyConnectedComponents:y6},Ige={};[r4,RYe,NYe,IYe,PYe,FYe,GYe,fXe,Y1,X1,bB,SXe,FXe,HXe,QXe,JXe,eje,tje].forEach(function(t){ir(Ige,t);});Oge=0,Pge=1,Bge=2,th=o(function t(e){if(!(this instanceof t))return new t(e);this.id="Thenable/1.0.7",this.state=Oge,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this));},"api");th.prototype={fulfill:o(function(e){return sme(this,Pge,"fulfillValue",e);},"fulfill"),reject:o(function(e){return sme(this,Bge,"rejectReason",e);},"reject"),then:o(function(e,r){var n=this,i=new th();return n.onFulfilled.push(lme(e,i,"fulfill")),n.onRejected.push(lme(r,i,"reject")),Fge(n),i.proxy;},"then")};sme=o(function(e,r,n,i){return e.state===Oge&&(e.state=r,e[n]=i,Fge(e)),e;},"deliver"),Fge=o(function(e){e.state===Pge?ome(e,"onFulfilled",e.fulfillValue):e.state===Bge&&ome(e,"onRejected",e.rejectReason);},"execute"),ome=o(function(e,r,n){if(e[r].length!==0){var i=e[r];e[r]=[];var a=o(function(){for(var l=0;l<i.length;l++)i[l](n);},"func");typeof setImmediate=="function"?setImmediate(a):setTimeout(a,0);}},"execute_handlers"),lme=o(function(e,r,n){return function(i){if(typeof e!="function")r[n].call(r,i);else{var a;try{a=e(i);}catch(s){r.reject(s);return;}rje(r,a);}};},"resolver"),rje=o(function t(e,r){if(e===r||e.proxy===r){e.reject(new TypeError("cannot resolve promise with itself"));return;}var n;if(Hi(r)==="object"&&r!==null||typeof r=="function")try{n=r.then;}catch(a){e.reject(a);return;}if(typeof n=="function"){var i=!1;try{n.call(r,function(a){i||(i=!0,a===r?e.reject(new TypeError("circular thenable chain")):t(e,a));},function(a){i||(i=!0,e.reject(a));});}catch(a){i||e.reject(a);}return;}e.fulfill(r);},"resolve");th.all=function(t){return new th(function(e,r){for(var n=new Array(t.length),i=0,a=o(function(u,h){n[u]=h,i++,i===t.length&&e(n);},"fulfill"),s=0;s<t.length;s++)(function(l){var u=t[l],h=u!=null&&u.then!=null;if(h)u.then(function(d){a(l,d);},function(d){r(d);});else{var f=u;a(l,f);}})(s);});};th.resolve=function(t){return new th(function(e,r){e(t);});};th.reject=function(t){return new th(function(e,r){r(t);});};ty=typeof Promise<"u"?Promise:th,TB=o(function(e,r,n){var i=OB(e),a=!i,s=this._private=ir({duration:1e3},r,n);if(s.target=e,s.style=s.style||s.css,s.started=!1,s.playing=!1,s.hooked=!1,s.applying=!1,s.progress=0,s.completes=[],s.frames=[],s.complete&&li(s.complete)&&s.completes.push(s.complete),a){var l=e.position();s.startPosition=s.startPosition||{x:l.x,y:l.y},s.startStyle=s.startStyle||e.cy().style().getAnimationStartStyle(e,s.style);}if(i){var u=e.pan();s.startPan={x:u.x,y:u.y},s.startZoom=e.zoom();}this.length=1,this[0]=this;},"Animation"),jp=TB.prototype;ir(jp,{instanceString:o(function(){return"animation";},"instanceString"),hook:o(function(){var e=this._private;if(!e.hooked){var r,n=e.target._private.animation;e.queue?r=n.queue:r=n.current,r.push(this),yo(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0;}return this;},"hook"),play:o(function(){var e=this._private;return e.progress===1&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this;},"play"),playing:o(function(){return this._private.playing;},"playing"),apply:o(function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this;},"apply"),applying:o(function(){return this._private.applying;},"applying"),pause:o(function(){var e=this._private;return e.playing=!1,e.started=!1,this;},"pause"),stop:o(function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this;},"stop"),rewind:o(function(){return this.progress(0);},"rewind"),fastforward:o(function(){return this.progress(1);},"fastforward"),time:o(function(e){var r=this._private;return e===void 0?r.progress*r.duration:this.progress(e/r.duration);},"time"),progress:o(function(e){var r=this._private,n=r.playing;return e===void 0?r.progress:(n&&this.pause(),r.progress=e,r.started=!1,n&&this.play(),this);},"progress"),completed:o(function(){return this._private.progress===1;},"completed"),reverse:o(function(){var e=this._private,r=e.playing;r&&this.pause(),e.progress=1-e.progress,e.started=!1;var n=o(function(h,f){var d=e[h];d!=null&&(e[h]=e[f],e[f]=d);},"swap");if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),e.style)for(var i=0;i<e.style.length;i++){var a=e.style[i],s=a.name,l=e.startStyle[s];e.startStyle[s]=a,e.style[i]=l;}return r&&this.play(),this;},"reverse"),promise:o(function(e){var r=this._private,n;switch(e){case"frame":n=r.frames;break;default:case"complete":case"completed":n=r.completes;}return new ty(function(i,a){n.push(function(){i();});});},"promise")});jp.complete=jp.completed;jp.run=jp.play;jp.running=jp.playing;nje={animated:o(function(){return o(function(){var r=this,n=r.length!==void 0,i=n?r:[r],a=this._private.cy||this;if(!a.styleEnabled())return!1;var s=i[0];if(s)return s._private.animation.current.length>0;},"animatedImpl");},"animated"),clearQueue:o(function(){return o(function(){var r=this,n=r.length!==void 0,i=n?r:[r],a=this._private.cy||this;if(!a.styleEnabled())return this;for(var s=0;s<i.length;s++){var l=i[s];l._private.animation.queue=[];}return this;},"clearQueueImpl");},"clearQueue"),delay:o(function(){return o(function(r,n){var i=this._private.cy||this;return i.styleEnabled()?this.animate({delay:r,duration:r,complete:n}):this;},"delayImpl");},"delay"),delayAnimation:o(function(){return o(function(r,n){var i=this._private.cy||this;return i.styleEnabled()?this.animation({delay:r,duration:r,complete:n}):this;},"delayAnimationImpl");},"delayAnimation"),animation:o(function(){return o(function(r,n){var i=this,a=i.length!==void 0,s=a?i:[i],l=this._private.cy||this,u=!a,h=!u;if(!l.styleEnabled())return this;var f=l.style();r=ir({},r,n);var d=Object.keys(r).length===0;if(d)return new TB(s[0],r);switch(r.duration===void 0&&(r.duration=400),r.duration){case"slow":r.duration=600;break;case"fast":r.duration=200;break;}if(h&&(r.style=f.getPropsList(r.style||r.css),r.css=void 0),h&&r.renderedPosition!=null){var p=r.renderedPosition,m=l.pan(),g=l.zoom();r.position=kge(p,g,m);}if(u&&r.panBy!=null){var y=r.panBy,v=l.pan();r.pan={x:v.x+y.x,y:v.y+y.y};}var x=r.center||r.centre;if(u&&x!=null){var b=l.getCenterPan(x.eles,r.zoom);b!=null&&(r.pan=b);}if(u&&r.fit!=null){var T=r.fit,C=l.getFitViewport(T.eles||T.boundingBox,T.padding);C!=null&&(r.pan=C.pan,r.zoom=C.zoom);}if(u&&Vr(r.zoom)){var w=l.getZoomedViewport(r.zoom);w!=null?(w.zoomed&&(r.zoom=w.zoom),w.panned&&(r.pan=w.pan)):r.zoom=null;}return new TB(s[0],r);},"animationImpl");},"animation"),animate:o(function(){return o(function(r,n){var i=this,a=i.length!==void 0,s=a?i:[i],l=this._private.cy||this;if(!l.styleEnabled())return this;n&&(r=ir({},r,n));for(var u=0;u<s.length;u++){var h=s[u],f=h.animated()&&(r.queue===void 0||r.queue),d=h.animation(r,f?{queue:!0}:void 0);d.play();}return this;},"animateImpl");},"animate"),stop:o(function(){return o(function(r,n){var i=this,a=i.length!==void 0,s=a?i:[i],l=this._private.cy||this;if(!l.styleEnabled())return this;for(var u=0;u<s.length;u++){for(var h=s[u],f=h._private,d=f.animation.current,p=0;p<d.length;p++){var m=d[p],g=m._private;n&&(g.duration=0);}r&&(f.animation.queue=[]),n||(f.animation.current=[]);}return l.notify("draw"),this;},"stopImpl");},"stop")},ije=Array.isArray,Z6=ije,aje=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sje=/^\w*$/;o(oje,"isKey");lje=oje,cje="[object AsyncFunction]",uje="[object Function]",hje="[object GeneratorFunction]",fje="[object Proxy]";o(dje,"isFunction");pje=dje,mje=X6["__core-js_shared__"],sB=mje,cme=function(){var t=/[^.]+$/.exec(sB&&sB.keys&&sB.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:"";}();o(gje,"isMasked");yje=gje,vje=Function.prototype,xje=vje.toString;o(bje,"toSource");Tje=bje,wje=/[\\^$.*+?()[\]{}|]/g,kje=/^\[object .+?Constructor\]$/,Eje=Function.prototype,Sje=Object.prototype,Cje=Eje.toString,Aje=Sje.hasOwnProperty,_je=RegExp("^"+Cje.call(Aje).replace(wje,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");o(Dje,"baseIsNative");Lje=Dje;o(Rje,"getValue$1");Nje=Rje;o(Mje,"getNative");HB=Mje,Ije=HB(Object,"create"),a4=Ije;o(Oje,"hashClear");Pje=Oje;o(Bje,"hashDelete");Fje=Bje,$je="__lodash_hash_undefined__",zje=Object.prototype,Gje=zje.hasOwnProperty;o(Vje,"hashGet");Uje=Vje,Hje=Object.prototype,Wje=Hje.hasOwnProperty;o(qje,"hashHas");Yje=qje,Xje="__lodash_hash_undefined__";o(jje,"hashSet");Kje=jje;o(ry,"Hash");ry.prototype.clear=Pje;ry.prototype.delete=Fje;ry.prototype.get=Uje;ry.prototype.has=Yje;ry.prototype.set=Kje;ume=ry;o(Qje,"listCacheClear");Zje=Qje;o(Jje,"eq");$ge=Jje;o(eKe,"assocIndexOf");J6=eKe,tKe=Array.prototype,rKe=tKe.splice;o(nKe,"listCacheDelete");iKe=nKe;o(aKe,"listCacheGet");sKe=aKe;o(oKe,"listCacheHas");lKe=oKe;o(cKe,"listCacheSet");uKe=cKe;o(ny,"ListCache");ny.prototype.clear=Zje;ny.prototype.delete=iKe;ny.prototype.get=sKe;ny.prototype.has=lKe;ny.prototype.set=uKe;hKe=ny,fKe=HB(X6,"Map"),dKe=fKe;o(pKe,"mapCacheClear");mKe=pKe;o(gKe,"isKeyable");yKe=gKe;o(vKe,"getMapData");eC=vKe;o(xKe,"mapCacheDelete");bKe=xKe;o(TKe,"mapCacheGet");wKe=TKe;o(kKe,"mapCacheHas");EKe=kKe;o(SKe,"mapCacheSet");CKe=SKe;o(iy,"MapCache");iy.prototype.clear=mKe;iy.prototype.delete=bKe;iy.prototype.get=wKe;iy.prototype.has=EKe;iy.prototype.set=CKe;zge=iy,AKe="Expected a function";o(WB,"memoize");WB.Cache=zge;_Ke=WB,DKe=500;o(LKe,"memoizeCapped");RKe=LKe,NKe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,MKe=/\\(\\)?/g,IKe=RKe(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(NKe,function(r,n,i,a){e.push(i?a.replace(MKe,"$1"):n||r);}),e;}),Gge=IKe;o(OKe,"arrayMap");Vge=OKe,PKe=1/0,hme=K1?K1.prototype:void 0,fme=hme?hme.toString:void 0;o(Uge,"baseToString");BKe=Uge;o(FKe,"toString$1");Hge=FKe;o($Ke,"castPath");Wge=$Ke,zKe=1/0;o(GKe,"toKey");qB=GKe;o(VKe,"baseGet");UKe=VKe;o(HKe,"get");WKe=HKe,qKe=function(){try{var t=HB(Object,"defineProperty");return t({},"",{}),t;}catch{}}(),dme=qKe;o(YKe,"baseAssignValue");XKe=YKe,jKe=Object.prototype,KKe=jKe.hasOwnProperty;o(QKe,"assignValue");ZKe=QKe,JKe=9007199254740991,eQe=/^(?:0|[1-9]\d*)$/;o(tQe,"isIndex");rQe=tQe;o(nQe,"baseSet");iQe=nQe;o(aQe,"set");sQe=aQe;o(oQe,"copyArray");lQe=oQe;o(cQe,"toPath");uQe=cQe,hQe={data:o(function(e){var r={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:o(function(i){},"beforeGet"),beforeSet:o(function(i,a){},"beforeSet"),onSet:o(function(i){},"onSet"),canSet:o(function(i){return!0;},"canSet")};return e=ir({},r,e),o(function(i,a){var s=e,l=this,u=l.length!==void 0,h=u?l:[l],f=u?l[0]:l;if(Jt(i)){var d=i.indexOf(".")!==-1,p=d&&uQe(i);if(s.allowGetting&&a===void 0){var m;return f&&(s.beforeGet(f),p&&f._private[s.field][i]===void 0?m=WKe(f._private[s.field],p):m=f._private[s.field][i]),m;}else if(s.allowSetting&&a!==void 0){var g=!s.immutableKeys[i];if(g){var y=nge({},i,a);s.beforeSet(l,y);for(var v=0,x=h.length;v<x;v++){var b=h[v];s.canSet(b)&&(p&&f._private[s.field][i]===void 0?sQe(b._private[s.field],p,a):b._private[s.field][i]=a);}s.updateStyle&&l.updateStyle(),s.onSet(l),s.settingTriggersEvent&&l[s.triggerFnName](s.settingEvent);}}}else if(s.allowSetting&&Vr(i)){var T=i,C,w,E=Object.keys(T);s.beforeSet(l,T);for(var _=0;_<E.length;_++){C=E[_],w=T[C];var A=!s.immutableKeys[C];if(A)for(var D=0;D<h.length;D++){var O=h[D];s.canSet(O)&&(O._private[s.field][C]=w);}}s.updateStyle&&l.updateStyle(),s.onSet(l),s.settingTriggersEvent&&l[s.triggerFnName](s.settingEvent);}else if(s.allowBinding&&li(i)){var R=i;l.on(s.bindingEvent,R);}else if(s.allowGetting&&i===void 0){var k;return f&&(s.beforeGet(f),k=f._private[s.field]),k;}return l;},"dataImpl");},"data"),removeData:o(function(e){var r={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return e=ir({},r,e),o(function(i){var a=e,s=this,l=s.length!==void 0,u=l?s:[s];if(Jt(i)){for(var h=i.split(/\s+/),f=h.length,d=0;d<f;d++){var p=h[d];if(!Rf(p)){var m=!a.immutableKeys[p];if(m)for(var g=0,y=u.length;g<y;g++)u[g]._private[a.field][p]=void 0;}}a.triggerEvent&&s[a.triggerFnName](a.event);}else if(i===void 0){for(var v=0,x=u.length;v<x;v++)for(var b=u[v]._private[a.field],T=Object.keys(b),C=0;C<T.length;C++){var w=T[C],E=!a.immutableKeys[w];E&&(b[w]=void 0);}a.triggerEvent&&s[a.triggerFnName](a.event);}return s;},"removeDataImpl");},"removeData")},fQe={eventAliasesOn:o(function(e){var r=e;r.addListener=r.listen=r.bind=r.on,r.unlisten=r.unbind=r.off=r.removeListener,r.trigger=r.emit,r.pon=r.promiseOn=function(n,i){var a=this,s=Array.prototype.slice.call(arguments,0);return new ty(function(l,u){var h=o(function(m){a.off.apply(a,d),l(m);},"callback"),f=s.concat([h]),d=f.concat([]);a.on.apply(a,f);});};},"eventAliasesOn")},cn={};[nje,hQe,fQe].forEach(function(t){ir(cn,t);});dQe={animate:cn.animate(),animation:cn.animation(),animated:cn.animated(),clearQueue:cn.clearQueue(),delay:cn.delay(),delayAnimation:cn.delayAnimation(),stop:cn.stop()},_6={classes:o(function(e){var r=this;if(e===void 0){var n=[];return r[0]._private.classes.forEach(function(g){return n.push(g);}),n;}else kn(e)||(e=(e||"").match(/\S+/g)||[]);for(var i=[],a=new ey(e),s=0;s<r.length;s++){for(var l=r[s],u=l._private,h=u.classes,f=!1,d=0;d<e.length;d++){var p=e[d],m=h.has(p);if(!m){f=!0;break;}}f||(f=h.size!==e.length),f&&(u.classes=a,i.push(l));}return i.length>0&&this.spawn(i).updateStyle().emit("class"),r;},"classes"),addClass:o(function(e){return this.toggleClass(e,!0);},"addClass"),hasClass:o(function(e){var r=this[0];return r!=null&&r._private.classes.has(e);},"hasClass"),toggleClass:o(function(e,r){kn(e)||(e=e.match(/\S+/g)||[]);for(var n=this,i=r===void 0,a=[],s=0,l=n.length;s<l;s++)for(var u=n[s],h=u._private.classes,f=!1,d=0;d<e.length;d++){var p=e[d],m=h.has(p),g=!1;r||i&&!m?(h.add(p),g=!0):(!r||i&&m)&&(h.delete(p),g=!0),!f&&g&&(a.push(u),f=!0);}return a.length>0&&this.spawn(a).updateStyle().emit("class"),n;},"toggleClass"),removeClass:o(function(e){return this.toggleClass(e,!1);},"removeClass"),flashClass:o(function(e,r){var n=this;if(r==null)r=250;else if(r===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e);},r),n;},"flashClass")};_6.className=_6.classNames=_6.classes;Gr={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Ui,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Gr.variable="(?:[\\w-.]|(?:\\\\"+Gr.metaChar+"))+";Gr.className="(?:[\\w-]|(?:\\\\"+Gr.metaChar+"))+";Gr.value=Gr.string+"|"+Gr.number;Gr.id=Gr.variable;(function(){var t,e,r;for(t=Gr.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],Gr.comparatorOp+="|@"+e;for(t=Gr.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],!(e.indexOf("!")>=0)&&e!=="="&&(Gr.comparatorOp+="|\\!"+e);})();mn=o(function(){return{checks:[]};},"newQuery"),$t={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},wB=[{selector:":selected",matches:o(function(e){return e.selected();},"matches")},{selector:":unselected",matches:o(function(e){return!e.selected();},"matches")},{selector:":selectable",matches:o(function(e){return e.selectable();},"matches")},{selector:":unselectable",matches:o(function(e){return!e.selectable();},"matches")},{selector:":locked",matches:o(function(e){return e.locked();},"matches")},{selector:":unlocked",matches:o(function(e){return!e.locked();},"matches")},{selector:":visible",matches:o(function(e){return e.visible();},"matches")},{selector:":hidden",matches:o(function(e){return!e.visible();},"matches")},{selector:":transparent",matches:o(function(e){return e.transparent();},"matches")},{selector:":grabbed",matches:o(function(e){return e.grabbed();},"matches")},{selector:":free",matches:o(function(e){return!e.grabbed();},"matches")},{selector:":removed",matches:o(function(e){return e.removed();},"matches")},{selector:":inside",matches:o(function(e){return!e.removed();},"matches")},{selector:":grabbable",matches:o(function(e){return e.grabbable();},"matches")},{selector:":ungrabbable",matches:o(function(e){return!e.grabbable();},"matches")},{selector:":animated",matches:o(function(e){return e.animated();},"matches")},{selector:":unanimated",matches:o(function(e){return!e.animated();},"matches")},{selector:":parent",matches:o(function(e){return e.isParent();},"matches")},{selector:":childless",matches:o(function(e){return e.isChildless();},"matches")},{selector:":child",matches:o(function(e){return e.isChild();},"matches")},{selector:":orphan",matches:o(function(e){return e.isOrphan();},"matches")},{selector:":nonorphan",matches:o(function(e){return e.isChild();},"matches")},{selector:":compound",matches:o(function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent();},"matches")},{selector:":loop",matches:o(function(e){return e.isLoop();},"matches")},{selector:":simple",matches:o(function(e){return e.isSimple();},"matches")},{selector:":active",matches:o(function(e){return e.active();},"matches")},{selector:":inactive",matches:o(function(e){return!e.active();},"matches")},{selector:":backgrounding",matches:o(function(e){return e.backgrounding();},"matches")},{selector:":nonbackgrounding",matches:o(function(e){return!e.backgrounding();},"matches")}].sort(function(t,e){return Cqe(t.selector,e.selector);}),pQe=function(){for(var t={},e,r=0;r<wB.length;r++)e=wB[r],t[e.selector]=e.matches;return t;}(),mQe=o(function(e,r){return pQe[e](r);},"stateSelectorMatches"),gQe="("+wB.map(function(t){return t.selector;}).join("|")+")",F1=o(function(e){return e.replace(new RegExp("\\\\("+Gr.metaChar+")","g"),function(r,n){return n;});},"cleanMetaChars"),Cf=o(function(e,r,n){e[e.length-1]=n;},"replaceLastQuery"),kB=[{name:"group",query:!0,regex:"("+Gr.group+")",populate:o(function(e,r,n){var i=Li(n,1),a=i[0];r.checks.push({type:$t.GROUP,value:a==="*"?a:a+"s"});},"populate")},{name:"state",query:!0,regex:gQe,populate:o(function(e,r,n){var i=Li(n,1),a=i[0];r.checks.push({type:$t.STATE,value:a});},"populate")},{name:"id",query:!0,regex:"\\#("+Gr.id+")",populate:o(function(e,r,n){var i=Li(n,1),a=i[0];r.checks.push({type:$t.ID,value:F1(a)});},"populate")},{name:"className",query:!0,regex:"\\.("+Gr.className+")",populate:o(function(e,r,n){var i=Li(n,1),a=i[0];r.checks.push({type:$t.CLASS,value:F1(a)});},"populate")},{name:"dataExists",query:!0,regex:"\\[\\s*("+Gr.variable+")\\s*\\]",populate:o(function(e,r,n){var i=Li(n,1),a=i[0];r.checks.push({type:$t.DATA_EXIST,field:F1(a)});},"populate")},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Gr.variable+")\\s*("+Gr.comparatorOp+")\\s*("+Gr.value+")\\s*\\]",populate:o(function(e,r,n){var i=Li(n,3),a=i[0],s=i[1],l=i[2],u=new RegExp("^"+Gr.string+"$").exec(l)!=null;u?l=l.substring(1,l.length-1):l=parseFloat(l),r.checks.push({type:$t.DATA_COMPARE,field:F1(a),operator:s,value:l});},"populate")},{name:"dataBool",query:!0,regex:"\\[\\s*("+Gr.boolOp+")\\s*("+Gr.variable+")\\s*\\]",populate:o(function(e,r,n){var i=Li(n,2),a=i[0],s=i[1];r.checks.push({type:$t.DATA_BOOL,field:F1(s),operator:a});},"populate")},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Gr.meta+")\\s*("+Gr.comparatorOp+")\\s*("+Gr.number+")\\s*\\]\\]",populate:o(function(e,r,n){var i=Li(n,3),a=i[0],s=i[1],l=i[2];r.checks.push({type:$t.META_COMPARE,field:F1(a),operator:s,value:parseFloat(l)});},"populate")},{name:"nextQuery",separator:!0,regex:Gr.separator,populate:o(function(e,r){var n=e.currentSubject,i=e.edgeCount,a=e.compoundCount,s=e[e.length-1];n!=null&&(s.subject=n,e.currentSubject=null),s.edgeCount=i,s.compoundCount=a,e.edgeCount=0,e.compoundCount=0;var l=e[e.length++]=mn();return l;},"populate")},{name:"directedEdge",separator:!0,regex:Gr.directedEdge,populate:o(function(e,r){if(e.currentSubject==null){var n=mn(),i=r,a=mn();return n.checks.push({type:$t.DIRECTED_EDGE,source:i,target:a}),Cf(e,r,n),e.edgeCount++,a;}else{var s=mn(),l=r,u=mn();return s.checks.push({type:$t.NODE_SOURCE,source:l,target:u}),Cf(e,r,s),e.edgeCount++,u;}},"populate")},{name:"undirectedEdge",separator:!0,regex:Gr.undirectedEdge,populate:o(function(e,r){if(e.currentSubject==null){var n=mn(),i=r,a=mn();return n.checks.push({type:$t.UNDIRECTED_EDGE,nodes:[i,a]}),Cf(e,r,n),e.edgeCount++,a;}else{var s=mn(),l=r,u=mn();return s.checks.push({type:$t.NODE_NEIGHBOR,node:l,neighbor:u}),Cf(e,r,s),u;}},"populate")},{name:"child",separator:!0,regex:Gr.child,populate:o(function(e,r){if(e.currentSubject==null){var n=mn(),i=mn(),a=e[e.length-1];return n.checks.push({type:$t.CHILD,parent:a,child:i}),Cf(e,r,n),e.compoundCount++,i;}else if(e.currentSubject===r){var s=mn(),l=e[e.length-1],u=mn(),h=mn(),f=mn(),d=mn();return s.checks.push({type:$t.COMPOUND_SPLIT,left:l,right:u,subject:h}),h.checks=r.checks,r.checks=[{type:$t.TRUE}],d.checks.push({type:$t.TRUE}),u.checks.push({type:$t.PARENT,parent:d,child:f}),Cf(e,l,s),e.currentSubject=h,e.compoundCount++,f;}else{var p=mn(),m=mn(),g=[{type:$t.PARENT,parent:p,child:m}];return p.checks=r.checks,r.checks=g,e.compoundCount++,m;}},"populate")},{name:"descendant",separator:!0,regex:Gr.descendant,populate:o(function(e,r){if(e.currentSubject==null){var n=mn(),i=mn(),a=e[e.length-1];return n.checks.push({type:$t.DESCENDANT,ancestor:a,descendant:i}),Cf(e,r,n),e.compoundCount++,i;}else if(e.currentSubject===r){var s=mn(),l=e[e.length-1],u=mn(),h=mn(),f=mn(),d=mn();return s.checks.push({type:$t.COMPOUND_SPLIT,left:l,right:u,subject:h}),h.checks=r.checks,r.checks=[{type:$t.TRUE}],d.checks.push({type:$t.TRUE}),u.checks.push({type:$t.ANCESTOR,ancestor:d,descendant:f}),Cf(e,l,s),e.currentSubject=h,e.compoundCount++,f;}else{var p=mn(),m=mn(),g=[{type:$t.ANCESTOR,ancestor:p,descendant:m}];return p.checks=r.checks,r.checks=g,e.compoundCount++,m;}},"populate")},{name:"subject",modifier:!0,regex:Gr.subject,populate:o(function(e,r){if(e.currentSubject!=null&&e.currentSubject!==r)return un("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=r;var n=e[e.length-1],i=n.checks[0],a=i==null?null:i.type;a===$t.DIRECTED_EDGE?i.type=$t.NODE_TARGET:a===$t.UNDIRECTED_EDGE&&(i.type=$t.NODE_NEIGHBOR,i.node=i.nodes[1],i.neighbor=i.nodes[0],i.nodes=null);},"populate")}];kB.forEach(function(t){return t.regexObj=new RegExp("^"+t.regex);});yQe=o(function(e){for(var r,n,i,a=0;a<kB.length;a++){var s=kB[a],l=s.name,u=e.match(s.regexObj);if(u!=null){n=u,r=s,i=l;var h=u[0];e=e.substring(h.length);break;}}return{expr:r,match:n,name:i,remaining:e};},"consumeExpr"),vQe=o(function(e){var r=e.match(/^\s+/);if(r){var n=r[0];e=e.substring(n.length);}return e;},"consumeWhitespace"),xQe=o(function(e){var r=this,n=r.inputText=e,i=r[0]=mn();for(r.length=1,n=vQe(n);;){var a=yQe(n);if(a.expr==null)return un("The selector `"+e+"`is invalid"),!1;var s=a.match.slice(1),l=a.expr.populate(r,i,s);if(l===!1)return!1;if(l!=null&&(i=l),n=a.remaining,n.match(/^\s*$/))break;}var u=r[r.length-1];r.currentSubject!=null&&(u.subject=r.currentSubject),u.edgeCount=r.edgeCount,u.compoundCount=r.compoundCount;for(var h=0;h<r.length;h++){var f=r[h];if(f.compoundCount>0&&f.edgeCount>0)return un("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(f.edgeCount>1)return un("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;f.edgeCount===1&&un("The selector `"+e+"` is deprecated.  Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons.  Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.");}return!0;},"parse"),bQe=o(function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=o(function(f){return f!==null&&f!==void 0?f:"";},"clean"),r=o(function(f){return Jt(f)?'"'+f+'"':e(f);},"cleanVal"),n=o(function(f){return" "+f+" ";},"space"),i=o(function(f,d){var p=f.type,m=f.value;switch(p){case $t.GROUP:{var g=e(m);return g.substring(0,g.length-1);}case $t.DATA_COMPARE:{var y=f.field,v=f.operator;return"["+y+n(e(v))+r(m)+"]";}case $t.DATA_BOOL:{var x=f.operator,b=f.field;return"["+e(x)+b+"]";}case $t.DATA_EXIST:{var T=f.field;return"["+T+"]";}case $t.META_COMPARE:{var C=f.operator,w=f.field;return"[["+w+n(e(C))+r(m)+"]]";}case $t.STATE:return m;case $t.ID:return"#"+m;case $t.CLASS:return"."+m;case $t.PARENT:case $t.CHILD:return a(f.parent,d)+n(">")+a(f.child,d);case $t.ANCESTOR:case $t.DESCENDANT:return a(f.ancestor,d)+" "+a(f.descendant,d);case $t.COMPOUND_SPLIT:{var E=a(f.left,d),_=a(f.subject,d),A=a(f.right,d);return E+(E.length>0?" ":"")+_+A;}case $t.TRUE:return"";}},"checkToString"),a=o(function(f,d){return f.checks.reduce(function(p,m,g){return p+(d===f&&g===0?"$":"")+i(m,d);},"");},"queryToString"),s="",l=0;l<this.length;l++){var u=this[l];s+=a(u,u.subject),this.length>1&&l<this.length-1&&(s+=", ");}return this.toStringCache=s,s;},"toString"),TQe={parse:xQe,toString:bQe},qge=o(function(e,r,n){var i,a=Jt(e),s=_t(e),l=Jt(n),u,h,f=!1,d=!1,p=!1;switch(r.indexOf("!")>=0&&(r=r.replace("!",""),d=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),f=!0),(a||l||f)&&(u=!a&&!s?"":""+e,h=""+n),f&&(e=u=u.toLowerCase(),n=h=h.toLowerCase()),r){case"*=":i=u.indexOf(h)>=0;break;case"$=":i=u.indexOf(h,u.length-h.length)>=0;break;case"^=":i=u.indexOf(h)===0;break;case"=":i=e===n;break;case">":p=!0,i=e>n;break;case">=":p=!0,i=e>=n;break;case"<":p=!0,i=e<n;break;case"<=":p=!0,i=e<=n;break;default:i=!1;break;}return d&&(e!=null||!p)&&(i=!i),i;},"valCmp"),wQe=o(function(e,r){switch(r){case"?":return!!e;case"!":return!e;case"^":return e===void 0;}},"boolCmp"),kQe=o(function(e){return e!==void 0;},"existCmp"),YB=o(function(e,r){return e.data(r);},"data"),EQe=o(function(e,r){return e[r]();},"meta"),pi=[],zn=o(function(e,r){return e.checks.every(function(n){return pi[n.type](n,r);});},"matches");pi[$t.GROUP]=function(t,e){var r=t.value;return r==="*"||r===e.group();};pi[$t.STATE]=function(t,e){var r=t.value;return mQe(r,e);};pi[$t.ID]=function(t,e){var r=t.value;return e.id()===r;};pi[$t.CLASS]=function(t,e){var r=t.value;return e.hasClass(r);};pi[$t.META_COMPARE]=function(t,e){var r=t.field,n=t.operator,i=t.value;return qge(EQe(e,r),n,i);};pi[$t.DATA_COMPARE]=function(t,e){var r=t.field,n=t.operator,i=t.value;return qge(YB(e,r),n,i);};pi[$t.DATA_BOOL]=function(t,e){var r=t.field,n=t.operator;return wQe(YB(e,r),n);};pi[$t.DATA_EXIST]=function(t,e){var r=t.field;return t.operator,kQe(YB(e,r));};pi[$t.UNDIRECTED_EDGE]=function(t,e){var r=t.nodes[0],n=t.nodes[1],i=e.source(),a=e.target();return zn(r,i)&&zn(n,a)||zn(n,i)&&zn(r,a);};pi[$t.NODE_NEIGHBOR]=function(t,e){return zn(t.node,e)&&e.neighborhood().some(function(r){return r.isNode()&&zn(t.neighbor,r);});};pi[$t.DIRECTED_EDGE]=function(t,e){return zn(t.source,e.source())&&zn(t.target,e.target());};pi[$t.NODE_SOURCE]=function(t,e){return zn(t.source,e)&&e.outgoers().some(function(r){return r.isNode()&&zn(t.target,r);});};pi[$t.NODE_TARGET]=function(t,e){return zn(t.target,e)&&e.incomers().some(function(r){return r.isNode()&&zn(t.source,r);});};pi[$t.CHILD]=function(t,e){return zn(t.child,e)&&zn(t.parent,e.parent());};pi[$t.PARENT]=function(t,e){return zn(t.parent,e)&&e.children().some(function(r){return zn(t.child,r);});};pi[$t.DESCENDANT]=function(t,e){return zn(t.descendant,e)&&e.ancestors().some(function(r){return zn(t.ancestor,r);});};pi[$t.ANCESTOR]=function(t,e){return zn(t.ancestor,e)&&e.descendants().some(function(r){return zn(t.descendant,r);});};pi[$t.COMPOUND_SPLIT]=function(t,e){return zn(t.subject,e)&&zn(t.left,e)&&zn(t.right,e);};pi[$t.TRUE]=function(){return!0;};pi[$t.COLLECTION]=function(t,e){var r=t.value;return r.has(e);};pi[$t.FILTER]=function(t,e){var r=t.value;return r(e);};SQe=o(function(e){var r=this;if(r.length===1&&r[0].checks.length===1&&r[0].checks[0].type===$t.ID)return e.getElementById(r[0].checks[0].value).collection();var n=o(function(a){for(var s=0;s<r.length;s++){var l=r[s];if(zn(l,a))return!0;}return!1;},"selectorFunction");return r.text()==null&&(n=o(function(){return!0;},"selectorFunction")),e.filter(n);},"filter"),CQe=o(function(e){for(var r=this,n=0;n<r.length;n++){var i=r[n];if(zn(i,e))return!0;}return!1;},"matches"),AQe={matches:CQe,filter:SQe},If=o(function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,e==null||Jt(e)&&e.match(/^\s*$/)||(yo(e)?this.addQuery({checks:[{type:$t.COLLECTION,value:e.collection()}]}):li(e)?this.addQuery({checks:[{type:$t.FILTER,value:e}]}):Jt(e)?this.parse(e)||(this.invalid=!0):oi("A selector must be created from a string; found "));},"Selector"),Of=If.prototype;[TQe,AQe].forEach(function(t){return ir(Of,t);});Of.text=function(){return this.inputText;};Of.size=function(){return this.length;};Of.eq=function(t){return this[t];};Of.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text();};Of.addQuery=function(t){this[this.length++]=t;};Of.selector=Of.toString;Df={allAre:o(function(e){var r=new If(e);return this.every(function(n){return r.matches(n);});},"allAre"),is:o(function(e){var r=new If(e);return this.some(function(n){return r.matches(n);});},"is"),some:o(function(e,r){for(var n=0;n<this.length;n++){var i=r?e.apply(r,[this[n],n,this]):e(this[n],n,this);if(i)return!0;}return!1;},"some"),every:o(function(e,r){for(var n=0;n<this.length;n++){var i=r?e.apply(r,[this[n],n,this]):e(this[n],n,this);if(!i)return!1;}return!0;},"every"),same:o(function(e){if(this===e)return!0;e=this.cy().collection(e);var r=this.length,n=e.length;return r!==n?!1:r===1?this[0]===e[0]:this.every(function(i){return e.hasElementWithId(i.id());});},"same"),anySame:o(function(e){return e=this.cy().collection(e),this.some(function(r){return e.hasElementWithId(r.id());});},"anySame"),allAreNeighbors:o(function(e){e=this.cy().collection(e);var r=this.neighborhood();return e.every(function(n){return r.hasElementWithId(n.id());});},"allAreNeighbors"),contains:o(function(e){e=this.cy().collection(e);var r=this;return e.every(function(n){return r.hasElementWithId(n.id());});},"contains")};Df.allAreNeighbours=Df.allAreNeighbors;Df.has=Df.contains;Df.equal=Df.equals=Df.same;nl=o(function(e,r){return o(function(i,a,s,l){var u=i,h=this,f;if(u==null?f="":yo(u)&&u.length===1&&(f=u.id()),h.length===1&&f){var d=h[0]._private,p=d.traversalCache=d.traversalCache||{},m=p[r]=p[r]||[],g=Nf(f),y=m[g];return y||(m[g]=e.call(h,i,a,s,l));}else return e.call(h,i,a,s,l);},"traversalCache");},"cache"),J1={parent:o(function(e){var r=[];if(this.length===1){var n=this[0]._private.parent;if(n)return n;}for(var i=0;i<this.length;i++){var a=this[i],s=a._private.parent;s&&r.push(s);}return this.spawn(r,!0).filter(e);},"parent"),parents:o(function(e){for(var r=[],n=this.parent();n.nonempty();){for(var i=0;i<n.length;i++){var a=n[i];r.push(a);}n=n.parent();}return this.spawn(r,!0).filter(e);},"parents"),commonAncestors:o(function(e){for(var r,n=0;n<this.length;n++){var i=this[n],a=i.parents();r=r||a,r=r.intersect(a);}return r.filter(e);},"commonAncestors"),orphans:o(function(e){return this.stdFilter(function(r){return r.isOrphan();}).filter(e);},"orphans"),nonorphans:o(function(e){return this.stdFilter(function(r){return r.isChild();}).filter(e);},"nonorphans"),children:nl(function(t){for(var e=[],r=0;r<this.length;r++)for(var n=this[r],i=n._private.children,a=0;a<i.length;a++)e.push(i[a]);return this.spawn(e,!0).filter(t);},"children"),siblings:o(function(e){return this.parent().children().not(this).filter(e);},"siblings"),isParent:o(function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length!==0;},"isParent"),isChildless:o(function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length===0;},"isChildless"),isChild:o(function(){var e=this[0];if(e)return e.isNode()&&e._private.parent!=null;},"isChild"),isOrphan:o(function(){var e=this[0];if(e)return e.isNode()&&e._private.parent==null;},"isOrphan"),descendants:o(function(e){var r=[];function n(i){for(var a=0;a<i.length;a++){var s=i[a];r.push(s),s.children().nonempty()&&n(s.children());}}return o(n,"add"),n(this.children()),this.spawn(r,!0).filter(e);},"descendants")};o(XB,"forEachCompound");o(Yge,"addChildren");J1.forEachDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return XB(this,t,e,Yge);};o(Xge,"addParent");J1.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return XB(this,t,e,Xge);};o(_Qe,"addParentAndChildren");J1.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return XB(this,t,e,_Qe);};J1.ancestors=J1.parents;s4=jge={data:cn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:cn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:cn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:cn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:cn.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:cn.removeData({field:"rscratch",triggerEvent:!1}),id:o(function(){var e=this[0];if(e)return e._private.data.id;},"id")};s4.attr=s4.data;s4.removeAttr=s4.removeData;DQe=jge,tC={};o(oB,"defineDegreeFunction");ir(tC,{degree:oB(function(t,e){return e.source().same(e.target())?2:1;}),indegree:oB(function(t,e){return e.target().same(t)?1:0;}),outdegree:oB(function(t,e){return e.source().same(t)?1:0;})});o($1,"defineDegreeBoundsFunction");ir(tC,{minDegree:$1("degree",function(t,e){return t<e;}),maxDegree:$1("degree",function(t,e){return t>e;}),minIndegree:$1("indegree",function(t,e){return t<e;}),maxIndegree:$1("indegree",function(t,e){return t>e;}),minOutdegree:$1("outdegree",function(t,e){return t<e;}),maxOutdegree:$1("outdegree",function(t,e){return t>e;})});ir(tC,{totalDegree:o(function(e){for(var r=0,n=this.nodes(),i=0;i<n.length;i++)r+=n[i].degree(e);return r;},"totalDegree")});Qge=o(function(e,r,n){for(var i=0;i<e.length;i++){var a=e[i];if(!a.locked()){var s=a._private.position,l={x:r.x!=null?r.x-s.x:0,y:r.y!=null?r.y-s.y:0};a.isParent()&&!(l.x===0&&l.y===0)&&a.children().shift(l,n),a.dirtyBoundingBoxCache();}}},"beforePositionSet"),pme={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:o(function(e){e.updateCompoundBounds();},"beforeGet"),beforeSet:o(function(e,r){Qge(e,r,!1);},"beforeSet"),onSet:o(function(e){e.dirtyCompoundBoundsCache();},"onSet"),canSet:o(function(e){return!e.locked();},"canSet")};Hl=Kge={position:cn.data(pme),silentPosition:cn.data(ir({},pme,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:o(function(e,r){Qge(e,r,!0);},"beforeSet"),onSet:o(function(e){e.dirtyCompoundBoundsCache();},"onSet")})),positions:o(function(e,r){if(Vr(e))r?this.silentPosition(e):this.position(e);else if(li(e)){var n=e,i=this.cy();i.startBatch();for(var a=0;a<this.length;a++){var s=this[a],l=void 0;(l=n(s,a))&&(r?s.silentPosition(l):s.position(l));}i.endBatch();}return this;},"positions"),silentPositions:o(function(e){return this.positions(e,!0);},"silentPositions"),shift:o(function(e,r,n){var i;if(Vr(e)?(i={x:_t(e.x)?e.x:0,y:_t(e.y)?e.y:0},n=r):Jt(e)&&_t(r)&&(i={x:0,y:0},i[e]=r),i!=null){var a=this.cy();a.startBatch();for(var s=0;s<this.length;s++){var l=this[s];if(!(a.hasCompoundNodes()&&l.isChild()&&l.ancestors().anySame(this))){var u=l.position(),h={x:u.x+i.x,y:u.y+i.y};n?l.silentPosition(h):l.position(h);}}a.endBatch();}return this;},"shift"),silentShift:o(function(e,r){return Vr(e)?this.shift(e,!0):Jt(e)&&_t(r)&&this.shift(e,r,!0),this;},"silentShift"),renderedPosition:o(function(e,r){var n=this[0],i=this.cy(),a=i.zoom(),s=i.pan(),l=Vr(e)?e:void 0,u=l!==void 0||r!==void 0&&Jt(e);if(n&&n.isNode()){if(u)for(var h=0;h<this.length;h++){var f=this[h];r!==void 0?f.position(e,(r-s[e])/a):l!==void 0&&f.position(kge(l,a,s));}else{var d=n.position();return l=K6(d,a,s),e===void 0?l:l[e];}}else if(!u)return;return this;},"renderedPosition"),relativePosition:o(function(e,r){var n=this[0],i=this.cy(),a=Vr(e)?e:void 0,s=a!==void 0||r!==void 0&&Jt(e),l=i.hasCompoundNodes();if(n&&n.isNode()){if(s)for(var u=0;u<this.length;u++){var h=this[u],f=l?h.parent():null,d=f&&f.length>0,p=d;d&&(f=f[0]);var m=p?f.position():{x:0,y:0};r!==void 0?h.position(e,r+m[e]):a!==void 0&&h.position({x:a.x+m.x,y:a.y+m.y});}else{var g=n.position(),y=l?n.parent():null,v=y&&y.length>0,x=v;v&&(y=y[0]);var b=x?y.position():{x:0,y:0};return a={x:g.x-b.x,y:g.y-b.y},e===void 0?a:a[e];}}else if(!s)return;return this;},"relativePosition")};Hl.modelPosition=Hl.point=Hl.position;Hl.modelPositions=Hl.points=Hl.positions;Hl.renderedPoint=Hl.renderedPosition;Hl.relativePoint=Hl.relativePosition;LQe=Kge;j1=$f={};$f.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),n=r.zoom(),i=r.pan(),a=e.x1*n+i.x,s=e.x2*n+i.x,l=e.y1*n+i.y,u=e.y2*n+i.y;return{x1:a,x2:s,y1:l,y2:u,w:s-a,h:u-l};};$f.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var n=r._private;n.compoundBoundsClean=!1,n.bbCache=null,t||r.emitAndNotify("bounds");}}),this);};$f.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(s){if(!s.isParent())return;var l=s._private,u=s.children(),h=s.pstyle("compound-sizing-wrt-labels").value==="include",f={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},d=u.boundingBox({includeLabels:h,includeOverlays:!1,useCache:!1}),p=l.position;(d.w===0||d.h===0)&&(d={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},d.x1=p.x-d.w/2,d.x2=p.x+d.w/2,d.y1=p.y-d.h/2,d.y2=p.y+d.h/2);function m(D,O,R){var k=0,L=0,S=O+R;return D>0&&S>0&&(k=O/S*D,L=R/S*D),{biasDiff:k,biasComplementDiff:L};}o(m,"computeBiasValues");function g(D,O,R,k){if(R.units==="%")switch(k){case"width":return D>0?R.pfValue*D:0;case"height":return O>0?R.pfValue*O:0;case"average":return D>0&&O>0?R.pfValue*(D+O)/2:0;case"min":return D>0&&O>0?D>O?R.pfValue*O:R.pfValue*D:0;case"max":return D>0&&O>0?D>O?R.pfValue*D:R.pfValue*O:0;default:return 0;}else return R.units==="px"?R.pfValue:0;}o(g,"computePaddingValues");var y=f.width.left.value;f.width.left.units==="px"&&f.width.val>0&&(y=y*100/f.width.val);var v=f.width.right.value;f.width.right.units==="px"&&f.width.val>0&&(v=v*100/f.width.val);var x=f.height.top.value;f.height.top.units==="px"&&f.height.val>0&&(x=x*100/f.height.val);var b=f.height.bottom.value;f.height.bottom.units==="px"&&f.height.val>0&&(b=b*100/f.height.val);var T=m(f.width.val-d.w,y,v),C=T.biasDiff,w=T.biasComplementDiff,E=m(f.height.val-d.h,x,b),_=E.biasDiff,A=E.biasComplementDiff;l.autoPadding=g(d.w,d.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),l.autoWidth=Math.max(d.w,f.width.val),p.x=(-C+d.x1+d.x2+w)/2,l.autoHeight=Math.max(d.h,f.height.val),p.y=(-_+d.y1+d.y2+A)/2;}o(r,"update");for(var n=0;n<this.length;n++){var i=this[n],a=i._private;(!a.compoundBoundsClean||t)&&(r(i),e.batching()||(a.compoundBoundsClean=!0));}return this;};rl=o(function(e){return e===1/0||e===-1/0?0:e;},"noninf"),Vl=o(function(e,r,n,i,a){i-r===0||a-n===0||r==null||n==null||i==null||a==null||(e.x1=r<e.x1?r:e.x1,e.x2=i>e.x2?i:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=a>e.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1);},"updateBounds"),Vp=o(function(e,r){return r==null?e:Vl(e,r.x1,r.y1,r.x2,r.y2);},"updateBoundsFromBox"),$b=o(function(e,r,n){return Ul(e,r,n);},"prefixedProperty"),v6=o(function(e,r,n){if(!r.cy().headless()){var i=r._private,a=i.rstyle,s=a.arrowWidth/2,l=r.pstyle(n+"-arrow-shape").value,u,h;if(l!=="none"){n==="source"?(u=a.srcX,h=a.srcY):n==="target"?(u=a.tgtX,h=a.tgtY):(u=a.midX,h=a.midY);var f=i.arrowBounds=i.arrowBounds||{},d=f[n]=f[n]||{};d.x1=u-s,d.y1=h-s,d.x2=u+s,d.y2=h+s,d.w=d.x2-d.x1,d.h=d.y2-d.y1,C6(d,1),Vl(e,d.x1,d.y1,d.x2,d.y2);}}},"updateBoundsFromArrow"),lB=o(function(e,r,n){if(!r.cy().headless()){var i;n?i=n+"-":i="";var a=r._private,s=a.rstyle,l=r.pstyle(i+"label").strValue;if(l){var u=r.pstyle("text-halign"),h=r.pstyle("text-valign"),f=$b(s,"labelWidth",n),d=$b(s,"labelHeight",n),p=$b(s,"labelX",n),m=$b(s,"labelY",n),g=r.pstyle(i+"text-margin-x").pfValue,y=r.pstyle(i+"text-margin-y").pfValue,v=r.isEdge(),x=r.pstyle(i+"text-rotation"),b=r.pstyle("text-outline-width").pfValue,T=r.pstyle("text-border-width").pfValue,C=T/2,w=r.pstyle("text-background-padding").pfValue,E=2,_=d,A=f,D=A/2,O=_/2,R,k,L,S;if(v)R=p-D,k=p+D,L=m-O,S=m+O;else{switch(u.value){case"left":R=p-A,k=p;break;case"center":R=p-D,k=p+D;break;case"right":R=p,k=p+A;break;}switch(h.value){case"top":L=m-_,S=m;break;case"center":L=m-O,S=m+O;break;case"bottom":L=m,S=m+_;break;}}var I=g-Math.max(b,C)-w-E,M=g+Math.max(b,C)+w+E,P=y-Math.max(b,C)-w-E,B=y+Math.max(b,C)+w+E;R+=I,k+=M,L+=P,S+=B;var F=n||"main",z=a.labelBounds,$=z[F]=z[F]||{};$.x1=R,$.y1=L,$.x2=k,$.y2=S,$.w=k-R,$.h=S-L,$.leftPad=I,$.rightPad=M,$.topPad=P,$.botPad=B;var U=v&&x.strValue==="autorotate",K=x.pfValue!=null&&x.pfValue!==0;if(U||K){var ee=U?$b(a.rstyle,"labelAngle",n):x.pfValue,Y=Math.cos(ee),ce=Math.sin(ee),Z=(R+k)/2,ue=(L+S)/2;if(!v){switch(u.value){case"left":Z=k;break;case"right":Z=R;break;}switch(h.value){case"top":ue=S;break;case"bottom":ue=L;break;}}var Q=o(function(se,ae){return se=se-Z,ae=ae-ue,{x:se*Y-ae*ce+Z,y:se*ce+ae*Y+ue};},"rotate"),j=Q(R,L),ne=Q(R,S),te=Q(k,L),he=Q(k,S);R=Math.min(j.x,ne.x,te.x,he.x),k=Math.max(j.x,ne.x,te.x,he.x),L=Math.min(j.y,ne.y,te.y,he.y),S=Math.max(j.y,ne.y,te.y,he.y);}var le=F+"Rot",J=z[le]=z[le]||{};J.x1=R,J.y1=L,J.x2=k,J.y2=S,J.w=k-R,J.h=S-L,Vl(e,R,L,k,S),Vl(a.labelBounds.all,R,L,k,S);}return e;}},"updateBoundsFromLabel"),RQe=o(function(e,r){if(!r.cy().headless()){var n=r.pstyle("outline-opacity").value,i=r.pstyle("outline-width").value;if(n>0&&i>0){var a=r.pstyle("outline-offset").value,s=r.pstyle("shape").value,l=i+a,u=(e.w+l*2)/e.w,h=(e.h+l*2)/e.h,f=0,d=0;["diamond","pentagon","round-triangle"].includes(s)?(u=(e.w+l*2.4)/e.w,d=-l/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?u=(e.w+l*2.4)/e.w:s==="star"?(u=(e.w+l*2.8)/e.w,h=(e.h+l*2.6)/e.h,d=-l/3.8):s==="triangle"?(u=(e.w+l*2.8)/e.w,h=(e.h+l*2.4)/e.h,d=-l/1.4):s==="vee"&&(u=(e.w+l*4.4)/e.w,h=(e.h+l*3.8)/e.h,d=-l*.5);var p=e.h*h-e.h,m=e.w*u-e.w;if(A6(e,[Math.ceil(p/2),Math.ceil(m/2)]),f!=0||d!==0){var g=ZYe(e,f,d);Sge(e,g);}}}},"updateBoundsFromOutline"),NQe=o(function(e,r){var n=e._private.cy,i=n.styleEnabled(),a=n.headless(),s=Ws(),l=e._private,u=e.isNode(),h=e.isEdge(),f,d,p,m,g,y,v=l.rstyle,x=u&&i?e.pstyle("bounds-expansion").pfValue:[0],b=o(function(Se){return Se.pstyle("display").value!=="none";},"isDisplayed"),T=!i||b(e)&&(!h||b(e.source())&&b(e.target()));if(T){var C=0,w=0;i&&r.includeOverlays&&(C=e.pstyle("overlay-opacity").value,C!==0&&(w=e.pstyle("overlay-padding").value));var E=0,_=0;i&&r.includeUnderlays&&(E=e.pstyle("underlay-opacity").value,E!==0&&(_=e.pstyle("underlay-padding").value));var A=Math.max(w,_),D=0,O=0;if(i&&(D=e.pstyle("width").pfValue,O=D/2),u&&r.includeNodes){var R=e.position();g=R.x,y=R.y;var k=e.outerWidth(),L=k/2,S=e.outerHeight(),I=S/2;f=g-L,d=g+L,p=y-I,m=y+I,Vl(s,f,p,d,m),i&&r.includeOutlines&&RQe(s,e);}else if(h&&r.includeEdges)if(i&&!a){var M=e.pstyle("curve-style").strValue;if(f=Math.min(v.srcX,v.midX,v.tgtX),d=Math.max(v.srcX,v.midX,v.tgtX),p=Math.min(v.srcY,v.midY,v.tgtY),m=Math.max(v.srcY,v.midY,v.tgtY),f-=O,d+=O,p-=O,m+=O,Vl(s,f,p,d,m),M==="haystack"){var P=v.haystackPts;if(P&&P.length===2){if(f=P[0].x,p=P[0].y,d=P[1].x,m=P[1].y,f>d){var B=f;f=d,d=B;}if(p>m){var F=p;p=m,m=F;}Vl(s,f-O,p-O,d+O,m+O);}}else if(M==="bezier"||M==="unbundled-bezier"||M.endsWith("segments")||M.endsWith("taxi")){var z;switch(M){case"bezier":case"unbundled-bezier":z=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":z=v.linePts;break;}if(z!=null)for(var $=0;$<z.length;$++){var U=z[$];f=U.x-O,d=U.x+O,p=U.y-O,m=U.y+O,Vl(s,f,p,d,m);}}}else{var K=e.source(),ee=K.position(),Y=e.target(),ce=Y.position();if(f=ee.x,d=ce.x,p=ee.y,m=ce.y,f>d){var Z=f;f=d,d=Z;}if(p>m){var ue=p;p=m,m=ue;}f-=O,d+=O,p-=O,m+=O,Vl(s,f,p,d,m);}if(i&&r.includeEdges&&h&&(v6(s,e,"mid-source"),v6(s,e,"mid-target"),v6(s,e,"source"),v6(s,e,"target")),i){var Q=e.pstyle("ghost").value==="yes";if(Q){var j=e.pstyle("ghost-offset-x").pfValue,ne=e.pstyle("ghost-offset-y").pfValue;Vl(s,s.x1+j,s.y1+ne,s.x2+j,s.y2+ne);}}var te=l.bodyBounds=l.bodyBounds||{};Y0e(te,s),A6(te,x),C6(te,1),i&&(f=s.x1,d=s.x2,p=s.y1,m=s.y2,Vl(s,f-A,p-A,d+A,m+A));var he=l.overlayBounds=l.overlayBounds||{};Y0e(he,s),A6(he,x),C6(he,1);var le=l.labelBounds=l.labelBounds||{};le.all!=null?QYe(le.all):le.all=Ws(),i&&r.includeLabels&&(r.includeMainLabels&&lB(s,e,null),h&&(r.includeSourceLabels&&lB(s,e,"source"),r.includeTargetLabels&&lB(s,e,"target")));}return s.x1=rl(s.x1),s.y1=rl(s.y1),s.x2=rl(s.x2),s.y2=rl(s.y2),s.w=rl(s.x2-s.x1),s.h=rl(s.y2-s.y1),s.w>0&&s.h>0&&T&&(A6(s,x),C6(s,1)),s;},"boundingBoxImpl"),Zge=o(function(e){var r=0,n=o(function(s){return(s?1:0)<<r++;},"tf"),i=0;return i+=n(e.incudeNodes),i+=n(e.includeEdges),i+=n(e.includeLabels),i+=n(e.includeMainLabels),i+=n(e.includeSourceLabels),i+=n(e.includeTargetLabels),i+=n(e.includeOverlays),i+=n(e.includeOutlines),i;},"getKey"),Jge=o(function(e){if(e.isEdge()){var r=e.source().position(),n=e.target().position(),i=o(function(s){return Math.round(s);},"r");return vYe([i(r.x),i(r.y),i(n.x),i(n.y)]);}else return 0;},"getBoundingBoxPosKey"),mme=o(function(e,r){var n=e._private,i,a=e.isEdge(),s=r==null?gme:Zge(r),l=s===gme,u=Jge(e),h=n.bbCachePosKey===u,f=r.useCache&&h,d=o(function(y){return y._private.bbCache==null||y._private.styleDirty;},"isDirty"),p=!f||d(e)||a&&(d(e.source())||d(e.target()));if(p?(h||e.recalculateRenderedStyle(f),i=NQe(e,o4),n.bbCache=i,n.bbCachePosKey=u):i=n.bbCache,!l){var m=e.isNode();i=Ws(),(r.includeNodes&&m||r.includeEdges&&!m)&&(r.includeOverlays?Vp(i,n.overlayBounds):Vp(i,n.bodyBounds)),r.includeLabels&&(r.includeMainLabels&&(!a||r.includeSourceLabels&&r.includeTargetLabels)?Vp(i,n.labelBounds.all):(r.includeMainLabels&&Vp(i,n.labelBounds.mainRot),r.includeSourceLabels&&Vp(i,n.labelBounds.sourceRot),r.includeTargetLabels&&Vp(i,n.labelBounds.targetRot))),i.w=i.x2-i.x1,i.h=i.y2-i.y1;}return i;},"cachedBoundingBoxImpl"),o4={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},gme=Zge(o4),yme=aa(o4);$f.boundingBox=function(t){var e;if(this.length===1&&this[0]._private.bbCache!=null&&!this[0]._private.styleDirty&&(t===void 0||t.useCache===void 0||t.useCache===!0))t===void 0?t=o4:t=yme(t),e=mme(this[0],t);else{e=Ws(),t=t||o4;var r=yme(t),n=this,i=n.cy(),a=i.styleEnabled();if(a)for(var s=0;s<n.length;s++){var l=n[s],u=l._private,h=Jge(l),f=u.bbCachePosKey===h,d=r.useCache&&f&&!u.styleDirty;l.recalculateRenderedStyle(d);}this.updateCompoundBounds(!t.useCache);for(var p=0;p<n.length;p++){var m=n[p];Vp(e,mme(m,r));}}return e.x1=rl(e.x1),e.y1=rl(e.y1),e.x2=rl(e.x2),e.y2=rl(e.y2),e.w=rl(e.x2-e.x1),e.h=rl(e.y2-e.y1),e;};$f.dirtyBoundingBoxCache=function(){for(var t=0;t<this.length;t++){var e=this[t]._private;e.bbCache=null,e.bbCachePosKey=null,e.bodyBounds=null,e.overlayBounds=null,e.labelBounds.all=null,e.labelBounds.source=null,e.labelBounds.target=null,e.labelBounds.main=null,e.labelBounds.sourceRot=null,e.labelBounds.targetRot=null,e.labelBounds.mainRot=null,e.arrowBounds.source=null,e.arrowBounds.target=null,e.arrowBounds["mid-source"]=null,e.arrowBounds["mid-target"]=null;}return this.emitAndNotify("bounds"),this;};$f.boundingBoxAt=function(t){var e=this.nodes(),r=this.cy(),n=r.hasCompoundNodes(),i=r.collection();if(n&&(i=e.filter(function(h){return h.isParent();}),e=e.not(i)),Vr(t)){var a=t;t=o(function(){return a;},"fn");}var s=o(function(f,d){return f._private.bbAtOldPos=t(f,d);},"storeOldPos"),l=o(function(f){return f._private.bbAtOldPos;},"getOldPos");r.startBatch(),e.forEach(s).silentPositions(t),n&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0));var u=KYe(this.boundingBox({useCache:!1}));return e.silentPositions(l),n&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0)),r.endBatch(),u;};j1.boundingbox=j1.bb=j1.boundingBox;j1.renderedBoundingbox=j1.renderedBoundingBox;MQe=$f;Yb=m4={};e1e=o(function(e){e.uppercaseName=z0e(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=z0e(e.outerName),Yb[e.name]=o(function(){var n=this[0],i=n._private,a=i.cy,s=a._private.styleEnabled;if(n)if(s){if(n.isParent())return n.updateCompoundBounds(),i[e.autoName]||0;var l=n.pstyle(e.name);switch(l.strValue){case"label":return n.recalculateRenderedStyle(),i.rstyle[e.labelName]||0;default:return l.pfValue;}}else return 1;},"dimImpl"),Yb["outer"+e.uppercaseName]=o(function(){var n=this[0],i=n._private,a=i.cy,s=a._private.styleEnabled;if(n)if(s){var l=n[e.name](),u=n.pstyle("border-width").pfValue,h=2*n.padding();return l+u+h;}else return 1;},"outerDimImpl"),Yb["rendered"+e.uppercaseName]=o(function(){var n=this[0];if(n){var i=n[e.name]();return i*this.cy().zoom();}},"renderedDimImpl"),Yb["rendered"+e.uppercaseOuterName]=o(function(){var n=this[0];if(n){var i=n[e.outerName]();return i*this.cy().zoom();}},"renderedOuterDimImpl");},"defineDimFns");e1e({name:"width"});e1e({name:"height"});m4.padding=function(){var t=this[0],e=t._private;return t.isParent()?(t.updateCompoundBounds(),e.autoPadding!==void 0?e.autoPadding:t.pstyle("padding").pfValue):t.pstyle("padding").pfValue;};m4.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding();};m4.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding();};IQe=m4,OQe=o(function(e,r){if(e.isEdge())return r(e);},"ifEdge"),PQe=o(function(e,r){if(e.isEdge()){var n=e.cy();return K6(r(e),n.zoom(),n.pan());}},"ifEdgeRenderedPosition"),BQe=o(function(e,r){if(e.isEdge()){var n=e.cy(),i=n.pan(),a=n.zoom();return r(e).map(function(s){return K6(s,a,i);});}},"ifEdgeRenderedPositions"),FQe=o(function(e){return e.renderer().getControlPoints(e);},"controlPoints"),$Qe=o(function(e){return e.renderer().getSegmentPoints(e);},"segmentPoints"),zQe=o(function(e){return e.renderer().getSourceEndpoint(e);},"sourceEndpoint"),GQe=o(function(e){return e.renderer().getTargetEndpoint(e);},"targetEndpoint"),VQe=o(function(e){return e.renderer().getEdgeMidpoint(e);},"midpoint"),vme={controlPoints:{get:FQe,mult:!0},segmentPoints:{get:$Qe,mult:!0},sourceEndpoint:{get:zQe},targetEndpoint:{get:GQe},midpoint:{get:VQe}},UQe=o(function(e){return"rendered"+e[0].toUpperCase()+e.substr(1);},"renderedName"),HQe=Object.keys(vme).reduce(function(t,e){var r=vme[e],n=UQe(e);return t[e]=function(){return OQe(this,r.get);},r.mult?t[n]=function(){return BQe(this,r.get);}:t[n]=function(){return PQe(this,r.get);},t;},{}),WQe=ir({},LQe,MQe,IQe,HQe);t1e=o(function(e,r){this.recycle(e,r);},"Event");o(zb,"returnFalse");o(x6,"returnTrue");t1e.prototype={instanceString:o(function(){return"event";},"instanceString"),recycle:o(function(e,r){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=zb,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?x6:zb):e!=null&&e.type?r=e:this.type=e,r!=null&&(this.originalEvent=r.originalEvent,this.type=r.type!=null?r.type:this.type,this.cy=r.cy,this.target=r.target,this.position=r.position,this.renderedPosition=r.renderedPosition,this.namespace=r.namespace,this.layout=r.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var n=this.position,i=this.cy.zoom(),a=this.cy.pan();this.renderedPosition={x:n.x*i+a.x,y:n.y*i+a.y};}this.timeStamp=e&&e.timeStamp||Date.now();},"recycle"),preventDefault:o(function(){this.isDefaultPrevented=x6;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault();},"preventDefault"),stopPropagation:o(function(){this.isPropagationStopped=x6;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation();},"stopPropagation"),stopImmediatePropagation:o(function(){this.isImmediatePropagationStopped=x6,this.stopPropagation();},"stopImmediatePropagation"),isDefaultPrevented:zb,isPropagationStopped:zb,isImmediatePropagationStopped:zb};r1e=/^([^.]+)(\.(?:[^.]+))?$/,qQe=".*",n1e={qualifierCompare:o(function(e,r){return e===r;},"qualifierCompare"),eventMatches:o(function(){return!0;},"eventMatches"),addEventFields:o(function(){},"addEventFields"),callbackContext:o(function(e){return e;},"callbackContext"),beforeEmit:o(function(){},"beforeEmit"),afterEmit:o(function(){},"afterEmit"),bubble:o(function(){return!1;},"bubble"),parent:o(function(){return null;},"parent"),context:null},xme=Object.keys(n1e),YQe={};o(rC,"Emitter");Pf=rC.prototype,i1e=o(function(e,r,n,i,a,s,l){li(i)&&(a=i,i=null),l&&(s==null?s=l:s=ir({},s,l));for(var u=kn(n)?n:n.split(/\s+/),h=0;h<u.length;h++){var f=u[h];if(!Rf(f)){var d=f.match(r1e);if(d){var p=d[1],m=d[2]?d[2]:null,g=r(e,f,p,m,i,a,s);if(g===!1)break;}}}},"forEachEvent"),bme=o(function(e,r){return e.addEventFields(e.context,r),new t1e(r.type,r);},"makeEventObj"),XQe=o(function(e,r,n){if(mqe(n)){r(e,n);return;}else if(Vr(n)){r(e,bme(e,n));return;}for(var i=kn(n)?n:n.split(/\s+/),a=0;a<i.length;a++){var s=i[a];if(!Rf(s)){var l=s.match(r1e);if(l){var u=l[1],h=l[2]?l[2]:null,f=bme(e,{type:u,namespace:h,target:e.context});r(e,f);}}}},"forEachEventObj");Pf.on=Pf.addListener=function(t,e,r,n,i){return i1e(this,function(a,s,l,u,h,f,d){li(f)&&a.listeners.push({event:s,callback:f,type:l,namespace:u,qualifier:h,conf:d});},t,e,r,n,i),this;};Pf.one=function(t,e,r,n){return this.on(t,e,r,n,{one:!0});};Pf.removeListener=Pf.off=function(t,e,r,n){var i=this;this.emitting!==0&&(this.listeners=kYe(this.listeners));for(var a=this.listeners,s=o(function(h){var f=a[h];i1e(i,function(d,p,m,g,y,v){if((f.type===m||t==="*")&&(!g&&f.namespace!==".*"||f.namespace===g)&&(!y||d.qualifierCompare(f.qualifier,y))&&(!v||f.callback===v))return a.splice(h,1),!1;},t,e,r,n);},"_loop"),l=a.length-1;l>=0;l--)s(l);return this;};Pf.removeAllListeners=function(){return this.removeListener("*");};Pf.emit=Pf.trigger=function(t,e,r){var n=this.listeners,i=n.length;return this.emitting++,kn(e)||(e=[e]),XQe(this,function(a,s){r!=null&&(n=[{event:s.event,type:s.type,namespace:s.namespace,callback:r}],i=n.length);for(var l=o(function(f){var d=n[f];if(d.type===s.type&&(!d.namespace||d.namespace===s.namespace||d.namespace===qQe)&&a.eventMatches(a.context,d,s)){var p=[s];e!=null&&SYe(p,e),a.beforeEmit(a.context,d,s),d.conf&&d.conf.one&&(a.listeners=a.listeners.filter(function(y){return y!==d;}));var m=a.callbackContext(a.context,d,s),g=d.callback.apply(m,p);a.afterEmit(a.context,d,s),g===!1&&(s.stopPropagation(),s.preventDefault());}},"_loop2"),u=0;u<i;u++)l(u);a.bubble(a.context)&&!s.isPropagationStopped()&&a.parent(a.context).emit(s,e);},t),this.emitting--,this;};jQe={qualifierCompare:o(function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r);},"qualifierCompare"),eventMatches:o(function(e,r,n){var i=r.qualifier;return i!=null?e!==n.target&&h4(n.target)&&i.matches(n.target):!0;},"eventMatches"),addEventFields:o(function(e,r){r.cy=e.cy(),r.target=e;},"addEventFields"),callbackContext:o(function(e,r,n){return r.qualifier!=null?n.target:e;},"callbackContext"),beforeEmit:o(function(e,r){r.conf&&r.conf.once&&r.conf.onceCollection.removeListener(r.event,r.qualifier,r.callback);},"beforeEmit"),bubble:o(function(){return!0;},"bubble"),parent:o(function(e){return e.isChild()?e.parent():e.cy();},"parent")},b6=o(function(e){return Jt(e)?new If(e):e;},"argSelector"),a1e={createEmitter:o(function(){for(var e=0;e<this.length;e++){var r=this[e],n=r._private;n.emitter||(n.emitter=new rC(jQe,r));}return this;},"createEmitter"),emitter:o(function(){return this._private.emitter;},"emitter"),on:o(function(e,r,n){for(var i=b6(r),a=0;a<this.length;a++){var s=this[a];s.emitter().on(e,i,n);}return this;},"on"),removeListener:o(function(e,r,n){for(var i=b6(r),a=0;a<this.length;a++){var s=this[a];s.emitter().removeListener(e,i,n);}return this;},"removeListener"),removeAllListeners:o(function(){for(var e=0;e<this.length;e++){var r=this[e];r.emitter().removeAllListeners();}return this;},"removeAllListeners"),one:o(function(e,r,n){for(var i=b6(r),a=0;a<this.length;a++){var s=this[a];s.emitter().one(e,i,n);}return this;},"one"),once:o(function(e,r,n){for(var i=b6(r),a=0;a<this.length;a++){var s=this[a];s.emitter().on(e,i,n,{once:!0,onceCollection:this});}},"once"),emit:o(function(e,r){for(var n=0;n<this.length;n++){var i=this[n];i.emitter().emit(e,r);}return this;},"emit"),emitAndNotify:o(function(e,r){if(this.length!==0)return this.cy().notify(e,this),this.emit(e,r),this;},"emitAndNotify")};cn.eventAliasesOn(a1e);s1e={nodes:o(function(e){return this.filter(function(r){return r.isNode();}).filter(e);},"nodes"),edges:o(function(e){return this.filter(function(r){return r.isEdge();}).filter(e);},"edges"),byGroup:o(function(){for(var e=this.spawn(),r=this.spawn(),n=0;n<this.length;n++){var i=this[n];i.isNode()?e.push(i):r.push(i);}return{nodes:e,edges:r};},"byGroup"),filter:o(function(e,r){if(e===void 0)return this;if(Jt(e)||yo(e))return new If(e).filter(this);if(li(e)){for(var n=this.spawn(),i=this,a=0;a<i.length;a++){var s=i[a],l=r?e.apply(r,[s,a,i]):e(s,a,i);l&&n.push(s);}return n;}return this.spawn();},"filter"),not:o(function(e){if(e){Jt(e)&&(e=this.filter(e));for(var r=this.spawn(),n=0;n<this.length;n++){var i=this[n],a=e.has(i);a||r.push(i);}return r;}else return this;},"not"),absoluteComplement:o(function(){var e=this.cy();return e.mutableElements().not(this);},"absoluteComplement"),intersect:o(function(e){if(Jt(e)){var r=e;return this.filter(r);}for(var n=this.spawn(),i=this,a=e,s=this.length<e.length,l=s?i:a,u=s?a:i,h=0;h<l.length;h++){var f=l[h];u.has(f)&&n.push(f);}return n;},"intersect"),xor:o(function(e){var r=this._private.cy;Jt(e)&&(e=r.$(e));var n=this.spawn(),i=this,a=e,s=o(function(u,h){for(var f=0;f<u.length;f++){var d=u[f],p=d._private.data.id,m=h.hasElementWithId(p);m||n.push(d);}},"add");return s(i,a),s(a,i),n;},"xor"),diff:o(function(e){var r=this._private.cy;Jt(e)&&(e=r.$(e));var n=this.spawn(),i=this.spawn(),a=this.spawn(),s=this,l=e,u=o(function(f,d,p){for(var m=0;m<f.length;m++){var g=f[m],y=g._private.data.id,v=d.hasElementWithId(y);v?a.merge(g):p.push(g);}},"add");return u(s,l,n),u(l,s,i),{left:n,right:i,both:a};},"diff"),add:o(function(e){var r=this._private.cy;if(!e)return this;if(Jt(e)){var n=e;e=r.mutableElements().filter(n);}for(var i=this.spawnSelf(),a=0;a<e.length;a++){var s=e[a],l=!this.has(s);l&&i.push(s);}return i;},"add"),merge:o(function(e){var r=this._private,n=r.cy;if(!e)return this;if(e&&Jt(e)){var i=e;e=n.mutableElements().filter(i);}for(var a=r.map,s=0;s<e.length;s++){var l=e[s],u=l._private.data.id,h=!a.has(u);if(h){var f=this.length++;this[f]=l,a.set(u,{ele:l,index:f});}}return this;},"merge"),unmergeAt:o(function(e){var r=this[e],n=r.id(),i=this._private,a=i.map;this[e]=void 0,a.delete(n);var s=e===this.length-1;if(this.length>1&&!s){var l=this.length-1,u=this[l],h=u._private.data.id;this[l]=void 0,this[e]=u,a.set(h,{ele:u,index:e});}return this.length--,this;},"unmergeAt"),unmergeOne:o(function(e){e=e[0];var r=this._private,n=e._private.data.id,i=r.map,a=i.get(n);if(!a)return this;var s=a.index;return this.unmergeAt(s),this;},"unmergeOne"),unmerge:o(function(e){var r=this._private.cy;if(!e)return this;if(e&&Jt(e)){var n=e;e=r.mutableElements().filter(n);}for(var i=0;i<e.length;i++)this.unmergeOne(e[i]);return this;},"unmerge"),unmergeBy:o(function(e){for(var r=this.length-1;r>=0;r--){var n=this[r];e(n)&&this.unmergeAt(r);}return this;},"unmergeBy"),map:o(function(e,r){for(var n=[],i=this,a=0;a<i.length;a++){var s=i[a],l=r?e.apply(r,[s,a,i]):e(s,a,i);n.push(l);}return n;},"map"),reduce:o(function(e,r){for(var n=r,i=this,a=0;a<i.length;a++)n=e(n,i[a],a,i);return n;},"reduce"),max:o(function(e,r){for(var n=-1/0,i,a=this,s=0;s<a.length;s++){var l=a[s],u=r?e.apply(r,[l,s,a]):e(l,s,a);u>n&&(n=u,i=l);}return{value:n,ele:i};},"max"),min:o(function(e,r){for(var n=1/0,i,a=this,s=0;s<a.length;s++){var l=a[s],u=r?e.apply(r,[l,s,a]):e(l,s,a);u<n&&(n=u,i=l);}return{value:n,ele:i};},"min")},Kr=s1e;Kr.u=Kr["|"]=Kr["+"]=Kr.union=Kr.or=Kr.add;Kr["\\"]=Kr["!"]=Kr["-"]=Kr.difference=Kr.relativeComplement=Kr.subtract=Kr.not;Kr.n=Kr["&"]=Kr["."]=Kr.and=Kr.intersection=Kr.intersect;Kr["^"]=Kr["(+)"]=Kr["(-)"]=Kr.symmetricDifference=Kr.symdiff=Kr.xor;Kr.fnFilter=Kr.filterFn=Kr.stdFilter=Kr.filter;Kr.complement=Kr.abscomp=Kr.absoluteComplement;KQe={isNode:o(function(){return this.group()==="nodes";},"isNode"),isEdge:o(function(){return this.group()==="edges";},"isEdge"),isLoop:o(function(){return this.isEdge()&&this.source()[0]===this.target()[0];},"isLoop"),isSimple:o(function(){return this.isEdge()&&this.source()[0]!==this.target()[0];},"isSimple"),group:o(function(){var e=this[0];if(e)return e._private.group;},"group")},o1e=o(function(e,r){var n=e.cy(),i=n.hasCompoundNodes();function a(f){var d=f.pstyle("z-compound-depth");return d.value==="auto"?i?f.zDepth():0:d.value==="bottom"?-1:d.value==="top"?BB:0;}o(a,"getDepth");var s=a(e)-a(r);if(s!==0)return s;function l(f){var d=f.pstyle("z-index-compare");return d.value==="auto"&&f.isNode()?1:0;}o(l,"getEleDepth");var u=l(e)-l(r);if(u!==0)return u;var h=e.pstyle("z-index").value-r.pstyle("z-index").value;return h!==0?h:e.poolIndex()-r.poolIndex();},"zIndexSort"),G6={forEach:o(function(e,r){if(li(e))for(var n=this.length,i=0;i<n;i++){var a=this[i],s=r?e.apply(r,[a,i,this]):e(a,i,this);if(s===!1)break;}return this;},"forEach"),toArray:o(function(){for(var e=[],r=0;r<this.length;r++)e.push(this[r]);return e;},"toArray"),slice:o(function(e,r){var n=[],i=this.length;r==null&&(r=i),e==null&&(e=0),e<0&&(e=i+e),r<0&&(r=i+r);for(var a=e;a>=0&&a<r&&a<i;a++)n.push(this[a]);return this.spawn(n);},"slice"),size:o(function(){return this.length;},"size"),eq:o(function(e){return this[e]||this.spawn();},"eq"),first:o(function(){return this[0]||this.spawn();},"first"),last:o(function(){return this[this.length-1]||this.spawn();},"last"),empty:o(function(){return this.length===0;},"empty"),nonempty:o(function(){return!this.empty();},"nonempty"),sort:o(function(e){if(!li(e))return this;var r=this.toArray().sort(e);return this.spawn(r);},"sort"),sortByZIndex:o(function(){return this.sort(o1e);},"sortByZIndex"),zDepth:o(function(){var e=this[0];if(e){var r=e._private,n=r.group;if(n==="nodes"){var i=r.data.parent?e.parents().size():0;return e.isParent()?i:BB-1;}else{var a=r.source,s=r.target,l=a.zDepth(),u=s.zDepth();return Math.max(l,u,0);}}},"zDepth")};G6.each=G6.forEach;QQe=o(function(){var e="undefined",r=(typeof Symbol>"u"?"undefined":Hi(Symbol))!=e&&Hi(Symbol.iterator)!=e;r&&(G6[Symbol.iterator]=function(){var n=this,i={value:void 0,done:!1},a=0,s=this.length;return nge({next:o(function(){return a<s?i.value=n[a++]:(i.value=void 0,i.done=!0),i;},"next")},Symbol.iterator,function(){return this;});});},"defineSymbolIterator");QQe();ZQe=aa({nodeDimensionsIncludeLabels:!1}),D6={layoutDimensions:o(function(e){e=ZQe(e);var r;if(!this.takesUpSpace())r={w:0,h:0};else if(e.nodeDimensionsIncludeLabels){var n=this.boundingBox();r={w:n.w,h:n.h};}else r={w:this.outerWidth(),h:this.outerHeight()};return(r.w===0||r.h===0)&&(r.w=r.h=1),r;},"layoutDimensions"),layoutPositions:o(function(e,r,n){var i=this.nodes().filter(function(w){return!w.isParent();}),a=this.cy(),s=r.eles,l=o(function(E){return E.id();},"getMemoizeKey"),u=Jb(n,l);e.emit({type:"layoutstart",layout:e}),e.animations=[];var h=o(function(E,_,A){var D={x:_.x1+_.w/2,y:_.y1+_.h/2},O={x:(A.x-D.x)*E,y:(A.y-D.y)*E};return{x:D.x+O.x,y:D.y+O.y};},"calculateSpacing"),f=r.spacingFactor&&r.spacingFactor!==1,d=o(function(){if(!f)return null;for(var E=Ws(),_=0;_<i.length;_++){var A=i[_],D=u(A,_);JYe(E,D.x,D.y);}return E;},"spacingBb"),p=d(),m=Jb(function(w,E){var _=u(w,E);if(f){var A=Math.abs(r.spacingFactor);_=h(A,p,_);}return r.transform!=null&&(_=r.transform(w,_)),_;},l);if(r.animate){for(var g=0;g<i.length;g++){var y=i[g],v=m(y,g),x=r.animateFilter==null||r.animateFilter(y,g);if(x){var b=y.animation({position:v,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(b);}else y.position(v);}if(r.fit){var T=a.animation({fit:{boundingBox:s.boundingBoxAt(m),padding:r.padding},duration:r.animationDuration,easing:r.animationEasing});e.animations.push(T);}else if(r.zoom!==void 0&&r.pan!==void 0){var C=a.animation({zoom:r.zoom,pan:r.pan,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(C);}e.animations.forEach(function(w){return w.play();}),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),ty.all(e.animations.map(function(w){return w.promise();})).then(function(){e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e});});}else i.positions(m),r.fit&&a.fit(r.eles,r.padding),r.zoom!=null&&a.zoom(r.zoom),r.pan&&a.pan(r.pan),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e});return this;},"layoutPositions"),layout:o(function(e){var r=this.cy();return r.makeLayout(ir({},e,{eles:this}));},"layout")};D6.createLayout=D6.makeLayout=D6.layout;o(l1e,"styleCache");o(nC,"cacheStyleFunction");o(iC,"cachePrototypeStyleFunction");wa={recalculateRenderedStyle:o(function(e){var r=this.cy(),n=r.renderer(),i=r.styleEnabled();return n&&i&&n.recalculateRenderedStyle(this,e),this;},"recalculateRenderedStyle"),dirtyStyleCache:o(function(){var e=this.cy(),r=o(function(a){return a._private.styleCache=null;},"dirty");if(e.hasCompoundNodes()){var n;n=this.spawnSelf().merge(this.descendants()).merge(this.parents()),n.merge(n.connectedEdges()),n.forEach(r);}else this.forEach(function(i){r(i),i.connectedEdges().forEach(r);});return this;},"dirtyStyleCache"),updateStyle:o(function(e){var r=this._private.cy;if(!r.styleEnabled())return this;if(r.batching()){var n=r._private.batchStyleEles;return n.merge(this),this;}var i=r.hasCompoundNodes(),a=this;e=!!(e||e===void 0),i&&(a=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var s=a;return e?s.emitAndNotify("style"):s.emit("style"),a.forEach(function(l){return l._private.styleDirty=!0;}),this;},"updateStyle"),cleanStyle:o(function(){var e=this.cy();if(e.styleEnabled())for(var r=0;r<this.length;r++){var n=this[r];n._private.styleDirty&&(n._private.styleDirty=!1,e.style().apply(n));}},"cleanStyle"),parsedStyle:o(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],i=n.cy();if(i.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,i.style().apply(n));var a=n._private.style[e];return a!==null&&a!==void 0?a:r?i.style().getDefaultProperty(e):null;}},"parsedStyle"),numericStyle:o(function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var n=r.pstyle(e);return n.pfValue!==void 0?n.pfValue:n.value;}},"numericStyle"),numericStyleUnits:o(function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units;},"numericStyleUnits"),renderedStyle:o(function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=this[0];if(n)return r.style().getRenderedStyle(n,e);},"renderedStyle"),style:o(function(e,r){var n=this.cy();if(!n.styleEnabled())return this;var i=!1,a=n.style();if(Vr(e)){var s=e;a.applyBypass(this,s,i),this.emitAndNotify("style");}else if(Jt(e)){if(r===void 0){var l=this[0];return l?a.getStylePropertyValue(l,e):void 0;}else a.applyBypass(this,e,r,i),this.emitAndNotify("style");}else if(e===void 0){var u=this[0];return u?a.getRawStyle(u):void 0;}return this;},"style"),removeStyle:o(function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=!1,i=r.style(),a=this;if(e===void 0)for(var s=0;s<a.length;s++){var l=a[s];i.removeAllBypasses(l,n);}else{e=e.split(/\s+/);for(var u=0;u<a.length;u++){var h=a[u];i.removeBypasses(h,e,n);}}return this.emitAndNotify("style"),this;},"removeStyle"),show:o(function(){return this.css("display","element"),this;},"show"),hide:o(function(){return this.css("display","none"),this;},"hide"),effectiveOpacity:o(function(){var e=this.cy();if(!e.styleEnabled())return 1;var r=e.hasCompoundNodes(),n=this[0];if(n){var i=n._private,a=n.pstyle("opacity").value;if(!r)return a;var s=i.data.parent?n.parents():null;if(s)for(var l=0;l<s.length;l++){var u=s[l],h=u.pstyle("opacity").value;a=h*a;}return a;}},"effectiveOpacity"),transparent:o(function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0],n=r.cy().hasCompoundNodes();if(r)return n?r.effectiveOpacity()===0:r.pstyle("opacity").value===0;},"transparent"),backgrounding:o(function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0];return!!r._private.backgrounding;},"backgrounding")};o(cB,"checkCompound");o(jB,"defineDerivedStateFunction");ay=nC("eleTakesUpSpace",function(t){return t.pstyle("display").value==="element"&&t.width()!==0&&(t.isNode()?t.height()!==0:!0);});wa.takesUpSpace=iC("takesUpSpace",jB({ok:ay}));JQe=nC("eleInteractive",function(t){return t.pstyle("events").value==="yes"&&t.pstyle("visibility").value==="visible"&&ay(t);}),eZe=nC("parentInteractive",function(t){return t.pstyle("visibility").value==="visible"&&ay(t);});wa.interactive=iC("interactive",jB({ok:JQe,parentOk:eZe,edgeOkViaNode:ay}));wa.noninteractive=function(){var t=this[0];if(t)return!t.interactive();};tZe=nC("eleVisible",function(t){return t.pstyle("visibility").value==="visible"&&t.pstyle("opacity").pfValue!==0&&ay(t);}),rZe=ay;wa.visible=iC("visible",jB({ok:tZe,edgeOkViaNode:rZe}));wa.hidden=function(){var t=this[0];if(t)return!t.visible();};wa.isBundledBezier=iC("isBundledBezier",function(){return this.cy().styleEnabled()?!this.removed()&&this.pstyle("curve-style").value==="bezier"&&this.takesUpSpace():!1;});wa.bypass=wa.css=wa.style;wa.renderedCss=wa.renderedStyle;wa.removeBypass=wa.removeCss=wa.removeStyle;wa.pstyle=wa.parsedStyle;Lf={};o(Tme,"defineSwitchFunction");o(sy,"defineSwitchSet");sy({field:"locked",overrideField:o(function(e){return e.cy().autolock()?!0:void 0;},"overrideField"),on:"lock",off:"unlock"});sy({field:"grabbable",overrideField:o(function(e){return e.cy().autoungrabify()||e.pannable()?!1:void 0;},"overrideField"),on:"grabify",off:"ungrabify"});sy({field:"selected",ableField:"selectable",overrideAble:o(function(e){return e.cy().autounselectify()?!1:void 0;},"overrideAble"),on:"select",off:"unselect"});sy({field:"selectable",overrideField:o(function(e){return e.cy().autounselectify()?!1:void 0;},"overrideField"),on:"selectify",off:"unselectify"});Lf.deselect=Lf.unselect;Lf.grabbed=function(){var t=this[0];if(t)return t._private.grabbed;};sy({field:"active",on:"activate",off:"unactivate"});sy({field:"pannable",on:"panify",off:"unpanify"});Lf.inactive=function(){var t=this[0];if(t)return!t._private.active;};za={},wme=o(function(e){return o(function(n){for(var i=this,a=[],s=0;s<i.length;s++){var l=i[s];if(l.isNode()){for(var u=!1,h=l.connectedEdges(),f=0;f<h.length;f++){var d=h[f],p=d.source(),m=d.target();if(e.noIncomingEdges&&m===l&&p!==l||e.noOutgoingEdges&&p===l&&m!==l){u=!0;break;}}u||a.push(l);}}return this.spawn(a,!0).filter(n);},"dagExtremityImpl");},"defineDagExtremity"),kme=o(function(e){return function(r){for(var n=this,i=[],a=0;a<n.length;a++){var s=n[a];if(s.isNode())for(var l=s.connectedEdges(),u=0;u<l.length;u++){var h=l[u],f=h.source(),d=h.target();e.outgoing&&f===s?(i.push(h),i.push(d)):e.incoming&&d===s&&(i.push(h),i.push(f));}}return this.spawn(i,!0).filter(r);};},"defineDagOneHop"),Eme=o(function(e){return function(r){for(var n=this,i=[],a={};;){var s=e.outgoing?n.outgoers():n.incomers();if(s.length===0)break;for(var l=!1,u=0;u<s.length;u++){var h=s[u],f=h.id();a[f]||(a[f]=!0,i.push(h),l=!0);}if(!l)break;n=s;}return this.spawn(i,!0).filter(r);};},"defineDagAllHops");za.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null;};ir(za,{roots:wme({noIncomingEdges:!0}),leaves:wme({noOutgoingEdges:!0}),outgoers:nl(kme({outgoing:!0}),"outgoers"),successors:Eme({outgoing:!0}),incomers:nl(kme({incoming:!0}),"incomers"),predecessors:Eme({incoming:!0})});ir(za,{neighborhood:nl(function(t){for(var e=[],r=this.nodes(),n=0;n<r.length;n++)for(var i=r[n],a=i.connectedEdges(),s=0;s<a.length;s++){var l=a[s],u=l.source(),h=l.target(),f=i===u?h:u;f.length>0&&e.push(f[0]),e.push(l[0]);}return this.spawn(e,!0).filter(t);},"neighborhood"),closedNeighborhood:o(function(e){return this.neighborhood().add(this).filter(e);},"closedNeighborhood"),openNeighborhood:o(function(e){return this.neighborhood(e);},"openNeighborhood")});za.neighbourhood=za.neighborhood;za.closedNeighbourhood=za.closedNeighborhood;za.openNeighbourhood=za.openNeighborhood;ir(za,{source:nl(o(function(e){var r=this[0],n;return r&&(n=r._private.source||r.cy().collection()),n&&e?n.filter(e):n;},"sourceImpl"),"source"),target:nl(o(function(e){var r=this[0],n;return r&&(n=r._private.target||r.cy().collection()),n&&e?n.filter(e):n;},"targetImpl"),"target"),sources:Sme({attr:"source"}),targets:Sme({attr:"target"})});o(Sme,"defineSourceFunction");ir(za,{edgesWith:nl(Cme(),"edgesWith"),edgesTo:nl(Cme({thisIsSrc:!0}),"edgesTo")});o(Cme,"defineEdgesWithFunction");ir(za,{connectedEdges:nl(function(t){for(var e=[],r=this,n=0;n<r.length;n++){var i=r[n];if(i.isNode())for(var a=i._private.edges,s=0;s<a.length;s++){var l=a[s];e.push(l);}}return this.spawn(e,!0).filter(t);},"connectedEdges"),connectedNodes:nl(function(t){for(var e=[],r=this,n=0;n<r.length;n++){var i=r[n];i.isEdge()&&(e.push(i.source()[0]),e.push(i.target()[0]));}return this.spawn(e,!0).filter(t);},"connectedNodes"),parallelEdges:nl(Ame(),"parallelEdges"),codirectedEdges:nl(Ame({codirected:!0}),"codirectedEdges")});o(Ame,"defineParallelEdgesFunction");ir(za,{components:o(function(e){var r=this,n=r.cy(),i=n.collection(),a=e==null?r.nodes():e.nodes(),s=[];e!=null&&a.empty()&&(a=e.sources());var l=o(function(f,d){i.merge(f),a.unmerge(f),d.merge(f);},"visitInComponent");if(a.empty())return r.spawn();var u=o(function(){var f=n.collection();s.push(f);var d=a[0];l(d,f),r.bfs({directed:!1,roots:d,visit:o(function(m){return l(m,f);},"visit")}),f.forEach(function(p){p.connectedEdges().forEach(function(m){r.has(m)&&f.has(m.source())&&f.has(m.target())&&f.merge(m);});});},"_loop");do u();while(a.length>0);return s;},"components"),component:o(function(){var e=this[0];return e.cy().mutableElements().components(e)[0];},"component")});za.componentsOf=za.components;ka=o(function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){oi("A collection must have a reference to the core");return;}var a=new Kc(),s=!1;if(!r)r=[];else if(r.length>0&&Vr(r[0])&&!h4(r[0])){s=!0;for(var l=[],u=new ey(),h=0,f=r.length;h<f;h++){var d=r[h];d.data==null&&(d.data={});var p=d.data;if(p.id==null)p.id=Tge();else if(e.hasElementWithId(p.id)||u.has(p.id))continue;var m=new j6(e,d,!1);l.push(m),u.add(p.id);}r=l;}this.length=0;for(var g=0,y=r.length;g<y;g++){var v=r[g][0];if(v!=null){var x=v._private.data.id;(!n||!a.has(x))&&(n&&a.set(x,{index:this.length,ele:v}),this[this.length]=v,this.length++);}}this._private={eles:this,cy:e,get map(){return this.lazyMap==null&&this.rebuildMap(),this.lazyMap;},set map(b){this.lazyMap=b;},rebuildMap:o(function(){for(var T=this.lazyMap=new Kc(),C=this.eles,w=0;w<C.length;w++){var E=C[w];T.set(E.id(),{index:w,ele:E});}},"rebuildMap")},n&&(this._private.map=a),s&&!i&&this.restore();},"Collection"),Nn=j6.prototype=ka.prototype=Object.create(Array.prototype);Nn.instanceString=function(){return"collection";};Nn.spawn=function(t,e){return new ka(this.cy(),t,e);};Nn.spawnSelf=function(){return this.spawn(this);};Nn.cy=function(){return this._private.cy;};Nn.renderer=function(){return this._private.cy.renderer();};Nn.element=function(){return this[0];};Nn.collection=function(){return sge(this)?this:new ka(this._private.cy,[this]);};Nn.unique=function(){return new ka(this._private.cy,this,!0);};Nn.hasElementWithId=function(t){return t=""+t,this._private.map.has(t);};Nn.getElementById=function(t){t=""+t;var e=this._private.cy,r=this._private.map.get(t);return r?r.ele:new ka(e);};Nn.$id=Nn.getElementById;Nn.poolIndex=function(){var t=this._private.cy,e=t._private.elements,r=this[0]._private.data.id;return e._private.map.get(r).index;};Nn.indexOf=function(t){var e=t[0]._private.data.id;return this._private.map.get(e).index;};Nn.indexOfId=function(t){return t=""+t,this._private.map.get(t).index;};Nn.json=function(t){var e=this.element(),r=this.cy();if(e==null&&t)return this;if(e!=null){var n=e._private;if(Vr(t)){if(r.startBatch(),t.data){e.data(t.data);var i=n.data;if(e.isEdge()){var a=!1,s={},l=t.data.source,u=t.data.target;l!=null&&l!=i.source&&(s.source=""+l,a=!0),u!=null&&u!=i.target&&(s.target=""+u,a=!0),a&&(e=e.move(s));}else{var h="parent"in t.data,f=t.data.parent;h&&(f!=null||i.parent!=null)&&f!=i.parent&&(f===void 0&&(f=null),f!=null&&(f=""+f),e=e.move({parent:f}));}}t.position&&e.position(t.position);var d=o(function(y,v,x){var b=t[y];b!=null&&b!==n[y]&&(b?e[v]():e[x]());},"checkSwitch");return d("removed","remove","restore"),d("selected","select","unselect"),d("selectable","selectify","unselectify"),d("locked","lock","unlock"),d("grabbable","grabify","ungrabify"),d("pannable","panify","unpanify"),t.classes!=null&&e.classes(t.classes),r.endBatch(),this;}else if(t===void 0){var p={data:jc(n.data),position:jc(n.position),group:n.group,removed:n.removed,selected:n.selected,selectable:n.selectable,locked:n.locked,grabbable:n.grabbable,pannable:n.pannable,classes:null};p.classes="";var m=0;return n.classes.forEach(function(g){return p.classes+=m++===0?g:" "+g;}),p;}}};Nn.jsons=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e],n=r.json();t.push(n);}return t;};Nn.clone=function(){for(var t=this.cy(),e=[],r=0;r<this.length;r++){var n=this[r],i=n.json(),a=new j6(t,i,!1);e.push(a);}return new ka(t,e);};Nn.copy=Nn.clone;Nn.restore=function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=r.cy(),i=n._private,a=[],s=[],l,u=0,h=r.length;u<h;u++){var f=r[u];e&&!f.removed()||(f.isNode()?a.push(f):s.push(f));}l=a.concat(s);var d,p=o(function(){l.splice(d,1),d--;},"removeFromElements");for(d=0;d<l.length;d++){var m=l[d],g=m._private,y=g.data;if(m.clearTraversalCache(),!(!e&&!g.removed)){if(y.id===void 0)y.id=Tge();else if(_t(y.id))y.id=""+y.id;else if(Rf(y.id)||!Jt(y.id)){oi("Can not create element with invalid string ID `"+y.id+"`"),p();continue;}else if(n.hasElementWithId(y.id)){oi("Can not create second element with ID `"+y.id+"`"),p();continue;}}var v=y.id;if(m.isNode()){var x=g.position;x.x==null&&(x.x=0),x.y==null&&(x.y=0);}if(m.isEdge()){for(var b=m,T=["source","target"],C=T.length,w=!1,E=0;E<C;E++){var _=T[E],A=y[_];_t(A)&&(A=y[_]=""+y[_]),A==null||A===""?(oi("Can not create edge `"+v+"` with unspecified "+_),w=!0):n.hasElementWithId(A)||(oi("Can not create edge `"+v+"` with nonexistant "+_+" `"+A+"`"),w=!0);}if(w){p();continue;}var D=n.getElementById(y.source),O=n.getElementById(y.target);D.same(O)?D._private.edges.push(b):(D._private.edges.push(b),O._private.edges.push(b)),b._private.source=D,b._private.target=O;}g.map=new Kc(),g.map.set(v,{ele:m,index:0}),g.removed=!1,e&&n.addToPool(m);}for(var R=0;R<a.length;R++){var k=a[R],L=k._private.data;_t(L.parent)&&(L.parent=""+L.parent);var S=L.parent,I=S!=null;if(I||k._private.parent){var M=k._private.parent?n.collection().merge(k._private.parent):n.getElementById(S);if(M.empty())L.parent=void 0;else if(M[0].removed())un("Node added with missing parent, reference to parent removed"),L.parent=void 0,k._private.parent=null;else{for(var P=!1,B=M;!B.empty();){if(k.same(B)){P=!0,L.parent=void 0;break;}B=B.parent();}P||(M[0]._private.children.push(k),k._private.parent=M[0],i.hasCompoundNodes=!0);}}}if(l.length>0){for(var F=l.length===r.length?r:new ka(n,l),z=0;z<F.length;z++){var $=F[z];$.isNode()||($.parallelEdges().clearTraversalCache(),$.source().clearTraversalCache(),$.target().clearTraversalCache());}var U;i.hasCompoundNodes?U=n.collection().merge(F).merge(F.connectedNodes()).merge(F.parent()):U=F,U.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t),t?F.emitAndNotify("add"):e&&F.emit("add");}return r;};Nn.removed=function(){var t=this[0];return t&&t._private.removed;};Nn.inside=function(){var t=this[0];return t&&!t._private.removed;};Nn.remove=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=[],i={},a=r._private.cy;function s(S){for(var I=S._private.edges,M=0;M<I.length;M++)u(I[M]);}o(s,"addConnectedEdges");function l(S){for(var I=S._private.children,M=0;M<I.length;M++)u(I[M]);}o(l,"addChildren");function u(S){var I=i[S.id()];e&&S.removed()||I||(i[S.id()]=!0,S.isNode()?(n.push(S),s(S),l(S)):n.unshift(S));}o(u,"add");for(var h=0,f=r.length;h<f;h++){var d=r[h];u(d);}function p(S,I){var M=S._private.edges;Mf(M,I),S.clearTraversalCache();}o(p,"removeEdgeRef");function m(S){S.clearTraversalCache();}o(m,"removeParallelRef");var g=[];g.ids={};function y(S,I){I=I[0],S=S[0];var M=S._private.children,P=S.id();Mf(M,I),I._private.parent=null,g.ids[P]||(g.ids[P]=!0,g.push(S));}o(y,"removeChildRef"),r.dirtyCompoundBoundsCache(),e&&a.removeFromPool(n);for(var v=0;v<n.length;v++){var x=n[v];if(x.isEdge()){var b=x.source()[0],T=x.target()[0];p(b,x),p(T,x);for(var C=x.parallelEdges(),w=0;w<C.length;w++){var E=C[w];m(E),E.isBundledBezier()&&E.dirtyBoundingBoxCache();}}else{var _=x.parent();_.length!==0&&y(_,x);}e&&(x._private.removed=!0);}var A=a._private.elements;a._private.hasCompoundNodes=!1;for(var D=0;D<A.length;D++){var O=A[D];if(O.isParent()){a._private.hasCompoundNodes=!0;break;}}var R=new ka(this.cy(),n);R.size()>0&&(t?R.emitAndNotify("remove"):e&&R.emit("remove"));for(var k=0;k<g.length;k++){var L=g[k];(!e||!L.removed())&&L.updateStyle();}return R;};Nn.move=function(t){var e=this._private.cy,r=this,n=!1,i=!1,a=o(function(g){return g==null?g:""+g;},"toString");if(t.source!==void 0||t.target!==void 0){var s=a(t.source),l=a(t.target),u=s!=null&&e.hasElementWithId(s),h=l!=null&&e.hasElementWithId(l);(u||h)&&(e.batch(function(){r.remove(n,i),r.emitAndNotify("moveout");for(var m=0;m<r.length;m++){var g=r[m],y=g._private.data;g.isEdge()&&(u&&(y.source=s),h&&(y.target=l));}r.restore(n,i);}),r.emitAndNotify("move"));}else if(t.parent!==void 0){var f=a(t.parent),d=f===null||e.hasElementWithId(f);if(d){var p=f===null?void 0:f;e.batch(function(){var m=r.remove(n,i);m.emitAndNotify("moveout");for(var g=0;g<r.length;g++){var y=r[g],v=y._private.data;y.isNode()&&(v.parent=p);}m.restore(n,i);}),r.emitAndNotify("move");}}return this;};[Ige,dQe,_6,Df,J1,DQe,tC,WQe,a1e,s1e,KQe,G6,D6,wa,Lf,za].forEach(function(t){ir(Nn,t);});nZe={add:o(function(e){var r,n=this;if(yo(e)){var i=e;if(i._private.cy===n)r=i.restore();else{for(var a=[],s=0;s<i.length;s++){var l=i[s];a.push(l.json());}r=new ka(n,a);}}else if(kn(e)){var u=e;r=new ka(n,u);}else if(Vr(e)&&(kn(e.nodes)||kn(e.edges))){for(var h=e,f=[],d=["nodes","edges"],p=0,m=d.length;p<m;p++){var g=d[p],y=h[g];if(kn(y))for(var v=0,x=y.length;v<x;v++){var b=ir({group:g},y[v]);f.push(b);}}r=new ka(n,f);}else{var T=e;r=new j6(n,T).collection();}return r;},"add"),remove:o(function(e){if(!yo(e)){if(Jt(e)){var r=e;e=this.$(r);}}return e.remove();},"remove")};o(iZe,"generateCubicBezier");aZe=function(){function t(n){return-n.tension*n.x-n.friction*n.v;}o(t,"springAccelerationForState");function e(n,i,a){var s={x:n.x+a.dx*i,v:n.v+a.dv*i,tension:n.tension,friction:n.friction};return{dx:s.v,dv:t(s)};}o(e,"springEvaluateStateWithDerivative");function r(n,i){var a={dx:n.v,dv:t(n)},s=e(n,i*.5,a),l=e(n,i*.5,s),u=e(n,i,l),h=1/6*(a.dx+2*(s.dx+l.dx)+u.dx),f=1/6*(a.dv+2*(s.dv+l.dv)+u.dv);return n.x=n.x+h*i,n.v=n.v+f*i,n;}return o(r,"springIntegrateState"),o(function n(i,a,s){var l={x:-1,v:0,tension:null,friction:null},u=[0],h=0,f=1/1e4,d=16/1e3,p,m,g;for(i=parseFloat(i)||500,a=parseFloat(a)||20,s=s||null,l.tension=i,l.friction=a,p=s!==null,p?(h=n(i,a),m=h/s*d):m=d;g=r(g||l,m),u.push(1+g.x),h+=16,Math.abs(g.x)>f&&Math.abs(g.v)>f;);return p?function(y){return u[y*(u.length-1)|0];}:h;},"springRK4Factory");}(),Rn=o(function(e,r,n,i){var a=iZe(e,r,n,i);return function(s,l,u){return s+(l-s)*a(u);};},"cubicBezier"),L6={linear:o(function(e,r,n){return e+(r-e)*n;},"linear"),ease:Rn(.25,.1,.25,1),"ease-in":Rn(.42,0,1,1),"ease-out":Rn(0,0,.58,1),"ease-in-out":Rn(.42,0,.58,1),"ease-in-sine":Rn(.47,0,.745,.715),"ease-out-sine":Rn(.39,.575,.565,1),"ease-in-out-sine":Rn(.445,.05,.55,.95),"ease-in-quad":Rn(.55,.085,.68,.53),"ease-out-quad":Rn(.25,.46,.45,.94),"ease-in-out-quad":Rn(.455,.03,.515,.955),"ease-in-cubic":Rn(.55,.055,.675,.19),"ease-out-cubic":Rn(.215,.61,.355,1),"ease-in-out-cubic":Rn(.645,.045,.355,1),"ease-in-quart":Rn(.895,.03,.685,.22),"ease-out-quart":Rn(.165,.84,.44,1),"ease-in-out-quart":Rn(.77,0,.175,1),"ease-in-quint":Rn(.755,.05,.855,.06),"ease-out-quint":Rn(.23,1,.32,1),"ease-in-out-quint":Rn(.86,0,.07,1),"ease-in-expo":Rn(.95,.05,.795,.035),"ease-out-expo":Rn(.19,1,.22,1),"ease-in-out-expo":Rn(1,0,0,1),"ease-in-circ":Rn(.6,.04,.98,.335),"ease-out-circ":Rn(.075,.82,.165,1),"ease-in-out-circ":Rn(.785,.135,.15,.86),spring:o(function(e,r,n){if(n===0)return L6.linear;var i=aZe(e,r,n);return function(a,s,l){return a+(s-a)*i(l);};},"spring"),"cubic-bezier":Rn};o(_me,"getEasedValue");o(Dme,"getValue");o(z1,"ease");o(sZe,"step$1");o(Gb,"valid");o(oZe,"startAnimation");o(Lme,"stepAll");lZe={animate:cn.animate(),animation:cn.animation(),animated:cn.animated(),clearQueue:cn.clearQueue(),delay:cn.delay(),delayAnimation:cn.delayAnimation(),stop:cn.stop(),addToAnimationPool:o(function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e);},"addToAnimationPool"),stopAnimationLoop:o(function(){this._private.animationsRunning=!1;},"stopAnimationLoop"),startAnimationLoop:o(function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&P6(o(function(a){Lme(a,e),r();},"animationStep"));}o(r,"headlessStep");var n=e.renderer();n&&n.beforeRender?n.beforeRender(o(function(a,s){Lme(s,e);},"rendererAnimationStep"),n.beforeRenderPriorities.animations):r();},"startAnimationLoop")},cZe={qualifierCompare:o(function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r);},"qualifierCompare"),eventMatches:o(function(e,r,n){var i=r.qualifier;return i!=null?e!==n.target&&h4(n.target)&&i.matches(n.target):!0;},"eventMatches"),addEventFields:o(function(e,r){r.cy=e,r.target=e;},"addEventFields"),callbackContext:o(function(e,r,n){return r.qualifier!=null?n.target:e;},"callbackContext")},T6=o(function(e){return Jt(e)?new If(e):e;},"argSelector"),c1e={createEmitter:o(function(){var e=this._private;return e.emitter||(e.emitter=new rC(cZe,this)),this;},"createEmitter"),emitter:o(function(){return this._private.emitter;},"emitter"),on:o(function(e,r,n){return this.emitter().on(e,T6(r),n),this;},"on"),removeListener:o(function(e,r,n){return this.emitter().removeListener(e,T6(r),n),this;},"removeListener"),removeAllListeners:o(function(){return this.emitter().removeAllListeners(),this;},"removeAllListeners"),one:o(function(e,r,n){return this.emitter().one(e,T6(r),n),this;},"one"),once:o(function(e,r,n){return this.emitter().one(e,T6(r),n),this;},"once"),emit:o(function(e,r){return this.emitter().emit(e,r),this;},"emit"),emitAndNotify:o(function(e,r){return this.emit(e),this.notify(e,r),this;},"emitAndNotify")};cn.eventAliasesOn(c1e);EB={png:o(function(e){var r=this._private.renderer;return e=e||{},r.png(e);},"png"),jpg:o(function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e);},"jpg")};EB.jpeg=EB.jpg;R6={layout:o(function(e){var r=this;if(e==null){oi("Layout options must be specified to make a layout");return;}if(e.name==null){oi("A `name` must be specified to make a layout");return;}var n=e.name,i=r.extension("layout",n);if(i==null){oi("No such layout `"+n+"` found.  Did you forget to import it and `cytoscape.use()` it?");return;}var a;Jt(e.eles)?a=r.$(e.eles):a=e.eles!=null?e.eles:r.$();var s=new i(ir({},e,{cy:r,eles:a}));return s;},"layout")};R6.createLayout=R6.makeLayout=R6.layout;uZe={notify:o(function(e,r){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var i=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();r!=null&&i.merge(r);return;}if(n.notificationsEnabled){var a=this.renderer();this.destroyed()||!a||a.notify(e,r);}},"notify"),notifications:o(function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this);},"notifications"),noNotifications:o(function(e){this.notifications(!1),e(),this.notifications(!0);},"noNotifications"),batching:o(function(){return this._private.batchCount>0;},"batching"),startBatch:o(function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this;},"startBatch"),endBatch:o(function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var i=e.batchNotifications[n];i.empty()?r.notify(n):r.notify(n,i);});}return this;},"endBatch"),batch:o(function(e){return this.startBatch(),e(),this.endBatch(),this;},"batch"),batchData:o(function(e){var r=this;return this.batch(function(){for(var n=Object.keys(e),i=0;i<n.length;i++){var a=n[i],s=e[a],l=r.getElementById(a);l.data(s);}});},"batchData")},hZe=aa({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1,webgl:!1,webglDebug:!1,webglDebugShowAtlases:!1,webglTexSize:2048,webglTexRows:12,webglBatchSize:2048,webglTexPerBatch:14,webglBgColor:[255,255,255]}),SB={renderTo:o(function(e,r,n,i){var a=this._private.renderer;return a.renderTo(e,r,n,i),this;},"renderTo"),renderer:o(function(){return this._private.renderer;},"renderer"),forceRender:o(function(){return this.notify("draw"),this;},"forceRender"),resize:o(function(){return this.invalidateSize(),this.emitAndNotify("resize"),this;},"resize"),initRenderer:o(function(e){var r=this,n=r.extension("renderer",e.name);if(n==null){oi("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?"));return;}e.wheelSensitivity!==void 0&&un("You have set a custom wheel sensitivity.  This will make your app zoom unnaturally when using mainstream mice.  You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var i=hZe(e);i.cy=r,r._private.renderer=new n(i),this.notify("init");},"initRenderer"),destroyRenderer:o(function(){var e=this;e.notify("destroy");var r=e.container();if(r)for(r._cyreg=null;r.childNodes.length>0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(n){var i=n._private;i.rscratch={},i.rstyle={},i.animation.current=[],i.animation.queue=[];});},"destroyRenderer"),onRender:o(function(e){return this.on("render",e);},"onRender"),offRender:o(function(e){return this.off("render",e);},"offRender")};SB.invalidateDimensions=SB.resize;N6={collection:o(function(e,r){return Jt(e)?this.$(e):yo(e)?e.collection():kn(e)?(r||(r={}),new ka(this,e,r.unique,r.removed)):new ka(this);},"collection"),nodes:o(function(e){var r=this.$(function(n){return n.isNode();});return e?r.filter(e):r;},"nodes"),edges:o(function(e){var r=this.$(function(n){return n.isEdge();});return e?r.filter(e):r;},"edges"),$:o(function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf();},"$"),mutableElements:o(function(){return this._private.elements;},"mutableElements")};N6.elements=N6.filter=N6.$;Va={},jb="t",fZe="f";Va.apply=function(t){for(var e=this,r=e._private,n=r.cy,i=n.collection(),a=0;a<t.length;a++){var s=t[a],l=e.getContextMeta(s);if(!l.empty){var u=e.getContextStyle(l),h=e.applyContextStyle(l,u,s);s._private.appliedInitStyle?e.updateTransitions(s,h.diffProps):s._private.appliedInitStyle=!0;var f=e.updateStyleHints(s);f&&i.push(s);}}return i;};Va.getPropertiesDiff=function(t,e){var r=this,n=r._private.propDiffs=r._private.propDiffs||{},i=t+"-"+e,a=n[i];if(a)return a;for(var s=[],l={},u=0;u<r.length;u++){var h=r[u],f=t[u]===jb,d=e[u]===jb,p=f!==d,m=h.mappedProperties.length>0;if(p||d&&m){var g=void 0;p&&m||p?g=h.properties:m&&(g=h.mappedProperties);for(var y=0;y<g.length;y++){for(var v=g[y],x=v.name,b=!1,T=u+1;T<r.length;T++){var C=r[T],w=e[T]===jb;if(w&&(b=C.properties[v.name]!=null,b))break;}!l[x]&&!b&&(l[x]=!0,s.push(x));}}}return n[i]=s,s;};Va.getContextMeta=function(t){for(var e=this,r="",n,i=t._private.styleCxtKey||"",a=0;a<e.length;a++){var s=e[a],l=s.selector&&s.selector.matches(t);l?r+=jb:r+=fZe;}return n=e.getPropertiesDiff(i,r),t._private.styleCxtKey=r,{key:r,diffPropNames:n,empty:n.length===0};};Va.getContextStyle=function(t){var e=t.key,r=this,n=this._private.contextStyles=this._private.contextStyles||{};if(n[e])return n[e];for(var i={_private:{key:e}},a=0;a<r.length;a++){var s=r[a],l=e[a]===jb;if(l)for(var u=0;u<s.properties.length;u++){var h=s.properties[u];i[h.name]=h;}}return n[e]=i,i;};Va.applyContextStyle=function(t,e,r){for(var n=this,i=t.diffPropNames,a={},s=n.types,l=0;l<i.length;l++){var u=i[l],h=e[u],f=r.pstyle(u);if(!h)if(f)f.bypass?h={name:u,deleteBypassed:!0}:h={name:u,delete:!0};else continue;if(f!==h){if(h.mapped===s.fn&&f!=null&&f.mapping!=null&&f.mapping.value===h.value){var d=f.mapping,p=d.fnValue=h.value(r);if(p===d.prevFnValue)continue;}var m=a[u]={prev:f};n.applyParsedProperty(r,h),m.next=r.pstyle(u),m.next&&m.next.bypass&&(m.next=m.next.bypassed);}}return{diffProps:a};};Va.updateStyleHints=function(t){var e=t._private,r=this,n=r.propertyGroupNames,i=r.propertyGroupKeys,a=o(function(ne,te,he){return r.getPropertiesHash(ne,te,he);},"propHash"),s=e.styleKey;if(t.removed())return!1;var l=e.group==="nodes",u=t._private.style;n=Object.keys(u);for(var h=0;h<i.length;h++){var f=i[h];e.styleKeys[f]=[U1,Wb];}for(var d=o(function(ne,te){return e.styleKeys[te][0]=e4(ne,e.styleKeys[te][0]);},"updateGrKey1"),p=o(function(ne,te){return e.styleKeys[te][1]=t4(ne,e.styleKeys[te][1]);},"updateGrKey2"),m=o(function(ne,te){d(ne,te),p(ne,te);},"updateGrKey"),g=o(function(ne,te){for(var he=0;he<ne.length;he++){var le=ne.charCodeAt(he);d(le,te),p(le,te);}},"updateGrKeyWStr"),y=2e9,v=o(function(ne){return-128<ne&&ne<128&&Math.floor(ne)!==ne?y-(ne*1024|0):ne;},"cleanNum"),x=0;x<n.length;x++){var b=n[x],T=u[b];if(T!=null){var C=this.properties[b],w=C.type,E=C.groupKey,_=void 0;C.hashOverride!=null?_=C.hashOverride(t,T):T.pfValue!=null&&(_=T.pfValue);var A=C.enums==null?T.value:null,D=_!=null,O=A!=null,R=D||O,k=T.units;if(w.number&&R&&!w.multiple){var L=D?_:A;m(v(L),E),!D&&k!=null&&g(k,E);}else g(T.strValue,E);}}for(var S=[U1,Wb],I=0;I<i.length;I++){var M=i[I],P=e.styleKeys[M];S[0]=e4(P[0],S[0]),S[1]=t4(P[1],S[1]);}e.styleKey=yYe(S[0],S[1]);var B=e.styleKeys;e.labelDimsKey=Sf(B.labelDimensions);var F=a(t,["label"],B.labelDimensions);if(e.labelKey=Sf(F),e.labelStyleKey=Sf(f6(B.commonLabel,F)),!l){var z=a(t,["source-label"],B.labelDimensions);e.sourceLabelKey=Sf(z),e.sourceLabelStyleKey=Sf(f6(B.commonLabel,z));var $=a(t,["target-label"],B.labelDimensions);e.targetLabelKey=Sf($),e.targetLabelStyleKey=Sf(f6(B.commonLabel,$));}if(l){var U=e.styleKeys,K=U.nodeBody,ee=U.nodeBorder,Y=U.nodeOutline,ce=U.backgroundImage,Z=U.compound,ue=U.pie,Q=[K,ee,Y,ce,Z,ue].filter(function(j){return j!=null;}).reduce(f6,[U1,Wb]);e.nodeKey=Sf(Q),e.hasPie=ue!=null&&ue[0]!==U1&&ue[1]!==Wb;}return s!==e.styleKey;};Va.clearStyleHints=function(t){var e=t._private;e.styleCxtKey="",e.styleKeys={},e.styleKey=null,e.labelKey=null,e.labelStyleKey=null,e.sourceLabelKey=null,e.sourceLabelStyleKey=null,e.targetLabelKey=null,e.targetLabelStyleKey=null,e.nodeKey=null,e.hasPie=null;};Va.applyParsedProperty=function(t,e){var r=this,n=e,i=t._private.style,a,s=r.types,l=r.properties[n.name].type,u=n.bypass,h=i[n.name],f=h&&h.bypass,d=t._private,p="mapping",m=o(function(K){return K==null?null:K.pfValue!=null?K.pfValue:K.value;},"getVal"),g=o(function(){var K=m(h),ee=m(n);r.checkTriggers(t,n.name,K,ee);},"checkTriggers");if(e.name==="curve-style"&&t.isEdge()&&(e.value!=="bezier"&&t.isLoop()||e.value==="haystack"&&(t.source().isParent()||t.target().isParent()))&&(n=e=this.parse(e.name,"bezier",u)),n.delete)return i[n.name]=void 0,g(),!0;if(n.deleteBypassed)return h?h.bypass?(h.bypassed=void 0,g(),!0):!1:(g(),!0);if(n.deleteBypass)return h?h.bypass?(i[n.name]=h.bypassed,g(),!0):!1:(g(),!0);var y=o(function(){un("Do not assign mappings to elements without corresponding data (i.e. ele `"+t.id()+"` has no mapping for property `"+n.name+"` with data field `"+n.field+"`); try a `["+n.field+"]` selector to limit scope to elements with `"+n.field+"` defined");},"printMappingErr");switch(n.mapped){case s.mapData:{for(var v=n.field.split("."),x=d.data,b=0;b<v.length&&x;b++){var T=v[b];x=x[T];}if(x==null)return y(),!1;var C;if(_t(x)){var w=n.fieldMax-n.fieldMin;w===0?C=0:C=(x-n.fieldMin)/w;}else return un("Do not use continuous mappers without specifying numeric data (i.e. `"+n.field+": "+x+"` for `"+t.id()+"` is non-numeric)"),!1;if(C<0?C=0:C>1&&(C=1),l.color){var E=n.valueMin[0],_=n.valueMax[0],A=n.valueMin[1],D=n.valueMax[1],O=n.valueMin[2],R=n.valueMax[2],k=n.valueMin[3]==null?1:n.valueMin[3],L=n.valueMax[3]==null?1:n.valueMax[3],S=[Math.round(E+(_-E)*C),Math.round(A+(D-A)*C),Math.round(O+(R-O)*C),Math.round(k+(L-k)*C)];a={bypass:n.bypass,name:n.name,value:S,strValue:"rgb("+S[0]+", "+S[1]+", "+S[2]+")"};}else if(l.number){var I=n.valueMin+(n.valueMax-n.valueMin)*C;a=this.parse(n.name,I,n.bypass,p);}else return!1;if(!a)return y(),!1;a.mapping=n,n=a;break;}case s.data:{for(var M=n.field.split("."),P=d.data,B=0;B<M.length&&P;B++){var F=M[B];P=P[F];}if(P!=null&&(a=this.parse(n.name,P,n.bypass,p)),!a)return y(),!1;a.mapping=n,n=a;break;}case s.fn:{var z=n.value,$=n.fnValue!=null?n.fnValue:z(t);if(n.prevFnValue=$,$==null)return un("Custom function mappers may not return null (i.e. `"+n.name+"` for ele `"+t.id()+"` is null)"),!1;if(a=this.parse(n.name,$,n.bypass,p),!a)return un("Custom function mappers may not return invalid values for the property type (i.e. `"+n.name+"` for ele `"+t.id()+"` is invalid)"),!1;a.mapping=jc(n),n=a;break;}case void 0:break;default:return!1;}return u?(f?n.bypassed=h.bypassed:n.bypassed=h,i[n.name]=n):f?h.bypassed=n:i[n.name]=n,g(),!0;};Va.cleanElements=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(this.clearStyleHints(n),n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),!e)n._private.style={};else for(var i=n._private.style,a=Object.keys(i),s=0;s<a.length;s++){var l=a[s],u=i[l];u!=null&&(u.bypass?u.bypassed=null:i[l]=null);}}};Va.update=function(){var t=this._private.cy,e=t.mutableElements();e.updateStyle();};Va.updateTransitions=function(t,e){var r=this,n=t._private,i=t.pstyle("transition-property").value,a=t.pstyle("transition-duration").pfValue,s=t.pstyle("transition-delay").pfValue;if(i.length>0&&a>0){for(var l={},u=!1,h=0;h<i.length;h++){var f=i[h],d=t.pstyle(f),p=e[f];if(p){var m=p.prev,g=m,y=p.next!=null?p.next:d,v=!1,x=void 0,b=1e-6;g&&(_t(g.pfValue)&&_t(y.pfValue)?(v=y.pfValue-g.pfValue,x=g.pfValue+b*v):_t(g.value)&&_t(y.value)?(v=y.value-g.value,x=g.value+b*v):kn(g.value)&&kn(y.value)&&(v=g.value[0]!==y.value[0]||g.value[1]!==y.value[1]||g.value[2]!==y.value[2],x=g.strValue),v&&(l[f]=y.strValue,this.applyBypass(t,f,x),u=!0));}}if(!u)return;n.transitioning=!0,new ty(function(T){s>0?t.delayAnimation(s).play().promise().then(T):T();}).then(function(){return t.animation({style:l,duration:a,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise();}).then(function(){r.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1;});}else n.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1);};Va.checkTrigger=function(t,e,r,n,i,a){var s=this.properties[e],l=i(s);l!=null&&l(r,n)&&a(s);};Va.checkZOrderTrigger=function(t,e,r,n){var i=this;this.checkTrigger(t,e,r,n,function(a){return a.triggersZOrder;},function(){i._private.cy.notify("zorder",t);});};Va.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(i){return i.triggersBounds;},function(i){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache(),i.triggersBoundsOfParallelBeziers&&e==="curve-style"&&(r==="bezier"||n==="bezier")&&t.parallelEdges().forEach(function(a){a.dirtyBoundingBoxCache();}),i.triggersBoundsOfConnectedEdges&&e==="display"&&(r==="none"||n==="none")&&t.connectedEdges().forEach(function(a){a.dirtyBoundingBoxCache();});});};Va.checkTriggers=function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n);};g4={};g4.applyBypass=function(t,e,r,n){var i=this,a=[],s=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var l=0;l<i.properties.length;l++){var u=i.properties[l],h=u.name,f=this.parse(h,r,!0);f&&a.push(f);}}else if(Jt(e)){var d=this.parse(e,r,!0);d&&a.push(d);}else if(Vr(e)){var p=e;n=r;for(var m=Object.keys(p),g=0;g<m.length;g++){var y=m[g],v=p[y];if(v===void 0&&(v=p[Y6(y)]),v!==void 0){var x=this.parse(y,v,!0);x&&a.push(x);}}}else return!1;if(a.length===0)return!1;for(var b=!1,T=0;T<t.length;T++){for(var C=t[T],w={},E=void 0,_=0;_<a.length;_++){var A=a[_];if(n){var D=C.pstyle(A.name);E=w[A.name]={prev:D};}b=this.applyParsedProperty(C,jc(A))||b,n&&(E.next=C.pstyle(A.name));}b&&this.updateStyleHints(C),n&&this.updateTransitions(C,w,s);}return b;};g4.overrideBypass=function(t,e,r){e=PB(e);for(var n=0;n<t.length;n++){var i=t[n],a=i._private.style[e],s=this.properties[e].type,l=s.color,u=s.mutiple,h=a?a.pfValue!=null?a.pfValue:a.value:null;!a||!a.bypass?this.applyBypass(i,e,r):(a.value=r,a.pfValue!=null&&(a.pfValue=r),l?a.strValue="rgb("+r.join(",")+")":u?a.strValue=r.join(" "):a.strValue=""+r,this.updateStyleHints(i)),this.checkTriggers(i,e,h,r);}};g4.removeAllBypasses=function(t,e){return this.removeBypasses(t,this.propertyNames,e);};g4.removeBypasses=function(t,e,r){for(var n=!0,i=0;i<t.length;i++){for(var a=t[i],s={},l=0;l<e.length;l++){var u=e[l],h=this.properties[u],f=a.pstyle(h.name);if(!(!f||!f.bypass)){var d="",p=this.parse(u,d,!0),m=s[h.name]={prev:f};this.applyParsedProperty(a,p),m.next=a.pstyle(h.name);}}this.updateStyleHints(a),r&&this.updateTransitions(a,s,n);}};KB={};KB.getEmSizeInPixels=function(){var t=this.containerCss("font-size");return t!=null?parseFloat(t):1;};KB.containerCss=function(t){var e=this._private.cy,r=e.container(),n=e.window();if(n&&r&&n.getComputedStyle)return n.getComputedStyle(r).getPropertyValue(t);};Qc={};Qc.getRenderedStyle=function(t,e){return e?this.getStylePropertyValue(t,e,!0):this.getRawStyle(t,!0);};Qc.getRawStyle=function(t,e){var r=this;if(t=t[0],t){for(var n={},i=0;i<r.properties.length;i++){var a=r.properties[i],s=r.getStylePropertyValue(t,a.name,e);s!=null&&(n[a.name]=s,n[Y6(a.name)]=s);}return n;}};Qc.getIndexedStyle=function(t,e,r,n){var i=t.pstyle(e)[r][n];return i!==null&&i!==void 0?i:t.cy().style().getDefaultProperty(e)[r][0];};Qc.getStylePropertyValue=function(t,e,r){var n=this;if(t=t[0],t){var i=n.properties[e];i.alias&&(i=i.pointsTo);var a=i.type,s=t.pstyle(i.name);if(s){var l=s.value,u=s.units,h=s.strValue;if(r&&a.number&&l!=null&&_t(l)){var f=t.cy().zoom(),d=o(function(v){return v*f;},"getRenderedValue"),p=o(function(v,x){return d(v)+x;},"getValueStringWithUnits"),m=kn(l),g=m?u.every(function(y){return y!=null;}):u!=null;return g?m?l.map(function(y,v){return p(y,u[v]);}).join(" "):p(l,u):m?l.map(function(y){return Jt(y)?y:""+d(y);}).join(" "):""+d(l);}else if(h!=null)return h;}return null;}};Qc.getAnimationStartStyle=function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n],a=i.name,s=t.pstyle(a);s!==void 0&&(Vr(s)?s=this.parse(a,s.strValue):s=this.parse(a,s)),s&&(r[a]=s);}return r;};Qc.getPropsList=function(t){var e=this,r=[],n=t,i=e.properties;if(n)for(var a=Object.keys(n),s=0;s<a.length;s++){var l=a[s],u=n[l],h=i[l]||i[PB(l)],f=this.parse(h.name,u);f&&r.push(f);}return r;};Qc.getNonDefaultPropertiesHash=function(t,e,r){var n=r.slice(),i,a,s,l,u,h;for(u=0;u<e.length;u++)if(i=e[u],a=t.pstyle(i,!1),a!=null)if(a.pfValue!=null)n[0]=e4(l,n[0]),n[1]=t4(l,n[1]);else for(s=a.strValue,h=0;h<s.length;h++)l=s.charCodeAt(h),n[0]=e4(l,n[0]),n[1]=t4(l,n[1]);return n;};Qc.getPropertiesHash=Qc.getNonDefaultPropertiesHash;aC={};aC.appendFromJson=function(t){for(var e=this,r=0;r<t.length;r++){var n=t[r],i=n.selector,a=n.style||n.css,s=Object.keys(a);e.selector(i);for(var l=0;l<s.length;l++){var u=s[l],h=a[u];e.css(u,h);}}return e;};aC.fromJson=function(t){var e=this;return e.resetToDefault(),e.appendFromJson(t),e;};aC.json=function(){for(var t=[],e=this.defaultLength;e<this.length;e++){for(var r=this[e],n=r.selector,i=r.properties,a={},s=0;s<i.length;s++){var l=i[s];a[l.name]=l.strValue;}t.push({selector:n?n.toString():"core",style:a});}return t;};QB={};QB.appendFromString=function(t){var e=this,r=this,n=""+t,i,a,s;n=n.replace(/[/][*](\s|.)+?[*][/]/g,"");function l(){n.length>i.length?n=n.substr(i.length):n="";}o(l,"removeSelAndBlockFromRemaining");function u(){a.length>s.length?a=a.substr(s.length):a="";}for(o(u,"removePropAndValFromRem");;){var h=n.match(/^\s*$/);if(h)break;var f=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!f){un("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break;}i=f[0];var d=f[1];if(d!=="core"){var p=new If(d);if(p.invalid){un("Skipping parsing of block: Invalid selector found in string stylesheet: "+d),l();continue;}}var m=f[2],g=!1;a=m;for(var y=[];;){var v=a.match(/^\s*$/);if(v)break;var x=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!x){un("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+m),g=!0;break;}s=x[0];var b=x[1],T=x[2],C=e.properties[b];if(!C){un("Skipping property: Invalid property name in: "+s),u();continue;}var w=r.parse(b,T);if(!w){un("Skipping property: Invalid property definition in: "+s),u();continue;}y.push({name:b,val:T}),u();}if(g){l();break;}r.selector(d);for(var E=0;E<y.length;E++){var _=y[E];r.css(_.name,_.val);}l();}return r;};QB.fromString=function(t){var e=this;return e.resetToDefault(),e.appendFromString(t),e;};Ta={};(function(){var t=Ui,e=Tqe,r=kqe,n=Eqe,i=Sqe,a=o(function(Q){return"^"+Q+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$";},"data"),s=o(function(Q){var j=t+"|\\w+|"+e+"|"+r+"|"+n+"|"+i;return"^"+Q+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+t+")\\s*\\,\\s*("+t+")\\s*,\\s*("+j+")\\s*\\,\\s*("+j+")\\)$";},"mapData"),l=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"];Ta.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:a("data")},layoutData:{mapping:!0,regex:a("layoutData")},scratch:{mapping:!0,regex:a("scratch")},mapData:{mapping:!0,regex:s("mapData")},mapLayoutData:{mapping:!0,regex:s("mapLayoutData")},mapScratch:{mapping:!0,regex:s("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:l,singleRegexMatchValue:!0},urls:{regexes:l,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:o(function(Q,j){switch(Q.length){case 2:return j[0]!=="deg"&&j[0]!=="rad"&&j[1]!=="deg"&&j[1]!=="rad";case 1:return Jt(Q[0])||j[0]==="deg"||j[0]==="rad";default:return!1;}},"validate")},easing:{regexes:["^(spring)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:o(function(Q){var j=Q.length;return j===1||j===2||j===4;},"validate")}};var u={zeroNonZero:o(function(Q,j){return(Q==null||j==null)&&Q!==j||Q==0&&j!=0?!0:Q!=0&&j==0;},"zeroNonZero"),any:o(function(Q,j){return Q!=j;},"any"),emptyNonEmpty:o(function(Q,j){var ne=Rf(Q),te=Rf(j);return ne&&!te||!ne&&te;},"emptyNonEmpty")},h=Ta.types,f=[{name:"label",type:h.text,triggersBounds:u.any,triggersZOrder:u.emptyNonEmpty},{name:"text-rotation",type:h.textRotation,triggersBounds:u.any},{name:"text-margin-x",type:h.bidirectionalSize,triggersBounds:u.any},{name:"text-margin-y",type:h.bidirectionalSize,triggersBounds:u.any}],d=[{name:"source-label",type:h.text,triggersBounds:u.any},{name:"source-text-rotation",type:h.textRotation,triggersBounds:u.any},{name:"source-text-margin-x",type:h.bidirectionalSize,triggersBounds:u.any},{name:"source-text-margin-y",type:h.bidirectionalSize,triggersBounds:u.any},{name:"source-text-offset",type:h.size,triggersBounds:u.any}],p=[{name:"target-label",type:h.text,triggersBounds:u.any},{name:"target-text-rotation",type:h.textRotation,triggersBounds:u.any},{name:"target-text-margin-x",type:h.bidirectionalSize,triggersBounds:u.any},{name:"target-text-margin-y",type:h.bidirectionalSize,triggersBounds:u.any},{name:"target-text-offset",type:h.size,triggersBounds:u.any}],m=[{name:"font-family",type:h.fontFamily,triggersBounds:u.any},{name:"font-style",type:h.fontStyle,triggersBounds:u.any},{name:"font-weight",type:h.fontWeight,triggersBounds:u.any},{name:"font-size",type:h.size,triggersBounds:u.any},{name:"text-transform",type:h.textTransform,triggersBounds:u.any},{name:"text-wrap",type:h.textWrap,triggersBounds:u.any},{name:"text-overflow-wrap",type:h.textOverflowWrap,triggersBounds:u.any},{name:"text-max-width",type:h.size,triggersBounds:u.any},{name:"text-outline-width",type:h.size,triggersBounds:u.any},{name:"line-height",type:h.positiveNumber,triggersBounds:u.any}],g=[{name:"text-valign",type:h.valign,triggersBounds:u.any},{name:"text-halign",type:h.halign,triggersBounds:u.any},{name:"color",type:h.color},{name:"text-outline-color",type:h.color},{name:"text-outline-opacity",type:h.zeroOneNumber},{name:"text-background-color",type:h.color},{name:"text-background-opacity",type:h.zeroOneNumber},{name:"text-background-padding",type:h.size,triggersBounds:u.any},{name:"text-border-opacity",type:h.zeroOneNumber},{name:"text-border-color",type:h.color},{name:"text-border-width",type:h.size,triggersBounds:u.any},{name:"text-border-style",type:h.borderStyle,triggersBounds:u.any},{name:"text-background-shape",type:h.textBackgroundShape,triggersBounds:u.any},{name:"text-justification",type:h.justification}],y=[{name:"events",type:h.bool,triggersZOrder:u.any},{name:"text-events",type:h.bool,triggersZOrder:u.any}],v=[{name:"display",type:h.display,triggersZOrder:u.any,triggersBounds:u.any,triggersBoundsOfConnectedEdges:!0},{name:"visibility",type:h.visibility,triggersZOrder:u.any},{name:"opacity",type:h.zeroOneNumber,triggersZOrder:u.zeroNonZero},{name:"text-opacity",type:h.zeroOneNumber},{name:"min-zoomed-font-size",type:h.size},{name:"z-compound-depth",type:h.zCompoundDepth,triggersZOrder:u.any},{name:"z-index-compare",type:h.zIndexCompare,triggersZOrder:u.any},{name:"z-index",type:h.number,triggersZOrder:u.any}],x=[{name:"overlay-padding",type:h.size,triggersBounds:u.any},{name:"overlay-color",type:h.color},{name:"overlay-opacity",type:h.zeroOneNumber,triggersBounds:u.zeroNonZero},{name:"overlay-shape",type:h.overlayShape,triggersBounds:u.any},{name:"overlay-corner-radius",type:h.cornerRadius}],b=[{name:"underlay-padding",type:h.size,triggersBounds:u.any},{name:"underlay-color",type:h.color},{name:"underlay-opacity",type:h.zeroOneNumber,triggersBounds:u.zeroNonZero},{name:"underlay-shape",type:h.overlayShape,triggersBounds:u.any},{name:"underlay-corner-radius",type:h.cornerRadius}],T=[{name:"transition-property",type:h.propList},{name:"transition-duration",type:h.time},{name:"transition-delay",type:h.time},{name:"transition-timing-function",type:h.easing}],C=o(function(Q,j){return j.value==="label"?-Q.poolIndex():j.pfValue;},"nodeSizeHashOverride"),w=[{name:"height",type:h.nodeSize,triggersBounds:u.any,hashOverride:C},{name:"width",type:h.nodeSize,triggersBounds:u.any,hashOverride:C},{name:"shape",type:h.nodeShape,triggersBounds:u.any},{name:"shape-polygon-points",type:h.polygonPointList,triggersBounds:u.any},{name:"corner-radius",type:h.cornerRadius},{name:"background-color",type:h.color},{name:"background-fill",type:h.fill},{name:"background-opacity",type:h.zeroOneNumber},{name:"background-blacken",type:h.nOneOneNumber},{name:"background-gradient-stop-colors",type:h.colors},{name:"background-gradient-stop-positions",type:h.percentages},{name:"background-gradient-direction",type:h.gradientDirection},{name:"padding",type:h.sizeMaybePercent,triggersBounds:u.any},{name:"padding-relative-to",type:h.paddingRelativeTo,triggersBounds:u.any},{name:"bounds-expansion",type:h.boundsExpansion,triggersBounds:u.any}],E=[{name:"border-color",type:h.color},{name:"border-opacity",type:h.zeroOneNumber},{name:"border-width",type:h.size,triggersBounds:u.any},{name:"border-style",type:h.borderStyle},{name:"border-cap",type:h.lineCap},{name:"border-join",type:h.lineJoin},{name:"border-dash-pattern",type:h.numbers},{name:"border-dash-offset",type:h.number},{name:"border-position",type:h.linePosition}],_=[{name:"outline-color",type:h.color},{name:"outline-opacity",type:h.zeroOneNumber},{name:"outline-width",type:h.size,triggersBounds:u.any},{name:"outline-style",type:h.borderStyle},{name:"outline-offset",type:h.size,triggersBounds:u.any}],A=[{name:"background-image",type:h.urls},{name:"background-image-crossorigin",type:h.bgCrossOrigin},{name:"background-image-opacity",type:h.zeroOneNumbers},{name:"background-image-containment",type:h.bgContainment},{name:"background-image-smoothing",type:h.bools},{name:"background-position-x",type:h.bgPos},{name:"background-position-y",type:h.bgPos},{name:"background-width-relative-to",type:h.bgRelativeTo},{name:"background-height-relative-to",type:h.bgRelativeTo},{name:"background-repeat",type:h.bgRepeat},{name:"background-fit",type:h.bgFit},{name:"background-clip",type:h.bgClip},{name:"background-width",type:h.bgWH},{name:"background-height",type:h.bgWH},{name:"background-offset-x",type:h.bgPos},{name:"background-offset-y",type:h.bgPos}],D=[{name:"position",type:h.position,triggersBounds:u.any},{name:"compound-sizing-wrt-labels",type:h.compoundIncludeLabels,triggersBounds:u.any},{name:"min-width",type:h.size,triggersBounds:u.any},{name:"min-width-bias-left",type:h.sizeMaybePercent,triggersBounds:u.any},{name:"min-width-bias-right",type:h.sizeMaybePercent,triggersBounds:u.any},{name:"min-height",type:h.size,triggersBounds:u.any},{name:"min-height-bias-top",type:h.sizeMaybePercent,triggersBounds:u.any},{name:"min-height-bias-bottom",type:h.sizeMaybePercent,triggersBounds:u.any}],O=[{name:"line-style",type:h.lineStyle},{name:"line-color",type:h.color},{name:"line-fill",type:h.fill},{name:"line-cap",type:h.lineCap},{name:"line-opacity",type:h.zeroOneNumber},{name:"line-dash-pattern",type:h.numbers},{name:"line-dash-offset",type:h.number},{name:"line-outline-width",type:h.size},{name:"line-outline-color",type:h.color},{name:"line-gradient-stop-colors",type:h.colors},{name:"line-gradient-stop-positions",type:h.percentages},{name:"curve-style",type:h.curveStyle,triggersBounds:u.any,triggersBoundsOfParallelBeziers:!0},{name:"haystack-radius",type:h.zeroOneNumber,triggersBounds:u.any},{name:"source-endpoint",type:h.edgeEndpoint,triggersBounds:u.any},{name:"target-endpoint",type:h.edgeEndpoint,triggersBounds:u.any},{name:"control-point-step-size",type:h.size,triggersBounds:u.any},{name:"control-point-distances",type:h.bidirectionalSizes,triggersBounds:u.any},{name:"control-point-weights",type:h.numbers,triggersBounds:u.any},{name:"segment-distances",type:h.bidirectionalSizes,triggersBounds:u.any},{name:"segment-weights",type:h.numbers,triggersBounds:u.any},{name:"segment-radii",type:h.numbers,triggersBounds:u.any},{name:"radius-type",type:h.radiusType,triggersBounds:u.any},{name:"taxi-turn",type:h.bidirectionalSizeMaybePercent,triggersBounds:u.any},{name:"taxi-turn-min-distance",type:h.size,triggersBounds:u.any},{name:"taxi-direction",type:h.axisDirection,triggersBounds:u.any},{name:"taxi-radius",type:h.number,triggersBounds:u.any},{name:"edge-distances",type:h.edgeDistances,triggersBounds:u.any},{name:"arrow-scale",type:h.positiveNumber,triggersBounds:u.any},{name:"loop-direction",type:h.angle,triggersBounds:u.any},{name:"loop-sweep",type:h.angle,triggersBounds:u.any},{name:"source-distance-from-node",type:h.size,triggersBounds:u.any},{name:"target-distance-from-node",type:h.size,triggersBounds:u.any}],R=[{name:"ghost",type:h.bool,triggersBounds:u.any},{name:"ghost-offset-x",type:h.bidirectionalSize,triggersBounds:u.any},{name:"ghost-offset-y",type:h.bidirectionalSize,triggersBounds:u.any},{name:"ghost-opacity",type:h.zeroOneNumber}],k=[{name:"selection-box-color",type:h.color},{name:"selection-box-opacity",type:h.zeroOneNumber},{name:"selection-box-border-color",type:h.color},{name:"selection-box-border-width",type:h.size},{name:"active-bg-color",type:h.color},{name:"active-bg-opacity",type:h.zeroOneNumber},{name:"active-bg-size",type:h.size},{name:"outside-texture-bg-color",type:h.color},{name:"outside-texture-bg-opacity",type:h.zeroOneNumber}],L=[];Ta.pieBackgroundN=16,L.push({name:"pie-size",type:h.sizeMaybePercent});for(var S=1;S<=Ta.pieBackgroundN;S++)L.push({name:"pie-"+S+"-background-color",type:h.color}),L.push({name:"pie-"+S+"-background-size",type:h.percent}),L.push({name:"pie-"+S+"-background-opacity",type:h.zeroOneNumber});var I=[],M=Ta.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:h.arrowShape,triggersBounds:u.any},{name:"arrow-color",type:h.color},{name:"arrow-fill",type:h.arrowFill},{name:"arrow-width",type:h.arrowWidth}].forEach(function(ue){M.forEach(function(Q){var j=Q+"-"+ue.name,ne=ue.type,te=ue.triggersBounds;I.push({name:j,type:ne,triggersBounds:te});});},{});var P=Ta.properties=[].concat(y,T,v,x,b,R,g,m,f,d,p,w,E,_,A,L,D,O,I,k),B=Ta.propertyGroups={behavior:y,transition:T,visibility:v,overlay:x,underlay:b,ghost:R,commonLabel:g,labelDimensions:m,mainLabel:f,sourceLabel:d,targetLabel:p,nodeBody:w,nodeBorder:E,nodeOutline:_,backgroundImage:A,pie:L,compound:D,edgeLine:O,edgeArrow:I,core:k},F=Ta.propertyGroupNames={},z=Ta.propertyGroupKeys=Object.keys(B);z.forEach(function(ue){F[ue]=B[ue].map(function(Q){return Q.name;}),B[ue].forEach(function(Q){return Q.groupKey=ue;});});var $=Ta.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];Ta.propertyNames=P.map(function(ue){return ue.name;});for(var U=0;U<P.length;U++){var K=P[U];P[K.name]=K;}for(var ee=0;ee<$.length;ee++){var Y=$[ee],ce=P[Y.pointsTo],Z={name:Y.name,alias:!0,pointsTo:ce};P.push(Z),P[Y.name]=Z;}})();Ta.getDefaultProperty=function(t){return this.getDefaultProperties()[t];};Ta.getDefaultProperties=function(){var t=this._private;if(t.defaultProperties!=null)return t.defaultProperties;for(var e=ir({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1,   1, -1,   1, 1,   -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(u,h){for(var f=1;f<=Ta.pieBackgroundN;f++){var d=h.name.replace("{{i}}",f),p=h.value;u[d]=p;}return u;},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(u,h){return Ta.arrowPrefixes.forEach(function(f){var d=f+"-"+h.name,p=h.value;u[d]=p;}),u;},{})),r={},n=0;n<this.properties.length;n++){var i=this.properties[n];if(!i.pointsTo){var a=i.name,s=e[a],l=this.parse(a,s);r[a]=l;}}return t.defaultProperties=r,t.defaultProperties;};Ta.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length;};sC={};sC.parse=function(t,e,r,n){var i=this;if(li(e))return i.parseImplWarn(t,e,r,n);var a=n==="mapping"||n===!0||n===!1||n==null?"dontcare":n,s=r?"t":"f",l=""+e,u=vge(t,l,s,a),h=i.propCache=i.propCache||[],f;return(f=h[u])||(f=h[u]=i.parseImplWarn(t,e,r,n)),(r||n==="mapping")&&(f=jc(f),f&&(f.value=jc(f.value))),f;};sC.parseImplWarn=function(t,e,r,n){var i=this.parseImpl(t,e,r,n);return!i&&e!=null&&un("The style property `".concat(t,": ").concat(e,"` is invalid")),i&&(i.name==="width"||i.name==="height")&&e==="label"&&un("The style value of `label` is deprecated for `"+i.name+"`"),i;};sC.parseImpl=function(t,e,r,n){var i=this;t=PB(t);var a=i.properties[t],s=e,l=i.types;if(!a||e===void 0)return null;a.alias&&(a=a.pointsTo,t=a.name);var u=Jt(e);u&&(e=e.trim());var h=a.type;if(!h)return null;if(r&&(e===""||e===null))return{name:t,value:e,bypass:!0,deleteBypass:!0};if(li(e))return{name:t,value:e,strValue:"fn",mapped:l.fn,bypass:r};var f,d;if(!(!u||n||e.length<7||e[1]!=="a")){if(e.length>=7&&e[0]==="d"&&(f=new RegExp(l.data.regex).exec(e))){if(r)return!1;var p=l.data;return{name:t,value:f,strValue:""+e,mapped:p,field:f[1],bypass:r};}else if(e.length>=10&&e[0]==="m"&&(d=new RegExp(l.mapData.regex).exec(e))){if(r||h.multiple)return!1;var m=l.mapData;if(!(h.color||h.number))return!1;var g=this.parse(t,d[4]);if(!g||g.mapped)return!1;var y=this.parse(t,d[5]);if(!y||y.mapped)return!1;if(g.pfValue===y.pfValue||g.strValue===y.strValue)return un("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+g.strValue+"`"),this.parse(t,g.strValue);if(h.color){var v=g.value,x=y.value,b=v[0]===x[0]&&v[1]===x[1]&&v[2]===x[2]&&(v[3]===x[3]||(v[3]==null||v[3]===1)&&(x[3]==null||x[3]===1));if(b)return!1;}return{name:t,value:d,strValue:""+e,mapped:m,field:d[1],fieldMin:parseFloat(d[2]),fieldMax:parseFloat(d[3]),valueMin:g.value,valueMax:y.value,bypass:r};}}if(h.multiple&&n!=="multiple"){var T;if(u?T=e.split(/\s+/):kn(e)?T=e:T=[e],h.evenMultiple&&T.length%2!==0)return null;for(var C=[],w=[],E=[],_="",A=!1,D=0;D<T.length;D++){var O=i.parse(t,T[D],r,"multiple");A=A||Jt(O.value),C.push(O.value),E.push(O.pfValue!=null?O.pfValue:O.value),w.push(O.units),_+=(D>0?" ":"")+O.strValue;}return h.validate&&!h.validate(C,w)?null:h.singleEnum&&A?C.length===1&&Jt(C[0])?{name:t,value:C[0],strValue:C[0],bypass:r}:null:{name:t,value:C,pfValue:E,strValue:_,bypass:r,units:w};}var R=o(function(){for(var Q=0;Q<h.enums.length;Q++){var j=h.enums[Q];if(j===e)return{name:t,value:e,strValue:""+e,bypass:r};}return null;},"checkEnums");if(h.number){var k,L="px";if(h.units&&(k=h.units),h.implicitUnits&&(L=h.implicitUnits),!h.unitless)if(u){var S="px|em"+(h.allowPercent?"|\\%":"");k&&(S=k);var I=e.match("^("+Ui+")("+S+")?$");I&&(e=I[1],k=I[2]||L);}else(!k||h.implicitUnits)&&(k=L);if(e=parseFloat(e),isNaN(e)&&h.enums===void 0)return null;if(isNaN(e)&&h.enums!==void 0)return e=s,R();if(h.integer&&!pqe(e)||h.min!==void 0&&(e<h.min||h.strictMin&&e===h.min)||h.max!==void 0&&(e>h.max||h.strictMax&&e===h.max))return null;var M={name:t,value:e,strValue:""+e+(k||""),units:k,bypass:r};return h.unitless||k!=="px"&&k!=="em"?M.pfValue=e:M.pfValue=k==="px"||!k?e:this.getEmSizeInPixels()*e,(k==="ms"||k==="s")&&(M.pfValue=k==="ms"?e:1e3*e),(k==="deg"||k==="rad")&&(M.pfValue=k==="rad"?e:YYe(e)),k==="%"&&(M.pfValue=e/100),M;}else if(h.propList){var P=[],B=""+e;if(B!=="none"){for(var F=B.split(/\s*,\s*|\s+/),z=0;z<F.length;z++){var $=F[z].trim();i.properties[$]?P.push($):un("`"+$+"` is not a valid property name");}if(P.length===0)return null;}return{name:t,value:P,strValue:P.length===0?"none":P.join(" "),bypass:r};}else if(h.color){var U=uge(e);return U?{name:t,value:U,pfValue:U,strValue:"rgb("+U[0]+","+U[1]+","+U[2]+")",bypass:r}:null;}else if(h.regex||h.regexes){if(h.enums){var K=R();if(K)return K;}for(var ee=h.regexes?h.regexes:[h.regex],Y=0;Y<ee.length;Y++){var ce=new RegExp(ee[Y]),Z=ce.exec(e);if(Z)return{name:t,value:h.singleRegexMatchValue?Z[1]:Z,strValue:""+e,bypass:r};}return null;}else return h.string?{name:t,value:""+e,strValue:""+e,bypass:r}:h.enums?R():null;};$a=o(function t(e){if(!(this instanceof t))return new t(e);if(!OB(e)){oi("A style must have a core reference");return;}this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault();},"Style"),Ga=$a.prototype;Ga.instanceString=function(){return"style";};Ga.clear=function(){for(var t=this._private,e=t.cy,r=e.elements(),n=0;n<this.length;n++)this[n]=void 0;return this.length=0,t.contextStyles={},t.propDiffs={},this.cleanElements(r,!0),r.forEach(function(i){var a=i[0]._private;a.styleDirty=!0,a.appliedInitStyle=!1;}),this;};Ga.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this;};Ga.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t);};Ga.selector=function(t){var e=t==="core"?null:new If(t),r=this.length++;return this[r]={selector:e,properties:[],mappedProperties:[],index:r},this;};Ga.css=function(){var t=this,e=arguments;if(e.length===1)for(var r=e[0],n=0;n<t.properties.length;n++){var i=t.properties[n],a=r[i.name];a===void 0&&(a=r[Y6(i.name)]),a!==void 0&&this.cssRule(i.name,a);}else e.length===2&&this.cssRule(e[0],e[1]);return this;};Ga.style=Ga.css;Ga.cssRule=function(t,e){var r=this.parse(t,e);if(r){var n=this.length-1;this[n].properties.push(r),this[n].properties[r.name]=r,r.name.match(/pie-(\d+)-background-size/)&&r.value&&(this._private.hasPie=!0),r.mapped&&this[n].mappedProperties.push(r);var i=!this[n].selector;i&&(this._private.coreStyle[r.name]=r);}return this;};Ga.append=function(t){return oge(t)?t.appendToStyle(this):kn(t)?this.appendFromJson(t):Jt(t)&&this.appendFromString(t),this;};$a.fromJson=function(t,e){var r=new $a(t);return r.fromJson(e),r;};$a.fromString=function(t,e){return new $a(t).fromString(e);};[Va,g4,KB,Qc,aC,QB,Ta,sC].forEach(function(t){ir(Ga,t);});$a.types=Ga.types;$a.properties=Ga.properties;$a.propertyGroups=Ga.propertyGroups;$a.propertyGroupNames=Ga.propertyGroupNames;$a.propertyGroupKeys=Ga.propertyGroupKeys;dZe={style:o(function(e){if(e){var r=this.setStyle(e);r.update();}return this._private.style;},"style"),setStyle:o(function(e){var r=this._private;return oge(e)?r.style=e.generateStyle(this):kn(e)?r.style=$a.fromJson(this,e):Jt(e)?r.style=$a.fromString(this,e):r.style=$a(this),r.style;},"setStyle"),updateStyle:o(function(){this.mutableElements().updateStyle();},"updateStyle")},pZe="single",Kp={autolock:o(function(e){if(e!==void 0)this._private.autolock=!!e;else return this._private.autolock;return this;},"autolock"),autoungrabify:o(function(e){if(e!==void 0)this._private.autoungrabify=!!e;else return this._private.autoungrabify;return this;},"autoungrabify"),autounselectify:o(function(e){if(e!==void 0)this._private.autounselectify=!!e;else return this._private.autounselectify;return this;},"autounselectify"),selectionType:o(function(e){var r=this._private;if(r.selectionType==null&&(r.selectionType=pZe),e!==void 0)(e==="additive"||e==="single")&&(r.selectionType=e);else return r.selectionType;return this;},"selectionType"),panningEnabled:o(function(e){if(e!==void 0)this._private.panningEnabled=!!e;else return this._private.panningEnabled;return this;},"panningEnabled"),userPanningEnabled:o(function(e){if(e!==void 0)this._private.userPanningEnabled=!!e;else return this._private.userPanningEnabled;return this;},"userPanningEnabled"),zoomingEnabled:o(function(e){if(e!==void 0)this._private.zoomingEnabled=!!e;else return this._private.zoomingEnabled;return this;},"zoomingEnabled"),userZoomingEnabled:o(function(e){if(e!==void 0)this._private.userZoomingEnabled=!!e;else return this._private.userZoomingEnabled;return this;},"userZoomingEnabled"),boxSelectionEnabled:o(function(e){if(e!==void 0)this._private.boxSelectionEnabled=!!e;else return this._private.boxSelectionEnabled;return this;},"boxSelectionEnabled"),pan:o(function(){var e=arguments,r=this._private.pan,n,i,a,s,l;switch(e.length){case 0:return r;case 1:if(Jt(e[0]))return n=e[0],r[n];if(Vr(e[0])){if(!this._private.panningEnabled)return this;a=e[0],s=a.x,l=a.y,_t(s)&&(r.x=s),_t(l)&&(r.y=l),this.emit("pan viewport");}break;case 2:if(!this._private.panningEnabled)return this;n=e[0],i=e[1],(n==="x"||n==="y")&&_t(i)&&(r[n]=i),this.emit("pan viewport");break;}return this.notify("viewport"),this;},"pan"),panBy:o(function(e,r){var n=arguments,i=this._private.pan,a,s,l,u,h;if(!this._private.panningEnabled)return this;switch(n.length){case 1:Vr(e)&&(l=n[0],u=l.x,h=l.y,_t(u)&&(i.x+=u),_t(h)&&(i.y+=h),this.emit("pan viewport"));break;case 2:a=e,s=r,(a==="x"||a==="y")&&_t(s)&&(i[a]+=s),this.emit("pan viewport");break;}return this.notify("viewport"),this;},"panBy"),gc:o(function(){this.notify("gc");},"gc"),fit:o(function(e,r){var n=this.getFitViewport(e,r);if(n){var i=this._private;i.zoom=n.zoom,i.pan=n.pan,this.emit("pan zoom viewport"),this.notify("viewport");}return this;},"fit"),getFitViewport:o(function(e,r){if(_t(e)&&r===void 0&&(r=e,e=void 0),!(!this._private.panningEnabled||!this._private.zoomingEnabled)){var n;if(Jt(e)){var i=e;e=this.$(i);}else if(yqe(e)){var a=e;n={x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},n.w=n.x2-n.x1,n.h=n.y2-n.y1;}else yo(e)||(e=this.mutableElements());if(!(yo(e)&&e.empty())){n=n||e.boundingBox();var s=this.width(),l=this.height(),u;if(r=_t(r)?r:0,!isNaN(s)&&!isNaN(l)&&s>0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){u=Math.min((s-2*r)/n.w,(l-2*r)/n.h),u=u>this._private.maxZoom?this._private.maxZoom:u,u=u<this._private.minZoom?this._private.minZoom:u;var h={x:(s-u*(n.x1+n.x2))/2,y:(l-u*(n.y1+n.y2))/2};return{zoom:u,pan:h};}}}},"getFitViewport"),zoomRange:o(function(e,r){var n=this._private;if(r==null){var i=e;e=i.min,r=i.max;}return _t(e)&&_t(r)&&e<=r?(n.minZoom=e,n.maxZoom=r):_t(e)&&r===void 0&&e<=n.maxZoom?n.minZoom=e:_t(r)&&e===void 0&&r>=n.minZoom&&(n.maxZoom=r),this;},"zoomRange"),minZoom:o(function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e});},"minZoom"),maxZoom:o(function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e});},"maxZoom"),getZoomedViewport:o(function(e){var r=this._private,n=r.pan,i=r.zoom,a,s,l=!1;if(r.zoomingEnabled||(l=!0),_t(e)?s=e:Vr(e)&&(s=e.level,e.position!=null?a=K6(e.position,i,n):e.renderedPosition!=null&&(a=e.renderedPosition),a!=null&&!r.panningEnabled&&(l=!0)),s=s>r.maxZoom?r.maxZoom:s,s=s<r.minZoom?r.minZoom:s,l||!_t(s)||s===i||a!=null&&(!_t(a.x)||!_t(a.y)))return null;if(a!=null){var u=n,h=i,f=s,d={x:-f/h*(a.x-u.x)+a.x,y:-f/h*(a.y-u.y)+a.y};return{zoomed:!0,panned:!0,zoom:f,pan:d};}else return{zoomed:!0,panned:!1,zoom:s,pan:n};},"getZoomedViewport"),zoom:o(function(e){if(e===void 0)return this._private.zoom;var r=this.getZoomedViewport(e),n=this._private;return r==null||!r.zoomed?this:(n.zoom=r.zoom,r.panned&&(n.pan.x=r.pan.x,n.pan.y=r.pan.y),this.emit("zoom"+(r.panned?" pan":"")+" viewport"),this.notify("viewport"),this);},"zoom"),viewport:o(function(e){var r=this._private,n=!0,i=!0,a=[],s=!1,l=!1;if(!e)return this;if(_t(e.zoom)||(n=!1),Vr(e.pan)||(i=!1),!n&&!i)return this;if(n){var u=e.zoom;u<r.minZoom||u>r.maxZoom||!r.zoomingEnabled?s=!0:(r.zoom=u,a.push("zoom"));}if(i&&(!s||!e.cancelOnFailedZoom)&&r.panningEnabled){var h=e.pan;_t(h.x)&&(r.pan.x=h.x,l=!1),_t(h.y)&&(r.pan.y=h.y,l=!1),l||a.push("pan");}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this;},"viewport"),center:o(function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this;},"center"),getCenterPan:o(function(e,r){if(this._private.panningEnabled){if(Jt(e)){var n=e;e=this.mutableElements().filter(n);}else yo(e)||(e=this.mutableElements());if(e.length!==0){var i=e.boundingBox(),a=this.width(),s=this.height();r=r===void 0?this._private.zoom:r;var l={x:(a-r*(i.x1+i.x2))/2,y:(s-r*(i.y1+i.y2))/2};return l;}}},"getCenterPan"),reset:o(function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this);},"reset"),invalidateSize:o(function(){this._private.sizeCache=null;},"invalidateSize"),size:o(function(){var e=this._private,r=e.container,n=this;return e.sizeCache=e.sizeCache||(r?function(){var i=n.window().getComputedStyle(r),a=o(function(l){return parseFloat(i.getPropertyValue(l));},"val");return{width:r.clientWidth-a("padding-left")-a("padding-right"),height:r.clientHeight-a("padding-top")-a("padding-bottom")};}():{width:1,height:1});},"size"),width:o(function(){return this.size().width;},"width"),height:o(function(){return this.size().height;},"height"),extent:o(function(){var e=this._private.pan,r=this._private.zoom,n=this.renderedExtent(),i={x1:(n.x1-e.x)/r,x2:(n.x2-e.x)/r,y1:(n.y1-e.y)/r,y2:(n.y2-e.y)/r};return i.w=i.x2-i.x1,i.h=i.y2-i.y1,i;},"extent"),renderedExtent:o(function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r};},"renderedExtent"),multiClickDebounceTime:o(function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this;},"multiClickDebounceTime")};Kp.centre=Kp.center;Kp.autolockNodes=Kp.autolock;Kp.autoungrabifyNodes=Kp.autoungrabify;l4={data:cn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:cn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:cn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:cn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};l4.attr=l4.data;l4.removeAttr=l4.removeData;c4=o(function(e){var r=this;e=ir({},e);var n=e.container;n&&!O6(n)&&O6(n[0])&&(n=n[0]);var i=n?n._cyreg:null;i=i||{},i&&i.cy&&(i.cy.destroy(),i={});var a=i.readies=i.readies||[];n&&(n._cyreg=i),i.cy=r;var s=Vi!==void 0&&n!==void 0&&!e.headless,l=e;l.layout=ir({name:s?"grid":"null"},l.layout),l.renderer=ir({name:s?"canvas":"null"},l.renderer);var u=o(function(g,y,v){return y!==void 0?y:v!==void 0?v:g;},"defVal"),h=this._private={container:n,ready:!1,options:l,elements:new ka(this),listeners:[],aniEles:new ka(this),data:l.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:u(!0,l.zoomingEnabled),userZoomingEnabled:u(!0,l.userZoomingEnabled),panningEnabled:u(!0,l.panningEnabled),userPanningEnabled:u(!0,l.userPanningEnabled),boxSelectionEnabled:u(!0,l.boxSelectionEnabled),autolock:u(!1,l.autolock,l.autolockNodes),autoungrabify:u(!1,l.autoungrabify,l.autoungrabifyNodes),autounselectify:u(!1,l.autounselectify),styleEnabled:l.styleEnabled===void 0?s:l.styleEnabled,zoom:_t(l.zoom)?l.zoom:1,pan:{x:Vr(l.pan)&&_t(l.pan.x)?l.pan.x:0,y:Vr(l.pan)&&_t(l.pan.y)?l.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:u(250,l.multiClickDebounceTime)};this.createEmitter(),this.selectionType(l.selectionType),this.zoomRange({min:l.minZoom,max:l.maxZoom});var f=o(function(g,y){var v=g.some(vqe);if(v)return ty.all(g).then(y);y(g);},"loadExtData");h.styleEnabled&&r.setStyle([]);var d=ir({},l,l.renderer);r.initRenderer(d);var p=o(function(g,y,v){r.notifications(!1);var x=r.mutableElements();x.length>0&&x.remove(),g!=null&&(Vr(g)||kn(g))&&r.add(g),r.one("layoutready",function(T){r.notifications(!0),r.emit(T),r.one("load",y),r.emitAndNotify("load");}).one("layoutstop",function(){r.one("done",v),r.emit("done");});var b=ir({},r._private.options.layout);b.eles=r.elements(),r.layout(b).run();},"setElesAndLayout");f([l.style,l.elements],function(m){var g=m[0],y=m[1];h.styleEnabled&&r.style().append(g),p(y,function(){r.startAnimationLoop(),h.ready=!0,li(l.ready)&&r.on("ready",l.ready);for(var v=0;v<a.length;v++){var x=a[v];r.on("ready",x);}i&&(i.readies=[]),r.emit("ready");},l.done);});},"Core"),V6=c4.prototype;ir(V6,{instanceString:o(function(){return"core";},"instanceString"),isReady:o(function(){return this._private.ready;},"isReady"),destroyed:o(function(){return this._private.destroyed;},"destroyed"),ready:o(function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this;},"ready"),destroy:o(function(){var e=this;if(!e.destroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.emit("destroy"),e._private.destroyed=!0,e;},"destroy"),hasElementWithId:o(function(e){return this._private.elements.hasElementWithId(e);},"hasElementWithId"),getElementById:o(function(e){return this._private.elements.getElementById(e);},"getElementById"),hasCompoundNodes:o(function(){return this._private.hasCompoundNodes;},"hasCompoundNodes"),headless:o(function(){return this._private.renderer.isHeadless();},"headless"),styleEnabled:o(function(){return this._private.styleEnabled;},"styleEnabled"),addToPool:o(function(e){return this._private.elements.merge(e),this;},"addToPool"),removeFromPool:o(function(e){return this._private.elements.unmerge(e),this;},"removeFromPool"),container:o(function(){return this._private.container||null;},"container"),window:o(function(){var e=this._private.container;if(e==null)return Vi;var r=this._private.container.ownerDocument;return r===void 0||r==null?Vi:r.defaultView||Vi;},"window"),mount:o(function(e){if(e!=null){var r=this,n=r._private,i=n.options;return!O6(e)&&O6(e[0])&&(e=e[0]),r.stopAnimationLoop(),r.destroyRenderer(),n.container=e,n.styleEnabled=!0,r.invalidateSize(),r.initRenderer(ir({},i,i.renderer,{name:i.renderer.name==="null"?"canvas":i.renderer.name})),r.startAnimationLoop(),r.style(i.style),r.emit("mount"),r;}},"mount"),unmount:o(function(){var e=this;return e.stopAnimationLoop(),e.destroyRenderer(),e.initRenderer({name:"null"}),e.emit("unmount"),e;},"unmount"),options:o(function(){return jc(this._private.options);},"options"),json:o(function(e){var r=this,n=r._private,i=r.mutableElements(),a=o(function(C){return r.getElementById(C.id());},"getFreshRef");if(Vr(e)){if(r.startBatch(),e.elements){var s={},l=o(function(C,w){for(var E=[],_=[],A=0;A<C.length;A++){var D=C[A];if(!D.data.id){un("cy.json() cannot handle elements without an ID attribute");continue;}var O=""+D.data.id,R=r.getElementById(O);s[O]=!0,R.length!==0?_.push({ele:R,json:D}):(w&&(D.group=w),E.push(D));}r.add(E);for(var k=0;k<_.length;k++){var L=_[k],S=L.ele,I=L.json;S.json(I);}},"updateEles");if(kn(e.elements))l(e.elements);else for(var u=["nodes","edges"],h=0;h<u.length;h++){var f=u[h],d=e.elements[f];kn(d)&&l(d,f);}var p=r.collection();i.filter(function(T){return!s[T.id()];}).forEach(function(T){T.isParent()?p.merge(T):T.remove();}),p.forEach(function(T){return T.children().move({parent:null});}),p.forEach(function(T){return a(T).remove();});}e.style&&r.style(e.style),e.zoom!=null&&e.zoom!==n.zoom&&r.zoom(e.zoom),e.pan&&(e.pan.x!==n.pan.x||e.pan.y!==n.pan.y)&&r.pan(e.pan),e.data&&r.data(e.data);for(var m=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],g=0;g<m.length;g++){var y=m[g];e[y]!=null&&r[y](e[y]);}return r.endBatch(),this;}else{var v=!!e,x={};v?x.elements=this.elements().map(function(T){return T.json();}):(x.elements={},i.forEach(function(T){var C=T.group();x.elements[C]||(x.elements[C]=[]),x.elements[C].push(T.json());})),this._private.styleEnabled&&(x.style=r.style().json()),x.data=jc(r.data());var b=n.options;return x.zoomingEnabled=n.zoomingEnabled,x.userZoomingEnabled=n.userZoomingEnabled,x.zoom=n.zoom,x.minZoom=n.minZoom,x.maxZoom=n.maxZoom,x.panningEnabled=n.panningEnabled,x.userPanningEnabled=n.userPanningEnabled,x.pan=jc(n.pan),x.boxSelectionEnabled=n.boxSelectionEnabled,x.renderer=jc(b.renderer),x.hideEdgesOnViewport=b.hideEdgesOnViewport,x.textureOnViewport=b.textureOnViewport,x.wheelSensitivity=b.wheelSensitivity,x.motionBlur=b.motionBlur,x.multiClickDebounceTime=b.multiClickDebounceTime,x;}},"json")});V6.$id=V6.getElementById;[nZe,lZe,c1e,EB,R6,uZe,SB,N6,dZe,Kp,l4].forEach(function(t){ir(V6,t);});mZe={fit:!0,directed:!1,padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:o(function(e,r){return!0;},"animateFilter"),ready:void 0,stop:void 0,transform:o(function(e,r){return r;},"transform")},gZe={maximal:!1,acyclic:!1},G1=o(function(e){return e.scratch("breadthfirst");},"getInfo"),Rme=o(function(e,r){return e.scratch("breadthfirst",r);},"setInfo");o(u1e,"BreadthFirstLayout");u1e.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,n=r.nodes().filter(function(ae){return ae.isChildless();}),i=r,a=t.directed,s=t.acyclic||t.maximal||t.maximalAdjustments>0,l=!!t.boundingBox,u=e.extent(),h=Ws(l?t.boundingBox:{x1:u.x1,y1:u.y1,w:u.w,h:u.h}),f;if(yo(t.roots))f=t.roots;else if(kn(t.roots)){for(var d=[],p=0;p<t.roots.length;p++){var m=t.roots[p],g=e.getElementById(m);d.push(g);}f=e.collection(d);}else if(Jt(t.roots))f=e.$(t.roots);else if(a)f=n.roots();else{var y=r.components();f=e.collection();for(var v=o(function(Oe){var ye=y[Oe],Be=ye.maxDegree(!1),He=ye.filter(function(ze){return ze.degree(!1)===Be;});f=f.add(He);},"_loop"),x=0;x<y.length;x++)v(x);}var b=[],T={},C=o(function(Oe,ye){b[ye]==null&&(b[ye]=[]);var Be=b[ye].length;b[ye].push(Oe),Rme(Oe,{index:Be,depth:ye});},"addToDepth"),w=o(function(Oe,ye){var Be=G1(Oe),He=Be.depth,ze=Be.index;b[He][ze]=null,Oe.isChildless()&&C(Oe,ye);},"changeDepth");i.bfs({roots:f,directed:t.directed,visit:o(function(Oe,ye,Be,He,ze){var Le=Oe[0],Ie=Le.id();Le.isChildless()&&C(Le,ze),T[Ie]=!0;},"visit")});for(var E=[],_=0;_<n.length;_++){var A=n[_];T[A.id()]||E.push(A);}var D=o(function(Oe){for(var ye=b[Oe],Be=0;Be<ye.length;Be++){var He=ye[Be];if(He==null){ye.splice(Be,1),Be--;continue;}Rme(He,{depth:Oe,index:Be});}},"assignDepthsAt"),O=o(function(Oe,ye){for(var Be=G1(Oe),He=Oe.incomers().filter(function(ie){return ie.isNode()&&r.has(ie);}),ze=-1,Le=Oe.id(),Ie=0;Ie<He.length;Ie++){var xe=He[Ie],q=G1(xe);ze=Math.max(ze,q.depth);}if(Be.depth<=ze){if(!t.acyclic&&ye[Le])return null;var de=ze+1;return w(Oe,de),ye[Le]=de,!0;}return!1;},"adjustMaximally");if(a&&s){var R=[],k={},L=o(function(Oe){return R.push(Oe);},"enqueue"),S=o(function(){return R.shift();},"dequeue");for(n.forEach(function(ae){return R.push(ae);});R.length>0;){var I=S(),M=O(I,k);if(M)I.outgoers().filter(function(ae){return ae.isNode()&&r.has(ae);}).forEach(L);else if(M===null){un("Detected double maximal shift for node `"+I.id()+"`.  Bailing maximal adjustment due to cycle.  Use `options.maximal: true` only on DAGs.");break;}}}var P=0;if(t.avoidOverlap)for(var B=0;B<n.length;B++){var F=n[B],z=F.layoutDimensions(t),$=z.w,U=z.h;P=Math.max(P,$,U);}var K={},ee=o(function(Oe){if(K[Oe.id()])return K[Oe.id()];for(var ye=G1(Oe).depth,Be=Oe.neighborhood(),He=0,ze=0,Le=0;Le<Be.length;Le++){var Ie=Be[Le];if(!(Ie.isEdge()||Ie.isParent()||!n.has(Ie))){var xe=G1(Ie);if(xe!=null){var q=xe.index,de=xe.depth;if(!(q==null||de==null)){var ie=b[de].length;de<ye&&(He+=q/ie,ze++);}}}}return ze=Math.max(1,ze),He=He/ze,ze===0&&(He=0),K[Oe.id()]=He,He;},"getWeightedPercent"),Y=o(function(Oe,ye){var Be=ee(Oe),He=ee(ye),ze=Be-He;return ze===0?cge(Oe.id(),ye.id()):ze;},"sortFn");t.depthSort!==void 0&&(Y=t.depthSort);for(var ce=b.length,Z=0;Z<ce;Z++)b[Z].sort(Y),D(Z);for(var ue=[],Q=0;Q<E.length;Q++)ue.push(E[Q]);var j=o(function(){for(var Oe=0;Oe<ce;Oe++)D(Oe);},"assignDepths");ue.length&&(b.unshift(ue),ce=b.length,j());for(var ne=0,te=0;te<ce;te++)ne=Math.max(b[te].length,ne);var he={x:h.x1+h.w/2,y:h.y1+h.h/2},le=n.reduce(function(ae,Oe){return function(ye){return{w:ae.w===-1?ye.w:(ae.w+ye.w)/2,h:ae.h===-1?ye.h:(ae.h+ye.h)/2};}(Oe.boundingBox({includeLabels:t.nodeDimensionsIncludeLabels}));},{w:-1,h:-1}),J=Math.max(ce===1?0:l?(h.h-t.padding*2-le.h)/(ce-1):(h.h-t.padding*2-le.h)/(ce+1),P),Se=b.reduce(function(ae,Oe){return Math.max(ae,Oe.length);},0),se=o(function(Oe){var ye=G1(Oe),Be=ye.depth,He=ye.index;if(t.circle){var ze=Math.min(h.w/2/ce,h.h/2/ce);ze=Math.max(ze,P);var Le=ze*Be+ze-(ce>0&&b[0].length<=3?ze/2:0),Ie=2*Math.PI/b[Be].length*He;return Be===0&&b[0].length===1&&(Le=1),{x:he.x+Le*Math.cos(Ie),y:he.y+Le*Math.sin(Ie)};}else{var xe=b[Be].length,q=Math.max(xe===1?0:l?(h.w-t.padding*2-le.w)/((t.grid?Se:xe)-1):(h.w-t.padding*2-le.w)/((t.grid?Se:xe)+1),P),de={x:he.x+(He+1-(xe+1)/2)*q,y:he.y+(Be+1-(ce+1)/2)*J};return de;}},"getPosition");return r.nodes().layoutPositions(this,t,se),this;};yZe={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:o(function(e,r){return!0;},"animateFilter"),ready:void 0,stop:void 0,transform:o(function(e,r){return r;},"transform")};o(h1e,"CircleLayout");h1e.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=n.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));for(var s=Ws(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),l={x:s.x1+s.w/2,y:s.y1+s.h/2},u=e.sweep===void 0?2*Math.PI-2*Math.PI/a.length:e.sweep,h=u/Math.max(1,a.length-1),f,d=0,p=0;p<a.length;p++){var m=a[p],g=m.layoutDimensions(e),y=g.w,v=g.h;d=Math.max(d,y,v);}if(_t(e.radius)?f=e.radius:a.length<=1?f=0:f=Math.min(s.h,s.w)/2-d,a.length>1&&e.avoidOverlap){d*=1.75;var x=Math.cos(h)-Math.cos(0),b=Math.sin(h)-Math.sin(0),T=Math.sqrt(d*d/(x*x+b*b));f=Math.max(T,f);}var C=o(function(E,_){var A=e.startAngle+_*h*(i?1:-1),D=f*Math.cos(A),O=f*Math.sin(A),R={x:l.x+D,y:l.y+O};return R;},"getPos");return n.nodes().layoutPositions(this,e,C),this;};vZe={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:o(function(e){return e.degree();},"concentric"),levelWidth:o(function(e){return e.maxDegree()/4;},"levelWidth"),animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:o(function(e,r){return!0;},"animateFilter"),ready:void 0,stop:void 0,transform:o(function(e,r){return r;},"transform")};o(f1e,"ConcentricLayout");f1e.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,n=t.cy,i=e.eles,a=i.nodes().not(":parent"),s=Ws(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l={x:s.x1+s.w/2,y:s.y1+s.h/2},u=[],h=0,f=0;f<a.length;f++){var d=a[f],p=void 0;p=e.concentric(d),u.push({value:p,node:d}),d._private.scratch.concentric=p;}a.updateStyle();for(var m=0;m<a.length;m++){var g=a[m],y=g.layoutDimensions(e);h=Math.max(h,y.w,y.h);}u.sort(function(le,J){return J.value-le.value;});for(var v=e.levelWidth(a),x=[[]],b=x[0],T=0;T<u.length;T++){var C=u[T];if(b.length>0){var w=Math.abs(b[0].value-C.value);w>=v&&(b=[],x.push(b));}b.push(C);}var E=h+e.minNodeSpacing;if(!e.avoidOverlap){var _=x.length>0&&x[0].length>1,A=Math.min(s.w,s.h)/2-E,D=A/(x.length+_?1:0);E=Math.min(E,D);}for(var O=0,R=0;R<x.length;R++){var k=x[R],L=e.sweep===void 0?2*Math.PI-2*Math.PI/k.length:e.sweep,S=k.dTheta=L/Math.max(1,k.length-1);if(k.length>1&&e.avoidOverlap){var I=Math.cos(S)-Math.cos(0),M=Math.sin(S)-Math.sin(0),P=Math.sqrt(E*E/(I*I+M*M));O=Math.max(P,O);}k.r=O,O+=E;}if(e.equidistant){for(var B=0,F=0,z=0;z<x.length;z++){var $=x[z],U=$.r-F;B=Math.max(B,U);}F=0;for(var K=0;K<x.length;K++){var ee=x[K];K===0&&(F=ee.r),ee.r=F,F+=B;}}for(var Y={},ce=0;ce<x.length;ce++)for(var Z=x[ce],ue=Z.dTheta,Q=Z.r,j=0;j<Z.length;j++){var ne=Z[j],te=e.startAngle+(r?1:-1)*ue*j,he={x:l.x+Q*Math.cos(te),y:l.y+Q*Math.sin(te)};Y[ne.node.id()]=he;}return i.nodes().layoutPositions(this,e,function(le){var J=le.id();return Y[J];}),this;};xZe={ready:o(function(){},"ready"),stop:o(function(){},"stop"),animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:o(function(e,r){return!0;},"animateFilter"),animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:o(function(e){return 2048;},"nodeRepulsion"),nodeOverlap:4,idealEdgeLength:o(function(e){return 32;},"idealEdgeLength"),edgeElasticity:o(function(e){return 32;},"edgeElasticity"),nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};o(oC,"CoseLayout");oC.prototype.run=function(){var t=this.options,e=t.cy,r=this;r.stopped=!1,(t.animate===!0||t.animate===!1)&&r.emit({type:"layoutstart",layout:r}),t.debug===!0?uB=!0:uB=!1;var n=bZe(e,r,t);uB&&kZe(n),t.randomize&&EZe(n);var i=Ju(),a=o(function(){SZe(n,e,t),t.fit===!0&&e.fit(t.padding);},"refresh"),s=o(function(p){return!(r.stopped||p>=t.numIter||(CZe(n,t),n.temperature=n.temperature*t.coolingFactor,n.temperature<t.minTemp));},"mainLoop"),l=o(function(){if(t.animate===!0||t.animate===!1)a(),r.one("layoutstop",t.stop),r.emit({type:"layoutstop",layout:r});else{var p=t.eles.nodes(),m=d1e(n,t,p);p.layoutPositions(r,t,m);}},"done"),u=0,h=!0;if(t.animate===!0){var f=o(function d(){for(var p=0;h&&p<t.refresh;)h=s(u),u++,p++;if(!h)Mme(n,t),l();else{var m=Ju();m-i>=t.animationThreshold&&a(),P6(d);}},"frame");f();}else{for(;h;)h=s(u),u++;Mme(n,t),l();}return this;};oC.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this;};oC.prototype.destroy=function(){return this.thread&&this.thread.stop(),this;};bZe=o(function(e,r,n){for(var i=n.eles.edges(),a=n.eles.nodes(),s=Ws(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),l={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:n.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},u=n.eles.components(),h={},f=0;f<u.length;f++)for(var d=u[f],p=0;p<d.length;p++){var m=d[p];h[m.id()]=f;}for(var f=0;f<l.nodeSize;f++){var g=a[f],y=g.layoutDimensions(n),v={};v.isLocked=g.locked(),v.id=g.data("id"),v.parentId=g.data("parent"),v.cmptId=h[g.id()],v.children=[],v.positionX=g.position("x"),v.positionY=g.position("y"),v.offsetX=0,v.offsetY=0,v.height=y.w,v.width=y.h,v.maxX=v.positionX+v.width/2,v.minX=v.positionX-v.width/2,v.maxY=v.positionY+v.height/2,v.minY=v.positionY-v.height/2,v.padLeft=parseFloat(g.style("padding")),v.padRight=parseFloat(g.style("padding")),v.padTop=parseFloat(g.style("padding")),v.padBottom=parseFloat(g.style("padding")),v.nodeRepulsion=li(n.nodeRepulsion)?n.nodeRepulsion(g):n.nodeRepulsion,l.layoutNodes.push(v),l.idToIndex[v.id]=f;}for(var x=[],b=0,T=-1,C=[],f=0;f<l.nodeSize;f++){var g=l.layoutNodes[f],w=g.parentId;w!=null?l.layoutNodes[l.idToIndex[w]].children.push(g.id):(x[++T]=g.id,C.push(g.id));}for(l.graphSet.push(C);b<=T;){var E=x[b++],_=l.idToIndex[E],m=l.layoutNodes[_],A=m.children;if(A.length>0){l.graphSet.push(A);for(var f=0;f<A.length;f++)x[++T]=A[f];}}for(var f=0;f<l.graphSet.length;f++)for(var D=l.graphSet[f],p=0;p<D.length;p++){var O=l.idToIndex[D[p]];l.indexToGraph[O]=f;}for(var f=0;f<l.edgeSize;f++){var R=i[f],k={};k.id=R.data("id"),k.sourceId=R.data("source"),k.targetId=R.data("target");var L=li(n.idealEdgeLength)?n.idealEdgeLength(R):n.idealEdgeLength,S=li(n.edgeElasticity)?n.edgeElasticity(R):n.edgeElasticity,I=l.idToIndex[k.sourceId],M=l.idToIndex[k.targetId],P=l.indexToGraph[I],B=l.indexToGraph[M];if(P!=B){for(var F=TZe(k.sourceId,k.targetId,l),z=l.graphSet[F],$=0,v=l.layoutNodes[I];z.indexOf(v.id)===-1;)v=l.layoutNodes[l.idToIndex[v.parentId]],$++;for(v=l.layoutNodes[M];z.indexOf(v.id)===-1;)v=l.layoutNodes[l.idToIndex[v.parentId]],$++;L*=$*n.nestingFactor;}k.idealLength=L,k.elasticity=S,l.layoutEdges.push(k);}return l;},"createLayoutInfo"),TZe=o(function(e,r,n){var i=wZe(e,r,0,n);return 2>i.count?0:i.graph;},"findLCA"),wZe=o(function t(e,r,n,i){var a=i.graphSet[n];if(-1<a.indexOf(e)&&-1<a.indexOf(r))return{count:2,graph:n};for(var s=0,l=0;l<a.length;l++){var u=a[l],h=i.idToIndex[u],f=i.layoutNodes[h].children;if(f.length!==0){var d=i.indexToGraph[i.idToIndex[f[0]]],p=t(e,r,d,i);if(p.count!==0)if(p.count===1){if(s++,s===2)break;}else return p;}}return{count:s,graph:n};},"findLCA_aux"),EZe=o(function(e,r){for(var n=e.clientWidth,i=e.clientHeight,a=0;a<e.nodeSize;a++){var s=e.layoutNodes[a];s.children.length===0&&!s.isLocked&&(s.positionX=Math.random()*n,s.positionY=Math.random()*i);}},"randomizePositions"),d1e=o(function(e,r,n){var i=e.boundingBox,a={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return r.boundingBox&&(n.forEach(function(s){var l=e.layoutNodes[e.idToIndex[s.data("id")]];a.x1=Math.min(a.x1,l.positionX),a.x2=Math.max(a.x2,l.positionX),a.y1=Math.min(a.y1,l.positionY),a.y2=Math.max(a.y2,l.positionY);}),a.w=a.x2-a.x1,a.h=a.y2-a.y1),function(s,l){var u=e.layoutNodes[e.idToIndex[s.data("id")]];if(r.boundingBox){var h=(u.positionX-a.x1)/a.w,f=(u.positionY-a.y1)/a.h;return{x:i.x1+h*i.w,y:i.y1+f*i.h};}else return{x:u.positionX,y:u.positionY};};},"getScaleInBoundsFn"),SZe=o(function(e,r,n){var i=n.layout,a=n.eles.nodes(),s=d1e(e,n,a);a.positions(s),e.ready!==!0&&(e.ready=!0,i.one("layoutready",n.ready),i.emit({type:"layoutready",layout:this}));},"refreshPositions"),CZe=o(function(e,r,n){AZe(e,r),LZe(e),RZe(e,r),NZe(e),MZe(e);},"step"),AZe=o(function(e,r){for(var n=0;n<e.graphSet.length;n++)for(var i=e.graphSet[n],a=i.length,s=0;s<a;s++)for(var l=e.layoutNodes[e.idToIndex[i[s]]],u=s+1;u<a;u++){var h=e.layoutNodes[e.idToIndex[i[u]]];_Ze(l,h,e,r);}},"calculateNodeForces"),Nme=o(function(e){return-e+2*e*Math.random();},"randomDistance"),_Ze=o(function(e,r,n,i){var a=e.cmptId,s=r.cmptId;if(!(a!==s&&!n.isCompound)){var l=r.positionX-e.positionX,u=r.positionY-e.positionY,h=1;l===0&&u===0&&(l=Nme(h),u=Nme(h));var f=DZe(e,r,l,u);if(f>0)var d=i.nodeOverlap*f,p=Math.sqrt(l*l+u*u),m=d*l/p,g=d*u/p;else var y=U6(e,l,u),v=U6(r,-1*l,-1*u),x=v.x-y.x,b=v.y-y.y,T=x*x+b*b,p=Math.sqrt(T),d=(e.nodeRepulsion+r.nodeRepulsion)/T,m=d*x/p,g=d*b/p;e.isLocked||(e.offsetX-=m,e.offsetY-=g),r.isLocked||(r.offsetX+=m,r.offsetY+=g);}},"nodeRepulsion"),DZe=o(function(e,r,n,i){if(n>0)var a=e.maxX-r.minX;else var a=r.maxX-e.minX;if(i>0)var s=e.maxY-r.minY;else var s=r.maxY-e.minY;return a>=0&&s>=0?Math.sqrt(a*a+s*s):0;},"nodesOverlap"),U6=o(function(e,r,n){var i=e.positionX,a=e.positionY,s=e.height||1,l=e.width||1,u=n/r,h=s/l,f={};return r===0&&0<n||r===0&&0>n?(f.x=i,f.y=a+s/2,f):0<r&&-1*h<=u&&u<=h?(f.x=i+l/2,f.y=a+l*n/2/r,f):0>r&&-1*h<=u&&u<=h?(f.x=i-l/2,f.y=a-l*n/2/r,f):0<n&&(u<=-1*h||u>=h)?(f.x=i+s*r/2/n,f.y=a+s/2,f):(0>n&&(u<=-1*h||u>=h)&&(f.x=i-s*r/2/n,f.y=a-s/2),f);},"findClippingPoint"),LZe=o(function(e,r){for(var n=0;n<e.edgeSize;n++){var i=e.layoutEdges[n],a=e.idToIndex[i.sourceId],s=e.layoutNodes[a],l=e.idToIndex[i.targetId],u=e.layoutNodes[l],h=u.positionX-s.positionX,f=u.positionY-s.positionY;if(!(h===0&&f===0)){var d=U6(s,h,f),p=U6(u,-1*h,-1*f),m=p.x-d.x,g=p.y-d.y,y=Math.sqrt(m*m+g*g),v=Math.pow(i.idealLength-y,2)/i.elasticity;if(y!==0)var x=v*m/y,b=v*g/y;else var x=0,b=0;s.isLocked||(s.offsetX+=x,s.offsetY+=b),u.isLocked||(u.offsetX-=x,u.offsetY-=b);}}},"calculateEdgeForces"),RZe=o(function(e,r){if(r.gravity!==0)for(var n=1,i=0;i<e.graphSet.length;i++){var a=e.graphSet[i],s=a.length;if(i===0)var l=e.clientHeight/2,u=e.clientWidth/2;else var h=e.layoutNodes[e.idToIndex[a[0]]],f=e.layoutNodes[e.idToIndex[h.parentId]],l=f.positionX,u=f.positionY;for(var d=0;d<s;d++){var p=e.layoutNodes[e.idToIndex[a[d]]];if(!p.isLocked){var m=l-p.positionX,g=u-p.positionY,y=Math.sqrt(m*m+g*g);if(y>n){var v=r.gravity*m/y,x=r.gravity*g/y;p.offsetX+=v,p.offsetY+=x;}}}}},"calculateGravityForces"),NZe=o(function(e,r){var n=[],i=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;i<=a;){var s=n[i++],l=e.idToIndex[s],u=e.layoutNodes[l],h=u.children;if(0<h.length&&!u.isLocked){for(var f=u.offsetX,d=u.offsetY,p=0;p<h.length;p++){var m=e.layoutNodes[e.idToIndex[h[p]]];m.offsetX+=f,m.offsetY+=d,n[++a]=h[p];}u.offsetX=0,u.offsetY=0;}}},"propagateForces"),MZe=o(function(e,r){for(var n=0;n<e.nodeSize;n++){var i=e.layoutNodes[n];0<i.children.length&&(i.maxX=void 0,i.minX=void 0,i.maxY=void 0,i.minY=void 0);}for(var n=0;n<e.nodeSize;n++){var i=e.layoutNodes[n];if(!(0<i.children.length||i.isLocked)){var a=IZe(i.offsetX,i.offsetY,e.temperature);i.positionX+=a.x,i.positionY+=a.y,i.offsetX=0,i.offsetY=0,i.minX=i.positionX-i.width,i.maxX=i.positionX+i.width,i.minY=i.positionY-i.height,i.maxY=i.positionY+i.height,OZe(i,e);}}for(var n=0;n<e.nodeSize;n++){var i=e.layoutNodes[n];0<i.children.length&&!i.isLocked&&(i.positionX=(i.maxX+i.minX)/2,i.positionY=(i.maxY+i.minY)/2,i.width=i.maxX-i.minX,i.height=i.maxY-i.minY);}},"updatePositions"),IZe=o(function(e,r,n){var i=Math.sqrt(e*e+r*r);if(i>n)var a={x:n*e/i,y:n*r/i};else var a={x:e,y:r};return a;},"limitForce"),OZe=o(function t(e,r){var n=e.parentId;if(n!=null){var i=r.layoutNodes[r.idToIndex[n]],a=!1;if((i.maxX==null||e.maxX+i.padRight>i.maxX)&&(i.maxX=e.maxX+i.padRight,a=!0),(i.minX==null||e.minX-i.padLeft<i.minX)&&(i.minX=e.minX-i.padLeft,a=!0),(i.maxY==null||e.maxY+i.padBottom>i.maxY)&&(i.maxY=e.maxY+i.padBottom,a=!0),(i.minY==null||e.minY-i.padTop<i.minY)&&(i.minY=e.minY-i.padTop,a=!0),a)return t(i,r);}},"updateAncestryBoundaries"),Mme=o(function(e,r){for(var n=e.layoutNodes,i=[],a=0;a<n.length;a++){var s=n[a],l=s.cmptId,u=i[l]=i[l]||[];u.push(s);}for(var h=0,a=0;a<i.length;a++){var f=i[a];if(f){f.x1=1/0,f.x2=-1/0,f.y1=1/0,f.y2=-1/0;for(var d=0;d<f.length;d++){var p=f[d];f.x1=Math.min(f.x1,p.positionX-p.width/2),f.x2=Math.max(f.x2,p.positionX+p.width/2),f.y1=Math.min(f.y1,p.positionY-p.height/2),f.y2=Math.max(f.y2,p.positionY+p.height/2);}f.w=f.x2-f.x1,f.h=f.y2-f.y1,h+=f.w*f.h;}}i.sort(function(b,T){return T.w*T.h-b.w*b.h;});for(var m=0,g=0,y=0,v=0,x=Math.sqrt(h)*e.clientWidth/e.clientHeight,a=0;a<i.length;a++){var f=i[a];if(f){for(var d=0;d<f.length;d++){var p=f[d];p.isLocked||(p.positionX+=m-f.x1,p.positionY+=g-f.y1);}m+=f.w+r.componentSpacing,y+=f.w+r.componentSpacing,v=Math.max(v,f.h),y>x&&(g+=v+r.componentSpacing,m=0,y=0,v=0);}}},"separateComponents"),PZe={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:o(function(e){},"position"),sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:o(function(e,r){return!0;},"animateFilter"),ready:void 0,stop:void 0,transform:o(function(e,r){return r;},"transform")};o(p1e,"GridLayout");p1e.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));var a=Ws(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(a.h===0||a.w===0)n.nodes().layoutPositions(this,e,function(K){return{x:a.x1,y:a.y1};});else{var s=i.size(),l=Math.sqrt(s*a.h/a.w),u=Math.round(l),h=Math.round(a.w/a.h*l),f=o(function(ee){if(ee==null)return Math.min(u,h);var Y=Math.min(u,h);Y==u?u=ee:h=ee;},"small"),d=o(function(ee){if(ee==null)return Math.max(u,h);var Y=Math.max(u,h);Y==u?u=ee:h=ee;},"large"),p=e.rows,m=e.cols!=null?e.cols:e.columns;if(p!=null&&m!=null)u=p,h=m;else if(p!=null&&m==null)u=p,h=Math.ceil(s/u);else if(p==null&&m!=null)h=m,u=Math.ceil(s/h);else if(h*u>s){var g=f(),y=d();(g-1)*y>=s?f(g-1):(y-1)*g>=s&&d(y-1);}else for(;h*u<s;){var v=f(),x=d();(x+1)*v>=s?d(x+1):f(v+1);}var b=a.w/h,T=a.h/u;if(e.condense&&(b=0,T=0),e.avoidOverlap)for(var C=0;C<i.length;C++){var w=i[C],E=w._private.position;(E.x==null||E.y==null)&&(E.x=0,E.y=0);var _=w.layoutDimensions(e),A=e.avoidOverlapPadding,D=_.w+A,O=_.h+A;b=Math.max(b,D),T=Math.max(T,O);}for(var R={},k=o(function(ee,Y){return!!R["c-"+ee+"-"+Y];},"used"),L=o(function(ee,Y){R["c-"+ee+"-"+Y]=!0;},"use"),S=0,I=0,M=o(function(){I++,I>=h&&(I=0,S++);},"moveToNextCell"),P={},B=0;B<i.length;B++){var F=i[B],z=e.position(F);if(z&&(z.row!==void 0||z.col!==void 0)){var $={row:z.row,col:z.col};if($.col===void 0)for($.col=0;k($.row,$.col);)$.col++;else if($.row===void 0)for($.row=0;k($.row,$.col);)$.row++;P[F.id()]=$,L($.row,$.col);}}var U=o(function(ee,Y){var ce,Z;if(ee.locked()||ee.isParent())return!1;var ue=P[ee.id()];if(ue)ce=ue.col*b+b/2+a.x1,Z=ue.row*T+T/2+a.y1;else{for(;k(S,I);)M();ce=I*b+b/2+a.x1,Z=S*T+T/2+a.y1,L(S,I),M();}return{x:ce,y:Z};},"getPos");i.layoutPositions(this,e,U);}return this;};BZe={ready:o(function(){},"ready"),stop:o(function(){},"stop")};o(ZB,"NullLayout");ZB.prototype.run=function(){var t=this.options,e=t.eles,r=this;return t.cy,r.emit("layoutstart"),e.nodes().positions(function(){return{x:0,y:0};}),r.one("layoutready",t.ready),r.emit("layoutready"),r.one("layoutstop",t.stop),r.emit("layoutstop"),this;};ZB.prototype.stop=function(){return this;};FZe={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:o(function(e,r){return!0;},"animateFilter"),ready:void 0,stop:void 0,transform:o(function(e,r){return r;},"transform")};o(m1e,"PresetLayout");m1e.prototype.run=function(){var t=this.options,e=t.eles,r=e.nodes(),n=li(t.positions);function i(a){if(t.positions==null)return VYe(a.position());if(n)return t.positions(a);var s=t.positions[a._private.data.id];return s!==null&&s!==void 0?s:null;}return o(i,"getPosition"),r.layoutPositions(this,t,function(a,s){var l=i(a);return a.locked()||l==null?!1:l;}),this;};$Ze={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:o(function(e,r){return!0;},"animateFilter"),ready:void 0,stop:void 0,transform:o(function(e,r){return r;},"transform")};o(g1e,"RandomLayout");g1e.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,n=Ws(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),i=o(function(s,l){return{x:n.x1+Math.round(Math.random()*n.w),y:n.y1+Math.round(Math.random()*n.h)};},"getPos");return r.nodes().layoutPositions(this,t,i),this;};zZe=[{name:"breadthfirst",impl:u1e},{name:"circle",impl:h1e},{name:"concentric",impl:f1e},{name:"cose",impl:oC},{name:"grid",impl:p1e},{name:"null",impl:ZB},{name:"preset",impl:m1e},{name:"random",impl:g1e}];o(y1e,"NullRenderer");Ime=o(function(){},"noop"),Ome=o(function(){throw new Error("A headless instance can not render images");},"throwImgErr");y1e.prototype={recalculateRenderedStyle:Ime,notify:o(function(){this.notifications++;},"notify"),init:Ime,isHeadless:o(function(){return!0;},"isHeadless"),png:Ome,jpg:Ome};JB={};JB.arrowShapeWidth=.3;JB.registerArrowShapes=function(){var t=this.arrowShapes={},e=this,r=o(function(h,f,d,p,m,g,y){var v=m.x-d/2-y,x=m.x+d/2+y,b=m.y-d/2-y,T=m.y+d/2+y,C=v<=h&&h<=x&&b<=f&&f<=T;return C;},"bbCollide"),n=o(function(h,f,d,p,m){var g=h*Math.cos(p)-f*Math.sin(p),y=h*Math.sin(p)+f*Math.cos(p),v=g*d,x=y*d,b=v+m.x,T=x+m.y;return{x:b,y:T};},"transform"),i=o(function(h,f,d,p){for(var m=[],g=0;g<h.length;g+=2){var y=h[g],v=h[g+1];m.push(n(y,v,f,d,p));}return m;},"transformPoints"),a=o(function(h){for(var f=[],d=0;d<h.length;d++){var p=h[d];f.push(p.x,p.y);}return f;},"pointsToArr"),s=o(function(h){return h.pstyle("width").pfValue*h.pstyle("arrow-scale").pfValue*2;},"standardGap"),l=o(function(h,f){Jt(f)&&(f=t[f]),t[h]=ir({name:h,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:o(function(p,m,g,y,v,x){var b=a(i(this.points,g+2*x,y,v)),T=Hs(p,m,b);return T;},"collide"),roughCollide:r,draw:o(function(p,m,g,y){var v=i(this.points,m,g,y);e.arrowShapeImpl("polygon")(p,v);},"draw"),spacing:o(function(p){return 0;},"spacing"),gap:s},f);},"defineArrowShape");l("none",{collide:B6,roughCollide:B6,draw:FB,spacing:W0e,gap:W0e}),l("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),l("arrow","triangle"),l("triangle-backcurve",{points:t.triangle.points,controlPoint:[0,-.15],roughCollide:r,draw:o(function(h,f,d,p,m){var g=i(this.points,f,d,p),y=this.controlPoint,v=n(y[0],y[1],f,d,p);e.arrowShapeImpl(this.name)(h,g,v);},"draw"),gap:o(function(h){return s(h)*.8;},"gap")}),l("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:o(function(h,f,d,p,m,g,y){var v=a(i(this.points,d+2*y,p,m)),x=a(i(this.pointsTee,d+2*y,p,m)),b=Hs(h,f,v)||Hs(h,f,x);return b;},"collide"),draw:o(function(h,f,d,p,m){var g=i(this.points,f,d,p),y=i(this.pointsTee,f,d,p);e.arrowShapeImpl(this.name)(h,g,y);},"draw")}),l("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:o(function(h,f,d,p,m,g,y){var v=m,x=Math.pow(v.x-h,2)+Math.pow(v.y-f,2)<=Math.pow((d+2*y)*this.radius,2),b=a(i(this.points,d+2*y,p,m));return Hs(h,f,b)||x;},"collide"),draw:o(function(h,f,d,p,m){var g=i(this.pointsTr,f,d,p);e.arrowShapeImpl(this.name)(h,g,p.x,p.y,this.radius*f);},"draw"),spacing:o(function(h){return e.getArrowWidth(h.pstyle("width").pfValue,h.pstyle("arrow-scale").value)*this.radius;},"spacing")}),l("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:o(function(h,f){var d=this.baseCrossLinePts.slice(),p=f/h,m=3,g=5;return d[m]=d[m]-p,d[g]=d[g]-p,d;},"crossLinePts"),collide:o(function(h,f,d,p,m,g,y){var v=a(i(this.points,d+2*y,p,m)),x=a(i(this.crossLinePts(d,g),d+2*y,p,m)),b=Hs(h,f,v)||Hs(h,f,x);return b;},"collide"),draw:o(function(h,f,d,p,m){var g=i(this.points,f,d,p),y=i(this.crossLinePts(f,m),f,d,p);e.arrowShapeImpl(this.name)(h,g,y);},"draw")}),l("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:o(function(h){return s(h)*.525;},"gap")}),l("circle",{radius:.15,collide:o(function(h,f,d,p,m,g,y){var v=m,x=Math.pow(v.x-h,2)+Math.pow(v.y-f,2)<=Math.pow((d+2*y)*this.radius,2);return x;},"collide"),draw:o(function(h,f,d,p,m){e.arrowShapeImpl(this.name)(h,p.x,p.y,this.radius*f);},"draw"),spacing:o(function(h){return e.getArrowWidth(h.pstyle("width").pfValue,h.pstyle("arrow-scale").value)*this.radius;},"spacing")}),l("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:o(function(h){return 1;},"spacing"),gap:o(function(h){return 1;},"gap")}),l("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),l("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:o(function(h){return h.pstyle("width").pfValue*h.pstyle("arrow-scale").value;},"gap")}),l("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:o(function(h){return .95*h.pstyle("width").pfValue*h.pstyle("arrow-scale").value;},"gap")});};Zp={};Zp.projectIntoViewport=function(t,e){var r=this.cy,n=this.findContainerClientCoords(),i=n[0],a=n[1],s=n[4],l=r.pan(),u=r.zoom(),h=((t-i)/s-l.x)/u,f=((e-a)/s-l.y)/u;return[h,f];};Zp.findContainerClientCoords=function(){if(this.containerBB)return this.containerBB;var t=this.container,e=t.getBoundingClientRect(),r=this.cy.window().getComputedStyle(t),n=o(function(x){return parseFloat(r.getPropertyValue(x));},"styleValue"),i={left:n("padding-left"),right:n("padding-right"),top:n("padding-top"),bottom:n("padding-bottom")},a={left:n("border-left-width"),right:n("border-right-width"),top:n("border-top-width"),bottom:n("border-bottom-width")},s=t.clientWidth,l=t.clientHeight,u=i.left+i.right,h=i.top+i.bottom,f=a.left+a.right,d=e.width/(s+f),p=s-u,m=l-h,g=e.left+i.left+a.left,y=e.top+i.top+a.top;return this.containerBB=[g,y,p,m,d];};Zp.invalidateContainerClientCoordsCache=function(){this.containerBB=null;};Zp.findNearestElement=function(t,e,r,n){return this.findNearestElements(t,e,r,n)[0];};Zp.findNearestElements=function(t,e,r,n){var i=this,a=this,s=a.getCachedZSortedEles(),l=[],u=a.cy.zoom(),h=a.cy.hasCompoundNodes(),f=(n?24:8)/u,d=(n?8:2)/u,p=(n?8:2)/u,m=1/0,g,y;r&&(s=s.interactive);function v(_,A){if(_.isNode()){if(y)return;y=_,l.push(_);}if(_.isEdge()&&(A==null||A<m))if(g){if(g.pstyle("z-compound-depth").value===_.pstyle("z-compound-depth").value&&g.pstyle("z-compound-depth").value===_.pstyle("z-compound-depth").value){for(var D=0;D<l.length;D++)if(l[D].isEdge()){l[D]=_,g=_,m=A!==null&&A!==void 0?A:m;break;}}}else l.push(_),g=_,m=A!==null&&A!==void 0?A:m;}o(v,"addEle");function x(_){var A=_.outerWidth()+2*d,D=_.outerHeight()+2*d,O=A/2,R=D/2,k=_.position(),L=_.pstyle("corner-radius").value==="auto"?"auto":_.pstyle("corner-radius").pfValue,S=_._private.rscratch;if(k.x-O<=t&&t<=k.x+O&&k.y-R<=e&&e<=k.y+R){var I=a.nodeShapes[i.getNodeShape(_)];if(I.checkPoint(t,e,0,A,D,k.x,k.y,L,S))return v(_,0),!0;}}o(x,"checkNode");function b(_){var A=_._private,D=A.rscratch,O=_.pstyle("width").pfValue,R=_.pstyle("arrow-scale").value,k=O/2+f,L=k*k,S=k*2,B=A.source,F=A.target,I;if(D.edgeType==="segments"||D.edgeType==="straight"||D.edgeType==="haystack"){for(var M=D.allpts,P=0;P+3<M.length;P+=2)if(tXe(t,e,M[P],M[P+1],M[P+2],M[P+3],S)&&L>(I=sXe(t,e,M[P],M[P+1],M[P+2],M[P+3])))return v(_,I),!0;}else if(D.edgeType==="bezier"||D.edgeType==="multibezier"||D.edgeType==="self"||D.edgeType==="compound"){for(var M=D.allpts,P=0;P+5<D.allpts.length;P+=4)if(rXe(t,e,M[P],M[P+1],M[P+2],M[P+3],M[P+4],M[P+5],S)&&L>(I=aXe(t,e,M[P],M[P+1],M[P+2],M[P+3],M[P+4],M[P+5])))return v(_,I),!0;}for(var B=B||A.source,F=F||A.target,z=i.getArrowWidth(O,R),$=[{name:"source",x:D.arrowStartX,y:D.arrowStartY,angle:D.srcArrowAngle},{name:"target",x:D.arrowEndX,y:D.arrowEndY,angle:D.tgtArrowAngle},{name:"mid-source",x:D.midX,y:D.midY,angle:D.midsrcArrowAngle},{name:"mid-target",x:D.midX,y:D.midY,angle:D.midtgtArrowAngle}],P=0;P<$.length;P++){var U=$[P],K=a.arrowShapes[_.pstyle(U.name+"-arrow-shape").value],ee=_.pstyle("width").pfValue;if(K.roughCollide(t,e,z,U.angle,{x:U.x,y:U.y},ee,f)&&K.collide(t,e,z,U.angle,{x:U.x,y:U.y},ee,f))return v(_),!0;}h&&l.length>0&&(x(B),x(F));}o(b,"checkEdge");function T(_,A,D){return Ul(_,A,D);}o(T,"preprop");function C(_,A){var D=_._private,O=p,R;A?R=A+"-":R="",_.boundingBox();var k=D.labelBounds[A||"main"],L=_.pstyle(R+"label").value,S=_.pstyle("text-events").strValue==="yes";if(!(!S||!L)){var I=T(D.rscratch,"labelX",A),M=T(D.rscratch,"labelY",A),P=T(D.rscratch,"labelAngle",A),B=_.pstyle(R+"text-margin-x").pfValue,F=_.pstyle(R+"text-margin-y").pfValue,z=k.x1-O-B,$=k.x2+O-B,U=k.y1-O-F,K=k.y2+O-F;if(P){var ee=Math.cos(P),Y=Math.sin(P),ce=o(function(he,le){return he=he-I,le=le-M,{x:he*ee-le*Y+I,y:he*Y+le*ee+M};},"rotate"),Z=ce(z,U),ue=ce(z,K),Q=ce($,U),j=ce($,K),ne=[Z.x+B,Z.y+F,Q.x+B,Q.y+F,j.x+B,j.y+F,ue.x+B,ue.y+F];if(Hs(t,e,ne))return v(_),!0;}else if(Q1(k,t,e))return v(_),!0;}}o(C,"checkLabel");for(var w=s.length-1;w>=0;w--){var E=s[w];E.isNode()?x(E)||C(E):b(E)||C(E)||C(E,"source")||C(E,"target");}return l;};Zp.getAllInBox=function(t,e,r,n){var i=this.getCachedZSortedEles().interactive,a=[],s=Math.min(t,r),l=Math.max(t,r),u=Math.min(e,n),h=Math.max(e,n);t=s,r=l,e=u,n=h;for(var f=Ws({x1:t,y1:e,x2:r,y2:n}),d=0;d<i.length;d++){var p=i[d];if(p.isNode()){var m=p,g=m.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});GB(f,g)&&!Cge(g,f)&&a.push(m);}else{var y=p,v=y._private,x=v.rscratch;if(x.startX!=null&&x.startY!=null&&!Q1(f,x.startX,x.startY)||x.endX!=null&&x.endY!=null&&!Q1(f,x.endX,x.endY))continue;if(x.edgeType==="bezier"||x.edgeType==="multibezier"||x.edgeType==="self"||x.edgeType==="compound"||x.edgeType==="segments"||x.edgeType==="haystack"){for(var b=v.rstyle.bezierPts||v.rstyle.linePts||v.rstyle.haystackPts,T=!0,C=0;C<b.length;C++)if(!eXe(f,b[C])){T=!1;break;}T&&a.push(y);}else(x.edgeType==="haystack"||x.edgeType==="straight")&&a.push(y);}}return a;};H6={};H6.calculateArrowAngles=function(t){var e=t._private.rscratch,r=e.edgeType==="haystack",n=e.edgeType==="bezier",i=e.edgeType==="multibezier",a=e.edgeType==="segments",s=e.edgeType==="compound",l=e.edgeType==="self",u,h,f,d,p,m,x,b;if(r?(f=e.haystackPts[0],d=e.haystackPts[1],p=e.haystackPts[2],m=e.haystackPts[3]):(f=e.arrowStartX,d=e.arrowStartY,p=e.arrowEndX,m=e.arrowEndY),x=e.midX,b=e.midY,a)u=f-e.segpts[0],h=d-e.segpts[1];else if(i||s||l||n){var g=e.allpts,y=ia(g[0],g[2],g[4],.1),v=ia(g[1],g[3],g[5],.1);u=f-y,h=d-v;}else u=f-x,h=d-b;e.srcArrowAngle=d6(u,h);var x=e.midX,b=e.midY;if(r&&(x=(f+p)/2,b=(d+m)/2),u=p-f,h=m-d,a){var g=e.allpts;if(g.length/2%2===0){var T=g.length/2,C=T-2;u=g[T]-g[C],h=g[T+1]-g[C+1];}else if(e.isRound)u=e.midVector[1],h=-e.midVector[0];else{var T=g.length/2-1,C=T-2;u=g[T]-g[C],h=g[T+1]-g[C+1];}}else if(i||s||l){var g=e.allpts,w=e.ctrlpts,E,_,A,D;if(w.length/2%2===0){var O=g.length/2-1,R=O+2,k=R+2;E=ia(g[O],g[R],g[k],0),_=ia(g[O+1],g[R+1],g[k+1],0),A=ia(g[O],g[R],g[k],1e-4),D=ia(g[O+1],g[R+1],g[k+1],1e-4);}else{var R=g.length/2-1,O=R-2,k=R+2;E=ia(g[O],g[R],g[k],.4999),_=ia(g[O+1],g[R+1],g[k+1],.4999),A=ia(g[O],g[R],g[k],.5),D=ia(g[O+1],g[R+1],g[k+1],.5);}u=A-E,h=D-_;}if(e.midtgtArrowAngle=d6(u,h),e.midDispX=u,e.midDispY=h,u*=-1,h*=-1,a){var g=e.allpts;if(g.length/2%2!==0){if(!e.isRound){var T=g.length/2-1,L=T+2;u=-(g[L]-g[T]),h=-(g[L+1]-g[T+1]);}}}if(e.midsrcArrowAngle=d6(u,h),a)u=p-e.segpts[e.segpts.length-2],h=m-e.segpts[e.segpts.length-1];else if(i||s||l||n){var g=e.allpts,S=g.length,y=ia(g[S-6],g[S-4],g[S-2],.9),v=ia(g[S-5],g[S-3],g[S-1],.9);u=p-y,h=m-v;}else u=p-x,h=m-b;e.tgtArrowAngle=d6(u,h);};H6.getArrowWidth=H6.getArrowHeight=function(t,e){var r=this.arrowWidthCache=this.arrowWidthCache||{},n=r[t+", "+e];return n||(n=Math.max(Math.pow(t*13.37,.9),29)*e,r[t+", "+e]=n,n);};Xc={},tl={},$me=o(function(e,r,n){n.x=r.x-e.x,n.y=r.y-e.y,n.len=Math.sqrt(n.x*n.x+n.y*n.y),n.nx=n.x/n.len,n.ny=n.y/n.len,n.ang=Math.atan2(n.ny,n.nx);},"asVec"),GZe=o(function(e,r){r.x=e.x*-1,r.y=e.y*-1,r.nx=e.nx*-1,r.ny=e.ny*-1,r.ang=e.ang>0?-(Math.PI-e.ang):Math.PI+e.ang;},"invertVec"),VZe=o(function(e,r,n,i,a){if(e!==Fme?$me(r,e,Xc):GZe(tl,Xc),$me(r,n,tl),Pme=Xc.nx*tl.ny-Xc.ny*tl.nx,Bme=Xc.nx*tl.nx-Xc.ny*-tl.ny,Zu=Math.asin(Math.max(-1,Math.min(1,Pme))),Math.abs(Zu)<1e-6){CB=r.x,AB=r.y,Up=V1=0;return;}Hp=1,M6=!1,Bme<0?Zu<0?Zu=Math.PI+Zu:(Zu=Math.PI-Zu,Hp=-1,M6=!0):Zu>0&&(Hp=-1,M6=!0),r.radius!==void 0?V1=r.radius:V1=i,$p=Zu/2,w6=Math.min(Xc.len/2,tl.len/2),a?(Yc=Math.abs(Math.cos($p)*V1/Math.sin($p)),Yc>w6?(Yc=w6,Up=Math.abs(Yc*Math.sin($p)/Math.cos($p))):Up=V1):(Yc=Math.min(w6,V1),Up=Math.abs(Yc*Math.sin($p)/Math.cos($p))),_B=r.x+tl.nx*Yc,DB=r.y+tl.ny*Yc,CB=_B-tl.ny*Up*Hp,AB=DB+tl.nx*Up*Hp,v1e=r.x+Xc.nx*Yc,x1e=r.y+Xc.ny*Yc,Fme=r;},"calcCornerArc");o(b1e,"drawPreparedRoundCorner");o(eF,"getRoundCorner");Ua={};Ua.findMidptPtsEtc=function(t,e){var r=e.posPts,n=e.intersectionPts,i=e.vectorNormInverse,a,s=t.pstyle("source-endpoint"),l=t.pstyle("target-endpoint"),u=s.units!=null&&l.units!=null,h=o(function(w,E,_,A){var D=A-E,O=_-w,R=Math.sqrt(O*O+D*D);return{x:-D/R,y:O/R};},"recalcVectorNormInverse"),f=t.pstyle("edge-distances").value;switch(f){case"node-position":a=r;break;case"intersection":a=n;break;case"endpoints":{if(u){var d=this.manualEndptToPx(t.source()[0],s),p=Li(d,2),m=p[0],g=p[1],y=this.manualEndptToPx(t.target()[0],l),v=Li(y,2),x=v[0],b=v[1],T={x1:m,y1:g,x2:x,y2:b};i=h(m,g,x,b),a=T;}else un("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint.  Falling back on edge-distances:intersection (default).")),a=n;break;}}return{midptPts:a,vectorNormInverse:i};};Ua.findHaystackPoints=function(t){for(var e=0;e<t.length;e++){var r=t[e],n=r._private,i=n.rscratch;if(!i.haystack){var a=Math.random()*2*Math.PI;i.source={x:Math.cos(a),y:Math.sin(a)},a=Math.random()*2*Math.PI,i.target={x:Math.cos(a),y:Math.sin(a)};}var s=n.source,l=n.target,u=s.position(),h=l.position(),f=s.width(),d=l.width(),p=s.height(),m=l.height(),g=r.pstyle("haystack-radius").value,y=g/2;i.haystackPts=i.allpts=[i.source.x*f*y+u.x,i.source.y*p*y+u.y,i.target.x*d*y+h.x,i.target.y*m*y+h.y],i.midX=(i.allpts[0]+i.allpts[2])/2,i.midY=(i.allpts[1]+i.allpts[3])/2,i.edgeType="haystack",i.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r);}};Ua.findSegmentsPoints=function(t,e){var r=t._private.rscratch,n=t.pstyle("segment-weights"),i=t.pstyle("segment-distances"),a=t.pstyle("segment-radii"),s=t.pstyle("radius-type"),l=Math.min(n.pfValue.length,i.pfValue.length),u=a.pfValue[a.pfValue.length-1],h=s.pfValue[s.pfValue.length-1];r.edgeType="segments",r.segpts=[],r.radii=[],r.isArcRadius=[];for(var f=0;f<l;f++){var d=n.pfValue[f],p=i.pfValue[f],m=1-d,g=d,y=this.findMidptPtsEtc(t,e),v=y.midptPts,x=y.vectorNormInverse,b={x:v.x1*m+v.x2*g,y:v.y1*m+v.y2*g};r.segpts.push(b.x+x.x*p,b.y+x.y*p),r.radii.push(a.pfValue[f]!==void 0?a.pfValue[f]:u),r.isArcRadius.push((s.pfValue[f]!==void 0?s.pfValue[f]:h)==="arc-radius");}};Ua.findLoopPoints=function(t,e,r,n){var i=t._private.rscratch,a=e.dirCounts,s=e.srcPos,l=t.pstyle("control-point-distances"),u=l?l.pfValue[0]:void 0,h=t.pstyle("loop-direction").pfValue,f=t.pstyle("loop-sweep").pfValue,d=t.pstyle("control-point-step-size").pfValue;i.edgeType="self";var p=r,m=d;n&&(p=0,m=u);var g=h-Math.PI/2,y=g-f/2,v=g+f/2,x=h+"_"+f;p=a[x]===void 0?a[x]=0:++a[x],i.ctrlpts=[s.x+Math.cos(y)*1.4*m*(p/3+1),s.y+Math.sin(y)*1.4*m*(p/3+1),s.x+Math.cos(v)*1.4*m*(p/3+1),s.y+Math.sin(v)*1.4*m*(p/3+1)];};Ua.findCompoundLoopPoints=function(t,e,r,n){var i=t._private.rscratch;i.edgeType="compound";var a=e.srcPos,s=e.tgtPos,l=e.srcW,u=e.srcH,h=e.tgtW,f=e.tgtH,d=t.pstyle("control-point-step-size").pfValue,p=t.pstyle("control-point-distances"),m=p?p.pfValue[0]:void 0,g=r,y=d;n&&(g=0,y=m);var v=50,x={x:a.x-l/2,y:a.y-u/2},b={x:s.x-h/2,y:s.y-f/2},T={x:Math.min(x.x,b.x),y:Math.min(x.y,b.y)},C=.5,w=Math.max(C,Math.log(l*.01)),E=Math.max(C,Math.log(h*.01));i.ctrlpts=[T.x,T.y-(1+Math.pow(v,1.12)/100)*y*(g/3+1)*w,T.x-(1+Math.pow(v,1.12)/100)*y*(g/3+1)*E,T.y];};Ua.findStraightEdgePoints=function(t){t._private.rscratch.edgeType="straight";};Ua.findBezierPoints=function(t,e,r,n,i){var a=t._private.rscratch,s=t.pstyle("control-point-step-size").pfValue,l=t.pstyle("control-point-distances"),u=t.pstyle("control-point-weights"),h=l&&u?Math.min(l.value.length,u.value.length):1,f=l?l.pfValue[0]:void 0,d=u.value[0],p=n;a.edgeType=p?"multibezier":"bezier",a.ctrlpts=[];for(var m=0;m<h;m++){var g=(.5-e.eles.length/2+r)*s*(i?-1:1),y=void 0,v=Ege(g);p&&(f=l?l.pfValue[m]:s,d=u.value[m]),n?y=f:y=f!==void 0?v*f:void 0;var x=y!==void 0?y:g,b=1-d,T=d,C=this.findMidptPtsEtc(t,e),w=C.midptPts,E=C.vectorNormInverse,_={x:w.x1*b+w.x2*T,y:w.y1*b+w.y2*T};a.ctrlpts.push(_.x+E.x*x,_.y+E.y*x);}};Ua.findTaxiPoints=function(t,e){var r=t._private.rscratch;r.edgeType="segments";var n="vertical",i="horizontal",a="leftward",s="rightward",l="downward",u="upward",h="auto",f=e.posPts,d=e.srcW,p=e.srcH,m=e.tgtW,g=e.tgtH,y=t.pstyle("edge-distances").value,v=y!=="node-position",x=t.pstyle("taxi-direction").value,b=x,T=t.pstyle("taxi-turn"),C=T.units==="%",w=T.pfValue,E=w<0,_=t.pstyle("taxi-turn-min-distance").pfValue,A=v?(d+m)/2:0,D=v?(p+g)/2:0,O=f.x2-f.x1,R=f.y2-f.y1,k=o(function(W,pe){return W>0?Math.max(W-pe,0):Math.min(W+pe,0);},"subDWH"),L=k(O,A),S=k(R,D),I=!1;b===h?x=Math.abs(L)>Math.abs(S)?i:n:b===u||b===l?(x=n,I=!0):(b===a||b===s)&&(x=i,I=!0);var M=x===n,P=M?S:L,B=M?R:O,F=Ege(B),z=!1;!(I&&(C||E))&&(b===l&&B<0||b===u&&B>0||b===a&&B>0||b===s&&B<0)&&(F*=-1,P=F*Math.abs(P),z=!0);var $;if(C){var U=w<0?1+w:w;$=U*P;}else{var K=w<0?P:0;$=K+w*F;}var ee=o(function(W){return Math.abs(W)<_||Math.abs(W)>=Math.abs(P);},"getIsTooClose"),Y=ee($),ce=ee(Math.abs(P)-Math.abs($)),Z=Y||ce;if(Z&&!z){if(M){var ue=Math.abs(B)<=p/2,Q=Math.abs(O)<=m/2;if(ue){var j=(f.x1+f.x2)/2,ne=f.y1,te=f.y2;r.segpts=[j,ne,j,te];}else if(Q){var he=(f.y1+f.y2)/2,le=f.x1,J=f.x2;r.segpts=[le,he,J,he];}else r.segpts=[f.x1,f.y2];}else{var Se=Math.abs(B)<=d/2,se=Math.abs(R)<=g/2;if(Se){var ae=(f.y1+f.y2)/2,Oe=f.x1,ye=f.x2;r.segpts=[Oe,ae,ye,ae];}else if(se){var Be=(f.x1+f.x2)/2,He=f.y1,ze=f.y2;r.segpts=[Be,He,Be,ze];}else r.segpts=[f.x2,f.y1];}}else if(M){var Le=f.y1+$+(v?p/2*F:0),Ie=f.x1,xe=f.x2;r.segpts=[Ie,Le,xe,Le];}else{var q=f.x1+$+(v?d/2*F:0),de=f.y1,ie=f.y2;r.segpts=[q,de,q,ie];}if(r.isRound){var oe=t.pstyle("taxi-radius").value,V=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(oe),r.isArcRadius=new Array(r.segpts.length/2).fill(V);}};Ua.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var n=e.srcPos,i=e.tgtPos,a=e.srcW,s=e.srcH,l=e.tgtW,u=e.tgtH,h=e.srcShape,f=e.tgtShape,d=e.srcCornerRadius,p=e.tgtCornerRadius,m=e.srcRs,g=e.tgtRs,y=!_t(r.startX)||!_t(r.startY),v=!_t(r.arrowStartX)||!_t(r.arrowStartY),x=!_t(r.endX)||!_t(r.endY),b=!_t(r.arrowEndX)||!_t(r.arrowEndY),T=3,C=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,w=T*C,E=Yp({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),_=E<w,A=Yp({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.endX,y:r.endY}),D=A<w,O=!1;if(y||v||_){O=!0;var R={x:r.ctrlpts[0]-n.x,y:r.ctrlpts[1]-n.y},k=Math.sqrt(R.x*R.x+R.y*R.y),L={x:R.x/k,y:R.y/k},S=Math.max(a,s),I={x:r.ctrlpts[0]+L.x*2*S,y:r.ctrlpts[1]+L.y*2*S},M=h.intersectLine(n.x,n.y,a,s,I.x,I.y,0,d,m);_?(r.ctrlpts[0]=r.ctrlpts[0]+L.x*(w-E),r.ctrlpts[1]=r.ctrlpts[1]+L.y*(w-E)):(r.ctrlpts[0]=M[0]+L.x*w,r.ctrlpts[1]=M[1]+L.y*w);}if(x||b||D){O=!0;var P={x:r.ctrlpts[0]-i.x,y:r.ctrlpts[1]-i.y},B=Math.sqrt(P.x*P.x+P.y*P.y),F={x:P.x/B,y:P.y/B},z=Math.max(a,s),$={x:r.ctrlpts[0]+F.x*2*z,y:r.ctrlpts[1]+F.y*2*z},U=f.intersectLine(i.x,i.y,l,u,$.x,$.y,0,p,g);D?(r.ctrlpts[0]=r.ctrlpts[0]+F.x*(w-A),r.ctrlpts[1]=r.ctrlpts[1]+F.y*(w-A)):(r.ctrlpts[0]=U[0]+F.x*w,r.ctrlpts[1]=U[1]+F.y*w);}O&&this.findEndpoints(t);}};Ua.storeAllpts=function(t){var e=t._private.rscratch;if(e.edgeType==="multibezier"||e.edgeType==="bezier"||e.edgeType==="self"||e.edgeType==="compound"){e.allpts=[],e.allpts.push(e.startX,e.startY);for(var r=0;r+1<e.ctrlpts.length;r+=2)e.allpts.push(e.ctrlpts[r],e.ctrlpts[r+1]),r+3<e.ctrlpts.length&&e.allpts.push((e.ctrlpts[r]+e.ctrlpts[r+2])/2,(e.ctrlpts[r+1]+e.ctrlpts[r+3])/2);e.allpts.push(e.endX,e.endY);var n,i;e.ctrlpts.length/2%2===0?(n=e.allpts.length/2-1,e.midX=e.allpts[n],e.midY=e.allpts[n+1]):(n=e.allpts.length/2-3,i=.5,e.midX=ia(e.allpts[n],e.allpts[n+2],e.allpts[n+4],i),e.midY=ia(e.allpts[n+1],e.allpts[n+3],e.allpts[n+5],i));}else if(e.edgeType==="straight")e.allpts=[e.startX,e.startY,e.endX,e.endY],e.midX=(e.startX+e.endX+e.arrowStartX+e.arrowEndX)/4,e.midY=(e.startY+e.endY+e.arrowStartY+e.arrowEndY)/4;else if(e.edgeType==="segments"){if(e.allpts=[],e.allpts.push(e.startX,e.startY),e.allpts.push.apply(e.allpts,e.segpts),e.allpts.push(e.endX,e.endY),e.isRound){e.roundCorners=[];for(var a=2;a+3<e.allpts.length;a+=2){var s=e.radii[a/2-1],l=e.isArcRadius[a/2-1];e.roundCorners.push(eF({x:e.allpts[a-2],y:e.allpts[a-1]},{x:e.allpts[a],y:e.allpts[a+1],radius:s},{x:e.allpts[a+2],y:e.allpts[a+3]},s,l));}}if(e.segpts.length%4===0){var u=e.segpts.length/2,h=u-2;e.midX=(e.segpts[h]+e.segpts[u])/2,e.midY=(e.segpts[h+1]+e.segpts[u+1])/2;}else{var f=e.segpts.length/2-1;if(!e.isRound)e.midX=e.segpts[f],e.midY=e.segpts[f+1];else{var d={x:e.segpts[f],y:e.segpts[f+1]},p=e.roundCorners[f/2],m=[d.x-p.cx,d.y-p.cy],g=p.radius/Math.sqrt(Math.pow(m[0],2)+Math.pow(m[1],2));m=m.map(function(y){return y*g;}),e.midX=p.cx+m[0],e.midY=p.cy+m[1],e.midVector=m;}}}};Ua.checkForInvalidEdgeWarning=function(t){var e=t[0]._private.rscratch;e.nodesOverlap||_t(e.startX)&&_t(e.startY)&&_t(e.endX)&&_t(e.endY)?e.loggedErr=!1:e.loggedErr||(e.loggedErr=!0,un("Edge `"+t.id()+"` has invalid endpoints and so it is impossible to draw.  Adjust your edge style (e.g. control points) accordingly or use an alternative edge type.  This is expected behaviour when the source node and the target node overlap."));};Ua.findEdgeControlPoints=function(t){var e=this;if(!(!t||t.length===0)){for(var r=this,n=r.cy,i=n.hasCompoundNodes(),a={map:new Kc(),get:o(function(_){var A=this.map.get(_[0]);return A!=null?A.get(_[1]):null;},"get"),set:o(function(_,A){var D=this.map.get(_[0]);D==null&&(D=new Kc(),this.map.set(_[0],D)),D.set(_[1],A);},"set")},s=[],l=[],u=0;u<t.length;u++){var h=t[u],f=h._private,d=h.pstyle("curve-style").value;if(!(h.removed()||!h.takesUpSpace())){if(d==="haystack"){l.push(h);continue;}var p=d==="unbundled-bezier"||d.endsWith("segments")||d==="straight"||d==="straight-triangle"||d.endsWith("taxi"),m=d==="unbundled-bezier"||d==="bezier",g=f.source,y=f.target,v=g.poolIndex(),x=y.poolIndex(),b=[v,x].sort(),T=a.get(b);T==null&&(T={eles:[]},a.set(b,T),s.push(b)),T.eles.push(h),p&&(T.hasUnbundled=!0),m&&(T.hasBezier=!0);}}for(var C=o(function(_){var A=s[_],D=a.get(A),O=void 0;if(!D.hasUnbundled){var R=D.eles[0].parallelEdges().filter(function(q){return q.isBundledBezier();});$B(D.eles),R.forEach(function(q){return D.eles.push(q);}),D.eles.sort(function(q,de){return q.poolIndex()-de.poolIndex();});}var k=D.eles[0],L=k.source(),S=k.target();if(L.poolIndex()>S.poolIndex()){var I=L;L=S,S=I;}var M=D.srcPos=L.position(),P=D.tgtPos=S.position(),B=D.srcW=L.outerWidth(),F=D.srcH=L.outerHeight(),z=D.tgtW=S.outerWidth(),$=D.tgtH=S.outerHeight(),U=D.srcShape=r.nodeShapes[e.getNodeShape(L)],K=D.tgtShape=r.nodeShapes[e.getNodeShape(S)],ee=D.srcCornerRadius=L.pstyle("corner-radius").value==="auto"?"auto":L.pstyle("corner-radius").pfValue,Y=D.tgtCornerRadius=S.pstyle("corner-radius").value==="auto"?"auto":S.pstyle("corner-radius").pfValue,ce=D.tgtRs=S._private.rscratch,Z=D.srcRs=L._private.rscratch;D.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var ue=0;ue<D.eles.length;ue++){var Q=D.eles[ue],j=Q[0]._private.rscratch,ne=Q.pstyle("curve-style").value,te=ne==="unbundled-bezier"||ne.endsWith("segments")||ne.endsWith("taxi"),he=!L.same(Q.source());if(!D.calculatedIntersection&&L!==S&&(D.hasBezier||D.hasUnbundled)){D.calculatedIntersection=!0;var le=U.intersectLine(M.x,M.y,B,F,P.x,P.y,0,ee,Z),J=D.srcIntn=le,Se=K.intersectLine(P.x,P.y,z,$,M.x,M.y,0,Y,ce),se=D.tgtIntn=Se,ae=D.intersectionPts={x1:le[0],x2:Se[0],y1:le[1],y2:Se[1]},Oe=D.posPts={x1:M.x,x2:P.x,y1:M.y,y2:P.y},ye=Se[1]-le[1],Be=Se[0]-le[0],He=Math.sqrt(Be*Be+ye*ye),ze=D.vector={x:Be,y:ye},Le=D.vectorNorm={x:ze.x/He,y:ze.y/He},Ie={x:-Le.y,y:Le.x};D.nodesOverlap=!_t(He)||K.checkPoint(le[0],le[1],0,z,$,P.x,P.y,Y,ce)||U.checkPoint(Se[0],Se[1],0,B,F,M.x,M.y,ee,Z),D.vectorNormInverse=Ie,O={nodesOverlap:D.nodesOverlap,dirCounts:D.dirCounts,calculatedIntersection:!0,hasBezier:D.hasBezier,hasUnbundled:D.hasUnbundled,eles:D.eles,srcPos:P,srcRs:ce,tgtPos:M,tgtRs:Z,srcW:z,srcH:$,tgtW:B,tgtH:F,srcIntn:se,tgtIntn:J,srcShape:K,tgtShape:U,posPts:{x1:Oe.x2,y1:Oe.y2,x2:Oe.x1,y2:Oe.y1},intersectionPts:{x1:ae.x2,y1:ae.y2,x2:ae.x1,y2:ae.y1},vector:{x:-ze.x,y:-ze.y},vectorNorm:{x:-Le.x,y:-Le.y},vectorNormInverse:{x:-Ie.x,y:-Ie.y}};}var xe=he?O:D;j.nodesOverlap=xe.nodesOverlap,j.srcIntn=xe.srcIntn,j.tgtIntn=xe.tgtIntn,j.isRound=ne.startsWith("round"),i&&(L.isParent()||L.isChild()||S.isParent()||S.isChild())&&(L.parents().anySame(S)||S.parents().anySame(L)||L.same(S)&&L.isParent())?e.findCompoundLoopPoints(Q,xe,ue,te):L===S?e.findLoopPoints(Q,xe,ue,te):ne.endsWith("segments")?e.findSegmentsPoints(Q,xe):ne.endsWith("taxi")?e.findTaxiPoints(Q,xe):ne==="straight"||!te&&D.eles.length%2===1&&ue===Math.floor(D.eles.length/2)?e.findStraightEdgePoints(Q):e.findBezierPoints(Q,xe,ue,te,he),e.findEndpoints(Q),e.tryToCorrectInvalidPoints(Q,xe),e.checkForInvalidEdgeWarning(Q),e.storeAllpts(Q),e.storeEdgeProjections(Q),e.calculateArrowAngles(Q),e.recalculateEdgeLabelProjections(Q),e.calculateLabelAngles(Q);}},"_loop"),w=0;w<s.length;w++)C(w);this.findHaystackPoints(l);}};o(T1e,"getPts");Ua.getSegmentPoints=function(t){var e=t[0]._private.rscratch;this.recalculateRenderedStyle(t);var r=e.edgeType;if(r==="segments")return T1e(e.segpts);};Ua.getControlPoints=function(t){var e=t[0]._private.rscratch;this.recalculateRenderedStyle(t);var r=e.edgeType;if(r==="bezier"||r==="multibezier"||r==="self"||r==="compound")return T1e(e.ctrlpts);};Ua.getEdgeMidpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:e.midX,y:e.midY};};y4={};y4.manualEndptToPx=function(t,e){var r=this,n=t.position(),i=t.outerWidth(),a=t.outerHeight(),s=t._private.rscratch;if(e.value.length===2){var l=[e.pfValue[0],e.pfValue[1]];return e.units[0]==="%"&&(l[0]=l[0]*i),e.units[1]==="%"&&(l[1]=l[1]*a),l[0]+=n.x,l[1]+=n.y,l;}else{var u=e.pfValue[0];u=-Math.PI/2+u;var h=2*Math.max(i,a),f=[n.x+Math.cos(u)*h,n.y+Math.sin(u)*h];return r.nodeShapes[this.getNodeShape(t)].intersectLine(n.x,n.y,i,a,f[0],f[1],0,t.pstyle("corner-radius").value==="auto"?"auto":t.pstyle("corner-radius").pfValue,s);}};y4.findEndpoints=function(t){var e=this,r,n=t.source()[0],i=t.target()[0],a=n.position(),s=i.position(),l=t.pstyle("target-arrow-shape").value,u=t.pstyle("source-arrow-shape").value,h=t.pstyle("target-distance-from-node").pfValue,f=t.pstyle("source-distance-from-node").pfValue,d=n._private.rscratch,p=i._private.rscratch,m=t.pstyle("curve-style").value,g=t._private.rscratch,y=g.edgeType,v=m==="taxi",x=y==="self"||y==="compound",b=y==="bezier"||y==="multibezier"||x,T=y!=="bezier",C=y==="straight"||y==="segments",w=y==="segments",E=b||T||C,_=x||v,A=t.pstyle("source-endpoint"),D=_?"outside-to-node":A.value,O=n.pstyle("corner-radius").value==="auto"?"auto":n.pstyle("corner-radius").pfValue,R=t.pstyle("target-endpoint"),k=_?"outside-to-node":R.value,L=i.pstyle("corner-radius").value==="auto"?"auto":i.pstyle("corner-radius").pfValue;g.srcManEndpt=A,g.tgtManEndpt=R;var S,I,M,P;if(b){var B=[g.ctrlpts[0],g.ctrlpts[1]],F=T?[g.ctrlpts[g.ctrlpts.length-2],g.ctrlpts[g.ctrlpts.length-1]]:B;S=F,I=B;}else if(C){var z=w?g.segpts.slice(0,2):[s.x,s.y],$=w?g.segpts.slice(g.segpts.length-2):[a.x,a.y];S=$,I=z;}if(k==="inside-to-node")r=[s.x,s.y];else if(R.units)r=this.manualEndptToPx(i,R);else if(k==="outside-to-line")r=g.tgtIntn;else if(k==="outside-to-node"||k==="outside-to-node-or-label"?M=S:(k==="outside-to-line"||k==="outside-to-line-or-label")&&(M=[a.x,a.y]),r=e.nodeShapes[this.getNodeShape(i)].intersectLine(s.x,s.y,i.outerWidth(),i.outerHeight(),M[0],M[1],0,L,p),k==="outside-to-node-or-label"||k==="outside-to-line-or-label"){var U=i._private.rscratch,K=U.labelWidth,ee=U.labelHeight,Y=U.labelX,ce=U.labelY,Z=K/2,ue=ee/2,Q=i.pstyle("text-valign").value;Q==="top"?ce-=ue:Q==="bottom"&&(ce+=ue);var j=i.pstyle("text-halign").value;j==="left"?Y-=Z:j==="right"&&(Y+=Z);var ne=i4(M[0],M[1],[Y-Z,ce-ue,Y+Z,ce-ue,Y+Z,ce+ue,Y-Z,ce+ue],s.x,s.y);if(ne.length>0){var te=a,he=Gp(te,H1(r)),le=Gp(te,H1(ne)),J=he;if(le<he&&(r=ne,J=le),ne.length>2){var Se=Gp(te,{x:ne[2],y:ne[3]});Se<J&&(r=[ne[2],ne[3]]);}}}var se=p6(r,S,e.arrowShapes[l].spacing(t)+h),ae=p6(r,S,e.arrowShapes[l].gap(t)+h);if(g.endX=ae[0],g.endY=ae[1],g.arrowEndX=se[0],g.arrowEndY=se[1],D==="inside-to-node")r=[a.x,a.y];else if(A.units)r=this.manualEndptToPx(n,A);else if(D==="outside-to-line")r=g.srcIntn;else if(D==="outside-to-node"||D==="outside-to-node-or-label"?P=I:(D==="outside-to-line"||D==="outside-to-line-or-label")&&(P=[s.x,s.y]),r=e.nodeShapes[this.getNodeShape(n)].intersectLine(a.x,a.y,n.outerWidth(),n.outerHeight(),P[0],P[1],0,O,d),D==="outside-to-node-or-label"||D==="outside-to-line-or-label"){var Oe=n._private.rscratch,ye=Oe.labelWidth,Be=Oe.labelHeight,He=Oe.labelX,ze=Oe.labelY,Le=ye/2,Ie=Be/2,xe=n.pstyle("text-valign").value;xe==="top"?ze-=Ie:xe==="bottom"&&(ze+=Ie);var q=n.pstyle("text-halign").value;q==="left"?He-=Le:q==="right"&&(He+=Le);var de=i4(P[0],P[1],[He-Le,ze-Ie,He+Le,ze-Ie,He+Le,ze+Ie,He-Le,ze+Ie],a.x,a.y);if(de.length>0){var ie=s,oe=Gp(ie,H1(r)),V=Gp(ie,H1(de)),Te=oe;if(V<oe&&(r=[de[0],de[1]],Te=V),de.length>2){var W=Gp(ie,{x:de[2],y:de[3]});W<Te&&(r=[de[2],de[3]]);}}}var pe=p6(r,I,e.arrowShapes[u].spacing(t)+f),ve=p6(r,I,e.arrowShapes[u].gap(t)+f);g.startX=ve[0],g.startY=ve[1],g.arrowStartX=pe[0],g.arrowStartY=pe[1],E&&(!_t(g.startX)||!_t(g.startY)||!_t(g.endX)||!_t(g.endY)?g.badLine=!0:g.badLine=!1);};y4.getSourceEndpoint=function(t){var e=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),e.edgeType){case"haystack":return{x:e.haystackPts[0],y:e.haystackPts[1]};default:return{x:e.arrowStartX,y:e.arrowStartY};}};y4.getTargetEndpoint=function(t){var e=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),e.edgeType){case"haystack":return{x:e.haystackPts[2],y:e.haystackPts[3]};default:return{x:e.arrowEndX,y:e.arrowEndY};}};tF={};o(UZe,"pushBezierPts");tF.storeEdgeProjections=function(t){var e=t._private,r=e.rscratch,n=r.edgeType;if(e.rstyle.bezierPts=null,e.rstyle.linePts=null,e.rstyle.haystackPts=null,n==="multibezier"||n==="bezier"||n==="self"||n==="compound"){e.rstyle.bezierPts=[];for(var i=0;i+5<r.allpts.length;i+=4)UZe(this,t,r.allpts.slice(i,i+6));}else if(n==="segments")for(var a=e.rstyle.linePts=[],i=0;i+1<r.allpts.length;i+=2)a.push({x:r.allpts[i],y:r.allpts[i+1]});else if(n==="haystack"){var s=r.haystackPts;e.rstyle.haystackPts=[{x:s[0],y:s[1]},{x:s[2],y:s[3]}];}e.rstyle.arrowWidth=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth;};tF.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t);};Zc={};Zc.recalculateNodeLabelProjection=function(t){var e=t.pstyle("label").strValue;if(!Rf(e)){var r,n,i=t._private,a=t.width(),s=t.height(),l=t.padding(),u=t.position(),h=t.pstyle("text-halign").strValue,f=t.pstyle("text-valign").strValue,d=i.rscratch,p=i.rstyle;switch(h){case"left":r=u.x-a/2-l;break;case"right":r=u.x+a/2+l;break;default:r=u.x;}switch(f){case"top":n=u.y-s/2-l;break;case"bottom":n=u.y+s/2+l;break;default:n=u.y;}d.labelX=r,d.labelY=n,p.labelX=r,p.labelY=n,this.calculateLabelAngles(t),this.applyLabelDimensions(t);}};w1e=o(function(e,r){var n=Math.atan(r/e);return e===0&&n<0&&(n=n*-1),n;},"lineAngleFromDelta"),k1e=o(function(e,r){var n=r.x-e.x,i=r.y-e.y;return w1e(n,i);},"lineAngle"),HZe=o(function(e,r,n,i){var a=n4(0,i-.001,1),s=n4(0,i+.001,1),l=q1(e,r,n,a),u=q1(e,r,n,s);return k1e(l,u);},"bezierAngle");Zc.recalculateEdgeLabelProjections=function(t){var e,r=t._private,n=r.rscratch,i=this,a={mid:t.pstyle("label").strValue,source:t.pstyle("source-label").strValue,target:t.pstyle("target-label").strValue};if(a.mid||a.source||a.target){e={x:n.midX,y:n.midY};var s=o(function(d,p,m){Af(r.rscratch,d,p,m),Af(r.rstyle,d,p,m);},"setRs");s("labelX",null,e.x),s("labelY",null,e.y);var l=w1e(n.midDispX,n.midDispY);s("labelAutoAngle",null,l);var u=o(function f(){if(f.cache)return f.cache;for(var d=[],p=0;p+5<n.allpts.length;p+=4){var m={x:n.allpts[p],y:n.allpts[p+1]},g={x:n.allpts[p+2],y:n.allpts[p+3]},y={x:n.allpts[p+4],y:n.allpts[p+5]};d.push({p0:m,p1:g,p2:y,startDist:0,length:0,segments:[]});}var v=r.rstyle.bezierPts,x=i.bezierProjPcts.length;function b(_,A,D,O,R){var k=Yp(A,D),L=_.segments[_.segments.length-1],S={p0:A,p1:D,t0:O,t1:R,startDist:L?L.startDist+L.length:0,length:k};_.segments.push(S),_.length+=k;}o(b,"addSegment");for(var T=0;T<d.length;T++){var C=d[T],w=d[T-1];w&&(C.startDist=w.startDist+w.length),b(C,C.p0,v[T*x],0,i.bezierProjPcts[0]);for(var E=0;E<x-1;E++)b(C,v[T*x+E],v[T*x+E+1],i.bezierProjPcts[E],i.bezierProjPcts[E+1]);b(C,v[T*x+x-1],C.p2,i.bezierProjPcts[x-1],1);}return f.cache=d;},"createControlPointInfo"),h=o(function(d){var p,m=d==="source";if(a[d]){var g=t.pstyle(d+"-text-offset").pfValue;switch(n.edgeType){case"self":case"compound":case"bezier":case"multibezier":{for(var y=u(),v,x=0,b=0,T=0;T<y.length;T++){for(var C=y[m?T:y.length-1-T],w=0;w<C.segments.length;w++){var E=C.segments[m?w:C.segments.length-1-w],_=T===y.length-1&&w===C.segments.length-1;if(x=b,b+=E.length,b>=g||_){v={cp:C,segment:E};break;}}if(v)break;}var A=v.cp,D=v.segment,O=(g-x)/D.length,R=D.t1-D.t0,k=m?D.t0+R*O:D.t1-R*O;k=n4(0,k,1),e=q1(A.p0,A.p1,A.p2,k),p=HZe(A.p0,A.p1,A.p2,k);break;}case"straight":case"segments":case"haystack":{for(var L=0,S,I,M,P,B=n.allpts.length,F=0;F+3<B&&(m?(M={x:n.allpts[F],y:n.allpts[F+1]},P={x:n.allpts[F+2],y:n.allpts[F+3]}):(M={x:n.allpts[B-2-F],y:n.allpts[B-1-F]},P={x:n.allpts[B-4-F],y:n.allpts[B-3-F]}),S=Yp(M,P),I=L,L+=S,!(L>=g));F+=2);var z=g-I,$=z/S;$=n4(0,$,1),e=jYe(M,P,$),p=k1e(M,P);break;}}s("labelX",d,e.x),s("labelY",d,e.y),s("labelAutoAngle",d,p);}},"calculateEndProjection");h("source"),h("target"),this.applyLabelDimensions(t);}};Zc.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"));};Zc.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),i=this.calculateLabelDimensions(t,n),a=t.pstyle("line-height").pfValue,s=t.pstyle("text-wrap").strValue,l=Ul(r.rscratch,"labelWrapCachedLines",e)||[],u=s!=="wrap"?1:Math.max(l.length,1),h=i.height/u,f=h*a,d=i.width,p=i.height+(u-1)*(a-1)*h;Af(r.rstyle,"labelWidth",e,d),Af(r.rscratch,"labelWidth",e,d),Af(r.rstyle,"labelHeight",e,p),Af(r.rscratch,"labelHeight",e,p),Af(r.rscratch,"labelLineHeight",e,f);};Zc.getLabelText=function(t,e){var r=t._private,n=e?e+"-":"",i=t.pstyle(n+"label").strValue,a=t.pstyle("text-transform").value,s=o(function(K,ee){return ee?(Af(r.rscratch,K,e,ee),ee):Ul(r.rscratch,K,e);},"rscratch");if(!i)return"";a=="none"||(a=="uppercase"?i=i.toUpperCase():a=="lowercase"&&(i=i.toLowerCase()));var l=t.pstyle("text-wrap").value;if(l==="wrap"){var u=s("labelKey");if(u!=null&&s("labelWrapKey")===u)return s("labelWrapCachedText");for(var h="\u200B",f=i.split(`
`),d=t.pstyle("text-max-width").pfValue,p=t.pstyle("text-overflow-wrap").value,m=p==="anywhere",g=[],y=/[\s\u200b]+|$/g,v=0;v<f.length;v++){var x=f[v],b=this.calculateLabelDimensions(t,x),T=b.width;if(m){var C=x.split("").join(h);x=C;}if(T>d){var w=x.matchAll(y),E="",_=0,A=go(w),D;try{for(A.s();!(D=A.n()).done;){var O=D.value,R=O[0],k=x.substring(_,O.index);_=O.index+R.length;var L=E.length===0?k:E+k+R,S=this.calculateLabelDimensions(t,L),I=S.width;I<=d?E+=k+R:(E&&g.push(E),E=k+R);}}catch(U){A.e(U);}finally{A.f();}E.match(/^[\s\u200b]+$/)||g.push(E);}else g.push(x);}s("labelWrapCachedLines",g),i=s("labelWrapCachedText",g.join(`
`)),s("labelWrapKey",u);}else if(l==="ellipsis"){var M=t.pstyle("text-max-width").pfValue,P="",B="\u2026",F=!1;if(this.calculateLabelDimensions(t,i).width<M)return i;for(var z=0;z<i.length;z++){var $=this.calculateLabelDimensions(t,P+i[z]+B).width;if($>M)break;P+=i[z],z===i.length-1&&(F=!0);}return F||(P+=B),P;}return i;};Zc.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if(e==="auto"){if(t.isNode())switch(r){case"left":return"right";case"right":return"left";default:return"center";}else return"center";}else return e;};Zc.calculateLabelDimensions=function(t,e){var r=this,n=r.cy.window(),i=n.document,a=Nf(e,t._private.labelDimsKey),s=r.labelDimCache||(r.labelDimCache=[]),l=s[a];if(l!=null)return l;var u=0,h=t.pstyle("font-style").strValue,f=t.pstyle("font-size").pfValue,d=t.pstyle("font-family").strValue,p=t.pstyle("font-weight").strValue,m=this.labelCalcCanvas,g=this.labelCalcCanvasContext;if(!m){m=this.labelCalcCanvas=i.createElement("canvas"),g=this.labelCalcCanvasContext=m.getContext("2d");var y=m.style;y.position="absolute",y.left="-9999px",y.top="-9999px",y.zIndex="-1",y.visibility="hidden",y.pointerEvents="none";}g.font="".concat(h," ").concat(p," ").concat(f,"px ").concat(d);for(var v=0,x=0,b=e.split(`
`),T=0;T<b.length;T++){var C=b[T],w=g.measureText(C),E=Math.ceil(w.width),_=f;v=Math.max(E,v),x+=_;}return v+=u,x+=u,s[a]={width:v,height:x};};Zc.calculateLabelAngle=function(t,e){var r=t._private,n=r.rscratch,i=t.isEdge(),a=e?e+"-":"",s=t.pstyle(a+"text-rotation"),l=s.strValue;return l==="none"?0:i&&l==="autorotate"?n.labelAutoAngle:l==="autorotate"?0:s.pfValue;};Zc.calculateLabelAngles=function(t){var e=this,r=t.isEdge(),n=t._private,i=n.rscratch;i.labelAngle=e.calculateLabelAngle(t),r&&(i.sourceLabelAngle=e.calculateLabelAngle(t,"source"),i.targetLabelAngle=e.calculateLabelAngle(t,"target"));};E1e={},zme=28,Gme=!1;E1e.getNodeShape=function(t){var e=this,r=t.pstyle("shape").value;if(r==="cutrectangle"&&(t.width()<zme||t.height()<zme))return Gme||(un("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),Gme=!0),"rectangle";if(t.isParent())return r==="rectangle"||r==="roundrectangle"||r==="round-rectangle"||r==="cutrectangle"||r==="cut-rectangle"||r==="barrel"?r:"rectangle";if(r==="polygon"){var n=t.pstyle("shape-polygon-points").value;return e.nodeShapes.makePolygon(n).name;}return r;};lC={};lC.registerCalculationListeners=function(){var t=this.cy,e=t.collection(),r=this,n=o(function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),l)for(var u=0;u<s.length;u++){var h=s[u],f=h._private,d=f.rstyle;d.clean=!1,d.cleanConnected=!1;}},"enqueue");r.binder(t).on("bounds.* dirty.*",o(function(s){var l=s.target;n(l);},"onDirtyBounds")).on("style.* background.*",o(function(s){var l=s.target;n(l,!1);},"onDirtyStyle"));var i=o(function(s){if(s){var l=r.onUpdateEleCalcsFns;e.cleanStyle();for(var u=0;u<e.length;u++){var h=e[u],f=h._private.rstyle;h.isNode()&&!f.cleanConnected&&(n(h.connectedEdges()),f.cleanConnected=!0);}if(l)for(var d=0;d<l.length;d++){var p=l[d];p(s,e);}r.recalculateRenderedStyle(e),e=t.collection();}},"updateEleCalcs");r.flushRenderedStyleQueue=function(){i(!0);},r.beforeRender(i,r.beforeRenderPriorities.eleCalcs);};lC.onUpdateEleCalcs=function(t){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(t);};lC.recalculateRenderedStyle=function(t,e){var r=o(function(C){return C._private.rstyle.cleanConnected;},"isCleanConnected"),n=[],i=[];if(!this.destroyed){e===void 0&&(e=!0);for(var a=0;a<t.length;a++){var s=t[a],l=s._private,u=l.rstyle;s.isEdge()&&(!r(s.source())||!r(s.target()))&&(u.clean=!1),!(e&&u.clean||s.removed())&&s.pstyle("display").value!=="none"&&(l.group==="nodes"?i.push(s):n.push(s),u.clean=!0);}for(var h=0;h<i.length;h++){var f=i[h],d=f._private,p=d.rstyle,m=f.position();this.recalculateNodeLabelProjection(f),p.nodeX=m.x,p.nodeY=m.y,p.nodeW=f.pstyle("width").pfValue,p.nodeH=f.pstyle("height").pfValue;}this.recalculateEdgeProjections(n);for(var g=0;g<n.length;g++){var y=n[g],v=y._private,x=v.rstyle,b=v.rscratch;x.srcX=b.arrowStartX,x.srcY=b.arrowStartY,x.tgtX=b.arrowEndX,x.tgtY=b.arrowEndY,x.midX=b.midX,x.midY=b.midY,x.labelAngle=b.labelAngle,x.sourceLabelAngle=b.sourceLabelAngle,x.targetLabelAngle=b.targetLabelAngle;}}};cC={};cC.updateCachedGrabbedEles=function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var n=t[r],i=n._private.rscratch;n.grabbed()&&!n.isParent()?e.push(n):i.inDragLayer?t.drag.push(n):t.nondrag.push(n);}for(var r=0;r<e.length;r++){var n=e[r];t.drag.push(n);}}};cC.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null;};cC.getCachedZSortedEles=function(t){if(t||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(o1e),e.interactive=e.filter(function(r){return r.interactive();}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles();}else e=this.cachedZSortedEles;return e;};S1e={};[Zp,H6,Ua,y4,tF,Zc,E1e,lC,cC].forEach(function(t){ir(S1e,t);});C1e={};C1e.getCachedImage=function(t,e,r){var n=this,i=n.imageCache=n.imageCache||{},a=i[t];if(a)return a.image.complete||a.image.addEventListener("load",r),a.image;a=i[t]=i[t]||{};var s=a.image=new Image();s.addEventListener("load",r),s.addEventListener("error",function(){s.error=!0;});var l="data:",u=t.substring(0,l.length).toLowerCase()===l;return u||(e=e==="null"?null:e,s.crossOrigin=e),s.src=t,s;};oy={};oy.registerBinding=function(t,e,r,n){var i=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(t)){for(var a=[],s=0;s<t.length;s++){var l=t[s];if(l!==void 0){var u=this.binder(l);a.push(u.on.apply(u,i));}}return a;}var u=this.binder(t);return u.on.apply(u,i);};oy.binder=function(t){var e=this,r=e.cy.window(),n=t===r||t===r.document||t===r.document.body||gqe(t);if(e.supportsPassiveEvents==null){var i=!1;try{var a=Object.defineProperty({},"passive",{get:o(function(){return i=!0,!0;},"get")});r.addEventListener("test",null,a);}catch{}e.supportsPassiveEvents=i;}var s=o(function(u,h,f){var d=Array.prototype.slice.call(arguments);return n&&e.supportsPassiveEvents&&(d[2]={capture:f!==null&&f!==void 0?f:!1,passive:!1,once:!1}),e.bindings.push({target:t,args:d}),(t.addEventListener||t.on).apply(t,d),this;},"on");return{on:s,addEventListener:s,addListener:s,bind:s};};oy.nodeIsDraggable=function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable();};oy.nodeIsGrabbable=function(t){return this.nodeIsDraggable(t)&&t.interactive();};oy.load=function(){var t=this,e=t.cy.window(),r=o(function(q){return q.selected();},"isSelected"),n=o(function(q){var de=q.getRootNode();if(de&&de.nodeType===11&&de.host!==void 0)return de;},"getShadowRoot"),i=o(function(q,de,ie,oe){q==null&&(q=t.cy);for(var V=0;V<de.length;V++){var Te=de[V];q.emit({originalEvent:ie,type:Te,position:oe});}},"triggerEvents"),a=o(function(q){return q.shiftKey||q.metaKey||q.ctrlKey;},"isMultSelKeyDown"),s=o(function(q,de){var ie=!0;if(t.cy.hasCompoundNodes()&&q&&q.pannable())for(var oe=0;de&&oe<de.length;oe++){var q=de[oe];if(q.isNode()&&q.isParent()&&!q.pannable()){ie=!1;break;}}else ie=!0;return ie;},"allowPanningPassthrough"),l=o(function(q){q[0]._private.grabbed=!0;},"setGrabbed"),u=o(function(q){q[0]._private.grabbed=!1;},"setFreed"),h=o(function(q){q[0]._private.rscratch.inDragLayer=!0;},"setInDragLayer"),f=o(function(q){q[0]._private.rscratch.inDragLayer=!1;},"setOutDragLayer"),d=o(function(q){q[0]._private.rscratch.isGrabTarget=!0;},"setGrabTarget"),p=o(function(q){q[0]._private.rscratch.isGrabTarget=!1;},"removeGrabTarget"),m=o(function(q,de){var ie=de.addToList,oe=ie.has(q);!oe&&q.grabbable()&&!q.locked()&&(ie.merge(q),l(q));},"addToDragList"),g=o(function(q,de){if(q.cy().hasCompoundNodes()&&!(de.inDragLayer==null&&de.addToList==null)){var ie=q.descendants();de.inDragLayer&&(ie.forEach(h),ie.connectedEdges().forEach(h)),de.addToList&&m(ie,de);}},"addDescendantsToDrag"),y=o(function(q,de){de=de||{};var ie=q.cy().hasCompoundNodes();de.inDragLayer&&(q.forEach(h),q.neighborhood().stdFilter(function(oe){return!ie||oe.isEdge();}).forEach(h)),de.addToList&&q.forEach(function(oe){m(oe,de);}),g(q,de),b(q,{inDragLayer:de.inDragLayer}),t.updateCachedGrabbedEles();},"addNodesToDrag"),v=y,x=o(function(q){q&&(t.getCachedZSortedEles().forEach(function(de){u(de),f(de),p(de);}),t.updateCachedGrabbedEles());},"freeDraggedElements"),b=o(function(q,de){if(!(de.inDragLayer==null&&de.addToList==null)&&q.cy().hasCompoundNodes()){var ie=q.ancestors().orphans();if(!ie.same(q)){var oe=ie.descendants().spawnSelf().merge(ie).unmerge(q).unmerge(q.descendants()),V=oe.connectedEdges();de.inDragLayer&&(V.forEach(h),oe.forEach(h)),de.addToList&&oe.forEach(function(Te){m(Te,de);});}}},"updateAncestorsInDragLayer"),T=o(function(){document.activeElement!=null&&document.activeElement.blur!=null&&document.activeElement.blur();},"blurActiveDomElement"),C=typeof MutationObserver<"u",w=typeof ResizeObserver<"u";C?(t.removeObserver=new MutationObserver(function(xe){for(var q=0;q<xe.length;q++){var de=xe[q],ie=de.removedNodes;if(ie)for(var oe=0;oe<ie.length;oe++){var V=ie[oe];if(V===t.container){t.destroy();break;}}}}),t.container.parentNode&&t.removeObserver.observe(t.container.parentNode,{childList:!0})):t.registerBinding(t.container,"DOMNodeRemoved",function(xe){t.destroy();});var E=d4(function(){t.cy.resize();},100);C&&(t.styleObserver=new MutationObserver(E),t.styleObserver.observe(t.container,{attributes:!0})),t.registerBinding(e,"resize",E),w&&(t.resizeObserver=new ResizeObserver(E),t.resizeObserver.observe(t.container));var _=o(function(q,de){for(;q!=null;)de(q),q=q.parentNode;},"forEachUp"),A=o(function(){t.invalidateContainerClientCoordsCache();},"invalidateCoords");_(t.container,function(xe){t.registerBinding(xe,"transitionend",A),t.registerBinding(xe,"animationend",A),t.registerBinding(xe,"scroll",A);}),t.registerBinding(t.container,"contextmenu",function(xe){xe.preventDefault();});var D=o(function(){return t.selection[4]!==0;},"inBoxSelection"),O=o(function(q){for(var de=t.findContainerClientCoords(),ie=de[0],oe=de[1],V=de[2],Te=de[3],W=q.touches?q.touches:[q],pe=!1,ve=0;ve<W.length;ve++){var Pe=W[ve];if(ie<=Pe.clientX&&Pe.clientX<=ie+V&&oe<=Pe.clientY&&Pe.clientY<=oe+Te){pe=!0;break;}}if(!pe)return!1;for(var _e=t.container,be=q.target,Ve=be.parentNode,De=!1;Ve;){if(Ve===_e){De=!0;break;}Ve=Ve.parentNode;}return!!De;},"eventInContainer");t.registerBinding(t.container,"mousedown",o(function(q){if(O(q)&&!(t.hoverData.which===1&&q.which!==1)){q.preventDefault(),T(),t.hoverData.capture=!0,t.hoverData.which=q.which;var de=t.cy,ie=[q.clientX,q.clientY],oe=t.projectIntoViewport(ie[0],ie[1]),V=t.selection,Te=t.findNearestElements(oe[0],oe[1],!0,!1),W=Te[0],pe=t.dragData.possibleDragElements;t.hoverData.mdownPos=oe,t.hoverData.mdownGPos=ie;var ve=o(function(){t.hoverData.tapholdCancelled=!1,clearTimeout(t.hoverData.tapholdTimeout),t.hoverData.tapholdTimeout=setTimeout(function(){if(!t.hoverData.tapholdCancelled){var Ye=t.hoverData.down;Ye?Ye.emit({originalEvent:q,type:"taphold",position:{x:oe[0],y:oe[1]}}):de.emit({originalEvent:q,type:"taphold",position:{x:oe[0],y:oe[1]}});}},t.tapholdDuration);},"checkForTaphold");if(q.which==3){t.hoverData.cxtStarted=!0;var Pe={originalEvent:q,type:"cxttapstart",position:{x:oe[0],y:oe[1]}};W?(W.activate(),W.emit(Pe),t.hoverData.down=W):de.emit(Pe),t.hoverData.downTime=new Date().getTime(),t.hoverData.cxtDragged=!1;}else if(q.which==1){W&&W.activate();{if(W!=null&&t.nodeIsGrabbable(W)){var _e=o(function(Ye){return{originalEvent:q,type:Ye,position:{x:oe[0],y:oe[1]}};},"makeEvent"),be=o(function(Ye){Ye.emit(_e("grab"));},"triggerGrab");if(d(W),!W.selected())pe=t.dragData.possibleDragElements=de.collection(),v(W,{addToList:pe}),W.emit(_e("grabon")).emit(_e("grab"));else{pe=t.dragData.possibleDragElements=de.collection();var Ve=de.$(function(De){return De.isNode()&&De.selected()&&t.nodeIsGrabbable(De);});y(Ve,{addToList:pe}),W.emit(_e("grabon")),Ve.forEach(be);}t.redrawHint("eles",!0),t.redrawHint("drag",!0);}t.hoverData.down=W,t.hoverData.downs=Te,t.hoverData.downTime=new Date().getTime();}i(W,["mousedown","tapstart","vmousedown"],q,{x:oe[0],y:oe[1]}),W==null?(V[4]=1,t.data.bgActivePosistion={x:oe[0],y:oe[1]},t.redrawHint("select",!0),t.redraw()):W.pannable()&&(V[4]=1),ve();}V[0]=V[2]=oe[0],V[1]=V[3]=oe[1];}},"mousedownHandler"),!1);var R=n(t.container);t.registerBinding([e,R],"mousemove",o(function(q){var de=t.hoverData.capture;if(!(!de&&!O(q))){var ie=!1,oe=t.cy,V=oe.zoom(),Te=[q.clientX,q.clientY],W=t.projectIntoViewport(Te[0],Te[1]),pe=t.hoverData.mdownPos,ve=t.hoverData.mdownGPos,Pe=t.selection,_e=null;!t.hoverData.draggingEles&&!t.hoverData.dragging&&!t.hoverData.selecting&&(_e=t.findNearestElement(W[0],W[1],!0,!1));var be=t.hoverData.last,Ve=t.hoverData.down,De=[W[0]-Pe[2],W[1]-Pe[3]],Ye=t.dragData.possibleDragElements,at;if(ve){var Rt=Te[0]-ve[0],st=Rt*Rt,Ue=Te[1]-ve[1],ut=Ue*Ue,We=st+ut;t.hoverData.isOverThresholdDrag=at=We>=t.desktopTapThreshold2;}var lt=a(q);at&&(t.hoverData.tapholdCancelled=!0);var Xt=o(function(){var kt=t.hoverData.dragDelta=t.hoverData.dragDelta||[];kt.length===0?(kt.push(De[0]),kt.push(De[1])):(kt[0]+=De[0],kt[1]+=De[1]);},"updateDragDelta");ie=!0,i(_e,["mousemove","vmousemove","tapdrag"],q,{x:W[0],y:W[1]});var Tt=o(function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||oe.emit({originalEvent:q,type:"boxstart",position:{x:W[0],y:W[1]}}),Pe[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw();},"goIntoBoxMode");if(t.hoverData.which===3){if(at){var Mt={originalEvent:q,type:"cxtdrag",position:{x:W[0],y:W[1]}};Ve?Ve.emit(Mt):oe.emit(Mt),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||_e!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:q,type:"cxtdragout",position:{x:W[0],y:W[1]}}),t.hoverData.cxtOver=_e,_e&&_e.emit({originalEvent:q,type:"cxtdragover",position:{x:W[0],y:W[1]}}));}}else if(t.hoverData.dragging){if(ie=!0,oe.panningEnabled()&&oe.userPanningEnabled()){var bt;if(t.hoverData.justStartedPan){var ht=t.hoverData.mdownPos;bt={x:(W[0]-ht[0])*V,y:(W[1]-ht[1])*V},t.hoverData.justStartedPan=!1;}else bt={x:De[0]*V,y:De[1]*V};oe.panBy(bt),oe.emit("dragpan"),t.hoverData.dragged=!0;}W=t.projectIntoViewport(q.clientX,q.clientY);}else if(Pe[4]==1&&(Ve==null||Ve.pannable())){if(at){if(!t.hoverData.dragging&&oe.boxSelectionEnabled()&&(lt||!oe.panningEnabled()||!oe.userPanningEnabled()))Tt();else if(!t.hoverData.selecting&&oe.panningEnabled()&&oe.userPanningEnabled()){var St=s(Ve,t.hoverData.downs);St&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,Pe[4]=0,t.data.bgActivePosistion=H1(pe),t.redrawHint("select",!0),t.redraw());}Ve&&Ve.pannable()&&Ve.active()&&Ve.unactivate();}}else{if(Ve&&Ve.pannable()&&Ve.active()&&Ve.unactivate(),(!Ve||!Ve.grabbed())&&_e!=be&&(be&&i(be,["mouseout","tapdragout"],q,{x:W[0],y:W[1]}),_e&&i(_e,["mouseover","tapdragover"],q,{x:W[0],y:W[1]}),t.hoverData.last=_e),Ve)if(at){if(oe.boxSelectionEnabled()&&lt)Ve&&Ve.grabbed()&&(x(Ye),Ve.emit("freeon"),Ye.emit("free"),t.dragData.didDrag&&(Ve.emit("dragfreeon"),Ye.emit("dragfree"))),Tt();else if(Ve&&Ve.grabbed()&&t.nodeIsDraggable(Ve)){var ft=!t.dragData.didDrag;ft&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||y(Ye,{inDragLayer:!0});var vt={x:0,y:0};if(_t(De[0])&&_t(De[1])&&(vt.x+=De[0],vt.y+=De[1],ft)){var nt=t.hoverData.dragDelta;nt&&_t(nt[0])&&_t(nt[1])&&(vt.x+=nt[0],vt.y+=nt[1]);}t.hoverData.draggingEles=!0,Ye.silentShift(vt).emit("position drag"),t.redrawHint("drag",!0),t.redraw();}}else Xt();ie=!0;}if(Pe[2]=W[0],Pe[3]=W[1],ie)return q.stopPropagation&&q.stopPropagation(),q.preventDefault&&q.preventDefault(),!1;}},"mousemoveHandler"),!1);var k,L,S;t.registerBinding(e,"mouseup",o(function(q){if(!(t.hoverData.which===1&&q.which!==1&&t.hoverData.capture)){var de=t.hoverData.capture;if(de){t.hoverData.capture=!1;var ie=t.cy,oe=t.projectIntoViewport(q.clientX,q.clientY),V=t.selection,Te=t.findNearestElement(oe[0],oe[1],!0,!1),W=t.dragData.possibleDragElements,pe=t.hoverData.down,ve=a(q);if(t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,pe&&pe.unactivate(),t.hoverData.which===3){var Pe={originalEvent:q,type:"cxttapend",position:{x:oe[0],y:oe[1]}};if(pe?pe.emit(Pe):ie.emit(Pe),!t.hoverData.cxtDragged){var _e={originalEvent:q,type:"cxttap",position:{x:oe[0],y:oe[1]}};pe?pe.emit(_e):ie.emit(_e);}t.hoverData.cxtDragged=!1,t.hoverData.which=null;}else if(t.hoverData.which===1){if(i(Te,["mouseup","tapend","vmouseup"],q,{x:oe[0],y:oe[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(i(pe,["click","tap","vclick"],q,{x:oe[0],y:oe[1]}),L=!1,q.timeStamp-S<=ie.multiClickDebounceTime()?(k&&clearTimeout(k),L=!0,S=null,i(pe,["dblclick","dbltap","vdblclick"],q,{x:oe[0],y:oe[1]})):(k=setTimeout(function(){L||i(pe,["oneclick","onetap","voneclick"],q,{x:oe[0],y:oe[1]});},ie.multiClickDebounceTime()),S=q.timeStamp)),pe==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!a(q)&&(ie.$(r).unselect(["tapunselect"]),W.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=W=ie.collection()),Te==pe&&!t.dragData.didDrag&&!t.hoverData.selecting&&Te!=null&&Te._private.selectable&&(t.hoverData.dragging||(ie.selectionType()==="additive"||ve?Te.selected()?Te.unselect(["tapunselect"]):Te.select(["tapselect"]):ve||(ie.$(r).unmerge(Te).unselect(["tapunselect"]),Te.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var be=ie.collection(t.getAllInBox(V[0],V[1],V[2],V[3]));t.redrawHint("select",!0),be.length>0&&t.redrawHint("eles",!0),ie.emit({type:"boxend",originalEvent:q,position:{x:oe[0],y:oe[1]}});var Ve=o(function(at){return at.selectable()&&!at.selected();},"eleWouldBeSelected");ie.selectionType()==="additive"||ve||ie.$(r).unmerge(be).unselect(),be.emit("box").stdFilter(Ve).select().emit("boxselect"),t.redraw();}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!V[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var De=pe&&pe.grabbed();x(W),De&&(pe.emit("freeon"),W.emit("free"),t.dragData.didDrag&&(pe.emit("dragfreeon"),W.emit("dragfree")));}}V[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null;}}},"mouseupHandler"),!1);var I=o(function(q){if(!t.scrollingPage){var de=t.cy,ie=de.zoom(),oe=de.pan(),V=t.projectIntoViewport(q.clientX,q.clientY),Te=[V[0]*ie+oe.x,V[1]*ie+oe.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||D()){q.preventDefault();return;}if(de.panningEnabled()&&de.userPanningEnabled()&&de.zoomingEnabled()&&de.userZoomingEnabled()){q.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw();},150);var W;q.deltaY!=null?W=q.deltaY/-250:q.wheelDeltaY!=null?W=q.wheelDeltaY/1e3:W=q.wheelDelta/1e3,W=W*t.wheelSensitivity;var pe=q.deltaMode===1;pe&&(W*=33);var ve=de.zoom()*Math.pow(10,W);q.type==="gesturechange"&&(ve=t.gestureStartZoom*q.scale),de.zoom({level:ve,renderedPosition:{x:Te[0],y:Te[1]}}),de.emit(q.type==="gesturechange"?"pinchzoom":"scrollzoom");}}},"wheelHandler");t.registerBinding(t.container,"wheel",I,!0),t.registerBinding(e,"scroll",o(function(q){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1;},250);},"scrollHandler"),!0),t.registerBinding(t.container,"gesturestart",o(function(q){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||q.preventDefault();},"gestureStartHandler"),!0),t.registerBinding(t.container,"gesturechange",function(xe){t.hasTouchStarted||I(xe);},!0),t.registerBinding(t.container,"mouseout",o(function(q){var de=t.projectIntoViewport(q.clientX,q.clientY);t.cy.emit({originalEvent:q,type:"mouseout",position:{x:de[0],y:de[1]}});},"mouseOutHandler"),!1),t.registerBinding(t.container,"mouseover",o(function(q){var de=t.projectIntoViewport(q.clientX,q.clientY);t.cy.emit({originalEvent:q,type:"mouseover",position:{x:de[0],y:de[1]}});},"mouseOverHandler"),!1);var M,P,B,F,z,$,U,K,ee,Y,ce,Z,ue,Q=o(function(q,de,ie,oe){return Math.sqrt((ie-q)*(ie-q)+(oe-de)*(oe-de));},"distance"),j=o(function(q,de,ie,oe){return(ie-q)*(ie-q)+(oe-de)*(oe-de);},"distanceSq"),ne;t.registerBinding(t.container,"touchstart",ne=o(function(q){if(t.hasTouchStarted=!0,!!O(q)){T(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var de=t.cy,ie=t.touchData.now,oe=t.touchData.earlier;if(q.touches[0]){var V=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);ie[0]=V[0],ie[1]=V[1];}if(q.touches[1]){var V=t.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);ie[2]=V[0],ie[3]=V[1];}if(q.touches[2]){var V=t.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);ie[4]=V[0],ie[5]=V[1];}if(q.touches[1]){t.touchData.singleTouchMoved=!0,x(t.dragData.touchDragEles);var Te=t.findContainerClientCoords();ee=Te[0],Y=Te[1],ce=Te[2],Z=Te[3],M=q.touches[0].clientX-ee,P=q.touches[0].clientY-Y,B=q.touches[1].clientX-ee,F=q.touches[1].clientY-Y,ue=0<=M&&M<=ce&&0<=B&&B<=ce&&0<=P&&P<=Z&&0<=F&&F<=Z;var W=de.pan(),pe=de.zoom();z=Q(M,P,B,F),$=j(M,P,B,F),U=[(M+B)/2,(P+F)/2],K=[(U[0]-W.x)/pe,(U[1]-W.y)/pe];var ve=200,Pe=ve*ve;if($<Pe&&!q.touches[2]){var _e=t.findNearestElement(ie[0],ie[1],!0,!0),be=t.findNearestElement(ie[2],ie[3],!0,!0);_e&&_e.isNode()?(_e.activate().emit({originalEvent:q,type:"cxttapstart",position:{x:ie[0],y:ie[1]}}),t.touchData.start=_e):be&&be.isNode()?(be.activate().emit({originalEvent:q,type:"cxttapstart",position:{x:ie[0],y:ie[1]}}),t.touchData.start=be):de.emit({originalEvent:q,type:"cxttapstart",position:{x:ie[0],y:ie[1]}}),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,t.redraw();return;}}if(q.touches[2])de.boxSelectionEnabled()&&q.preventDefault();else if(!q.touches[1]){if(q.touches[0]){var Ve=t.findNearestElements(ie[0],ie[1],!0,!0),De=Ve[0];if(De!=null&&(De.activate(),t.touchData.start=De,t.touchData.starts=Ve,t.nodeIsGrabbable(De))){var Ye=t.dragData.touchDragEles=de.collection(),at=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),De.selected()?(at=de.$(function(We){return We.selected()&&t.nodeIsGrabbable(We);}),y(at,{addToList:Ye})):v(De,{addToList:Ye}),d(De);var Rt=o(function(lt){return{originalEvent:q,type:lt,position:{x:ie[0],y:ie[1]}};},"makeEvent");De.emit(Rt("grabon")),at?at.forEach(function(We){We.emit(Rt("grab"));}):De.emit(Rt("grab"));}i(De,["touchstart","tapstart","vmousedown"],q,{x:ie[0],y:ie[1]}),De==null&&(t.data.bgActivePosistion={x:V[0],y:V[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date(),clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout(function(){t.touchData.singleTouchMoved===!1&&!t.pinching&&!t.touchData.selecting&&i(t.touchData.start,["taphold"],q,{x:ie[0],y:ie[1]});},t.tapholdDuration);}}if(q.touches.length>=1){for(var st=t.touchData.startPosition=[null,null,null,null,null,null],Ue=0;Ue<ie.length;Ue++)st[Ue]=oe[Ue]=ie[Ue];var ut=q.touches[0];t.touchData.startGPosition=[ut.clientX,ut.clientY];}}},"touchstartHandler"),!1);var te;t.registerBinding(e,"touchmove",te=o(function(q){var de=t.touchData.capture;if(!(!de&&!O(q))){var ie=t.selection,oe=t.cy,V=t.touchData.now,Te=t.touchData.earlier,W=oe.zoom();if(q.touches[0]){var pe=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);V[0]=pe[0],V[1]=pe[1];}if(q.touches[1]){var pe=t.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);V[2]=pe[0],V[3]=pe[1];}if(q.touches[2]){var pe=t.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);V[4]=pe[0],V[5]=pe[1];}var ve=t.touchData.startGPosition,Pe;if(de&&q.touches[0]&&ve){for(var _e=[],be=0;be<V.length;be++)_e[be]=V[be]-Te[be];var Ve=q.touches[0].clientX-ve[0],De=Ve*Ve,Ye=q.touches[0].clientY-ve[1],at=Ye*Ye,Rt=De+at;Pe=Rt>=t.touchTapThreshold2;}if(de&&t.touchData.cxt){q.preventDefault();var st=q.touches[0].clientX-ee,Ue=q.touches[0].clientY-Y,ut=q.touches[1].clientX-ee,We=q.touches[1].clientY-Y,lt=j(st,Ue,ut,We),Xt=lt/$,Tt=150,Mt=Tt*Tt,bt=1.5,ht=bt*bt;if(Xt>=ht||lt>=Mt){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var St={originalEvent:q,type:"cxttapend",position:{x:V[0],y:V[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(St),t.touchData.start=null):oe.emit(St);}}if(de&&t.touchData.cxt){var St={originalEvent:q,type:"cxtdrag",position:{x:V[0],y:V[1]}};t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(St):oe.emit(St),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var ft=t.findNearestElement(V[0],V[1],!0,!0);(!t.touchData.cxtOver||ft!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:q,type:"cxtdragout",position:{x:V[0],y:V[1]}}),t.touchData.cxtOver=ft,ft&&ft.emit({originalEvent:q,type:"cxtdragover",position:{x:V[0],y:V[1]}}));}else if(de&&q.touches[2]&&oe.boxSelectionEnabled())q.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date(),t.touchData.selecting||oe.emit({originalEvent:q,type:"boxstart",position:{x:V[0],y:V[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,ie[4]=1,!ie||ie.length===0||ie[0]===void 0?(ie[0]=(V[0]+V[2]+V[4])/3,ie[1]=(V[1]+V[3]+V[5])/3,ie[2]=(V[0]+V[2]+V[4])/3+1,ie[3]=(V[1]+V[3]+V[5])/3+1):(ie[2]=(V[0]+V[2]+V[4])/3,ie[3]=(V[1]+V[3]+V[5])/3),t.redrawHint("select",!0),t.redraw();else if(de&&q.touches[1]&&!t.touchData.didSelect&&oe.zoomingEnabled()&&oe.panningEnabled()&&oe.userZoomingEnabled()&&oe.userPanningEnabled()){q.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var vt=t.dragData.touchDragEles;if(vt){t.redrawHint("drag",!0);for(var nt=0;nt<vt.length;nt++){var dn=vt[nt]._private;dn.grabbed=!1,dn.rscratch.inDragLayer=!1;}}var kt=t.touchData.start,st=q.touches[0].clientX-ee,Ue=q.touches[0].clientY-Y,ut=q.touches[1].clientX-ee,We=q.touches[1].clientY-Y,In=Q(st,Ue,ut,We),en=In/z;if(ue){var Nr=st-M,Mr=Ue-P,On=ut-B,Dt=We-F,Ce=(Nr+On)/2,tt=(Mr+Dt)/2,Ct=oe.zoom(),yr=Ct*en,tn=oe.pan(),gn=K[0]*Ct+tn.x,Qr=K[1]*Ct+tn.y,Mi={x:-yr/Ct*(gn-tn.x-Ce)+gn,y:-yr/Ct*(Qr-tn.y-tt)+Qr};if(kt&&kt.active()){var vt=t.dragData.touchDragEles;x(vt),t.redrawHint("drag",!0),t.redrawHint("eles",!0),kt.unactivate().emit("freeon"),vt.emit("free"),t.dragData.didDrag&&(kt.emit("dragfreeon"),vt.emit("dragfree"));}oe.viewport({zoom:yr,pan:Mi,cancelOnFailedZoom:!0}),oe.emit("pinchzoom"),z=In,M=st,P=Ue,B=ut,F=We,t.pinching=!0;}if(q.touches[0]){var pe=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);V[0]=pe[0],V[1]=pe[1];}if(q.touches[1]){var pe=t.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);V[2]=pe[0],V[3]=pe[1];}if(q.touches[2]){var pe=t.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);V[4]=pe[0],V[5]=pe[1];}}else if(q.touches[0]&&!t.touchData.didSelect){var Zn=t.touchData.start,En=t.touchData.last,ft;if(!t.hoverData.draggingEles&&!t.swipePanning&&(ft=t.findNearestElement(V[0],V[1],!0,!0)),de&&Zn!=null&&q.preventDefault(),de&&Zn!=null&&t.nodeIsDraggable(Zn))if(Pe){var vt=t.dragData.touchDragEles,Ur=!t.dragData.didDrag;Ur&&y(vt,{inDragLayer:!0}),t.dragData.didDrag=!0;var et={x:0,y:0};if(_t(_e[0])&&_t(_e[1])&&(et.x+=_e[0],et.y+=_e[1],Ur)){t.redrawHint("eles",!0);var gt=t.touchData.dragDelta;gt&&_t(gt[0])&&_t(gt[1])&&(et.x+=gt[0],et.y+=gt[1]);}t.hoverData.draggingEles=!0,vt.silentShift(et).emit("position drag"),t.redrawHint("drag",!0),t.touchData.startPosition[0]==Te[0]&&t.touchData.startPosition[1]==Te[1]&&t.redrawHint("eles",!0),t.redraw();}else{var gt=t.touchData.dragDelta=t.touchData.dragDelta||[];gt.length===0?(gt.push(_e[0]),gt.push(_e[1])):(gt[0]+=_e[0],gt[1]+=_e[1]);}if(i(Zn||ft,["touchmove","tapdrag","vmousemove"],q,{x:V[0],y:V[1]}),(!Zn||!Zn.grabbed())&&ft!=En&&(En&&En.emit({originalEvent:q,type:"tapdragout",position:{x:V[0],y:V[1]}}),ft&&ft.emit({originalEvent:q,type:"tapdragover",position:{x:V[0],y:V[1]}})),t.touchData.last=ft,de)for(var nt=0;nt<V.length;nt++)V[nt]&&t.touchData.startPosition[nt]&&Pe&&(t.touchData.singleTouchMoved=!0);if(de&&(Zn==null||Zn.pannable())&&oe.panningEnabled()&&oe.userPanningEnabled()){var Kt=s(Zn,t.touchData.starts);Kt&&(q.preventDefault(),t.data.bgActivePosistion||(t.data.bgActivePosistion=H1(t.touchData.startPosition)),t.swipePanning?(oe.panBy({x:_e[0]*W,y:_e[1]*W}),oe.emit("dragpan")):Pe&&(t.swipePanning=!0,oe.panBy({x:Ve*W,y:Ye*W}),oe.emit("dragpan"),Zn&&(Zn.unactivate(),t.redrawHint("select",!0),t.touchData.start=null)));var pe=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);V[0]=pe[0],V[1]=pe[1];}}for(var be=0;be<V.length;be++)Te[be]=V[be];de&&q.touches.length>0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw());}},"touchmoveHandler"),!1);var he;t.registerBinding(e,"touchcancel",he=o(function(q){var de=t.touchData.start;t.touchData.capture=!1,de&&de.unactivate();},"touchcancelHandler"));var le,J,Se,se;if(t.registerBinding(e,"touchend",le=o(function(q){var de=t.touchData.start,ie=t.touchData.capture;if(ie)q.touches.length===0&&(t.touchData.capture=!1),q.preventDefault();else return;var oe=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var V=t.cy,Te=V.zoom(),W=t.touchData.now,pe=t.touchData.earlier;if(q.touches[0]){var ve=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);W[0]=ve[0],W[1]=ve[1];}if(q.touches[1]){var ve=t.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);W[2]=ve[0],W[3]=ve[1];}if(q.touches[2]){var ve=t.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);W[4]=ve[0],W[5]=ve[1];}de&&de.unactivate();var Pe;if(t.touchData.cxt){if(Pe={originalEvent:q,type:"cxttapend",position:{x:W[0],y:W[1]}},de?de.emit(Pe):V.emit(Pe),!t.touchData.cxtDragged){var _e={originalEvent:q,type:"cxttap",position:{x:W[0],y:W[1]}};de?de.emit(_e):V.emit(_e);}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return;}if(!q.touches[2]&&V.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var be=V.collection(t.getAllInBox(oe[0],oe[1],oe[2],oe[3]));oe[0]=void 0,oe[1]=void 0,oe[2]=void 0,oe[3]=void 0,oe[4]=0,t.redrawHint("select",!0),V.emit({type:"boxend",originalEvent:q,position:{x:W[0],y:W[1]}});var Ve=o(function(Mt){return Mt.selectable()&&!Mt.selected();},"eleWouldBeSelected");be.emit("box").stdFilter(Ve).select().emit("boxselect"),be.nonempty()&&t.redrawHint("eles",!0),t.redraw();}if(de!==null&&de!==void 0&&de.unactivate(),q.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!q.touches[1]){if(!q.touches[0]){if(!q.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var De=t.dragData.touchDragEles;if(de!=null){var Ye=de._private.grabbed;x(De),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Ye&&(de.emit("freeon"),De.emit("free"),t.dragData.didDrag&&(de.emit("dragfreeon"),De.emit("dragfree"))),i(de,["touchend","tapend","vmouseup","tapdragout"],q,{x:W[0],y:W[1]}),de.unactivate(),t.touchData.start=null;}else{var at=t.findNearestElement(W[0],W[1],!0,!0);i(at,["touchend","tapend","vmouseup","tapdragout"],q,{x:W[0],y:W[1]});}var Rt=t.touchData.startPosition[0]-W[0],st=Rt*Rt,Ue=t.touchData.startPosition[1]-W[1],ut=Ue*Ue,We=st+ut,lt=We*Te*Te;t.touchData.singleTouchMoved||(de||V.$(":selected").unselect(["tapunselect"]),i(de,["tap","vclick"],q,{x:W[0],y:W[1]}),J=!1,q.timeStamp-se<=V.multiClickDebounceTime()?(Se&&clearTimeout(Se),J=!0,se=null,i(de,["dbltap","vdblclick"],q,{x:W[0],y:W[1]})):(Se=setTimeout(function(){J||i(de,["onetap","voneclick"],q,{x:W[0],y:W[1]});},V.multiClickDebounceTime()),se=q.timeStamp)),de!=null&&!t.dragData.didDrag&&de._private.selectable&&lt<t.touchTapThreshold2&&!t.pinching&&(V.selectionType()==="single"?(V.$(r).unmerge(de).unselect(["tapunselect"]),de.select(["tapselect"])):de.selected()?de.unselect(["tapunselect"]):de.select(["tapselect"]),t.redrawHint("eles",!0)),t.touchData.singleTouchMoved=!0;}}}for(var Xt=0;Xt<W.length;Xt++)pe[Xt]=W[Xt];t.dragData.didDrag=!1,q.touches.length===0&&(t.touchData.dragDelta=[],t.touchData.startPosition=[null,null,null,null,null,null],t.touchData.startGPosition=null,t.touchData.didSelect=!1),q.touches.length<2&&(q.touches.length===1&&(t.touchData.startGPosition=[q.touches[0].clientX,q.touches[0].clientY]),t.pinching=!1,t.redrawHint("eles",!0),t.redraw());},"touchendHandler"),!1),typeof TouchEvent>"u"){var ae=[],Oe=o(function(q){return{clientX:q.clientX,clientY:q.clientY,force:1,identifier:q.pointerId,pageX:q.pageX,pageY:q.pageY,radiusX:q.width/2,radiusY:q.height/2,screenX:q.screenX,screenY:q.screenY,target:q.target};},"makeTouch"),ye=o(function(q){return{event:q,touch:Oe(q)};},"makePointer"),Be=o(function(q){ae.push(ye(q));},"addPointer"),He=o(function(q){for(var de=0;de<ae.length;de++){var ie=ae[de];if(ie.event.pointerId===q.pointerId){ae.splice(de,1);return;}}},"removePointer"),ze=o(function(q){var de=ae.filter(function(ie){return ie.event.pointerId===q.pointerId;})[0];de.event=q,de.touch=Oe(q);},"updatePointer"),Le=o(function(q){q.touches=ae.map(function(de){return de.touch;});},"addTouchesToEvent"),Ie=o(function(q){return q.pointerType==="mouse"||q.pointerType===4;},"pointerIsMouse");t.registerBinding(t.container,"pointerdown",function(xe){Ie(xe)||(xe.preventDefault(),Be(xe),Le(xe),ne(xe));}),t.registerBinding(t.container,"pointerup",function(xe){Ie(xe)||(He(xe),Le(xe),le(xe));}),t.registerBinding(t.container,"pointercancel",function(xe){Ie(xe)||(He(xe),Le(xe),he(xe));}),t.registerBinding(t.container,"pointermove",function(xe){Ie(xe)||(xe.preventDefault(),ze(xe),Le(xe),te(xe));});}};rh={};rh.generatePolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,draw:o(function(n,i,a,s,l,u){this.renderer.nodeShapeImpl("polygon",n,i,a,s,l,this.points);},"draw"),intersectLine:o(function(n,i,a,s,l,u,h,f){return i4(l,u,this.points,n,i,a/2,s/2,h);},"intersectLine"),checkPoint:o(function(n,i,a,s,l,u,h,f){return eh(n,i,this.points,u,h,s,l,[0,-1],a);},"checkPoint")};};rh.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:o(function(e,r,n,i,a,s){this.renderer.nodeShapeImpl(this.name,e,r,n,i,a);},"draw"),intersectLine:o(function(e,r,n,i,a,s,l,u){return lXe(a,s,e,r,n/2+l,i/2+l);},"intersectLine"),checkPoint:o(function(e,r,n,i,a,s,l,u){return Wp(e,r,i,a,s,l,n);},"checkPoint")};};rh.generateRoundPolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,getOrCreateCorners:o(function(n,i,a,s,l,u,h){if(u[h]!==void 0&&u[h+"-cx"]===n&&u[h+"-cy"]===i)return u[h];u[h]=new Array(e.length/2),u[h+"-cx"]=n,u[h+"-cy"]=i;var f=a/2,d=s/2;l=l==="auto"?Dge(a,s):l;for(var p=new Array(e.length/2),m=0;m<e.length/2;m++)p[m]={x:n+f*e[m*2],y:i+d*e[m*2+1]};var g,y,v,x,b=p.length;for(y=p[b-1],g=0;g<b;g++)v=p[g%b],x=p[(g+1)%b],u[h][g]=eF(y,v,x,l),y=v,v=x;return u[h];},"getOrCreateCorners"),draw:o(function(n,i,a,s,l,u,h){this.renderer.nodeShapeImpl("round-polygon",n,i,a,s,l,this.points,this.getOrCreateCorners(i,a,s,l,u,h,"drawCorners"));},"draw"),intersectLine:o(function(n,i,a,s,l,u,h,f,d){return cXe(l,u,this.points,n,i,a,s,h,this.getOrCreateCorners(n,i,a,s,f,d,"corners"));},"intersectLine"),checkPoint:o(function(n,i,a,s,l,u,h,f,d){return oXe(n,i,this.points,u,h,s,l,this.getOrCreateCorners(u,h,s,l,f,d,"corners"));},"checkPoint")};};rh.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:ys(4,0),draw:o(function(e,r,n,i,a,s){this.renderer.nodeShapeImpl(this.name,e,r,n,i,a,this.points,s);},"draw"),intersectLine:o(function(e,r,n,i,a,s,l,u){return Age(a,s,e,r,n,i,l,u);},"intersectLine"),checkPoint:o(function(e,r,n,i,a,s,l,u){var h=i/2,f=a/2;u=u==="auto"?Xp(i,a):u,u=Math.min(h,f,u);var d=u*2;return!!(eh(e,r,this.points,s,l,i,a-d,[0,-1],n)||eh(e,r,this.points,s,l,i-d,a,[0,-1],n)||Wp(e,r,d,d,s-h+u,l-f+u,n)||Wp(e,r,d,d,s+h-u,l-f+u,n)||Wp(e,r,d,d,s+h-u,l+f-u,n)||Wp(e,r,d,d,s-h+u,l+f-u,n));},"checkPoint")};};rh.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:VB(),points:ys(4,0),draw:o(function(e,r,n,i,a,s){this.renderer.nodeShapeImpl(this.name,e,r,n,i,a,null,s);},"draw"),generateCutTrianglePts:o(function(e,r,n,i,a){var s=a==="auto"?this.cornerLength:a,l=r/2,u=e/2,h=n-u,f=n+u,d=i-l,p=i+l;return{topLeft:[h,d+s,h+s,d,h+s,d+s],topRight:[f-s,d,f,d+s,f-s,d+s],bottomRight:[f,p-s,f-s,p,f-s,p-s],bottomLeft:[h+s,p,h,p-s,h+s,p-s]};},"generateCutTrianglePts"),intersectLine:o(function(e,r,n,i,a,s,l,u){var h=this.generateCutTrianglePts(n+2*l,i+2*l,e,r,u),f=[].concat.apply([],[h.topLeft.splice(0,4),h.topRight.splice(0,4),h.bottomRight.splice(0,4),h.bottomLeft.splice(0,4)]);return i4(a,s,f,e,r);},"intersectLine"),checkPoint:o(function(e,r,n,i,a,s,l,u){var h=u==="auto"?this.cornerLength:u;if(eh(e,r,this.points,s,l,i,a-2*h,[0,-1],n)||eh(e,r,this.points,s,l,i-2*h,a,[0,-1],n))return!0;var f=this.generateCutTrianglePts(i,a,s,l);return Hs(e,r,f.topLeft)||Hs(e,r,f.topRight)||Hs(e,r,f.bottomRight)||Hs(e,r,f.bottomLeft);},"checkPoint")};};rh.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:ys(4,0),draw:o(function(e,r,n,i,a,s){this.renderer.nodeShapeImpl(this.name,e,r,n,i,a);},"draw"),intersectLine:o(function(e,r,n,i,a,s,l,u){var h=.15,f=.5,d=.85,p=this.generateBarrelBezierPts(n+2*l,i+2*l,e,r),m=o(function(v){var x=q1({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},h),b=q1({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},f),T=q1({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},d);return[v[0],v[1],x.x,x.y,b.x,b.y,T.x,T.y,v[4],v[5]];},"approximateBarrelCurvePts"),g=[].concat(m(p.topLeft),m(p.topRight),m(p.bottomRight),m(p.bottomLeft));return i4(a,s,g,e,r);},"intersectLine"),generateBarrelBezierPts:o(function(e,r,n,i){var a=r/2,s=e/2,l=n-s,u=n+s,h=i-a,f=i+a,d=xB(e,r),p=d.heightOffset,m=d.widthOffset,g=d.ctrlPtOffsetPct*e,y={topLeft:[l,h+p,l+g,h,l+m,h],topRight:[u-m,h,u-g,h,u,h+p],bottomRight:[u,f-p,u-g,f,u-m,f],bottomLeft:[l+m,f,l+g,f,l,f-p]};return y.topLeft.isTop=!0,y.topRight.isTop=!0,y.bottomLeft.isBottom=!0,y.bottomRight.isBottom=!0,y;},"generateBarrelBezierPts"),checkPoint:o(function(e,r,n,i,a,s,l,u){var h=xB(i,a),f=h.heightOffset,d=h.widthOffset;if(eh(e,r,this.points,s,l,i,a-2*f,[0,-1],n)||eh(e,r,this.points,s,l,i-2*d,a,[0,-1],n))return!0;for(var p=this.generateBarrelBezierPts(i,a,s,l),m=o(function(A,D,O){var R=O[4],k=O[2],L=O[0],S=O[5],I=O[1],M=Math.min(R,L),P=Math.max(R,L),B=Math.min(S,I),F=Math.max(S,I);if(M<=A&&A<=P&&B<=D&&D<=F){var z=uXe(R,k,L),$=nXe(z[0],z[1],z[2],A),U=$.filter(function(K){return 0<=K&&K<=1;});if(U.length>0)return U[0];}return null;},"getCurveT"),g=Object.keys(p),y=0;y<g.length;y++){var v=g[y],x=p[v],b=m(e,r,x);if(b!=null){var T=x[5],C=x[3],w=x[1],E=ia(T,C,w,b);if(x.isTop&&E<=r||x.isBottom&&r<=E)return!0;}}return!1;},"checkPoint")};};rh.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:ys(4,0),draw:o(function(e,r,n,i,a,s){this.renderer.nodeShapeImpl(this.name,e,r,n,i,a,this.points,s);},"draw"),intersectLine:o(function(e,r,n,i,a,s,l,u){var h=e-(n/2+l),f=r-(i/2+l),d=f,p=e+(n/2+l),m=_f(a,s,e,r,h,f,p,d,!1);return m.length>0?m:Age(a,s,e,r,n,i,l,u);},"intersectLine"),checkPoint:o(function(e,r,n,i,a,s,l,u){u=u==="auto"?Xp(i,a):u;var h=2*u;if(eh(e,r,this.points,s,l,i,a-h,[0,-1],n)||eh(e,r,this.points,s,l,i-h,a,[0,-1],n))return!0;var f=i/2+2*n,d=a/2+2*n,p=[s-f,l-d,s-f,l,s+f,l,s+f,l-d];return!!(Hs(e,r,p)||Wp(e,r,h,h,s+i/2-u,l+a/2-u,n)||Wp(e,r,h,h,s-i/2+u,l+a/2-u,n));},"checkPoint")};};rh.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",ys(3,0)),this.generateRoundPolygon("round-triangle",ys(3,0)),this.generatePolygon("rectangle",ys(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r);}this.generatePolygon("pentagon",ys(5,0)),this.generateRoundPolygon("round-pentagon",ys(5,0)),this.generatePolygon("hexagon",ys(6,0)),this.generateRoundPolygon("round-hexagon",ys(6,0)),this.generatePolygon("heptagon",ys(7,0)),this.generateRoundPolygon("round-heptagon",ys(7,0)),this.generatePolygon("octagon",ys(8,0)),this.generateRoundPolygon("round-octagon",ys(8,0));var n=new Array(20);{var i=vB(5,0),a=vB(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var l=0;l<a.length/2;l++)a[l*2]*=s,a[l*2+1]*=s;for(var l=0;l<20/4;l++)n[l*4]=i[l*2],n[l*4+1]=i[l*2+1],n[l*4+2]=a[l*2],n[l*4+3]=a[l*2+1];}n=_ge(n),this.generatePolygon("star",n),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);{var u=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",u),this.generateRoundPolygon("round-tag",u);}t.makePolygon=function(h){var f=h.join("$"),d="polygon-"+f,p;return(p=this[d])?p:e.generatePolygon(d,h);};};v4={};v4.timeToRender=function(){return this.redrawTotalTime/this.redrawCount;};v4.redraw=function(t){t=t||wge();var e=this;e.averageRedrawTime===void 0&&(e.averageRedrawTime=0),e.lastRedrawTime===void 0&&(e.lastRedrawTime=0),e.lastDrawTime===void 0&&(e.lastDrawTime=0),e.requestedFrame=!0,e.renderOptions=t;};v4.beforeRender=function(t,e){if(!this.destroyed){e==null&&oi("Priority is not optional for beforeRender");var r=this.beforeRenderCallbacks;r.push({fn:t,priority:e}),r.sort(function(n,i){return i.priority-n.priority;});}};Vme=o(function(e,r,n){for(var i=e.beforeRenderCallbacks,a=0;a<i.length;a++)i[a].fn(r,n);},"beforeRenderCallbacks");v4.startRenderLoop=function(){var t=this,e=t.cy;if(!t.renderLoopStarted){t.renderLoopStarted=!0;var r=o(function n(i){if(!t.destroyed){if(!e.batching())if(t.requestedFrame&&!t.skipFrame){Vme(t,!0,i);var a=Ju();t.render(t.renderOptions);var s=t.lastDrawTime=Ju();t.averageRedrawTime===void 0&&(t.averageRedrawTime=s-a),t.redrawCount===void 0&&(t.redrawCount=0),t.redrawCount++,t.redrawTotalTime===void 0&&(t.redrawTotalTime=0);var l=s-a;t.redrawTotalTime+=l,t.lastRedrawTime=l,t.averageRedrawTime=t.averageRedrawTime/2+l/2,t.requestedFrame=!1;}else Vme(t,!1,i);t.skipFrame=!1,P6(n);}},"renderFn");P6(r);}};WZe=o(function(e){this.init(e);},"BaseRenderer"),A1e=WZe,ly=A1e.prototype;ly.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"];ly.init=function(t){var e=this;e.options=t,e.cy=t.cy;var r=e.container=t.cy.container(),n=e.cy.window();if(n){var i=n.document,a=i.head,s="__________cytoscape_stylesheet",l="__________cytoscape_container",u=i.getElementById(s)!=null;if(r.className.indexOf(l)<0&&(r.className=(r.className||"")+" "+l),!u){var h=i.createElement("style");h.id=s,h.textContent="."+l+" { position: relative; }",a.insertBefore(h,a.children[0]);}var f=n.getComputedStyle(r),d=f.getPropertyValue("position");d==="static"&&un("A Cytoscape container has style position:static and so can not use UI extensions properly");}e.selection=[void 0,void 0,void 0,void 0,0],e.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],e.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},e.dragData={possibleDragElements:[]},e.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},e.redraws=0,e.showFps=t.showFps,e.debug=t.debug,e.webgl=t.webgl,e.hideEdgesOnViewport=t.hideEdgesOnViewport,e.textureOnViewport=t.textureOnViewport,e.wheelSensitivity=t.wheelSensitivity,e.motionBlurEnabled=t.motionBlur,e.forcedPixelRatio=_t(t.pixelRatio)?t.pixelRatio:null,e.motionBlur=t.motionBlur,e.motionBlurOpacity=t.motionBlurOpacity,e.motionBlurTransparency=1-e.motionBlurOpacity,e.motionBlurPxRatio=1,e.mbPxRBlurry=1,e.minMbLowQualFrames=4,e.fullQualityMb=!1,e.clearedForMotionBlur=[],e.desktopTapThreshold=t.desktopTapThreshold,e.desktopTapThreshold2=t.desktopTapThreshold*t.desktopTapThreshold,e.touchTapThreshold=t.touchTapThreshold,e.touchTapThreshold2=t.touchTapThreshold*t.touchTapThreshold,e.tapholdDuration=500,e.bindings=[],e.beforeRenderCallbacks=[],e.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},e.registerNodeShapes(),e.registerArrowShapes(),e.registerCalculationListeners();};ly.notify=function(t,e){var r=this,n=r.cy;if(!this.destroyed){if(t==="init"){r.load();return;}if(t==="destroy"){r.destroy();return;}(t==="add"||t==="remove"||t==="move"&&n.hasCompoundNodes()||t==="load"||t==="zorder"||t==="mount")&&r.invalidateCachedZSortedEles(),t==="viewport"&&r.redrawHint("select",!0),t==="gc"&&r.redrawHint("gc",!0),(t==="load"||t==="resize"||t==="mount")&&(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container)),r.redrawHint("eles",!0),r.redrawHint("drag",!0),this.startRenderLoop(),this.redraw();}};ly.destroy=function(){var t=this;t.destroyed=!0,t.cy.stopAnimationLoop();for(var e=0;e<t.bindings.length;e++){var r=t.bindings[e],n=r,i=n.target;(i.off||i.removeEventListener).apply(i,n.args);}if(t.bindings=[],t.beforeRenderCallbacks=[],t.onUpdateEleCalcsFns=[],t.removeObserver&&t.removeObserver.disconnect(),t.styleObserver&&t.styleObserver.disconnect(),t.resizeObserver&&t.resizeObserver.disconnect(),t.labelCalcDiv)try{document.body.removeChild(t.labelCalcDiv);}catch{}};ly.isHeadless=function(){return!1;};[JB,S1e,C1e,oy,rh,v4].forEach(function(t){ir(ly,t);});hB=1e3/60,_1e={setupDequeueing:o(function(e){return o(function(){var n=this,i=this.renderer;if(!n.dequeueingSetup){n.dequeueingSetup=!0;var a=d4(function(){i.redrawHint("eles",!0),i.redrawHint("drag",!0),i.redraw();},e.deqRedrawThreshold),s=o(function(h,f){var d=Ju(),p=i.averageRedrawTime,m=i.lastRedrawTime,g=[],y=i.cy.extent(),v=i.getPixelRatio();for(h||i.flushRenderedStyleQueue();;){var x=Ju(),b=x-d,T=x-f;if(m<hB){var C=hB-(h?p:0);if(T>=e.deqFastCost*C)break;}else if(h){if(b>=e.deqCost*m||b>=e.deqAvgCost*p)break;}else if(T>=e.deqNoDrawCost*hB)break;var w=e.deq(n,v,y);if(w.length>0)for(var E=0;E<w.length;E++)g.push(w[E]);else break;}g.length>0&&(e.onDeqd(n,g),!h&&e.shouldRedraw(n,g,v,y)&&a());},"dequeue"),l=e.priority||FB;i.beforeRender(s,l(n));}},"setupDequeueingImpl");},"setupDequeueing")},qZe=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:B6;Bf(this,t),this.idsByKey=new Kc(),this.keyForId=new Kc(),this.cachesByLvl=new Kc(),this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r;}return o(t,"ElementTextureCacheLookup"),Ff(t,[{key:"getIdsFor",value:o(function(r){r==null&&oi("Can not get id list for null key");var n=this.idsByKey,i=this.idsByKey.get(r);return i||(i=new ey(),n.set(r,i)),i;},"getIdsFor")},{key:"addIdForKey",value:o(function(r,n){r!=null&&this.getIdsFor(r).add(n);},"addIdForKey")},{key:"deleteIdForKey",value:o(function(r,n){r!=null&&this.getIdsFor(r).delete(n);},"deleteIdForKey")},{key:"getNumberOfIdsForKey",value:o(function(r){return r==null?0:this.getIdsFor(r).size;},"getNumberOfIdsForKey")},{key:"updateKeyMappingFor",value:o(function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);this.deleteIdForKey(i,n),this.addIdForKey(a,n),this.keyForId.set(n,a);},"updateKeyMappingFor")},{key:"deleteKeyMappingFor",value:o(function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteIdForKey(i,n),this.keyForId.delete(n);},"deleteKeyMappingFor")},{key:"keyHasChangedFor",value:o(function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);return i!==a;},"keyHasChangedFor")},{key:"isInvalid",value:o(function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r);},"isInvalid")},{key:"getCachesAt",value:o(function(r){var n=this.cachesByLvl,i=this.lvls,a=n.get(r);return a||(a=new Kc(),n.set(r,a),i.push(r)),a;},"getCachesAt")},{key:"getCache",value:o(function(r,n){return this.getCachesAt(n).get(r);},"getCache")},{key:"get",value:o(function(r,n){var i=this.getKey(r),a=this.getCache(i,n);return a!=null&&this.updateKeyMappingFor(r),a;},"get")},{key:"getForCachedKey",value:o(function(r,n){var i=this.keyForId.get(r.id()),a=this.getCache(i,n);return a;},"getForCachedKey")},{key:"hasCache",value:o(function(r,n){return this.getCachesAt(n).has(r);},"hasCache")},{key:"has",value:o(function(r,n){var i=this.getKey(r);return this.hasCache(i,n);},"has")},{key:"setCache",value:o(function(r,n,i){i.key=r,this.getCachesAt(n).set(r,i);},"setCache")},{key:"set",value:o(function(r,n,i){var a=this.getKey(r);this.setCache(a,n,i),this.updateKeyMappingFor(r);},"set")},{key:"deleteCache",value:o(function(r,n){this.getCachesAt(n).delete(r);},"deleteCache")},{key:"delete",value:o(function(r,n){var i=this.getKey(r);this.deleteCache(i,n);},"_delete")},{key:"invalidateKey",value:o(function(r){var n=this;this.lvls.forEach(function(i){return n.deleteCache(r,i);});},"invalidateKey")},{key:"invalidate",value:o(function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteKeyMappingFor(r);var a=this.doesEleInvalidateKey(r);return a&&this.invalidateKey(i),a||this.getNumberOfIdsForKey(i)===0;},"invalidate")}]),t;}(),Ume=25,k6=50,I6=-4,LB=3,D1e=7.99,YZe=8,XZe=1024,jZe=1024,KZe=1024,QZe=.2,ZZe=.8,JZe=10,eJe=.15,tJe=.1,rJe=.9,nJe=.9,iJe=100,aJe=1,W1={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},sJe=aa({getKey:null,doesEleInvalidateKey:B6,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:xge,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Xb=o(function(e,r){var n=this;n.renderer=e,n.onDequeues=[];var i=sJe(r);ir(n,i),n.lookup=new qZe(i.getKey,i.doesEleInvalidateKey),n.setupDequeueing();},"ElementTextureCache"),Wi=Xb.prototype;Wi.reasons=W1;Wi.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[];};Wi.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},n=r[t]=r[t]||[];return n;};Wi.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new p4(function(r,n){return n.reqs-r.reqs;});return e;};Wi.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e;};Wi.getElement=function(t,e,r,n,i){var a=this,s=this.renderer,l=s.cy.zoom(),u=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!a.allowEdgeTxrCaching&&t.isEdge()||!a.allowParentTxrCaching&&t.isParent())return null;if(n==null&&(n=Math.ceil(zB(l*r))),n<I6)n=I6;else if(l>=D1e||n>LB)return null;var h=Math.pow(2,n),f=e.h*h,d=e.w*h,p=s.eleTextBiggerThanMin(t,h);if(!this.isVisible(t,p))return null;var m=u.get(t,n);if(m&&m.invalidated&&(m.invalidated=!1,m.texture.invalidatedWidth-=m.width),m)return m;var g;if(f<=Ume?g=Ume:f<=k6?g=k6:g=Math.ceil(f/k6)*k6,f>KZe||d>jZe)return null;var y=a.getTextureQueue(g),v=y[y.length-2],x=o(function(){return a.recycleTexture(g,d)||a.addTexture(g,d);},"addNewTxr");v||(v=y[y.length-1]),v||(v=x()),v.width-v.usedWidth<d&&(v=x());for(var b=o(function(M){return M&&M.scaledLabelShown===p;},"scalableFrom"),T=i&&i===W1.dequeue,C=i&&i===W1.highQuality,w=i&&i===W1.downscale,E,_=n+1;_<=LB;_++){var A=u.get(t,_);if(A){E=A;break;}}var D=E&&E.level===n+1?E:null,O=o(function(){v.context.drawImage(D.texture.canvas,D.x,0,D.width,D.height,v.usedWidth,0,d,f);},"downscale");if(v.context.setTransform(1,0,0,1,0,0),v.context.clearRect(v.usedWidth,0,d,g),b(D))O();else if(b(E)){if(C){for(var R=E.level;R>n;R--)D=a.getElement(t,e,r,R,W1.downscale);O();}else return a.queueElement(t,E.level-1),E;}else{var k;if(!T&&!C&&!w)for(var L=n-1;L>=I6;L--){var S=u.get(t,L);if(S){k=S;break;}}if(b(k))return a.queueElement(t,n),k;v.context.translate(v.usedWidth,0),v.context.scale(h,h),this.drawElement(v.context,t,e,p,!1),v.context.scale(1/h,1/h),v.context.translate(-v.usedWidth,0);}return m={x:v.usedWidth,texture:v,level:n,scale:h,width:d,height:f,scaledLabelShown:p},v.usedWidth+=Math.ceil(d+YZe),v.eleCaches.push(m),u.set(t,n,m),a.checkTextureFullness(v),m;};Wi.invalidateElements=function(t){for(var e=0;e<t.length;e++)this.invalidateElement(t[e]);};Wi.invalidateElement=function(t){var e=this,r=e.lookup,n=[],i=r.isInvalid(t);if(i){for(var a=I6;a<=LB;a++){var s=r.getForCachedKey(t,a);s&&n.push(s);}var l=r.invalidate(t);if(l)for(var u=0;u<n.length;u++){var h=n[u],f=h.texture;f.invalidatedWidth+=h.width,h.invalidated=!0,e.checkTextureUtility(f);}e.removeFromQueue(t);}};Wi.checkTextureUtility=function(t){t.invalidatedWidth>=QZe*t.width&&this.retireTexture(t);};Wi.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>ZZe&&t.fullnessChecks>=JZe?Mf(r,t):t.fullnessChecks++;};Wi.retireTexture=function(t){var e=this,r=t.height,n=e.getTextureQueue(r),i=this.lookup;Mf(n,t),t.retired=!0;for(var a=t.eleCaches,s=0;s<a.length;s++){var l=a[s];i.deleteCache(l.key,l.level);}$B(a);var u=e.getRetiredTextureQueue(r);u.push(t);};Wi.addTexture=function(t,e){var r=this,n=r.getTextureQueue(t),i={};return n.push(i),i.eleCaches=[],i.height=t,i.width=Math.max(XZe,e),i.usedWidth=0,i.invalidatedWidth=0,i.fullnessChecks=0,i.canvas=r.renderer.makeOffscreenCanvas(i.width,i.height),i.context=i.canvas.getContext("2d"),i;};Wi.recycleTexture=function(t,e){for(var r=this,n=r.getTextureQueue(t),i=r.getRetiredTextureQueue(t),a=0;a<i.length;a++){var s=i[a];if(s.width>=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,$B(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),Mf(i,s),n.push(s),s;}};Wi.queueElement=function(t,e){var r=this,n=r.getElementQueue(),i=r.getElementKeyToQueue(),a=this.getKey(t),s=i[a];if(s)s.level=Math.max(s.level,e),s.eles.merge(t),s.reqs++,n.updateItem(s);else{var l={eles:t.spawn().merge(t),level:e,reqs:1,key:a};n.push(l),i[a]=l;}};Wi.dequeue=function(t){for(var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=[],a=e.lookup,s=0;s<aJe&&r.size()>0;s++){var l=r.pop(),u=l.key,h=l.eles[0],f=a.hasCache(h,l.level);if(n[u]=null,f)continue;i.push(l);var d=e.getBoundingBox(h);e.getElement(h,d,t,l.level,W1.dequeue);}return i;};Wi.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=this.getKey(t),a=n[i];a!=null&&(a.eles.length===1?(a.reqs=BB,r.updateItem(a),r.pop(),n[i]=null):a.eles.unmerge(t));};Wi.onDequeue=function(t){this.onDequeues.push(t);};Wi.offDequeue=function(t){Mf(this.onDequeues,t);};Wi.setupDequeueing=_1e.setupDequeueing({deqRedrawThreshold:iJe,deqCost:eJe,deqAvgCost:tJe,deqNoDrawCost:rJe,deqFastCost:nJe,deq:o(function(e,r,n){return e.dequeue(r,n);},"deq"),onDeqd:o(function(e,r){for(var n=0;n<e.onDequeues.length;n++){var i=e.onDequeues[n];i(r);}},"onDeqd"),shouldRedraw:o(function(e,r,n,i){for(var a=0;a<r.length;a++)for(var s=r[a].eles,l=0;l<s.length;l++){var u=s[l].boundingBox();if(GB(u,i))return!0;}return!1;},"shouldRedraw"),priority:o(function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq;},"priority")});oJe=1,Kb=-4,W6=2,lJe=3.99,cJe=50,uJe=50,hJe=.15,fJe=.1,dJe=.9,pJe=.9,mJe=1,Hme=250,gJe=4e3*4e3,Wme=32767,yJe=!0,L1e=o(function(e){var r=this,n=r.renderer=e,i=n.cy;r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=Ju()-2*Hme,r.skipping=!1,r.eleTxrDeqs=i.collection(),r.scheduleElementRefinement=d4(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs);},uJe),n.beforeRender(function(s,l){l-r.lastInvalidationTime<=Hme?r.skipping=!0:r.skipping=!1;},n.beforeRenderPriorities.lyrTxrSkip);var a=o(function(l,u){return u.reqs-l.reqs;},"qSort");r.layersQueue=new p4(a),r.setupDequeueing();},"LayeredTextureCache"),Ea=L1e.prototype,qme=0,vJe=Math.pow(2,53)-1;Ea.makeLayer=function(t,e){var r=Math.pow(2,e),n=Math.ceil(t.w*r),i=Math.ceil(t.h*r),a=this.renderer.makeOffscreenCanvas(n,i),s={id:qme=++qme%vJe,bb:t,level:e,width:n,height:i,canvas:a,context:a.getContext("2d"),eles:[],elesQueue:[],reqs:0},l=s.context,u=-s.bb.x1,h=-s.bb.y1;return l.scale(r,r),l.translate(u,h),s;};Ea.getLayers=function(t,e,r){var n=this,i=n.renderer,a=i.cy,s=a.zoom(),l=n.firstGet;if(n.firstGet=!1,r==null){if(r=Math.ceil(zB(s*e)),r<Kb)r=Kb;else if(s>=lJe||r>W6)return null;}n.validateLayersElesOrdering(r,t);var u=n.layersByLevel,h=Math.pow(2,r),f=u[r]=u[r]||[],d,p=n.levelIsComplete(r,t),m,g=o(function(){var O=o(function(I){if(n.validateLayersElesOrdering(I,t),n.levelIsComplete(I,t))return m=u[I],!0;},"canUseAsTmpLvl"),R=o(function(I){if(!m)for(var M=r+I;Kb<=M&&M<=W6&&!O(M);M+=I);},"checkLvls");R(1),R(-1);for(var k=f.length-1;k>=0;k--){var L=f[k];L.invalid&&Mf(f,L);}},"checkTempLevels");if(!p)g();else return f;var y=o(function(){if(!d){d=Ws();for(var O=0;O<t.length;O++)Sge(d,t[O].boundingBox());}return d;},"getBb"),v=o(function(O){O=O||{};var R=O.after;y();var k=Math.ceil(d.w*h),L=Math.ceil(d.h*h);if(k>Wme||L>Wme)return null;var S=k*L;if(S>gJe)return null;var I=n.makeLayer(d,r);if(R!=null){var M=f.indexOf(R)+1;f.splice(M,0,I);}else(O.insert===void 0||O.insert)&&f.unshift(I);return I;},"makeLayer");if(n.skipping&&!l)return null;for(var x=null,b=t.length/oJe,T=!l,C=0;C<t.length;C++){var w=t[C],E=w._private.rscratch,_=E.imgLayerCaches=E.imgLayerCaches||{},A=_[r];if(A){x=A;continue;}if((!x||x.eles.length>=b||!Cge(x.bb,w.boundingBox()))&&(x=v({insert:!0,after:x}),!x))return null;m||T?n.queueLayer(x,w):n.drawEleInLayer(x,w,r,e),x.eles.push(w),_[r]=x;}return m||(T?null:f);};Ea.getEleLevelForLayerLevel=function(t,e){return t;};Ea.drawEleInLayer=function(t,e,r,n){var i=this,a=this.renderer,s=t.context,l=e.boundingBox();l.w===0||l.h===0||!e.visible()||(r=i.getEleLevelForLayerLevel(r,n),a.setImgSmoothing(s,!1),a.drawCachedElement(s,e,null,null,r,yJe),a.setImgSmoothing(s,!0));};Ea.levelIsComplete=function(t,e){var r=this,n=r.layersByLevel[t];if(!n||n.length===0)return!1;for(var i=0,a=0;a<n.length;a++){var s=n[a];if(s.reqs>0||s.invalid)return!1;i+=s.eles.length;}return i===e.length;};Ea.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n<r.length;n++){for(var i=r[n],a=-1,s=0;s<e.length;s++)if(i.eles[0]===e[s]){a=s;break;}if(a<0){this.invalidateLayer(i);continue;}for(var l=a,s=0;s<i.eles.length;s++)if(i.eles[s]!==e[l+s]){this.invalidateLayer(i);break;}}};Ea.updateElementsInLayers=function(t,e){for(var r=this,n=h4(t[0]),i=0;i<t.length;i++)for(var a=n?null:t[i],s=n?t[i]:t[i].ele,l=s._private.rscratch,u=l.imgLayerCaches=l.imgLayerCaches||{},h=Kb;h<=W6;h++){var f=u[h];f&&(a&&r.getEleLevelForLayerLevel(f.level)!==a.level||e(f,s,a));}};Ea.haveLayers=function(){for(var t=this,e=!1,r=Kb;r<=W6;r++){var n=t.layersByLevel[r];if(n&&n.length>0){e=!0;break;}}return e;};Ea.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=Ju(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,o(function(n,i,a){e.invalidateLayer(n);},"invalAssocLayers")));};Ea.invalidateLayer=function(t){if(this.lastInvalidationTime=Ju(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];Mf(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var i=0;i<r.length;i++){var a=r[i]._private.rscratch.imgLayerCaches;a&&(a[e]=null);}}};Ea.refineElementTextures=function(t){var e=this;e.updateElementsInLayers(t,o(function(n,i,a){var s=n.replacement;if(s||(s=n.replacement=e.makeLayer(n.bb,n.level),s.replaces=n,s.eles=n.eles),!s.reqs)for(var l=0;l<s.eles.length;l++)e.queueLayer(s,s.eles[l]);},"refineEachEle"));};Ea.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement();};Ea.queueLayer=function(t,e){var r=this,n=r.layersQueue,i=t.elesQueue,a=i.hasId=i.hasId||{};if(!t.replacement){if(e){if(a[e.id()])return;i.push(e),a[e.id()]=!0;}t.reqs?(t.reqs++,n.updateItem(t)):(t.reqs=1,n.push(t));}};Ea.dequeue=function(t){for(var e=this,r=e.layersQueue,n=[],i=0;i<mJe&&r.size()!==0;){var a=r.peek();if(a.replacement){r.pop();continue;}if(a.replaces&&a!==a.replaces.replacement){r.pop();continue;}if(a.invalid){r.pop();continue;}var s=a.elesQueue.shift();s&&(e.drawEleInLayer(a,s,a.level,t),i++),n.length===0&&n.push(!0),a.elesQueue.length===0&&(r.pop(),a.reqs=0,a.replaces&&e.applyLayerReplacement(a),e.requestRedraw());}return n;};Ea.applyLayerReplacement=function(t){var e=this,r=e.layersByLevel[t.level],n=t.replaces,i=r.indexOf(n);if(!(i<0||n.invalid)){r[i]=t;for(var a=0;a<t.eles.length;a++){var s=t.eles[a]._private,l=s.imgLayerCaches=s.imgLayerCaches||{};l&&(l[t.level]=t);}e.requestRedraw();}};Ea.requestRedraw=d4(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw();},100);Ea.setupDequeueing=_1e.setupDequeueing({deqRedrawThreshold:cJe,deqCost:hJe,deqAvgCost:fJe,deqNoDrawCost:dJe,deqFastCost:pJe,deq:o(function(e,r){return e.dequeue(r);},"deq"),onDeqd:FB,shouldRedraw:xge,priority:o(function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq;},"priority")});R1e={};o(xJe,"polygon");o(bJe,"triangleBackcurve");o(Xme,"triangleTee");o(TJe,"circleTriangle");o(wJe,"circle");R1e.arrowShapeImpl=function(t){return(Yme||(Yme={polygon:xJe,"triangle-backcurve":bJe,"triangle-tee":Xme,"circle-triangle":TJe,"triangle-cross":Xme,circle:wJe}))[t];};Jc={};Jc.drawElement=function(t,e,r,n,i,a){var s=this;e.isNode()?s.drawNode(t,e,r,n,i,a):s.drawEdge(t,e,r,n,i,a);};Jc.drawElementOverlay=function(t,e){var r=this;e.isNode()?r.drawNodeOverlay(t,e):r.drawEdgeOverlay(t,e);};Jc.drawElementUnderlay=function(t,e){var r=this;e.isNode()?r.drawNodeUnderlay(t,e):r.drawEdgeUnderlay(t,e);};Jc.drawCachedElementPortion=function(t,e,r,n,i,a,s,l){var u=this,h=r.getBoundingBox(e);if(!(h.w===0||h.h===0)){var f=r.getElement(e,h,n,i,a);if(f!=null){var d=l(u,e);if(d===0)return;var p=s(u,e),m=h.x1,g=h.y1,y=h.w,v=h.h,x,b,T,C,w;if(p!==0){var E=r.getRotationPoint(e);T=E.x,C=E.y,t.translate(T,C),t.rotate(p),w=u.getImgSmoothing(t),w||u.setImgSmoothing(t,!0);var _=r.getRotationOffset(e);x=_.x,b=_.y;}else x=m,b=g;var A;d!==1&&(A=t.globalAlpha,t.globalAlpha=A*d),t.drawImage(f.texture.canvas,f.x,0,f.width,f.height,x,b,y,v),d!==1&&(t.globalAlpha=A),p!==0&&(t.rotate(-p),t.translate(-T,-C),w||u.setImgSmoothing(t,!1));}else r.drawElement(t,e);}};kJe=o(function(){return 0;},"getZeroRotation"),EJe=o(function(e,r){return e.getTextAngle(r,null);},"getLabelRotation"),SJe=o(function(e,r){return e.getTextAngle(r,"source");},"getSourceLabelRotation"),CJe=o(function(e,r){return e.getTextAngle(r,"target");},"getTargetLabelRotation"),AJe=o(function(e,r){return r.effectiveOpacity();},"getOpacity"),fB=o(function(e,r){return r.pstyle("text-opacity").pfValue*r.effectiveOpacity();},"getTextOpacity");Jc.drawCachedElement=function(t,e,r,n,i,a){var s=this,l=s.data,u=l.eleTxrCache,h=l.lblTxrCache,f=l.slbTxrCache,d=l.tlbTxrCache,p=e.boundingBox(),m=a===!0?u.reasons.highQuality:null;if(!(p.w===0||p.h===0||!e.visible())&&(!n||GB(p,n))){var g=e.isEdge(),y=e.element()._private.rscratch.badLine;s.drawElementUnderlay(t,e),s.drawCachedElementPortion(t,e,u,r,i,m,kJe,AJe),(!g||!y)&&s.drawCachedElementPortion(t,e,h,r,i,m,EJe,fB),g&&!y&&(s.drawCachedElementPortion(t,e,f,r,i,m,SJe,fB),s.drawCachedElementPortion(t,e,d,r,i,m,CJe,fB)),s.drawElementOverlay(t,e);}};Jc.drawElements=function(t,e){for(var r=this,n=0;n<e.length;n++){var i=e[n];r.drawElement(t,i);}};Jc.drawCachedElements=function(t,e,r,n){for(var i=this,a=0;a<e.length;a++){var s=e[a];i.drawCachedElement(t,s,r,n);}};Jc.drawCachedNodes=function(t,e,r,n){for(var i=this,a=0;a<e.length;a++){var s=e[a];s.isNode()&&i.drawCachedElement(t,s,r,n);}};Jc.drawLayeredElements=function(t,e,r,n){var i=this,a=i.data.lyrTxrCache.getLayers(e,r);if(a)for(var s=0;s<a.length;s++){var l=a[s],u=l.bb;u.w===0||u.h===0||t.drawImage(l.canvas,u.x1,u.y1,u.w,u.h);}else i.drawCachedElements(t,e,r,n);};nh={};nh.drawEdge=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,l=e._private.rscratch;if(!(a&&!e.visible())&&!(l.badLine||l.allpts==null||isNaN(l.allpts[0]))){var u;r&&(u=r,t.translate(-u.x1,-u.y1));var h=a?e.pstyle("opacity").value:1,f=a?e.pstyle("line-opacity").value:1,d=e.pstyle("curve-style").value,p=e.pstyle("line-style").value,m=e.pstyle("width").pfValue,g=e.pstyle("line-cap").value,y=e.pstyle("line-outline-width").value,v=e.pstyle("line-outline-color").value,x=h*f,b=h*f,T=o(function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x;d==="straight-triangle"?(s.eleStrokeStyle(t,e,I),s.drawEdgeTrianglePath(e,t,l.allpts)):(t.lineWidth=m,t.lineCap=g,s.eleStrokeStyle(t,e,I),s.drawEdgePath(e,t,l.allpts,p),t.lineCap="butt");},"drawLine"),C=o(function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x;if(t.lineWidth=m+y,t.lineCap=g,y>0)s.colorStrokeStyle(t,v[0],v[1],v[2],I);else{t.lineCap="butt";return;}d==="straight-triangle"?s.drawEdgeTrianglePath(e,t,l.allpts):(s.drawEdgePath(e,t,l.allpts,p),t.lineCap="butt");},"drawLineOutline"),w=o(function(){i&&s.drawEdgeOverlay(t,e);},"drawOverlay"),E=o(function(){i&&s.drawEdgeUnderlay(t,e);},"drawUnderlay"),_=o(function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;s.drawArrowheads(t,e,I);},"drawArrows"),A=o(function(){s.drawElementText(t,e,null,n);},"drawText");t.lineJoin="round";var D=e.pstyle("ghost").value==="yes";if(D){var O=e.pstyle("ghost-offset-x").pfValue,R=e.pstyle("ghost-offset-y").pfValue,k=e.pstyle("ghost-opacity").value,L=x*k;t.translate(O,R),T(L),_(L),t.translate(-O,-R);}else C();E(),T(),_(),w(),A(),r&&t.translate(u.x1,u.y1);}};N1e=o(function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n){if(n.visible()){var i=n.pstyle("".concat(e,"-opacity")).value;if(i!==0){var a=this,s=a.usePaths(),l=n._private.rscratch,u=n.pstyle("".concat(e,"-padding")).pfValue,h=2*u,f=n.pstyle("".concat(e,"-color")).value;r.lineWidth=h,l.edgeType==="self"&&!s?r.lineCap="butt":r.lineCap="round",a.colorStrokeStyle(r,f[0],f[1],f[2],i),a.drawEdgePath(n,r,l.allpts,"solid");}}};},"drawEdgeOverlayUnderlay");nh.drawEdgeOverlay=N1e("overlay");nh.drawEdgeUnderlay=N1e("underlay");nh.drawEdgePath=function(t,e,r,n){var i=t._private.rscratch,a=e,s,l=!1,u=this.usePaths(),h=t.pstyle("line-dash-pattern").pfValue,f=t.pstyle("line-dash-offset").pfValue;if(u){var d=r.join("$"),p=i.pathCacheKey&&i.pathCacheKey===d;p?(s=e=i.pathCache,l=!0):(s=e=new Path2D(),i.pathCacheKey=d,i.pathCache=s);}if(a.setLineDash)switch(n){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(h),a.lineDashOffset=f;break;case"solid":a.setLineDash([]);break;}if(!l&&!i.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var m=2;m+3<r.length;m+=4)e.quadraticCurveTo(r[m],r[m+1],r[m+2],r[m+3]);break;case"straight":case"haystack":for(var g=2;g+1<r.length;g+=2)e.lineTo(r[g],r[g+1]);break;case"segments":if(i.isRound){var y=go(i.roundCorners),v;try{for(y.s();!(v=y.n()).done;){var x=v.value;b1e(e,x);}}catch(T){y.e(T);}finally{y.f();}e.lineTo(r[r.length-2],r[r.length-1]);}else for(var b=2;b+1<r.length;b+=2)e.lineTo(r[b],r[b+1]);break;}e=a,u?e.stroke(s):e.stroke(),e.setLineDash&&e.setLineDash([]);};nh.drawEdgeTrianglePath=function(t,e,r){e.fillStyle=e.strokeStyle;for(var n=t.pstyle("width").pfValue,i=0;i+1<r.length;i+=2){var a=[r[i+2]-r[i],r[i+3]-r[i+1]],s=Math.sqrt(a[0]*a[0]+a[1]*a[1]),l=[a[1]/s,-a[0]/s],u=[l[0]*n/2,l[1]*n/2];e.beginPath(),e.moveTo(r[i]-u[0],r[i+1]-u[1]),e.lineTo(r[i]+u[0],r[i+1]+u[1]),e.lineTo(r[i+2],r[i+3]),e.closePath(),e.fill();}};nh.drawArrowheads=function(t,e,r){var n=e._private.rscratch,i=n.edgeType==="haystack";i||this.drawArrowhead(t,e,"source",n.arrowStartX,n.arrowStartY,n.srcArrowAngle,r),this.drawArrowhead(t,e,"mid-target",n.midX,n.midY,n.midtgtArrowAngle,r),this.drawArrowhead(t,e,"mid-source",n.midX,n.midY,n.midsrcArrowAngle,r),i||this.drawArrowhead(t,e,"target",n.arrowEndX,n.arrowEndY,n.tgtArrowAngle,r);};nh.drawArrowhead=function(t,e,r,n,i,a,s){if(!(isNaN(n)||n==null||isNaN(i)||i==null||isNaN(a)||a==null)){var l=this,u=e.pstyle(r+"-arrow-shape").value;if(u!=="none"){var h=e.pstyle(r+"-arrow-fill").value==="hollow"?"both":"filled",f=e.pstyle(r+"-arrow-fill").value,d=e.pstyle("width").pfValue,p=e.pstyle(r+"-arrow-width"),m=p.value==="match-line"?d:p.pfValue;p.units==="%"&&(m*=d);var g=e.pstyle("opacity").value;s===void 0&&(s=g);var y=t.globalCompositeOperation;(s!==1||f==="hollow")&&(t.globalCompositeOperation="destination-out",l.colorFillStyle(t,255,255,255,1),l.colorStrokeStyle(t,255,255,255,1),l.drawArrowShape(e,t,h,d,u,m,n,i,a),t.globalCompositeOperation=y);var v=e.pstyle(r+"-arrow-color").value;l.colorFillStyle(t,v[0],v[1],v[2],s),l.colorStrokeStyle(t,v[0],v[1],v[2],s),l.drawArrowShape(e,t,f,d,u,m,n,i,a);}}};nh.drawArrowShape=function(t,e,r,n,i,a,s,l,u){var h=this,f=this.usePaths()&&i!=="triangle-cross",d=!1,p,m=e,g={x:s,y:l},y=t.pstyle("arrow-scale").value,v=this.getArrowWidth(n,y),x=h.arrowShapes[i];if(f){var b=h.arrowPathCache=h.arrowPathCache||[],T=Nf(i),C=b[T];C!=null?(p=e=C,d=!0):(p=e=new Path2D(),b[T]=p);}d||(e.beginPath&&e.beginPath(),f?x.draw(e,1,0,{x:0,y:0},1):x.draw(e,v,u,g,n),e.closePath&&e.closePath()),e=m,f&&(e.translate(s,l),e.rotate(u),e.scale(v,v)),(r==="filled"||r==="both")&&(f?e.fill(p):e.fill()),(r==="hollow"||r==="both")&&(e.lineWidth=a/(f?v:1),e.lineJoin="miter",f?e.stroke(p):e.stroke()),f&&(e.scale(1/v,1/v),e.rotate(-u),e.translate(-s,-l));};rF={};rF.safeDrawImage=function(t,e,r,n,i,a,s,l,u,h){if(!(i<=0||a<=0||u<=0||h<=0))try{t.drawImage(e,r,n,i,a,s,l,u,h);}catch(f){un(f);}};rF.drawInscribedImage=function(t,e,r,n,i){var a=this,s=r.position(),l=s.x,u=s.y,h=r.cy().style(),f=h.getIndexedStyle.bind(h),d=f(r,"background-fit","value",n),p=f(r,"background-repeat","value",n),m=r.width(),g=r.height(),y=r.padding()*2,v=m+(f(r,"background-width-relative-to","value",n)==="inner"?0:y),x=g+(f(r,"background-height-relative-to","value",n)==="inner"?0:y),b=r._private.rscratch,T=f(r,"background-clip","value",n),C=T==="node",w=f(r,"background-image-opacity","value",n)*i,E=f(r,"background-image-smoothing","value",n),_=r.pstyle("corner-radius").value;_!=="auto"&&(_=r.pstyle("corner-radius").pfValue);var A=e.width||e.cachedW,D=e.height||e.cachedH;(A==null||D==null)&&(document.body.appendChild(e),A=e.cachedW=e.width||e.offsetWidth,D=e.cachedH=e.height||e.offsetHeight,document.body.removeChild(e));var O=A,R=D;if(f(r,"background-width","value",n)!=="auto"&&(f(r,"background-width","units",n)==="%"?O=f(r,"background-width","pfValue",n)*v:O=f(r,"background-width","pfValue",n)),f(r,"background-height","value",n)!=="auto"&&(f(r,"background-height","units",n)==="%"?R=f(r,"background-height","pfValue",n)*x:R=f(r,"background-height","pfValue",n)),!(O===0||R===0)){if(d==="contain"){var k=Math.min(v/O,x/R);O*=k,R*=k;}else if(d==="cover"){var k=Math.max(v/O,x/R);O*=k,R*=k;}var L=l-v/2,S=f(r,"background-position-x","units",n),I=f(r,"background-position-x","pfValue",n);S==="%"?L+=(v-O)*I:L+=I;var M=f(r,"background-offset-x","units",n),P=f(r,"background-offset-x","pfValue",n);M==="%"?L+=(v-O)*P:L+=P;var B=u-x/2,F=f(r,"background-position-y","units",n),z=f(r,"background-position-y","pfValue",n);F==="%"?B+=(x-R)*z:B+=z;var $=f(r,"background-offset-y","units",n),U=f(r,"background-offset-y","pfValue",n);$==="%"?B+=(x-R)*U:B+=U,b.pathCache&&(L-=l,B-=u,l=0,u=0);var K=t.globalAlpha;t.globalAlpha=w;var ee=a.getImgSmoothing(t),Y=!1;if(E==="no"&&ee?(a.setImgSmoothing(t,!1),Y=!0):E==="yes"&&!ee&&(a.setImgSmoothing(t,!0),Y=!0),p==="no-repeat")C&&(t.save(),b.pathCache?t.clip(b.pathCache):(a.nodeShapes[a.getNodeShape(r)].draw(t,l,u,v,x,_,b),t.clip())),a.safeDrawImage(t,e,0,0,A,D,L,B,O,R),C&&t.restore();else{var ce=t.createPattern(e,p);t.fillStyle=ce,a.nodeShapes[a.getNodeShape(r)].draw(t,l,u,v,x,_,b),t.translate(L,B),t.fill(),t.translate(-L,-B);}t.globalAlpha=K,Y&&a.setImgSmoothing(t,ee);}};Jp={};Jp.eleTextBiggerThanMin=function(t,e){if(!e){var r=t.cy().zoom(),n=this.getPixelRatio(),i=Math.ceil(zB(r*n));e=Math.pow(2,i);}var a=t.pstyle("font-size").pfValue*e,s=t.pstyle("min-zoomed-font-size").pfValue;return!(a<s);};Jp.drawElementText=function(t,e,r,n,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(n==null){if(a&&!s.eleTextBiggerThanMin(e))return;}else if(n===!1)return;if(e.isNode()){var l=e.pstyle("label");if(!l||!l.value)return;var u=s.getLabelJustification(e);t.textAlign=u,t.textBaseline="bottom";}else{var h=e.element()._private.rscratch.badLine,f=e.pstyle("label"),d=e.pstyle("source-label"),p=e.pstyle("target-label");if(h||(!f||!f.value)&&(!d||!d.value)&&(!p||!p.value))return;t.textAlign="center",t.textBaseline="bottom";}var m=!r,g;r&&(g=r,t.translate(-g.x1,-g.y1)),i==null?(s.drawText(t,e,null,m,a),e.isEdge()&&(s.drawText(t,e,"source",m,a),s.drawText(t,e,"target",m,a))):s.drawText(t,e,i,m,a),r&&t.translate(g.x1,g.y1);};Jp.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r<this.fontCaches.length;r++)if(e=this.fontCaches[r],e.context===t)return e;return e={context:t},this.fontCaches.push(e),e;};Jp.setupTextStyle=function(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,l=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,u=e.pstyle("text-outline-opacity").value*l,h=e.pstyle("color").value,f=e.pstyle("text-outline-color").value;t.font=n+" "+s+" "+i+" "+a,t.lineJoin="round",this.colorFillStyle(t,h[0],h[1],h[2],l),this.colorStrokeStyle(t,f[0],f[1],f[2],u);};o(dB,"roundRect");Jp.getTextAngle=function(t,e){var r,n=t._private,i=n.rscratch,a=e?e+"-":"",s=t.pstyle(a+"text-rotation");if(s.strValue==="autorotate"){var l=Ul(i,"labelAngle",e);r=t.isEdge()?l:0;}else s.strValue==="none"?r=0:r=s.pfValue;return r;};Jp.drawText=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=e._private,s=a.rscratch,l=i?e.effectiveOpacity():1;if(!(i&&(l===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var u=Ul(s,"labelX",r),h=Ul(s,"labelY",r),f,d,p=this.getLabelText(e,r);if(p!=null&&p!==""&&!isNaN(u)&&!isNaN(h)){this.setupTextStyle(t,e,i);var m=r?r+"-":"",g=Ul(s,"labelWidth",r),y=Ul(s,"labelHeight",r),v=e.pstyle(m+"text-margin-x").pfValue,x=e.pstyle(m+"text-margin-y").pfValue,b=e.isEdge(),T=e.pstyle("text-halign").value,C=e.pstyle("text-valign").value;b&&(T="center",C="center"),u+=v,h+=x;var w;switch(n?w=this.getTextAngle(e,r):w=0,w!==0&&(f=u,d=h,t.translate(f,d),t.rotate(w),u=0,h=0),C){case"top":break;case"center":h+=y/2;break;case"bottom":h+=y;break;}var E=e.pstyle("text-background-opacity").value,_=e.pstyle("text-border-opacity").value,A=e.pstyle("text-border-width").pfValue,D=e.pstyle("text-background-padding").pfValue,O=e.pstyle("text-background-shape").strValue,R=O.indexOf("round")===0,k=2;if(E>0||A>0&&_>0){var L=u-D;switch(T){case"left":L-=g;break;case"center":L-=g/2;break;}var S=h-y-D,I=g+2*D,M=y+2*D;if(E>0){var P=t.fillStyle,B=e.pstyle("text-background-color").value;t.fillStyle="rgba("+B[0]+","+B[1]+","+B[2]+","+E*l+")",R?dB(t,L,S,I,M,k):t.fillRect(L,S,I,M),t.fillStyle=P;}if(A>0&&_>0){var F=t.strokeStyle,z=t.lineWidth,$=e.pstyle("text-border-color").value,U=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+$[0]+","+$[1]+","+$[2]+","+_*l+")",t.lineWidth=A,t.setLineDash)switch(U){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=A/4,t.setLineDash([]);break;case"solid":t.setLineDash([]);break;}if(R?dB(t,L,S,I,M,k,"stroke"):t.strokeRect(L,S,I,M),U==="double"){var K=A/2;R?dB(t,L+K,S+K,I-K*2,M-K*2,k,"stroke"):t.strokeRect(L+K,S+K,I-K*2,M-K*2);}t.setLineDash&&t.setLineDash([]),t.lineWidth=z,t.strokeStyle=F;}}var ee=2*e.pstyle("text-outline-width").pfValue;if(ee>0&&(t.lineWidth=ee),e.pstyle("text-wrap").value==="wrap"){var Y=Ul(s,"labelWrapCachedLines",r),ce=Ul(s,"labelLineHeight",r),Z=g/2,ue=this.getLabelJustification(e);switch(ue==="auto"||(T==="left"?ue==="left"?u+=-g:ue==="center"&&(u+=-Z):T==="center"?ue==="left"?u+=-Z:ue==="right"&&(u+=Z):T==="right"&&(ue==="center"?u+=Z:ue==="right"&&(u+=g))),C){case"top":h-=(Y.length-1)*ce;break;case"center":case"bottom":h-=(Y.length-1)*ce;break;}for(var Q=0;Q<Y.length;Q++)ee>0&&t.strokeText(Y[Q],u,h),t.fillText(Y[Q],u,h),h+=ce;}else ee>0&&t.strokeText(p,u,h),t.fillText(p,u,h);w!==0&&(t.rotate(-w),t.translate(-f,-d));}}};cy={};cy.drawNode=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,l,u,h=e._private,f=h.rscratch,d=e.position();if(!(!_t(d.x)||!_t(d.y))&&!(a&&!e.visible())){var p=a?e.effectiveOpacity():1,m=s.usePaths(),g,y=!1,v=e.padding();l=e.width()+2*v,u=e.height()+2*v;var x;r&&(x=r,t.translate(-x.x1,-x.y1));for(var b=e.pstyle("background-image"),T=b.value,C=new Array(T.length),w=new Array(T.length),E=0,_=0;_<T.length;_++){var A=T[_],D=C[_]=A!=null&&A!=="none";if(D){var O=e.cy().style().getIndexedStyle(e,"background-image-crossorigin","value",_);E++,w[_]=s.getCachedImage(A,O,function(){h.backgroundTimestamp=Date.now(),e.emitAndNotify("background");});}}var R=e.pstyle("background-blacken").value,k=e.pstyle("border-width").pfValue,L=e.pstyle("background-opacity").value*p,S=e.pstyle("border-color").value,I=e.pstyle("border-style").value,M=e.pstyle("border-join").value,P=e.pstyle("border-cap").value,B=e.pstyle("border-position").value,F=e.pstyle("border-dash-pattern").pfValue,z=e.pstyle("border-dash-offset").pfValue,$=e.pstyle("border-opacity").value*p,U=e.pstyle("outline-width").pfValue,K=e.pstyle("outline-color").value,ee=e.pstyle("outline-style").value,Y=e.pstyle("outline-opacity").value*p,ce=e.pstyle("outline-offset").value,Z=e.pstyle("corner-radius").value;Z!=="auto"&&(Z=e.pstyle("corner-radius").pfValue);var ue=o(function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:L;s.eleFillStyle(t,e,oe);},"setupShapeColor"),Q=o(function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$;s.colorStrokeStyle(t,S[0],S[1],S[2],oe);},"setupBorderColor"),j=o(function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Y;s.colorStrokeStyle(t,K[0],K[1],K[2],oe);},"setupOutlineColor"),ne=o(function(oe,V,Te,W){var pe=s.nodePathCache=s.nodePathCache||[],ve=vge(Te==="polygon"?Te+","+W.join(","):Te,""+V,""+oe,""+Z),Pe=pe[ve],_e,be=!1;return Pe!=null?(_e=Pe,be=!0,f.pathCache=_e):(_e=new Path2D(),pe[ve]=f.pathCache=_e),{path:_e,cacheHit:be};},"getPath"),te=e.pstyle("shape").strValue,he=e.pstyle("shape-polygon-points").pfValue;if(m){t.translate(d.x,d.y);var le=ne(l,u,te,he);g=le.path,y=le.cacheHit;}var J=o(function(){if(!y){var oe=d;m&&(oe={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(g||t,oe.x,oe.y,l,u,Z,f);}m?t.fill(g):t.fill();},"drawShape"),Se=o(function(){for(var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Te=h.backgrounding,W=0,pe=0;pe<w.length;pe++){var ve=e.cy().style().getIndexedStyle(e,"background-image-containment","value",pe);if(V&&ve==="over"||!V&&ve==="inside"){W++;continue;}C[pe]&&w[pe].complete&&!w[pe].error&&(W++,s.drawInscribedImage(t,w[pe],e,pe,oe));}h.backgrounding=W!==E,Te!==h.backgrounding&&e.updateStyle(!1);},"drawImages"),se=o(function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;s.hasPie(e)&&(s.drawPie(t,e,V),oe&&(m||s.nodeShapes[s.getNodeShape(e)].draw(t,d.x,d.y,l,u,Z,f)));},"drawPie"),ae=o(function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,V=(R>0?R:-R)*oe,Te=R>0?0:255;R!==0&&(s.colorFillStyle(t,Te,Te,Te,V),m?t.fill(g):t.fill());},"darken"),Oe=o(function(){if(k>0){if(t.lineWidth=k,t.lineCap=P,t.lineJoin=M,t.setLineDash)switch(I){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(F),t.lineDashOffset=z;break;case"solid":case"double":t.setLineDash([]);break;}if(B!=="center"){if(t.save(),t.lineWidth*=2,B==="inside")m?t.clip(g):t.clip();else{var oe=new Path2D();oe.rect(-l/2-k,-u/2-k,l+2*k,u+2*k),oe.addPath(g),t.clip(oe,"evenodd");}m?t.stroke(g):t.stroke(),t.restore();}else m?t.stroke(g):t.stroke();if(I==="double"){t.lineWidth=k/3;var V=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",m?t.stroke(g):t.stroke(),t.globalCompositeOperation=V;}t.setLineDash&&t.setLineDash([]);}},"drawBorder"),ye=o(function(){if(U>0){if(t.lineWidth=U,t.lineCap="butt",t.setLineDash)switch(ee){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break;}var oe=d;m&&(oe={x:0,y:0});var V=s.getNodeShape(e),Te=k;B==="inside"&&(Te=0),B==="outside"&&(Te*=2);var W=(l+Te+(U+ce))/l,pe=(u+Te+(U+ce))/u,ve=l*W,Pe=u*pe,_e=s.nodeShapes[V].points,be;if(m){var Ve=ne(ve,Pe,V,_e);be=Ve.path;}if(V==="ellipse")s.drawEllipsePath(be||t,oe.x,oe.y,ve,Pe);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(V)){var De=0,Ye=0,at=0;V==="round-diamond"?De=(Te+ce+U)*1.4:V==="round-heptagon"?(De=(Te+ce+U)*1.075,at=-(Te/2+ce+U)/35):V==="round-hexagon"?De=(Te+ce+U)*1.12:V==="round-pentagon"?(De=(Te+ce+U)*1.13,at=-(Te/2+ce+U)/15):V==="round-tag"?(De=(Te+ce+U)*1.12,Ye=(Te/2+U+ce)*.07):V==="round-triangle"&&(De=(Te+ce+U)*(Math.PI/2),at=-(Te+ce/2+U)/Math.PI),De!==0&&(W=(l+De)/l,ve=l*W,["round-hexagon","round-tag"].includes(V)||(pe=(u+De)/u,Pe=u*pe)),Z=Z==="auto"?Dge(ve,Pe):Z;for(var Rt=ve/2,st=Pe/2,Ue=Z+(Te+U+ce)/2,ut=new Array(_e.length/2),We=new Array(_e.length/2),lt=0;lt<_e.length/2;lt++)ut[lt]={x:oe.x+Ye+Rt*_e[lt*2],y:oe.y+at+st*_e[lt*2+1]};var Xt,Tt,Mt,bt,ht=ut.length;for(Tt=ut[ht-1],Xt=0;Xt<ht;Xt++)Mt=ut[Xt%ht],bt=ut[(Xt+1)%ht],We[Xt]=eF(Tt,Mt,bt,Ue),Tt=Mt,Mt=bt;s.drawRoundPolygonPath(be||t,oe.x+Ye,oe.y+at,l*W,u*pe,_e,We);}else if(["roundrectangle","round-rectangle"].includes(V))Z=Z==="auto"?Xp(ve,Pe):Z,s.drawRoundRectanglePath(be||t,oe.x,oe.y,ve,Pe,Z+(Te+U+ce)/2);else if(["cutrectangle","cut-rectangle"].includes(V))Z=Z==="auto"?VB():Z,s.drawCutRectanglePath(be||t,oe.x,oe.y,ve,Pe,null,Z+(Te+U+ce)/4);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(V))Z=Z==="auto"?Xp(ve,Pe):Z,s.drawBottomRoundRectanglePath(be||t,oe.x,oe.y,ve,Pe,Z+(Te+U+ce)/2);else if(V==="barrel")s.drawBarrelPath(be||t,oe.x,oe.y,ve,Pe);else if(V.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(V)){var St=(Te+U+ce)/l;_e=F6($6(_e,St)),s.drawPolygonPath(be||t,oe.x,oe.y,l,u,_e);}else{var ft=(Te+U+ce)/l;_e=F6($6(_e,-ft)),s.drawPolygonPath(be||t,oe.x,oe.y,l,u,_e);}if(m?t.stroke(be):t.stroke(),ee==="double"){t.lineWidth=Te/3;var vt=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",m?t.stroke(be):t.stroke(),t.globalCompositeOperation=vt;}t.setLineDash&&t.setLineDash([]);}},"drawOutline"),Be=o(function(){i&&s.drawNodeOverlay(t,e,d,l,u);},"drawOverlay"),He=o(function(){i&&s.drawNodeUnderlay(t,e,d,l,u);},"drawUnderlay"),ze=o(function(){s.drawElementText(t,e,null,n);},"drawText"),Le=e.pstyle("ghost").value==="yes";if(Le){var Ie=e.pstyle("ghost-offset-x").pfValue,xe=e.pstyle("ghost-offset-y").pfValue,q=e.pstyle("ghost-opacity").value,de=q*p;t.translate(Ie,xe),j(),ye(),ue(q*L),J(),Se(de,!0),Q(q*$),Oe(),se(R!==0||k!==0),Se(de,!1),ae(de),t.translate(-Ie,-xe);}m&&t.translate(-d.x,-d.y),He(),m&&t.translate(d.x,d.y),j(),ye(),ue(),J(),Se(p,!0),Q(),Oe(),se(R!==0||k!==0),Se(p,!1),ae(),m&&t.translate(-d.x,-d.y),ze(),Be(),r&&t.translate(x.x1,x.y1);}};M1e=o(function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n,i,a,s){var l=this;if(n.visible()){var u=n.pstyle("".concat(e,"-padding")).pfValue,h=n.pstyle("".concat(e,"-opacity")).value,f=n.pstyle("".concat(e,"-color")).value,d=n.pstyle("".concat(e,"-shape")).value,p=n.pstyle("".concat(e,"-corner-radius")).value;if(h>0){if(i=i||n.position(),a==null||s==null){var m=n.padding();a=n.width()+2*m,s=n.height()+2*m;}l.colorFillStyle(r,f[0],f[1],f[2],h),l.nodeShapes[d].draw(r,i.x,i.y,a+u*2,s+u*2,p),r.fill();}}};},"drawNodeOverlayUnderlay");cy.drawNodeOverlay=M1e("overlay");cy.drawNodeUnderlay=M1e("underlay");cy.hasPie=function(t){return t=t[0],t._private.hasPie;};cy.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=e.pstyle("pie-size"),s=n.x,l=n.y,u=e.width(),h=e.height(),f=Math.min(u,h)/2,d=0,p=this.usePaths();p&&(s=0,l=0),a.units==="%"?f=f*a.pfValue:a.pfValue!==void 0&&(f=a.pfValue/2);for(var m=1;m<=i.pieBackgroundN;m++){var g=e.pstyle("pie-"+m+"-background-size").value,y=e.pstyle("pie-"+m+"-background-color").value,v=e.pstyle("pie-"+m+"-background-opacity").value*r,x=g/100;x+d>1&&(x=1-d);var b=1.5*Math.PI+2*Math.PI*d,T=2*Math.PI*x,C=b+T;g===0||d>=1||d+x>1||(t.beginPath(),t.moveTo(s,l),t.arc(s,l,f,b,C),t.closePath(),this.colorFillStyle(t,y[0],y[1],y[2],v),t.fill(),d+=x);}};vs={},_Je=100;vs.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r;};vs.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,n,i=0;i<e.length;i++)if(n=e[i],n.context===t){r=!1;break;}return r&&(n={context:t},e.push(n)),n;};vs.createGradientStyleFor=function(t,e,r,n,i){var a,s=this.usePaths(),l=r.pstyle(e+"-gradient-stop-colors").value,u=r.pstyle(e+"-gradient-stop-positions").pfValue;if(n==="radial-gradient"){if(r.isEdge()){var h=r.sourceEndpoint(),f=r.targetEndpoint(),d=r.midpoint(),p=Yp(h,d),m=Yp(f,d);a=t.createRadialGradient(d.x,d.y,0,d.x,d.y,Math.max(p,m));}else{var g=s?{x:0,y:0}:r.position(),y=r.paddedWidth(),v=r.paddedHeight();a=t.createRadialGradient(g.x,g.y,0,g.x,g.y,Math.max(y,v));}}else if(r.isEdge()){var x=r.sourceEndpoint(),b=r.targetEndpoint();a=t.createLinearGradient(x.x,x.y,b.x,b.y);}else{var T=s?{x:0,y:0}:r.position(),C=r.paddedWidth(),w=r.paddedHeight(),E=C/2,_=w/2,A=r.pstyle("background-gradient-direction").value;switch(A){case"to-bottom":a=t.createLinearGradient(T.x,T.y-_,T.x,T.y+_);break;case"to-top":a=t.createLinearGradient(T.x,T.y+_,T.x,T.y-_);break;case"to-left":a=t.createLinearGradient(T.x+E,T.y,T.x-E,T.y);break;case"to-right":a=t.createLinearGradient(T.x-E,T.y,T.x+E,T.y);break;case"to-bottom-right":case"to-right-bottom":a=t.createLinearGradient(T.x-E,T.y-_,T.x+E,T.y+_);break;case"to-top-right":case"to-right-top":a=t.createLinearGradient(T.x-E,T.y+_,T.x+E,T.y-_);break;case"to-bottom-left":case"to-left-bottom":a=t.createLinearGradient(T.x+E,T.y-_,T.x-E,T.y+_);break;case"to-top-left":case"to-left-top":a=t.createLinearGradient(T.x+E,T.y+_,T.x-E,T.y-_);break;}}if(!a)return null;for(var D=u.length===l.length,O=l.length,R=0;R<O;R++)a.addColorStop(D?u[R]:R/(O-1),"rgba("+l[R][0]+","+l[R][1]+","+l[R][2]+","+i+")");return a;};vs.gradientFillStyle=function(t,e,r,n){var i=this.createGradientStyleFor(t,"background",e,r,n);if(!i)return null;t.fillStyle=i;};vs.colorFillStyle=function(t,e,r,n,i){t.fillStyle="rgba("+e+","+r+","+n+","+i+")";};vs.eleFillStyle=function(t,e,r){var n=e.pstyle("background-fill").value;if(n==="linear-gradient"||n==="radial-gradient")this.gradientFillStyle(t,e,n,r);else{var i=e.pstyle("background-color").value;this.colorFillStyle(t,i[0],i[1],i[2],r);}};vs.gradientStrokeStyle=function(t,e,r,n){var i=this.createGradientStyleFor(t,"line",e,r,n);if(!i)return null;t.strokeStyle=i;};vs.colorStrokeStyle=function(t,e,r,n,i){t.strokeStyle="rgba("+e+","+r+","+n+","+i+")";};vs.eleStrokeStyle=function(t,e,r){var n=e.pstyle("line-fill").value;if(n==="linear-gradient"||n==="radial-gradient")this.gradientStrokeStyle(t,e,n,r);else{var i=e.pstyle("line-color").value;this.colorStrokeStyle(t,i[0],i[1],i[2],r);}};vs.matchCanvasSize=function(t){var e=this,r=e.data,n=e.findContainerClientCoords(),i=n[2],a=n[3],s=e.getPixelRatio(),l=e.motionBlurPxRatio;(t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE]||t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG])&&(s=l);var u=i*s,h=a*s,f;if(!(u===e.canvasWidth&&h===e.canvasHeight)){e.fontCaches=null;var d=r.canvasContainer;d.style.width=i+"px",d.style.height=a+"px";for(var p=0;p<e.CANVAS_LAYERS;p++)f=r.canvases[p],f.width=u,f.height=h,f.style.width=i+"px",f.style.height=a+"px";for(var p=0;p<e.BUFFER_COUNT;p++)f=r.bufferCanvases[p],f.width=u,f.height=h,f.style.width=i+"px",f.style.height=a+"px";e.textureMult=1,s<=1&&(f=r.bufferCanvases[e.TEXTURE_BUFFER],e.textureMult=2,f.width=u*e.textureMult,f.height=h*e.textureMult),e.canvasWidth=u,e.canvasHeight=h,e.pixelRatio=s;}};vs.renderTo=function(t,e,r,n){this.render({forcedContext:t,forcedZoom:e,forcedPan:r,drawAllLayers:!0,forcedPxRatio:n});};vs.clearCanvas=function(){var t=this,e=t.data;function r(n){n.clearRect(0,0,t.canvasWidth,t.canvasHeight);}o(r,"clear"),r(e.contexts[t.NODE]),r(e.contexts[t.DRAG]);};vs.render=function(t){var e=this;t=t||wge();var r=e.cy,n=t.forcedContext,i=t.drawAllLayers,a=t.drawOnlyNodeLayer,s=t.forcedZoom,l=t.forcedPan,u=t.forcedPxRatio===void 0?this.getPixelRatio():t.forcedPxRatio,h=e.data,f=h.canvasNeedsRedraw,d=e.textureOnViewport&&!n&&(e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming),p=t.motionBlur!==void 0?t.motionBlur:e.motionBlur,m=e.motionBlurPxRatio,g=r.hasCompoundNodes(),y=e.hoverData.draggingEles,v=!!(e.hoverData.selecting||e.touchData.selecting);p=p&&!n&&e.motionBlurEnabled&&!v;var x=p;n||(e.prevPxRatio!==u&&(e.invalidateContainerClientCoordsCache(),e.matchCanvasSize(e.container),e.redrawHint("eles",!0),e.redrawHint("drag",!0)),e.prevPxRatio=u),!n&&e.motionBlurTimeout&&clearTimeout(e.motionBlurTimeout),p&&(e.mbFrames==null&&(e.mbFrames=0),e.mbFrames++,e.mbFrames<3&&(x=!1),e.mbFrames>e.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!d&&(f[e.NODE]=!0,f[e.SELECT_BOX]=!0);var b=r.style(),T=r.zoom(),C=s!==void 0?s:T,w=r.pan(),E={x:w.x,y:w.y},_={zoom:T,pan:{x:w.x,y:w.y}},A=e.prevViewport,D=A===void 0||_.zoom!==A.zoom||_.pan.x!==A.pan.x||_.pan.y!==A.pan.y;!D&&!(y&&!g)&&(e.motionBlurPxRatio=1),l&&(E=l),C*=u,E.x*=u,E.y*=u;var O=e.getCachedZSortedEles();function R(Q,j,ne,te,he){var le=Q.globalCompositeOperation;Q.globalCompositeOperation="destination-out",e.colorFillStyle(Q,255,255,255,e.motionBlurTransparency),Q.fillRect(j,ne,te,he),Q.globalCompositeOperation=le;}o(R,"mbclear");function k(Q,j){var ne,te,he,le;!e.clearingMotionBlur&&(Q===h.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||Q===h.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?(ne={x:w.x*m,y:w.y*m},te=T*m,he=e.canvasWidth*m,le=e.canvasHeight*m):(ne=E,te=C,he=e.canvasWidth,le=e.canvasHeight),Q.setTransform(1,0,0,1,0,0),j==="motionBlur"?R(Q,0,0,he,le):!n&&(j===void 0||j)&&Q.clearRect(0,0,he,le),i||(Q.translate(ne.x,ne.y),Q.scale(te,te)),l&&Q.translate(l.x,l.y),s&&Q.scale(s,s);}if(o(k,"setContextTransform"),d||(e.textureDrawLastFrame=!1),d){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=r.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var L=e.data.bufferContexts[e.TEXTURE_BUFFER];L.setTransform(1,0,0,1,0,0),L.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:L,drawOnlyNodeLayer:!0,forcedPxRatio:u*e.textureMult});var _=e.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:e.canvasWidth,height:e.canvasHeight};_.mpan={x:(0-_.pan.x)/_.zoom,y:(0-_.pan.y)/_.zoom};}f[e.DRAG]=!1,f[e.NODE]=!1;var S=h.contexts[e.NODE],I=e.textureCache.texture,_=e.textureCache.viewport;S.setTransform(1,0,0,1,0,0),p?R(S,0,0,_.width,_.height):S.clearRect(0,0,_.width,_.height);var M=b.core("outside-texture-bg-color").value,P=b.core("outside-texture-bg-opacity").value;e.colorFillStyle(S,M[0],M[1],M[2],P),S.fillRect(0,0,_.width,_.height);var T=r.zoom();k(S,!1),S.clearRect(_.mpan.x,_.mpan.y,_.width/_.zoom/u,_.height/_.zoom/u),S.drawImage(I,_.mpan.x,_.mpan.y,_.width/_.zoom/u,_.height/_.zoom/u);}else e.textureOnViewport&&!n&&(e.textureCache=null);var B=r.extent(),F=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),z=e.hideEdgesOnViewport&&F,$=[];if($[e.NODE]=!f[e.NODE]&&p&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,$[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),$[e.DRAG]=!f[e.DRAG]&&p&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,$[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),f[e.NODE]||i||a||$[e.NODE]){var U=p&&!$[e.NODE]&&m!==1,S=n||(U?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:h.contexts[e.NODE]),K=p&&!U?"motionBlur":void 0;k(S,K),z?e.drawCachedNodes(S,O.nondrag,u,B):e.drawLayeredElements(S,O.nondrag,u,B),e.debug&&e.drawDebugPoints(S,O.nondrag),!i&&!p&&(f[e.NODE]=!1);}if(!a&&(f[e.DRAG]||i||$[e.DRAG])){var U=p&&!$[e.DRAG]&&m!==1,S=n||(U?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:h.contexts[e.DRAG]);k(S,p&&!U?"motionBlur":void 0),z?e.drawCachedNodes(S,O.drag,u,B):e.drawCachedElements(S,O.drag,u,B),e.debug&&e.drawDebugPoints(S,O.drag),!i&&!p&&(f[e.DRAG]=!1);}if(this.drawSelectionRectangle(t,k),p&&m!==1){var ee=h.contexts[e.NODE],Y=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],ce=h.contexts[e.DRAG],Z=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],ue=o(function(j,ne,te){j.setTransform(1,0,0,1,0,0),te||!x?j.clearRect(0,0,e.canvasWidth,e.canvasHeight):R(j,0,0,e.canvasWidth,e.canvasHeight);var he=m;j.drawImage(ne,0,0,e.canvasWidth*he,e.canvasHeight*he,0,0,e.canvasWidth,e.canvasHeight);},"drawMotionBlur");(f[e.NODE]||$[e.NODE])&&(ue(ee,Y,$[e.NODE]),f[e.NODE]=!1),(f[e.DRAG]||$[e.DRAG])&&(ue(ce,Z,$[e.DRAG]),f[e.DRAG]=!1);}e.prevViewport=_,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),p&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!d,e.mbFrames=0,f[e.NODE]=!0,f[e.DRAG]=!0,e.redraw();},_Je)),n||r.emit("render");};vs.drawSelectionRectangle=function(t,e){var r=this,n=r.cy,i=r.data,a=n.style(),s=t.drawOnlyNodeLayer,l=t.drawAllLayers,u=i.canvasNeedsRedraw,h=t.forcedContext;if(r.showFps||!s&&u[r.SELECT_BOX]&&!l){var f=h||i.contexts[r.SELECT_BOX];if(e(f),r.selection[4]==1&&(r.hoverData.selecting||r.touchData.selecting)){var d=r.cy.zoom(),p=a.core("selection-box-border-width").value/d;f.lineWidth=p,f.fillStyle="rgba("+a.core("selection-box-color").value[0]+","+a.core("selection-box-color").value[1]+","+a.core("selection-box-color").value[2]+","+a.core("selection-box-opacity").value+")",f.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]),p>0&&(f.strokeStyle="rgba("+a.core("selection-box-border-color").value[0]+","+a.core("selection-box-border-color").value[1]+","+a.core("selection-box-border-color").value[2]+","+a.core("selection-box-opacity").value+")",f.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]));}if(i.bgActivePosistion&&!r.hoverData.selecting){var d=r.cy.zoom(),m=i.bgActivePosistion;f.fillStyle="rgba("+a.core("active-bg-color").value[0]+","+a.core("active-bg-color").value[1]+","+a.core("active-bg-color").value[2]+","+a.core("active-bg-opacity").value+")",f.beginPath(),f.arc(m.x,m.y,a.core("active-bg-size").pfValue/d,0,2*Math.PI),f.fill();}var g=r.lastRedrawTime;if(r.showFps&&g){g=Math.round(g);var y=Math.round(1e3/g),v="1 frame = "+g+" ms = "+y+" fps";if(f.setTransform(1,0,0,1,0,0),f.fillStyle="rgba(255, 0, 0, 0.75)",f.strokeStyle="rgba(255, 0, 0, 0.75)",f.font="30px Arial",!Vb){var x=f.measureText(v);Vb=x.actualBoundingBoxAscent;}f.fillText(v,0,Vb);var b=60;f.strokeRect(0,Vb+10,250,20),f.fillRect(0,Vb+10,250*Math.min(y/b,1),20);}l||(u[r.SELECT_BOX]=!1);}};o(jme,"compileShader");o(DJe,"createProgram");o(LJe,"createTextureCanvas");o(nF,"getEffectivePanZoom");o(pB,"modelToRenderedPosition");o(E6,"toWebGLColor");o(S6,"indexToVec4");o(RJe,"vec4ToIndex");o(NJe,"createTexture");o(I1e,"getTypeInfo");o(O1e,"createTypedArray");o(MJe,"createTypedArrayView");o(IJe,"createBufferStaticDraw");o(mo,"createBufferDynamicDraw");o(OJe,"createPickingFrameBuffer");Kme=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t);});o(Qb,"create");o(P1e,"identity");o(PJe,"multiply");o(q6,"translate");o(B1e,"rotate");o(iF,"scale");o(BJe,"projection");Zb={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},Ub=aa({getKey:null,drawElement:null,getBoundingBox:null,getRotation:null,getRotationPoint:null,getRotationOffset:null,isVisible:null,getPadding:null}),FJe=function(){function t(e,r){Bf(this,t),this.debugID=Math.floor(Math.random()*1e4),this.r=e,this.atlasSize=r.webglTexSize,this.rows=r.webglTexRows,this.enableWrapping=r.enableWrapping,this.texHeight=Math.floor(this.atlasSize/this.rows),this.maxTexWidth=this.atlasSize,this.texture=null,this.canvas=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map(),this.canvas=r.createTextureCanvas(e,this.atlasSize,this.atlasSize),this.scratch=r.createTextureCanvas(e,this.atlasSize,this.texHeight,"scratch");}return o(t,"Atlas"),Ff(t,[{key:"getKeys",value:o(function(){return new Set(this.keyToLocation.keys());},"getKeys")},{key:"getScale",value:o(function(r){var n=r.w,i=r.h,a=this.texHeight,s=this.maxTexWidth,l=a/i,u=n*l,h=i*l;return u>s&&(l=s/n,u=n*l,h=i*l),{scale:l,texW:u,texH:h};},"getScale")},{key:"draw",value:o(function(r,n,i){var a=this,s=this.atlasSize,l=this.rows,u=this.texHeight,h=this.getScale(n),f=h.scale,d=h.texW,p=h.texH,m=[null,null],g=o(function(T,C){if(i&&C){var w=C.context,E=T.x,_=T.row,A=E,D=u*_;w.save(),w.translate(A,D),w.scale(f,f),i(w,n),w.restore();}},"drawAt"),y=o(function(){g(a.freePointer,a.canvas),m[0]={x:a.freePointer.x,y:a.freePointer.row*u,w:d,h:p},m[1]={x:a.freePointer.x+d,y:a.freePointer.row*u,w:0,h:p},a.freePointer.x+=d,a.freePointer.x==s&&(a.freePointer.x=0,a.freePointer.row++);},"drawNormal"),v=o(function(){var T=a.scratch,C=a.canvas;T.clear(),g({x:0,row:0},T);var w=s-a.freePointer.x,E=d-w,_=u;{var A=a.freePointer.x,D=a.freePointer.row*u,O=w;C.context.drawImage(T,0,0,O,_,A,D,O,_),m[0]={x:A,y:D,w:O,h:p};}{var R=w,k=(a.freePointer.row+1)*u,L=E;C&&C.context.drawImage(T,R,0,L,_,0,k,L,_),m[1]={x:0,y:k,w:L,h:p};}a.freePointer.x=E,a.freePointer.row++;},"drawWrapped"),x=o(function(){a.freePointer.x=0,a.freePointer.row++;},"moveToStartOfNextRow");if(this.freePointer.x+d<=s)y();else{if(this.freePointer.row>=l-1)return!1;this.freePointer.x===s?(x(),y()):this.enableWrapping?v():(x(),y());}return this.keyToLocation.set(r,m),this.needsBuffer=!0,m;},"draw")},{key:"getOffsets",value:o(function(r){return this.keyToLocation.get(r);},"getOffsets")},{key:"isEmpty",value:o(function(){return this.freePointer.x===0&&this.freePointer.row===0;},"isEmpty")},{key:"canFit",value:o(function(r){var n=this.atlasSize,i=this.rows,a=this.getScale(r),s=a.texW;return this.freePointer.x+s>n?this.freePointer.row<i-1:!0;},"canFit")},{key:"bufferIfNeeded",value:o(function(r){this.texture||(this.texture=NJe(r,this.debugID)),this.needsBuffer&&(this.texture.buffer(this.canvas),this.needsBuffer=!1);},"bufferIfNeeded")},{key:"dispose",value:o(function(){this.texture&&(this.texture.deleteTexture(),this.texture=null,this.needsBuffer=!0);},"dispose")}]),t;}(),$Je=function(){function t(e,r){Bf(this,t),this.r=e,this.opts=r,this.keyToIds=new Map(),this.idToKey=new Map(),this.atlases=[],this.styleKeyToAtlas=new Map(),this.styleKeyNeedsRedraw=new Set(),this.forceGC=!1;}return o(t,"AtlasCollection"),Ff(t,[{key:"getKeys",value:o(function(){return new Set(this.styleKeyToAtlas.keys());},"getKeys")},{key:"getIdsFor",value:o(function(r){var n=this.keyToIds.get(r);return n||(n=new Set(),this.keyToIds.set(r,n)),n;},"getIdsFor")},{key:"_createAtlas",value:o(function(){var r=this.r,n=this.opts;return new FJe(r,n);},"_createAtlas")},{key:"_getScratchCanvas",value:o(function(){if(!this.scratch){var r=this.r,n=this.opts,i=n.webglTexSize,a=Math.floor(i/n.webglTexRows);this.scratch=n.createTextureCanvas(r,i,a,"scratch");}return this.scratch;},"_getScratchCanvas")},{key:"draw",value:o(function(r,n,i,a){if(this.styleKeyNeedsRedraw.has(n)){this.styleKeyNeedsRedraw.delete(n),this.deleteKey(r,n);var s=this.styleKeyToAtlas.get(n);s&&(s.forceGC=!0),this.styleKeyToAtlas.delete(n);}var l=this.styleKeyToAtlas.get(n);return l||(l=this.atlases[this.atlases.length-1],(!l||!l.canFit(i))&&(l=this._createAtlas(),this.atlases.push(l)),l.draw(n,i,a),this.styleKeyToAtlas.set(n,l),this.getIdsFor(n).add(r),this.idToKey.set(r,n)),l;},"draw")},{key:"getAtlas",value:o(function(r){return this.styleKeyToAtlas.get(r);},"getAtlas")},{key:"hasAtlas",value:o(function(r){return this.styleKeyToAtlas.has(r);},"hasAtlas")},{key:"deleteKey",value:o(function(r,n){this.idToKey.delete(r),this.getIdsFor(n).delete(r);},"deleteKey")},{key:"checkKeyIsInvalid",value:o(function(r,n){if(!this.idToKey.has(r))return!1;var i=this.idToKey.get(r);return i!=n?(this.deleteKey(r,i),!0):!1;},"checkKeyIsInvalid")},{key:"_getKeysToCollect",value:o(function(){var r=new Set(),n=go(this.styleKeyToAtlas.keys()),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;this.getIdsFor(a).size==0&&r.add(a);}}catch(s){n.e(s);}finally{n.f();}return r;},"_getKeysToCollect")},{key:"gc",value:o(function(){var r=this,n=this.atlases.some(function(p){return p.forceGC;}),i=this._getKeysToCollect();if(i.size===0&&!n){console.log("nothing to garbage collect");return;}var a=[],s=new Map(),l=null,u=go(this.atlases),h;try{var f=o(function(){var m=h.value,g=m.getKeys(),y=zJe(i,g);if(y.size===0&&!m.forceGC)return a.push(m),g.forEach(function(_){return s.set(_,m);}),"continue";l||(l=r._createAtlas(),a.push(l));var v=go(g),x;try{for(v.s();!(x=v.n()).done;){var b=x.value;if(!y.has(b)){var T=m.getOffsets(b),C=Li(T,2),w=C[0],E=C[1];l.canFit({w:w.w+E.w,h:w.h})||(l=r._createAtlas(),a.push(l)),r._copyTextureToNewAtlas(b,m,l),s.set(b,l);}}}catch(_){v.e(_);}finally{v.f();}},"_loop");for(u.s();!(h=u.n()).done;)var d=f();}catch(p){u.e(p);}finally{u.f();}this.atlases=a,this.styleKeyToAtlas=s;},"gc")},{key:"_copyTextureToNewAtlas",value:o(function(r,n,i){var a=n.getOffsets(r),s=Li(a,2),l=s[0],u=s[1];if(u.w===0)i.draw(r,l,function(p){p.drawImage(n.canvas,l.x,l.y,l.w,l.h,0,0,l.w,l.h);});else{var h=this._getScratchCanvas();h.clear(),h.context.drawImage(n.canvas,l.x,l.y,l.w,l.h,0,0,l.w,l.h),h.context.drawImage(n.canvas,u.x,u.y,u.w,u.h,l.w,0,u.w,u.h);var f=l.w+u.w,d=l.h;i.draw(r,{w:f,h:d},function(p){p.drawImage(h,0,0,f,d,0,0,f,d);});}},"_copyTextureToNewAtlas")},{key:"getCounts",value:o(function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size};},"getCounts")}]),t;}();o(zJe,"intersection");GJe=function(){function t(e,r){Bf(this,t),this.r=e;var n=r;this.globalOptions=n,this.maxAtlases=n.webglTexPerBatch,this.atlasSize=n.webglTexSize,this.renderTypes=new Map(),this.maxAtlasesPerBatch=r.webglTexPerBatch,this.batchAtlases=[],this._cacheScratchCanvas(n);}return o(t,"AtlasManager"),Ff(t,[{key:"_cacheScratchCanvas",value:o(function(r){var n=-1,i=-1,a=null,s=r.createTextureCanvas;r.createTextureCanvas=function(l,u,h,f){return f?((!a||u!=n||h!=i)&&(n=u,i=h,a=s(l,u,h)),a):s(l,u,h);};},"_cacheScratchCanvas")},{key:"addRenderType",value:o(function(r,n){var i=new $Je(this.r,this.globalOptions),a=n;this.renderTypes.set(r,ir({type:r,atlasCollection:i},a));},"addRenderType")},{key:"getRenderTypes",value:o(function(){return ige(this.renderTypes.values());},"getRenderTypes")},{key:"getRenderTypeOpts",value:o(function(r){return this.renderTypes.get(r);},"getRenderTypeOpts")},{key:"invalidate",value:o(function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.forceRedraw,a=i===void 0?!1:i,s=n.filterEle,l=s===void 0?function(){return!0;}:s,u=n.filterType,h=u===void 0?function(){return!0;}:u,f=!1,d=go(r),p;try{for(d.s();!(p=d.n()).done;){var m=p.value;if(l(m)){var g=m.id(),y=go(this.getRenderTypes()),v;try{for(y.s();!(v=y.n()).done;){var x=v.value;if(h(x.type)){var b=x.getKey(m);a?(x.atlasCollection.deleteKey(g,b),x.atlasCollection.styleKeyNeedsRedraw.add(b),f=!0):f|=x.atlasCollection.checkKeyIsInvalid(g,b);}}}catch(T){y.e(T);}finally{y.f();}}}}catch(T){d.e(T);}finally{d.f();}return f;},"invalidate")},{key:"gc",value:o(function(){var r=go(this.getRenderTypes()),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;i.atlasCollection.gc();}}catch(a){r.e(a);}finally{r.f();}},"gc")},{key:"isRenderable",value:o(function(r,n){var i=this.getRenderTypeOpts(n);return i&&i.isVisible(r);},"isRenderable")},{key:"startBatch",value:o(function(){this.batchAtlases=[];},"startBatch")},{key:"getAtlasCount",value:o(function(){return this.batchAtlases.length;},"getAtlasCount")},{key:"getAtlases",value:o(function(){return this.batchAtlases;},"getAtlases")},{key:"getOrCreateAtlas",value:o(function(r,n,i){var a=this.renderTypes.get(i),s=a.getKey(r),l=r.id();return a.atlasCollection.draw(l,s,n,function(u){a.drawElement(u,r,n,!0,!0);});},"getOrCreateAtlas")},{key:"getAtlasIndexForBatch",value:o(function(r){var n=this.batchAtlases.indexOf(r);if(n<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)return;this.batchAtlases.push(r),n=this.batchAtlases.length-1;}return n;},"getAtlasIndexForBatch")},{key:"getIndexArray",value:o(function(){return Array.from({length:this.maxAtlases},function(r,n){return n;});},"getIndexArray")},{key:"getAtlasInfo",value:o(function(r,n){var i=this.renderTypes.get(n),a=i.getBoundingBox(r),s=this.getOrCreateAtlas(r,a,n),l=this.getAtlasIndexForBatch(s);if(l!==void 0){var u=i.getKey(r),h=s.getOffsets(u),f=Li(h,2),d=f[0],p=f[1];return{atlasID:l,tex:d,tex1:d,tex2:p,bb:a,type:n,styleKey:u};}},"getAtlasInfo")},{key:"canAddToCurrentBatch",value:o(function(r,n){if(this.batchAtlases.length===this.maxAtlasesPerBatch){var i=this.renderTypes.get(n),a=i.getKey(r),s=i.atlasCollection.getAtlas(a);return s&&this.batchAtlases.includes(s);}return!0;},"canAddToCurrentBatch")},{key:"setTransformMatrix",value:o(function(r,n,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,s=n.bb,l=n.type,u=n.tex1,h=n.tex2,f=this.getRenderTypeOpts(l),d=f.getPadding?f.getPadding(i):0,p=u.w/(u.w+h.w);a||(p=1-p);var m=this.getAdjustedBB(s,d,a,p),g,y;P1e(r);var v=f.getRotation?f.getRotation(i):0;if(v!==0){var x=f.getRotationPoint(i),b=x.x,T=x.y;q6(r,r,[b,T]),B1e(r,r,v);var C=f.getRotationOffset(i);g=C.x+m.xOffset,y=C.y;}else g=m.x1,y=m.y1;q6(r,r,[g,y]),iF(r,r,[m.w,m.h]);},"setTransformMatrix")},{key:"getTransformMatrix",value:o(function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Qb();return this.setTransformMatrix(a,r,n,i),a;},"getTransformMatrix")},{key:"getAdjustedBB",value:o(function(r,n,i,a){var s=r.x1,l=r.y1,u=r.w,h=r.h;n&&(s-=n,l-=n,u+=2*n,h+=2*n);var f=0,d=u*a;return i&&a<1?u=d:!i&&a<1&&(f=u-d,s+=f,u=d),{x1:s,y1:l,w:u,h,xOffset:f};},"getAdjustedBB")},{key:"getDebugInfo",value:o(function(){var r=[],n=go(this.renderTypes),i;try{for(n.s();!(i=n.n()).done;){var a=Li(i.value,2),s=a[0],l=a[1],u=l.atlasCollection.getCounts(),h=u.keyCount,f=u.atlasCount;r.push({type:s,keyCount:h,atlasCount:f});}}catch(d){n.e(d);}finally{n.f();}return r;},"getDebugInfo")}]),t;}(),mB=0,Qme=1,Zme=2,gB=3,VJe=function(){function t(e,r,n){Bf(this,t),this.r=e,this.gl=r,this.maxInstances=n.webglBatchSize,this.maxAtlases=n.webglTexPerBatch,this.atlasSize=n.webglTexSize,this.bgColor=n.bgColor,n.enableWrapping=!0,n.createTextureCanvas=LJe,this.atlasManager=new GJe(e,n),this.program=this.createShaderProgram(Zb.SCREEN),this.pickingProgram=this.createShaderProgram(Zb.PICKING),this.vao=this.createVAO(),this.debugInfo=[];}return o(t,"ElementDrawingWebGL"),Ff(t,[{key:"addTextureRenderType",value:o(function(r,n){this.atlasManager.addRenderType(r,n);},"addTextureRenderType")},{key:"invalidate",value:o(function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.type,a=this.atlasManager;return i?a.invalidate(r,{filterType:o(function(l){return l===i;},"filterType"),forceRedraw:!0}):a.invalidate(r);},"invalidate")},{key:"gc",value:o(function(){this.atlasManager.gc();},"gc")},{key:"createShaderProgram",value:o(function(r){var n=this.gl,i=`#version 300 es
      precision highp float;

      uniform mat3 uPanZoomMatrix;
      uniform int  uAtlasSize;
      
      // instanced
      in vec2 aPosition; 

      // what are we rendering?
      in int aVertType;

      // for picking
      in vec4 aIndex;
      
      // For textures
      in int aAtlasId; // which shader unit/atlas to use
      in vec4 aTex1; // x/y/w/h of texture in atlas
      in vec4 aTex2; 

      // for any transforms that are needed
      in vec4 aScaleRotate1;  // vectors use fewer attributes than matrices
      in vec2 aTranslate1;
      in vec4 aScaleRotate2;
      in vec2 aTranslate2;

      // for edges
      in vec4 aPointAPointB;
      in vec4 aPointCPointD;
      in float aLineWidth;
      in vec4 aEdgeColor;

      out vec2 vTexCoord;
      out vec4 vEdgeColor;
      flat out int vAtlasId;
      flat out vec4 vIndex;
      flat out int vVertType;

      void main(void) {
        int vid = gl_VertexID;
        vec2 position = aPosition;

        if(aVertType == `.concat(mB,`) {
          float texX;
          float texY;
          float texW;
          float texH;
          mat3  texMatrix;

          int vid = gl_VertexID;
          if(vid <= 5) {
            texX = aTex1.x;
            texY = aTex1.y;
            texW = aTex1.z;
            texH = aTex1.w;
            texMatrix = mat3(
              vec3(aScaleRotate1.xy, 0.0),
              vec3(aScaleRotate2.zw, 0.0),
              vec3(aTranslate1,      1.0)
            );
          } else {
            texX = aTex2.x;
            texY = aTex2.y;
            texW = aTex2.z;
            texH = aTex2.w;
            texMatrix = mat3(
              vec3(aScaleRotate2.xy, 0.0),
              vec3(aScaleRotate2.zw, 0.0),
              vec3(aTranslate2,      1.0)
            );
          }

          if(vid == 1 || vid == 2 || vid == 4 || vid == 7 || vid == 8 || vid == 10) {
            texX += texW;
          }
          if(vid == 2 || vid == 4 || vid == 5 || vid == 8 || vid == 10 || vid == 11) {
            texY += texH;
          }

          float d = float(uAtlasSize);
          vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1

          gl_Position = vec4(uPanZoomMatrix * texMatrix * vec3(position, 1.0), 1.0);
        } 
        else if(aVertType == `).concat(Qme,` && vid < 6) {
          vec2 source = aPointAPointB.xy;
          vec2 target = aPointAPointB.zw;

          // adjust the geometry so that the line is centered on the edge
          position.y = position.y - 0.5;

          vec2 xBasis = target - source;
          vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));
          vec2 point = source + xBasis * position.x + yBasis * aLineWidth * position.y;

          gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);
          vEdgeColor = aEdgeColor;
        } 
        else if(aVertType == `).concat(Zme,` && vid < 6) {
          vec2 pointA = aPointAPointB.xy;
          vec2 pointB = aPointAPointB.zw;
          vec2 pointC = aPointCPointD.xy;
          vec2 pointD = aPointCPointD.zw;

          // adjust the geometry so that the line is centered on the edge
          position.y = position.y - 0.5;

          vec2 p0 = pointA;
          vec2 p1 = pointB;
          vec2 p2 = pointC;
          vec2 pos = position;
          if(position.x == 1.0) {
            p0 = pointD;
            p1 = pointC;
            p2 = pointB;
            pos = vec2(0.0, -position.y);
          }

          vec2 p01 = p1 - p0;
          vec2 p12 = p2 - p1;
          vec2 p21 = p1 - p2;

          // Find the normal vector.
          vec2 tangent = normalize(normalize(p12) + normalize(p01));
          vec2 normal = vec2(-tangent.y, tangent.x);

          // Find the vector perpendicular to p0 -> p1.
          vec2 p01Norm = normalize(vec2(-p01.y, p01.x));

          // Determine the bend direction.
          float sigma = sign(dot(p01 + p21, normal));
          float width = aLineWidth;

          if(sign(pos.y) == -sigma) {
            // This is an intersecting vertex. Adjust the position so that there's no overlap.
            vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);
            gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
          } else {
            // This is a non-intersecting vertex. Treat it like a mitre join.
            vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);
            gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
          }

          vEdgeColor = aEdgeColor;
        } 
        else if(aVertType == `).concat(gB,` && vid < 3) {
          // massage the first triangle into an edge arrow
          if(vid == 0)
            position = vec2(-0.15, -0.3);
          if(vid == 1)
            position = vec2( 0.0,   0.0);
          if(vid == 2)
            position = vec2( 0.15, -0.3);

          mat3 transform = mat3(
            vec3(aScaleRotate1.xy, 0.0),
            vec3(aScaleRotate1.zw, 0.0),
            vec3(aTranslate1,      1.0)
          );
          gl_Position = vec4(uPanZoomMatrix * transform * vec3(position, 1.0), 1.0);
          vEdgeColor = aEdgeColor;
        } else {
          gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space
        }

        vAtlasId = aAtlasId;
        vIndex = aIndex;
        vVertType = aVertType;
      }
    `),a=this.atlasManager.getIndexArray(),s=`#version 300 es
      precision highp float;

      // define texture unit for each node in the batch
      `.concat(a.map(function(h){return"uniform sampler2D uTexture".concat(h,";");}).join(`
	`),`

      uniform vec4 uBGColor;

      in vec2 vTexCoord;
      in vec4 vEdgeColor;
      flat in int vAtlasId;
      flat in vec4 vIndex;
      flat in int vVertType;

      out vec4 outColor;

      void main(void) {
        if(vVertType == `).concat(mB,`) {
          `).concat(a.map(function(h){return"if(vAtlasId == ".concat(h,") outColor = texture(uTexture").concat(h,", vTexCoord);");}).join(`
	else `),`
        } else if(vVertType == `).concat(gB,`) {
          // blend arrow color with background (using premultiplied alpha)
          outColor.rgb = vEdgeColor.rgb + (uBGColor.rgb * (1.0 - vEdgeColor.a)); 
          outColor.a = 1.0; // make opaque, masks out line under arrow
        } else {
          outColor = vEdgeColor;
        }

        `).concat(r.picking?`if(outColor.a == 0.0) discard;
             else outColor = vIndex;`:"",`
      }
    `),l=DJe(n,i,s);l.aPosition=n.getAttribLocation(l,"aPosition"),l.aIndex=n.getAttribLocation(l,"aIndex"),l.aVertType=n.getAttribLocation(l,"aVertType"),l.aAtlasId=n.getAttribLocation(l,"aAtlasId"),l.aTex1=n.getAttribLocation(l,"aTex1"),l.aTex2=n.getAttribLocation(l,"aTex2"),l.aScaleRotate1=n.getAttribLocation(l,"aScaleRotate1"),l.aTranslate1=n.getAttribLocation(l,"aTranslate1"),l.aScaleRotate2=n.getAttribLocation(l,"aScaleRotate2"),l.aTranslate2=n.getAttribLocation(l,"aTranslate2"),l.aPointAPointB=n.getAttribLocation(l,"aPointAPointB"),l.aPointCPointD=n.getAttribLocation(l,"aPointCPointD"),l.aLineWidth=n.getAttribLocation(l,"aLineWidth"),l.aEdgeColor=n.getAttribLocation(l,"aEdgeColor"),l.uPanZoomMatrix=n.getUniformLocation(l,"uPanZoomMatrix"),l.uAtlasSize=n.getUniformLocation(l,"uAtlasSize"),l.uBGColor=n.getUniformLocation(l,"uBGColor"),l.uTextures=[];for(var u=0;u<this.atlasManager.maxAtlases;u++)l.uTextures.push(n.getUniformLocation(l,"uTexture".concat(u)));return l;},"createShaderProgram")},{key:"createVAO",value:o(function(){var r=[0,0,1,0,1,1,0,0,1,1,0,1],n=[].concat(r,r);this.vertexCount=n.length/2;var i=this.maxInstances,a=this.gl,s=this.program,l=a.createVertexArray();return a.bindVertexArray(l),IJe(a,"vec2",s.aPosition,n),this.indexBuffer=mo(a,i,"vec4",s.aIndex),this.vertTypeBuffer=mo(a,i,"int",s.aVertType),this.atlasIdBuffer=mo(a,i,"int",s.aAtlasId),this.tex1Buffer=mo(a,i,"vec4",s.aTex1),this.tex2Buffer=mo(a,i,"vec4",s.aTex2),this.scaleRotate1Buffer=mo(a,i,"vec4",s.aScaleRotate1),this.translate1Buffer=mo(a,i,"vec2",s.aTranslate1),this.scaleRotate2Buffer=mo(a,i,"vec4",s.aScaleRotate2),this.translate2Buffer=mo(a,i,"vec2",s.aTranslate2),this.pointAPointBBuffer=mo(a,i,"vec4",s.aPointAPointB),this.pointCPointDBuffer=mo(a,i,"vec4",s.aPointCPointD),this.lineWidthBuffer=mo(a,i,"float",s.aLineWidth),this.edgeColorBuffer=mo(a,i,"vec4",s.aEdgeColor),a.bindVertexArray(null),l;},"createVAO")},{key:"buffers",get:o(function(){var r=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(n){return n.endsWith("Buffer");}).map(function(n){return r[n];})),this._buffers;},"get")},{key:"startFrame",value:o(function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zb.SCREEN;this.panZoomMatrix=r,this.debugInfo=n,this.renderTarget=i,this.startBatch();},"startFrame")},{key:"startBatch",value:o(function(){this.instanceCount=0,this.atlasManager.startBatch();},"startBatch")},{key:"endFrame",value:o(function(){this.endBatch();},"endFrame")},{key:"getTempMatrix",value:o(function(){return this.tempMatrix=this.tempMatrix||Qb();},"getTempMatrix")},{key:"drawTexture",value:o(function(r,n,i){var a=this.atlasManager;if(a.isRenderable(r,i)){a.canAddToCurrentBatch(r,i)||this.endBatch();var s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=mB;var l=this.indexBuffer.getView(s);S6(n,l);var u=a.getAtlasInfo(r,i,u),h=u.atlasID,f=u.tex1,d=u.tex2,p=this.atlasIdBuffer.getView(s);p[0]=h;var m=this.tex1Buffer.getView(s);m[0]=f.x,m[1]=f.y,m[2]=f.w,m[3]=f.h;var g=this.tex2Buffer.getView(s);g[0]=d.x,g[1]=d.y,g[2]=d.w,g[3]=d.h;for(var y=this.getTempMatrix(),v=0,x=[1,2];v<x.length;v++){var b=x[v];a.setTransformMatrix(y,u,r,b===1);var T=this["scaleRotate".concat(b,"Buffer")].getView(s);T[0]=y[0],T[1]=y[1],T[2]=y[3],T[3]=y[4];var C=this["translate".concat(b,"Buffer")].getView(s);C[0]=y[6],C[1]=y[7];}this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch();}},"drawTexture")},{key:"drawEdgeArrow",value:o(function(r,n,i){var a=r._private.rscratch,s,l,u;if(i==="source"?(s=a.arrowStartX,l=a.arrowStartY,u=a.srcArrowAngle):(s=a.arrowEndX,l=a.arrowEndY,u=a.tgtArrowAngle),!(isNaN(s)||s==null||isNaN(l)||l==null||isNaN(u)||u==null)){var h=r.pstyle(i+"-arrow-shape").value;if(h!=="none"){var f=r.pstyle(i+"-arrow-color").value,d=r.pstyle("opacity").value,p=r.pstyle("line-opacity").value,m=d*p,g=r.pstyle("width").pfValue,y=r.pstyle("arrow-scale").value,v=this.r.getArrowWidth(g,y),x=this.getTempMatrix();P1e(x),q6(x,x,[s,l]),iF(x,x,[v,v]),B1e(x,x,u);var b=this.instanceCount;this.vertTypeBuffer.getView(b)[0]=gB;var T=this.indexBuffer.getView(b);S6(n,T);var C=this.edgeColorBuffer.getView(b);E6(f,m,C);var w=this.scaleRotate1Buffer.getView(b);w[0]=x[0],w[1]=x[1],w[2]=x[3],w[3]=x[4];var E=this.translate1Buffer.getView(b);E[0]=x[6],E[1]=x[7],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch();}}},"drawEdgeArrow")},{key:"drawEdgeLine",value:o(function(r,n){var i=r.pstyle("opacity").value,a=r.pstyle("line-opacity").value,s=r.pstyle("width").pfValue,l=r.pstyle("line-color").value,u=i*a,h=this.getEdgePoints(r);if(h.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),h.length==4){var f=this.instanceCount;this.vertTypeBuffer.getView(f)[0]=Qme;var d=this.indexBuffer.getView(f);S6(n,d);var p=this.edgeColorBuffer.getView(f);E6(l,u,p);var m=this.lineWidthBuffer.getView(f);m[0]=s;var g=this.pointAPointBBuffer.getView(f);g[0]=h[0],g[1]=h[1],g[2]=h[2],g[3]=h[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch();}else for(var y=0;y<h.length-2;y+=2){var v=this.instanceCount;this.vertTypeBuffer.getView(v)[0]=Zme;var x=this.indexBuffer.getView(v);S6(n,x);var b=this.edgeColorBuffer.getView(v);E6(l,u,b);var T=this.lineWidthBuffer.getView(v);T[0]=s;var C=h[y-2],w=h[y-1],E=h[y],_=h[y+1],A=h[y+2],D=h[y+3],O=h[y+4],R=h[y+5];y==0&&(C=2*E-A+.001,w=2*_-D+.001),y==h.length-4&&(O=2*A-E+.001,R=2*D-_+.001);var k=this.pointAPointBBuffer.getView(v);k[0]=C,k[1]=w,k[2]=E,k[3]=_;var L=this.pointCPointDBuffer.getView(v);L[0]=A,L[1]=D,L[2]=O,L[3]=R,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch();}},"drawEdgeLine")},{key:"getEdgePoints",value:o(function(r){var n=r._private.rscratch,i=n.allpts;if(i.length==4)return i;var a=this.getNumSegments(r);return this.getCurveSegmentPoints(i,a);},"getEdgePoints")},{key:"getNumSegments",value:o(function(r){var n=15;return Math.min(Math.max(n,5),this.maxInstances);},"getNumSegments")},{key:"getCurveSegmentPoints",value:o(function(r,n){if(r.length==4)return r;for(var i=Array((n+1)*2),a=0;a<=n;a++)if(a==0)i[0]=r[0],i[1]=r[1];else if(a==n)i[a*2]=r[r.length-2],i[a*2+1]=r[r.length-1];else{var s=a/n;this.setCurvePoint(r,s,i,a*2);}return i;},"getCurveSegmentPoints")},{key:"setCurvePoint",value:o(function(r,n,i,a){if(r.length<=2)i[a]=r[0],i[a+1]=r[1];else{for(var s=Array(r.length-2),l=0;l<s.length;l+=2){var u=(1-n)*r[l]+n*r[l+2],h=(1-n)*r[l+1]+n*r[l+3];s[l]=u,s[l+1]=h;}return this.setCurvePoint(s,n,i,a);}},"setCurvePoint")},{key:"endBatch",value:o(function(){var r=this.gl,n=this.vao,i=this.vertexCount,a=this.instanceCount;if(a!==0){var s=this.renderTarget.picking?this.pickingProgram:this.program;r.useProgram(s),r.bindVertexArray(n);var l=go(this.buffers),u;try{for(l.s();!(u=l.n()).done;){var h=u.value;h.bufferSubData(a);}}catch(g){l.e(g);}finally{l.f();}for(var f=this.atlasManager.getAtlases(),d=0;d<f.length;d++)f[d].bufferIfNeeded(r);for(var p=0;p<f.length;p++)r.activeTexture(r.TEXTURE0+p),r.bindTexture(r.TEXTURE_2D,f[p].texture),r.uniform1i(s.uTextures[p],p);r.uniformMatrix3fv(s.uPanZoomMatrix,!1,this.panZoomMatrix),r.uniform1i(s.uAtlasSize,this.atlasManager.atlasSize);var m=E6(this.bgColor,1);r.uniform4fv(s.uBGColor,m),r.drawArraysInstanced(r.TRIANGLES,0,i,a),r.bindVertexArray(null),r.bindTexture(r.TEXTURE_2D,null),this.debugInfo&&this.debugInfo.push({count:a,atlasCount:f.length}),this.startBatch();}},"endBatch")},{key:"getDebugInfo",value:o(function(){return this.debugInfo;},"getDebugInfo")},{key:"getAtlasDebugInfo",value:o(function(){return this.atlasManager.getDebugInfo();},"getAtlasDebugInfo")}]),t;}();o(Jme,"fillStyle");UJe=function(){function t(e){Bf(this,t),this.r=e;}return o(t,"OverlayUnderlayRenderer"),Ff(t,[{key:"getStyleKey",value:o(function(r,n){var i=this.getStyle(r,n),a=i.shape,s=i.opacity,l=i.color;if(!a)return null;var u=n.width(),h=n.height(),f=Jme(l,s);return Nf("".concat(a,"-").concat(u,"-").concat(h,"-").concat(f));},"getStyleKey")},{key:"isVisible",value:o(function(r,n){var i=n.pstyle("".concat(r,"-opacity")).value;return i>0;},"isVisible")},{key:"getStyle",value:o(function(r,n){var i=n.pstyle("".concat(r,"-opacity")).value,a=n.pstyle("".concat(r,"-color")).value,s=n.pstyle("".concat(r,"-shape")).value;return{opacity:i,color:a,shape:s};},"getStyle")},{key:"getPadding",value:o(function(r,n){return n.pstyle("".concat(r,"-padding")).pfValue;},"getPadding")},{key:"draw",value:o(function(r,n,i,a){if(this.isVisible(r,i)){var s=this.r,l=a.w,u=a.h,h=l/2,f=u/2,d=this.getStyle(r,i),p=d.shape,m=d.color,g=d.opacity;n.save(),n.fillStyle=Jme(m,g),p==="round-rectangle"||p==="roundrectangle"?s.drawRoundRectanglePath(n,h,f,l,u,"auto"):p==="ellipse"&&s.drawEllipsePath(n,h,f,l,u),n.fill(),n.restore();}},"draw")}]),t;}();o(HJe,"getBGColor");F1e={};F1e.initWebgl=function(t,e){var r=this,n=r.data.contexts[r.WEBGL],i=t.cy.container();t.bgColor=HJe(i),t.webglTexSize=Math.min(t.webglTexSize,n.getParameter(n.MAX_TEXTURE_SIZE)),t.webglTexRows=Math.min(t.webglTexRows,54),t.webglBatchSize=Math.min(t.webglBatchSize,16384),t.webglTexPerBatch=Math.min(t.webglTexPerBatch,n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)),r.webglDebug=t.webglDebug,r.webglDebugShowAtlases=t.webglDebugShowAtlases,console.log("max texture units",n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)),console.log("max texture size",n.getParameter(n.MAX_TEXTURE_SIZE)),console.log("webgl options",t),r.pickingFrameBuffer=OJe(n),r.pickingFrameBuffer.needsDraw=!0;var a=o(function(f){return r.getTextAngle(f,null);},"getLabelRotation"),s=o(function(f){var d=f.pstyle("label");return d&&d.value;},"isLabelVisible");r.eleDrawing=new VJe(r,n,t);var l=new UJe(r);r.eleDrawing.addTextureRenderType("node-body",Ub({getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement,isVisible:o(function(f){return f.visible();},"isVisible")})),r.eleDrawing.addTextureRenderType("node-label",Ub({getKey:e.getLabelKey,getBoundingBox:e.getLabelBox,drawElement:e.drawLabel,getRotation:a,getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:s})),r.eleDrawing.addTextureRenderType("node-overlay",Ub({getBoundingBox:e.getElementBox,getKey:o(function(f){return l.getStyleKey("overlay",f);},"getKey"),drawElement:o(function(f,d,p){return l.draw("overlay",f,d,p);},"drawElement"),isVisible:o(function(f){return l.isVisible("overlay",f);},"isVisible"),getPadding:o(function(f){return l.getPadding("overlay",f);},"getPadding")})),r.eleDrawing.addTextureRenderType("node-underlay",Ub({getBoundingBox:e.getElementBox,getKey:o(function(f){return l.getStyleKey("underlay",f);},"getKey"),drawElement:o(function(f,d,p){return l.draw("underlay",f,d,p);},"drawElement"),isVisible:o(function(f){return l.isVisible("underlay",f);},"isVisible"),getPadding:o(function(f){return l.getPadding("underlay",f);},"getPadding")})),r.eleDrawing.addTextureRenderType("edge-label",Ub({getKey:e.getLabelKey,getBoundingBox:e.getLabelBox,drawElement:e.drawLabel,getRotation:a,getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:s}));var u=d4(function(){console.log("garbage collect flag set"),r.data.gc=!0;},1e4);r.onUpdateEleCalcs(function(h,f){var d=!1;f&&f.length>0&&(d|=r.eleDrawing.invalidate(f)),d&&u();}),WJe(r);};o(WJe,"overrideCanvasRendererFunctions");o(qJe,"clearWebgl");o(YJe,"clearCanvas");o(XJe,"createPanZoomMatrix");o($1e,"setContextTransform");o(jJe,"drawSelectionRectangle");o(KJe,"drawAxes");o(QJe,"drawAtlases");o(ZJe,"getPickingIndexes");o(JJe,"findNearestElementsWebgl");o(z1e,"renderWebgl");zf={};zf.drawPolygonPath=function(t,e,r,n,i,a){var s=n/2,l=i/2;t.beginPath&&t.beginPath(),t.moveTo(e+s*a[0],r+l*a[1]);for(var u=1;u<a.length/2;u++)t.lineTo(e+s*a[u*2],r+l*a[u*2+1]);t.closePath();};zf.drawRoundPolygonPath=function(t,e,r,n,i,a,s){s.forEach(function(l){return b1e(t,l);}),t.closePath();};zf.drawRoundRectanglePath=function(t,e,r,n,i,a){var s=n/2,l=i/2,u=a==="auto"?Xp(n,i):Math.min(a,l,s);t.beginPath&&t.beginPath(),t.moveTo(e,r-l),t.arcTo(e+s,r-l,e+s,r,u),t.arcTo(e+s,r+l,e,r+l,u),t.arcTo(e-s,r+l,e-s,r,u),t.arcTo(e-s,r-l,e,r-l,u),t.lineTo(e,r-l),t.closePath();};zf.drawBottomRoundRectanglePath=function(t,e,r,n,i,a){var s=n/2,l=i/2,u=a==="auto"?Xp(n,i):a;t.beginPath&&t.beginPath(),t.moveTo(e,r-l),t.lineTo(e+s,r-l),t.lineTo(e+s,r),t.arcTo(e+s,r+l,e,r+l,u),t.arcTo(e-s,r+l,e-s,r,u),t.lineTo(e-s,r-l),t.lineTo(e,r-l),t.closePath();};zf.drawCutRectanglePath=function(t,e,r,n,i,a,s){var l=n/2,u=i/2,h=s==="auto"?VB():s;t.beginPath&&t.beginPath(),t.moveTo(e-l+h,r-u),t.lineTo(e+l-h,r-u),t.lineTo(e+l,r-u+h),t.lineTo(e+l,r+u-h),t.lineTo(e+l-h,r+u),t.lineTo(e-l+h,r+u),t.lineTo(e-l,r+u-h),t.lineTo(e-l,r-u+h),t.closePath();};zf.drawBarrelPath=function(t,e,r,n,i){var a=n/2,s=i/2,l=e-a,u=e+a,h=r-s,f=r+s,d=xB(n,i),p=d.widthOffset,m=d.heightOffset,g=d.ctrlPtOffsetPct*p;t.beginPath&&t.beginPath(),t.moveTo(l,h+m),t.lineTo(l,f-m),t.quadraticCurveTo(l+g,f,l+p,f),t.lineTo(u-p,f),t.quadraticCurveTo(u-g,f,u,f-m),t.lineTo(u,h+m),t.quadraticCurveTo(u-g,h,u-p,h),t.lineTo(l+p,h),t.quadraticCurveTo(l+g,h,l,h+m),t.closePath();};ege=Math.sin(0),tge=Math.cos(0),RB={},NB={},G1e=Math.PI/40;for(zp=0*Math.PI;zp<2*Math.PI;zp+=G1e)RB[zp]=Math.sin(zp),NB[zp]=Math.cos(zp);zf.drawEllipsePath=function(t,e,r,n,i){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,r,n/2,i/2,0,0,2*Math.PI);else for(var a,s,l=n/2,u=i/2,h=0*Math.PI;h<2*Math.PI;h+=G1e)a=e-l*RB[h]*ege+l*NB[h]*tge,s=r+u*NB[h]*ege+u*RB[h]*tge,h===0?t.moveTo(a,s):t.lineTo(a,s);t.closePath();};x4={};x4.createBuffer=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,[r,r.getContext("2d")];};x4.bufferCanvasImage=function(t){var e=this.cy,r=e.mutableElements(),n=r.boundingBox(),i=this.findContainerClientCoords(),a=t.full?Math.ceil(n.w):i[2],s=t.full?Math.ceil(n.h):i[3],l=_t(t.maxWidth)||_t(t.maxHeight),u=this.getPixelRatio(),h=1;if(t.scale!==void 0)a*=t.scale,s*=t.scale,h=t.scale;else if(l){var f=1/0,d=1/0;_t(t.maxWidth)&&(f=h*t.maxWidth/a),_t(t.maxHeight)&&(d=h*t.maxHeight/s),h=Math.min(f,d),a*=h,s*=h;}l||(a*=u,s*=u,h*=u);var p=document.createElement("canvas");p.width=a,p.height=s,p.style.width=a+"px",p.style.height=s+"px";var m=p.getContext("2d");if(a>0&&s>0){m.clearRect(0,0,a,s),m.globalCompositeOperation="source-over";var g=this.getCachedZSortedEles();if(t.full)m.translate(-n.x1*h,-n.y1*h),m.scale(h,h),this.drawElements(m,g),m.scale(1/h,1/h),m.translate(n.x1*h,n.y1*h);else{var y=e.pan(),v={x:y.x*h,y:y.y*h};h*=e.zoom(),m.translate(v.x,v.y),m.scale(h,h),this.drawElements(m,g),m.scale(1/h,1/h),m.translate(-v.x,-v.y);}t.bg&&(m.globalCompositeOperation="destination-over",m.fillStyle=t.bg,m.rect(0,0,a,s),m.fill());}return p;};o(eet,"b64ToBlob");o(rge,"b64UriToB64");o(V1e,"output");x4.png=function(t){return V1e(t,this.bufferCanvasImage(t),"image/png");};x4.jpg=function(t){return V1e(t,this.bufferCanvasImage(t),"image/jpeg");};U1e={};U1e.nodeShapeImpl=function(t,e,r,n,i,a,s,l){switch(t){case"ellipse":return this.drawEllipsePath(e,r,n,i,a);case"polygon":return this.drawPolygonPath(e,r,n,i,a,s);case"round-polygon":return this.drawRoundPolygonPath(e,r,n,i,a,s,l);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,n,i,a,l);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,n,i,a,s,l);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,n,i,a,l);case"barrel":return this.drawBarrelPath(e,r,n,i,a);}};tet=H1e,Er=H1e.prototype;Er.CANVAS_LAYERS=3;Er.SELECT_BOX=0;Er.DRAG=1;Er.NODE=2;Er.WEBGL=3;Er.CANVAS_TYPES=["2d","2d","2d","webgl2"];Er.BUFFER_COUNT=3;Er.TEXTURE_BUFFER=0;Er.MOTIONBLUR_BUFFER_NODE=1;Er.MOTIONBLUR_BUFFER_DRAG=2;o(H1e,"CanvasRenderer");Er.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[Er.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[Er.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[Er.SELECT_BOX]=e;break;case"gc":r.data.gc=!0;break;}};ret=typeof Path2D<"u";Er.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t;};Er.usePaths=function(){return ret&&this.pathsEnabled;};Er.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e);};Er.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled;};Er.makeOffscreenCanvas=function(t,e){var r;if((typeof OffscreenCanvas>"u"?"undefined":Hi(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var n=this.cy.window(),i=n.document;r=i.createElement("canvas"),r.width=t,r.height=e;}return r;};[R1e,Jc,nh,rF,Jp,cy,vs,F1e,zf,x4,U1e].forEach(function(t){ir(Er,t);});net=[{name:"null",impl:y1e},{name:"base",impl:A1e},{name:"canvas",impl:tet}],iet=[{type:"layout",extensions:zZe},{type:"renderer",extensions:net}],W1e={},q1e={};o(Y1e,"setExtension");o(X1e,"getExtension");o(aet,"setModule");o(set,"getModule");MB=o(function(){if(arguments.length===2)return X1e.apply(null,arguments);if(arguments.length===3)return Y1e.apply(null,arguments);if(arguments.length===4)return set.apply(null,arguments);if(arguments.length===5)return aet.apply(null,arguments);oi("Invalid extension access syntax");},"extension");c4.prototype.extension=MB;iet.forEach(function(t){t.extensions.forEach(function(e){Y1e(t.type,e.name,e.impl);});});j1e=o(function t(){if(!(this instanceof t))return new t();this.length=0;},"Stylesheet"),Qp=j1e.prototype;Qp.instanceString=function(){return"stylesheet";};Qp.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this;};Qp.css=function(t,e){var r=this.length-1;if(Jt(t))this[r].properties.push({name:t,value:e});else if(Vr(t))for(var n=t,i=Object.keys(n),a=0;a<i.length;a++){var s=i[a],l=n[s];if(l!=null){var u=$a.properties[s]||$a.properties[Y6(s)];if(u!=null){var h=u.name,f=l;this[r].properties.push({name:h,value:f});}}}return this;};Qp.style=Qp.css;Qp.generateStyle=function(t){var e=new $a(t);return this.appendToStyle(e);};Qp.appendToStyle=function(t){for(var e=0;e<this.length;e++){var r=this[e],n=r.selector,i=r.properties;t.selector(n);for(var a=0;a<i.length;a++){var s=i[a];t.css(s.name,s.value);}}return t;};oet="3.31.0",il=o(function(e){if(e===void 0&&(e={}),Vr(e))return new c4(e);if(Jt(e))return MB.apply(MB,arguments);},"cytoscape");il.use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(il),t.apply(null,e),this;};il.warnings=function(t){return bge(t);};il.version=oet;il.stylesheet=il.Stylesheet=j1e;});var oF=Ii((b4,sF)=>{"use strict";o(function(e,r){typeof b4=="object"&&typeof sF=="object"?sF.exports=r():typeof define=="function"&&define.amd?define([],r):typeof b4=="object"?b4.layoutBase=r():e.layoutBase=r();},"webpackUniversalModuleDefinition")(b4,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports;}return o(r,"__webpack_require__"),r.m=t,r.c=e,r.i=function(n){return n;},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a});},r.n=function(n){var i=n&&n.__esModule?o(function(){return n.default;},"getDefault"):o(function(){return n;},"getModuleExports");return r.d(i,"a",i),i;},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i);},r.p="",r(r.s=26);}([function(t,e,r){"use strict";function n(){}o(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n;},function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(u,h,f){n.call(this,f),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=f,this.bendpoints=[],this.source=u,this.target=h;}o(s,"LEdge"),s.prototype=Object.create(n.prototype);for(var l in n)s[l]=n[l];s.prototype.getSource=function(){return this.source;},s.prototype.getTarget=function(){return this.target;},s.prototype.isInterGraph=function(){return this.isInterGraph;},s.prototype.getLength=function(){return this.length;},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget;},s.prototype.getBendpoints=function(){return this.bendpoints;},s.prototype.getLca=function(){return this.lca;},s.prototype.getSourceInLca=function(){return this.sourceInLca;},s.prototype.getTargetInLca=function(){return this.targetInLca;},s.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;if(this.target===u)return this.source;throw"Node is not incident with this edge";},s.prototype.getOtherEndInGraph=function(u,h){for(var f=this.getOtherEnd(u),d=h.getGraphManager().getRoot();;){if(f.getOwner()==h)return f;if(f.getOwner()==d)break;f=f.getOwner().getParent();}return null;},s.prototype.updateLength=function(){var u=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),u),this.isOverlapingSourceAndTarget||(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY));},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY);},t.exports=s;},function(t,e,r){"use strict";function n(i){this.vGraphObject=i;}o(n,"LGraphObject"),t.exports=n;},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),l=r(16),u=r(4);function h(d,p,m,g){m==null&&g==null&&(g=p),n.call(this,g),d.graphManager!=null&&(d=d.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=d,m!=null&&p!=null?this.rect=new a(p.x,p.y,m.width,m.height):this.rect=new a();}o(h,"LNode"),h.prototype=Object.create(n.prototype);for(var f in n)h[f]=n[f];h.prototype.getEdges=function(){return this.edges;},h.prototype.getChild=function(){return this.child;},h.prototype.getOwner=function(){return this.owner;},h.prototype.getWidth=function(){return this.rect.width;},h.prototype.setWidth=function(d){this.rect.width=d;},h.prototype.getHeight=function(){return this.rect.height;},h.prototype.setHeight=function(d){this.rect.height=d;},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2;},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2;},h.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2);},h.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y);},h.prototype.getRect=function(){return this.rect;},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height);},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2;},h.prototype.setRect=function(d,p){this.rect.x=d.x,this.rect.y=d.y,this.rect.width=p.width,this.rect.height=p.height;},h.prototype.setCenter=function(d,p){this.rect.x=d-this.rect.width/2,this.rect.y=p-this.rect.height/2;},h.prototype.setLocation=function(d,p){this.rect.x=d,this.rect.y=p;},h.prototype.moveBy=function(d,p){this.rect.x+=d,this.rect.y+=p;},h.prototype.getEdgeListToNode=function(d){var p=[],m,g=this;return g.edges.forEach(function(y){if(y.target==d){if(y.source!=g)throw"Incorrect edge source!";p.push(y);}}),p;},h.prototype.getEdgesBetween=function(d){var p=[],m,g=this;return g.edges.forEach(function(y){if(!(y.source==g||y.target==g))throw"Incorrect edge source and/or target";(y.target==d||y.source==d)&&p.push(y);}),p;},h.prototype.getNeighborsList=function(){var d=new Set(),p=this;return p.edges.forEach(function(m){if(m.source==p)d.add(m.target);else{if(m.target!=p)throw"Incorrect incidency!";d.add(m.source);}}),d;},h.prototype.withChildren=function(){var d=new Set(),p,m;if(d.add(this),this.child!=null)for(var g=this.child.getNodes(),y=0;y<g.length;y++)p=g[y],m=p.withChildren(),m.forEach(function(v){d.add(v);});return d;},h.prototype.getNoOfChildren=function(){var d=0,p;if(this.child==null)d=1;else for(var m=this.child.getNodes(),g=0;g<m.length;g++)p=m[g],d+=p.getNoOfChildren();return d==0&&(d=1),d;},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize;},h.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize);},h.prototype.scatter=function(){var d,p,m=-s.INITIAL_WORLD_BOUNDARY,g=s.INITIAL_WORLD_BOUNDARY;d=s.WORLD_CENTER_X+l.nextDouble()*(g-m)+m;var y=-s.INITIAL_WORLD_BOUNDARY,v=s.INITIAL_WORLD_BOUNDARY;p=s.WORLD_CENTER_Y+l.nextDouble()*(v-y)+y,this.rect.x=d,this.rect.y=p;},h.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var d=this.getChild();if(d.updateBounds(!0),this.rect.x=d.getLeft(),this.rect.y=d.getTop(),this.setWidth(d.getRight()-d.getLeft()),this.setHeight(d.getBottom()-d.getTop()),s.NODE_DIMENSIONS_INCLUDE_LABELS){var p=d.getRight()-d.getLeft(),m=d.getBottom()-d.getTop();this.labelWidth>p&&(this.rect.x-=(this.labelWidth-p)/2,this.setWidth(this.labelWidth)),this.labelHeight>m&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-m)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-m),this.setHeight(this.labelHeight));}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth;},h.prototype.transform=function(d){var p=this.rect.x;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var m=this.rect.y;m>s.WORLD_BOUNDARY?m=s.WORLD_BOUNDARY:m<-s.WORLD_BOUNDARY&&(m=-s.WORLD_BOUNDARY);var g=new u(p,m),y=d.inverseTransformPoint(g);this.setLocation(y.x,y.y);},h.prototype.getLeft=function(){return this.rect.x;},h.prototype.getRight=function(){return this.rect.x+this.rect.width;},h.prototype.getTop=function(){return this.rect.y;},h.prototype.getBottom=function(){return this.rect.y+this.rect.height;},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent();},t.exports=h;},function(t,e,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a);}o(n,"PointD"),n.prototype.getX=function(){return this.x;},n.prototype.getY=function(){return this.y;},n.prototype.setX=function(i){this.x=i;},n.prototype.setY=function(i){this.y=i;},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y);},n.prototype.getCopy=function(){return new n(this.x,this.y);},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this;},t.exports=n;},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(6),l=r(3),u=r(1),h=r(13),f=r(12),d=r(11);function p(g,y,v){n.call(this,v),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,y!=null&&y instanceof s?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager);}o(p,"LGraph"),p.prototype=Object.create(n.prototype);for(var m in n)p[m]=n[m];p.prototype.getNodes=function(){return this.nodes;},p.prototype.getEdges=function(){return this.edges;},p.prototype.getGraphManager=function(){return this.graphManager;},p.prototype.getParent=function(){return this.parent;},p.prototype.getLeft=function(){return this.left;},p.prototype.getRight=function(){return this.right;},p.prototype.getTop=function(){return this.top;},p.prototype.getBottom=function(){return this.bottom;},p.prototype.isConnected=function(){return this.isConnected;},p.prototype.add=function(g,y,v){if(y==null&&v==null){var x=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(x)>-1)throw"Node already in graph!";return x.owner=this,this.getNodes().push(x),x;}else{var b=g;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(!(y.owner==v.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=v.owner?null:(b.source=y,b.target=v,b.isInterGraph=!1,this.getEdges().push(b),y.edges.push(b),v!=y&&v.edges.push(b),b);}},p.prototype.remove=function(g){var y=g;if(g instanceof l){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=y.edges.slice(),x,b=v.length,T=0;T<b;T++)x=v[T],x.isInterGraph?this.graphManager.remove(x):x.source.owner.remove(x);var C=this.nodes.indexOf(y);if(C==-1)throw"Node not in owner node list!";this.nodes.splice(C,1);}else if(g instanceof u){var x=g;if(x==null)throw"Edge is null!";if(!(x.source!=null&&x.target!=null))throw"Source and/or target is null!";if(!(x.source.owner!=null&&x.target.owner!=null&&x.source.owner==this&&x.target.owner==this))throw"Source and/or target owner is invalid!";var w=x.source.edges.indexOf(x),E=x.target.edges.indexOf(x);if(!(w>-1&&E>-1))throw"Source and/or target doesn't know this edge!";x.source.edges.splice(w,1),x.target!=x.source&&x.target.edges.splice(E,1);var C=x.source.owner.getEdges().indexOf(x);if(C==-1)throw"Not in owner's edge list!";x.source.owner.getEdges().splice(C,1);}},p.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,y=i.MAX_VALUE,v,x,b,T=this.getNodes(),C=T.length,w=0;w<C;w++){var E=T[w];v=E.getTop(),x=E.getLeft(),g>v&&(g=v),y>x&&(y=x);}return g==i.MAX_VALUE?null:(T[0].getParent().paddingLeft!=null?b=T[0].getParent().paddingLeft:b=this.margin,this.left=y-b,this.top=g-b,new f(this.left,this.top));},p.prototype.updateBounds=function(g){for(var y=i.MAX_VALUE,v=-i.MAX_VALUE,x=i.MAX_VALUE,b=-i.MAX_VALUE,T,C,w,E,_,A=this.nodes,D=A.length,O=0;O<D;O++){var R=A[O];g&&R.child!=null&&R.updateBounds(),T=R.getLeft(),C=R.getRight(),w=R.getTop(),E=R.getBottom(),y>T&&(y=T),v<C&&(v=C),x>w&&(x=w),b<E&&(b=E);}var k=new h(y,x,v-y,b-x);y==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),A[0].getParent().paddingLeft!=null?_=A[0].getParent().paddingLeft:_=this.margin,this.left=k.x-_,this.right=k.x+k.width+_,this.top=k.y-_,this.bottom=k.y+k.height+_;},p.calculateBounds=function(g){for(var y=i.MAX_VALUE,v=-i.MAX_VALUE,x=i.MAX_VALUE,b=-i.MAX_VALUE,T,C,w,E,_=g.length,A=0;A<_;A++){var D=g[A];T=D.getLeft(),C=D.getRight(),w=D.getTop(),E=D.getBottom(),y>T&&(y=T),v<C&&(v=C),x>w&&(x=w),b<E&&(b=E);}var O=new h(y,x,v-y,b-x);return O;},p.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth();},p.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize;},p.prototype.calcEstimatedSize=function(){for(var g=0,y=this.nodes,v=y.length,x=0;x<v;x++){var b=y[x];g+=b.calcEstimatedSize();}return g==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=g/Math.sqrt(this.nodes.length),this.estimatedSize;},p.prototype.updateConnected=function(){var g=this;if(this.nodes.length==0){this.isConnected=!0;return;}var y=new d(),v=new Set(),x=this.nodes[0],b,T,C=x.withChildren();for(C.forEach(function(O){y.push(O),v.add(O);});y.length!==0;){x=y.shift(),b=x.getEdges();for(var w=b.length,E=0;E<w;E++){var _=b[E];if(T=_.getOtherEndInGraph(x,this),T!=null&&!v.has(T)){var A=T.withChildren();A.forEach(function(O){y.push(O),v.add(O);});}}}if(this.isConnected=!1,v.size>=this.nodes.length){var D=0;v.forEach(function(O){O.owner==g&&D++;}),D==this.nodes.length&&(this.isConnected=!0);}},t.exports=p;},function(t,e,r){"use strict";var n,i=r(1);function a(s){n=r(5),this.layout=s,this.graphs=[],this.edges=[];}o(a,"LGraphManager"),a.prototype.addRoot=function(){var s=this.layout.newGraph(),l=this.layout.newNode(null),u=this.add(s,l);return this.setRootGraph(u),this.rootGraph;},a.prototype.add=function(s,l,u,h,f){if(u==null&&h==null&&f==null){if(s==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return s.parent=l,l.child=s,s;}else{f=u,h=l,u=s;var d=h.getOwner(),p=f.getOwner();if(!(d!=null&&d.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(p!=null&&p.getGraphManager()==this))throw"Target not in this graph mgr!";if(d==p)return u.isInterGraph=!1,d.add(u,h,f);if(u.isInterGraph=!0,u.source=h,u.target=f,this.edges.indexOf(u)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(u),!(u.source!=null&&u.target!=null))throw"Edge source and/or target is null!";if(!(u.source.edges.indexOf(u)==-1&&u.target.edges.indexOf(u)==-1))throw"Edge already in source and/or target incidency list!";return u.source.edges.push(u),u.target.edges.push(u),u;}},a.prototype.remove=function(s){if(s instanceof n){var l=s;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var u=[];u=u.concat(l.getEdges());for(var h,f=u.length,d=0;d<f;d++)h=u[d],l.remove(h);var p=[];p=p.concat(l.getNodes());var m;f=p.length;for(var d=0;d<f;d++)m=p[d],l.remove(m);l==this.rootGraph&&this.setRootGraph(null);var g=this.graphs.indexOf(l);this.graphs.splice(g,1),l.parent=null;}else if(s instanceof i){if(h=s,h==null)throw"Edge is null!";if(!h.isInterGraph)throw"Not an inter-graph edge!";if(!(h.source!=null&&h.target!=null))throw"Source and/or target is null!";if(!(h.source.edges.indexOf(h)!=-1&&h.target.edges.indexOf(h)!=-1))throw"Source and/or target doesn't know this edge!";var g=h.source.edges.indexOf(h);if(h.source.edges.splice(g,1),g=h.target.edges.indexOf(h),h.target.edges.splice(g,1),!(h.source.owner!=null&&h.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(h.source.owner.getGraphManager().edges.indexOf(h)==-1)throw"Not in owner graph manager's edge list!";var g=h.source.owner.getGraphManager().edges.indexOf(h);h.source.owner.getGraphManager().edges.splice(g,1);}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0);},a.prototype.getGraphs=function(){return this.graphs;},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var s=[],l=this.getGraphs(),u=l.length,h=0;h<u;h++)s=s.concat(l[h].getNodes());this.allNodes=s;}return this.allNodes;},a.prototype.resetAllNodes=function(){this.allNodes=null;},a.prototype.resetAllEdges=function(){this.allEdges=null;},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null;},a.prototype.getAllEdges=function(){if(this.allEdges==null){for(var s=[],l=this.getGraphs(),u=l.length,h=0;h<l.length;h++)s=s.concat(l[h].getEdges());s=s.concat(this.edges),this.allEdges=s;}return this.allEdges;},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation;},a.prototype.setAllNodesToApplyGravitation=function(s){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=s;},a.prototype.getRoot=function(){return this.rootGraph;},a.prototype.setRootGraph=function(s){if(s.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=s,s.parent==null&&(s.parent=this.layout.newNode("Root node"));},a.prototype.getLayout=function(){return this.layout;},a.prototype.isOneAncestorOfOther=function(s,l){if(!(s!=null&&l!=null))throw"assert failed";if(s==l)return!0;var u=s.getOwner(),h;do{if(h=u.getParent(),h==null)break;if(h==l)return!0;if(u=h.getOwner(),u==null)break;}while(!0);u=l.getOwner();do{if(h=u.getParent(),h==null)break;if(h==s)return!0;if(u=h.getOwner(),u==null)break;}while(!0);return!1;},a.prototype.calcLowestCommonAncestors=function(){for(var s,l,u,h,f,d=this.getAllEdges(),p=d.length,m=0;m<p;m++){if(s=d[m],l=s.source,u=s.target,s.lca=null,s.sourceInLca=l,s.targetInLca=u,l==u){s.lca=l.getOwner();continue;}for(h=l.getOwner();s.lca==null;){for(s.targetInLca=u,f=u.getOwner();s.lca==null;){if(f==h){s.lca=f;break;}if(f==this.rootGraph)break;if(s.lca!=null)throw"assert failed";s.targetInLca=f.getParent(),f=s.targetInLca.getOwner();}if(h==this.rootGraph)break;s.lca==null&&(s.sourceInLca=h.getParent(),h=s.sourceInLca.getOwner());}if(s.lca==null)throw"assert failed";}},a.prototype.calcLowestCommonAncestor=function(s,l){if(s==l)return s.getOwner();var u=s.getOwner();do{if(u==null)break;var h=l.getOwner();do{if(h==null)break;if(h==u)return h;h=h.getParent().getOwner();}while(!0);u=u.getParent().getOwner();}while(!0);return u;},a.prototype.calcInclusionTreeDepths=function(s,l){s==null&&l==null&&(s=this.rootGraph,l=1);for(var u,h=s.getNodes(),f=h.length,d=0;d<f;d++)u=h[d],u.inclusionTreeDepth=l,u.child!=null&&this.calcInclusionTreeDepths(u.child,l+1);},a.prototype.includesInvalidEdge=function(){for(var s,l=this.edges.length,u=0;u<l;u++)if(s=this.edges[u],this.isOneAncestorOfOther(s.source,s.target))return!0;return!1;},t.exports=a;},function(t,e,r){"use strict";var n=r(0);function i(){}o(i,"FDLayoutConstants");for(var a in n)i[a]=n[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i;},function(t,e,r){"use strict";var n=r(12);function i(){}o(i,"IGeometry"),i.calcSeparationAmount=function(a,s,l,u){if(!a.intersects(s))throw"assert failed";var h=new Array(2);this.decideDirectionsForOverlappingNodes(a,s,h),l[0]=Math.min(a.getRight(),s.getRight())-Math.max(a.x,s.x),l[1]=Math.min(a.getBottom(),s.getBottom())-Math.max(a.y,s.y),a.getX()<=s.getX()&&a.getRight()>=s.getRight()?l[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(l[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?l[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(l[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var f=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(f=1);var d=f*l[0],p=l[1]/f;l[0]<p?p=l[0]:d=l[1],l[0]=-1*h[0]*(p/2+u),l[1]=-1*h[1]*(d/2+u);},i.decideDirectionsForOverlappingNodes=function(a,s,l){a.getCenterX()<s.getCenterX()?l[0]=-1:l[0]=1,a.getCenterY()<s.getCenterY()?l[1]=-1:l[1]=1;},i.getIntersection2=function(a,s,l){var u=a.getCenterX(),h=a.getCenterY(),f=s.getCenterX(),d=s.getCenterY();if(a.intersects(s))return l[0]=u,l[1]=h,l[2]=f,l[3]=d,!0;var p=a.getX(),m=a.getY(),g=a.getRight(),y=a.getX(),v=a.getBottom(),x=a.getRight(),b=a.getWidthHalf(),T=a.getHeightHalf(),C=s.getX(),w=s.getY(),E=s.getRight(),_=s.getX(),A=s.getBottom(),D=s.getRight(),O=s.getWidthHalf(),R=s.getHeightHalf(),k=!1,L=!1;if(u===f){if(h>d)return l[0]=u,l[1]=m,l[2]=f,l[3]=A,!1;if(h<d)return l[0]=u,l[1]=v,l[2]=f,l[3]=w,!1;}else if(h===d){if(u>f)return l[0]=p,l[1]=h,l[2]=E,l[3]=d,!1;if(u<f)return l[0]=g,l[1]=h,l[2]=C,l[3]=d,!1;}else{var S=a.height/a.width,I=s.height/s.width,M=(d-h)/(f-u),P=void 0,B=void 0,F=void 0,z=void 0,$=void 0,U=void 0;if(-S===M?u>f?(l[0]=y,l[1]=v,k=!0):(l[0]=g,l[1]=m,k=!0):S===M&&(u>f?(l[0]=p,l[1]=m,k=!0):(l[0]=x,l[1]=v,k=!0)),-I===M?f>u?(l[2]=_,l[3]=A,L=!0):(l[2]=E,l[3]=w,L=!0):I===M&&(f>u?(l[2]=C,l[3]=w,L=!0):(l[2]=D,l[3]=A,L=!0)),k&&L)return!1;if(u>f?h>d?(P=this.getCardinalDirection(S,M,4),B=this.getCardinalDirection(I,M,2)):(P=this.getCardinalDirection(-S,M,3),B=this.getCardinalDirection(-I,M,1)):h>d?(P=this.getCardinalDirection(-S,M,1),B=this.getCardinalDirection(-I,M,3)):(P=this.getCardinalDirection(S,M,2),B=this.getCardinalDirection(I,M,4)),!k)switch(P){case 1:z=m,F=u+-T/M,l[0]=F,l[1]=z;break;case 2:F=x,z=h+b*M,l[0]=F,l[1]=z;break;case 3:z=v,F=u+T/M,l[0]=F,l[1]=z;break;case 4:F=y,z=h+-b*M,l[0]=F,l[1]=z;break;}if(!L)switch(B){case 1:U=w,$=f+-R/M,l[2]=$,l[3]=U;break;case 2:$=D,U=d+O*M,l[2]=$,l[3]=U;break;case 3:U=A,$=f+R/M,l[2]=$,l[3]=U;break;case 4:$=_,U=d+-O*M,l[2]=$,l[3]=U;break;}}return!1;},i.getCardinalDirection=function(a,s,l){return a>s?l:1+l%4;},i.getIntersection=function(a,s,l,u){if(u==null)return this.getIntersection2(a,s,l);var h=a.x,f=a.y,d=s.x,p=s.y,m=l.x,g=l.y,y=u.x,v=u.y,x=void 0,b=void 0,T=void 0,C=void 0,w=void 0,E=void 0,_=void 0,A=void 0,D=void 0;return T=p-f,w=h-d,_=d*f-h*p,C=v-g,E=m-y,A=y*g-m*v,D=T*E-C*w,D===0?null:(x=(w*A-E*_)/D,b=(C*_-T*A)/D,new n(x,b));},i.angleOfVector=function(a,s,l,u){var h=void 0;return a!==l?(h=Math.atan((u-s)/(l-a)),l<a?h+=Math.PI:u<s&&(h+=this.TWO_PI)):u<s?h=this.ONE_AND_HALF_PI:h=this.HALF_PI,h;},i.doIntersect=function(a,s,l,u){var h=a.x,f=a.y,d=s.x,p=s.y,m=l.x,g=l.y,y=u.x,v=u.y,x=(d-h)*(v-g)-(y-m)*(p-f);if(x===0)return!1;var b=((v-g)*(y-h)+(m-y)*(v-f))/x,T=((f-p)*(y-h)+(d-h)*(v-f))/x;return 0<b&&b<1&&0<T&&T<1;},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i;},function(t,e,r){"use strict";function n(){}o(n,"IMath"),n.sign=function(i){return i>0?1:i<0?-1:0;},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i);},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i);},t.exports=n;},function(t,e,r){"use strict";function n(){}o(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n;},function(t,e,r){"use strict";var n=function(){function h(f,d){for(var p=0;p<d.length;p++){var m=d[p];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(f,m.key,m);}}return o(h,"defineProperties"),function(f,d,p){return d&&h(f.prototype,d),p&&h(f,p),f;};}();function i(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function");}o(i,"_classCallCheck");var a=o(function(f){return{value:f,next:null,prev:null};},"nodeFrom"),s=o(function(f,d,p,m){return f!==null?f.next=d:m.head=d,p!==null?p.prev=d:m.tail=d,d.prev=f,d.next=p,m.length++,d;},"add"),l=o(function(f,d){var p=f.prev,m=f.next;return p!==null?p.next=m:d.head=m,m!==null?m.prev=p:d.tail=p,f.prev=f.next=null,d.length--,f;},"_remove"),u=function(){function h(f){var d=this;i(this,h),this.length=0,this.head=null,this.tail=null,f===null||f===void 0?void 0:f.forEach(function(p){return d.push(p);});}return o(h,"LinkedList"),n(h,[{key:"size",value:o(function(){return this.length;},"size")},{key:"insertBefore",value:o(function(d,p){return s(p.prev,a(d),p,this);},"insertBefore")},{key:"insertAfter",value:o(function(d,p){return s(p,a(d),p.next,this);},"insertAfter")},{key:"insertNodeBefore",value:o(function(d,p){return s(p.prev,d,p,this);},"insertNodeBefore")},{key:"insertNodeAfter",value:o(function(d,p){return s(p,d,p.next,this);},"insertNodeAfter")},{key:"push",value:o(function(d){return s(this.tail,a(d),null,this);},"push")},{key:"unshift",value:o(function(d){return s(null,a(d),this.head,this);},"unshift")},{key:"remove",value:o(function(d){return l(d,this);},"remove")},{key:"pop",value:o(function(){return l(this.tail,this).value;},"pop")},{key:"popNode",value:o(function(){return l(this.tail,this);},"popNode")},{key:"shift",value:o(function(){return l(this.head,this).value;},"shift")},{key:"shiftNode",value:o(function(){return l(this.head,this);},"shiftNode")},{key:"get_object_at",value:o(function(d){if(d<=this.length()){for(var p=1,m=this.head;p<d;)m=m.next,p++;return m.value;}},"get_object_at")},{key:"set_object_at",value:o(function(d,p){if(d<=this.length()){for(var m=1,g=this.head;m<d;)g=g.next,m++;g.value=p;}},"set_object_at")}]),h;}();t.exports=u;},function(t,e,r){"use strict";function n(i,a,s){this.x=null,this.y=null,i==null&&a==null&&s==null?(this.x=0,this.y=0):typeof i=="number"&&typeof a=="number"&&s==null?(this.x=i,this.y=a):i.constructor.name=="Point"&&a==null&&s==null&&(s=i,this.x=s.x,this.y=s.y);}o(n,"Point"),n.prototype.getX=function(){return this.x;},n.prototype.getY=function(){return this.y;},n.prototype.getLocation=function(){return new n(this.x,this.y);},n.prototype.setLocation=function(i,a,s){i.constructor.name=="Point"&&a==null&&s==null?(s=i,this.setLocation(s.x,s.y)):typeof i=="number"&&typeof a=="number"&&s==null&&(parseInt(i)==i&&parseInt(a)==a?this.move(i,a):(this.x=Math.floor(i+.5),this.y=Math.floor(a+.5)));},n.prototype.move=function(i,a){this.x=i,this.y=a;},n.prototype.translate=function(i,a){this.x+=i,this.y+=a;},n.prototype.equals=function(i){if(i.constructor.name=="Point"){var a=i;return this.x==a.x&&this.y==a.y;}return this==i;},n.prototype.toString=function(){return new n().constructor.name+"[x="+this.x+",y="+this.y+"]";},t.exports=n;},function(t,e,r){"use strict";function n(i,a,s,l){this.x=0,this.y=0,this.width=0,this.height=0,i!=null&&a!=null&&s!=null&&l!=null&&(this.x=i,this.y=a,this.width=s,this.height=l);}o(n,"RectangleD"),n.prototype.getX=function(){return this.x;},n.prototype.setX=function(i){this.x=i;},n.prototype.getY=function(){return this.y;},n.prototype.setY=function(i){this.y=i;},n.prototype.getWidth=function(){return this.width;},n.prototype.setWidth=function(i){this.width=i;},n.prototype.getHeight=function(){return this.height;},n.prototype.setHeight=function(i){this.height=i;},n.prototype.getRight=function(){return this.x+this.width;},n.prototype.getBottom=function(){return this.y+this.height;},n.prototype.intersects=function(i){return!(this.getRight()<i.x||this.getBottom()<i.y||i.getRight()<this.x||i.getBottom()<this.y);},n.prototype.getCenterX=function(){return this.x+this.width/2;},n.prototype.getMinX=function(){return this.getX();},n.prototype.getMaxX=function(){return this.getX()+this.width;},n.prototype.getCenterY=function(){return this.y+this.height/2;},n.prototype.getMinY=function(){return this.getY();},n.prototype.getMaxY=function(){return this.getY()+this.height;},n.prototype.getWidthHalf=function(){return this.width/2;},n.prototype.getHeightHalf=function(){return this.height/2;},t.exports=n;},function(t,e,r){"use strict";var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a;}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a;};function i(){}o(i,"UniqueIDGeneretor"),i.lastID=0,i.createID=function(a){return i.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=i.getString(),i.lastID++),a.uniqueID);},i.getString=function(a){return a==null&&(a=i.lastID),"Object#"+a;},i.isPrimitive=function(a){var s=typeof a>"u"?"undefined":n(a);return a==null||s!="object"&&s!="function";},t.exports=i;},function(t,e,r){"use strict";function n(m){if(Array.isArray(m)){for(var g=0,y=Array(m.length);g<m.length;g++)y[g]=m[g];return y;}else return Array.from(m);}o(n,"_toConsumableArray");var i=r(0),a=r(6),s=r(3),l=r(1),u=r(5),h=r(4),f=r(17),d=r(27);function p(m){d.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map(),this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,m!=null&&(this.isRemoteUse=m);}o(p,"Layout"),p.RANDOM_SEED=1,p.prototype=Object.create(d.prototype),p.prototype.getGraphManager=function(){return this.graphManager;},p.prototype.getAllNodes=function(){return this.graphManager.getAllNodes();},p.prototype.getAllEdges=function(){return this.graphManager.getAllEdges();},p.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation();},p.prototype.newGraphManager=function(){var m=new a(this);return this.graphManager=m,m;},p.prototype.newGraph=function(m){return new u(null,this.graphManager,m);},p.prototype.newNode=function(m){return new s(this.graphManager,m);},p.prototype.newEdge=function(m){return new l(null,null,m);},p.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge();},p.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var m;return this.checkLayoutSuccess()?m=!1:m=this.layout(),i.ANIMATE==="during"?!1:(m&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,m);},p.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update();},p.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var m,g=this.graphManager.getAllEdges(),y=0;y<g.length;y++)m=g[y];for(var v,x=this.graphManager.getRoot().getNodes(),y=0;y<x.length;y++)v=x[y];this.update(this.graphManager.getRoot());}},p.prototype.update=function(m){if(m==null)this.update2();else if(m instanceof s){var g=m;if(g.getChild()!=null)for(var y=g.getChild().getNodes(),v=0;v<y.length;v++)update(y[v]);if(g.vGraphObject!=null){var x=g.vGraphObject;x.update(g);}}else if(m instanceof l){var b=m;if(b.vGraphObject!=null){var T=b.vGraphObject;T.update(b);}}else if(m instanceof u){var C=m;if(C.vGraphObject!=null){var w=C.vGraphObject;w.update(C);}}},p.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1);},p.prototype.transform=function(m){if(m==null)this.transform(new h(0,0));else{var g=new f(),y=this.graphManager.getRoot().updateLeftTop();if(y!=null){g.setWorldOrgX(m.x),g.setWorldOrgY(m.y),g.setDeviceOrgX(y.x),g.setDeviceOrgY(y.y);for(var v=this.getAllNodes(),x,b=0;b<v.length;b++)x=v[b],x.transform(g);}}},p.prototype.positionNodesRandomly=function(m){if(m==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var g,y,v=m.getNodes(),x=0;x<v.length;x++)g=v[x],y=g.getChild(),y==null||y.getNodes().length==0?g.scatter():(this.positionNodesRandomly(y),g.updateBounds());},p.prototype.getFlatForest=function(){for(var m=[],g=!0,y=this.graphManager.getRoot().getNodes(),v=!0,x=0;x<y.length;x++)y[x].getChild()!=null&&(v=!1);if(!v)return m;var b=new Set(),T=[],C=new Map(),w=[];for(w=w.concat(y);w.length>0&&g;){for(T.push(w[0]);T.length>0&&g;){var E=T[0];T.splice(0,1),b.add(E);for(var _=E.getEdges(),x=0;x<_.length;x++){var A=_[x].getOtherEnd(E);if(C.get(E)!=A)if(!b.has(A))T.push(A),C.set(A,E);else{g=!1;break;}}}if(!g)m=[];else{var D=[].concat(n(b));m.push(D);for(var x=0;x<D.length;x++){var O=D[x],R=w.indexOf(O);R>-1&&w.splice(R,1);}b=new Set(),C=new Map();}}return m;},p.prototype.createDummyNodesForBendpoints=function(m){for(var g=[],y=m.source,v=this.graphManager.calcLowestCommonAncestor(m.source,m.target),x=0;x<m.bendpoints.length;x++){var b=this.newNode(null);b.setRect(new Point(0,0),new Dimension(1,1)),v.add(b);var T=this.newEdge(null);this.graphManager.add(T,y,b),g.add(b),y=b;}var T=this.newEdge(null);return this.graphManager.add(T,y,m.target),this.edgeToDummyNodes.set(m,g),m.isInterGraph()?this.graphManager.remove(m):v.remove(m),g;},p.prototype.createBendpointsFromDummyNodes=function(){var m=[];m=m.concat(this.graphManager.getAllEdges()),m=[].concat(n(this.edgeToDummyNodes.keys())).concat(m);for(var g=0;g<m.length;g++){var y=m[g];if(y.bendpoints.length>0){for(var v=this.edgeToDummyNodes.get(y),x=0;x<v.length;x++){var b=v[x],T=new h(b.getCenterX(),b.getCenterY()),C=y.bendpoints.get(x);C.x=T.x,C.y=T.y,b.getOwner().remove(b);}this.graphManager.add(y,y.source,y.target);}}},p.transform=function(m,g,y,v){if(y!=null&&v!=null){var x=g;if(m<=50){var b=g/y;x-=(g-b)/50*(50-m);}else{var T=g*v;x+=(T-g)/50*(m-50);}return x;}else{var C,w;return m<=50?(C=9*g/500,w=g/10):(C=9*g/50,w=-8*g),C*m+w;}},p.findCenterOfTree=function(m){var g=[];g=g.concat(m);var y=[],v=new Map(),x=!1,b=null;(g.length==1||g.length==2)&&(x=!0,b=g[0]);for(var T=0;T<g.length;T++){var C=g[T],w=C.getNeighborsList().size;v.set(C,C.getNeighborsList().size),w==1&&y.push(C);}var E=[];for(E=E.concat(y);!x;){var _=[];_=_.concat(E),E=[];for(var T=0;T<g.length;T++){var C=g[T],A=g.indexOf(C);A>=0&&g.splice(A,1);var D=C.getNeighborsList();D.forEach(function(k){if(y.indexOf(k)<0){var L=v.get(k),S=L-1;S==1&&E.push(k),v.set(k,S);}});}y=y.concat(E),(g.length==1||g.length==2)&&(x=!0,b=g[0]);}return b;},p.prototype.setGraphManager=function(m){this.graphManager=m;},t.exports=p;},function(t,e,r){"use strict";function n(){}o(n,"RandomSeed"),n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x);},t.exports=n;},function(t,e,r){"use strict";var n=r(4);function i(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1;}o(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX;},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a;},i.prototype.getWorldOrgY=function(){return this.lworldOrgY;},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a;},i.prototype.getWorldExtX=function(){return this.lworldExtX;},i.prototype.setWorldExtX=function(a){this.lworldExtX=a;},i.prototype.getWorldExtY=function(){return this.lworldExtY;},i.prototype.setWorldExtY=function(a){this.lworldExtY=a;},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX;},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a;},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY;},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a;},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX;},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a;},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY;},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a;},i.prototype.transformX=function(a){var s=0,l=this.lworldExtX;return l!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/l),s;},i.prototype.transformY=function(a){var s=0,l=this.lworldExtY;return l!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/l),s;},i.prototype.inverseTransformX=function(a){var s=0,l=this.ldeviceExtX;return l!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/l),s;},i.prototype.inverseTransformY=function(a){var s=0,l=this.ldeviceExtY;return l!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/l),s;},i.prototype.inverseTransformPoint=function(a){var s=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s;},t.exports=i;},function(t,e,r){"use strict";function n(d){if(Array.isArray(d)){for(var p=0,m=Array(d.length);p<d.length;p++)m[p]=d[p];return m;}else return Array.from(d);}o(n,"_toConsumableArray");var i=r(15),a=r(7),s=r(0),l=r(8),u=r(9);function h(){i.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=a.DEFAULT_EDGE_LENGTH,this.springConstant=a.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=a.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS;}o(h,"FDLayout"),h.prototype=Object.create(i.prototype);for(var f in i)h[f]=i[f];h.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[];},h.prototype.calcIdealEdgeLengths=function(){for(var d,p,m,g,y,v,x=this.getGraphManager().getAllEdges(),b=0;b<x.length;b++)d=x[b],d.idealLength=this.idealEdgeLength,d.isInterGraph&&(m=d.getSource(),g=d.getTarget(),y=d.getSourceInLca().getEstimatedSize(),v=d.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(d.idealLength+=y+v-2*s.SIMPLE_NODE_SIZE),p=d.getLca().getInclusionTreeDepth(),d.idealLength+=a.DEFAULT_EDGE_LENGTH*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(m.getInclusionTreeDepth()+g.getInclusionTreeDepth()-2*p));},h.prototype.initSpringEmbedder=function(){var d=this.getAllNodes().length;this.incremental?(d>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(d-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(d>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(d-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange();},h.prototype.calcSpringForces=function(){for(var d=this.getAllEdges(),p,m=0;m<d.length;m++)p=d[m],this.calcSpringForce(p,p.idealLength);},h.prototype.calcRepulsionForces=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m,g,y,v,x=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&d&&this.updateGrid(),b=new Set(),m=0;m<x.length;m++)y=x[m],this.calculateRepulsionForceOfANode(y,b,d,p),b.add(y);else for(m=0;m<x.length;m++)for(y=x[m],g=m+1;g<x.length;g++)v=x[g],y.getOwner()==v.getOwner()&&this.calcRepulsionForce(y,v);},h.prototype.calcGravitationalForces=function(){for(var d,p=this.getAllNodesToApplyGravitation(),m=0;m<p.length;m++)d=p[m],this.calcGravitationalForce(d);},h.prototype.moveNodes=function(){for(var d=this.getAllNodes(),p,m=0;m<d.length;m++)p=d[m],p.move();},h.prototype.calcSpringForce=function(d,p){var m=d.getSource(),g=d.getTarget(),y,v,x,b;if(this.uniformLeafNodeSizes&&m.getChild()==null&&g.getChild()==null)d.updateLengthSimple();else if(d.updateLength(),d.isOverlapingSourceAndTarget)return;y=d.getLength(),y!=0&&(v=this.springConstant*(y-p),x=v*(d.lengthX/y),b=v*(d.lengthY/y),m.springForceX+=x,m.springForceY+=b,g.springForceX-=x,g.springForceY-=b);},h.prototype.calcRepulsionForce=function(d,p){var m=d.getRect(),g=p.getRect(),y=new Array(2),v=new Array(4),x,b,T,C,w,E,_;if(m.intersects(g)){l.calcSeparationAmount(m,g,y,a.DEFAULT_EDGE_LENGTH/2),E=2*y[0],_=2*y[1];var A=d.noOfChildren*p.noOfChildren/(d.noOfChildren+p.noOfChildren);d.repulsionForceX-=A*E,d.repulsionForceY-=A*_,p.repulsionForceX+=A*E,p.repulsionForceY+=A*_;}else this.uniformLeafNodeSizes&&d.getChild()==null&&p.getChild()==null?(x=g.getCenterX()-m.getCenterX(),b=g.getCenterY()-m.getCenterY()):(l.getIntersection(m,g,v),x=v[2]-v[0],b=v[3]-v[1]),Math.abs(x)<a.MIN_REPULSION_DIST&&(x=u.sign(x)*a.MIN_REPULSION_DIST),Math.abs(b)<a.MIN_REPULSION_DIST&&(b=u.sign(b)*a.MIN_REPULSION_DIST),T=x*x+b*b,C=Math.sqrt(T),w=this.repulsionConstant*d.noOfChildren*p.noOfChildren/T,E=w*x/C,_=w*b/C,d.repulsionForceX-=E,d.repulsionForceY-=_,p.repulsionForceX+=E,p.repulsionForceY+=_;},h.prototype.calcGravitationalForce=function(d){var p,m,g,y,v,x,b,T;p=d.getOwner(),m=(p.getRight()+p.getLeft())/2,g=(p.getTop()+p.getBottom())/2,y=d.getCenterX()-m,v=d.getCenterY()-g,x=Math.abs(y)+d.getWidth()/2,b=Math.abs(v)+d.getHeight()/2,d.getOwner()==this.graphManager.getRoot()?(T=p.getEstimatedSize()*this.gravityRangeFactor,(x>T||b>T)&&(d.gravitationForceX=-this.gravityConstant*y,d.gravitationForceY=-this.gravityConstant*v)):(T=p.getEstimatedSize()*this.compoundGravityRangeFactor,(x>T||b>T)&&(d.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,d.gravitationForceY=-this.gravityConstant*v*this.compoundGravityConstant));},h.prototype.isConverged=function(){var d,p=!1;return this.totalIterations>this.maxIterations/3&&(p=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),d=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,d||p;},h.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++);},h.prototype.calcNoOfChildrenForAllNodes=function(){for(var d,p=this.graphManager.getAllNodes(),m=0;m<p.length;m++)d=p[m],d.noOfChildren=d.getNoOfChildren();},h.prototype.calcGrid=function(d){var p=0,m=0;p=parseInt(Math.ceil((d.getRight()-d.getLeft())/this.repulsionRange)),m=parseInt(Math.ceil((d.getBottom()-d.getTop())/this.repulsionRange));for(var g=new Array(p),y=0;y<p;y++)g[y]=new Array(m);for(var y=0;y<p;y++)for(var v=0;v<m;v++)g[y][v]=new Array();return g;},h.prototype.addNodeToGrid=function(d,p,m){var g=0,y=0,v=0,x=0;g=parseInt(Math.floor((d.getRect().x-p)/this.repulsionRange)),y=parseInt(Math.floor((d.getRect().width+d.getRect().x-p)/this.repulsionRange)),v=parseInt(Math.floor((d.getRect().y-m)/this.repulsionRange)),x=parseInt(Math.floor((d.getRect().height+d.getRect().y-m)/this.repulsionRange));for(var b=g;b<=y;b++)for(var T=v;T<=x;T++)this.grid[b][T].push(d),d.setGridCoordinates(g,y,v,x);},h.prototype.updateGrid=function(){var d,p,m=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),d=0;d<m.length;d++)p=m[d],this.addNodeToGrid(p,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop());},h.prototype.calculateRepulsionForceOfANode=function(d,p,m,g){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&m||g){var y=new Set();d.surrounding=new Array();for(var v,x=this.grid,b=d.startX-1;b<d.finishX+2;b++)for(var T=d.startY-1;T<d.finishY+2;T++)if(!(b<0||T<0||b>=x.length||T>=x[0].length)){for(var C=0;C<x[b][T].length;C++)if(v=x[b][T][C],!(d.getOwner()!=v.getOwner()||d==v)&&!p.has(v)&&!y.has(v)){var w=Math.abs(d.getCenterX()-v.getCenterX())-(d.getWidth()/2+v.getWidth()/2),E=Math.abs(d.getCenterY()-v.getCenterY())-(d.getHeight()/2+v.getHeight()/2);w<=this.repulsionRange&&E<=this.repulsionRange&&y.add(v);}}d.surrounding=[].concat(n(y));}for(b=0;b<d.surrounding.length;b++)this.calcRepulsionForce(d,d.surrounding[b]);},h.prototype.calcRepulsionRange=function(){return 0;},t.exports=h;},function(t,e,r){"use strict";var n=r(1),i=r(7);function a(l,u,h){n.call(this,l,u,h),this.idealLength=i.DEFAULT_EDGE_LENGTH;}o(a,"FDLayoutEdge"),a.prototype=Object.create(n.prototype);for(var s in n)a[s]=n[s];t.exports=a;},function(t,e,r){"use strict";var n=r(3);function i(s,l,u,h){n.call(this,s,l,u,h),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[];}o(i,"FDLayoutNode"),i.prototype=Object.create(n.prototype);for(var a in n)i[a]=n[a];i.prototype.setGridCoordinates=function(s,l,u,h){this.startX=s,this.finishX=l,this.startY=u,this.finishY=h;},t.exports=i;},function(t,e,r){"use strict";function n(i,a){this.width=0,this.height=0,i!==null&&a!==null&&(this.height=a,this.width=i);}o(n,"DimensionD"),n.prototype.getWidth=function(){return this.width;},n.prototype.setWidth=function(i){this.width=i;},n.prototype.getHeight=function(){return this.height;},n.prototype.setHeight=function(i){this.height=i;},t.exports=n;},function(t,e,r){"use strict";var n=r(14);function i(){this.map={},this.keys=[];}o(i,"HashMap"),i.prototype.put=function(a,s){var l=n.createID(a);this.contains(l)||(this.map[l]=s,this.keys.push(a));},i.prototype.contains=function(a){var s=n.createID(a);return this.map[a]!=null;},i.prototype.get=function(a){var s=n.createID(a);return this.map[s];},i.prototype.keySet=function(){return this.keys;},t.exports=i;},function(t,e,r){"use strict";var n=r(14);function i(){this.set={};}o(i,"HashSet"),i.prototype.add=function(a){var s=n.createID(a);this.contains(s)||(this.set[s]=a);},i.prototype.remove=function(a){delete this.set[n.createID(a)];},i.prototype.clear=function(){this.set={};},i.prototype.contains=function(a){return this.set[n.createID(a)]==a;},i.prototype.isEmpty=function(){return this.size()===0;},i.prototype.size=function(){return Object.keys(this.set).length;},i.prototype.addAllTo=function(a){for(var s=Object.keys(this.set),l=s.length,u=0;u<l;u++)a.push(this.set[s[u]]);},i.prototype.size=function(){return Object.keys(this.set).length;},i.prototype.addAll=function(a){for(var s=a.length,l=0;l<s;l++){var u=a[l];this.add(u);}},t.exports=i;},function(t,e,r){"use strict";var n=function(){function l(u,h){for(var f=0;f<h.length;f++){var d=h[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(u,d.key,d);}}return o(l,"defineProperties"),function(u,h,f){return h&&l(u.prototype,h),f&&l(u,f),u;};}();function i(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function");}o(i,"_classCallCheck");var a=r(11),s=function(){function l(u,h){i(this,l),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var f=void 0;u instanceof a?f=u.size():f=u.length,this._quicksort(u,0,f-1);}return o(l,"Quicksort"),n(l,[{key:"_quicksort",value:o(function(h,f,d){if(f<d){var p=this._partition(h,f,d);this._quicksort(h,f,p),this._quicksort(h,p+1,d);}},"_quicksort")},{key:"_partition",value:o(function(h,f,d){for(var p=this._get(h,f),m=f,g=d;;){for(;this.compareFunction(p,this._get(h,g));)g--;for(;this.compareFunction(this._get(h,m),p);)m++;if(m<g)this._swap(h,m,g),m++,g--;else return g;}},"_partition")},{key:"_get",value:o(function(h,f){return h instanceof a?h.get_object_at(f):h[f];},"_get")},{key:"_set",value:o(function(h,f,d){h instanceof a?h.set_object_at(f,d):h[f]=d;},"_set")},{key:"_swap",value:o(function(h,f,d){var p=this._get(h,f);this._set(h,f,this._get(h,d)),this._set(h,d,p);},"_swap")},{key:"_defaultCompareFunction",value:o(function(h,f){return f>h;},"_defaultCompareFunction")}]),l;}();t.exports=s;},function(t,e,r){"use strict";var n=function(){function s(l,u){for(var h=0;h<u.length;h++){var f=u[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(l,f.key,f);}}return o(s,"defineProperties"),function(l,u,h){return u&&s(l.prototype,u),h&&s(l,h),l;};}();function i(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function");}o(i,"_classCallCheck");var a=function(){function s(l,u){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,s),this.sequence1=l,this.sequence2=u,this.match_score=h,this.mismatch_penalty=f,this.gap_penalty=d,this.iMax=l.length+1,this.jMax=u.length+1,this.grid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.grid[p]=new Array(this.jMax);for(var m=0;m<this.jMax;m++)this.grid[p][m]=0;}this.tracebackGrid=new Array(this.iMax);for(var g=0;g<this.iMax;g++){this.tracebackGrid[g]=new Array(this.jMax);for(var y=0;y<this.jMax;y++)this.tracebackGrid[g][y]=[null,null,null];}this.alignments=[],this.score=-1,this.computeGrids();}return o(s,"NeedlemanWunsch"),n(s,[{key:"getScore",value:o(function(){return this.score;},"getScore")},{key:"getAlignments",value:o(function(){return this.alignments;},"getAlignments")},{key:"computeGrids",value:o(function(){for(var u=1;u<this.jMax;u++)this.grid[0][u]=this.grid[0][u-1]+this.gap_penalty,this.tracebackGrid[0][u]=[!1,!1,!0];for(var h=1;h<this.iMax;h++)this.grid[h][0]=this.grid[h-1][0]+this.gap_penalty,this.tracebackGrid[h][0]=[!1,!0,!1];for(var f=1;f<this.iMax;f++)for(var d=1;d<this.jMax;d++){var p=void 0;this.sequence1[f-1]===this.sequence2[d-1]?p=this.grid[f-1][d-1]+this.match_score:p=this.grid[f-1][d-1]+this.mismatch_penalty;var m=this.grid[f-1][d]+this.gap_penalty,g=this.grid[f][d-1]+this.gap_penalty,y=[p,m,g],v=this.arrayAllMaxIndexes(y);this.grid[f][d]=y[v[0]],this.tracebackGrid[f][d]=[v.includes(0),v.includes(1),v.includes(2)];}this.score=this.grid[this.iMax-1][this.jMax-1];},"computeGrids")},{key:"alignmentTraceback",value:o(function(){var u=[];for(u.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});u[0];){var h=u[0],f=this.tracebackGrid[h.pos[0]][h.pos[1]];f[0]&&u.push({pos:[h.pos[0]-1,h.pos[1]-1],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),f[1]&&u.push({pos:[h.pos[0]-1,h.pos[1]],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:"-"+h.seq2}),f[2]&&u.push({pos:[h.pos[0],h.pos[1]-1],seq1:"-"+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),h.pos[0]===0&&h.pos[1]===0&&this.alignments.push({sequence1:h.seq1,sequence2:h.seq2}),u.shift();}return this.alignments;},"alignmentTraceback")},{key:"getAllIndexes",value:o(function(u,h){for(var f=[],d=-1;(d=u.indexOf(h,d+1))!==-1;)f.push(d);return f;},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:o(function(u){return this.getAllIndexes(u,Math.max.apply(null,u));},"arrayAllMaxIndexes")}]),s;}();t.exports=a;},function(t,e,r){"use strict";var n=o(function(){},"layoutBase");n.FDLayout=r(18),n.FDLayoutConstants=r(7),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(4),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(24),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(5),n.LEdge=r(1),n.LGraphManager=r(6),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(25),t.exports=n;},function(t,e,r){"use strict";function n(){this.listeners=[];}o(n,"Emitter");var i=n.prototype;i.addListener=function(a,s){this.listeners.push({event:a,callback:s});},i.removeListener=function(a,s){for(var l=this.listeners.length;l>=0;l--){var u=this.listeners[l];u.event===a&&u.callback===s&&this.listeners.splice(l,1);}},i.emit=function(a,s){for(var l=0;l<this.listeners.length;l++){var u=this.listeners[l];a===u.event&&u.callback(s);}},t.exports=n;}]);});});var cF=Ii((T4,lF)=>{"use strict";o(function(e,r){typeof T4=="object"&&typeof lF=="object"?lF.exports=r(oF()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof T4=="object"?T4.coseBase=r(oF()):e.coseBase=r(e.layoutBase);},"webpackUniversalModuleDefinition")(T4,function(t){return function(e){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports;}return o(n,"__webpack_require__"),n.m=e,n.c=r,n.i=function(i){return i;},n.d=function(i,a,s){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:s});},n.n=function(i){var a=i&&i.__esModule?o(function(){return i.default;},"getDefault"):o(function(){return i;},"getModuleExports");return n.d(a,"a",a),a;},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a);},n.p="",n(n.s=7);}([function(e,r){e.exports=t;},function(e,r,n){"use strict";var i=n(0).FDLayoutConstants;function a(){}o(a,"CoSEConstants");for(var s in i)a[s]=i[s];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=a;},function(e,r,n){"use strict";var i=n(0).FDLayoutEdge;function a(l,u,h){i.call(this,l,u,h);}o(a,"CoSEEdge"),a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];e.exports=a;},function(e,r,n){"use strict";var i=n(0).LGraph;function a(l,u,h){i.call(this,l,u,h);}o(a,"CoSEGraph"),a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];e.exports=a;},function(e,r,n){"use strict";var i=n(0).LGraphManager;function a(l){i.call(this,l);}o(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];e.exports=a;},function(e,r,n){"use strict";var i=n(0).FDLayoutNode,a=n(0).IMath;function s(u,h,f,d){i.call(this,u,h,f,d);}o(s,"CoSENode"),s.prototype=Object.create(i.prototype);for(var l in i)s[l]=i[l];s.prototype.move=function(){var u=this.graphManager.getLayout();this.displacementX=u.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=u.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementX=u.coolingFactor*u.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementY=u.coolingFactor*u.maxNodeDisplacement*a.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),u.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0;},s.prototype.propogateDisplacementToChildren=function(u,h){for(var f=this.getChild().getNodes(),d,p=0;p<f.length;p++)d=f[p],d.getChild()==null?(d.moveBy(u,h),d.displacementX+=u,d.displacementY+=h):d.propogateDisplacementToChildren(u,h);},s.prototype.setPred1=function(u){this.pred1=u;},s.prototype.getPred1=function(){return pred1;},s.prototype.getPred2=function(){return pred2;},s.prototype.setNext=function(u){this.next=u;},s.prototype.getNext=function(){return next;},s.prototype.setProcessed=function(u){this.processed=u;},s.prototype.isProcessed=function(){return processed;},e.exports=s;},function(e,r,n){"use strict";var i=n(0).FDLayout,a=n(4),s=n(3),l=n(5),u=n(2),h=n(1),f=n(0).FDLayoutConstants,d=n(0).LayoutConstants,p=n(0).Point,m=n(0).PointD,g=n(0).Layout,y=n(0).Integer,v=n(0).IGeometry,x=n(0).LGraph,b=n(0).Transform;function T(){i.call(this),this.toBeTiled={};}o(T,"CoSELayout"),T.prototype=Object.create(i.prototype);for(var C in i)T[C]=i[C];T.prototype.newGraphManager=function(){var w=new a(this);return this.graphManager=w,w;},T.prototype.newGraph=function(w){return new s(null,this.graphManager,w);},T.prototype.newNode=function(w){return new l(this.graphManager,w);},T.prototype.newEdge=function(w){return new u(null,null,w);},T.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=f.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=f.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=f.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=f.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/f.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=f.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1);},T.prototype.layout=function(){var w=d.DEFAULT_CREATE_BENDS_AS_NEEDED;return w&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout();},T.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(h.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),_=this.nodesWithGravity.filter(function(O){return E.has(O);});this.graphManager.setAllNodesToApplyGravitation(_);}}else{var w=this.getFlatForest();if(w.length>0)this.positionNodesRadially(w);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),_=this.nodesWithGravity.filter(function(A){return E.has(A);});this.graphManager.setAllNodesToApplyGravitation(_),this.positionNodesRandomly();}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0;},T.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%f.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor));}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var w=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(D){return w.has(D);});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL;}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++;}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++;}var _=!this.isTreeGrowing&&!this.isGrowthFinished,A=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(_,A),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1;},T.prototype.getPositionsData=function(){for(var w=this.graphManager.getAllNodes(),E={},_=0;_<w.length;_++){var A=w[_].rect,D=w[_].id;E[D]={id:D,x:A.getCenterX(),y:A.getCenterY(),w:A.width,h:A.height};}return E;},T.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var w=!1;if(f.ANIMATE==="during")this.emit("layoutstarted");else{for(;!w;)w=this.tick();this.graphManager.updateBounds();}},T.prototype.calculateNodesToApplyGravitationTo=function(){var w=[],E,_=this.graphManager.getGraphs(),A=_.length,D;for(D=0;D<A;D++)E=_[D],E.updateConnected(),E.isConnected||(w=w.concat(E.getNodes()));return w;},T.prototype.createBendpoints=function(){var w=[];w=w.concat(this.graphManager.getAllEdges());var E=new Set(),_;for(_=0;_<w.length;_++){var A=w[_];if(!E.has(A)){var D=A.getSource(),O=A.getTarget();if(D==O)A.getBendpoints().push(new m()),A.getBendpoints().push(new m()),this.createDummyNodesForBendpoints(A),E.add(A);else{var R=[];if(R=R.concat(D.getEdgeListToNode(O)),R=R.concat(O.getEdgeListToNode(D)),!E.has(R[0])){if(R.length>1){var k;for(k=0;k<R.length;k++){var L=R[k];L.getBendpoints().push(new m()),this.createDummyNodesForBendpoints(L);}}R.forEach(function(S){E.add(S);});}}}if(E.size==w.length)break;}},T.prototype.positionNodesRadially=function(w){for(var E=new p(0,0),_=Math.ceil(Math.sqrt(w.length)),A=0,D=0,O=0,R=new m(0,0),k=0;k<w.length;k++){k%_==0&&(O=0,D=A,k!=0&&(D+=h.DEFAULT_COMPONENT_SEPERATION),A=0);var L=w[k],S=g.findCenterOfTree(L);E.x=O,E.y=D,R=T.radialLayout(L,S,E),R.y>A&&(A=Math.floor(R.y)),O=Math.floor(R.x+h.DEFAULT_COMPONENT_SEPERATION);}this.transform(new m(d.WORLD_CENTER_X-R.x/2,d.WORLD_CENTER_Y-R.y/2));},T.radialLayout=function(w,E,_){var A=Math.max(this.maxDiagonalInTree(w),h.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(E,null,0,359,0,A);var D=x.calculateBounds(w),O=new b();O.setDeviceOrgX(D.getMinX()),O.setDeviceOrgY(D.getMinY()),O.setWorldOrgX(_.x),O.setWorldOrgY(_.y);for(var R=0;R<w.length;R++){var k=w[R];k.transform(O);}var L=new m(D.getMaxX(),D.getMaxY());return O.inverseTransformPoint(L);},T.branchRadialLayout=function(w,E,_,A,D,O){var R=(A-_+1)/2;R<0&&(R+=180);var k=(R+_)%360,L=k*v.TWO_PI/360,S=Math.cos(L),I=D*Math.cos(L),M=D*Math.sin(L);w.setCenter(I,M);var P=[];P=P.concat(w.getEdges());var B=P.length;E!=null&&B--;for(var F=0,z=P.length,$,U=w.getEdgesBetween(E);U.length>1;){var K=U[0];U.splice(0,1);var ee=P.indexOf(K);ee>=0&&P.splice(ee,1),z--,B--;}E!=null?$=(P.indexOf(U[0])+1)%z:$=0;for(var Y=Math.abs(A-_)/B,ce=$;F!=B;ce=++ce%z){var Z=P[ce].getOtherEnd(w);if(Z!=E){var ue=(_+F*Y)%360,Q=(ue+Y)%360;T.branchRadialLayout(Z,w,ue,Q,D+O,O),F++;}}},T.maxDiagonalInTree=function(w){for(var E=y.MIN_VALUE,_=0;_<w.length;_++){var A=w[_],D=A.getDiagonal();D>E&&(E=D);}return E;},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength;},T.prototype.groupZeroDegreeMembers=function(){var w=this,E={};this.memberGroups={},this.idToDummyNode={};for(var _=[],A=this.graphManager.getAllNodes(),D=0;D<A.length;D++){var O=A[D],R=O.getParent();this.getNodeDegreeWithChildren(O)===0&&(R.id==null||!this.getToBeTiled(R))&&_.push(O);}for(var D=0;D<_.length;D++){var O=_[D],k=O.getParent().id;typeof E[k]>"u"&&(E[k]=[]),E[k]=E[k].concat(O);}Object.keys(E).forEach(function(L){if(E[L].length>1){var S="DummyCompound_"+L;w.memberGroups[S]=E[L];var I=E[L][0].getParent(),M=new l(w.graphManager);M.id=S,M.paddingLeft=I.paddingLeft||0,M.paddingRight=I.paddingRight||0,M.paddingBottom=I.paddingBottom||0,M.paddingTop=I.paddingTop||0,w.idToDummyNode[S]=M;var P=w.getGraphManager().add(w.newGraph(),M),B=I.getChild();B.add(M);for(var F=0;F<E[L].length;F++){var z=E[L][F];B.remove(z),P.add(z);}}});},T.prototype.clearCompounds=function(){var w={},E={};this.performDFSOnCompounds();for(var _=0;_<this.compoundOrder.length;_++)E[this.compoundOrder[_].id]=this.compoundOrder[_],w[this.compoundOrder[_].id]=[].concat(this.compoundOrder[_].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[_].getChild()),this.compoundOrder[_].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(w,E);},T.prototype.clearZeroDegreeMembers=function(){var w=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(_){var A=w.idToDummyNode[_];E[_]=w.tileNodes(w.memberGroups[_],A.paddingLeft+A.paddingRight),A.rect.width=E[_].width,A.rect.height=E[_].height;});},T.prototype.repopulateCompounds=function(){for(var w=this.compoundOrder.length-1;w>=0;w--){var E=this.compoundOrder[w],_=E.id,A=E.paddingLeft,D=E.paddingTop;this.adjustLocations(this.tiledMemberPack[_],E.rect.x,E.rect.y,A,D);}},T.prototype.repopulateZeroDegreeMembers=function(){var w=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(_){var A=w.idToDummyNode[_],D=A.paddingLeft,O=A.paddingTop;w.adjustLocations(E[_],A.rect.x,A.rect.y,D,O);});},T.prototype.getToBeTiled=function(w){var E=w.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var _=w.getChild();if(_==null)return this.toBeTiled[E]=!1,!1;for(var A=_.getNodes(),D=0;D<A.length;D++){var O=A[D];if(this.getNodeDegree(O)>0)return this.toBeTiled[E]=!1,!1;if(O.getChild()==null){this.toBeTiled[O.id]=!1;continue;}if(!this.getToBeTiled(O))return this.toBeTiled[E]=!1,!1;}return this.toBeTiled[E]=!0,!0;},T.prototype.getNodeDegree=function(w){for(var E=w.id,_=w.getEdges(),A=0,D=0;D<_.length;D++){var O=_[D];O.getSource().id!==O.getTarget().id&&(A=A+1);}return A;},T.prototype.getNodeDegreeWithChildren=function(w){var E=this.getNodeDegree(w);if(w.getChild()==null)return E;for(var _=w.getChild().getNodes(),A=0;A<_.length;A++){var D=_[A];E+=this.getNodeDegreeWithChildren(D);}return E;},T.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());},T.prototype.fillCompexOrderByDFS=function(w){for(var E=0;E<w.length;E++){var _=w[E];_.getChild()!=null&&this.fillCompexOrderByDFS(_.getChild().getNodes()),this.getToBeTiled(_)&&this.compoundOrder.push(_);}},T.prototype.adjustLocations=function(w,E,_,A,D){E+=A,_+=D;for(var O=E,R=0;R<w.rows.length;R++){var k=w.rows[R];E=O;for(var L=0,S=0;S<k.length;S++){var I=k[S];I.rect.x=E,I.rect.y=_,E+=I.rect.width+w.horizontalPadding,I.rect.height>L&&(L=I.rect.height);}_+=L+w.verticalPadding;}},T.prototype.tileCompoundMembers=function(w,E){var _=this;this.tiledMemberPack=[],Object.keys(w).forEach(function(A){var D=E[A];_.tiledMemberPack[A]=_.tileNodes(w[A],D.paddingLeft+D.paddingRight),D.rect.width=_.tiledMemberPack[A].width,D.rect.height=_.tiledMemberPack[A].height;});},T.prototype.tileNodes=function(w,E){var _=h.TILING_PADDING_VERTICAL,A=h.TILING_PADDING_HORIZONTAL,D={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:_,horizontalPadding:A};w.sort(function(k,L){return k.rect.width*k.rect.height>L.rect.width*L.rect.height?-1:k.rect.width*k.rect.height<L.rect.width*L.rect.height?1:0;});for(var O=0;O<w.length;O++){var R=w[O];D.rows.length==0?this.insertNodeToRow(D,R,0,E):this.canAddHorizontal(D,R.rect.width,R.rect.height)?this.insertNodeToRow(D,R,this.getShortestRowIndex(D),E):this.insertNodeToRow(D,R,D.rows.length,E),this.shiftToLastRow(D);}return D;},T.prototype.insertNodeToRow=function(w,E,_,A){var D=A;if(_==w.rows.length){var O=[];w.rows.push(O),w.rowWidth.push(D),w.rowHeight.push(0);}var R=w.rowWidth[_]+E.rect.width;w.rows[_].length>0&&(R+=w.horizontalPadding),w.rowWidth[_]=R,w.width<R&&(w.width=R);var k=E.rect.height;_>0&&(k+=w.verticalPadding);var L=0;k>w.rowHeight[_]&&(L=w.rowHeight[_],w.rowHeight[_]=k,L=w.rowHeight[_]-L),w.height+=L,w.rows[_].push(E);},T.prototype.getShortestRowIndex=function(w){for(var E=-1,_=Number.MAX_VALUE,A=0;A<w.rows.length;A++)w.rowWidth[A]<_&&(E=A,_=w.rowWidth[A]);return E;},T.prototype.getLongestRowIndex=function(w){for(var E=-1,_=Number.MIN_VALUE,A=0;A<w.rows.length;A++)w.rowWidth[A]>_&&(E=A,_=w.rowWidth[A]);return E;},T.prototype.canAddHorizontal=function(w,E,_){var A=this.getShortestRowIndex(w);if(A<0)return!0;var D=w.rowWidth[A];if(D+w.horizontalPadding+E<=w.width)return!0;var O=0;w.rowHeight[A]<_&&A>0&&(O=_+w.verticalPadding-w.rowHeight[A]);var R;w.width-D>=E+w.horizontalPadding?R=(w.height+O)/(D+E+w.horizontalPadding):R=(w.height+O)/w.width,O=_+w.verticalPadding;var k;return w.width<E?k=(w.height+O)/E:k=(w.height+O)/w.width,k<1&&(k=1/k),R<1&&(R=1/R),R<k;},T.prototype.shiftToLastRow=function(w){var E=this.getLongestRowIndex(w),_=w.rowWidth.length-1,A=w.rows[E],D=A[A.length-1],O=D.width+w.horizontalPadding;if(w.width-w.rowWidth[_]>O&&E!=_){A.splice(-1,1),w.rows[_].push(D),w.rowWidth[E]=w.rowWidth[E]-O,w.rowWidth[_]=w.rowWidth[_]+O,w.width=w.rowWidth[instance.getLongestRowIndex(w)];for(var R=Number.MIN_VALUE,k=0;k<A.length;k++)A[k].height>R&&(R=A[k].height);E>0&&(R+=w.verticalPadding);var L=w.rowHeight[E]+w.rowHeight[_];w.rowHeight[E]=R,w.rowHeight[_]<D.height+w.verticalPadding&&(w.rowHeight[_]=D.height+w.verticalPadding);var S=w.rowHeight[E]+w.rowHeight[_];w.height+=S-L,this.shiftToLastRow(w);}},T.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers());},T.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds());},T.prototype.reduceTrees=function(){for(var w=[],E=!0,_;E;){var A=this.graphManager.getAllNodes(),D=[];E=!1;for(var O=0;O<A.length;O++)_=A[O],_.getEdges().length==1&&!_.getEdges()[0].isInterGraph&&_.getChild()==null&&(D.push([_,_.getEdges()[0],_.getOwner()]),E=!0);if(E==!0){for(var R=[],k=0;k<D.length;k++)D[k][0].getEdges().length==1&&(R.push(D[k]),D[k][0].getOwner().remove(D[k][0]));w.push(R),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges();}}this.prunedNodesAll=w;},T.prototype.growTree=function(w){for(var E=w.length,_=w[E-1],A,D=0;D<_.length;D++)A=_[D],this.findPlaceforPrunedNode(A),A[2].add(A[0]),A[2].add(A[1],A[1].source,A[1].target);w.splice(w.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges();},T.prototype.findPlaceforPrunedNode=function(w){var E,_,A=w[0];A==w[1].source?_=w[1].target:_=w[1].source;var D=_.startX,O=_.finishX,R=_.startY,k=_.finishY,L=0,S=0,I=0,M=0,P=[L,I,S,M];if(R>0)for(var B=D;B<=O;B++)P[0]+=this.grid[B][R-1].length+this.grid[B][R].length-1;if(O<this.grid.length-1)for(var B=R;B<=k;B++)P[1]+=this.grid[O+1][B].length+this.grid[O][B].length-1;if(k<this.grid[0].length-1)for(var B=D;B<=O;B++)P[2]+=this.grid[B][k+1].length+this.grid[B][k].length-1;if(D>0)for(var B=R;B<=k;B++)P[3]+=this.grid[D-1][B].length+this.grid[D][B].length-1;for(var F=y.MAX_VALUE,z,$,U=0;U<P.length;U++)P[U]<F?(F=P[U],z=1,$=U):P[U]==F&&z++;if(z==3&&F==0)P[0]==0&&P[1]==0&&P[2]==0?E=1:P[0]==0&&P[1]==0&&P[3]==0?E=0:P[0]==0&&P[2]==0&&P[3]==0?E=3:P[1]==0&&P[2]==0&&P[3]==0&&(E=2);else if(z==2&&F==0){var K=Math.floor(Math.random()*2);P[0]==0&&P[1]==0?K==0?E=0:E=1:P[0]==0&&P[2]==0?K==0?E=0:E=2:P[0]==0&&P[3]==0?K==0?E=0:E=3:P[1]==0&&P[2]==0?K==0?E=1:E=2:P[1]==0&&P[3]==0?K==0?E=1:E=3:K==0?E=2:E=3;}else if(z==4&&F==0){var K=Math.floor(Math.random()*4);E=K;}else E=$;E==0?A.setCenter(_.getCenterX(),_.getCenterY()-_.getHeight()/2-f.DEFAULT_EDGE_LENGTH-A.getHeight()/2):E==1?A.setCenter(_.getCenterX()+_.getWidth()/2+f.DEFAULT_EDGE_LENGTH+A.getWidth()/2,_.getCenterY()):E==2?A.setCenter(_.getCenterX(),_.getCenterY()+_.getHeight()/2+f.DEFAULT_EDGE_LENGTH+A.getHeight()/2):A.setCenter(_.getCenterX()-_.getWidth()/2-f.DEFAULT_EDGE_LENGTH-A.getWidth()/2,_.getCenterY());},e.exports=T;},function(e,r,n){"use strict";var i={};i.layoutBase=n(0),i.CoSEConstants=n(1),i.CoSEEdge=n(2),i.CoSEGraph=n(3),i.CoSEGraphManager=n(4),i.CoSELayout=n(6),i.CoSENode=n(5),e.exports=i;}]);});});var K1e=Ii((w4,uF)=>{"use strict";o(function(e,r){typeof w4=="object"&&typeof uF=="object"?uF.exports=r(cF()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof w4=="object"?w4.cytoscapeCoseBilkent=r(cF()):e.cytoscapeCoseBilkent=r(e.coseBase);},"webpackUniversalModuleDefinition")(w4,function(t){return function(e){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports;}return o(n,"__webpack_require__"),n.m=e,n.c=r,n.i=function(i){return i;},n.d=function(i,a,s){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:s});},n.n=function(i){var a=i&&i.__esModule?o(function(){return i.default;},"getDefault"):o(function(){return i;},"getModuleExports");return n.d(a,"a",a),a;},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a);},n.p="",n(n.s=1);}([function(e,r){e.exports=t;},function(e,r,n){"use strict";var i=n(0).layoutBase.LayoutConstants,a=n(0).layoutBase.FDLayoutConstants,s=n(0).CoSEConstants,l=n(0).CoSELayout,u=n(0).CoSENode,h=n(0).layoutBase.PointD,f=n(0).layoutBase.DimensionD,d={ready:o(function(){},"ready"),stop:o(function(){},"stop"),quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function p(v,x){var b={};for(var T in v)b[T]=v[T];for(var T in x)b[T]=x[T];return b;}o(p,"extend");function m(v){this.options=p(d,v),g(this.options);}o(m,"_CoSELayout");var g=o(function(x){x.nodeRepulsion!=null&&(s.DEFAULT_REPULSION_STRENGTH=a.DEFAULT_REPULSION_STRENGTH=x.nodeRepulsion),x.idealEdgeLength!=null&&(s.DEFAULT_EDGE_LENGTH=a.DEFAULT_EDGE_LENGTH=x.idealEdgeLength),x.edgeElasticity!=null&&(s.DEFAULT_SPRING_STRENGTH=a.DEFAULT_SPRING_STRENGTH=x.edgeElasticity),x.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=x.nestingFactor),x.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=a.DEFAULT_GRAVITY_STRENGTH=x.gravity),x.numIter!=null&&(s.MAX_ITERATIONS=a.MAX_ITERATIONS=x.numIter),x.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=a.DEFAULT_GRAVITY_RANGE_FACTOR=x.gravityRange),x.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=x.gravityCompound),x.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=x.gravityRangeCompound),x.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=a.DEFAULT_COOLING_FACTOR_INCREMENTAL=x.initialEnergyOnIncremental),x.quality=="draft"?i.QUALITY=0:x.quality=="proof"?i.QUALITY=2:i.QUALITY=1,s.NODE_DIMENSIONS_INCLUDE_LABELS=a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=x.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!x.randomize,s.ANIMATE=a.ANIMATE=i.ANIMATE=x.animate,s.TILE=x.tile,s.TILING_PADDING_VERTICAL=typeof x.tilingPaddingVertical=="function"?x.tilingPaddingVertical.call():x.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof x.tilingPaddingHorizontal=="function"?x.tilingPaddingHorizontal.call():x.tilingPaddingHorizontal;},"getUserOptions");m.prototype.run=function(){var v,x,b=this.options,T=this.idToLNode={},C=this.layout=new l(),w=this;w.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var E=C.newGraphManager();this.gm=E;var _=this.options.eles.nodes(),A=this.options.eles.edges();this.root=E.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(_),C);for(var D=0;D<A.length;D++){var O=A[D],R=this.idToLNode[O.data("source")],k=this.idToLNode[O.data("target")];if(R!==k&&R.getEdgesBetween(k).length==0){var L=E.add(C.newEdge(),R,k);L.id=O.id();}}var S=o(function(P,B){typeof P=="number"&&(P=B);var F=P.data("id"),z=w.idToLNode[F];return{x:z.getRect().getCenterX(),y:z.getRect().getCenterY()};},"getPositions"),I=o(function M(){for(var P=o(function(){b.fit&&b.cy.fit(b.eles,b.padding),v||(v=!0,w.cy.one("layoutready",b.ready),w.cy.trigger({type:"layoutready",layout:w}));},"afterReposition"),B=w.options.refresh,F,z=0;z<B&&!F;z++)F=w.stopped||w.layout.tick();if(F){C.checkLayoutSuccess()&&!C.isSubLayout&&C.doPostLayout(),C.tilingPostLayout&&C.tilingPostLayout(),C.isLayoutFinished=!0,w.options.eles.nodes().positions(S),P(),w.cy.one("layoutstop",w.options.stop),w.cy.trigger({type:"layoutstop",layout:w}),x&&cancelAnimationFrame(x),v=!1;return;}var $=w.layout.getPositionsData();b.eles.nodes().positions(function(U,K){if(typeof U=="number"&&(U=K),!U.isParent()){for(var ee=U.id(),Y=$[ee],ce=U;Y==null&&(Y=$[ce.data("parent")]||$["DummyCompound_"+ce.data("parent")],$[ee]=Y,ce=ce.parent()[0],ce!=null););return Y!=null?{x:Y.x,y:Y.y}:{x:U.position("x"),y:U.position("y")};}}),P(),x=requestAnimationFrame(M);},"iterateAnimated");return C.addListener("layoutstarted",function(){w.options.animate==="during"&&(x=requestAnimationFrame(I));}),C.runLayout(),this.options.animate!=="during"&&(w.options.eles.nodes().not(":parent").layoutPositions(w,w.options,S),v=!1),this;},m.prototype.getTopMostNodes=function(v){for(var x={},b=0;b<v.length;b++)x[v[b].id()]=!0;var T=v.filter(function(C,w){typeof C=="number"&&(C=w);for(var E=C.parent()[0];E!=null;){if(x[E.id()])return!1;E=E.parent()[0];}return!0;});return T;},m.prototype.processChildrenList=function(v,x,b){for(var T=x.length,C=0;C<T;C++){var w=x[C],E=w.children(),_,A=w.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(w.outerWidth()!=null&&w.outerHeight()!=null?_=v.add(new u(b.graphManager,new h(w.position("x")-A.w/2,w.position("y")-A.h/2),new f(parseFloat(A.w),parseFloat(A.h)))):_=v.add(new u(this.graphManager)),_.id=w.data("id"),_.paddingLeft=parseInt(w.css("padding")),_.paddingTop=parseInt(w.css("padding")),_.paddingRight=parseInt(w.css("padding")),_.paddingBottom=parseInt(w.css("padding")),this.options.nodeDimensionsIncludeLabels&&w.isParent()){var D=w.boundingBox({includeLabels:!0,includeNodes:!1}).w,O=w.boundingBox({includeLabels:!0,includeNodes:!1}).h,R=w.css("text-halign");_.labelWidth=D,_.labelHeight=O,_.labelPos=R;}if(this.idToLNode[w.data("id")]=_,isNaN(_.rect.x)&&(_.rect.x=0),isNaN(_.rect.y)&&(_.rect.y=0),E!=null&&E.length>0){var k;k=b.getGraphManager().add(b.newGraph(),_),this.processChildrenList(k,E,b);}}},m.prototype.stop=function(){return this.stopped=!0,this;};var y=o(function(x){x("layout","cose-bilkent",m);},"register");typeof cytoscape<"u"&&y(cytoscape),e.exports=y;}]);});});function met(t,e,r,n,i){return t.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y;}).join(" ")).attr("transform","translate("+(i.width-e)/2+", "+r+")");}var cet,uet,het,fet,det,pet,get,yet,Q1e,Z1e,J1e=N(()=>{"use strict";no();nr();cet=12,uet=o(function(t,e,r,n){e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 ${r.height-5} v${-r.height+2*5} q0,-5 5,-5 h${r.width-2*5} q5,0 5,5 v${r.height-5} H0 Z`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height);},"defaultBkg"),het=o(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("width",r.width);},"rectBkg"),fet=o(function(t,e,r){let n=r.width,i=r.height,a=.15*n,s=.25*n,l=.35*n,u=.2*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${n*.25},${-1*n*.1}
      a${l},${l} 1 0,1 ${n*.4},${-1*n*.1}
      a${s},${s} 1 0,1 ${n*.35},${1*n*.2}

      a${a},${a} 1 0,1 ${n*.15},${1*i*.35}
      a${u},${u} 1 0,1 ${-1*n*.15},${1*i*.65}

      a${s},${a} 1 0,1 ${-1*n*.25},${n*.15}
      a${l},${l} 1 0,1 ${-1*n*.5},0
      a${a},${a} 1 0,1 ${-1*n*.25},${-1*n*.15}

      a${a},${a} 1 0,1 ${-1*n*.1},${-1*i*.35}
      a${u},${u} 1 0,1 ${n*.1},${-1*i*.65}

    H0 V0 Z`);},"cloudBkg"),det=o(function(t,e,r){let n=r.width,i=r.height,a=.15*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${n*.25},${-1*i*.1}
      a${a},${a} 1 0,0 ${n*.25},0
      a${a},${a} 1 0,0 ${n*.25},0
      a${a},${a} 1 0,0 ${n*.25},${1*i*.1}

      a${a},${a} 1 0,0 ${n*.15},${1*i*.33}
      a${a*.8},${a*.8} 1 0,0 0,${1*i*.34}
      a${a},${a} 1 0,0 ${-1*n*.15},${1*i*.33}

      a${a},${a} 1 0,0 ${-1*n*.25},${i*.15}
      a${a},${a} 1 0,0 ${-1*n*.25},0
      a${a},${a} 1 0,0 ${-1*n*.25},0
      a${a},${a} 1 0,0 ${-1*n*.25},${-1*i*.15}

      a${a},${a} 1 0,0 ${-1*n*.1},${-1*i*.33}
      a${a*.8},${a*.8} 1 0,0 0,${-1*i*.34}
      a${a},${a} 1 0,0 ${n*.1},${-1*i*.33}

    H0 V0 Z`);},"bangBkg"),pet=o(function(t,e,r){e.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("r",r.width/2);},"circleBkg");o(met,"insertPolygonShape");get=o(function(t,e,r){let n=r.height,a=n/4,s=r.width-r.padding+2*a,l=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-n/2},{x:s-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}];met(e,s,n,l,r);},"hexagonBkg"),yet=o(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width);},"roundedRectBkg"),Q1e=o(async function(t,e,r,n,i){let a=i.htmlLabels,s=n%(cet-1),l=e.append("g");r.section=s;let u="section-"+s;s<0&&(u+=" section-root"),l.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+u);let h=l.append("g"),f=l.append("g"),d=r.descr.replace(/(<br\/*>)/g,`
`);await Hn(f,d,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},i),a||f.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");let p=f.node().getBBox(),[m]=Fo(i.fontSize);if(r.height=p.height+m*1.1*.5+r.padding,r.width=p.width+2*r.padding,r.icon){if(r.type===t.nodeType.CIRCLE)r.height+=50,r.width+=50,l.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),f.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")");else{r.width+=50;let g=r.height;r.height=Math.max(g,60);let y=Math.abs(r.height-g);l.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+y/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),f.attr("transform","translate("+(25+r.width/2)+", "+(y/2+r.padding/2)+")");}}else if(a){let g=(r.width-p.width)/2,y=(r.height-p.height)/2;f.attr("transform","translate("+g+", "+y+")");}else{let g=r.width/2,y=r.padding/2;f.attr("transform","translate("+g+", "+y+")");}switch(r.type){case t.nodeType.DEFAULT:uet(t,h,r,s);break;case t.nodeType.ROUNDED_RECT:yet(t,h,r,s);break;case t.nodeType.RECT:het(t,h,r,s);break;case t.nodeType.CIRCLE:h.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),pet(t,h,r,s);break;case t.nodeType.CLOUD:fet(t,h,r,s);break;case t.nodeType.BANG:det(t,h,r,s);break;case t.nodeType.HEXAGON:get(t,h,r,s);break;}return t.setElementForId(r.id,l),r.height;},"drawNode"),Z1e=o(function(t,e){let r=t.getElementById(e.id),n=e.x||0,i=e.y||0;r.attr("transform","translate("+n+","+i+")");},"positionNode");});async function tye(t,e,r,n,i){await Q1e(t,e,r,n,i),r.children&&(await Promise.all(r.children.map((a,s)=>tye(t,e,a,n<0?s:n,i))));}function vet(t,e){e.edges().map((r,n)=>{let i=r.data();if(r[0]._private.bodyBounds){let a=r[0]._private.rscratch;X.trace("Edge: ",n,i),t.insert("path").attr("d",`M ${a.startX},${a.startY} L ${a.midX},${a.midY} L${a.endX},${a.endY} `).attr("class","edge section-edge-"+i.section+" edge-depth-"+i.depth);}});}function rye(t,e,r,n){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:n,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach(i=>{rye(i,e,r,n+1),e.add({group:"edges",data:{id:`${t.id}_${i.id}`,source:t.id,target:i.id,depth:n,section:i.section}});});}function xet(t,e){return new Promise(r=>{let n=Ge("body").append("div").attr("id","cy").attr("style","display:none"),i=il({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});n.remove(),rye(t,i,e,0),i.nodes().forEach(function(a){a.layoutDimensions=()=>{let s=a.data();return{w:s.width,h:s.height};};}),i.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),i.ready(a=>{X.info("Ready",a),r(i);});});}function bet(t,e){e.nodes().map((r,n)=>{let i=r.data();i.x=r.position().x,i.y=r.position().y,Z1e(t,i);let a=t.getElementById(i.nodeId);X.info("id:",n,"Position: (",r.position().x,", ",r.position().y,")",i),a.attr("transform",`translate(${r.position().x-i.width/2}, ${r.position().y-i.height/2})`),a.attr("attr",`apa-${n})`);});}var eye,Tet,nye,iye=N(()=>{"use strict";aF();eye=Sa(K1e(),1);pr();qt();yt();zl();yi();J1e();Ca();il.use(eye.default);o(tye,"drawNodes");o(vet,"drawEdges");o(rye,"addNodes");o(xet,"layoutMindmap");o(bet,"positionNodes");Tet=o(async(t,e,r,n)=>{var _s$mindmap$padding,_s$mindmap,_s$mindmap$useMaxWidt,_s$mindmap2;X.debug(`Rendering mindmap diagram
`+t);let i=n.db,a=i.getMindmap();if(!a)return;let s=ge();s.htmlLabels=!1;let l=Di(e),u=l.append("g");u.attr("class","mindmap-edges");let h=l.append("g");h.attr("class","mindmap-nodes"),await tye(i,h,a,-1,s);let f=await xet(a,s);vet(u,f),bet(i,f),_o(void 0,l,(_s$mindmap$padding=(_s$mindmap=s.mindmap)===null||_s$mindmap===void 0?void 0:_s$mindmap.padding)!==null&&_s$mindmap$padding!==void 0?_s$mindmap$padding:lr.mindmap.padding,(_s$mindmap$useMaxWidt=(_s$mindmap2=s.mindmap)===null||_s$mindmap2===void 0?void 0:_s$mindmap2.useMaxWidth)!==null&&_s$mindmap$useMaxWidt!==void 0?_s$mindmap$useMaxWidt:lr.mindmap.useMaxWidth);},"draw"),nye={draw:Tet};});var wet,ket,aye,sye=N(()=>{"use strict";Xs();wet=o(t=>{let e="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)t["lineColor"+r]=t["lineColor"+r]||t["cScaleInv"+r],sa(t["lineColor"+r])?t["lineColor"+r]=Lt(t["lineColor"+r],20):t["lineColor"+r]=Ot(t["lineColor"+r],20);for(let r=0;r<t.THEME_COLOR_LIMIT;r++){let n=""+(17-3*r);e+=`
    .section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} polygon, .section-${r-1} path  {
      fill: ${t["cScale"+r]};
    }
    .section-${r-1} text {
     fill: ${t["cScaleLabel"+r]};
    }
    .node-icon-${r-1} {
      font-size: 40px;
      color: ${t["cScaleLabel"+r]};
    }
    .section-edge-${r-1}{
      stroke: ${t["cScale"+r]};
    }
    .edge-depth-${r-1}{
      stroke-width: ${n};
    }
    .section-${r-1} line {
      stroke: ${t["cScaleInv"+r]} ;
      stroke-width: 3;
    }

    .disabled, .disabled circle, .disabled text {
      fill: lightgray;
    }
    .disabled text {
      fill: #efefef;
    }
    `;}return e;},"genSections"),ket=o(t=>`
  .edge {
    stroke-width: 3;
  }
  ${wet(t)}
  .section-root rect, .section-root path, .section-root circle, .section-root polygon  {
    fill: ${t.git0};
  }
  .section-root text {
    fill: ${t.gitBranchLabel0};
  }
  .icon-container {
    height:100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .edge {
    fill: none;
  }
  .mindmap-node-label {
    dy: 1em;
    alignment-baseline: middle;
    text-anchor: middle;
    dominant-baseline: middle;
    text-align: center;
  }
`,"getStyles"),aye=ket;});var oye={};hr(oye,{diagram:()=>Eet});var Eet,lye=N(()=>{"use strict";P0e();B0e();iye();sye();Eet={get db(){return new h6();},renderer:nye,parser:O0e,styles:aye};});var hF,hye,fye=N(()=>{"use strict";hF=function(){var t=o(function(_,A,D,O){for(D=D||{},O=_.length;O--;D[_[O]]=A);return D;},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],l=[1,19],u=[6,7,8],h=[1,26],f=[1,24],d=[1,25],p=[6,7,11],m=[1,31],g=[6,7,11,24],y=[1,6,13,16,17,20,23],v=[1,35],x=[1,36],b=[1,6,7,11,13,16,17,20,23],T=[1,38],C={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(A,D,O,R,k,L,S){var I=L.length-1;switch(k){case 6:case 7:return R;case 8:R.getLogger().trace("Stop NL ");break;case 9:R.getLogger().trace("Stop EOF ");break;case 11:R.getLogger().trace("Stop NL2 ");break;case 12:R.getLogger().trace("Stop EOF2 ");break;case 15:R.getLogger().info("Node: ",L[I-1].id),R.addNode(L[I-2].length,L[I-1].id,L[I-1].descr,L[I-1].type,L[I]);break;case 16:R.getLogger().info("Node: ",L[I].id),R.addNode(L[I-1].length,L[I].id,L[I].descr,L[I].type);break;case 17:R.getLogger().trace("Icon: ",L[I]),R.decorateNode({icon:L[I]});break;case 18:case 23:R.decorateNode({class:L[I]});break;case 19:R.getLogger().trace("SPACELIST");break;case 20:R.getLogger().trace("Node: ",L[I-1].id),R.addNode(0,L[I-1].id,L[I-1].descr,L[I-1].type,L[I]);break;case 21:R.getLogger().trace("Node: ",L[I].id),R.addNode(0,L[I].id,L[I].descr,L[I].type);break;case 22:R.decorateNode({icon:L[I]});break;case 27:R.getLogger().trace("node found ..",L[I-2]),this.$={id:L[I-1],descr:L[I-1],type:R.getType(L[I-2],L[I])};break;case 28:this.$={id:L[I],descr:L[I],type:0};break;case 29:R.getLogger().trace("node found ..",L[I-3]),this.$={id:L[I-3],descr:L[I-1],type:R.getType(L[I-2],L[I])};break;case 30:this.$=L[I-1]+L[I];break;case 31:this.$=L[I];break;}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:l},t(u,[2,3]),{1:[2,2]},t(u,[2,4]),t(u,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:l},{6:r,9:22,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:l},{6:h,7:f,10:23,11:d},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:l}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(g,[2,25]),t(g,[2,26]),t(g,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:f,10:34,11:d},{1:[2,7],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:l},t(y,[2,14],{7:v,11:x}),t(b,[2,8]),t(b,[2,9]),t(b,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:T}),t(g,[2,31]),{21:[1,39]},{22:[1,40]},t(y,[2,13],{7:v,11:x}),t(b,[2,11]),t(b,[2,12]),t(p,[2,15],{24:T}),t(g,[2,30]),{22:[1,41]},t(g,[2,27]),t(g,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(A,D){if(D.recoverable)this.trace(A);else{var O=new Error(A);throw O.hash=D,O;}},"parseError"),parse:o(function(A){var D=this,O=[0],R=[],k=[null],L=[],S=this.table,I="",M=0,P=0,B=0,F=2,z=1,$=L.slice.call(arguments,1),U=Object.create(this.lexer),K={yy:{}};for(var ee in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ee)&&(K.yy[ee]=this.yy[ee]);U.setInput(A,K.yy),K.yy.lexer=U,K.yy.parser=this,typeof U.yylloc>"u"&&(U.yylloc={});var Y=U.yylloc;L.push(Y);var ce=U.options&&U.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(Be){O.length=O.length-2*Be,k.length=k.length-Be,L.length=L.length-Be;}o(Z,"popStack");function ue(){var Be;return Be=R.pop()||U.lex()||z,typeof Be!="number"&&(Be instanceof Array&&(R=Be,Be=R.pop()),Be=D.symbols_[Be]||Be),Be;}o(ue,"lex");for(var Q,j,ne,te,he,le,J={},Se,se,ae,Oe;;){if(ne=O[O.length-1],this.defaultActions[ne]?te=this.defaultActions[ne]:((Q===null||typeof Q>"u")&&(Q=ue()),te=S[ne]&&S[ne][Q]),typeof te>"u"||!te.length||!te[0]){var ye="";Oe=[];for(Se in S[ne])this.terminals_[Se]&&Se>F&&Oe.push("'"+this.terminals_[Se]+"'");U.showPosition?ye="Parse error on line "+(M+1)+`:
`+U.showPosition()+`
Expecting `+Oe.join(", ")+", got '"+(this.terminals_[Q]||Q)+"'":ye="Parse error on line "+(M+1)+": Unexpected "+(Q==z?"end of input":"'"+(this.terminals_[Q]||Q)+"'"),this.parseError(ye,{text:U.match,token:this.terminals_[Q]||Q,line:U.yylineno,loc:Y,expected:Oe});}if(te[0]instanceof Array&&te.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ne+", token: "+Q);switch(te[0]){case 1:O.push(Q),k.push(U.yytext),L.push(U.yylloc),O.push(te[1]),Q=null,j?(Q=j,j=null):(P=U.yyleng,I=U.yytext,M=U.yylineno,Y=U.yylloc,B>0&&B--);break;case 2:if(se=this.productions_[te[1]][1],J.$=k[k.length-se],J._$={first_line:L[L.length-(se||1)].first_line,last_line:L[L.length-1].last_line,first_column:L[L.length-(se||1)].first_column,last_column:L[L.length-1].last_column},ce&&(J._$.range=[L[L.length-(se||1)].range[0],L[L.length-1].range[1]]),le=this.performAction.apply(J,[I,P,M,K.yy,te[1],k,L].concat($)),typeof le<"u")return le;se&&(O=O.slice(0,-1*se*2),k=k.slice(0,-1*se),L=L.slice(0,-1*se)),O.push(this.productions_[te[1]][0]),k.push(J.$),L.push(J._$),ae=S[O[O.length-2]][O[O.length-1]],O.push(ae);break;case 3:return!0;}}return!0;},"parse")},w=function(){var _={EOF:1,parseError:o(function(D,O){if(this.yy.parser)this.yy.parser.parseError(D,O);else throw new Error(D);},"parseError"),setInput:o(function(A,D){return this.yy=D||this.yy||{},this._input=A,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var A=this._input[0];this.yytext+=A,this.yyleng++,this.offset++,this.match+=A,this.matched+=A;var D=A.match(/(?:\r\n?|\n).*/g);return D?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),A;},"input"),unput:o(function(A){var D=A.length,O=A.split(/(?:\r\n?|\n)/g);this._input=A+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-D),this.offset-=D;var R=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),O.length-1&&(this.yylineno-=O.length-1);var k=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:O?(O.length===R.length?this.yylloc.first_column:0)+R[R.length-O.length].length-O[0].length:this.yylloc.first_column-D},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-D]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(A){this.unput(this.match.slice(A));},"less"),pastInput:o(function(){var A=this.matched.substr(0,this.matched.length-this.match.length);return(A.length>20?"...":"")+A.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var A=this.match;return A.length<20&&(A+=this._input.substr(0,20-A.length)),(A.substr(0,20)+(A.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var A=this.pastInput(),D=new Array(A.length+1).join("-");return A+this.upcomingInput()+`
`+D+"^";},"showPosition"),test_match:o(function(A,D){var O,R,k;if(this.options.backtrack_lexer&&(k={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(k.yylloc.range=this.yylloc.range.slice(0))),R=A[0].match(/(?:\r\n?|\n).*/g),R&&(this.yylineno+=R.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:R?R[R.length-1].length-R[R.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+A[0].length},this.yytext+=A[0],this.match+=A[0],this.matches=A,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(A[0].length),this.matched+=A[0],O=this.performAction.call(this,this.yy,this,D,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),O)return O;if(this._backtrack){for(var L in k)this[L]=k[L];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var A,D,O,R;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),L=0;L<k.length;L++)if(O=this._input.match(this.rules[k[L]]),O&&(!D||O[0].length>D[0].length)){if(D=O,R=L,this.options.backtrack_lexer){if(A=this.test_match(O,k[L]),A!==!1)return A;if(this._backtrack){D=!1;continue;}else return!1;}else if(!this.options.flex)break;}return D?(A=this.test_match(D,k[R]),A!==!1?A:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var D=this.next();return D||this.lex();},"lex"),begin:o(function(D){this.conditionStack.push(D);},"begin"),popState:o(function(){var D=this.conditionStack.length-1;return D>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function(D){return D=this.conditionStack.length-1-Math.abs(D||0),D>=0?this.conditionStack[D]:"INITIAL";},"topState"),pushState:o(function(D){this.begin(D);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(D,O,R,k){var L=k;switch(R){case 0:return this.pushState("shapeData"),O.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let S=/\n\s*/g;return O.yytext=O.yytext.replace(S,"<br/>"),24;break;case 4:return 24;case 5:this.popState();break;case 6:return D.getLogger().trace("Found comment",O.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:D.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return D.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:D.getLogger().trace("end icon"),this.popState();break;case 16:return D.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return D.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return D.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return D.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:D.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return D.getLogger().trace("description:",O.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),D.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),D.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),D.getLogger().trace("node end ...",O.yytext),"NODE_DEND";break;case 36:return this.popState(),D.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),D.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),D.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),D.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),D.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return D.getLogger().trace("Long description:",O.yytext),21;break;case 42:return D.getLogger().trace("Long description:",O.yytext),21;break;}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return _;}();C.lexer=w;function E(){this.yy={};}return o(E,"Parser"),E.prototype=C,C.Parser=E,new E();}();hF.parser=hF;hye=hF;});var al,dF,fF,pF,Det,Let,dye,Ret,Net,qi,Met,Iet,Oet,Pet,Bet,Fet,$et,pye,mye=N(()=>{"use strict";qt();dr();yt();Ca();IT();al=[],dF=[],fF=0,pF={},Det=o(()=>{al=[],dF=[],fF=0,pF={};},"clear"),Let=o(t=>{var _r2;if(al.length===0)return null;let e=al[0].level,r=null;for(let n=al.length-1;n>=0;n--)if(al[n].level===e&&!r&&(r=al[n]),al[n].level<e)throw new Error('Items without section detected, found section ("'+al[n].label+'")');return t===((_r2=r)===null||_r2===void 0?void 0:_r2.level)?null:r;},"getSection"),dye=o(function(){return dF;},"getSections"),Ret=o(function(){let t=[],e=[],r=dye(),n=ge();for(let i of r){var _i$label;let a={id:i.id,label:ar((_i$label=i.label)!==null&&_i$label!==void 0?_i$label:"",n),isGroup:!0,ticket:i.ticket,shape:"kanbanSection",level:i.level,look:n.look};e.push(a);let s=al.filter(l=>l.parentId===i.id);for(let l of s){var _l$label;let u={id:l.id,parentId:i.id,label:ar((_l$label=l.label)!==null&&_l$label!==void 0?_l$label:"",n),isGroup:!1,ticket:l===null||l===void 0?void 0:l.ticket,priority:l===null||l===void 0?void 0:l.priority,assigned:l===null||l===void 0?void 0:l.assigned,icon:l===null||l===void 0?void 0:l.icon,shape:"kanbanItem",level:l.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(u);}}return{nodes:e,edges:t,other:{},config:ge()};},"getData"),Net=o((t,e,r,n,i)=>{var _a$mindmap$padding2,_a$mindmap3,_a$mindmap$maxNodeWid2,_a$mindmap4;let a=ge(),s=(_a$mindmap$padding2=(_a$mindmap3=a.mindmap)===null||_a$mindmap3===void 0?void 0:_a$mindmap3.padding)!==null&&_a$mindmap$padding2!==void 0?_a$mindmap$padding2:lr.mindmap.padding;switch(n){case qi.ROUNDED_RECT:case qi.RECT:case qi.HEXAGON:s*=2;}let l={id:ar(e,a)||"kbn"+fF++,level:t,label:ar(r,a),width:(_a$mindmap$maxNodeWid2=(_a$mindmap4=a.mindmap)===null||_a$mindmap4===void 0?void 0:_a$mindmap4.maxNodeWidth)!==null&&_a$mindmap$maxNodeWid2!==void 0?_a$mindmap$maxNodeWid2:lr.mindmap.maxNodeWidth,padding:s,isGroup:!1};if(i!==void 0){let h;i.includes(`
`)?h=i+`
`:h=`{
`+i+`
}`;let f=gm(h,{schema:mm});if(f.shape&&(f.shape!==f.shape.toLowerCase()||f.shape.includes("_")))throw new Error(`No such shape: ${f.shape}. Shape names should be lowercase.`);f!==null&&f!==void 0&&f.shape&&f.shape==="kanbanItem"&&(l.shape=f===null||f===void 0?void 0:f.shape),f!==null&&f!==void 0&&f.label&&(l.label=f===null||f===void 0?void 0:f.label),f!==null&&f!==void 0&&f.icon&&(l.icon=f===null||f===void 0?void 0:f.icon.toString()),f!==null&&f!==void 0&&f.assigned&&(l.assigned=f===null||f===void 0?void 0:f.assigned.toString()),f!==null&&f!==void 0&&f.ticket&&(l.ticket=f===null||f===void 0?void 0:f.ticket.toString()),(f===null||f===void 0?void 0:f.priority)&&(l.priority=f===null||f===void 0?void 0:f.priority);}let u=Let(t);u?l.parentId=u.id||"kbn"+fF++:dF.push(l),al.push(l);},"addNode"),qi={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Met=o((t,e)=>{switch(X.debug("In get type",t,e),t){case"[":return qi.RECT;case"(":return e===")"?qi.ROUNDED_RECT:qi.CLOUD;case"((":return qi.CIRCLE;case")":return qi.CLOUD;case"))":return qi.BANG;case"{{":return qi.HEXAGON;default:return qi.DEFAULT;}},"getType"),Iet=o((t,e)=>{pF[t]=e;},"setElementForId"),Oet=o(t=>{if(!t)return;let e=ge(),r=al[al.length-1];t.icon&&(r.icon=ar(t.icon,e)),t.class&&(r.cssClasses=ar(t.class,e));},"decorateNode"),Pet=o(t=>{switch(t){case qi.DEFAULT:return"no-border";case qi.RECT:return"rect";case qi.ROUNDED_RECT:return"rounded-rect";case qi.CIRCLE:return"circle";case qi.CLOUD:return"cloud";case qi.BANG:return"bang";case qi.HEXAGON:return"hexgon";default:return"no-border";}},"type2Str"),Bet=o(()=>X,"getLogger"),Fet=o(t=>pF[t],"getElementById"),$et={clear:Det,addNode:Net,getSections:dye,getData:Ret,nodeType:qi,getType:Met,setElementForId:Iet,decorateNode:Oet,type2Str:Pet,getLogger:Bet,getElementById:Fet},pye=$et;});var zet,gye,yye=N(()=>{"use strict";qt();yt();zl();yi();Ca();nw();dw();zet=o(async(t,e,r,n)=>{var _s$mindmap$padding2,_s$mindmap3,_s$mindmap$useMaxWidt2,_s$mindmap4;X.debug(`Rendering kanban diagram
`+t);let a=n.db.getData(),s=ge();s.htmlLabels=!1;let l=Di(e),u=l.append("g");u.attr("class","sections");let h=l.append("g");h.attr("class","items");let f=a.nodes.filter(v=>v.isGroup),d=0,p=10,m=[],g=25;for(let v of f){var _s$kanban,_b$labelBBox;let x=(s===null||s===void 0||(_s$kanban=s.kanban)===null||_s$kanban===void 0?void 0:_s$kanban.sectionWidth)||200;d=d+1,v.x=x*d+(d-1)*p/2,v.width=x,v.y=0,v.height=x*3,v.rx=5,v.ry=5,v.cssClasses=v.cssClasses+" section-"+d;let b=await bm(u,v);g=Math.max(g,b===null||b===void 0||(_b$labelBBox=b.labelBBox)===null||_b$labelBBox===void 0?void 0:_b$labelBBox.height),m.push(b);}let y=0;for(let v of f){var _s$kanban2;let x=m[y];y=y+1;let b=(s===null||s===void 0||(_s$kanban2=s.kanban)===null||_s$kanban2===void 0?void 0:_s$kanban2.sectionWidth)||200,T=-b*3/2+g,C=T,w=a.nodes.filter(A=>A.parentId===v.id);for(let A of w){if(A.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");A.x=v.x,A.width=b-1.5*p;let O=(await Tm(h,A,{config:s})).node().getBBox();A.y=C+O.height/2,await N2(A),C=A.y+O.height/2+p/2;}let E=x.cluster.select("rect"),_=Math.max(C-T+3*p,50)+(g-25);E.attr("height",_);}_o(void 0,l,(_s$mindmap$padding2=(_s$mindmap3=s.mindmap)===null||_s$mindmap3===void 0?void 0:_s$mindmap3.padding)!==null&&_s$mindmap$padding2!==void 0?_s$mindmap$padding2:lr.kanban.padding,(_s$mindmap$useMaxWidt2=(_s$mindmap4=s.mindmap)===null||_s$mindmap4===void 0?void 0:_s$mindmap4.useMaxWidth)!==null&&_s$mindmap$useMaxWidt2!==void 0?_s$mindmap$useMaxWidt2:lr.kanban.useMaxWidth);},"draw"),gye={draw:zet};});var Get,Vet,vye,xye=N(()=>{"use strict";Xs();Vm();Get=o(t=>{let e="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],sa(t["lineColor"+n])?t["lineColor"+n]=Lt(t["lineColor"+n],20):t["lineColor"+n]=Ot(t["lineColor"+n],20);let r=o((n,i)=>t.darkMode?Ot(n,i):Lt(n,i),"adjuster");for(let n=0;n<t.THEME_COLOR_LIMIT;n++){let i=""+(17-3*n);e+=`
    .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path  {
      fill: ${r(t["cScale"+n],10)};
      stroke: ${r(t["cScale"+n],10)};

    }
    .section-${n-1} text {
     fill: ${t["cScaleLabel"+n]};
    }
    .node-icon-${n-1} {
      font-size: 40px;
      color: ${t["cScaleLabel"+n]};
    }
    .section-edge-${n-1}{
      stroke: ${t["cScale"+n]};
    }
    .edge-depth-${n-1}{
      stroke-width: ${i};
    }
    .section-${n-1} line {
      stroke: ${t["cScaleInv"+n]} ;
      stroke-width: 3;
    }

    .disabled, .disabled circle, .disabled text {
      fill: lightgray;
    }
    .disabled text {
      fill: #efefef;
    }

  .node rect,
  .node circle,
  .node ellipse,
  .node polygon,
  .node path {
    fill: ${t.background};
    stroke: ${t.nodeBorder};
    stroke-width: 1px;
  }

  .kanban-ticket-link {
    fill: ${t.background};
    stroke: ${t.nodeBorder};
    text-decoration: underline;
  }
    `;}return e;},"genSections"),Vet=o(t=>`
  .edge {
    stroke-width: 3;
  }
  ${Get(t)}
  .section-root rect, .section-root path, .section-root circle, .section-root polygon  {
    fill: ${t.git0};
  }
  .section-root text {
    fill: ${t.gitBranchLabel0};
  }
  .icon-container {
    height:100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .edge {
    fill: none;
  }
  .cluster-label, .label {
    color: ${t.textColor};
    fill: ${t.textColor};
    }
  .kanban-label {
    dy: 1em;
    alignment-baseline: middle;
    text-anchor: middle;
    dominant-baseline: middle;
    text-align: center;
  }
    ${Lc()}
`,"getStyles"),vye=Vet;});var bye={};hr(bye,{diagram:()=>Uet});var Uet,Tye=N(()=>{"use strict";fye();mye();yye();xye();Uet={db:pye,renderer:gye,parser:hye,styles:vye};});var mF,k4,Eye=N(()=>{"use strict";mF=function(){var t=o(function(l,u,h,f){for(h=h||{},f=l.length;f--;h[l[f]]=u);return h;},"o"),e=[1,9],r=[1,10],n=[1,5,10,12],i={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:o(function(u,h,f,d,p,m,g){var y=m.length-1;switch(p){case 7:let v=d.findOrCreateNode(m[y-4].trim().replaceAll('""','"')),x=d.findOrCreateNode(m[y-2].trim().replaceAll('""','"')),b=parseFloat(m[y].trim());d.addLink(v,x,b);break;case 8:case 9:case 11:this.$=m[y];break;case 10:this.$=m[y-1];break;}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(n,[2,8]),t(n,[2,9]),{19:[1,16]},t(n,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:r},{15:18,16:7,17:8,18:e,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(n,[2,10]),{15:21,16:7,17:8,18:e,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:o(function(u,h){if(h.recoverable)this.trace(u);else{var f=new Error(u);throw f.hash=h,f;}},"parseError"),parse:o(function(u){var h=this,f=[0],d=[],p=[null],m=[],g=this.table,y="",v=0,x=0,b=0,T=2,C=1,w=m.slice.call(arguments,1),E=Object.create(this.lexer),_={yy:{}};for(var A in this.yy)Object.prototype.hasOwnProperty.call(this.yy,A)&&(_.yy[A]=this.yy[A]);E.setInput(u,_.yy),_.yy.lexer=E,_.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var D=E.yylloc;m.push(D);var O=E.options&&E.options.ranges;typeof _.yy.parseError=="function"?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(Y){f.length=f.length-2*Y,p.length=p.length-Y,m.length=m.length-Y;}o(R,"popStack");function k(){var Y;return Y=d.pop()||E.lex()||C,typeof Y!="number"&&(Y instanceof Array&&(d=Y,Y=d.pop()),Y=h.symbols_[Y]||Y),Y;}o(k,"lex");for(var L,S,I,M,P,B,F={},z,$,U,K;;){if(I=f[f.length-1],this.defaultActions[I]?M=this.defaultActions[I]:((L===null||typeof L>"u")&&(L=k()),M=g[I]&&g[I][L]),typeof M>"u"||!M.length||!M[0]){var ee="";K=[];for(z in g[I])this.terminals_[z]&&z>T&&K.push("'"+this.terminals_[z]+"'");E.showPosition?ee="Parse error on line "+(v+1)+`:
`+E.showPosition()+`
Expecting `+K.join(", ")+", got '"+(this.terminals_[L]||L)+"'":ee="Parse error on line "+(v+1)+": Unexpected "+(L==C?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(ee,{text:E.match,token:this.terminals_[L]||L,line:E.yylineno,loc:D,expected:K});}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+L);switch(M[0]){case 1:f.push(L),p.push(E.yytext),m.push(E.yylloc),f.push(M[1]),L=null,S?(L=S,S=null):(x=E.yyleng,y=E.yytext,v=E.yylineno,D=E.yylloc,b>0&&b--);break;case 2:if($=this.productions_[M[1]][1],F.$=p[p.length-$],F._$={first_line:m[m.length-($||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-($||1)].first_column,last_column:m[m.length-1].last_column},O&&(F._$.range=[m[m.length-($||1)].range[0],m[m.length-1].range[1]]),B=this.performAction.apply(F,[y,x,v,_.yy,M[1],p,m].concat(w)),typeof B<"u")return B;$&&(f=f.slice(0,-1*$*2),p=p.slice(0,-1*$),m=m.slice(0,-1*$)),f.push(this.productions_[M[1]][0]),p.push(F.$),m.push(F._$),U=g[f[f.length-2]][f[f.length-1]],f.push(U);break;case 3:return!0;}}return!0;},"parse")},a=function(){var l={EOF:1,parseError:o(function(h,f){if(this.yy.parser)this.yy.parser.parseError(h,f);else throw new Error(h);},"parseError"),setInput:o(function(u,h){return this.yy=h||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var h=u.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u;},"input"),unput:o(function(u){var h=u.length,f=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===d.length?this.yylloc.first_column:0)+d[d.length-f.length].length-f[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(u){this.unput(this.match.slice(u));},"less"),pastInput:o(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var u=this.pastInput(),h=new Array(u.length+1).join("-");return u+this.upcomingInput()+`
`+h+"^";},"showPosition"),test_match:o(function(u,h){var f,d,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(p.yylloc.range=this.yylloc.range.slice(0))),d=u[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],f=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var m in p)this[m]=p[m];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,h,f,d;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),m=0;m<p.length;m++)if(f=this._input.match(this.rules[p[m]]),f&&(!h||f[0].length>h[0].length)){if(h=f,d=m,this.options.backtrack_lexer){if(u=this.test_match(f,p[m]),u!==!1)return u;if(this._backtrack){h=!1;continue;}else return!1;}else if(!this.options.flex)break;}return h?(u=this.test_match(h,p[d]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var h=this.next();return h||this.lex();},"lex"),begin:o(function(h){this.conditionStack.push(h);},"begin"),popState:o(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL";},"topState"),pushState:o(function(h){this.begin(h);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(h,f,d,p){var m=p;switch(d){case 0:return this.pushState("csv"),4;break;case 1:return this.pushState("csv"),4;break;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;break;case 6:return 20;case 7:return this.popState("escaped_text"),18;break;case 8:return 19;}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return l;}();i.lexer=a;function s(){this.yy={};}return o(s,"Parser"),s.prototype=i,i.Parser=s,new s();}();mF.parser=mF;k4=mF;});var hC,fC,uC,Yet,gF,Xet,yF,jet,Ket,Qet,Zet,Sye,Cye=N(()=>{"use strict";var _Class208,_Class209;qt();dr();ci();hC=[],fC=[],uC=new Map(),Yet=o(()=>{hC=[],fC=[],uC=new Map(),wr();},"clear"),gF=(_Class208=class gF{constructor(e,r,n=0){this.source=e;this.target=r;this.value=n;}},o(_Class208,"SankeyLink"),_Class208),Xet=o((t,e,r)=>{hC.push(new gF(t,e,r));},"addLink"),yF=(_Class209=class yF{constructor(e){this.ID=e;}},o(_Class209,"SankeyNode"),_Class209),jet=o(t=>{t=Ze.sanitizeText(t,ge());let e=uC.get(t);return e===void 0&&(e=new yF(t),uC.set(t,e),fC.push(e)),e;},"findOrCreateNode"),Ket=o(()=>fC,"getNodes"),Qet=o(()=>hC,"getLinks"),Zet=o(()=>({nodes:fC.map(t=>({id:t.ID})),links:hC.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),Sye={nodesMap:uC,getConfig:o(()=>ge().sankey,"getConfig"),getNodes:Ket,getLinks:Qet,getGraph:Zet,addLink:Xet,findOrCreateNode:jet,getAccTitle:_r,setAccTitle:Cr,getAccDescription:Lr,setAccDescription:Dr,getDiagramTitle:Rr,setDiagramTitle:Ir,clear:Yet};});function E4(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r<i||r===void 0&&i>=i)&&(r=i);}return r;}var Aye=N(()=>{"use strict";o(E4,"max");});function uy(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i);}return r;}var _ye=N(()=>{"use strict";o(uy,"min");});function hy(t,e){let r=0;if(e===void 0)for(let n of t)(n=+n)&&(r+=n);else{let n=-1;for(let i of t)(i=+e(i,++n,t))&&(r+=i);}return r;}var Dye=N(()=>{"use strict";o(hy,"sum");});var vF=N(()=>{"use strict";Aye();_ye();Dye();});function Jet(t){return t.target.depth;}function xF(t){return t.depth;}function bF(t,e){return e-1-t.height;}function S4(t,e){return t.sourceLinks.length?t.depth:e-1;}function TF(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?uy(t.sourceLinks,Jet)-1:0;}var wF=N(()=>{"use strict";vF();o(Jet,"targetDepth");o(xF,"left");o(bF,"right");o(S4,"justify");o(TF,"center");});function fy(t){return function(){return t;};}var Lye=N(()=>{"use strict";o(fy,"constant");});function Rye(t,e){return dC(t.source,e.source)||t.index-e.index;}function Nye(t,e){return dC(t.target,e.target)||t.index-e.index;}function dC(t,e){return t.y0-e.y0;}function kF(t){return t.value;}function ett(t){return t.index;}function ttt(t){return t.nodes;}function rtt(t){return t.links;}function Mye(t,e){let r=t.get(e);if(!r)throw new Error("missing: "+e);return r;}function Iye({nodes:t}){for(let e of t){let r=e.y0,n=r;for(let i of e.sourceLinks)i.y0=r+i.width/2,r+=i.width;for(let i of e.targetLinks)i.y1=n+i.width/2,n+=i.width;}}function pC(){let t=0,e=0,r=1,n=1,i=24,a=8,s,l=ett,u=S4,h,f,d=ttt,p=rtt,m=6;function g(){let I={nodes:d.apply(null,arguments),links:p.apply(null,arguments)};return y(I),v(I),x(I),b(I),w(I),Iye(I),I;}o(g,"sankey"),g.update=function(I){return Iye(I),I;},g.nodeId=function(I){return arguments.length?(l=typeof I=="function"?I:fy(I),g):l;},g.nodeAlign=function(I){return arguments.length?(u=typeof I=="function"?I:fy(I),g):u;},g.nodeSort=function(I){return arguments.length?(h=I,g):h;},g.nodeWidth=function(I){return arguments.length?(i=+I,g):i;},g.nodePadding=function(I){return arguments.length?(a=s=+I,g):a;},g.nodes=function(I){return arguments.length?(d=typeof I=="function"?I:fy(I),g):d;},g.links=function(I){return arguments.length?(p=typeof I=="function"?I:fy(I),g):p;},g.linkSort=function(I){return arguments.length?(f=I,g):f;},g.size=function(I){return arguments.length?(t=e=0,r=+I[0],n=+I[1],g):[r-t,n-e];},g.extent=function(I){return arguments.length?(t=+I[0][0],r=+I[1][0],e=+I[0][1],n=+I[1][1],g):[[t,e],[r,n]];},g.iterations=function(I){return arguments.length?(m=+I,g):m;};function y({nodes:I,links:M}){for(let[B,F]of I.entries())F.index=B,F.sourceLinks=[],F.targetLinks=[];let P=new Map(I.map((B,F)=>[l(B,F,I),B]));for(let[B,F]of M.entries()){F.index=B;let{source:z,target:$}=F;typeof z!="object"&&(z=F.source=Mye(P,z)),typeof $!="object"&&($=F.target=Mye(P,$)),z.sourceLinks.push(F),$.targetLinks.push(F);}if(f!=null)for(let{sourceLinks:B,targetLinks:F}of I)B.sort(f),F.sort(f);}o(y,"computeNodeLinks");function v({nodes:I}){for(let M of I)M.value=M.fixedValue===void 0?Math.max(hy(M.sourceLinks,kF),hy(M.targetLinks,kF)):M.fixedValue;}o(v,"computeNodeValues");function x({nodes:I}){let M=I.length,P=new Set(I),B=new Set(),F=0;for(;P.size;){for(let z of P){z.depth=F;for(let{target:$}of z.sourceLinks)B.add($);}if(++F>M)throw new Error("circular link");P=B,B=new Set();}}o(x,"computeNodeDepths");function b({nodes:I}){let M=I.length,P=new Set(I),B=new Set(),F=0;for(;P.size;){for(let z of P){z.height=F;for(let{source:$}of z.targetLinks)B.add($);}if(++F>M)throw new Error("circular link");P=B,B=new Set();}}o(b,"computeNodeHeights");function T({nodes:I}){let M=E4(I,F=>F.depth)+1,P=(r-t-i)/(M-1),B=new Array(M);for(let F of I){let z=Math.max(0,Math.min(M-1,Math.floor(u.call(null,F,M))));F.layer=z,F.x0=t+z*P,F.x1=F.x0+i,B[z]?B[z].push(F):B[z]=[F];}if(h)for(let F of B)F.sort(h);return B;}o(T,"computeNodeLayers");function C(I){let M=uy(I,P=>(n-e-(P.length-1)*s)/hy(P,kF));for(let P of I){let B=e;for(let F of P){F.y0=B,F.y1=B+F.value*M,B=F.y1+s;for(let z of F.sourceLinks)z.width=z.value*M;}B=(n-B+s)/(P.length+1);for(let F=0;F<P.length;++F){let z=P[F];z.y0+=B*(F+1),z.y1+=B*(F+1);}k(P);}}o(C,"initializeNodeBreadths");function w(I){let M=T(I);s=Math.min(a,(n-e)/(E4(M,P=>P.length)-1)),C(M);for(let P=0;P<m;++P){let B=Math.pow(.99,P),F=Math.max(1-B,(P+1)/m);_(M,B,F),E(M,B,F);}}o(w,"computeNodeBreadths");function E(I,M,P){for(let B=1,F=I.length;B<F;++B){let z=I[B];for(let $ of z){let U=0,K=0;for(let{source:Y,value:ce}of $.targetLinks){let Z=ce*($.layer-Y.layer);U+=L(Y,$)*Z,K+=Z;}if(!(K>0))continue;let ee=(U/K-$.y0)*M;$.y0+=ee,$.y1+=ee,R($);}h===void 0&&z.sort(dC),A(z,P);}}o(E,"relaxLeftToRight");function _(I,M,P){for(let B=I.length,F=B-2;F>=0;--F){let z=I[F];for(let $ of z){let U=0,K=0;for(let{target:Y,value:ce}of $.sourceLinks){let Z=ce*(Y.layer-$.layer);U+=S($,Y)*Z,K+=Z;}if(!(K>0))continue;let ee=(U/K-$.y0)*M;$.y0+=ee,$.y1+=ee,R($);}h===void 0&&z.sort(dC),A(z,P);}}o(_,"relaxRightToLeft");function A(I,M){let P=I.length>>1,B=I[P];O(I,B.y0-s,P-1,M),D(I,B.y1+s,P+1,M),O(I,n,I.length-1,M),D(I,e,0,M);}o(A,"resolveCollisions");function D(I,M,P,B){for(;P<I.length;++P){let F=I[P],z=(M-F.y0)*B;z>1e-6&&(F.y0+=z,F.y1+=z),M=F.y1+s;}}o(D,"resolveCollisionsTopToBottom");function O(I,M,P,B){for(;P>=0;--P){let F=I[P],z=(F.y1-M)*B;z>1e-6&&(F.y0-=z,F.y1-=z),M=F.y0-s;}}o(O,"resolveCollisionsBottomToTop");function R({sourceLinks:I,targetLinks:M}){if(f===void 0){for(let{source:{sourceLinks:P}}of M)P.sort(Nye);for(let{target:{targetLinks:P}}of I)P.sort(Rye);}}o(R,"reorderNodeLinks");function k(I){if(f===void 0)for(let{sourceLinks:M,targetLinks:P}of I)M.sort(Nye),P.sort(Rye);}o(k,"reorderLinks");function L(I,M){let P=I.y0-(I.sourceLinks.length-1)*s/2;for(let{target:B,width:F}of I.sourceLinks){if(B===M)break;P+=F+s;}for(let{source:B,width:F}of M.targetLinks){if(B===I)break;P-=F;}return P;}o(L,"targetTop");function S(I,M){let P=M.y0-(M.targetLinks.length-1)*s/2;for(let{source:B,width:F}of M.targetLinks){if(B===I)break;P+=F+s;}for(let{target:B,width:F}of I.sourceLinks){if(B===M)break;P-=F;}return P;}return o(S,"sourceTop"),g;}var Oye=N(()=>{"use strict";vF();wF();Lye();o(Rye,"ascendingSourceBreadth");o(Nye,"ascendingTargetBreadth");o(dC,"ascendingBreadth");o(kF,"value");o(ett,"defaultId");o(ttt,"defaultNodes");o(rtt,"defaultLinks");o(Mye,"find");o(Iye,"computeLinkBreadths");o(pC,"Sankey");});function CF(){this._x0=this._y0=this._x1=this._y1=null,this._="";}function Pye(){return new CF();}var EF,SF,e0,ntt,AF,Bye=N(()=>{"use strict";EF=Math.PI,SF=2*EF,e0=1e-6,ntt=SF-e0;o(CF,"Path");o(Pye,"path");CF.prototype=Pye.prototype={constructor:CF,moveTo:o(function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e);},"moveTo"),closePath:o(function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z");},"closePath"),lineTo:o(function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e);},"lineTo"),quadraticCurveTo:o(function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n);},"quadraticCurveTo"),bezierCurveTo:o(function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a);},"bezierCurveTo"),arcTo:o(function(t,e,r,n,i){t=+t,e=+e,r=+r,n=+n,i=+i;var a=this._x1,s=this._y1,l=r-t,u=n-e,h=a-t,f=s-e,d=h*h+f*f;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(d>e0)if(!(Math.abs(f*l-u*h)>e0)||!i)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var p=r-a,m=n-s,g=l*l+u*u,y=p*p+m*m,v=Math.sqrt(g),x=Math.sqrt(d),b=i*Math.tan((EF-Math.acos((g+d-y)/(2*v*x)))/2),T=b/x,C=b/v;Math.abs(T-1)>e0&&(this._+="L"+(t+T*h)+","+(e+T*f)),this._+="A"+i+","+i+",0,0,"+ +(f*p>h*m)+","+(this._x1=t+C*l)+","+(this._y1=e+C*u);}},"arcTo"),arc:o(function(t,e,r,n,i,a){t=+t,e=+e,r=+r,a=!!a;var s=r*Math.cos(n),l=r*Math.sin(n),u=t+s,h=e+l,f=1^a,d=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+u+","+h:(Math.abs(this._x1-u)>e0||Math.abs(this._y1-h)>e0)&&(this._+="L"+u+","+h),r&&(d<0&&(d=d%SF+SF),d>ntt?this._+="A"+r+","+r+",0,1,"+f+","+(t-s)+","+(e-l)+"A"+r+","+r+",0,1,"+f+","+(this._x1=u)+","+(this._y1=h):d>e0&&(this._+="A"+r+","+r+",0,"+ +(d>=EF)+","+f+","+(this._x1=t+r*Math.cos(i))+","+(this._y1=e+r*Math.sin(i))));},"arc"),rect:o(function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z";},"rect"),toString:o(function(){return this._;},"toString")};AF=Pye;});var Fye=N(()=>{"use strict";Bye();});function mC(t){return o(function(){return t;},"constant");}var $ye=N(()=>{"use strict";o(mC,"default");});function zye(t){return t[0];}function Gye(t){return t[1];}var Vye=N(()=>{"use strict";o(zye,"x");o(Gye,"y");});var Uye,Hye=N(()=>{"use strict";Uye=Array.prototype.slice;});function itt(t){return t.source;}function att(t){return t.target;}function stt(t){var e=itt,r=att,n=zye,i=Gye,a=null;function s(){var l,u=Uye.call(arguments),h=e.apply(this,u),f=r.apply(this,u);if(a||(a=l=AF()),t(a,+n.apply(this,(u[0]=h,u)),+i.apply(this,u),+n.apply(this,(u[0]=f,u)),+i.apply(this,u)),l)return a=null,l+""||null;}return o(s,"link"),s.source=function(l){return arguments.length?(e=l,s):e;},s.target=function(l){return arguments.length?(r=l,s):r;},s.x=function(l){return arguments.length?(n=typeof l=="function"?l:mC(+l),s):n;},s.y=function(l){return arguments.length?(i=typeof l=="function"?l:mC(+l),s):i;},s.context=function(l){return arguments.length?(a=l!==null&&l!==void 0?l:null,s):a;},s;}function ott(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i);}function _F(){return stt(ott);}var Wye=N(()=>{"use strict";Fye();Hye();$ye();Vye();o(itt,"linkSource");o(att,"linkTarget");o(stt,"link");o(ott,"curveHorizontal");o(_F,"linkHorizontal");});var qye=N(()=>{"use strict";Wye();});function ltt(t){return[t.source.x1,t.y0];}function ctt(t){return[t.target.x0,t.y1];}function gC(){return _F().source(ltt).target(ctt);}var Yye=N(()=>{"use strict";qye();o(ltt,"horizontalSource");o(ctt,"horizontalTarget");o(gC,"default");});var Xye=N(()=>{"use strict";Oye();wF();Yye();});var C4,jye=N(()=>{"use strict";var _t11;C4=(_t11=class t{static next(e){return new t(e+ ++t.count);}constructor(e){this.id=e,this.href=`#${e}`;}toString(){return"url("+this.href+")";}},o(_t11,"Uid"),_t11.count=0,_t11);});var utt,htt,Kye,Qye=N(()=>{"use strict";qt();pr();Xye();yi();jye();utt={left:xF,right:bF,center:TF,justify:S4},htt=o(function(t,e,r,n){var _a$width,_a$height,_a$useMaxWidth5,_a$nodeAlignment,_a$prefix,_a$suffix,_a$showValues,_a$linkColor;let{securityLevel:i,sankey:a}=ge(),s=B3.sankey,l;i==="sandbox"&&(l=Ge("#i"+e));let u=i==="sandbox"?Ge(l.nodes()[0].contentDocument.body):Ge("body"),h=i==="sandbox"?u.select(`[id="${e}"]`):Ge(`[id="${e}"]`),f=(_a$width=a===null||a===void 0?void 0:a.width)!==null&&_a$width!==void 0?_a$width:s.width,d=(_a$height=a===null||a===void 0?void 0:a.height)!==null&&_a$height!==void 0?_a$height:s.width,p=(_a$useMaxWidth5=a===null||a===void 0?void 0:a.useMaxWidth)!==null&&_a$useMaxWidth5!==void 0?_a$useMaxWidth5:s.useMaxWidth,m=(_a$nodeAlignment=a===null||a===void 0?void 0:a.nodeAlignment)!==null&&_a$nodeAlignment!==void 0?_a$nodeAlignment:s.nodeAlignment,g=(_a$prefix=a===null||a===void 0?void 0:a.prefix)!==null&&_a$prefix!==void 0?_a$prefix:s.prefix,y=(_a$suffix=a===null||a===void 0?void 0:a.suffix)!==null&&_a$suffix!==void 0?_a$suffix:s.suffix,v=(_a$showValues=a===null||a===void 0?void 0:a.showValues)!==null&&_a$showValues!==void 0?_a$showValues:s.showValues,x=n.db.getGraph(),b=utt[m];pC().nodeId(O=>O.id).nodeWidth(10).nodePadding(10+(v?15:0)).nodeAlign(b).extent([[0,0],[f,d]])(x);let w=Qs(MD);h.append("g").attr("class","nodes").selectAll(".node").data(x.nodes).join("g").attr("class","node").attr("id",O=>(O.uid=C4.next("node-")).id).attr("transform",function(O){return"translate("+O.x0+","+O.y0+")";}).attr("x",O=>O.x0).attr("y",O=>O.y0).append("rect").attr("height",O=>O.y1-O.y0).attr("width",O=>O.x1-O.x0).attr("fill",O=>w(O.id));let E=o(({id:O,value:R})=>v?`${O}
${g}${Math.round(R*100)/100}${y}`:O,"getText");h.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(x.nodes).join("text").attr("x",O=>O.x0<f/2?O.x1+6:O.x0-6).attr("y",O=>(O.y1+O.y0)/2).attr("dy",`${v?"0":"0.35"}em`).attr("text-anchor",O=>O.x0<f/2?"start":"end").text(E);let _=h.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(x.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),A=(_a$linkColor=a===null||a===void 0?void 0:a.linkColor)!==null&&_a$linkColor!==void 0?_a$linkColor:"gradient";if(A==="gradient"){let O=_.append("linearGradient").attr("id",R=>(R.uid=C4.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",R=>R.source.x1).attr("x2",R=>R.target.x0);O.append("stop").attr("offset","0%").attr("stop-color",R=>w(R.source.id)),O.append("stop").attr("offset","100%").attr("stop-color",R=>w(R.target.id));}let D;switch(A){case"gradient":D=o(O=>O.uid,"coloring");break;case"source":D=o(O=>w(O.source.id),"coloring");break;case"target":D=o(O=>w(O.target.id),"coloring");break;default:D=A;}_.append("path").attr("d",gC()).attr("stroke",D).attr("stroke-width",O=>Math.max(1,O.width)),_o(void 0,h,0,p);},"draw"),Kye={draw:htt};});var Zye,Jye=N(()=>{"use strict";Zye=o(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
`).trim(),"prepareTextForParsing");});var ftt,eve,tve=N(()=>{"use strict";ftt=o(t=>`.label {
      font-family: ${t.fontFamily};
    }`,"getStyles"),eve=ftt;});var rve={};hr(rve,{diagram:()=>ptt});var dtt,ptt,nve=N(()=>{"use strict";Eye();Cye();Qye();Jye();tve();dtt=k4.parse.bind(k4);k4.parse=t=>dtt(Zye(t));ptt={styles:eve,parser:k4,db:Sye,renderer:Kye};});var vtt,dy,DF=N(()=>{"use strict";var _Class210;Jn();Ca();nr();ci();vtt=lr.packet,dy=(_Class210=class dy{constructor(){this.packet=[];this.setAccTitle=Cr;this.getAccTitle=_r;this.setDiagramTitle=Ir;this.getDiagramTitle=Rr;this.getAccDescription=Lr;this.setAccDescription=Dr;}getConfig(){let e=Fn({...vtt,...Qt().packet});return e.showBits&&(e.paddingY+=10),e;}getPacket(){return this.packet;}pushWord(e){e.length>0&&this.packet.push(e);}clear(){wr(),this.packet=[];}},o(_Class210,"PacketDB"),_Class210);});var xtt,btt,Ttt,LF,sve=N(()=>{"use strict";gf();yt();Dp();DF();xtt=1e4,btt=o((t,e)=>{Qo(t,e);let r=-1,n=[],i=1,{bitsPerRow:a}=e.getConfig();for(let{start:s,end:l,bits:u,label:h}of t.blocks){if(s!==void 0&&l!==void 0&&l<s)throw new Error(`Packet block ${s} - ${l} is invalid. End must be greater than start.`);if(s!==null&&s!==void 0?s:s=r+1,s!==r+1)throw new Error(`Packet block ${s} - ${l!==null&&l!==void 0?l:s} is not contiguous. It should start from ${r+1}.`);if(u===0)throw new Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);for(l!==null&&l!==void 0?l:l=s+(u!==null&&u!==void 0?u:1)-1,u!==null&&u!==void 0?u:u=l-s+1,r=l,X.debug(`Packet block ${s} - ${r} with label ${h}`);n.length<=a+1&&e.getPacket().length<xtt;){let[f,d]=Ttt({start:s,end:l,bits:u,label:h},i,a);if(n.push(f),f.end+1===i*a&&(e.pushWord(n),n=[],i++),!d)break;({start:s,end:l,bits:u,label:h}=d);}}e.pushWord(n);},"populate"),Ttt=o((t,e,r)=>{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];let n=e*r-1,i=e*r;return[{start:t.start,end:n,label:t.label,bits:n-t.start},{start:i,end:t.end,label:t.label,bits:t.end-i}];},"getNextFittingBlock"),LF={parser:{yy:void 0},parse:o(async t=>{var _LF$parser;let e=await ps("packet",t),r=(_LF$parser=LF.parser)===null||_LF$parser===void 0?void 0:_LF$parser.yy;if(!(r instanceof dy))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");X.debug(e),btt(e,r);},"parse")};});var wtt,ktt,ove,lve=N(()=>{"use strict";zl();yi();wtt=o((t,e,r,n)=>{let i=n.db,a=i.getConfig(),{rowHeight:s,paddingY:l,bitWidth:u,bitsPerRow:h}=a,f=i.getPacket(),d=i.getDiagramTitle(),p=s+l,m=p*(f.length+1)-(d?0:s),g=u*h+2,y=Di(e);y.attr("viewbox",`0 0 ${g} ${m}`),hn(y,m,g,a.useMaxWidth);for(let[v,x]of f.entries())ktt(y,x,v,a);y.append("text").text(d).attr("x",g/2).attr("y",m-p/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle");},"draw"),ktt=o((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:l,showBits:u})=>{let h=t.append("g"),f=r*(n+a)+a;for(let d of e){let p=d.start%l*s+1,m=(d.end-d.start+1)*s-i;if(h.append("rect").attr("x",p).attr("y",f).attr("width",m).attr("height",n).attr("class","packetBlock"),h.append("text").attr("x",p+m/2).attr("y",f+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(d.label),!u)continue;let g=d.end===d.start,y=f-2;h.append("text").attr("x",p+(g?m/2:0)).attr("y",y).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",g?"middle":"start").text(d.start),g||h.append("text").attr("x",p+m).attr("y",y).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(d.end);}},"drawWord"),ove={draw:wtt};});var Ett,cve,uve=N(()=>{"use strict";nr();Ett={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},cve=o(({packet:t}={})=>{let e=Fn(Ett,t);return`
	.packetByte {
		font-size: ${e.byteFontSize};
	}
	.packetByte.start {
		fill: ${e.startByteColor};
	}
	.packetByte.end {
		fill: ${e.endByteColor};
	}
	.packetLabel {
		fill: ${e.labelColor};
		font-size: ${e.labelFontSize};
	}
	.packetTitle {
		fill: ${e.titleColor};
		font-size: ${e.titleFontSize};
	}
	.packetBlock {
		stroke: ${e.blockStrokeColor};
		stroke-width: ${e.blockStrokeWidth};
		fill: ${e.blockFillColor};
	}
	`;},"styles");});var hve={};hr(hve,{diagram:()=>Stt});var Stt,fve=N(()=>{"use strict";DF();sve();lve();uve();Stt={parser:LF,get db(){return new dy();},renderer:ove,styles:cve};});var py,mve,t0,_tt,Dtt,gve,Ltt,Rtt,Ntt,Mtt,Itt,Ott,Ptt,r0,RF=N(()=>{"use strict";Jn();Ca();nr();ci();py={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},mve={axes:[],curves:[],options:py},t0=structuredClone(mve),_tt=lr.radar,Dtt=o(()=>Fn({..._tt,...Qt().radar}),"getConfig"),gve=o(()=>t0.axes,"getAxes"),Ltt=o(()=>t0.curves,"getCurves"),Rtt=o(()=>t0.options,"getOptions"),Ntt=o(t=>{t0.axes=t.map(e=>{var _e$label2;return{name:e.name,label:(_e$label2=e.label)!==null&&_e$label2!==void 0?_e$label2:e.name};});},"setAxes"),Mtt=o(t=>{t0.curves=t.map(e=>{var _e$label3;return{name:e.name,label:(_e$label3=e.label)!==null&&_e$label3!==void 0?_e$label3:e.name,entries:Itt(e.entries)};});},"setCurves"),Itt=o(t=>{if(t[0].axis==null)return t.map(r=>r.value);let e=gve();if(e.length===0)throw new Error("Axes must be populated before curves for reference entries");return e.map(r=>{let n=t.find(i=>{var _i$axis;return((_i$axis=i.axis)===null||_i$axis===void 0?void 0:_i$axis.$refText)===r.name;});if(n===void 0)throw new Error("Missing entry for axis "+r.label);return n.value;});},"computeCurveEntries"),Ott=o(t=>{var _e$showLegend$value,_e$showLegend,_e$ticks$value,_e$ticks,_e$max$value,_e$max,_e$min$value,_e$min,_e$graticule$value,_e$graticule;let e=t.reduce((r,n)=>(r[n.name]=n,r),{});t0.options={showLegend:(_e$showLegend$value=(_e$showLegend=e.showLegend)===null||_e$showLegend===void 0?void 0:_e$showLegend.value)!==null&&_e$showLegend$value!==void 0?_e$showLegend$value:py.showLegend,ticks:(_e$ticks$value=(_e$ticks=e.ticks)===null||_e$ticks===void 0?void 0:_e$ticks.value)!==null&&_e$ticks$value!==void 0?_e$ticks$value:py.ticks,max:(_e$max$value=(_e$max=e.max)===null||_e$max===void 0?void 0:_e$max.value)!==null&&_e$max$value!==void 0?_e$max$value:py.max,min:(_e$min$value=(_e$min=e.min)===null||_e$min===void 0?void 0:_e$min.value)!==null&&_e$min$value!==void 0?_e$min$value:py.min,graticule:(_e$graticule$value=(_e$graticule=e.graticule)===null||_e$graticule===void 0?void 0:_e$graticule.value)!==null&&_e$graticule$value!==void 0?_e$graticule$value:py.graticule};},"setOptions"),Ptt=o(()=>{wr(),t0=structuredClone(mve);},"clear"),r0={getAxes:gve,getCurves:Ltt,getOptions:Rtt,setAxes:Ntt,setCurves:Mtt,setOptions:Ott,getConfig:Dtt,clear:Ptt,setAccTitle:Cr,getAccTitle:_r,setDiagramTitle:Ir,getDiagramTitle:Rr,getAccDescription:Lr,setAccDescription:Dr};});var Btt,yve,vve=N(()=>{"use strict";gf();yt();Dp();RF();Btt=o(t=>{Qo(t,r0);let{axes:e,curves:r,options:n}=t;r0.setAxes(e),r0.setCurves(r),r0.setOptions(n);},"populate"),yve={parse:o(async t=>{let e=await ps("radar",t);X.debug(e),Btt(e);},"parse")};});function Vtt(t,e,r,n,i,a,s){let l=e.length,u=Math.min(s.width,s.height)/2;r.forEach((h,f)=>{if(h.entries.length!==l)return;let d=h.entries.map((p,m)=>{let g=2*Math.PI*m/l-Math.PI/2,y=Utt(p,n,i,u),v=y*Math.cos(g),x=y*Math.sin(g);return{x:v,y:x};});a==="circle"?t.append("path").attr("d",Htt(d,s.curveTension)).attr("class",`radarCurve-${f}`):a==="polygon"&&t.append("polygon").attr("points",d.map(p=>`${p.x},${p.y}`).join(" ")).attr("class",`radarCurve-${f}`);});}function Utt(t,e,r,n){let i=Math.min(Math.max(t,e),r);return n*(i-e)/(r-e);}function Htt(t,e){let r=t.length,n=`M${t[0].x},${t[0].y}`;for(let i=0;i<r;i++){let a=t[(i-1+r)%r],s=t[i],l=t[(i+1)%r],u=t[(i+2)%r],h={x:s.x+(l.x-a.x)*e,y:s.y+(l.y-a.y)*e},f={x:l.x-(u.x-s.x)*e,y:l.y-(u.y-s.y)*e};n+=` C${h.x},${h.y} ${f.x},${f.y} ${l.x},${l.y}`;}return`${n} Z`;}function Wtt(t,e,r,n){if(!r)return;let i=(n.width/2+n.marginRight)*3/4,a=-(n.height/2+n.marginTop)*3/4,s=20;e.forEach((l,u)=>{let h=t.append("g").attr("transform",`translate(${i}, ${a+u*s})`);h.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${u}`),h.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(l.label);});}var Ftt,$tt,ztt,Gtt,xve,bve=N(()=>{"use strict";zl();Ftt=o((t,e,r,n)=>{var _l$max;let i=n.db,a=i.getAxes(),s=i.getCurves(),l=i.getOptions(),u=i.getConfig(),h=i.getDiagramTitle(),f=Di(e),d=$tt(f,u),p=(_l$max=l.max)!==null&&_l$max!==void 0?_l$max:Math.max(...s.map(y=>Math.max(...y.entries))),m=l.min,g=Math.min(u.width,u.height)/2;ztt(d,a,g,l.ticks,l.graticule),Gtt(d,a,g,u),Vtt(d,a,s,m,p,l.graticule,u),Wtt(d,s,l.showLegend,u),d.append("text").attr("class","radarTitle").text(h).attr("x",0).attr("y",-u.height/2-u.marginTop);},"draw"),$tt=o((t,e)=>{let r=e.width+e.marginLeft+e.marginRight,n=e.height+e.marginTop+e.marginBottom,i={x:e.marginLeft+e.width/2,y:e.marginTop+e.height/2};return t.attr("viewbox",`0 0 ${r} ${n}`).attr("width",r).attr("height",n),t.append("g").attr("transform",`translate(${i.x}, ${i.y})`);},"drawFrame"),ztt=o((t,e,r,n,i)=>{if(i==="circle")for(let a=0;a<n;a++){let s=r*(a+1)/n;t.append("circle").attr("r",s).attr("class","radarGraticule");}else if(i==="polygon"){let a=e.length;for(let s=0;s<n;s++){let l=r*(s+1)/n,u=e.map((h,f)=>{let d=2*f*Math.PI/a-Math.PI/2,p=l*Math.cos(d),m=l*Math.sin(d);return`${p},${m}`;}).join(" ");t.append("polygon").attr("points",u).attr("class","radarGraticule");}}},"drawGraticule"),Gtt=o((t,e,r,n)=>{let i=e.length;for(let a=0;a<i;a++){let s=e[a].label,l=2*a*Math.PI/i-Math.PI/2;t.append("line").attr("x1",0).attr("y1",0).attr("x2",r*n.axisScaleFactor*Math.cos(l)).attr("y2",r*n.axisScaleFactor*Math.sin(l)).attr("class","radarAxisLine"),t.append("text").text(s).attr("x",r*n.axisLabelFactor*Math.cos(l)).attr("y",r*n.axisLabelFactor*Math.sin(l)).attr("class","radarAxisLabel");}},"drawAxes");o(Vtt,"drawCurves");o(Utt,"relativeRadius");o(Htt,"closedRoundCurve");o(Wtt,"drawLegend");xve={draw:Ftt};});var qtt,Ytt,Tve,wve=N(()=>{"use strict";nr();Ny();Jn();qtt=o((t,e)=>{let r="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++){let i=t[`cScale${n}`];r+=`
		.radarCurve-${n} {
			color: ${i};
			fill: ${i};
			fill-opacity: ${e.curveOpacity};
			stroke: ${i};
			stroke-width: ${e.curveStrokeWidth};
		}
		.radarLegendBox-${n} {
			fill: ${i};
			fill-opacity: ${e.curveOpacity};
			stroke: ${i};
		}
		`;}return r;},"genIndexStyles"),Ytt=o(t=>{let e=ch(),r=Qt(),n=Fn(e,r.themeVariables),i=Fn(n.radar,t);return{themeVariables:n,radarOptions:i};},"buildRadarStyleOptions"),Tve=o(({radar:t}={})=>{let{themeVariables:e,radarOptions:r}=Ytt(t);return`
	.radarTitle {
		font-size: ${e.fontSize};
		color: ${e.titleColor};
		dominant-baseline: hanging;
		text-anchor: middle;
	}
	.radarAxisLine {
		stroke: ${r.axisColor};
		stroke-width: ${r.axisStrokeWidth};
	}
	.radarAxisLabel {
		dominant-baseline: middle;
		text-anchor: middle;
		font-size: ${r.axisLabelFontSize}px;
		color: ${r.axisColor};
	}
	.radarGraticule {
		fill: ${r.graticuleColor};
		fill-opacity: ${r.graticuleOpacity};
		stroke: ${r.graticuleColor};
		stroke-width: ${r.graticuleStrokeWidth};
	}
	.radarLegendText {
		text-anchor: start;
		font-size: ${r.legendFontSize}px;
		dominant-baseline: hanging;
	}
	${qtt(e,r)}
	`;},"styles");});var kve={};hr(kve,{diagram:()=>Xtt});var Xtt,Eve=N(()=>{"use strict";RF();vve();bve();wve();Xtt={parser:yve,db:r0,renderer:xve,styles:Tve};});var NF,Ave,_ve=N(()=>{"use strict";NF=function(){var t=o(function(T,C,w,E){for(w=w||{},E=T.length;E--;w[T[E]]=C);return w;},"o"),e=[1,15],r=[1,7],n=[1,13],i=[1,14],a=[1,19],s=[1,16],l=[1,17],u=[1,18],h=[8,30],f=[8,10,21,28,29,30,31,39,43,46],d=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],g=[8,10,15,16,21,27,28,29,30,31,39,43,46],y=[1,49],v={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:o(function(C,w,E,_,A,D,O){var R=D.length-1;switch(A){case 4:_.getLogger().debug("Rule: separator (NL) ");break;case 5:_.getLogger().debug("Rule: separator (Space) ");break;case 6:_.getLogger().debug("Rule: separator (EOF) ");break;case 7:_.getLogger().debug("Rule: hierarchy: ",D[R-1]),_.setHierarchy(D[R-1]);break;case 8:_.getLogger().debug("Stop NL ");break;case 9:_.getLogger().debug("Stop EOF ");break;case 10:_.getLogger().debug("Stop NL2 ");break;case 11:_.getLogger().debug("Stop EOF2 ");break;case 12:_.getLogger().debug("Rule: statement: ",D[R]),typeof D[R].length=="number"?this.$=D[R]:this.$=[D[R]];break;case 13:_.getLogger().debug("Rule: statement #2: ",D[R-1]),this.$=[D[R-1]].concat(D[R]);break;case 14:_.getLogger().debug("Rule: link: ",D[R],C),this.$={edgeTypeStr:D[R],label:""};break;case 15:_.getLogger().debug("Rule: LABEL link: ",D[R-3],D[R-1],D[R]),this.$={edgeTypeStr:D[R],label:D[R-1]};break;case 18:let k=parseInt(D[R]),L=_.generateId();this.$={id:L,type:"space",label:"",width:k,children:[]};break;case 23:_.getLogger().debug("Rule: (nodeStatement link node) ",D[R-2],D[R-1],D[R]," typestr: ",D[R-1].edgeTypeStr);let S=_.edgeStrToEdgeData(D[R-1].edgeTypeStr);this.$=[{id:D[R-2].id,label:D[R-2].label,type:D[R-2].type,directions:D[R-2].directions},{id:D[R-2].id+"-"+D[R].id,start:D[R-2].id,end:D[R].id,label:D[R-1].label,type:"edge",directions:D[R].directions,arrowTypeEnd:S,arrowTypeStart:"arrow_open"},{id:D[R].id,label:D[R].label,type:_.typeStr2Type(D[R].typeStr),directions:D[R].directions}];break;case 24:_.getLogger().debug("Rule: nodeStatement (abc88 node size) ",D[R-1],D[R]),this.$={id:D[R-1].id,label:D[R-1].label,type:_.typeStr2Type(D[R-1].typeStr),directions:D[R-1].directions,widthInColumns:parseInt(D[R],10)};break;case 25:_.getLogger().debug("Rule: nodeStatement (node) ",D[R]),this.$={id:D[R].id,label:D[R].label,type:_.typeStr2Type(D[R].typeStr),directions:D[R].directions,widthInColumns:1};break;case 26:_.getLogger().debug("APA123",this?this:"na"),_.getLogger().debug("COLUMNS: ",D[R]),this.$={type:"column-setting",columns:D[R]==="auto"?-1:parseInt(D[R])};break;case 27:_.getLogger().debug("Rule: id-block statement : ",D[R-2],D[R-1]);let I=_.generateId();this.$={...D[R-2],type:"composite",children:D[R-1]};break;case 28:_.getLogger().debug("Rule: blockStatement : ",D[R-2],D[R-1],D[R]);let M=_.generateId();this.$={id:M,type:"composite",label:"",children:D[R-1]};break;case 29:_.getLogger().debug("Rule: node (NODE_ID separator): ",D[R]),this.$={id:D[R]};break;case 30:_.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",D[R-1],D[R]),this.$={id:D[R-1],label:D[R].label,typeStr:D[R].typeStr,directions:D[R].directions};break;case 31:_.getLogger().debug("Rule: dirList: ",D[R]),this.$=[D[R]];break;case 32:_.getLogger().debug("Rule: dirList: ",D[R-1],D[R]),this.$=[D[R-1]].concat(D[R]);break;case 33:_.getLogger().debug("Rule: nodeShapeNLabel: ",D[R-2],D[R-1],D[R]),this.$={typeStr:D[R-2]+D[R],label:D[R-1]};break;case 34:_.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",D[R-3],D[R-2]," #3:",D[R-1],D[R]),this.$={typeStr:D[R-3]+D[R],label:D[R-2],directions:D[R-1]};break;case 35:case 36:this.$={type:"classDef",id:D[R-1].trim(),css:D[R].trim()};break;case 37:this.$={type:"applyClass",id:D[R-1].trim(),styleClass:D[R].trim()};break;case 38:this.$={type:"applyStyles",id:D[R-1].trim(),stylesStr:D[R].trim()};break;}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:s,43:l,46:u},{8:[1,20]},t(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:n,29:i,31:a,39:s,43:l,46:u}),t(f,[2,16],{14:22,15:d,16:p}),t(f,[2,17]),t(f,[2,18]),t(f,[2,19]),t(f,[2,20]),t(f,[2,21]),t(f,[2,22]),t(m,[2,25],{27:[1,25]}),t(f,[2,26]),{19:26,26:12,31:a},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:s,43:l,46:u},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(g,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(h,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},t(m,[2,24]),{10:e,11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:s,43:l,46:u},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(g,[2,30]),{18:[1,43]},{18:[1,44]},t(m,[2,23]),{18:[1,45]},{30:[1,46]},t(f,[2,28]),t(f,[2,35]),t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),{36:[1,47]},{33:48,34:y},{15:[1,50]},t(f,[2,27]),t(g,[2,33]),{38:[1,51]},{33:52,34:y,38:[2,31]},{31:[2,15]},t(g,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:o(function(C,w){if(w.recoverable)this.trace(C);else{var E=new Error(C);throw E.hash=w,E;}},"parseError"),parse:o(function(C){var w=this,E=[0],_=[],A=[null],D=[],O=this.table,R="",k=0,L=0,S=0,I=2,M=1,P=D.slice.call(arguments,1),B=Object.create(this.lexer),F={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(F.yy[z]=this.yy[z]);B.setInput(C,F.yy),F.yy.lexer=B,F.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var $=B.yylloc;D.push($);var U=B.options&&B.options.ranges;typeof F.yy.parseError=="function"?this.parseError=F.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function K(se){E.length=E.length-2*se,A.length=A.length-se,D.length=D.length-se;}o(K,"popStack");function ee(){var se;return se=_.pop()||B.lex()||M,typeof se!="number"&&(se instanceof Array&&(_=se,se=_.pop()),se=w.symbols_[se]||se),se;}o(ee,"lex");for(var Y,ce,Z,ue,Q,j,ne={},te,he,le,J;;){if(Z=E[E.length-1],this.defaultActions[Z]?ue=this.defaultActions[Z]:((Y===null||typeof Y>"u")&&(Y=ee()),ue=O[Z]&&O[Z][Y]),typeof ue>"u"||!ue.length||!ue[0]){var Se="";J=[];for(te in O[Z])this.terminals_[te]&&te>I&&J.push("'"+this.terminals_[te]+"'");B.showPosition?Se="Parse error on line "+(k+1)+`:
`+B.showPosition()+`
Expecting `+J.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":Se="Parse error on line "+(k+1)+": Unexpected "+(Y==M?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(Se,{text:B.match,token:this.terminals_[Y]||Y,line:B.yylineno,loc:$,expected:J});}if(ue[0]instanceof Array&&ue.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+Y);switch(ue[0]){case 1:E.push(Y),A.push(B.yytext),D.push(B.yylloc),E.push(ue[1]),Y=null,ce?(Y=ce,ce=null):(L=B.yyleng,R=B.yytext,k=B.yylineno,$=B.yylloc,S>0&&S--);break;case 2:if(he=this.productions_[ue[1]][1],ne.$=A[A.length-he],ne._$={first_line:D[D.length-(he||1)].first_line,last_line:D[D.length-1].last_line,first_column:D[D.length-(he||1)].first_column,last_column:D[D.length-1].last_column},U&&(ne._$.range=[D[D.length-(he||1)].range[0],D[D.length-1].range[1]]),j=this.performAction.apply(ne,[R,L,k,F.yy,ue[1],A,D].concat(P)),typeof j<"u")return j;he&&(E=E.slice(0,-1*he*2),A=A.slice(0,-1*he),D=D.slice(0,-1*he)),E.push(this.productions_[ue[1]][0]),A.push(ne.$),D.push(ne._$),le=O[E[E.length-2]][E[E.length-1]],E.push(le);break;case 3:return!0;}}return!0;},"parse")},x=function(){var T={EOF:1,parseError:o(function(w,E){if(this.yy.parser)this.yy.parser.parseError(w,E);else throw new Error(w);},"parseError"),setInput:o(function(C,w){return this.yy=w||this.yy||{},this._input=C,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},"setInput"),input:o(function(){var C=this._input[0];this.yytext+=C,this.yyleng++,this.offset++,this.match+=C,this.matched+=C;var w=C.match(/(?:\r\n?|\n).*/g);return w?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),C;},"input"),unput:o(function(C){var w=C.length,E=C.split(/(?:\r\n?|\n)/g);this._input=C+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-w),this.offset-=w;var _=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===_.length?this.yylloc.first_column:0)+_[_.length-E.length].length-E[0].length:this.yylloc.first_column-w},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-w]),this.yyleng=this.yytext.length,this;},"unput"),more:o(function(){return this._more=!0,this;},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this;},"reject"),less:o(function(C){this.unput(this.match.slice(C));},"less"),pastInput:o(function(){var C=this.matched.substr(0,this.matched.length-this.match.length);return(C.length>20?"...":"")+C.substr(-20).replace(/\n/g,"");},"pastInput"),upcomingInput:o(function(){var C=this.match;return C.length<20&&(C+=this._input.substr(0,20-C.length)),(C.substr(0,20)+(C.length>20?"...":"")).replace(/\n/g,"");},"upcomingInput"),showPosition:o(function(){var C=this.pastInput(),w=new Array(C.length+1).join("-");return C+this.upcomingInput()+`
`+w+"^";},"showPosition"),test_match:o(function(C,w){var E,_,A;if(this.options.backtrack_lexer&&(A={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(A.yylloc.range=this.yylloc.range.slice(0))),_=C[0].match(/(?:\r\n?|\n).*/g),_&&(this.yylineno+=_.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+C[0].length},this.yytext+=C[0],this.match+=C[0],this.matches=C,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(C[0].length),this.matched+=C[0],E=this.performAction.call(this,this.yy,this,w,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var D in A)this[D]=A[D];return!1;}return!1;},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var C,w,E,_;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),D=0;D<A.length;D++)if(E=this._input.match(this.rules[A[D]]),E&&(!w||E[0].length>w[0].length)){if(w=E,_=D,this.options.backtrack_lexer){if(C=this.test_match(E,A[D]),C!==!1)return C;if(this._backtrack){w=!1;continue;}else return!1;}else if(!this.options.flex)break;}return w?(C=this.test_match(w,A[_]),C!==!1?C:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno});},"next"),lex:o(function(){var w=this.next();return w||this.lex();},"lex"),begin:o(function(w){this.conditionStack.push(w);},"begin"),popState:o(function(){var w=this.conditionStack.length-1;return w>0?this.conditionStack.pop():this.conditionStack[0];},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules;},"_currentRules"),topState:o(function(w){return w=this.conditionStack.length-1-Math.abs(w||0),w>=0?this.conditionStack[w]:"INITIAL";},"topState"),pushState:o(function(w){this.begin(w);},"pushState"),stateStackSize:o(function(){return this.conditionStack.length;},"stateStackSize"),options:{},performAction:o(function(w,E,_,A){var D=A;switch(_){case 0:return w.getLogger().debug("Found block-beta"),10;break;case 1:return w.getLogger().debug("Found id-block"),29;break;case 2:return w.getLogger().debug("Found block"),10;break;case 3:w.getLogger().debug(".",E.yytext);break;case 4:w.getLogger().debug("_",E.yytext);break;case 5:return 5;case 6:return E.yytext=-1,28;break;case 7:return E.yytext=E.yytext.replace(/columns\s+/,""),w.getLogger().debug("COLUMNS (LEX)",E.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:w.getLogger().debug("LEX: POPPING STR:",E.yytext),this.popState();break;case 13:return w.getLogger().debug("LEX: STR end:",E.yytext),"STR";break;case 14:return E.yytext=E.yytext.replace(/space\:/,""),w.getLogger().debug("SPACE NUM (LEX)",E.yytext),21;break;case 15:return E.yytext="1",w.getLogger().debug("COLUMNS (LEX)",E.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),w.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),w.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),w.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),w.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),w.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),w.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),w.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),w.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),w.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),w.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),w.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),w.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return w.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return w.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return w.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return w.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return w.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return w.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return w.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),w.getLogger().debug("LEX ARR START"),37;break;case 74:return w.getLogger().debug("Lex: NODE_ID",E.yytext),31;break;case 75:return w.getLogger().debug("Lex: EOF",E.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:w.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:w.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return w.getLogger().debug("LEX: NODE_DESCR:",E.yytext),"NODE_DESCR";break;case 83:w.getLogger().debug("LEX POPPING"),this.popState();break;case 84:w.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return E.yytext=E.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (right): dir:",E.yytext),"DIR";break;case 86:return E.yytext=E.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (left):",E.yytext),"DIR";break;case 87:return E.yytext=E.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (x):",E.yytext),"DIR";break;case 88:return E.yytext=E.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (y):",E.yytext),"DIR";break;case 89:return E.yytext=E.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (up):",E.yytext),"DIR";break;case 90:return E.yytext=E.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (down):",E.yytext),"DIR";break;case 91:return E.yytext="]>",w.getLogger().debug("Lex (ARROW_DIR end):",E.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return w.getLogger().debug("Lex: LINK","#"+E.yytext+"#"),15;break;case 93:return w.getLogger().debug("Lex: LINK",E.yytext),15;break;case 94:return w.getLogger().debug("Lex: LINK",E.yytext),15;break;case 95:return w.getLogger().debug("Lex: LINK",E.yytext),15;break;case 96:return w.getLogger().debug("Lex: START_LINK",E.yytext),this.pushState("LLABEL"),16;break;case 97:return w.getLogger().debug("Lex: START_LINK",E.yytext),this.pushState("LLABEL"),16;break;case 98:return w.getLogger().debug("Lex: START_LINK",E.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return w.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),w.getLogger().debug("Lex: LINK","#"+E.yytext+"#"),15;break;case 102:return this.popState(),w.getLogger().debug("Lex: LINK",E.yytext),15;break;case 103:return this.popState(),w.getLogger().debug("Lex: LINK",E.yytext),15;break;case 104:return w.getLogger().debug("Lex: COLON",E.yytext),E.yytext=E.yytext.slice(1),27;break;}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return T;}();v.lexer=x;function b(){this.yy={};}return o(b,"Parser"),b.prototype=v,v.Parser=b,new b();}();NF.parser=NF;Ave=NF;});function irt(t){switch(X.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return X.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na";}}function art(t){switch(X.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal";}}function srt(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return"";}}var Wl,IF,MF,Dve,Lve,Qtt,Nve,Ztt,yC,Jtt,ert,trt,rrt,Mve,OF,A4,nrt,Rve,ort,lrt,crt,urt,hrt,frt,drt,prt,mrt,grt,yrt,Ive,Ove=N(()=>{"use strict";KL();Jn();qt();yt();dr();ci();Wl=new Map(),IF=[],MF=new Map(),Dve="color",Lve="fill",Qtt="bgFill",Nve=",",Ztt=ge(),yC=new Map(),Jtt=o(t=>Ze.sanitizeText(t,Ztt),"sanitizeText"),ert=o(function(t,e=""){let r=yC.get(t);r||(r={id:t,styles:[],textStyles:[]},yC.set(t,r)),e===null||e===void 0?void 0:e.split(Nve).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Dve).exec(n)){let s=i.replace(Lve,Qtt).replace(Dve,Lve);r.textStyles.push(s);}r.styles.push(i);});},"addStyleClass"),trt=o(function(t,e=""){let r=Wl.get(t);e!=null&&(r.styles=e.split(Nve));},"addStyle2Node"),rrt=o(function(t,e){t.split(",").forEach(function(r){let n=Wl.get(r);if(n===void 0){let i=r.trim();n={id:i,type:"na",children:[]},Wl.set(i,n);}n.classes||(n.classes=[]),n.classes.push(e);});},"setCssClass"),Mve=o((t,e)=>{var _r$find$columns,_r$find;let r=t.flat(),n=[],a=(_r$find$columns=(_r$find=r.find(s=>(s===null||s===void 0?void 0:s.type)==="column-setting"))===null||_r$find===void 0?void 0:_r$find.columns)!==null&&_r$find$columns!==void 0?_r$find$columns:-1;for(let s of r){var _s$columns;if(typeof a=="number"&&a>0&&s.type!=="column-setting"&&typeof s.widthInColumns=="number"&&s.widthInColumns>a&&X.warn(`Block ${s.id} width ${s.widthInColumns} exceeds configured column width ${a}`),s.label&&(s.label=Jtt(s.label)),s.type==="classDef"){ert(s.id,s.css);continue;}if(s.type==="applyClass"){var _s$styleClass;rrt(s.id,(_s$styleClass=s===null||s===void 0?void 0:s.styleClass)!==null&&_s$styleClass!==void 0?_s$styleClass:"");continue;}if(s.type==="applyStyles"){(s===null||s===void 0?void 0:s.stylesStr)&&trt(s.id,s===null||s===void 0?void 0:s.stylesStr);continue;}if(s.type==="column-setting")e.columns=(_s$columns=s.columns)!==null&&_s$columns!==void 0?_s$columns:-1;else if(s.type==="edge"){var _MF$get;let l=((_MF$get=MF.get(s.id))!==null&&_MF$get!==void 0?_MF$get:0)+1;MF.set(s.id,l),s.id=l+"-"+s.id,IF.push(s);}else{s.label||(s.type==="composite"?s.label="":s.label=s.id);let l=Wl.get(s.id);if(l===void 0?Wl.set(s.id,s):(s.type!=="na"&&(l.type=s.type),s.label!==s.id&&(l.label=s.label)),s.children&&Mve(s.children,s),s.type==="space"){var _s$width;let u=(_s$width=s.width)!==null&&_s$width!==void 0?_s$width:1;for(let h=0;h<u;h++){let f=nn(s);f.id=f.id+"-"+h,Wl.set(f.id,f),n.push(f);}}else l===void 0&&n.push(s);}}e.children=n;},"populateBlockDatabase"),OF=[],A4={id:"root",type:"composite",children:[],columns:-1},nrt=o(()=>{X.debug("Clear called"),wr(),A4={id:"root",type:"composite",children:[],columns:-1},Wl=new Map([["root",A4]]),OF=[],yC=new Map(),IF=[],MF=new Map();},"clear");o(irt,"typeStr2Type");o(art,"edgeTypeStr2Type");o(srt,"edgeStrToEdgeData");Rve=0,ort=o(()=>(Rve++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Rve),"generateId"),lrt=o(t=>{A4.children=t,Mve(t,A4),OF=A4.children;},"setHierarchy"),crt=o(t=>{let e=Wl.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1;},"getColumns"),urt=o(()=>[...Wl.values()],"getBlocksFlat"),hrt=o(()=>OF||[],"getBlocks"),frt=o(()=>IF,"getEdges"),drt=o(t=>Wl.get(t),"getBlock"),prt=o(t=>{Wl.set(t.id,t);},"setBlock"),mrt=o(()=>X,"getLogger"),grt=o(function(){return yC;},"getClasses"),yrt={getConfig:o(()=>Qt().block,"getConfig"),typeStr2Type:irt,edgeTypeStr2Type:art,edgeStrToEdgeData:srt,getLogger:mrt,getBlocksFlat:urt,getBlocks:hrt,getEdges:frt,setHierarchy:lrt,getBlock:drt,setBlock:prt,getColumns:crt,getClasses:grt,clear:nrt,generateId:ort},Ive=yrt;});var vC,vrt,Pve,Bve=N(()=>{"use strict";Xs();Vm();vC=o((t,e)=>{let r=Kf,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return Ya(n,i,a,e);},"fade"),vrt=o(t=>`.label {
    font-family: ${t.fontFamily};
    color: ${t.nodeTextColor||t.textColor};
  }
  .cluster-label text {
    fill: ${t.titleColor};
  }
  .cluster-label span,p {
    color: ${t.titleColor};
  }



  .label text,span,p {
    fill: ${t.nodeTextColor||t.textColor};
    color: ${t.nodeTextColor||t.textColor};
  }

  .node rect,
  .node circle,
  .node ellipse,
  .node polygon,
  .node path {
    fill: ${t.mainBkg};
    stroke: ${t.nodeBorder};
    stroke-width: 1px;
  }
  .flowchart-label text {
    text-anchor: middle;
  }
  // .flowchart-label .text-outer-tspan {
  //   text-anchor: middle;
  // }
  // .flowchart-label .text-inner-tspan {
  //   text-anchor: start;
  // }

  .node .label {
    text-align: center;
  }
  .node.clickable {
    cursor: pointer;
  }

  .arrowheadPath {
    fill: ${t.arrowheadColor};
  }

  .edgePath .path {
    stroke: ${t.lineColor};
    stroke-width: 2.0px;
  }

  .flowchart-link {
    stroke: ${t.lineColor};
    fill: none;
  }

  .edgeLabel {
    background-color: ${t.edgeLabelBackground};
    rect {
      opacity: 0.5;
      background-color: ${t.edgeLabelBackground};
      fill: ${t.edgeLabelBackground};
    }
    text-align: center;
  }

  /* For html labels only */
  .labelBkg {
    background-color: ${vC(t.edgeLabelBackground,.5)};
    // background-color:
  }

  .node .cluster {
    // fill: ${vC(t.mainBkg,.5)};
    fill: ${vC(t.clusterBkg,.5)};
    stroke: ${vC(t.clusterBorder,.2)};
    box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
    stroke-width: 1px;
  }

  .cluster text {
    fill: ${t.titleColor};
  }

  .cluster span,p {
    color: ${t.titleColor};
  }
  /* .cluster div {
    color: ${t.titleColor};
  } */

  div.mermaidTooltip {
    position: absolute;
    text-align: center;
    max-width: 200px;
    padding: 2px;
    font-family: ${t.fontFamily};
    font-size: 12px;
    background: ${t.tertiaryColor};
    border: 1px solid ${t.border2};
    border-radius: 2px;
    pointer-events: none;
    z-index: 100;
  }

  .flowchartTitleText {
    text-anchor: middle;
    font-size: 18px;
    fill: ${t.textColor};
  }
  ${Lc()}
`,"getStyles"),Pve=vrt;});var xrt,brt,Trt,wrt,krt,Ert,Srt,Crt,Art,_rt,Drt,Fve,$ve=N(()=>{"use strict";yt();xrt=o((t,e,r,n)=>{e.forEach(i=>{Drt[i](t,r,n);});},"insertMarkers"),brt=o((t,e,r)=>{X.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z");},"extension"),Trt=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z");},"composition"),wrt=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z");},"aggregation"),krt=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");},"dependency"),Ert=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6);},"lollipop"),Srt=o((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0");},"point"),Crt=o((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0");},"circle"),Art=o((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0");},"cross"),_rt=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z");},"barb"),Drt={extension:brt,composition:Trt,aggregation:wrt,dependency:krt,lollipop:Ert,point:Srt,circle:Crt,cross:Art,barb:_rt},Fve=xrt;});function Lrt(t,e){if(t===0||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(t===1)return{px:0,py:e};let r=e%t,n=Math.floor(e/t);return{px:r,py:n};}function PF(t,e,r=0,n=0){var _t$size,_t$size2,_t$children,_t$size7,_t$size8,_t$size9,_t$size0;X.debug("setBlockSizes abc95 (start)",t.id,t===null||t===void 0||(_t$size=t.size)===null||_t$size===void 0?void 0:_t$size.x,"block width =",t===null||t===void 0?void 0:t.size,"siblingWidth",r),(t===null||t===void 0||(_t$size2=t.size)===null||_t$size2===void 0?void 0:_t$size2.width)||(t.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(((_t$children=t.children)===null||_t$children===void 0?void 0:_t$children.length)>0){var _t$columns,_t$size3,_t$size4;for(let m of t.children)PF(m,e);let s=Rrt(t);i=s.width,a=s.height,X.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,a);for(let m of t.children){var _m$widthInColumns,_m$widthInColumns2;m.size&&(X.debug(`abc95 Setting size of children of ${t.id} id=${m.id} ${i} ${a} ${JSON.stringify(m.size)}`),m.size.width=i*((_m$widthInColumns=m.widthInColumns)!==null&&_m$widthInColumns!==void 0?_m$widthInColumns:1)+wi*(((_m$widthInColumns2=m.widthInColumns)!==null&&_m$widthInColumns2!==void 0?_m$widthInColumns2:1)-1),m.size.height=a,m.size.x=0,m.size.y=0,X.debug(`abc95 updating size of ${t.id} children child:${m.id} maxWidth:${i} maxHeight:${a}`));}for(let m of t.children)PF(m,e,i,a);let l=(_t$columns=t.columns)!==null&&_t$columns!==void 0?_t$columns:-1,u=0;for(let m of t.children){var _m$widthInColumns3;u+=(_m$widthInColumns3=m.widthInColumns)!==null&&_m$widthInColumns3!==void 0?_m$widthInColumns3:1;}let h=t.children.length;l>0&&l<u&&(h=l);let f=Math.ceil(u/h),d=h*(i+wi)+wi,p=f*(a+wi)+wi;if(d<r){X.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${n} width ${d}`),d=r,p=n;let m=(r-h*wi-wi)/h,g=(n-f*wi-wi)/f;X.debug("Size indata abc88",t.id,"childWidth",m,"maxWidth",i),X.debug("Size indata abc88",t.id,"childHeight",g,"maxHeight",a),X.debug("Size indata abc88 xSize",h,"padding",wi);for(let y of t.children)y.size&&(y.size.width=m,y.size.height=g,y.size.x=0,y.size.y=0);}if(X.debug(`abc95 (finale calc) ${t.id} xSize ${h} ySize ${f} columns ${l}${t.children.length} width=${Math.max(d,((_t$size3=t.size)===null||_t$size3===void 0?void 0:_t$size3.width)||0)}`),d<((t===null||t===void 0||(_t$size4=t.size)===null||_t$size4===void 0?void 0:_t$size4.width)||0)){var _t$size5;d=(t===null||t===void 0||(_t$size5=t.size)===null||_t$size5===void 0?void 0:_t$size5.width)||0;let m=l>0?Math.min(t.children.length,l):t.children.length;if(m>0){var _t$size6;let g=(d-m*wi-wi)/m;X.debug("abc95 (growing to fit) width",t.id,d,(_t$size6=t.size)===null||_t$size6===void 0?void 0:_t$size6.width,g);for(let y of t.children)y.size&&(y.size.width=g);}}t.size={width:d,height:p,x:0,y:0};}X.debug("setBlockSizes abc94 (done)",t.id,t===null||t===void 0||(_t$size7=t.size)===null||_t$size7===void 0?void 0:_t$size7.x,t===null||t===void 0||(_t$size8=t.size)===null||_t$size8===void 0?void 0:_t$size8.width,t===null||t===void 0||(_t$size9=t.size)===null||_t$size9===void 0?void 0:_t$size9.y,t===null||t===void 0||(_t$size0=t.size)===null||_t$size0===void 0?void 0:_t$size0.height);}function zve(t,e){var _t$size1,_t$size10,_t$size11,_t$columns2,_t$size19,_t$size20,_t$size21;X.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t===null||t===void 0||(_t$size1=t.size)===null||_t$size1===void 0?void 0:_t$size1.x} y: ${t===null||t===void 0||(_t$size10=t.size)===null||_t$size10===void 0?void 0:_t$size10.y} width: ${t===null||t===void 0||(_t$size11=t.size)===null||_t$size11===void 0?void 0:_t$size11.width}`);let r=(_t$columns2=t.columns)!==null&&_t$columns2!==void 0?_t$columns2:-1;if(X.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){var _t$children$0$size$wi,_t$children$,_t$size12,_t$size13,_t$size14,_t$size15;let n=(_t$children$0$size$wi=t===null||t===void 0||(_t$children$=t.children[0])===null||_t$children$===void 0||(_t$children$=_t$children$.size)===null||_t$children$===void 0?void 0:_t$children$.width)!==null&&_t$children$0$size$wi!==void 0?_t$children$0$size$wi:0,i=t.children.length*n+(t.children.length-1)*wi;X.debug("widthOfChildren 88",i,"posX");let a=0;X.debug("abc91 block?.size?.x",t.id,t===null||t===void 0||(_t$size12=t.size)===null||_t$size12===void 0?void 0:_t$size12.x);let s=t!==null&&t!==void 0&&(_t$size13=t.size)!==null&&_t$size13!==void 0&&_t$size13.x?(t===null||t===void 0||(_t$size14=t.size)===null||_t$size14===void 0?void 0:_t$size14.x)+(-(t===null||t===void 0||(_t$size15=t.size)===null||_t$size15===void 0?void 0:_t$size15.width)/2||0):-wi,l=0;for(let u of t.children){var _t$size16,_t$size17,_t$size18,_h$size,_h$size2,_u$widthInColumns3;let h=t;if(!u.size)continue;let{width:f,height:d}=u.size,{px:p,py:m}=Lrt(r,a);if(m!=l&&(l=m,s=t!==null&&t!==void 0&&(_t$size16=t.size)!==null&&_t$size16!==void 0&&_t$size16.x?(t===null||t===void 0||(_t$size17=t.size)===null||_t$size17===void 0?void 0:_t$size17.x)+(-(t===null||t===void 0||(_t$size18=t.size)===null||_t$size18===void 0?void 0:_t$size18.width)/2||0):-wi,X.debug("New row in layout for block",t.id," and child ",u.id,l)),X.debug(`abc89 layout blocks (child) id: ${u.id} Pos: ${a} (px, py) ${p},${m} (${h===null||h===void 0||(_h$size=h.size)===null||_h$size===void 0?void 0:_h$size.x},${h===null||h===void 0||(_h$size2=h.size)===null||_h$size2===void 0?void 0:_h$size2.y}) parent: ${h.id} width: ${f}${wi}`),h.size){var _u$widthInColumns,_u$widthInColumns2;let y=f/2;u.size.x=s+wi+y,X.debug(`abc91 layout blocks (calc) px, pyid:${u.id} startingPos=X${s} new startingPosX${u.size.x} ${y} padding=${wi} width=${f} halfWidth=${y} => x:${u.size.x} y:${u.size.y} ${u.widthInColumns} (width * (child?.w || 1)) / 2 ${f*((_u$widthInColumns=u===null||u===void 0?void 0:u.widthInColumns)!==null&&_u$widthInColumns!==void 0?_u$widthInColumns:1)/2}`),s=u.size.x+y,u.size.y=h.size.y-h.size.height/2+m*(d+wi)+d/2+wi,X.debug(`abc88 layout blocks (calc) px, pyid:${u.id}startingPosX${s}${wi}${y}=>x:${u.size.x}y:${u.size.y}${u.widthInColumns}(width * (child?.w || 1)) / 2${f*((_u$widthInColumns2=u===null||u===void 0?void 0:u.widthInColumns)!==null&&_u$widthInColumns2!==void 0?_u$widthInColumns2:1)/2}`);}u.children&&zve(u,e);let g=(_u$widthInColumns3=u===null||u===void 0?void 0:u.widthInColumns)!==null&&_u$widthInColumns3!==void 0?_u$widthInColumns3:1;r>0&&(g=Math.min(g,r-a%r)),a+=g,X.debug("abc88 columnsPos",u,a);}}X.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t===null||t===void 0||(_t$size19=t.size)===null||_t$size19===void 0?void 0:_t$size19.x} y: ${t===null||t===void 0||(_t$size20=t.size)===null||_t$size20===void 0?void 0:_t$size20.y} width: ${t===null||t===void 0||(_t$size21=t.size)===null||_t$size21===void 0?void 0:_t$size21.width}`);}function Gve(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){let{x:a,y:s,width:l,height:u}=t.size;a-l/2<e&&(e=a-l/2),s-u/2<r&&(r=s-u/2),a+l/2>n&&(n=a+l/2),s+u/2>i&&(i=s+u/2);}if(t.children)for(let a of t.children)({minX:e,minY:r,maxX:n,maxY:i}=Gve(a,{minX:e,minY:r,maxX:n,maxY:i}));return{minX:e,minY:r,maxX:n,maxY:i};}function Vve(t){let e=t.getBlock("root");if(!e)return;PF(e,t,0,0),zve(e,t),X.debug("getBlocks",JSON.stringify(e,null,2));let{minX:r,minY:n,maxX:i,maxY:a}=Gve(e),s=a-n,l=i-r;return{x:r,y:n,width:l,height:s};}var wi,Rrt,Uve=N(()=>{"use strict";var _ge$block$padding,_ge7;yt();qt();wi=(_ge$block$padding=(_ge7=ge())===null||_ge7===void 0||(_ge7=_ge7.block)===null||_ge7===void 0?void 0:_ge7.padding)!==null&&_ge$block$padding!==void 0?_ge$block$padding:8;o(Lrt,"calculateBlockPosition");Rrt=o(t=>{let e=0,r=0;for(let n of t.children){var _n$size,_t$widthInColumns;let{width:i,height:a,x:s,y:l}=(_n$size=n.size)!==null&&_n$size!==void 0?_n$size:{width:0,height:0,x:0,y:0};X.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",l,n.type),n.type!=="space"&&(i>e&&(e=i/((_t$widthInColumns=t.widthInColumns)!==null&&_t$widthInColumns!==void 0?_t$widthInColumns:1)),a>r&&(r=a));}return{width:e,height:r};},"getMaxChildSize");o(PF,"setBlockSizes");o(zve,"layoutBlocks");o(Gve,"findBounds");o(Vve,"layout");});function Hve(t,e){e&&t.attr("style",e);}function Nrt(t,e){let r=Ge(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=r.append("xhtml:div"),i=t.label,a=t.isNode?"nodeLabel":"edgeLabel",s=n.append("span");return s.html(ar(i,e)),Hve(s,t.labelStyle),s.attr("class",a),Hve(n,t.labelStyle),n.style("display","inline-block"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node();}var Mrt,xs,xC=N(()=>{"use strict";pr();qt();dr();yt();no();nr();o(Hve,"applyStyle");o(Nrt,"addHtmlLabel");Mrt=o(async(t,e,r,n)=>{let i=t||"";typeof i=="object"&&(i=i[0]);let a=ge();if(mr(a.flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),X.debug("vertexText"+i);let s=await uL(ta(i)),l={isNode:n,label:s,labelStyle:e.replace("fill:","color:")};return Nrt(l,a);}else{let s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));let l=[];typeof i=="string"?l=i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?l=i:l=[];for(let u of l){let h=document.createElementNS("http://www.w3.org/2000/svg","tspan");h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),h.setAttribute("dy","1em"),h.setAttribute("x","0"),r?h.setAttribute("class","title-row"):h.setAttribute("class","row"),h.textContent=u.trim(),s.appendChild(h);}return s;}},"createLabel"),xs=Mrt;});var qve,Irt,Wve,Yve=N(()=>{"use strict";yt();qve=o((t,e,r,n,i)=>{e.arrowTypeStart&&Wve(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&Wve(t,"end",e.arrowTypeEnd,r,n,i);},"addEdgeMarkers"),Irt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Wve=o((t,e,r,n,i,a)=>{let s=Irt[r];if(!s){X.warn(`Unknown arrow type: ${r}`);return;}let l=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${s}${l})`);},"addEdgeMarker");});function bC(t,e){ge().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px");}var BF,Ha,jve,Kve,Ort,Prt,Xve,Qve,Zve=N(()=>{"use strict";yt();xC();no();pr();qt();nr();dr();ML();L2();Yve();BF={},Ha={},jve=o(async(t,e)=>{let r=ge(),n=mr(r.flowchart.htmlLabels),i=e.labelType==="markdown"?Hn(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):await xs(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let l=i.getBBox();if(n){let h=i.children[0],f=Ge(i);l=h.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height);}s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),BF[e.id]=a,e.width=l.width,e.height=l.height;let u;if(e.startLabelLeft){let h=await xs(e.startLabelLeft,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),Ha[e.id]||(Ha[e.id]={}),Ha[e.id].startLeft=f,bC(u,e.startLabelLeft);}if(e.startLabelRight){let h=await xs(e.startLabelRight,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=f.node().appendChild(h),d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),Ha[e.id]||(Ha[e.id]={}),Ha[e.id].startRight=f,bC(u,e.startLabelRight);}if(e.endLabelLeft){let h=await xs(e.endLabelLeft,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),f.node().appendChild(h),Ha[e.id]||(Ha[e.id]={}),Ha[e.id].endLeft=f,bC(u,e.endLabelLeft);}if(e.endLabelRight){let h=await xs(e.endLabelRight,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),f.node().appendChild(h),Ha[e.id]||(Ha[e.id]={}),Ha[e.id].endRight=f,bC(u,e.endLabelRight);}return i;},"insertEdgeLabel");o(bC,"setTerminalWidth");Kve=o((t,e)=>{X.debug("Moving label abc88 ",t.id,t.label,BF[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=ge(),{subGraphTitleTotalMargin:i}=Mu(n);if(t.label){let a=BF[t.id],s=t.x,l=t.y;if(r){let u=Vt.calcLabelPosition(r);X.debug("Moving label "+t.label+" from (",s,",",l,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(s=u.x,l=u.y);}a.attr("transform",`translate(${s}, ${l+i/2})`);}if(t.startLabelLeft){let a=Ha[t.id].startLeft,s=t.x,l=t.y;if(r){let u=Vt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=u.x,l=u.y;}a.attr("transform",`translate(${s}, ${l})`);}if(t.startLabelRight){let a=Ha[t.id].startRight,s=t.x,l=t.y;if(r){let u=Vt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=u.x,l=u.y;}a.attr("transform",`translate(${s}, ${l})`);}if(t.endLabelLeft){let a=Ha[t.id].endLeft,s=t.x,l=t.y;if(r){let u=Vt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=u.x,l=u.y;}a.attr("transform",`translate(${s}, ${l})`);}if(t.endLabelRight){let a=Ha[t.id].endRight,s=t.x,l=t.y;if(r){let u=Vt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=u.x,l=u.y;}a.attr("transform",`translate(${s}, ${l})`);}},"positionEdgeLabel"),Ort=o((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,l=t.height/2;return i>=s||a>=l;},"outsideNode"),Prt=o((t,e,r)=>{X.debug(`intersection calc abc89:
  outsidePoint: ${JSON.stringify(e)}
  insidePoint : ${JSON.stringify(r)}
  node        : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2,l=r.x<e.x?s-a:s+a,u=t.height/2,h=Math.abs(e.y-r.y),f=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*s>Math.abs(n-e.x)*u){let d=r.y<e.y?e.y-u-i:i-u-e.y;l=f*d/h;let p={x:r.x<e.x?r.x+l:r.x-f+l,y:r.y<e.y?r.y+h-d:r.y-h+d};return l===0&&(p.x=e.x,p.y=e.y),f===0&&(p.x=e.x),h===0&&(p.y=e.y),X.debug(`abc89 topp/bott calc, Q ${h}, q ${d}, R ${f}, r ${l}`,p),p;}else{r.x<e.x?l=e.x-s-n:l=n-s-e.x;let d=h*l/f,p=r.x<e.x?r.x+f-l:r.x-f+l,m=r.y<e.y?r.y+d:r.y-d;return X.debug(`sides calc abc89, Q ${h}, q ${d}, R ${f}, r ${l}`,{_x:p,_y:m}),l===0&&(p=e.x,m=e.y),f===0&&(p=e.x),h===0&&(m=e.y),{x:p,y:m};}},"intersection"),Xve=o((t,e)=>{X.debug("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(!Ort(e,a)&&!i){let s=Prt(e,n,a),l=!1;r.forEach(u=>{l=l||u.x===s.x&&u.y===s.y;}),r.some(u=>u.x===s.x&&u.y===s.y)||r.push(s),i=!0;}else n=a,i||r.push(a);}),r;},"cutPathAtIntersect"),Qve=o(function(t,e,r,n,i,a,s){let l=r.points;X.debug("abc88 InsertEdge: edge=",r,"e=",e);let u=!1,h=a.node(e.v);var f=a.node(e.w);f!==null&&f!==void 0&&f.intersect&&h!==null&&h!==void 0&&h.intersect&&(l=l.slice(1,r.points.length-1),l.unshift(h.intersect(l[0])),l.push(f.intersect(l[l.length-1]))),r.toCluster&&(X.debug("to cluster abc88",n[r.toCluster]),l=Xve(r.points,n[r.toCluster].node),u=!0),r.fromCluster&&(X.debug("from cluster abc88",n[r.fromCluster]),l=Xve(l.reverse(),n[r.fromCluster].node).reverse(),u=!0);let d=l.filter(C=>!Number.isNaN(C.y)),p=Lo;r.curve&&(i==="graph"||i==="flowchart")&&(p=r.curve);let{x:m,y:g}=aw(r),y=El().x(m).y(g).curve(p),v;switch(r.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-thick";break;default:v="";}switch(r.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break;}let x=t.append("path").attr("d",y(d)).attr("id",r.id).attr("class"," "+v+(r.classes?" "+r.classes:"")).attr("style",r.style),b="";(ge().flowchart.arrowMarkerAbsolute||ge().state.arrowMarkerAbsolute)&&(b=fu(!0)),qve(x,r,b,s,i);let T={};return u&&(T.updatedPath=l),T.originalPath=r.points,T;},"insertEdge");});var Brt,Jve,e2e=N(()=>{"use strict";Brt=o(t=>{let e=new Set();for(let r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r);break;}return e;},"expandAndDeduplicateDirections"),Jve=o((t,e,r)=>{let n=Brt(t),i=2,a=e.height+2*r.padding,s=a/i,l=e.width+2*s+r.padding,u=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:l/2,y:2*u},{x:l-s,y:0},{x:l,y:0},{x:l,y:-a/3},{x:l+2*u,y:-a/2},{x:l,y:-2*a/3},{x:l,y:-a},{x:l-s,y:-a},{x:l/2,y:-a-2*u},{x:s,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*u,y:-a/2},{x:0,y:-a/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:s,y:-a},{x:l-s,y:-a},{x:l,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:l,y:-s},{x:l,y:-a+s},{x:0,y:-a}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:l,y:0},{x:0,y:-s},{x:0,y:-a+s},{x:l,y:-a}]:n.has("right")&&n.has("left")?[{x:s,y:0},{x:s,y:-u},{x:l-s,y:-u},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+u},{x:s,y:-a+u},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")&&n.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:s,y:-u},{x:s,y:-a+u},{x:0,y:-a+u},{x:l/2,y:-a},{x:l,y:-a+u},{x:l-s,y:-a+u},{x:l-s,y:-u},{x:l,y:-u}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:l,y:-s},{x:0,y:-a}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-a}]:n.has("left")&&n.has("up")?[{x:l,y:0},{x:0,y:-s},{x:l,y:-a}]:n.has("left")&&n.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-a}]:n.has("right")?[{x:s,y:-u},{x:s,y:-u},{x:l-s,y:-u},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+u},{x:s,y:-a+u},{x:s,y:-a+u}]:n.has("left")?[{x:s,y:0},{x:s,y:-u},{x:l-s,y:-u},{x:l-s,y:-a+u},{x:s,y:-a+u},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")?[{x:s,y:-u},{x:s,y:-a+u},{x:0,y:-a+u},{x:l/2,y:-a},{x:l,y:-a+u},{x:l-s,y:-a+u},{x:l-s,y:-u}]:n.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:s,y:-u},{x:s,y:-a+u},{x:l-s,y:-a+u},{x:l-s,y:-u},{x:l,y:-u}]:[{x:0,y:0}];},"getArrowPoints");});function Frt(t,e){return t.intersect(e);}var t2e,r2e=N(()=>{"use strict";o(Frt,"intersectNode");t2e=Frt;});function $rt(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,l=a-n.y,u=Math.sqrt(e*e*l*l+r*r*s*s),h=Math.abs(e*r*s/u);n.x<i&&(h=-h);var f=Math.abs(e*r*l/u);return n.y<a&&(f=-f),{x:i+h,y:a+f};}var TC,FF=N(()=>{"use strict";o($rt,"intersectEllipse");TC=$rt;});function zrt(t,e,r){return TC(t,e,e,r);}var n2e,i2e=N(()=>{"use strict";FF();o(zrt,"intersectCircle");n2e=zrt;});function Grt(t,e,r,n){var i,a,s,l,u,h,f,d,p,m,g,y,v,x,b;if(i=e.y-t.y,s=t.x-e.x,u=e.x*t.y-t.x*e.y,p=i*r.x+s*r.y+u,m=i*n.x+s*n.y+u,!(p!==0&&m!==0&&a2e(p,m))&&(a=n.y-r.y,l=r.x-n.x,h=n.x*r.y-r.x*n.y,f=a*t.x+l*t.y+h,d=a*e.x+l*e.y+h,!(f!==0&&d!==0&&a2e(f,d))&&(g=i*l-a*s,g!==0)))return y=Math.abs(g/2),v=s*h-l*u,x=v<0?(v-y)/g:(v+y)/g,v=a*u-i*h,b=v<0?(v-y)/g:(v+y)/g,{x,y:b};}function a2e(t,e){return t*e>0;}var s2e,o2e=N(()=>{"use strict";o(Grt,"intersectLine");o(a2e,"sameSign");s2e=Grt;});function Vrt(t,e,r){var n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(g){s=Math.min(s,g.x),l=Math.min(l,g.y);}):(s=Math.min(s,e.x),l=Math.min(l,e.y));for(var u=n-t.width/2-s,h=i-t.height/2-l,f=0;f<e.length;f++){var d=e[f],p=e[f<e.length-1?f+1:0],m=s2e(t,r,{x:u+d.x,y:h+d.y},{x:u+p.x,y:h+p.y});m&&a.push(m);}return a.length?(a.length>1&&a.sort(function(g,y){var v=g.x-r.x,x=g.y-r.y,b=Math.sqrt(v*v+x*x),T=y.x-r.x,C=y.y-r.y,w=Math.sqrt(T*T+C*C);return b<w?-1:b===w?0:1;}),a[0]):t;}var l2e,c2e=N(()=>{"use strict";o2e();l2e=Vrt;o(Vrt,"intersectPolygon");});var Urt,u2e,h2e=N(()=>{"use strict";Urt=o((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,l=t.height/2,u,h;return Math.abs(a)*s>Math.abs(i)*l?(a<0&&(l=-l),u=a===0?0:l*i/a,h=l):(i<0&&(s=-s),u=s,h=i===0?0:s*a/i),{x:r+u,y:n+h};},"intersectRect"),u2e=Urt;});var Mn,$F=N(()=>{"use strict";r2e();i2e();FF();c2e();h2e();Mn={node:t2e,circle:n2e,ellipse:TC,polygon:l2e,rect:u2e};});function ql(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y;}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")");}var Ri,Qn,zF=N(()=>{"use strict";xC();no();qt();pr();dr();nr();Ri=o(async(t,e,r,n)=>{let i=ge(),a,s=e.useHtmlLabels||mr(i.flowchart.htmlLabels);r?a=r:a="node default";let l=t.insert("g").attr("class",a).attr("id",e.domId||e.id),u=l.insert("g").attr("class","label").attr("style",e.labelStyle),h;e.labelText===void 0?h="":h=typeof e.labelText=="string"?e.labelText:e.labelText[0];let f=u.node(),d;e.labelType==="markdown"?d=Hn(u,ar(ta(h),i),{useHtmlLabels:s,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):d=f.appendChild(await xs(ar(ta(h),i),e.labelStyle,!1,n));let p=d.getBBox(),m=e.padding/2;if(mr(i.flowchart.htmlLabels)){let g=d.children[0],y=Ge(d),v=g.getElementsByTagName("img");if(v){let x=h.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...v].map(b=>new Promise(T=>{function C(){if(b.style.display="flex",b.style.flexDirection="column",x){let w=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,_=parseInt(w,10)*5+"px";b.style.minWidth=_,b.style.maxWidth=_;}else b.style.width="100%";T(b);}o(C,"setupImage"),setTimeout(()=>{b.complete&&C();}),b.addEventListener("error",C),b.addEventListener("load",C);})));}p=g.getBoundingClientRect(),y.attr("width",p.width),y.attr("height",p.height);}return s?u.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):u.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:l,bbox:p,halfPadding:m,label:u};},"labelHelper"),Qn=o((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height;},"updateNodeBounds");o(ql,"insertPolygonShape");});var Hrt,f2e,d2e=N(()=>{"use strict";zF();yt();qt();$F();Hrt=o(async(t,e)=>{e.useHtmlLabels||ge().flowchart.htmlLabels||(e.centerLabel=!0);let{shapeSvg:n,bbox:i,halfPadding:a}=await Ri(t,e,"node "+e.classes,!0);X.info("Classes = ",e.classes);let s=n.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Qn(e,s),e.intersect=function(l){return Mn.rect(e,l);},n;},"note"),f2e=Hrt;});function GF(t,e,r,n){let i=[],a=o(l=>{i.push(l,0);},"addBorder"),s=o(l=>{i.push(0,l);},"skipBorder");e.includes("t")?(X.debug("add top border"),a(r)):s(r),e.includes("r")?(X.debug("add right border"),a(n)):s(n),e.includes("b")?(X.debug("add bottom border"),a(r)):s(r),e.includes("l")?(X.debug("add left border"),a(n)):s(n),t.attr("stroke-dasharray",i.join(" "));}var p2e,vo,m2e,Wrt,qrt,Yrt,Xrt,jrt,Krt,Qrt,Zrt,Jrt,ent,tnt,rnt,nnt,int,ant,snt,ont,lnt,cnt,g2e,unt,hnt,y2e,wC,VF,v2e,x2e=N(()=>{"use strict";pr();qt();dr();yt();e2e();xC();$F();d2e();zF();p2e=o(t=>t?" "+t:"","formatClass"),vo=o((t,e)=>`${e||"node default"}${p2e(t.classes)} ${p2e(t.class)}`,"getClassesFromNode"),m2e=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ri(t,e,vo(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=i+a,l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];X.info("Question main (Circle)");let u=ql(r,s,s,l);return u.attr("style",e.style),Qn(e,u),e.intersect=function(h){return X.warn("Intersect called"),Mn.polygon(e,l,h);},r;},"question"),Wrt=o((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y;}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(s){return Mn.circle(e,14,s);},r;},"choice"),qrt=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ri(t,e,vo(e,void 0),!0),i=4,a=n.height+e.padding,s=a/i,l=n.width+2*s+e.padding,u=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],h=ql(r,l,a,u);return h.attr("style",e.style),Qn(e,h),e.intersect=function(f){return Mn.polygon(e,u,f);},r;},"hexagon"),Yrt=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ri(t,e,void 0,!0),i=2,a=n.height+2*e.padding,s=a/i,l=n.width+2*s+e.padding,u=Jve(e.directions,n,e),h=ql(r,l,a,u);return h.attr("style",e.style),Qn(e,h),e.intersect=function(f){return Mn.polygon(e,u,f);},r;},"block_arrow"),Xrt=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ri(t,e,vo(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return ql(r,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(u){return Mn.polygon(e,s,u);},r;},"rect_left_inv_arrow"),jrt=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ri(t,e,vo(e),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],l=ql(r,i,a,s);return l.attr("style",e.style),Qn(e,l),e.intersect=function(u){return Mn.polygon(e,s,u);},r;},"lean_right"),Krt=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ri(t,e,vo(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],l=ql(r,i,a,s);return l.attr("style",e.style),Qn(e,l),e.intersect=function(u){return Mn.polygon(e,s,u);},r;},"lean_left"),Qrt=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ri(t,e,vo(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],l=ql(r,i,a,s);return l.attr("style",e.style),Qn(e,l),e.intersect=function(u){return Mn.polygon(e,s,u);},r;},"trapezoid"),Zrt=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ri(t,e,vo(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],l=ql(r,i,a,s);return l.attr("style",e.style),Qn(e,l),e.intersect=function(u){return Mn.polygon(e,s,u);},r;},"inv_trapezoid"),Jrt=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ri(t,e,vo(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],l=ql(r,i,a,s);return l.attr("style",e.style),Qn(e,l),e.intersect=function(u){return Mn.polygon(e,s,u);},r;},"rect_right_inv_arrow"),ent=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ri(t,e,vo(e,void 0),!0),i=n.width+e.padding,a=i/2,s=a/(2.5+i/50),l=n.height+s+e.padding,u="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-l,h=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",u).attr("transform","translate("+-i/2+","+-(l/2+s)+")");return Qn(e,h),e.intersect=function(f){let d=Mn.rect(e,f),p=d.x-e.x;if(a!=0&&(Math.abs(p)<e.width/2||Math.abs(p)==e.width/2&&Math.abs(d.y-e.y)>e.height/2-s)){let m=s*s*(1-p*p/(a*a));m!=0&&(m=Math.sqrt(m)),m=s-m,f.y-e.y>0&&(m=-m),d.y+=m;}return d;},r;},"cylinder"),tnt=o(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Ri(t,e,"node "+e.classes+" "+e.class,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,l=e.positioned?e.height:n.height+e.padding,u=e.positioned?-s/2:-n.width/2-i,h=e.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",u).attr("y",h).attr("width",s).attr("height",l),e.props){let f=new Set(Object.keys(e.props));e.props.borders&&(GF(a,e.props.borders,s,l),f.delete("borders")),f.forEach(d=>{X.warn(`Unknown node property ${d}`);});}return Qn(e,a),e.intersect=function(f){return Mn.rect(e,f);},r;},"rect"),rnt=o(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Ri(t,e,"node "+e.classes,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,l=e.positioned?e.height:n.height+e.padding,u=e.positioned?-s/2:-n.width/2-i,h=e.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",u).attr("y",h).attr("width",s).attr("height",l),e.props){let f=new Set(Object.keys(e.props));e.props.borders&&(GF(a,e.props.borders,s,l),f.delete("borders")),f.forEach(d=>{X.warn(`Unknown node property ${d}`);});}return Qn(e,a),e.intersect=function(f){return Mn.rect(e,f);},r;},"composite"),nnt=o(async(t,e)=>{let{shapeSvg:r}=await Ri(t,e,"label",!0);X.trace("Classes = ",e.class);let n=r.insert("rect",":first-child"),i=0,a=0;if(n.attr("width",i).attr("height",a),r.attr("class","label edgeLabel"),e.props){let s=new Set(Object.keys(e.props));e.props.borders&&(GF(n,e.props.borders,i,a),s.delete("borders")),s.forEach(l=>{X.warn(`Unknown node property ${l}`);});}return Qn(e,n),e.intersect=function(s){return Mn.rect(e,s);},r;},"labelRect");o(GF,"applyNodePropertyBorders");int=o(async(t,e)=>{let r;e.classes?r="node "+e.classes:r="node default";let n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),l=e.labelText.flat?e.labelText.flat():e.labelText,u="";typeof l=="object"?u=l[0]:u=l,X.info("Label text abc79",u,l,typeof l=="object");let h=s.node().appendChild(await xs(u,e.labelStyle,!0,!0)),f={width:0,height:0};if(mr(ge().flowchart.htmlLabels)){let y=h.children[0],v=Ge(h);f=y.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height);}X.info("Text 2",l);let d=l.slice(1,l.length),p=h.getBBox(),m=s.node().appendChild(await xs(d.join?d.join("<br/>"):d,e.labelStyle,!0,!0));if(mr(ge().flowchart.htmlLabels)){let y=m.children[0],v=Ge(m);f=y.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height);}let g=e.padding/2;return Ge(m).attr("transform","translate( "+(f.width>p.width?0:(p.width-f.width)/2)+", "+(p.height+g+5)+")"),Ge(h).attr("transform","translate( "+(f.width<p.width?0:-(p.width-f.width)/2)+", 0)"),f=s.node().getBBox(),s.attr("transform","translate("+-f.width/2+", "+(-f.height/2-g+3)+")"),i.attr("class","outer title-state").attr("x",-f.width/2-g).attr("y",-f.height/2-g).attr("width",f.width+e.padding).attr("height",f.height+e.padding),a.attr("class","divider").attr("x1",-f.width/2-g).attr("x2",f.width/2+g).attr("y1",-f.height/2-g+p.height+g).attr("y2",-f.height/2-g+p.height+g),Qn(e,i),e.intersect=function(y){return Mn.rect(e,y);},n;},"rectWithTitle"),ant=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ri(t,e,vo(e,void 0),!0),i=n.height+e.padding,a=n.width+i/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return Qn(e,s),e.intersect=function(l){return Mn.rect(e,l);},r;},"stadium"),snt=o(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Ri(t,e,vo(e,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),X.info("Circle main"),Qn(e,a),e.intersect=function(s){return X.info("Circle intersect",e,n.width/2+i,s),Mn.circle(e,n.width/2+i,s);},r;},"circle"),ont=o(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Ri(t,e,vo(e,void 0),!0),a=5,s=r.insert("g",":first-child"),l=s.insert("circle"),u=s.insert("circle");return s.attr("class",e.class),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+a).attr("width",n.width+e.padding+a*2).attr("height",n.height+e.padding+a*2),u.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),X.info("DoubleCircle main"),Qn(e,l),e.intersect=function(h){return X.info("DoubleCircle intersect",e,n.width/2+i+a,h),Mn.circle(e,n.width/2+i+a,h);},r;},"doublecircle"),lnt=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ri(t,e,vo(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],l=ql(r,i,a,s);return l.attr("style",e.style),Qn(e,l),e.intersect=function(u){return Mn.polygon(e,s,u);},r;},"subroutine"),cnt=o((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Qn(e,n),e.intersect=function(i){return Mn.circle(e,7,i);},r;},"start"),g2e=o((t,e,r)=>{let n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;r==="LR"&&(i=10,a=70);let s=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return Qn(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(l){return Mn.rect(e,l);},n;},"forkJoin"),unt=o((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Qn(e,i),e.intersect=function(a){return Mn.circle(e,7,a);},r;},"end"),hnt=o(async(t,e)=>{var _e$classData$annotati;let r=e.padding/2,n=4,i=8,a;e.classes?a="node "+e.classes:a="node default";let s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),l=s.insert("rect",":first-child"),u=s.insert("line"),h=s.insert("line"),f=0,d=n,p=s.insert("g").attr("class","label"),m=0,g=(_e$classData$annotati=e.classData.annotations)===null||_e$classData$annotati===void 0?void 0:_e$classData$annotati[0],y=e.classData.annotations[0]?"\xAB"+e.classData.annotations[0]+"\xBB":"",v=p.node().appendChild(await xs(y,e.labelStyle,!0,!0)),x=v.getBBox();if(mr(ge().flowchart.htmlLabels)){let A=v.children[0],D=Ge(v);x=A.getBoundingClientRect(),D.attr("width",x.width),D.attr("height",x.height);}e.classData.annotations[0]&&(d+=x.height+n,f+=x.width);let b=e.classData.label;e.classData.type!==void 0&&e.classData.type!==""&&(ge().flowchart.htmlLabels?b+="&lt;"+e.classData.type+"&gt;":b+="<"+e.classData.type+">");let T=p.node().appendChild(await xs(b,e.labelStyle,!0,!0));Ge(T).attr("class","classTitle");let C=T.getBBox();if(mr(ge().flowchart.htmlLabels)){let A=T.children[0],D=Ge(T);C=A.getBoundingClientRect(),D.attr("width",C.width),D.attr("height",C.height);}d+=C.height+n,C.width>f&&(f=C.width);let w=[];e.classData.members.forEach(async A=>{let D=A.getDisplayDetails(),O=D.displayText;ge().flowchart.htmlLabels&&(O=O.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let R=p.node().appendChild(await xs(O,D.cssStyle?D.cssStyle:e.labelStyle,!0,!0)),k=R.getBBox();if(mr(ge().flowchart.htmlLabels)){let L=R.children[0],S=Ge(R);k=L.getBoundingClientRect(),S.attr("width",k.width),S.attr("height",k.height);}k.width>f&&(f=k.width),d+=k.height+n,w.push(R);}),d+=i;let E=[];if(e.classData.methods.forEach(async A=>{let D=A.getDisplayDetails(),O=D.displayText;ge().flowchart.htmlLabels&&(O=O.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let R=p.node().appendChild(await xs(O,D.cssStyle?D.cssStyle:e.labelStyle,!0,!0)),k=R.getBBox();if(mr(ge().flowchart.htmlLabels)){let L=R.children[0],S=Ge(R);k=L.getBoundingClientRect(),S.attr("width",k.width),S.attr("height",k.height);}k.width>f&&(f=k.width),d+=k.height+n,E.push(R);}),d+=i,g){let A=(f-x.width)/2;Ge(v).attr("transform","translate( "+(-1*f/2+A)+", "+-1*d/2+")"),m=x.height+n;}let _=(f-C.width)/2;return Ge(T).attr("transform","translate( "+(-1*f/2+_)+", "+(-1*d/2+m)+")"),m+=C.height+n,u.attr("class","divider").attr("x1",-f/2-r).attr("x2",f/2+r).attr("y1",-d/2-r+i+m).attr("y2",-d/2-r+i+m),m+=i,w.forEach(A=>{var _D$height;Ge(A).attr("transform","translate( "+-f/2+", "+(-1*d/2+m+i/2)+")");let D=A===null||A===void 0?void 0:A.getBBox();m+=((_D$height=D===null||D===void 0?void 0:D.height)!==null&&_D$height!==void 0?_D$height:0)+n;}),m+=i,h.attr("class","divider").attr("x1",-f/2-r).attr("x2",f/2+r).attr("y1",-d/2-r+i+m).attr("y2",-d/2-r+i+m),m+=i,E.forEach(A=>{var _D$height2;Ge(A).attr("transform","translate( "+-f/2+", "+(-1*d/2+m)+")");let D=A===null||A===void 0?void 0:A.getBBox();m+=((_D$height2=D===null||D===void 0?void 0:D.height)!==null&&_D$height2!==void 0?_D$height2:0)+n;}),l.attr("style",e.style).attr("class","outer title-state").attr("x",-f/2-r).attr("y",-(d/2)-r).attr("width",f+e.padding).attr("height",d+e.padding),Qn(e,l),e.intersect=function(A){return Mn.rect(e,A);},s;},"class_box"),y2e={rhombus:m2e,composite:rnt,question:m2e,rect:tnt,labelRect:nnt,rectWithTitle:int,choice:Wrt,circle:snt,doublecircle:ont,stadium:ant,hexagon:qrt,block_arrow:Yrt,rect_left_inv_arrow:Xrt,lean_right:jrt,lean_left:Krt,trapezoid:Qrt,inv_trapezoid:Zrt,rect_right_inv_arrow:Jrt,cylinder:ent,start:cnt,end:unt,note:f2e,subroutine:lnt,fork:g2e,join:g2e,class_box:hnt},wC={},VF=o(async(t,e,r)=>{let n,i;if(e.link){let a;ge().securityLevel==="sandbox"?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=await y2e[e.shape](n,e,r);}else i=await y2e[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),wC[e.id]=n,e.haveCallback&&wC[e.id].attr("class",wC[e.id].attr("class")+" clickable"),n;},"insertNode"),v2e=o(t=>{let e=wC[t.id];X.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n;},"positionNode");});function b2e(t,e,r=!1){var _n$classes,_n$classes2,_n$styles,_n$size2,_ref3,_Qt;let n=t,i="default";((n===null||n===void 0||(_n$classes=n.classes)===null||_n$classes===void 0?void 0:_n$classes.length)||0)>0&&(i=((_n$classes2=n===null||n===void 0?void 0:n.classes)!==null&&_n$classes2!==void 0?_n$classes2:[]).join(" ")),i=i+" flowchart-label";let a=0,s="",l;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",l=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect";}let u=C9((_n$styles=n===null||n===void 0?void 0:n.styles)!==null&&_n$styles!==void 0?_n$styles:[]),h=n.label,f=(_n$size2=n.size)!==null&&_n$size2!==void 0?_n$size2:{width:0,height:0,x:0,y:0};return{labelStyle:u.labelStyle,shape:s,labelText:h,rx:a,ry:a,class:i,style:u.style,id:n.id,directions:n.directions,width:f.width,height:f.height,x:f.x,y:f.y,positioned:r,intersect:void 0,type:n.type,padding:(_ref3=l!==null&&l!==void 0?l:(_Qt=Qt())===null||_Qt===void 0||(_Qt=_Qt.block)===null||_Qt===void 0?void 0:_Qt.padding)!==null&&_ref3!==void 0?_ref3:0};}async function fnt(t,e,r){let n=b2e(e,r,!1);if(n.type==="group")return;let i=Qt(),a=await VF(t,n,{config:i}),s=a.node().getBBox(),l=r.getBlock(n.id);l.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(l),a.remove();}async function dnt(t,e,r){let n=b2e(e,r,!0);if(r.getBlock(n.id).type!=="space"){let a=Qt();await VF(t,n,{config:a}),e.intersect=n===null||n===void 0?void 0:n.intersect,v2e(n);}}async function UF(t,e,r,n){for(let i of e)await n(t,i,r),i.children&&(await UF(t,i.children,r,n));}async function T2e(t,e,r){await UF(t,e,r,fnt);}async function w2e(t,e,r){await UF(t,e,r,dnt);}async function k2e(t,e,r,n,i){let a=new an({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(let s of e)if(s.start&&s.end){let l=n.getBlock(s.start),u=n.getBlock(s.end);if(l!==null&&l!==void 0&&l.size&&u!==null&&u!==void 0&&u.size){let h=l.size,f=u.size,d=[{x:h.x,y:h.y},{x:h.x+(f.x-h.x)/2,y:h.y+(f.y-h.y)/2},{x:f.x,y:f.y}];Qve(t,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:d,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),s.label&&(await jve(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:d,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),Kve({...s,x:d[1].x,y:d[1].y},{originalPath:d}));}}}var E2e=N(()=>{"use strict";Uo();Jn();Zve();x2e();nr();o(b2e,"getNodeFromBlock");o(fnt,"calculateBlockSize");o(dnt,"insertBlockPositioned");o(UF,"performOperations");o(T2e,"calculateBlockSizes");o(w2e,"insertBlocks");o(k2e,"insertEdges");});var pnt,mnt,S2e,C2e=N(()=>{"use strict";pr();Jn();$ve();yt();yi();Uve();E2e();pnt=o(function(t,e){return e.db.getClasses();},"getClasses"),mnt=o(async function(t,e,r,n){let{securityLevel:i,block:a}=Qt(),s=n.db,l;i==="sandbox"&&(l=Ge("#i"+e));let u=i==="sandbox"?Ge(l.nodes()[0].contentDocument.body):Ge("body"),h=i==="sandbox"?u.select(`[id="${e}"]`):Ge(`[id="${e}"]`);Fve(h,["point","circle","cross"],n.type,e);let d=s.getBlocks(),p=s.getBlocksFlat(),m=s.getEdges(),g=h.insert("g").attr("class","block");await T2e(g,d,s);let y=Vve(s);if(await w2e(g,d,s),await k2e(g,m,p,s,e),y){let v=y,x=Math.max(1,Math.round(.125*(v.width/v.height))),b=v.height+x+10,T=v.width+10,{useMaxWidth:C}=a;hn(h,b,T,!!C),X.debug("Here Bounds",y,v),h.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`);}},"draw"),S2e={draw:mnt,getClasses:pnt};});var A2e={};hr(A2e,{diagram:()=>gnt});var gnt,_2e=N(()=>{"use strict";_ve();Ove();Bve();C2e();gnt={parser:Ave,db:Ive,renderer:S2e,styles:Pve};});var HF,WF,_4,R2e,qF,Wa,eu,D4,N2e,bnt,L4,M2e,I2e,O2e,P2e,B2e,kC,Gf,EC=N(()=>{"use strict";HF={L:"left",R:"right",T:"top",B:"bottom"},WF={L:o(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:o(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:o(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:o(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},_4={L:o((t,e)=>t-e+2,"L"),R:o((t,e)=>t-2,"R"),T:o((t,e)=>t-e+2,"T"),B:o((t,e)=>t-2,"B")},R2e=o(function(t){return Wa(t)?t==="L"?"R":"L":t==="T"?"B":"T";},"getOppositeArchitectureDirection"),qF=o(function(t){let e=t;return e==="L"||e==="R"||e==="T"||e==="B";},"isArchitectureDirection"),Wa=o(function(t){let e=t;return e==="L"||e==="R";},"isArchitectureDirectionX"),eu=o(function(t){let e=t;return e==="T"||e==="B";},"isArchitectureDirectionY"),D4=o(function(t,e){let r=Wa(t)&&eu(e),n=eu(t)&&Wa(e);return r||n;},"isArchitectureDirectionXY"),N2e=o(function(t){let e=t[0],r=t[1],n=Wa(e)&&eu(r),i=eu(e)&&Wa(r);return n||i;},"isArchitecturePairXY"),bnt=o(function(t){return t!=="LL"&&t!=="RR"&&t!=="TT"&&t!=="BB";},"isValidArchitectureDirectionPair"),L4=o(function(t,e){let r=`${t}${e}`;return bnt(r)?r:void 0;},"getArchitectureDirectionPair"),M2e=o(function([t,e],r){let n=r[0],i=r[1];return Wa(n)?eu(i)?[t+(n==="L"?-1:1),e+(i==="T"?1:-1)]:[t+(n==="L"?-1:1),e]:Wa(i)?[t+(i==="L"?1:-1),e+(n==="T"?1:-1)]:[t,e+(n==="T"?1:-1)];},"shiftPositionByArchitectureDirectionPair"),I2e=o(function(t){return t==="LT"||t==="TL"?[1,1]:t==="BL"||t==="LB"?[1,-1]:t==="BR"||t==="RB"?[-1,-1]:[-1,1];},"getArchitectureDirectionXYFactors"),O2e=o(function(t,e){return D4(t,e)?"bend":Wa(t)?"horizontal":"vertical";},"getArchitectureDirectionAlignment"),P2e=o(function(t){return t.type==="service";},"isArchitectureService"),B2e=o(function(t){return t.type==="junction";},"isArchitectureJunction"),kC=o(t=>t.data(),"edgeData"),Gf=o(t=>t.data(),"nodeData");});var Tnt,my,YF=N(()=>{"use strict";var _Class211;Jn();Ca();nr();ci();EC();Tnt=lr.architecture,my=(_Class211=class my{constructor(){this.nodes={};this.groups={};this.edges=[];this.registeredIds={};this.elements={};this.setAccTitle=Cr;this.getAccTitle=_r;this.setDiagramTitle=Ir;this.getDiagramTitle=Rr;this.getAccDescription=Lr;this.setAccDescription=Dr;this.clear();}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},wr();}addService({id:e,icon:r,in:n,title:i,iconText:a}){if(this.registeredIds[e]!==void 0)throw new Error(`The service id [${e}] is already in use by another ${this.registeredIds[e]}`);if(n!==void 0){if(e===n)throw new Error(`The service [${e}] cannot be placed within itself`);if(this.registeredIds[n]===void 0)throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[n]==="node")throw new Error(`The service [${e}]'s parent is not a group`);}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"service",icon:r,iconText:a,title:i,edges:[],in:n};}getServices(){return Object.values(this.nodes).filter(P2e);}addJunction({id:e,in:r}){this.registeredIds[e]="node",this.nodes[e]={id:e,type:"junction",edges:[],in:r};}getJunctions(){return Object.values(this.nodes).filter(B2e);}getNodes(){return Object.values(this.nodes);}getNode(e){var _this$nodes$e;return(_this$nodes$e=this.nodes[e])!==null&&_this$nodes$e!==void 0?_this$nodes$e:null;}addGroup({id:e,icon:r,in:n,title:i}){var _this$registeredIds;if(((_this$registeredIds=this.registeredIds)===null||_this$registeredIds===void 0?void 0:_this$registeredIds[e])!==void 0)throw new Error(`The group id [${e}] is already in use by another ${this.registeredIds[e]}`);if(n!==void 0){var _this$registeredIds2,_this$registeredIds3;if(e===n)throw new Error(`The group [${e}] cannot be placed within itself`);if(((_this$registeredIds2=this.registeredIds)===null||_this$registeredIds2===void 0?void 0:_this$registeredIds2[n])===void 0)throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(((_this$registeredIds3=this.registeredIds)===null||_this$registeredIds3===void 0?void 0:_this$registeredIds3[n])==="node")throw new Error(`The group [${e}]'s parent is not a group`);}this.registeredIds[e]="group",this.groups[e]={id:e,icon:r,title:i,in:n};}getGroups(){return Object.values(this.groups);}addEdge({lhsId:e,rhsId:r,lhsDir:n,rhsDir:i,lhsInto:a,rhsInto:s,lhsGroup:l,rhsGroup:u,title:h}){if(!qF(n))throw new Error(`Invalid direction given for left hand side of edge ${e}--${r}. Expected (L,R,T,B) got ${String(n)}`);if(!qF(i))throw new Error(`Invalid direction given for right hand side of edge ${e}--${r}. Expected (L,R,T,B) got ${String(i)}`);if(this.nodes[e]===void 0&&this.groups[e]===void 0)throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[r]===void 0&&this.groups[r]===void 0)throw new Error(`The right-hand id [${r}] does not yet exist. Please create the service/group before declaring an edge to it.`);let f=this.nodes[e].in,d=this.nodes[r].in;if(l&&f&&d&&f==d)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(u&&f&&d&&f==d)throw new Error(`The right-hand id [${r}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let p={lhsId:e,lhsDir:n,lhsInto:a,lhsGroup:l,rhsId:r,rhsDir:i,rhsInto:s,rhsGroup:u,title:h};this.edges.push(p),this.nodes[e]&&this.nodes[r]&&(this.nodes[e].edges.push(this.edges[this.edges.length-1]),this.nodes[r].edges.push(this.edges[this.edges.length-1]));}getEdges(){return this.edges;}getDataStructures(){if(this.dataStructures===void 0){let e={},r=Object.entries(this.nodes).reduce((u,[h,f])=>(u[h]=f.edges.reduce((d,p)=>{var _this$getNode,_this$getNode2;let m=(_this$getNode=this.getNode(p.lhsId))===null||_this$getNode===void 0?void 0:_this$getNode.in,g=(_this$getNode2=this.getNode(p.rhsId))===null||_this$getNode2===void 0?void 0:_this$getNode2.in;if(m&&g&&m!==g){var _e$m,_e$g;let y=O2e(p.lhsDir,p.rhsDir);y!=="bend"&&((_e$m=e[m])!==null&&_e$m!==void 0?_e$m:e[m]={},e[m][g]=y,(_e$g=e[g])!==null&&_e$g!==void 0?_e$g:e[g]={},e[g][m]=y);}if(p.lhsId===h){let y=L4(p.lhsDir,p.rhsDir);y&&(d[y]=p.rhsId);}else{let y=L4(p.rhsDir,p.lhsDir);y&&(d[y]=p.lhsId);}return d;},{}),u),{}),n=Object.keys(r)[0],i={[n]:1},a=Object.keys(r).reduce((u,h)=>h===n?u:{...u,[h]:1},{}),s=o(u=>{let h={[u]:[0,0]},f=[u];for(;f.length>0;){let d=f.shift();if(d){i[d]=1,delete a[d];let p=r[d],[m,g]=h[d];Object.entries(p).forEach(([y,v])=>{i[v]||(h[v]=M2e([m,g],y),f.push(v));});}}return h;},"BFS"),l=[s(n)];for(;Object.keys(a).length>0;)l.push(s(Object.keys(a)[0]));this.dataStructures={adjList:r,spatialMaps:l,groupAlignments:e};}return this.dataStructures;}setElementForId(e,r){this.elements[e]=r;}getElementById(e){return this.elements[e];}getConfig(){return Fn({...Tnt,...Qt().architecture});}getConfigField(e){return this.getConfig()[e];}},o(_Class211,"ArchitectureDB"),_Class211);});var wnt,XF,F2e=N(()=>{"use strict";gf();yt();Dp();YF();wnt=o((t,e)=>{Qo(t,e),t.groups.map(r=>e.addGroup(r)),t.services.map(r=>e.addService({...r,type:"service"})),t.junctions.map(r=>e.addJunction({...r,type:"junction"})),t.edges.map(r=>e.addEdge(r));},"populateDb"),XF={parser:{yy:void 0},parse:o(async t=>{var _XF$parser;let e=await ps("architecture",t);X.debug(e);let r=(_XF$parser=XF.parser)===null||_XF$parser===void 0?void 0:_XF$parser.yy;if(!(r instanceof my))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");wnt(e,r);},"parse")};});var knt,$2e,z2e=N(()=>{"use strict";knt=o(t=>`
  .edge {
    stroke-width: ${t.archEdgeWidth};
    stroke: ${t.archEdgeColor};
    fill: none;
  }

  .arrow {
    fill: ${t.archEdgeArrowColor};
  }

  .node-bkg {
    fill: none;
    stroke: ${t.archGroupBorderColor};
    stroke-width: ${t.archGroupBorderWidth};
    stroke-dasharray: 8;
  }
  .node-icon-text {
    display: flex; 
    align-items: center;
  }
  
  .node-icon-text > div {
    color: #fff;
    margin: 1px;
    height: fit-content;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }
`,"getStyles"),$2e=knt;});var KF=Ii((R4,jF)=>{"use strict";o(function(e,r){typeof R4=="object"&&typeof jF=="object"?jF.exports=r():typeof define=="function"&&define.amd?define([],r):typeof R4=="object"?R4.layoutBase=r():e.layoutBase=r();},"webpackUniversalModuleDefinition")(R4,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports;}return o(r,"__webpack_require__"),r.m=t,r.c=e,r.i=function(n){return n;},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a});},r.n=function(n){var i=n&&n.__esModule?o(function(){return n.default;},"getDefault"):o(function(){return n;},"getModuleExports");return r.d(i,"a",i),i;},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i);},r.p="",r(r.s=28);}([function(t,e,r){"use strict";function n(){}o(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n;},function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(u,h,f){n.call(this,f),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=f,this.bendpoints=[],this.source=u,this.target=h;}o(s,"LEdge"),s.prototype=Object.create(n.prototype);for(var l in n)s[l]=n[l];s.prototype.getSource=function(){return this.source;},s.prototype.getTarget=function(){return this.target;},s.prototype.isInterGraph=function(){return this.isInterGraph;},s.prototype.getLength=function(){return this.length;},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget;},s.prototype.getBendpoints=function(){return this.bendpoints;},s.prototype.getLca=function(){return this.lca;},s.prototype.getSourceInLca=function(){return this.sourceInLca;},s.prototype.getTargetInLca=function(){return this.targetInLca;},s.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;if(this.target===u)return this.source;throw"Node is not incident with this edge";},s.prototype.getOtherEndInGraph=function(u,h){for(var f=this.getOtherEnd(u),d=h.getGraphManager().getRoot();;){if(f.getOwner()==h)return f;if(f.getOwner()==d)break;f=f.getOwner().getParent();}return null;},s.prototype.updateLength=function(){var u=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),u),this.isOverlapingSourceAndTarget||(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY));},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY);},t.exports=s;},function(t,e,r){"use strict";function n(i){this.vGraphObject=i;}o(n,"LGraphObject"),t.exports=n;},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),l=r(16),u=r(5);function h(d,p,m,g){m==null&&g==null&&(g=p),n.call(this,g),d.graphManager!=null&&(d=d.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=d,m!=null&&p!=null?this.rect=new a(p.x,p.y,m.width,m.height):this.rect=new a();}o(h,"LNode"),h.prototype=Object.create(n.prototype);for(var f in n)h[f]=n[f];h.prototype.getEdges=function(){return this.edges;},h.prototype.getChild=function(){return this.child;},h.prototype.getOwner=function(){return this.owner;},h.prototype.getWidth=function(){return this.rect.width;},h.prototype.setWidth=function(d){this.rect.width=d;},h.prototype.getHeight=function(){return this.rect.height;},h.prototype.setHeight=function(d){this.rect.height=d;},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2;},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2;},h.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2);},h.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y);},h.prototype.getRect=function(){return this.rect;},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height);},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2;},h.prototype.setRect=function(d,p){this.rect.x=d.x,this.rect.y=d.y,this.rect.width=p.width,this.rect.height=p.height;},h.prototype.setCenter=function(d,p){this.rect.x=d-this.rect.width/2,this.rect.y=p-this.rect.height/2;},h.prototype.setLocation=function(d,p){this.rect.x=d,this.rect.y=p;},h.prototype.moveBy=function(d,p){this.rect.x+=d,this.rect.y+=p;},h.prototype.getEdgeListToNode=function(d){var p=[],m,g=this;return g.edges.forEach(function(y){if(y.target==d){if(y.source!=g)throw"Incorrect edge source!";p.push(y);}}),p;},h.prototype.getEdgesBetween=function(d){var p=[],m,g=this;return g.edges.forEach(function(y){if(!(y.source==g||y.target==g))throw"Incorrect edge source and/or target";(y.target==d||y.source==d)&&p.push(y);}),p;},h.prototype.getNeighborsList=function(){var d=new Set(),p=this;return p.edges.forEach(function(m){if(m.source==p)d.add(m.target);else{if(m.target!=p)throw"Incorrect incidency!";d.add(m.source);}}),d;},h.prototype.withChildren=function(){var d=new Set(),p,m;if(d.add(this),this.child!=null)for(var g=this.child.getNodes(),y=0;y<g.length;y++)p=g[y],m=p.withChildren(),m.forEach(function(v){d.add(v);});return d;},h.prototype.getNoOfChildren=function(){var d=0,p;if(this.child==null)d=1;else for(var m=this.child.getNodes(),g=0;g<m.length;g++)p=m[g],d+=p.getNoOfChildren();return d==0&&(d=1),d;},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize;},h.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize);},h.prototype.scatter=function(){var d,p,m=-s.INITIAL_WORLD_BOUNDARY,g=s.INITIAL_WORLD_BOUNDARY;d=s.WORLD_CENTER_X+l.nextDouble()*(g-m)+m;var y=-s.INITIAL_WORLD_BOUNDARY,v=s.INITIAL_WORLD_BOUNDARY;p=s.WORLD_CENTER_Y+l.nextDouble()*(v-y)+y,this.rect.x=d,this.rect.y=p;},h.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var d=this.getChild();if(d.updateBounds(!0),this.rect.x=d.getLeft(),this.rect.y=d.getTop(),this.setWidth(d.getRight()-d.getLeft()),this.setHeight(d.getBottom()-d.getTop()),s.NODE_DIMENSIONS_INCLUDE_LABELS){var p=d.getRight()-d.getLeft(),m=d.getBottom()-d.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(p+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>p?(this.rect.x-=(this.labelWidth-p)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(p+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(m+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>m?(this.rect.y-=(this.labelHeight-m)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(m+this.labelHeight));}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth;},h.prototype.transform=function(d){var p=this.rect.x;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var m=this.rect.y;m>s.WORLD_BOUNDARY?m=s.WORLD_BOUNDARY:m<-s.WORLD_BOUNDARY&&(m=-s.WORLD_BOUNDARY);var g=new u(p,m),y=d.inverseTransformPoint(g);this.setLocation(y.x,y.y);},h.prototype.getLeft=function(){return this.rect.x;},h.prototype.getRight=function(){return this.rect.x+this.rect.width;},h.prototype.getTop=function(){return this.rect.y;},h.prototype.getBottom=function(){return this.rect.y+this.rect.height;},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent();},t.exports=h;},function(t,e,r){"use strict";var n=r(0);function i(){}o(i,"FDLayoutConstants");for(var a in n)i[a]=n[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i;},function(t,e,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a);}o(n,"PointD"),n.prototype.getX=function(){return this.x;},n.prototype.getY=function(){return this.y;},n.prototype.setX=function(i){this.x=i;},n.prototype.setY=function(i){this.y=i;},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y);},n.prototype.getCopy=function(){return new n(this.x,this.y);},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this;},t.exports=n;},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(7),l=r(3),u=r(1),h=r(13),f=r(12),d=r(11);function p(g,y,v){n.call(this,v),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,y!=null&&y instanceof s?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager);}o(p,"LGraph"),p.prototype=Object.create(n.prototype);for(var m in n)p[m]=n[m];p.prototype.getNodes=function(){return this.nodes;},p.prototype.getEdges=function(){return this.edges;},p.prototype.getGraphManager=function(){return this.graphManager;},p.prototype.getParent=function(){return this.parent;},p.prototype.getLeft=function(){return this.left;},p.prototype.getRight=function(){return this.right;},p.prototype.getTop=function(){return this.top;},p.prototype.getBottom=function(){return this.bottom;},p.prototype.isConnected=function(){return this.isConnected;},p.prototype.add=function(g,y,v){if(y==null&&v==null){var x=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(x)>-1)throw"Node already in graph!";return x.owner=this,this.getNodes().push(x),x;}else{var b=g;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(!(y.owner==v.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=v.owner?null:(b.source=y,b.target=v,b.isInterGraph=!1,this.getEdges().push(b),y.edges.push(b),v!=y&&v.edges.push(b),b);}},p.prototype.remove=function(g){var y=g;if(g instanceof l){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=y.edges.slice(),x,b=v.length,T=0;T<b;T++)x=v[T],x.isInterGraph?this.graphManager.remove(x):x.source.owner.remove(x);var C=this.nodes.indexOf(y);if(C==-1)throw"Node not in owner node list!";this.nodes.splice(C,1);}else if(g instanceof u){var x=g;if(x==null)throw"Edge is null!";if(!(x.source!=null&&x.target!=null))throw"Source and/or target is null!";if(!(x.source.owner!=null&&x.target.owner!=null&&x.source.owner==this&&x.target.owner==this))throw"Source and/or target owner is invalid!";var w=x.source.edges.indexOf(x),E=x.target.edges.indexOf(x);if(!(w>-1&&E>-1))throw"Source and/or target doesn't know this edge!";x.source.edges.splice(w,1),x.target!=x.source&&x.target.edges.splice(E,1);var C=x.source.owner.getEdges().indexOf(x);if(C==-1)throw"Not in owner's edge list!";x.source.owner.getEdges().splice(C,1);}},p.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,y=i.MAX_VALUE,v,x,b,T=this.getNodes(),C=T.length,w=0;w<C;w++){var E=T[w];v=E.getTop(),x=E.getLeft(),g>v&&(g=v),y>x&&(y=x);}return g==i.MAX_VALUE?null:(T[0].getParent().paddingLeft!=null?b=T[0].getParent().paddingLeft:b=this.margin,this.left=y-b,this.top=g-b,new f(this.left,this.top));},p.prototype.updateBounds=function(g){for(var y=i.MAX_VALUE,v=-i.MAX_VALUE,x=i.MAX_VALUE,b=-i.MAX_VALUE,T,C,w,E,_,A=this.nodes,D=A.length,O=0;O<D;O++){var R=A[O];g&&R.child!=null&&R.updateBounds(),T=R.getLeft(),C=R.getRight(),w=R.getTop(),E=R.getBottom(),y>T&&(y=T),v<C&&(v=C),x>w&&(x=w),b<E&&(b=E);}var k=new h(y,x,v-y,b-x);y==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),A[0].getParent().paddingLeft!=null?_=A[0].getParent().paddingLeft:_=this.margin,this.left=k.x-_,this.right=k.x+k.width+_,this.top=k.y-_,this.bottom=k.y+k.height+_;},p.calculateBounds=function(g){for(var y=i.MAX_VALUE,v=-i.MAX_VALUE,x=i.MAX_VALUE,b=-i.MAX_VALUE,T,C,w,E,_=g.length,A=0;A<_;A++){var D=g[A];T=D.getLeft(),C=D.getRight(),w=D.getTop(),E=D.getBottom(),y>T&&(y=T),v<C&&(v=C),x>w&&(x=w),b<E&&(b=E);}var O=new h(y,x,v-y,b-x);return O;},p.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth();},p.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize;},p.prototype.calcEstimatedSize=function(){for(var g=0,y=this.nodes,v=y.length,x=0;x<v;x++){var b=y[x];g+=b.calcEstimatedSize();}return g==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=g/Math.sqrt(this.nodes.length),this.estimatedSize;},p.prototype.updateConnected=function(){var g=this;if(this.nodes.length==0){this.isConnected=!0;return;}var y=new d(),v=new Set(),x=this.nodes[0],b,T,C=x.withChildren();for(C.forEach(function(O){y.push(O),v.add(O);});y.length!==0;){x=y.shift(),b=x.getEdges();for(var w=b.length,E=0;E<w;E++){var _=b[E];if(T=_.getOtherEndInGraph(x,this),T!=null&&!v.has(T)){var A=T.withChildren();A.forEach(function(O){y.push(O),v.add(O);});}}}if(this.isConnected=!1,v.size>=this.nodes.length){var D=0;v.forEach(function(O){O.owner==g&&D++;}),D==this.nodes.length&&(this.isConnected=!0);}},t.exports=p;},function(t,e,r){"use strict";var n,i=r(1);function a(s){n=r(6),this.layout=s,this.graphs=[],this.edges=[];}o(a,"LGraphManager"),a.prototype.addRoot=function(){var s=this.layout.newGraph(),l=this.layout.newNode(null),u=this.add(s,l);return this.setRootGraph(u),this.rootGraph;},a.prototype.add=function(s,l,u,h,f){if(u==null&&h==null&&f==null){if(s==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return s.parent=l,l.child=s,s;}else{f=u,h=l,u=s;var d=h.getOwner(),p=f.getOwner();if(!(d!=null&&d.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(p!=null&&p.getGraphManager()==this))throw"Target not in this graph mgr!";if(d==p)return u.isInterGraph=!1,d.add(u,h,f);if(u.isInterGraph=!0,u.source=h,u.target=f,this.edges.indexOf(u)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(u),!(u.source!=null&&u.target!=null))throw"Edge source and/or target is null!";if(!(u.source.edges.indexOf(u)==-1&&u.target.edges.indexOf(u)==-1))throw"Edge already in source and/or target incidency list!";return u.source.edges.push(u),u.target.edges.push(u),u;}},a.prototype.remove=function(s){if(s instanceof n){var l=s;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var u=[];u=u.concat(l.getEdges());for(var h,f=u.length,d=0;d<f;d++)h=u[d],l.remove(h);var p=[];p=p.concat(l.getNodes());var m;f=p.length;for(var d=0;d<f;d++)m=p[d],l.remove(m);l==this.rootGraph&&this.setRootGraph(null);var g=this.graphs.indexOf(l);this.graphs.splice(g,1),l.parent=null;}else if(s instanceof i){if(h=s,h==null)throw"Edge is null!";if(!h.isInterGraph)throw"Not an inter-graph edge!";if(!(h.source!=null&&h.target!=null))throw"Source and/or target is null!";if(!(h.source.edges.indexOf(h)!=-1&&h.target.edges.indexOf(h)!=-1))throw"Source and/or target doesn't know this edge!";var g=h.source.edges.indexOf(h);if(h.source.edges.splice(g,1),g=h.target.edges.indexOf(h),h.target.edges.splice(g,1),!(h.source.owner!=null&&h.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(h.source.owner.getGraphManager().edges.indexOf(h)==-1)throw"Not in owner graph manager's edge list!";var g=h.source.owner.getGraphManager().edges.indexOf(h);h.source.owner.getGraphManager().edges.splice(g,1);}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0);},a.prototype.getGraphs=function(){return this.graphs;},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var s=[],l=this.getGraphs(),u=l.length,h=0;h<u;h++)s=s.concat(l[h].getNodes());this.allNodes=s;}return this.allNodes;},a.prototype.resetAllNodes=function(){this.allNodes=null;},a.prototype.resetAllEdges=function(){this.allEdges=null;},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null;},a.prototype.getAllEdges=function(){if(this.allEdges==null){for(var s=[],l=this.getGraphs(),u=l.length,h=0;h<l.length;h++)s=s.concat(l[h].getEdges());s=s.concat(this.edges),this.allEdges=s;}return this.allEdges;},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation;},a.prototype.setAllNodesToApplyGravitation=function(s){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=s;},a.prototype.getRoot=function(){return this.rootGraph;},a.prototype.setRootGraph=function(s){if(s.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=s,s.parent==null&&(s.parent=this.layout.newNode("Root node"));},a.prototype.getLayout=function(){return this.layout;},a.prototype.isOneAncestorOfOther=function(s,l){if(!(s!=null&&l!=null))throw"assert failed";if(s==l)return!0;var u=s.getOwner(),h;do{if(h=u.getParent(),h==null)break;if(h==l)return!0;if(u=h.getOwner(),u==null)break;}while(!0);u=l.getOwner();do{if(h=u.getParent(),h==null)break;if(h==s)return!0;if(u=h.getOwner(),u==null)break;}while(!0);return!1;},a.prototype.calcLowestCommonAncestors=function(){for(var s,l,u,h,f,d=this.getAllEdges(),p=d.length,m=0;m<p;m++){if(s=d[m],l=s.source,u=s.target,s.lca=null,s.sourceInLca=l,s.targetInLca=u,l==u){s.lca=l.getOwner();continue;}for(h=l.getOwner();s.lca==null;){for(s.targetInLca=u,f=u.getOwner();s.lca==null;){if(f==h){s.lca=f;break;}if(f==this.rootGraph)break;if(s.lca!=null)throw"assert failed";s.targetInLca=f.getParent(),f=s.targetInLca.getOwner();}if(h==this.rootGraph)break;s.lca==null&&(s.sourceInLca=h.getParent(),h=s.sourceInLca.getOwner());}if(s.lca==null)throw"assert failed";}},a.prototype.calcLowestCommonAncestor=function(s,l){if(s==l)return s.getOwner();var u=s.getOwner();do{if(u==null)break;var h=l.getOwner();do{if(h==null)break;if(h==u)return h;h=h.getParent().getOwner();}while(!0);u=u.getParent().getOwner();}while(!0);return u;},a.prototype.calcInclusionTreeDepths=function(s,l){s==null&&l==null&&(s=this.rootGraph,l=1);for(var u,h=s.getNodes(),f=h.length,d=0;d<f;d++)u=h[d],u.inclusionTreeDepth=l,u.child!=null&&this.calcInclusionTreeDepths(u.child,l+1);},a.prototype.includesInvalidEdge=function(){for(var s,l=[],u=this.edges.length,h=0;h<u;h++)s=this.edges[h],this.isOneAncestorOfOther(s.source,s.target)&&l.push(s);for(var h=0;h<l.length;h++)this.remove(l[h]);return!1;},t.exports=a;},function(t,e,r){"use strict";var n=r(12);function i(){}o(i,"IGeometry"),i.calcSeparationAmount=function(a,s,l,u){if(!a.intersects(s))throw"assert failed";var h=new Array(2);this.decideDirectionsForOverlappingNodes(a,s,h),l[0]=Math.min(a.getRight(),s.getRight())-Math.max(a.x,s.x),l[1]=Math.min(a.getBottom(),s.getBottom())-Math.max(a.y,s.y),a.getX()<=s.getX()&&a.getRight()>=s.getRight()?l[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(l[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?l[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(l[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var f=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(f=1);var d=f*l[0],p=l[1]/f;l[0]<p?p=l[0]:d=l[1],l[0]=-1*h[0]*(p/2+u),l[1]=-1*h[1]*(d/2+u);},i.decideDirectionsForOverlappingNodes=function(a,s,l){a.getCenterX()<s.getCenterX()?l[0]=-1:l[0]=1,a.getCenterY()<s.getCenterY()?l[1]=-1:l[1]=1;},i.getIntersection2=function(a,s,l){var u=a.getCenterX(),h=a.getCenterY(),f=s.getCenterX(),d=s.getCenterY();if(a.intersects(s))return l[0]=u,l[1]=h,l[2]=f,l[3]=d,!0;var p=a.getX(),m=a.getY(),g=a.getRight(),y=a.getX(),v=a.getBottom(),x=a.getRight(),b=a.getWidthHalf(),T=a.getHeightHalf(),C=s.getX(),w=s.getY(),E=s.getRight(),_=s.getX(),A=s.getBottom(),D=s.getRight(),O=s.getWidthHalf(),R=s.getHeightHalf(),k=!1,L=!1;if(u===f){if(h>d)return l[0]=u,l[1]=m,l[2]=f,l[3]=A,!1;if(h<d)return l[0]=u,l[1]=v,l[2]=f,l[3]=w,!1;}else if(h===d){if(u>f)return l[0]=p,l[1]=h,l[2]=E,l[3]=d,!1;if(u<f)return l[0]=g,l[1]=h,l[2]=C,l[3]=d,!1;}else{var S=a.height/a.width,I=s.height/s.width,M=(d-h)/(f-u),P=void 0,B=void 0,F=void 0,z=void 0,$=void 0,U=void 0;if(-S===M?u>f?(l[0]=y,l[1]=v,k=!0):(l[0]=g,l[1]=m,k=!0):S===M&&(u>f?(l[0]=p,l[1]=m,k=!0):(l[0]=x,l[1]=v,k=!0)),-I===M?f>u?(l[2]=_,l[3]=A,L=!0):(l[2]=E,l[3]=w,L=!0):I===M&&(f>u?(l[2]=C,l[3]=w,L=!0):(l[2]=D,l[3]=A,L=!0)),k&&L)return!1;if(u>f?h>d?(P=this.getCardinalDirection(S,M,4),B=this.getCardinalDirection(I,M,2)):(P=this.getCardinalDirection(-S,M,3),B=this.getCardinalDirection(-I,M,1)):h>d?(P=this.getCardinalDirection(-S,M,1),B=this.getCardinalDirection(-I,M,3)):(P=this.getCardinalDirection(S,M,2),B=this.getCardinalDirection(I,M,4)),!k)switch(P){case 1:z=m,F=u+-T/M,l[0]=F,l[1]=z;break;case 2:F=x,z=h+b*M,l[0]=F,l[1]=z;break;case 3:z=v,F=u+T/M,l[0]=F,l[1]=z;break;case 4:F=y,z=h+-b*M,l[0]=F,l[1]=z;break;}if(!L)switch(B){case 1:U=w,$=f+-R/M,l[2]=$,l[3]=U;break;case 2:$=D,U=d+O*M,l[2]=$,l[3]=U;break;case 3:U=A,$=f+R/M,l[2]=$,l[3]=U;break;case 4:$=_,U=d+-O*M,l[2]=$,l[3]=U;break;}}return!1;},i.getCardinalDirection=function(a,s,l){return a>s?l:1+l%4;},i.getIntersection=function(a,s,l,u){if(u==null)return this.getIntersection2(a,s,l);var h=a.x,f=a.y,d=s.x,p=s.y,m=l.x,g=l.y,y=u.x,v=u.y,x=void 0,b=void 0,T=void 0,C=void 0,w=void 0,E=void 0,_=void 0,A=void 0,D=void 0;return T=p-f,w=h-d,_=d*f-h*p,C=v-g,E=m-y,A=y*g-m*v,D=T*E-C*w,D===0?null:(x=(w*A-E*_)/D,b=(C*_-T*A)/D,new n(x,b));},i.angleOfVector=function(a,s,l,u){var h=void 0;return a!==l?(h=Math.atan((u-s)/(l-a)),l<a?h+=Math.PI:u<s&&(h+=this.TWO_PI)):u<s?h=this.ONE_AND_HALF_PI:h=this.HALF_PI,h;},i.doIntersect=function(a,s,l,u){var h=a.x,f=a.y,d=s.x,p=s.y,m=l.x,g=l.y,y=u.x,v=u.y,x=(d-h)*(v-g)-(y-m)*(p-f);if(x===0)return!1;var b=((v-g)*(y-h)+(m-y)*(v-f))/x,T=((f-p)*(y-h)+(d-h)*(v-f))/x;return 0<b&&b<1&&0<T&&T<1;},i.findCircleLineIntersections=function(a,s,l,u,h,f,d){var p=(l-a)*(l-a)+(u-s)*(u-s),m=2*((a-h)*(l-a)+(s-f)*(u-s)),g=(a-h)*(a-h)+(s-f)*(s-f)-d*d,y=m*m-4*p*g;if(y>=0){var v=(-m+Math.sqrt(m*m-4*p*g))/(2*p),x=(-m-Math.sqrt(m*m-4*p*g))/(2*p),b=null;return v>=0&&v<=1?[v]:x>=0&&x<=1?[x]:b;}else return null;},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i;},function(t,e,r){"use strict";function n(){}o(n,"IMath"),n.sign=function(i){return i>0?1:i<0?-1:0;},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i);},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i);},t.exports=n;},function(t,e,r){"use strict";function n(){}o(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n;},function(t,e,r){"use strict";var n=function(){function h(f,d){for(var p=0;p<d.length;p++){var m=d[p];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(f,m.key,m);}}return o(h,"defineProperties"),function(f,d,p){return d&&h(f.prototype,d),p&&h(f,p),f;};}();function i(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function");}o(i,"_classCallCheck");var a=o(function(f){return{value:f,next:null,prev:null};},"nodeFrom"),s=o(function(f,d,p,m){return f!==null?f.next=d:m.head=d,p!==null?p.prev=d:m.tail=d,d.prev=f,d.next=p,m.length++,d;},"add"),l=o(function(f,d){var p=f.prev,m=f.next;return p!==null?p.next=m:d.head=m,m!==null?m.prev=p:d.tail=p,f.prev=f.next=null,d.length--,f;},"_remove"),u=function(){function h(f){var d=this;i(this,h),this.length=0,this.head=null,this.tail=null,f===null||f===void 0?void 0:f.forEach(function(p){return d.push(p);});}return o(h,"LinkedList"),n(h,[{key:"size",value:o(function(){return this.length;},"size")},{key:"insertBefore",value:o(function(d,p){return s(p.prev,a(d),p,this);},"insertBefore")},{key:"insertAfter",value:o(function(d,p){return s(p,a(d),p.next,this);},"insertAfter")},{key:"insertNodeBefore",value:o(function(d,p){return s(p.prev,d,p,this);},"insertNodeBefore")},{key:"insertNodeAfter",value:o(function(d,p){return s(p,d,p.next,this);},"insertNodeAfter")},{key:"push",value:o(function(d){return s(this.tail,a(d),null,this);},"push")},{key:"unshift",value:o(function(d){return s(null,a(d),this.head,this);},"unshift")},{key:"remove",value:o(function(d){return l(d,this);},"remove")},{key:"pop",value:o(function(){return l(this.tail,this).value;},"pop")},{key:"popNode",value:o(function(){return l(this.tail,this);},"popNode")},{key:"shift",value:o(function(){return l(this.head,this).value;},"shift")},{key:"shiftNode",value:o(function(){return l(this.head,this);},"shiftNode")},{key:"get_object_at",value:o(function(d){if(d<=this.length()){for(var p=1,m=this.head;p<d;)m=m.next,p++;return m.value;}},"get_object_at")},{key:"set_object_at",value:o(function(d,p){if(d<=this.length()){for(var m=1,g=this.head;m<d;)g=g.next,m++;g.value=p;}},"set_object_at")}]),h;}();t.exports=u;},function(t,e,r){"use strict";function n(i,a,s){this.x=null,this.y=null,i==null&&a==null&&s==null?(this.x=0,this.y=0):typeof i=="number"&&typeof a=="number"&&s==null?(this.x=i,this.y=a):i.constructor.name=="Point"&&a==null&&s==null&&(s=i,this.x=s.x,this.y=s.y);}o(n,"Point"),n.prototype.getX=function(){return this.x;},n.prototype.getY=function(){return this.y;},n.prototype.getLocation=function(){return new n(this.x,this.y);},n.prototype.setLocation=function(i,a,s){i.constructor.name=="Point"&&a==null&&s==null?(s=i,this.setLocation(s.x,s.y)):typeof i=="number"&&typeof a=="number"&&s==null&&(parseInt(i)==i&&parseInt(a)==a?this.move(i,a):(this.x=Math.floor(i+.5),this.y=Math.floor(a+.5)));},n.prototype.move=function(i,a){this.x=i,this.y=a;},n.prototype.translate=function(i,a){this.x+=i,this.y+=a;},n.prototype.equals=function(i){if(i.constructor.name=="Point"){var a=i;return this.x==a.x&&this.y==a.y;}return this==i;},n.prototype.toString=function(){return new n().constructor.name+"[x="+this.x+",y="+this.y+"]";},t.exports=n;},function(t,e,r){"use strict";function n(i,a,s,l){this.x=0,this.y=0,this.width=0,this.height=0,i!=null&&a!=null&&s!=null&&l!=null&&(this.x=i,this.y=a,this.width=s,this.height=l);}o(n,"RectangleD"),n.prototype.getX=function(){return this.x;},n.prototype.setX=function(i){this.x=i;},n.prototype.getY=function(){return this.y;},n.prototype.setY=function(i){this.y=i;},n.prototype.getWidth=function(){return this.width;},n.prototype.setWidth=function(i){this.width=i;},n.prototype.getHeight=function(){return this.height;},n.prototype.setHeight=function(i){this.height=i;},n.prototype.getRight=function(){return this.x+this.width;},n.prototype.getBottom=function(){return this.y+this.height;},n.prototype.intersects=function(i){return!(this.getRight()<i.x||this.getBottom()<i.y||i.getRight()<this.x||i.getBottom()<this.y);},n.prototype.getCenterX=function(){return this.x+this.width/2;},n.prototype.getMinX=function(){return this.getX();},n.prototype.getMaxX=function(){return this.getX()+this.width;},n.prototype.getCenterY=function(){return this.y+this.height/2;},n.prototype.getMinY=function(){return this.getY();},n.prototype.getMaxY=function(){return this.getY()+this.height;},n.prototype.getWidthHalf=function(){return this.width/2;},n.prototype.getHeightHalf=function(){return this.height/2;},t.exports=n;},function(t,e,r){"use strict";var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a;}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a;};function i(){}o(i,"UniqueIDGeneretor"),i.lastID=0,i.createID=function(a){return i.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=i.getString(),i.lastID++),a.uniqueID);},i.getString=function(a){return a==null&&(a=i.lastID),"Object#"+a;},i.isPrimitive=function(a){var s=typeof a>"u"?"undefined":n(a);return a==null||s!="object"&&s!="function";},t.exports=i;},function(t,e,r){"use strict";function n(m){if(Array.isArray(m)){for(var g=0,y=Array(m.length);g<m.length;g++)y[g]=m[g];return y;}else return Array.from(m);}o(n,"_toConsumableArray");var i=r(0),a=r(7),s=r(3),l=r(1),u=r(6),h=r(5),f=r(17),d=r(29);function p(m){d.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map(),this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,m!=null&&(this.isRemoteUse=m);}o(p,"Layout"),p.RANDOM_SEED=1,p.prototype=Object.create(d.prototype),p.prototype.getGraphManager=function(){return this.graphManager;},p.prototype.getAllNodes=function(){return this.graphManager.getAllNodes();},p.prototype.getAllEdges=function(){return this.graphManager.getAllEdges();},p.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation();},p.prototype.newGraphManager=function(){var m=new a(this);return this.graphManager=m,m;},p.prototype.newGraph=function(m){return new u(null,this.graphManager,m);},p.prototype.newNode=function(m){return new s(this.graphManager,m);},p.prototype.newEdge=function(m){return new l(null,null,m);},p.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge();},p.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var m;return this.checkLayoutSuccess()?m=!1:m=this.layout(),i.ANIMATE==="during"?!1:(m&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,m);},p.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update();},p.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var m,g=this.graphManager.getAllEdges(),y=0;y<g.length;y++)m=g[y];for(var v,x=this.graphManager.getRoot().getNodes(),y=0;y<x.length;y++)v=x[y];this.update(this.graphManager.getRoot());}},p.prototype.update=function(m){if(m==null)this.update2();else if(m instanceof s){var g=m;if(g.getChild()!=null)for(var y=g.getChild().getNodes(),v=0;v<y.length;v++)update(y[v]);if(g.vGraphObject!=null){var x=g.vGraphObject;x.update(g);}}else if(m instanceof l){var b=m;if(b.vGraphObject!=null){var T=b.vGraphObject;T.update(b);}}else if(m instanceof u){var C=m;if(C.vGraphObject!=null){var w=C.vGraphObject;w.update(C);}}},p.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1);},p.prototype.transform=function(m){if(m==null)this.transform(new h(0,0));else{var g=new f(),y=this.graphManager.getRoot().updateLeftTop();if(y!=null){g.setWorldOrgX(m.x),g.setWorldOrgY(m.y),g.setDeviceOrgX(y.x),g.setDeviceOrgY(y.y);for(var v=this.getAllNodes(),x,b=0;b<v.length;b++)x=v[b],x.transform(g);}}},p.prototype.positionNodesRandomly=function(m){if(m==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var g,y,v=m.getNodes(),x=0;x<v.length;x++)g=v[x],y=g.getChild(),y==null||y.getNodes().length==0?g.scatter():(this.positionNodesRandomly(y),g.updateBounds());},p.prototype.getFlatForest=function(){for(var m=[],g=!0,y=this.graphManager.getRoot().getNodes(),v=!0,x=0;x<y.length;x++)y[x].getChild()!=null&&(v=!1);if(!v)return m;var b=new Set(),T=[],C=new Map(),w=[];for(w=w.concat(y);w.length>0&&g;){for(T.push(w[0]);T.length>0&&g;){var E=T[0];T.splice(0,1),b.add(E);for(var _=E.getEdges(),x=0;x<_.length;x++){var A=_[x].getOtherEnd(E);if(C.get(E)!=A)if(!b.has(A))T.push(A),C.set(A,E);else{g=!1;break;}}}if(!g)m=[];else{var D=[].concat(n(b));m.push(D);for(var x=0;x<D.length;x++){var O=D[x],R=w.indexOf(O);R>-1&&w.splice(R,1);}b=new Set(),C=new Map();}}return m;},p.prototype.createDummyNodesForBendpoints=function(m){for(var g=[],y=m.source,v=this.graphManager.calcLowestCommonAncestor(m.source,m.target),x=0;x<m.bendpoints.length;x++){var b=this.newNode(null);b.setRect(new Point(0,0),new Dimension(1,1)),v.add(b);var T=this.newEdge(null);this.graphManager.add(T,y,b),g.add(b),y=b;}var T=this.newEdge(null);return this.graphManager.add(T,y,m.target),this.edgeToDummyNodes.set(m,g),m.isInterGraph()?this.graphManager.remove(m):v.remove(m),g;},p.prototype.createBendpointsFromDummyNodes=function(){var m=[];m=m.concat(this.graphManager.getAllEdges()),m=[].concat(n(this.edgeToDummyNodes.keys())).concat(m);for(var g=0;g<m.length;g++){var y=m[g];if(y.bendpoints.length>0){for(var v=this.edgeToDummyNodes.get(y),x=0;x<v.length;x++){var b=v[x],T=new h(b.getCenterX(),b.getCenterY()),C=y.bendpoints.get(x);C.x=T.x,C.y=T.y,b.getOwner().remove(b);}this.graphManager.add(y,y.source,y.target);}}},p.transform=function(m,g,y,v){if(y!=null&&v!=null){var x=g;if(m<=50){var b=g/y;x-=(g-b)/50*(50-m);}else{var T=g*v;x+=(T-g)/50*(m-50);}return x;}else{var C,w;return m<=50?(C=9*g/500,w=g/10):(C=9*g/50,w=-8*g),C*m+w;}},p.findCenterOfTree=function(m){var g=[];g=g.concat(m);var y=[],v=new Map(),x=!1,b=null;(g.length==1||g.length==2)&&(x=!0,b=g[0]);for(var T=0;T<g.length;T++){var C=g[T],w=C.getNeighborsList().size;v.set(C,C.getNeighborsList().size),w==1&&y.push(C);}var E=[];for(E=E.concat(y);!x;){var _=[];_=_.concat(E),E=[];for(var T=0;T<g.length;T++){var C=g[T],A=g.indexOf(C);A>=0&&g.splice(A,1);var D=C.getNeighborsList();D.forEach(function(k){if(y.indexOf(k)<0){var L=v.get(k),S=L-1;S==1&&E.push(k),v.set(k,S);}});}y=y.concat(E),(g.length==1||g.length==2)&&(x=!0,b=g[0]);}return b;},p.prototype.setGraphManager=function(m){this.graphManager=m;},t.exports=p;},function(t,e,r){"use strict";function n(){}o(n,"RandomSeed"),n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x);},t.exports=n;},function(t,e,r){"use strict";var n=r(5);function i(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1;}o(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX;},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a;},i.prototype.getWorldOrgY=function(){return this.lworldOrgY;},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a;},i.prototype.getWorldExtX=function(){return this.lworldExtX;},i.prototype.setWorldExtX=function(a){this.lworldExtX=a;},i.prototype.getWorldExtY=function(){return this.lworldExtY;},i.prototype.setWorldExtY=function(a){this.lworldExtY=a;},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX;},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a;},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY;},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a;},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX;},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a;},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY;},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a;},i.prototype.transformX=function(a){var s=0,l=this.lworldExtX;return l!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/l),s;},i.prototype.transformY=function(a){var s=0,l=this.lworldExtY;return l!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/l),s;},i.prototype.inverseTransformX=function(a){var s=0,l=this.ldeviceExtX;return l!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/l),s;},i.prototype.inverseTransformY=function(a){var s=0,l=this.ldeviceExtY;return l!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/l),s;},i.prototype.inverseTransformPoint=function(a){var s=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s;},t.exports=i;},function(t,e,r){"use strict";function n(d){if(Array.isArray(d)){for(var p=0,m=Array(d.length);p<d.length;p++)m[p]=d[p];return m;}else return Array.from(d);}o(n,"_toConsumableArray");var i=r(15),a=r(4),s=r(0),l=r(8),u=r(9);function h(){i.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS;}o(h,"FDLayout"),h.prototype=Object.create(i.prototype);for(var f in i)h[f]=i[f];h.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[];},h.prototype.calcIdealEdgeLengths=function(){for(var d,p,m,g,y,v,x,b=this.getGraphManager().getAllEdges(),T=0;T<b.length;T++)d=b[T],p=d.idealLength,d.isInterGraph&&(g=d.getSource(),y=d.getTarget(),v=d.getSourceInLca().getEstimatedSize(),x=d.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(d.idealLength+=v+x-2*s.SIMPLE_NODE_SIZE),m=d.getLca().getInclusionTreeDepth(),d.idealLength+=p*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(g.getInclusionTreeDepth()+y.getInclusionTreeDepth()-2*m));},h.prototype.initSpringEmbedder=function(){var d=this.getAllNodes().length;this.incremental?(d>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(d-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(d>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(d-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange();},h.prototype.calcSpringForces=function(){for(var d=this.getAllEdges(),p,m=0;m<d.length;m++)p=d[m],this.calcSpringForce(p,p.idealLength);},h.prototype.calcRepulsionForces=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m,g,y,v,x=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&d&&this.updateGrid(),b=new Set(),m=0;m<x.length;m++)y=x[m],this.calculateRepulsionForceOfANode(y,b,d,p),b.add(y);else for(m=0;m<x.length;m++)for(y=x[m],g=m+1;g<x.length;g++)v=x[g],y.getOwner()==v.getOwner()&&this.calcRepulsionForce(y,v);},h.prototype.calcGravitationalForces=function(){for(var d,p=this.getAllNodesToApplyGravitation(),m=0;m<p.length;m++)d=p[m],this.calcGravitationalForce(d);},h.prototype.moveNodes=function(){for(var d=this.getAllNodes(),p,m=0;m<d.length;m++)p=d[m],p.move();},h.prototype.calcSpringForce=function(d,p){var m=d.getSource(),g=d.getTarget(),y,v,x,b;if(this.uniformLeafNodeSizes&&m.getChild()==null&&g.getChild()==null)d.updateLengthSimple();else if(d.updateLength(),d.isOverlapingSourceAndTarget)return;y=d.getLength(),y!=0&&(v=d.edgeElasticity*(y-p),x=v*(d.lengthX/y),b=v*(d.lengthY/y),m.springForceX+=x,m.springForceY+=b,g.springForceX-=x,g.springForceY-=b);},h.prototype.calcRepulsionForce=function(d,p){var m=d.getRect(),g=p.getRect(),y=new Array(2),v=new Array(4),x,b,T,C,w,E,_;if(m.intersects(g)){l.calcSeparationAmount(m,g,y,a.DEFAULT_EDGE_LENGTH/2),E=2*y[0],_=2*y[1];var A=d.noOfChildren*p.noOfChildren/(d.noOfChildren+p.noOfChildren);d.repulsionForceX-=A*E,d.repulsionForceY-=A*_,p.repulsionForceX+=A*E,p.repulsionForceY+=A*_;}else this.uniformLeafNodeSizes&&d.getChild()==null&&p.getChild()==null?(x=g.getCenterX()-m.getCenterX(),b=g.getCenterY()-m.getCenterY()):(l.getIntersection(m,g,v),x=v[2]-v[0],b=v[3]-v[1]),Math.abs(x)<a.MIN_REPULSION_DIST&&(x=u.sign(x)*a.MIN_REPULSION_DIST),Math.abs(b)<a.MIN_REPULSION_DIST&&(b=u.sign(b)*a.MIN_REPULSION_DIST),T=x*x+b*b,C=Math.sqrt(T),w=(d.nodeRepulsion/2+p.nodeRepulsion/2)*d.noOfChildren*p.noOfChildren/T,E=w*x/C,_=w*b/C,d.repulsionForceX-=E,d.repulsionForceY-=_,p.repulsionForceX+=E,p.repulsionForceY+=_;},h.prototype.calcGravitationalForce=function(d){var p,m,g,y,v,x,b,T;p=d.getOwner(),m=(p.getRight()+p.getLeft())/2,g=(p.getTop()+p.getBottom())/2,y=d.getCenterX()-m,v=d.getCenterY()-g,x=Math.abs(y)+d.getWidth()/2,b=Math.abs(v)+d.getHeight()/2,d.getOwner()==this.graphManager.getRoot()?(T=p.getEstimatedSize()*this.gravityRangeFactor,(x>T||b>T)&&(d.gravitationForceX=-this.gravityConstant*y,d.gravitationForceY=-this.gravityConstant*v)):(T=p.getEstimatedSize()*this.compoundGravityRangeFactor,(x>T||b>T)&&(d.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,d.gravitationForceY=-this.gravityConstant*v*this.compoundGravityConstant));},h.prototype.isConverged=function(){var d,p=!1;return this.totalIterations>this.maxIterations/3&&(p=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),d=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,d||p;},h.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++);},h.prototype.calcNoOfChildrenForAllNodes=function(){for(var d,p=this.graphManager.getAllNodes(),m=0;m<p.length;m++)d=p[m],d.noOfChildren=d.getNoOfChildren();},h.prototype.calcGrid=function(d){var p=0,m=0;p=parseInt(Math.ceil((d.getRight()-d.getLeft())/this.repulsionRange)),m=parseInt(Math.ceil((d.getBottom()-d.getTop())/this.repulsionRange));for(var g=new Array(p),y=0;y<p;y++)g[y]=new Array(m);for(var y=0;y<p;y++)for(var v=0;v<m;v++)g[y][v]=new Array();return g;},h.prototype.addNodeToGrid=function(d,p,m){var g=0,y=0,v=0,x=0;g=parseInt(Math.floor((d.getRect().x-p)/this.repulsionRange)),y=parseInt(Math.floor((d.getRect().width+d.getRect().x-p)/this.repulsionRange)),v=parseInt(Math.floor((d.getRect().y-m)/this.repulsionRange)),x=parseInt(Math.floor((d.getRect().height+d.getRect().y-m)/this.repulsionRange));for(var b=g;b<=y;b++)for(var T=v;T<=x;T++)this.grid[b][T].push(d),d.setGridCoordinates(g,y,v,x);},h.prototype.updateGrid=function(){var d,p,m=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),d=0;d<m.length;d++)p=m[d],this.addNodeToGrid(p,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop());},h.prototype.calculateRepulsionForceOfANode=function(d,p,m,g){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&m||g){var y=new Set();d.surrounding=new Array();for(var v,x=this.grid,b=d.startX-1;b<d.finishX+2;b++)for(var T=d.startY-1;T<d.finishY+2;T++)if(!(b<0||T<0||b>=x.length||T>=x[0].length)){for(var C=0;C<x[b][T].length;C++)if(v=x[b][T][C],!(d.getOwner()!=v.getOwner()||d==v)&&!p.has(v)&&!y.has(v)){var w=Math.abs(d.getCenterX()-v.getCenterX())-(d.getWidth()/2+v.getWidth()/2),E=Math.abs(d.getCenterY()-v.getCenterY())-(d.getHeight()/2+v.getHeight()/2);w<=this.repulsionRange&&E<=this.repulsionRange&&y.add(v);}}d.surrounding=[].concat(n(y));}for(b=0;b<d.surrounding.length;b++)this.calcRepulsionForce(d,d.surrounding[b]);},h.prototype.calcRepulsionRange=function(){return 0;},t.exports=h;},function(t,e,r){"use strict";var n=r(1),i=r(4);function a(l,u,h){n.call(this,l,u,h),this.idealLength=i.DEFAULT_EDGE_LENGTH,this.edgeElasticity=i.DEFAULT_SPRING_STRENGTH;}o(a,"FDLayoutEdge"),a.prototype=Object.create(n.prototype);for(var s in n)a[s]=n[s];t.exports=a;},function(t,e,r){"use strict";var n=r(3),i=r(4);function a(l,u,h,f){n.call(this,l,u,h,f),this.nodeRepulsion=i.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[];}o(a,"FDLayoutNode"),a.prototype=Object.create(n.prototype);for(var s in n)a[s]=n[s];a.prototype.setGridCoordinates=function(l,u,h,f){this.startX=l,this.finishX=u,this.startY=h,this.finishY=f;},t.exports=a;},function(t,e,r){"use strict";function n(i,a){this.width=0,this.height=0,i!==null&&a!==null&&(this.height=a,this.width=i);}o(n,"DimensionD"),n.prototype.getWidth=function(){return this.width;},n.prototype.setWidth=function(i){this.width=i;},n.prototype.getHeight=function(){return this.height;},n.prototype.setHeight=function(i){this.height=i;},t.exports=n;},function(t,e,r){"use strict";var n=r(14);function i(){this.map={},this.keys=[];}o(i,"HashMap"),i.prototype.put=function(a,s){var l=n.createID(a);this.contains(l)||(this.map[l]=s,this.keys.push(a));},i.prototype.contains=function(a){var s=n.createID(a);return this.map[a]!=null;},i.prototype.get=function(a){var s=n.createID(a);return this.map[s];},i.prototype.keySet=function(){return this.keys;},t.exports=i;},function(t,e,r){"use strict";var n=r(14);function i(){this.set={};}o(i,"HashSet"),i.prototype.add=function(a){var s=n.createID(a);this.contains(s)||(this.set[s]=a);},i.prototype.remove=function(a){delete this.set[n.createID(a)];},i.prototype.clear=function(){this.set={};},i.prototype.contains=function(a){return this.set[n.createID(a)]==a;},i.prototype.isEmpty=function(){return this.size()===0;},i.prototype.size=function(){return Object.keys(this.set).length;},i.prototype.addAllTo=function(a){for(var s=Object.keys(this.set),l=s.length,u=0;u<l;u++)a.push(this.set[s[u]]);},i.prototype.size=function(){return Object.keys(this.set).length;},i.prototype.addAll=function(a){for(var s=a.length,l=0;l<s;l++){var u=a[l];this.add(u);}},t.exports=i;},function(t,e,r){"use strict";function n(){}o(n,"Matrix"),n.multMat=function(i,a){for(var s=[],l=0;l<i.length;l++){s[l]=[];for(var u=0;u<a[0].length;u++){s[l][u]=0;for(var h=0;h<i[0].length;h++)s[l][u]+=i[l][h]*a[h][u];}}return s;},n.transpose=function(i){for(var a=[],s=0;s<i[0].length;s++){a[s]=[];for(var l=0;l<i.length;l++)a[s][l]=i[l][s];}return a;},n.multCons=function(i,a){for(var s=[],l=0;l<i.length;l++)s[l]=i[l]*a;return s;},n.minusOp=function(i,a){for(var s=[],l=0;l<i.length;l++)s[l]=i[l]-a[l];return s;},n.dotProduct=function(i,a){for(var s=0,l=0;l<i.length;l++)s+=i[l]*a[l];return s;},n.mag=function(i){return Math.sqrt(this.dotProduct(i,i));},n.normalize=function(i){for(var a=[],s=this.mag(i),l=0;l<i.length;l++)a[l]=i[l]/s;return a;},n.multGamma=function(i){for(var a=[],s=0,l=0;l<i.length;l++)s+=i[l];s*=-1/i.length;for(var u=0;u<i.length;u++)a[u]=s+i[u];return a;},n.multL=function(i,a,s){for(var l=[],u=[],h=[],f=0;f<a[0].length;f++){for(var d=0,p=0;p<a.length;p++)d+=-.5*a[p][f]*i[p];u[f]=d;}for(var m=0;m<s.length;m++){for(var g=0,y=0;y<s.length;y++)g+=s[m][y]*u[y];h[m]=g;}for(var v=0;v<a.length;v++){for(var x=0,b=0;b<a[0].length;b++)x+=a[v][b]*h[b];l[v]=x;}return l;},t.exports=n;},function(t,e,r){"use strict";var n=function(){function l(u,h){for(var f=0;f<h.length;f++){var d=h[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(u,d.key,d);}}return o(l,"defineProperties"),function(u,h,f){return h&&l(u.prototype,h),f&&l(u,f),u;};}();function i(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function");}o(i,"_classCallCheck");var a=r(11),s=function(){function l(u,h){i(this,l),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var f=void 0;u instanceof a?f=u.size():f=u.length,this._quicksort(u,0,f-1);}return o(l,"Quicksort"),n(l,[{key:"_quicksort",value:o(function(h,f,d){if(f<d){var p=this._partition(h,f,d);this._quicksort(h,f,p),this._quicksort(h,p+1,d);}},"_quicksort")},{key:"_partition",value:o(function(h,f,d){for(var p=this._get(h,f),m=f,g=d;;){for(;this.compareFunction(p,this._get(h,g));)g--;for(;this.compareFunction(this._get(h,m),p);)m++;if(m<g)this._swap(h,m,g),m++,g--;else return g;}},"_partition")},{key:"_get",value:o(function(h,f){return h instanceof a?h.get_object_at(f):h[f];},"_get")},{key:"_set",value:o(function(h,f,d){h instanceof a?h.set_object_at(f,d):h[f]=d;},"_set")},{key:"_swap",value:o(function(h,f,d){var p=this._get(h,f);this._set(h,f,this._get(h,d)),this._set(h,d,p);},"_swap")},{key:"_defaultCompareFunction",value:o(function(h,f){return f>h;},"_defaultCompareFunction")}]),l;}();t.exports=s;},function(t,e,r){"use strict";function n(){}o(n,"SVD"),n.svd=function(i){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=i.length,this.n=i[0].length;var a=Math.min(this.m,this.n);this.s=function(bt){for(var ht=[];bt-->0;)ht.push(0);return ht;}(Math.min(this.m+1,this.n)),this.U=function(bt){var ht=o(function St(ft){if(ft.length==0)return 0;for(var vt=[],nt=0;nt<ft[0];nt++)vt.push(St(ft.slice(1)));return vt;},"allocate");return ht(bt);}([this.m,a]),this.V=function(bt){var ht=o(function St(ft){if(ft.length==0)return 0;for(var vt=[],nt=0;nt<ft[0];nt++)vt.push(St(ft.slice(1)));return vt;},"allocate");return ht(bt);}([this.n,this.n]);for(var s=function(bt){for(var ht=[];bt-->0;)ht.push(0);return ht;}(this.n),l=function(bt){for(var ht=[];bt-->0;)ht.push(0);return ht;}(this.m),u=!0,h=!0,f=Math.min(this.m-1,this.n),d=Math.max(0,Math.min(this.n-2,this.m)),p=0;p<Math.max(f,d);p++){if(p<f){this.s[p]=0;for(var m=p;m<this.m;m++)this.s[p]=n.hypot(this.s[p],i[m][p]);if(this.s[p]!==0){i[p][p]<0&&(this.s[p]=-this.s[p]);for(var g=p;g<this.m;g++)i[g][p]/=this.s[p];i[p][p]+=1;}this.s[p]=-this.s[p];}for(var y=p+1;y<this.n;y++){if(function(bt,ht){return bt&&ht;}(p<f,this.s[p]!==0)){for(var v=0,x=p;x<this.m;x++)v+=i[x][p]*i[x][y];v=-v/i[p][p];for(var b=p;b<this.m;b++)i[b][y]+=v*i[b][p];}s[y]=i[p][y];}if(function(bt,ht){return bt&&ht;}(u,p<f))for(var T=p;T<this.m;T++)this.U[T][p]=i[T][p];if(p<d){s[p]=0;for(var C=p+1;C<this.n;C++)s[p]=n.hypot(s[p],s[C]);if(s[p]!==0){s[p+1]<0&&(s[p]=-s[p]);for(var w=p+1;w<this.n;w++)s[w]/=s[p];s[p+1]+=1;}if(s[p]=-s[p],function(bt,ht){return bt&&ht;}(p+1<this.m,s[p]!==0)){for(var E=p+1;E<this.m;E++)l[E]=0;for(var _=p+1;_<this.n;_++)for(var A=p+1;A<this.m;A++)l[A]+=s[_]*i[A][_];for(var D=p+1;D<this.n;D++)for(var O=-s[D]/s[p+1],R=p+1;R<this.m;R++)i[R][D]+=O*l[R];}if(h)for(var k=p+1;k<this.n;k++)this.V[k][p]=s[k];}}var L=Math.min(this.n,this.m+1);if(f<this.n&&(this.s[f]=i[f][f]),this.m<L&&(this.s[L-1]=0),d+1<L&&(s[d]=i[d][L-1]),s[L-1]=0,u){for(var S=f;S<a;S++){for(var I=0;I<this.m;I++)this.U[I][S]=0;this.U[S][S]=1;}for(var M=f-1;M>=0;M--)if(this.s[M]!==0){for(var P=M+1;P<a;P++){for(var B=0,F=M;F<this.m;F++)B+=this.U[F][M]*this.U[F][P];B=-B/this.U[M][M];for(var z=M;z<this.m;z++)this.U[z][P]+=B*this.U[z][M];}for(var $=M;$<this.m;$++)this.U[$][M]=-this.U[$][M];this.U[M][M]=1+this.U[M][M];for(var U=0;U<M-1;U++)this.U[U][M]=0;}else{for(var K=0;K<this.m;K++)this.U[K][M]=0;this.U[M][M]=1;}}if(h)for(var ee=this.n-1;ee>=0;ee--){if(function(bt,ht){return bt&&ht;}(ee<d,s[ee]!==0))for(var Y=ee+1;Y<a;Y++){for(var ce=0,Z=ee+1;Z<this.n;Z++)ce+=this.V[Z][ee]*this.V[Z][Y];ce=-ce/this.V[ee+1][ee];for(var ue=ee+1;ue<this.n;ue++)this.V[ue][Y]+=ce*this.V[ue][ee];}for(var Q=0;Q<this.n;Q++)this.V[Q][ee]=0;this.V[ee][ee]=1;}for(var j=L-1,ne=0,te=Math.pow(2,-52),he=Math.pow(2,-966);L>0;){var le=void 0,J=void 0;for(le=L-2;le>=-1&&le!==-1;le--)if(Math.abs(s[le])<=he+te*(Math.abs(this.s[le])+Math.abs(this.s[le+1]))){s[le]=0;break;}if(le===L-2)J=4;else{var Se=void 0;for(Se=L-1;Se>=le&&Se!==le;Se--){var se=(Se!==L?Math.abs(s[Se]):0)+(Se!==le+1?Math.abs(s[Se-1]):0);if(Math.abs(this.s[Se])<=he+te*se){this.s[Se]=0;break;}}Se===le?J=3:Se===L-1?J=1:(J=2,le=Se);}switch(le++,J){case 1:{var ae=s[L-2];s[L-2]=0;for(var Oe=L-2;Oe>=le;Oe--){var ye=n.hypot(this.s[Oe],ae),Be=this.s[Oe]/ye,He=ae/ye;if(this.s[Oe]=ye,Oe!==le&&(ae=-He*s[Oe-1],s[Oe-1]=Be*s[Oe-1]),h)for(var ze=0;ze<this.n;ze++)ye=Be*this.V[ze][Oe]+He*this.V[ze][L-1],this.V[ze][L-1]=-He*this.V[ze][Oe]+Be*this.V[ze][L-1],this.V[ze][Oe]=ye;}}break;case 2:{var Le=s[le-1];s[le-1]=0;for(var Ie=le;Ie<L;Ie++){var xe=n.hypot(this.s[Ie],Le),q=this.s[Ie]/xe,de=Le/xe;if(this.s[Ie]=xe,Le=-de*s[Ie],s[Ie]=q*s[Ie],u)for(var ie=0;ie<this.m;ie++)xe=q*this.U[ie][Ie]+de*this.U[ie][le-1],this.U[ie][le-1]=-de*this.U[ie][Ie]+q*this.U[ie][le-1],this.U[ie][Ie]=xe;}}break;case 3:{var oe=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[L-1]),Math.abs(this.s[L-2])),Math.abs(s[L-2])),Math.abs(this.s[le])),Math.abs(s[le])),V=this.s[L-1]/oe,Te=this.s[L-2]/oe,W=s[L-2]/oe,pe=this.s[le]/oe,ve=s[le]/oe,Pe=((Te+V)*(Te-V)+W*W)/2,_e=V*W*(V*W),be=0;(function(bt,ht){return bt||ht;})(Pe!==0,_e!==0)&&(be=Math.sqrt(Pe*Pe+_e),Pe<0&&(be=-be),be=_e/(Pe+be));for(var Ve=(pe+V)*(pe-V)+be,De=pe*ve,Ye=le;Ye<L-1;Ye++){var at=n.hypot(Ve,De),Rt=Ve/at,st=De/at;if(Ye!==le&&(s[Ye-1]=at),Ve=Rt*this.s[Ye]+st*s[Ye],s[Ye]=Rt*s[Ye]-st*this.s[Ye],De=st*this.s[Ye+1],this.s[Ye+1]=Rt*this.s[Ye+1],h)for(var Ue=0;Ue<this.n;Ue++)at=Rt*this.V[Ue][Ye]+st*this.V[Ue][Ye+1],this.V[Ue][Ye+1]=-st*this.V[Ue][Ye]+Rt*this.V[Ue][Ye+1],this.V[Ue][Ye]=at;if(at=n.hypot(Ve,De),Rt=Ve/at,st=De/at,this.s[Ye]=at,Ve=Rt*s[Ye]+st*this.s[Ye+1],this.s[Ye+1]=-st*s[Ye]+Rt*this.s[Ye+1],De=st*s[Ye+1],s[Ye+1]=Rt*s[Ye+1],u&&Ye<this.m-1)for(var ut=0;ut<this.m;ut++)at=Rt*this.U[ut][Ye]+st*this.U[ut][Ye+1],this.U[ut][Ye+1]=-st*this.U[ut][Ye]+Rt*this.U[ut][Ye+1],this.U[ut][Ye]=at;}s[L-2]=Ve,ne=ne+1;}break;case 4:{if(this.s[le]<=0&&(this.s[le]=this.s[le]<0?-this.s[le]:0,h))for(var We=0;We<=j;We++)this.V[We][le]=-this.V[We][le];for(;le<j&&!(this.s[le]>=this.s[le+1]);){var lt=this.s[le];if(this.s[le]=this.s[le+1],this.s[le+1]=lt,h&&le<this.n-1)for(var Xt=0;Xt<this.n;Xt++)lt=this.V[Xt][le+1],this.V[Xt][le+1]=this.V[Xt][le],this.V[Xt][le]=lt;if(u&&le<this.m-1)for(var Tt=0;Tt<this.m;Tt++)lt=this.U[Tt][le+1],this.U[Tt][le+1]=this.U[Tt][le],this.U[Tt][le]=lt;le++;}ne=0,L--;}break;}}var Mt={U:this.U,V:this.V,S:this.s};return Mt;},n.hypot=function(i,a){var s=void 0;return Math.abs(i)>Math.abs(a)?(s=a/i,s=Math.abs(i)*Math.sqrt(1+s*s)):a!=0?(s=i/a,s=Math.abs(a)*Math.sqrt(1+s*s)):s=0,s;},t.exports=n;},function(t,e,r){"use strict";var n=function(){function s(l,u){for(var h=0;h<u.length;h++){var f=u[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(l,f.key,f);}}return o(s,"defineProperties"),function(l,u,h){return u&&s(l.prototype,u),h&&s(l,h),l;};}();function i(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function");}o(i,"_classCallCheck");var a=function(){function s(l,u){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,s),this.sequence1=l,this.sequence2=u,this.match_score=h,this.mismatch_penalty=f,this.gap_penalty=d,this.iMax=l.length+1,this.jMax=u.length+1,this.grid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.grid[p]=new Array(this.jMax);for(var m=0;m<this.jMax;m++)this.grid[p][m]=0;}this.tracebackGrid=new Array(this.iMax);for(var g=0;g<this.iMax;g++){this.tracebackGrid[g]=new Array(this.jMax);for(var y=0;y<this.jMax;y++)this.tracebackGrid[g][y]=[null,null,null];}this.alignments=[],this.score=-1,this.computeGrids();}return o(s,"NeedlemanWunsch"),n(s,[{key:"getScore",value:o(function(){return this.score;},"getScore")},{key:"getAlignments",value:o(function(){return this.alignments;},"getAlignments")},{key:"computeGrids",value:o(function(){for(var u=1;u<this.jMax;u++)this.grid[0][u]=this.grid[0][u-1]+this.gap_penalty,this.tracebackGrid[0][u]=[!1,!1,!0];for(var h=1;h<this.iMax;h++)this.grid[h][0]=this.grid[h-1][0]+this.gap_penalty,this.tracebackGrid[h][0]=[!1,!0,!1];for(var f=1;f<this.iMax;f++)for(var d=1;d<this.jMax;d++){var p=void 0;this.sequence1[f-1]===this.sequence2[d-1]?p=this.grid[f-1][d-1]+this.match_score:p=this.grid[f-1][d-1]+this.mismatch_penalty;var m=this.grid[f-1][d]+this.gap_penalty,g=this.grid[f][d-1]+this.gap_penalty,y=[p,m,g],v=this.arrayAllMaxIndexes(y);this.grid[f][d]=y[v[0]],this.tracebackGrid[f][d]=[v.includes(0),v.includes(1),v.includes(2)];}this.score=this.grid[this.iMax-1][this.jMax-1];},"computeGrids")},{key:"alignmentTraceback",value:o(function(){var u=[];for(u.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});u[0];){var h=u[0],f=this.tracebackGrid[h.pos[0]][h.pos[1]];f[0]&&u.push({pos:[h.pos[0]-1,h.pos[1]-1],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),f[1]&&u.push({pos:[h.pos[0]-1,h.pos[1]],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:"-"+h.seq2}),f[2]&&u.push({pos:[h.pos[0],h.pos[1]-1],seq1:"-"+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),h.pos[0]===0&&h.pos[1]===0&&this.alignments.push({sequence1:h.seq1,sequence2:h.seq2}),u.shift();}return this.alignments;},"alignmentTraceback")},{key:"getAllIndexes",value:o(function(u,h){for(var f=[],d=-1;(d=u.indexOf(h,d+1))!==-1;)f.push(d);return f;},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:o(function(u){return this.getAllIndexes(u,Math.max.apply(null,u));},"arrayAllMaxIndexes")}]),s;}();t.exports=a;},function(t,e,r){"use strict";var n=o(function(){},"layoutBase");n.FDLayout=r(18),n.FDLayoutConstants=r(4),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(5),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(25),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(6),n.LEdge=r(1),n.LGraphManager=r(7),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(27),n.Matrix=r(24),n.SVD=r(26),t.exports=n;},function(t,e,r){"use strict";function n(){this.listeners=[];}o(n,"Emitter");var i=n.prototype;i.addListener=function(a,s){this.listeners.push({event:a,callback:s});},i.removeListener=function(a,s){for(var l=this.listeners.length;l>=0;l--){var u=this.listeners[l];u.event===a&&u.callback===s&&this.listeners.splice(l,1);}},i.emit=function(a,s){for(var l=0;l<this.listeners.length;l++){var u=this.listeners[l];a===u.event&&u.callback(s);}},t.exports=n;}]);});});var ZF=Ii((N4,QF)=>{"use strict";o(function(e,r){typeof N4=="object"&&typeof QF=="object"?QF.exports=r(KF()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof N4=="object"?N4.coseBase=r(KF()):e.coseBase=r(e.layoutBase);},"webpackUniversalModuleDefinition")(N4,function(t){return(()=>{"use strict";var e={45:(a,s,l)=>{var u={};u.layoutBase=l(551),u.CoSEConstants=l(806),u.CoSEEdge=l(767),u.CoSEGraph=l(880),u.CoSEGraphManager=l(578),u.CoSELayout=l(765),u.CoSENode=l(991),u.ConstraintHandler=l(902),a.exports=u;},806:(a,s,l)=>{var u=l(551).FDLayoutConstants;function h(){}o(h,"CoSEConstants");for(var f in u)h[f]=u[f];h.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,h.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH,h.DEFAULT_COMPONENT_SEPERATION=60,h.TILE=!0,h.TILING_PADDING_VERTICAL=10,h.TILING_PADDING_HORIZONTAL=10,h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0,h.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,h.TREE_REDUCTION_ON_INCREMENTAL=!0,h.PURE_INCREMENTAL=h.DEFAULT_INCREMENTAL,a.exports=h;},767:(a,s,l)=>{var u=l(551).FDLayoutEdge;function h(d,p,m){u.call(this,d,p,m);}o(h,"CoSEEdge"),h.prototype=Object.create(u.prototype);for(var f in u)h[f]=u[f];a.exports=h;},880:(a,s,l)=>{var u=l(551).LGraph;function h(d,p,m){u.call(this,d,p,m);}o(h,"CoSEGraph"),h.prototype=Object.create(u.prototype);for(var f in u)h[f]=u[f];a.exports=h;},578:(a,s,l)=>{var u=l(551).LGraphManager;function h(d){u.call(this,d);}o(h,"CoSEGraphManager"),h.prototype=Object.create(u.prototype);for(var f in u)h[f]=u[f];a.exports=h;},765:(a,s,l)=>{var u=l(551).FDLayout,h=l(578),f=l(880),d=l(991),p=l(767),m=l(806),g=l(902),y=l(551).FDLayoutConstants,v=l(551).LayoutConstants,x=l(551).Point,b=l(551).PointD,T=l(551).DimensionD,C=l(551).Layout,w=l(551).Integer,E=l(551).IGeometry,_=l(551).LGraph,A=l(551).Transform,D=l(551).LinkedList;function O(){u.call(this),this.toBeTiled={},this.constraints={};}o(O,"CoSELayout"),O.prototype=Object.create(u.prototype);for(var R in u)O[R]=u[R];O.prototype.newGraphManager=function(){var k=new h(this);return this.graphManager=k,k;},O.prototype.newGraph=function(k){return new f(null,this.graphManager,k);},O.prototype.newNode=function(k){return new d(this.graphManager,k);},O.prototype.newEdge=function(k){return new p(null,null,k);},O.prototype.initParameters=function(){u.prototype.initParameters.call(this,arguments),this.isSubLayout||(m.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=m.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=m.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=y.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=y.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=y.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=y.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1);},O.prototype.initSpringEmbedder=function(){u.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/y.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1;},O.prototype.layout=function(){var k=v.DEFAULT_CREATE_BENDS_AS_NEEDED;return k&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout();},O.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(m.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var L=new Set(this.getAllNodes()),S=this.nodesWithGravity.filter(function(P){return L.has(P);});this.graphManager.setAllNodesToApplyGravitation(S);}}else{var k=this.getFlatForest();if(k.length>0)this.positionNodesRadially(k);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var L=new Set(this.getAllNodes()),S=this.nodesWithGravity.filter(function(I){return L.has(I);});this.graphManager.setAllNodesToApplyGravitation(S),this.positionNodesRandomly();}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),m.APPLY_LAYOUT&&this.runSpringEmbedder(),!0;},O.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%y.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor));}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var k=new Set(this.getAllNodes()),L=this.nodesWithGravity.filter(function(M){return k.has(M);});this.graphManager.setAllNodesToApplyGravitation(L),this.graphManager.updateBounds(),this.updateGrid(),m.PURE_INCREMENTAL?this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL;}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++;}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),m.PURE_INCREMENTAL?this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++;}var S=!this.isTreeGrowing&&!this.isGrowthFinished,I=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(S,I),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1;},O.prototype.getPositionsData=function(){for(var k=this.graphManager.getAllNodes(),L={},S=0;S<k.length;S++){var I=k[S].rect,M=k[S].id;L[M]={id:M,x:I.getCenterX(),y:I.getCenterY(),w:I.width,h:I.height};}return L;},O.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var k=!1;if(y.ANIMATE==="during")this.emit("layoutstarted");else{for(;!k;)k=this.tick();this.graphManager.updateBounds();}},O.prototype.moveNodes=function(){for(var k=this.getAllNodes(),L,S=0;S<k.length;S++)L=k[S],L.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var S=0;S<k.length;S++)L=k[S],L.move();},O.prototype.initConstraintVariables=function(){var k=this;this.idToNodeMap=new Map(),this.fixedNodeSet=new Set();for(var L=this.graphManager.getAllNodes(),S=0;S<L.length;S++){var I=L[S];this.idToNodeMap.set(I.id,I);}var M=o(function Z(ue){for(var Q=ue.getChild().getNodes(),j,ne=0,te=0;te<Q.length;te++)j=Q[te],j.getChild()==null?k.fixedNodeSet.has(j.id)&&(ne+=100):ne+=Z(j);return ne;},"calculateCompoundWeight");if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(Q){k.fixedNodeSet.add(Q.nodeId);});for(var L=this.graphManager.getAllNodes(),I,S=0;S<L.length;S++)if(I=L[S],I.getChild()!=null){var P=M(I);P>0&&(I.fixedNodeWeight=P);}}if(this.constraints.relativePlacementConstraint){var B=new Map(),F=new Map();if(this.dummyToNodeForVerticalAlignment=new Map(),this.dummyToNodeForHorizontalAlignment=new Map(),this.fixedNodesOnHorizontal=new Set(),this.fixedNodesOnVertical=new Set(),this.fixedNodeSet.forEach(function(Z){k.fixedNodesOnHorizontal.add(Z),k.fixedNodesOnVertical.add(Z);}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var z=this.constraints.alignmentConstraint.vertical,S=0;S<z.length;S++)this.dummyToNodeForVerticalAlignment.set("dummy"+S,[]),z[S].forEach(function(ue){B.set(ue,"dummy"+S),k.dummyToNodeForVerticalAlignment.get("dummy"+S).push(ue),k.fixedNodeSet.has(ue)&&k.fixedNodesOnHorizontal.add("dummy"+S);});if(this.constraints.alignmentConstraint.horizontal)for(var $=this.constraints.alignmentConstraint.horizontal,S=0;S<$.length;S++)this.dummyToNodeForHorizontalAlignment.set("dummy"+S,[]),$[S].forEach(function(ue){F.set(ue,"dummy"+S),k.dummyToNodeForHorizontalAlignment.get("dummy"+S).push(ue),k.fixedNodeSet.has(ue)&&k.fixedNodesOnVertical.add("dummy"+S);});}if(m.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(Z){var ue,Q,j;for(j=Z.length-1;j>=2*Z.length/3;j--)ue=Math.floor(Math.random()*(j+1)),Q=Z[j],Z[j]=Z[ue],Z[ue]=Q;return Z;},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map(),this.nodeToRelativeConstraintMapVertical=new Map(),this.nodeToTempPositionMapHorizontal=new Map(),this.nodeToTempPositionMapVertical=new Map(),this.constraints.relativePlacementConstraint.forEach(function(Z){if(Z.left){var ue=B.has(Z.left)?B.get(Z.left):Z.left,Q=B.has(Z.right)?B.get(Z.right):Z.right;k.nodesInRelativeHorizontal.includes(ue)||(k.nodesInRelativeHorizontal.push(ue),k.nodeToRelativeConstraintMapHorizontal.set(ue,[]),k.dummyToNodeForVerticalAlignment.has(ue)?k.nodeToTempPositionMapHorizontal.set(ue,k.idToNodeMap.get(k.dummyToNodeForVerticalAlignment.get(ue)[0]).getCenterX()):k.nodeToTempPositionMapHorizontal.set(ue,k.idToNodeMap.get(ue).getCenterX())),k.nodesInRelativeHorizontal.includes(Q)||(k.nodesInRelativeHorizontal.push(Q),k.nodeToRelativeConstraintMapHorizontal.set(Q,[]),k.dummyToNodeForVerticalAlignment.has(Q)?k.nodeToTempPositionMapHorizontal.set(Q,k.idToNodeMap.get(k.dummyToNodeForVerticalAlignment.get(Q)[0]).getCenterX()):k.nodeToTempPositionMapHorizontal.set(Q,k.idToNodeMap.get(Q).getCenterX())),k.nodeToRelativeConstraintMapHorizontal.get(ue).push({right:Q,gap:Z.gap}),k.nodeToRelativeConstraintMapHorizontal.get(Q).push({left:ue,gap:Z.gap});}else{var j=F.has(Z.top)?F.get(Z.top):Z.top,ne=F.has(Z.bottom)?F.get(Z.bottom):Z.bottom;k.nodesInRelativeVertical.includes(j)||(k.nodesInRelativeVertical.push(j),k.nodeToRelativeConstraintMapVertical.set(j,[]),k.dummyToNodeForHorizontalAlignment.has(j)?k.nodeToTempPositionMapVertical.set(j,k.idToNodeMap.get(k.dummyToNodeForHorizontalAlignment.get(j)[0]).getCenterY()):k.nodeToTempPositionMapVertical.set(j,k.idToNodeMap.get(j).getCenterY())),k.nodesInRelativeVertical.includes(ne)||(k.nodesInRelativeVertical.push(ne),k.nodeToRelativeConstraintMapVertical.set(ne,[]),k.dummyToNodeForHorizontalAlignment.has(ne)?k.nodeToTempPositionMapVertical.set(ne,k.idToNodeMap.get(k.dummyToNodeForHorizontalAlignment.get(ne)[0]).getCenterY()):k.nodeToTempPositionMapVertical.set(ne,k.idToNodeMap.get(ne).getCenterY())),k.nodeToRelativeConstraintMapVertical.get(j).push({bottom:ne,gap:Z.gap}),k.nodeToRelativeConstraintMapVertical.get(ne).push({top:j,gap:Z.gap});}});else{var U=new Map(),K=new Map();this.constraints.relativePlacementConstraint.forEach(function(Z){if(Z.left){var ue=B.has(Z.left)?B.get(Z.left):Z.left,Q=B.has(Z.right)?B.get(Z.right):Z.right;U.has(ue)?U.get(ue).push(Q):U.set(ue,[Q]),U.has(Q)?U.get(Q).push(ue):U.set(Q,[ue]);}else{var j=F.has(Z.top)?F.get(Z.top):Z.top,ne=F.has(Z.bottom)?F.get(Z.bottom):Z.bottom;K.has(j)?K.get(j).push(ne):K.set(j,[ne]),K.has(ne)?K.get(ne).push(j):K.set(ne,[j]);}});var ee=o(function(ue,Q){var j=[],ne=[],te=new D(),he=new Set(),le=0;return ue.forEach(function(J,Se){if(!he.has(Se)){j[le]=[],ne[le]=!1;var se=Se;for(te.push(se),he.add(se),j[le].push(se);te.length!=0;){se=te.shift(),Q.has(se)&&(ne[le]=!0);var ae=ue.get(se);ae.forEach(function(Oe){he.has(Oe)||(te.push(Oe),he.add(Oe),j[le].push(Oe));});}le++;}}),{components:j,isFixed:ne};},"constructComponents"),Y=ee(U,k.fixedNodesOnHorizontal);this.componentsOnHorizontal=Y.components,this.fixedComponentsOnHorizontal=Y.isFixed;var ce=ee(K,k.fixedNodesOnVertical);this.componentsOnVertical=ce.components,this.fixedComponentsOnVertical=ce.isFixed;}}},O.prototype.updateDisplacements=function(){var k=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(ce){var Z=k.idToNodeMap.get(ce.nodeId);Z.displacementX=0,Z.displacementY=0;}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var L=this.constraints.alignmentConstraint.vertical,S=0;S<L.length;S++){for(var I=0,M=0;M<L[S].length;M++){if(this.fixedNodeSet.has(L[S][M])){I=0;break;}I+=this.idToNodeMap.get(L[S][M]).displacementX;}for(var P=I/L[S].length,M=0;M<L[S].length;M++)this.idToNodeMap.get(L[S][M]).displacementX=P;}if(this.constraints.alignmentConstraint.horizontal)for(var B=this.constraints.alignmentConstraint.horizontal,S=0;S<B.length;S++){for(var F=0,M=0;M<B[S].length;M++){if(this.fixedNodeSet.has(B[S][M])){F=0;break;}F+=this.idToNodeMap.get(B[S][M]).displacementY;}for(var z=F/B[S].length,M=0;M<B[S].length;M++)this.idToNodeMap.get(B[S][M]).displacementY=z;}}if(this.constraints.relativePlacementConstraint)if(m.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(ce){if(!k.fixedNodesOnHorizontal.has(ce)){var Z=0;k.dummyToNodeForVerticalAlignment.has(ce)?Z=k.idToNodeMap.get(k.dummyToNodeForVerticalAlignment.get(ce)[0]).displacementX:Z=k.idToNodeMap.get(ce).displacementX,k.nodeToRelativeConstraintMapHorizontal.get(ce).forEach(function(ue){if(ue.right){var Q=k.nodeToTempPositionMapHorizontal.get(ue.right)-k.nodeToTempPositionMapHorizontal.get(ce)-Z;Q<ue.gap&&(Z-=ue.gap-Q);}else{var Q=k.nodeToTempPositionMapHorizontal.get(ce)-k.nodeToTempPositionMapHorizontal.get(ue.left)+Z;Q<ue.gap&&(Z+=ue.gap-Q);}}),k.nodeToTempPositionMapHorizontal.set(ce,k.nodeToTempPositionMapHorizontal.get(ce)+Z),k.dummyToNodeForVerticalAlignment.has(ce)?k.dummyToNodeForVerticalAlignment.get(ce).forEach(function(ue){k.idToNodeMap.get(ue).displacementX=Z;}):k.idToNodeMap.get(ce).displacementX=Z;}}),this.nodesInRelativeVertical.forEach(function(ce){if(!k.fixedNodesOnHorizontal.has(ce)){var Z=0;k.dummyToNodeForHorizontalAlignment.has(ce)?Z=k.idToNodeMap.get(k.dummyToNodeForHorizontalAlignment.get(ce)[0]).displacementY:Z=k.idToNodeMap.get(ce).displacementY,k.nodeToRelativeConstraintMapVertical.get(ce).forEach(function(ue){if(ue.bottom){var Q=k.nodeToTempPositionMapVertical.get(ue.bottom)-k.nodeToTempPositionMapVertical.get(ce)-Z;Q<ue.gap&&(Z-=ue.gap-Q);}else{var Q=k.nodeToTempPositionMapVertical.get(ce)-k.nodeToTempPositionMapVertical.get(ue.top)+Z;Q<ue.gap&&(Z+=ue.gap-Q);}}),k.nodeToTempPositionMapVertical.set(ce,k.nodeToTempPositionMapVertical.get(ce)+Z),k.dummyToNodeForHorizontalAlignment.has(ce)?k.dummyToNodeForHorizontalAlignment.get(ce).forEach(function(ue){k.idToNodeMap.get(ue).displacementY=Z;}):k.idToNodeMap.get(ce).displacementY=Z;}});else{for(var S=0;S<this.componentsOnHorizontal.length;S++){var $=this.componentsOnHorizontal[S];if(this.fixedComponentsOnHorizontal[S])for(var M=0;M<$.length;M++)this.dummyToNodeForVerticalAlignment.has($[M])?this.dummyToNodeForVerticalAlignment.get($[M]).forEach(function(ue){k.idToNodeMap.get(ue).displacementX=0;}):this.idToNodeMap.get($[M]).displacementX=0;else{for(var U=0,K=0,M=0;M<$.length;M++)if(this.dummyToNodeForVerticalAlignment.has($[M])){var ee=this.dummyToNodeForVerticalAlignment.get($[M]);U+=ee.length*this.idToNodeMap.get(ee[0]).displacementX,K+=ee.length;}else U+=this.idToNodeMap.get($[M]).displacementX,K++;for(var Y=U/K,M=0;M<$.length;M++)this.dummyToNodeForVerticalAlignment.has($[M])?this.dummyToNodeForVerticalAlignment.get($[M]).forEach(function(ue){k.idToNodeMap.get(ue).displacementX=Y;}):this.idToNodeMap.get($[M]).displacementX=Y;}}for(var S=0;S<this.componentsOnVertical.length;S++){var $=this.componentsOnVertical[S];if(this.fixedComponentsOnVertical[S])for(var M=0;M<$.length;M++)this.dummyToNodeForHorizontalAlignment.has($[M])?this.dummyToNodeForHorizontalAlignment.get($[M]).forEach(function(Q){k.idToNodeMap.get(Q).displacementY=0;}):this.idToNodeMap.get($[M]).displacementY=0;else{for(var U=0,K=0,M=0;M<$.length;M++)if(this.dummyToNodeForHorizontalAlignment.has($[M])){var ee=this.dummyToNodeForHorizontalAlignment.get($[M]);U+=ee.length*this.idToNodeMap.get(ee[0]).displacementY,K+=ee.length;}else U+=this.idToNodeMap.get($[M]).displacementY,K++;for(var Y=U/K,M=0;M<$.length;M++)this.dummyToNodeForHorizontalAlignment.has($[M])?this.dummyToNodeForHorizontalAlignment.get($[M]).forEach(function(te){k.idToNodeMap.get(te).displacementY=Y;}):this.idToNodeMap.get($[M]).displacementY=Y;}}}},O.prototype.calculateNodesToApplyGravitationTo=function(){var k=[],L,S=this.graphManager.getGraphs(),I=S.length,M;for(M=0;M<I;M++)L=S[M],L.updateConnected(),L.isConnected||(k=k.concat(L.getNodes()));return k;},O.prototype.createBendpoints=function(){var k=[];k=k.concat(this.graphManager.getAllEdges());var L=new Set(),S;for(S=0;S<k.length;S++){var I=k[S];if(!L.has(I)){var M=I.getSource(),P=I.getTarget();if(M==P)I.getBendpoints().push(new b()),I.getBendpoints().push(new b()),this.createDummyNodesForBendpoints(I),L.add(I);else{var B=[];if(B=B.concat(M.getEdgeListToNode(P)),B=B.concat(P.getEdgeListToNode(M)),!L.has(B[0])){if(B.length>1){var F;for(F=0;F<B.length;F++){var z=B[F];z.getBendpoints().push(new b()),this.createDummyNodesForBendpoints(z);}}B.forEach(function($){L.add($);});}}}if(L.size==k.length)break;}},O.prototype.positionNodesRadially=function(k){for(var L=new x(0,0),S=Math.ceil(Math.sqrt(k.length)),I=0,M=0,P=0,B=new b(0,0),F=0;F<k.length;F++){F%S==0&&(P=0,M=I,F!=0&&(M+=m.DEFAULT_COMPONENT_SEPERATION),I=0);var z=k[F],$=C.findCenterOfTree(z);L.x=P,L.y=M,B=O.radialLayout(z,$,L),B.y>I&&(I=Math.floor(B.y)),P=Math.floor(B.x+m.DEFAULT_COMPONENT_SEPERATION);}this.transform(new b(v.WORLD_CENTER_X-B.x/2,v.WORLD_CENTER_Y-B.y/2));},O.radialLayout=function(k,L,S){var I=Math.max(this.maxDiagonalInTree(k),m.DEFAULT_RADIAL_SEPARATION);O.branchRadialLayout(L,null,0,359,0,I);var M=_.calculateBounds(k),P=new A();P.setDeviceOrgX(M.getMinX()),P.setDeviceOrgY(M.getMinY()),P.setWorldOrgX(S.x),P.setWorldOrgY(S.y);for(var B=0;B<k.length;B++){var F=k[B];F.transform(P);}var z=new b(M.getMaxX(),M.getMaxY());return P.inverseTransformPoint(z);},O.branchRadialLayout=function(k,L,S,I,M,P){var B=(I-S+1)/2;B<0&&(B+=180);var F=(B+S)%360,z=F*E.TWO_PI/360,$=Math.cos(z),U=M*Math.cos(z),K=M*Math.sin(z);k.setCenter(U,K);var ee=[];ee=ee.concat(k.getEdges());var Y=ee.length;L!=null&&Y--;for(var ce=0,Z=ee.length,ue,Q=k.getEdgesBetween(L);Q.length>1;){var j=Q[0];Q.splice(0,1);var ne=ee.indexOf(j);ne>=0&&ee.splice(ne,1),Z--,Y--;}L!=null?ue=(ee.indexOf(Q[0])+1)%Z:ue=0;for(var te=Math.abs(I-S)/Y,he=ue;ce!=Y;he=++he%Z){var le=ee[he].getOtherEnd(k);if(le!=L){var J=(S+ce*te)%360,Se=(J+te)%360;O.branchRadialLayout(le,k,J,Se,M+P,P),ce++;}}},O.maxDiagonalInTree=function(k){for(var L=w.MIN_VALUE,S=0;S<k.length;S++){var I=k[S],M=I.getDiagonal();M>L&&(L=M);}return L;},O.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength;},O.prototype.groupZeroDegreeMembers=function(){var k=this,L={};this.memberGroups={},this.idToDummyNode={};for(var S=[],I=this.graphManager.getAllNodes(),M=0;M<I.length;M++){var P=I[M],B=P.getParent();this.getNodeDegreeWithChildren(P)===0&&(B.id==null||!this.getToBeTiled(B))&&S.push(P);}for(var M=0;M<S.length;M++){var P=S[M],F=P.getParent().id;typeof L[F]>"u"&&(L[F]=[]),L[F]=L[F].concat(P);}Object.keys(L).forEach(function(z){if(L[z].length>1){var $="DummyCompound_"+z;k.memberGroups[$]=L[z];var U=L[z][0].getParent(),K=new d(k.graphManager);K.id=$,K.paddingLeft=U.paddingLeft||0,K.paddingRight=U.paddingRight||0,K.paddingBottom=U.paddingBottom||0,K.paddingTop=U.paddingTop||0,k.idToDummyNode[$]=K;var ee=k.getGraphManager().add(k.newGraph(),K),Y=U.getChild();Y.add(K);for(var ce=0;ce<L[z].length;ce++){var Z=L[z][ce];Y.remove(Z),ee.add(Z);}}});},O.prototype.clearCompounds=function(){var k={},L={};this.performDFSOnCompounds();for(var S=0;S<this.compoundOrder.length;S++)L[this.compoundOrder[S].id]=this.compoundOrder[S],k[this.compoundOrder[S].id]=[].concat(this.compoundOrder[S].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[S].getChild()),this.compoundOrder[S].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(k,L);},O.prototype.clearZeroDegreeMembers=function(){var k=this,L=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(S){var I=k.idToDummyNode[S];if(L[S]=k.tileNodes(k.memberGroups[S],I.paddingLeft+I.paddingRight),I.rect.width=L[S].width,I.rect.height=L[S].height,I.setCenter(L[S].centerX,L[S].centerY),I.labelMarginLeft=0,I.labelMarginTop=0,m.NODE_DIMENSIONS_INCLUDE_LABELS){var M=I.rect.width,P=I.rect.height;I.labelWidth&&(I.labelPosHorizontal=="left"?(I.rect.x-=I.labelWidth,I.setWidth(M+I.labelWidth),I.labelMarginLeft=I.labelWidth):I.labelPosHorizontal=="center"&&I.labelWidth>M?(I.rect.x-=(I.labelWidth-M)/2,I.setWidth(I.labelWidth),I.labelMarginLeft=(I.labelWidth-M)/2):I.labelPosHorizontal=="right"&&I.setWidth(M+I.labelWidth)),I.labelHeight&&(I.labelPosVertical=="top"?(I.rect.y-=I.labelHeight,I.setHeight(P+I.labelHeight),I.labelMarginTop=I.labelHeight):I.labelPosVertical=="center"&&I.labelHeight>P?(I.rect.y-=(I.labelHeight-P)/2,I.setHeight(I.labelHeight),I.labelMarginTop=(I.labelHeight-P)/2):I.labelPosVertical=="bottom"&&I.setHeight(P+I.labelHeight));}});},O.prototype.repopulateCompounds=function(){for(var k=this.compoundOrder.length-1;k>=0;k--){var L=this.compoundOrder[k],S=L.id,I=L.paddingLeft,M=L.paddingTop,P=L.labelMarginLeft,B=L.labelMarginTop;this.adjustLocations(this.tiledMemberPack[S],L.rect.x,L.rect.y,I,M,P,B);}},O.prototype.repopulateZeroDegreeMembers=function(){var k=this,L=this.tiledZeroDegreePack;Object.keys(L).forEach(function(S){var I=k.idToDummyNode[S],M=I.paddingLeft,P=I.paddingTop,B=I.labelMarginLeft,F=I.labelMarginTop;k.adjustLocations(L[S],I.rect.x,I.rect.y,M,P,B,F);});},O.prototype.getToBeTiled=function(k){var L=k.id;if(this.toBeTiled[L]!=null)return this.toBeTiled[L];var S=k.getChild();if(S==null)return this.toBeTiled[L]=!1,!1;for(var I=S.getNodes(),M=0;M<I.length;M++){var P=I[M];if(this.getNodeDegree(P)>0)return this.toBeTiled[L]=!1,!1;if(P.getChild()==null){this.toBeTiled[P.id]=!1;continue;}if(!this.getToBeTiled(P))return this.toBeTiled[L]=!1,!1;}return this.toBeTiled[L]=!0,!0;},O.prototype.getNodeDegree=function(k){for(var L=k.id,S=k.getEdges(),I=0,M=0;M<S.length;M++){var P=S[M];P.getSource().id!==P.getTarget().id&&(I=I+1);}return I;},O.prototype.getNodeDegreeWithChildren=function(k){var L=this.getNodeDegree(k);if(k.getChild()==null)return L;for(var S=k.getChild().getNodes(),I=0;I<S.length;I++){var M=S[I];L+=this.getNodeDegreeWithChildren(M);}return L;},O.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());},O.prototype.fillCompexOrderByDFS=function(k){for(var L=0;L<k.length;L++){var S=k[L];S.getChild()!=null&&this.fillCompexOrderByDFS(S.getChild().getNodes()),this.getToBeTiled(S)&&this.compoundOrder.push(S);}},O.prototype.adjustLocations=function(k,L,S,I,M,P,B){L+=I+P,S+=M+B;for(var F=L,z=0;z<k.rows.length;z++){var $=k.rows[z];L=F;for(var U=0,K=0;K<$.length;K++){var ee=$[K];ee.rect.x=L,ee.rect.y=S,L+=ee.rect.width+k.horizontalPadding,ee.rect.height>U&&(U=ee.rect.height);}S+=U+k.verticalPadding;}},O.prototype.tileCompoundMembers=function(k,L){var S=this;this.tiledMemberPack=[],Object.keys(k).forEach(function(I){var M=L[I];if(S.tiledMemberPack[I]=S.tileNodes(k[I],M.paddingLeft+M.paddingRight),M.rect.width=S.tiledMemberPack[I].width,M.rect.height=S.tiledMemberPack[I].height,M.setCenter(S.tiledMemberPack[I].centerX,S.tiledMemberPack[I].centerY),M.labelMarginLeft=0,M.labelMarginTop=0,m.NODE_DIMENSIONS_INCLUDE_LABELS){var P=M.rect.width,B=M.rect.height;M.labelWidth&&(M.labelPosHorizontal=="left"?(M.rect.x-=M.labelWidth,M.setWidth(P+M.labelWidth),M.labelMarginLeft=M.labelWidth):M.labelPosHorizontal=="center"&&M.labelWidth>P?(M.rect.x-=(M.labelWidth-P)/2,M.setWidth(M.labelWidth),M.labelMarginLeft=(M.labelWidth-P)/2):M.labelPosHorizontal=="right"&&M.setWidth(P+M.labelWidth)),M.labelHeight&&(M.labelPosVertical=="top"?(M.rect.y-=M.labelHeight,M.setHeight(B+M.labelHeight),M.labelMarginTop=M.labelHeight):M.labelPosVertical=="center"&&M.labelHeight>B?(M.rect.y-=(M.labelHeight-B)/2,M.setHeight(M.labelHeight),M.labelMarginTop=(M.labelHeight-B)/2):M.labelPosVertical=="bottom"&&M.setHeight(B+M.labelHeight));}});},O.prototype.tileNodes=function(k,L){var S=this.tileNodesByFavoringDim(k,L,!0),I=this.tileNodesByFavoringDim(k,L,!1),M=this.getOrgRatio(S),P=this.getOrgRatio(I),B;return P<M?B=I:B=S,B;},O.prototype.getOrgRatio=function(k){var L=k.width,S=k.height,I=L/S;return I<1&&(I=1/I),I;},O.prototype.calcIdealRowWidth=function(k,L){var S=m.TILING_PADDING_VERTICAL,I=m.TILING_PADDING_HORIZONTAL,M=k.length,P=0,B=0,F=0;k.forEach(function(ce){P+=ce.getWidth(),B+=ce.getHeight(),ce.getWidth()>F&&(F=ce.getWidth());});var z=P/M,$=B/M,U=Math.pow(S-I,2)+4*(z+I)*($+S)*M,K=(I-S+Math.sqrt(U))/(2*(z+I)),ee;L?(ee=Math.ceil(K),ee==K&&ee++):ee=Math.floor(K);var Y=ee*(z+I)-I;return F>Y&&(Y=F),Y+=I*2,Y;},O.prototype.tileNodesByFavoringDim=function(k,L,S){var I=m.TILING_PADDING_VERTICAL,M=m.TILING_PADDING_HORIZONTAL,P=m.TILING_COMPARE_BY,B={rows:[],rowWidth:[],rowHeight:[],width:0,height:L,verticalPadding:I,horizontalPadding:M,centerX:0,centerY:0};P&&(B.idealRowWidth=this.calcIdealRowWidth(k,S));var F=o(function(Z){return Z.rect.width*Z.rect.height;},"getNodeArea"),z=o(function(Z,ue){return F(ue)-F(Z);},"areaCompareFcn");k.sort(function(ce,Z){var ue=z;return B.idealRowWidth?(ue=P,ue(ce.id,Z.id)):ue(ce,Z);});for(var $=0,U=0,K=0;K<k.length;K++){var ee=k[K];$+=ee.getCenterX(),U+=ee.getCenterY();}B.centerX=$/k.length,B.centerY=U/k.length;for(var K=0;K<k.length;K++){var ee=k[K];if(B.rows.length==0)this.insertNodeToRow(B,ee,0,L);else if(this.canAddHorizontal(B,ee.rect.width,ee.rect.height)){var Y=B.rows.length-1;B.idealRowWidth||(Y=this.getShortestRowIndex(B)),this.insertNodeToRow(B,ee,Y,L);}else this.insertNodeToRow(B,ee,B.rows.length,L);this.shiftToLastRow(B);}return B;},O.prototype.insertNodeToRow=function(k,L,S,I){var M=I;if(S==k.rows.length){var P=[];k.rows.push(P),k.rowWidth.push(M),k.rowHeight.push(0);}var B=k.rowWidth[S]+L.rect.width;k.rows[S].length>0&&(B+=k.horizontalPadding),k.rowWidth[S]=B,k.width<B&&(k.width=B);var F=L.rect.height;S>0&&(F+=k.verticalPadding);var z=0;F>k.rowHeight[S]&&(z=k.rowHeight[S],k.rowHeight[S]=F,z=k.rowHeight[S]-z),k.height+=z,k.rows[S].push(L);},O.prototype.getShortestRowIndex=function(k){for(var L=-1,S=Number.MAX_VALUE,I=0;I<k.rows.length;I++)k.rowWidth[I]<S&&(L=I,S=k.rowWidth[I]);return L;},O.prototype.getLongestRowIndex=function(k){for(var L=-1,S=Number.MIN_VALUE,I=0;I<k.rows.length;I++)k.rowWidth[I]>S&&(L=I,S=k.rowWidth[I]);return L;},O.prototype.canAddHorizontal=function(k,L,S){if(k.idealRowWidth){var I=k.rows.length-1,M=k.rowWidth[I];return M+L+k.horizontalPadding<=k.idealRowWidth;}var P=this.getShortestRowIndex(k);if(P<0)return!0;var B=k.rowWidth[P];if(B+k.horizontalPadding+L<=k.width)return!0;var F=0;k.rowHeight[P]<S&&P>0&&(F=S+k.verticalPadding-k.rowHeight[P]);var z;k.width-B>=L+k.horizontalPadding?z=(k.height+F)/(B+L+k.horizontalPadding):z=(k.height+F)/k.width,F=S+k.verticalPadding;var $;return k.width<L?$=(k.height+F)/L:$=(k.height+F)/k.width,$<1&&($=1/$),z<1&&(z=1/z),z<$;},O.prototype.shiftToLastRow=function(k){var L=this.getLongestRowIndex(k),S=k.rowWidth.length-1,I=k.rows[L],M=I[I.length-1],P=M.width+k.horizontalPadding;if(k.width-k.rowWidth[S]>P&&L!=S){I.splice(-1,1),k.rows[S].push(M),k.rowWidth[L]=k.rowWidth[L]-P,k.rowWidth[S]=k.rowWidth[S]+P,k.width=k.rowWidth[instance.getLongestRowIndex(k)];for(var B=Number.MIN_VALUE,F=0;F<I.length;F++)I[F].height>B&&(B=I[F].height);L>0&&(B+=k.verticalPadding);var z=k.rowHeight[L]+k.rowHeight[S];k.rowHeight[L]=B,k.rowHeight[S]<M.height+k.verticalPadding&&(k.rowHeight[S]=M.height+k.verticalPadding);var $=k.rowHeight[L]+k.rowHeight[S];k.height+=$-z,this.shiftToLastRow(k);}},O.prototype.tilingPreLayout=function(){m.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers());},O.prototype.tilingPostLayout=function(){m.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds());},O.prototype.reduceTrees=function(){for(var k=[],L=!0,S;L;){var I=this.graphManager.getAllNodes(),M=[];L=!1;for(var P=0;P<I.length;P++)if(S=I[P],S.getEdges().length==1&&!S.getEdges()[0].isInterGraph&&S.getChild()==null){if(m.PURE_INCREMENTAL){var B=S.getEdges()[0].getOtherEnd(S),F=new T(S.getCenterX()-B.getCenterX(),S.getCenterY()-B.getCenterY());M.push([S,S.getEdges()[0],S.getOwner(),F]);}else M.push([S,S.getEdges()[0],S.getOwner()]);L=!0;}if(L==!0){for(var z=[],$=0;$<M.length;$++)M[$][0].getEdges().length==1&&(z.push(M[$]),M[$][0].getOwner().remove(M[$][0]));k.push(z),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges();}}this.prunedNodesAll=k;},O.prototype.growTree=function(k){for(var L=k.length,S=k[L-1],I,M=0;M<S.length;M++)I=S[M],this.findPlaceforPrunedNode(I),I[2].add(I[0]),I[2].add(I[1],I[1].source,I[1].target);k.splice(k.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges();},O.prototype.findPlaceforPrunedNode=function(k){var L,S,I=k[0];if(I==k[1].source?S=k[1].target:S=k[1].source,m.PURE_INCREMENTAL)I.setCenter(S.getCenterX()+k[3].getWidth(),S.getCenterY()+k[3].getHeight());else{var M=S.startX,P=S.finishX,B=S.startY,F=S.finishY,z=0,$=0,U=0,K=0,ee=[z,U,$,K];if(B>0)for(var Y=M;Y<=P;Y++)ee[0]+=this.grid[Y][B-1].length+this.grid[Y][B].length-1;if(P<this.grid.length-1)for(var Y=B;Y<=F;Y++)ee[1]+=this.grid[P+1][Y].length+this.grid[P][Y].length-1;if(F<this.grid[0].length-1)for(var Y=M;Y<=P;Y++)ee[2]+=this.grid[Y][F+1].length+this.grid[Y][F].length-1;if(M>0)for(var Y=B;Y<=F;Y++)ee[3]+=this.grid[M-1][Y].length+this.grid[M][Y].length-1;for(var ce=w.MAX_VALUE,Z,ue,Q=0;Q<ee.length;Q++)ee[Q]<ce?(ce=ee[Q],Z=1,ue=Q):ee[Q]==ce&&Z++;if(Z==3&&ce==0)ee[0]==0&&ee[1]==0&&ee[2]==0?L=1:ee[0]==0&&ee[1]==0&&ee[3]==0?L=0:ee[0]==0&&ee[2]==0&&ee[3]==0?L=3:ee[1]==0&&ee[2]==0&&ee[3]==0&&(L=2);else if(Z==2&&ce==0){var j=Math.floor(Math.random()*2);ee[0]==0&&ee[1]==0?j==0?L=0:L=1:ee[0]==0&&ee[2]==0?j==0?L=0:L=2:ee[0]==0&&ee[3]==0?j==0?L=0:L=3:ee[1]==0&&ee[2]==0?j==0?L=1:L=2:ee[1]==0&&ee[3]==0?j==0?L=1:L=3:j==0?L=2:L=3;}else if(Z==4&&ce==0){var j=Math.floor(Math.random()*4);L=j;}else L=ue;L==0?I.setCenter(S.getCenterX(),S.getCenterY()-S.getHeight()/2-y.DEFAULT_EDGE_LENGTH-I.getHeight()/2):L==1?I.setCenter(S.getCenterX()+S.getWidth()/2+y.DEFAULT_EDGE_LENGTH+I.getWidth()/2,S.getCenterY()):L==2?I.setCenter(S.getCenterX(),S.getCenterY()+S.getHeight()/2+y.DEFAULT_EDGE_LENGTH+I.getHeight()/2):I.setCenter(S.getCenterX()-S.getWidth()/2-y.DEFAULT_EDGE_LENGTH-I.getWidth()/2,S.getCenterY());}},a.exports=O;},991:(a,s,l)=>{var u=l(551).FDLayoutNode,h=l(551).IMath;function f(p,m,g,y){u.call(this,p,m,g,y);}o(f,"CoSENode"),f.prototype=Object.create(u.prototype);for(var d in u)f[d]=u[d];f.prototype.calculateDisplacement=function(){var p=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=p.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=p.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=p.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=p.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>p.coolingFactor*p.maxNodeDisplacement&&(this.displacementX=p.coolingFactor*p.maxNodeDisplacement*h.sign(this.displacementX)),Math.abs(this.displacementY)>p.coolingFactor*p.maxNodeDisplacement&&(this.displacementY=p.coolingFactor*p.maxNodeDisplacement*h.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY);},f.prototype.propogateDisplacementToChildren=function(p,m){for(var g=this.getChild().getNodes(),y,v=0;v<g.length;v++)y=g[v],y.getChild()==null?(y.displacementX+=p,y.displacementY+=m):y.propogateDisplacementToChildren(p,m);},f.prototype.move=function(){var p=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),p.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0;},f.prototype.setPred1=function(p){this.pred1=p;},f.prototype.getPred1=function(){return pred1;},f.prototype.getPred2=function(){return pred2;},f.prototype.setNext=function(p){this.next=p;},f.prototype.getNext=function(){return next;},f.prototype.setProcessed=function(p){this.processed=p;},f.prototype.isProcessed=function(){return processed;},a.exports=f;},902:(a,s,l)=>{function u(g){if(Array.isArray(g)){for(var y=0,v=Array(g.length);y<g.length;y++)v[y]=g[y];return v;}else return Array.from(g);}o(u,"_toConsumableArray");var h=l(806),f=l(551).LinkedList,d=l(551).Matrix,p=l(551).SVD;function m(){}o(m,"ConstraintHandler"),m.handleConstraints=function(g){var y={};y.fixedNodeConstraint=g.constraints.fixedNodeConstraint,y.alignmentConstraint=g.constraints.alignmentConstraint,y.relativePlacementConstraint=g.constraints.relativePlacementConstraint;for(var v=new Map(),x=new Map(),b=[],T=[],C=g.getAllNodes(),w=0,E=0;E<C.length;E++){var _=C[E];_.getChild()==null&&(x.set(_.id,w++),b.push(_.getCenterX()),T.push(_.getCenterY()),v.set(_.id,_));}y.relativePlacementConstraint&&y.relativePlacementConstraint.forEach(function(oe){!oe.gap&&oe.gap!=0&&(oe.left?oe.gap=h.DEFAULT_EDGE_LENGTH+v.get(oe.left).getWidth()/2+v.get(oe.right).getWidth()/2:oe.gap=h.DEFAULT_EDGE_LENGTH+v.get(oe.top).getHeight()/2+v.get(oe.bottom).getHeight()/2);});var A=o(function(V,Te){return{x:V.x-Te.x,y:V.y-Te.y};},"calculatePositionDiff"),D=o(function(V){var Te=0,W=0;return V.forEach(function(pe){Te+=b[x.get(pe)],W+=T[x.get(pe)];}),{x:Te/V.size,y:W/V.size};},"calculateAvgPosition"),O=o(function(V,Te,W,pe,ve){function Pe(st,Ue){var ut=new Set(st),We=!0,lt=!1,Xt=void 0;try{for(var Tt=Ue[Symbol.iterator](),Mt;!(We=(Mt=Tt.next()).done);We=!0){var bt=Mt.value;ut.add(bt);}}catch(ht){lt=!0,Xt=ht;}finally{try{!We&&Tt.return&&Tt.return();}finally{if(lt)throw Xt;}}return ut;}o(Pe,"setUnion");var _e=new Map();V.forEach(function(st,Ue){_e.set(Ue,0);}),V.forEach(function(st,Ue){st.forEach(function(ut){_e.set(ut.id,_e.get(ut.id)+1);});});var be=new Map(),Ve=new Map(),De=new f();_e.forEach(function(st,Ue){st==0?(De.push(Ue),W||(Te=="horizontal"?be.set(Ue,x.has(Ue)?b[x.get(Ue)]:pe.get(Ue)):be.set(Ue,x.has(Ue)?T[x.get(Ue)]:pe.get(Ue)))):be.set(Ue,Number.NEGATIVE_INFINITY),W&&Ve.set(Ue,new Set([Ue]));}),W&&ve.forEach(function(st){var Ue=[];if(st.forEach(function(lt){W.has(lt)&&Ue.push(lt);}),Ue.length>0){var ut=0;Ue.forEach(function(lt){Te=="horizontal"?(be.set(lt,x.has(lt)?b[x.get(lt)]:pe.get(lt)),ut+=be.get(lt)):(be.set(lt,x.has(lt)?T[x.get(lt)]:pe.get(lt)),ut+=be.get(lt));}),ut=ut/Ue.length,st.forEach(function(lt){W.has(lt)||be.set(lt,ut);});}else{var We=0;st.forEach(function(lt){Te=="horizontal"?We+=x.has(lt)?b[x.get(lt)]:pe.get(lt):We+=x.has(lt)?T[x.get(lt)]:pe.get(lt);}),We=We/st.length,st.forEach(function(lt){be.set(lt,We);});}});for(var Ye=o(function(){var Ue=De.shift(),ut=V.get(Ue);ut.forEach(function(We){if(be.get(We.id)<be.get(Ue)+We.gap)if(W&&W.has(We.id)){var lt=void 0;if(Te=="horizontal"?lt=x.has(We.id)?b[x.get(We.id)]:pe.get(We.id):lt=x.has(We.id)?T[x.get(We.id)]:pe.get(We.id),be.set(We.id,lt),lt<be.get(Ue)+We.gap){var Xt=be.get(Ue)+We.gap-lt;Ve.get(Ue).forEach(function(Tt){be.set(Tt,be.get(Tt)-Xt);});}}else be.set(We.id,be.get(Ue)+We.gap);_e.set(We.id,_e.get(We.id)-1),_e.get(We.id)==0&&De.push(We.id),W&&Ve.set(We.id,Pe(Ve.get(Ue),Ve.get(We.id)));});},"_loop");De.length!=0;)Ye();if(W){var at=new Set();V.forEach(function(st,Ue){st.length==0&&at.add(Ue);});var Rt=[];Ve.forEach(function(st,Ue){if(at.has(Ue)){var ut=!1,We=!0,lt=!1,Xt=void 0;try{for(var Tt=st[Symbol.iterator](),Mt;!(We=(Mt=Tt.next()).done);We=!0){var bt=Mt.value;W.has(bt)&&(ut=!0);}}catch(ft){lt=!0,Xt=ft;}finally{try{!We&&Tt.return&&Tt.return();}finally{if(lt)throw Xt;}}if(!ut){var ht=!1,St=void 0;Rt.forEach(function(ft,vt){ft.has([].concat(u(st))[0])&&(ht=!0,St=vt);}),ht?st.forEach(function(ft){Rt[St].add(ft);}):Rt.push(new Set(st));}}}),Rt.forEach(function(st,Ue){var ut=Number.POSITIVE_INFINITY,We=Number.POSITIVE_INFINITY,lt=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Mt=!1,bt=void 0;try{for(var ht=st[Symbol.iterator](),St;!(Tt=(St=ht.next()).done);Tt=!0){var ft=St.value,vt=void 0;Te=="horizontal"?vt=x.has(ft)?b[x.get(ft)]:pe.get(ft):vt=x.has(ft)?T[x.get(ft)]:pe.get(ft);var nt=be.get(ft);vt<ut&&(ut=vt),vt>lt&&(lt=vt),nt<We&&(We=nt),nt>Xt&&(Xt=nt);}}catch(Dt){Mt=!0,bt=Dt;}finally{try{!Tt&&ht.return&&ht.return();}finally{if(Mt)throw bt;}}var dn=(ut+lt)/2-(We+Xt)/2,kt=!0,In=!1,en=void 0;try{for(var Nr=st[Symbol.iterator](),Mr;!(kt=(Mr=Nr.next()).done);kt=!0){var On=Mr.value;be.set(On,be.get(On)+dn);}}catch(Dt){In=!0,en=Dt;}finally{try{!kt&&Nr.return&&Nr.return();}finally{if(In)throw en;}}});}return be;},"findAppropriatePositionForRelativePlacement"),R=o(function(V){var Te=0,W=0,pe=0,ve=0;if(V.forEach(function(Ve){Ve.left?b[x.get(Ve.left)]-b[x.get(Ve.right)]>=0?Te++:W++:T[x.get(Ve.top)]-T[x.get(Ve.bottom)]>=0?pe++:ve++;}),Te>W&&pe>ve)for(var Pe=0;Pe<x.size;Pe++)b[Pe]=-1*b[Pe],T[Pe]=-1*T[Pe];else if(Te>W)for(var _e=0;_e<x.size;_e++)b[_e]=-1*b[_e];else if(pe>ve)for(var be=0;be<x.size;be++)T[be]=-1*T[be];},"applyReflectionForRelativePlacement"),k=o(function(V){var Te=[],W=new f(),pe=new Set(),ve=0;return V.forEach(function(Pe,_e){if(!pe.has(_e)){Te[ve]=[];var be=_e;for(W.push(be),pe.add(be),Te[ve].push(be);W.length!=0;){be=W.shift();var Ve=V.get(be);Ve.forEach(function(De){pe.has(De.id)||(W.push(De.id),pe.add(De.id),Te[ve].push(De.id));});}ve++;}}),Te;},"findComponents"),L=o(function(V){var Te=new Map();return V.forEach(function(W,pe){Te.set(pe,[]);}),V.forEach(function(W,pe){W.forEach(function(ve){Te.get(pe).push(ve),Te.get(ve.id).push({id:pe,gap:ve.gap,direction:ve.direction});});}),Te;},"dagToUndirected"),S=o(function(V){var Te=new Map();return V.forEach(function(W,pe){Te.set(pe,[]);}),V.forEach(function(W,pe){W.forEach(function(ve){Te.get(ve.id).push({id:pe,gap:ve.gap,direction:ve.direction});});}),Te;},"dagToReversed"),I=[],M=[],P=!1,B=!1,F=new Set(),z=new Map(),$=new Map(),U=[];if(y.fixedNodeConstraint&&y.fixedNodeConstraint.forEach(function(oe){F.add(oe.nodeId);}),y.relativePlacementConstraint&&(y.relativePlacementConstraint.forEach(function(oe){oe.left?(z.has(oe.left)?z.get(oe.left).push({id:oe.right,gap:oe.gap,direction:"horizontal"}):z.set(oe.left,[{id:oe.right,gap:oe.gap,direction:"horizontal"}]),z.has(oe.right)||z.set(oe.right,[])):(z.has(oe.top)?z.get(oe.top).push({id:oe.bottom,gap:oe.gap,direction:"vertical"}):z.set(oe.top,[{id:oe.bottom,gap:oe.gap,direction:"vertical"}]),z.has(oe.bottom)||z.set(oe.bottom,[]));}),$=L(z),U=k($)),h.TRANSFORM_ON_CONSTRAINT_HANDLING){if(y.fixedNodeConstraint&&y.fixedNodeConstraint.length>1)y.fixedNodeConstraint.forEach(function(oe,V){I[V]=[oe.position.x,oe.position.y],M[V]=[b[x.get(oe.nodeId)],T[x.get(oe.nodeId)]];}),P=!0;else if(y.alignmentConstraint)(function(){var oe=0;if(y.alignmentConstraint.vertical){for(var V=y.alignmentConstraint.vertical,Te=o(function(be){var Ve=new Set();V[be].forEach(function(at){Ve.add(at);});var De=new Set([].concat(u(Ve)).filter(function(at){return F.has(at);})),Ye=void 0;De.size>0?Ye=b[x.get(De.values().next().value)]:Ye=D(Ve).x,V[be].forEach(function(at){I[oe]=[Ye,T[x.get(at)]],M[oe]=[b[x.get(at)],T[x.get(at)]],oe++;});},"_loop2"),W=0;W<V.length;W++)Te(W);P=!0;}if(y.alignmentConstraint.horizontal){for(var pe=y.alignmentConstraint.horizontal,ve=o(function(be){var Ve=new Set();pe[be].forEach(function(at){Ve.add(at);});var De=new Set([].concat(u(Ve)).filter(function(at){return F.has(at);})),Ye=void 0;De.size>0?Ye=b[x.get(De.values().next().value)]:Ye=D(Ve).y,pe[be].forEach(function(at){I[oe]=[b[x.get(at)],Ye],M[oe]=[b[x.get(at)],T[x.get(at)]],oe++;});},"_loop3"),Pe=0;Pe<pe.length;Pe++)ve(Pe);P=!0;}y.relativePlacementConstraint&&(B=!0);})();else if(y.relativePlacementConstraint){for(var K=0,ee=0,Y=0;Y<U.length;Y++)U[Y].length>K&&(K=U[Y].length,ee=Y);if(K<$.size/2)R(y.relativePlacementConstraint),P=!1,B=!1;else{var ce=new Map(),Z=new Map(),ue=[];U[ee].forEach(function(oe){z.get(oe).forEach(function(V){V.direction=="horizontal"?(ce.has(oe)?ce.get(oe).push(V):ce.set(oe,[V]),ce.has(V.id)||ce.set(V.id,[]),ue.push({left:oe,right:V.id})):(Z.has(oe)?Z.get(oe).push(V):Z.set(oe,[V]),Z.has(V.id)||Z.set(V.id,[]),ue.push({top:oe,bottom:V.id}));});}),R(ue),B=!1;var Q=O(ce,"horizontal"),j=O(Z,"vertical");U[ee].forEach(function(oe,V){M[V]=[b[x.get(oe)],T[x.get(oe)]],I[V]=[],Q.has(oe)?I[V][0]=Q.get(oe):I[V][0]=b[x.get(oe)],j.has(oe)?I[V][1]=j.get(oe):I[V][1]=T[x.get(oe)];}),P=!0;}}if(P){for(var ne=void 0,te=d.transpose(I),he=d.transpose(M),le=0;le<te.length;le++)te[le]=d.multGamma(te[le]),he[le]=d.multGamma(he[le]);var J=d.multMat(te,d.transpose(he)),Se=p.svd(J);ne=d.multMat(Se.V,d.transpose(Se.U));for(var se=0;se<x.size;se++){var ae=[b[se],T[se]],Oe=[ne[0][0],ne[1][0]],ye=[ne[0][1],ne[1][1]];b[se]=d.dotProduct(ae,Oe),T[se]=d.dotProduct(ae,ye);}B&&R(y.relativePlacementConstraint);}}if(h.ENFORCE_CONSTRAINTS){if(y.fixedNodeConstraint&&y.fixedNodeConstraint.length>0){var Be={x:0,y:0};y.fixedNodeConstraint.forEach(function(oe,V){var Te={x:b[x.get(oe.nodeId)],y:T[x.get(oe.nodeId)]},W=oe.position,pe=A(W,Te);Be.x+=pe.x,Be.y+=pe.y;}),Be.x/=y.fixedNodeConstraint.length,Be.y/=y.fixedNodeConstraint.length,b.forEach(function(oe,V){b[V]+=Be.x;}),T.forEach(function(oe,V){T[V]+=Be.y;}),y.fixedNodeConstraint.forEach(function(oe){b[x.get(oe.nodeId)]=oe.position.x,T[x.get(oe.nodeId)]=oe.position.y;});}if(y.alignmentConstraint){if(y.alignmentConstraint.vertical)for(var He=y.alignmentConstraint.vertical,ze=o(function(V){var Te=new Set();He[V].forEach(function(ve){Te.add(ve);});var W=new Set([].concat(u(Te)).filter(function(ve){return F.has(ve);})),pe=void 0;W.size>0?pe=b[x.get(W.values().next().value)]:pe=D(Te).x,Te.forEach(function(ve){F.has(ve)||(b[x.get(ve)]=pe);});},"_loop4"),Le=0;Le<He.length;Le++)ze(Le);if(y.alignmentConstraint.horizontal)for(var Ie=y.alignmentConstraint.horizontal,xe=o(function(V){var Te=new Set();Ie[V].forEach(function(ve){Te.add(ve);});var W=new Set([].concat(u(Te)).filter(function(ve){return F.has(ve);})),pe=void 0;W.size>0?pe=T[x.get(W.values().next().value)]:pe=D(Te).y,Te.forEach(function(ve){F.has(ve)||(T[x.get(ve)]=pe);});},"_loop5"),q=0;q<Ie.length;q++)xe(q);}y.relativePlacementConstraint&&function(){var oe=new Map(),V=new Map(),Te=new Map(),W=new Map(),pe=new Map(),ve=new Map(),Pe=new Set(),_e=new Set();if(F.forEach(function(Ur){Pe.add(Ur),_e.add(Ur);}),y.alignmentConstraint){if(y.alignmentConstraint.vertical)for(var be=y.alignmentConstraint.vertical,Ve=o(function(et){Te.set("dummy"+et,[]),be[et].forEach(function(gt){oe.set(gt,"dummy"+et),Te.get("dummy"+et).push(gt),F.has(gt)&&Pe.add("dummy"+et);}),pe.set("dummy"+et,b[x.get(be[et][0])]);},"_loop6"),De=0;De<be.length;De++)Ve(De);if(y.alignmentConstraint.horizontal)for(var Ye=y.alignmentConstraint.horizontal,at=o(function(et){W.set("dummy"+et,[]),Ye[et].forEach(function(gt){V.set(gt,"dummy"+et),W.get("dummy"+et).push(gt),F.has(gt)&&_e.add("dummy"+et);}),ve.set("dummy"+et,T[x.get(Ye[et][0])]);},"_loop7"),Rt=0;Rt<Ye.length;Rt++)at(Rt);}var st=new Map(),Ue=new Map(),ut=o(function(et){z.get(et).forEach(function(gt){var Kt=void 0,ct=void 0;gt.direction=="horizontal"?(Kt=oe.get(et)?oe.get(et):et,oe.get(gt.id)?ct={id:oe.get(gt.id),gap:gt.gap,direction:gt.direction}:ct=gt,st.has(Kt)?st.get(Kt).push(ct):st.set(Kt,[ct]),st.has(ct.id)||st.set(ct.id,[])):(Kt=V.get(et)?V.get(et):et,V.get(gt.id)?ct={id:V.get(gt.id),gap:gt.gap,direction:gt.direction}:ct=gt,Ue.has(Kt)?Ue.get(Kt).push(ct):Ue.set(Kt,[ct]),Ue.has(ct.id)||Ue.set(ct.id,[]));});},"_loop8"),We=!0,lt=!1,Xt=void 0;try{for(var Tt=z.keys()[Symbol.iterator](),Mt;!(We=(Mt=Tt.next()).done);We=!0){var bt=Mt.value;ut(bt);}}catch(Ur){lt=!0,Xt=Ur;}finally{try{!We&&Tt.return&&Tt.return();}finally{if(lt)throw Xt;}}var ht=L(st),St=L(Ue),ft=k(ht),vt=k(St),nt=S(st),dn=S(Ue),kt=[],In=[];ft.forEach(function(Ur,et){kt[et]=[],Ur.forEach(function(gt){nt.get(gt).length==0&&kt[et].push(gt);});}),vt.forEach(function(Ur,et){In[et]=[],Ur.forEach(function(gt){dn.get(gt).length==0&&In[et].push(gt);});});var en=O(st,"horizontal",Pe,pe,kt),Nr=O(Ue,"vertical",_e,ve,In),Mr=o(function(et){Te.get(et)?Te.get(et).forEach(function(gt){b[x.get(gt)]=en.get(et);}):b[x.get(et)]=en.get(et);},"_loop9"),On=!0,Dt=!1,Ce=void 0;try{for(var tt=en.keys()[Symbol.iterator](),Ct;!(On=(Ct=tt.next()).done);On=!0){var yr=Ct.value;Mr(yr);}}catch(Ur){Dt=!0,Ce=Ur;}finally{try{!On&&tt.return&&tt.return();}finally{if(Dt)throw Ce;}}var tn=o(function(et){W.get(et)?W.get(et).forEach(function(gt){T[x.get(gt)]=Nr.get(et);}):T[x.get(et)]=Nr.get(et);},"_loop10"),gn=!0,Qr=!1,Mi=void 0;try{for(var Zn=Nr.keys()[Symbol.iterator](),En;!(gn=(En=Zn.next()).done);gn=!0){var yr=En.value;tn(yr);}}catch(Ur){Qr=!0,Mi=Ur;}finally{try{!gn&&Zn.return&&Zn.return();}finally{if(Qr)throw Mi;}}}();}for(var de=0;de<C.length;de++){var ie=C[de];ie.getChild()==null&&ie.setCenter(b[x.get(ie.id)],T[x.get(ie.id)]);}},a.exports=m;},551:a=>{a.exports=t;}},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var l=r[a]={exports:{}};return e[a](l,l.exports,n),l.exports;}o(n,"__webpack_require__");var i=n(45);return i;})();});});var G2e=Ii((M4,JF)=>{"use strict";o(function(e,r){typeof M4=="object"&&typeof JF=="object"?JF.exports=r(ZF()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof M4=="object"?M4.cytoscapeFcose=r(ZF()):e.cytoscapeFcose=r(e.coseBase);},"webpackUniversalModuleDefinition")(M4,function(t){return(()=>{"use strict";var e={658:a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(s){for(var l=arguments.length,u=Array(l>1?l-1:0),h=1;h<l;h++)u[h-1]=arguments[h];return u.forEach(function(f){Object.keys(f).forEach(function(d){return s[d]=f[d];});}),s;};},548:(a,s,l)=>{var u=function(){function d(p,m){var g=[],y=!0,v=!1,x=void 0;try{for(var b=p[Symbol.iterator](),T;!(y=(T=b.next()).done)&&(g.push(T.value),!(m&&g.length===m));y=!0);}catch(C){v=!0,x=C;}finally{try{!y&&b.return&&b.return();}finally{if(v)throw x;}}return g;}return o(d,"sliceIterator"),function(p,m){if(Array.isArray(p))return p;if(Symbol.iterator in Object(p))return d(p,m);throw new TypeError("Invalid attempt to destructure non-iterable instance");};}(),h=l(140).layoutBase.LinkedList,f={};f.getTopMostNodes=function(d){for(var p={},m=0;m<d.length;m++)p[d[m].id()]=!0;var g=d.filter(function(y,v){typeof y=="number"&&(y=v);for(var x=y.parent()[0];x!=null;){if(p[x.id()])return!1;x=x.parent()[0];}return!0;});return g;},f.connectComponents=function(d,p,m,g){var y=new h(),v=new Set(),x=[],b=void 0,T=void 0,C=void 0,w=!1,E=1,_=[],A=[],D=o(function(){var R=d.collection();A.push(R);var k=m[0],L=d.collection();L.merge(k).merge(k.descendants().intersection(p)),x.push(k),L.forEach(function(M){y.push(M),v.add(M),R.merge(M);});for(var S=o(function(){k=y.shift();var P=d.collection();k.neighborhood().nodes().forEach(function($){p.intersection(k.edgesWith($)).length>0&&P.merge($);});for(var B=0;B<P.length;B++){var F=P[B];if(b=m.intersection(F.union(F.ancestors())),b!=null&&!v.has(b[0])){var z=b.union(b.descendants());z.forEach(function($){y.push($),v.add($),R.merge($),m.has($)&&x.push($);});}}},"_loop2");y.length!=0;)S();if(R.forEach(function(M){p.intersection(M.connectedEdges()).forEach(function(P){R.has(P.source())&&R.has(P.target())&&R.merge(P);});}),x.length==m.length&&(w=!0),!w||w&&E>1){T=x[0],C=T.connectedEdges().length,x.forEach(function(M){M.connectedEdges().length<C&&(C=M.connectedEdges().length,T=M);}),_.push(T.id());var I=d.collection();I.merge(x[0]),x.forEach(function(M){I.merge(M);}),x=[],m=m.difference(I),E++;}},"_loop");do D();while(!w);return g&&_.length>0&&g.set("dummy"+(g.size+1),_),A;},f.relocateComponent=function(d,p,m){if(!m.fixedNodeConstraint){var g=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,v=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;if(m.quality=="draft"){var b=!0,T=!1,C=void 0;try{for(var w=p.nodeIndexes[Symbol.iterator](),E;!(b=(E=w.next()).done);b=!0){var _=E.value,A=u(_,2),D=A[0],O=A[1],R=m.cy.getElementById(D);if(R){var k=R.boundingBox(),L=p.xCoords[O]-k.w/2,S=p.xCoords[O]+k.w/2,I=p.yCoords[O]-k.h/2,M=p.yCoords[O]+k.h/2;L<g&&(g=L),S>y&&(y=S),I<v&&(v=I),M>x&&(x=M);}}}catch($){T=!0,C=$;}finally{try{!b&&w.return&&w.return();}finally{if(T)throw C;}}var P=d.x-(y+g)/2,B=d.y-(x+v)/2;p.xCoords=p.xCoords.map(function($){return $+P;}),p.yCoords=p.yCoords.map(function($){return $+B;});}else{Object.keys(p).forEach(function($){var U=p[$],K=U.getRect().x,ee=U.getRect().x+U.getRect().width,Y=U.getRect().y,ce=U.getRect().y+U.getRect().height;K<g&&(g=K),ee>y&&(y=ee),Y<v&&(v=Y),ce>x&&(x=ce);});var F=d.x-(y+g)/2,z=d.y-(x+v)/2;Object.keys(p).forEach(function($){var U=p[$];U.setCenter(U.getCenterX()+F,U.getCenterY()+z);});}}},f.calcBoundingBox=function(d,p,m,g){for(var y=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,x=Number.MAX_SAFE_INTEGER,b=Number.MIN_SAFE_INTEGER,T=void 0,C=void 0,w=void 0,E=void 0,_=d.descendants().not(":parent"),A=_.length,D=0;D<A;D++){var O=_[D];T=p[g.get(O.id())]-O.width()/2,C=p[g.get(O.id())]+O.width()/2,w=m[g.get(O.id())]-O.height()/2,E=m[g.get(O.id())]+O.height()/2,y>T&&(y=T),v<C&&(v=C),x>w&&(x=w),b<E&&(b=E);}var R={};return R.topLeftX=y,R.topLeftY=x,R.width=v-y,R.height=b-x,R;},f.calcParentsWithoutChildren=function(d,p){var m=d.collection();return p.nodes(":parent").forEach(function(g){var y=!1;g.children().forEach(function(v){v.css("display")!="none"&&(y=!0);}),y||m.merge(g);}),m;},a.exports=f;},816:(a,s,l)=>{var u=l(548),h=l(140).CoSELayout,f=l(140).CoSENode,d=l(140).layoutBase.PointD,p=l(140).layoutBase.DimensionD,m=l(140).layoutBase.LayoutConstants,g=l(140).layoutBase.FDLayoutConstants,y=l(140).CoSEConstants,v=o(function(b,T){var C=b.cy,w=b.eles,E=w.nodes(),_=w.edges(),A=void 0,D=void 0,O=void 0,R={};b.randomize&&(A=T.nodeIndexes,D=T.xCoords,O=T.yCoords);var k=o(function($){return typeof $=="function";},"isFn"),L=o(function($,U){return k($)?$(U):$;},"optFn"),S=u.calcParentsWithoutChildren(C,w),I=o(function z($,U,K,ee){for(var Y=U.length,ce=0;ce<Y;ce++){var Z=U[ce],ue=null;Z.intersection(S).length==0&&(ue=Z.children());var Q=void 0,j=Z.layoutDimensions({nodeDimensionsIncludeLabels:ee.nodeDimensionsIncludeLabels});if(Z.outerWidth()!=null&&Z.outerHeight()!=null){if(ee.randomize){if(!Z.isParent())Q=$.add(new f(K.graphManager,new d(D[A.get(Z.id())]-j.w/2,O[A.get(Z.id())]-j.h/2),new p(parseFloat(j.w),parseFloat(j.h))));else{var ne=u.calcBoundingBox(Z,D,O,A);Z.intersection(S).length==0?Q=$.add(new f(K.graphManager,new d(ne.topLeftX,ne.topLeftY),new p(ne.width,ne.height))):Q=$.add(new f(K.graphManager,new d(ne.topLeftX,ne.topLeftY),new p(parseFloat(j.w),parseFloat(j.h))));}}else Q=$.add(new f(K.graphManager,new d(Z.position("x")-j.w/2,Z.position("y")-j.h/2),new p(parseFloat(j.w),parseFloat(j.h))));}else Q=$.add(new f(this.graphManager));if(Q.id=Z.data("id"),Q.nodeRepulsion=L(ee.nodeRepulsion,Z),Q.paddingLeft=parseInt(Z.css("padding")),Q.paddingTop=parseInt(Z.css("padding")),Q.paddingRight=parseInt(Z.css("padding")),Q.paddingBottom=parseInt(Z.css("padding")),ee.nodeDimensionsIncludeLabels&&(Q.labelWidth=Z.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,Q.labelHeight=Z.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,Q.labelPosVertical=Z.css("text-valign"),Q.labelPosHorizontal=Z.css("text-halign")),R[Z.data("id")]=Q,isNaN(Q.rect.x)&&(Q.rect.x=0),isNaN(Q.rect.y)&&(Q.rect.y=0),ue!=null&&ue.length>0){var te=void 0;te=K.getGraphManager().add(K.newGraph(),Q),z(te,ue,K,ee);}}},"processChildrenList"),M=o(function($,U,K){for(var ee=0,Y=0,ce=0;ce<K.length;ce++){var Z=K[ce],ue=R[Z.data("source")],Q=R[Z.data("target")];if(ue&&Q&&ue!==Q&&ue.getEdgesBetween(Q).length==0){var j=U.add($.newEdge(),ue,Q);j.id=Z.id(),j.idealLength=L(b.idealEdgeLength,Z),j.edgeElasticity=L(b.edgeElasticity,Z),ee+=j.idealLength,Y++;}}b.idealEdgeLength!=null&&(Y>0?y.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=ee/Y:k(b.idealEdgeLength)?y.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50:y.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=b.idealEdgeLength,y.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,y.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH);},"processEdges"),P=o(function($,U){U.fixedNodeConstraint&&($.constraints.fixedNodeConstraint=U.fixedNodeConstraint),U.alignmentConstraint&&($.constraints.alignmentConstraint=U.alignmentConstraint),U.relativePlacementConstraint&&($.constraints.relativePlacementConstraint=U.relativePlacementConstraint);},"processConstraints");b.nestingFactor!=null&&(y.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=b.nestingFactor),b.gravity!=null&&(y.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=b.gravity),b.numIter!=null&&(y.MAX_ITERATIONS=g.MAX_ITERATIONS=b.numIter),b.gravityRange!=null&&(y.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=b.gravityRange),b.gravityCompound!=null&&(y.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=b.gravityCompound),b.gravityRangeCompound!=null&&(y.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=b.gravityRangeCompound),b.initialEnergyOnIncremental!=null&&(y.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=b.initialEnergyOnIncremental),b.tilingCompareBy!=null&&(y.TILING_COMPARE_BY=b.tilingCompareBy),b.quality=="proof"?m.QUALITY=2:m.QUALITY=0,y.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=m.NODE_DIMENSIONS_INCLUDE_LABELS=b.nodeDimensionsIncludeLabels,y.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=!b.randomize,y.ANIMATE=g.ANIMATE=m.ANIMATE=b.animate,y.TILE=b.tile,y.TILING_PADDING_VERTICAL=typeof b.tilingPaddingVertical=="function"?b.tilingPaddingVertical.call():b.tilingPaddingVertical,y.TILING_PADDING_HORIZONTAL=typeof b.tilingPaddingHorizontal=="function"?b.tilingPaddingHorizontal.call():b.tilingPaddingHorizontal,y.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=!0,y.PURE_INCREMENTAL=!b.randomize,m.DEFAULT_UNIFORM_LEAF_NODE_SIZES=b.uniformNodeDimensions,b.step=="transformed"&&(y.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,y.ENFORCE_CONSTRAINTS=!1,y.APPLY_LAYOUT=!1),b.step=="enforced"&&(y.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,y.ENFORCE_CONSTRAINTS=!0,y.APPLY_LAYOUT=!1),b.step=="cose"&&(y.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,y.ENFORCE_CONSTRAINTS=!1,y.APPLY_LAYOUT=!0),b.step=="all"&&(b.randomize?y.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:y.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,y.ENFORCE_CONSTRAINTS=!0,y.APPLY_LAYOUT=!0),b.fixedNodeConstraint||b.alignmentConstraint||b.relativePlacementConstraint?y.TREE_REDUCTION_ON_INCREMENTAL=!1:y.TREE_REDUCTION_ON_INCREMENTAL=!0;var B=new h(),F=B.newGraphManager();return I(F.addRoot(),u.getTopMostNodes(E),B,b),M(B,F,_),P(B,b),B.runLayout(),R;},"coseLayout");a.exports={coseLayout:v};},212:(a,s,l)=>{var u=function(){function b(T,C){for(var w=0;w<C.length;w++){var E=C[w];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(T,E.key,E);}}return o(b,"defineProperties"),function(T,C,w){return C&&b(T.prototype,C),w&&b(T,w),T;};}();function h(b,T){if(!(b instanceof T))throw new TypeError("Cannot call a class as a function");}o(h,"_classCallCheck");var f=l(658),d=l(548),p=l(657),m=p.spectralLayout,g=l(816),y=g.coseLayout,v=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:o(function(T){return 4500;},"nodeRepulsion"),idealEdgeLength:o(function(T){return 50;},"idealEdgeLength"),edgeElasticity:o(function(T){return .45;},"edgeElasticity"),nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:o(function(){},"ready"),stop:o(function(){},"stop")}),x=function(){function b(T){h(this,b),this.options=f({},v,T);}return o(b,"Layout"),u(b,[{key:"run",value:o(function(){var C=this,w=this.options,E=w.cy,_=w.eles,A=[],D=void 0,O=void 0,R=[],k=void 0,L=[];w.fixedNodeConstraint&&(!Array.isArray(w.fixedNodeConstraint)||w.fixedNodeConstraint.length==0)&&(w.fixedNodeConstraint=void 0),w.alignmentConstraint&&(w.alignmentConstraint.vertical&&(!Array.isArray(w.alignmentConstraint.vertical)||w.alignmentConstraint.vertical.length==0)&&(w.alignmentConstraint.vertical=void 0),w.alignmentConstraint.horizontal&&(!Array.isArray(w.alignmentConstraint.horizontal)||w.alignmentConstraint.horizontal.length==0)&&(w.alignmentConstraint.horizontal=void 0)),w.relativePlacementConstraint&&(!Array.isArray(w.relativePlacementConstraint)||w.relativePlacementConstraint.length==0)&&(w.relativePlacementConstraint=void 0);var S=w.fixedNodeConstraint||w.alignmentConstraint||w.relativePlacementConstraint;S&&(w.tile=!1,w.packComponents=!1);var I=void 0,M=!1;if(E.layoutUtilities&&w.packComponents&&(I=E.layoutUtilities("get"),I||(I=E.layoutUtilities()),M=!0),_.nodes().length>0)if(M){var F=d.getTopMostNodes(w.eles.nodes());if(k=d.connectComponents(E,w.eles,F),k.forEach(function(se){var ae=se.boundingBox();L.push({x:ae.x1+ae.w/2,y:ae.y1+ae.h/2});}),w.randomize&&k.forEach(function(se){w.eles=se,A.push(m(w));}),w.quality=="default"||w.quality=="proof"){var z=E.collection();if(w.tile){var $=new Map(),U=[],K=[],ee=0,Y={nodeIndexes:$,xCoords:U,yCoords:K},ce=[];if(k.forEach(function(se,ae){se.edges().length==0&&(se.nodes().forEach(function(Oe,ye){z.merge(se.nodes()[ye]),Oe.isParent()||(Y.nodeIndexes.set(se.nodes()[ye].id(),ee++),Y.xCoords.push(se.nodes()[0].position().x),Y.yCoords.push(se.nodes()[0].position().y));}),ce.push(ae));}),z.length>1){var Z=z.boundingBox();L.push({x:Z.x1+Z.w/2,y:Z.y1+Z.h/2}),k.push(z),A.push(Y);for(var ue=ce.length-1;ue>=0;ue--)k.splice(ce[ue],1),A.splice(ce[ue],1),L.splice(ce[ue],1);}}k.forEach(function(se,ae){w.eles=se,R.push(y(w,A[ae])),d.relocateComponent(L[ae],R[ae],w);});}else k.forEach(function(se,ae){d.relocateComponent(L[ae],A[ae],w);});var Q=new Set();if(k.length>1){var j=[],ne=_.filter(function(se){return se.css("display")=="none";});k.forEach(function(se,ae){var Oe=void 0;if(w.quality=="draft"&&(Oe=A[ae].nodeIndexes),se.nodes().not(ne).length>0){var ye={};ye.edges=[],ye.nodes=[];var Be=void 0;se.nodes().not(ne).forEach(function(He){if(w.quality=="draft"){if(!He.isParent())Be=Oe.get(He.id()),ye.nodes.push({x:A[ae].xCoords[Be]-He.boundingbox().w/2,y:A[ae].yCoords[Be]-He.boundingbox().h/2,width:He.boundingbox().w,height:He.boundingbox().h});else{var ze=d.calcBoundingBox(He,A[ae].xCoords,A[ae].yCoords,Oe);ye.nodes.push({x:ze.topLeftX,y:ze.topLeftY,width:ze.width,height:ze.height});}}else R[ae][He.id()]&&ye.nodes.push({x:R[ae][He.id()].getLeft(),y:R[ae][He.id()].getTop(),width:R[ae][He.id()].getWidth(),height:R[ae][He.id()].getHeight()});}),se.edges().forEach(function(He){var ze=He.source(),Le=He.target();if(ze.css("display")!="none"&&Le.css("display")!="none")if(w.quality=="draft"){var Ie=Oe.get(ze.id()),xe=Oe.get(Le.id()),q=[],de=[];if(ze.isParent()){var ie=d.calcBoundingBox(ze,A[ae].xCoords,A[ae].yCoords,Oe);q.push(ie.topLeftX+ie.width/2),q.push(ie.topLeftY+ie.height/2);}else q.push(A[ae].xCoords[Ie]),q.push(A[ae].yCoords[Ie]);if(Le.isParent()){var oe=d.calcBoundingBox(Le,A[ae].xCoords,A[ae].yCoords,Oe);de.push(oe.topLeftX+oe.width/2),de.push(oe.topLeftY+oe.height/2);}else de.push(A[ae].xCoords[xe]),de.push(A[ae].yCoords[xe]);ye.edges.push({startX:q[0],startY:q[1],endX:de[0],endY:de[1]});}else R[ae][ze.id()]&&R[ae][Le.id()]&&ye.edges.push({startX:R[ae][ze.id()].getCenterX(),startY:R[ae][ze.id()].getCenterY(),endX:R[ae][Le.id()].getCenterX(),endY:R[ae][Le.id()].getCenterY()});}),ye.nodes.length>0&&(j.push(ye),Q.add(ae));}});var te=I.packComponents(j,w.randomize).shifts;if(w.quality=="draft")A.forEach(function(se,ae){var Oe=se.xCoords.map(function(Be){return Be+te[ae].dx;}),ye=se.yCoords.map(function(Be){return Be+te[ae].dy;});se.xCoords=Oe,se.yCoords=ye;});else{var he=0;Q.forEach(function(se){Object.keys(R[se]).forEach(function(ae){var Oe=R[se][ae];Oe.setCenter(Oe.getCenterX()+te[he].dx,Oe.getCenterY()+te[he].dy);}),he++;});}}}else{var P=w.eles.boundingBox();if(L.push({x:P.x1+P.w/2,y:P.y1+P.h/2}),w.randomize){var B=m(w);A.push(B);}w.quality=="default"||w.quality=="proof"?(R.push(y(w,A[0])),d.relocateComponent(L[0],R[0],w)):d.relocateComponent(L[0],A[0],w);}var le=o(function(ae,Oe){if(w.quality=="default"||w.quality=="proof"){typeof ae=="number"&&(ae=Oe);var ye=void 0,Be=void 0,He=ae.data("id");return R.forEach(function(Le){He in Le&&(ye={x:Le[He].getRect().getCenterX(),y:Le[He].getRect().getCenterY()},Be=Le[He]);}),w.nodeDimensionsIncludeLabels&&(Be.labelWidth&&(Be.labelPosHorizontal=="left"?ye.x+=Be.labelWidth/2:Be.labelPosHorizontal=="right"&&(ye.x-=Be.labelWidth/2)),Be.labelHeight&&(Be.labelPosVertical=="top"?ye.y+=Be.labelHeight/2:Be.labelPosVertical=="bottom"&&(ye.y-=Be.labelHeight/2))),ye==null&&(ye={x:ae.position("x"),y:ae.position("y")}),{x:ye.x,y:ye.y};}else{var ze=void 0;return A.forEach(function(Le){var Ie=Le.nodeIndexes.get(ae.id());Ie!=null&&(ze={x:Le.xCoords[Ie],y:Le.yCoords[Ie]});}),ze==null&&(ze={x:ae.position("x"),y:ae.position("y")}),{x:ze.x,y:ze.y};}},"getPositions");if(w.quality=="default"||w.quality=="proof"||w.randomize){var J=d.calcParentsWithoutChildren(E,_),Se=_.filter(function(se){return se.css("display")=="none";});w.eles=_.not(Se),_.nodes().not(":parent").not(Se).layoutPositions(C,w,le),J.length>0&&J.forEach(function(se){se.position(le(se));});}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.");},"run")}]),b;}();a.exports=x;},657:(a,s,l)=>{var u=l(548),h=l(140).layoutBase.Matrix,f=l(140).layoutBase.SVD,d=o(function(m){var g=m.cy,y=m.eles,v=y.nodes(),x=y.nodes(":parent"),b=new Map(),T=new Map(),C=new Map(),w=[],E=[],_=[],A=[],D=[],O=[],R=[],k=[],L=void 0,S=void 0,I=1e8,M=1e-9,P=m.piTol,B=m.samplingType,F=m.nodeSeparation,z=void 0,$=o(function(){for(var Te=0,W=0,pe=!1;W<z;){Te=Math.floor(Math.random()*S),pe=!1;for(var ve=0;ve<W;ve++)if(A[ve]==Te){pe=!0;break;}if(!pe)A[W]=Te,W++;else continue;}},"randomSampleCR"),U=o(function(Te,W,pe){for(var ve=[],Pe=0,_e=0,be=0,Ve=void 0,De=[],Ye=0,at=1,Rt=0;Rt<S;Rt++)De[Rt]=I;for(ve[_e]=Te,De[Te]=0;_e>=Pe;){be=ve[Pe++];for(var st=w[be],Ue=0;Ue<st.length;Ue++)Ve=T.get(st[Ue]),De[Ve]==I&&(De[Ve]=De[be]+1,ve[++_e]=Ve);O[be][W]=De[be]*F;}if(pe){for(var ut=0;ut<S;ut++)O[ut][W]<D[ut]&&(D[ut]=O[ut][W]);for(var We=0;We<S;We++)D[We]>Ye&&(Ye=D[We],at=We);}return at;},"BFS"),K=o(function(Te){var W=void 0;if(Te){W=Math.floor(Math.random()*S),L=W;for(var ve=0;ve<S;ve++)D[ve]=I;for(var Pe=0;Pe<z;Pe++)A[Pe]=W,W=U(W,Pe,Te);}else{$();for(var pe=0;pe<z;pe++)U(A[pe],pe,Te,!1);}for(var _e=0;_e<S;_e++)for(var be=0;be<z;be++)O[_e][be]*=O[_e][be];for(var Ve=0;Ve<z;Ve++)R[Ve]=[];for(var De=0;De<z;De++)for(var Ye=0;Ye<z;Ye++)R[De][Ye]=O[A[Ye]][De];},"allBFS"),ee=o(function(){for(var Te=f.svd(R),W=Te.S,pe=Te.U,ve=Te.V,Pe=W[0]*W[0]*W[0],_e=[],be=0;be<z;be++){_e[be]=[];for(var Ve=0;Ve<z;Ve++)_e[be][Ve]=0,be==Ve&&(_e[be][Ve]=W[be]/(W[be]*W[be]+Pe/(W[be]*W[be])));}k=h.multMat(h.multMat(ve,_e),h.transpose(pe));},"sample"),Y=o(function(){for(var Te=void 0,W=void 0,pe=[],ve=[],Pe=[],_e=[],be=0;be<S;be++)pe[be]=Math.random(),ve[be]=Math.random();pe=h.normalize(pe),ve=h.normalize(ve);for(var Ve=0,De=M,Ye=M,at=void 0;;){Ve++;for(var Rt=0;Rt<S;Rt++)Pe[Rt]=pe[Rt];if(pe=h.multGamma(h.multL(h.multGamma(Pe),O,k)),Te=h.dotProduct(Pe,pe),pe=h.normalize(pe),De=h.dotProduct(Pe,pe),at=Math.abs(De/Ye),at<=1+P&&at>=1)break;Ye=De;}for(var st=0;st<S;st++)Pe[st]=pe[st];for(Ve=0,Ye=M;;){Ve++;for(var Ue=0;Ue<S;Ue++)_e[Ue]=ve[Ue];if(_e=h.minusOp(_e,h.multCons(Pe,h.dotProduct(Pe,_e))),ve=h.multGamma(h.multL(h.multGamma(_e),O,k)),W=h.dotProduct(_e,ve),ve=h.normalize(ve),De=h.dotProduct(_e,ve),at=Math.abs(De/Ye),at<=1+P&&at>=1)break;Ye=De;}for(var ut=0;ut<S;ut++)_e[ut]=ve[ut];E=h.multCons(Pe,Math.sqrt(Math.abs(Te))),_=h.multCons(_e,Math.sqrt(Math.abs(W)));},"powerIteration");u.connectComponents(g,y,u.getTopMostNodes(v),b),x.forEach(function(V){u.connectComponents(g,y,u.getTopMostNodes(V.descendants().intersection(y)),b);});for(var ce=0,Z=0;Z<v.length;Z++)v[Z].isParent()||T.set(v[Z].id(),ce++);var ue=!0,Q=!1,j=void 0;try{for(var ne=b.keys()[Symbol.iterator](),te;!(ue=(te=ne.next()).done);ue=!0){var he=te.value;T.set(he,ce++);}}catch(V){Q=!0,j=V;}finally{try{!ue&&ne.return&&ne.return();}finally{if(Q)throw j;}}for(var le=0;le<T.size;le++)w[le]=[];x.forEach(function(V){for(var Te=V.children().intersection(y);Te.nodes(":childless").length==0;)Te=Te.nodes()[0].children().intersection(y);var W=0,pe=Te.nodes(":childless")[0].connectedEdges().length;Te.nodes(":childless").forEach(function(ve,Pe){ve.connectedEdges().length<pe&&(pe=ve.connectedEdges().length,W=Pe);}),C.set(V.id(),Te.nodes(":childless")[W].id());}),v.forEach(function(V){var Te=void 0;V.isParent()?Te=T.get(C.get(V.id())):Te=T.get(V.id()),V.neighborhood().nodes().forEach(function(W){y.intersection(V.edgesWith(W)).length>0&&(W.isParent()?w[Te].push(C.get(W.id())):w[Te].push(W.id()));});});var J=o(function(Te){var W=T.get(Te),pe=void 0;b.get(Te).forEach(function(ve){g.getElementById(ve).isParent()?pe=C.get(ve):pe=ve,w[W].push(pe),w[T.get(pe)].push(Te);});},"_loop"),Se=!0,se=!1,ae=void 0;try{for(var Oe=b.keys()[Symbol.iterator](),ye;!(Se=(ye=Oe.next()).done);Se=!0){var Be=ye.value;J(Be);}}catch(V){se=!0,ae=V;}finally{try{!Se&&Oe.return&&Oe.return();}finally{if(se)throw ae;}}S=T.size;var He=void 0;if(S>2){z=S<m.sampleSize?S:m.sampleSize;for(var ze=0;ze<S;ze++)O[ze]=[];for(var Le=0;Le<z;Le++)k[Le]=[];return m.quality=="draft"||m.step=="all"?(K(B),ee(),Y(),He={nodeIndexes:T,xCoords:E,yCoords:_}):(T.forEach(function(V,Te){E.push(g.getElementById(Te).position("x")),_.push(g.getElementById(Te).position("y"));}),He={nodeIndexes:T,xCoords:E,yCoords:_}),He;}else{var Ie=T.keys(),xe=g.getElementById(Ie.next().value),q=xe.position(),de=xe.outerWidth();if(E.push(q.x),_.push(q.y),S==2){var ie=g.getElementById(Ie.next().value),oe=ie.outerWidth();E.push(q.x+de/2+oe/2+m.idealEdgeLength),_.push(q.y);}return He={nodeIndexes:T,xCoords:E,yCoords:_},He;}},"spectralLayout");a.exports={spectralLayout:d};},579:(a,s,l)=>{var u=l(212),h=o(function(d){d&&d("layout","fcose",u);},"register");typeof cytoscape<"u"&&h(cytoscape),a.exports=h;},140:a=>{a.exports=t;}},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var l=r[a]={exports:{}};return e[a](l,l.exports,n),l.exports;}o(n,"__webpack_require__");var i=n(579);return i;})();});});var gy,n0,e$=N(()=>{"use strict";rc();gy=o(t=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${t}</g>`,"wrapIcon"),n0={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:gy('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:gy('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:gy('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:gy('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:gy('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:dA,blank:{body:gy("")}}};});var V2e,U2e,H2e,W2e,q2e=N(()=>{"use strict";qt();no();rc();dr();e$();EC();V2e=o(async function(t,e,r){let n=r.getConfigField("padding"),i=r.getConfigField("iconSize"),a=i/2,s=i/6,l=s/2;await Promise.all(e.edges().map(async u=>{var _r$getNode,_r$getNode2;let{source:h,sourceDir:f,sourceArrow:d,sourceGroup:p,target:m,targetDir:g,targetArrow:y,targetGroup:v,label:x}=kC(u),{x:b,y:T}=u[0].sourceEndpoint(),{x:C,y:w}=u[0].midpoint(),{x:E,y:_}=u[0].targetEndpoint(),A=n+4;if(p&&(Wa(f)?b+=f==="L"?-A:A:T+=f==="T"?-A:A+18),v&&(Wa(g)?E+=g==="L"?-A:A:_+=g==="T"?-A:A+18),!p&&((_r$getNode=r.getNode(h))===null||_r$getNode===void 0?void 0:_r$getNode.type)==="junction"&&(Wa(f)?b+=f==="L"?a:-a:T+=f==="T"?a:-a),!v&&((_r$getNode2=r.getNode(m))===null||_r$getNode2===void 0?void 0:_r$getNode2.type)==="junction"&&(Wa(g)?E+=g==="L"?a:-a:_+=g==="T"?a:-a),u[0]._private.rscratch){let D=t.insert("g");if(D.insert("path").attr("d",`M ${b},${T} L ${C},${w} L${E},${_} `).attr("class","edge"),d){let O=Wa(f)?_4[f](b,s):b-l,R=eu(f)?_4[f](T,s):T-l;D.insert("polygon").attr("points",WF[f](s)).attr("transform",`translate(${O},${R})`).attr("class","arrow");}if(y){let O=Wa(g)?_4[g](E,s):E-l,R=eu(g)?_4[g](_,s):_-l;D.insert("polygon").attr("points",WF[g](s)).attr("transform",`translate(${O},${R})`).attr("class","arrow");}if(x){let O=D4(f,g)?"XY":Wa(f)?"X":"Y",R=0;O==="X"?R=Math.abs(b-E):O==="Y"?R=Math.abs(T-_)/1.5:R=Math.abs(b-E)/2;let k=D.append("g");if(await Hn(k,x,{useHtmlLabels:!1,width:R,classes:"architecture-service-label"},ge()),k.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),O==="X")k.attr("transform","translate("+C+", "+w+")");else if(O==="Y")k.attr("transform","translate("+C+", "+w+") rotate(-90)");else if(O==="XY"){let L=L4(f,g);if(L&&N2e(L)){let S=k.node().getBoundingClientRect(),[I,M]=I2e(L);k.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*I*M*45})`);let P=k.node().getBoundingClientRect();k.attr("transform",`
                translate(${C}, ${w-S.height/2})
                translate(${I*P.width/2}, ${M*P.height/2})
                rotate(${-1*I*M*45}, 0, ${S.height/2})
              `);}}}}}));},"drawEdges"),U2e=o(async function(t,e,r){let i=r.getConfigField("padding")*.75,a=r.getConfigField("fontSize"),l=r.getConfigField("iconSize")/2;await Promise.all(e.nodes().map(async u=>{let h=Gf(u);if(h.type==="group"){let{h:f,w:d,x1:p,y1:m}=u.boundingBox();t.append("rect").attr("x",p+l).attr("y",m+l).attr("width",d).attr("height",f).attr("class","node-bkg");let g=t.append("g"),y=p,v=m;if(h.icon){let x=g.append("g");x.html(`<g>${await Es(h.icon,{height:i,width:i,fallbackPrefix:n0.prefix})}</g>`),x.attr("transform","translate("+(y+l+1)+", "+(v+l+1)+")"),y+=i,v+=a/2-1-2;}if(h.label){let x=g.append("g");await Hn(x,h.label,{useHtmlLabels:!1,width:d,classes:"architecture-service-label"},ge()),x.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),x.attr("transform","translate("+(y+l+4)+", "+(v+l+2)+")");}}}));},"drawGroups"),H2e=o(async function(t,e,r){let n=ge();for(let i of r){let a=e.append("g"),s=t.getConfigField("iconSize");if(i.title){let f=a.append("g");await Hn(f,i.title,{useHtmlLabels:!1,width:s*1.5,classes:"architecture-service-label"},n),f.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),f.attr("transform","translate("+s/2+", "+s+")");}let l=a.append("g");if(i.icon)l.html(`<g>${await Es(i.icon,{height:s,width:s,fallbackPrefix:n0.prefix})}</g>`);else if(i.iconText){var _parseInt;l.html(`<g>${await Es("blank",{height:s,width:s,fallbackPrefix:n0.prefix})}</g>`);let p=l.append("g").append("foreignObject").attr("width",s).attr("height",s).append("div").attr("class","node-icon-text").attr("style",`height: ${s}px;`).append("div").html(ar(i.iconText,n)),m=(_parseInt=parseInt(window.getComputedStyle(p.node(),null).getPropertyValue("font-size").replace(/\D/g,"")))!==null&&_parseInt!==void 0?_parseInt:16;p.attr("style",`-webkit-line-clamp: ${Math.floor((s-2)/m)};`);}else l.append("path").attr("class","node-bkg").attr("id","node-"+i.id).attr("d",`M0 ${s} v${-s} q0,-5 5,-5 h${s} q5,0 5,5 v${s} H0 Z`);a.attr("class","architecture-service");let{width:u,height:h}=a._groups[0][0].getBBox();i.width=u,i.height=h,t.setElementForId(i.id,a);}return 0;},"drawServices"),W2e=o(function(t,e,r){r.forEach(n=>{let i=e.append("g"),a=t.getConfigField("iconSize");i.append("g").append("rect").attr("id","node-"+n.id).attr("fill-opacity","0").attr("width",a).attr("height",a),i.attr("class","architecture-junction");let{width:l,height:u}=i._groups[0][0].getBBox();i.width=l,i.height=u,t.setElementForId(n.id,i);});},"drawJunctions");});function Ent(t,e,r){t.forEach(n=>{e.add({group:"nodes",data:{type:"service",id:n.id,icon:n.icon,label:n.title,parent:n.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"});});}function Snt(t,e,r){t.forEach(n=>{e.add({group:"nodes",data:{type:"junction",id:n.id,parent:n.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"});});}function Cnt(t,e){e.nodes().map(r=>{let n=Gf(r);if(n.type==="group")return;n.x=r.position().x,n.y=r.position().y,t.getElementById(n.id).attr("transform","translate("+(n.x||0)+","+(n.y||0)+")");});}function Ant(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"group",id:r.id,icon:r.icon,label:r.title,parent:r.in},classes:"node-group"});});}function _nt(t,e){t.forEach(r=>{let{lhsId:n,rhsId:i,lhsInto:a,lhsGroup:s,rhsInto:l,lhsDir:u,rhsDir:h,rhsGroup:f,title:d}=r,p=D4(r.lhsDir,r.rhsDir)?"segments":"straight",m={id:`${n}-${i}`,label:d,source:n,sourceDir:u,sourceArrow:a,sourceGroup:s,sourceEndpoint:u==="L"?"0 50%":u==="R"?"100% 50%":u==="T"?"50% 0":"50% 100%",target:i,targetDir:h,targetArrow:l,targetGroup:f,targetEndpoint:h==="L"?"0 50%":h==="R"?"100% 50%":h==="T"?"50% 0":"50% 100%"};e.add({group:"edges",data:m,classes:p});});}function Dnt(t,e,r){let n=o((l,u)=>Object.entries(l).reduce((h,[f,d])=>{let p=0,m=Object.entries(d);if(m.length===1)return h[f]=m[0][1],h;for(let g=0;g<m.length-1;g++)for(let y=g+1;y<m.length;y++){var _r$v,_h$f,_h$f2;let[v,x]=m[g],[b,T]=m[y];if(((_r$v=r[v])===null||_r$v===void 0?void 0:_r$v[b])===u)(_h$f=h[f])!==null&&_h$f!==void 0?_h$f:h[f]=[],h[f]=[...h[f],...x,...T];else if(v==="default"||b==="default")(_h$f2=h[f])!==null&&_h$f2!==void 0?_h$f2:h[f]=[],h[f]=[...h[f],...x,...T];else{let w=`${f}-${p++}`;h[w]=x;let E=`${f}-${p++}`;h[E]=T;}}return h;},{}),"flattenAlignments"),i=e.map(l=>{let u={},h={};return Object.entries(l).forEach(([f,[d,p]])=>{var _t$getNode$in,_t$getNode,_u$p,_u$p2,_u$p2$m,_h$d,_h$d2,_h$d2$m;let m=(_t$getNode$in=(_t$getNode=t.getNode(f))===null||_t$getNode===void 0?void 0:_t$getNode.in)!==null&&_t$getNode$in!==void 0?_t$getNode$in:"default";(_u$p=u[p])!==null&&_u$p!==void 0?_u$p:u[p]={},(_u$p2$m=(_u$p2=u[p])[m])!==null&&_u$p2$m!==void 0?_u$p2$m:_u$p2[m]=[],u[p][m].push(f),(_h$d=h[d])!==null&&_h$d!==void 0?_h$d:h[d]={},(_h$d2$m=(_h$d2=h[d])[m])!==null&&_h$d2$m!==void 0?_h$d2$m:_h$d2[m]=[],h[d][m].push(f);}),{horiz:Object.values(n(u,"horizontal")).filter(f=>f.length>1),vert:Object.values(n(h,"vertical")).filter(f=>f.length>1)};}),[a,s]=i.reduce(([l,u],{horiz:h,vert:f})=>[[...l,...h],[...u,...f]],[[],[]]);return{horizontal:a,vertical:s};}function Lnt(t,e){let r=[],n=o(a=>`${a[0]},${a[1]}`,"posToStr"),i=o(a=>a.split(",").map(s=>parseInt(s)),"strToPos");return t.forEach(a=>{let s=Object.fromEntries(Object.entries(a).map(([f,d])=>[n(d),f])),l=[n([0,0])],u={},h={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;l.length>0;){let f=l.shift();if(f){u[f]=1;let d=s[f];if(d){let p=i(f);Object.entries(h).forEach(([m,g])=>{let y=n([p[0]+g[0],p[1]+g[1]]),v=s[y];v&&!u[y]&&(l.push(y),r.push({[HF[m]]:v,[HF[R2e(m)]]:d,gap:1.5*e.getConfigField("iconSize")}));});}}}}),r;}function Rnt(t,e,r,n,i,{spatialMaps:a,groupAlignments:s}){return new Promise(l=>{let u=Ge("body").append("div").attr("id","cy").attr("style","display:none"),h=il({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${i.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${i.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});u.remove(),Ant(r,h),Ent(t,h,i),Snt(e,h,i),_nt(n,h);let f=Dnt(i,a,s),d=Lnt(a,i),p=h.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(m){let[g,y]=m.connectedNodes(),{parent:v}=Gf(g),{parent:x}=Gf(y);return v===x?1.5*i.getConfigField("iconSize"):.5*i.getConfigField("iconSize");},edgeElasticity(m){let[g,y]=m.connectedNodes(),{parent:v}=Gf(g),{parent:x}=Gf(y);return v===x?.45:.001;},alignmentConstraint:f,relativePlacementConstraint:d});p.one("layoutstop",()=>{function m(g,y,v,x){let b,T,{x:C,y:w}=g,{x:E,y:_}=y;T=(x-w+(C-v)*(w-_)/(C-E))/Math.sqrt(1+Math.pow((w-_)/(C-E),2)),b=Math.sqrt(Math.pow(x-w,2)+Math.pow(v-C,2)-Math.pow(T,2));let A=Math.sqrt(Math.pow(E-C,2)+Math.pow(_-w,2));b=b/A;let D=(E-C)*(x-w)-(_-w)*(v-C);switch(!0){case D>=0:D=1;break;case D<0:D=-1;break;}let O=(E-C)*(v-C)+(_-w)*(x-w);switch(!0){case O>=0:O=1;break;case O<0:O=-1;break;}return T=Math.abs(T)*D,b=b*O,{distances:T,weights:b};}o(m,"getSegmentWeights"),h.startBatch();for(let g of Object.values(h.edges())){var _g$data;if((_g$data=g.data)!==null&&_g$data!==void 0&&_g$data.call(g)){let{x:y,y:v}=g.source().position(),{x,y:b}=g.target().position();if(y!==x&&v!==b){let T=g.sourceEndpoint(),C=g.targetEndpoint(),{sourceDir:w}=kC(g),[E,_]=eu(w)?[T.x,C.y]:[C.x,T.y],{weights:A,distances:D}=m(T,C,E,_);g.style("segment-distances",D),g.style("segment-weights",A);}}}h.endBatch(),p.run();}),p.run(),h.ready(m=>{X.info("Ready",m),l(h);});});}var Y2e,Nnt,X2e,j2e=N(()=>{"use strict";aF();Y2e=Sa(G2e(),1);pr();yt();rc();zl();yi();e$();EC();q2e();R3([{name:n0.prefix,icons:n0}]);il.use(Y2e.default);o(Ent,"addServices");o(Snt,"addJunctions");o(Cnt,"positionNodes");o(Ant,"addGroups");o(_nt,"addEdges");o(Dnt,"getAlignments");o(Lnt,"getRelativeConstraints");o(Rnt,"layoutArchitecture");Nnt=o(async(t,e,r,n)=>{let i=n.db,a=i.getServices(),s=i.getJunctions(),l=i.getGroups(),u=i.getEdges(),h=i.getDataStructures(),f=Di(e),d=f.append("g");d.attr("class","architecture-edges");let p=f.append("g");p.attr("class","architecture-services");let m=f.append("g");m.attr("class","architecture-groups"),await H2e(i,p,a),W2e(i,p,s);let g=await Rnt(a,s,l,u,i,h);await V2e(d,g,i),await U2e(m,g,i),Cnt(i,g),_o(void 0,f,i.getConfigField("padding"),i.getConfigField("useMaxWidth"));},"draw"),X2e={draw:Nnt};});var K2e={};hr(K2e,{diagram:()=>Mnt});var Mnt,Q2e=N(()=>{"use strict";F2e();YF();z2e();j2e();Mnt={parser:XF,get db(){return new my();},renderer:X2e,styles:$2e};});var yy,t$=N(()=>{"use strict";var _Class212;Ca();Jn();nr();Gt();ci();yy=(_Class212=class yy{constructor(){this.nodes=[];this.levels=new Map();this.outerNodes=[];this.classes=new Map();this.setAccTitle=Cr;this.getAccTitle=_r;this.setDiagramTitle=Ir;this.getDiagramTitle=Rr;this.getAccDescription=Lr;this.setAccDescription=Dr;}getNodes(){return this.nodes;}getConfig(){var _r$treemap;let e=lr,r=Qt();return Fn({...e.treemap,...((_r$treemap=r.treemap)!==null&&_r$treemap!==void 0?_r$treemap:{})});}addNode(e,r){var _this$root;this.nodes.push(e),this.levels.set(e,r),r===0&&(this.outerNodes.push(e),(_this$root=this.root)!==null&&_this$root!==void 0?_this$root:this.root=e);}getRoot(){return{name:"",children:this.outerNodes};}addClass(e,r){var _this$classes$get3;let n=(_this$classes$get3=this.classes.get(e))!==null&&_this$classes$get3!==void 0?_this$classes$get3:{id:e,styles:[],textStyles:[]},i=r.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");i&&i.forEach(a=>{k2(a)&&(n!==null&&n!==void 0&&n.textStyles?n.textStyles.push(a):n.textStyles=[a]),n!==null&&n!==void 0&&n.styles?n.styles.push(a):n.styles=[a];}),this.classes.set(e,n);}getClasses(){return this.classes;}getStylesForClass(e){var _this$classes$get$sty,_this$classes$get4;return(_this$classes$get$sty=(_this$classes$get4=this.classes.get(e))===null||_this$classes$get4===void 0?void 0:_this$classes$get4.styles)!==null&&_this$classes$get$sty!==void 0?_this$classes$get$sty:[];}clear(){wr(),this.nodes=[],this.levels=new Map(),this.outerNodes=[],this.classes=new Map(),this.root=void 0;}},o(_Class212,"TreeMapDB"),_Class212);});function exe(t){if(!t.length)return[];let e=[],r=[];return t.forEach(n=>{let i={name:n.name,children:n.type==="Leaf"?void 0:[]};for(i.classSelector=n===null||n===void 0?void 0:n.classSelector,n!==null&&n!==void 0&&n.cssCompiledStyles&&(i.cssCompiledStyles=[n.cssCompiledStyles]),n.type==="Leaf"&&n.value!==void 0&&(i.value=n.value);r.length>0&&r[r.length-1].level>=n.level;)r.pop();if(r.length===0)e.push(i);else{let a=r[r.length-1].node;a.children?a.children.push(i):a.children=[i];}n.type!=="Leaf"&&r.push({node:i,level:n.level});}),e;}var txe=N(()=>{"use strict";o(exe,"buildHierarchy");});var Bnt,Fnt,r$,rxe=N(()=>{"use strict";gf();yt();Dp();txe();t$();Bnt=o((t,e)=>{Qo(t,e);let r=[];for(let a of(_t$TreemapRows=t.TreemapRows)!==null&&_t$TreemapRows!==void 0?_t$TreemapRows:[]){var _t$TreemapRows,_a$className,_a$styleText;a.$type==="ClassDefStatement"&&e.addClass((_a$className=a.className)!==null&&_a$className!==void 0?_a$className:"",(_a$styleText=a.styleText)!==null&&_a$styleText!==void 0?_a$styleText:"");}for(let a of(_t$TreemapRows2=t.TreemapRows)!==null&&_t$TreemapRows2!==void 0?_t$TreemapRows2:[]){var _t$TreemapRows2;let s=a.item;if(!s)continue;let l=a.indent?parseInt(a.indent):0,u=Fnt(s),h=s.classSelector?e.getStylesForClass(s.classSelector):[],f=h.length>0?h.join(";"):void 0,d={level:l,name:u,type:s.$type,value:s.value,classSelector:s.classSelector,cssCompiledStyles:f};r.push(d);}let n=exe(r),i=o((a,s)=>{for(let l of a)e.addNode(l,s),l.children&&l.children.length>0&&i(l.children,s+1);},"addNodesRecursively");i(n,0);},"populate"),Fnt=o(t=>t.name?String(t.name):"","getItemName"),r$={parser:{yy:void 0},parse:o(async t=>{try{var _r$$parser;let r=await ps("treemap",t);X.debug("Treemap AST:",r);let n=(_r$$parser=r$.parser)===null||_r$$parser===void 0?void 0:_r$$parser.yy;if(!(n instanceof yy))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Bnt(r,n);}catch(e){throw X.error("Error parsing treemap:",e),e;}},"parse")};});var $nt,vy,I4,znt,Gnt,nxe,ixe=N(()=>{"use strict";zl();Jd();yi();pr();Gt();Jn();yt();$nt=10,vy=10,I4=25,znt=o((t,e,r,n)=>{var _a$padding,_a$diagramPadding;let i=n.db,a=i.getConfig(),s=(_a$padding=a.padding)!==null&&_a$padding!==void 0?_a$padding:$nt,l=i.getDiagramTitle(),u=i.getRoot(),{themeVariables:h}=Qt();if(!u)return;let f=l?30:0,d=Di(e),p=a.nodeWidth?a.nodeWidth*vy:960,m=a.nodeHeight?a.nodeHeight*vy:500,g=p,y=m+f;d.attr("viewBox",`0 0 ${g} ${y}`),hn(d,y,g,a.useMaxWidth);let v;try{let S=a.valueFormat||",";if(S==="$0,0")v=o(I=>"$"+oc(",")(I),"valueFormat");else if(S.startsWith("$")&&S.includes(",")){let I=/\.\d+/.exec(S),M=I?I[0]:"";v=o(P=>"$"+oc(","+M)(P),"valueFormat");}else if(S.startsWith("$")){let I=S.substring(1);v=o(M=>"$"+oc(I||"")(M),"valueFormat");}else v=oc(S);}catch(S){X.error("Error creating format function:",S),v=oc(",");}let x=Qs().range(["transparent",h.cScale0,h.cScale1,h.cScale2,h.cScale3,h.cScale4,h.cScale5,h.cScale6,h.cScale7,h.cScale8,h.cScale9,h.cScale10,h.cScale11]),b=Qs().range(["transparent",h.cScalePeer0,h.cScalePeer1,h.cScalePeer2,h.cScalePeer3,h.cScalePeer4,h.cScalePeer5,h.cScalePeer6,h.cScalePeer7,h.cScalePeer8,h.cScalePeer9,h.cScalePeer10,h.cScalePeer11]),T=Qs().range([h.cScaleLabel0,h.cScaleLabel1,h.cScaleLabel2,h.cScaleLabel3,h.cScaleLabel4,h.cScaleLabel5,h.cScaleLabel6,h.cScaleLabel7,h.cScaleLabel8,h.cScaleLabel9,h.cScaleLabel10,h.cScaleLabel11]);l&&d.append("text").attr("x",g/2).attr("y",f/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(l);let C=d.append("g").attr("transform",`translate(0, ${f})`).attr("class","treemapContainer"),w=O0(u).sum(S=>{var _S$value;return(_S$value=S.value)!==null&&_S$value!==void 0?_S$value:0;}).sort((S,I)=>{var _I$value,_S$value2;return((_I$value=I.value)!==null&&_I$value!==void 0?_I$value:0)-((_S$value2=S.value)!==null&&_S$value2!==void 0?_S$value2:0);}),_=A5().size([p,m]).paddingTop(S=>S.children&&S.children.length>0?I4+vy:0).paddingInner(s).paddingLeft(S=>S.children&&S.children.length>0?vy:0).paddingRight(S=>S.children&&S.children.length>0?vy:0).paddingBottom(S=>S.children&&S.children.length>0?vy:0).round(!0)(w),A=_.descendants().filter(S=>S.children&&S.children.length>0),D=C.selectAll(".treemapSection").data(A).enter().append("g").attr("class","treemapSection").attr("transform",S=>`translate(${S.x0},${S.y0})`);D.append("rect").attr("width",S=>S.x1-S.x0).attr("height",I4).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",S=>S.depth===0?"display: none;":""),D.append("clipPath").attr("id",(S,I)=>`clip-section-${e}-${I}`).append("rect").attr("width",S=>Math.max(0,S.x1-S.x0-12)).attr("height",I4),D.append("rect").attr("width",S=>S.x1-S.x0).attr("height",S=>S.y1-S.y0).attr("class",(S,I)=>`treemapSection section${I}`).attr("fill",S=>x(S.data.name)).attr("fill-opacity",.6).attr("stroke",S=>b(S.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",S=>{if(S.depth===0)return"display: none;";let I=qe({cssCompiledStyles:S.data.cssCompiledStyles});return I.nodeStyles+";"+I.borderStyles.join(";");}),D.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",I4/2).attr("dominant-baseline","middle").text(S=>S.depth===0?"":S.data.name).attr("font-weight","bold").attr("style",S=>{if(S.depth===0)return"display: none;";let I="dominant-baseline: middle; font-size: 12px; fill:"+T(S.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",M=qe({cssCompiledStyles:S.data.cssCompiledStyles});return I+M.labelStyles.replace("color:","fill:");}).each(function(S){if(S.depth===0)return;let I=Ge(this),M=S.data.name;I.text(M);let P=S.x1-S.x0,B=6,F;a.showValues!==!1&&S.value?F=P-10-30-10-B:F=P-B-6;let $=Math.max(15,F),U=I.node();if(U.getComputedTextLength()>$){let ee="...",Y=M;for(;Y.length>0;){if(Y=M.substring(0,Y.length-1),Y.length===0){I.text(ee),U.getComputedTextLength()>$&&I.text("");break;}if(I.text(Y+ee),U.getComputedTextLength()<=$)break;}}}),a.showValues!==!1&&D.append("text").attr("class","treemapSectionValue").attr("x",S=>S.x1-S.x0-10).attr("y",I4/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(S=>S.value?v(S.value):"").attr("font-style","italic").attr("style",S=>{if(S.depth===0)return"display: none;";let I="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+T(S.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",M=qe({cssCompiledStyles:S.data.cssCompiledStyles});return I+M.labelStyles.replace("color:","fill:");});let O=_.leaves(),R=C.selectAll(".treemapLeafGroup").data(O).enter().append("g").attr("class",(S,I)=>`treemapNode treemapLeafGroup leaf${I}${S.data.classSelector?` ${S.data.classSelector}`:""}x`).attr("transform",S=>`translate(${S.x0},${S.y0})`);R.append("rect").attr("width",S=>S.x1-S.x0).attr("height",S=>S.y1-S.y0).attr("class","treemapLeaf").attr("fill",S=>S.parent?x(S.parent.data.name):x(S.data.name)).attr("style",S=>qe({cssCompiledStyles:S.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",S=>S.parent?x(S.parent.data.name):x(S.data.name)).attr("stroke-width",3),R.append("clipPath").attr("id",(S,I)=>`clip-${e}-${I}`).append("rect").attr("width",S=>Math.max(0,S.x1-S.x0-4)).attr("height",S=>Math.max(0,S.y1-S.y0-4)),R.append("text").attr("class","treemapLabel").attr("x",S=>(S.x1-S.x0)/2).attr("y",S=>(S.y1-S.y0)/2).attr("style",S=>{let I="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+T(S.data.name)+";",M=qe({cssCompiledStyles:S.data.cssCompiledStyles});return I+M.labelStyles.replace("color:","fill:");}).attr("clip-path",(S,I)=>`url(#clip-${e}-${I})`).text(S=>S.data.name).each(function(S){let I=Ge(this),M=S.x1-S.x0,P=S.y1-S.y0,B=I.node(),F=4,z=M-2*F,$=P-2*F;if(z<10||$<10){I.style("display","none");return;}let U=parseInt(I.style("font-size"),10),K=8,ee=28,Y=.6,ce=6,Z=2;for(;B.getComputedTextLength()>z&&U>K;)U--,I.style("font-size",`${U}px`);let ue=Math.max(ce,Math.min(ee,Math.round(U*Y))),Q=U+Z+ue;for(;Q>$&&U>K&&(U--,ue=Math.max(ce,Math.min(ee,Math.round(U*Y))),!(ue<ce&&U===K));)I.style("font-size",`${U}px`),Q=U+Z+ue,ue<=ce&&Q>$;I.style("font-size",`${U}px`),(B.getComputedTextLength()>z||U<K||$<U)&&I.style("display","none");}),a.showValues!==!1&&R.append("text").attr("class","treemapValue").attr("x",I=>(I.x1-I.x0)/2).attr("y",function(I){return(I.y1-I.y0)/2;}).attr("style",I=>{let M="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+T(I.data.name)+";",P=qe({cssCompiledStyles:I.data.cssCompiledStyles});return M+P.labelStyles.replace("color:","fill:");}).attr("clip-path",(I,M)=>`url(#clip-${e}-${M})`).text(I=>I.value?v(I.value):"").each(function(I){let M=Ge(this),P=this.parentNode;if(!P){M.style("display","none");return;}let B=Ge(P).select(".treemapLabel");if(B.empty()||B.style("display")==="none"){M.style("display","none");return;}let F=parseFloat(B.style("font-size")),z=28,$=.6,U=6,K=2,ee=Math.max(U,Math.min(z,Math.round(F*$)));M.style("font-size",`${ee}px`);let ce=(I.y1-I.y0)/2+F/2+K;M.attr("y",ce);let Z=I.x1-I.x0,j=I.y1-I.y0-4,ne=Z-2*4;M.node().getComputedTextLength()>ne||ce+ee>j||ee<U?M.style("display","none"):M.style("display",null);});let L=(_a$diagramPadding=a.diagramPadding)!==null&&_a$diagramPadding!==void 0?_a$diagramPadding:8;Wo(d,L,"flowchart",(a===null||a===void 0?void 0:a.useMaxWidth)||!1);},"draw"),Gnt=o(function(t,e){return e.db.getClasses();},"getClasses"),nxe={draw:znt,getClasses:Gnt};});var Vnt,Unt,axe,sxe=N(()=>{"use strict";nr();Vnt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},Unt=o(({treemap:t}={})=>{let e=Fn(Vnt,t);return`
  .treemapNode.section {
    stroke: ${e.sectionStrokeColor};
    stroke-width: ${e.sectionStrokeWidth};
    fill: ${e.sectionFillColor};
  }
  .treemapNode.leaf {
    stroke: ${e.leafStrokeColor};
    stroke-width: ${e.leafStrokeWidth};
    fill: ${e.leafFillColor};
  }
  .treemapLabel {
    fill: ${e.labelColor};
    font-size: ${e.labelFontSize};
  }
  .treemapValue {
    fill: ${e.valueColor};
    font-size: ${e.valueFontSize};
  }
  .treemapTitle {
    fill: ${e.titleColor};
    font-size: ${e.titleFontSize};
  }
  `;},"getStyles"),axe=Unt;});var oxe={};hr(oxe,{diagram:()=>Hnt});var Hnt,lxe=N(()=>{"use strict";t$();rxe();ixe();sxe();Hnt={parser:r$,get db(){return new yy();},renderer:nxe,styles:axe};});var Lit={};hr(Lit,{default:()=>Dit});rc();pA();ad();var lK="c4",iAe=o(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),aAe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(oK(),sK));return{id:lK,diagram:t};},"loader"),sAe={id:lK,detector:iAe,loader:aAe},cK=sAe;var cse="flowchart",VPe=o((t,e)=>{var _e$flowchart3,_e$flowchart4;return(e===null||e===void 0||(_e$flowchart3=e.flowchart)===null||_e$flowchart3===void 0?void 0:_e$flowchart3.defaultRenderer)==="dagre-wrapper"||(e===null||e===void 0||(_e$flowchart4=e.flowchart)===null||_e$flowchart4===void 0?void 0:_e$flowchart4.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t);},"detector"),UPe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(vk(),yk));return{id:cse,diagram:t};},"loader"),HPe={id:cse,detector:VPe,loader:UPe},use=HPe;var hse="flowchart-v2",WPe=o((t,e)=>{var _e$flowchart5,_e$flowchart6,_e$flowchart7;return(e===null||e===void 0||(_e$flowchart5=e.flowchart)===null||_e$flowchart5===void 0?void 0:_e$flowchart5.defaultRenderer)==="dagre-d3"?!1:((e===null||e===void 0||(_e$flowchart6=e.flowchart)===null||_e$flowchart6===void 0?void 0:_e$flowchart6.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&(e===null||e===void 0||(_e$flowchart7=e.flowchart)===null||_e$flowchart7===void 0?void 0:_e$flowchart7.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t));},"detector"),qPe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(vk(),yk));return{id:hse,diagram:t};},"loader"),YPe={id:hse,detector:WPe,loader:qPe},fse=YPe;var Tse="er",ZPe=o(t=>/^\s*erDiagram/.test(t),"detector"),JPe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(bse(),xse));return{id:Tse,diagram:t};},"loader"),eBe={id:Tse,detector:ZPe,loader:JPe},wse=eBe;var Dhe="gitGraph",LGe=o(t=>/^\s*gitGraph/.test(t),"detector"),RGe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(_he(),Ahe));return{id:Dhe,diagram:t};},"loader"),NGe={id:Dhe,detector:LGe,loader:RGe},Lhe=NGe;var sfe="gantt",xVe=o(t=>/^\s*gantt/.test(t),"detector"),bVe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(afe(),ife));return{id:sfe,diagram:t};},"loader"),TVe={id:sfe,detector:xVe,loader:bVe},ofe=TVe;var gfe="info",AVe=o(t=>/^\s*info/.test(t),"detector"),_Ve=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(mfe(),pfe));return{id:gfe,diagram:t};},"loader"),yfe={id:gfe,detector:AVe,loader:_Ve};var Afe="pie",GVe=o(t=>/^\s*pie/.test(t),"detector"),VVe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Cfe(),Sfe));return{id:Afe,diagram:t};},"loader"),_fe={id:Afe,detector:GVe,loader:VVe};var Gfe="quadrantChart",sUe=o(t=>/^\s*quadrantChart/.test(t),"detector"),oUe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(zfe(),$fe));return{id:Gfe,diagram:t};},"loader"),lUe={id:Gfe,detector:sUe,loader:oUe},Vfe=lUe;var mde="xychart",SUe=o(t=>/^\s*xychart(-beta)?/.test(t),"detector"),CUe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(pde(),dde));return{id:mde,diagram:t};},"loader"),AUe={id:mde,detector:SUe,loader:CUe},gde=AUe;var Sde="requirement",RUe=o(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),NUe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Ede(),kde));return{id:Sde,diagram:t};},"loader"),MUe={id:Sde,detector:RUe,loader:NUe},Cde=MUe;var qde="sequence",gHe=o(t=>/^\s*sequenceDiagram/.test(t),"detector"),yHe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Wde(),Hde));return{id:qde,diagram:t};},"loader"),vHe={id:qde,detector:gHe,loader:yHe},Yde=vHe;var Jde="class",EHe=o((t,e)=>{var _e$class;return(e===null||e===void 0||(_e$class=e.class)===null||_e$class===void 0?void 0:_e$class.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t);},"detector"),SHe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Zde(),Qde));return{id:Jde,diagram:t};},"loader"),CHe={id:Jde,detector:EHe,loader:SHe},epe=CHe;var npe="classDiagram",_He=o((t,e)=>{var _e$class2;return /^\s*classDiagram/.test(t)&&(e===null||e===void 0||(_e$class2=e.class)===null||_e$class2===void 0?void 0:_e$class2.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t);},"detector"),DHe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(rpe(),tpe));return{id:npe,diagram:t};},"loader"),LHe={id:npe,detector:_He,loader:DHe},ipe=LHe;var Ope="state",tWe=o((t,e)=>{var _e$state;return(e===null||e===void 0||(_e$state=e.state)===null||_e$state===void 0?void 0:_e$state.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t);},"detector"),rWe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Ipe(),Mpe));return{id:Ope,diagram:t};},"loader"),nWe={id:Ope,detector:tWe,loader:rWe},Ppe=nWe;var $pe="stateDiagram",aWe=o((t,e)=>{var _e$state2;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&(e===null||e===void 0||(_e$state2=e.state)===null||_e$state2===void 0?void 0:_e$state2.defaultRenderer)==="dagre-wrapper");},"detector"),sWe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Fpe(),Bpe));return{id:$pe,diagram:t};},"loader"),oWe={id:$pe,detector:aWe,loader:sWe},zpe=oWe;var r0e="journey",_We=o(t=>/^\s*journey/.test(t),"detector"),DWe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(t0e(),e0e));return{id:r0e,diagram:t};},"loader"),LWe={id:r0e,detector:_We,loader:DWe},n0e=LWe;yt();zl();yi();var RWe=o((t,e,r)=>{X.debug(`rendering svg for syntax error
`);let n=Di(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),hn(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`);},"draw"),jP={draw:RWe},i0e=jP;var NWe={db:{},renderer:jP,parser:{parse:o(()=>{},"parse")}},a0e=NWe;var s0e="flowchart-elk",MWe=o((t,e={})=>{var _e$flowchart8;return /^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&(e===null||e===void 0||(_e$flowchart8=e.flowchart)===null||_e$flowchart8===void 0?void 0:_e$flowchart8.defaultRenderer)==="elk"?(e.layout="elk",!0):!1;},"detector"),IWe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(vk(),yk));return{id:s0e,diagram:t};},"loader"),OWe={id:s0e,detector:MWe,loader:IWe},o0e=OWe;var M0e="timeline",eqe=o(t=>/^\s*timeline/.test(t),"detector"),tqe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(N0e(),R0e));return{id:M0e,diagram:t};},"loader"),rqe={id:M0e,detector:eqe,loader:tqe},I0e=rqe;var cye="mindmap",Cet=o(t=>/^\s*mindmap/.test(t),"detector"),Aet=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(lye(),oye));return{id:cye,diagram:t};},"loader"),_et={id:cye,detector:Cet,loader:Aet},uye=_et;var wye="kanban",Het=o(t=>/^\s*kanban/.test(t),"detector"),Wet=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Tye(),bye));return{id:wye,diagram:t};},"loader"),qet={id:wye,detector:Het,loader:Wet},kye=qet;var ive="sankey",mtt=o(t=>/^\s*sankey(-beta)?/.test(t),"detector"),gtt=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(nve(),rve));return{id:ive,diagram:t};},"loader"),ytt={id:ive,detector:mtt,loader:gtt},ave=ytt;var dve="packet",Ctt=o(t=>/^\s*packet(-beta)?/.test(t),"detector"),Att=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(fve(),hve));return{id:dve,diagram:t};},"loader"),pve={id:dve,detector:Ctt,loader:Att};var Sve="radar",jtt=o(t=>/^\s*radar-beta/.test(t),"detector"),Ktt=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Eve(),kve));return{id:Sve,diagram:t};},"loader"),Cve={id:Sve,detector:jtt,loader:Ktt};var D2e="block",ynt=o(t=>/^\s*block(-beta)?/.test(t),"detector"),vnt=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(_2e(),A2e));return{id:D2e,diagram:t};},"loader"),xnt={id:D2e,detector:ynt,loader:vnt},L2e=xnt;var Z2e="architecture",Int=o(t=>/^\s*architecture/.test(t),"detector"),Ont=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Q2e(),K2e));return{id:Z2e,diagram:t};},"loader"),Pnt={id:Z2e,detector:Int,loader:Ont},J2e=Pnt;ad();qt();var cxe="treemap",Wnt=o(t=>/^\s*treemap/.test(t),"detector"),qnt=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(lxe(),oxe));return{id:cxe,diagram:t};},"loader"),uxe={id:cxe,detector:Wnt,loader:qnt};var hxe=!1,xy=o(()=>{hxe||(hxe=!0,sd("error",a0e,t=>t.toLowerCase().trim()==="error"),sd("---",{db:{clear:o(()=>{},"clear")},styles:{},renderer:{draw:o(()=>{},"draw")},parser:{parse:o(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks");},"parse")},init:o(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Qy(o0e,uye,J2e),Qy(cK,kye,ipe,epe,wse,ofe,yfe,_fe,Cde,Yde,fse,use,I0e,Lhe,zpe,Ppe,n0e,Vfe,ave,pve,gde,L2e,Cve,uxe));},"addDiagrams");yt();ad();qt();var fxe=o(async()=>{X.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(du).map(async([r,{detector:n,loader:i}])=>{if(i)try{rv(r);}catch{try{let{diagram:a,id:s}=await i();sd(s,a,n);}catch(a){throw X.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete du[r],a;}}}))).filter(r=>r.status==="rejected");if(e.length>0){X.error(`Failed to load ${e.length} external diagrams`);for(let r of e)X.error(r);throw new Error(`Failed to load ${e.length} external diagrams`);}},"loadRegisteredDiagrams");yt();pr();var SC="comm",CC="rule",AC="decl";var dxe="@import";var pxe="@namespace",mxe="@keyframes";var gxe="@layer";var n$=Math.abs,O4=String.fromCharCode;function _C(t){return t.trim();}o(_C,"trim");function P4(t,e,r){return t.replace(e,r);}o(P4,"replace");function yxe(t,e,r){return t.indexOf(e,r);}o(yxe,"indexof");function Vf(t,e){return t.charCodeAt(e)|0;}o(Vf,"charat");function Uf(t,e,r){return t.slice(e,r);}o(Uf,"substr");function xo(t){return t.length;}o(xo,"strlen");function vxe(t){return t.length;}o(vxe,"sizeof");function by(t,e){return e.push(t),t;}o(by,"append");var DC=1,Ty=1,xxe=0,sl=0,Ni=0,ky="";function LC(t,e,r,n,i,a,s,l){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:DC,column:Ty,length:s,return:"",siblings:l};}o(LC,"node");function bxe(){return Ni;}o(bxe,"char");function Txe(){return Ni=sl>0?Vf(ky,--sl):0,Ty--,Ni===10&&(Ty=1,DC--),Ni;}o(Txe,"prev");function ol(){return Ni=sl<xxe?Vf(ky,sl++):0,Ty++,Ni===10&&(Ty=1,DC++),Ni;}o(ol,"next");function ih(){return Vf(ky,sl);}o(ih,"peek");function B4(){return sl;}o(B4,"caret");function RC(t,e){return Uf(ky,t,e);}o(RC,"slice");function wy(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1;}return 0;}o(wy,"token");function wxe(t){return DC=Ty=1,xxe=xo(ky=t),sl=0,[];}o(wxe,"alloc");function kxe(t){return ky="",t;}o(kxe,"dealloc");function NC(t){return _C(RC(sl-1,i$(t===91?t+2:t===40?t+1:t)));}o(NC,"delimit");function Exe(t){for(;(Ni=ih())&&Ni<33;)ol();return wy(t)>2||wy(Ni)>3?"":" ";}o(Exe,"whitespace");function Sxe(t,e){for(;--e&&ol()&&!(Ni<48||Ni>102||Ni>57&&Ni<65||Ni>70&&Ni<97););return RC(t,B4()+(e<6&&ih()==32&&ol()==32));}o(Sxe,"escaping");function i$(t){for(;ol();)switch(Ni){case t:return sl;case 34:case 39:t!==34&&t!==39&&i$(Ni);break;case 40:t===41&&i$(t);break;case 92:ol();break;}return sl;}o(i$,"delimiter");function Cxe(t,e){for(;ol()&&t+Ni!==57;)if(t+Ni===84&&ih()===47)break;return"/*"+RC(e,sl-1)+"*"+O4(t===47?t:ol());}o(Cxe,"commenter");function Axe(t){for(;!wy(ih());)ol();return RC(t,sl);}o(Axe,"identifier");function Lxe(t){return kxe(MC("",null,null,null,[""],t=wxe(t),0,[0],t));}o(Lxe,"compile");function MC(t,e,r,n,i,a,s,l,u){for(var h=0,f=0,d=s,p=0,m=0,g=0,y=1,v=1,x=1,b=0,T="",C=i,w=a,E=n,_=T;v;)switch(g=b,b=ol()){case 40:if(g!=108&&Vf(_,d-1)==58){yxe(_+=P4(NC(b),"&","&\f"),"&\f",n$(h?l[h-1]:0))!=-1&&(x=-1);break;}case 34:case 39:case 91:_+=NC(b);break;case 9:case 10:case 13:case 32:_+=Exe(g);break;case 92:_+=Sxe(B4()-1,7);continue;case 47:switch(ih()){case 42:case 47:by(Ynt(Cxe(ol(),B4()),e,r,u),u),(wy(g||1)==5||wy(ih()||1)==5)&&xo(_)&&Uf(_,-1,void 0)!==" "&&(_+=" ");break;default:_+="/";}break;case 123*y:l[h++]=xo(_)*x;case 125*y:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+f:x==-1&&(_=P4(_,/\f/g,"")),m>0&&(xo(_)-d||y===0&&g===47)&&by(m>32?Dxe(_+";",n,r,d-1,u):Dxe(P4(_," ","")+";",n,r,d-2,u),u);break;case 59:_+=";";default:if(by(E=_xe(_,e,r,h,f,i,l,T,C=[],w=[],d,a),a),b===123)if(f===0)MC(_,e,E,E,C,a,d,l,w);else{switch(p){case 99:if(Vf(_,3)===110)break;case 108:if(Vf(_,2)===97)break;default:f=0;case 100:case 109:case 115:}f?MC(t,E,E,n&&by(_xe(t,E,E,0,0,i,l,T,i,C=[],d,w),w),i,w,d,l,n?C:w):MC(_,E,E,E,[""],w,0,l,w);}}h=f=m=0,y=x=1,T=_="",d=s;break;case 58:d=1+xo(_),m=g;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&Txe()==125)continue;}switch(_+=O4(b),b*y){case 38:x=f>0?1:(_+="\f",-1);break;case 44:l[h++]=(xo(_)-1)*x,x=1;break;case 64:ih()===45&&(_+=NC(ol())),p=ih(),f=d=xo(T=_+=Axe(B4())),b++;break;case 45:g===45&&xo(_)==2&&(y=0);}}return a;}o(MC,"parse");function _xe(t,e,r,n,i,a,s,l,u,h,f,d){for(var p=i-1,m=i===0?a:[""],g=vxe(m),y=0,v=0,x=0;y<n;++y)for(var b=0,T=Uf(t,p+1,p=n$(v=s[y])),C=t;b<g;++b)(C=_C(v>0?m[b]+" "+T:P4(T,/&\f/g,m[b])))&&(u[x++]=C);return LC(t,e,r,i===0?CC:l,u,h,f,d);}o(_xe,"ruleset");function Ynt(t,e,r,n){return LC(t,e,r,SC,O4(bxe()),Uf(t,2,-2),0,n);}o(Ynt,"comment");function Dxe(t,e,r,n,i){return LC(t,e,r,AC,Uf(t,0,n),Uf(t,n+1,-1),n,i);}o(Dxe,"declaration");function IC(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r;}o(IC,"serialize");function Rxe(t,e,r,n){switch(t.type){case gxe:if(t.children.length)break;case dxe:case pxe:case AC:return t.return=t.return||t.value;case SC:return"";case mxe:return t.return=t.value+"{"+IC(t.children,n)+"}";case CC:if(!xo(t.value=t.props.join(",")))return"";}return xo(r=IC(t.children,n))?t.return=t.value+"{"+r+"}":"";}o(Rxe,"stringify");T7();nk();qO();var Xnt="graphics-document document";function Nxe(t,e){t.attr("role",Xnt),e!==""&&t.attr("aria-roledescription",e);}o(Nxe,"setA11yDiagramInfo");function Mxe(t,e,r,n){if(t.insert!==void 0){if(r){let i=`chart-desc-${n}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r);}if(e){let i=`chart-title-${n}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e);}}}o(Mxe,"addSVGa11yTitleDescription");c0();Jn();Jn();qt();ad();mA();nr();var Ey=(_t12=class t{constructor(e,r,n,i,a){this.type=e;this.text=r;this.db=n;this.parser=i;this.renderer=a;}static async fromText(e,r={}){var _a$clear,_a$setDiagramTitle;let n=Qt(),i=b0(e,n);e=Qj(e)+`
`;try{rv(i);}catch{let h=DV(i);if(!h)throw new x0(`Diagram ${i} not found.`);let{id:f,diagram:d}=await h();sd(f,d);}let{db:a,parser:s,renderer:l,init:u}=rv(i);return s.parser&&(s.parser.yy=a),(_a$clear=a.clear)!==null&&_a$clear!==void 0&&_a$clear.call(a),u!==null&&u!==void 0&&u(n),r.title&&(_a$setDiagramTitle=a.setDiagramTitle)!==null&&_a$setDiagramTitle!==void 0&&_a$setDiagramTitle.call(a,r.title),await s.parse(e),new t(i,e,a,s,l);}async render(e,r){await this.renderer.draw(this.text,e,r,this);}getParser(){return this.parser;}getType(){return this.type;}},o(_t12,"Diagram"),_t12);dr();var Ixe=[];var Oxe=o(()=>{Ixe.forEach(t=>{t();}),Ixe=[];},"attachFunctions");yt();var Pxe=o(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");I3();IT();function Bxe(t){var _gm;let e=t.match(M3);if(!e)return{text:t,metadata:{}};let r=(_gm=gm(e[1],{schema:mm}))!==null&&_gm!==void 0?_gm:{};r=typeof r=="object"&&!Array.isArray(r)?r:{};let n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:t.slice(e[0].length),metadata:n};}o(Bxe,"extractFrontMatter");nr();var jnt=o(t=>t.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Knt=o(t=>{let{text:e,metadata:r}=Bxe(t),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:e};},"processFrontmatter"),Qnt=o(t=>{var _Vt$detectInit;let e=(_Vt$detectInit=Vt.detectInit(t))!==null&&_Vt$detectInit!==void 0?_Vt$detectInit:{},r=Vt.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):(r===null||r===void 0?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:jj(t),directive:e};},"processDirectives");function a$(t){let e=jnt(t),r=Knt(e),n=Qnt(r.text),i=Fn(r.config,n.directive);return t=Pxe(n.text),{code:t,title:r.title,config:i};}o(a$,"preprocessDiagram");vA();Q4();nr();function Fxe(t){let e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r);}o(Fxe,"toBase64");var Znt=5e4,Jnt="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",eit="sandbox",tit="loose",rit="http://www.w3.org/2000/svg",nit="http://www.w3.org/1999/xlink",iit="http://www.w3.org/1999/xhtml",ait="100%",sit="100%",oit="border:0;margin:0;",lit="margin:0",cit="allow-top-navigation-by-user-activation allow-popups",uit='The "iframe" tag is not supported by your browser.',hit=["foreignobject"],fit=["dominant-baseline"];function Vxe(t){var _e$config;let e=a$(t);return Iy(),Cz((_e$config=e.config)!==null&&_e$config!==void 0?_e$config:{}),e;}o(Vxe,"processAndSetConfigs");async function dit(t,e){xy();try{let{code:r,config:n}=Vxe(t);return{diagramType:(await Uxe(r)).type,config:n};}catch(r){if(e!==null&&e!==void 0&&e.suppressErrors)return!1;throw r;}}o(dit,"parse");var $xe=o((t,e,r=[])=>`
.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),pit=o((t,e=new Map())=>{let r="";if(t.themeCSS!==void 0&&(r+=`
${t.themeCSS}`),t.fontFamily!==void 0&&(r+=`
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(r+=`
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){var _t$htmlLabels,_t$flowchart;let s=((_t$htmlLabels=t.htmlLabels)!==null&&_t$htmlLabels!==void 0?_t$htmlLabels:(_t$flowchart=t.flowchart)===null||_t$flowchart===void 0?void 0:_t$flowchart.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(l=>{fr(l.styles)||s.forEach(u=>{r+=$xe(l.id,u,l.styles);}),fr(l.textStyles)||(r+=$xe(l.id,"tspan",((l===null||l===void 0?void 0:l.textStyles)||[]).map(u=>u.replace("color","fill"))));});}return r;},"createCssStyles"),mit=o((t,e,r,n)=>{let i=pit(t,r),a=NV(e,i,t.themeVariables);return IC(Lxe(`${n}{${a}}`),Rxe);},"createUserStyles"),git=o((t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=ta(n),n=n.replace(/<br>/g,"<br/>"),n;},"cleanUpSvgCode"),yit=o((t="",e)=>{var _e$viewBox;let r=e!==null&&e!==void 0&&(_e$viewBox=e.viewBox)!==null&&_e$viewBox!==void 0&&(_e$viewBox=_e$viewBox.baseVal)!==null&&_e$viewBox!==void 0&&_e$viewBox.height?e.viewBox.baseVal.height+"px":sit,n=Fxe(`<body style="${lit}">${t}</body>`);return`<iframe style="width:${ait};height:${r};${oit}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${cit}">
  ${uit}
</iframe>`;},"putIntoIFrame"),zxe=o((t,e,r,n,i)=>{let a=t.append("div");a.attr("id",r),n&&a.attr("style",n);let s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",rit);return i&&s.attr("xmlns:xlink",i),s.append("g"),t;},"appendDivSvgG");function Gxe(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","");}o(Gxe,"sandboxedIframe");var vit=o((t,e,r,n)=>{var _t$getElementById,_t$getElementById2,_t$getElementById3;(_t$getElementById=t.getElementById(e))!==null&&_t$getElementById!==void 0&&_t$getElementById.remove(),(_t$getElementById2=t.getElementById(r))!==null&&_t$getElementById2!==void 0&&_t$getElementById2.remove(),(_t$getElementById3=t.getElementById(n))===null||_t$getElementById3===void 0?void 0:_t$getElementById3.remove();},"removeExistingElements"),xit=o(async function(t,e,r){var _i$maxTextSize,_y$renderer$getClasse,_y$renderer,_y$db$getAccTitle,_y$db,_y$db$getAccDescripti,_y$db2;xy();let n=Vxe(e);e=n.code;let i=Qt();X.debug(i),e.length>((_i$maxTextSize=i===null||i===void 0?void 0:i.maxTextSize)!==null&&_i$maxTextSize!==void 0?_i$maxTextSize:Znt)&&(e=Jnt);let a="#"+t,s="i"+t,l="#"+s,u="d"+t,h="#"+u,f=o(()=>{let L=Ge(p?l:h).node();L&&"remove"in L&&L.remove();},"removeTempElements"),d=Ge("body"),p=i.securityLevel===eit,m=i.securityLevel===tit,g=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){let k=Gxe(Ge(r),s);d=Ge(k.nodes()[0].contentDocument.body),d.node().style.margin=0;}else d=Ge(r);zxe(d,t,u,`font-family: ${g}`,nit);}else{if(vit(document,t,u,s),p){let k=Gxe(Ge("body"),s);d=Ge(k.nodes()[0].contentDocument.body),d.node().style.margin=0;}else d=Ge("body");zxe(d,t,u);}let y,v;try{y=await Ey.fromText(e,{title:n.title});}catch(k){if(i.suppressErrorRendering)throw f(),k;y=await Ey.fromText("error"),v=k;}let x=d.select(h).node(),b=y.type,T=x.firstChild,C=T.firstChild,w=(_y$renderer$getClasse=(_y$renderer=y.renderer).getClasses)===null||_y$renderer$getClasse===void 0?void 0:_y$renderer$getClasse.call(_y$renderer,e,y),E=mit(i,b,w,a),_=document.createElement("style");_.innerHTML=E,T.insertBefore(_,C);try{await y.renderer.draw(e,t,_b.version,y);}catch(k){throw i.suppressErrorRendering?f():i0e.draw(e,t,_b.version),k;}let A=d.select(`${h} svg`),D=(_y$db$getAccTitle=(_y$db=y.db).getAccTitle)===null||_y$db$getAccTitle===void 0?void 0:_y$db$getAccTitle.call(_y$db),O=(_y$db$getAccDescripti=(_y$db2=y.db).getAccDescription)===null||_y$db$getAccDescripti===void 0?void 0:_y$db$getAccDescripti.call(_y$db2);Tit(b,A,D,O),d.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",iit);let R=d.select(h).node().innerHTML;if(X.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),R=git(R,p,mr(i.arrowMarkerAbsolute)),p){let k=d.select(h+" svg").node();R=yit(R,k);}else m||(R=hh.sanitize(R,{ADD_TAGS:hit,ADD_ATTR:fit,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Oxe(),v)throw v;return f(),{diagramType:b,svg:R,bindFunctions:y.db.bindFunctions};},"render");function bit(t={}){var _e$themeVariables;let e=Gn({},t);e!==null&&e!==void 0&&e.fontFamily&&!((_e$themeVariables=e.themeVariables)!==null&&_e$themeVariables!==void 0&&_e$themeVariables.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),kz(e),e!==null&&e!==void 0&&e.theme&&e.theme in wo?e.themeVariables=wo[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=wo.default.getThemeVariables(e.themeVariables));let r=typeof e=="object"?f7(e):d7();Cy(r.logLevel),xy();}o(bit,"initialize");var Uxe=o((t,e={})=>{let{code:r}=a$(t);return Ey.fromText(r,e);},"getDiagramFromText");function Tit(t,e,r,n){Nxe(e,t),Mxe(e,r,n,e.attr("id"));}o(Tit,"addA11yInfo");var Hf=Object.freeze({render:xit,parse:dit,getDiagramFromText:Uxe,initialize:bit,getConfig:Qt,setConfig:J4,getSiteConfig:d7,updateSiteConfig:Ez,reset:o(()=>{Iy();},"reset"),globalReset:o(()=>{Iy(uh);},"globalReset"),defaultConfig:uh});Cy(Qt().logLevel);Iy(Qt());Zd();nr();var wit=o((t,e,r)=>{X.warn(t),R9(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}));},"handleError"),Hxe=o(async function(t={querySelector:".mermaid"}){try{await kit(t);}catch(e){if(R9(e)&&X.error(e.str),ah.parseError&&ah.parseError(e),!t.suppressErrors)throw X.error("Use the suppressErrors option to suppress these errors"),e;}},"run"),kit=o(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let n=Hf.getConfig();X.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else if(e)i=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");X.debug(`Found ${i.length} diagrams`),(n===null||n===void 0?void 0:n.startOnLoad)!==void 0&&(X.debug("Start On Load: "+(n===null||n===void 0?void 0:n.startOnLoad)),Hf.updateSiteConfig({startOnLoad:n===null||n===void 0?void 0:n.startOnLoad}));let a=new Vt.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),s,l=[];for(let u of Array.from(i)){X.info("Rendering diagram: "+u.id);if(u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");let h=`mermaid-${a.next()}`;s=u.innerHTML,s=N3(Vt.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");let f=Vt.detectInit(s);f&&X.debug("Detected early reinit: ",f);try{let{svg:d,bindFunctions:p}=await Xxe(h,s,u);u.innerHTML=d,t&&(await t(h)),p&&p(u);}catch(d){wit(d,l,ah.parseError);}}if(l.length>0)throw l[0];},"runThrowsErrors"),Wxe=o(function(t){Hf.initialize(t);},"initialize"),Eit=o(async function(t,e,r){X.warn("mermaid.init is deprecated. Please use run instead."),t&&Wxe(t);let n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await Hxe(n);},"init"),Sit=o(async(t,{lazyLoad:e=!0}={})=>{xy(),Qy(...t),e===!1&&(await fxe());},"registerExternalDiagrams"),qxe=o(function(){if(ah.startOnLoad){let{startOnLoad:t}=Hf.getConfig();t&&ah.run().catch(e=>X.error("Mermaid failed to initialize",e));}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",qxe,!1);}var Cit=o(function(t){ah.parseError=t;},"setParseErrorHandler"),OC=[],s$=!1,Yxe=o(async()=>{if(!s$){for(s$=!0;OC.length>0;){let t=OC.shift();if(t)try{await t();}catch(e){X.error("Error executing queue",e);}}s$=!1;}},"executeQueue"),Ait=o(async(t,e)=>new Promise((r,n)=>{let i=o(()=>new Promise((a,s)=>{Hf.parse(t,e).then(l=>{a(l),r(l);},l=>{var _ah$parseError;X.error("Error parsing",l),(_ah$parseError=ah.parseError)!==null&&_ah$parseError!==void 0&&_ah$parseError.call(ah,l),s(l),n(l);});}),"performCall");OC.push(i),Yxe().catch(n);}),"parse"),Xxe=o((t,e,r)=>new Promise((n,i)=>{let a=o(()=>new Promise((s,l)=>{Hf.render(t,e,r).then(u=>{s(u),n(u);},u=>{var _ah$parseError2;X.error("Error parsing",u),(_ah$parseError2=ah.parseError)!==null&&_ah$parseError2!==void 0&&_ah$parseError2.call(ah,u),l(u),i(u);});}),"performCall");OC.push(a),Yxe().catch(i);}),"render"),_it=o(()=>Object.keys(du).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),ah={startOnLoad:!0,mermaidAPI:Hf,parse:Ait,render:Xxe,init:Eit,run:Hxe,registerExternalDiagrams:Sit,registerLayoutLoaders:ZR,initialize:Wxe,parseError:void 0,contentLoaded:qxe,setParseErrorHandler:Cit,detectType:b0,registerIconPacks:R3,getRegisteredDiagramsMetadata:_it},Dit=ah;return ibe(Lit);})();/*! Check if previously processed *//*!
 * Wait for document loaded before starting the execution
 *//*! Bundled license information:

dompurify/dist/purify.es.mjs:
  (*! @license DOMPurify 3.2.5 | (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.5/LICENSE *)

js-yaml/dist/js-yaml.mjs:
  (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)

lodash-es/lodash.js:
  (**
   * @license
   * Lodash (Custom Build) <https://lodash.com/>
   * Build: `lodash modularize exports="es" -o ./`
   * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
   * Released under MIT license <https://lodash.com/license>
   * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
   * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
   *)

cytoscape/dist/cytoscape.esm.mjs:
  (*!
  Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
  Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)
  Licensed under The MIT License (http://opensource.org/licenses/MIT)
  *)
  (*!
  Event object based on jQuery events, MIT license
  
  https://jquery.org/license/
  https://tldrlegal.com/license/mit-license
  https://github.com/jquery/jquery/blob/master/src/event.js
  *)
  (*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License *)
  (*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License *)
*/globalThis["mermaid"]=globalThis.__esbuild_esm_mermaid_nm["mermaid"].default;
plantuml.js
wget 'https://sme10.lists2.roe3.org/kodbox/static/app/vender/markdown/plantuml.js'
View Content
function plantuml_imgsrc(data){
    return 'https://www.plantuml.com/plantuml/svg/'+plantuml_encode(data);
}

function plantuml_encode(data){
    return plantuml_encode64(deflate(unescape(encodeURIComponent(data))))
}

function plantuml_encode64(data) {
    r = '';
    for (i = 0; i < data.length; i += 3) {
        if (i + 2 == data.length) {
            r += plantuml_append3bytes(data.charCodeAt(i), data.charCodeAt(i + 1), 0);
        } else if (i + 1 == data.length) {
            r += plantuml_append3bytes(data.charCodeAt(i), 0, 0);
        } else {
            r += plantuml_append3bytes(data.charCodeAt(i), data.charCodeAt(i + 1),
                data.charCodeAt(i + 2));
        }
    }
    return r;
}

function plantuml_append3bytes(b1, b2, b3) {
    c1 = b1 >> 2;
    c2 = ((b1 & 0x3) << 4) | (b2 >> 4);
    c3 = ((b2 & 0xF) << 2) | (b3 >> 6);
    c4 = b3 & 0x3F;
    r = '';
    r += plantuml_encode6bit(c1 & 0x3F);
    r += plantuml_encode6bit(c2 & 0x3F);
    r += plantuml_encode6bit(c3 & 0x3F);
    r += plantuml_encode6bit(c4 & 0x3F);
    return r;
}

function plantuml_encode6bit(b) {
    if (b < 10) {
        return String.fromCharCode(48 + b);
    }
    b -= 10;
    if (b < 26) {
        return String.fromCharCode(65 + b);
    }
    b -= 26;
    if (b < 26) {
        return String.fromCharCode(97 + b);
    }
    b -= 26;
    if (b == 0) {
        return '-';
    }
    if (b == 1) {
        return '_';
    }
    return '?';
}









/*
 * $Id: rawdeflate.js,v 0.3 2009/03/01 19:05:05 dankogai Exp dankogai $
 *
 * Original:
 *   http://www.onicos.com/staff/iz/amuse/javascript/expert/deflate.txt
 */

// if run as a web worker, respond to messages by deflating them
var deflate = (function() {

/* Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp>
 * Version: 1.0.1
 * LastModified: Dec 25 1999
 */

/* Interface:
 * data = deflate(src);
 */

/* constant parameters */
var zip_WSIZE = 32768;      // Sliding Window size
var zip_STORED_BLOCK = 0;
var zip_STATIC_TREES = 1;
var zip_DYN_TREES    = 2;

/* for deflate */
var zip_DEFAULT_LEVEL = 6;
var zip_FULL_SEARCH = true;
var zip_INBUFSIZ = 32768;   // Input buffer size
var zip_INBUF_EXTRA = 64;   // Extra buffer
var zip_OUTBUFSIZ = 1024 * 8;
var zip_window_size = 2 * zip_WSIZE;
var zip_MIN_MATCH = 3;
var zip_MAX_MATCH = 258;
var zip_BITS = 16;
// for SMALL_MEM
var zip_LIT_BUFSIZE = 0x2000;
var zip_HASH_BITS = 13;
// for MEDIUM_MEM
// var zip_LIT_BUFSIZE = 0x4000;
// var zip_HASH_BITS = 14;
// for BIG_MEM
// var zip_LIT_BUFSIZE = 0x8000;
// var zip_HASH_BITS = 15;
//if(zip_LIT_BUFSIZE > zip_INBUFSIZ)
//    alert("error: zip_INBUFSIZ is too small");
//if((zip_WSIZE<<1) > (1<<zip_BITS))
//    alert("error: zip_WSIZE is too large");
//if(zip_HASH_BITS > zip_BITS-1)
//    alert("error: zip_HASH_BITS is too large");
//if(zip_HASH_BITS < 8 || zip_MAX_MATCH != 258)
//    alert("error: Code too clever");
var zip_DIST_BUFSIZE = zip_LIT_BUFSIZE;
var zip_HASH_SIZE = 1 << zip_HASH_BITS;
var zip_HASH_MASK = zip_HASH_SIZE - 1;
var zip_WMASK = zip_WSIZE - 1;
var zip_NIL = 0; // Tail of hash chains
var zip_TOO_FAR = 4096;
var zip_MIN_LOOKAHEAD = zip_MAX_MATCH + zip_MIN_MATCH + 1;
var zip_MAX_DIST = zip_WSIZE - zip_MIN_LOOKAHEAD;
var zip_SMALLEST = 1;
var zip_MAX_BITS = 15;
var zip_MAX_BL_BITS = 7;
var zip_LENGTH_CODES = 29;
var zip_LITERALS =256;
var zip_END_BLOCK = 256;
var zip_L_CODES = zip_LITERALS + 1 + zip_LENGTH_CODES;
var zip_D_CODES = 30;
var zip_BL_CODES = 19;
var zip_REP_3_6 = 16;
var zip_REPZ_3_10 = 17;
var zip_REPZ_11_138 = 18;
var zip_HEAP_SIZE = 2 * zip_L_CODES + 1;
var zip_H_SHIFT = parseInt((zip_HASH_BITS + zip_MIN_MATCH - 1) /
               zip_MIN_MATCH);

/* variables */
var zip_free_queue;
var zip_qhead, zip_qtail;
var zip_initflag;
var zip_outbuf = null;
var zip_outcnt, zip_outoff;
var zip_complete;
var zip_window;
var zip_d_buf;
var zip_l_buf;
var zip_prev;
var zip_bi_buf;
var zip_bi_valid;
var zip_block_start;
var zip_ins_h;
var zip_hash_head;
var zip_prev_match;
var zip_match_available;
var zip_match_length;
var zip_prev_length;
var zip_strstart;
var zip_match_start;
var zip_eofile;
var zip_lookahead;
var zip_max_chain_length;
var zip_max_lazy_match;
var zip_compr_level;
var zip_good_match;
var zip_nice_match;
var zip_dyn_ltree;
var zip_dyn_dtree;
var zip_static_ltree;
var zip_static_dtree;
var zip_bl_tree;
var zip_l_desc;
var zip_d_desc;
var zip_bl_desc;
var zip_bl_count;
var zip_heap;
var zip_heap_len;
var zip_heap_max;
var zip_depth;
var zip_length_code;
var zip_dist_code;
var zip_base_length;
var zip_base_dist;
var zip_flag_buf;
var zip_last_lit;
var zip_last_dist;
var zip_last_flags;
var zip_flags;
var zip_flag_bit;
var zip_opt_len;
var zip_static_len;
var zip_deflate_data;
var zip_deflate_pos;

/* objects (deflate) */

function zip_DeflateCT() {
    this.fc = 0; // frequency count or bit string
    this.dl = 0; // father node in Huffman tree or length of bit string
}

function zip_DeflateTreeDesc() {
    this.dyn_tree = null;   // the dynamic tree
    this.static_tree = null;    // corresponding static tree or NULL
    this.extra_bits = null; // extra bits for each code or NULL
    this.extra_base = 0;    // base index for extra_bits
    this.elems = 0;     // max number of elements in the tree
    this.max_length = 0;    // max bit length for the codes
    this.max_code = 0;      // largest code with non zero frequency
}

/* Values for max_lazy_match, good_match and max_chain_length, depending on
 * the desired pack level (0..9). The values given below have been tuned to
 * exclude worst case performance for pathological files. Better values may be
 * found for specific files.
 */
function zip_DeflateConfiguration(a, b, c, d) {
    this.good_length = a; // reduce lazy search above this match length
    this.max_lazy = b;    // do not perform lazy search above this match length
    this.nice_length = c; // quit search above this match length
    this.max_chain = d;
}

function zip_DeflateBuffer() {
    this.next = null;
    this.len = 0;
    this.ptr = new Array(zip_OUTBUFSIZ);
    this.off = 0;
}

/* constant tables */
var zip_extra_lbits = [
    0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];
var zip_extra_dbits = [
    0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];
var zip_extra_blbits = [
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];
var zip_bl_order = [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];
var zip_configuration_table = [
    new zip_DeflateConfiguration(0,    0,   0,    0),
    new zip_DeflateConfiguration(4,    4,   8,    4),
    new zip_DeflateConfiguration(4,    5,  16,    8),
    new zip_DeflateConfiguration(4,    6,  32,   32),
    new zip_DeflateConfiguration(4,    4,  16,   16),
    new zip_DeflateConfiguration(8,   16,  32,   32),
    new zip_DeflateConfiguration(8,   16, 128,  128),
    new zip_DeflateConfiguration(8,   32, 128,  256),
    new zip_DeflateConfiguration(32, 128, 258, 1024),
    new zip_DeflateConfiguration(32, 258, 258, 4096)];


/* routines (deflate) */

function zip_deflate_start(level) {
    var i;

    if(!level)
    level = zip_DEFAULT_LEVEL;
    else if(level < 1)
    level = 1;
    else if(level > 9)
    level = 9;

    zip_compr_level = level;
    zip_initflag = false;
    zip_eofile = false;
    if(zip_outbuf != null)
    return;

    zip_free_queue = zip_qhead = zip_qtail = null;
    zip_outbuf = new Array(zip_OUTBUFSIZ);
    zip_window = new Array(zip_window_size);
    zip_d_buf = new Array(zip_DIST_BUFSIZE);
    zip_l_buf = new Array(zip_INBUFSIZ + zip_INBUF_EXTRA);
    zip_prev = new Array(1 << zip_BITS);
    zip_dyn_ltree = new Array(zip_HEAP_SIZE);
    for(i = 0; i < zip_HEAP_SIZE; i++)
    zip_dyn_ltree[i] = new zip_DeflateCT();
    zip_dyn_dtree = new Array(2*zip_D_CODES+1);
    for(i = 0; i < 2*zip_D_CODES+1; i++)
    zip_dyn_dtree[i] = new zip_DeflateCT();
    zip_static_ltree = new Array(zip_L_CODES+2);
    for(i = 0; i < zip_L_CODES+2; i++)
    zip_static_ltree[i] = new zip_DeflateCT();
    zip_static_dtree = new Array(zip_D_CODES);
    for(i = 0; i < zip_D_CODES; i++)
    zip_static_dtree[i] = new zip_DeflateCT();
    zip_bl_tree = new Array(2*zip_BL_CODES+1);
    for(i = 0; i < 2*zip_BL_CODES+1; i++)
    zip_bl_tree[i] = new zip_DeflateCT();
    zip_l_desc = new zip_DeflateTreeDesc();
    zip_d_desc = new zip_DeflateTreeDesc();
    zip_bl_desc = new zip_DeflateTreeDesc();
    zip_bl_count = new Array(zip_MAX_BITS+1);
    zip_heap = new Array(2*zip_L_CODES+1);
    zip_depth = new Array(2*zip_L_CODES+1);
    zip_length_code = new Array(zip_MAX_MATCH-zip_MIN_MATCH+1);
    zip_dist_code = new Array(512);
    zip_base_length = new Array(zip_LENGTH_CODES);
    zip_base_dist = new Array(zip_D_CODES);
    zip_flag_buf = new Array(parseInt(zip_LIT_BUFSIZE / 8));
}

function zip_deflate_end() {
    zip_free_queue = zip_qhead = zip_qtail = null;
    zip_outbuf = null;
    zip_window = null;
    zip_d_buf = null;
    zip_l_buf = null;
    zip_prev = null;
    zip_dyn_ltree = null;
    zip_dyn_dtree = null;
    zip_static_ltree = null;
    zip_static_dtree = null;
    zip_bl_tree = null;
    zip_l_desc = null;
    zip_d_desc = null;
    zip_bl_desc = null;
    zip_bl_count = null;
    zip_heap = null;
    zip_depth = null;
    zip_length_code = null;
    zip_dist_code = null;
    zip_base_length = null;
    zip_base_dist = null;
    zip_flag_buf = null;
}

function zip_reuse_queue(p) {
    p.next = zip_free_queue;
    zip_free_queue = p;
}

function zip_new_queue() {
    var p;

    if(zip_free_queue != null)
    {
    p = zip_free_queue;
    zip_free_queue = zip_free_queue.next;
    }
    else
    p = new zip_DeflateBuffer();
    p.next = null;
    p.len = p.off = 0;

    return p;
}

function zip_head1(i) {
    return zip_prev[zip_WSIZE + i];
}

function zip_head2(i, val) {
    return zip_prev[zip_WSIZE + i] = val;
}

/* put_byte is used for the compressed output, put_ubyte for the
 * uncompressed output. However unlzw() uses window for its
 * suffix table instead of its output buffer, so it does not use put_ubyte
 * (to be cleaned up).
 */
function zip_put_byte(c) {
    zip_outbuf[zip_outoff + zip_outcnt++] = c;
    if(zip_outoff + zip_outcnt == zip_OUTBUFSIZ)
    zip_qoutbuf();
}

/* Output a 16 bit value, lsb first */
function zip_put_short(w) {
    w &= 0xffff;
    if(zip_outoff + zip_outcnt < zip_OUTBUFSIZ - 2) {
    zip_outbuf[zip_outoff + zip_outcnt++] = (w & 0xff);
    zip_outbuf[zip_outoff + zip_outcnt++] = (w >>> 8);
    } else {
    zip_put_byte(w & 0xff);
    zip_put_byte(w >>> 8);
    }
}

/* ==========================================================================
 * Insert string s in the dictionary and set match_head to the previous head
 * of the hash chain (the most recent string with same hash key). Return
 * the previous length of the hash chain.
 * IN  assertion: all calls to to INSERT_STRING are made with consecutive
 *    input characters and the first MIN_MATCH bytes of s are valid
 *    (except for the last MIN_MATCH-1 bytes of the input file).
 */
function zip_INSERT_STRING() {
    zip_ins_h = ((zip_ins_h << zip_H_SHIFT)
         ^ (zip_window[zip_strstart + zip_MIN_MATCH - 1] & 0xff))
    & zip_HASH_MASK;
    zip_hash_head = zip_head1(zip_ins_h);
    zip_prev[zip_strstart & zip_WMASK] = zip_hash_head;
    zip_head2(zip_ins_h, zip_strstart);
}

/* Send a code of the given tree. c and tree must not have side effects */
function zip_SEND_CODE(c, tree) {
    zip_send_bits(tree[c].fc, tree[c].dl);
}

/* Mapping from a distance to a distance code. dist is the distance - 1 and
 * must not have side effects. dist_code[256] and dist_code[257] are never
 * used.
 */
function zip_D_CODE(dist) {
    return (dist < 256 ? zip_dist_code[dist]
        : zip_dist_code[256 + (dist>>7)]) & 0xff;
}

/* ==========================================================================
 * Compares to subtrees, using the tree depth as tie breaker when
 * the subtrees have equal frequency. This minimizes the worst case length.
 */
function zip_SMALLER(tree, n, m) {
    return tree[n].fc < tree[m].fc ||
      (tree[n].fc == tree[m].fc && zip_depth[n] <= zip_depth[m]);
}

/* ==========================================================================
 * read string data
 */
function zip_read_buff(buff, offset, n) {
    var i;
    for(i = 0; i < n && zip_deflate_pos < zip_deflate_data.length; i++)
    buff[offset + i] =
        zip_deflate_data.charCodeAt(zip_deflate_pos++) & 0xff;
    return i;
}

/* ==========================================================================
 * Initialize the "longest match" routines for a new file
 */
function zip_lm_init() {
    var j;

    /* Initialize the hash table. */
    for(j = 0; j < zip_HASH_SIZE; j++)
//  zip_head2(j, zip_NIL);
    zip_prev[zip_WSIZE + j] = 0;
    /* prev will be initialized on the fly */

    /* Set the default configuration parameters:
     */
    zip_max_lazy_match = zip_configuration_table[zip_compr_level].max_lazy;
    zip_good_match     = zip_configuration_table[zip_compr_level].good_length;
    if(!zip_FULL_SEARCH)
    zip_nice_match = zip_configuration_table[zip_compr_level].nice_length;
    zip_max_chain_length = zip_configuration_table[zip_compr_level].max_chain;

    zip_strstart = 0;
    zip_block_start = 0;

    zip_lookahead = zip_read_buff(zip_window, 0, 2 * zip_WSIZE);
    if(zip_lookahead <= 0) {
    zip_eofile = true;
    zip_lookahead = 0;
    return;
    }
    zip_eofile = false;
    /* Make sure that we always have enough lookahead. This is important
     * if input comes from a device such as a tty.
     */
    while(zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile)
    zip_fill_window();

    /* If lookahead < MIN_MATCH, ins_h is garbage, but this is
     * not important since only literal bytes will be emitted.
     */
    zip_ins_h = 0;
    for(j = 0; j < zip_MIN_MATCH - 1; j++) {
//      UPDATE_HASH(ins_h, window[j]);
    zip_ins_h = ((zip_ins_h << zip_H_SHIFT) ^ (zip_window[j] & 0xff)) & zip_HASH_MASK;
    }
}

/* ==========================================================================
 * Set match_start to the longest match starting at the given string and
 * return its length. Matches shorter or equal to prev_length are discarded,
 * in which case the result is equal to prev_length and match_start is
 * garbage.
 * IN assertions: cur_match is the head of the hash chain for the current
 *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
 */
function zip_longest_match(cur_match) {
    var chain_length = zip_max_chain_length; // max hash chain length
    var scanp = zip_strstart; // current string
    var matchp;     // matched string
    var len;        // length of current match
    var best_len = zip_prev_length; // best match length so far

    /* Stop when cur_match becomes <= limit. To simplify the code,
     * we prevent matches with the string of window index 0.
     */
    var limit = (zip_strstart > zip_MAX_DIST ? zip_strstart - zip_MAX_DIST : zip_NIL);

    var strendp = zip_strstart + zip_MAX_MATCH;
    var scan_end1 = zip_window[scanp + best_len - 1];
    var scan_end  = zip_window[scanp + best_len];

    /* Do not waste too much time if we already have a good match: */
    if(zip_prev_length >= zip_good_match)
    chain_length >>= 2;

//  Assert(encoder->strstart <= window_size-MIN_LOOKAHEAD, "insufficient lookahead");

    do {
//    Assert(cur_match < encoder->strstart, "no future");
    matchp = cur_match;

    /* Skip to next match if the match length cannot increase
        * or if the match length is less than 2:
    */
    if(zip_window[matchp + best_len]    != scan_end  ||
       zip_window[matchp + best_len - 1]    != scan_end1 ||
       zip_window[matchp]           != zip_window[scanp] ||
       zip_window[++matchp]         != zip_window[scanp + 1]) {
        continue;
    }

    /* The check at best_len-1 can be removed because it will be made
         * again later. (This heuristic is not always a win.)
         * It is not necessary to compare scan[2] and match[2] since they
         * are always equal when the other bytes match, given that
         * the hash keys are equal and that HASH_BITS >= 8.
         */
    scanp += 2;
    matchp++;

    /* We check for insufficient lookahead only every 8th comparison;
         * the 256th check will be made at strstart+258.
         */
    do {
    } while(zip_window[++scanp] == zip_window[++matchp] &&
        zip_window[++scanp] == zip_window[++matchp] &&
        zip_window[++scanp] == zip_window[++matchp] &&
        zip_window[++scanp] == zip_window[++matchp] &&
        zip_window[++scanp] == zip_window[++matchp] &&
        zip_window[++scanp] == zip_window[++matchp] &&
        zip_window[++scanp] == zip_window[++matchp] &&
        zip_window[++scanp] == zip_window[++matchp] &&
        scanp < strendp);

      len = zip_MAX_MATCH - (strendp - scanp);
      scanp = strendp - zip_MAX_MATCH;

      if(len > best_len) {
      zip_match_start = cur_match;
      best_len = len;
      if(zip_FULL_SEARCH) {
          if(len >= zip_MAX_MATCH) break;
      } else {
          if(len >= zip_nice_match) break;
      }

      scan_end1  = zip_window[scanp + best_len-1];
      scan_end   = zip_window[scanp + best_len];
      }
    } while((cur_match = zip_prev[cur_match & zip_WMASK]) > limit
        && --chain_length != 0);

    return best_len;
}

/* ==========================================================================
 * Fill the window when the lookahead becomes insufficient.
 * Updates strstart and lookahead, and sets eofile if end of input file.
 * IN assertion: lookahead < MIN_LOOKAHEAD && strstart + lookahead > 0
 * OUT assertions: at least one byte has been read, or eofile is set;
 *    file reads are performed for at least two bytes (required for the
 *    translate_eol option).
 */
function zip_fill_window() {
    var n, m;

    // Amount of free space at the end of the window.
    var more = zip_window_size - zip_lookahead - zip_strstart;

    /* If the window is almost full and there is insufficient lookahead,
     * move the upper half to the lower one to make room in the upper half.
     */
    if(more == -1) {
    /* Very unlikely, but possible on 16 bit machine if strstart == 0
         * and lookahead == 1 (input done one byte at time)
         */
    more--;
    } else if(zip_strstart >= zip_WSIZE + zip_MAX_DIST) {
    /* By the IN assertion, the window is not empty so we can't confuse
         * more == 0 with more == 64K on a 16 bit machine.
         */
//  Assert(window_size == (ulg)2*WSIZE, "no sliding with BIG_MEM");

//  System.arraycopy(window, WSIZE, window, 0, WSIZE);
    for(n = 0; n < zip_WSIZE; n++)
        zip_window[n] = zip_window[n + zip_WSIZE];

    zip_match_start -= zip_WSIZE;
    zip_strstart    -= zip_WSIZE; /* we now have strstart >= MAX_DIST: */
    zip_block_start -= zip_WSIZE;

    for(n = 0; n < zip_HASH_SIZE; n++) {
        m = zip_head1(n);
        zip_head2(n, m >= zip_WSIZE ? m - zip_WSIZE : zip_NIL);
    }
    for(n = 0; n < zip_WSIZE; n++) {
        /* If n is not on any hash chain, prev[n] is garbage but
         * its value will never be used.
         */
        m = zip_prev[n];
        zip_prev[n] = (m >= zip_WSIZE ? m - zip_WSIZE : zip_NIL);
    }
    more += zip_WSIZE;
    }
    // At this point, more >= 2
    if(!zip_eofile) {
    n = zip_read_buff(zip_window, zip_strstart + zip_lookahead, more);
    if(n <= 0)
        zip_eofile = true;
    else
        zip_lookahead += n;
    }
}

/* ==========================================================================
 * Processes a new input file and return its compressed length. This
 * function does not perform lazy evaluationof matches and inserts
 * new strings in the dictionary only for unmatched strings or for short
 * matches. It is used only for the fast compression options.
 */
function zip_deflate_fast() {
    while(zip_lookahead != 0 && zip_qhead == null) {
    var flush; // set if current block must be flushed

    /* Insert the string window[strstart .. strstart+2] in the
     * dictionary, and set hash_head to the head of the hash chain:
     */
    zip_INSERT_STRING();

    /* Find the longest match, discarding those <= prev_length.
     * At this point we have always match_length < MIN_MATCH
     */
    if(zip_hash_head != zip_NIL &&
       zip_strstart - zip_hash_head <= zip_MAX_DIST) {
        /* To simplify the code, we prevent matches with the string
         * of window index 0 (in particular we have to avoid a match
         * of the string with itself at the start of the input file).
         */
        zip_match_length = zip_longest_match(zip_hash_head);
        /* longest_match() sets match_start */
        if(zip_match_length > zip_lookahead)
        zip_match_length = zip_lookahead;
    }
    if(zip_match_length >= zip_MIN_MATCH) {
//      check_match(strstart, match_start, match_length);

        flush = zip_ct_tally(zip_strstart - zip_match_start,
                 zip_match_length - zip_MIN_MATCH);
        zip_lookahead -= zip_match_length;

        /* Insert new strings in the hash table only if the match length
         * is not too large. This saves time but degrades compression.
         */
        if(zip_match_length <= zip_max_lazy_match) {
        zip_match_length--; // string at strstart already in hash table
        do {
            zip_strstart++;
            zip_INSERT_STRING();
            /* strstart never exceeds WSIZE-MAX_MATCH, so there are
             * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH
             * these bytes are garbage, but it does not matter since
             * the next lookahead bytes will be emitted as literals.
             */
        } while(--zip_match_length != 0);
        zip_strstart++;
        } else {
        zip_strstart += zip_match_length;
        zip_match_length = 0;
        zip_ins_h = zip_window[zip_strstart] & 0xff;
//      UPDATE_HASH(ins_h, window[strstart + 1]);
        zip_ins_h = ((zip_ins_h<<zip_H_SHIFT) ^ (zip_window[zip_strstart + 1] & 0xff)) & zip_HASH_MASK;

//#if MIN_MATCH != 3
//      Call UPDATE_HASH() MIN_MATCH-3 more times
//#endif

        }
    } else {
        /* No match, output a literal byte */
        flush = zip_ct_tally(0, zip_window[zip_strstart] & 0xff);
        zip_lookahead--;
        zip_strstart++;
    }
    if(flush) {
        zip_flush_block(0);
        zip_block_start = zip_strstart;
    }

    /* Make sure that we always have enough lookahead, except
     * at the end of the input file. We need MAX_MATCH bytes
     * for the next match, plus MIN_MATCH bytes to insert the
     * string following the next match.
     */
    while(zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile)
        zip_fill_window();
    }
}

function zip_deflate_better() {
    /* Process the input block. */
    while(zip_lookahead != 0 && zip_qhead == null) {
    /* Insert the string window[strstart .. strstart+2] in the
     * dictionary, and set hash_head to the head of the hash chain:
     */
    zip_INSERT_STRING();

    /* Find the longest match, discarding those <= prev_length.
     */
    zip_prev_length = zip_match_length;
    zip_prev_match = zip_match_start;
    zip_match_length = zip_MIN_MATCH - 1;

    if(zip_hash_head != zip_NIL &&
       zip_prev_length < zip_max_lazy_match &&
       zip_strstart - zip_hash_head <= zip_MAX_DIST) {
        /* To simplify the code, we prevent matches with the string
         * of window index 0 (in particular we have to avoid a match
         * of the string with itself at the start of the input file).
         */
        zip_match_length = zip_longest_match(zip_hash_head);
        /* longest_match() sets match_start */
        if(zip_match_length > zip_lookahead)
        zip_match_length = zip_lookahead;

        /* Ignore a length 3 match if it is too distant: */
        if(zip_match_length == zip_MIN_MATCH &&
           zip_strstart - zip_match_start > zip_TOO_FAR) {
        /* If prev_match is also MIN_MATCH, match_start is garbage
         * but we will ignore the current match anyway.
         */
        zip_match_length--;
        }
    }
    /* If there was a match at the previous step and the current
     * match is not better, output the previous match:
     */
    if(zip_prev_length >= zip_MIN_MATCH &&
       zip_match_length <= zip_prev_length) {
        var flush; // set if current block must be flushed

//      check_match(strstart - 1, prev_match, prev_length);
        flush = zip_ct_tally(zip_strstart - 1 - zip_prev_match,
                 zip_prev_length - zip_MIN_MATCH);

        /* Insert in hash table all strings up to the end of the match.
         * strstart-1 and strstart are already inserted.
         */
        zip_lookahead -= zip_prev_length - 1;
        zip_prev_length -= 2;
        do {
        zip_strstart++;
        zip_INSERT_STRING();
        /* strstart never exceeds WSIZE-MAX_MATCH, so there are
         * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH
         * these bytes are garbage, but it does not matter since the
         * next lookahead bytes will always be emitted as literals.
         */
        } while(--zip_prev_length != 0);
        zip_match_available = 0;
        zip_match_length = zip_MIN_MATCH - 1;
        zip_strstart++;
        if(flush) {
        zip_flush_block(0);
        zip_block_start = zip_strstart;
        }
    } else if(zip_match_available != 0) {
        /* If there was no match at the previous position, output a
         * single literal. If there was a match but the current match
         * is longer, truncate the previous match to a single literal.
         */
        if(zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff)) {
        zip_flush_block(0);
        zip_block_start = zip_strstart;
        }
        zip_strstart++;
        zip_lookahead--;
    } else {
        /* There is no previous match to compare with, wait for
         * the next step to decide.
         */
        zip_match_available = 1;
        zip_strstart++;
        zip_lookahead--;
    }

    /* Make sure that we always have enough lookahead, except
     * at the end of the input file. We need MAX_MATCH bytes
     * for the next match, plus MIN_MATCH bytes to insert the
     * string following the next match.
     */
    while(zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile)
        zip_fill_window();
    }
}

function zip_init_deflate() {
    if(zip_eofile)
    return;
    zip_bi_buf = 0;
    zip_bi_valid = 0;
    zip_ct_init();
    zip_lm_init();

    zip_qhead = null;
    zip_outcnt = 0;
    zip_outoff = 0;

    if(zip_compr_level <= 3)
    {
    zip_prev_length = zip_MIN_MATCH - 1;
    zip_match_length = 0;
    }
    else
    {
    zip_match_length = zip_MIN_MATCH - 1;
    zip_match_available = 0;
    }

    zip_complete = false;
}

/* ==========================================================================
 * Same as above, but achieves better compression. We use a lazy
 * evaluation for matches: a match is finally adopted only if there is
 * no better match at the next window position.
 */
function zip_deflate_internal(buff, off, buff_size) {
    var n;

    if(!zip_initflag)
    {
    zip_init_deflate();
    zip_initflag = true;
    if(zip_lookahead == 0) { // empty
        zip_complete = true;
        return 0;
    }
    }

    if((n = zip_qcopy(buff, off, buff_size)) == buff_size)
    return buff_size;

    if(zip_complete)
    return n;

    if(zip_compr_level <= 3) // optimized for speed
    zip_deflate_fast();
    else
    zip_deflate_better();
    if(zip_lookahead == 0) {
    if(zip_match_available != 0)
        zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff);
    zip_flush_block(1);
    zip_complete = true;
    }
    return n + zip_qcopy(buff, n + off, buff_size - n);
}

function zip_qcopy(buff, off, buff_size) {
    var n, i, j;

    n = 0;
    while(zip_qhead != null && n < buff_size)
    {
    i = buff_size - n;
    if(i > zip_qhead.len)
        i = zip_qhead.len;
//      System.arraycopy(qhead.ptr, qhead.off, buff, off + n, i);
    for(j = 0; j < i; j++)
        buff[off + n + j] = zip_qhead.ptr[zip_qhead.off + j];

    zip_qhead.off += i;
    zip_qhead.len -= i;
    n += i;
    if(zip_qhead.len == 0) {
        var p;
        p = zip_qhead;
        zip_qhead = zip_qhead.next;
        zip_reuse_queue(p);
    }
    }

    if(n == buff_size)
    return n;

    if(zip_outoff < zip_outcnt) {
    i = buff_size - n;
    if(i > zip_outcnt - zip_outoff)
        i = zip_outcnt - zip_outoff;
    // System.arraycopy(outbuf, outoff, buff, off + n, i);
    for(j = 0; j < i; j++)
        buff[off + n + j] = zip_outbuf[zip_outoff + j];
    zip_outoff += i;
    n += i;
    if(zip_outcnt == zip_outoff)
        zip_outcnt = zip_outoff = 0;
    }
    return n;
}

/* ==========================================================================
 * Allocate the match buffer, initialize the various tables and save the
 * location of the internal file attribute (ascii/binary) and method
 * (DEFLATE/STORE).
 */
function zip_ct_init() {
    var n;  // iterates over tree elements
    var bits;   // bit counter
    var length; // length value
    var code;   // code value
    var dist;   // distance index

    if(zip_static_dtree[0].dl != 0) return; // ct_init already called

    zip_l_desc.dyn_tree     = zip_dyn_ltree;
    zip_l_desc.static_tree  = zip_static_ltree;
    zip_l_desc.extra_bits   = zip_extra_lbits;
    zip_l_desc.extra_base   = zip_LITERALS + 1;
    zip_l_desc.elems        = zip_L_CODES;
    zip_l_desc.max_length   = zip_MAX_BITS;
    zip_l_desc.max_code     = 0;

    zip_d_desc.dyn_tree     = zip_dyn_dtree;
    zip_d_desc.static_tree  = zip_static_dtree;
    zip_d_desc.extra_bits   = zip_extra_dbits;
    zip_d_desc.extra_base   = 0;
    zip_d_desc.elems        = zip_D_CODES;
    zip_d_desc.max_length   = zip_MAX_BITS;
    zip_d_desc.max_code     = 0;

    zip_bl_desc.dyn_tree    = zip_bl_tree;
    zip_bl_desc.static_tree = null;
    zip_bl_desc.extra_bits  = zip_extra_blbits;
    zip_bl_desc.extra_base  = 0;
    zip_bl_desc.elems       = zip_BL_CODES;
    zip_bl_desc.max_length  = zip_MAX_BL_BITS;
    zip_bl_desc.max_code    = 0;

    // Initialize the mapping length (0..255) -> length code (0..28)
    length = 0;
    for(code = 0; code < zip_LENGTH_CODES-1; code++) {
    zip_base_length[code] = length;
    for(n = 0; n < (1<<zip_extra_lbits[code]); n++)
        zip_length_code[length++] = code;
    }
    // Assert (length == 256, "ct_init: length != 256");

    /* Note that the length 255 (match length 258) can be represented
     * in two different ways: code 284 + 5 bits or code 285, so we
     * overwrite length_code[255] to use the best encoding:
     */
    zip_length_code[length-1] = code;

    /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
    dist = 0;
    for(code = 0 ; code < 16; code++) {
    zip_base_dist[code] = dist;
    for(n = 0; n < (1<<zip_extra_dbits[code]); n++) {
        zip_dist_code[dist++] = code;
    }
    }
    // Assert (dist == 256, "ct_init: dist != 256");
    dist >>= 7; // from now on, all distances are divided by 128
    for( ; code < zip_D_CODES; code++) {
    zip_base_dist[code] = dist << 7;
    for(n = 0; n < (1<<(zip_extra_dbits[code]-7)); n++)
        zip_dist_code[256 + dist++] = code;
    }
    // Assert (dist == 256, "ct_init: 256+dist != 512");

    // Construct the codes of the static literal tree
    for(bits = 0; bits <= zip_MAX_BITS; bits++)
    zip_bl_count[bits] = 0;
    n = 0;
    while(n <= 143) { zip_static_ltree[n++].dl = 8; zip_bl_count[8]++; }
    while(n <= 255) { zip_static_ltree[n++].dl = 9; zip_bl_count[9]++; }
    while(n <= 279) { zip_static_ltree[n++].dl = 7; zip_bl_count[7]++; }
    while(n <= 287) { zip_static_ltree[n++].dl = 8; zip_bl_count[8]++; }
    /* Codes 286 and 287 do not exist, but we must include them in the
     * tree construction to get a canonical Huffman tree (longest code
     * all ones)
     */
    zip_gen_codes(zip_static_ltree, zip_L_CODES + 1);

    /* The static distance tree is trivial: */
    for(n = 0; n < zip_D_CODES; n++) {
    zip_static_dtree[n].dl = 5;
    zip_static_dtree[n].fc = zip_bi_reverse(n, 5);
    }

    // Initialize the first block of the first file:
    zip_init_block();
}

/* ==========================================================================
 * Initialize a new block.
 */
function zip_init_block() {
    var n; // iterates over tree elements

    // Initialize the trees.
    for(n = 0; n < zip_L_CODES;  n++) zip_dyn_ltree[n].fc = 0;
    for(n = 0; n < zip_D_CODES;  n++) zip_dyn_dtree[n].fc = 0;
    for(n = 0; n < zip_BL_CODES; n++) zip_bl_tree[n].fc = 0;

    zip_dyn_ltree[zip_END_BLOCK].fc = 1;
    zip_opt_len = zip_static_len = 0;
    zip_last_lit = zip_last_dist = zip_last_flags = 0;
    zip_flags = 0;
    zip_flag_bit = 1;
}

/* ==========================================================================
 * Restore the heap property by moving down the tree starting at node k,
 * exchanging a node with the smallest of its two sons if necessary, stopping
 * when the heap property is re-established (each father smaller than its
 * two sons).
 */
function zip_pqdownheap(
    tree,   // the tree to restore
    k) {    // node to move down
    var v = zip_heap[k];
    var j = k << 1; // left son of k

    while(j <= zip_heap_len) {
    // Set j to the smallest of the two sons:
    if(j < zip_heap_len &&
       zip_SMALLER(tree, zip_heap[j + 1], zip_heap[j]))
        j++;

    // Exit if v is smaller than both sons
    if(zip_SMALLER(tree, v, zip_heap[j]))
        break;

    // Exchange v with the smallest son
    zip_heap[k] = zip_heap[j];
    k = j;

    // And continue down the tree, setting j to the left son of k
    j <<= 1;
    }
    zip_heap[k] = v;
}

/* ==========================================================================
 * Compute the optimal bit lengths for a tree and update the total bit length
 * for the current block.
 * IN assertion: the fields freq and dad are set, heap[heap_max] and
 *    above are the tree nodes sorted by increasing frequency.
 * OUT assertions: the field len is set to the optimal bit length, the
 *     array bl_count contains the frequencies for each bit length.
 *     The length opt_len is updated; static_len is also updated if stree is
 *     not null.
 */
function zip_gen_bitlen(desc) { // the tree descriptor
    var tree        = desc.dyn_tree;
    var extra       = desc.extra_bits;
    var base        = desc.extra_base;
    var max_code    = desc.max_code;
    var max_length  = desc.max_length;
    var stree       = desc.static_tree;
    var h;      // heap index
    var n, m;       // iterate over the tree elements
    var bits;       // bit length
    var xbits;      // extra bits
    var f;      // frequency
    var overflow = 0;   // number of elements with bit length too large

    for(bits = 0; bits <= zip_MAX_BITS; bits++)
    zip_bl_count[bits] = 0;

    /* In a first pass, compute the optimal bit lengths (which may
     * overflow in the case of the bit length tree).
     */
    tree[zip_heap[zip_heap_max]].dl = 0; // root of the heap

    for(h = zip_heap_max + 1; h < zip_HEAP_SIZE; h++) {
    n = zip_heap[h];
    bits = tree[tree[n].dl].dl + 1;
    if(bits > max_length) {
        bits = max_length;
        overflow++;
    }
    tree[n].dl = bits;
    // We overwrite tree[n].dl which is no longer needed

    if(n > max_code)
        continue; // not a leaf node

    zip_bl_count[bits]++;
    xbits = 0;
    if(n >= base)
        xbits = extra[n - base];
    f = tree[n].fc;
    zip_opt_len += f * (bits + xbits);
    if(stree != null)
        zip_static_len += f * (stree[n].dl + xbits);
    }
    if(overflow == 0)
    return;

    // This happens for example on obj2 and pic of the Calgary corpus

    // Find the first bit length which could increase:
    do {
    bits = max_length - 1;
    while(zip_bl_count[bits] == 0)
        bits--;
    zip_bl_count[bits]--;       // move one leaf down the tree
    zip_bl_count[bits + 1] += 2;    // move one overflow item as its brother
    zip_bl_count[max_length]--;
    /* The brother of the overflow item also moves one step up,
     * but this does not affect bl_count[max_length]
     */
    overflow -= 2;
    } while(overflow > 0);

    /* Now recompute all bit lengths, scanning in increasing frequency.
     * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
     * lengths instead of fixing only the wrong ones. This idea is taken
     * from 'ar' written by Haruhiko Okumura.)
     */
    for(bits = max_length; bits != 0; bits--) {
    n = zip_bl_count[bits];
    while(n != 0) {
        m = zip_heap[--h];
        if(m > max_code)
        continue;
        if(tree[m].dl != bits) {
        zip_opt_len += (bits - tree[m].dl) * tree[m].fc;
        tree[m].fc = bits;
        }
        n--;
    }
    }
}

  /* ==========================================================================
   * Generate the codes for a given tree and bit counts (which need not be
   * optimal).
   * IN assertion: the array bl_count contains the bit length statistics for
   * the given tree and the field len is set for all tree elements.
   * OUT assertion: the field code is set for all tree elements of non
   *     zero code length.
   */
function zip_gen_codes(tree,    // the tree to decorate
           max_code) {  // largest code with non zero frequency
    var next_code = new Array(zip_MAX_BITS+1); // next code value for each bit length
    var code = 0;       // running code value
    var bits;           // bit index
    var n;          // code index

    /* The distribution counts are first used to generate the code values
     * without bit reversal.
     */
    for(bits = 1; bits <= zip_MAX_BITS; bits++) {
    code = ((code + zip_bl_count[bits-1]) << 1);
    next_code[bits] = code;
    }

    /* Check that the bit counts in bl_count are consistent. The last code
     * must be all ones.
     */
//    Assert (code + encoder->bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
//      "inconsistent bit counts");
//    Tracev((stderr,"\ngen_codes: max_code %d ", max_code));

    for(n = 0; n <= max_code; n++) {
    var len = tree[n].dl;
    if(len == 0)
        continue;
    // Now reverse the bits
    tree[n].fc = zip_bi_reverse(next_code[len]++, len);

//      Tracec(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
//    n, (isgraph(n) ? n : ' '), len, tree[n].fc, next_code[len]-1));
    }
}

/* ==========================================================================
 * Construct one Huffman tree and assigns the code bit strings and lengths.
 * Update the total bit length for the current block.
 * IN assertion: the field freq is set for all tree elements.
 * OUT assertions: the fields len and code are set to the optimal bit length
 *     and corresponding code. The length opt_len is updated; static_len is
 *     also updated if stree is not null. The field max_code is set.
 */
function zip_build_tree(desc) { // the tree descriptor
    var tree    = desc.dyn_tree;
    var stree   = desc.static_tree;
    var elems   = desc.elems;
    var n, m;       // iterate over heap elements
    var max_code = -1;  // largest code with non zero frequency
    var node = elems;   // next internal node of the tree

    /* Construct the initial heap, with least frequent element in
     * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
     * heap[0] is not used.
     */
    zip_heap_len = 0;
    zip_heap_max = zip_HEAP_SIZE;

    for(n = 0; n < elems; n++) {
    if(tree[n].fc != 0) {
        zip_heap[++zip_heap_len] = max_code = n;
        zip_depth[n] = 0;
    } else
        tree[n].dl = 0;
    }

    /* The pkzip format requires that at least one distance code exists,
     * and that at least one bit should be sent even if there is only one
     * possible code. So to avoid special checks later on we force at least
     * two codes of non zero frequency.
     */
    while(zip_heap_len < 2) {
    var xnew = zip_heap[++zip_heap_len] = (max_code < 2 ? ++max_code : 0);
    tree[xnew].fc = 1;
    zip_depth[xnew] = 0;
    zip_opt_len--;
    if(stree != null)
        zip_static_len -= stree[xnew].dl;
    // new is 0 or 1 so it does not have extra bits
    }
    desc.max_code = max_code;

    /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
     * establish sub-heaps of increasing lengths:
     */
    for(n = zip_heap_len >> 1; n >= 1; n--)
    zip_pqdownheap(tree, n);

    /* Construct the Huffman tree by repeatedly combining the least two
     * frequent nodes.
     */
    do {
    n = zip_heap[zip_SMALLEST];
    zip_heap[zip_SMALLEST] = zip_heap[zip_heap_len--];
    zip_pqdownheap(tree, zip_SMALLEST);

    m = zip_heap[zip_SMALLEST];  // m = node of next least frequency

    // keep the nodes sorted by frequency
    zip_heap[--zip_heap_max] = n;
    zip_heap[--zip_heap_max] = m;

    // Create a new node father of n and m
    tree[node].fc = tree[n].fc + tree[m].fc;
//  depth[node] = (char)(MAX(depth[n], depth[m]) + 1);
    if(zip_depth[n] > zip_depth[m] + 1)
        zip_depth[node] = zip_depth[n];
    else
        zip_depth[node] = zip_depth[m] + 1;
    tree[n].dl = tree[m].dl = node;

    // and insert the new node in the heap
    zip_heap[zip_SMALLEST] = node++;
    zip_pqdownheap(tree, zip_SMALLEST);

    } while(zip_heap_len >= 2);

    zip_heap[--zip_heap_max] = zip_heap[zip_SMALLEST];

    /* At this point, the fields freq and dad are set. We can now
     * generate the bit lengths.
     */
    zip_gen_bitlen(desc);

    // The field len is now set, we can generate the bit codes
    zip_gen_codes(tree, max_code);
}

/* ==========================================================================
 * Scan a literal or distance tree to determine the frequencies of the codes
 * in the bit length tree. Updates opt_len to take into account the repeat
 * counts. (The contribution of the bit length codes will be added later
 * during the construction of bl_tree.)
 */
function zip_scan_tree(tree,// the tree to be scanned
               max_code) {  // and its largest code of non zero frequency
    var n;          // iterates over all tree elements
    var prevlen = -1;       // last emitted length
    var curlen;         // length of current code
    var nextlen = tree[0].dl;   // length of next code
    var count = 0;      // repeat count of the current code
    var max_count = 7;      // max repeat count
    var min_count = 4;      // min repeat count

    if(nextlen == 0) {
    max_count = 138;
    min_count = 3;
    }
    tree[max_code + 1].dl = 0xffff; // guard

    for(n = 0; n <= max_code; n++) {
    curlen = nextlen;
    nextlen = tree[n + 1].dl;
    if(++count < max_count && curlen == nextlen)
        continue;
    else if(count < min_count)
        zip_bl_tree[curlen].fc += count;
    else if(curlen != 0) {
        if(curlen != prevlen)
        zip_bl_tree[curlen].fc++;
        zip_bl_tree[zip_REP_3_6].fc++;
    } else if(count <= 10)
        zip_bl_tree[zip_REPZ_3_10].fc++;
    else
        zip_bl_tree[zip_REPZ_11_138].fc++;
    count = 0; prevlen = curlen;
    if(nextlen == 0) {
        max_count = 138;
        min_count = 3;
    } else if(curlen == nextlen) {
        max_count = 6;
        min_count = 3;
    } else {
        max_count = 7;
        min_count = 4;
    }
    }
}

  /* ==========================================================================
   * Send a literal or distance tree in compressed form, using the codes in
   * bl_tree.
   */
function zip_send_tree(tree, // the tree to be scanned
           max_code) { // and its largest code of non zero frequency
    var n;          // iterates over all tree elements
    var prevlen = -1;       // last emitted length
    var curlen;         // length of current code
    var nextlen = tree[0].dl;   // length of next code
    var count = 0;      // repeat count of the current code
    var max_count = 7;      // max repeat count
    var min_count = 4;      // min repeat count

    /* tree[max_code+1].dl = -1; */  /* guard already set */
    if(nextlen == 0) {
      max_count = 138;
      min_count = 3;
    }

    for(n = 0; n <= max_code; n++) {
    curlen = nextlen;
    nextlen = tree[n+1].dl;
    if(++count < max_count && curlen == nextlen) {
        continue;
    } else if(count < min_count) {
        do { zip_SEND_CODE(curlen, zip_bl_tree); } while(--count != 0);
    } else if(curlen != 0) {
        if(curlen != prevlen) {
        zip_SEND_CODE(curlen, zip_bl_tree);
        count--;
        }
        // Assert(count >= 3 && count <= 6, " 3_6?");
        zip_SEND_CODE(zip_REP_3_6, zip_bl_tree);
        zip_send_bits(count - 3, 2);
    } else if(count <= 10) {
        zip_SEND_CODE(zip_REPZ_3_10, zip_bl_tree);
        zip_send_bits(count-3, 3);
    } else {
        zip_SEND_CODE(zip_REPZ_11_138, zip_bl_tree);
        zip_send_bits(count-11, 7);
    }
    count = 0;
    prevlen = curlen;
    if(nextlen == 0) {
        max_count = 138;
        min_count = 3;
    } else if(curlen == nextlen) {
        max_count = 6;
        min_count = 3;
    } else {
        max_count = 7;
        min_count = 4;
    }
    }
}

/* ==========================================================================
 * Construct the Huffman tree for the bit lengths and return the index in
 * bl_order of the last bit length code to send.
 */
function zip_build_bl_tree() {
    var max_blindex;  // index of last bit length code of non zero freq

    // Determine the bit length frequencies for literal and distance trees
    zip_scan_tree(zip_dyn_ltree, zip_l_desc.max_code);
    zip_scan_tree(zip_dyn_dtree, zip_d_desc.max_code);

    // Build the bit length tree:
    zip_build_tree(zip_bl_desc);
    /* opt_len now includes the length of the tree representations, except
     * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
     */

    /* Determine the number of bit length codes to send. The pkzip format
     * requires that at least 4 bit length codes be sent. (appnote.txt says
     * 3 but the actual value used is 4.)
     */
    for(max_blindex = zip_BL_CODES-1; max_blindex >= 3; max_blindex--) {
    if(zip_bl_tree[zip_bl_order[max_blindex]].dl != 0) break;
    }
    /* Update opt_len to include the bit length tree and counts */
    zip_opt_len += 3*(max_blindex+1) + 5+5+4;
//    Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
//      encoder->opt_len, encoder->static_len));

    return max_blindex;
}

/* ==========================================================================
 * Send the header for a block using dynamic Huffman trees: the counts, the
 * lengths of the bit length codes, the literal tree and the distance tree.
 * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
 */
function zip_send_all_trees(lcodes, dcodes, blcodes) { // number of codes for each tree
    var rank; // index in bl_order

//    Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
//    Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
//      "too many codes");
//    Tracev((stderr, "\nbl counts: "));
    zip_send_bits(lcodes-257, 5); // not +255 as stated in appnote.txt
    zip_send_bits(dcodes-1,   5);
    zip_send_bits(blcodes-4,  4); // not -3 as stated in appnote.txt
    for(rank = 0; rank < blcodes; rank++) {
//      Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
    zip_send_bits(zip_bl_tree[zip_bl_order[rank]].dl, 3);
    }

    // send the literal tree
    zip_send_tree(zip_dyn_ltree,lcodes-1);

    // send the distance tree
    zip_send_tree(zip_dyn_dtree,dcodes-1);
}

/* ==========================================================================
 * Determine the best encoding for the current block: dynamic trees, static
 * trees or store, and output the encoded block to the zip file.
 */
function zip_flush_block(eof) { // true if this is the last block for a file
    var opt_lenb, static_lenb; // opt_len and static_len in bytes
    var max_blindex;    // index of last bit length code of non zero freq
    var stored_len; // length of input block

    stored_len = zip_strstart - zip_block_start;
    zip_flag_buf[zip_last_flags] = zip_flags; // Save the flags for the last 8 items

    // Construct the literal and distance trees
    zip_build_tree(zip_l_desc);
//    Tracev((stderr, "\nlit data: dyn %ld, stat %ld",
//      encoder->opt_len, encoder->static_len));

    zip_build_tree(zip_d_desc);
//    Tracev((stderr, "\ndist data: dyn %ld, stat %ld",
//      encoder->opt_len, encoder->static_len));
    /* At this point, opt_len and static_len are the total bit lengths of
     * the compressed block data, excluding the tree representations.
     */

    /* Build the bit length tree for the above two trees, and get the index
     * in bl_order of the last bit length code to send.
     */
    max_blindex = zip_build_bl_tree();

    // Determine the best encoding. Compute first the block length in bytes
    opt_lenb    = (zip_opt_len   +3+7)>>3;
    static_lenb = (zip_static_len+3+7)>>3;

//    Trace((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u dist %u ",
//     opt_lenb, encoder->opt_len,
//     static_lenb, encoder->static_len, stored_len,
//     encoder->last_lit, encoder->last_dist));

    if(static_lenb <= opt_lenb)
    opt_lenb = static_lenb;
    if(stored_len + 4 <= opt_lenb // 4: two words for the lengths
       && zip_block_start >= 0) {
    var i;

    /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
     * Otherwise we can't have processed more than WSIZE input bytes since
     * the last block flush, because compression would have been
     * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
     * transform a block into a stored block.
     */
    zip_send_bits((zip_STORED_BLOCK<<1)+eof, 3);  /* send block type */
    zip_bi_windup();         /* align on byte boundary */
    zip_put_short(stored_len);
    zip_put_short(~stored_len);

      // copy block
/*
      p = &window[block_start];
      for(i = 0; i < stored_len; i++)
    put_byte(p[i]);
*/
    for(i = 0; i < stored_len; i++)
        zip_put_byte(zip_window[zip_block_start + i]);

    } else if(static_lenb == opt_lenb) {
    zip_send_bits((zip_STATIC_TREES<<1)+eof, 3);
    zip_compress_block(zip_static_ltree, zip_static_dtree);
    } else {
    zip_send_bits((zip_DYN_TREES<<1)+eof, 3);
    zip_send_all_trees(zip_l_desc.max_code+1,
               zip_d_desc.max_code+1,
               max_blindex+1);
    zip_compress_block(zip_dyn_ltree, zip_dyn_dtree);
    }

    zip_init_block();

    if(eof != 0)
    zip_bi_windup();
}

/* ==========================================================================
 * Save the match info and tally the frequency counts. Return true if
 * the current block must be flushed.
 */
function zip_ct_tally(
    dist, // distance of matched string
    lc) { // match length-MIN_MATCH or unmatched char (if dist==0)
    zip_l_buf[zip_last_lit++] = lc;
    if(dist == 0) {
    // lc is the unmatched char
    zip_dyn_ltree[lc].fc++;
    } else {
    // Here, lc is the match length - MIN_MATCH
    dist--;         // dist = match distance - 1
//      Assert((ush)dist < (ush)MAX_DIST &&
//       (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
//       (ush)D_CODE(dist) < (ush)D_CODES,  "ct_tally: bad match");

    zip_dyn_ltree[zip_length_code[lc]+zip_LITERALS+1].fc++;
    zip_dyn_dtree[zip_D_CODE(dist)].fc++;

    zip_d_buf[zip_last_dist++] = dist;
    zip_flags |= zip_flag_bit;
    }
    zip_flag_bit <<= 1;

    // Output the flags if they fill a byte
    if((zip_last_lit & 7) == 0) {
    zip_flag_buf[zip_last_flags++] = zip_flags;
    zip_flags = 0;
    zip_flag_bit = 1;
    }
    // Try to guess if it is profitable to stop the current block here
    if(zip_compr_level > 2 && (zip_last_lit & 0xfff) == 0) {
    // Compute an upper bound for the compressed length
    var out_length = zip_last_lit * 8;
    var in_length = zip_strstart - zip_block_start;
    var dcode;

    for(dcode = 0; dcode < zip_D_CODES; dcode++) {
        out_length += zip_dyn_dtree[dcode].fc * (5 + zip_extra_dbits[dcode]);
    }
    out_length >>= 3;
//      Trace((stderr,"\nlast_lit %u, last_dist %u, in %ld, out ~%ld(%ld%%) ",
//       encoder->last_lit, encoder->last_dist, in_length, out_length,
//       100L - out_length*100L/in_length));
    if(zip_last_dist < parseInt(zip_last_lit/2) &&
       out_length < parseInt(in_length/2))
        return true;
    }
    return (zip_last_lit == zip_LIT_BUFSIZE-1 ||
        zip_last_dist == zip_DIST_BUFSIZE);
    /* We avoid equality with LIT_BUFSIZE because of wraparound at 64K
     * on 16 bit machines and because stored blocks are restricted to
     * 64K-1 bytes.
     */
}

  /* ==========================================================================
   * Send the block data compressed using the given Huffman trees
   */
function zip_compress_block(
    ltree,  // literal tree
    dtree) {    // distance tree
    var dist;       // distance of matched string
    var lc;     // match length or unmatched char (if dist == 0)
    var lx = 0;     // running index in l_buf
    var dx = 0;     // running index in d_buf
    var fx = 0;     // running index in flag_buf
    var flag = 0;   // current flags
    var code;       // the code to send
    var extra;      // number of extra bits to send

    if(zip_last_lit != 0) do {
    if((lx & 7) == 0)
        flag = zip_flag_buf[fx++];
    lc = zip_l_buf[lx++] & 0xff;
    if((flag & 1) == 0) {
        zip_SEND_CODE(lc, ltree); /* send a literal byte */
//  Tracecv(isgraph(lc), (stderr," '%c' ", lc));
    } else {
        // Here, lc is the match length - MIN_MATCH
        code = zip_length_code[lc];
        zip_SEND_CODE(code+zip_LITERALS+1, ltree); // send the length code
        extra = zip_extra_lbits[code];
        if(extra != 0) {
        lc -= zip_base_length[code];
        zip_send_bits(lc, extra); // send the extra length bits
        }
        dist = zip_d_buf[dx++];
        // Here, dist is the match distance - 1
        code = zip_D_CODE(dist);
//  Assert (code < D_CODES, "bad d_code");

        zip_SEND_CODE(code, dtree);   // send the distance code
        extra = zip_extra_dbits[code];
        if(extra != 0) {
        dist -= zip_base_dist[code];
        zip_send_bits(dist, extra);   // send the extra distance bits
        }
    } // literal or match pair ?
    flag >>= 1;
    } while(lx < zip_last_lit);

    zip_SEND_CODE(zip_END_BLOCK, ltree);
}

/* ==========================================================================
 * Send a value on a given number of bits.
 * IN assertion: length <= 16 and value fits in length bits.
 */
var zip_Buf_size = 16; // bit size of bi_buf
function zip_send_bits(
    value,  // value to send
    length) {   // number of bits
    /* If not enough room in bi_buf, use (valid) bits from bi_buf and
     * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
     * unused bits in value.
     */
    if(zip_bi_valid > zip_Buf_size - length) {
    zip_bi_buf |= (value << zip_bi_valid);
    zip_put_short(zip_bi_buf);
    zip_bi_buf = (value >> (zip_Buf_size - zip_bi_valid));
    zip_bi_valid += length - zip_Buf_size;
    } else {
    zip_bi_buf |= value << zip_bi_valid;
    zip_bi_valid += length;
    }
}

/* ==========================================================================
 * Reverse the first len bits of a code, using straightforward code (a faster
 * method would use a table)
 * IN assertion: 1 <= len <= 15
 */
function zip_bi_reverse(
    code,   // the value to invert
    len) {  // its bit length
    var res = 0;
    do {
    res |= code & 1;
    code >>= 1;
    res <<= 1;
    } while(--len > 0);
    return res >> 1;
}

/* ==========================================================================
 * Write out any remaining bits in an incomplete byte.
 */
function zip_bi_windup() {
    if(zip_bi_valid > 8) {
    zip_put_short(zip_bi_buf);
    } else if(zip_bi_valid > 0) {
    zip_put_byte(zip_bi_buf);
    }
    zip_bi_buf = 0;
    zip_bi_valid = 0;
}

function zip_qoutbuf() {
    if(zip_outcnt != 0) {
    var q, i;
    q = zip_new_queue();
    if(zip_qhead == null)
        zip_qhead = zip_qtail = q;
    else
        zip_qtail = zip_qtail.next = q;
    q.len = zip_outcnt - zip_outoff;
//      System.arraycopy(zip_outbuf, zip_outoff, q.ptr, 0, q.len);
    for(i = 0; i < q.len; i++)
        q.ptr[i] = zip_outbuf[zip_outoff + i];
    zip_outcnt = zip_outoff = 0;
    }
}

return function deflate(str, level) {
    var i, j;

    zip_deflate_data = str;
    zip_deflate_pos = 0;
    if(typeof level == "undefined")
    level = zip_DEFAULT_LEVEL;
    zip_deflate_start(level);

    var buff = new Array(1024);
    var aout = [];
    while((i = zip_deflate_internal(buff, 0, buff.length)) > 0) {
    var cbuf = new Array(i);
    for(j = 0; j < i; j++){
        cbuf[j] = String.fromCharCode(buff[j]);
    }
    aout[aout.length] = cbuf.join("");
    }
    zip_deflate_data = null; // G.C.
    return aout.join("");
};

})();

// onmessage = function worker(m) {
//   postMessage(deflate(m.data, 9));
// };

// onconnect = function sharedWorker(e) {
//   var port = e.ports[0];
//   port.onmessage = function(m) {
//     port.postMessage(deflate(m.data, 9));
//   };
// };
raphael.min.js
wget 'https://sme10.lists2.roe3.org/kodbox/static/app/vender/markdown/raphael.min.js'
View Content
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Raphael=e():t.Raphael=e()}(window,function(){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e,r){var i,n;i=[r(2)],void 0===(n=function(t){function e(i){if(e.is(i,"function"))return r?i():t.on("raphael.DOMload",i);if(e.is(i,A))return e._engine.create[c](e,i.splice(0,3+e.is(i[0],T))).add(i);var n=Array.prototype.slice.call(arguments,0);if(e.is(n[n.length-1],"function")){var a=n.pop();return r?a.call(e._engine.create[c](e,n)):t.on("raphael.DOMload",function(){a.call(e._engine.create[c](e,n))})}return e._engine.create[c](e,arguments)}e.version="2.3.0",e.eve=t;var r,i,n=/[, ]+/,a={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},s=/\{(\d+)\}/g,o="hasOwnProperty",l={doc:document,win:window},h={was:Object.prototype[o].call(l.win,"Raphael"),is:l.win.Raphael},u=function(){this.ca=this.customAttributes={}},c="apply",f="concat",p="ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,d="",g=" ",x=String,v="split",y="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[v](g),m={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},b=x.prototype.toLowerCase,_=Math,w=_.max,k=_.min,B=_.abs,C=_.pow,S=_.PI,T="number",A="array",M=Object.prototype.toString,E=(e._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),N={NaN:1,Infinity:1,"-Infinity":1},L=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,P=_.round,z=parseFloat,F=parseInt,R=x.prototype.toUpperCase,j=e._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},I=e._availableAnimAttrs={blur:T,"clip-rect":"csv",cx:T,cy:T,fill:"colour","fill-opacity":T,"font-size":T,height:T,opacity:T,path:"path",r:T,rx:T,ry:T,stroke:"colour","stroke-opacity":T,"stroke-width":T,transform:"transform",width:T,x:T,y:T},D=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,q={hs:1,rg:1},O=/,?([achlmqrstvxz]),?/gi,V=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,W=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,Y=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,G=(e._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),H=function(t,e){return z(t)-z(e)},X=function(t){return t},U=e._rectPath=function(t,e,r,i,n){return n?[["M",t+n,e],["l",r-2*n,0],["a",n,n,0,0,1,n,n],["l",0,i-2*n],["a",n,n,0,0,1,-n,n],["l",2*n-r,0],["a",n,n,0,0,1,-n,-n],["l",0,2*n-i],["a",n,n,0,0,1,n,-n],["z"]]:[["M",t,e],["l",r,0],["l",0,i],["l",-r,0],["z"]]},$=function(t,e,r,i){return null==i&&(i=r),[["M",t,e],["m",0,-i],["a",r,i,0,1,1,0,2*i],["a",r,i,0,1,1,0,-2*i],["z"]]},Z=e._getPath={path:function(t){return t.attr("path")},circle:function(t){var e=t.attrs;return $(e.cx,e.cy,e.r)},ellipse:function(t){var e=t.attrs;return $(e.cx,e.cy,e.rx,e.ry)},rect:function(t){var e=t.attrs;return U(e.x,e.y,e.width,e.height,e.r)},image:function(t){var e=t.attrs;return U(e.x,e.y,e.width,e.height)},text:function(t){var e=t._getBBox();return U(e.x,e.y,e.width,e.height)},set:function(t){var e=t._getBBox();return U(e.x,e.y,e.width,e.height)}},Q=e.mapPath=function(t,e){if(!e)return t;var r,i,n,a,s,o,l;for(n=0,s=(t=Tt(t)).length;n<s;n++)for(a=1,o=(l=t[n]).length;a<o;a+=2)r=e.x(l[a],l[a+1]),i=e.y(l[a],l[a+1]),l[a]=r,l[a+1]=i;return t};if(e._g=l,e.type=l.win.SVGAngle||l.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==e.type){var J,K=l.doc.createElement("div");if(K.innerHTML='<v:shape adj="1"/>',(J=K.firstChild).style.behavior="url(#default#VML)",!J||"object"!=typeof J.adj)return e.type=d;K=null}function tt(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var r in t)t[o](r)&&(e[r]=tt(t[r]));return e}e.svg=!(e.vml="VML"==e.type),e._Paper=u,e.fn=i=u.prototype=e.prototype,e._id=0,e.is=function(t,e){return"finite"==(e=b.call(e))?!N[o](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||M.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,r,i,n,a,s){if(null==a){var o=t-i,l=r-n;return o||l?(180+180*_.atan2(-l,-o)/S+360)%360:0}return e.angle(t,r,a,s)-e.angle(i,n,a,s)},e.rad=function(t){return t%360*S/180},e.deg=function(t){return Math.round(180*t/S%360*1e3)/1e3},e.snapTo=function(t,r,i){if(i=e.is(i,"finite")?i:10,e.is(t,A)){for(var n=t.length;n--;)if(B(t[n]-r)<=i)return t[n]}else{var a=r%(t=+t);if(a<i)return r-a;if(a>t-i)return r-a+t}return r};var et,rt;e.createUUID=(et=/[xy]/g,rt=function(t){var e=16*_.random()|0;return("x"==t?e:3&e|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(et,rt).toUpperCase()});e.setWindow=function(r){t("raphael.setWindow",e,l.win,r),l.win=r,l.doc=l.win.document,e._engine.initWin&&e._engine.initWin(l.win)};var it=function(t){if(e.vml){var r,i=/^\s+|\s+$/g;try{var n=new ActiveXObject("htmlfile");n.write("<body>"),n.close(),r=n.body}catch(t){r=createPopup().document.body}var a=r.createTextRange();it=ht(function(t){try{r.style.color=x(t).replace(i,d);var e=a.queryCommandValue("ForeColor");return"#"+("000000"+(e=(255&e)<<16|65280&e|(16711680&e)>>>16).toString(16)).slice(-6)}catch(t){return"none"}})}else{var s=l.doc.createElement("i");s.title="Raphaël Colour Picker",s.style.display="none",l.doc.body.appendChild(s),it=ht(function(t){return s.style.color=t,l.doc.defaultView.getComputedStyle(s,d).getPropertyValue("color")})}return it(t)},nt=function(){return"hsb("+[this.h,this.s,this.b]+")"},at=function(){return"hsl("+[this.h,this.s,this.l]+")"},st=function(){return this.hex},ot=function(t,r,i){if(null==r&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(i=t.b,r=t.g,t=t.r),null==r&&e.is(t,"string")){var n=e.getRGB(t);t=n.r,r=n.g,i=n.b}return(t>1||r>1||i>1)&&(t/=255,r/=255,i/=255),[t,r,i]},lt=function(t,r,i,n){var a={r:t*=255,g:r*=255,b:i*=255,hex:e.rgb(t,r,i),toString:st};return e.is(n,"finite")&&(a.opacity=n),a};function ht(t,e,r){return function i(){var n=Array.prototype.slice.call(arguments,0),a=n.join("␀"),s=i.cache=i.cache||{},l=i.count=i.count||[];return s[o](a)?(function(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return t.push(t.splice(r,1)[0])}(l,a),r?r(s[a]):s[a]):(l.length>=1e3&&delete s[l.shift()],l.push(a),s[a]=t[c](e,n),r?r(s[a]):s[a])}}e.color=function(t){var r;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(r=e.hsb2rgb(t),t.r=r.r,t.g=r.g,t.b=r.b,t.hex=r.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(r=e.hsl2rgb(t),t.r=r.r,t.g=r.g,t.b=r.b,t.hex=r.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(r=e.rgb2hsl(t),t.h=r.h,t.s=r.s,t.l=r.l,r=e.rgb2hsb(t),t.v=r.b):(t={hex:"none"}).r=t.g=t.b=t.h=t.s=t.v=t.l=-1),t.toString=st,t},e.hsb2rgb=function(t,e,r,i){var n,a,s,o,l;return this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(r=t.b,e=t.s,i=t.o,t=t.h),o=(l=r*e)*(1-B((t=(t*=360)%360/60)%2-1)),n=a=s=r-l,lt(n+=[l,o,0,0,o,l][t=~~t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],i)},e.hsl2rgb=function(t,e,r,i){var n,a,s,o,l;return this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(r=t.l,e=t.s,t=t.h),(t>1||e>1||r>1)&&(t/=360,e/=100,r/=100),o=(l=2*e*(r<.5?r:1-r))*(1-B((t=(t*=360)%360/60)%2-1)),n=a=s=r-l/2,lt(n+=[l,o,0,0,o,l][t=~~t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],i)},e.rgb2hsb=function(t,e,r){var i,n;return t=(r=ot(t,e,r))[0],e=r[1],r=r[2],{h:((0==(n=(i=w(t,e,r))-k(t,e,r))?null:i==t?(e-r)/n:i==e?(r-t)/n+2:(t-e)/n+4)+360)%6*60/360,s:0==n?0:n/i,b:i,toString:nt}},e.rgb2hsl=function(t,e,r){var i,n,a,s;return t=(r=ot(t,e,r))[0],e=r[1],r=r[2],i=((n=w(t,e,r))+(a=k(t,e,r)))/2,{h:((0==(s=n-a)?null:n==t?(e-r)/s:n==e?(r-t)/s+2:(t-e)/s+4)+360)%6*60/360,s:0==s?0:i<.5?s/(2*i):s/(2-2*i),l:i,toString:at}},e._path2string=function(){return this.join(",").replace(O,"$1")};e._preload=function(t,e){var r=l.doc.createElement("img");r.style.cssText="position:absolute;left:-9999em;top:-9999em",r.onload=function(){e.call(this),this.onload=null,l.doc.body.removeChild(this)},r.onerror=function(){l.doc.body.removeChild(this)},l.doc.body.appendChild(r),r.src=t};function ut(){return this.hex}function ct(t,e){for(var r=[],i=0,n=t.length;n-2*!e>i;i+=2){var a=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?n-4==i?a[3]={x:+t[0],y:+t[1]}:n-2==i&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[n-2],y:+t[n-1]}:n-4==i?a[3]=a[2]:i||(a[0]={x:+t[i],y:+t[i+1]}),r.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return r}e.getRGB=ht(function(t){if(!t||(t=x(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:ut};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:ut};!q[o](t.toLowerCase().substring(0,2))&&"#"!=t.charAt()&&(t=it(t));var r,i,n,a,s,l,h=t.match(E);return h?(h[2]&&(n=F(h[2].substring(5),16),i=F(h[2].substring(3,5),16),r=F(h[2].substring(1,3),16)),h[3]&&(n=F((s=h[3].charAt(3))+s,16),i=F((s=h[3].charAt(2))+s,16),r=F((s=h[3].charAt(1))+s,16)),h[4]&&(l=h[4][v](D),r=z(l[0]),"%"==l[0].slice(-1)&&(r*=2.55),i=z(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),n=z(l[2]),"%"==l[2].slice(-1)&&(n*=2.55),"rgba"==h[1].toLowerCase().slice(0,4)&&(a=z(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100)),h[5]?(l=h[5][v](D),r=z(l[0]),"%"==l[0].slice(-1)&&(r*=2.55),i=z(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),n=z(l[2]),"%"==l[2].slice(-1)&&(n*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(r/=360),"hsba"==h[1].toLowerCase().slice(0,4)&&(a=z(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100),e.hsb2rgb(r,i,n,a)):h[6]?(l=h[6][v](D),r=z(l[0]),"%"==l[0].slice(-1)&&(r*=2.55),i=z(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),n=z(l[2]),"%"==l[2].slice(-1)&&(n*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(r/=360),"hsla"==h[1].toLowerCase().slice(0,4)&&(a=z(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100),e.hsl2rgb(r,i,n,a)):((h={r:r,g:i,b:n,toString:ut}).hex="#"+(16777216|n|i<<8|r<<16).toString(16).slice(1),e.is(a,"finite")&&(h.opacity=a),h)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:ut}},e),e.hsb=ht(function(t,r,i){return e.hsb2rgb(t,r,i).hex}),e.hsl=ht(function(t,r,i){return e.hsl2rgb(t,r,i).hex}),e.rgb=ht(function(t,e,r){function i(t){return t+.5|0}return"#"+(16777216|i(r)|i(e)<<8|i(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},r=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),r.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var r=ft(t);if(r.arr)return mt(r.arr);var i={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},n=[];return e.is(t,A)&&e.is(t[0],A)&&(n=mt(t)),n.length||x(t).replace(V,function(t,e,r){var a=[],s=e.toLowerCase();if(r.replace(Y,function(t,e){e&&a.push(+e)}),"m"==s&&a.length>2&&(n.push([e][f](a.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)n.push([e][f](a));else for(;a.length>=i[s]&&(n.push([e][f](a.splice(0,i[s]))),i[s]););}),n.toString=e._path2string,r.arr=mt(n),n},e.parseTransformString=ht(function(t){if(!t)return null;var r=[];return e.is(t,A)&&e.is(t[0],A)&&(r=mt(t)),r.length||x(t).replace(W,function(t,e,i){var n=[];b.call(e);i.replace(Y,function(t,e){e&&n.push(+e)}),r.push([e][f](n))}),r.toString=e._path2string,r},this,function(t){if(!t)return t;for(var e=[],r=0;r<t.length;r++){for(var i=[],n=0;n<t[r].length;n++)i.push(t[r][n]);e.push(i)}return e});var ft=function(t){var e=ft.ps=ft.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var r in e)e[o](r)&&r!=t&&(e[r].sleep--,!e[r].sleep&&delete e[r])}),e[t]};function pt(t,e,r,i,n){return t*(t*(-3*e+9*r-9*i+3*n)+6*e-12*r+6*i)-3*e+3*r}function dt(t,e,r,i,n,a,s,o,l){null==l&&(l=1);for(var h=(l=l>1?1:l<0?0:l)/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],c=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p<12;p++){var d=h*u[p]+h,g=pt(d,t,r,n,s),x=pt(d,e,i,a,o),v=g*g+x*x;f+=c[p]*_.sqrt(v)}return h*f}function gt(t,e,r,i,n,a,s,o){if(!(w(t,r)<k(n,s)||k(t,r)>w(n,s)||w(e,i)<k(a,o)||k(e,i)>w(a,o))){var l=(t-r)*(a-o)-(e-i)*(n-s);if(l){var h=((t*i-e*r)*(n-s)-(t-r)*(n*o-a*s))/l,u=((t*i-e*r)*(a-o)-(e-i)*(n*o-a*s))/l,c=+h.toFixed(2),f=+u.toFixed(2);if(!(c<+k(t,r).toFixed(2)||c>+w(t,r).toFixed(2)||c<+k(n,s).toFixed(2)||c>+w(n,s).toFixed(2)||f<+k(e,i).toFixed(2)||f>+w(e,i).toFixed(2)||f<+k(a,o).toFixed(2)||f>+w(a,o).toFixed(2)))return{x:h,y:u}}}}function xt(t,r,i){var n=e.bezierBBox(t),a=e.bezierBBox(r);if(!e.isBBoxIntersect(n,a))return i?0:[];for(var s=dt.apply(0,t),o=dt.apply(0,r),l=w(~~(s/5),1),h=w(~~(o/5),1),u=[],c=[],f={},p=i?0:[],d=0;d<l+1;d++){var g=e.findDotsAtSegment.apply(e,t.concat(d/l));u.push({x:g.x,y:g.y,t:d/l})}for(d=0;d<h+1;d++)g=e.findDotsAtSegment.apply(e,r.concat(d/h)),c.push({x:g.x,y:g.y,t:d/h});for(d=0;d<l;d++)for(var x=0;x<h;x++){var v=u[d],y=u[d+1],m=c[x],b=c[x+1],_=B(y.x-v.x)<.001?"y":"x",C=B(b.x-m.x)<.001?"y":"x",S=gt(v.x,v.y,y.x,y.y,m.x,m.y,b.x,b.y);if(S){if(f[S.x.toFixed(4)]==S.y.toFixed(4))continue;f[S.x.toFixed(4)]=S.y.toFixed(4);var T=v.t+B((S[_]-v[_])/(y[_]-v[_]))*(y.t-v.t),A=m.t+B((S[C]-m[C])/(b[C]-m[C]))*(b.t-m.t);T>=0&&T<=1.001&&A>=0&&A<=1.001&&(i?p++:p.push({x:S.x,y:S.y,t1:k(T,1),t2:k(A,1)}))}}return p}function vt(t,r,i){t=e._path2curve(t),r=e._path2curve(r);for(var n,a,s,o,l,h,u,c,f,p,d=i?0:[],g=0,x=t.length;g<x;g++){var v=t[g];if("M"==v[0])n=l=v[1],a=h=v[2];else{"C"==v[0]?(f=[n,a].concat(v.slice(1)),n=f[6],a=f[7]):(f=[n,a,n,a,l,h,l,h],n=l,a=h);for(var y=0,m=r.length;y<m;y++){var b=r[y];if("M"==b[0])s=u=b[1],o=c=b[2];else{"C"==b[0]?(p=[s,o].concat(b.slice(1)),s=p[6],o=p[7]):(p=[s,o,s,o,u,c,u,c],s=u,o=c);var _=xt(f,p,i);if(i)d+=_;else{for(var w=0,k=_.length;w<k;w++)_[w].segment1=g,_[w].segment2=y,_[w].bez1=f,_[w].bez2=p;d=d.concat(_)}}}}}return d}e.findDotsAtSegment=function(t,e,r,i,n,a,s,o,l){var h=1-l,u=C(h,3),c=C(h,2),f=l*l,p=f*l,d=u*t+3*c*l*r+3*h*l*l*n+p*s,g=u*e+3*c*l*i+3*h*l*l*a+p*o,x=t+2*l*(r-t)+f*(n-2*r+t),v=e+2*l*(i-e)+f*(a-2*i+e),y=r+2*l*(n-r)+f*(s-2*n+r),m=i+2*l*(a-i)+f*(o-2*a+i),b=h*t+l*r,w=h*e+l*i,k=h*n+l*s,B=h*a+l*o,T=90-180*_.atan2(x-y,v-m)/S;return(x>y||v<m)&&(T+=180),{x:d,y:g,m:{x:x,y:v},n:{x:y,y:m},start:{x:b,y:w},end:{x:k,y:B},alpha:T}},e.bezierBBox=function(t,r,i,n,a,s,o,l){e.is(t,"array")||(t=[t,r,i,n,a,s,o,l]);var h=St.apply(null,t);return{x:h.min.x,y:h.min.y,x2:h.max.x,y2:h.max.y,width:h.max.x-h.min.x,height:h.max.y-h.min.y}},e.isPointInsideBBox=function(t,e,r){return e>=t.x&&e<=t.x2&&r>=t.y&&r<=t.y2},e.isBBoxIntersect=function(t,r){var i=e.isPointInsideBBox;return i(r,t.x,t.y)||i(r,t.x2,t.y)||i(r,t.x,t.y2)||i(r,t.x2,t.y2)||i(t,r.x,r.y)||i(t,r.x2,r.y)||i(t,r.x,r.y2)||i(t,r.x2,r.y2)||(t.x<r.x2&&t.x>r.x||r.x<t.x2&&r.x>t.x)&&(t.y<r.y2&&t.y>r.y||r.y<t.y2&&r.y>t.y)},e.pathIntersection=function(t,e){return vt(t,e)},e.pathIntersectionNumber=function(t,e){return vt(t,e,1)},e.isPointInsidePath=function(t,r,i){var n=e.pathBBox(t);return e.isPointInsideBBox(n,r,i)&&vt(t,[["M",r,i],["H",n.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var yt=e.pathBBox=function(t){var e=ft(t);if(e.bbox)return tt(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var r,i=0,n=0,a=[],s=[],o=0,l=(t=Tt(t)).length;o<l;o++)if("M"==(r=t[o])[0])i=r[1],n=r[2],a.push(i),s.push(n);else{var h=St(i,n,r[1],r[2],r[3],r[4],r[5],r[6]);a=a[f](h.min.x,h.max.x),s=s[f](h.min.y,h.max.y),i=r[5],n=r[6]}var u=k[c](0,a),p=k[c](0,s),d=w[c](0,a),g=w[c](0,s),x=d-u,v=g-p,y={x:u,y:p,x2:d,y2:g,width:x,height:v,cx:u+x/2,cy:p+v/2};return e.bbox=tt(y),y},mt=function(t){var r=tt(t);return r.toString=e._path2string,r},bt=e._pathToRelative=function(t){var r=ft(t);if(r.rel)return mt(r.rel);e.is(t,A)&&e.is(t&&t[0],A)||(t=e.parsePathString(t));var i=[],n=0,a=0,s=0,o=0,l=0;"M"==t[0][0]&&(s=n=t[0][1],o=a=t[0][2],l++,i.push(["M",n,a]));for(var h=l,u=t.length;h<u;h++){var c=i[h]=[],f=t[h];if(f[0]!=b.call(f[0]))switch(c[0]=b.call(f[0]),c[0]){case"a":c[1]=f[1],c[2]=f[2],c[3]=f[3],c[4]=f[4],c[5]=f[5],c[6]=+(f[6]-n).toFixed(3),c[7]=+(f[7]-a).toFixed(3);break;case"v":c[1]=+(f[1]-a).toFixed(3);break;case"m":s=f[1],o=f[2];default:for(var p=1,d=f.length;p<d;p++)c[p]=+(f[p]-(p%2?n:a)).toFixed(3)}else{c=i[h]=[],"m"==f[0]&&(s=f[1]+n,o=f[2]+a);for(var g=0,x=f.length;g<x;g++)i[h][g]=f[g]}var v=i[h].length;switch(i[h][0]){case"z":n=s,a=o;break;case"h":n+=+i[h][v-1];break;case"v":a+=+i[h][v-1];break;default:n+=+i[h][v-2],a+=+i[h][v-1]}}return i.toString=e._path2string,r.rel=mt(i),i},_t=e._pathToAbsolute=function(t){var r=ft(t);if(r.abs)return mt(r.abs);if(e.is(t,A)&&e.is(t&&t[0],A)||(t=e.parsePathString(t)),!t||!t.length)return[["M",0,0]];var i=[],n=0,a=0,s=0,o=0,l=0;"M"==t[0][0]&&(s=n=+t[0][1],o=a=+t[0][2],l++,i[0]=["M",n,a]);for(var h,u,c=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),p=l,d=t.length;p<d;p++){if(i.push(h=[]),(u=t[p])[0]!=R.call(u[0]))switch(h[0]=R.call(u[0]),h[0]){case"A":h[1]=u[1],h[2]=u[2],h[3]=u[3],h[4]=u[4],h[5]=u[5],h[6]=+(u[6]+n),h[7]=+(u[7]+a);break;case"V":h[1]=+u[1]+a;break;case"H":h[1]=+u[1]+n;break;case"R":for(var g=[n,a][f](u.slice(1)),x=2,v=g.length;x<v;x++)g[x]=+g[x]+n,g[++x]=+g[x]+a;i.pop(),i=i[f](ct(g,c));break;case"M":s=+u[1]+n,o=+u[2]+a;default:for(x=1,v=u.length;x<v;x++)h[x]=+u[x]+(x%2?n:a)}else if("R"==u[0])g=[n,a][f](u.slice(1)),i.pop(),i=i[f](ct(g,c)),h=["R"][f](u.slice(-2));else for(var y=0,m=u.length;y<m;y++)h[y]=u[y];switch(h[0]){case"Z":n=s,a=o;break;case"H":n=h[1];break;case"V":a=h[1];break;case"M":s=h[h.length-2],o=h[h.length-1];default:n=h[h.length-2],a=h[h.length-1]}}return i.toString=e._path2string,r.abs=mt(i),i},wt=function(t,e,r,i){return[t,e,r,i,r,i]},kt=function(t,e,r,i,n,a){return[1/3*t+2/3*r,1/3*e+2/3*i,1/3*n+2/3*r,1/3*a+2/3*i,n,a]},Bt=function(t,e,r,i,n,a,s,o,l,h){var u,c=120*S/180,p=S/180*(+n||0),d=[],g=ht(function(t,e,r){return{x:t*_.cos(r)-e*_.sin(r),y:t*_.sin(r)+e*_.cos(r)}});if(h)A=h[0],M=h[1],C=h[2],T=h[3];else{t=(u=g(t,e,-p)).x,e=u.y,o=(u=g(o,l,-p)).x,l=u.y;_.cos(S/180*n),_.sin(S/180*n);var x=(t-o)/2,y=(e-l)/2,m=x*x/(r*r)+y*y/(i*i);m>1&&(r*=m=_.sqrt(m),i*=m);var b=r*r,w=i*i,k=(a==s?-1:1)*_.sqrt(B((b*w-b*y*y-w*x*x)/(b*y*y+w*x*x))),C=k*r*y/i+(t+o)/2,T=k*-i*x/r+(e+l)/2,A=_.asin(((e-T)/i).toFixed(9)),M=_.asin(((l-T)/i).toFixed(9));(A=t<C?S-A:A)<0&&(A=2*S+A),(M=o<C?S-M:M)<0&&(M=2*S+M),s&&A>M&&(A-=2*S),!s&&M>A&&(M-=2*S)}var E=M-A;if(B(E)>c){var N=M,L=o,P=l;M=A+c*(s&&M>A?1:-1),o=C+r*_.cos(M),l=T+i*_.sin(M),d=Bt(o,l,r,i,n,0,s,L,P,[M,N,C,T])}E=M-A;var z=_.cos(A),F=_.sin(A),R=_.cos(M),j=_.sin(M),I=_.tan(E/4),D=4/3*r*I,q=4/3*i*I,O=[t,e],V=[t+D*F,e-q*z],W=[o+D*j,l-q*R],Y=[o,l];if(V[0]=2*O[0]-V[0],V[1]=2*O[1]-V[1],h)return[V,W,Y][f](d);for(var G=[],H=0,X=(d=[V,W,Y][f](d).join()[v](",")).length;H<X;H++)G[H]=H%2?g(d[H-1],d[H],p).y:g(d[H],d[H+1],p).x;return G},Ct=function(t,e,r,i,n,a,s,o,l){var h=1-l;return{x:C(h,3)*t+3*C(h,2)*l*r+3*h*l*l*n+C(l,3)*s,y:C(h,3)*e+3*C(h,2)*l*i+3*h*l*l*a+C(l,3)*o}},St=ht(function(t,e,r,i,n,a,s,o){var l,h=n-2*r+t-(s-2*n+r),u=2*(r-t)-2*(n-r),f=t-r,p=(-u+_.sqrt(u*u-4*h*f))/2/h,d=(-u-_.sqrt(u*u-4*h*f))/2/h,g=[e,o],x=[t,s];return B(p)>"1e12"&&(p=.5),B(d)>"1e12"&&(d=.5),p>0&&p<1&&(l=Ct(t,e,r,i,n,a,s,o,p),x.push(l.x),g.push(l.y)),d>0&&d<1&&(l=Ct(t,e,r,i,n,a,s,o,d),x.push(l.x),g.push(l.y)),h=a-2*i+e-(o-2*a+i),f=e-i,p=(-(u=2*(i-e)-2*(a-i))+_.sqrt(u*u-4*h*f))/2/h,d=(-u-_.sqrt(u*u-4*h*f))/2/h,B(p)>"1e12"&&(p=.5),B(d)>"1e12"&&(d=.5),p>0&&p<1&&(l=Ct(t,e,r,i,n,a,s,o,p),x.push(l.x),g.push(l.y)),d>0&&d<1&&(l=Ct(t,e,r,i,n,a,s,o,d),x.push(l.x),g.push(l.y)),{min:{x:k[c](0,x),y:k[c](0,g)},max:{x:w[c](0,x),y:w[c](0,g)}}}),Tt=e._path2curve=ht(function(t,e){var r=!e&&ft(t);if(!e&&r.curve)return mt(r.curve);for(var i=_t(t),n=e&&_t(e),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=function(t,e,r){var i,n;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][f](Bt[c](0,[e.x,e.y][f](t.slice(1))));break;case"S":"C"==r||"S"==r?(i=2*e.x-e.bx,n=2*e.y-e.by):(i=e.x,n=e.y),t=["C",i,n][f](t.slice(1));break;case"T":"Q"==r||"T"==r?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][f](kt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][f](kt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][f](wt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][f](wt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][f](wt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][f](wt(e.x,e.y,e.X,e.Y))}return t},l=function(t,e){if(t[e].length>7){t[e].shift();for(var r=t[e];r.length;)u[e]="A",n&&(p[e]="A"),t.splice(e++,0,["C"][f](r.splice(0,6)));t.splice(e,1),v=w(i.length,n&&n.length||0)}},h=function(t,e,r,a,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),r.bx=0,r.by=0,r.x=t[s][1],r.y=t[s][2],v=w(i.length,n&&n.length||0))},u=[],p=[],d="",g="",x=0,v=w(i.length,n&&n.length||0);x<v;x++){i[x]&&(d=i[x][0]),"C"!=d&&(u[x]=d,x&&(g=u[x-1])),i[x]=o(i[x],a,g),"A"!=u[x]&&"C"==d&&(u[x]="C"),l(i,x),n&&(n[x]&&(d=n[x][0]),"C"!=d&&(p[x]=d,x&&(g=p[x-1])),n[x]=o(n[x],s,g),"A"!=p[x]&&"C"==d&&(p[x]="C"),l(n,x)),h(i,n,a,s,x),h(n,i,s,a,x);var y=i[x],m=n&&n[x],b=y.length,_=n&&m.length;a.x=y[b-2],a.y=y[b-1],a.bx=z(y[b-4])||a.x,a.by=z(y[b-3])||a.y,s.bx=n&&(z(m[_-4])||s.x),s.by=n&&(z(m[_-3])||s.y),s.x=n&&m[_-2],s.y=n&&m[_-1]}return n||(r.curve=mt(i)),n?[i,n]:i},null,mt),At=(e._parseDots=ht(function(t){for(var r=[],i=0,n=t.length;i<n;i++){var a={},s=t[i].match(/^([^:]*):?([\d\.]*)/);if(a.color=e.getRGB(s[1]),a.color.error)return null;a.opacity=a.color.opacity,a.color=a.color.hex,s[2]&&(a.offset=s[2]+"%"),r.push(a)}for(i=1,n=r.length-1;i<n;i++)if(!r[i].offset){for(var o=z(r[i-1].offset||0),l=0,h=i+1;h<n;h++)if(r[h].offset){l=r[h].offset;break}l||(l=100,h=n);for(var u=((l=z(l))-o)/(h-i+1);i<h;i++)o+=u,r[i].offset=o+"%"}return r}),e._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)}),Mt=(e._tofront=function(t,e){e.top!==t&&(At(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},e._toback=function(t,e){e.bottom!==t&&(At(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},e._insertafter=function(t,e,r){At(t,r),e==r.top&&(r.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},e._insertbefore=function(t,e,r){At(t,r),e==r.bottom&&(r.bottom=t),e.prev&&(e.prev.next=t),t.prev=e.prev,e.prev=t,t.next=e},e.toMatrix=function(t,e){var r=yt(t),i={_:{transform:d},getBBox:function(){return r}};return Et(i,e),i.matrix}),Et=(e.transformPath=function(t,e){return Q(t,Mt(t,e))},e._extractTransform=function(t,r){if(null==r)return t._.transform;r=x(r).replace(/\.{3}|\u2026/g,t._.transform||d);var i,n,a=e.parseTransformString(r),s=0,o=1,l=1,h=t._,u=new Pt;if(h.transform=a||[],a)for(var c=0,f=a.length;c<f;c++){var p,g,v,y,m,b=a[c],_=b.length,w=x(b[0]).toLowerCase(),k=b[0]!=w,B=k?u.invert():0;"t"==w&&3==_?k?(p=B.x(0,0),g=B.y(0,0),v=B.x(b[1],b[2]),y=B.y(b[1],b[2]),u.translate(v-p,y-g)):u.translate(b[1],b[2]):"r"==w?2==_?(m=m||t.getBBox(1),u.rotate(b[1],m.x+m.width/2,m.y+m.height/2),s+=b[1]):4==_&&(k?(v=B.x(b[2],b[3]),y=B.y(b[2],b[3]),u.rotate(b[1],v,y)):u.rotate(b[1],b[2],b[3]),s+=b[1]):"s"==w?2==_||3==_?(m=m||t.getBBox(1),u.scale(b[1],b[_-1],m.x+m.width/2,m.y+m.height/2),o*=b[1],l*=b[_-1]):5==_&&(k?(v=B.x(b[3],b[4]),y=B.y(b[3],b[4]),u.scale(b[1],b[2],v,y)):u.scale(b[1],b[2],b[3],b[4]),o*=b[1],l*=b[2]):"m"==w&&7==_&&u.add(b[1],b[2],b[3],b[4],b[5],b[6]),h.dirtyT=1,t.matrix=u}t.matrix=u,h.sx=o,h.sy=l,h.deg=s,h.dx=i=u.e,h.dy=n=u.f,1==o&&1==l&&!s&&h.bbox?(h.bbox.x+=+i,h.bbox.y+=+n):h.dirtyT=1}),Nt=function(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}},Lt=e._equaliseTransform=function(t,r){r=x(r).replace(/\.{3}|\u2026/g,t),t=e.parseTransformString(t)||[],r=e.parseTransformString(r)||[];for(var i,n,a,s,o=w(t.length,r.length),l=[],h=[],u=0;u<o;u++){if(a=t[u]||Nt(r[u]),s=r[u]||Nt(a),a[0]!=s[0]||"r"==a[0].toLowerCase()&&(a[2]!=s[2]||a[3]!=s[3])||"s"==a[0].toLowerCase()&&(a[3]!=s[3]||a[4]!=s[4]))return;for(l[u]=[],h[u]=[],i=0,n=w(a.length,s.length);i<n;i++)i in a&&(l[u][i]=a[i]),i in s&&(h[u][i]=s[i])}return{from:l,to:h}};function Pt(t,e,r,i,n,a){null!=t?(this.a=+t,this.b=+e,this.c=+r,this.d=+i,this.e=+n,this.f=+a):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}e._getContainer=function(t,r,i,n){var a;if(null!=(a=null!=n||e.is(t,"object")?t:l.doc.getElementById(t)))return a.tagName?null==r?{container:a,width:a.style.pixelWidth||a.offsetWidth,height:a.style.pixelHeight||a.offsetHeight}:{container:a,width:r,height:i}:{container:1,x:t,y:r,width:i,height:n}},e.pathToRelative=bt,e._engine={},e.path2curve=Tt,e.matrix=function(t,e,r,i,n,a){return new Pt(t,e,r,i,n,a)},function(t){function r(t){return t[0]*t[0]+t[1]*t[1]}function i(t){var e=_.sqrt(r(t));t[0]&&(t[0]/=e),t[1]&&(t[1]/=e)}t.add=function(t,e,r,i,n,a){var s,o,l,h,u=[[],[],[]],c=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],f=[[t,r,n],[e,i,a],[0,0,1]];for(t&&t instanceof Pt&&(f=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),s=0;s<3;s++)for(o=0;o<3;o++){for(h=0,l=0;l<3;l++)h+=c[s][l]*f[l][o];u[s][o]=h}this.a=u[0][0],this.b=u[1][0],this.c=u[0][1],this.d=u[1][1],this.e=u[0][2],this.f=u[1][2]},t.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new Pt(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},t.clone=function(){return new Pt(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(t,e){this.add(1,0,0,1,t,e)},t.scale=function(t,e,r,i){null==e&&(e=t),(r||i)&&this.add(1,0,0,1,r,i),this.add(t,0,0,e,0,0),(r||i)&&this.add(1,0,0,1,-r,-i)},t.rotate=function(t,r,i){t=e.rad(t),r=r||0,i=i||0;var n=+_.cos(t).toFixed(9),a=+_.sin(t).toFixed(9);this.add(n,a,-a,n,r,i),this.add(1,0,0,1,-r,-i)},t.x=function(t,e){return t*this.a+e*this.c+this.e},t.y=function(t,e){return t*this.b+e*this.d+this.f},t.get=function(t){return+this[x.fromCharCode(97+t)].toFixed(4)},t.toString=function(){return e.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},t.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var n=[[this.a,this.c],[this.b,this.d]];t.scalex=_.sqrt(r(n[0])),i(n[0]),t.shear=n[0][0]*n[1][0]+n[0][1]*n[1][1],n[1]=[n[1][0]-n[0][0]*t.shear,n[1][1]-n[0][1]*t.shear],t.scaley=_.sqrt(r(n[1])),i(n[1]),t.shear/=t.scaley;var a=-n[0][1],s=n[1][1];return s<0?(t.rotate=e.deg(_.acos(s)),a<0&&(t.rotate=360-t.rotate)):t.rotate=e.deg(_.asin(a)),t.isSimple=!(+t.shear.toFixed(9)||t.scalex.toFixed(9)!=t.scaley.toFixed(9)&&t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(t){var e=t||this[v]();return e.isSimple?(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[e.dx,e.dy]:d)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:d)+(e.rotate?"r"+[e.rotate,0,0]:d)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(Pt.prototype);for(var zt=function(){this.returnValue=!1},Ft=function(){return this.originalEvent.preventDefault()},Rt=function(){this.cancelBubble=!0},jt=function(){return this.originalEvent.stopPropagation()},It=function(t){var e=l.doc.documentElement.scrollTop||l.doc.body.scrollTop,r=l.doc.documentElement.scrollLeft||l.doc.body.scrollLeft;return{x:t.clientX+r,y:t.clientY+e}},Dt=l.doc.addEventListener?function(t,e,r,i){var n=function(t){var e=It(t);return r.call(i,t,e.x,e.y)};if(t.addEventListener(e,n,!1),p&&m[e]){var a=function(e){for(var n=It(e),a=e,s=0,o=e.targetTouches&&e.targetTouches.length;s<o;s++)if(e.targetTouches[s].target==t){(e=e.targetTouches[s]).originalEvent=a,e.preventDefault=Ft,e.stopPropagation=jt;break}return r.call(i,e,n.x,n.y)};t.addEventListener(m[e],a,!1)}return function(){return t.removeEventListener(e,n,!1),p&&m[e]&&t.removeEventListener(m[e],a,!1),!0}}:l.doc.attachEvent?function(t,e,r,i){var n=function(t){t=t||l.win.event;var e=l.doc.documentElement.scrollTop||l.doc.body.scrollTop,n=l.doc.documentElement.scrollLeft||l.doc.body.scrollLeft,a=t.clientX+n,s=t.clientY+e;return t.preventDefault=t.preventDefault||zt,t.stopPropagation=t.stopPropagation||Rt,r.call(i,t,a,s)};return t.attachEvent("on"+e,n),function(){return t.detachEvent("on"+e,n),!0}}:void 0,qt=[],Ot=function(e){for(var r,i=e.clientX,n=e.clientY,a=l.doc.documentElement.scrollTop||l.doc.body.scrollTop,s=l.doc.documentElement.scrollLeft||l.doc.body.scrollLeft,o=qt.length;o--;){if(r=qt[o],p&&e.touches){for(var h,u=e.touches.length;u--;)if((h=e.touches[u]).identifier==r.el._drag.id){i=h.clientX,n=h.clientY,(e.originalEvent?e.originalEvent:e).preventDefault();break}}else e.preventDefault();var c,f=r.el.node,d=f.nextSibling,g=f.parentNode,x=f.style.display;l.win.opera&&g.removeChild(f),f.style.display="none",c=r.el.paper.getElementByPoint(i,n),f.style.display=x,l.win.opera&&(d?g.insertBefore(f,d):g.appendChild(f)),c&&t("raphael.drag.over."+r.el.id,r.el,c),i+=s,n+=a,t("raphael.drag.move."+r.el.id,r.move_scope||r.el,i-r.el._drag.x,n-r.el._drag.y,i,n,e)}},Vt=function(r){e.unmousemove(Ot).unmouseup(Vt);for(var i,n=qt.length;n--;)(i=qt[n]).el._drag={},t("raphael.drag.end."+i.el.id,i.end_scope||i.start_scope||i.move_scope||i.el,r);qt=[]},Wt=e.el={},Yt=y.length;Yt--;)!function(t){e[t]=Wt[t]=function(r,i){return e.is(r,"function")&&(this.events=this.events||[],this.events.push({name:t,f:r,unbind:Dt(this.shape||this.node||l.doc,t,r,i||this)})),this},e["un"+t]=Wt["un"+t]=function(r){for(var i=this.events||[],n=i.length;n--;)i[n].name!=t||!e.is(r,"undefined")&&i[n].f!=r||(i[n].unbind(),i.splice(n,1),!i.length&&delete this.events);return this}}(y[Yt]);Wt.data=function(r,i){var n=G[this.id]=G[this.id]||{};if(0==arguments.length)return n;if(1==arguments.length){if(e.is(r,"object")){for(var a in r)r[o](a)&&this.data(a,r[a]);return this}return t("raphael.data.get."+this.id,this,n[r],r),n[r]}return n[r]=i,t("raphael.data.set."+this.id,this,i,r),this},Wt.removeData=function(t){return null==t?delete G[this.id]:G[this.id]&&delete G[this.id][t],this},Wt.getData=function(){return tt(G[this.id]||{})},Wt.hover=function(t,e,r,i){return this.mouseover(t,r).mouseout(e,i||r)},Wt.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var Gt=[];Wt.drag=function(r,i,n,a,s,o){function h(h){(h.originalEvent||h).preventDefault();var u=h.clientX,c=h.clientY,f=l.doc.documentElement.scrollTop||l.doc.body.scrollTop,d=l.doc.documentElement.scrollLeft||l.doc.body.scrollLeft;if(this._drag.id=h.identifier,p&&h.touches)for(var g,x=h.touches.length;x--;)if(g=h.touches[x],this._drag.id=g.identifier,g.identifier==this._drag.id){u=g.clientX,c=g.clientY;break}this._drag.x=u+d,this._drag.y=c+f,!qt.length&&e.mousemove(Ot).mouseup(Vt),qt.push({el:this,move_scope:a,start_scope:s,end_scope:o}),i&&t.on("raphael.drag.start."+this.id,i),r&&t.on("raphael.drag.move."+this.id,r),n&&t.on("raphael.drag.end."+this.id,n),t("raphael.drag.start."+this.id,s||a||this,this._drag.x,this._drag.y,h)}return this._drag={},Gt.push({el:this,start:h}),this.mousedown(h),this},Wt.onDragOver=function(e){e?t.on("raphael.drag.over."+this.id,e):t.unbind("raphael.drag.over."+this.id)},Wt.undrag=function(){for(var r=Gt.length;r--;)Gt[r].el==this&&(this.unmousedown(Gt[r].start),Gt.splice(r,1),t.unbind("raphael.drag.*."+this.id));!Gt.length&&e.unmousemove(Ot).unmouseup(Vt),qt=[]},i.circle=function(t,r,i){var n=e._engine.circle(this,t||0,r||0,i||0);return this.__set__&&this.__set__.push(n),n},i.rect=function(t,r,i,n,a){var s=e._engine.rect(this,t||0,r||0,i||0,n||0,a||0);return this.__set__&&this.__set__.push(s),s},i.ellipse=function(t,r,i,n){var a=e._engine.ellipse(this,t||0,r||0,i||0,n||0);return this.__set__&&this.__set__.push(a),a},i.path=function(t){t&&!e.is(t,"string")&&!e.is(t[0],A)&&(t+=d);var r=e._engine.path(e.format[c](e,arguments),this);return this.__set__&&this.__set__.push(r),r},i.image=function(t,r,i,n,a){var s=e._engine.image(this,t||"about:blank",r||0,i||0,n||0,a||0);return this.__set__&&this.__set__.push(s),s},i.text=function(t,r,i){var n=e._engine.text(this,t||0,r||0,x(i));return this.__set__&&this.__set__.push(n),n},i.set=function(t){!e.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var r=new ce(t);return this.__set__&&this.__set__.push(r),r.paper=this,r.type="set",r},i.setStart=function(t){this.__set__=t||this.set()},i.setFinish=function(t){var e=this.__set__;return delete this.__set__,e},i.getSize=function(){var t=this.canvas.parentNode;return{width:t.offsetWidth,height:t.offsetHeight}},i.setSize=function(t,r){return e._engine.setSize.call(this,t,r)},i.setViewBox=function(t,r,i,n,a){return e._engine.setViewBox.call(this,t,r,i,n,a)},i.top=i.bottom=null,i.raphael=e;function Ht(){return this.x+g+this.y+g+this.width+" × "+this.height}i.getElementByPoint=function(t,e){var r,i,n,a,s,o,h,u=this.canvas,c=l.doc.elementFromPoint(t,e);if(l.win.opera&&"svg"==c.tagName){var f=(i=(r=u).getBoundingClientRect(),n=r.ownerDocument,a=n.body,s=n.documentElement,o=s.clientTop||a.clientTop||0,h=s.clientLeft||a.clientLeft||0,{y:i.top+(l.win.pageYOffset||s.scrollTop||a.scrollTop)-o,x:i.left+(l.win.pageXOffset||s.scrollLeft||a.scrollLeft)-h}),p=u.createSVGRect();p.x=t-f.x,p.y=e-f.y,p.width=p.height=1;var d=u.getIntersectionList(p,null);d.length&&(c=d[d.length-1])}if(!c)return null;for(;c.parentNode&&c!=u.parentNode&&!c.raphael;)c=c.parentNode;return c==this.canvas.parentNode&&(c=u),c=c&&c.raphael?this.getById(c.raphaelid):null},i.getElementsByBBox=function(t){var r=this.set();return this.forEach(function(i){e.isBBoxIntersect(i.getBBox(),t)&&r.push(i)}),r},i.getById=function(t){for(var e=this.bottom;e;){if(e.id==t)return e;e=e.next}return null},i.forEach=function(t,e){for(var r=this.bottom;r;){if(!1===t.call(e,r))return this;r=r.next}return this},i.getElementsByPoint=function(t,e){var r=this.set();return this.forEach(function(i){i.isPointInside(t,e)&&r.push(i)}),r},Wt.isPointInside=function(t,r){var i=this.realPath=Z[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(i=e.transformPath(i,this.attr("transform"))),e.isPointInsidePath(i,t,r)},Wt.getBBox=function(t){if(this.removed)return{};var e=this._;return t?(!e.dirty&&e.bboxwt||(this.realPath=Z[this.type](this),e.bboxwt=yt(this.realPath),e.bboxwt.toString=Ht,e.dirty=0),e.bboxwt):((e.dirty||e.dirtyT||!e.bbox)&&(!e.dirty&&this.realPath||(e.bboxwt=0,this.realPath=Z[this.type](this)),e.bbox=yt(Q(this.realPath,this.matrix)),e.bbox.toString=Ht,e.dirty=e.dirtyT=0),e.bbox)},Wt.clone=function(){if(this.removed)return null;var t=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(t),t},Wt.glow=function(t){if("text"==this.type)return null;var e={width:((t=t||{}).width||10)+(+this.attr("stroke-width")||1),fill:t.fill||!1,opacity:null==t.opacity?.5:t.opacity,offsetx:t.offsetx||0,offsety:t.offsety||0,color:t.color||"#000"},r=e.width/2,i=this.paper,n=i.set(),a=this.realPath||Z[this.type](this);a=this.matrix?Q(a,this.matrix):a;for(var s=1;s<r+1;s++)n.push(i.path(a).attr({stroke:e.color,fill:e.fill?e.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/r*s).toFixed(3),opacity:+(e.opacity/r).toFixed(3)}));return n.insertBefore(this).translate(e.offsetx,e.offsety)};var Xt=function(t,r,i,n,a,s,o,l,h){return null==h?dt(t,r,i,n,a,s,o,l):e.findDotsAtSegment(t,r,i,n,a,s,o,l,function(t,e,r,i,n,a,s,o,l){if(!(l<0||dt(t,e,r,i,n,a,s,o)<l)){var h,u=.5,c=1-u;for(h=dt(t,e,r,i,n,a,s,o,c);B(h-l)>.01;)h=dt(t,e,r,i,n,a,s,o,c+=(h<l?1:-1)*(u/=2));return c}}(t,r,i,n,a,s,o,l,h))},Ut=function(t,r){return function(i,n,a){for(var s,o,l,h,u,c="",f={},p=0,d=0,g=(i=Tt(i)).length;d<g;d++){if("M"==(l=i[d])[0])s=+l[1],o=+l[2];else{if(p+(h=Xt(s,o,l[1],l[2],l[3],l[4],l[5],l[6]))>n){if(r&&!f.start){if(c+=["C"+(u=Xt(s,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p)).start.x,u.start.y,u.m.x,u.m.y,u.x,u.y],a)return c;f.start=c,c=["M"+u.x,u.y+"C"+u.n.x,u.n.y,u.end.x,u.end.y,l[5],l[6]].join(),p+=h,s=+l[5],o=+l[6];continue}if(!t&&!r)return{x:(u=Xt(s,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p)).x,y:u.y,alpha:u.alpha}}p+=h,s=+l[5],o=+l[6]}c+=l.shift()+l}return f.end=c,(u=t?p:r?f:e.findDotsAtSegment(s,o,l[0],l[1],l[2],l[3],l[4],l[5],1)).alpha&&(u={x:u.x,y:u.y,alpha:u.alpha}),u}},$t=Ut(1),Zt=Ut(),Qt=Ut(0,1);e.getTotalLength=$t,e.getPointAtLength=Zt,e.getSubpath=function(t,e,r){if(this.getTotalLength(t)-r<1e-6)return Qt(t,e).end;var i=Qt(t,r,1);return e?Qt(i,e).end:i},Wt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():$t(t)},Wt.getPointAtLength=function(t){var e=this.getPath();if(e)return Zt(e,t)},Wt.getPath=function(){var t,r=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return r&&(t=r(this)),t},Wt.getSubpath=function(t,r){var i=this.getPath();if(i)return e.getSubpath(i,t,r)};var Jt=e.easing_formulas={linear:function(t){return t},"<":function(t){return C(t,1.7)},">":function(t){return C(t,.48)},"<>":function(t){var e=.48-t/1.04,r=_.sqrt(.1734+e*e),i=r-e,n=-r-e,a=C(B(i),1/3)*(i<0?-1:1)+C(B(n),1/3)*(n<0?-1:1)+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:C(2,-10*t)*_.sin(2*S*(t-.075)/.3)+1},bounce:function(t){var e=7.5625,r=2.75;return t<1/r?e*t*t:t<2/r?e*(t-=1.5/r)*t+.75:t<2.5/r?e*(t-=2.25/r)*t+.9375:e*(t-=2.625/r)*t+.984375}};Jt.easeIn=Jt["ease-in"]=Jt["<"],Jt.easeOut=Jt["ease-out"]=Jt[">"],Jt.easeInOut=Jt["ease-in-out"]=Jt["<>"],Jt["back-in"]=Jt.backIn,Jt["back-out"]=Jt.backOut;var Kt=[],te=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ee=function(){for(var r=+new Date,i=0;i<Kt.length;i++){var n=Kt[i];if(!n.el.removed&&!n.paused){var a,s,l=r-n.start,h=n.ms,u=n.easing,c=n.from,p=n.diff,d=n.to,x=(n.t,n.el),v={},y={};if(n.initstatus?(l=(n.initstatus*n.anim.top-n.prev)/(n.percent-n.prev)*h,n.status=n.initstatus,delete n.initstatus,n.stop&&Kt.splice(i--,1)):n.status=(n.prev+(n.percent-n.prev)*(l/h))/n.anim.top,!(l<0))if(l<h){var m=u(l/h);for(var b in c)if(c[o](b)){switch(I[b]){case T:a=+c[b]+m*h*p[b];break;case"colour":a="rgb("+[re(P(c[b].r+m*h*p[b].r)),re(P(c[b].g+m*h*p[b].g)),re(P(c[b].b+m*h*p[b].b))].join(",")+")";break;case"path":a=[];for(var _=0,w=c[b].length;_<w;_++){a[_]=[c[b][_][0]];for(var k=1,B=c[b][_].length;k<B;k++)a[_][k]=+c[b][_][k]+m*h*p[b][_][k];a[_]=a[_].join(g)}a=a.join(g);break;case"transform":if(p[b].real)for(a=[],_=0,w=c[b].length;_<w;_++)for(a[_]=[c[b][_][0]],k=1,B=c[b][_].length;k<B;k++)a[_][k]=c[b][_][k]+m*h*p[b][_][k];else{var C=function(t){return+c[b][t]+m*h*p[b][t]};a=[["m",C(0),C(1),C(2),C(3),C(4),C(5)]]}break;case"csv":if("clip-rect"==b)for(a=[],_=4;_--;)a[_]=+c[b][_]+m*h*p[b][_];break;default:var S=[][f](c[b]);for(a=[],_=x.paper.customAttributes[b].length;_--;)a[_]=+S[_]+m*h*p[b][_]}v[b]=a}x.attr(v),function(e,r,i){setTimeout(function(){t("raphael.anim.frame."+e,r,i)})}(x.id,x,n.anim)}else{if(function(r,i,n){setTimeout(function(){t("raphael.anim.frame."+i.id,i,n),t("raphael.anim.finish."+i.id,i,n),e.is(r,"function")&&r.call(i)})}(n.callback,x,n.anim),x.attr(d),Kt.splice(i--,1),n.repeat>1&&!n.next){for(s in d)d[o](s)&&(y[s]=n.totalOrigin[s]);n.el.attr(y),ae(n.anim,n.el,n.anim.percents[0],null,n.totalOrigin,n.repeat-1)}n.next&&!n.stop&&ae(n.anim,n.el,n.next,null,n.totalOrigin,n.repeat)}}}Kt.length&&te(ee)},re=function(t){return t>255?255:t<0?0:t};function ie(t,e,r,i,n,a){var s=3*e,o=3*(i-e)-s,l=1-s-o,h=3*r,u=3*(n-r)-h,c=1-h-u;function f(t){return((l*t+o)*t+s)*t}return function(t,e){var r=function(t,e){var r,i,n,a,h,u;for(n=t,u=0;u<8;u++){if(a=f(n)-t,B(a)<e)return n;if(B(h=(3*l*n+2*o)*n+s)<1e-6)break;n-=a/h}if(i=1,(n=t)<(r=0))return r;if(n>i)return i;for(;r<i;){if(a=f(n),B(a-t)<e)return n;t>a?r=n:i=n,n=(i-r)/2+r}return n}(t,e);return((c*r+u)*r+h)*r}(t,1/(200*a))}function ne(t,e){var r=[],i={};if(this.ms=e,this.times=1,t){for(var n in t)t[o](n)&&(i[z(n)]=t[n],r.push(z(n)));r.sort(H)}this.anim=i,this.top=r[r.length-1],this.percents=r}function ae(r,i,a,s,l,h){a=z(a);var u,c,p,d,g,y,m=r.ms,b={},_={},w={};if(s)for(B=0,C=Kt.length;B<C;B++){var k=Kt[B];if(k.el.id==i.id&&k.anim==r){k.percent!=a?(Kt.splice(B,1),p=1):c=k,i.attr(k.totalOrigin);break}}else s=+_;for(var B=0,C=r.percents.length;B<C;B++){if(r.percents[B]==a||r.percents[B]>s*r.top){a=r.percents[B],g=r.percents[B-1]||0,m=m/r.top*(a-g),d=r.percents[B+1],u=r.anim[a];break}s&&i.attr(r.anim[r.percents[B]])}if(u){if(c)c.initstatus=s,c.start=new Date-c.ms*s;else{for(var S in u)if(u[o](S)&&(I[o](S)||i.paper.customAttributes[o](S)))switch(b[S]=i.attr(S),null==b[S]&&(b[S]=j[S]),_[S]=u[S],I[S]){case T:w[S]=(_[S]-b[S])/m;break;case"colour":b[S]=e.getRGB(b[S]);var A=e.getRGB(_[S]);w[S]={r:(A.r-b[S].r)/m,g:(A.g-b[S].g)/m,b:(A.b-b[S].b)/m};break;case"path":var M=Tt(b[S],_[S]),E=M[1];for(b[S]=M[0],w[S]=[],B=0,C=b[S].length;B<C;B++){w[S][B]=[0];for(var N=1,P=b[S][B].length;N<P;N++)w[S][B][N]=(E[B][N]-b[S][B][N])/m}break;case"transform":var F=i._,R=Lt(F[S],_[S]);if(R)for(b[S]=R.from,_[S]=R.to,w[S]=[],w[S].real=!0,B=0,C=b[S].length;B<C;B++)for(w[S][B]=[b[S][B][0]],N=1,P=b[S][B].length;N<P;N++)w[S][B][N]=(_[S][B][N]-b[S][B][N])/m;else{var D=i.matrix||new Pt,q={_:{transform:F.transform},getBBox:function(){return i.getBBox(1)}};b[S]=[D.a,D.b,D.c,D.d,D.e,D.f],Et(q,_[S]),_[S]=q._.transform,w[S]=[(q.matrix.a-D.a)/m,(q.matrix.b-D.b)/m,(q.matrix.c-D.c)/m,(q.matrix.d-D.d)/m,(q.matrix.e-D.e)/m,(q.matrix.f-D.f)/m]}break;case"csv":var O=x(u[S])[v](n),V=x(b[S])[v](n);if("clip-rect"==S)for(b[S]=V,w[S]=[],B=V.length;B--;)w[S][B]=(O[B]-b[S][B])/m;_[S]=O;break;default:for(O=[][f](u[S]),V=[][f](b[S]),w[S]=[],B=i.paper.customAttributes[S].length;B--;)w[S][B]=((O[B]||0)-(V[B]||0))/m}var W=u.easing,Y=e.easing_formulas[W];if(!Y)if((Y=x(W).match(L))&&5==Y.length){var G=Y;Y=function(t){return ie(t,+G[1],+G[2],+G[3],+G[4],m)}}else Y=X;if(k={anim:r,percent:a,timestamp:y=u.start||r.start||+new Date,start:y+(r.del||0),status:0,initstatus:s||0,stop:!1,ms:m,easing:Y,from:b,diff:w,to:_,el:i,callback:u.callback,prev:g,next:d,repeat:h||r.times,origin:i.attr(),totalOrigin:l},Kt.push(k),s&&!c&&!p&&(k.stop=!0,k.start=new Date-m*s,1==Kt.length))return ee();p&&(k.start=new Date-k.ms*s),1==Kt.length&&te(ee)}t("raphael.anim.start."+i.id,i,r)}}function se(t){for(var e=0;e<Kt.length;e++)Kt[e].el.paper==t&&Kt.splice(e--,1)}Wt.animateWith=function(t,r,i,n,a,s){if(this.removed)return s&&s.call(this),this;var o=i instanceof ne?i:e.animation(i,n,a,s);ae(o,this,o.percents[0],null,this.attr());for(var l=0,h=Kt.length;l<h;l++)if(Kt[l].anim==r&&Kt[l].el==t){Kt[h-1].start=Kt[l].start;break}return this},Wt.onAnimation=function(e){return e?t.on("raphael.anim.frame."+this.id,e):t.unbind("raphael.anim.frame."+this.id),this},ne.prototype.delay=function(t){var e=new ne(this.anim,this.ms);return e.times=this.times,e.del=+t||0,e},ne.prototype.repeat=function(t){var e=new ne(this.anim,this.ms);return e.del=this.del,e.times=_.floor(w(t,0))||1,e},e.animation=function(t,r,i,n){if(t instanceof ne)return t;!e.is(i,"function")&&i||(n=n||i||null,i=null),t=Object(t),r=+r||0;var a,s,l={};for(s in t)t[o](s)&&z(s)!=s&&z(s)+"%"!=s&&(a=!0,l[s]=t[s]);if(a)return i&&(l.easing=i),n&&(l.callback=n),new ne({100:l},r);if(n){var h=0;for(var u in t){var c=F(u);t[o](u)&&c>h&&(h=c)}!t[h+="%"].callback&&(t[h].callback=n)}return new ne(t,r)},Wt.animate=function(t,r,i,n){if(this.removed)return n&&n.call(this),this;var a=t instanceof ne?t:e.animation(t,r,i,n);return ae(a,this,a.percents[0],null,this.attr()),this},Wt.setTime=function(t,e){return t&&null!=e&&this.status(t,k(e,t.ms)/t.ms),this},Wt.status=function(t,e){var r,i,n=[],a=0;if(null!=e)return ae(t,this,-1,k(e,1)),this;for(r=Kt.length;a<r;a++)if((i=Kt[a]).el.id==this.id&&(!t||i.anim==t)){if(t)return i.status;n.push({anim:i.anim,status:i.status})}return t?0:n},Wt.pause=function(e){for(var r=0;r<Kt.length;r++)Kt[r].el.id!=this.id||e&&Kt[r].anim!=e||!1!==t("raphael.anim.pause."+this.id,this,Kt[r].anim)&&(Kt[r].paused=!0);return this},Wt.resume=function(e){for(var r=0;r<Kt.length;r++)if(Kt[r].el.id==this.id&&(!e||Kt[r].anim==e)){var i=Kt[r];!1!==t("raphael.anim.resume."+this.id,this,i.anim)&&(delete i.paused,this.status(i.anim,i.status))}return this},Wt.stop=function(e){for(var r=0;r<Kt.length;r++)Kt[r].el.id!=this.id||e&&Kt[r].anim!=e||!1!==t("raphael.anim.stop."+this.id,this,Kt[r].anim)&&Kt.splice(r--,1);return this},t.on("raphael.remove",se),t.on("raphael.clear",se),Wt.toString=function(){return"Raphaël’s object"};var oe,le,he,ue,ce=function(t){if(this.items=[],this.length=0,this.type="set",t)for(var e=0,r=t.length;e<r;e++)!t[e]||t[e].constructor!=Wt.constructor&&t[e].constructor!=ce||(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},fe=ce.prototype;for(var pe in fe.push=function(){for(var t,e,r=0,i=arguments.length;r<i;r++)!(t=arguments[r])||t.constructor!=Wt.constructor&&t.constructor!=ce||(this[e=this.items.length]=this.items[e]=t,this.length++);return this},fe.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},fe.forEach=function(t,e){for(var r=0,i=this.items.length;r<i;r++)if(!1===t.call(e,this.items[r],r))return this;return this},Wt)Wt[o](pe)&&(fe[pe]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t][c](r,e)})}}(pe));return fe.attr=function(t,r){if(t&&e.is(t,A)&&e.is(t[0],"object"))for(var i=0,n=t.length;i<n;i++)this.items[i].attr(t[i]);else for(var a=0,s=this.items.length;a<s;a++)this.items[a].attr(t,r);return this},fe.clear=function(){for(;this.length;)this.pop()},fe.splice=function(t,e,r){t=t<0?w(this.length+t,0):t,e=w(0,k(this.length-t,e));var i,n=[],a=[],s=[];for(i=2;i<arguments.length;i++)s.push(arguments[i]);for(i=0;i<e;i++)a.push(this[t+i]);for(;i<this.length-t;i++)n.push(this[t+i]);var o=s.length;for(i=0;i<o+n.length;i++)this.items[t+i]=this[t+i]=i<o?s[i]:n[i-o];for(i=this.items.length=this.length-=e-o;this[i];)delete this[i++];return new ce(a)},fe.exclude=function(t){for(var e=0,r=this.length;e<r;e++)if(this[e]==t)return this.splice(e,1),!0},fe.animate=function(t,r,i,n){(e.is(i,"function")||!i)&&(n=i||null);var a,s,o=this.items.length,l=o,h=this;if(!o)return this;n&&(s=function(){!--o&&n.call(h)}),i=e.is(i,"string")?i:s;var u=e.animation(t,r,i,s);for(a=this.items[--l].animate(u);l--;)this.items[l]&&!this.items[l].removed&&this.items[l].animateWith(a,u,u),this.items[l]&&!this.items[l].removed||o--;return this},fe.insertAfter=function(t){for(var e=this.items.length;e--;)this.items[e].insertAfter(t);return this},fe.getBBox=function(){for(var t=[],e=[],r=[],i=[],n=this.items.length;n--;)if(!this.items[n].removed){var a=this.items[n].getBBox();t.push(a.x),e.push(a.y),r.push(a.x+a.width),i.push(a.y+a.height)}return{x:t=k[c](0,t),y:e=k[c](0,e),x2:r=w[c](0,r),y2:i=w[c](0,i),width:r-t,height:i-e}},fe.clone=function(t){t=this.paper.set();for(var e=0,r=this.items.length;e<r;e++)t.push(this.items[e].clone());return t},fe.toString=function(){return"Raphaël‘s set"},fe.glow=function(t){var e=this.paper.set();return this.forEach(function(r,i){var n=r.glow(t);null!=n&&n.forEach(function(t,r){e.push(t)})}),e},fe.isPointInside=function(t,e){var r=!1;return this.forEach(function(i){if(i.isPointInside(t,e))return r=!0,!1}),r},e.registerFont=function(t){if(!t.face)return t;this.fonts=this.fonts||{};var e={w:t.w,face:{},glyphs:{}},r=t.face["font-family"];for(var i in t.face)t.face[o](i)&&(e.face[i]=t.face[i]);if(this.fonts[r]?this.fonts[r].push(e):this.fonts[r]=[e],!t.svg)for(var n in e.face["units-per-em"]=F(t.face["units-per-em"],10),t.glyphs)if(t.glyphs[o](n)){var a=t.glyphs[n];if(e.glyphs[n]={w:a.w,k:{},d:a.d&&"M"+a.d.replace(/[mlcxtrv]/g,function(t){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[t]||"M"})+"z"},a.k)for(var s in a.k)a[o](s)&&(e.glyphs[n].k[s]=a.k[s])}return t},i.getFont=function(t,r,i,n){if(n=n||"normal",i=i||"normal",r=+r||{normal:400,bold:700,lighter:300,bolder:800}[r]||400,e.fonts){var a,s=e.fonts[t];if(!s){var l=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,d)+"(\\s|$)","i");for(var h in e.fonts)if(e.fonts[o](h)&&l.test(h)){s=e.fonts[h];break}}if(s)for(var u=0,c=s.length;u<c&&((a=s[u]).face["font-weight"]!=r||a.face["font-style"]!=i&&a.face["font-style"]||a.face["font-stretch"]!=n);u++);return a}},i.print=function(t,r,i,a,s,o,l,h){o=o||"middle",l=w(k(l||0,1),-1),h=w(k(h||1,3),1);var u,c=x(i)[v](d),f=0,p=0,g=d;if(e.is(a,"string")&&(a=this.getFont(a)),a){u=(s||16)/a.face["units-per-em"];for(var y=a.face.bbox[v](n),m=+y[0],b=y[3]-y[1],_=0,B=+y[1]+("baseline"==o?b+ +a.face.descent:b/2),C=0,S=c.length;C<S;C++){if("\n"==c[C])f=0,A=0,p=0,_+=b*h;else{var T=p&&a.glyphs[c[C-1]]||{},A=a.glyphs[c[C]];f+=p?(T.w||a.w)+(T.k&&T.k[c[C]]||0)+a.w*l:0,p=1}A&&A.d&&(g+=e.transformPath(A.d,["t",f*u,_*u,"s",u,u,m,B,"t",(t-m)/u,(r-B)/u]))}}return this.path(g).attr({fill:"#000",stroke:"none"})},i.add=function(t){if(e.is(t,"array"))for(var r,i=this.set(),n=0,s=t.length;n<s;n++)r=t[n]||{},a[o](r.type)&&i.push(this[r.type]().attr(r));return i},e.format=function(t,r){var i=e.is(r,A)?[0][f](r):arguments;return t&&e.is(t,"string")&&i.length-1&&(t=t.replace(s,function(t,e){return null==i[++e]?d:i[e]})),t||d},e.fullfill=(oe=/\{([^\}]+)\}/g,le=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,function(t,e){return String(t).replace(oe,function(t,r){return function(t,e,r){var i=r;return e.replace(le,function(t,e,r,n,a){e=e||n,i&&(e in i&&(i=i[e]),"function"==typeof i&&a&&(i=i()))}),i=(null==i||i==r?t:i)+""}(t,r,e)})}),e.ninja=function(){if(h.was)l.win.Raphael=h.is;else{window.Raphael=void 0;try{delete window.Raphael}catch(t){}}return e},e.st=fe,t.on("raphael.DOMload",function(){r=!0}),null==(he=document).readyState&&he.addEventListener&&(he.addEventListener("DOMContentLoaded",ue=function(){he.removeEventListener("DOMContentLoaded",ue,!1),he.readyState="complete"},!1),he.readyState="loading"),function t(){/in/.test(he.readyState)?setTimeout(t,9):e.eve("raphael.DOMload")}(),e}.apply(e,i))||(t.exports=n)},function(t,e,r){var i,n;i=[r(0),r(3),r(4)],void 0===(n=function(t){return t}.apply(e,i))||(t.exports=n)},function(t,e,r){var i,n,a,s,o,l,h,u,c,f,p,d,g,x;s="hasOwnProperty",o=/[\.\/]/,l=/\s*,\s*/,h=function(t,e){return t-e},u={n:{}},c=function(){for(var t=0,e=this.length;t<e;t++)if(void 0!==this[t])return this[t]},f=function(){for(var t=this.length;--t;)if(void 0!==this[t])return this[t]},p=Object.prototype.toString,d=String,g=Array.isArray||function(t){return t instanceof Array||"[object Array]"==p.call(t)},(x=function(t,e){var r,i=a,s=Array.prototype.slice.call(arguments,2),o=x.listeners(t),l=0,u=[],p={},d=[],g=n;d.firstDefined=c,d.lastDefined=f,n=t,a=0;for(var v=0,y=o.length;v<y;v++)"zIndex"in o[v]&&(u.push(o[v].zIndex),o[v].zIndex<0&&(p[o[v].zIndex]=o[v]));for(u.sort(h);u[l]<0;)if(r=p[u[l++]],d.push(r.apply(e,s)),a)return a=i,d;for(v=0;v<y;v++)if("zIndex"in(r=o[v]))if(r.zIndex==u[l]){if(d.push(r.apply(e,s)),a)break;do{if((r=p[u[++l]])&&d.push(r.apply(e,s)),a)break}while(r)}else p[r.zIndex]=r;else if(d.push(r.apply(e,s)),a)break;return a=i,n=g,d})._events=u,x.listeners=function(t){var e,r,i,n,a,s,l,h,c=g(t)?t:t.split(o),f=u,p=[f],d=[];for(n=0,a=c.length;n<a;n++){for(h=[],s=0,l=p.length;s<l;s++)for(r=[(f=p[s].n)[c[n]],f["*"]],i=2;i--;)(e=r[i])&&(h.push(e),d=d.concat(e.f||[]));p=h}return d},x.separator=function(t){t?(t="["+(t=d(t).replace(/(?=[\.\^\]\[\-])/g,"\\"))+"]",o=new RegExp(t)):o=/[\.\/]/},x.on=function(t,e){if("function"!=typeof e)return function(){};for(var r=g(t)?g(t[0])?t:[t]:d(t).split(l),i=0,n=r.length;i<n;i++)!function(t){for(var r,i=g(t)?t:d(t).split(o),n=u,a=0,s=i.length;a<s;a++)n=(n=n.n).hasOwnProperty(i[a])&&n[i[a]]||(n[i[a]]={n:{}});for(n.f=n.f||[],a=0,s=n.f.length;a<s;a++)if(n.f[a]==e){r=!0;break}!r&&n.f.push(e)}(r[i]);return function(t){+t==+t&&(e.zIndex=+t)}},x.f=function(t){var e=[].slice.call(arguments,1);return function(){x.apply(null,[t,null].concat(e).concat([].slice.call(arguments,0)))}},x.stop=function(){a=1},x.nt=function(t){var e=g(n)?n.join("."):n;return t?new RegExp("(?:\\.|\\/|^)"+t+"(?:\\.|\\/|$)").test(e):e},x.nts=function(){return g(n)?n:n.split(o)},x.off=x.unbind=function(t,e){if(t){var r=g(t)?g(t[0])?t:[t]:d(t).split(l);if(r.length>1)for(var i=0,n=r.length;i<n;i++)x.off(r[i],e);else{r=g(t)?t:d(t).split(o);var a,h,c,f,p,v=[u];for(i=0,n=r.length;i<n;i++)for(f=0;f<v.length;f+=c.length-2){if(c=[f,1],a=v[f].n,"*"!=r[i])a[r[i]]&&c.push(a[r[i]]);else for(h in a)a[s](h)&&c.push(a[h]);v.splice.apply(v,c)}for(i=0,n=v.length;i<n;i++)for(a=v[i];a.n;){if(e){if(a.f){for(f=0,p=a.f.length;f<p;f++)if(a.f[f]==e){a.f.splice(f,1);break}!a.f.length&&delete a.f}for(h in a.n)if(a.n[s](h)&&a.n[h].f){var y=a.n[h].f;for(f=0,p=y.length;f<p;f++)if(y[f]==e){y.splice(f,1);break}!y.length&&delete a.n[h].f}}else for(h in delete a.f,a.n)a.n[s](h)&&a.n[h].f&&delete a.n[h].f;a=a.n}}}else x._events=u={n:{}}},x.once=function(t,e){var r=function(){return x.off(t,r),e.apply(this,arguments)};return x.on(t,r)},x.version="0.5.0",x.toString=function(){return"You are running Eve 0.5.0"},t.exports?t.exports=x:void 0===(i=function(){return x}.apply(e,[]))||(t.exports=i)},function(t,e,r){var i,n;i=[r(0)],void 0===(n=function(t){if(!t||t.svg){var e="hasOwnProperty",r=String,i=parseFloat,n=parseInt,a=Math,s=a.max,o=a.abs,l=a.pow,h=/[, ]+/,u=t.eve,c="",f=" ",p="http://www.w3.org/1999/xlink",d={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},g={};t.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var x=function(i,n){if(n)for(var a in"string"==typeof i&&(i=x(i)),n)n[e](a)&&("xlink:"==a.substring(0,6)?i.setAttributeNS(p,a.substring(6),r(n[a])):i.setAttribute(a,r(n[a])));else(i=t._g.doc.createElementNS("http://www.w3.org/2000/svg",i)).style&&(i.style.webkitTapHighlightColor="rgba(0,0,0,0)");return i},v=function(e,n){var h="linear",u=e.id+n,f=.5,p=.5,d=e.node,g=e.paper,v=d.style,m=t._g.doc.getElementById(u);if(!m){if(n=(n=r(n).replace(t._radial_gradient,function(t,e,r){if(h="radial",e&&r){f=i(e);var n=2*((p=i(r))>.5)-1;l(f-.5,2)+l(p-.5,2)>.25&&(p=a.sqrt(.25-l(f-.5,2))*n+.5)&&.5!=p&&(p=p.toFixed(5)-1e-5*n)}return c})).split(/\s*\-\s*/),"linear"==h){var b=n.shift();if(b=-i(b),isNaN(b))return null;var _=[0,0,a.cos(t.rad(b)),a.sin(t.rad(b))],w=1/(s(o(_[2]),o(_[3]))||1);_[2]*=w,_[3]*=w,_[2]<0&&(_[0]=-_[2],_[2]=0),_[3]<0&&(_[1]=-_[3],_[3]=0)}var k=t._parseDots(n);if(!k)return null;if(u=u.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&u!=e.gradient.id&&(g.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){m=x(h+"Gradient",{id:u}),e.gradient=m,x(m,"radial"==h?{fx:f,fy:p}:{x1:_[0],y1:_[1],x2:_[2],y2:_[3],gradientTransform:e.matrix.invert()}),g.defs.appendChild(m);for(var B=0,C=k.length;B<C;B++)m.appendChild(x("stop",{offset:k[B].offset?k[B].offset:B?"100%":"0%","stop-color":k[B].color||"#fff","stop-opacity":isFinite(k[B].opacity)?k[B].opacity:1}))}}return x(d,{fill:y(u),opacity:1,"fill-opacity":1}),v.fill=c,v.opacity=1,v.fillOpacity=1,1},y=function(t){if((e=document.documentMode)&&(9===e||10===e))return"url('#"+t+"')";var e,r=document.location;return"url('"+(r.protocol+"//"+r.host+r.pathname+r.search)+"#"+t+"')"},m=function(t){var e=t.getBBox(1);x(t.pattern,{patternTransform:t.matrix.invert()+" translate("+e.x+","+e.y+")"})},b=function(i,n,a){if("path"==i.type){for(var s,o,l,h,u,f=r(n).toLowerCase().split("-"),p=i.paper,v=a?"end":"start",y=i.node,m=i.attrs,b=m["stroke-width"],_=f.length,w="classic",k=3,B=3,C=5;_--;)switch(f[_]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":w=f[_];break;case"wide":B=5;break;case"narrow":B=2;break;case"long":k=5;break;case"short":k=2}if("open"==w?(k+=2,B+=2,C+=2,l=1,h=a?4:1,u={fill:"none",stroke:m.stroke}):(h=l=k/2,u={fill:m.stroke,stroke:"none"}),i._.arrows?a?(i._.arrows.endPath&&g[i._.arrows.endPath]--,i._.arrows.endMarker&&g[i._.arrows.endMarker]--):(i._.arrows.startPath&&g[i._.arrows.startPath]--,i._.arrows.startMarker&&g[i._.arrows.startMarker]--):i._.arrows={},"none"!=w){var S="raphael-marker-"+w,T="raphael-marker-"+v+w+k+B+"-obj"+i.id;t._g.doc.getElementById(S)?g[S]++:(p.defs.appendChild(x(x("path"),{"stroke-linecap":"round",d:d[w],id:S})),g[S]=1);var A,M=t._g.doc.getElementById(T);M?(g[T]++,A=M.getElementsByTagName("use")[0]):(M=x(x("marker"),{id:T,markerHeight:B,markerWidth:k,orient:"auto",refX:h,refY:B/2}),A=x(x("use"),{"xlink:href":"#"+S,transform:(a?"rotate(180 "+k/2+" "+B/2+") ":c)+"scale("+k/C+","+B/C+")","stroke-width":(1/((k/C+B/C)/2)).toFixed(4)}),M.appendChild(A),p.defs.appendChild(M),g[T]=1),x(A,u);var E=l*("diamond"!=w&&"oval"!=w);a?(s=i._.arrows.startdx*b||0,o=t.getTotalLength(m.path)-E*b):(s=E*b,o=t.getTotalLength(m.path)-(i._.arrows.enddx*b||0)),(u={})["marker-"+v]="url(#"+T+")",(o||s)&&(u.d=t.getSubpath(m.path,s,o)),x(y,u),i._.arrows[v+"Path"]=S,i._.arrows[v+"Marker"]=T,i._.arrows[v+"dx"]=E,i._.arrows[v+"Type"]=w,i._.arrows[v+"String"]=n}else a?(s=i._.arrows.startdx*b||0,o=t.getTotalLength(m.path)-s):(s=0,o=t.getTotalLength(m.path)-(i._.arrows.enddx*b||0)),i._.arrows[v+"Path"]&&x(y,{d:t.getSubpath(m.path,s,o)}),delete i._.arrows[v+"Path"],delete i._.arrows[v+"Marker"],delete i._.arrows[v+"dx"],delete i._.arrows[v+"Type"],delete i._.arrows[v+"String"];for(u in g)if(g[e](u)&&!g[u]){var N=t._g.doc.getElementById(u);N&&N.parentNode.removeChild(N)}}},_={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},w=function(t,e,i){if(e=_[r(e).toLowerCase()]){for(var n=t.attrs["stroke-width"]||"1",a={round:n,square:n,butt:0}[t.attrs["stroke-linecap"]||i["stroke-linecap"]]||0,s=[],o=e.length;o--;)s[o]=e[o]*n+(o%2?1:-1)*a;x(t.node,{"stroke-dasharray":s.join(",")})}else x(t.node,{"stroke-dasharray":"none"})},k=function(i,a){var l=i.node,u=i.attrs,f=l.style.visibility;for(var d in l.style.visibility="hidden",a)if(a[e](d)){if(!t._availableAttrs[e](d))continue;var g=a[d];switch(u[d]=g,d){case"blur":i.blur(g);break;case"title":var y=l.getElementsByTagName("title");if(y.length&&(y=y[0]))y.firstChild.nodeValue=g;else{y=x("title");var _=t._g.doc.createTextNode(g);y.appendChild(_),l.appendChild(y)}break;case"href":case"target":var k=l.parentNode;if("a"!=k.tagName.toLowerCase()){var C=x("a");k.insertBefore(C,l),C.appendChild(l),k=C}"target"==d?k.setAttributeNS(p,"show","blank"==g?"new":g):k.setAttributeNS(p,d,g);break;case"cursor":l.style.cursor=g;break;case"transform":i.transform(g);break;case"arrow-start":b(i,g);break;case"arrow-end":b(i,g,1);break;case"clip-rect":var S=r(g).split(h);if(4==S.length){i.clip&&i.clip.parentNode.parentNode.removeChild(i.clip.parentNode);var T=x("clipPath"),A=x("rect");T.id=t.createUUID(),x(A,{x:S[0],y:S[1],width:S[2],height:S[3]}),T.appendChild(A),i.paper.defs.appendChild(T),x(l,{"clip-path":"url(#"+T.id+")"}),i.clip=A}if(!g){var M=l.getAttribute("clip-path");if(M){var E=t._g.doc.getElementById(M.replace(/(^url\(#|\)$)/g,c));E&&E.parentNode.removeChild(E),x(l,{"clip-path":c}),delete i.clip}}break;case"path":"path"==i.type&&(x(l,{d:g?u.path=t._pathToAbsolute(g):"M0,0"}),i._.dirty=1,i._.arrows&&("startString"in i._.arrows&&b(i,i._.arrows.startString),"endString"in i._.arrows&&b(i,i._.arrows.endString,1)));break;case"width":if(l.setAttribute(d,g),i._.dirty=1,!u.fx)break;d="x",g=u.x;case"x":u.fx&&(g=-u.x-(u.width||0));case"rx":if("rx"==d&&"rect"==i.type)break;case"cx":l.setAttribute(d,g),i.pattern&&m(i),i._.dirty=1;break;case"height":if(l.setAttribute(d,g),i._.dirty=1,!u.fy)break;d="y",g=u.y;case"y":u.fy&&(g=-u.y-(u.height||0));case"ry":if("ry"==d&&"rect"==i.type)break;case"cy":l.setAttribute(d,g),i.pattern&&m(i),i._.dirty=1;break;case"r":"rect"==i.type?x(l,{rx:g,ry:g}):l.setAttribute(d,g),i._.dirty=1;break;case"src":"image"==i.type&&l.setAttributeNS(p,"href",g);break;case"stroke-width":1==i._.sx&&1==i._.sy||(g/=s(o(i._.sx),o(i._.sy))||1),l.setAttribute(d,g),u["stroke-dasharray"]&&w(i,u["stroke-dasharray"],a),i._.arrows&&("startString"in i._.arrows&&b(i,i._.arrows.startString),"endString"in i._.arrows&&b(i,i._.arrows.endString,1));break;case"stroke-dasharray":w(i,g,a);break;case"fill":var N=r(g).match(t._ISURL);if(N){T=x("pattern");var L=x("image");T.id=t.createUUID(),x(T,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),x(L,{x:0,y:0,"xlink:href":N[1]}),T.appendChild(L),function(e){t._preload(N[1],function(){var t=this.offsetWidth,r=this.offsetHeight;x(e,{width:t,height:r}),x(L,{width:t,height:r})})}(T),i.paper.defs.appendChild(T),x(l,{fill:"url(#"+T.id+")"}),i.pattern=T,i.pattern&&m(i);break}var P=t.getRGB(g);if(P.error){if(("circle"==i.type||"ellipse"==i.type||"r"!=r(g).charAt())&&v(i,g)){if("opacity"in u||"fill-opacity"in u){var z=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,c));if(z){var F=z.getElementsByTagName("stop");x(F[F.length-1],{"stop-opacity":("opacity"in u?u.opacity:1)*("fill-opacity"in u?u["fill-opacity"]:1)})}}u.gradient=g,u.fill="none";break}}else delete a.gradient,delete u.gradient,!t.is(u.opacity,"undefined")&&t.is(a.opacity,"undefined")&&x(l,{opacity:u.opacity}),!t.is(u["fill-opacity"],"undefined")&&t.is(a["fill-opacity"],"undefined")&&x(l,{"fill-opacity":u["fill-opacity"]});P[e]("opacity")&&x(l,{"fill-opacity":P.opacity>1?P.opacity/100:P.opacity});case"stroke":P=t.getRGB(g),l.setAttribute(d,P.hex),"stroke"==d&&P[e]("opacity")&&x(l,{"stroke-opacity":P.opacity>1?P.opacity/100:P.opacity}),"stroke"==d&&i._.arrows&&("startString"in i._.arrows&&b(i,i._.arrows.startString),"endString"in i._.arrows&&b(i,i._.arrows.endString,1));break;case"gradient":("circle"==i.type||"ellipse"==i.type||"r"!=r(g).charAt())&&v(i,g);break;case"opacity":u.gradient&&!u[e]("stroke-opacity")&&x(l,{"stroke-opacity":g>1?g/100:g});case"fill-opacity":if(u.gradient){(z=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,c)))&&(F=z.getElementsByTagName("stop"),x(F[F.length-1],{"stop-opacity":g}));break}default:"font-size"==d&&(g=n(g,10)+"px");var R=d.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[R]=g,i._.dirty=1,l.setAttribute(d,g)}}B(i,a),l.style.visibility=f},B=function(i,a){if("text"==i.type&&(a[e]("text")||a[e]("font")||a[e]("font-size")||a[e]("x")||a[e]("y"))){var s=i.attrs,o=i.node,l=o.firstChild?n(t._g.doc.defaultView.getComputedStyle(o.firstChild,c).getPropertyValue("font-size"),10):10;if(a[e]("text")){for(s.text=a.text;o.firstChild;)o.removeChild(o.firstChild);for(var h,u=r(a.text).split("\n"),f=[],p=0,d=u.length;p<d;p++)h=x("tspan"),p&&x(h,{dy:1.2*l,x:s.x}),h.appendChild(t._g.doc.createTextNode(u[p])),o.appendChild(h),f[p]=h}else for(p=0,d=(f=o.getElementsByTagName("tspan")).length;p<d;p++)p?x(f[p],{dy:1.2*l,x:s.x}):x(f[0],{dy:0});x(o,{x:s.x,y:s.y}),i._.dirty=1;var g=i._getBBox(),v=s.y-(g.y+g.height/2);v&&t.is(v,"finite")&&x(f[0],{dy:v})}},C=function(t){return t.parentNode&&"a"===t.parentNode.tagName.toLowerCase()?t.parentNode:t},S=function(e,r){this[0]=this.node=e,e.raphael=!0,this.id=("0000"+(Math.random()*Math.pow(36,5)<<0).toString(36)).slice(-5),e.raphaelid=this.id,this.matrix=t.matrix(),this.realPath=null,this.paper=r,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!r.bottom&&(r.bottom=this),this.prev=r.top,r.top&&(r.top.next=this),r.top=this,this.next=null},T=t.el;S.prototype=T,T.constructor=S,t._engine.path=function(t,e){var r=x("path");e.canvas&&e.canvas.appendChild(r);var i=new S(r,e);return i.type="path",k(i,{fill:"none",stroke:"#000",path:t}),i},T.rotate=function(t,e,n){if(this.removed)return this;if((t=r(t).split(h)).length-1&&(e=i(t[1]),n=i(t[2])),t=i(t[0]),null==n&&(e=n),null==e||null==n){var a=this.getBBox(1);e=a.x+a.width/2,n=a.y+a.height/2}return this.transform(this._.transform.concat([["r",t,e,n]])),this},T.scale=function(t,e,n,a){if(this.removed)return this;if((t=r(t).split(h)).length-1&&(e=i(t[1]),n=i(t[2]),a=i(t[3])),t=i(t[0]),null==e&&(e=t),null==a&&(n=a),null==n||null==a)var s=this.getBBox(1);return n=null==n?s.x+s.width/2:n,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,e,n,a]])),this},T.translate=function(t,e){return this.removed?this:((t=r(t).split(h)).length-1&&(e=i(t[1])),t=i(t[0])||0,e=+e||0,this.transform(this._.transform.concat([["t",t,e]])),this)},T.transform=function(r){var i=this._;if(null==r)return i.transform;if(t._extractTransform(this,r),this.clip&&x(this.clip,{transform:this.matrix.invert()}),this.pattern&&m(this),this.node&&x(this.node,{transform:this.matrix}),1!=i.sx||1!=i.sy){var n=this.attrs[e]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":n})}return this},T.hide=function(){return this.removed||(this.node.style.display="none"),this},T.show=function(){return this.removed||(this.node.style.display=""),this},T.remove=function(){var e=C(this.node);if(!this.removed&&e.parentNode){var r=this.paper;for(var i in r.__set__&&r.__set__.exclude(this),u.unbind("raphael.*.*."+this.id),this.gradient&&r.defs.removeChild(this.gradient),t._tear(this,r),e.parentNode.removeChild(e),this.removeData(),this)this[i]="function"==typeof this[i]?t._removedFactory(i):null;this.removed=!0}},T._getBBox=function(){if("none"==this.node.style.display){this.show();var t=!0}var e,r=!1;this.paper.canvas.parentElement?e=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(e=this.paper.canvas.parentNode.style),e&&"none"==e.display&&(r=!0,e.display="");var i={};try{i=this.node.getBBox()}catch(t){i={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{i=i||{},r&&(e.display="none")}return t&&this.hide(),i},T.attr=function(r,i){if(this.removed)return this;if(null==r){var n={};for(var a in this.attrs)this.attrs[e](a)&&(n[a]=this.attrs[a]);return n.gradient&&"none"==n.fill&&(n.fill=n.gradient)&&delete n.gradient,n.transform=this._.transform,n}if(null==i&&t.is(r,"string")){if("fill"==r&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==r)return this._.transform;for(var s=r.split(h),o={},l=0,c=s.length;l<c;l++)(r=s[l])in this.attrs?o[r]=this.attrs[r]:t.is(this.paper.customAttributes[r],"function")?o[r]=this.paper.customAttributes[r].def:o[r]=t._availableAttrs[r];return c-1?o:o[s[0]]}if(null==i&&t.is(r,"array")){for(o={},l=0,c=r.length;l<c;l++)o[r[l]]=this.attr(r[l]);return o}if(null!=i){var f={};f[r]=i}else null!=r&&t.is(r,"object")&&(f=r);for(var p in f)u("raphael.attr."+p+"."+this.id,this,f[p]);for(p in this.paper.customAttributes)if(this.paper.customAttributes[e](p)&&f[e](p)&&t.is(this.paper.customAttributes[p],"function")){var d=this.paper.customAttributes[p].apply(this,[].concat(f[p]));for(var g in this.attrs[p]=f[p],d)d[e](g)&&(f[g]=d[g])}return k(this,f),this},T.toFront=function(){if(this.removed)return this;var e=C(this.node);e.parentNode.appendChild(e);var r=this.paper;return r.top!=this&&t._tofront(this,r),this},T.toBack=function(){if(this.removed)return this;var e=C(this.node),r=e.parentNode;r.insertBefore(e,r.firstChild),t._toback(this,this.paper);this.paper;return this},T.insertAfter=function(e){if(this.removed||!e)return this;var r=C(this.node),i=C(e.node||e[e.length-1].node);return i.nextSibling?i.parentNode.insertBefore(r,i.nextSibling):i.parentNode.appendChild(r),t._insertafter(this,e,this.paper),this},T.insertBefore=function(e){if(this.removed||!e)return this;var r=C(this.node),i=C(e.node||e[0].node);return i.parentNode.insertBefore(r,i),t._insertbefore(this,e,this.paper),this},T.blur=function(e){var r=this;if(0!=+e){var i=x("filter"),n=x("feGaussianBlur");r.attrs.blur=e,i.id=t.createUUID(),x(n,{stdDeviation:+e||1.5}),i.appendChild(n),r.paper.defs.appendChild(i),r._blur=i,x(r.node,{filter:"url(#"+i.id+")"})}else r._blur&&(r._blur.parentNode.removeChild(r._blur),delete r._blur,delete r.attrs.blur),r.node.removeAttribute("filter");return r},t._engine.circle=function(t,e,r,i){var n=x("circle");t.canvas&&t.canvas.appendChild(n);var a=new S(n,t);return a.attrs={cx:e,cy:r,r:i,fill:"none",stroke:"#000"},a.type="circle",x(n,a.attrs),a},t._engine.rect=function(t,e,r,i,n,a){var s=x("rect");t.canvas&&t.canvas.appendChild(s);var o=new S(s,t);return o.attrs={x:e,y:r,width:i,height:n,rx:a||0,ry:a||0,fill:"none",stroke:"#000"},o.type="rect",x(s,o.attrs),o},t._engine.ellipse=function(t,e,r,i,n){var a=x("ellipse");t.canvas&&t.canvas.appendChild(a);var s=new S(a,t);return s.attrs={cx:e,cy:r,rx:i,ry:n,fill:"none",stroke:"#000"},s.type="ellipse",x(a,s.attrs),s},t._engine.image=function(t,e,r,i,n,a){var s=x("image");x(s,{x:r,y:i,width:n,height:a,preserveAspectRatio:"none"}),s.setAttributeNS(p,"href",e),t.canvas&&t.canvas.appendChild(s);var o=new S(s,t);return o.attrs={x:r,y:i,width:n,height:a,src:e},o.type="image",o},t._engine.text=function(e,r,i,n){var a=x("text");e.canvas&&e.canvas.appendChild(a);var s=new S(a,e);return s.attrs={x:r,y:i,"text-anchor":"middle",text:n,"font-family":t._availableAttrs["font-family"],"font-size":t._availableAttrs["font-size"],stroke:"none",fill:"#000"},s.type="text",k(s,s.attrs),s},t._engine.setSize=function(t,e){return this.width=t||this.width,this.height=e||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},t._engine.create=function(){var e=t._getContainer.apply(0,arguments),r=e&&e.container;if(!r)throw new Error("SVG container not found.");var i,n=e.x,a=e.y,s=e.width,o=e.height,l=x("svg"),h="overflow:hidden;";return n=n||0,a=a||0,x(l,{height:o=o||342,version:1.1,width:s=s||512,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),1==r?(l.style.cssText=h+"position:absolute;left:"+n+"px;top:"+a+"px",t._g.doc.body.appendChild(l),i=1):(l.style.cssText=h+"position:relative",r.firstChild?r.insertBefore(l,r.firstChild):r.appendChild(l)),(r=new t._Paper).width=s,r.height=o,r.canvas=l,r.clear(),r._left=r._top=0,i&&(r.renderfix=function(){}),r.renderfix(),r},t._engine.setViewBox=function(t,e,r,i,n){u("raphael.setViewBox",this,this._viewBox,[t,e,r,i,n]);var a,o,l=this.getSize(),h=s(r/l.width,i/l.height),c=this.top,p=n?"xMidYMid meet":"xMinYMin";for(null==t?(this._vbSize&&(h=1),delete this._vbSize,a="0 0 "+this.width+f+this.height):(this._vbSize=h,a=t+f+e+f+r+f+i),x(this.canvas,{viewBox:a,preserveAspectRatio:p});h&&c;)o="stroke-width"in c.attrs?c.attrs["stroke-width"]:1,c.attr({"stroke-width":o}),c._.dirty=1,c._.dirtyT=1,c=c.prev;return this._viewBox=[t,e,r,i,!!n],this},t.prototype.renderfix=function(){var t,e=this.canvas,r=e.style;try{t=e.getScreenCTM()||e.createSVGMatrix()}catch(r){t=e.createSVGMatrix()}var i=-t.e%1,n=-t.f%1;(i||n)&&(i&&(this._left=(this._left+i)%1,r.left=this._left+"px"),n&&(this._top=(this._top+n)%1,r.top=this._top+"px"))},t.prototype.clear=function(){t.eve("raphael.clear",this);for(var e=this.canvas;e.firstChild;)e.removeChild(e.firstChild);this.bottom=this.top=null,(this.desc=x("desc")).appendChild(t._g.doc.createTextNode("Created with Raphaël "+t.version)),e.appendChild(this.desc),e.appendChild(this.defs=x("defs"))},t.prototype.remove=function(){for(var e in u("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this)this[e]="function"==typeof this[e]?t._removedFactory(e):null};var A=t.st;for(var M in T)T[e](M)&&!A[e](M)&&(A[M]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t].apply(r,e)})}}(M))}}.apply(e,i))||(t.exports=n)},function(t,e,r){var i,n;i=[r(0)],void 0===(n=function(t){if(!t||t.vml){var e="hasOwnProperty",r=String,i=parseFloat,n=Math,a=n.round,s=n.max,o=n.min,l=n.abs,h=/[, ]+/,u=t.eve,c=" ",f="",p={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},d=/([clmz]),?([^clmz]*)/gi,g=/ progid:\S+Blur\([^\)]+\)/g,x=/-?[^,\s-]+/g,v="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",y=21600,m={path:1,rect:1,image:1},b={circle:1,ellipse:1},_=function(e,r,i){var n=t.matrix();return n.rotate(-e,.5,.5),{dx:n.x(r,i),dy:n.y(r,i)}},w=function(t,e,r,i,n,a){var s=t._,o=t.matrix,h=s.fillpos,u=t.node,f=u.style,p=1,d="",g=y/e,x=y/r;if(f.visibility="hidden",e&&r){if(u.coordsize=l(g)+c+l(x),f.rotation=a*(e*r<0?-1:1),a){var v=_(a,i,n);i=v.dx,n=v.dy}if(e<0&&(d+="x"),r<0&&(d+=" y")&&(p=-1),f.flip=d,u.coordorigin=i*-g+c+n*-x,h||s.fillsize){var m=u.getElementsByTagName("fill");m=m&&m[0],u.removeChild(m),h&&(v=_(a,o.x(h[0],h[1]),o.y(h[0],h[1])),m.position=v.dx*p+c+v.dy*p),s.fillsize&&(m.size=s.fillsize[0]*l(e)+c+s.fillsize[1]*l(r)),u.appendChild(m)}f.visibility="visible"}};t.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var k,B=function(t,e,i){for(var n=r(e).toLowerCase().split("-"),a=i?"end":"start",s=n.length,o="classic",l="medium",h="medium";s--;)switch(n[s]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":o=n[s];break;case"wide":case"narrow":h=n[s];break;case"long":case"short":l=n[s]}var u=t.node.getElementsByTagName("stroke")[0];u[a+"arrow"]=o,u[a+"arrowlength"]=l,u[a+"arrowwidth"]=h},C=function(n,l){n.attrs=n.attrs||{};var u=n.node,g=n.attrs,v=u.style,_=m[n.type]&&(l.x!=g.x||l.y!=g.y||l.width!=g.width||l.height!=g.height||l.cx!=g.cx||l.cy!=g.cy||l.rx!=g.rx||l.ry!=g.ry||l.r!=g.r),C=b[n.type]&&(g.cx!=l.cx||g.cy!=l.cy||g.r!=l.r||g.rx!=l.rx||g.ry!=l.ry),T=n;for(var A in l)l[e](A)&&(g[A]=l[A]);if(_&&(g.path=t._getPath[n.type](n),n._.dirty=1),l.href&&(u.href=l.href),l.title&&(u.title=l.title),l.target&&(u.target=l.target),l.cursor&&(v.cursor=l.cursor),"blur"in l&&n.blur(l.blur),(l.path&&"path"==n.type||_)&&(u.path=function(e){var i=/[ahqstv]/gi,n=t._pathToAbsolute;if(r(e).match(i)&&(n=t._path2curve),i=/[clmz]/g,n==t._pathToAbsolute&&!r(e).match(i)){var s=r(e).replace(d,function(t,e,r){var i=[],n="m"==e.toLowerCase(),s=p[e];return r.replace(x,function(t){n&&2==i.length&&(s+=i+p["m"==e?"l":"L"],i=[]),i.push(a(t*y))}),s+i});return s}var o,l,h=n(e);s=[];for(var u=0,g=h.length;u<g;u++){o=h[u],"z"==(l=h[u][0].toLowerCase())&&(l="x");for(var v=1,m=o.length;v<m;v++)l+=a(o[v]*y)+(v!=m-1?",":f);s.push(l)}return s.join(c)}(~r(g.path).toLowerCase().indexOf("r")?t._pathToAbsolute(g.path):g.path),n._.dirty=1,"image"==n.type&&(n._.fillpos=[g.x,g.y],n._.fillsize=[g.width,g.height],w(n,1,1,0,0,0))),"transform"in l&&n.transform(l.transform),C){var M=+g.cx,E=+g.cy,N=+g.rx||+g.r||0,L=+g.ry||+g.r||0;u.path=t.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",a((M-N)*y),a((E-L)*y),a((M+N)*y),a((E+L)*y),a(M*y)),n._.dirty=1}if("clip-rect"in l){var P=r(l["clip-rect"]).split(h);if(4==P.length){P[2]=+P[2]+ +P[0],P[3]=+P[3]+ +P[1];var z=u.clipRect||t._g.doc.createElement("div"),F=z.style;F.clip=t.format("rect({1}px {2}px {3}px {0}px)",P),u.clipRect||(F.position="absolute",F.top=0,F.left=0,F.width=n.paper.width+"px",F.height=n.paper.height+"px",u.parentNode.insertBefore(z,u),z.appendChild(u),u.clipRect=z)}l["clip-rect"]||u.clipRect&&(u.clipRect.style.clip="auto")}if(n.textpath){var R=n.textpath.style;l.font&&(R.font=l.font),l["font-family"]&&(R.fontFamily='"'+l["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,f)+'"'),l["font-size"]&&(R.fontSize=l["font-size"]),l["font-weight"]&&(R.fontWeight=l["font-weight"]),l["font-style"]&&(R.fontStyle=l["font-style"])}if("arrow-start"in l&&B(T,l["arrow-start"]),"arrow-end"in l&&B(T,l["arrow-end"],1),null!=l.opacity||null!=l.fill||null!=l.src||null!=l.stroke||null!=l["stroke-width"]||null!=l["stroke-opacity"]||null!=l["fill-opacity"]||null!=l["stroke-dasharray"]||null!=l["stroke-miterlimit"]||null!=l["stroke-linejoin"]||null!=l["stroke-linecap"]){var j=u.getElementsByTagName("fill");if(!(j=j&&j[0])&&(j=k("fill")),"image"==n.type&&l.src&&(j.src=l.src),l.fill&&(j.on=!0),null!=j.on&&"none"!=l.fill&&null!==l.fill||(j.on=!1),j.on&&l.fill){var I=r(l.fill).match(t._ISURL);if(I){j.parentNode==u&&u.removeChild(j),j.rotate=!0,j.src=I[1],j.type="tile";var D=n.getBBox(1);j.position=D.x+c+D.y,n._.fillpos=[D.x,D.y],t._preload(I[1],function(){n._.fillsize=[this.offsetWidth,this.offsetHeight]})}else j.color=t.getRGB(l.fill).hex,j.src=f,j.type="solid",t.getRGB(l.fill).error&&(T.type in{circle:1,ellipse:1}||"r"!=r(l.fill).charAt())&&S(T,l.fill,j)&&(g.fill="none",g.gradient=l.fill,j.rotate=!1)}if("fill-opacity"in l||"opacity"in l){var q=((+g["fill-opacity"]+1||2)-1)*((+g.opacity+1||2)-1)*((+t.getRGB(l.fill).o+1||2)-1);q=o(s(q,0),1),j.opacity=q,j.src&&(j.color="none")}u.appendChild(j);var O=u.getElementsByTagName("stroke")&&u.getElementsByTagName("stroke")[0],V=!1;!O&&(V=O=k("stroke")),(l.stroke&&"none"!=l.stroke||l["stroke-width"]||null!=l["stroke-opacity"]||l["stroke-dasharray"]||l["stroke-miterlimit"]||l["stroke-linejoin"]||l["stroke-linecap"])&&(O.on=!0),("none"==l.stroke||null===l.stroke||null==O.on||0==l.stroke||0==l["stroke-width"])&&(O.on=!1);var W=t.getRGB(l.stroke);O.on&&l.stroke&&(O.color=W.hex),q=((+g["stroke-opacity"]+1||2)-1)*((+g.opacity+1||2)-1)*((+W.o+1||2)-1);var Y=.75*(i(l["stroke-width"])||1);if(q=o(s(q,0),1),null==l["stroke-width"]&&(Y=g["stroke-width"]),l["stroke-width"]&&(O.weight=Y),Y&&Y<1&&(q*=Y)&&(O.weight=1),O.opacity=q,l["stroke-linejoin"]&&(O.joinstyle=l["stroke-linejoin"]||"miter"),O.miterlimit=l["stroke-miterlimit"]||8,l["stroke-linecap"]&&(O.endcap="butt"==l["stroke-linecap"]?"flat":"square"==l["stroke-linecap"]?"square":"round"),"stroke-dasharray"in l){var G={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};O.dashstyle=G[e](l["stroke-dasharray"])?G[l["stroke-dasharray"]]:f}V&&u.appendChild(O)}if("text"==T.type){T.paper.canvas.style.display=f;var H=T.paper.span,X=g.font&&g.font.match(/\d+(?:\.\d*)?(?=px)/);v=H.style,g.font&&(v.font=g.font),g["font-family"]&&(v.fontFamily=g["font-family"]),g["font-weight"]&&(v.fontWeight=g["font-weight"]),g["font-style"]&&(v.fontStyle=g["font-style"]),X=i(g["font-size"]||X&&X[0])||10,v.fontSize=100*X+"px",T.textpath.string&&(H.innerHTML=r(T.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var U=H.getBoundingClientRect();T.W=g.w=(U.right-U.left)/100,T.H=g.h=(U.bottom-U.top)/100,T.X=g.x,T.Y=g.y+T.H/2,("x"in l||"y"in l)&&(T.path.v=t.format("m{0},{1}l{2},{1}",a(g.x*y),a(g.y*y),a(g.x*y)+1));for(var $=["x","y","text","font","font-family","font-weight","font-style","font-size"],Z=0,Q=$.length;Z<Q;Z++)if($[Z]in l){T._.dirty=1;break}switch(g["text-anchor"]){case"start":T.textpath.style["v-text-align"]="left",T.bbx=T.W/2;break;case"end":T.textpath.style["v-text-align"]="right",T.bbx=-T.W/2;break;default:T.textpath.style["v-text-align"]="center",T.bbx=0}T.textpath.style["v-text-kern"]=!0}},S=function(e,a,s){e.attrs=e.attrs||{};e.attrs;var o=Math.pow,l="linear",h=".5 .5";if(e.attrs.gradient=a,a=(a=r(a).replace(t._radial_gradient,function(t,e,r){return l="radial",e&&r&&(e=i(e),r=i(r),o(e-.5,2)+o(r-.5,2)>.25&&(r=n.sqrt(.25-o(e-.5,2))*(2*(r>.5)-1)+.5),h=e+c+r),f})).split(/\s*\-\s*/),"linear"==l){var u=a.shift();if(u=-i(u),isNaN(u))return null}var p=t._parseDots(a);if(!p)return null;if(e=e.shape||e.node,p.length){e.removeChild(s),s.on=!0,s.method="none",s.color=p[0].color,s.color2=p[p.length-1].color;for(var d=[],g=0,x=p.length;g<x;g++)p[g].offset&&d.push(p[g].offset+c+p[g].color);s.colors=d.length?d.join():"0% "+s.color,"radial"==l?(s.type="gradientTitle",s.focus="100%",s.focussize="0 0",s.focusposition=h,s.angle=0):(s.type="gradient",s.angle=(270-u)%360),e.appendChild(s)}return 1},T=function(e,r){this[0]=this.node=e,e.raphael=!0,this.id=t._oid++,e.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=r,this.matrix=t.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!r.bottom&&(r.bottom=this),this.prev=r.top,r.top&&(r.top.next=this),r.top=this,this.next=null},A=t.el;T.prototype=A,A.constructor=T,A.transform=function(e){if(null==e)return this._.transform;var i,n=this.paper._viewBoxShift,a=n?"s"+[n.scale,n.scale]+"-1-1t"+[n.dx,n.dy]:f;n&&(i=e=r(e).replace(/\.{3}|\u2026/g,this._.transform||f)),t._extractTransform(this,a+e);var s,o=this.matrix.clone(),l=this.skew,h=this.node,u=~r(this.attrs.fill).indexOf("-"),p=!r(this.attrs.fill).indexOf("url(");if(o.translate(1,1),p||u||"image"==this.type)if(l.matrix="1 0 0 1",l.offset="0 0",s=o.split(),u&&s.noRotation||!s.isSimple){h.style.filter=o.toFilter();var d=this.getBBox(),g=this.getBBox(1),x=d.x-g.x,v=d.y-g.y;h.coordorigin=x*-y+c+v*-y,w(this,1,1,x,v,0)}else h.style.filter=f,w(this,s.scalex,s.scaley,s.dx,s.dy,s.rotate);else h.style.filter=f,l.matrix=r(o),l.offset=o.offset();return null!==i&&(this._.transform=i,t._extractTransform(this,i)),this},A.rotate=function(t,e,n){if(this.removed)return this;if(null!=t){if((t=r(t).split(h)).length-1&&(e=i(t[1]),n=i(t[2])),t=i(t[0]),null==n&&(e=n),null==e||null==n){var a=this.getBBox(1);e=a.x+a.width/2,n=a.y+a.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",t,e,n]])),this}},A.translate=function(t,e){return this.removed?this:((t=r(t).split(h)).length-1&&(e=i(t[1])),t=i(t[0])||0,e=+e||0,this._.bbox&&(this._.bbox.x+=t,this._.bbox.y+=e),this.transform(this._.transform.concat([["t",t,e]])),this)},A.scale=function(t,e,n,a){if(this.removed)return this;if((t=r(t).split(h)).length-1&&(e=i(t[1]),n=i(t[2]),a=i(t[3]),isNaN(n)&&(n=null),isNaN(a)&&(a=null)),t=i(t[0]),null==e&&(e=t),null==a&&(n=a),null==n||null==a)var s=this.getBBox(1);return n=null==n?s.x+s.width/2:n,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,e,n,a]])),this._.dirtyT=1,this},A.hide=function(){return!this.removed&&(this.node.style.display="none"),this},A.show=function(){return!this.removed&&(this.node.style.display=f),this},A.auxGetBBox=t.el.getBBox,A.getBBox=function(){var t=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var e={},r=1/this.paper._viewBoxShift.scale;return e.x=t.x-this.paper._viewBoxShift.dx,e.x*=r,e.y=t.y-this.paper._viewBoxShift.dy,e.y*=r,e.width=t.width*r,e.height=t.height*r,e.x2=e.x+e.width,e.y2=e.y+e.height,e}return t},A._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},A.remove=function(){if(!this.removed&&this.node.parentNode){for(var e in this.paper.__set__&&this.paper.__set__.exclude(this),t.eve.unbind("raphael.*.*."+this.id),t._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape),this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;this.removed=!0}},A.attr=function(r,i){if(this.removed)return this;if(null==r){var n={};for(var a in this.attrs)this.attrs[e](a)&&(n[a]=this.attrs[a]);return n.gradient&&"none"==n.fill&&(n.fill=n.gradient)&&delete n.gradient,n.transform=this._.transform,n}if(null==i&&t.is(r,"string")){if("fill"==r&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var s=r.split(h),o={},l=0,c=s.length;l<c;l++)(r=s[l])in this.attrs?o[r]=this.attrs[r]:t.is(this.paper.customAttributes[r],"function")?o[r]=this.paper.customAttributes[r].def:o[r]=t._availableAttrs[r];return c-1?o:o[s[0]]}if(this.attrs&&null==i&&t.is(r,"array")){for(o={},l=0,c=r.length;l<c;l++)o[r[l]]=this.attr(r[l]);return o}var f;for(var p in null!=i&&((f={})[r]=i),null==i&&t.is(r,"object")&&(f=r),f)u("raphael.attr."+p+"."+this.id,this,f[p]);if(f){for(p in this.paper.customAttributes)if(this.paper.customAttributes[e](p)&&f[e](p)&&t.is(this.paper.customAttributes[p],"function")){var d=this.paper.customAttributes[p].apply(this,[].concat(f[p]));for(var g in this.attrs[p]=f[p],d)d[e](g)&&(f[g]=d[g])}f.text&&"text"==this.type&&(this.textpath.string=f.text),C(this,f)}return this},A.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&t._tofront(this,this.paper),this},A.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),t._toback(this,this.paper)),this)},A.insertAfter=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[e.length-1]),e.node.nextSibling?e.node.parentNode.insertBefore(this.node,e.node.nextSibling):e.node.parentNode.appendChild(this.node),t._insertafter(this,e,this.paper),this)},A.insertBefore=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[0]),e.node.parentNode.insertBefore(this.node,e.node),t._insertbefore(this,e,this.paper),this)},A.blur=function(e){var r=this.node.runtimeStyle,i=r.filter;return i=i.replace(g,f),0!=+e?(this.attrs.blur=e,r.filter=i+c+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+e||1.5)+")",r.margin=t.format("-{0}px 0 0 -{0}px",a(+e||1.5))):(r.filter=i,r.margin=0,delete this.attrs.blur),this},t._engine.path=function(t,e){var r=k("shape");r.style.cssText=v,r.coordsize=y+c+y,r.coordorigin=e.coordorigin;var i=new T(r,e),n={fill:"none",stroke:"#000"};t&&(n.path=t),i.type="path",i.path=[],i.Path=f,C(i,n),e.canvas&&e.canvas.appendChild(r);var a=k("skew");return a.on=!0,r.appendChild(a),i.skew=a,i.transform(f),i},t._engine.rect=function(e,r,i,n,a,s){var o=t._rectPath(r,i,n,a,s),l=e.path(o),h=l.attrs;return l.X=h.x=r,l.Y=h.y=i,l.W=h.width=n,l.H=h.height=a,h.r=s,h.path=o,l.type="rect",l},t._engine.ellipse=function(t,e,r,i,n){var a=t.path();a.attrs;return a.X=e-i,a.Y=r-n,a.W=2*i,a.H=2*n,a.type="ellipse",C(a,{cx:e,cy:r,rx:i,ry:n}),a},t._engine.circle=function(t,e,r,i){var n=t.path();n.attrs;return n.X=e-i,n.Y=r-i,n.W=n.H=2*i,n.type="circle",C(n,{cx:e,cy:r,r:i}),n},t._engine.image=function(e,r,i,n,a,s){var o=t._rectPath(i,n,a,s),l=e.path(o).attr({stroke:"none"}),h=l.attrs,u=l.node,c=u.getElementsByTagName("fill")[0];return h.src=r,l.X=h.x=i,l.Y=h.y=n,l.W=h.width=a,l.H=h.height=s,h.path=o,l.type="image",c.parentNode==u&&u.removeChild(c),c.rotate=!0,c.src=r,c.type="tile",l._.fillpos=[i,n],l._.fillsize=[a,s],u.appendChild(c),w(l,1,1,0,0,0),l},t._engine.text=function(e,i,n,s){var o=k("shape"),l=k("path"),h=k("textpath");i=i||0,n=n||0,s=s||"",l.v=t.format("m{0},{1}l{2},{1}",a(i*y),a(n*y),a(i*y)+1),l.textpathok=!0,h.string=r(s),h.on=!0,o.style.cssText=v,o.coordsize=y+c+y,o.coordorigin="0 0";var u=new T(o,e),p={fill:"#000",stroke:"none",font:t._availableAttrs.font,text:s};u.shape=o,u.path=l,u.textpath=h,u.type="text",u.attrs.text=r(s),u.attrs.x=i,u.attrs.y=n,u.attrs.w=1,u.attrs.h=1,C(u,p),o.appendChild(h),o.appendChild(l),e.canvas.appendChild(o);var d=k("skew");return d.on=!0,o.appendChild(d),u.skew=d,u.transform(f),u},t._engine.setSize=function(e,r){var i=this.canvas.style;return this.width=e,this.height=r,e==+e&&(e+="px"),r==+r&&(r+="px"),i.width=e,i.height=r,i.clip="rect(0 "+e+" "+r+" 0)",this._viewBox&&t._engine.setViewBox.apply(this,this._viewBox),this},t._engine.setViewBox=function(e,r,i,n,a){t.eve("raphael.setViewBox",this,this._viewBox,[e,r,i,n,a]);var s,o,l=this.getSize(),h=l.width,u=l.height;return a&&(i*(s=u/n)<h&&(e-=(h-i*s)/2/s),n*(o=h/i)<u&&(r-=(u-n*o)/2/o)),this._viewBox=[e,r,i,n,!!a],this._viewBoxShift={dx:-e,dy:-r,scale:l},this.forEach(function(t){t.transform("...")}),this},t._engine.initWin=function(t){var e=t.document;e.styleSheets.length<31?e.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):e.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!e.namespaces.rvml&&e.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),k=function(t){return e.createElement("<rvml:"+t+' class="rvml">')}}catch(t){k=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),r=e.container,i=e.height,n=e.width,a=e.x,s=e.y;if(!r)throw new Error("VML container not found.");var o=new t._Paper,l=o.canvas=t._g.doc.createElement("div"),h=l.style;return a=a||0,s=s||0,n=n||512,i=i||342,o.width=n,o.height=i,n==+n&&(n+="px"),i==+i&&(i+="px"),o.coordsize=216e5+c+216e5,o.coordorigin="0 0",o.span=t._g.doc.createElement("span"),o.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(o.span),h.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",n,i),1==r?(t._g.doc.body.appendChild(l),h.left=a+"px",h.top=s+"px",h.position="absolute"):r.firstChild?r.insertBefore(l,r.firstChild):r.appendChild(l),o.renderfix=function(){},o},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=f,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){for(var e in t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var M=t.st;for(var E in A)A[e](E)&&!M[e](E)&&(M[E]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t].apply(r,e)})}}(E))}}.apply(e,i))||(t.exports=n)}])});