@langgraph-js/ui 5.3.0 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{arc-ByBJT7ix.js → arc-DEKXWMgk.js} +1 -1
- package/dist/assets/architectureDiagram-VXUJARFQ-CCAnjRBf.js +36 -0
- package/dist/assets/blockDiagram-VD42YOAC-C45FMpSa.js +122 -0
- package/dist/assets/c4Diagram-YG6GDRKO-b2FfGD5V.js +10 -0
- package/dist/assets/channel-BnP1OHPk.js +1 -0
- package/dist/assets/chunk-4BX2VUAB-DZUxlygh.js +1 -0
- package/dist/assets/{chunk-55IACEB6-B-dnHx34.js → chunk-55IACEB6-D99w6_wJ.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-Bd_EmK5n.js → chunk-B4BG7PRW-CINymWls.js} +6 -6
- package/dist/assets/chunk-DI55MBZ5-KXNsA5jH.js +220 -0
- package/dist/assets/{chunk-FMBD7UC4-Benh4DyV.js → chunk-FMBD7UC4-Ze5lcP7r.js} +1 -1
- package/dist/assets/chunk-QN33PNHL-D6csHY9f.js +1 -0
- package/dist/assets/{chunk-QZHKN3VN-pD5jwMeq.js → chunk-QZHKN3VN-CQij6uxD.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-iXGBDV4R.js → chunk-TZMSLE5B-DHgJ2PzL.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-BhnxhKIx.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-BhnxhKIx.js +1 -0
- package/dist/assets/clone-CzxHCvWS.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-7XsZDF0x.js +1 -0
- package/dist/assets/cytoscape.esm-CyJtwmzi.js +331 -0
- package/dist/assets/dagre-6UL2VRFP-B7vIHoek.js +4 -0
- package/dist/assets/diagram-PSM6KHXK-Dwk0-3lg.js +24 -0
- package/dist/assets/diagram-QEK2KX5R-yRItHVGO.js +43 -0
- package/dist/assets/diagram-S2PKOQOG-Gl24csy5.js +24 -0
- package/dist/assets/{erDiagram-Q2GNP2WA-Cw-3m3iQ.js → erDiagram-Q2GNP2WA-DaoUsHC-.js} +4 -4
- package/dist/assets/flowDiagram-NV44I4VS-BvxRwSdK.js +162 -0
- package/dist/assets/{ganttDiagram-LVOFAZNH-HFaJpoPe.js → ganttDiagram-LVOFAZNH-DiyXT1u-.js} +1 -1
- package/dist/assets/gitGraphDiagram-NY62KEGX-C7GPXV9B.js +65 -0
- package/dist/assets/{graph-VOODAD3y.js → graph-BJHoUus9.js} +1 -1
- package/dist/assets/index-Cigf7okT.js +1 -0
- package/dist/assets/{index-BDnjyX2X.js → index-Cx_WzRmY.js} +410 -119
- package/dist/assets/index-z3jA17TL.css +1 -0
- package/dist/assets/{infoDiagram-F6ZHWCRC-BhGv_djV.js → infoDiagram-F6ZHWCRC-BPazewwG.js} +1 -1
- package/dist/assets/{isUndefined-0vq8NMH-.js → isUndefined-swG3RKv4.js} +1 -1
- package/dist/assets/{journeyDiagram-XKPGCS4Q-DyCiaoHe.js → journeyDiagram-XKPGCS4Q-7TQoyFvV.js} +1 -1
- package/dist/assets/kanban-definition-3W4ZIXB7-BPW9De0Q.js +89 -0
- package/dist/assets/{layout-0ID9q93j.js → layout-DPDnEj2p.js} +1 -1
- package/dist/assets/{linear-BuZdgMYG.js → linear-CnAIHHRL.js} +1 -1
- package/dist/assets/mermaid.core-Bt6sloa1.js +197 -0
- package/dist/assets/{min-piR6L-qa.js → min-DqUZylJ8.js} +1 -1
- package/dist/assets/mindmap-definition-VGOIOE7T-C-tiffs0.js +68 -0
- package/dist/assets/pieDiagram-ADFJNKIX-0IbvYAbJ.js +30 -0
- package/dist/assets/quadrantDiagram-AYHSOK5B-B76yzm9c.js +7 -0
- package/dist/assets/{requirementDiagram-UZGBJVZJ-DenFzO4x.js → requirementDiagram-UZGBJVZJ-CAEEUTLr.js} +7 -7
- package/dist/assets/{sankeyDiagram-TZEHDZUN-Cf4npYbH.js → sankeyDiagram-TZEHDZUN-DtnGWiEx.js} +7 -7
- package/dist/assets/{sequenceDiagram-WL72ISMW-D0B0sUMP.js → sequenceDiagram-WL72ISMW-Cu9Iphhk.js} +16 -16
- package/dist/assets/{stateDiagram-FKZM4ZOC-DCkjEhse.js → stateDiagram-FKZM4ZOC-DMmqlSc3.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-C8PNiXpd.js +1 -0
- package/dist/assets/timeline-definition-IT6M3QCI-Z39dMt9m.js +61 -0
- package/dist/assets/treemap-KMMF4GRG-DMhNl-LE.js +128 -0
- package/dist/assets/{xychartDiagram-PRI3JC2R-BfqhPDDy.js → xychartDiagram-PRI3JC2R-3RFvJwDL.js} +1 -1
- package/dist/index.html +3 -3
- package/index.html +1 -1
- package/package.json +14 -8
- package/server/graph/debugAgent.ts +42 -0
- package/server/index.ts +6 -1
- package/src/chat/Chat.tsx +21 -17
- package/src/chat/components/MessageAI.tsx +3 -1
- package/src/chat/components/MessageTool.tsx +59 -13
- package/src/chat/components/Reasoning.tsx +21 -0
- package/src/chat/components/UsageMetadata.tsx +2 -2
- package/src/components/ai-elements/chain-of-thought.tsx +228 -0
- package/src/components/ui/badge.tsx +46 -0
- package/src/components/ui/collapsible.tsx +31 -0
- package/src/debugPanel/Context.tsx +45 -0
- package/src/debugPanel/DebugPanel.tsx +237 -0
- package/src/debugPanel/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/monitor/index.tsx +1 -4
- package/test/App.tsx +8 -2
- package/tsconfig.json +1 -1
- package/dist/assets/architectureDiagram-VXUJARFQ-TBGn1Rfl.js +0 -36
- package/dist/assets/blockDiagram-VD42YOAC-H3aCjd8C.js +0 -122
- package/dist/assets/c4Diagram-YG6GDRKO-mLv4gXzg.js +0 -10
- package/dist/assets/channel-C2ZY7jsG.js +0 -1
- package/dist/assets/chunk-4BX2VUAB-q_t8Wicw.js +0 -1
- package/dist/assets/chunk-DI55MBZ5-BC-nx3CQ.js +0 -220
- package/dist/assets/chunk-QN33PNHL-evxJkdkh.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-zN_blmEE.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-zN_blmEE.js +0 -1
- package/dist/assets/clone-DvlZSVEg.js +0 -1
- package/dist/assets/cose-bilkent-S5V4N54A-CpE55JUO.js +0 -1
- package/dist/assets/cytoscape.esm-TTflUzRS.js +0 -321
- package/dist/assets/dagre-6UL2VRFP-EvO-OLhz.js +0 -4
- package/dist/assets/diagram-PSM6KHXK-CFY939Qh.js +0 -24
- package/dist/assets/diagram-QEK2KX5R-C9Zr7m8k.js +0 -43
- package/dist/assets/diagram-S2PKOQOG-DNcS9v33.js +0 -24
- package/dist/assets/flowDiagram-NV44I4VS-CLWeIeeE.js +0 -162
- package/dist/assets/gitGraphDiagram-NY62KEGX-CCUv-KE0.js +0 -65
- package/dist/assets/index-BJ9C6D-a.js +0 -1
- package/dist/assets/index-DkUikjP8.css +0 -1
- package/dist/assets/kanban-definition-3W4ZIXB7-DSRBn_Rk.js +0 -89
- package/dist/assets/mermaid.core-B8WZioq4.js +0 -191
- package/dist/assets/mindmap-definition-VGOIOE7T-CZb-iOUH.js +0 -68
- package/dist/assets/pieDiagram-ADFJNKIX-Dzw0oI4o.js +0 -30
- package/dist/assets/quadrantDiagram-AYHSOK5B-C73fqE74.js +0 -7
- package/dist/assets/stateDiagram-v2-4FDKWEC3-BO7ffAwx.js +0 -1
- package/dist/assets/timeline-definition-IT6M3QCI-wtq4Ovqb.js +0 -61
- package/dist/assets/treemap-KMMF4GRG-HbrSuDxx.js +0 -128
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Cx_WzRmY.js","assets/index-z3jA17TL.css","assets/dagre-6UL2VRFP-B7vIHoek.js","assets/graph-BJHoUus9.js","assets/isUndefined-swG3RKv4.js","assets/layout-DPDnEj2p.js","assets/min-DqUZylJ8.js","assets/clone-CzxHCvWS.js","assets/cose-bilkent-S5V4N54A-7XsZDF0x.js","assets/cytoscape.esm-CyJtwmzi.js","assets/c4Diagram-YG6GDRKO-b2FfGD5V.js","assets/chunk-TZMSLE5B-DHgJ2PzL.js","assets/flowDiagram-NV44I4VS-BvxRwSdK.js","assets/chunk-FMBD7UC4-Ze5lcP7r.js","assets/chunk-55IACEB6-D99w6_wJ.js","assets/chunk-QN33PNHL-D6csHY9f.js","assets/channel-BnP1OHPk.js","assets/erDiagram-Q2GNP2WA-DaoUsHC-.js","assets/gitGraphDiagram-NY62KEGX-C7GPXV9B.js","assets/chunk-4BX2VUAB-DZUxlygh.js","assets/chunk-QZHKN3VN-CQij6uxD.js","assets/treemap-KMMF4GRG-DMhNl-LE.js","assets/ganttDiagram-LVOFAZNH-DiyXT1u-.js","assets/linear-CnAIHHRL.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-C4B-KCzX.js","assets/infoDiagram-F6ZHWCRC-BPazewwG.js","assets/pieDiagram-ADFJNKIX-0IbvYAbJ.js","assets/arc-DEKXWMgk.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AYHSOK5B-B76yzm9c.js","assets/xychartDiagram-PRI3JC2R-3RFvJwDL.js","assets/requirementDiagram-UZGBJVZJ-CAEEUTLr.js","assets/sequenceDiagram-WL72ISMW-Cu9Iphhk.js","assets/classDiagram-2ON5EDUG-BhnxhKIx.js","assets/chunk-B4BG7PRW-CINymWls.js","assets/classDiagram-v2-WZHVMYZB-BhnxhKIx.js","assets/stateDiagram-FKZM4ZOC-DMmqlSc3.js","assets/chunk-DI55MBZ5-KXNsA5jH.js","assets/stateDiagram-v2-4FDKWEC3-C8PNiXpd.js","assets/journeyDiagram-XKPGCS4Q-7TQoyFvV.js","assets/timeline-definition-IT6M3QCI-Z39dMt9m.js","assets/mindmap-definition-VGOIOE7T-C-tiffs0.js","assets/kanban-definition-3W4ZIXB7-BPW9De0Q.js","assets/sankeyDiagram-TZEHDZUN-DtnGWiEx.js","assets/diagram-S2PKOQOG-Gl24csy5.js","assets/diagram-QEK2KX5R-yRItHVGO.js","assets/blockDiagram-VD42YOAC-C45FMpSa.js","assets/architectureDiagram-VXUJARFQ-CCAnjRBf.js","assets/diagram-PSM6KHXK-Dwk0-3lg.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{l as Qd,a0 as ft,s as ht,a1 as vs,$ as Jd,a2 as So,a as Tn}from"./index-Cx_WzRmY.js";var Bn={name:"mermaid",version:"11.12.0",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.1.1","@iconify/utils":"^3.0.1","@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.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@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.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},yi={exports:{}},tf=yi.exports,Ln;function ef(){return Ln||(Ln=1,function(e,t){(function(r,i){e.exports=i()})(tf,function(){var r=1e3,i=6e4,a=36e5,s="millisecond",o="second",n="minute",l="hour",c="day",h="week",u="month",d="quarter",p="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|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,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var L=["th","st","nd","rd"],B=A%100;return"["+A+(L[(B-20)%10]||L[B]||L[0])+"]"}},_=function(A,L,B){var F=String(A);return!F||F.length>=L?A:""+Array(L+1-F.length).join(B)+A},v={s:_,z:function(A){var L=-A.utcOffset(),B=Math.abs(L),F=Math.floor(B/60),M=B%60;return(L<=0?"+":"-")+_(F,2,"0")+":"+_(M,2,"0")},m:function A(L,B){if(L.date()<B.date())return-A(B,L);var F=12*(B.year()-L.year())+(B.month()-L.month()),M=L.clone().add(F,u),z=B-M<0,V=L.clone().add(F+(z?-1:1),u);return+(-(F+(B-M)/(z?M-V:V-M))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:u,y:p,w:h,d:c,D:g,h:l,m:n,s:o,ms:s,Q:d}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},S="en",C={};C[S]=b;var w="$isDayjsObject",D=function(A){return A instanceof W||!(!A||!A[w])},P=function A(L,B,F){var M;if(!L)return S;if(typeof L=="string"){var z=L.toLowerCase();C[z]&&(M=z),B&&(C[z]=B,M=z);var V=L.split("-");if(!M&&V.length>1)return A(V[0])}else{var H=L.name;C[H]=L,M=H}return!F&&M&&(S=M),M||!F&&S},I=function(A,L){if(D(A))return A.clone();var B=typeof L=="object"?L:{};return B.date=A,B.args=arguments,new W(B)},E=v;E.l=P,E.i=D,E.w=function(A,L){return I(A,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var W=function(){function A(B){this.$L=P(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[w]=!0}var L=A.prototype;return L.parse=function(B){this.$d=function(F){var M=F.date,z=F.utc;if(M===null)return new Date(NaN);if(E.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var V=M.match(y);if(V){var H=V[2]-1||0,ut=(V[7]||"0").substring(0,3);return z?new Date(Date.UTC(V[1],H,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ut)):new Date(V[1],H,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ut)}}return new Date(M)}(B),this.init()},L.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},L.$utils=function(){return E},L.isValid=function(){return this.$d.toString()!==m},L.isSame=function(B,F){var M=I(B);return this.startOf(F)<=M&&M<=this.endOf(F)},L.isAfter=function(B,F){return I(B)<this.startOf(F)},L.isBefore=function(B,F){return this.endOf(F)<I(B)},L.$g=function(B,F,M){return E.u(B)?this[F]:this.set(M,B)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(B,F){var M=this,z=!!E.u(F)||F,V=E.p(B),H=function(yt,mt){var _t=E.w(M.$u?Date.UTC(M.$y,mt,yt):new Date(M.$y,mt,yt),M);return z?_t:_t.endOf(c)},ut=function(yt,mt){return E.w(M.toDate()[yt].apply(M.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(mt)),M)},at=this.$W,pt=this.$M,nt=this.$D,st="set"+(this.$u?"UTC":"");switch(V){case p:return z?H(1,0):H(31,11);case u:return z?H(1,pt):H(0,pt+1);case h:var ct=this.$locale().weekStart||0,gt=(at<ct?at+7:at)-ct;return H(z?nt-gt:nt+(6-gt),pt);case c:case g:return ut(st+"Hours",0);case l:return ut(st+"Minutes",1);case n:return ut(st+"Seconds",2);case o:return ut(st+"Milliseconds",3);default:return this.clone()}},L.endOf=function(B){return this.startOf(B,!1)},L.$set=function(B,F){var M,z=E.p(B),V="set"+(this.$u?"UTC":""),H=(M={},M[c]=V+"Date",M[g]=V+"Date",M[u]=V+"Month",M[p]=V+"FullYear",M[l]=V+"Hours",M[n]=V+"Minutes",M[o]=V+"Seconds",M[s]=V+"Milliseconds",M)[z],ut=z===c?this.$D+(F-this.$W):F;if(z===u||z===p){var at=this.clone().set(g,1);at.$d[H](ut),at.init(),this.$d=at.set(g,Math.min(this.$D,at.daysInMonth())).$d}else H&&this.$d[H](ut);return this.init(),this},L.set=function(B,F){return this.clone().$set(B,F)},L.get=function(B){return this[E.p(B)]()},L.add=function(B,F){var M,z=this;B=Number(B);var V=E.p(F),H=function(pt){var nt=I(z);return E.w(nt.date(nt.date()+Math.round(pt*B)),z)};if(V===u)return this.set(u,this.$M+B);if(V===p)return this.set(p,this.$y+B);if(V===c)return H(1);if(V===h)return H(7);var ut=(M={},M[n]=i,M[l]=a,M[o]=r,M)[V]||1,at=this.$d.getTime()+B*ut;return E.w(at,this)},L.subtract=function(B,F){return this.add(-1*B,F)},L.format=function(B){var F=this,M=this.$locale();if(!this.isValid())return M.invalidDate||m;var z=B||"YYYY-MM-DDTHH:mm:ssZ",V=E.z(this),H=this.$H,ut=this.$m,at=this.$M,pt=M.weekdays,nt=M.months,st=M.meridiem,ct=function(mt,_t,ee,Kt){return mt&&(mt[_t]||mt(F,z))||ee[_t].slice(0,Kt)},gt=function(mt){return E.s(H%12||12,mt,"0")},yt=st||function(mt,_t,ee){var Kt=mt<12?"AM":"PM";return ee?Kt.toLowerCase():Kt};return z.replace(x,function(mt,_t){return _t||function(ee){switch(ee){case"YY":return String(F.$y).slice(-2);case"YYYY":return E.s(F.$y,4,"0");case"M":return at+1;case"MM":return E.s(at+1,2,"0");case"MMM":return ct(M.monthsShort,at,nt,3);case"MMMM":return ct(nt,at);case"D":return F.$D;case"DD":return E.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return ct(M.weekdaysMin,F.$W,pt,2);case"ddd":return ct(M.weekdaysShort,F.$W,pt,3);case"dddd":return pt[F.$W];case"H":return String(H);case"HH":return E.s(H,2,"0");case"h":return gt(1);case"hh":return gt(2);case"a":return yt(H,ut,!0);case"A":return yt(H,ut,!1);case"m":return String(ut);case"mm":return E.s(ut,2,"0");case"s":return String(F.$s);case"ss":return E.s(F.$s,2,"0");case"SSS":return E.s(F.$ms,3,"0");case"Z":return V}return null}(mt)||V.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(B,F,M){var z,V=this,H=E.p(F),ut=I(B),at=(ut.utcOffset()-this.utcOffset())*i,pt=this-ut,nt=function(){return E.m(V,ut)};switch(H){case p:z=nt()/12;break;case u:z=nt();break;case d:z=nt()/3;break;case h:z=(pt-at)/6048e5;break;case c:z=(pt-at)/864e5;break;case l:z=pt/a;break;case n:z=pt/i;break;case o:z=pt/r;break;default:z=pt}return M?z:E.a(z)},L.daysInMonth=function(){return this.endOf(u).$D},L.$locale=function(){return C[this.$L]},L.locale=function(B,F){if(!B)return this.$L;var M=this.clone(),z=P(B,F,!0);return z&&(M.$L=z),M},L.clone=function(){return E.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()},A}(),O=W.prototype;return I.prototype=O,[["$ms",s],["$s",o],["$m",n],["$H",l],["$W",c],["$M",u],["$y",p],["$D",g]].forEach(function(A){O[A[1]]=function(L){return this.$g(L,A[0],A[1])}}),I.extend=function(A,L){return A.$i||(A(L,W,I),A.$i=!0),I},I.locale=P,I.isDayjs=D,I.unix=function(A){return I(1e3*A)},I.en=C[S],I.Ls=C,I.p={},I})}(yi)),yi.exports}var rf=ef();const af=Qd(rf);var ko=Object.defineProperty,f=(e,t)=>ko(e,"name",{value:t,configurable:!0}),sf=(e,t)=>{for(var r in t)ko(e,r,{get:t[r],enumerable:!0})},ge={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},$={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},ws=f(function(e="fatal"){let t=ge.fatal;typeof e=="string"?e.toLowerCase()in ge&&(t=ge[e]):typeof e=="number"&&(t=e),$.trace=()=>{},$.debug=()=>{},$.info=()=>{},$.warn=()=>{},$.error=()=>{},$.fatal=()=>{},t<=ge.fatal&&($.fatal=console.error?console.error.bind(console,Zt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Zt("FATAL"))),t<=ge.error&&($.error=console.error?console.error.bind(console,Zt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Zt("ERROR"))),t<=ge.warn&&($.warn=console.warn?console.warn.bind(console,Zt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Zt("WARN"))),t<=ge.info&&($.info=console.info?console.info.bind(console,Zt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Zt("INFO"))),t<=ge.debug&&($.debug=console.debug?console.debug.bind(console,Zt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Zt("DEBUG"))),t<=ge.trace&&($.trace=console.debug?console.debug.bind(console,Zt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Zt("TRACE")))},"setLogLevel"),Zt=f(e=>`%c${af().format("ss.SSS")} : ${e} : `,"format");const xi={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;switch(i){case"r":return xi.hue2rgb(s,a,e+1/3)*255;case"g":return xi.hue2rgb(s,a,e)*255;case"b":return xi.hue2rgb(s,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),s=Math.min(e,t,r),o=(a+s)/2;if(i==="l")return o*100;if(a===s)return 0;const n=a-s,l=o>.5?n/(2-a-s):n/(a+s);if(i==="s")return l*100;switch(a){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},nf={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},of={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},it={channel:xi,lang:nf,unit:of},ke={};for(let e=0;e<=255;e++)ke[e]=it.unit.dec2hex(e);const $t={ALL:0,RGB:1,HSL:2};class lf{constructor(){this.type=$t.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=$t.ALL}is(t){return this.type===t}}class cf{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new lf}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=$t.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=it.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=it.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=it.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=it.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=it.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=it.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is($t.HSL)&&r!==void 0?r:(this._ensureHSL(),it.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is($t.HSL)&&r!==void 0?r:(this._ensureHSL(),it.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is($t.HSL)&&r!==void 0?r:(this._ensureHSL(),it.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is($t.RGB)&&r!==void 0?r:(this._ensureRGB(),it.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is($t.RGB)&&r!==void 0?r:(this._ensureRGB(),it.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is($t.RGB)&&r!==void 0?r:(this._ensureRGB(),it.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set($t.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set($t.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set($t.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set($t.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set($t.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set($t.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Qi=new cf({r:0,g:0,b:0,a:0},"transparent"),sr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(sr.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,s=a%4===0,o=a>4,n=o?1:17,l=o?8:4,c=s?0:-1,h=o?255:15;return Qi.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${ke[Math.round(t)]}${ke[Math.round(r)]}${ke[Math.round(i)]}${ke[Math.round(a*255)]}`:`#${ke[Math.round(t)]}${ke[Math.round(r)]}${ke[Math.round(i)]}`}},Pe={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Pe.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return it.channel.clamp.h(parseFloat(r)*.9);case"rad":return it.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return it.channel.clamp.h(parseFloat(r)*360)}}return it.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Pe.re);if(!r)return;const[,i,a,s,o,n]=r;return Qi.set({h:Pe._hue2deg(i),s:it.channel.clamp.s(parseFloat(a)),l:it.channel.clamp.l(parseFloat(s)),a:o?it.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${it.lang.round(t)}, ${it.lang.round(r)}%, ${it.lang.round(i)}%, ${a})`:`hsl(${it.lang.round(t)}, ${it.lang.round(r)}%, ${it.lang.round(i)}%)`}},zr={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=zr.colors[e];if(t)return sr.parse(t)},stringify:e=>{const t=sr.stringify(e);for(const r in zr.colors)if(zr.colors[r]===t)return r}},Ir={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Ir.re);if(!r)return;const[,i,a,s,o,n,l,c,h]=r;return Qi.set({r:it.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:it.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:it.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?it.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${it.lang.round(t)}, ${it.lang.round(r)}, ${it.lang.round(i)}, ${it.lang.round(a)})`:`rgb(${it.lang.round(t)}, ${it.lang.round(r)}, ${it.lang.round(i)})`}},he={format:{keyword:zr,hex:sr,rgb:Ir,rgba:Ir,hsl:Pe,hsla:Pe},parse:e=>{if(typeof e!="string")return e;const t=sr.parse(e)||Ir.parse(e)||Pe.parse(e)||zr.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is($t.HSL)||e.data.r===void 0?Pe.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ir.stringify(e):sr.stringify(e)},vo=(e,t)=>{const r=he.parse(e);for(const i in t)r[i]=it.channel.clamp[i](t[i]);return he.stringify(r)},qr=(e,t,r=0,i=1)=>{if(typeof e!="number")return vo(e,{a:t});const a=Qi.set({r:it.channel.clamp.r(e),g:it.channel.clamp.g(t),b:it.channel.clamp.b(r),a:it.channel.clamp.a(i)});return he.stringify(a)},hf=e=>{const{r:t,g:r,b:i}=he.parse(e),a=.2126*it.channel.toLinear(t)+.7152*it.channel.toLinear(r)+.0722*it.channel.toLinear(i);return it.lang.round(a)},uf=e=>hf(e)>=.5,Qr=e=>!uf(e),wo=(e,t,r)=>{const i=he.parse(e),a=i[t],s=it.channel.clamp[t](a+r);return a!==s&&(i[t]=s),he.stringify(i)},j=(e,t)=>wo(e,"l",t),J=(e,t)=>wo(e,"l",-t),T=(e,t)=>{const r=he.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return vo(e,i)},df=(e,t,r=50)=>{const{r:i,g:a,b:s,a:o}=he.parse(e),{r:n,g:l,b:c,a:h}=he.parse(t),u=r/100,d=u*2-1,p=o-h,m=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,y=1-m,x=i*m+n*y,b=a*m+l*y,_=s*m+c*y,v=o*u+h*(1-u);return qr(x,b,_,v)},N=(e,t=100)=>{const r=he.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,df(r,e,t)};/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */const{entries:To,setPrototypeOf:Mn,isFrozen:ff,getPrototypeOf:pf,getOwnPropertyDescriptor:gf}=Object;let{freeze:qt,seal:Qt,create:za}=Object,{apply:qa,construct:Ha}=typeof Reflect<"u"&&Reflect;qt||(qt=function(t){return t});Qt||(Qt=function(t){return t});qa||(qa=function(t,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];return t.apply(r,a)});Ha||(Ha=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return new t(...i)});const ci=Ht(Array.prototype.forEach),mf=Ht(Array.prototype.lastIndexOf),An=Ht(Array.prototype.pop),Lr=Ht(Array.prototype.push),yf=Ht(Array.prototype.splice),bi=Ht(String.prototype.toLowerCase),va=Ht(String.prototype.toString),wa=Ht(String.prototype.match),Mr=Ht(String.prototype.replace),xf=Ht(String.prototype.indexOf),bf=Ht(String.prototype.trim),re=Ht(Object.prototype.hasOwnProperty),Nt=Ht(RegExp.prototype.test),Ar=Cf(TypeError);function Ht(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return qa(e,t,i)}}function Cf(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Ha(e,r)}}function ot(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bi;Mn&&Mn(e,null);let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const s=r(a);s!==a&&(ff(t)||(t[i]=s),a=s)}e[a]=!0}return e}function _f(e){for(let t=0;t<e.length;t++)re(e,t)||(e[t]=null);return e}function me(e){const t=za(null);for(const[r,i]of To(e))re(e,r)&&(Array.isArray(i)?t[r]=_f(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=me(i):t[r]=i);return t}function Er(e,t){for(;e!==null;){const i=gf(e,t);if(i){if(i.get)return Ht(i.get);if(typeof i.value=="function")return Ht(i.value)}e=pf(e)}function r(){return null}return r}const En=qt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ta=qt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ba=qt(["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"]),Sf=qt(["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"]),La=qt(["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"]),kf=qt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Fn=qt(["#text"]),$n=qt(["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","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ma=qt(["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","mask-type","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"]),Dn=qt(["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"]),hi=qt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vf=Qt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),wf=Qt(/<%[\w\W]*|[\w\W]*%>/gm),Tf=Qt(/\$\{[\w\W]*/gm),Bf=Qt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Lf=Qt(/^aria-[\-\w]+$/),Bo=Qt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Mf=Qt(/^(?:\w+script|data):/i),Af=Qt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Lo=Qt(/^html$/i),Ef=Qt(/^[a-z][.\w]*(-[.\w]+)+$/i);var On=Object.freeze({__proto__:null,ARIA_ATTR:Lf,ATTR_WHITESPACE:Af,CUSTOM_ELEMENT:Ef,DATA_ATTR:Bf,DOCTYPE_NAME:Lo,ERB_EXPR:wf,IS_ALLOWED_URI:Bo,IS_SCRIPT_OR_DATA:Mf,MUSTACHE_EXPR:vf,TMPLIT_EXPR:Tf});const Fr={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ff=function(){return typeof window>"u"?null:window},$f=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(i=r.getAttribute(a));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},In=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Mo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ff();const t=Q=>Mo(Q);if(t.version="3.3.0",t.removed=[],!e||!e.document||e.document.nodeType!==Fr.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,a=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:n,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:d,trustedTypes:p}=e,g=l.prototype,m=Er(g,"cloneNode"),y=Er(g,"remove"),x=Er(g,"nextSibling"),b=Er(g,"childNodes"),_=Er(g,"parentNode");if(typeof o=="function"){const Q=r.createElement("template");Q.content&&Q.content.ownerDocument&&(r=Q.content.ownerDocument)}let v,S="";const{implementation:C,createNodeIterator:w,createDocumentFragment:D,getElementsByTagName:P}=r,{importNode:I}=i;let E=In();t.isSupported=typeof To=="function"&&typeof _=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:W,ERB_EXPR:O,TMPLIT_EXPR:A,DATA_ATTR:L,ARIA_ATTR:B,IS_SCRIPT_OR_DATA:F,ATTR_WHITESPACE:M,CUSTOM_ELEMENT:z}=On;let{IS_ALLOWED_URI:V}=On,H=null;const ut=ot({},[...En,...Ta,...Ba,...La,...Fn]);let at=null;const pt=ot({},[...$n,...Ma,...Dn,...hi]);let nt=Object.seal(za(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}})),st=null,ct=null;const gt=Object.seal(za(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let yt=!0,mt=!0,_t=!1,ee=!0,Kt=!1,Se=!0,$e=!1,ga=!1,ma=!1,Ve=!1,ii=!1,ai=!1,ln=!0,cn=!1;const jd="user-content-";let ya=!0,Tr=!1,Xe={},Ke=null;const hn=ot({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let un=null;const dn=ot({},["audio","video","img","source","image","track"]);let xa=null;const fn=ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),si="http://www.w3.org/1998/Math/MathML",ni="http://www.w3.org/2000/svg",de="http://www.w3.org/1999/xhtml";let Ze=de,ba=!1,Ca=null;const Yd=ot({},[si,ni,de],va);let oi=ot({},["mi","mo","mn","ms","mtext"]),li=ot({},["annotation-xml"]);const Ud=ot({},["title","style","font","a","script"]);let Br=null;const Gd=["application/xhtml+xml","text/html"],Vd="text/html";let Lt=null,Qe=null;const Xd=r.createElement("form"),pn=function(k){return k instanceof RegExp||k instanceof Function},_a=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Qe&&Qe===k)){if((!k||typeof k!="object")&&(k={}),k=me(k),Br=Gd.indexOf(k.PARSER_MEDIA_TYPE)===-1?Vd:k.PARSER_MEDIA_TYPE,Lt=Br==="application/xhtml+xml"?va:bi,H=re(k,"ALLOWED_TAGS")?ot({},k.ALLOWED_TAGS,Lt):ut,at=re(k,"ALLOWED_ATTR")?ot({},k.ALLOWED_ATTR,Lt):pt,Ca=re(k,"ALLOWED_NAMESPACES")?ot({},k.ALLOWED_NAMESPACES,va):Yd,xa=re(k,"ADD_URI_SAFE_ATTR")?ot(me(fn),k.ADD_URI_SAFE_ATTR,Lt):fn,un=re(k,"ADD_DATA_URI_TAGS")?ot(me(dn),k.ADD_DATA_URI_TAGS,Lt):dn,Ke=re(k,"FORBID_CONTENTS")?ot({},k.FORBID_CONTENTS,Lt):hn,st=re(k,"FORBID_TAGS")?ot({},k.FORBID_TAGS,Lt):me({}),ct=re(k,"FORBID_ATTR")?ot({},k.FORBID_ATTR,Lt):me({}),Xe=re(k,"USE_PROFILES")?k.USE_PROFILES:!1,yt=k.ALLOW_ARIA_ATTR!==!1,mt=k.ALLOW_DATA_ATTR!==!1,_t=k.ALLOW_UNKNOWN_PROTOCOLS||!1,ee=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Kt=k.SAFE_FOR_TEMPLATES||!1,Se=k.SAFE_FOR_XML!==!1,$e=k.WHOLE_DOCUMENT||!1,Ve=k.RETURN_DOM||!1,ii=k.RETURN_DOM_FRAGMENT||!1,ai=k.RETURN_TRUSTED_TYPE||!1,ma=k.FORCE_BODY||!1,ln=k.SANITIZE_DOM!==!1,cn=k.SANITIZE_NAMED_PROPS||!1,ya=k.KEEP_CONTENT!==!1,Tr=k.IN_PLACE||!1,V=k.ALLOWED_URI_REGEXP||Bo,Ze=k.NAMESPACE||de,oi=k.MATHML_TEXT_INTEGRATION_POINTS||oi,li=k.HTML_INTEGRATION_POINTS||li,nt=k.CUSTOM_ELEMENT_HANDLING||{},k.CUSTOM_ELEMENT_HANDLING&&pn(k.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(nt.tagNameCheck=k.CUSTOM_ELEMENT_HANDLING.tagNameCheck),k.CUSTOM_ELEMENT_HANDLING&&pn(k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(nt.attributeNameCheck=k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(nt.allowCustomizedBuiltInElements=k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Kt&&(mt=!1),ii&&(Ve=!0),Xe&&(H=ot({},Fn),at=[],Xe.html===!0&&(ot(H,En),ot(at,$n)),Xe.svg===!0&&(ot(H,Ta),ot(at,Ma),ot(at,hi)),Xe.svgFilters===!0&&(ot(H,Ba),ot(at,Ma),ot(at,hi)),Xe.mathMl===!0&&(ot(H,La),ot(at,Dn),ot(at,hi))),k.ADD_TAGS&&(typeof k.ADD_TAGS=="function"?gt.tagCheck=k.ADD_TAGS:(H===ut&&(H=me(H)),ot(H,k.ADD_TAGS,Lt))),k.ADD_ATTR&&(typeof k.ADD_ATTR=="function"?gt.attributeCheck=k.ADD_ATTR:(at===pt&&(at=me(at)),ot(at,k.ADD_ATTR,Lt))),k.ADD_URI_SAFE_ATTR&&ot(xa,k.ADD_URI_SAFE_ATTR,Lt),k.FORBID_CONTENTS&&(Ke===hn&&(Ke=me(Ke)),ot(Ke,k.FORBID_CONTENTS,Lt)),ya&&(H["#text"]=!0),$e&&ot(H,["html","head","body"]),H.table&&(ot(H,["tbody"]),delete st.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ar('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ar('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=k.TRUSTED_TYPES_POLICY,S=v.createHTML("")}else v===void 0&&(v=$f(p,a)),v!==null&&typeof S=="string"&&(S=v.createHTML(""));qt&&qt(k),Qe=k}},gn=ot({},[...Ta,...Ba,...Sf]),mn=ot({},[...La,...kf]),Kd=function(k){let R=_(k);(!R||!R.tagName)&&(R={namespaceURI:Ze,tagName:"template"});const K=bi(k.tagName),xt=bi(R.tagName);return Ca[k.namespaceURI]?k.namespaceURI===ni?R.namespaceURI===de?K==="svg":R.namespaceURI===si?K==="svg"&&(xt==="annotation-xml"||oi[xt]):!!gn[K]:k.namespaceURI===si?R.namespaceURI===de?K==="math":R.namespaceURI===ni?K==="math"&&li[xt]:!!mn[K]:k.namespaceURI===de?R.namespaceURI===ni&&!li[xt]||R.namespaceURI===si&&!oi[xt]?!1:!mn[K]&&(Ud[K]||!gn[K]):!!(Br==="application/xhtml+xml"&&Ca[k.namespaceURI]):!1},ne=function(k){Lr(t.removed,{element:k});try{_(k).removeChild(k)}catch{y(k)}},De=function(k,R){try{Lr(t.removed,{attribute:R.getAttributeNode(k),from:R})}catch{Lr(t.removed,{attribute:null,from:R})}if(R.removeAttribute(k),k==="is")if(Ve||ii)try{ne(R)}catch{}else try{R.setAttribute(k,"")}catch{}},yn=function(k){let R=null,K=null;if(ma)k="<remove></remove>"+k;else{const St=wa(k,/^[\r\n\t ]+/);K=St&&St[0]}Br==="application/xhtml+xml"&&Ze===de&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const xt=v?v.createHTML(k):k;if(Ze===de)try{R=new d().parseFromString(xt,Br)}catch{}if(!R||!R.documentElement){R=C.createDocument(Ze,"template",null);try{R.documentElement.innerHTML=ba?S:xt}catch{}}const Ft=R.body||R.documentElement;return k&&K&&Ft.insertBefore(r.createTextNode(K),Ft.childNodes[0]||null),Ze===de?P.call(R,$e?"html":"body")[0]:$e?R.documentElement:Ft},xn=function(k){return w.call(k.ownerDocument||k,k,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Sa=function(k){return k instanceof u&&(typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||!(k.attributes instanceof h)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function")},bn=function(k){return typeof n=="function"&&k instanceof n};function fe(Q,k,R){ci(Q,K=>{K.call(t,k,R,Qe)})}const Cn=function(k){let R=null;if(fe(E.beforeSanitizeElements,k,null),Sa(k))return ne(k),!0;const K=Lt(k.nodeName);if(fe(E.uponSanitizeElement,k,{tagName:K,allowedTags:H}),Se&&k.hasChildNodes()&&!bn(k.firstElementChild)&&Nt(/<[/\w!]/g,k.innerHTML)&&Nt(/<[/\w!]/g,k.textContent)||k.nodeType===Fr.progressingInstruction||Se&&k.nodeType===Fr.comment&&Nt(/<[/\w]/g,k.data))return ne(k),!0;if(!(gt.tagCheck instanceof Function&>.tagCheck(K))&&(!H[K]||st[K])){if(!st[K]&&Sn(K)&&(nt.tagNameCheck instanceof RegExp&&Nt(nt.tagNameCheck,K)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(K)))return!1;if(ya&&!Ke[K]){const xt=_(k)||k.parentNode,Ft=b(k)||k.childNodes;if(Ft&&xt){const St=Ft.length;for(let jt=St-1;jt>=0;--jt){const pe=m(Ft[jt],!0);pe.__removalCount=(k.__removalCount||0)+1,xt.insertBefore(pe,x(k))}}}return ne(k),!0}return k instanceof l&&!Kd(k)||(K==="noscript"||K==="noembed"||K==="noframes")&&Nt(/<\/no(script|embed|frames)/i,k.innerHTML)?(ne(k),!0):(Kt&&k.nodeType===Fr.text&&(R=k.textContent,ci([W,O,A],xt=>{R=Mr(R,xt," ")}),k.textContent!==R&&(Lr(t.removed,{element:k.cloneNode()}),k.textContent=R)),fe(E.afterSanitizeElements,k,null),!1)},_n=function(k,R,K){if(ln&&(R==="id"||R==="name")&&(K in r||K in Xd))return!1;if(!(mt&&!ct[R]&&Nt(L,R))){if(!(yt&&Nt(B,R))){if(!(gt.attributeCheck instanceof Function&>.attributeCheck(R,k))){if(!at[R]||ct[R]){if(!(Sn(k)&&(nt.tagNameCheck instanceof RegExp&&Nt(nt.tagNameCheck,k)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(k))&&(nt.attributeNameCheck instanceof RegExp&&Nt(nt.attributeNameCheck,R)||nt.attributeNameCheck instanceof Function&&nt.attributeNameCheck(R,k))||R==="is"&&nt.allowCustomizedBuiltInElements&&(nt.tagNameCheck instanceof RegExp&&Nt(nt.tagNameCheck,K)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(K))))return!1}else if(!xa[R]){if(!Nt(V,Mr(K,M,""))){if(!((R==="src"||R==="xlink:href"||R==="href")&&k!=="script"&&xf(K,"data:")===0&&un[k])){if(!(_t&&!Nt(F,Mr(K,M,"")))){if(K)return!1}}}}}}}return!0},Sn=function(k){return k!=="annotation-xml"&&wa(k,z)},kn=function(k){fe(E.beforeSanitizeAttributes,k,null);const{attributes:R}=k;if(!R||Sa(k))return;const K={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:at,forceKeepAttr:void 0};let xt=R.length;for(;xt--;){const Ft=R[xt],{name:St,namespaceURI:jt,value:pe}=Ft,Je=Lt(St),ka=pe;let Mt=St==="value"?ka:bf(ka);if(K.attrName=Je,K.attrValue=Mt,K.keepAttr=!0,K.forceKeepAttr=void 0,fe(E.uponSanitizeAttribute,k,K),Mt=K.attrValue,cn&&(Je==="id"||Je==="name")&&(De(St,k),Mt=jd+Mt),Se&&Nt(/((--!?|])>)|<\/(style|title|textarea)/i,Mt)){De(St,k);continue}if(Je==="attributename"&&wa(Mt,"href")){De(St,k);continue}if(K.forceKeepAttr)continue;if(!K.keepAttr){De(St,k);continue}if(!ee&&Nt(/\/>/i,Mt)){De(St,k);continue}Kt&&ci([W,O,A],wn=>{Mt=Mr(Mt,wn," ")});const vn=Lt(k.nodeName);if(!_n(vn,Je,Mt)){De(St,k);continue}if(v&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!jt)switch(p.getAttributeType(vn,Je)){case"TrustedHTML":{Mt=v.createHTML(Mt);break}case"TrustedScriptURL":{Mt=v.createScriptURL(Mt);break}}if(Mt!==ka)try{jt?k.setAttributeNS(jt,St,Mt):k.setAttribute(St,Mt),Sa(k)?ne(k):An(t.removed)}catch{De(St,k)}}fe(E.afterSanitizeAttributes,k,null)},Zd=function Q(k){let R=null;const K=xn(k);for(fe(E.beforeSanitizeShadowDOM,k,null);R=K.nextNode();)fe(E.uponSanitizeShadowNode,R,null),Cn(R),kn(R),R.content instanceof s&&Q(R.content);fe(E.afterSanitizeShadowDOM,k,null)};return t.sanitize=function(Q){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=null,K=null,xt=null,Ft=null;if(ba=!Q,ba&&(Q="<!-->"),typeof Q!="string"&&!bn(Q))if(typeof Q.toString=="function"){if(Q=Q.toString(),typeof Q!="string")throw Ar("dirty is not a string, aborting")}else throw Ar("toString is not a function");if(!t.isSupported)return Q;if(ga||_a(k),t.removed=[],typeof Q=="string"&&(Tr=!1),Tr){if(Q.nodeName){const pe=Lt(Q.nodeName);if(!H[pe]||st[pe])throw Ar("root node is forbidden and cannot be sanitized in-place")}}else if(Q instanceof n)R=yn("<!---->"),K=R.ownerDocument.importNode(Q,!0),K.nodeType===Fr.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?R=K:R.appendChild(K);else{if(!Ve&&!Kt&&!$e&&Q.indexOf("<")===-1)return v&&ai?v.createHTML(Q):Q;if(R=yn(Q),!R)return Ve?null:ai?S:""}R&&ma&&ne(R.firstChild);const St=xn(Tr?Q:R);for(;xt=St.nextNode();)Cn(xt),kn(xt),xt.content instanceof s&&Zd(xt.content);if(Tr)return Q;if(Ve){if(ii)for(Ft=D.call(R.ownerDocument);R.firstChild;)Ft.appendChild(R.firstChild);else Ft=R;return(at.shadowroot||at.shadowrootmode)&&(Ft=I.call(i,Ft,!0)),Ft}let jt=$e?R.outerHTML:R.innerHTML;return $e&&H["!doctype"]&&R.ownerDocument&&R.ownerDocument.doctype&&R.ownerDocument.doctype.name&&Nt(Lo,R.ownerDocument.doctype.name)&&(jt="<!DOCTYPE "+R.ownerDocument.doctype.name+`>
|
|
3
|
+
`+jt),Kt&&ci([W,O,A],pe=>{jt=Mr(jt,pe," ")}),v&&ai?v.createHTML(jt):jt},t.setConfig=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_a(Q),ga=!0},t.clearConfig=function(){Qe=null,ga=!1},t.isValidAttribute=function(Q,k,R){Qe||_a({});const K=Lt(Q),xt=Lt(k);return _n(K,xt,R)},t.addHook=function(Q,k){typeof k=="function"&&Lr(E[Q],k)},t.removeHook=function(Q,k){if(k!==void 0){const R=mf(E[Q],k);return R===-1?void 0:yf(E[Q],R,1)[0]}return An(E[Q])},t.removeHooks=function(Q){E[Q]=[]},t.removeAllHooks=function(){E=In()},t}var gr=Mo(),Ao=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Hr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Df=/\s*%%.*\n/gm,or,Eo=(or=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(or,"UnknownDiagramError"),or),He={},Ts=f(function(e,t){e=e.replace(Ao,"").replace(Hr,"").replace(Df,`
|
|
4
|
+
`);for(const[r,{detector:i}]of Object.entries(He))if(i(e,t))return r;throw new Eo(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),ja=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)Fo(t,r,i)},"registerLazyLoadedDiagrams"),Fo=f((e,t,r)=>{He[e]&&$.warn(`Detector with key ${e} already exists. Overwriting.`),He[e]={detector:t,loader:r},$.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Of=f(e=>He[e].loader,"getDiagramLoader"),Ya=f((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>Ya(e,s,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=Ya(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),wt=Ya,Ji="#ffffff",ta="#f2f2f2",Wt=f((e,t)=>t?T(e,{s:-40,l:10}):T(e,{s:-40,l:-10}),"mkBorder"),lr,If=(lr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,i,a,s,o,n,l,c,h,u,d,p,g,m,y,x,b,_,v,S,C;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||T(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||T(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(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?J(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||J(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(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||j(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||J(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||J(this.mainBkg,10)):(this.rowOdd=this.rowOdd||j(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||j(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.darkMode)for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScale"+w]=J(this["cScale"+w],75);else for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScale"+w]=J(this["cScale"+w],25);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||N(this["cScale"+w]);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this.darkMode?this["cScalePeer"+w]=this["cScalePeer"+w]||j(this["cScale"+w],10):this["cScalePeer"+w]=this["cScalePeer"+w]||J(this["cScale"+w],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||T(this.mainBkg,{h:180,s:-15,l:t*(5+w*3)}),this["surfacePeer"+w]=this["surfacePeer"+w]||T(this.mainBkg,{h:180,s:-15,l:t*(8+w*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||T(this.primaryColor,{h:64}),this.fillType3=this.fillType3||T(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||T(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||T(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||T(this.primaryColor,{h:128}),this.fillType7=this.fillType7||T(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||T(this.primaryColor,{l:-10}),this.pie5=this.pie5||T(this.secondaryColor,{l:-10}),this.pie6=this.pie6||T(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||T(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||T(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:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.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||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qr(this.quadrant1Fill)?j(this.quadrant1Fill):J(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:((d=this.xyChart)==null?void 0:d.backgroundColor)||this.background,titleColor:((p=this.xyChart)==null?void 0:p.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((m=this.xyChart)==null?void 0:m.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((y=this.xyChart)==null?void 0:y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((x=this.xyChart)==null?void 0:x.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_=this.xyChart)==null?void 0:_.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((v=this.xyChart)==null?void 0:v.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((S=this.xyChart)==null?void 0:S.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.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?J(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||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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||Ji,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ta}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(lr,"Theme"),lr),Rf=f(e=>{const t=new If;return t.calculate(e),t},"getThemeVariables"),cr,Pf=(cr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=j(this.primaryColor,16),this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=j(N("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=qr(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=J("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=J(this.sectionBkgColor,10),this.taskBorderColor=qr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=qr(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||j(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||J(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,r,i,a,s,o,n,l,c,h,u,d,p,g,m,y,x,b,_,v,S;this.secondBkg=j(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=j(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=j(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=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(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||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||N(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScalePeer"+C]=this["cScalePeer"+C]||j(this["cScale"+C],10);for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{h:30,s:-30,l:-(-10+C*4)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{h:30,s:-30,l:-(-7+C*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qr(this.quadrant1Fill)?j(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((p=this.radar)==null?void 0:p.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((_=this.radar)==null?void 0:_.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((S=this.radar)==null?void 0:S.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?J(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=j(this.secondaryColor,20),this.git1=j(this.pie2||this.secondaryColor,20),this.git2=j(this.pie3||this.tertiaryColor,20),this.git3=j(this.pie4||T(this.primaryColor,{h:-30}),20),this.git4=j(this.pie5||T(this.primaryColor,{h:-60}),20),this.git5=j(this.pie6||T(this.primaryColor,{h:-90}),10),this.git6=j(this.pie7||T(this.primaryColor,{h:60}),10),this.git7=j(this.pie8||T(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(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||j(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||j(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(cr,"Theme"),cr),Nf=f(e=>{const t=new Pf;return t.calculate(e),t},"getThemeVariables"),hr,Wf=(hr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=T(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(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=qr(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 t,r,i,a,s,o,n,l,c,h,u,d,p,g,m,y,x,b,_,v,S;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||J(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||J(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=J(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||J(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||T(this["cScale"+C],{h:180});for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{h:30,l:-(5+C*5)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{h:30,l:-(7+C*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||N(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||N(this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=j(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||j(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||j(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=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||T(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||T(this.primaryColor,{l:-10}),this.pie5=this.pie5||T(this.secondaryColor,{l:-30}),this.pie6=this.pie6||T(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||T(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||T(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||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qr(this.quadrant1Fill)?j(this.quadrant1Fill):J(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((d=this.xyChart)==null?void 0:d.titleColor)||this.primaryTextColor,xAxisTitleColor:((p=this.xyChart)==null?void 0:p.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_=this.xyChart)==null?void 0:_.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((S=this.xyChart)==null?void 0:S.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||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||J(N(this.git0),25),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(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||Ji,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ta}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(hr,"Theme"),hr),zf=f(e=>{const t=new Wf;return t.calculate(e),t},"getThemeVariables"),ur,qf=(ur=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=j("#cde498",10),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.primaryColor),this.lineColor=N(this.background),this.textColor=N(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 t,r,i,a,s,o,n,l,c,h,u,d,p,g,m,y,x,b,_,v,S;this.actorBorder=J(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||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||J(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||J(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=J(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||J(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||T(this["cScale"+C],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{h:30,s:-30,l:-(5+C*5)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{h:30,s:-30,l:-(8+C*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||j(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||j(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=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(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||T(this.primaryColor,{l:-30}),this.pie5=this.pie5||T(this.secondaryColor,{l:-30}),this.pie6=this.pie6||T(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||T(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||T(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||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qr(this.quadrant1Fill)?j(this.quadrant1Fill):J(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((d=this.xyChart)==null?void 0:d.titleColor)||this.primaryTextColor,xAxisTitleColor:((p=this.xyChart)==null?void 0:p.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_=this.xyChart)==null?void 0:_.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((S=this.xyChart)==null?void 0:S.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||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(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||Ji,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ta}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ur,"Theme"),ur),Hf=f(e=>{const t=new qf;return t.calculate(e),t},"getThemeVariables"),dr,jf=(dr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=j(this.contrast,55),this.background="#ffffff",this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(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||j(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,s,o,n,l,c,h,u,d,p,g,m,y,x,b,_,v,S;this.secondBkg=j(this.contrast,55),this.border2=this.contrast,this.actorBorder=j(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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||N(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||j(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||J(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{l:-(5+C*5)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{l:-(8+C*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=j(this.contrast,30),this.sectionBkgColor2=j(this.contrast,30),this.taskBorderColor=J(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=j(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=J(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=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];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||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Qr(this.quadrant1Fill)?j(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((p=this.radar)==null?void 0:p.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((_=this.radar)==null?void 0:_.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((S=this.radar)==null?void 0:S.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=J(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||T(this.primaryColor,{h:-30}),this.git4=this.pie5||T(this.primaryColor,{h:-60}),this.git5=this.pie6||T(this.primaryColor,{h:-90}),this.git6=this.pie7||T(this.primaryColor,{h:60}),this.git7=this.pie8||T(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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||Ji,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ta}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(dr,"Theme"),dr),Yf=f(e=>{const t=new jf;return t.calculate(e),t},"getThemeVariables"),be={base:{getThemeVariables:Rf},dark:{getThemeVariables:Nf},default:{getThemeVariables:zf},forest:{getThemeVariables:Hf},neutral:{getThemeVariables:Yf}},oe={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,layoutAlgorithm:"cose-bilkent"},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},$o={...oe,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:be.default.getThemeVariables(),sequence:{...oe.sequence,messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:f(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:f(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...oe.gantt,tickInterval:void 0,useWidth:void 0},c4:{...oe.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...oe.flowchart,inheritDir:!1},external_personFont:f(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:f(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:f(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:f(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:f(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:f(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:f(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:f(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:f(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:f(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:f(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:f(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:f(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:f(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:f(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:f(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:f(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:f(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:f(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:f(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...oe.pie,useWidth:984},xyChart:{...oe.xyChart,useWidth:void 0},requirement:{...oe.requirement,useWidth:void 0},packet:{...oe.packet},radar:{...oe.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},Do=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Do(e[i],"")]:[...r,t+i],[]),"keyify"),Uf=new Set(Do($o,"")),Oo=$o,Mi=f(e=>{if($.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Mi(t));return}for(const t of Object.keys(e)){if($.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Uf.has(t)||e[t]==null){$.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){$.debug("sanitizing object",t),Mi(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&($.debug("sanitizing css option",t),e[t]=Gf(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}$.debug("After sanitization",e)}},"sanitizeDirective"),Gf=f(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),mr=Object.freeze(Oo),Ut=wt({},mr),Ai,je=[],jr=wt({},mr),ea=f((e,t)=>{let r=wt({},e),i={};for(const a of t)Po(a),i=wt(i,a);if(r=wt(r,i),i.theme&&i.theme in be){const a=wt({},Ai),s=wt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in be&&(r.themeVariables=be[r.theme].getThemeVariables(s))}return jr=r,No(jr),jr},"updateCurrentConfig"),Vf=f(e=>(Ut=wt({},mr),Ut=wt(Ut,e),e.theme&&be[e.theme]&&(Ut.themeVariables=be[e.theme].getThemeVariables(e.themeVariables)),ea(Ut,je),Ut),"setSiteConfig"),Xf=f(e=>{Ai=wt({},e)},"saveConfigFromInitialize"),Kf=f(e=>(Ut=wt(Ut,e),ea(Ut,je),Ut),"updateSiteConfig"),Io=f(()=>wt({},Ut),"getSiteConfig"),Ro=f(e=>(No(e),wt(jr,e),Ot()),"setConfig"),Ot=f(()=>wt({},jr),"getConfig"),Po=f(e=>{e&&(["secure",...Ut.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&($.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Po(e[t])}))},"sanitize"),Zf=f(e=>{var t;Mi(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),je.push(e),ea(Ut,je)},"addDirective"),Ei=f((e=Ut)=>{je=[],ea(e,je)},"reset"),Qf={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Rn={},Jf=f(e=>{Rn[e]||($.warn(Qf[e]),Rn[e]=!0)},"issueWarning"),No=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Jf("LAZY_LOAD_DEPRECATED")},"checkConfig"),u2=f(()=>{let e={};Ai&&(e=wt(e,Ai));for(const t of je)e=wt(e,t);return e},"getUserDefinedConfig"),Jr=/<br\s*\/?>/gi,tp=f(e=>e?qo(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),ep=(()=>{let e=!1;return()=>{e||(Wo(),e=!0)}})();function Wo(){const e="data-temp-href-target";gr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),gr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}f(Wo,"setupDompurifyHooks");var zo=f(e=>(ep(),gr.sanitize(e)),"removeScript"),Pn=f((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=zo(e):i!=="loose"&&(e=qo(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=sp(e))}return e},"sanitizeMore"),Jt=f((e,t)=>e&&(t.dompurifyConfig?e=gr.sanitize(Pn(e,t),t.dompurifyConfig).toString():e=gr.sanitize(Pn(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),rp=f((e,t)=>typeof e=="string"?Jt(e,t):e.flat().map(r=>Jt(r,t)),"sanitizeTextOrArray"),ip=f(e=>Jr.test(e),"hasBreaks"),ap=f(e=>e.split(Jr),"splitBreaks"),sp=f(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),qo=f(e=>e.replace(Jr,"#br#"),"breakToPlaceholder"),np=f(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Bt=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),op=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),lp=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Nn=f(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const s=t[i-1],o=t[i+1];cp(s,o)&&(a=s+","+o,i++,r.pop())}r.push(hp(a))}return r.join("")},"parseGenericTypes"),Ua=f((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),cp=f((e,t)=>{const r=Ua(e,"~"),i=Ua(t,"~");return r===1&&i===1},"shouldCombineSets"),hp=f(e=>{const t=Ua(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),s=i.lastIndexOf("~");for(;a!==-1&&s!==-1&&a!==s;)i[a]="<",i[s]=">",a=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Wn=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ga=/\$\$(.*)\$\$/g,yr=f(e=>{var t;return(((t=e.match(Ga))==null?void 0:t.length)??0)>0},"hasKatex"),d2=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Bs(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),up=f(async(e,t)=>{if(!yr(e))return e;if(!(Wn()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ga,"MathML is unsupported in this environment.");{const{default:r}=await ft(async()=>{const{default:a}=await import("./index-Cx_WzRmY.js").then(s=>s.aj);return{default:a}},__vite__mapDeps([0,1])),i=t.forceLegacyMathML||!Wn()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Jr).map(a=>yr(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Ga,(a,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Bs=f(async(e,t)=>Jt(await up(e,t),t),"renderKatexSanitized"),Sr={getRows:tp,sanitizeText:Jt,sanitizeTextOrArray:rp,hasBreaks:ip,splitBreaks:ap,lineBreakRegex:Jr,removeScript:zo,getUrl:np,evaluate:Bt,getMax:op,getMin:lp},dp=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),fp=f(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Ho=f(function(e,t,r,i){const a=fp(t,r,i);dp(e,a)},"configureSvgSize"),pp=f(function(e,t,r,i){const a=t.node().getBBox(),s=a.width,o=a.height;$.info(`SVG bounds: ${s}x${o}`,a);let n=0,l=0;$.info(`Graph bounds: ${n}x${l}`,e),n=s+r*2,l=o+r*2,$.info(`Calculated bounds: ${n}x${l}`),Ho(t,l,n,i);const c=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Ci={},gp=f((e,t,r)=>{let i="";return e in Ci&&Ci[e]?i=Ci[e](r):$.warn(`No theme found for ${e}`),` & {
|
|
5
|
+
font-family: ${r.fontFamily};
|
|
6
|
+
font-size: ${r.fontSize};
|
|
7
|
+
fill: ${r.textColor}
|
|
8
|
+
}
|
|
9
|
+
@keyframes edge-animation-frame {
|
|
10
|
+
from {
|
|
11
|
+
stroke-dashoffset: 0;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
@keyframes dash {
|
|
15
|
+
to {
|
|
16
|
+
stroke-dashoffset: 0;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
& .edge-animation-slow {
|
|
20
|
+
stroke-dasharray: 9,5 !important;
|
|
21
|
+
stroke-dashoffset: 900;
|
|
22
|
+
animation: dash 50s linear infinite;
|
|
23
|
+
stroke-linecap: round;
|
|
24
|
+
}
|
|
25
|
+
& .edge-animation-fast {
|
|
26
|
+
stroke-dasharray: 9,5 !important;
|
|
27
|
+
stroke-dashoffset: 900;
|
|
28
|
+
animation: dash 20s linear infinite;
|
|
29
|
+
stroke-linecap: round;
|
|
30
|
+
}
|
|
31
|
+
/* Classes common for multiple diagrams */
|
|
32
|
+
|
|
33
|
+
& .error-icon {
|
|
34
|
+
fill: ${r.errorBkgColor};
|
|
35
|
+
}
|
|
36
|
+
& .error-text {
|
|
37
|
+
fill: ${r.errorTextColor};
|
|
38
|
+
stroke: ${r.errorTextColor};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
& .edge-thickness-normal {
|
|
42
|
+
stroke-width: 1px;
|
|
43
|
+
}
|
|
44
|
+
& .edge-thickness-thick {
|
|
45
|
+
stroke-width: 3.5px
|
|
46
|
+
}
|
|
47
|
+
& .edge-pattern-solid {
|
|
48
|
+
stroke-dasharray: 0;
|
|
49
|
+
}
|
|
50
|
+
& .edge-thickness-invisible {
|
|
51
|
+
stroke-width: 0;
|
|
52
|
+
fill: none;
|
|
53
|
+
}
|
|
54
|
+
& .edge-pattern-dashed{
|
|
55
|
+
stroke-dasharray: 3;
|
|
56
|
+
}
|
|
57
|
+
.edge-pattern-dotted {
|
|
58
|
+
stroke-dasharray: 2;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
& .marker {
|
|
62
|
+
fill: ${r.lineColor};
|
|
63
|
+
stroke: ${r.lineColor};
|
|
64
|
+
}
|
|
65
|
+
& .marker.cross {
|
|
66
|
+
stroke: ${r.lineColor};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
& svg {
|
|
70
|
+
font-family: ${r.fontFamily};
|
|
71
|
+
font-size: ${r.fontSize};
|
|
72
|
+
}
|
|
73
|
+
& p {
|
|
74
|
+
margin: 0
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
${i}
|
|
78
|
+
|
|
79
|
+
${t}
|
|
80
|
+
`},"getStyles"),mp=f((e,t)=>{t!==void 0&&(Ci[e]=t)},"addStylesForDiagram"),yp=gp,jo={};sf(jo,{clear:()=>xp,getAccDescription:()=>Sp,getAccTitle:()=>Cp,getDiagramTitle:()=>vp,setAccDescription:()=>_p,setAccTitle:()=>bp,setDiagramTitle:()=>kp});var Ls="",Ms="",As="",Es=f(e=>Jt(e,Ot()),"sanitizeText"),xp=f(()=>{Ls="",As="",Ms=""},"clear"),bp=f(e=>{Ls=Es(e).replace(/^\s+/g,"")},"setAccTitle"),Cp=f(()=>Ls,"getAccTitle"),_p=f(e=>{As=Es(e).replace(/\n\s+/g,`
|
|
81
|
+
`)},"setAccDescription"),Sp=f(()=>As,"getAccDescription"),kp=f(e=>{Ms=Es(e)},"setDiagramTitle"),vp=f(()=>Ms,"getDiagramTitle"),zn=$,wp=ws,dt=Ot,f2=Ro,p2=mr,Fs=f(e=>Jt(e,dt()),"sanitizeText"),Tp=pp,Bp=f(()=>jo,"getCommonDb"),Fi={},$i=f((e,t,r)=>{var i;Fi[e]&&zn.warn(`Diagram with id ${e} already registered. Overwriting.`),Fi[e]=t,r&&Fo(e,r),mp(e,t.styles),(i=t.injectUtils)==null||i.call(t,zn,wp,dt,Fs,Tp,Bp(),()=>{})},"registerDiagram"),Va=f(e=>{if(e in Fi)return Fi[e];throw new Lp(e)},"getDiagram"),fr,Lp=(fr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(fr,"DiagramNotFoundError"),fr);const Xa=Math.PI,Ka=2*Xa,Ie=1e-6,Mp=Ka-Ie;function Yo(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Ap(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Yo;const r=10**t;return function(i){this._+=i[0];for(let a=1,s=i.length;a<s;++a)this._+=Math.round(arguments[a]*r)/r+i[a]}}class Ep{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Yo:Ap(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,a){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+a}`}bezierCurveTo(t,r,i,a,s,o){this._append`C${+t},${+r},${+i},${+a},${this._x1=+s},${this._y1=+o}`}arcTo(t,r,i,a,s){if(t=+t,r=+r,i=+i,a=+a,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,n=this._y1,l=i-t,c=a-r,h=o-t,u=n-r,d=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Ie)if(!(Math.abs(u*l-c*h)>Ie)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let p=i-o,g=a-n,m=l*l+c*c,y=p*p+g*g,x=Math.sqrt(m),b=Math.sqrt(d),_=s*Math.tan((Xa-Math.acos((m+d-y)/(2*x*b)))/2),v=_/b,S=_/x;Math.abs(v-1)>Ie&&this._append`L${t+v*h},${r+v*u}`,this._append`A${s},${s},0,0,${+(u*p>h*g)},${this._x1=t+S*l},${this._y1=r+S*c}`}}arc(t,r,i,a,s,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(a),l=i*Math.sin(a),c=t+n,h=r+l,u=1^o,d=o?a-s:s-a;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Ie||Math.abs(this._y1-h)>Ie)&&this._append`L${c},${h}`,i&&(d<0&&(d=d%Ka+Ka),d>Mp?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:d>Ie&&this._append`A${i},${i},0,${+(d>=Xa)},${u},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+a}h${-i}Z`}toString(){return this._}}function tr(e){return function(){return e}}const g2=Math.abs,m2=Math.atan2,y2=Math.cos,x2=Math.max,b2=Math.min,C2=Math.sin,_2=Math.sqrt,qn=1e-12,$s=Math.PI,Hn=$s/2,S2=2*$s;function k2(e){return e>1?0:e<-1?$s:Math.acos(e)}function v2(e){return e>=1?Hn:e<=-1?-Hn:Math.asin(e)}function Fp(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new Ep(t)}function $p(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Uo(e){this._context=e}Uo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Di(e){return new Uo(e)}function Dp(e){return e[0]}function Op(e){return e[1]}function Ip(e,t){var r=tr(!0),i=null,a=Di,s=null,o=Fp(n);e=typeof e=="function"?e:e===void 0?Dp:tr(e),t=typeof t=="function"?t:t===void 0?Op:tr(t);function n(l){var c,h=(l=$p(l)).length,u,d=!1,p;for(i==null&&(s=a(p=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===d&&((d=!d)?s.lineStart():s.lineEnd()),d&&s.point(+e(u,c,l),+t(u,c,l));if(p)return s=null,p+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:tr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:tr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:tr(!!l),n):r},n.curve=function(l){return arguments.length?(a=l,i!=null&&(s=a(i)),n):a},n.context=function(l){return arguments.length?(l==null?i=s=null:s=a(i=l),n):i},n}class Go{constructor(t,r){this._context=t,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(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Vo(e){return new Go(e,!0)}function Xo(e){return new Go(e,!1)}function Te(){}function Oi(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function ra(e){this._context=e}ra.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Oi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:Oi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _i(e){return new ra(e)}function Ko(e){this._context=e}Ko.prototype={areaStart:Te,areaEnd:Te,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Oi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Rp(e){return new Ko(e)}function Zo(e){this._context=e}Zo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,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+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Oi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Pp(e){return new Zo(e)}function Qo(e,t){this._basis=new ra(e),this._beta=t}Qo.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],a=t[0],s=e[r]-i,o=t[r]-a,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*s),this._beta*t[n]+(1-this._beta)*(a+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Np=function e(t){function r(i){return t===1?new ra(i):new Qo(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function Ii(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Ds(e,t){this._context=e,this._k=(1-t)/6}Ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ii(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ii(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Jo=function e(t){function r(i){return new Ds(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Os(e,t){this._context=e,this._k=(1-t)/6}Os.prototype={areaStart:Te,areaEnd:Te,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ii(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Wp=function e(t){function r(i){return new Os(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Is(e,t){this._context=e,this._k=(1-t)/6}Is.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,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:Ii(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const zp=function e(t){function r(i){return new Is(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Rs(e,t,r){var i=e._x1,a=e._y1,s=e._x2,o=e._y2;if(e._l01_a>qn){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,a=(a*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>qn){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,a,s,o,e._x2,e._y2)}function tl(e,t){this._context=e,this._alpha=t}tl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Rs(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const el=function e(t){function r(i){return t?new tl(i,t):new Ds(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function rl(e,t){this._context=e,this._alpha=t}rl.prototype={areaStart:Te,areaEnd:Te,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Rs(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const qp=function e(t){function r(i){return t?new rl(i,t):new Os(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function il(e,t){this._context=e,this._alpha=t}il.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Rs(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Hp=function e(t){function r(i){return t?new il(i,t):new Is(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function al(e){this._context=e}al.prototype={areaStart:Te,areaEnd:Te,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function jp(e){return new al(e)}function jn(e){return e<0?-1:1}function Yn(e,t,r){var i=e._x1-e._x0,a=t-e._x1,s=(e._y1-e._y0)/(i||a<0&&-0),o=(r-e._y1)/(a||i<0&&-0),n=(s*a+o*i)/(i+a);return(jn(s)+jn(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(n))||0}function Un(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Aa(e,t,r){var i=e._x0,a=e._y0,s=e._x1,o=e._y1,n=(s-i)/3;e._context.bezierCurveTo(i+n,a+n*t,s-n,o-n*r,s,o)}function Ri(e){this._context=e}Ri.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Aa(this,this._t0,Un(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Aa(this,Un(this,r=Yn(this,e,t)),r);break;default:Aa(this,this._t0,r=Yn(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function sl(e){this._context=new nl(e)}(sl.prototype=Object.create(Ri.prototype)).point=function(e,t){Ri.prototype.point.call(this,t,e)};function nl(e){this._context=e}nl.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,a,s){this._context.bezierCurveTo(t,e,i,r,s,a)}};function ol(e){return new Ri(e)}function ll(e){return new sl(e)}function cl(e){this._context=e}cl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Gn(e),a=Gn(t),s=0,o=1;o<r;++s,++o)this._context.bezierCurveTo(i[0][s],a[0][s],i[1][s],a[1][s],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Gn(e){var t,r=e.length-1,i,a=new Array(r),s=new Array(r),o=new Array(r);for(a[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,s[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,s[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=a[t]/s[t-1],s[t]-=i,o[t]-=i*o[t-1];for(a[r-1]=o[r-1]/s[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/s[t];for(s[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-a[t+1];return[a,s]}function hl(e){return new cl(e)}function ia(e,t){this._context=e,this._t=t}ia.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function ul(e){return new ia(e,.5)}function dl(e){return new ia(e,0)}function fl(e){return new ia(e,1)}var Yp=f(e=>{var a;const{securityLevel:t}=dt();let r=ht("body");if(t==="sandbox"){const o=((a=ht(`#i${e}`).node())==null?void 0:a.contentDocument)??document;r=ht(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Ps(e){return typeof e>"u"||e===null}f(Ps,"isNothing");function pl(e){return typeof e=="object"&&e!==null}f(pl,"isObject");function gl(e){return Array.isArray(e)?e:Ps(e)?[]:[e]}f(gl,"toArray");function ml(e,t){var r,i,a,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)a=s[r],e[a]=t[a];return e}f(ml,"extend");function yl(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}f(yl,"repeat");function xl(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}f(xl,"isNegativeZero");var Up=Ps,Gp=pl,Vp=gl,Xp=yl,Kp=xl,Zp=ml,Tt={isNothing:Up,isObject:Gp,toArray:Vp,repeat:Xp,isNegativeZero:Kp,extend:Zp};function Ns(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
82
|
+
|
|
83
|
+
`+e.mark.snippet),i+" "+r):i}f(Ns,"formatError");function xr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Ns(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}f(xr,"YAMLException$1");xr.prototype=Object.create(Error.prototype);xr.prototype.constructor=xr;xr.prototype.toString=f(function(t){return this.name+": "+Ns(this,t)},"toString");var Gt=xr;function Si(e,t,r,i,a){var s="",o="",n=Math.floor(a/2)-1;return i-t>n&&(s=" ... ",t=i-n+s.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+s.length}}f(Si,"getLine");function ki(e,t){return Tt.repeat(" ",t-e.length)+e}f(ki,"padStart");function bl(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],a=[],s,o=-1;s=r.exec(e.buffer);)a.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,a.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=Si(e.buffer,i[o-l],a[o-l],e.position-(i[o]-i[o-l]),u),n=Tt.repeat(" ",t.indent)+ki((e.line-l+1).toString(),h)+" | "+c.str+`
|
|
84
|
+
`+n;for(c=Si(e.buffer,i[o],a[o],e.position,u),n+=Tt.repeat(" ",t.indent)+ki((e.line+1).toString(),h)+" | "+c.str+`
|
|
85
|
+
`,n+=Tt.repeat("-",t.indent+h+3+c.pos)+`^
|
|
86
|
+
`,l=1;l<=t.linesAfter&&!(o+l>=a.length);l++)c=Si(e.buffer,i[o+l],a[o+l],e.position-(i[o]-i[o+l]),u),n+=Tt.repeat(" ",t.indent)+ki((e.line+l+1).toString(),h)+" | "+c.str+`
|
|
87
|
+
`;return n.replace(/\n$/,"")}f(bl,"makeSnippet");var Qp=bl,Jp=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],tg=["scalar","sequence","mapping"];function Cl(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}f(Cl,"compileStyleAliases");function _l(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Jp.indexOf(r)===-1)throw new Gt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Cl(t.styleAliases||null),tg.indexOf(this.kind)===-1)throw new Gt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}f(_l,"Type$1");var It=_l;function Za(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(a=o)}),r[a]=i}),r}f(Za,"compileList");function Sl(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(f(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}f(Sl,"compileMap");function Pi(e){return this.extend(e)}f(Pi,"Schema$1");Pi.prototype.extend=f(function(t){var r=[],i=[];if(t instanceof It)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Gt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof It))throw new Gt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Gt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new Gt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof It))throw new Gt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(Pi.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=Za(a,"implicit"),a.compiledExplicit=Za(a,"explicit"),a.compiledTypeMap=Sl(a.compiledImplicit,a.compiledExplicit),a},"extend");var eg=Pi,rg=new It("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(e){return e!==null?e:""},"construct")}),ig=new It("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(e){return e!==null?e:[]},"construct")}),ag=new It("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(e){return e!==null?e:{}},"construct")}),sg=new eg({explicit:[rg,ig,ag]});function kl(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}f(kl,"resolveYamlNull");function vl(){return null}f(vl,"constructYamlNull");function wl(e){return e===null}f(wl,"isNull");var ng=new It("tag:yaml.org,2002:null",{kind:"scalar",resolve:kl,construct:vl,predicate:wl,represent:{canonical:f(function(){return"~"},"canonical"),lowercase:f(function(){return"null"},"lowercase"),uppercase:f(function(){return"NULL"},"uppercase"),camelcase:f(function(){return"Null"},"camelcase"),empty:f(function(){return""},"empty")},defaultStyle:"lowercase"});function Tl(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}f(Tl,"resolveYamlBoolean");function Bl(e){return e==="true"||e==="True"||e==="TRUE"}f(Bl,"constructYamlBoolean");function Ll(e){return Object.prototype.toString.call(e)==="[object Boolean]"}f(Ll,"isBoolean");var og=new It("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Tl,construct:Bl,predicate:Ll,represent:{lowercase:f(function(e){return e?"true":"false"},"lowercase"),uppercase:f(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:f(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Ml(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}f(Ml,"isHexCode");function Al(e){return 48<=e&&e<=55}f(Al,"isOctCode");function El(e){return 48<=e&&e<=57}f(El,"isDecCode");function Fl(e){if(e===null)return!1;var t=e.length,r=0,i=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;i=!0}return i&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!Ml(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!Al(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!El(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}f(Fl,"resolveYamlInteger");function $l(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}f($l,"constructYamlInteger");function Dl(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Tt.isNegativeZero(e)}f(Dl,"isInteger");var lg=new It("tag:yaml.org,2002:int",{kind:"scalar",resolve:Fl,construct:$l,predicate:Dl,represent:{binary:f(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:f(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:f(function(e){return e.toString(10)},"decimal"),hexadecimal:f(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),cg=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Ol(e){return!(e===null||!cg.test(e)||e[e.length-1]==="_")}f(Ol,"resolveYamlFloat");function Il(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}f(Il,"constructYamlFloat");var hg=/^[-+]?[0-9]+e/;function Rl(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Tt.isNegativeZero(e))return"-0.0";return r=e.toString(10),hg.test(r)?r.replace("e",".e"):r}f(Rl,"representYamlFloat");function Pl(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Tt.isNegativeZero(e))}f(Pl,"isFloat");var ug=new It("tag:yaml.org,2002:float",{kind:"scalar",resolve:Ol,construct:Il,predicate:Pl,represent:Rl,defaultStyle:"lowercase"}),Nl=sg.extend({implicit:[ng,og,lg,ug]}),dg=Nl,Wl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),zl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function ql(e){return e===null?!1:Wl.exec(e)!==null||zl.exec(e)!==null}f(ql,"resolveYamlTimestamp");function Hl(e){var t,r,i,a,s,o,n,l=0,c=null,h,u,d;if(t=Wl.exec(e),t===null&&(t=zl.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(s=+t[4],o=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),d=new Date(Date.UTC(r,i,a,s,o,n,l)),c&&d.setTime(d.getTime()-c),d}f(Hl,"constructYamlTimestamp");function jl(e){return e.toISOString()}f(jl,"representYamlTimestamp");var fg=new It("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ql,construct:Hl,instanceOf:Date,represent:jl});function Yl(e){return e==="<<"||e===null}f(Yl,"resolveYamlMerge");var pg=new It("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Yl}),Ws=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
88
|
+
\r`;function Ul(e){if(e===null)return!1;var t,r,i=0,a=e.length,s=Ws;for(r=0;r<a;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}f(Ul,"resolveYamlBinary");function Gl(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,s=Ws,o=0,n=[];for(t=0;t<a;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|s.indexOf(i.charAt(t));return r=a%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}f(Gl,"constructYamlBinary");function Vl(e){var t="",r=0,i,a,s=e.length,o=Ws;for(i=0;i<s;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return a=s%3,a===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):a===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):a===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}f(Vl,"representYamlBinary");function Xl(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}f(Xl,"isBinary");var gg=new It("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ul,construct:Gl,predicate:Xl,represent:Vl}),mg=Object.prototype.hasOwnProperty,yg=Object.prototype.toString;function Kl(e){if(e===null)return!0;var t=[],r,i,a,s,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(a=n[r],o=!1,yg.call(a)!=="[object Object]")return!1;for(s in a)if(mg.call(a,s))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}f(Kl,"resolveYamlOmap");function Zl(e){return e!==null?e:[]}f(Zl,"constructYamlOmap");var xg=new It("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Kl,construct:Zl}),bg=Object.prototype.toString;function Ql(e){if(e===null)return!0;var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],bg.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;s[t]=[a[0],i[a[0]]]}return!0}f(Ql,"resolveYamlPairs");function Jl(e){if(e===null)return[];var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],a=Object.keys(i),s[t]=[a[0],i[a[0]]];return s}f(Jl,"constructYamlPairs");var Cg=new It("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ql,construct:Jl}),_g=Object.prototype.hasOwnProperty;function tc(e){if(e===null)return!0;var t,r=e;for(t in r)if(_g.call(r,t)&&r[t]!==null)return!1;return!0}f(tc,"resolveYamlSet");function ec(e){return e!==null?e:{}}f(ec,"constructYamlSet");var Sg=new It("tag:yaml.org,2002:set",{kind:"mapping",resolve:tc,construct:ec}),rc=dg.extend({implicit:[fg,pg],explicit:[gg,xg,Cg,Sg]}),Be=Object.prototype.hasOwnProperty,Ni=1,ic=2,ac=3,Wi=4,Ea=1,kg=2,Vn=3,vg=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,wg=/[\x85\u2028\u2029]/,Tg=/[,\[\]\{\}]/,sc=/^(?:!|!!|![a-z\-]+!)$/i,nc=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Qa(e){return Object.prototype.toString.call(e)}f(Qa,"_class");function ae(e){return e===10||e===13}f(ae,"is_EOL");function we(e){return e===9||e===32}f(we,"is_WHITE_SPACE");function zt(e){return e===9||e===32||e===10||e===13}f(zt,"is_WS_OR_EOL");function Ne(e){return e===44||e===91||e===93||e===123||e===125}f(Ne,"is_FLOW_INDICATOR");function oc(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}f(oc,"fromHexCode");function lc(e){return e===120?2:e===117?4:e===85?8:0}f(lc,"escapedHexLen");function cc(e){return 48<=e&&e<=57?e-48:-1}f(cc,"fromDecimalCode");function Ja(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
89
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}f(Ja,"simpleEscapeSequence");function hc(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}f(hc,"charFromCodepoint");var uc=new Array(256),dc=new Array(256);for(Oe=0;Oe<256;Oe++)uc[Oe]=Ja(Oe)?1:0,dc[Oe]=Ja(Oe);var Oe;function fc(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||rc,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}f(fc,"State$1");function zs(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Qp(r),new Gt(t,r)}f(zs,"generateError");function Z(e,t){throw zs(e,t)}f(Z,"throwError");function Yr(e,t){e.onWarning&&e.onWarning.call(null,zs(e,t))}f(Yr,"throwWarning");var Xn={YAML:f(function(t,r,i){var a,s,o;t.version!==null&&Z(t,"duplication of %YAML directive"),i.length!==1&&Z(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),a===null&&Z(t,"ill-formed argument of the YAML directive"),s=parseInt(a[1],10),o=parseInt(a[2],10),s!==1&&Z(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Yr(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function(t,r,i){var a,s;i.length!==2&&Z(t,"TAG directive accepts exactly two arguments"),a=i[0],s=i[1],sc.test(a)||Z(t,"ill-formed tag handle (first argument) of the TAG directive"),Be.call(t.tagMap,a)&&Z(t,'there is a previously declared suffix for "'+a+'" tag handle'),nc.test(s)||Z(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Z(t,"tag prefix is malformed: "+s)}t.tagMap[a]=s},"handleTagDirective")};function Ce(e,t,r,i){var a,s,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(a=0,s=n.length;a<s;a+=1)o=n.charCodeAt(a),o===9||32<=o&&o<=1114111||Z(e,"expected valid JSON character");else vg.test(n)&&Z(e,"the stream contains non-printable characters");e.result+=n}}f(Ce,"captureSegment");function ts(e,t,r,i){var a,s,o,n;for(Tt.isObject(r)||Z(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),o=0,n=a.length;o<n;o+=1)s=a[o],Be.call(t,s)||(t[s]=r[s],i[s]=!0)}f(ts,"mergeMappings");function We(e,t,r,i,a,s,o,n,l){var c,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),c=0,h=a.length;c<h;c+=1)Array.isArray(a[c])&&Z(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Qa(a[c])==="[object Object]"&&(a[c]="[object Object]");if(typeof a=="object"&&Qa(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,h=s.length;c<h;c+=1)ts(e,t,s[c],r);else ts(e,t,s,r);else!e.json&&!Be.call(r,a)&&Be.call(t,a)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,Z(e,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(t,a,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[a]=s,delete r[a];return t}f(We,"storeMappingPair");function aa(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Z(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}f(aa,"readLineBreak");function Ct(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;we(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(ae(a))for(aa(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Yr(e,"deficient indentation"),i}f(Ct,"skipSeparationSpace");function ti(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||zt(r)))}f(ti,"testDocumentSeparator");function sa(e,t){t===1?e.result+=" ":t>1&&(e.result+=Tt.repeat(`
|
|
90
|
+
`,t-1))}f(sa,"writeFoldedLines");function pc(e,t,r){var i,a,s,o,n,l,c,h,u=e.kind,d=e.result,p;if(p=e.input.charCodeAt(e.position),zt(p)||Ne(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(a=e.input.charCodeAt(e.position+1),zt(a)||r&&Ne(a)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,n=!1;p!==0;){if(p===58){if(a=e.input.charCodeAt(e.position+1),zt(a)||r&&Ne(a))break}else if(p===35){if(i=e.input.charCodeAt(e.position-1),zt(i))break}else{if(e.position===e.lineStart&&ti(e)||r&&Ne(p))break;if(ae(p))if(l=e.line,c=e.lineStart,h=e.lineIndent,Ct(e,!1,-1),e.lineIndent>=t){n=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(Ce(e,s,o,!1),sa(e,e.line-l),s=o=e.position,n=!1),we(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return Ce(e,s,o,!1),e.result?!0:(e.kind=u,e.result=d,!1)}f(pc,"readPlainScalar");function gc(e,t){var r,i,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ce(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,a=e.position;else return!0;else ae(r)?(Ce(e,i,a,!0),sa(e,Ct(e,!1,t)),i=a=e.position):e.position===e.lineStart&&ti(e)?Z(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);Z(e,"unexpected end of the stream within a single quoted scalar")}f(gc,"readSingleQuotedScalar");function mc(e,t){var r,i,a,s,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Ce(e,r,e.position,!0),e.position++,!0;if(n===92){if(Ce(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),ae(n))Ct(e,!1,t);else if(n<256&&uc[n])e.result+=dc[n],e.position++;else if((o=lc(n))>0){for(a=o,s=0;a>0;a--)n=e.input.charCodeAt(++e.position),(o=oc(n))>=0?s=(s<<4)+o:Z(e,"expected hexadecimal character");e.result+=hc(s),e.position++}else Z(e,"unknown escape sequence");r=i=e.position}else ae(n)?(Ce(e,r,i,!0),sa(e,Ct(e,!1,t)),r=i=e.position):e.position===e.lineStart&&ti(e)?Z(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}Z(e,"unexpected end of the stream within a double quoted scalar")}f(mc,"readDoubleQuotedScalar");function yc(e,t){var r=!0,i,a,s,o=e.tag,n,l=e.anchor,c,h,u,d,p,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,p=!1,n=[];else if(b===123)h=125,p=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(Ct(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=l,e.kind=p?"mapping":"sequence",e.result=n,!0;r?b===44&&Z(e,"expected the node content, but found ','"):Z(e,"missed comma between flow collection entries"),y=m=x=null,u=d=!1,b===63&&(c=e.input.charCodeAt(e.position+1),zt(c)&&(u=d=!0,e.position++,Ct(e,!0,t))),i=e.line,a=e.lineStart,s=e.position,Ye(e,t,Ni,!1,!0),y=e.tag,m=e.result,Ct(e,!0,t),b=e.input.charCodeAt(e.position),(d||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Ct(e,!0,t),Ye(e,t,Ni,!1,!0),x=e.result),p?We(e,n,g,y,m,x,i,a,s):u?n.push(We(e,null,g,y,m,x,i,a,s)):n.push(m),Ct(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}Z(e,"unexpected end of the stream within a flow collection")}f(yc,"readFlowCollection");function xc(e,t){var r,i,a=Ea,s=!1,o=!1,n=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Ea===a?a=u===43?Vn:kg:Z(e,"repeat of a chomping mode identifier");else if((h=cc(u))>=0)h===0?Z(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?Z(e,"repeat of an indentation width identifier"):(n=t+h-1,o=!0);else break;if(we(u)){do u=e.input.charCodeAt(++e.position);while(we(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!ae(u)&&u!==0)}for(;u!==0;){for(aa(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),ae(u)){l++;continue}if(e.lineIndent<n){a===Vn?e.result+=Tt.repeat(`
|
|
91
|
+
`,s?1+l:l):a===Ea&&s&&(e.result+=`
|
|
92
|
+
`);break}for(i?we(u)?(c=!0,e.result+=Tt.repeat(`
|
|
93
|
+
`,s?1+l:l)):c?(c=!1,e.result+=Tt.repeat(`
|
|
94
|
+
`,l+1)):l===0?s&&(e.result+=" "):e.result+=Tt.repeat(`
|
|
95
|
+
`,l):e.result+=Tt.repeat(`
|
|
96
|
+
`,s?1+l:l),s=!0,o=!0,l=0,r=e.position;!ae(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Ce(e,r,e.position,!1)}return!0}f(xc,"readBlockScalar");function es(e,t){var r,i=e.tag,a=e.anchor,s=[],o,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Z(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!zt(o))));){if(n=!0,e.position++,Ct(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Ye(e,t,ac,!1,!0),s.push(e.result),Ct(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)Z(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=a,e.kind="sequence",e.result=s,!0):!1}f(es,"readBlockSequence");function bc(e,t,r){var i,a,s,o,n,l,c=e.tag,h=e.anchor,u={},d=Object.create(null),p=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Z(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&zt(i))b===63?(y&&(We(e,u,d,p,g,null,o,n,l),p=g=m=null),x=!0,y=!0,a=!0):y?(y=!1,a=!0):Z(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,n=e.lineStart,l=e.position,!Ye(e,r,ic,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);we(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),zt(b)||Z(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(We(e,u,d,p,g,null,o,n,l),p=g=m=null),x=!0,y=!1,a=!1,p=e.tag,g=e.result;else if(x)Z(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)Z(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===s||e.lineIndent>t)&&(y&&(o=e.line,n=e.lineStart,l=e.position),Ye(e,t,Wi,!0,a)&&(y?g=e.result:m=e.result),y||(We(e,u,d,p,g,m,o,n,l),p=g=m=null),Ct(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)Z(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&We(e,u,d,p,g,null,o,n,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}f(bc,"readBlockMapping");function Cc(e){var t,r=!1,i=!1,a,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&Z(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,a="!!",o=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):Z(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!zt(o);)o===33&&(i?Z(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),sc.test(a)||Z(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Tg.test(s)&&Z(e,"tag suffix cannot contain flow indicator characters")}s&&!nc.test(s)&&Z(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Z(e,"tag name is malformed: "+s)}return r?e.tag=s:Be.call(e.tagMap,a)?e.tag=e.tagMap[a]+s:a==="!"?e.tag="!"+s:a==="!!"?e.tag="tag:yaml.org,2002:"+s:Z(e,'undeclared tag handle "'+a+'"'),!0}f(Cc,"readTagProperty");function _c(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Z(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!zt(r)&&!Ne(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Z(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}f(_c,"readAnchorProperty");function Sc(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!zt(i)&&!Ne(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&Z(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Be.call(e.anchorMap,r)||Z(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Ct(e,!0,-1),!0}f(Sc,"readAlias");function Ye(e,t,r,i,a){var s,o,n,l=1,c=!1,h=!1,u,d,p,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=o=n=Wi===r||ac===r,i&&Ct(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Cc(e)||_c(e);)Ct(e,!0,-1)?(c=!0,n=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=c||a),(l===1||Wi===r)&&(Ni===r||ic===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?n&&(es(e,y)||bc(e,y,m))||yc(e,m)?h=!0:(o&&xc(e,m)||gc(e,m)||mc(e,m)?h=!0:Sc(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&Z(e,"alias node should not have any properties")):pc(e,m,Ni===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=n&&es(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Z(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,d=e.implicitTypes.length;u<d;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Be.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,p=e.typeMap.multi[e.kind||"fallback"],u=0,d=p.length;u<d;u+=1)if(e.tag.slice(0,p[u].tag.length)===p[u].tag){g=p[u];break}g||Z(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&Z(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Z(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}f(Ye,"composeNode");function kc(e){var t=e.position,r,i,a,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Ct(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!zt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),a=[],i.length<1&&Z(e,"directive name must not be less than one character in length");o!==0;){for(;we(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!ae(o));break}if(ae(o))break;for(r=e.position;o!==0&&!zt(o);)o=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}o!==0&&aa(e),Be.call(Xn,i)?Xn[i](e,i,a):Yr(e,'unknown document directive "'+i+'"')}if(Ct(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Ct(e,!0,-1)):s&&Z(e,"directives end mark is expected"),Ye(e,e.lineIndent-1,Wi,!1,!0),Ct(e,!0,-1),e.checkLineBreaks&&wg.test(e.input.slice(t,e.position))&&Yr(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ti(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ct(e,!0,-1));return}if(e.position<e.length-1)Z(e,"end of the stream or a document separator is expected");else return}f(kc,"readDocument");function qs(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
97
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new fc(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,Z(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;)kc(r);return r.documents}f(qs,"loadDocuments");function Bg(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=qs(e,r);if(typeof t!="function")return i;for(var a=0,s=i.length;a<s;a+=1)t(i[a])}f(Bg,"loadAll$1");function vc(e,t){var r=qs(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Gt("expected a single document in the stream, but found more")}}f(vc,"load$1");var Lg=vc,Mg={load:Lg},wc=Object.prototype.toString,Tc=Object.prototype.hasOwnProperty,Hs=65279,Ag=9,Ur=10,Eg=13,Fg=32,$g=33,Dg=34,rs=35,Og=37,Ig=38,Rg=39,Pg=42,Bc=44,Ng=45,zi=58,Wg=61,zg=62,qg=63,Hg=64,Lc=91,Mc=93,jg=96,Ac=123,Yg=124,Ec=125,Pt={};Pt[0]="\\0";Pt[7]="\\a";Pt[8]="\\b";Pt[9]="\\t";Pt[10]="\\n";Pt[11]="\\v";Pt[12]="\\f";Pt[13]="\\r";Pt[27]="\\e";Pt[34]='\\"';Pt[92]="\\\\";Pt[133]="\\N";Pt[160]="\\_";Pt[8232]="\\L";Pt[8233]="\\P";var Ug=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Gg=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Fc(e,t){var r,i,a,s,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),a=0,s=i.length;a<s;a+=1)o=i[a],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Tc.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}f(Fc,"compileStyleMap");function $c(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Gt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Tt.repeat("0",i-t.length)+t}f($c,"encodeHex");var Vg=1,Gr=2;function Dc(e){this.schema=e.schema||rc,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Tt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Fc(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Gr:Vg,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}f(Dc,"State");function is(e,t){for(var r=Tt.repeat(" ",t),i=0,a=-1,s="",o,n=e.length;i<n;)a=e.indexOf(`
|
|
98
|
+
`,i),a===-1?(o=e.slice(i),i=n):(o=e.slice(i,a+1),i=a+1),o.length&&o!==`
|
|
99
|
+
`&&(s+=r),s+=o;return s}f(is,"indentString");function qi(e,t){return`
|
|
100
|
+
`+Tt.repeat(" ",e.indent*t)}f(qi,"generateNextLine");function Oc(e,t){var r,i,a;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}f(Oc,"testImplicitResolving");function Vr(e){return e===Fg||e===Ag}f(Vr,"isWhitespace");function br(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Hs||65536<=e&&e<=1114111}f(br,"isPrintable");function as(e){return br(e)&&e!==Hs&&e!==Eg&&e!==Ur}f(as,"isNsCharOrWhitespace");function ss(e,t,r){var i=as(e),a=i&&!Vr(e);return(r?i:i&&e!==Bc&&e!==Lc&&e!==Mc&&e!==Ac&&e!==Ec)&&e!==rs&&!(t===zi&&!a)||as(t)&&!Vr(t)&&e===rs||t===zi&&a}f(ss,"isPlainSafe");function Ic(e){return br(e)&&e!==Hs&&!Vr(e)&&e!==Ng&&e!==qg&&e!==zi&&e!==Bc&&e!==Lc&&e!==Mc&&e!==Ac&&e!==Ec&&e!==rs&&e!==Ig&&e!==Pg&&e!==$g&&e!==Yg&&e!==Wg&&e!==zg&&e!==Rg&&e!==Dg&&e!==Og&&e!==Hg&&e!==jg}f(Ic,"isPlainSafeFirst");function Rc(e){return!Vr(e)&&e!==zi}f(Rc,"isPlainSafeLast");function ar(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}f(ar,"codePointAt");function js(e){var t=/^\n* /;return t.test(e)}f(js,"needIndentIndicator");var Pc=1,ns=2,Nc=3,Wc=4,rr=5;function zc(e,t,r,i,a,s,o,n){var l,c=0,h=null,u=!1,d=!1,p=i!==-1,g=-1,m=Ic(ar(e,0))&&Rc(ar(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=ar(e,l),!br(c))return rr;m=m&&ss(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=ar(e,l),c===Ur)u=!0,p&&(d=d||l-g-1>i&&e[g+1]!==" ",g=l);else if(!br(c))return rr;m=m&&ss(c,h,n),h=c}d=d||p&&l-g-1>i&&e[g+1]!==" "}return!u&&!d?m&&!o&&!a(e)?Pc:s===Gr?rr:ns:r>9&&js(e)?rr:o?s===Gr?rr:ns:d?Wc:Nc}f(zc,"chooseScalarStyle");function qc(e,t,r,i,a){e.dump=function(){if(t.length===0)return e.quotingType===Gr?'""':"''";if(!e.noCompatMode&&(Ug.indexOf(t)!==-1||Gg.test(t)))return e.quotingType===Gr?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Oc(e,c)}switch(f(l,"testAmbiguity"),zc(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,a)){case Pc:return t;case ns:return"'"+t.replace(/'/g,"''")+"'";case Nc:return"|"+os(t,e.indent)+ls(is(t,s));case Wc:return">"+os(t,e.indent)+ls(is(Hc(t,o),s));case rr:return'"'+jc(t)+'"';default:throw new Gt("impossible error: invalid scalar style")}}()}f(qc,"writeScalar");function os(e,t){var r=js(e)?String(t):"",i=e[e.length-1]===`
|
|
101
|
+
`,a=i&&(e[e.length-2]===`
|
|
102
|
+
`||e===`
|
|
103
|
+
`),s=a?"+":i?"":"-";return r+s+`
|
|
104
|
+
`}f(os,"blockHeader");function ls(e){return e[e.length-1]===`
|
|
105
|
+
`?e.slice(0,-1):e}f(ls,"dropEndingNewline");function Hc(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=e.indexOf(`
|
|
106
|
+
`);return c=c!==-1?c:e.length,r.lastIndex=c,cs(e.slice(0,c),t)}(),a=e[0]===`
|
|
107
|
+
`||e[0]===" ",s,o;o=r.exec(e);){var n=o[1],l=o[2];s=l[0]===" ",i+=n+(!a&&!s&&l!==""?`
|
|
108
|
+
`:"")+cs(l,t),a=s}return i}f(Hc,"foldString");function cs(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,a=0,s,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-a>t&&(s=o>a?o:n,l+=`
|
|
109
|
+
`+e.slice(a,s),a=s+1),o=n;return l+=`
|
|
110
|
+
`,e.length-a>t&&o>a?l+=e.slice(a,o)+`
|
|
111
|
+
`+e.slice(o+1):l+=e.slice(a),l.slice(1)}f(cs,"foldLine");function jc(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=ar(e,a),i=Pt[r],!i&&br(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||$c(r);return t}f(jc,"escapeString");function Yc(e,t,r){var i="",a=e.tag,s,o,n;for(s=0,o=r.length;s<o;s+=1)n=r[s],e.replacer&&(n=e.replacer.call(r,String(s),n)),(ue(e,t,n,!1,!1)||typeof n>"u"&&ue(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}f(Yc,"writeFlowSequence");function hs(e,t,r,i){var a="",s=e.tag,o,n,l;for(o=0,n=r.length;o<n;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(ue(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&ue(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=qi(e,t)),e.dump&&Ur===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}f(hs,"writeBlockSequence");function Uc(e,t,r){var i="",a=e.tag,s=Object.keys(r),o,n,l,c,h;for(o=0,n=s.length;o<n;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=s[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),ue(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ue(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=a,e.dump="{"+i+"}"}f(Uc,"writeFlowMapping");function Gc(e,t,r,i){var a="",s=e.tag,o=Object.keys(r),n,l,c,h,u,d;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new Gt("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)d="",(!i||a!=="")&&(d+=qi(e,t)),c=o[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),ue(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Ur===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,u&&(d+=qi(e,t)),ue(e,t+1,h,!0,u)&&(e.dump&&Ur===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,a+=d));e.tag=s,e.dump=a||"{}"}f(Gc,"writeBlockMapping");function us(e,t,r){var i,a,s,o,n,l;for(a=r?e.explicitTypes:e.implicitTypes,s=0,o=a.length;s<o;s+=1)if(n=a[s],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,wc.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Tc.call(n.represent,l))i=n.represent[l](t,l);else throw new Gt("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}f(us,"detectType");function ue(e,t,r,i,a,s,o){e.tag=null,e.dump=r,us(e,r,!1)||us(e,r,!0);var n=wc.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",u,d;if(h&&(u=e.duplicates.indexOf(r),d=u!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(a=!1),d&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&d&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Gc(e,t,e.dump,a),d&&(e.dump="&ref_"+u+e.dump)):(Uc(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?hs(e,t-1,e.dump,a):hs(e,t,e.dump,a),d&&(e.dump="&ref_"+u+e.dump)):(Yc(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&qc(e,e.dump,t,s,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Gt("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}f(ue,"writeNode");function Vc(e,t){var r=[],i=[],a,s;for(Hi(e,r,i),a=0,s=i.length;a<s;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(s)}f(Vc,"getDuplicateReferences");function Hi(e,t,r){var i,a,s;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,s=e.length;a<s;a+=1)Hi(e[a],t,r);else for(i=Object.keys(e),a=0,s=i.length;a<s;a+=1)Hi(e[i[a]],t,r)}f(Hi,"inspectNode");function Xg(e,t){t=t||{};var r=new Dc(t);r.noRefs||Vc(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ue(r,0,i,!0,!0)?r.dump+`
|
|
112
|
+
`:""}f(Xg,"dump$1");function Kg(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}f(Kg,"renamed");var Zg=Nl,Qg=Mg.load;/*! Bundled license information:
|
|
113
|
+
|
|
114
|
+
js-yaml/dist/js-yaml.mjs:
|
|
115
|
+
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
116
|
+
*/var Dt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},Kn={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function Rr(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=bt(e),t=bt(t);const[r,i]=[e.x,e.y],[a,s]=[t.x,t.y],o=a-r,n=s-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}f(Rr,"calculateDeltaAndAngle");var bt=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Jg=f(e=>({x:f(function(t,r,i){let a=0;const s=bt(i[0]).x<bt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Dt,e.arrowTypeStart)){const{angle:p,deltaX:g}=Rr(i[0],i[1]);a=Dt[e.arrowTypeStart]*Math.cos(p)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Dt,e.arrowTypeEnd)){const{angle:p,deltaX:g}=Rr(i[i.length-1],i[i.length-2]);a=Dt[e.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}const o=Math.abs(bt(t).x-bt(i[i.length-1]).x),n=Math.abs(bt(t).y-bt(i[i.length-1]).y),l=Math.abs(bt(t).x-bt(i[0]).x),c=Math.abs(bt(t).y-bt(i[0]).y),h=Dt[e.arrowTypeStart],u=Dt[e.arrowTypeEnd],d=1;if(o<u&&o>0&&n<u){let p=u+d-o;p*=s==="right"?-1:1,a-=p}if(l<h&&l>0&&c<h){let p=h+d-l;p*=s==="right"?-1:1,a+=p}return bt(t).x+a},"x"),y:f(function(t,r,i){let a=0;const s=bt(i[0]).y<bt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Dt,e.arrowTypeStart)){const{angle:p,deltaY:g}=Rr(i[0],i[1]);a=Dt[e.arrowTypeStart]*Math.abs(Math.sin(p))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Dt,e.arrowTypeEnd)){const{angle:p,deltaY:g}=Rr(i[i.length-1],i[i.length-2]);a=Dt[e.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}const o=Math.abs(bt(t).y-bt(i[i.length-1]).y),n=Math.abs(bt(t).x-bt(i[i.length-1]).x),l=Math.abs(bt(t).y-bt(i[0]).y),c=Math.abs(bt(t).x-bt(i[0]).x),h=Dt[e.arrowTypeStart],u=Dt[e.arrowTypeEnd],d=1;if(o<u&&o>0&&n<u){let p=u+d-o;p*=s==="up"?-1:1,a-=p}if(l<h&&l>0&&c<h){let p=h+d-l;p*=s==="up"?-1:1,a+=p}return bt(t).y+a},"y")}),"getLineFunctionsWithOffset"),Ys=f(({flowchart:e})=>{var a,s;const t=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.top)??0,r=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),tm=f(e=>{const{handDrawnSeed:t}=dt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),kr=f(e=>{const t=em([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),em=f(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a==null?void 0:a.trim())}),t},"styles2Map"),Xc=f(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),G=f(e=>{const{stylesArray:t}=kr(e),r=[],i=[],a=[],s=[];return t.forEach(o=>{const n=o[0];Xc(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&a.push(o.join(":")+" !important"),n==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:s}},"styles2String"),U=f((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=dt(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:o}=kr(e);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||a,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:rm(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),rm=f(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const a=isNaN(t[0])?0:t[0];return[a,a]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),$r={},vt={},Zn;function im(){return Zn||(Zn=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.BLANK_URL=vt.relativeFirstCharacters=vt.whitespaceEscapeCharsRegex=vt.urlSchemeRegex=vt.ctrlCharactersRegex=vt.htmlCtrlEntityRegex=vt.htmlEntitiesRegex=vt.invalidProtocolRegex=void 0,vt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,vt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,vt.htmlCtrlEntityRegex=/&(newline|tab);/gi,vt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,vt.urlSchemeRegex=/^.+(:|:)/gim,vt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,vt.relativeFirstCharacters=[".","/"],vt.BLANK_URL="about:blank"),vt}var Qn;function am(){if(Qn)return $r;Qn=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.sanitizeUrl=void 0;var e=im();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var n=o.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function a(o){try{return decodeURIComponent(o)}catch{return o}}function s(o){if(!o)return e.BLANK_URL;var n,l=a(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=a(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var p=h.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return p;if(d==="http:"||d==="https:"){if(!i(p))return e.BLANK_URL;var g=new URL(p);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return p}return $r.sanitizeUrl=s,$r}var sm=am(),nm="",om={curveBasis:_i,curveBasisClosed:Rp,curveBasisOpen:Pp,curveBumpX:Vo,curveBumpY:Xo,curveBundle:Np,curveCardinalClosed:Wp,curveCardinalOpen:zp,curveCardinal:Jo,curveCatmullRomClosed:qp,curveCatmullRomOpen:Hp,curveCatmullRom:el,curveLinear:Di,curveLinearClosed:jp,curveMonotoneX:ol,curveMonotoneY:ll,curveNatural:hl,curveStep:ul,curveStepAfter:fl,curveStepBefore:dl},lm=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,cm=f(function(e,t){const r=Kc(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Mi(o),i=wt(i,[...o])}else i=r.args;if(!i)return;let a=Ts(e,t);const s="config";return i[s]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),Kc=f(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${lm.source})(?=[}][%]{2}).*
|
|
117
|
+
`,"ig");e=e.trim().replace(a,"").replace(/'/gm,'"'),$.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let s;const o=[];for(;(s=Hr.exec(e))!==null;)if(s.index===Hr.lastIndex&&Hr.lastIndex++,s&&!t||t&&((r=s[1])!=null&&r.match(t))||t&&((i=s[2])!=null&&i.match(t))){const n=s[1]?s[1]:s[2],l=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(a){return $.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),hm=f(function(e){return e.replace(Hr,"")},"removeDirectives"),um=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Us(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return om[r]??t}f(Us,"interpolateToCurve");function Zc(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?sm.sanitizeUrl(r):r}f(Zc,"formatUrl");var dm=f((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let s=window;for(let o=0;o<i;o++)if(s=s[r[o]],!s){$.error(`Function name: ${e} not found in window`);return}s[a](...t)},"runFunc");function Gs(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}f(Gs,"distance");function Qc(e){let t,r=0;e.forEach(a=>{r+=Gs(a,t),t=a});const i=r/2;return Vs(e,i)}f(Qc,"traverseEdge");function Jc(e){return e.length===1?e[0]:Qc(e)}f(Jc,"calcLabelPosition");var Jn=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Vs=f((e,t)=>{let r,i=t;for(const a of e){if(r){const s=Gs(a,r);if(s===0)return r;if(s<i)i-=s;else{const o=i/s;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:Jn((1-o)*r.x+o*a.x,5),y:Jn((1-o)*r.y+o*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),fm=f((e,t,r)=>{$.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=Vs(t,25),s=e?10:5,o=Math.atan2(t[0].y-a.y,t[0].x-a.x),n={x:0,y:0};return n.x=Math.sin(o)*s+(t[0].x+a.x)/2,n.y=-Math.cos(o)*s+(t[0].y+a.y)/2,n},"calcCardinalityPosition");function th(e,t,r){const i=structuredClone(r);$.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,s=Vs(i,a),o=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+s.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+s.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+s.x)/2,l.y=-Math.cos(n)*o+(i[0].y+s.y)/2),l}f(th,"calcTerminalLabelPosition");function eh(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}f(eh,"getStylesFromArray");var to=0,pm=f(()=>(to++,"id-"+Math.random().toString(36).substr(2,12)+"-"+to),"generateId");function rh(e){let t="";const r="0123456789abcdef",i=r.length;for(let a=0;a<e;a++)t+=r.charAt(Math.floor(Math.random()*i));return t}f(rh,"makeRandomHex");var gm=f(e=>rh(e.length),"random"),mm=f(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"),ym=f(function(e,t){const r=t.text.replace(Sr.lineBreakRegex," "),[,i]=na(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),a},"drawSimpleText"),xm=vs((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Sr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let s="";return i.forEach((o,n)=>{const l=_e(`${o} `,r),c=_e(s,r);if(l>t){const{hyphenatedStrings:d,remainingWord:p}=bm(o,t,"-",r);a.push(s,...d),s=p}else c+l>=t?(a.push(s),s=o):s=[s,o].filter(Boolean).join(" ");n+1===i.length&&a.push(s)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),bm=vs((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],s=[];let o="";return a.forEach((n,l)=>{const c=`${o}${n}`;if(_e(c,i)>=t){const u=l+1,d=a.length===u,p=`${c}${r}`;s.push(d?c:p),o=""}else o=c}),{hyphenatedStrings:s,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function ih(e,t){return Xs(e,t).height}f(ih,"calculateTextHeight");function _e(e,t){return Xs(e,t).width}f(_e,"calculateTextWidth");var Xs=vs((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,s]=na(r),o=["sans-serif",i],n=e.split(Sr.lineBreakRegex),l=[],c=ht("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const d of o){let p=0;const g={width:0,height:0,lineHeight:0};for(const m of n){const y=mm();y.text=m||nm;const x=ym(h,y).style("font-size",s).style("font-weight",a).style("font-family",d),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)),p=Math.round(b.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}l.push(g)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),pr,Cm=(pr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(pr,"InitIDGenerator"),pr),ui,_m=f(function(e){return ui=ui||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ui.innerHTML=e,unescape(ui.textContent)},"entityDecode");function Ks(e){return"str"in e}f(Ks,"isDetailedError");var Sm=f((e,t,r,i)=>{var s;if(!i)return;const a=(s=e.node())==null?void 0:s.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),na=f(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Zs(e,t){return Jd({},e,t)}f(Zs,"cleanAndMerge");var ie={assignWithDepth:wt,wrapLabel:xm,calculateTextHeight:ih,calculateTextWidth:_e,calculateTextDimensions:Xs,cleanAndMerge:Zs,detectInit:cm,detectDirective:Kc,isSubstringInArray:um,interpolateToCurve:Us,calcLabelPosition:Jc,calcCardinalityPosition:fm,calcTerminalLabelPosition:th,formatUrl:Zc,getStylesFromArray:eh,generateId:pm,random:gm,runFunc:dm,entityDecode:_m,insertTitle:Sm,isLabelCoordinateInPath:ah,parseFontSize:na,InitIDGenerator:Cm},km=f(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Ge=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),w2=f((e,t,{counter:r=0,prefix:i,suffix:a},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function Rt(e){return e??null}f(Rt,"handleUndefinedAttr");function ah(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return a.includes(r.toString())||a.includes(i.toString())}f(ah,"isLabelCoordinateInPath");const vm=Object.freeze({left:0,top:0,width:16,height:16}),ji=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sh=Object.freeze({...vm,...ji}),wm=Object.freeze({...sh,body:"",hidden:!1}),Tm=Object.freeze({width:null,height:null}),Bm=Object.freeze({...Tm,...ji}),Lm=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const n=a.pop(),l=a.pop(),c={provider:a.length>0?a[0]:i,prefix:l,name:n};return Fa(c)?c:null}const s=a[0],o=s.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return Fa(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:s};return Fa(n,r)?n:null}return null},Fa=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Mm(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function eo(e,t){const r=Mm(e,t);for(const i in wm)i in ji?i in e&&!(i in r)&&(r[i]=ji[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Am(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function s(o){if(r[o])return a[o]=[];if(!(o in a)){a[o]=null;const n=i[o]&&i[o].parent,l=n&&s(n);l&&(a[o]=[n].concat(l))}return a[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),a}function ro(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let s={};function o(n){s=eo(i[n]||a[n],s)}return o(t),r.forEach(o),eo(e,s)}function Em(e,t){if(e.icons[t])return ro(e,t,[]);const r=Am(e,[t])[t];return r?ro(e,t,r):null}const Fm=/(-?[0-9.]*[0-9]+[0-9.]*)/g,$m=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function io(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(Fm);if(i===null||!i.length)return e;const a=[];let s=i.shift(),o=$m.test(s);for(;;){if(o){const n=parseFloat(s);isNaN(n)?a.push(s):a.push(Math.ceil(n*t*r)/r)}else a.push(s);if(s=i.shift(),s===void 0)return a.join("");o=!o}}function Dm(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),s=e.indexOf("</"+t);if(a===-1||s===-1)break;const o=e.indexOf(">",s);if(o===-1)break;r+=e.slice(a+1,s).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function Om(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Im(e,t,r){const i=Dm(e);return Om(i.defs,t+i.content+r)}const Rm=e=>e==="unset"||e==="undefined"||e==="none";function Pm(e,t){const r={...sh,...e},i={...Bm,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let _=m.rotate;x?b?_+=2:(y.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),y.push("scale(-1 1)"),a.top=a.left=0):b&&(y.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),y.push("scale(1 -1)"),a.top=a.left=0);let v;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:v=a.height/2+a.top,y.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:y.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:v=a.width/2+a.left,y.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}_%2===1&&(a.left!==a.top&&(v=a.left,a.left=a.top,a.top=v),a.width!==a.height&&(v=a.width,a.width=a.height,a.height=v)),y.length&&(s=Im(s,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=a.width,c=a.height;let h,u;o===null?(u=n===null?"1em":n==="auto"?c:n,h=io(u,l/c)):(h=o==="auto"?l:o,u=n===null?io(h,c/l):n==="auto"?c:n);const d={},p=(m,y)=>{Rm(y)||(d[m]=y.toString())};p("width",h),p("height",u);const g=[a.left,a.top,l,c];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,body:s}}const Nm=/\sid="(\S+)"/g,Wm="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let zm=0;function qm(e,t=Wm){const r=[];let i;for(;i=Nm.exec(e);)r.push(i[1]);if(!r.length)return e;const a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(s=>{const o=typeof t=="function"?t(s):t+(zm++).toString(),n=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+o+a+"$3")}),e=e.replace(new RegExp(a,"g"),""),e}function Hm(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function nh(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var u,d;return(d=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&d!==void 0?d:0})):n},[]);if(a.length){var s=new RegExp(`
|
|
118
|
+
[ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(n){return n.replace(s,`
|
|
119
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,l){var c=o.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=n;typeof n=="string"&&n.includes(`
|
|
120
|
+
`)&&(u=String(n).split(`
|
|
121
|
+
`).map(function(d,p){return p===0?d:""+h+d}).join(`
|
|
122
|
+
`)),o+=u+i[l+1]}),o}var jm={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},ds=new Map,oh=new Map,Ym=f(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if($.debug("Registering icon pack:",t.name),"loader"in t)oh.set(t.name,t.loader);else if("icons"in t)ds.set(t.name,t.icons);else throw $.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),lh=f(async(e,t)=>{const r=Lm(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let a=ds.get(i);if(!a){const o=oh.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await o(),prefix:i},ds.set(i,a)}catch(n){throw $.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=Em(a,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),Um=f(async e=>{try{return await lh(e),!0}catch{return!1}},"isIconAvailable"),ei=f(async(e,t,r)=>{let i;try{i=await lh(e,t==null?void 0:t.fallbackPrefix)}catch(o){$.error(o),i=jm}const a=Pm(i,t),s=Hm(qm(a.body),{...a.attributes,...r});return Jt(s,Ot())},"getIconSVG");function ch(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
123
|
+
`).replace(/\n{2,}/g,`
|
|
124
|
+
`),a=nh(i);return t===!1?a.replace(/ /g," "):a}f(ch,"preprocessMarkdown");function hh(e,t={}){const r=ch(e,t),i=So.lexer(r),a=[[]];let s=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
|
|
125
|
+
`).forEach((h,u)=>{u!==0&&(s++,a.push([])),h.split(" ").forEach(d=>{d=d.replace(/'/g,"'"),d&&a[s].push({content:d,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{o(c,n.type)}):n.type==="html"&&a[s].push({content:n.text,type:"normal"})}return f(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(c=>{o(c)}):n.type==="html"?a[s].push({content:n.text,type:"normal"}):a[s].push({content:n.raw,type:"normal"})}),a}f(hh,"markdownToLines");function uh(e,{markdownAutoWrap:t}={}){const r=So.lexer(e);function i(a){var s,o,n;return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g," "):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(s=a.tokens)==null?void 0:s.map(i).join("")}</strong>`:a.type==="em"?`<em>${(o=a.tokens)==null?void 0:o.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${(n=a.tokens)==null?void 0:n.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:($.warn(`Unsupported markdown: ${a.type}`),a.raw)}return f(i,"output"),r.map(i).join("")}f(uh,"markdownToHTML");function dh(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}f(dh,"splitTextToChars");function fh(e,t){const r=dh(t.content);return Qs(e,[],r,t.type)}f(fh,"splitWordToFitWidth");function Qs(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...s]=r,o=[...t,a];return e([{content:o.join(""),type:i}])?Qs(e,o,s,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}f(Qs,"splitWordToFitWidthRecursion");function ph(e,t){if(e.some(({content:r})=>r.includes(`
|
|
126
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Yi(e,t)}f(ph,"splitLineToFitWidth");function Yi(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},o=[...i];if(a!==""&&o.push({content:a,type:"normal"}),o.push(s),t(o))return Yi(e,t,r,o);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,l]=fh(t,s);r.push([n]),l.content&&e.unshift(l)}return Yi(e,t,r)}f(Yi,"splitLineToFitWidthRecursion");function fs(e,t){t&&e.attr("style",t)}f(fs,"applyStyle");async function gh(e,t,r,i,a=!1,s=Ot()){const o=e.append("foreignObject");o.attr("width",`${10*r}px`),o.attr("height",`${10*r}px`);const n=o.append("xhtml:div"),l=yr(t.label)?await Bs(t.label.replace(Sr.lineBreakRegex,`
|
|
127
|
+
`),s):Jt(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),fs(h,t.labelStyle),h.attr("class",`${c} ${i}`),fs(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),n.style("max-width",r+"px"),n.style("text-align","center"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),o.node()}f(gh,"addHtmlSpan");function oa(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}f(oa,"createTspan");function mh(e,t,r){const i=e.append("text"),a=oa(i,1,t);la(a,r);const s=a.node().getComputedTextLength();return i.remove(),s}f(mh,"computeWidthOfText");function Gm(e,t,r){var o;const i=e.append("text"),a=oa(i,1,t);la(a,[{content:r,type:"normal"}]);const s=(o=a.node())==null?void 0:o.getBoundingClientRect();return s&&i.remove(),s}f(Gm,"computeDimensionOfText");function yh(e,t,r,i=!1){const s=t.append("g"),o=s.insert("rect").attr("class","background").attr("style","stroke: none"),n=s.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=f(d=>mh(s,1.1,d)<=e,"checkWidth"),u=h(c)?[c]:ph(c,h);for(const d of u){const p=oa(n,l,1.1);la(p,d),l++}}if(i){const c=n.node().getBBox(),h=2;return o.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),s.node()}else return n.node()}f(yh,"createFormattedText");function la(e,t){e.text(""),t.forEach((r,i)=>{const a=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(r.content):a.text(" "+r.content)})}f(la,"updateTextContentAndStyles");async function xh(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,s,o)=>(r.push((async()=>{const n=`${s}:${o}`;return await Um(n)?await ei(n,void 0,{class:"label-icon"}):`<i class='${Jt(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f(xh,"replaceIconSubstring");var Ae=f(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:s=!0,isNode:o=!0,width:n=200,addSvgBackground:l=!1}={},c)=>{if($.debug("XYZ createText",t,r,i,a,s,o,"addSvgBackground: ",l),s){const h=uh(t,c),u=await xh(Ge(h),c),d=t.replace(/\\\\/g,"\\"),p={isNode:o,label:yr(t)?d:u,labelStyle:r.replace("fill:","color:")};return await gh(e,p,n,a,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=hh(h.replace("<br>","<br/>"),c),d=yh(n,e,u,t?l:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(d).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ht(d).select("rect").attr("style",p.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(d).select("text").attr("style",g)}return d}},"createText");function $a(e,t,r){if(e&&e.length){const[i,a]=t,s=Math.PI/180*r,o=Math.cos(s),n=Math.sin(s);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-a)*n+i,l[1]=(c-i)*n+(h-a)*o+a}}}function Vm(e,t){return e[0]===t[0]&&e[1]===t[1]}function Xm(e,t,r,i=1){const a=r,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(a)for(const c of o)$a(c,n,a);const l=function(c,h,u){const d=[];for(const b of c){const _=[...b];Vm(_[0],_[_.length-1])||_.push([_[0][0],_[0][1]]),_.length>2&&d.push(_)}const p=[];h=Math.max(h,.1);const g=[];for(const b of d)for(let _=0;_<b.length-1;_++){const v=b[_],S=b[_+1];if(v[1]!==S[1]){const C=Math.min(v[1],S[1]);g.push({ymin:C,ymax:Math.max(v[1],S[1]),x:C===v[1]?v[0]:S[0],islope:(S[0]-v[0])/(S[1]-v[1])})}}if(g.sort((b,_)=>b.ymin<_.ymin?-1:b.ymin>_.ymin?1:b.x<_.x?-1:b.x>_.x?1:b.ymax===_.ymax?0:(b.ymax-_.ymax)/Math.abs(b.ymax-_.ymax)),!g.length)return p;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let _=0;_<g.length&&!(g[_].ymin>y);_++)b=_;g.splice(0,b+1).forEach(_=>{m.push({s:y,edge:_})})}if(m=m.filter(b=>!(b.edge.ymax<=y)),m.sort((b,_)=>b.edge.x===_.edge.x?0:(b.edge.x-_.edge.x)/Math.abs(b.edge.x-_.edge.x)),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const _=b+1;if(_>=m.length)break;const v=m[b].edge,S=m[_].edge;p.push([[Math.round(v.x),y],[Math.round(S.x),y]])}y+=u,m.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),x++}return p}(o,s,i);if(a){for(const c of o)$a(c,n,-a);(function(c,h,u){const d=[];c.forEach(p=>d.push(...p)),$a(d,h,u)})(l,n,-a)}return l}function ri(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=a),Xm(e,a,i,s||1)}class Js{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ri(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function ca(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class Km extends Js{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=ri(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[c,h]of a)ca([c,h])&&o.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class Zm extends Js{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,a);return i.ops=i.ops.concat(s.ops),i}}class Qm{constructor(t){this.helper=t}fillPolygons(t,r){const i=ri(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const o=a/4;for(const n of t){const l=ca(n),c=l/a,h=Math.ceil(c)-1,u=l-h*a,d=(n[0][0]+n[1][0])/2-a/4,p=Math.min(n[0][1],n[1][1]);for(let g=0;g<h;g++){const m=p+u+g*a,y=d-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class Jm{constructor(t){this.helper=t}fillPolygons(t,r){const i=ri(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach(o=>{const n=ca(o),l=Math.floor(n/(i+a)),c=(n+a-l*(i+a))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const d=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let p=0;p<l;p++){const g=p*(i+a),m=g+i,y=[h[0]+g*Math.cos(d)+c*Math.cos(d),h[1]+g*Math.sin(d)+c*Math.sin(d)],x=[h[0]+m*Math.cos(d)+c*Math.cos(d),h[1]+m*Math.sin(d)+c*Math.sin(d)];s.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}}),s}}class ty{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,s=ri(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(s,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach(s=>{const o=ca(s),n=Math.round(o/(2*r));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<n;u++){const d=2*u*r,p=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],y=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];a.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}}),a}}const Yt={};class ey{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const ry=0,Da=1,ao=2,di={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};function Oa(e,t){return e.type===t}function tn(e){const t=[],r=function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:ry,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Da,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:ao,text:""},n}(e);let i="BOD",a=0,s=r[a];for(;!Oa(s,ao);){let o=0;const n=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return tn("M0,0"+e);a++,o=di[s.text],i=s.text}else Oa(s,Da)?o=di[i]:(a++,o=di[s.text],i=s.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let l=a;l<a+o;l++){const c=r[l];if(!Oa(c,Da))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof di[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),a+=o,s=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function bh(e){let t=0,r=0,i=0,a=0;const s=[];for(const{key:o,data:n}of e)switch(o){case"M":s.push({key:"M",data:[...n]}),[t,r]=n,[i,a]=n;break;case"m":t+=n[0],r+=n[1],s.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":s.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map((c,h)=>h%2?c+r:c+t);s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map((c,h)=>h%2?c+r:c+t);s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],s.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":s.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map((c,h)=>h%2?c+r:c+t);s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=a}return s}function Ch(e){const t=[];let r="",i=0,a=0,s=0,o=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,a]=h,[s,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],a=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,a]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,a]});break;case"V":a=h[0],t.push({key:"L",data:[i,a]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-n),d=a+(a-l)):(u=i,d=a),t.push({key:"C",data:[u,d,...h]}),n=h[0],l=h[1],i=h[2],a=h[3];break}case"T":{const[u,d]=h;let p=0,g=0;r==="Q"||r==="T"?(p=i+(i-n),g=a+(a-l)):(p=i,g=a);const m=i+2*(p-i)/3,y=a+2*(g-a)/3,x=u+2*(p-u)/3,b=d+2*(g-d)/3;t.push({key:"C",data:[m,y,x,b,u,d]}),n=p,l=g,i=u,a=d;break}case"Q":{const[u,d,p,g]=h,m=i+2*(u-i)/3,y=a+2*(d-a)/3,x=p+2*(u-p)/3,b=g+2*(d-g)/3;t.push({key:"C",data:[m,y,x,b,p,g]}),n=u,l=d,i=p,a=g;break}case"A":{const u=Math.abs(h[0]),d=Math.abs(h[1]),p=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||d===0?(t.push({key:"C",data:[i,a,y,x,y,x]}),i=y,a=x):(i!==y||a!==x)&&(_h(i,a,y,x,u,d,p,g,m).forEach(function(b){t.push({key:"C",data:b})}),i=y,a=x);break}case"Z":t.push({key:"Z",data:[]}),i=s,a=o}r=c}return t}function Dr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function _h(e,t,r,i,a,s,o,n,l,c){const h=(u=o,Math.PI*u/180);var u;let d=[],p=0,g=0,m=0,y=0;if(c)[p,g,m,y]=c;else{[e,t]=Dr(e,t,-h),[r,i]=Dr(r,i,-h);const O=(e-r)/2,A=(t-i)/2;let L=O*O/(a*a)+A*A/(s*s);L>1&&(L=Math.sqrt(L),a*=L,s*=L);const B=a*a,F=s*s,M=B*F-B*A*A-F*O*O,z=B*A*A+F*O*O,V=(n===l?-1:1)*Math.sqrt(Math.abs(M/z));m=V*a*A/s+(e+r)/2,y=V*-s*O/a+(t+i)/2,p=Math.asin(parseFloat(((t-y)/s).toFixed(9))),g=Math.asin(parseFloat(((i-y)/s).toFixed(9))),e<m&&(p=Math.PI-p),r<m&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let x=g-p;if(Math.abs(x)>120*Math.PI/180){const O=g,A=r,L=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=_h(r=m+a*Math.cos(g),i=y+s*Math.sin(g),A,L,a,s,o,0,l,[g,O,m,y])}x=g-p;const b=Math.cos(p),_=Math.sin(p),v=Math.cos(g),S=Math.sin(g),C=Math.tan(x/4),w=4/3*a*C,D=4/3*s*C,P=[e,t],I=[e+w*_,t-D*b],E=[r+w*S,i-D*v],W=[r,i];if(I[0]=2*P[0]-I[0],I[1]=2*P[1]-I[1],c)return[I,E,W].concat(d);{d=[I,E,W].concat(d);const O=[];for(let A=0;A<d.length;A+=3){const L=Dr(d[A][0],d[A][1],h),B=Dr(d[A+1][0],d[A+1][1],h),F=Dr(d[A+2][0],d[A+2][1],h);O.push([L[0],L[1],B[0],B[1],F[0],F[1]])}return O}}const iy={randOffset:function(e,t){return rt(e,t)},randOffsetWithRange:function(e,t,r){return Ui(e,t,r)},ellipse:function(e,t,r,i,a){const s=kh(r,i,a);return ps(e,t,a,s).opset},doubleLineOps:function(e,t,r,i,a){return Le(e,t,r,i,a,!0)}};function Sh(e,t,r,i,a){return{type:"path",ops:Le(e,t,r,i,a)}}function vi(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let s=0;s<i-1;s++)a.push(...Le(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&a.push(...Le(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?Sh(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function ay(e,t,r,i,a){return function(s,o){return vi(s,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function so(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=fi(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:fi(r[0],1.5*(1+.22*t.roughness),lo(t));for(let s=1;s<r.length;s++){const o=r[s];if(o.length){const n=fi(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:fi(o,1.5*(1+.22*t.roughness),lo(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&a.push(c)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function kh(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/a;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=rt(o*l,r),n+=rt(n*l,r),{increment:s,rx:o,ry:n}}function ps(e,t,r,i){const[a,s]=co(i.increment,e,t,i.rx,i.ry,1,i.increment*Ui(.1,Ui(.4,1,r),r),r);let o=Gi(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=co(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Gi(n,null,r);o=o.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function no(e,t,r,i,a,s,o,n,l){const c=e,h=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=rt(.01*u,l),d+=rt(.01*d,l);let p=a,g=s;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-p)/2),x=ho(y,c,h,u,d,p,g,1,l);if(!l.disableMultiStroke){const b=ho(y,c,h,u,d,p,g,1.5,l);x.push(...b)}return o&&(n?x.push(...Le(c,h,c+u*Math.cos(p),h+d*Math.sin(p),l),...Le(c,h,c+u*Math.cos(g),h+d*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:x}}function oo(e,t){const r=Ch(bh(tn(e))),i=[];let a=[0,0],s=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":s=[n[0],n[1]],a=[n[0],n[1]];break;case"L":i.push(...Le(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]];break;case"C":{const[l,c,h,u,d,p]=n;i.push(...sy(l,c,h,u,d,p,s,t)),s=[d,p];break}case"Z":i.push(...Le(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]]}return{type:"path",ops:i}}function Ia(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+rt(a,t),i[0][1]+rt(a,t)]});for(let o=1;o<s;o++)r.push({op:"lineTo",data:[i[o][0]+rt(a,t),i[o][1]+rt(a,t)]})}}return{type:"fillPath",ops:r}}function er(e,t){return function(r,i){let a=r.fillStyle||"hachure";if(!Yt[a])switch(a){case"zigzag":Yt[a]||(Yt[a]=new Km(i));break;case"cross-hatch":Yt[a]||(Yt[a]=new Zm(i));break;case"dots":Yt[a]||(Yt[a]=new Qm(i));break;case"dashed":Yt[a]||(Yt[a]=new Jm(i));break;case"zigzag-line":Yt[a]||(Yt[a]=new ty(i));break;default:a="hachure",Yt[a]||(Yt[a]=new Js(i))}return Yt[a]}(t,iy).fillPolygons(e,t)}function lo(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function vh(e){return e.randomizer||(e.randomizer=new ey(e.seed||0)),e.randomizer.next()}function Ui(e,t,r,i=1){return r.roughness*i*(vh(r)*(t-e)+e)}function rt(e,t,r=1){return Ui(-e,e,t,r)}function Le(e,t,r,i,a,s=!1){const o=s?a.disableMultiStrokeFill:a.disableMultiStroke,n=gs(e,t,r,i,a,!0,!1);if(o)return n;const l=gs(e,t,r,i,a,!0,!0);return n.concat(l)}function gs(e,t,r,i,a,s,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=a.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const u=h/2,d=.2+.2*vh(a);let p=a.bowing*a.maxRandomnessOffset*(i-t)/200,g=a.bowing*a.maxRandomnessOffset*(e-r)/200;p=rt(p,a,c),g=rt(g,a,c);const m=[],y=()=>rt(u,a,c),x=()=>rt(h,a,c),b=a.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:rt(h,a,c)),t+(b?0:rt(h,a,c))]}),o?m.push({op:"bcurveTo",data:[p+e+(r-e)*d+y(),g+t+(i-t)*d+y(),p+e+2*(r-e)*d+y(),g+t+2*(i-t)*d+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[p+e+(r-e)*d+x(),g+t+(i-t)*d+x(),p+e+2*(r-e)*d+x(),g+t+2*(i-t)*d+x(),r+(b?0:x()),i+(b?0:x())]}),m}function fi(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]),i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+rt(t,r),e[a][1]+rt(t,r)]),a===e.length-1&&i.push([e[a][0]+rt(t,r),e[a][1]+rt(t,r)]);return Gi(i,null,r)}function Gi(e,t,r){const i=e.length,a=[];if(i>3){const s=[],o=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],s[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],s[3]=[e[n+1][0],e[n+1][1]],a.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...gs(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function co(e,t,r,i,a,s,o,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+a*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+a*Math.sin(0)]),c.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const h=rt(.5,n)-Math.PI/2;c.push([rt(s,n)+t+.9*i*Math.cos(h-e),rt(s,n)+r+.9*a*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let d=h;d<u;d+=e){const p=[rt(s,n)+t+i*Math.cos(d),rt(s,n)+r+a*Math.sin(d)];l.push(p),c.push(p)}c.push([rt(s,n)+t+i*Math.cos(h+2*Math.PI+.5*o),rt(s,n)+r+a*Math.sin(h+2*Math.PI+.5*o)]),c.push([rt(s,n)+t+.98*i*Math.cos(h+o),rt(s,n)+r+.98*a*Math.sin(h+o)]),c.push([rt(s,n)+t+.9*i*Math.cos(h+.5*o),rt(s,n)+r+.9*a*Math.sin(h+.5*o)])}return[c,l]}function ho(e,t,r,i,a,s,o,n,l){const c=s+rt(.1,l),h=[];h.push([rt(n,l)+t+.9*i*Math.cos(c-e),rt(n,l)+r+.9*a*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([rt(n,l)+t+i*Math.cos(u),rt(n,l)+r+a*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),Gi(h,null,l)}function sy(e,t,r,i,a,s,o,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,d=n.preserveVertices;for(let p=0;p<u;p++)p===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(d?0:rt(c[0],n)),o[1]+(d?0:rt(c[0],n))]}),h=d?[a,s]:[a+rt(c[p],n),s+rt(c[p],n)],l.push({op:"bcurveTo",data:[e+rt(c[p],n),t+rt(c[p],n),r+rt(c[p],n),i+rt(c[p],n),h[0],h[1]]});return l}function Or(e){return[...e]}function uo(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Or(e[0]),Or(e[1]),Or(e[2]),Or(e[2]));else{const a=[];a.push(e[0],e[0]);for(let n=1;n<e.length;n++)a.push(e[n]),n===e.length-1&&a.push(e[n]);const s=[],o=1-t;i.push(Or(a[0]));for(let n=1;n+2<a.length;n++){const l=a[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*a[n+1][0]-o*a[n-1][0])/6,l[1]+(o*a[n+1][1]-o*a[n-1][1])/6],s[2]=[a[n+1][0]+(o*a[n][0]-o*a[n+2][0])/6,a[n+1][1]+(o*a[n][1]-o*a[n+2][1])/6],s[3]=[a[n+1][0],a[n+1][1]],i.push(s[1],s[2],s[3])}}return i}function wi(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function ny(e,t,r){const i=wi(t,r);if(i===0)return wi(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),wi(e,Re(t,r,a))}function Re(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function ms(e,t,r,i){const a=i||[];if(function(n,l){const c=n[l+0],h=n[l+1],u=n[l+2],d=n[l+3];let p=3*h[0]-2*c[0]-d[0];p*=p;let g=3*h[1]-2*c[1]-d[1];g*=g;let m=3*u[0]-2*d[0]-c[0];m*=m;let y=3*u[1]-2*d[1]-c[1];return y*=y,p<m&&(p=m),g<y&&(g=y),p+g}(e,t)<r){const n=e[t+0];a.length?(s=a[a.length-1],o=n,Math.sqrt(wi(s,o))>1&&a.push(n)):a.push(n),a.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],d=Re(l,c,.5),p=Re(c,h,.5),g=Re(h,u,.5),m=Re(d,p,.5),y=Re(p,g,.5),x=Re(m,y,.5);ms([l,d,m,x],0,r,a),ms([x,y,g,u],0,r,a)}var s,o;return a}function oy(e,t){return Vi(e,0,e.length,t)}function Vi(e,t,r,i,a){const s=a||[],o=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=ny(e[h],o,n);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(Vi(e,t,c+1,i,s),Vi(e,c,r,i,s)):(s.length||s.push(o),s.push(n)),s}function Ra(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let s=0;s<a;s++)ms(e,3*s,t,i);return r&&r>0?Vi(i,0,i.length,r):i}const Vt="none";class Xi{constructor(t){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=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,a,s){const o=this._o(s);return this._d("line",[Sh(t,r,i,a,o)],o)}rectangle(t,r,i,a,s){const o=this._o(s),n=[],l=ay(t,r,i,a,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];o.fillStyle==="solid"?n.push(Ia([c],o)):n.push(er([c],o))}return o.stroke!==Vt&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,a,s){const o=this._o(s),n=[],l=kh(i,a,o),c=ps(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=ps(t,r,o,l).opset;h.type="fillPath",n.push(h)}else n.push(er([c.estimatedPoints],o));return o.stroke!==Vt&&n.push(c.opset),this._d("ellipse",n,o)}circle(t,r,i,a){const s=this.ellipse(t,r,i,i,a);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[vi(t,!1,i)],i)}arc(t,r,i,a,s,o,n=!1,l){const c=this._o(l),h=[],u=no(t,r,i,a,s,o,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const p=no(t,r,i,a,s,o,!0,!1,d);p.type="fillPath",h.push(p)}else h.push(function(d,p,g,m,y,x,b){const _=d,v=p;let S=Math.abs(g/2),C=Math.abs(m/2);S+=rt(.01*S,b),C+=rt(.01*C,b);let w=y,D=x;for(;w<0;)w+=2*Math.PI,D+=2*Math.PI;D-w>2*Math.PI&&(w=0,D=2*Math.PI);const P=(D-w)/b.curveStepCount,I=[];for(let E=w;E<=D;E+=P)I.push([_+S*Math.cos(E),v+C*Math.sin(E)]);return I.push([_+S*Math.cos(D),v+C*Math.sin(D)]),I.push([_,v]),er([I],b)}(t,r,i,a,s,o,c));return c.stroke!==Vt&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),a=[],s=so(t,i);if(i.fill&&i.fill!==Vt)if(i.fillStyle==="solid"){const o=so(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Ra(uo([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Ra(uo(c),10,(1+i.roughness)/2))}o.length&&a.push(er([o],i))}return i.stroke!==Vt&&a.push(s),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],s=vi(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(Ia([t],i)):a.push(er([t],i))),i.stroke!==Vt&&a.push(s),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==Vt,o=i.stroke!==Vt,n=!!(i.simplification&&i.simplification<1),l=function(h,u,d){const p=Ch(bh(tn(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Ra(x,u)),x=[]},_=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:S,data:C}of p)switch(S){case"M":_(),y=[C[0],C[1]],m.push(y);break;case"L":b(),m.push([C[0],C[1]]);break;case"C":if(!x.length){const w=m.length?m[m.length-1]:y;x.push([w[0],w[1]])}x.push([C[0],C[1]]),x.push([C[2],C[3]]),x.push([C[4],C[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(_(),!d)return g;const v=[];for(const S of g){const C=oy(S,d);C.length&&v.push(C)}return v}(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=oo(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const h=oo(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else a.push(Ia(l,i));else a.push(er(l,i));return o&&(n?l.forEach(h=>{a.push(vi(h,!1,i))}):a.push(c)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const s=typeof r=="number"&&r>=0?a.data.map(o=>+o.toFixed(r)):a.data;switch(a.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const s of r){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Vt};break;case"fillPath":o={d:this.opsToPath(s),stroke:Vt,strokeWidth:0,fill:i.fill||Vt};break;case"fillSketch":o=this.fillSketch(s,i)}o&&a.push(o)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Vt,strokeWidth:i,fill:Vt}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class ly{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Xi(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,o,s),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,o,s,n),a.restore();break}case"fillSketch":this.fillSketch(a,o,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const s of r.ops){const o=typeof i=="number"&&i>=0?s.data.map(n=>+n.toFixed(i)):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o),o}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o),o}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o),o}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,a,s,o,n=!1,l){const c=this.gen.arc(t,r,i,a,s,o,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const pi="http://www.w3.org/2000/svg";class cy{constructor(t,r){this.svg=t,this.gen=new Xi(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,s=a.createElementNS(pi,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=a.createElementNS(pi,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=a.createElementNS(pi,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(a,n,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const s=t.createElementNS(pi,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",a+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o)}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o)}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o)}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,a,s,o,n=!1,l){const c=this.gen.arc(t,r,i,a,s,o,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var Y={canvas:(e,t)=>new ly(e,t),svg:(e,t)=>new cy(e,t),generator:e=>new Xi(e),newSeed:()=>Xi.newSeed()},et=f(async(e,t,r)=>{var u,d;let i;const a=t.useHtmlLabels||Bt((u=dt())==null?void 0:u.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",Rt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=await Ae(o,Jt(Ge(n),dt()),{useHtmlLabels:a,width:t.width||((d=dt().flowchart)==null?void 0:d.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=((t==null?void 0:t.padding)??0)/2;if(a){const p=l.children[0],g=ht(l),m=p.getElementsByTagName("img");if(m){const y=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(x=>new Promise(b=>{function _(){if(x.style.display="flex",x.style.flexDirection="column",y){const v=dt().fontSize?dt().fontSize:window.getComputedStyle(document.body).fontSize,S=5,[C=Oo.fontSize]=na(v),w=C*S+"px";x.style.minWidth=w,x.style.maxWidth=w}else x.style.width="100%";b(x)}f(_,"setupImage"),setTimeout(()=>{x.complete&&_()}),x.addEventListener("error",_),x.addEventListener("load",_)})))}c=p.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}return a?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:c,halfPadding:h,label:o}},"labelHelper"),Pa=f(async(e,t,r)=>{var l,c,h,u,d,p;const i=r.useHtmlLabels||Bt((c=(l=dt())==null?void 0:l.flowchart)==null?void 0:c.htmlLabels),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await Ae(a,Jt(Ge(t),dt()),{useHtmlLabels:i,width:r.width||((u=(h=dt())==null?void 0:h.flowchart)==null?void 0:u.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=s.getBBox();const n=r.padding/2;if(Bt((p=(d=dt())==null?void 0:d.flowchart)==null?void 0:p.htmlLabels)){const g=s.children[0],m=ht(s);o=g.getBoundingClientRect(),m.attr("width",o.width),m.attr("height",o.height)}return i?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:a}},"insertLabel"),X=f((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),tt=f((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function lt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(lt,"createPathFromPoints");function Me(e,t,r,i,a,s){const o=[],l=r-e,c=i-t,h=l/s,u=2*Math.PI/h,d=t+c/2;for(let p=0;p<=50;p++){const g=p/50,m=e+g*l,y=d+a*Math.sin(u*(m-e));o.push({x:m,y})}return o}f(Me,"generateFullSineWavePoints");function Xr(e,t,r,i,a,s){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,p=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:-p,y:-g})}return o}f(Xr,"generateCirclePoints");var hy=f((e,t)=>{var r=e.x,i=e.y,a=t.x-r,s=t.y-i,o=e.width/2,n=e.height/2,l,c;return Math.abs(s)*o>Math.abs(a)*n?(s<0&&(n=-n),l=s===0?0:n*a/s,c=n):(a<0&&(o=-o),l=o,c=a===0?0:o*s/a),{x:r+l,y:i+c}},"intersectRect"),vr=hy;function wh(e,t){t&&e.attr("style",t)}f(wh,"applyStyle");async function Th(e){const t=ht(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=dt();let a=e.label;e.label&&yr(e.label)&&(a=await Bs(e.label.replace(Sr.lineBreakRegex,`
|
|
128
|
+
`),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+a+"</span>";return r.html(Jt(o,i)),wh(r,e.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"),t.node()}f(Th,"addHtmlLabel");var uy=f(async(e,t,r,i)=>{let a=e||"";if(typeof a=="object"&&(a=a[0]),Bt(dt().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),$.info("vertexText"+a);const s={isNode:i,label:Ge(a).replace(/fa[blrs]?:fa-[\w-]+/g,n=>`<i class='${n.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await Th(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof a=="string"?o=a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?o=a:o=[];for(const n of o){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=n.trim(),s.appendChild(l)}return s}},"createLabel"),ze=uy,Ee=f((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),Bh=f(async(e,t)=>{$.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=G(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=Bt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await Ae(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0});let m=g.getBBox();if(Bt(r.flowchart.htmlLabels)){const w=g.children[0],D=ht(g);m=w.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,_=t.y-x/2;$.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const w=Y.svg(u),D=U(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),P=w.path(Ee(b,_,y,x,0),D);v=u.insert(()=>($.debug("Rough node insert CXC",P),P),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:S}=Ys(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const w=p.select("span");w&&w.attr("style",n)}const C=v.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(w){return vr(t,w)},{cluster:u,labelBBox:m}},"rect"),dy=f((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),a=0*t.padding,s=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return vr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),fy=f(async(e,t)=>{const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:s,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const p=u.node().appendChild(await ze(t.label,t.labelStyle,void 0,!0));let g=p.getBBox();if(Bt(r.flowchart.htmlLabels)){const P=p.children[0],I=ht(p);g=P.getBoundingClientRect(),I.attr("width",g.width),I.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,_=t.height+m-g.height-6,v=t.x-x/2,S=t.y-b/2;t.width=x;const C=t.y-t.height/2-y+g.height+2;let w;if(t.look==="handDrawn"){const P=t.cssClasses.includes("statediagram-cluster-alt"),I=Y.svg(c),E=t.rx||t.ry?I.path(Ee(v,S,x,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:a}):I.rectangle(v,S,x,b,{seed:a});w=c.insert(()=>E,":first-child");const W=I.rectangle(v,C,x,_,{fill:P?s:o,fillStyle:P?"hachure":"solid",stroke:l,seed:a});w=c.insert(()=>E,":first-child"),d=c.insert(()=>W)}else w=h.insert("rect",":first-child"),w.attr("class","outer").attr("x",v).attr("y",S).attr("width",x).attr("height",b).attr("data-look",t.look),d.attr("class","inner").attr("x",v).attr("y",C).attr("width",x).attr("height",_);u.attr("transform",`translate(${t.x-g.width/2}, ${S+1-(Bt(r.flowchart.htmlLabels)?0:3)})`);const D=w.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(P){return vr(t,P)},{cluster:c,labelBBox:g}},"roundedWithTitle"),py=f(async(e,t)=>{$.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=G(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=Bt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await Ae(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let m=g.getBBox();if(Bt(r.flowchart.htmlLabels)){const w=g.children[0],D=ht(g);m=w.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,_=t.y-x/2;$.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const w=Y.svg(u),D=U(t,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),P=w.path(Ee(b,_,y,x,t.rx),D);v=u.insert(()=>($.debug("Rough node insert CXC",P),P),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:S}=Ys(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const w=p.select("span");w&&w.attr("style",n)}const C=v.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(w){return vr(t,w)},{cluster:u,labelBBox:m}},"kanbanSection"),gy=f((e,t)=>{const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:s}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,d=t.y-h/2;t.width=c;let p;if(t.look==="handDrawn"){const y=Y.svg(o).rectangle(u,d,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:a});p=o.insert(()=>y,":first-child")}else p=n.insert("rect",":first-child"),p.attr("class","divider").attr("x",u).attr("y",d).attr("width",c).attr("height",h).attr("data-look",t.look);const g=p.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return vr(t,m)},{cluster:o,labelBBox:{}}},"divider"),my=Bh,yy={rect:Bh,squareRect:my,roundedWithTitle:fy,noteGroup:dy,divider:gy,kanbanSection:py},Lh=new Map,xy=f(async(e,t)=>{const r=t.shape||"rect",i=await yy[r](e,t);return Lh.set(t.id,i),i},"insertCluster"),T2=f(()=>{Lh=new Map},"clear");function Mh(e,t){return e.intersect(t)}f(Mh,"intersectNode");var by=Mh;function Ah(e,t,r,i){var a=e.x,s=e.y,o=a-i.x,n=s-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),c=Math.abs(t*r*o/l);i.x<a&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<s&&(h=-h),{x:a+c,y:s+h}}f(Ah,"intersectEllipse");var Eh=Ah;function Fh(e,t,r){return Eh(e,t,t,r)}f(Fh,"intersectCircle");var Cy=Fh;function $h(e,t,r,i){{const a=t.y-e.y,s=e.x-t.x,o=t.x*e.y-e.x*t.y,n=a*r.x+s*r.y+o,l=a*i.x+s*i.y+o,c=1e-6;if(n!==0&&l!==0&&ys(n,l))return;const h=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,p=h*e.x+u*e.y+d,g=h*t.x+u*t.y+d;if(Math.abs(p)<c&&Math.abs(g)<c&&ys(p,g))return;const m=a*u-h*s;if(m===0)return;const y=Math.abs(m/2);let x=s*d-u*o;const b=x<0?(x-y)/m:(x+y)/m;x=h*o-a*d;const _=x<0?(x-y)/m:(x+y)/m;return{x:b,y:_}}}f($h,"intersectLine");function ys(e,t){return e*t>0}f(ys,"sameSign");var _y=$h;function Dh(e,t,r){let i=e.x,a=e.y,s=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),n=Math.min(n,h.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,c=a-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],d=t[h<t.length-1?h+1:0],p=_y(e,r,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y});p&&s.push(p)}return s.length?(s.length>1&&s.sort(function(h,u){let d=h.x-r.x,p=h.y-r.y,g=Math.sqrt(d*d+p*p),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),s[0]):e}f(Dh,"intersectPolygon");var Sy=Dh,q={node:by,circle:Cy,ellipse:Eh,polygon:Sy,rect:vr};function Oh(e,t){const{labelStyles:r}=G(t);t.labelStyle=r;const i=tt(t);let a=i;i||(a="anchor");const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=Y.svg(s),c=U(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=s.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Rt(n)),X(t,u),t.intersect=function(d){return $.info("Circle intersect",t,o,d),q.circle(t,o,d)},s}f(Oh,"anchor");function xs(e,t,r,i,a,s,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,p=u/a,g=d/s,m=Math.sqrt(p**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*s*Math.sin(h)*(o?-1:1),b=c-y*a*Math.cos(h)*(o?-1:1),_=Math.atan2((t-b)/s,(e-x)/a);let S=Math.atan2((i-b)/s,(r-x)/a)-_;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);const C=[];for(let w=0;w<20;w++){const D=w/19,P=_+D*S,I=x+a*Math.cos(P),E=b+s*Math.sin(P);C.push({x:I,y:E})}return C}f(xs,"generateArcPoints");async function Ih(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.width+t.padding+20,n=s.height+t.padding,l=n/2,c=l/(2.5+n/50),{cssStyles:h}=t,u=[{x:o/2,y:-n/2},{x:-o/2,y:-n/2},...xs(-o/2,-n/2,-o/2,n/2,c,l,!1),{x:o/2,y:n/2},...xs(o/2,n/2,o/2,-n/2,c,l,!0)],d=Y.svg(a),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=lt(u),m=d.path(g,p),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),X(t,y),t.intersect=function(x){return q.polygon(t,u,x)},a}f(Ih,"bowTieRect");function Fe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}f(Fe,"insertPolygonShape");async function Rh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.height+t.padding,n=12,l=s.width+t.padding+n,c=0,h=l,u=-o,d=0,p=[{x:c+n,y:u},{x:h,y:u},{x:h,y:d},{x:c,y:d},{x:c,y:u+n},{x:c+n,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=Y.svg(a),x=U(t,{}),b=lt(p),_=y.path(b,x);g=a.insert(()=>_,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=Fe(a,l,o,p);return i&&g.attr("style",i),X(t,g),t.intersect=function(y){return q.polygon(t,p,y)},a}f(Rh,"card");function Ph(e,t){const{nodeStyles:r}=G(t);t.label="";const i=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(28,t.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=Y.svg(i),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=lt(o),h=n.path(c,l),u=i.insert(()=>h,":first-child");return a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return q.polygon(t,o,d)},i}f(Ph,"choice");async function en(e,t,r){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{shapeSvg:s,bbox:o,halfPadding:n}=await et(e,t,tt(t)),l=(r==null?void 0:r.padding)??n,c=o.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const d=Y.svg(s),p=U(t,{}),g=d.circle(0,0,c*2,p);h=s.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",Rt(u))}else h=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",c).attr("cx",0).attr("cy",0);return X(t,h),t.calcIntersect=function(d,p){const g=d.width/2;return q.circle(d,g,p)},t.intersect=function(d){return $.info("Circle intersect",t,c,d),q.circle(t,c,d)},s}f(en,"circle");function Nh(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,a={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${n.x},${n.y}
|
|
129
|
+
M ${a.x},${a.y} L ${o.x},${o.y}`}f(Nh,"createLine");function Wh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),s=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=Y.svg(a),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,s*2,l),h=Nh(s),u=n.path(h,l),d=a.insert(()=>c,":first-child");return d.insert(()=>u),o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),X(t,d),t.intersect=function(p){return $.info("crossedCircle intersect",t,{radius:s,point:p}),q.circle(t,s,p)},a}f(Wh,"crossedCircle");function ye(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,p=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:-p,y:-g})}return o}f(ye,"generateCirclePoints");async function zh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=s.width+(t.padding??0),l=s.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...ye(n/2,-l/2,c,30,-90,0),{x:-n/2-c,y:c},...ye(n/2+c*2,-c,c,20,-180,-270),...ye(n/2+c*2,c,c,20,-90,-180),{x:-n/2-c,y:-l/2},...ye(n/2,l/2,c,20,0,90)],d=[{x:n/2,y:-l/2-c},{x:-n/2,y:-l/2-c},...ye(n/2,-l/2,c,20,-90,0),{x:-n/2-c,y:-c},...ye(n/2+n*.1,-c,c,20,-180,-270),...ye(n/2+n*.1,c,c,20,-90,-180),{x:-n/2-c,y:l/2},...ye(n/2,l/2,c,20,0,90),{x:-n/2,y:l/2+c},{x:n/2,y:l/2+c}],p=Y.svg(a),g=U(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=lt(u).replace("Z",""),x=p.path(y,g),b=lt(d),_=p.path(b,{...g}),v=a.insert("g",":first-child");return v.insert(()=>_,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${c}, 0)`),o.attr("transform",`translate(${-n/2+c-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),X(t,v),t.intersect=function(S){return q.polygon(t,d,S)},a}f(zh,"curlyBraceLeft");function xe(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,p=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:p,y:g})}return o}f(xe,"generateCirclePoints");async function qh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=s.width+(t.padding??0),l=s.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...xe(n/2,-l/2,c,20,-90,0),{x:n/2+c,y:-c},...xe(n/2+c*2,-c,c,20,-180,-270),...xe(n/2+c*2,c,c,20,-90,-180),{x:n/2+c,y:l/2},...xe(n/2,l/2,c,20,0,90)],d=[{x:-n/2,y:-l/2-c},{x:n/2,y:-l/2-c},...xe(n/2,-l/2,c,20,-90,0),{x:n/2+c,y:-c},...xe(n/2+c*2,-c,c,20,-180,-270),...xe(n/2+c*2,c,c,20,-90,-180),{x:n/2+c,y:l/2},...xe(n/2,l/2,c,20,0,90),{x:n/2,y:l/2+c},{x:-n/2,y:l/2+c}],p=Y.svg(a),g=U(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=lt(u).replace("Z",""),x=p.path(y,g),b=lt(d),_=p.path(b,{...g}),v=a.insert("g",":first-child");return v.insert(()=>_,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-c}, 0)`),o.attr("transform",`translate(${-n/2+(t.padding??0)/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),X(t,v),t.intersect=function(S){return q.polygon(t,d,S)},a}f(qh,"curlyBraceRight");function At(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,p=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:-p,y:-g})}return o}f(At,"generateCirclePoints");async function Hh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=s.width+(t.padding??0),l=s.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...At(n/2,-l/2,c,30,-90,0),{x:-n/2-c,y:c},...At(n/2+c*2,-c,c,20,-180,-270),...At(n/2+c*2,c,c,20,-90,-180),{x:-n/2-c,y:-l/2},...At(n/2,l/2,c,20,0,90)],d=[...At(-n/2+c+c/2,-l/2,c,20,-90,-180),{x:n/2-c/2,y:c},...At(-n/2-c/2,-c,c,20,0,90),...At(-n/2-c/2,c,c,20,-90,0),{x:n/2-c/2,y:-c},...At(-n/2+c+c/2,l/2,c,30,-180,-270)],p=[{x:n/2,y:-l/2-c},{x:-n/2,y:-l/2-c},...At(n/2,-l/2,c,20,-90,0),{x:-n/2-c,y:-c},...At(n/2+c*2,-c,c,20,-180,-270),...At(n/2+c*2,c,c,20,-90,-180),{x:-n/2-c,y:l/2},...At(n/2,l/2,c,20,0,90),{x:-n/2,y:l/2+c},{x:n/2-c-c/2,y:l/2+c},...At(-n/2+c+c/2,-l/2,c,20,-90,-180),{x:n/2-c/2,y:c},...At(-n/2-c/2,-c,c,20,0,90),...At(-n/2-c/2,c,c,20,-90,0),{x:n/2-c/2,y:-c},...At(-n/2+c+c/2,l/2,c,30,-180,-270)],g=Y.svg(a),m=U(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=lt(u).replace("Z",""),b=g.path(x,m),v=lt(d).replace("Z",""),S=g.path(v,m),C=lt(p),w=g.path(C,{...m}),D=a.insert("g",":first-child");return D.insert(()=>w,":first-child").attr("stroke-opacity",0),D.insert(()=>b,":first-child"),D.insert(()=>S,":first-child"),D.attr("class","text"),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-n/2+(t.padding??0)/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),X(t,D),t.intersect=function(P){return q.polygon(t,p,P)},a}f(Hh,"curlyBraces");async function jh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=80,n=20,l=Math.max(o,(s.width+(t.padding??0)*2)*1.25,(t==null?void 0:t.width)??0),c=Math.max(n,s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/2,{cssStyles:u}=t,d=Y.svg(a),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...Xr(-y,-m/2,h,50,270,90)],_=lt(b),v=d.path(_,p),S=a.insert(()=>v,":first-child");return S.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),S.attr("transform",`translate(${-l/2}, ${-c/2})`),X(t,S),t.intersect=function(C){return q.polygon(t,b,C)},a}f(jh,"curvedTrapezoid");var ky=f((e,t,r,i,a,s)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),vy=f((e,t,r,i,a,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),wy=f((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Yh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+t.padding,t.width??0),l=n/2,c=l/(2.5+n/50),h=Math.max(s.height+c+t.padding,t.height??0);let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=Y.svg(a),g=vy(0,0,n,h,l,c),m=wy(0,c,n,h,l,c),y=p.path(g,U(t,{})),x=p.path(m,U(t,{fill:"none"}));u=a.insert(()=>x,":first-child"),u=a.insert(()=>y,":first-child"),u.attr("class","basic label-container"),d&&u.attr("style",d)}else{const p=ky(0,0,n,h,l,c);u=a.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",Rt(d)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-n/2}, ${-(h/2+c)})`),X(t,u),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+(t.padding??0)/1.5-(s.y-(s.top??0))})`),t.intersect=function(p){const g=q.rect(t,p),m=g.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,p.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},a}f(Yh,"cylinder");async function Uh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=s.width+t.padding,l=s.height+t.padding,c=l*.2,h=-n/2,u=-l/2-c/2,{cssStyles:d}=t,p=Y.svg(a),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=p.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(s.x-(s.left??0))}, ${u+c+(t.padding??0)/2-(s.y-(s.top??0))})`),X(t,x),t.intersect=function(b){return q.rect(t,b)},a}f(Uh,"dividedRectangle");async function Gh(e,t){var d,p;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o}=await et(e,t,tt(t)),l=s.width/2+o+5,c=s.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=Y.svg(a),m=U(t,{roughness:.2,strokeWidth:2.5}),y=U(t,{roughness:.2,strokeWidth:1.5}),x=g.circle(0,0,l*2,m),b=g.circle(0,0,c*2,y);h=a.insert("g",":first-child"),h.attr("class",Rt(t.cssClasses)).attr("style",Rt(u)),(d=h.node())==null||d.appendChild(x),(p=h.node())==null||p.appendChild(b)}else{h=a.insert("g",":first-child");const g=h.insert("circle",":first-child"),m=h.insert("circle");h.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return X(t,h),t.intersect=function(g){return $.info("DoubleCircle intersect",t,l,g),q.circle(t,l,g)},a}f(Gh,"doublecircle");function Vh(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=G(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=Y.svg(s),{nodeBorder:c}=r,h=U(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),d=s.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),X(t,d),t.intersect=function(p){return $.info("filledCircle intersect",t,{radius:o,point:p}),q.circle(t,o,p)},s}f(Vh,"filledCircle");async function Xh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=s.width+(t.padding??0),l=n+s.height,c=n+s.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,d=Y.svg(a),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=lt(h),m=d.path(g,p),y=a.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=n,t.height=l,X(t,y),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-l/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(x){return $.info("Triangle intersect",t,h,x),q.polygon(t,h,x)},a}f(Xh,"flippedTriangle");function Kh(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:s}=G(t);t.label="";const o=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,u=-1*c/2,d=Y.svg(o),p=U(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=d.rectangle(h,u,l,c,p),m=o.insert(()=>g,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),X(t,m);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return q.rect(t,x)},o}f(Kh,"forkJoin");async function Zh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=80,s=50,{shapeSvg:o,bbox:n}=await et(e,t,tt(t)),l=Math.max(a,n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s,n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/2,{cssStyles:u}=t,d=Y.svg(o),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...Xr(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=lt(g),y=d.path(m,p),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),X(t,x),t.intersect=function(b){return $.info("Pill intersect",t,{radius:h,point:b}),q.polygon(t,g,b)},o}f(Zh,"halfRoundedRectangle");async function Qh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.height+(t.padding??0),n=s.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=Y.svg(a),h=U(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=n/2;const d=u/6;u=u+d;const p=o/2,g=p/2,m=u-g,y=[{x:-m,y:-p},{x:0,y:-p},{x:m,y:-p},{x:u,y:0},{x:m,y:p},{x:0,y:p},{x:-m,y:p},{x:-u,y:0}],x=lt(y),b=c.path(x,h),_=a.insert(()=>b,":first-child");return _.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),t.width=n,t.height=o,X(t,_),t.intersect=function(v){return q.polygon(t,y,v)},a}f(Qh,"hexagon");async function Jh(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await et(e,t,tt(t)),s=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=Y.svg(a),c=U(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],u=lt(h),d=l.path(u,c),p=a.insert(()=>d,":first-child");return p.attr("class","basic label-container"),n&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-s/2}, ${-o/2})`),X(t,p),t.intersect=function(g){return $.info("Pill intersect",t,{points:h}),q.polygon(t,h,g)},a}f(Jh,"hourglass");async function tu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await et(e,t,"icon-shape default"),d=t.pos==="t",p=n,g=n,{nodeBorder:m}=r,{stylesMap:y}=kr(t),x=-g/2,b=-p/2,_=t.label?8:0,v=Y.svg(c),S=U(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const C=v.rectangle(x,b,g,p,S),w=Math.max(g,h.width),D=p+h.height+_,P=v.rectangle(-w/2,-D/2,w,D,{...S,fill:"transparent",stroke:"none"}),I=c.insert(()=>C,":first-child"),E=c.insert(()=>P);if(t.icon){const W=c.append("g");W.html(`<g>${await ei(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const O=W.node().getBBox(),A=O.width,L=O.height,B=O.x,F=O.y;W.attr("transform",`translate(${-A/2-B},${d?h.height/2+_/2-L/2-F:-h.height/2-_/2-L/2-F})`),W.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-D/2:D/2-h.height})`),I.attr("transform",`translate(0,${d?h.height/2+_/2:-h.height/2-_/2})`),X(t,E),t.intersect=function(W){if($.info("iconSquare intersect",t,W),!t.label)return q.rect(t,W);const O=t.x??0,A=t.y??0,L=t.height??0;let B=[];return d?B=[{x:O-h.width/2,y:A-L/2},{x:O+h.width/2,y:A-L/2},{x:O+h.width/2,y:A-L/2+h.height+_},{x:O+g/2,y:A-L/2+h.height+_},{x:O+g/2,y:A+L/2},{x:O-g/2,y:A+L/2},{x:O-g/2,y:A-L/2+h.height+_},{x:O-h.width/2,y:A-L/2+h.height+_}]:B=[{x:O-g/2,y:A-L/2},{x:O+g/2,y:A-L/2},{x:O+g/2,y:A-L/2+p},{x:O+h.width/2,y:A-L/2+p},{x:O+h.width/2/2,y:A+L/2},{x:O-h.width/2,y:A+L/2},{x:O-h.width/2,y:A-L/2+p},{x:O-g/2,y:A-L/2+p}],q.polygon(t,B,W)},c}f(tu,"icon");async function eu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await et(e,t,"icon-shape default"),d=20,p=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=kr(t),b=Y.svg(c),_=U(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=x.get("fill");_.stroke=v??y;const S=c.append("g");t.icon&&S.html(`<g>${await ei(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const C=S.node().getBBox(),w=C.width,D=C.height,P=C.x,I=C.y,E=Math.max(w,D)*Math.SQRT2+d*2,W=b.circle(0,0,E,_),O=Math.max(E,h.width),A=E+h.height+p,L=b.rectangle(-O/2,-A/2,O,A,{..._,fill:"transparent",stroke:"none"}),B=c.insert(()=>W,":first-child"),F=c.insert(()=>L);return S.attr("transform",`translate(${-w/2-P},${g?h.height/2+p/2-D/2-I:-h.height/2-p/2-D/2-I})`),S.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-A/2:A/2-h.height})`),B.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),X(t,F),t.intersect=function(M){return $.info("iconSquare intersect",t,M),q.rect(t,M)},c}f(eu,"iconCircle");async function ru(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await et(e,t,"icon-shape default"),p=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=kr(t),_=-m/2,v=-g/2,S=t.label?8:0,C=Y.svg(c),w=U(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const D=b.get("fill");w.stroke=D??x;const P=C.path(Ee(_,v,m,g,5),w),I=Math.max(m,h.width),E=g+h.height+S,W=C.rectangle(-I/2,-E/2,I,E,{...w,fill:"transparent",stroke:"none"}),O=c.insert(()=>P,":first-child").attr("class","icon-shape2"),A=c.insert(()=>W);if(t.icon){const L=c.append("g");L.html(`<g>${await ei(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=L.node().getBBox(),F=B.width,M=B.height,z=B.x,V=B.y;L.attr("transform",`translate(${-F/2-z},${p?h.height/2+S/2-M/2-V:-h.height/2-S/2-M/2-V})`),L.attr("style",`color: ${b.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-E/2:E/2-h.height})`),O.attr("transform",`translate(0,${p?h.height/2+S/2:-h.height/2-S/2})`),X(t,A),t.intersect=function(L){if($.info("iconSquare intersect",t,L),!t.label)return q.rect(t,L);const B=t.x??0,F=t.y??0,M=t.height??0;let z=[];return p?z=[{x:B-h.width/2,y:F-M/2},{x:B+h.width/2,y:F-M/2},{x:B+h.width/2,y:F-M/2+h.height+S},{x:B+m/2,y:F-M/2+h.height+S},{x:B+m/2,y:F+M/2},{x:B-m/2,y:F+M/2},{x:B-m/2,y:F-M/2+h.height+S},{x:B-h.width/2,y:F-M/2+h.height+S}]:z=[{x:B-m/2,y:F-M/2},{x:B+m/2,y:F-M/2},{x:B+m/2,y:F-M/2+g},{x:B+h.width/2,y:F-M/2+g},{x:B+h.width/2/2,y:F+M/2},{x:B-h.width/2,y:F+M/2},{x:B-h.width/2,y:F-M/2+g},{x:B-m/2,y:F-M/2+g}],q.polygon(t,z,L)},c}f(ru,"iconRounded");async function iu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await et(e,t,"icon-shape default"),p=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=kr(t),_=-m/2,v=-g/2,S=t.label?8:0,C=Y.svg(c),w=U(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const D=b.get("fill");w.stroke=D??x;const P=C.path(Ee(_,v,m,g,.1),w),I=Math.max(m,h.width),E=g+h.height+S,W=C.rectangle(-I/2,-E/2,I,E,{...w,fill:"transparent",stroke:"none"}),O=c.insert(()=>P,":first-child"),A=c.insert(()=>W);if(t.icon){const L=c.append("g");L.html(`<g>${await ei(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=L.node().getBBox(),F=B.width,M=B.height,z=B.x,V=B.y;L.attr("transform",`translate(${-F/2-z},${p?h.height/2+S/2-M/2-V:-h.height/2-S/2-M/2-V})`),L.attr("style",`color: ${b.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-E/2:E/2-h.height})`),O.attr("transform",`translate(0,${p?h.height/2+S/2:-h.height/2-S/2})`),X(t,A),t.intersect=function(L){if($.info("iconSquare intersect",t,L),!t.label)return q.rect(t,L);const B=t.x??0,F=t.y??0,M=t.height??0;let z=[];return p?z=[{x:B-h.width/2,y:F-M/2},{x:B+h.width/2,y:F-M/2},{x:B+h.width/2,y:F-M/2+h.height+S},{x:B+m/2,y:F-M/2+h.height+S},{x:B+m/2,y:F+M/2},{x:B-m/2,y:F+M/2},{x:B-m/2,y:F-M/2+h.height+S},{x:B-h.width/2,y:F-M/2+h.height+S}]:z=[{x:B-m/2,y:F-M/2},{x:B+m/2,y:F-M/2},{x:B+m/2,y:F-M/2+g},{x:B+h.width/2,y:F-M/2+g},{x:B+h.width/2/2,y:F+M/2},{x:B-h.width/2,y:F+M/2},{x:B-h.width/2,y:F-M/2+g},{x:B-m/2,y:F-M/2+g}],q.polygon(t,z,L)},c}f(iu,"iconSquare");async function au(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/s;const{labelStyles:o}=G(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??a),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??s;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:d,label:p}=await et(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=Y.svg(u),_=U(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=b.rectangle(m,y,c,h,_),S=Math.max(c,d.width),C=h+d.height+x,w=b.rectangle(-S/2,-C/2,S,C,{..._,fill:"none",stroke:"none"}),D=u.insert(()=>v,":first-child"),P=u.insert(()=>w);if(t.img){const I=u.append("image");I.attr("href",t.img),I.attr("width",c),I.attr("height",h),I.attr("preserveAspectRatio","none"),I.attr("transform",`translate(${-c/2},${g?C/2-h:-C/2})`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-h/2-d.height/2-x/2:h/2-d.height/2+x/2})`),D.attr("transform",`translate(0,${g?d.height/2+x/2:-d.height/2-x/2})`),X(t,P),t.intersect=function(I){if($.info("iconSquare intersect",t,I),!t.label)return q.rect(t,I);const E=t.x??0,W=t.y??0,O=t.height??0;let A=[];return g?A=[{x:E-d.width/2,y:W-O/2},{x:E+d.width/2,y:W-O/2},{x:E+d.width/2,y:W-O/2+d.height+x},{x:E+c/2,y:W-O/2+d.height+x},{x:E+c/2,y:W+O/2},{x:E-c/2,y:W+O/2},{x:E-c/2,y:W-O/2+d.height+x},{x:E-d.width/2,y:W-O/2+d.height+x}]:A=[{x:E-c/2,y:W-O/2},{x:E+c/2,y:W-O/2},{x:E+c/2,y:W-O/2+h},{x:E+d.width/2,y:W-O/2+h},{x:E+d.width/2/2,y:W+O/2},{x:E-d.width/2,y:W+O/2},{x:E-d.width/2,y:W-O/2+h},{x:E-c/2,y:W-O/2+h}],q.polygon(t,A,I)},u}f(au,"imageSquare");async function su(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),n=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*n/6,y:-n},{x:-3*n/6,y:-n}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(a),d=U(t,{}),p=lt(l),g=u.path(p,d);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&c.attr("style",h)}else c=Fe(a,o,n,l);return i&&c.attr("style",i),t.width=o,t.height=n,X(t,c),t.intersect=function(u){return q.polygon(t,l,u)},a}f(su,"inv_trapezoid");async function ha(e,t,r){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{shapeSvg:s,bbox:o}=await et(e,t,tt(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-n/2,h=-l/2;let u,{rx:d,ry:p}=t;const{cssStyles:g}=t;if(r!=null&&r.rx&&r.ry&&(d=r.rx,p=r.ry),t.look==="handDrawn"){const m=Y.svg(s),y=U(t,{}),x=d||p?m.path(Ee(c,h,n,l,d||0),y):m.rectangle(c,h,n,l,y);u=s.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Rt(g))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",a).attr("rx",Rt(d)).attr("ry",Rt(p)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return X(t,u),t.calcIntersect=function(m,y){return q.rect(m,y)},t.intersect=function(m){return q.rect(t,m)},s}f(ha,"drawRect");async function nu(e,t){const{shapeSvg:r,bbox:i,label:a}=await et(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),X(t,s),t.intersect=function(l){return q.rect(t,l)},r}f(nu,"labelRect");async function ou(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)??0),l=[{x:0,y:0},{x:o+3*n/6,y:0},{x:o,y:-n},{x:-(3*n)/6,y:-n}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(a),d=U(t,{}),p=lt(l),g=u.path(p,d);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&c.attr("style",h)}else c=Fe(a,o,n,l);return i&&c.attr("style",i),t.width=o,t.height=n,X(t,c),t.intersect=function(u){return q.polygon(t,l,u)},a}f(ou,"lean_left");async function lu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)??0),l=[{x:-3*n/6,y:0},{x:o,y:0},{x:o+3*n/6,y:-n},{x:0,y:-n}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(a),d=U(t,{}),p=lt(l),g=u.path(p,d);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&c.attr("style",h)}else c=Fe(a,o,n,l);return i&&c.attr("style",i),t.width=o,t.height=n,X(t,c),t.intersect=function(u){return q.polygon(t,l,u)},a}f(lu,"lean_right");function cu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],h=Y.svg(a),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=lt(c),p=h.path(d,u),g=a.insert(()=>p,":first-child");return s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-n})`),X(t,g),t.intersect=function(m){return $.info("lightningBolt intersect",t,m),q.polygon(t,c,m)},a}f(cu,"lightningBolt");var Ty=f((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),By=f((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Ly=f((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function hu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0),t.width??0),l=n/2,c=l/(2.5+n/50),h=Math.max(s.height+c+(t.padding??0),t.height??0),u=h*.1;let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=Y.svg(a),m=By(0,0,n,h,l,c,u),y=Ly(0,c,n,h,l,c),x=U(t,{}),b=g.path(m,x),_=g.path(y,x);a.insert(()=>_,":first-child").attr("class","line"),d=a.insert(()=>b,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{const g=Ty(0,0,n,h,l,c,u);d=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Rt(p)).attr("style",i)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-n/2}, ${-(h/2+c)})`),X(t,d),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+c-(s.y-(s.top??0))})`),t.intersect=function(g){const m=q.rect(t,g),y=m.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},a}f(hu,"linedCylinder");async function uu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/4,h=l+c,{cssStyles:u}=t,d=Y.svg(a),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-n/2-n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:h/2},...Me(-n/2-n/2*.1,h/2,n/2+n/2*.1,h/2,c,.8),{x:n/2+n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:-h/2},{x:-n/2,y:-h/2},{x:-n/2,y:h/2*1.1},{x:-n/2,y:-h/2}],m=d.polygon(g.map(x=>[x.x,x.y]),p),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)+n/2*.1/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),X(t,y),t.intersect=function(x){return q.polygon(t,g,x)},a}f(uu,"linedWaveEdgedRect");async function du(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=5,h=-n/2,u=-l/2,{cssStyles:d}=t,p=Y.svg(a),g=U(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+n-c,y:u+l+c},{x:h+n-c,y:u+l},{x:h+n,y:u+l},{x:h+n,y:u+l-c},{x:h+n+c,y:u+l-c},{x:h+n+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+n-c,y:u+c},{x:h+n-c,y:u+l},{x:h+n,y:u+l},{x:h+n,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=lt(m),b=p.path(x,g),_=lt(y),v=p.path(_,{...g,fill:"none"}),S=a.insert(()=>v,":first-child");return S.insert(()=>b,":first-child"),S.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(s.width/2)-c-(s.x-(s.left??0))}, ${-(s.height/2)+c-(s.y-(s.top??0))})`),X(t,S),t.intersect=function(C){return q.polygon(t,m,C)},a}f(du,"multiRect");async function fu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/4,h=l+c,u=-n/2,d=-h/2,p=5,{cssStyles:g}=t,m=Me(u-p,d+h+p,u+n-p,d+h+p,c,.8),y=m==null?void 0:m[m.length-1],x=[{x:u-p,y:d+p},{x:u-p,y:d+h+p},...m,{x:u+n-p,y:y.y-p},{x:u+n,y:y.y-p},{x:u+n,y:y.y-2*p},{x:u+n+p,y:y.y-2*p},{x:u+n+p,y:d-p},{x:u+p,y:d-p},{x:u+p,y:d},{x:u,y:d},{x:u,y:d+p}],b=[{x:u,y:d+p},{x:u+n-p,y:d+p},{x:u+n-p,y:y.y-p},{x:u+n,y:y.y-p},{x:u+n,y:d},{x:u,y:d}],_=Y.svg(a),v=U(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const S=lt(x),C=_.path(S,v),w=lt(b),D=_.path(w,v),P=a.insert(()=>C,":first-child");return P.insert(()=>D),P.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-(s.width/2)-p-(s.x-(s.left??0))}, ${-(s.height/2)+p-c/2-(s.y-(s.top??0))})`),X(t,P),t.intersect=function(I){return q.polygon(t,x,I)},a}f(fu,"multiWaveEdgedRectangle");async function pu(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i,t.useHtmlLabels||((b=Ot().flowchart)==null?void 0:b.htmlLabels)!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),c=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-c/2,d=-h/2,{cssStyles:p}=t,g=Y.svg(o),m=U(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,d,c,h,m),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",p),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),X(t,x),t.intersect=function(_){return q.rect(t,_)},o}f(pu,"note");var My=f((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function gu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.width+t.padding,n=s.height+t.padding,l=o+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=Y.svg(a),g=U(t,{}),m=My(0,0,l),y=p.path(m,g);u=a.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),d&&u.attr("style",d)}else u=Fe(a,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),X(t,u),t.calcIntersect=function(p,g){const m=p.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=q.polygon(p,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(p){return this.calcIntersect(t,p)},a}f(gu,"question");async function mu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)??0),c=-n/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:p}=t,g=Y.svg(a),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=lt(d),x=g.path(y,m),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),X(t,b),t.intersect=function(_){return q.polygon(t,d,_)},a}f(mu,"rect_left_inv_arrow");async function yu(e,t){var D,P;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=s.insert("g"),n=s.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=n.node().appendChild(await ze(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(Bt((P=(D=dt())==null?void 0:D.flowchart)==null?void 0:P.htmlLabels)){const I=h.children[0],E=ht(h);u=I.getBoundingClientRect(),E.attr("width",u.width),E.attr("height",u.height)}$.info("Text 2",l);const d=l||[],p=h.getBBox(),g=n.node().appendChild(await ze(d.join?d.join("<br/>"):d,t.labelStyle,!0,!0)),m=g.children[0],y=ht(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;ht(g).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+x+5)+")"),ht(h).attr("transform","translate( "+(u.width<p.width?0:-(p.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),_=u.height+(t.padding||0),v=-u.width/2-x,S=-u.height/2-x;let C,w;if(t.look==="handDrawn"){const I=Y.svg(s),E=U(t,{}),W=I.path(Ee(v,S,b,_,t.rx||0),E),O=I.line(-u.width/2-x,-u.height/2-x+p.height+x,u.width/2+x,-u.height/2-x+p.height+x,E);w=s.insert(()=>($.debug("Rough node insert CXC",W),O),":first-child"),C=s.insert(()=>($.debug("Rough node insert CXC",W),W),":first-child")}else C=o.insert("rect",":first-child"),w=o.insert("line"),C.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),w.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+p.height+x).attr("y2",-u.height/2-x+p.height+x);return X(t,C),t.intersect=function(I){return q.rect(t,I)},s}f(yu,"rectWithTitle");function Pr(e,t,r,i,a,s,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,p=u/a,g=d/s,m=Math.sqrt(p**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*s*Math.sin(h)*(o?-1:1),b=c-y*a*Math.cos(h)*(o?-1:1),_=Math.atan2((t-b)/s,(e-x)/a);let S=Math.atan2((i-b)/s,(r-x)/a)-_;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);const C=[];for(let w=0;w<20;w++){const D=w/19,P=_+D*S,I=x+a*Math.cos(P),E=b+s*Math.sin(P);C.push({x:I,y:E})}return C}f(Pr,"generateArcPoints");async function xu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=(t==null?void 0:t.padding)??0,n=(t==null?void 0:t.padding)??0,l=(t!=null&&t.width?t==null?void 0:t.width:s.width)+o*2,c=(t!=null&&t.height?t==null?void 0:t.height:s.height)+n*2,h=t.radius||5,u=t.taper||5,{cssStyles:d}=t,p=Y.svg(a),g=U(t,{});t.stroke&&(g.stroke=t.stroke),t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},...Pr(l/2-u,-c/2,l/2,-c/2+u,h,h,!0),{x:l/2,y:-c/2+u},{x:l/2,y:c/2-u},...Pr(l/2,c/2-u,l/2-u,c/2,h,h,!0),{x:l/2-u,y:c/2},{x:-l/2+u,y:c/2},...Pr(-l/2+u,c/2,-l/2,c/2-u,h,h,!0),{x:-l/2,y:c/2-u},{x:-l/2,y:-c/2+u},...Pr(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],y=lt(m),x=p.path(y,g),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),X(t,b),t.intersect=function(_){return q.polygon(t,m,_)},a}f(xu,"roundedRect");async function bu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=(t==null?void 0:t.padding)??0,l=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=-s.width/2-n,u=-s.height/2-n,{cssStyles:d}=t,p=Y.svg(a),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=p.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",Rt(d)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(t.padding??0)-(s.x-(s.left??0))},${-c/2+(t.padding??0)-(s.y-(s.top??0))})`),X(t,x),t.intersect=function(b){return q.rect(t,b)},a}f(bu,"shadedProcess");async function Cu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=-n/2,h=-l/2,{cssStyles:u}=t,d=Y.svg(a),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+n,y:h+l},{x:c+n,y:h-l/2}],m=lt(g),y=d.path(m,p),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))}, ${-l/4+(t.padding??0)-(s.y-(s.top??0))})`),X(t,x),t.intersect=function(b){return q.polygon(t,g,b)},a}f(Cu,"slopedRect");async function _u(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??((t==null?void 0:t.padding)||0)*2,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return ha(e,t,r)}f(_u,"squareRect");async function Su(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.height+t.padding,n=s.width+o/4+t.padding,l=o/2,{cssStyles:c}=t,h=Y.svg(a),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=[{x:-n/2+l,y:-o/2},{x:n/2-l,y:-o/2},...Xr(-n/2+l,0,l,50,90,270),{x:n/2-l,y:o/2},...Xr(n/2-l,0,l,50,270,450)],p=lt(d),g=h.path(p,u),m=a.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),X(t,m),t.intersect=function(y){return q.polygon(t,d,y)},a}f(Su,"stadium");async function ku(e,t){return ha(e,t,{rx:5,ry:5})}f(ku,"state");function vu(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:o,stateBorder:n,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=Y.svg(c),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),p=n??l,g=h.circle(0,0,5,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>d,":first-child");return m.insert(()=>g),s&&m.selectAll("path").attr("style",s),a&&m.selectAll("path").attr("style",a),X(t,m),t.intersect=function(y){return q.circle(t,7,y)},c}f(vu,"stateEnd");function wu(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let s;if(t.look==="handDrawn"){const n=Y.svg(a).circle(0,0,14,tm(i));s=a.insert(()=>n),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return X(t,s),t.intersect=function(o){return q.circle(t,7,o)},a}f(wu,"stateStart");async function Tu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=((t==null?void 0:t.padding)||0)/2,n=s.width+t.padding,l=s.height+t.padding,c=-s.width/2-o,h=-s.height/2-o,u=[{x:0,y:0},{x:n,y:0},{x:n,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const d=Y.svg(a),p=U(t,{}),g=d.rectangle(c-8,h,n+16,l,p),m=d.line(c,h,c,h+l,p),y=d.line(c+n,h,c+n,h+l,p);a.insert(()=>m,":first-child"),a.insert(()=>y,":first-child");const x=a.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",Rt(b)),X(t,x)}else{const d=Fe(a,n,l,u);i&&d.attr("style",i),X(t,d)}return t.intersect=function(d){return q.polygon(t,u,d)},a}f(Tu,"subroutine");async function Bu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),n=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=-o/2,c=-n/2,h=.2*n,u=.2*n,{cssStyles:d}=t,p=Y.svg(a),g=U(t,{}),m=[{x:l-h/2,y:c},{x:l+o+h/2,y:c},{x:l+o+h/2,y:c+n},{x:l-h/2,y:c+n}],y=[{x:l+o-h/2,y:c+n},{x:l+o+h/2,y:c+n},{x:l+o+h/2,y:c+n-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=lt(m),b=p.path(x,g),_=lt(y),v=p.path(_,{...g,fillStyle:"solid"}),S=a.insert(()=>v,":first-child");return S.insert(()=>b,":first-child"),S.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),X(t,S),t.intersect=function(C){return q.polygon(t,m,C)},a}f(Bu,"taggedRect");async function Lu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/4,h=.2*n,u=.2*l,d=l+c,{cssStyles:p}=t,g=Y.svg(a),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:d/2},...Me(-n/2-n/2*.1,d/2,n/2+n/2*.1,d/2,c,.8),{x:n/2+n/2*.1,y:-d/2},{x:-n/2-n/2*.1,y:-d/2}],x=-n/2+n/2*.1,b=-d/2-u*.4,_=[{x:x+n-h,y:(b+l)*1.4},{x:x+n,y:b+l-u},{x:x+n,y:(b+l)*.9},...Me(x+n,(b+l)*1.3,x+n-h,(b+l)*1.5,-l*.03,.5)],v=lt(y),S=g.path(v,m),C=lt(_),w=g.path(C,{...m,fillStyle:"solid"}),D=a.insert(()=>w,":first-child");return D.insert(()=>S,":first-child"),D.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),X(t,D),t.intersect=function(P){return q.polygon(t,y,P)},a}f(Lu,"taggedWaveEdgedRectangle");async function Mu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=Math.max(s.width+t.padding,(t==null?void 0:t.width)||0),n=Math.max(s.height+t.padding,(t==null?void 0:t.height)||0),l=-o/2,c=-n/2,h=a.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",n),X(t,h),t.intersect=function(u){return q.rect(t,u)},a}f(Mu,"text");var Ay=f((e,t,r,i,a,s)=>`M${e},${t}
|
|
130
|
+
a${a},${s} 0,0,1 0,${-i}
|
|
131
|
+
l${r},0
|
|
132
|
+
a${a},${s} 0,0,1 0,${i}
|
|
133
|
+
M${r},${-i}
|
|
134
|
+
a${a},${s} 0,0,0 0,${i}
|
|
135
|
+
l${-r},0`,"createCylinderPathD"),Ey=f((e,t,r,i,a,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Fy=f((e,t,r,i,a,s)=>[`M${e+r/2},${-i/2}`,`a${a},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Au(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o,halfPadding:n}=await et(e,t,tt(t)),l=t.look==="neo"?n*2:n,c=s.height+l,h=c/2,u=h/(2.5+c/50),d=s.width+u+l,{cssStyles:p}=t;let g;if(t.look==="handDrawn"){const m=Y.svg(a),y=Ey(0,0,d,c,u,h),x=Fy(0,0,d,c,u,h),b=m.path(y,U(t,{})),_=m.path(x,U(t,{fill:"none"}));g=a.insert(()=>_,":first-child"),g=a.insert(()=>b,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const m=Ay(0,0,d,c,u,h);g=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Rt(p)).attr("style",i),g.attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),o.attr("transform",`translate(${-(s.width/2)-u-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),X(t,g),t.intersect=function(m){const y=q.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},a}f(Au,"tiltedCylinder");async function Eu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.width+t.padding,n=s.height+t.padding,l=[{x:-3*n/6,y:0},{x:o+3*n/6,y:0},{x:o,y:-n},{x:0,y:-n}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(a),d=U(t,{}),p=lt(l),g=u.path(p,d);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&c.attr("style",h)}else c=Fe(a,o,n,l);return i&&c.attr("style",i),t.width=o,t.height=n,X(t,c),t.intersect=function(u){return q.polygon(t,l,u)},a}f(Eu,"trapezoid");async function Fu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=60,n=20,l=Math.max(o,s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n,s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),{cssStyles:h}=t,u=Y.svg(a),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=lt(p),m=u.path(g,d),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),X(t,y),t.intersect=function(x){return q.polygon(t,p,x)},a}f(Fu,"trapezoidalPentagon");async function $u(e,t){var b;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Bt((b=dt().flowchart)==null?void 0:b.htmlLabels),l=s.width+(t.padding??0),c=l+s.height,h=l+s.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:d}=t,p=Y.svg(a),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=lt(u),y=p.path(m,g),x=a.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,X(t,x),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${c/2-(s.height+(t.padding??0)/(n?2:1)-(s.y-(s.top??0)))})`),t.intersect=function(_){return $.info("Triangle intersect",t,u,_),q.polygon(t,u,_)},a}f($u,"triangle");async function Du(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=l+c,{cssStyles:u}=t,p=70-n,g=p>0?p/2:0,m=Y.svg(a),y=U(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-n/2-g,y:h/2},...Me(-n/2-g,h/2,n/2+g,h/2,c,.8),{x:n/2+g,y:-h/2},{x:-n/2-g,y:-h/2}],b=lt(x),_=m.path(b,y),v=a.insert(()=>_,":first-child");return v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c-(s.y-(s.top??0))})`),X(t,v),t.intersect=function(S){return q.polygon(t,x,S)},a}f(Du,"waveEdgedRectangle");async function Ou(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=100,n=50,l=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/c;let u=l,d=c;u>d*h?d=u/h:u=d*h,u=Math.max(u,o),d=Math.max(d,n);const p=Math.min(d*.2,d/4),g=d+p*2,{cssStyles:m}=t,y=Y.svg(a),x=U(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...Me(-u/2,g/2,u/2,g/2,p,1),{x:u/2,y:-g/2},...Me(u/2,-g/2,-u/2,-g/2,p,-1)],_=lt(b),v=y.path(_,x),S=a.insert(()=>v,":first-child");return S.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),X(t,S),t.intersect=function(C){return q.polygon(t,b,C)},a}f(Ou,"waveRectangle");async function Iu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=5,h=-n/2,u=-l/2,{cssStyles:d}=t,p=Y.svg(a),g=U(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+n,y:u+l},{x:h+n,y:u-c}],y=`M${h-c},${u-c} L${h+n},${u-c} L${h+n},${u+l} L${h-c},${u+l} L${h-c},${u-c}
|
|
136
|
+
M${h-c},${u} L${h+n},${u}
|
|
137
|
+
M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=p.path(y,g),b=a.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(s.width/2)+c/2-(s.x-(s.left??0))}, ${-(s.height/2)+c/2-(s.y-(s.top??0))})`),X(t,b),t.intersect=function(_){return q.polygon(t,m,_)},a}f(Iu,"windowPane");async function rn(e,t){var ut,at,pt,nt;const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:st}=Ot(),{background:ct}=st,gt={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ct}`]};await rn(e,gt)}const i=Ot();t.useHtmlLabels=i.htmlLabels;let a=((ut=i.er)==null?void 0:ut.diagramPadding)??10,s=((at=i.er)==null?void 0:at.entityPadding)??6;const{cssStyles:o}=t,{labelStyles:n,nodeStyles:l}=G(t);if(r.attributes.length===0&&t.label){const st={rx:0,ry:0,labelPaddingX:a,labelPaddingY:a*1.5};_e(t.label,i)+st.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const ct=await ha(e,t,st);if(!Bt(i.htmlLabels)){const gt=ct.select("text"),yt=(pt=gt.node())==null?void 0:pt.getBBox();gt.attr("transform",`translate(${-yt.width/2}, 0)`)}return ct}i.htmlLabels||(a*=1.25,s*=1.25);let c=tt(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await ir(h,t.label??"",i,0,0,["name"],n);u.height+=s;let d=0;const p=[],g=[];let m=0,y=0,x=0,b=0,_=!0,v=!0;for(const st of r.attributes){const ct=await ir(h,st.type,i,0,d,["attribute-type"],n);m=Math.max(m,ct.width+a);const gt=await ir(h,st.name,i,0,d,["attribute-name"],n);y=Math.max(y,gt.width+a);const yt=await ir(h,st.keys.join(),i,0,d,["attribute-keys"],n);x=Math.max(x,yt.width+a);const mt=await ir(h,st.comment,i,0,d,["attribute-comment"],n);b=Math.max(b,mt.width+a);const _t=Math.max(ct.height,gt.height,yt.height,mt.height)+s;g.push({yOffset:d,rowHeight:_t}),d+=_t}let S=4;x<=a&&(_=!1,x=0,S--),b<=a&&(v=!1,b=0,S--);const C=h.node().getBBox();if(u.width+a*2-(m+y+x+b)>0){const st=u.width+a*2-(m+y+x+b);m+=st/S,y+=st/S,x>0&&(x+=st/S),b>0&&(b+=st/S)}const w=m+y+x+b,D=Y.svg(h),P=U(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let I=0;g.length>0&&(I=g.reduce((st,ct)=>st+((ct==null?void 0:ct.rowHeight)??0),0));const E=Math.max(C.width+a*2,(t==null?void 0:t.width)||0,w),W=Math.max((I??0)+u.height,(t==null?void 0:t.height)||0),O=-E/2,A=-W/2;h.selectAll("g:not(:first-child)").each((st,ct,gt)=>{const yt=ht(gt[ct]),mt=yt.attr("transform");let _t=0,ee=0;if(mt){const Se=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(mt);Se&&(_t=parseFloat(Se[1]),ee=parseFloat(Se[2]),yt.attr("class").includes("attribute-name")?_t+=m:yt.attr("class").includes("attribute-keys")?_t+=m+y:yt.attr("class").includes("attribute-comment")&&(_t+=m+y+x))}yt.attr("transform",`translate(${O+a/2+_t}, ${ee+A+u.height+s/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(A+s/2)+")");const L=D.rectangle(O,A,E,W,P),B=h.insert(()=>L,":first-child").attr("style",o.join("")),{themeVariables:F}=Ot(),{rowEven:M,rowOdd:z,nodeBorder:V}=F;p.push(0);for(const[st,ct]of g.entries()){const yt=(st+1)%2===0&&ct.yOffset!==0,mt=D.rectangle(O,u.height+A+(ct==null?void 0:ct.yOffset),E,ct==null?void 0:ct.rowHeight,{...P,fill:yt?M:z,stroke:V});h.insert(()=>mt,"g.label").attr("style",o.join("")).attr("class",`row-rect-${yt?"even":"odd"}`)}let H=D.line(O,u.height+A,E+O,u.height+A,P);h.insert(()=>H).attr("class","divider"),H=D.line(m+O,u.height+A,m+O,W+A,P),h.insert(()=>H).attr("class","divider"),_&&(H=D.line(m+y+O,u.height+A,m+y+O,W+A,P),h.insert(()=>H).attr("class","divider")),v&&(H=D.line(m+y+x+O,u.height+A,m+y+x+O,W+A,P),h.insert(()=>H).attr("class","divider"));for(const st of p)H=D.line(O,u.height+A+st,E+O,u.height+A+st,P),h.insert(()=>H).attr("class","divider");if(X(t,B),l&&t.look!=="handDrawn"){const st=l.split(";"),ct=(nt=st==null?void 0:st.filter(gt=>gt.includes("stroke")))==null?void 0:nt.map(gt=>`${gt}`).join("; ");h.selectAll("path").attr("style",ct??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(st){return q.rect(t,st)},h}f(rn,"erBox");async function ir(e,t,r,i=0,a=0,s=[],o=""){const n=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",o);t!==Nn(t)&&(t=Nn(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await Ae(n,t,{width:_e(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(Bt(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=ht(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}f(ir,"addText");async function Ru(e,t,r,i,a=r.class.padding??12){const s=i?0:3,o=e.insert("g").attr("class",tt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,u=0,d=0,p=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Nr(n,{text:`«${b}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Nr(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const _=await Nr(c,b,m,[b.parseClassifier()]);m+=_+s}p=c.node().getBBox().height,p<=0&&(p=a/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const _=await Nr(h,b,y,[b.parseClassifier()]);y+=_+s}let x=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+d+a*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(p?p+a*4:a*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}f(Ru,"textHelper");async function Nr(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=Ot();let o="useHtmlLabels"in t?t.useHtmlLabels:Bt(s.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),yr(n)&&(o=!0);const l=await Ae(a,Fs(Ge(n)),{width:_e(n,s)+50,classes:"markdown-node-label",useHtmlLabels:o},s);let c,h=1;if(o){const u=l.children[0],d=ht(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const p=u.getElementsByTagName("img");if(p){const g=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(y=>{function x(){var b;if(m.style.display="flex",m.style.flexDirection="column",g){const _=((b=s.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,S=parseInt(_,10)*5+"px";m.style.minWidth=S,m.style.maxWidth=S}else m.style.width="100%";y(m)}f(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{i.includes("font-weight: bolder")&&ht(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return a.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}f(Nr,"addText");async function Pu(e,t){var P,I;const r=dt(),i=r.class.padding??12,a=i,s=t.useHtmlLabels??Bt(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:n,bbox:l}=await Ru(e,t,r,s,a),{labelStyles:c,nodeStyles:h}=G(t);t.labelStyle=c,t.cssStyles=o.styles||"";const u=((P=o.styles)==null?void 0:P.join(";"))||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const d=o.members.length===0&&o.methods.length===0&&!((I=r.class)!=null&&I.hideEmptyMembersBox),p=Y.svg(n),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let y=l.height;o.members.length===0&&o.methods.length===0?y+=a:o.members.length>0&&o.methods.length===0&&(y+=a*2);const x=-m/2,b=-y/2,_=p.rectangle(x-i,b-i-(d?i:o.members.length===0&&o.methods.length===0?-i/2:0),m+2*i,y+2*i+(d?i*2:o.members.length===0&&o.methods.length===0?-i:0),g),v=n.insert(()=>_,":first-child");v.attr("class","basic label-container");const S=v.node().getBBox();n.selectAll(".text").each((E,W,O)=>{var z;const A=ht(O[W]),L=A.attr("transform");let B=0;if(L){const H=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(L);H&&(B=parseFloat(H[2]))}let F=B+b+i-(d?i:o.members.length===0&&o.methods.length===0?-i/2:0);s||(F-=4);let M=x;(A.attr("class").includes("label-group")||A.attr("class").includes("annotation-group"))&&(M=-((z=A.node())==null?void 0:z.getBBox().width)/2||0,n.selectAll("text").each(function(V,H,ut){window.getComputedStyle(ut[H]).textAnchor==="middle"&&(M=0)})),A.attr("transform",`translate(${M}, ${F})`)});const C=n.select(".annotation-group").node().getBBox().height-(d?i/2:0)||0,w=n.select(".label-group").node().getBBox().height-(d?i/2:0)||0,D=n.select(".members-group").node().getBBox().height-(d?i/2:0)||0;if(o.members.length>0||o.methods.length>0||d){const E=p.line(S.x,C+w+b+i,S.x+S.width,C+w+b+i,g);n.insert(()=>E).attr("class","divider").attr("style",u)}if(d||o.members.length>0||o.methods.length>0){const E=p.line(S.x,C+w+D+b+a*2+i,S.x+S.width,C+w+D+b+i+a*2,g);n.insert(()=>E).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&n.selectAll("path").attr("style",u),v.select(":nth-child(2)").attr("style",u),n.selectAll(".divider").select("path").attr("style",u),t.labelStyle?n.selectAll("span").attr("style",t.labelStyle):n.selectAll("span").attr("style",u),!s){const E=RegExp(/color\s*:\s*([^;]*)/),W=E.exec(u);if(W){const O=W[0].replace("color","fill");n.selectAll("tspan").attr("style",O)}else if(c){const O=E.exec(c);if(O){const A=O[0].replace("color","fill");n.selectAll("tspan").attr("style",A)}}}return X(t,v),t.intersect=function(E){return q.rect(t,E)},n}f(Pu,"classBox");async function Nu(e,t){var C,w;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t,s=t,o=20,n=20,l="verifyMethod"in t,c=tt(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await le(h,`<<${a.type}>>`,0,t.labelStyle):u=await le(h,"<<Element>>",0,t.labelStyle);let d=u;const p=await le(h,a.name,d,t.labelStyle+"; font-weight: bold;");if(d+=p+n,l){const D=await le(h,`${a.requirementId?`ID: ${a.requirementId}`:""}`,d,t.labelStyle);d+=D;const P=await le(h,`${a.text?`Text: ${a.text}`:""}`,d,t.labelStyle);d+=P;const I=await le(h,`${a.risk?`Risk: ${a.risk}`:""}`,d,t.labelStyle);d+=I,await le(h,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,d,t.labelStyle)}else{const D=await le(h,`${s.type?`Type: ${s.type}`:""}`,d,t.labelStyle);d+=D,await le(h,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,d,t.labelStyle)}const g=(((C=h.node())==null?void 0:C.getBBox().width)??200)+o,m=(((w=h.node())==null?void 0:w.getBBox().height)??200)+o,y=-g/2,x=-m/2,b=Y.svg(h),_=U(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=b.rectangle(y,x,g,m,_),S=h.insert(()=>v,":first-child");if(S.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((D,P,I)=>{const E=ht(I[P]),W=E.attr("transform");let O=0,A=0;if(W){const M=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(W);M&&(O=parseFloat(M[1]),A=parseFloat(M[2]))}const L=A-m/2;let B=y+o/2;(P===0||P===1)&&(B=O),E.attr("transform",`translate(${B}, ${L+o})`)}),d>u+p+n){const D=b.line(y,x+u+p+n,y+g,x+u+p+n,_);h.insert(()=>D).attr("style",i)}return X(t,S),t.intersect=function(D){return q.rect(t,D)},h}f(Nu,"requirementBox");async function le(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),s=dt(),o=s.htmlLabels??!0,n=await Ae(a,Fs(Ge(t)),{width:_e(t,s)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},s);let l;if(o){const c=n.children[0],h=ht(n);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=n.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),i&&h.setAttribute("style",i);l=n.getBBox(),l.height+=6}return a.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}f(le,"addText");var $y=f(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Wu(e,t,{config:r}){var W,O;const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i||"";const s=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await et(e,t,tt(t)),h=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&((W=r==null?void 0:r.kanban)!=null&&W.ticketBaseUrl)&&(u=(O=r==null?void 0:r.kanban)==null?void 0:O.ticketBaseUrl.replace("#TICKET#",t.ticket),d=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const p={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;d?{label:g,bbox:m}=await Pa(d,"ticket"in t&&t.ticket||"",p):{label:g,bbox:m}=await Pa(n,"ticket"in t&&t.ticket||"",p);const{label:y,bbox:x}=await Pa(n,"assigned"in t&&t.assigned||"",p);t.width=o;const b=10,_=(t==null?void 0:t.width)||0,v=Math.max(m.height,x.height)/2,S=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+v,C=-_/2,w=-S/2;c.attr("transform","translate("+(h-_/2)+", "+(-v-l.height/2)+")"),g.attr("transform","translate("+(h-_/2)+", "+(-v+l.height/2)+")"),y.attr("transform","translate("+(h+_/2-x.width-2*s)+", "+(-v+l.height/2)+")");let D;const{rx:P,ry:I}=t,{cssStyles:E}=t;if(t.look==="handDrawn"){const A=Y.svg(n),L=U(t,{}),B=P||I?A.path(Ee(C,w,_,S,P||0),L):A.rectangle(C,w,_,S,L);D=n.insert(()=>B,":first-child"),D.attr("class","basic label-container").attr("style",E||null)}else{D=n.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",a).attr("rx",P??5).attr("ry",I??5).attr("x",C).attr("y",w).attr("width",_).attr("height",S);const A="priority"in t&&t.priority;if(A){const L=n.append("line"),B=C+2,F=w+Math.floor((P??0)/2),M=w+S-Math.floor((P??0)/2);L.attr("x1",B).attr("y1",F).attr("x2",B).attr("y2",M).attr("stroke-width","4").attr("stroke",$y(A))}}return X(t,D),t.height=S,t.intersect=function(A){return q.rect(t,A)},n}f(Wu,"kanbanItem");async function zu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await et(e,t,tt(t)),l=s.width+10*o,c=s.height+8*o,h=.15*l,{cssStyles:u}=t,d=s.width+20,p=s.height+20,g=Math.max(l,d),m=Math.max(c,p);n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let y;const x=`M0 0
|
|
138
|
+
a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
|
|
139
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
140
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
141
|
+
a${h},${h} 1 0,0 ${g*.25},${m*.1}
|
|
142
|
+
|
|
143
|
+
a${h},${h} 1 0,0 ${g*.15},${m*.33}
|
|
144
|
+
a${h*.8},${h*.8} 1 0,0 0,${m*.34}
|
|
145
|
+
a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
|
|
146
|
+
|
|
147
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
|
|
148
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
149
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
150
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
|
|
151
|
+
|
|
152
|
+
a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
|
|
153
|
+
a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
|
|
154
|
+
a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
|
|
155
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=Y.svg(a),_=U(t,{}),v=b.path(x,_);y=a.insert(()=>v,":first-child"),y.attr("class","basic label-container").attr("style",Rt(u))}else y=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),X(t,y),t.calcIntersect=function(b,_){return q.rect(b,_)},t.intersect=function(b){return $.info("Bang intersect",t,b),q.rect(t,b)},a}f(zu,"bang");async function qu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await et(e,t,tt(t)),l=s.width+2*o,c=s.height+2*o,h=.15*l,u=.25*l,d=.35*l,p=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
|
|
156
|
+
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|
157
|
+
a${d},${d} 1 0,1 ${l*.4},${-1*l*.1}
|
|
158
|
+
a${u},${u} 1 0,1 ${l*.35},${l*.2}
|
|
159
|
+
|
|
160
|
+
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|
161
|
+
a${p},${p} 1 0,1 ${-1*l*.15},${c*.65}
|
|
162
|
+
|
|
163
|
+
a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|
164
|
+
a${d},${d} 1 0,1 ${-1*l*.5},0
|
|
165
|
+
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
166
|
+
|
|
167
|
+
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
168
|
+
a${p},${p} 1 0,1 ${l*.1},${-1*c*.65}
|
|
169
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const x=Y.svg(a),b=U(t,{}),_=x.path(y,b);m=a.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",Rt(g))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),X(t,m),t.calcIntersect=function(x,b){return q.rect(x,b)},t.intersect=function(x){return $.info("Cloud intersect",t,x),q.rect(t,x)},a}f(qu,"cloud");async function Hu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await et(e,t,tt(t)),l=s.width+8*o,c=s.height+2*o,h=5,u=`
|
|
170
|
+
M${-l/2} ${c/2-h}
|
|
171
|
+
v${-c+2*h}
|
|
172
|
+
q0,-${h} ${h},-${h}
|
|
173
|
+
h${l-2*h}
|
|
174
|
+
q${h},0 ${h},${h}
|
|
175
|
+
v${c-2*h}
|
|
176
|
+
q0,${h} -${h},${h}
|
|
177
|
+
h${-l+2*h}
|
|
178
|
+
q-${h},0 -${h},-${h}
|
|
179
|
+
Z
|
|
180
|
+
`,d=a.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return a.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>n.node()),X(t,d),t.calcIntersect=function(p,g){return q.rect(p,g)},t.intersect=function(p){return q.rect(t,p)},a}f(Hu,"defaultMindmapNode");async function ju(e,t){const r={padding:t.padding??0};return en(e,t,r)}f(ju,"mindmapCircle");var Dy=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:_u},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:xu},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Su},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Tu},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Yh},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:en},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:zu},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:qu},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:gu},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Qh},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:lu},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:ou},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Eu},{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:su},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Gh},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Mu},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Rh},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:bu},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:wu},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:vu},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Kh},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Jh},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:zh},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:qh},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Hh},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:cu},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Du},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Zh},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Au},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:hu},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:jh},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Uh},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:$u},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Iu},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Vh},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Fu},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Xh},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Cu},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:fu},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:du},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ih},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Wh},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Lu},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Bu},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ou},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:mu},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:uu}],Oy=f(()=>{const t=[...Object.entries({state:ku,choice:Ph,note:pu,rectWithTitle:yu,labelRect:nu,iconSquare:iu,iconCircle:eu,icon:tu,iconRounded:ru,imageSquare:au,anchor:Oh,kanbanItem:Wu,mindmapCircle:ju,defaultMindmapNode:Hu,classBox:Pu,erBox:rn,requirementBox:Nu}),...Dy.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Yu=Oy();function Iy(e){return e in Yu}f(Iy,"isValidShape");var ua=new Map;async function Uu(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?Yu[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),a=await s(i,t,r)}else a=await s(e,t,r),i=a;return t.tooltip&&a.attr("title",t.tooltip),ua.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(Uu,"insertNode");var B2=f((e,t)=>{ua.set(t.id,e)},"setNodeElem"),L2=f(()=>{ua.clear()},"clear"),M2=f(e=>{const t=ua.get(e.id);$.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),Ry=f((e,t,r,i,a,s)=>{t.arrowTypeStart&&fo(e,"start",t.arrowTypeStart,r,i,a,s),t.arrowTypeEnd&&fo(e,"end",t.arrowTypeEnd,r,i,a,s)},"addEdgeMarkers"),Py={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}},fo=f((e,t,r,i,a,s,o)=>{var u;const n=Py[r];if(!n){$.warn(`Unknown arrow type: ${r}`);return}const l=n.type,h=`${a}_${s}-${l}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const d=o.replace(/[^\dA-Za-z]/g,"_"),p=`${h}_${d}`;if(!document.getElementById(p)){const g=document.getElementById(h);if(g){const m=g.cloneNode(!0);m.id=p,m.querySelectorAll("path, circle, line").forEach(x=>{x.setAttribute("stroke",o),n.fill&&x.setAttribute("fill",o)}),(u=g.parentNode)==null||u.appendChild(m)}}e.attr(`marker-${t}`,`url(${i}#${p})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),Ki=new Map,Et=new Map,A2=f(()=>{Ki.clear(),Et.clear()},"clear"),gi=f(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),Ny=f(async(e,t)=>{let r=Bt(dt().flowchart.htmlLabels);const{labelStyles:i}=G(t);t.labelStyle=i;const a=await Ae(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});$.info("abc82",t,t.labelType);const s=e.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label").attr("data-id",t.id);o.node().appendChild(a);let n=a.getBBox();if(r){const c=a.children[0],h=ht(a);n=c.getBoundingClientRect(),h.attr("width",n.width),h.attr("height",n.height)}o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),Ki.set(t.id,s),t.width=n.width,t.height=n.height;let l;if(t.startLabelLeft){const c=await ze(t.startLabelLeft,gi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).startLeft=h,Wr(l,t.startLabelLeft)}if(t.startLabelRight){const c=await ze(t.startLabelRight,gi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=h.node().appendChild(c),u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).startRight=h,Wr(l,t.startLabelRight)}if(t.endLabelLeft){const c=await ze(t.endLabelLeft,gi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(c),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).endLeft=h,Wr(l,t.endLabelLeft)}if(t.endLabelRight){const c=await ze(t.endLabelRight,gi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(c),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).endRight=h,Wr(l,t.endLabelRight)}return a},"insertEdgeLabel");function Wr(e,t){dt().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(Wr,"setTerminalWidth");var Wy=f((e,t)=>{$.debug("Moving label abc88 ",e.id,e.label,Ki.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=dt(),{subGraphTitleTotalMargin:a}=Ys(i);if(e.label){const s=Ki.get(e.id);let o=e.x,n=e.y;if(r){const l=ie.calcLabelPosition(r);$.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}s.attr("transform",`translate(${o}, ${n+a/2})`)}if(e.startLabelLeft){const s=Et.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const s=Et.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const s=Et.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const s=Et.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),zy=f((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),s=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return a>=o||s>=n},"outsideNode"),qy=f((e,t,r)=>{$.debug(`intersection calc abc89:
|
|
181
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
182
|
+
insidePoint : ${JSON.stringify(r)}
|
|
183
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,s=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-s:o+s;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-a:a-l-t.y;n=h*u/c;const d={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-u:r.y-c+u};return n===0&&(d.x=t.x,d.y=t.y),h===0&&(d.x=t.x),c===0&&(d.y=t.y),$.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${n}`,d),d}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=c*n/h,d=r.x<t.x?r.x+h-n:r.x-h+n,p=r.y<t.y?r.y+u:r.y-u;return $.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${n}`,{_x:d,_y:p}),n===0&&(d=t.x,p=t.y),h===0&&(d=t.x),c===0&&(p=t.y),{x:d,y:p}}},"intersection"),po=f((e,t)=>{$.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(s=>{if($.info("abc88 checking point",s,t),!zy(t,s)&&!a){const o=qy(t,i,s);$.debug("abc88 inside",s,i,o),$.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?$.warn("abc88 no intersect",o,r):r.push(o),a=!0}else $.warn("abc88 outside",s,i),i=s,a||r.push(s)}),$.debug("returning points",r),r},"cutPathAtIntersect");function Gu(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],s=e[i],o=e[i+1];(a.x===s.x&&s.y===o.y&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5||a.y===s.y&&s.x===o.x&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}f(Gu,"extractCornerPoints");var go=f(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,s=Math.sqrt(i*i+a*a),o=r/s;return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),Hy=f(function(e){const{cornerPointPositions:t}=Gu(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],s=e[i+1],o=e[i],n=go(a,o,5),l=go(s,o,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let d={x:o.x,y:o.y};if(Math.abs(s.x-a.x)>10&&Math.abs(s.y-a.y)>=10){$.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));const p=5;o.x===n.x?d={x:c<0?n.x-p+u:n.x+p-u,y:h<0?n.y-u:n.y+u}:d={x:c<0?n.x-u:n.x+u,y:h<0?n.y-p+u:n.y+p-u}}else $.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));r.push(d,l)}else r.push(e[i]);return r},"fixCorners"),jy=f((e,t,r)=>{const i=e-t-r,a=2,s=2,o=a+s,n=Math.floor(i/o),l=Array(n).fill(`${a} ${s}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),Yy=f(function(e,t,r,i,a,s,o,n=!1){var A;const{handDrawnSeed:l}=dt();let c=t.points,h=!1;const u=a;var d=s;const p=[];for(const L in t.cssCompiledStyles)Xc(L)||p.push(t.cssCompiledStyles[L]);$.debug("UIO intersect check",t.points,d.x,u.x),d.intersect&&u.intersect&&!n&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),$.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&($.info("to cluster abc88",r.get(t.toCluster)),c=po(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&($.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=po(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(L=>!Number.isNaN(L.y));m=Hy(m);let y=_i;switch(y=Di,t.curve){case"linear":y=Di;break;case"basis":y=_i;break;case"cardinal":y=Jo;break;case"bumpX":y=Vo;break;case"bumpY":y=Xo;break;case"catmullRom":y=el;break;case"monotoneX":y=ol;break;case"monotoneY":y=ll;break;case"natural":y=hl;break;case"step":y=ul;break;case"stepAfter":y=fl;break;case"stepBefore":y=dl;break;default:y=_i}const{x,y:b}=Jg(t),_=Ip().x(x).y(b).curve(y);let v;switch(t.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-invisible";break;default:v="edge-thickness-normal"}switch(t.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break;default:v+=" edge-pattern-solid"}let S,C=t.curve==="rounded"?Vu(Xu(m,t),5):_(m);const w=Array.isArray(t.style)?t.style:[t.style];let D=w.find(L=>L==null?void 0:L.startsWith("stroke:")),P=!1;if(t.look==="handDrawn"){const L=Y.svg(e);Object.assign([],m);const B=L.path(C,{roughness:.3,seed:l});v+=" transition",S=ht(B).select("path").attr("id",t.id).attr("class"," "+v+(t.classes?" "+t.classes:"")).attr("style",w?w.reduce((M,z)=>M+";"+z,""):"");let F=S.attr("d");S.attr("d",F),e.node().appendChild(S.node())}else{const L=p.join(";"),B=w?w.reduce((at,pt)=>at+pt+";",""):"";let F="";t.animate&&(F=" edge-animation-fast"),t.animation&&(F=" edge-animation-"+t.animation);const M=(L?L+";"+B+";":B)+";"+(w?w.reduce((at,pt)=>at+";"+pt,""):"");S=e.append("path").attr("d",C).attr("id",t.id).attr("class"," "+v+(t.classes?" "+t.classes:"")+(F??"")).attr("style",M),D=(A=M.match(/stroke:([^;]+)/))==null?void 0:A[1],P=t.animate===!0||!!t.animation||L.includes("animation");const z=S.node(),V=typeof z.getTotalLength=="function"?z.getTotalLength():0,H=Kn[t.arrowTypeStart]||0,ut=Kn[t.arrowTypeEnd]||0;if(t.look==="neo"&&!P){const pt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?jy(V,H,ut):`0 ${H} ${V-H-ut} ${ut}`}; stroke-dashoffset: 0;`;S.attr("style",pt+S.attr("style"))}}S.attr("data-edge",!0),S.attr("data-et","edge"),S.attr("data-id",t.id),S.attr("data-points",g),t.showPoints&&m.forEach(L=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",L.x).attr("cy",L.y)});let I="";(dt().flowchart.arrowMarkerAbsolute||dt().state.arrowMarkerAbsolute)&&(I=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,I=I.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),$.info("arrowTypeStart",t.arrowTypeStart),$.info("arrowTypeEnd",t.arrowTypeEnd),Ry(S,t,I,o,i,D);const E=Math.floor(c.length/2),W=c[E];ie.isLabelCoordinateInPath(W,S.attr("d"))||(h=!0);let O={};return h&&(O.updatedPath=c),O.originalPath=t.points,O},"insertEdge");function Vu(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let s=0;s<i;s++){const o=e[s],n=e[s-1],l=e[s+1];if(s===0)r+=`M${o.x},${o.y}`;else if(s===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-n.x,h=o.y-n.y,u=l.x-o.x,d=l.y-o.y,p=Math.hypot(c,h),g=Math.hypot(u,d);if(p<a||g<a){r+=`L${o.x},${o.y}`;continue}const m=c/p,y=h/p,x=u/g,b=d/g,_=m*x+y*b,v=Math.max(-1,Math.min(1,_)),S=Math.acos(v);if(S<a||Math.abs(Math.PI-S)<a){r+=`L${o.x},${o.y}`;continue}const C=Math.min(t/Math.sin(S/2),p/2,g/2),w=o.x-m*C,D=o.y-y*C,P=o.x+x*C,I=o.y+b*C;r+=`L${w},${D}`,r+=`Q${o.x},${o.y} ${P},${I}`}}return r}f(Vu,"generateRoundedPath");function bs(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}f(bs,"calculateDeltaAndAngle");function Xu(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&Dt[t.arrowTypeStart]){const a=Dt[t.arrowTypeStart],s=e[0],o=e[1],{angle:n}=bs(s,o),l=a*Math.cos(n),c=a*Math.sin(n);r[0].x=s.x+l,r[0].y=s.y+c}const i=e.length;if(i>=2&&Dt[t.arrowTypeEnd]){const a=Dt[t.arrowTypeEnd],s=e[i-1],o=e[i-2],{angle:n}=bs(o,s),l=a*Math.cos(n),c=a*Math.sin(n);r[i-1].x=s.x-l,r[i-1].y=s.y-c}return r}f(Xu,"applyMarkerOffsetsToPoints");var Uy=f((e,t,r,i)=>{t.forEach(a=>{l0[a](e,r,i)})},"insertMarkers"),Gy=f((e,t,r)=>{$.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).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"),Vy=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).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"),Xy=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).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"),Ky=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).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"),Zy=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).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),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).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"),Qy=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).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"),Jy=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).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"),t0=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).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"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).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"),e0=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-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"),r0=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).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"),i0=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),a0=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).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"),s0=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),n0=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
184
|
+
L20,10
|
|
185
|
+
M20,10
|
|
186
|
+
L0,20`)},"requirement_arrow"),o0=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),l0={extension:Gy,composition:Vy,aggregation:Xy,dependency:Ky,lollipop:Zy,point:Qy,circle:Jy,cross:t0,barb:e0,only_one:r0,zero_or_one:i0,one_or_more:a0,zero_or_more:s0,requirement_arrow:n0,requirement_contains:o0},c0=Uy,h0={common:Sr,getConfig:Ot,insertCluster:xy,insertEdge:Yy,insertEdgeLabel:Ny,insertMarkers:c0,insertNode:Uu,interpolateToCurve:Us,labelHelper:et,log:$,positionEdgeLabel:Wy},Kr={},Ku=f(e=>{for(const t of e)Kr[t.name]=t},"registerLayoutLoaders"),u0=f(()=>{Ku([{name:"dagre",loader:f(async()=>await ft(()=>import("./dagre-6UL2VRFP-B7vIHoek.js"),__vite__mapDeps([2,3,0,1,4,5,6,7])),"loader")},{name:"cose-bilkent",loader:f(async()=>await ft(()=>import("./cose-bilkent-S5V4N54A-7XsZDF0x.js"),__vite__mapDeps([8,9,0,1])),"loader")}])},"registerDefaultLayoutLoaders");u0();var E2=f(async(e,t)=>{if(!(e.layoutAlgorithm in Kr))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=Kr[e.layoutAlgorithm];return(await r.loader()).render(e,t,h0,{algorithm:r.algorithm})},"render"),F2=f((e="",{fallback:t="dagre"}={})=>{if(e in Kr)return e;if(t in Kr)return $.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Zu="comm",Qu="rule",Ju="decl",d0="@import",f0="@namespace",p0="@keyframes",g0="@layer",td=Math.abs,an=String.fromCharCode;function ed(e){return e.trim()}function Ti(e,t,r){return e.replace(t,r)}function m0(e,t,r){return e.indexOf(t,r)}function nr(e,t){return e.charCodeAt(t)|0}function Cr(e,t,r){return e.slice(t,r)}function ce(e){return e.length}function y0(e){return e.length}function mi(e,t){return t.push(e),e}var da=1,_r=1,rd=0,te=0,kt=0,wr="";function sn(e,t,r,i,a,s,o,n){return{value:e,root:t,parent:r,type:i,props:a,children:s,line:da,column:_r,length:o,return:"",siblings:n}}function x0(){return kt}function b0(){return kt=te>0?nr(wr,--te):0,_r--,kt===10&&(_r=1,da--),kt}function se(){return kt=te<rd?nr(wr,te++):0,_r++,kt===10&&(_r=1,da++),kt}function ve(){return nr(wr,te)}function Bi(){return te}function fa(e,t){return Cr(wr,e,t)}function Zr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function C0(e){return da=_r=1,rd=ce(wr=e),te=0,[]}function _0(e){return wr="",e}function Na(e){return ed(fa(te-1,Cs(e===91?e+2:e===40?e+1:e)))}function S0(e){for(;(kt=ve())&&kt<33;)se();return Zr(e)>2||Zr(kt)>3?"":" "}function k0(e,t){for(;--t&&se()&&!(kt<48||kt>102||kt>57&&kt<65||kt>70&&kt<97););return fa(e,Bi()+(t<6&&ve()==32&&se()==32))}function Cs(e){for(;se();)switch(kt){case e:return te;case 34:case 39:e!==34&&e!==39&&Cs(kt);break;case 40:e===41&&Cs(e);break;case 92:se();break}return te}function v0(e,t){for(;se()&&e+kt!==57;)if(e+kt===84&&ve()===47)break;return"/*"+fa(t,te-1)+"*"+an(e===47?e:se())}function w0(e){for(;!Zr(ve());)se();return fa(e,te)}function T0(e){return _0(Li("",null,null,null,[""],e=C0(e),0,[0],e))}function Li(e,t,r,i,a,s,o,n,l){for(var c=0,h=0,u=o,d=0,p=0,g=0,m=1,y=1,x=1,b=0,_="",v=a,S=s,C=i,w=_;y;)switch(g=b,b=se()){case 40:if(g!=108&&nr(w,u-1)==58){m0(w+=Ti(Na(b),"&","&\f"),"&\f",td(c?n[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:w+=Na(b);break;case 9:case 10:case 13:case 32:w+=S0(g);break;case 92:w+=k0(Bi()-1,7);continue;case 47:switch(ve()){case 42:case 47:mi(B0(v0(se(),Bi()),t,r,l),l),(Zr(g||1)==5||Zr(ve()||1)==5)&&ce(w)&&Cr(w,-1,void 0)!==" "&&(w+=" ");break;default:w+="/"}break;case 123*m:n[c++]=ce(w)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(w=Ti(w,/\f/g,"")),p>0&&(ce(w)-u||m===0&&g===47)&&mi(p>32?yo(w+";",i,r,u-1,l):yo(Ti(w," ","")+";",i,r,u-2,l),l);break;case 59:w+=";";default:if(mi(C=mo(w,t,r,c,h,a,n,_,v=[],S=[],u,s),s),b===123)if(h===0)Li(w,t,C,C,v,s,u,n,S);else{switch(d){case 99:if(nr(w,3)===110)break;case 108:if(nr(w,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Li(e,C,C,i&&mi(mo(e,C,C,0,0,a,n,_,a,v=[],u,S),S),a,S,u,n,i?v:S):Li(w,C,C,C,[""],S,0,n,S)}}c=h=p=0,m=x=1,_=w="",u=o;break;case 58:u=1+ce(w),p=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&b0()==125)continue}switch(w+=an(b),b*m){case 38:x=h>0?1:(w+="\f",-1);break;case 44:n[c++]=(ce(w)-1)*x,x=1;break;case 64:ve()===45&&(w+=Na(se())),d=ve(),h=u=ce(_=w+=w0(Bi())),b++;break;case 45:g===45&&ce(w)==2&&(m=0)}}return s}function mo(e,t,r,i,a,s,o,n,l,c,h,u){for(var d=a-1,p=a===0?s:[""],g=y0(p),m=0,y=0,x=0;m<i;++m)for(var b=0,_=Cr(e,d+1,d=td(y=o[m])),v=e;b<g;++b)(v=ed(y>0?p[b]+" "+_:Ti(_,/&\f/g,p[b])))&&(l[x++]=v);return sn(e,t,r,a===0?Qu:n,l,c,h,u)}function B0(e,t,r,i){return sn(e,t,r,Zu,an(x0()),Cr(e,2,-2),0,i)}function yo(e,t,r,i,a){return sn(e,t,r,Ju,Cr(e,0,i),Cr(e,i+1,-1),i,a)}function _s(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function L0(e,t,r,i){switch(e.type){case g0:if(e.children.length)break;case d0:case f0:case Ju:return e.return=e.return||e.value;case Zu:return"";case p0:return e.return=e.value+"{"+_s(e.children,i)+"}";case Qu:if(!ce(e.value=e.props.join(",")))return""}return ce(r=_s(e.children,i))?e.return=e.value+"{"+r+"}":""}var id="c4",M0=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),A0=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./c4Diagram-YG6GDRKO-b2FfGD5V.js");return{diagram:t}},__vite__mapDeps([10,11,0,1]));return{id,diagram:e}},"loader"),E0={id,detector:M0,loader:A0},F0=E0,ad="flowchart",$0=f((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),D0=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-BvxRwSdK.js");return{diagram:t}},__vite__mapDeps([12,13,14,0,1,15,16]));return{id:ad,diagram:e}},"loader"),O0={id:ad,detector:$0,loader:D0},I0=O0,sd="flowchart-v2",R0=f((e,t)=>{var r,i,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),P0=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-BvxRwSdK.js");return{diagram:t}},__vite__mapDeps([12,13,14,0,1,15,16]));return{id:sd,diagram:e}},"loader"),N0={id:sd,detector:R0,loader:P0},W0=N0,nd="er",z0=f(e=>/^\s*erDiagram/.test(e),"detector"),q0=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./erDiagram-Q2GNP2WA-DaoUsHC-.js");return{diagram:t}},__vite__mapDeps([17,14,0,1,15,16]));return{id:nd,diagram:e}},"loader"),H0={id:nd,detector:z0,loader:q0},j0=H0,od="gitGraph",Y0=f(e=>/^\s*gitGraph/.test(e),"detector"),U0=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./gitGraphDiagram-NY62KEGX-C7GPXV9B.js");return{diagram:t}},__vite__mapDeps([18,19,20,21,0,1,6,4,7]));return{id:od,diagram:e}},"loader"),G0={id:od,detector:Y0,loader:U0},V0=G0,ld="gantt",X0=f(e=>/^\s*gantt/.test(e),"detector"),K0=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./ganttDiagram-LVOFAZNH-DiyXT1u-.js");return{diagram:t}},__vite__mapDeps([22,0,1,23,24,25]));return{id:ld,diagram:e}},"loader"),Z0={id:ld,detector:X0,loader:K0},Q0=Z0,cd="info",J0=f(e=>/^\s*info/.test(e),"detector"),tx=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./infoDiagram-F6ZHWCRC-BPazewwG.js");return{diagram:t}},__vite__mapDeps([26,21,0,1,6,4,7]));return{id:cd,diagram:e}},"loader"),ex={id:cd,detector:J0,loader:tx},hd="pie",rx=f(e=>/^\s*pie/.test(e),"detector"),ix=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./pieDiagram-ADFJNKIX-0IbvYAbJ.js");return{diagram:t}},__vite__mapDeps([27,19,21,0,1,6,4,7,28,29,24]));return{id:hd,diagram:e}},"loader"),ax={id:hd,detector:rx,loader:ix},ud="quadrantChart",sx=f(e=>/^\s*quadrantChart/.test(e),"detector"),nx=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./quadrantDiagram-AYHSOK5B-B76yzm9c.js");return{diagram:t}},__vite__mapDeps([30,0,1,23,24,25]));return{id:ud,diagram:e}},"loader"),ox={id:ud,detector:sx,loader:nx},lx=ox,dd="xychart",cx=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),hx=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./xychartDiagram-PRI3JC2R-3RFvJwDL.js");return{diagram:t}},__vite__mapDeps([31,0,1,24,29,23,25]));return{id:dd,diagram:e}},"loader"),ux={id:dd,detector:cx,loader:hx},dx=ux,fd="requirement",fx=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),px=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./requirementDiagram-UZGBJVZJ-CAEEUTLr.js");return{diagram:t}},__vite__mapDeps([32,14,0,1,15]));return{id:fd,diagram:e}},"loader"),gx={id:fd,detector:fx,loader:px},mx=gx,pd="sequence",yx=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),xx=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./sequenceDiagram-WL72ISMW-Cu9Iphhk.js");return{diagram:t}},__vite__mapDeps([33,11,20,0,1]));return{id:pd,diagram:e}},"loader"),bx={id:pd,detector:yx,loader:xx},Cx=bx,gd="class",_x=f((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),Sx=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./classDiagram-2ON5EDUG-BhnxhKIx.js");return{diagram:t}},__vite__mapDeps([34,35,13,14,0,1,15]));return{id:gd,diagram:e}},"loader"),kx={id:gd,detector:_x,loader:Sx},vx=kx,md="classDiagram",wx=f((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),Tx=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./classDiagram-v2-WZHVMYZB-BhnxhKIx.js");return{diagram:t}},__vite__mapDeps([36,35,13,14,0,1,15]));return{id:md,diagram:e}},"loader"),Bx={id:md,detector:wx,loader:Tx},Lx=Bx,yd="state",Mx=f((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),Ax=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./stateDiagram-FKZM4ZOC-DMmqlSc3.js");return{diagram:t}},__vite__mapDeps([37,38,14,0,1,15,3,4,5,6]));return{id:yd,diagram:e}},"loader"),Ex={id:yd,detector:Mx,loader:Ax},Fx=Ex,xd="stateDiagram",$x=f((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),Dx=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4FDKWEC3-C8PNiXpd.js");return{diagram:t}},__vite__mapDeps([39,38,14,0,1,15]));return{id:xd,diagram:e}},"loader"),Ox={id:xd,detector:$x,loader:Dx},Ix=Ox,bd="journey",Rx=f(e=>/^\s*journey/.test(e),"detector"),Px=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./journeyDiagram-XKPGCS4Q-7TQoyFvV.js");return{diagram:t}},__vite__mapDeps([40,11,13,0,1,28]));return{id:bd,diagram:e}},"loader"),Nx={id:bd,detector:Rx,loader:Px},Wx=Nx,zx=f((e,t,r)=>{$.debug(`rendering svg for syntax error
|
|
187
|
+
`);const i=Yp(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Ho(i,100,512,!0),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),Cd={draw:zx},qx=Cd,Hx={db:{},renderer:Cd,parser:{parse:f(()=>{},"parse")}},jx=Hx,_d="flowchart-elk",Yx=f((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),Ux=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-BvxRwSdK.js");return{diagram:t}},__vite__mapDeps([12,13,14,0,1,15,16]));return{id:_d,diagram:e}},"loader"),Gx={id:_d,detector:Yx,loader:Ux},Vx=Gx,Sd="timeline",Xx=f(e=>/^\s*timeline/.test(e),"detector"),Kx=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./timeline-definition-IT6M3QCI-Z39dMt9m.js");return{diagram:t}},__vite__mapDeps([41,0,1,28]));return{id:Sd,diagram:e}},"loader"),Zx={id:Sd,detector:Xx,loader:Kx},Qx=Zx,kd="mindmap",Jx=f(e=>/^\s*mindmap/.test(e),"detector"),tb=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./mindmap-definition-VGOIOE7T-C-tiffs0.js");return{diagram:t}},__vite__mapDeps([42,14,0,1,15]));return{id:kd,diagram:e}},"loader"),eb={id:kd,detector:Jx,loader:tb},rb=eb,vd="kanban",ib=f(e=>/^\s*kanban/.test(e),"detector"),ab=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./kanban-definition-3W4ZIXB7-BPW9De0Q.js");return{diagram:t}},__vite__mapDeps([43,13,0,1]));return{id:vd,diagram:e}},"loader"),sb={id:vd,detector:ib,loader:ab},nb=sb,wd="sankey",ob=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),lb=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./sankeyDiagram-TZEHDZUN-DtnGWiEx.js");return{diagram:t}},__vite__mapDeps([44,0,1,29,24]));return{id:wd,diagram:e}},"loader"),cb={id:wd,detector:ob,loader:lb},hb=cb,Td="packet",ub=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),db=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-S2PKOQOG-Gl24csy5.js");return{diagram:t}},__vite__mapDeps([45,19,21,0,1,6,4,7]));return{id:Td,diagram:e}},"loader"),fb={id:Td,detector:ub,loader:db},Bd="radar",pb=f(e=>/^\s*radar-beta/.test(e),"detector"),gb=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-QEK2KX5R-yRItHVGO.js");return{diagram:t}},__vite__mapDeps([46,19,21,0,1,6,4,7]));return{id:Bd,diagram:e}},"loader"),mb={id:Bd,detector:pb,loader:gb},Ld="block",yb=f(e=>/^\s*block(-beta)?/.test(e),"detector"),xb=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./blockDiagram-VD42YOAC-C45FMpSa.js");return{diagram:t}},__vite__mapDeps([47,13,7,0,1,3,4,16]));return{id:Ld,diagram:e}},"loader"),bb={id:Ld,detector:yb,loader:xb},Cb=bb,Md="architecture",_b=f(e=>/^\s*architecture/.test(e),"detector"),Sb=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./architectureDiagram-VXUJARFQ-CCAnjRBf.js");return{diagram:t}},__vite__mapDeps([48,19,21,0,1,6,4,7,9]));return{id:Md,diagram:e}},"loader"),kb={id:Md,detector:_b,loader:Sb},vb=kb,Ad="treemap",wb=f(e=>/^\s*treemap/.test(e),"detector"),Tb=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-PSM6KHXK-Dwk0-3lg.js");return{diagram:t}},__vite__mapDeps([49,15,19,21,0,1,6,4,7,25,29,24]));return{id:Ad,diagram:e}},"loader"),Bb={id:Ad,detector:wb,loader:Tb},xo=!1,pa=f(()=>{xo||(xo=!0,$i("error",jx,e=>e.toLowerCase().trim()==="error"),$i("---",{db:{clear:f(()=>{},"clear")},styles:{},renderer:{draw:f(()=>{},"draw")},parser:{parse:f(()=>{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:f(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ja(Vx,rb,vb),ja(F0,nb,Lx,vx,j0,Q0,ex,ax,mx,Cx,W0,I0,Qx,V0,Ix,Fx,Wx,lx,hb,fb,dx,Cb,mb,Bb))},"addDiagrams"),Lb=f(async()=>{$.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(He).map(async([r,{detector:i,loader:a}])=>{if(a)try{Va(r)}catch{try{const{diagram:s,id:o}=await a();$i(o,s,i)}catch(s){throw $.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete He[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){$.error(`Failed to load ${t.length} external diagrams`);for(const r of t)$.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Mb="graphics-document document";function Ed(e,t){e.attr("role",Mb),t!==""&&e.attr("aria-roledescription",t)}f(Ed,"setA11yDiagramInfo");function Fd(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}f(Fd,"addSVGa11yTitleDescription");var qe,Ss=(qe=class{constructor(t,r,i,a,s){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=s}static async fromText(t,r={}){var c,h;const i=Ot(),a=Ts(t,i);t=km(t)+`
|
|
188
|
+
`;try{Va(a)}catch{const u=Of(a);if(!u)throw new Eo(`Diagram ${a} not found.`);const{id:d,diagram:p}=await u();$i(d,p)}const{db:s,parser:o,renderer:n,init:l}=Va(a);return o.parser&&(o.parser.yy=s),(c=s.clear)==null||c.call(s),l==null||l(i),r.title&&((h=s.setDiagramTitle)==null||h.call(s,r.title)),await o.parse(t),new qe(a,t,s,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},f(qe,"Diagram"),qe),bo=[],Ab=f(()=>{bo.forEach(e=>{e()}),bo=[]},"attachFunctions"),Eb=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function $d(e){const t=e.match(Ao);if(!t)return{text:e,metadata:{}};let r=Qg(t[1],{schema:Zg})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}f($d,"extractFrontMatter");var Fb=f(e=>e.replace(/\r\n?/g,`
|
|
189
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),$b=f(e=>{const{text:t,metadata:r}=$d(e),{displayMode:i,title:a,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:a,config:s,text:t}},"processFrontmatter"),Db=f(e=>{const t=ie.detectInit(e)??{},r=ie.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:hm(e),directive:t}},"processDirectives");function nn(e){const t=Fb(e),r=$b(t),i=Db(r.text),a=Zs(r.config,i.directive);return e=Eb(i.text),{code:e,title:r.title,config:a}}f(nn,"preprocessDiagram");function Dd(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(Dd,"toBase64");var Ob=5e4,Ib="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Rb="sandbox",Pb="loose",Nb="http://www.w3.org/2000/svg",Wb="http://www.w3.org/1999/xlink",zb="http://www.w3.org/1999/xhtml",qb="100%",Hb="100%",jb="border:0;margin:0;",Yb="margin:0",Ub="allow-top-navigation-by-user-activation allow-popups",Gb='The "iframe" tag is not supported by your browser.',Vb=["foreignobject"],Xb=["dominant-baseline"];function on(e){const t=nn(e);return Ei(),Zf(t.config??{}),t}f(on,"processAndSetConfigs");async function Od(e,t){pa();try{const{code:r,config:i}=on(e);return{diagramType:(await Rd(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}f(Od,"parse");var Co=f((e,t,r=[])=>`
|
|
190
|
+
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),Kb=f((e,t=new Map)=>{var i;let r="";if(e.themeCSS!==void 0&&(r+=`
|
|
191
|
+
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
192
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
|
193
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const n=e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Tn(l.styles)||n.forEach(c=>{r+=Co(l.id,c,l.styles)}),Tn(l.textStyles)||(r+=Co(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))))})}return r},"createCssStyles"),Zb=f((e,t,r,i)=>{const a=Kb(e,r),s=yp(t,a,e.themeVariables);return _s(T0(`${i}{${s}}`),L0)},"createUserStyles"),Qb=f((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Ge(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),Jb=f((e="",t)=>{var a,s;const r=(s=(a=t==null?void 0:t.viewBox)==null?void 0:a.baseVal)!=null&&s.height?t.viewBox.baseVal.height+"px":Hb,i=Dd(`<body style="${Yb}">${e}</body>`);return`<iframe style="width:${qb};height:${r};${jb}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${Ub}">
|
|
194
|
+
${Gb}
|
|
195
|
+
</iframe>`},"putIntoIFrame"),_o=f((e,t,r,i,a)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const o=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Nb);return a&&o.attr("xmlns:xlink",a),o.append("g"),e},"appendDivSvgG");function ks(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(ks,"sandboxedIframe");var t2=f((e,t,r,i)=>{var a,s,o;(a=e.getElementById(t))==null||a.remove(),(s=e.getElementById(r))==null||s.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),e2=f(async function(e,t,r){var W,O,A,L,B,F;pa();const i=on(t);t=i.code;const a=Ot();$.debug(a),t.length>((a==null?void 0:a.maxTextSize)??Ob)&&(t=Ib);const s="#"+e,o="i"+e,n="#"+o,l="d"+e,c="#"+l,h=f(()=>{const z=ht(d?n:c).node();z&&"remove"in z&&z.remove()},"removeTempElements");let u=ht("body");const d=a.securityLevel===Rb,p=a.securityLevel===Pb,g=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const M=ks(ht(r),o);u=ht(M.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ht(r);_o(u,e,l,`font-family: ${g}`,Wb)}else{if(t2(document,e,l,o),d){const M=ks(ht("body"),o);u=ht(M.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ht("body");_o(u,e,l)}let m,y;try{m=await Ss.fromText(t,{title:i.title})}catch(M){if(a.suppressErrorRendering)throw h(),M;m=await Ss.fromText("error"),y=M}const x=u.select(c).node(),b=m.type,_=x.firstChild,v=_.firstChild,S=(O=(W=m.renderer).getClasses)==null?void 0:O.call(W,t,m),C=Zb(a,b,S,s),w=document.createElement("style");w.innerHTML=C,_.insertBefore(w,v);try{await m.renderer.draw(t,e,Bn.version,m)}catch(M){throw a.suppressErrorRendering?h():qx.draw(t,e,Bn.version),M}const D=u.select(`${c} svg`),P=(L=(A=m.db).getAccTitle)==null?void 0:L.call(A),I=(F=(B=m.db).getAccDescription)==null?void 0:F.call(B);Pd(b,D,P,I),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",zb);let E=u.select(c).node().innerHTML;if($.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),E=Qb(E,d,Bt(a.arrowMarkerAbsolute)),d){const M=u.select(c+" svg").node();E=Jb(E,M)}else p||(E=gr.sanitize(E,{ADD_TAGS:Vb,ADD_ATTR:Xb,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Ab(),y)throw y;return h(),{diagramType:b,svg:E,bindFunctions:m.db.bindFunctions}},"render");function Id(e={}){var i;const t=wt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Xf(t),t!=null&&t.theme&&t.theme in be?t.themeVariables=be[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=be.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Vf(t):Io();ws(r.logLevel),pa()}f(Id,"initialize");var Rd=f((e,t={})=>{const{code:r}=nn(e);return Ss.fromText(r,t)},"getDiagramFromText");function Pd(e,t,r,i){Ed(t,e),Fd(t,r,i,t.attr("id"))}f(Pd,"addA11yInfo");var Ue=Object.freeze({render:e2,parse:Od,getDiagramFromText:Rd,initialize:Id,getConfig:Ot,setConfig:Ro,getSiteConfig:Io,updateSiteConfig:Kf,reset:f(()=>{Ei()},"reset"),globalReset:f(()=>{Ei(mr)},"globalReset"),defaultConfig:mr});ws(Ot().logLevel);Ei(Ot());var r2=f((e,t,r)=>{$.warn(e),Ks(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Nd=f(async function(e={querySelector:".mermaid"}){try{await i2(e)}catch(t){if(Ks(t)&&$.error(t.str),Xt.parseError&&Xt.parseError(t),!e.suppressErrors)throw $.error("Use the suppressErrors option to suppress these errors"),t}},"run"),i2=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Ue.getConfig();$.debug(`${e?"":"No "}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");$.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&($.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Ue.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const s=new ie.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(a)){if($.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;o=l.innerHTML,o=nh(ie.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ie.detectInit(o);h&&$.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:d}=await Hd(c,o,l);l.innerHTML=u,e&&await e(c),d&&d(l)}catch(u){r2(u,n,Xt.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Wd=f(function(e){Ue.initialize(e)},"initialize"),a2=f(async function(e,t,r){$.warn("mermaid.init is deprecated. Please use run instead."),e&&Wd(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Nd(i)},"init"),s2=f(async(e,{lazyLoad:t=!0}={})=>{pa(),ja(...e),t===!1&&await Lb()},"registerExternalDiagrams"),zd=f(function(){if(Xt.startOnLoad){const{startOnLoad:e}=Ue.getConfig();e&&Xt.run().catch(t=>$.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",zd,!1);var n2=f(function(e){Xt.parseError=e},"setParseErrorHandler"),Zi=[],Wa=!1,qd=f(async()=>{if(!Wa){for(Wa=!0;Zi.length>0;){const e=Zi.shift();if(e)try{await e()}catch(t){$.error("Error executing queue",t)}}Wa=!1}},"executeQueue"),o2=f(async(e,t)=>new Promise((r,i)=>{const a=f(()=>new Promise((s,o)=>{Ue.parse(e,t).then(n=>{s(n),r(n)},n=>{var l;$.error("Error parsing",n),(l=Xt.parseError)==null||l.call(Xt,n),o(n),i(n)})}),"performCall");Zi.push(a),qd().catch(i)}),"parse"),Hd=f((e,t,r)=>new Promise((i,a)=>{const s=f(()=>new Promise((o,n)=>{Ue.render(e,t,r).then(l=>{o(l),i(l)},l=>{var c;$.error("Error parsing",l),(c=Xt.parseError)==null||c.call(Xt,l),n(l),a(l)})}),"performCall");Zi.push(s),qd().catch(a)}),"render"),l2=f(()=>Object.keys(He).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Xt={startOnLoad:!0,mermaidAPI:Ue,parse:o2,render:Hd,init:a2,run:Nd,registerExternalDiagrams:s2,registerLayoutLoaders:Ku,initialize:Wd,parseError:void 0,contentLoaded:zd,setParseErrorHandler:n2,detectType:Ts,registerIconPacks:Ym,getRegisteredDiagramsMetadata:l2},c2=Xt;/*! Check if previously processed *//*!
|
|
196
|
+
* Wait for document loaded before starting the execution
|
|
197
|
+
*/const $2=Object.freeze(Object.defineProperty({__proto__:null,default:c2},Symbol.toStringTag,{value:"Module"}));export{k2 as $,qr as A,sf as B,he as C,Tp as D,Zs as E,Ot as F,Oo as G,gm as H,Yp as I,Zg as J,Bn as K,Fp as L,$s as M,y2 as N,C2 as O,tr as P,Hn as Q,qn as R,S2 as S,_2 as T,it as U,b2 as V,g2 as W,m2 as X,v2 as Y,x2 as Z,f as _,Cp as a,zf as a0,yr as a1,d2 as a2,na as a3,nm as a4,np as a5,Bs as a6,Nn as a7,Ip as a8,_i as a9,$p as aA,u2 as aB,ei as aC,Ym as aD,jm as aE,G as aF,Xc as aG,af as aH,$2 as aI,pm as aa,pp as ab,Qr as ac,j as ad,J as ae,jo as af,xy as ag,Uu as ah,M2 as ai,Jg as aj,Bt as ak,Ae as al,Ys as am,xh as an,Ge as ao,eh as ap,c0 as aq,L2 as ar,A2 as as,T2 as at,X as au,B2 as av,Yy as aw,Wy as ax,Ny as ay,Gm as az,bp as b,dt as c,Ho as d,wt as e,_e as f,Sp as g,Jt as h,sm as i,Sr as j,ih as k,$ as l,Jr as m,f2 as n,F2 as o,kp as p,vp as q,E2 as r,_p as s,Qg as t,ie as u,Iy as v,xm as w,w2 as x,xp as y,p2 as z};
|