pi-app 0.7.1 → 0.7.3
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +3 -3
- package/.next/build-manifest.json +4 -4
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +17 -17
- package/.next/required-server-files.js +6 -6
- package/.next/required-server-files.json +6 -6
- package/.next/server/app/_global-error/page.js +3 -3
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/events/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent/[id]/export.html/route.js +1 -1
- package/.next/server/app/api/agent/[id]/export.html/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/export.html/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/new/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/all-providers/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/all-providers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
- package/.next/server/app/api/auth/login/[provider]/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/login/[provider]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/auth/providers/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/providers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/cwd/validate/route.js +1 -1
- package/.next/server/app/api/cwd/validate/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/server/app/api/default-cwd/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/extensions/route.js +1 -1
- package/.next/server/app/api/extensions/route.js.nft.json +1 -1
- package/.next/server/app/api/extensions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/files/stage/route.js +1 -1
- package/.next/server/app/api/files/stage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/git-branch/route.js +1 -1
- package/.next/server/app/api/git-branch/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/health/route.js +1 -1
- package/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/history/[id]/route.js +2 -2
- package/.next/server/app/api/history/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/history/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/history/route.js +2 -2
- package/.next/server/app/api/history/route.js.nft.json +1 -1
- package/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/home/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models/route.js.nft.json +1 -1
- package/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/models-config/route.js.nft.json +1 -1
- package/.next/server/app/api/models-config/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/models-config/test/route.js.nft.json +1 -1
- package/.next/server/app/api/models-config/test/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/notifications/agent-end/route.js +3 -3
- package/.next/server/app/api/notifications/agent-end/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/preferences/route.js +1 -1
- package/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/product-sessions/[id]/route.js +1 -1
- package/.next/server/app/api/product-sessions/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/product-sessions/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/route.js +2 -2
- package/.next/server/app/api/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/remote/audit/route.js +1 -1
- package/.next/server/app/api/remote/audit/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/remote/client/route.js +1 -1
- package/.next/server/app/api/remote/client/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/remote/pair/route.js +1 -1
- package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/remote/route.js +1 -1
- package/.next/server/app/api/remote/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/scene-overrides/[sceneId]/route.js +2 -2
- package/.next/server/app/api/scene-overrides/[sceneId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/scene-overrides/export/route.js +4 -4
- package/.next/server/app/api/scene-overrides/export/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/scene-overrides/import/route.js +2 -2
- package/.next/server/app/api/scene-overrides/import/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/scene-overrides/route.js +1 -1
- package/.next/server/app/api/scene-overrides/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/context/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[id]/share/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/share/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/new/route.js +1 -1
- package/.next/server/app/api/sessions/new/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/route.js +2 -2
- package/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/default-model/route.js +1 -1
- package/.next/server/app/api/settings/default-model/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/default-model/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/share/[token]/route.js +1 -1
- package/.next/server/app/api/share/[token]/route.js.nft.json +1 -1
- package/.next/server/app/api/share/[token]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/install/route.js +1 -1
- package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/route.js +2 -2
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/usage/route.js +2 -2
- package/.next/server/app/api/usage/route.js.nft.json +1 -1
- package/.next/server/app/api/usage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/web-fetch/install-agent-browser/route.js +2 -2
- package/.next/server/app/api/web-fetch/install-agent-browser/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/web-fetch/preferences/route.js +1 -1
- package/.next/server/app/api/web-fetch/preferences/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/web-fetch/status/route.js +1 -1
- package/.next/server/app/api/web-fetch/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/page.js +5 -5
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/share/[token]/page.js +2 -2
- package/.next/server/app/share/[token]/page.js.nft.json +1 -1
- package/.next/server/app/share/[token]/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +3 -3
- package/.next/server/chunks/1381.js +1 -1
- package/.next/server/chunks/1703.js +1 -1
- package/.next/server/chunks/319.js +3 -3
- package/.next/server/chunks/3284.js +1 -0
- package/.next/server/chunks/3379.js +1 -1
- package/.next/server/chunks/3493.js +1 -1
- package/.next/server/chunks/4035.js +1 -1
- package/.next/server/chunks/4367.js +1 -1
- package/.next/server/chunks/4406.js +1 -1
- package/.next/server/chunks/4980.js +1 -1
- package/.next/server/chunks/5293.js +1 -1
- package/.next/server/chunks/5797.js +1 -1
- package/.next/server/chunks/5851.js +1 -1
- package/.next/server/chunks/6206.js +1 -1
- package/.next/server/chunks/7270.js +1 -1
- package/.next/server/chunks/8916.js +1 -1
- package/.next/server/chunks/9280.js +62 -62
- package/.next/server/chunks/9315.js +1 -1
- package/.next/server/chunks/9537.js +90 -0
- package/.next/server/chunks/966.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/middleware.js +2 -2
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{0b9a0da7.915b07ceecd18755.js → 0b9a0da7.9075af772487e743.js} +2 -2
- package/.next/static/chunks/{1852.4afb7f7ef17737c1.js → 1852.5543122f11aa7fed.js} +1 -1
- package/.next/static/chunks/{2419.fb50b8bb1874d556.js → 2419.347fdfe3c170854d.js} +1 -1
- package/.next/static/chunks/{3079.90c6008a4bba4ee1.js → 3079.4c511fa1144e3adf.js} +1 -1
- package/.next/static/chunks/{3308.115707ee3fd446be.js → 3308.1964a3fa76cba02f.js} +16 -16
- package/.next/static/chunks/{3325.01cdecedf0fb6d62.js → 3325.e4bfe1ca657f3b5b.js} +1 -1
- package/.next/static/chunks/3506.2a7eaa08b9f55337.js +90 -0
- package/.next/static/chunks/{394.2860c5a408dc8801.js → 394.91597771688df6d0.js} +1 -1
- package/.next/static/chunks/{3997.42e942ad02cc6f4b.js → 3997.1009c06025691712.js} +1 -1
- package/.next/static/chunks/{5034.cbaaf32db6d2086d.js → 5034.8f16c3fa3ce75411.js} +1 -1
- package/.next/static/chunks/{5074.fc63ed48a3b1a61f.js → 5074.d16651da01ec4e02.js} +1 -1
- package/.next/static/chunks/{6696.c05e02f280b8186b.js → 6696.a41aec266e657d54.js} +2 -2
- package/.next/static/chunks/{7343.9574ac32b87d5050.js → 7343.9fbb58204d8ac681.js} +1 -1
- package/.next/static/chunks/{7547.8caf31f3b18ded65.js → 7547.58bda8a2aabba0d4.js} +1 -1
- package/.next/static/chunks/{8489.fd81b5e4de9f8431.js → 8489.45f22859734f514f.js} +1 -1
- package/.next/static/chunks/9b0008ae.46f64400562a173e.js +2 -0
- package/.next/static/chunks/app/_not-found/page-433674846cbe1a12.js +1 -0
- package/.next/static/chunks/app/{layout-e74bc51db18cfddb.js → layout-dee60f48aba33b70.js} +1 -1
- package/.next/static/chunks/app/{page-0a72cdb03c0de546.js → page-9ea7c5df0546e3fb.js} +2 -2
- package/.next/static/chunks/app/share/[token]/{page-801df8f03e50e9cc.js → page-d022d0fda2951611.js} +1 -1
- package/.next/static/chunks/{main-app-4543b2d36de0bf44.js → main-app-a8eaf0472b160e89.js} +1 -1
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-e9772fcbe090eed4.js +1 -0
- package/.next/static/chunks/webpack-3c29a7a6de61bd6b.js +1 -0
- package/.next/trace +82 -6
- package/.next/trace-build +1 -1
- package/.next/types/app/api/agent/[id]/events/route.ts +1 -1
- package/.next/types/app/api/agent/[id]/export.html/route.ts +1 -1
- package/.next/types/app/api/agent/[id]/route.ts +1 -1
- package/.next/types/app/api/agent/new/route.ts +1 -1
- package/.next/types/app/api/auth/all-providers/route.ts +1 -1
- package/.next/types/app/api/auth/api-key/[provider]/route.ts +1 -1
- package/.next/types/app/api/auth/login/[provider]/route.ts +1 -1
- package/.next/types/app/api/auth/logout/[provider]/route.ts +1 -1
- package/.next/types/app/api/auth/providers/route.ts +1 -1
- package/.next/types/app/api/cwd/validate/route.ts +1 -1
- package/.next/types/app/api/default-cwd/route.ts +1 -1
- package/.next/types/app/api/extensions/route.ts +1 -1
- package/.next/types/app/api/files/[...path]/route.ts +1 -1
- package/.next/types/app/api/files/stage/route.ts +1 -1
- package/.next/types/app/api/git-branch/route.ts +1 -1
- package/.next/types/app/api/health/route.ts +1 -1
- package/.next/types/app/api/history/[id]/route.ts +1 -1
- package/.next/types/app/api/history/route.ts +1 -1
- package/.next/types/app/api/home/route.ts +1 -1
- package/.next/types/app/api/models/route.ts +1 -1
- package/.next/types/app/api/models-config/route.ts +1 -1
- package/.next/types/app/api/models-config/test/route.ts +1 -1
- package/.next/types/app/api/notifications/agent-end/route.ts +1 -1
- package/.next/types/app/api/preferences/route.ts +1 -1
- package/.next/types/app/api/product-sessions/[id]/route.ts +1 -1
- package/.next/types/app/api/push/route.ts +1 -1
- package/.next/types/app/api/remote/audit/route.ts +1 -1
- package/.next/types/app/api/remote/client/route.ts +1 -1
- package/.next/types/app/api/remote/pair/route.ts +1 -1
- package/.next/types/app/api/remote/route.ts +1 -1
- package/.next/types/app/api/scene-overrides/[sceneId]/route.ts +1 -1
- package/.next/types/app/api/scene-overrides/export/route.ts +1 -1
- package/.next/types/app/api/scene-overrides/import/route.ts +1 -1
- package/.next/types/app/api/scene-overrides/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/context/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/route.ts +1 -1
- package/.next/types/app/api/sessions/[id]/share/route.ts +1 -1
- package/.next/types/app/api/sessions/new/route.ts +1 -1
- package/.next/types/app/api/sessions/route.ts +1 -1
- package/.next/types/app/api/settings/default-model/route.ts +1 -1
- package/.next/types/app/api/share/[token]/route.ts +1 -1
- package/.next/types/app/api/skills/install/route.ts +1 -1
- package/.next/types/app/api/skills/route.ts +1 -1
- package/.next/types/app/api/skills/search/route.ts +1 -1
- package/.next/types/app/api/usage/route.ts +1 -1
- package/.next/types/app/api/web-fetch/install-agent-browser/route.ts +1 -1
- package/.next/types/app/api/web-fetch/preferences/route.ts +1 -1
- package/.next/types/app/api/web-fetch/status/route.ts +1 -1
- package/.next/types/app/page.ts +1 -1
- package/.next/types/app/share/[token]/page.ts +1 -1
- package/README.md +11 -11
- package/package.json +1 -1
- package/.next/server/chunks/4325.js +0 -90
- package/.next/server/chunks/4880.js +0 -1
- package/.next/static/chunks/5035.3755dbc45ec0eb8d.js +0 -90
- package/.next/static/chunks/9b0008ae.3afefd8b13735168.js +0 -2
- package/.next/static/chunks/app/_not-found/page-647d65d4d44f4663.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-7fe17cf3265b4136.js +0 -1
- package/.next/static/chunks/webpack-bef1f311e5b374f6.js +0 -1
- /package/.next/static/{mO8qg2XV3QxoVaZcobTyc → qDeNXpEzVER9ldna4emiI}/_buildManifest.js +0 -0
- /package/.next/static/{mO8qg2XV3QxoVaZcobTyc → qDeNXpEzVER9ldna4emiI}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=4980,exports.ids=[4980],exports.modules={17149:(a,b,c)=>{c.d(b,{A:()=>g});var d=c(71734),e=c(44878),f=Object.prototype.hasOwnProperty;let g=function(a,b,c){var g=a[b];f.call(a,b)&&(0,e.A)(g,c)&&(void 0!==c||b in a)||(0,d.A)(a,b,c)}},19089:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(17149),e=c(71734);let f=function(a,b,c,f){var g=!c;c||(c={});for(var h=-1,i=b.length;++h<i;){var j=b[h],k=f?f(c[j],a[j],j,c,a):void 0;void 0===k&&(k=a[j]),g?(0,e.A)(c,j,k):(0,d.A)(c,j,k)}return c}},30108:(a,b,c)=>{c.d(b,{A:()=>U});var d=c(41573),e=c(98007),f=c(17149),g=c(19089),h=c(45680),i=c(45092),j=c(44564),k=c(75530),l=c(48242),m=c(15078),n=c(91329),o=c(71963),p=Object.getOwnPropertySymbols?function(a){for(var b=[];a;)(0,m.A)(b,(0,l.A)(a)),a=(0,n.A)(a);return b}:o.A,q=c(73416),r=c(15357);let s=function(a){return(0,r.A)(a,i.A,p)};var t=c(91680),u=Object.prototype.hasOwnProperty;let v=function(a){var b=a.length,c=new a.constructor(b);return b&&"string"==typeof a[0]&&u.call(a,"index")&&(c.index=a.index,c.input=a.input),c};var w=c(42607);let x=function(a,b){var c=b?(0,w.A)(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)};var y=/\w*$/;let z=function(a){var b=new a.constructor(a.source,y.exec(a));return b.lastIndex=a.lastIndex,b};var A=c(85291),B=A.A?A.A.prototype:void 0,C=B?B.valueOf:void 0,D=c(43391);let E=function(a,b,c){var d=a.constructor;switch(b){case"[object ArrayBuffer]":return(0,w.A)(a);case"[object Boolean]":case"[object Date]":return new d(+a);case"[object DataView]":return x(a,c);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,D.A)(a,c);case"[object Map]":case"[object Set]":return new d;case"[object Number]":case"[object String]":return new d(a);case"[object RegExp]":return z(a);case"[object Symbol]":return C?Object(C.call(a)):{}}};var F=c(65977),G=c(4591),H=c(1443),I=c(93820),J=c(63095),K=c(77127),L=K.A&&K.A.isMap,M=L?(0,J.A)(L):function(a){return(0,I.A)(a)&&"[object Map]"==(0,t.A)(a)},N=c(18671),O=K.A&&K.A.isSet,P=O?(0,J.A)(O):function(a){return(0,I.A)(a)&&"[object Set]"==(0,t.A)(a)},Q="[object Arguments]",R="[object Function]",S="[object Object]",T={};T[Q]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[S]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[R]=T["[object WeakMap]"]=!1;let U=function a(b,c,m,n,o,r){var u,w=1&c,x=2&c,y=4&c;if(m&&(u=o?m(b,n,o,r):m(b)),void 0!==u)return u;if(!(0,N.A)(b))return b;var z=(0,G.A)(b);if(z){if(u=v(b),!w)return(0,k.A)(b,u)}else{var A,B,C,D,I=(0,t.A)(b),J=I==R||"[object GeneratorFunction]"==I;if((0,H.A)(b))return(0,j.A)(b,w);if(I==S||I==Q||J&&!o){if(u=x||J?{}:(0,F.A)(b),!w)return x?(B=(A=u)&&(0,g.A)(b,(0,i.A)(b),A),(0,g.A)(b,p(b),B)):(D=(C=u)&&(0,g.A)(b,(0,h.A)(b),C),(0,g.A)(b,(0,l.A)(b),D))}else{if(!T[I])return o?b:{};u=E(b,I,w)}}r||(r=new d.A);var K=r.get(b);if(K)return K;r.set(b,u),P(b)?b.forEach(function(d){u.add(a(d,c,m,d,b,r))}):M(b)&&b.forEach(function(d,e){u.set(e,a(d,c,m,e,b,r))});var L=y?x?s:q.A:x?i.A:h.A,O=z?void 0:L(b);return(0,e.A)(O||b,function(d,e){O&&(d=b[e=d]),(0,f.A)(u,e,a(d,c,m,e,b,r))}),u}},38368:(a,b,c)=>{c.d(b,{A:()=>h});var d=c(44090),e=c(78803),f=c(87826),g=c(4591);let h=function(a,b){return((0,g.A)(a)?d.A:f.A)(a,(0,e.A)(b,3))}},42607:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(12022);let e=function(a){var b=new a.constructor(a.byteLength);return new d.A(b).set(new d.A(a)),b}},43391:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(42607);let e=function(a,b){var c=b?(0,d.A)(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}},44564:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(18623),e="object"==typeof exports&&exports&&!exports.nodeType&&exports,f=e&&"object"==typeof module&&module&&!module.nodeType&&module,g=f&&f.exports===e?d.A.Buffer:void 0,h=g?g.allocUnsafe:void 0;let i=function(a,b){if(b)return a.slice();var c=a.length,d=h?h(c):new a.constructor(c);return a.copy(d),d}},45092:(a,b,c)=>{c.d(b,{A:()=>k});var d=c(79524),e=c(18671),f=c(18765);let g=function(a){var b=[];if(null!=a)for(var c in Object(a))b.push(c);return b};var h=Object.prototype.hasOwnProperty;let i=function(a){if(!(0,e.A)(a))return g(a);var b=(0,f.A)(a),c=[];for(var d in a)"constructor"==d&&(b||!h.call(a,d))||c.push(d);return c};var j=c(93884);let k=function(a){return(0,j.A)(a)?(0,d.A)(a,!0):i(a)}},64980:(a,b,c)=>{c.d(b,{Zp:()=>bV});var d,e,f,g=c(85992),h=c(17904),i=0;let j=function(a){var b=++i;return(0,h.A)(a)+b};var k=c(86060),l=c(78959);let m=function(a){return(null==a?0:a.length)?(0,l.A)(a,1):[]};var n=c(38368),o=Math.ceil,p=Math.max;let q=function(a,b,c,d){for(var e=-1,f=p(o((b-a)/(c||1)),0),g=Array(f);f--;)g[d?f:++e]=a,a+=c;return g};var r=c(44878),s=c(93884),t=c(29163),u=c(18671);let v=function(a,b,c){if(!(0,u.A)(c))return!1;var d=typeof b;return("number"==d?!!((0,s.A)(c)&&(0,t.A)(b,c.length)):"string"==d&&b in c)&&(0,r.A)(c[b],a)};var w=/\s/;let x=function(a){for(var b=a.length;b--&&w.test(a.charAt(b)););return b};var y=/^\s+/,z=c(86340),A=0/0,B=/^[-+]0x[0-9a-f]+$/i,C=/^0b[01]+$/i,D=/^0o[0-7]+$/i,E=parseInt;let F=function(a){if("number"==typeof a)return a;if((0,z.A)(a))return A;if((0,u.A)(a)){var b,c="function"==typeof a.valueOf?a.valueOf():a;a=(0,u.A)(c)?c+"":c}if("string"!=typeof a)return 0===a?a:+a;a=(b=a)?b.slice(0,x(b)+1).replace(y,""):b;var d=C.test(a);return d||D.test(a)?E(a.slice(2),d?2:8):B.test(a)?A:+a};var G=1/0;let H=function(a){return a?(a=F(a))===G||a===-G?(a<0?-1:1)*17976931348623157e292:a==a?a:0:0===a?a:0},I=function(a,b,c){return c&&"number"!=typeof c&&v(a,b,c)&&(b=c=void 0),a=H(a),void 0===b?(b=a,a=0):b=H(b),c=void 0===c?a<b?1:-1:H(c),q(a,b,c,void 0)};var J=c(74367);class K{constructor(){var a={};a._next=a._prev=a,this._sentinel=a}dequeue(){var a=this._sentinel,b=a._prev;if(b!==a)return L(b),b}enqueue(a){var b=this._sentinel;a._prev&&a._next&&L(a),a._next=b._next,b._next._prev=a,b._next=a,a._prev=b}toString(){for(var a=[],b=this._sentinel,c=b._prev;c!==b;)a.push(JSON.stringify(c,M)),c=c._prev;return"["+a.join(", ")+"]"}}function L(a){a._prev._next=a._next,a._next._prev=a._prev,delete a._next,delete a._prev}function M(a,b){if("_next"!==a&&"_prev"!==a)return b}var N=k.A(1);function O(a,b,c,d,e){var f=e?[]:void 0;return g.A(a.inEdges(d.v),function(d){var g=a.edge(d),h=a.node(d.v);e&&f.push({v:d.v,w:d.w}),h.out-=g,P(b,c,h)}),g.A(a.outEdges(d.v),function(d){var e=a.edge(d),f=d.w,g=a.node(f);g.in-=e,P(b,c,g)}),a.removeNode(d.v),f}function P(a,b,c){c.out?c.in?a[c.out-c.in+b].enqueue(c):a[a.length-1].enqueue(c):a[0].enqueue(c)}var Q=c(41573),R=c(71734);let S=function(a,b,c){(void 0===c||(0,r.A)(a[b],c))&&(void 0!==c||b in a)||(0,R.A)(a,b,c)};var T=c(78832),U=c(44564),V=c(43391),W=c(75530),X=c(65977),Y=c(73769),Z=c(4591),$=c(45015),_=c(1443),aa=c(10228),ab=c(64910),ac=c(91329),ad=c(93820),ae=Object.prototype,af=Function.prototype.toString,ag=ae.hasOwnProperty,ah=af.call(Object);let ai=function(a){if(!(0,ad.A)(a)||"[object Object]"!=(0,ab.A)(a))return!1;var b=(0,ac.A)(a);if(null===b)return!0;var c=ag.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&af.call(c)==ah};var aj=c(38426);let ak=function(a,b){if(("constructor"!==b||"function"!=typeof a[b])&&"__proto__"!=b)return a[b]};var al=c(19089),am=c(45092);let an=function(a,b,c,d,e,f,g){var h=ak(a,c),i=ak(b,c),j=g.get(i);if(j)return void S(a,c,j);var k=f?f(h,i,c+"",a,b,g):void 0,l=void 0===k;if(l){var m=(0,Z.A)(i),n=!m&&(0,_.A)(i),o=!m&&!n&&(0,aj.A)(i);(k=i,m||n||o)?(0,Z.A)(h)?k=h:(0,$.A)(h)?k=(0,W.A)(h):n?(l=!1,k=(0,U.A)(i,!0)):o?(l=!1,k=(0,V.A)(i,!0)):k=[]:ai(i)||(0,Y.A)(i)?(k=h,(0,Y.A)(h))?k=(0,al.A)(h,(0,am.A)(h)):(!(0,u.A)(h)||(0,aa.A)(h))&&(k=(0,X.A)(i)):l=!1}l&&(g.set(i,k),e(k,i,d,f,g),g.delete(i)),S(a,c,k)},ao=function a(b,c,d,e,f){b!==c&&(0,T.A)(c,function(g,h){if(f||(f=new Q.A),(0,u.A)(g))an(b,c,h,d,a,e,f);else{var i=e?e(ak(b,h),g,h+"",b,c,f):void 0;void 0===i&&(i=g),S(b,h,i)}},am.A)};var ap=c(9672),aq=(d=function(a,b,c){ao(a,b,c)},(0,ap.A)(function(a,b){var c=-1,e=b.length,f=e>1?b[e-1]:void 0,g=e>2?b[2]:void 0;for(f=d.length>3&&"function"==typeof f?(e--,f):void 0,g&&v(b[0],b[1],g)&&(f=e<3?void 0:f,e=1),a=Object(a);++c<e;){var h=b[c];h&&d(a,h,c,f)}return a})),ar=c(86296),as=c(17149),at=c(67285),au=c(47927);let av=function(a,b,c,d){if(!(0,u.A)(a))return a;b=(0,at.A)(b,a);for(var e=-1,f=b.length,g=f-1,h=a;null!=h&&++e<f;){var i=(0,au.A)(b[e]),j=c;if("__proto__"===i||"constructor"===i||"prototype"===i)break;if(e!=g){var k=h[i];void 0===(j=d?d(k,i,h):void 0)&&(j=(0,u.A)(k)?k:(0,t.A)(b[e+1])?[]:{})}(0,as.A)(h,i,j),h=h[i]}return a},aw=function(a,b,c){for(var d=-1,e=b.length,f={};++d<e;){var g=b[d],h=(0,ar.A)(a,g);c(h,g)&&av(f,(0,at.A)(g,a),h)}return f};var ax=c(67109),ay=c(50989),az=c(10874),aA=(e=function(a,b){return null==a?{}:aw(a,b,function(b,c){return(0,ax.A)(a,c)})},(0,az.A)((0,ay.A)(e,void 0,m),e+"")),aB=Object.prototype,aC=aB.hasOwnProperty,aD=(0,ap.A)(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:void 0;for(e&&v(b[0],b[1],e)&&(d=1);++c<d;)for(var f=b[c],g=(0,am.A)(f),h=-1,i=g.length;++h<i;){var j=g[h],k=a[j];(void 0===k||(0,r.A)(k,aB[j])&&!aC.call(a,j))&&(a[j]=f[j])}return a});let aE=function(a,b,c){for(var d=-1,e=a.length;++d<e;){var f=a[d],g=b(f);if(null!=g&&(void 0===h?g==g&&!(0,z.A)(g):c(g,h)))var h=g,i=f}return i},aF=function(a,b){return a>b};var aG=c(66994);let aH=function(a){return a&&a.length?aE(a,aG.A,aF):void 0},aI=function(a){var b=null==a?0:a.length;return b?a[b-1]:void 0};var aJ=c(62023),aK=c(78803);let aL=function(a,b){var c={};return b=(0,aK.A)(b,3),(0,aJ.A)(a,function(a,d,e){(0,R.A)(c,d,b(a,d,e))}),c};var aM=c(98122);let aN=function(a,b){return a<b},aO=function(a){return a&&a.length?aE(a,aG.A,aN):void 0};var aP=Object.prototype.hasOwnProperty;let aQ=function(a,b){return null!=a&&aP.call(a,b)};var aR=c(58560);let aS=function(a,b){return null!=a&&(0,aR.A)(a,b,aQ)};var aT=c(18623);let aU=function(){return aT.A.Date.now()};function aV(a,b,c,d){var e;do e=j(d);while(a.hasNode(e));return c.dummy=b,a.setNode(e,c),e}function aW(a){var b=new J.T({multigraph:a.isMultigraph()}).setGraph(a.graph());return g.A(a.nodes(),function(c){a.children(c).length||b.setNode(c,a.node(c))}),g.A(a.edges(),function(c){b.setEdge(c,a.edge(c))}),b}function aX(a,b){var c,d,e=a.x,f=a.y,g=b.x-e,h=b.y-f,i=a.width/2,j=a.height/2;if(!g&&!h)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(h)*i>Math.abs(g)*j?(h<0&&(j=-j),c=j*g/h,d=j):(g<0&&(i=-i),c=i,d=i*h/g),{x:e+c,y:f+d}}function aY(a){var b=n.A(I(a$(a)+1),function(){return[]});return g.A(a.nodes(),function(c){var d=a.node(c),e=d.rank;aM.A(e)||(b[e][d.order]=c)}),b}function aZ(a,b,c,d){var e={width:0,height:0};return arguments.length>=4&&(e.rank=c,e.order=d),aV(a,"border",e,b)}function a$(a){return aH(n.A(a.nodes(),function(b){var c=a.node(b).rank;if(!aM.A(c))return c}))}function a_(a,b){var c=aU();try{return b()}finally{console.log(a+" time: "+(aU()-c)+"ms")}}function a0(a,b){return b()}function a1(a,b,c,d,e,f){var g=e[b][f-1],h=aV(a,"border",{width:0,height:0,rank:f,borderType:b},c);e[b][f]=h,a.setParent(h,d),g&&a.setEdge(g,h,{weight:1})}function a2(a){g.A(a.nodes(),function(b){a3(a.node(b))}),g.A(a.edges(),function(b){a3(a.edge(b))})}function a3(a){var b=a.width;a.width=a.height,a.height=b}function a4(a){a.y=-a.y}function a5(a){var b=a.x;a.x=a.y,a.y=b}let a6=function(a,b){return a&&a.length?aE(a,(0,aK.A)(b,2),aN):void 0};function a7(a){var b={};g.A(a.sources(),function c(d){var e=a.node(d);if(Object.prototype.hasOwnProperty.call(b,d))return e.rank;b[d]=!0;var f=aO(n.A(a.outEdges(d),function(b){return c(b.w)-a.edge(b).minlen}));return(f===1/0||null==f)&&(f=0),e.rank=f})}function a8(a,b){return a.node(b.w).rank-a.node(b.v).rank-a.edge(b).minlen}function a9(a){var b,c,d,e,f=new J.T({directed:!1}),h=a.nodes()[0],i=a.nodeCount();for(f.setNode(h,{});b=f,c=a,g.A(b.nodes(),function a(d){g.A(c.nodeEdges(d),function(e){var f=e.v,g=d===f?e.w:f;b.hasNode(g)||a8(c,e)||(b.setNode(g,{}),b.setEdge(d,g,{}),a(g))})}),b.nodeCount()<i;)d=function(a,b){return a6(b.edges(),function(c){if(a.hasNode(c.v)!==a.hasNode(c.w))return a8(b,c)})}(f,a),e=f.hasNode(d.v)?a8(a,d):-a8(a,d),function(a,b,c){g.A(a.nodes(),function(a){b.node(a).rank+=c})}(f,a,e);return f}var ba=c(45680),bb=c(67853);let bc=function(a){var b=H(a),c=b%1;return b==b?c?b-c:b:0};var bd=Math.max,be=(f=function(a,b,c){var d=null==a?0:a.length;if(!d)return -1;var e=null==c?0:bc(c);return e<0&&(e=bd(d+e,0)),(0,bb.A)(a,(0,aK.A)(b,3),e)},function(a,b,c){var d=Object(a);if(!(0,s.A)(a)){var e=(0,aK.A)(b,3);a=(0,ba.A)(a),b=function(a){return e(d[a],a,d)}}var g=f(a,b,c);return g>-1?d[e?a[g]:g]:void 0}),bf=c(58617);k.A(1),k.A(1);var bg=c(61137),bh=c(91680),bi=(0,c(19919).A)("length"),bj=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),bk="\\ud800-\\udfff",bl="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",bm="\\ud83c[\\udffb-\\udfff]",bn="[^"+bk+"]",bo="(?:\\ud83c[\\udde6-\\uddff]){2}",bp="[\\ud800-\\udbff][\\udc00-\\udfff]",bq="(?:"+bl+"|"+bm+")?",br="[\\ufe0e\\ufe0f]?",bs="(?:\\u200d(?:"+[bn,bo,bp].join("|")+")"+br+bq+")*",bt=RegExp(bm+"(?="+bm+")|"+("(?:"+[bn+bl+"?",bl,bo,bp,"["+bk+"]"].join("|"))+")"+(br+bq+bs),"g");function bu(){}function bv(a,b,c){Z.A(b)||(b=[b]);var d=(a.isDirected()?a.successors:a.neighbors).bind(a),e=[],f={};return g.A(b,function(b){if(!a.hasNode(b))throw Error("Graph does not have node: "+b);!function a(b,c,d,e,f,h){!Object.prototype.hasOwnProperty.call(e,c)&&(e[c]=!0,d||h.push(c),g.A(f(c),function(c){a(b,c,d,e,f,h)}),d&&h.push(c))}(a,b,"post"===c,f,d,e)}),e}function bw(a){b=a,c=new J.T().setGraph(b.graph()),g.A(b.nodes(),function(a){c.setNode(a,b.node(a))}),g.A(b.edges(),function(a){var d=c.edge(a.v,a.w)||{weight:0,minlen:1},e=b.edge(a);c.setEdge(a.v,a.w,{weight:d.weight+e.weight,minlen:Math.max(d.minlen,e.minlen)})}),a7(a=c);var b,c,d,e,f=a9(a);for(bz(f),bx(f,a);d=bA(f);)e=bB(f,a,d),bC(f,a,d,e)}function bx(a,b){var c=bv(a,a.nodes(),"post");c=c.slice(0,c.length-1),g.A(c,function(c){var d,e,f,g;d=a,e=b,f=c,g=d.node(f).parent,d.edge(f,g).cutvalue=by(d,e,f)})}function by(a,b,c){var d=a.node(c).parent,e=!0,f=b.edge(c,d),h=0;return f||(e=!1,f=b.edge(d,c)),h=f.weight,g.A(b.nodeEdges(c),function(f){var g=f.v===c,i=g?f.w:f.v;if(i!==d){var j,k,l,m=g===e,n=b.edge(f).weight;if(h+=m?n:-n,j=a,k=c,l=i,j.hasEdge(k,l)){var o=a.edge(c,i).cutvalue;h+=m?-o:o}}}),h}function bz(a,b){arguments.length<2&&(b=a.nodes()[0]),function a(b,c,d,e,f){var h=d,i=b.node(e);return c[e]=!0,g.A(b.neighbors(e),function(f){Object.prototype.hasOwnProperty.call(c,f)||(d=a(b,c,d,f,e))}),i.low=h,i.lim=d++,f?i.parent=f:delete i.parent,d}(a,{},1,b)}function bA(a){return be(a.edges(),function(b){return a.edge(b).cutvalue<0})}function bB(a,b,c){var d=c.v,e=c.w;b.hasEdge(d,e)||(d=c.w,e=c.v);var f=a.node(d),g=a.node(e),h=f,i=!1;return f.lim>g.lim&&(h=g,i=!0),a6(bf.A(b.edges(),function(b){return i===bD(a,a.node(b.v),h)&&i!==bD(a,a.node(b.w),h)}),function(a){return a8(b,a)})}function bC(a,b,c,d){var e,f,h,i,j=c.v,k=c.w;a.removeEdge(j,k),a.setEdge(d.v,d.w,{}),bz(a),bx(a,b),e=a,f=b,h=be(e.nodes(),function(a){return!f.node(a).parent}),i=(i=bv(e,h,"pre")).slice(1),g.A(i,function(a){var b=e.node(a).parent,c=f.edge(a,b),d=!1;c||(c=f.edge(b,a),d=!0),f.node(a).rank=f.node(b).rank+(d?c.minlen:-c.minlen)})}function bD(a,b,c){return c.low<=b.lim&&b.lim<=c.lim}bu.prototype=Error(),c(33456),bw.initLowLimValues=bz,bw.initCutValues=bx,bw.calcCutValue=by,bw.leaveEdge=bA,bw.enterEdge=bB,bw.exchangeEdges=bC;var bE=c(21152),bF=c(46171),bG=c(30108);let bH=function(a,b,c){for(var d=-1,e=a.length,f=b.length,g={};++d<e;){var h=d<f?b[d]:void 0;c(g,a[d],h)}return g};var bI=c(44090),bJ=c(87826);let bK=function(a,b){var c=a.length;for(a.sort(b);c--;)a[c]=a[c].value;return a};var bL=c(63095);let bM=function(a,b){if(a!==b){var c=void 0!==a,d=null===a,e=a==a,f=(0,z.A)(a),g=void 0!==b,h=null===b,i=b==b,j=(0,z.A)(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a<b||j&&c&&e&&!d&&!f||h&&c&&e||!g&&e||!i)return -1}return 0},bN=function(a,b,c){for(var d=-1,e=a.criteria,f=b.criteria,g=e.length,h=c.length;++d<g;){var i=bM(e[d],f[d]);if(i){if(d>=h)return i;return i*("desc"==c[d]?-1:1)}}return a.index-b.index},bO=function(a,b,c){b=b.length?(0,bI.A)(b,function(a){return(0,Z.A)(a)?function(b){return(0,ar.A)(b,1===a.length?a[0]:a)}:a}):[aG.A];var d=-1;return b=(0,bI.A)(b,(0,bL.A)(aK.A)),bK((0,bJ.A)(a,function(a,c,e){return{criteria:(0,bI.A)(b,function(b){return b(a)}),index:++d,value:a}}),function(a,b){return bN(a,b,c)})};var bP=(0,ap.A)(function(a,b){if(null==a)return[];var c=b.length;return c>1&&v(a,b[0],b[1])?b=[]:c>2&&v(b[0],b[1],b[2])&&(b=[b[0]]),bO(a,(0,l.A)(b,1),[])});function bQ(a,b,c){for(var d;b.length&&(d=aI(b)).i<=c;)b.pop(),a.push(d.vs),c++;return c}function bR(a,b,c){return n.A(b,function(b){var d,e;return d=function(a){for(var b;a.hasNode(b=j("_root")););return b}(a),e=new J.T({compound:!0}).setGraph({root:d}).setDefaultNodeLabel(function(b){return a.node(b)}),g.A(a.nodes(),function(f){var h=a.node(f),i=a.parent(f);(h.rank===b||h.minRank<=b&&b<=h.maxRank)&&(e.setNode(f),e.setParent(f,i||d),g.A(a[c](f),function(b){var c=b.v===f?b.w:b.v,d=e.edge(c,f),g=aM.A(d)?0:d.weight;e.setEdge(c,f,{weight:a.edge(b).weight+g})}),Object.prototype.hasOwnProperty.call(h,"minRank")&&e.setNode(f,{borderLeft:h.borderLeft[b],borderRight:h.borderRight[b]}))}),e})}function bS(a,b){g.A(b,function(b){g.A(b,function(b,c){a.node(b).order=c})})}var bT=c(62320);function bU(a,b,c){if(b>c){var d=b;b=c,c=d}Object.prototype.hasOwnProperty.call(a,b)||Object.defineProperty(a,b,{enumerable:!0,configurable:!0,value:{},writable:!0}),Object.defineProperty(a[b],c,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function bV(a,b){var c=b&&b.debugTiming?a_:a0;c("layout",()=>{var b=c(" buildLayoutGraph",()=>{var b,c,d;return b=a,c=new J.T({multigraph:!0,compound:!0}),d=b3(b.graph()),c.setGraph(aq({},bX,b2(d,bW),aA(d,bY))),g.A(b.nodes(),function(a){var d=b3(b.node(a));c.setNode(a,aD(b2(d,bZ),b$)),c.setParent(a,b.parent(a))}),g.A(b.edges(),function(a){var d=b3(b.edge(a));c.setEdge(a,aq({},b0,b2(d,b_),aA(d,b1)))}),c});c(" runLayout",()=>{var a,d;return a=b,void((d=c)(" makeSpaceForEdgeLabels",()=>{var b,c;return c=(b=a).graph(),void(c.ranksep/=2,g.A(b.edges(),function(a){var d=b.edge(a);d.minlen*=2,"c"!==d.labelpos.toLowerCase()&&("TB"===c.rankdir||"BT"===c.rankdir?d.width+=d.labeloffset:d.height+=d.labeloffset)}))}),d(" removeSelfEdges",()=>{var b;return b=a,void g.A(b.edges(),function(a){if(a.v===a.w){var c=b.node(a.v);c.selfEdges||(c.selfEdges=[]),c.selfEdges.push({e:a,label:b.edge(a)}),b.removeEdge(a)}})}),d(" acyclic",()=>{var b,c,d,e,f,h;return b="greedy"===a.graph().acyclicer?function(a,b){if(1>=a.nodeCount())return[];var c,d,e,f,h,i,j,k=(c=a,d=b||N,e=new J.T,f=0,h=0,g.A(c.nodes(),function(a){e.setNode(a,{v:a,in:0,out:0})}),g.A(c.edges(),function(a){var b=e.edge(a.v,a.w)||0,c=d(a);e.setEdge(a.v,a.w,b+c),h=Math.max(h,e.node(a.v).out+=c),f=Math.max(f,e.node(a.w).in+=c)}),i=I(h+f+3).map(function(){return new K}),j=f+1,g.A(e.nodes(),function(a){P(i,j,e.node(a))}),{graph:e,buckets:i,zeroIdx:j}),l=function(a,b,c){for(var d,e=[],f=b[b.length-1],g=b[0];a.nodeCount();){for(;d=g.dequeue();)O(a,b,c,d);for(;d=f.dequeue();)O(a,b,c,d);if(a.nodeCount()){for(var h=b.length-2;h>0;--h)if(d=b[h].dequeue()){e=e.concat(O(a,b,c,d,!0));break}}}return e}(k.graph,k.buckets,k.zeroIdx);return m(n.A(l,function(b){return a.outEdges(b.v,b.w)}))}(a,(c=a,function(a){return c.edge(a).weight})):(d=a,e=[],f={},h={},g.A(d.nodes(),function a(b){Object.prototype.hasOwnProperty.call(h,b)||(h[b]=!0,f[b]=!0,g.A(d.outEdges(b),function(b){Object.prototype.hasOwnProperty.call(f,b.w)?e.push(b):a(b.w)}),delete f[b])}),e),void g.A(b,function(b){var c=a.edge(b);a.removeEdge(b),c.forwardName=b.name,c.reversed=!0,a.setEdge(b.w,b.v,c,j("rev"))})}),d(" nestingGraph.run",()=>{var b,c,d,e,f,h,i,j;return b=aV(a,"root",{},"_root"),h=a,i={},g.A(h.children(),function(a){!function a(b,c){var d=h.children(b);d&&d.length&&g.A(d,function(b){a(b,c+1)}),i[b]=c}(a,1)}),c=i,e=2*(d=aH(bE.A(c))-1)+1,a.graph().nestingRoot=b,g.A(a.edges(),function(b){a.edge(b).minlen*=e}),f=(j=a,bF.A(j.edges(),function(a,b){return a+j.edge(b).weight},0)+1),void(g.A(a.children(),function(h){!function a(b,c,d,e,f,h,i){var j=b.children(i);if(!j.length){i!==c&&b.setEdge(c,i,{weight:0,minlen:d});return}var k=aZ(b,"_bt"),l=aZ(b,"_bb"),m=b.node(i);b.setParent(k,i),m.borderTop=k,b.setParent(l,i),m.borderBottom=l,g.A(j,function(g){a(b,c,d,e,f,h,g);var j=b.node(g),m=j.borderTop?j.borderTop:g,n=j.borderBottom?j.borderBottom:g,o=j.borderTop?e:2*e,p=m!==n?1:f-h[i]+1;b.setEdge(k,m,{weight:o,minlen:p,nestingEdge:!0}),b.setEdge(n,l,{weight:o,minlen:p,nestingEdge:!0})}),b.parent(i)||b.setEdge(c,k,{weight:0,minlen:f+h[i]})}(a,b,e,f,d,c,h)}),a.graph().nodeRankFactor=e)}),d(" rank",()=>(function(a){switch(a.graph().ranker){case"network-simplex":default:bw(a);break;case"tight-tree":var b;a7(b=a),a9(b);break;case"longest-path":a7(a)}})(aW(a))),d(" injectEdgeLabelProxies",()=>{var b;return b=a,void g.A(b.edges(),function(a){var c=b.edge(a);if(c.width&&c.height){var d=b.node(a.v),e={rank:(b.node(a.w).rank-d.rank)/2+d.rank,e:a};aV(b,"edge-proxy",e,"_ep")}})}),d(" removeEmptyRanks",()=>{var b,c,d,e;return b=aO(n.A(a.nodes(),function(b){return a.node(b).rank})),c=[],g.A(a.nodes(),function(d){var e=a.node(d).rank-b;c[e]||(c[e]=[]),c[e].push(d)}),d=0,e=a.graph().nodeRankFactor,void g.A(c,function(b,c){aM.A(b)&&c%e!=0?--d:d&&g.A(b,function(b){a.node(b).rank+=d})})}),d(" nestingGraph.cleanup",()=>{var b;return b=a.graph(),void(a.removeNode(b.nestingRoot),delete b.nestingRoot,g.A(a.edges(),function(b){a.edge(b).nestingEdge&&a.removeEdge(b)}))}),d(" normalizeRanks",()=>{var b;return b=aO(n.A(a.nodes(),function(b){return a.node(b).rank})),void g.A(a.nodes(),function(c){var d=a.node(c);aS(d,"rank")&&(d.rank-=b)})}),d(" assignRankMinMax",()=>{var b,c;return b=a,c=0,void(g.A(b.nodes(),function(a){var d=b.node(a);d.borderTop&&(d.minRank=b.node(d.borderTop).rank,d.maxRank=b.node(d.borderBottom).rank,c=aH(c,d.maxRank))}),b.graph().maxRank=c)}),d(" removeEdgeLabelProxies",()=>{var b;return b=a,void g.A(b.nodes(),function(a){var c=b.node(a);"edge-proxy"===c.dummy&&(b.edge(c.e).labelRank=c.rank,b.removeNode(a))})}),d(" normalize.run",()=>{a.graph().dummyChains=[],g.A(a.edges(),function(b){!function(a,b){var c,d,e=b.v,f=a.node(e).rank,g=b.w,h=a.node(g).rank,i=b.name,j=a.edge(b),k=j.labelRank;if(h!==f+1){a.removeEdge(b);var l=void 0;for(d=0,++f;f<h;++d,++f)j.points=[],c=aV(a,"edge",l={width:0,height:0,edgeLabel:j,edgeObj:b,rank:f},"_d"),f===k&&(l.width=j.width,l.height=j.height,l.dummy="edge-label",l.labelpos=j.labelpos),a.setEdge(e,c,{weight:j.weight},i),0===d&&a.graph().dummyChains.push(c),e=c;a.setEdge(e,g,{weight:j.weight},i)}}(a,b)})}),d(" parentDummyChains",()=>{var b,c,d,e;return c=a,d={},e=0,g.A(c.children(),function a(b){var f=e;g.A(c.children(b),a),d[b]={low:f,lim:e++}}),b=d,void g.A(a.graph().dummyChains,function(c){for(var d=a.node(c),e=d.edgeObj,f=function(a,b,c,d){var e,f,g=[],h=[],i=Math.min(b[c].low,b[d].low),j=Math.max(b[c].lim,b[d].lim);e=c;do g.push(e=a.parent(e));while(e&&(b[e].low>i||j>b[e].lim));for(f=e,e=d;(e=a.parent(e))!==f;)h.push(e);return{path:g.concat(h.reverse()),lca:f}}(a,b,e.v,e.w),g=f.path,h=f.lca,i=0,j=g[0],k=!0;c!==e.w;){if(d=a.node(c),k){for(;(j=g[i])!==h&&a.node(j).maxRank<d.rank;)i++;j===h&&(k=!1)}if(!k){for(;i<g.length-1&&a.node(j=g[i+1]).minRank<=d.rank;)i++;j=g[i]}a.setParent(c,j),c=a.successors(c)[0]}})}),d(" addBorderSegments",()=>{g.A(a.children(),function b(c){var d=a.children(c),e=a.node(c);if(d.length&&g.A(d,b),Object.prototype.hasOwnProperty.call(e,"minRank")){e.borderLeft=[],e.borderRight=[];for(var f=e.minRank,h=e.maxRank+1;f<h;++f)a1(a,"borderLeft","_bl",c,e,f),a1(a,"borderRight","_br",c,e,f)}})}),d(" order",()=>(function(a){var b=a$(a),c=bR(a,I(1,b+1),"inEdges"),d=bR(a,I(b-1,-1,-1),"outEdges"),e=(f={},h=bf.A(a.nodes(),function(b){return!a.children(b).length}),i=aH(n.A(h,function(b){return a.node(b).rank})),j=n.A(I(i+1),function(){return[]}),k=bP(h,function(b){return a.node(b).rank}),g.A(k,function b(c){aS(f,c)||(f[c]=!0,j[a.node(c).rank].push(c),g.A(a.successors(c),b))}),j);bS(a,e);for(var f,h,i,j,k,l,o=1/0,p=0,q=0;q<4;++p,++q){(function(a,b){var c=new J.T;g.A(a,function(a){var d,e,f,h=a.graph().root,i=function a(b,c,d,e){var f,h,i,j,k,l,o,p,q,r,s,t,u=b.children(c),v=b.node(c),w=v?v.borderLeft:void 0,x=v?v.borderRight:void 0,y={};w&&(u=bf.A(u,function(a){return a!==w&&a!==x}));var z=(f=u,n.A(f,function(a){var c=b.inEdges(a);if(!c.length)return{v:a};var d=bF.A(c,function(a,c){var d=b.edge(c),e=b.node(c.v);return{sum:a.sum+d.weight*e.order,weight:a.weight+d.weight}},{sum:0,weight:0});return{v:a,barycenter:d.sum/d.weight,weight:d.weight}}));g.A(z,function(c){if(b.children(c.v).length){var f,g,h=a(b,c.v,d,e);y[c.v]=h,Object.prototype.hasOwnProperty.call(h,"barycenter")&&(f=c,g=h,aM.A(f.barycenter)?(f.barycenter=g.barycenter,f.weight=g.weight):(f.barycenter=(f.barycenter*f.weight+g.barycenter*g.weight)/(f.weight+g.weight),f.weight+=g.weight))}});var A=(h={},g.A(z,function(a,b){var c=h[a.v]={indegree:0,in:[],out:[],vs:[a.v],i:b};aM.A(a.barycenter)||(c.barycenter=a.barycenter,c.weight=a.weight)}),g.A(d.edges(),function(a){var b=h[a.v],c=h[a.w];aM.A(b)||aM.A(c)||(c.indegree++,b.out.push(h[a.w]))}),function(a){for(var b=[];a.length;){var c=a.pop();b.push(c),g.A(c.in.reverse(),function(a){return function(b){!b.merged&&(aM.A(b.barycenter)||aM.A(a.barycenter)||b.barycenter>=a.barycenter)&&function(a,b){var c=0,d=0;a.weight&&(c+=a.barycenter*a.weight,d+=a.weight),b.weight&&(c+=b.barycenter*b.weight,d+=b.weight),a.vs=b.vs.concat(a.vs),a.barycenter=c/d,a.weight=d,a.i=Math.min(b.i,a.i),b.merged=!0}(a,b)}}(c)),g.A(c.out,function(b){return function(c){c.in.push(b),0==--c.indegree&&a.push(c)}}(c))}return n.A(bf.A(b,function(a){return!a.merged}),function(a){return aA(a,["vs","i","barycenter","weight"])})}(bf.A(h,function(a){return!a.indegree})));!function(a,b){g.A(a,function(a){a.vs=m(a.vs.map(function(a){return b[a]?b[a].vs:a}))})}(A,y);var B=(l=(i=function(a){return Object.prototype.hasOwnProperty.call(a,"barycenter")},j={lhs:[],rhs:[]},g.A(A,function(a){i(a)?j.lhs.push(a):j.rhs.push(a)}),k=j).lhs,o=bP(k.rhs,function(a){return-a.i}),p=[],q=0,r=0,s=0,l.sort(function(a){return function(b,c){return b.barycenter<c.barycenter?-1:b.barycenter>c.barycenter?1:a?c.i-b.i:b.i-c.i}}(!!e)),s=bQ(p,o,s),g.A(l,function(a){s+=a.vs.length,p.push(a.vs),q+=a.barycenter*a.weight,r+=a.weight,s=bQ(p,o,s)}),t={vs:m(p)},r&&(t.barycenter=q/r,t.weight=r),t);if(w&&(B.vs=m([w,B.vs,x]),b.predecessors(w).length)){var C=b.node(b.predecessors(w)[0]),D=b.node(b.predecessors(x)[0]);Object.prototype.hasOwnProperty.call(B,"barycenter")||(B.barycenter=0,B.weight=0),B.barycenter=(B.barycenter*B.weight+C.order+D.order)/(B.weight+2),B.weight+=2}return B}(a,h,c,b);g.A(i.vs,function(b,c){a.node(b).order=c}),d=i.vs,f={},g.A(d,function(b){for(var d,g,h=a.parent(b);h;){if((d=a.parent(h))?(g=f[d],f[d]=h):(g=e,e=h),g&&g!==h)return void c.setEdge(g,h);h=d}})})})(p%2?c:d,p%4>=2),e=aY(a);var r,s=function(a,b){for(var c=0,d=1;d<b.length;++d)c+=function(a,b,c){for(var d=bH(c||[],n.A(c,function(a,b){return b})||[],as.A),e=m(n.A(b,function(b){return bP(n.A(a.outEdges(b),function(b){return{pos:d[b.w],weight:a.edge(b).weight}}),"pos")})),f=1;f<c.length;)f<<=1;var h=2*f-1;f-=1;var i=n.A(Array(h),function(){return 0}),j=0;return g.A(e.forEach(function(a){var b=a.pos+f;i[b]+=a.weight;for(var c=0;b>0;)b%2&&(c+=i[b+1]),b=b-1>>1,i[b]+=a.weight;j+=a.weight*c})),j}(a,b[d-1],b[d]);return c}(a,e);s<o&&(q=0,r=e,l=(0,bG.A)(r,5),o=s)}bS(a,l)})(a)),d(" insertSelfEdges",()=>{var b,c;return c=aY(b=a),void g.A(c,function(a){var c=0;g.A(a,function(a,d){var e=b.node(a);e.order=d+c,g.A(e.selfEdges,function(a){aV(b,"selfedge",{width:a.label.width,height:a.label.height,rank:e.rank,order:d+ ++c,e:a.e,label:a.label},"_se")}),delete e.selfEdges})})}),d(" adjustCoordinateSystem",()=>{var b;("lr"===(b=a.graph().rankdir.toLowerCase())||"rl"===b)&&a2(a)}),d(" position",()=>{var b,c,d,e,f,h,i,j,k,l,m,o,p,q,r,s,t;r=aY(q=b=aW(b=a)),s=q.graph().ranksep,t=0,g.A(r,function(a){var b=aH(n.A(a,function(a){return q.node(a).height}));g.A(a,function(a){q.node(a).y=t+b/2}),t+=b+s}),e=aY(c=b),h=aq((f={},bF.A(e,function(a,b){var d=0,e=0,h=a.length,i=aI(b);return g.A(b,function(a,j){var k=function(a,b){if(a.node(b).dummy)return be(a.predecessors(b),function(b){return a.node(b).dummy})}(c,a),l=k?c.node(k).order:h;(k||a===i)&&(g.A(b.slice(e,j+1),function(a){g.A(c.predecessors(a),function(b){var e=c.node(b),g=e.order;(g<d||l<g)&&!(e.dummy&&c.node(a).dummy)&&bU(f,b,a)})}),e=j+1,d=l)}),b}),f),function(a,b){var c={};function d(b,d,e,f,h){var i;g.A(I(d,e),function(d){i=b[d],a.node(i).dummy&&g.A(a.predecessors(i),function(b){var d=a.node(b);d.dummy&&(d.order<f||d.order>h)&&bU(c,b,i)})})}return bF.A(b,function(b,c){var e,f=-1,h=0;return g.A(c,function(g,i){if("border"===a.node(g).dummy){var j=a.predecessors(g);j.length&&(e=a.node(j[0]).order,d(c,h,i,f,e),h=i,f=e)}d(c,h,c.length,e,b.length)}),c}),c}(c,e)),i={},g.A(["u","d"],function(a){d="u"===a?e:bE.A(e).reverse(),g.A(["l","r"],function(b){"r"===b&&(d=n.A(d,function(a){return bE.A(a).reverse()}));var e,f,j,k,l=("u"===a?c.predecessors:c.successors).bind(c),m=(e=d,f={},j={},k={},g.A(e,function(a){g.A(a,function(a,b){f[a]=a,j[a]=a,k[a]=b})}),g.A(e,function(a){var b=-1;g.A(a,function(a){var c=l(a);if(c.length)for(var d=((c=bP(c,function(a){return k[a]})).length-1)/2,e=Math.floor(d),g=Math.ceil(d);e<=g;++e){var i=c[e];j[a]===a&&b<k[i]&&!function(a,b,c){if(b>c){var d=b;b=c,c=d}return!!a[b]&&Object.prototype.hasOwnProperty.call(a[b],c)}(h,a,i)&&(j[i]=a,j[a]=f[a]=f[i],b=k[i])}})}),{root:f,align:j}),o=function(a,b,c,d,e){var f,h,i,j,k,l,m,n,o,p,q={},r=(f=a,h=b,i=c,j=e,n=new J.T,p=(k=(o=f.graph()).nodesep,l=o.edgesep,m=j,function(a,b,c){var d,e,f=a.node(b),g=a.node(c);if(d=0+f.width/2,Object.prototype.hasOwnProperty.call(f,"labelpos"))switch(f.labelpos.toLowerCase()){case"l":e=-f.width/2;break;case"r":e=f.width/2}if(e&&(d+=m?e:-e),e=0,d+=(f.dummy?l:k)/2,d+=(g.dummy?l:k)/2,d+=g.width/2,Object.prototype.hasOwnProperty.call(g,"labelpos"))switch(g.labelpos.toLowerCase()){case"l":e=g.width/2;break;case"r":e=-g.width/2}return e&&(d+=m?e:-e),e=0,d}),g.A(h,function(a){var b;g.A(a,function(a){var c=i[a];if(n.setNode(c),b){var d=i[b],e=n.edge(d,c);n.setEdge(d,c,Math.max(p(f,a,b),e||0))}b=a})}),n),s=e?"borderLeft":"borderRight";function t(a,b){for(var c=r.nodes(),d=c.pop(),e={};d;)e[d]?a(d):(e[d]=!0,c.push(d),c=c.concat(b(d))),d=c.pop()}return t(function(a){q[a]=r.inEdges(a).reduce(function(a,b){return Math.max(a,q[b.v]+r.edge(b))},0)},r.predecessors.bind(r)),t(function(b){var c=r.outEdges(b).reduce(function(a,b){return Math.min(a,q[b.w]-r.edge(b))},1/0),d=a.node(b);c!==1/0&&d.borderType!==s&&(q[b]=Math.max(q[b],c))},r.successors.bind(r)),g.A(d,function(a){q[a]=q[c[a]]}),q}(c,d,m.root,m.align,"r"===b);"r"===b&&(o=aL(o,function(a){return-a})),i[a+b]=o})}),j=a6(bE.A(i),function(a){var b,d=-1/0,e=1/0;return b=function(a,b){var f,g,h=(f=c,g=b,f.node(g).width/2);d=Math.max(a+h,d),e=Math.min(a-h,e)},null==a||(0,T.A)(a,(0,bT.A)(b),am.A),d-e}),l=aO(k=bE.A(j)),m=aH(k),g.A(["u","d"],function(a){g.A(["l","r"],function(b){var c,d=a+b,e=i[d];if(e!==j){var f=bE.A(e);(c="l"===b?l-aO(f):m-aH(f))&&(i[d]=aL(e,function(a){return a+c}))}})}),o=c.graph().align,p=aL(i.ul,function(a,b){if(o)return i[o.toLowerCase()][b];var c=bP(n.A(i,b));return(c[1]+c[2])/2}),p&&(0,aJ.A)(p,(0,bT.A)(function(a,c){b.node(c).x=a}))}),d(" positionSelfEdges",()=>{var b;return b=a,void g.A(b.nodes(),function(a){var c=b.node(a);if("selfedge"===c.dummy){var d=b.node(c.e.v),e=d.x+d.width/2,f=d.y,g=c.x-e,h=d.height/2;b.setEdge(c.e,c.label),b.removeNode(a),c.label.points=[{x:e+2*g/3,y:f-h},{x:e+5*g/6,y:f-h},{x:e+g,y:f},{x:e+5*g/6,y:f+h},{x:e+2*g/3,y:f+h}],c.label.x=c.x,c.label.y=c.y}})}),d(" removeBorderNodes",()=>{var b;return b=a,void(g.A(b.nodes(),function(a){if(b.children(a).length){var c=b.node(a),d=b.node(c.borderTop),e=b.node(c.borderBottom),f=b.node(aI(c.borderLeft)),g=b.node(aI(c.borderRight));c.width=Math.abs(g.x-f.x),c.height=Math.abs(e.y-d.y),c.x=f.x+c.width/2,c.y=d.y+c.height/2}}),g.A(b.nodes(),function(a){"border"===b.node(a).dummy&&b.removeNode(a)}))}),d(" normalize.undo",()=>{g.A(a.graph().dummyChains,function(b){var c,d=a.node(b),e=d.edgeLabel;for(a.setEdge(d.edgeObj,e);d.dummy;)c=a.successors(b)[0],a.removeNode(b),e.points.push({x:d.x,y:d.y}),"edge-label"===d.dummy&&(e.x=d.x,e.y=d.y,e.width=d.width,e.height=d.height),b=c,d=a.node(b)})}),d(" fixupEdgeLabelCoords",()=>{var b;return b=a,void g.A(b.edges(),function(a){var c=b.edge(a);if(Object.prototype.hasOwnProperty.call(c,"x"))switch(("l"===c.labelpos||"r"===c.labelpos)&&(c.width-=c.labeloffset),c.labelpos){case"l":c.x-=c.width/2+c.labeloffset;break;case"r":c.x+=c.width/2+c.labeloffset}})}),d(" undoCoordinateSystem",()=>{var b,c,d;("bt"===(b=a.graph().rankdir.toLowerCase())||"rl"===b)&&(c=a,g.A(c.nodes(),function(a){a4(c.node(a))}),g.A(c.edges(),function(a){var b=c.edge(a);g.A(b.points,a4),Object.prototype.hasOwnProperty.call(b,"y")&&a4(b)})),("lr"===b||"rl"===b)&&(d=a,g.A(d.nodes(),function(a){a5(d.node(a))}),g.A(d.edges(),function(a){var b=d.edge(a);g.A(b.points,a5),Object.prototype.hasOwnProperty.call(b,"x")&&a5(b)}),a2(a))}),d(" translateGraph",()=>(function(a){var b=1/0,c=0,d=1/0,e=0,f=a.graph(),h=f.marginx||0,i=f.marginy||0;function j(a){var f=a.x,g=a.y,h=a.width,i=a.height;b=Math.min(b,f-h/2),c=Math.max(c,f+h/2),d=Math.min(d,g-i/2),e=Math.max(e,g+i/2)}g.A(a.nodes(),function(b){j(a.node(b))}),g.A(a.edges(),function(b){var c=a.edge(b);Object.prototype.hasOwnProperty.call(c,"x")&&j(c)}),b-=h,d-=i,g.A(a.nodes(),function(c){var e=a.node(c);e.x-=b,e.y-=d}),g.A(a.edges(),function(c){var e=a.edge(c);g.A(e.points,function(a){a.x-=b,a.y-=d}),Object.prototype.hasOwnProperty.call(e,"x")&&(e.x-=b),Object.prototype.hasOwnProperty.call(e,"y")&&(e.y-=d)}),f.width=c-b+h,f.height=e-d+i})(a)),d(" assignNodeIntersects",()=>{var b;return b=a,void g.A(b.edges(),function(a){var c,d,e=b.edge(a),f=b.node(a.v),g=b.node(a.w);e.points?(c=e.points[0],d=e.points[e.points.length-1]):(e.points=[],c=g,d=f),e.points.unshift(aX(f,c)),e.points.push(aX(g,d))})}),d(" reversePoints",()=>{var b;return b=a,void g.A(b.edges(),function(a){var c=b.edge(a);c.reversed&&c.points.reverse()})}),d(" acyclic.undo",()=>{g.A(a.edges(),function(b){var c=a.edge(b);if(c.reversed){a.removeEdge(b);var d=c.forwardName;delete c.reversed,delete c.forwardName,a.setEdge(b.w,b.v,c,d)}})}))}),c(" updateInputGraph",()=>{var c,d;return c=a,d=b,void(g.A(c.nodes(),function(a){var b=c.node(a),e=d.node(a);b&&(b.x=e.x,b.y=e.y,d.children(a).length&&(b.width=e.width,b.height=e.height))}),g.A(c.edges(),function(a){var b=c.edge(a),e=d.edge(a);b.points=e.points,Object.prototype.hasOwnProperty.call(e,"x")&&(b.x=e.x,b.y=e.y)}),c.graph().width=d.graph().width,c.graph().height=d.graph().height)})})}var bW=["nodesep","edgesep","ranksep","marginx","marginy"],bX={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},bY=["acyclicer","ranker","rankdir","align"],bZ=["width","height"],b$={width:0,height:0},b_=["minlen","weight","width","height","labeloffset"],b0={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},b1=["labelpos"];function b2(a,b){return aL(aA(a,b),Number)}function b3(a){var b={};return g.A(a,function(a,c){b[c.toLowerCase()]=a}),b}},65977:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(18671),e=Object.create,f=function(){function a(){}return function(b){if(!(0,d.A)(b))return{};if(e)return e(b);a.prototype=b;var c=new a;return a.prototype=void 0,c}}(),g=c(91329),h=c(18765);let i=function(a){return"function"!=typeof a.constructor||(0,h.A)(a)?{}:f((0,g.A)(a))}},71734:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(11873);let e=function(a,b,c){"__proto__"==b&&d.A?(0,d.A)(a,b,{configurable:!0,enumerable:!0,value:c,writable:!0}):a[b]=c}},75530:(a,b,c)=>{c.d(b,{A:()=>d});let d=function(a,b){var c=-1,d=a.length;for(b||(b=Array(d));++c<d;)b[c]=a[c];return b}},87826:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(16730),e=c(93884);let f=function(a,b){var c=-1,f=(0,e.A)(a)?Array(a.length):[];return(0,d.A)(a,function(a,d,e){f[++c]=b(a,d,e)}),f}},91329:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(11017).A)(Object.getPrototypeOf,Object)}};
|
|
1
|
+
"use strict";exports.id=4980,exports.ids=[4980],exports.modules={17149:(a,b,c)=>{c.d(b,{A:()=>g});var d=c(71734),e=c(44878),f=Object.prototype.hasOwnProperty;let g=function(a,b,c){var g=a[b];f.call(a,b)&&(0,e.A)(g,c)&&(void 0!==c||b in a)||(0,d.A)(a,b,c)}},19089:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(17149),e=c(71734);let f=function(a,b,c,f){var g=!c;c||(c={});for(var h=-1,i=b.length;++h<i;){var j=b[h],k=f?f(c[j],a[j],j,c,a):void 0;void 0===k&&(k=a[j]),g?(0,e.A)(c,j,k):(0,d.A)(c,j,k)}return c}},30108:(a,b,c)=>{c.d(b,{A:()=>U});var d=c(41573),e=c(98007),f=c(17149),g=c(19089),h=c(45680),i=c(45092),j=c(44564),k=c(75530),l=c(48242),m=c(15078),n=c(91329),o=c(71963),p=Object.getOwnPropertySymbols?function(a){for(var b=[];a;)(0,m.A)(b,(0,l.A)(a)),a=(0,n.A)(a);return b}:o.A,q=c(73416),r=c(15357);let s=function(a){return(0,r.A)(a,i.A,p)};var t=c(91680),u=Object.prototype.hasOwnProperty;let v=function(a){var b=a.length,c=new a.constructor(b);return b&&"string"==typeof a[0]&&u.call(a,"index")&&(c.index=a.index,c.input=a.input),c};var w=c(42607);let x=function(a,b){var c=b?(0,w.A)(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)};var y=/\w*$/;let z=function(a){var b=new a.constructor(a.source,y.exec(a));return b.lastIndex=a.lastIndex,b};var A=c(85291),B=A.A?A.A.prototype:void 0,C=B?B.valueOf:void 0,D=c(43391);let E=function(a,b,c){var d=a.constructor;switch(b){case"[object ArrayBuffer]":return(0,w.A)(a);case"[object Boolean]":case"[object Date]":return new d(+a);case"[object DataView]":return x(a,c);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,D.A)(a,c);case"[object Map]":case"[object Set]":return new d;case"[object Number]":case"[object String]":return new d(a);case"[object RegExp]":return z(a);case"[object Symbol]":return C?Object(C.call(a)):{}}};var F=c(65977),G=c(4591),H=c(1443),I=c(93820),J=c(63095),K=c(77127),L=K.A&&K.A.isMap,M=L?(0,J.A)(L):function(a){return(0,I.A)(a)&&"[object Map]"==(0,t.A)(a)},N=c(18671),O=K.A&&K.A.isSet,P=O?(0,J.A)(O):function(a){return(0,I.A)(a)&&"[object Set]"==(0,t.A)(a)},Q="[object Arguments]",R="[object Function]",S="[object Object]",T={};T[Q]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[S]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[R]=T["[object WeakMap]"]=!1;let U=function a(b,c,m,n,o,r){var u,w=1&c,x=2&c,y=4&c;if(m&&(u=o?m(b,n,o,r):m(b)),void 0!==u)return u;if(!(0,N.A)(b))return b;var z=(0,G.A)(b);if(z){if(u=v(b),!w)return(0,k.A)(b,u)}else{var A,B,C,D,I=(0,t.A)(b),J=I==R||"[object GeneratorFunction]"==I;if((0,H.A)(b))return(0,j.A)(b,w);if(I==S||I==Q||J&&!o){if(u=x||J?{}:(0,F.A)(b),!w)return x?(B=(A=u)&&(0,g.A)(b,(0,i.A)(b),A),(0,g.A)(b,p(b),B)):(D=(C=u)&&(0,g.A)(b,(0,h.A)(b),C),(0,g.A)(b,(0,l.A)(b),D))}else{if(!T[I])return o?b:{};u=E(b,I,w)}}r||(r=new d.A);var K=r.get(b);if(K)return K;r.set(b,u),P(b)?b.forEach(function(d){u.add(a(d,c,m,d,b,r))}):M(b)&&b.forEach(function(d,e){u.set(e,a(d,c,m,e,b,r))});var L=y?x?s:q.A:x?i.A:h.A,O=z?void 0:L(b);return(0,e.A)(O||b,function(d,e){O&&(d=b[e=d]),(0,f.A)(u,e,a(d,c,m,e,b,r))}),u}},38368:(a,b,c)=>{c.d(b,{A:()=>h});var d=c(44090),e=c(78803),f=c(87826),g=c(4591);let h=function(a,b){return((0,g.A)(a)?d.A:f.A)(a,(0,e.A)(b,3))}},42607:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(12022);let e=function(a){var b=new a.constructor(a.byteLength);return new d.A(b).set(new d.A(a)),b}},43391:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(42607);let e=function(a,b){var c=b?(0,d.A)(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}},44564:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(18623),e="object"==typeof exports&&exports&&!exports.nodeType&&exports,f=e&&"object"==typeof module&&module&&!module.nodeType&&module,g=f&&f.exports===e?d.A.Buffer:void 0,h=g?g.allocUnsafe:void 0;let i=function(a,b){if(b)return a.slice();var c=a.length,d=h?h(c):new a.constructor(c);return a.copy(d),d}},45092:(a,b,c)=>{c.d(b,{A:()=>k});var d=c(79524),e=c(18671),f=c(18765);let g=function(a){var b=[];if(null!=a)for(var c in Object(a))b.push(c);return b};var h=Object.prototype.hasOwnProperty;let i=function(a){if(!(0,e.A)(a))return g(a);var b=(0,f.A)(a),c=[];for(var d in a)"constructor"==d&&(b||!h.call(a,d))||c.push(d);return c};var j=c(71503);let k=function(a){return(0,j.A)(a)?(0,d.A)(a,!0):i(a)}},64980:(a,b,c)=>{c.d(b,{Zp:()=>bV});var d,e,f,g=c(85992),h=c(17904),i=0;let j=function(a){var b=++i;return(0,h.A)(a)+b};var k=c(86060),l=c(78959);let m=function(a){return(null==a?0:a.length)?(0,l.A)(a,1):[]};var n=c(38368),o=Math.ceil,p=Math.max;let q=function(a,b,c,d){for(var e=-1,f=p(o((b-a)/(c||1)),0),g=Array(f);f--;)g[d?f:++e]=a,a+=c;return g};var r=c(44878),s=c(71503),t=c(29163),u=c(18671);let v=function(a,b,c){if(!(0,u.A)(c))return!1;var d=typeof b;return("number"==d?!!((0,s.A)(c)&&(0,t.A)(b,c.length)):"string"==d&&b in c)&&(0,r.A)(c[b],a)};var w=/\s/;let x=function(a){for(var b=a.length;b--&&w.test(a.charAt(b)););return b};var y=/^\s+/,z=c(86340),A=0/0,B=/^[-+]0x[0-9a-f]+$/i,C=/^0b[01]+$/i,D=/^0o[0-7]+$/i,E=parseInt;let F=function(a){if("number"==typeof a)return a;if((0,z.A)(a))return A;if((0,u.A)(a)){var b,c="function"==typeof a.valueOf?a.valueOf():a;a=(0,u.A)(c)?c+"":c}if("string"!=typeof a)return 0===a?a:+a;a=(b=a)?b.slice(0,x(b)+1).replace(y,""):b;var d=C.test(a);return d||D.test(a)?E(a.slice(2),d?2:8):B.test(a)?A:+a};var G=1/0;let H=function(a){return a?(a=F(a))===G||a===-G?(a<0?-1:1)*17976931348623157e292:a==a?a:0:0===a?a:0},I=function(a,b,c){return c&&"number"!=typeof c&&v(a,b,c)&&(b=c=void 0),a=H(a),void 0===b?(b=a,a=0):b=H(b),c=void 0===c?a<b?1:-1:H(c),q(a,b,c,void 0)};var J=c(74367);class K{constructor(){var a={};a._next=a._prev=a,this._sentinel=a}dequeue(){var a=this._sentinel,b=a._prev;if(b!==a)return L(b),b}enqueue(a){var b=this._sentinel;a._prev&&a._next&&L(a),a._next=b._next,b._next._prev=a,b._next=a,a._prev=b}toString(){for(var a=[],b=this._sentinel,c=b._prev;c!==b;)a.push(JSON.stringify(c,M)),c=c._prev;return"["+a.join(", ")+"]"}}function L(a){a._prev._next=a._next,a._next._prev=a._prev,delete a._next,delete a._prev}function M(a,b){if("_next"!==a&&"_prev"!==a)return b}var N=k.A(1);function O(a,b,c,d,e){var f=e?[]:void 0;return g.A(a.inEdges(d.v),function(d){var g=a.edge(d),h=a.node(d.v);e&&f.push({v:d.v,w:d.w}),h.out-=g,P(b,c,h)}),g.A(a.outEdges(d.v),function(d){var e=a.edge(d),f=d.w,g=a.node(f);g.in-=e,P(b,c,g)}),a.removeNode(d.v),f}function P(a,b,c){c.out?c.in?a[c.out-c.in+b].enqueue(c):a[a.length-1].enqueue(c):a[0].enqueue(c)}var Q=c(41573),R=c(71734);let S=function(a,b,c){(void 0===c||(0,r.A)(a[b],c))&&(void 0!==c||b in a)||(0,R.A)(a,b,c)};var T=c(78832),U=c(44564),V=c(43391),W=c(75530),X=c(65977),Y=c(73769),Z=c(4591),$=c(45015),_=c(1443),aa=c(10228),ab=c(64910),ac=c(91329),ad=c(93820),ae=Object.prototype,af=Function.prototype.toString,ag=ae.hasOwnProperty,ah=af.call(Object);let ai=function(a){if(!(0,ad.A)(a)||"[object Object]"!=(0,ab.A)(a))return!1;var b=(0,ac.A)(a);if(null===b)return!0;var c=ag.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&af.call(c)==ah};var aj=c(38426);let ak=function(a,b){if(("constructor"!==b||"function"!=typeof a[b])&&"__proto__"!=b)return a[b]};var al=c(19089),am=c(45092);let an=function(a,b,c,d,e,f,g){var h=ak(a,c),i=ak(b,c),j=g.get(i);if(j)return void S(a,c,j);var k=f?f(h,i,c+"",a,b,g):void 0,l=void 0===k;if(l){var m=(0,Z.A)(i),n=!m&&(0,_.A)(i),o=!m&&!n&&(0,aj.A)(i);(k=i,m||n||o)?(0,Z.A)(h)?k=h:(0,$.A)(h)?k=(0,W.A)(h):n?(l=!1,k=(0,U.A)(i,!0)):o?(l=!1,k=(0,V.A)(i,!0)):k=[]:ai(i)||(0,Y.A)(i)?(k=h,(0,Y.A)(h))?k=(0,al.A)(h,(0,am.A)(h)):(!(0,u.A)(h)||(0,aa.A)(h))&&(k=(0,X.A)(i)):l=!1}l&&(g.set(i,k),e(k,i,d,f,g),g.delete(i)),S(a,c,k)},ao=function a(b,c,d,e,f){b!==c&&(0,T.A)(c,function(g,h){if(f||(f=new Q.A),(0,u.A)(g))an(b,c,h,d,a,e,f);else{var i=e?e(ak(b,h),g,h+"",b,c,f):void 0;void 0===i&&(i=g),S(b,h,i)}},am.A)};var ap=c(9672),aq=(d=function(a,b,c){ao(a,b,c)},(0,ap.A)(function(a,b){var c=-1,e=b.length,f=e>1?b[e-1]:void 0,g=e>2?b[2]:void 0;for(f=d.length>3&&"function"==typeof f?(e--,f):void 0,g&&v(b[0],b[1],g)&&(f=e<3?void 0:f,e=1),a=Object(a);++c<e;){var h=b[c];h&&d(a,h,c,f)}return a})),ar=c(86296),as=c(17149),at=c(67285),au=c(47927);let av=function(a,b,c,d){if(!(0,u.A)(a))return a;b=(0,at.A)(b,a);for(var e=-1,f=b.length,g=f-1,h=a;null!=h&&++e<f;){var i=(0,au.A)(b[e]),j=c;if("__proto__"===i||"constructor"===i||"prototype"===i)break;if(e!=g){var k=h[i];void 0===(j=d?d(k,i,h):void 0)&&(j=(0,u.A)(k)?k:(0,t.A)(b[e+1])?[]:{})}(0,as.A)(h,i,j),h=h[i]}return a},aw=function(a,b,c){for(var d=-1,e=b.length,f={};++d<e;){var g=b[d],h=(0,ar.A)(a,g);c(h,g)&&av(f,(0,at.A)(g,a),h)}return f};var ax=c(67109),ay=c(50989),az=c(10874),aA=(e=function(a,b){return null==a?{}:aw(a,b,function(b,c){return(0,ax.A)(a,c)})},(0,az.A)((0,ay.A)(e,void 0,m),e+"")),aB=Object.prototype,aC=aB.hasOwnProperty,aD=(0,ap.A)(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:void 0;for(e&&v(b[0],b[1],e)&&(d=1);++c<d;)for(var f=b[c],g=(0,am.A)(f),h=-1,i=g.length;++h<i;){var j=g[h],k=a[j];(void 0===k||(0,r.A)(k,aB[j])&&!aC.call(a,j))&&(a[j]=f[j])}return a});let aE=function(a,b,c){for(var d=-1,e=a.length;++d<e;){var f=a[d],g=b(f);if(null!=g&&(void 0===h?g==g&&!(0,z.A)(g):c(g,h)))var h=g,i=f}return i},aF=function(a,b){return a>b};var aG=c(66994);let aH=function(a){return a&&a.length?aE(a,aG.A,aF):void 0},aI=function(a){var b=null==a?0:a.length;return b?a[b-1]:void 0};var aJ=c(62023),aK=c(78803);let aL=function(a,b){var c={};return b=(0,aK.A)(b,3),(0,aJ.A)(a,function(a,d,e){(0,R.A)(c,d,b(a,d,e))}),c};var aM=c(98122);let aN=function(a,b){return a<b},aO=function(a){return a&&a.length?aE(a,aG.A,aN):void 0};var aP=Object.prototype.hasOwnProperty;let aQ=function(a,b){return null!=a&&aP.call(a,b)};var aR=c(58560);let aS=function(a,b){return null!=a&&(0,aR.A)(a,b,aQ)};var aT=c(18623);let aU=function(){return aT.A.Date.now()};function aV(a,b,c,d){var e;do e=j(d);while(a.hasNode(e));return c.dummy=b,a.setNode(e,c),e}function aW(a){var b=new J.T({multigraph:a.isMultigraph()}).setGraph(a.graph());return g.A(a.nodes(),function(c){a.children(c).length||b.setNode(c,a.node(c))}),g.A(a.edges(),function(c){b.setEdge(c,a.edge(c))}),b}function aX(a,b){var c,d,e=a.x,f=a.y,g=b.x-e,h=b.y-f,i=a.width/2,j=a.height/2;if(!g&&!h)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(h)*i>Math.abs(g)*j?(h<0&&(j=-j),c=j*g/h,d=j):(g<0&&(i=-i),c=i,d=i*h/g),{x:e+c,y:f+d}}function aY(a){var b=n.A(I(a$(a)+1),function(){return[]});return g.A(a.nodes(),function(c){var d=a.node(c),e=d.rank;aM.A(e)||(b[e][d.order]=c)}),b}function aZ(a,b,c,d){var e={width:0,height:0};return arguments.length>=4&&(e.rank=c,e.order=d),aV(a,"border",e,b)}function a$(a){return aH(n.A(a.nodes(),function(b){var c=a.node(b).rank;if(!aM.A(c))return c}))}function a_(a,b){var c=aU();try{return b()}finally{console.log(a+" time: "+(aU()-c)+"ms")}}function a0(a,b){return b()}function a1(a,b,c,d,e,f){var g=e[b][f-1],h=aV(a,"border",{width:0,height:0,rank:f,borderType:b},c);e[b][f]=h,a.setParent(h,d),g&&a.setEdge(g,h,{weight:1})}function a2(a){g.A(a.nodes(),function(b){a3(a.node(b))}),g.A(a.edges(),function(b){a3(a.edge(b))})}function a3(a){var b=a.width;a.width=a.height,a.height=b}function a4(a){a.y=-a.y}function a5(a){var b=a.x;a.x=a.y,a.y=b}let a6=function(a,b){return a&&a.length?aE(a,(0,aK.A)(b,2),aN):void 0};function a7(a){var b={};g.A(a.sources(),function c(d){var e=a.node(d);if(Object.prototype.hasOwnProperty.call(b,d))return e.rank;b[d]=!0;var f=aO(n.A(a.outEdges(d),function(b){return c(b.w)-a.edge(b).minlen}));return(f===1/0||null==f)&&(f=0),e.rank=f})}function a8(a,b){return a.node(b.w).rank-a.node(b.v).rank-a.edge(b).minlen}function a9(a){var b,c,d,e,f=new J.T({directed:!1}),h=a.nodes()[0],i=a.nodeCount();for(f.setNode(h,{});b=f,c=a,g.A(b.nodes(),function a(d){g.A(c.nodeEdges(d),function(e){var f=e.v,g=d===f?e.w:f;b.hasNode(g)||a8(c,e)||(b.setNode(g,{}),b.setEdge(d,g,{}),a(g))})}),b.nodeCount()<i;)d=function(a,b){return a6(b.edges(),function(c){if(a.hasNode(c.v)!==a.hasNode(c.w))return a8(b,c)})}(f,a),e=f.hasNode(d.v)?a8(a,d):-a8(a,d),function(a,b,c){g.A(a.nodes(),function(a){b.node(a).rank+=c})}(f,a,e);return f}var ba=c(45680),bb=c(67853);let bc=function(a){var b=H(a),c=b%1;return b==b?c?b-c:b:0};var bd=Math.max,be=(f=function(a,b,c){var d=null==a?0:a.length;if(!d)return -1;var e=null==c?0:bc(c);return e<0&&(e=bd(d+e,0)),(0,bb.A)(a,(0,aK.A)(b,3),e)},function(a,b,c){var d=Object(a);if(!(0,s.A)(a)){var e=(0,aK.A)(b,3);a=(0,ba.A)(a),b=function(a){return e(d[a],a,d)}}var g=f(a,b,c);return g>-1?d[e?a[g]:g]:void 0}),bf=c(58617);k.A(1),k.A(1);var bg=c(61137),bh=c(91680),bi=(0,c(19919).A)("length"),bj=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),bk="\\ud800-\\udfff",bl="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",bm="\\ud83c[\\udffb-\\udfff]",bn="[^"+bk+"]",bo="(?:\\ud83c[\\udde6-\\uddff]){2}",bp="[\\ud800-\\udbff][\\udc00-\\udfff]",bq="(?:"+bl+"|"+bm+")?",br="[\\ufe0e\\ufe0f]?",bs="(?:\\u200d(?:"+[bn,bo,bp].join("|")+")"+br+bq+")*",bt=RegExp(bm+"(?="+bm+")|"+("(?:"+[bn+bl+"?",bl,bo,bp,"["+bk+"]"].join("|"))+")"+(br+bq+bs),"g");function bu(){}function bv(a,b,c){Z.A(b)||(b=[b]);var d=(a.isDirected()?a.successors:a.neighbors).bind(a),e=[],f={};return g.A(b,function(b){if(!a.hasNode(b))throw Error("Graph does not have node: "+b);!function a(b,c,d,e,f,h){!Object.prototype.hasOwnProperty.call(e,c)&&(e[c]=!0,d||h.push(c),g.A(f(c),function(c){a(b,c,d,e,f,h)}),d&&h.push(c))}(a,b,"post"===c,f,d,e)}),e}function bw(a){b=a,c=new J.T().setGraph(b.graph()),g.A(b.nodes(),function(a){c.setNode(a,b.node(a))}),g.A(b.edges(),function(a){var d=c.edge(a.v,a.w)||{weight:0,minlen:1},e=b.edge(a);c.setEdge(a.v,a.w,{weight:d.weight+e.weight,minlen:Math.max(d.minlen,e.minlen)})}),a7(a=c);var b,c,d,e,f=a9(a);for(bz(f),bx(f,a);d=bA(f);)e=bB(f,a,d),bC(f,a,d,e)}function bx(a,b){var c=bv(a,a.nodes(),"post");c=c.slice(0,c.length-1),g.A(c,function(c){var d,e,f,g;d=a,e=b,f=c,g=d.node(f).parent,d.edge(f,g).cutvalue=by(d,e,f)})}function by(a,b,c){var d=a.node(c).parent,e=!0,f=b.edge(c,d),h=0;return f||(e=!1,f=b.edge(d,c)),h=f.weight,g.A(b.nodeEdges(c),function(f){var g=f.v===c,i=g?f.w:f.v;if(i!==d){var j,k,l,m=g===e,n=b.edge(f).weight;if(h+=m?n:-n,j=a,k=c,l=i,j.hasEdge(k,l)){var o=a.edge(c,i).cutvalue;h+=m?-o:o}}}),h}function bz(a,b){arguments.length<2&&(b=a.nodes()[0]),function a(b,c,d,e,f){var h=d,i=b.node(e);return c[e]=!0,g.A(b.neighbors(e),function(f){Object.prototype.hasOwnProperty.call(c,f)||(d=a(b,c,d,f,e))}),i.low=h,i.lim=d++,f?i.parent=f:delete i.parent,d}(a,{},1,b)}function bA(a){return be(a.edges(),function(b){return a.edge(b).cutvalue<0})}function bB(a,b,c){var d=c.v,e=c.w;b.hasEdge(d,e)||(d=c.w,e=c.v);var f=a.node(d),g=a.node(e),h=f,i=!1;return f.lim>g.lim&&(h=g,i=!0),a6(bf.A(b.edges(),function(b){return i===bD(a,a.node(b.v),h)&&i!==bD(a,a.node(b.w),h)}),function(a){return a8(b,a)})}function bC(a,b,c,d){var e,f,h,i,j=c.v,k=c.w;a.removeEdge(j,k),a.setEdge(d.v,d.w,{}),bz(a),bx(a,b),e=a,f=b,h=be(e.nodes(),function(a){return!f.node(a).parent}),i=(i=bv(e,h,"pre")).slice(1),g.A(i,function(a){var b=e.node(a).parent,c=f.edge(a,b),d=!1;c||(c=f.edge(b,a),d=!0),f.node(a).rank=f.node(b).rank+(d?c.minlen:-c.minlen)})}function bD(a,b,c){return c.low<=b.lim&&b.lim<=c.lim}bu.prototype=Error(),c(33456),bw.initLowLimValues=bz,bw.initCutValues=bx,bw.calcCutValue=by,bw.leaveEdge=bA,bw.enterEdge=bB,bw.exchangeEdges=bC;var bE=c(21152),bF=c(46171),bG=c(30108);let bH=function(a,b,c){for(var d=-1,e=a.length,f=b.length,g={};++d<e;){var h=d<f?b[d]:void 0;c(g,a[d],h)}return g};var bI=c(44090),bJ=c(87826);let bK=function(a,b){var c=a.length;for(a.sort(b);c--;)a[c]=a[c].value;return a};var bL=c(63095);let bM=function(a,b){if(a!==b){var c=void 0!==a,d=null===a,e=a==a,f=(0,z.A)(a),g=void 0!==b,h=null===b,i=b==b,j=(0,z.A)(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a<b||j&&c&&e&&!d&&!f||h&&c&&e||!g&&e||!i)return -1}return 0},bN=function(a,b,c){for(var d=-1,e=a.criteria,f=b.criteria,g=e.length,h=c.length;++d<g;){var i=bM(e[d],f[d]);if(i){if(d>=h)return i;return i*("desc"==c[d]?-1:1)}}return a.index-b.index},bO=function(a,b,c){b=b.length?(0,bI.A)(b,function(a){return(0,Z.A)(a)?function(b){return(0,ar.A)(b,1===a.length?a[0]:a)}:a}):[aG.A];var d=-1;return b=(0,bI.A)(b,(0,bL.A)(aK.A)),bK((0,bJ.A)(a,function(a,c,e){return{criteria:(0,bI.A)(b,function(b){return b(a)}),index:++d,value:a}}),function(a,b){return bN(a,b,c)})};var bP=(0,ap.A)(function(a,b){if(null==a)return[];var c=b.length;return c>1&&v(a,b[0],b[1])?b=[]:c>2&&v(b[0],b[1],b[2])&&(b=[b[0]]),bO(a,(0,l.A)(b,1),[])});function bQ(a,b,c){for(var d;b.length&&(d=aI(b)).i<=c;)b.pop(),a.push(d.vs),c++;return c}function bR(a,b,c){return n.A(b,function(b){var d,e;return d=function(a){for(var b;a.hasNode(b=j("_root")););return b}(a),e=new J.T({compound:!0}).setGraph({root:d}).setDefaultNodeLabel(function(b){return a.node(b)}),g.A(a.nodes(),function(f){var h=a.node(f),i=a.parent(f);(h.rank===b||h.minRank<=b&&b<=h.maxRank)&&(e.setNode(f),e.setParent(f,i||d),g.A(a[c](f),function(b){var c=b.v===f?b.w:b.v,d=e.edge(c,f),g=aM.A(d)?0:d.weight;e.setEdge(c,f,{weight:a.edge(b).weight+g})}),Object.prototype.hasOwnProperty.call(h,"minRank")&&e.setNode(f,{borderLeft:h.borderLeft[b],borderRight:h.borderRight[b]}))}),e})}function bS(a,b){g.A(b,function(b){g.A(b,function(b,c){a.node(b).order=c})})}var bT=c(62320);function bU(a,b,c){if(b>c){var d=b;b=c,c=d}Object.prototype.hasOwnProperty.call(a,b)||Object.defineProperty(a,b,{enumerable:!0,configurable:!0,value:{},writable:!0}),Object.defineProperty(a[b],c,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function bV(a,b){var c=b&&b.debugTiming?a_:a0;c("layout",()=>{var b=c(" buildLayoutGraph",()=>{var b,c,d;return b=a,c=new J.T({multigraph:!0,compound:!0}),d=b3(b.graph()),c.setGraph(aq({},bX,b2(d,bW),aA(d,bY))),g.A(b.nodes(),function(a){var d=b3(b.node(a));c.setNode(a,aD(b2(d,bZ),b$)),c.setParent(a,b.parent(a))}),g.A(b.edges(),function(a){var d=b3(b.edge(a));c.setEdge(a,aq({},b0,b2(d,b_),aA(d,b1)))}),c});c(" runLayout",()=>{var a,d;return a=b,void((d=c)(" makeSpaceForEdgeLabels",()=>{var b,c;return c=(b=a).graph(),void(c.ranksep/=2,g.A(b.edges(),function(a){var d=b.edge(a);d.minlen*=2,"c"!==d.labelpos.toLowerCase()&&("TB"===c.rankdir||"BT"===c.rankdir?d.width+=d.labeloffset:d.height+=d.labeloffset)}))}),d(" removeSelfEdges",()=>{var b;return b=a,void g.A(b.edges(),function(a){if(a.v===a.w){var c=b.node(a.v);c.selfEdges||(c.selfEdges=[]),c.selfEdges.push({e:a,label:b.edge(a)}),b.removeEdge(a)}})}),d(" acyclic",()=>{var b,c,d,e,f,h;return b="greedy"===a.graph().acyclicer?function(a,b){if(1>=a.nodeCount())return[];var c,d,e,f,h,i,j,k=(c=a,d=b||N,e=new J.T,f=0,h=0,g.A(c.nodes(),function(a){e.setNode(a,{v:a,in:0,out:0})}),g.A(c.edges(),function(a){var b=e.edge(a.v,a.w)||0,c=d(a);e.setEdge(a.v,a.w,b+c),h=Math.max(h,e.node(a.v).out+=c),f=Math.max(f,e.node(a.w).in+=c)}),i=I(h+f+3).map(function(){return new K}),j=f+1,g.A(e.nodes(),function(a){P(i,j,e.node(a))}),{graph:e,buckets:i,zeroIdx:j}),l=function(a,b,c){for(var d,e=[],f=b[b.length-1],g=b[0];a.nodeCount();){for(;d=g.dequeue();)O(a,b,c,d);for(;d=f.dequeue();)O(a,b,c,d);if(a.nodeCount()){for(var h=b.length-2;h>0;--h)if(d=b[h].dequeue()){e=e.concat(O(a,b,c,d,!0));break}}}return e}(k.graph,k.buckets,k.zeroIdx);return m(n.A(l,function(b){return a.outEdges(b.v,b.w)}))}(a,(c=a,function(a){return c.edge(a).weight})):(d=a,e=[],f={},h={},g.A(d.nodes(),function a(b){Object.prototype.hasOwnProperty.call(h,b)||(h[b]=!0,f[b]=!0,g.A(d.outEdges(b),function(b){Object.prototype.hasOwnProperty.call(f,b.w)?e.push(b):a(b.w)}),delete f[b])}),e),void g.A(b,function(b){var c=a.edge(b);a.removeEdge(b),c.forwardName=b.name,c.reversed=!0,a.setEdge(b.w,b.v,c,j("rev"))})}),d(" nestingGraph.run",()=>{var b,c,d,e,f,h,i,j;return b=aV(a,"root",{},"_root"),h=a,i={},g.A(h.children(),function(a){!function a(b,c){var d=h.children(b);d&&d.length&&g.A(d,function(b){a(b,c+1)}),i[b]=c}(a,1)}),c=i,e=2*(d=aH(bE.A(c))-1)+1,a.graph().nestingRoot=b,g.A(a.edges(),function(b){a.edge(b).minlen*=e}),f=(j=a,bF.A(j.edges(),function(a,b){return a+j.edge(b).weight},0)+1),void(g.A(a.children(),function(h){!function a(b,c,d,e,f,h,i){var j=b.children(i);if(!j.length){i!==c&&b.setEdge(c,i,{weight:0,minlen:d});return}var k=aZ(b,"_bt"),l=aZ(b,"_bb"),m=b.node(i);b.setParent(k,i),m.borderTop=k,b.setParent(l,i),m.borderBottom=l,g.A(j,function(g){a(b,c,d,e,f,h,g);var j=b.node(g),m=j.borderTop?j.borderTop:g,n=j.borderBottom?j.borderBottom:g,o=j.borderTop?e:2*e,p=m!==n?1:f-h[i]+1;b.setEdge(k,m,{weight:o,minlen:p,nestingEdge:!0}),b.setEdge(n,l,{weight:o,minlen:p,nestingEdge:!0})}),b.parent(i)||b.setEdge(c,k,{weight:0,minlen:f+h[i]})}(a,b,e,f,d,c,h)}),a.graph().nodeRankFactor=e)}),d(" rank",()=>(function(a){switch(a.graph().ranker){case"network-simplex":default:bw(a);break;case"tight-tree":var b;a7(b=a),a9(b);break;case"longest-path":a7(a)}})(aW(a))),d(" injectEdgeLabelProxies",()=>{var b;return b=a,void g.A(b.edges(),function(a){var c=b.edge(a);if(c.width&&c.height){var d=b.node(a.v),e={rank:(b.node(a.w).rank-d.rank)/2+d.rank,e:a};aV(b,"edge-proxy",e,"_ep")}})}),d(" removeEmptyRanks",()=>{var b,c,d,e;return b=aO(n.A(a.nodes(),function(b){return a.node(b).rank})),c=[],g.A(a.nodes(),function(d){var e=a.node(d).rank-b;c[e]||(c[e]=[]),c[e].push(d)}),d=0,e=a.graph().nodeRankFactor,void g.A(c,function(b,c){aM.A(b)&&c%e!=0?--d:d&&g.A(b,function(b){a.node(b).rank+=d})})}),d(" nestingGraph.cleanup",()=>{var b;return b=a.graph(),void(a.removeNode(b.nestingRoot),delete b.nestingRoot,g.A(a.edges(),function(b){a.edge(b).nestingEdge&&a.removeEdge(b)}))}),d(" normalizeRanks",()=>{var b;return b=aO(n.A(a.nodes(),function(b){return a.node(b).rank})),void g.A(a.nodes(),function(c){var d=a.node(c);aS(d,"rank")&&(d.rank-=b)})}),d(" assignRankMinMax",()=>{var b,c;return b=a,c=0,void(g.A(b.nodes(),function(a){var d=b.node(a);d.borderTop&&(d.minRank=b.node(d.borderTop).rank,d.maxRank=b.node(d.borderBottom).rank,c=aH(c,d.maxRank))}),b.graph().maxRank=c)}),d(" removeEdgeLabelProxies",()=>{var b;return b=a,void g.A(b.nodes(),function(a){var c=b.node(a);"edge-proxy"===c.dummy&&(b.edge(c.e).labelRank=c.rank,b.removeNode(a))})}),d(" normalize.run",()=>{a.graph().dummyChains=[],g.A(a.edges(),function(b){!function(a,b){var c,d,e=b.v,f=a.node(e).rank,g=b.w,h=a.node(g).rank,i=b.name,j=a.edge(b),k=j.labelRank;if(h!==f+1){a.removeEdge(b);var l=void 0;for(d=0,++f;f<h;++d,++f)j.points=[],c=aV(a,"edge",l={width:0,height:0,edgeLabel:j,edgeObj:b,rank:f},"_d"),f===k&&(l.width=j.width,l.height=j.height,l.dummy="edge-label",l.labelpos=j.labelpos),a.setEdge(e,c,{weight:j.weight},i),0===d&&a.graph().dummyChains.push(c),e=c;a.setEdge(e,g,{weight:j.weight},i)}}(a,b)})}),d(" parentDummyChains",()=>{var b,c,d,e;return c=a,d={},e=0,g.A(c.children(),function a(b){var f=e;g.A(c.children(b),a),d[b]={low:f,lim:e++}}),b=d,void g.A(a.graph().dummyChains,function(c){for(var d=a.node(c),e=d.edgeObj,f=function(a,b,c,d){var e,f,g=[],h=[],i=Math.min(b[c].low,b[d].low),j=Math.max(b[c].lim,b[d].lim);e=c;do g.push(e=a.parent(e));while(e&&(b[e].low>i||j>b[e].lim));for(f=e,e=d;(e=a.parent(e))!==f;)h.push(e);return{path:g.concat(h.reverse()),lca:f}}(a,b,e.v,e.w),g=f.path,h=f.lca,i=0,j=g[0],k=!0;c!==e.w;){if(d=a.node(c),k){for(;(j=g[i])!==h&&a.node(j).maxRank<d.rank;)i++;j===h&&(k=!1)}if(!k){for(;i<g.length-1&&a.node(j=g[i+1]).minRank<=d.rank;)i++;j=g[i]}a.setParent(c,j),c=a.successors(c)[0]}})}),d(" addBorderSegments",()=>{g.A(a.children(),function b(c){var d=a.children(c),e=a.node(c);if(d.length&&g.A(d,b),Object.prototype.hasOwnProperty.call(e,"minRank")){e.borderLeft=[],e.borderRight=[];for(var f=e.minRank,h=e.maxRank+1;f<h;++f)a1(a,"borderLeft","_bl",c,e,f),a1(a,"borderRight","_br",c,e,f)}})}),d(" order",()=>(function(a){var b=a$(a),c=bR(a,I(1,b+1),"inEdges"),d=bR(a,I(b-1,-1,-1),"outEdges"),e=(f={},h=bf.A(a.nodes(),function(b){return!a.children(b).length}),i=aH(n.A(h,function(b){return a.node(b).rank})),j=n.A(I(i+1),function(){return[]}),k=bP(h,function(b){return a.node(b).rank}),g.A(k,function b(c){aS(f,c)||(f[c]=!0,j[a.node(c).rank].push(c),g.A(a.successors(c),b))}),j);bS(a,e);for(var f,h,i,j,k,l,o=1/0,p=0,q=0;q<4;++p,++q){(function(a,b){var c=new J.T;g.A(a,function(a){var d,e,f,h=a.graph().root,i=function a(b,c,d,e){var f,h,i,j,k,l,o,p,q,r,s,t,u=b.children(c),v=b.node(c),w=v?v.borderLeft:void 0,x=v?v.borderRight:void 0,y={};w&&(u=bf.A(u,function(a){return a!==w&&a!==x}));var z=(f=u,n.A(f,function(a){var c=b.inEdges(a);if(!c.length)return{v:a};var d=bF.A(c,function(a,c){var d=b.edge(c),e=b.node(c.v);return{sum:a.sum+d.weight*e.order,weight:a.weight+d.weight}},{sum:0,weight:0});return{v:a,barycenter:d.sum/d.weight,weight:d.weight}}));g.A(z,function(c){if(b.children(c.v).length){var f,g,h=a(b,c.v,d,e);y[c.v]=h,Object.prototype.hasOwnProperty.call(h,"barycenter")&&(f=c,g=h,aM.A(f.barycenter)?(f.barycenter=g.barycenter,f.weight=g.weight):(f.barycenter=(f.barycenter*f.weight+g.barycenter*g.weight)/(f.weight+g.weight),f.weight+=g.weight))}});var A=(h={},g.A(z,function(a,b){var c=h[a.v]={indegree:0,in:[],out:[],vs:[a.v],i:b};aM.A(a.barycenter)||(c.barycenter=a.barycenter,c.weight=a.weight)}),g.A(d.edges(),function(a){var b=h[a.v],c=h[a.w];aM.A(b)||aM.A(c)||(c.indegree++,b.out.push(h[a.w]))}),function(a){for(var b=[];a.length;){var c=a.pop();b.push(c),g.A(c.in.reverse(),function(a){return function(b){!b.merged&&(aM.A(b.barycenter)||aM.A(a.barycenter)||b.barycenter>=a.barycenter)&&function(a,b){var c=0,d=0;a.weight&&(c+=a.barycenter*a.weight,d+=a.weight),b.weight&&(c+=b.barycenter*b.weight,d+=b.weight),a.vs=b.vs.concat(a.vs),a.barycenter=c/d,a.weight=d,a.i=Math.min(b.i,a.i),b.merged=!0}(a,b)}}(c)),g.A(c.out,function(b){return function(c){c.in.push(b),0==--c.indegree&&a.push(c)}}(c))}return n.A(bf.A(b,function(a){return!a.merged}),function(a){return aA(a,["vs","i","barycenter","weight"])})}(bf.A(h,function(a){return!a.indegree})));!function(a,b){g.A(a,function(a){a.vs=m(a.vs.map(function(a){return b[a]?b[a].vs:a}))})}(A,y);var B=(l=(i=function(a){return Object.prototype.hasOwnProperty.call(a,"barycenter")},j={lhs:[],rhs:[]},g.A(A,function(a){i(a)?j.lhs.push(a):j.rhs.push(a)}),k=j).lhs,o=bP(k.rhs,function(a){return-a.i}),p=[],q=0,r=0,s=0,l.sort(function(a){return function(b,c){return b.barycenter<c.barycenter?-1:b.barycenter>c.barycenter?1:a?c.i-b.i:b.i-c.i}}(!!e)),s=bQ(p,o,s),g.A(l,function(a){s+=a.vs.length,p.push(a.vs),q+=a.barycenter*a.weight,r+=a.weight,s=bQ(p,o,s)}),t={vs:m(p)},r&&(t.barycenter=q/r,t.weight=r),t);if(w&&(B.vs=m([w,B.vs,x]),b.predecessors(w).length)){var C=b.node(b.predecessors(w)[0]),D=b.node(b.predecessors(x)[0]);Object.prototype.hasOwnProperty.call(B,"barycenter")||(B.barycenter=0,B.weight=0),B.barycenter=(B.barycenter*B.weight+C.order+D.order)/(B.weight+2),B.weight+=2}return B}(a,h,c,b);g.A(i.vs,function(b,c){a.node(b).order=c}),d=i.vs,f={},g.A(d,function(b){for(var d,g,h=a.parent(b);h;){if((d=a.parent(h))?(g=f[d],f[d]=h):(g=e,e=h),g&&g!==h)return void c.setEdge(g,h);h=d}})})})(p%2?c:d,p%4>=2),e=aY(a);var r,s=function(a,b){for(var c=0,d=1;d<b.length;++d)c+=function(a,b,c){for(var d=bH(c||[],n.A(c,function(a,b){return b})||[],as.A),e=m(n.A(b,function(b){return bP(n.A(a.outEdges(b),function(b){return{pos:d[b.w],weight:a.edge(b).weight}}),"pos")})),f=1;f<c.length;)f<<=1;var h=2*f-1;f-=1;var i=n.A(Array(h),function(){return 0}),j=0;return g.A(e.forEach(function(a){var b=a.pos+f;i[b]+=a.weight;for(var c=0;b>0;)b%2&&(c+=i[b+1]),b=b-1>>1,i[b]+=a.weight;j+=a.weight*c})),j}(a,b[d-1],b[d]);return c}(a,e);s<o&&(q=0,r=e,l=(0,bG.A)(r,5),o=s)}bS(a,l)})(a)),d(" insertSelfEdges",()=>{var b,c;return c=aY(b=a),void g.A(c,function(a){var c=0;g.A(a,function(a,d){var e=b.node(a);e.order=d+c,g.A(e.selfEdges,function(a){aV(b,"selfedge",{width:a.label.width,height:a.label.height,rank:e.rank,order:d+ ++c,e:a.e,label:a.label},"_se")}),delete e.selfEdges})})}),d(" adjustCoordinateSystem",()=>{var b;("lr"===(b=a.graph().rankdir.toLowerCase())||"rl"===b)&&a2(a)}),d(" position",()=>{var b,c,d,e,f,h,i,j,k,l,m,o,p,q,r,s,t;r=aY(q=b=aW(b=a)),s=q.graph().ranksep,t=0,g.A(r,function(a){var b=aH(n.A(a,function(a){return q.node(a).height}));g.A(a,function(a){q.node(a).y=t+b/2}),t+=b+s}),e=aY(c=b),h=aq((f={},bF.A(e,function(a,b){var d=0,e=0,h=a.length,i=aI(b);return g.A(b,function(a,j){var k=function(a,b){if(a.node(b).dummy)return be(a.predecessors(b),function(b){return a.node(b).dummy})}(c,a),l=k?c.node(k).order:h;(k||a===i)&&(g.A(b.slice(e,j+1),function(a){g.A(c.predecessors(a),function(b){var e=c.node(b),g=e.order;(g<d||l<g)&&!(e.dummy&&c.node(a).dummy)&&bU(f,b,a)})}),e=j+1,d=l)}),b}),f),function(a,b){var c={};function d(b,d,e,f,h){var i;g.A(I(d,e),function(d){i=b[d],a.node(i).dummy&&g.A(a.predecessors(i),function(b){var d=a.node(b);d.dummy&&(d.order<f||d.order>h)&&bU(c,b,i)})})}return bF.A(b,function(b,c){var e,f=-1,h=0;return g.A(c,function(g,i){if("border"===a.node(g).dummy){var j=a.predecessors(g);j.length&&(e=a.node(j[0]).order,d(c,h,i,f,e),h=i,f=e)}d(c,h,c.length,e,b.length)}),c}),c}(c,e)),i={},g.A(["u","d"],function(a){d="u"===a?e:bE.A(e).reverse(),g.A(["l","r"],function(b){"r"===b&&(d=n.A(d,function(a){return bE.A(a).reverse()}));var e,f,j,k,l=("u"===a?c.predecessors:c.successors).bind(c),m=(e=d,f={},j={},k={},g.A(e,function(a){g.A(a,function(a,b){f[a]=a,j[a]=a,k[a]=b})}),g.A(e,function(a){var b=-1;g.A(a,function(a){var c=l(a);if(c.length)for(var d=((c=bP(c,function(a){return k[a]})).length-1)/2,e=Math.floor(d),g=Math.ceil(d);e<=g;++e){var i=c[e];j[a]===a&&b<k[i]&&!function(a,b,c){if(b>c){var d=b;b=c,c=d}return!!a[b]&&Object.prototype.hasOwnProperty.call(a[b],c)}(h,a,i)&&(j[i]=a,j[a]=f[a]=f[i],b=k[i])}})}),{root:f,align:j}),o=function(a,b,c,d,e){var f,h,i,j,k,l,m,n,o,p,q={},r=(f=a,h=b,i=c,j=e,n=new J.T,p=(k=(o=f.graph()).nodesep,l=o.edgesep,m=j,function(a,b,c){var d,e,f=a.node(b),g=a.node(c);if(d=0+f.width/2,Object.prototype.hasOwnProperty.call(f,"labelpos"))switch(f.labelpos.toLowerCase()){case"l":e=-f.width/2;break;case"r":e=f.width/2}if(e&&(d+=m?e:-e),e=0,d+=(f.dummy?l:k)/2,d+=(g.dummy?l:k)/2,d+=g.width/2,Object.prototype.hasOwnProperty.call(g,"labelpos"))switch(g.labelpos.toLowerCase()){case"l":e=g.width/2;break;case"r":e=-g.width/2}return e&&(d+=m?e:-e),e=0,d}),g.A(h,function(a){var b;g.A(a,function(a){var c=i[a];if(n.setNode(c),b){var d=i[b],e=n.edge(d,c);n.setEdge(d,c,Math.max(p(f,a,b),e||0))}b=a})}),n),s=e?"borderLeft":"borderRight";function t(a,b){for(var c=r.nodes(),d=c.pop(),e={};d;)e[d]?a(d):(e[d]=!0,c.push(d),c=c.concat(b(d))),d=c.pop()}return t(function(a){q[a]=r.inEdges(a).reduce(function(a,b){return Math.max(a,q[b.v]+r.edge(b))},0)},r.predecessors.bind(r)),t(function(b){var c=r.outEdges(b).reduce(function(a,b){return Math.min(a,q[b.w]-r.edge(b))},1/0),d=a.node(b);c!==1/0&&d.borderType!==s&&(q[b]=Math.max(q[b],c))},r.successors.bind(r)),g.A(d,function(a){q[a]=q[c[a]]}),q}(c,d,m.root,m.align,"r"===b);"r"===b&&(o=aL(o,function(a){return-a})),i[a+b]=o})}),j=a6(bE.A(i),function(a){var b,d=-1/0,e=1/0;return b=function(a,b){var f,g,h=(f=c,g=b,f.node(g).width/2);d=Math.max(a+h,d),e=Math.min(a-h,e)},null==a||(0,T.A)(a,(0,bT.A)(b),am.A),d-e}),l=aO(k=bE.A(j)),m=aH(k),g.A(["u","d"],function(a){g.A(["l","r"],function(b){var c,d=a+b,e=i[d];if(e!==j){var f=bE.A(e);(c="l"===b?l-aO(f):m-aH(f))&&(i[d]=aL(e,function(a){return a+c}))}})}),o=c.graph().align,p=aL(i.ul,function(a,b){if(o)return i[o.toLowerCase()][b];var c=bP(n.A(i,b));return(c[1]+c[2])/2}),p&&(0,aJ.A)(p,(0,bT.A)(function(a,c){b.node(c).x=a}))}),d(" positionSelfEdges",()=>{var b;return b=a,void g.A(b.nodes(),function(a){var c=b.node(a);if("selfedge"===c.dummy){var d=b.node(c.e.v),e=d.x+d.width/2,f=d.y,g=c.x-e,h=d.height/2;b.setEdge(c.e,c.label),b.removeNode(a),c.label.points=[{x:e+2*g/3,y:f-h},{x:e+5*g/6,y:f-h},{x:e+g,y:f},{x:e+5*g/6,y:f+h},{x:e+2*g/3,y:f+h}],c.label.x=c.x,c.label.y=c.y}})}),d(" removeBorderNodes",()=>{var b;return b=a,void(g.A(b.nodes(),function(a){if(b.children(a).length){var c=b.node(a),d=b.node(c.borderTop),e=b.node(c.borderBottom),f=b.node(aI(c.borderLeft)),g=b.node(aI(c.borderRight));c.width=Math.abs(g.x-f.x),c.height=Math.abs(e.y-d.y),c.x=f.x+c.width/2,c.y=d.y+c.height/2}}),g.A(b.nodes(),function(a){"border"===b.node(a).dummy&&b.removeNode(a)}))}),d(" normalize.undo",()=>{g.A(a.graph().dummyChains,function(b){var c,d=a.node(b),e=d.edgeLabel;for(a.setEdge(d.edgeObj,e);d.dummy;)c=a.successors(b)[0],a.removeNode(b),e.points.push({x:d.x,y:d.y}),"edge-label"===d.dummy&&(e.x=d.x,e.y=d.y,e.width=d.width,e.height=d.height),b=c,d=a.node(b)})}),d(" fixupEdgeLabelCoords",()=>{var b;return b=a,void g.A(b.edges(),function(a){var c=b.edge(a);if(Object.prototype.hasOwnProperty.call(c,"x"))switch(("l"===c.labelpos||"r"===c.labelpos)&&(c.width-=c.labeloffset),c.labelpos){case"l":c.x-=c.width/2+c.labeloffset;break;case"r":c.x+=c.width/2+c.labeloffset}})}),d(" undoCoordinateSystem",()=>{var b,c,d;("bt"===(b=a.graph().rankdir.toLowerCase())||"rl"===b)&&(c=a,g.A(c.nodes(),function(a){a4(c.node(a))}),g.A(c.edges(),function(a){var b=c.edge(a);g.A(b.points,a4),Object.prototype.hasOwnProperty.call(b,"y")&&a4(b)})),("lr"===b||"rl"===b)&&(d=a,g.A(d.nodes(),function(a){a5(d.node(a))}),g.A(d.edges(),function(a){var b=d.edge(a);g.A(b.points,a5),Object.prototype.hasOwnProperty.call(b,"x")&&a5(b)}),a2(a))}),d(" translateGraph",()=>(function(a){var b=1/0,c=0,d=1/0,e=0,f=a.graph(),h=f.marginx||0,i=f.marginy||0;function j(a){var f=a.x,g=a.y,h=a.width,i=a.height;b=Math.min(b,f-h/2),c=Math.max(c,f+h/2),d=Math.min(d,g-i/2),e=Math.max(e,g+i/2)}g.A(a.nodes(),function(b){j(a.node(b))}),g.A(a.edges(),function(b){var c=a.edge(b);Object.prototype.hasOwnProperty.call(c,"x")&&j(c)}),b-=h,d-=i,g.A(a.nodes(),function(c){var e=a.node(c);e.x-=b,e.y-=d}),g.A(a.edges(),function(c){var e=a.edge(c);g.A(e.points,function(a){a.x-=b,a.y-=d}),Object.prototype.hasOwnProperty.call(e,"x")&&(e.x-=b),Object.prototype.hasOwnProperty.call(e,"y")&&(e.y-=d)}),f.width=c-b+h,f.height=e-d+i})(a)),d(" assignNodeIntersects",()=>{var b;return b=a,void g.A(b.edges(),function(a){var c,d,e=b.edge(a),f=b.node(a.v),g=b.node(a.w);e.points?(c=e.points[0],d=e.points[e.points.length-1]):(e.points=[],c=g,d=f),e.points.unshift(aX(f,c)),e.points.push(aX(g,d))})}),d(" reversePoints",()=>{var b;return b=a,void g.A(b.edges(),function(a){var c=b.edge(a);c.reversed&&c.points.reverse()})}),d(" acyclic.undo",()=>{g.A(a.edges(),function(b){var c=a.edge(b);if(c.reversed){a.removeEdge(b);var d=c.forwardName;delete c.reversed,delete c.forwardName,a.setEdge(b.w,b.v,c,d)}})}))}),c(" updateInputGraph",()=>{var c,d;return c=a,d=b,void(g.A(c.nodes(),function(a){var b=c.node(a),e=d.node(a);b&&(b.x=e.x,b.y=e.y,d.children(a).length&&(b.width=e.width,b.height=e.height))}),g.A(c.edges(),function(a){var b=c.edge(a),e=d.edge(a);b.points=e.points,Object.prototype.hasOwnProperty.call(e,"x")&&(b.x=e.x,b.y=e.y)}),c.graph().width=d.graph().width,c.graph().height=d.graph().height)})})}var bW=["nodesep","edgesep","ranksep","marginx","marginy"],bX={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},bY=["acyclicer","ranker","rankdir","align"],bZ=["width","height"],b$={width:0,height:0},b_=["minlen","weight","width","height","labeloffset"],b0={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},b1=["labelpos"];function b2(a,b){return aL(aA(a,b),Number)}function b3(a){var b={};return g.A(a,function(a,c){b[c.toLowerCase()]=a}),b}},65977:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(18671),e=Object.create,f=function(){function a(){}return function(b){if(!(0,d.A)(b))return{};if(e)return e(b);a.prototype=b;var c=new a;return a.prototype=void 0,c}}(),g=c(91329),h=c(18765);let i=function(a){return"function"!=typeof a.constructor||(0,h.A)(a)?{}:f((0,g.A)(a))}},71734:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(11873);let e=function(a,b,c){"__proto__"==b&&d.A?(0,d.A)(a,b,{configurable:!0,enumerable:!0,value:c,writable:!0}):a[b]=c}},75530:(a,b,c)=>{c.d(b,{A:()=>d});let d=function(a,b){var c=-1,d=a.length;for(b||(b=Array(d));++c<d;)b[c]=a[c];return b}},87826:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(16730),e=c(71503);let f=function(a,b){var c=-1,f=(0,e.A)(a)?Array(a.length):[];return(0,d.A)(a,function(a,d,e){f[++c]=b(a,d,e)}),f}},91329:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(11017).A)(Object.getPrototypeOf,Object)}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=5293,exports.ids=[5293],exports.modules={21661:(a,b,c)=>{c.d(b,{CP:()=>l,Ck:()=>o,HT:()=>n,PB:()=>m,aC:()=>k,lC:()=>i,m:()=>j,tk:()=>h});var d=c(65246),e=c(21143),f=c(65207),g=c(69085),h=(0,e.K2)((a,b)=>{let c=a.append("rect");if(c.attr("x",b.x),c.attr("y",b.y),c.attr("fill",b.fill),c.attr("stroke",b.stroke),c.attr("width",b.width),c.attr("height",b.height),b.name&&c.attr("name",b.name),b.rx&&c.attr("rx",b.rx),b.ry&&c.attr("ry",b.ry),void 0!==b.attrs)for(let a in b.attrs)c.attr(a,b.attrs[a]);return b.class&&c.attr("class",b.class),c},"drawRect"),i=(0,e.K2)((a,b)=>{h(a,{x:b.startx,y:b.starty,width:b.stopx-b.startx,height:b.stopy-b.starty,fill:b.fill,stroke:b.stroke,class:"rect"}).lower()},"drawBackgroundRect"),j=(0,e.K2)((a,b)=>{let c=b.text.replace(d.H1," "),e=a.append("text");e.attr("x",b.x),e.attr("y",b.y),e.attr("class","legend"),e.style("text-anchor",b.anchor),b.class&&e.attr("class",b.class);let f=e.append("tspan");return f.attr("x",b.x+2*b.textMargin),f.text(c),e},"drawText"),k=(0,e.K2)((a,b,c,d)=>{let e=a.append("image");e.attr("x",b),e.attr("y",c);let g=(0,f.J)(d);e.attr("xlink:href",g)},"drawImage"),l=(0,e.K2)((a,b,c,d)=>{let e=a.append("use");e.attr("x",b),e.attr("y",c);let g=(0,f.J)(d);e.attr("xlink:href",`#${g}`)},"drawEmbeddedImage"),m=(0,e.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),n=(0,e.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),o=(0,e.K2)(()=>{let a=(0,g.Ltv)(".mermaidTooltip");return a.empty()&&(a=(0,g.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),a},"createTooltip")},34091:(a,b,c)=>{c.d(b,{P:()=>f});var d=c(65246),e=c(21143),f=(0,e.K2)((a,b,c,f)=>{a.attr("class",c);let{width:i,height:j,x:k,y:l}=g(a,b);(0,d.a$)(a,j,i,f);let m=h(k,l,i,j,b);a.attr("viewBox",m),e.Rm.debug(`viewBox configured: ${m} with padding: ${b}`)},"setupViewPortForSVG"),g=(0,e.K2)((a,b)=>{let c=a.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:c.width+2*b,height:c.height+2*b,x:c.x,y:c.y}},"calculateDimensionsWithPadding"),h=(0,e.K2)((a,b,c,d,e)=>`${a-e} ${b-e} ${c} ${d}`,"createViewBox")},35293:(a,b,c)=>{c.d(b,{diagram:()=>x});var d=c(61827),e=c(30193),f=c(21661),g=c(80339),h=c(34091),i=c(44906);c(73865),c(65144);var j=c(30800);c(90355),c(19203),c(
|
|
1
|
+
"use strict";exports.id=5293,exports.ids=[5293],exports.modules={21661:(a,b,c)=>{c.d(b,{CP:()=>l,Ck:()=>o,HT:()=>n,PB:()=>m,aC:()=>k,lC:()=>i,m:()=>j,tk:()=>h});var d=c(65246),e=c(21143),f=c(65207),g=c(69085),h=(0,e.K2)((a,b)=>{let c=a.append("rect");if(c.attr("x",b.x),c.attr("y",b.y),c.attr("fill",b.fill),c.attr("stroke",b.stroke),c.attr("width",b.width),c.attr("height",b.height),b.name&&c.attr("name",b.name),b.rx&&c.attr("rx",b.rx),b.ry&&c.attr("ry",b.ry),void 0!==b.attrs)for(let a in b.attrs)c.attr(a,b.attrs[a]);return b.class&&c.attr("class",b.class),c},"drawRect"),i=(0,e.K2)((a,b)=>{h(a,{x:b.startx,y:b.starty,width:b.stopx-b.startx,height:b.stopy-b.starty,fill:b.fill,stroke:b.stroke,class:"rect"}).lower()},"drawBackgroundRect"),j=(0,e.K2)((a,b)=>{let c=b.text.replace(d.H1," "),e=a.append("text");e.attr("x",b.x),e.attr("y",b.y),e.attr("class","legend"),e.style("text-anchor",b.anchor),b.class&&e.attr("class",b.class);let f=e.append("tspan");return f.attr("x",b.x+2*b.textMargin),f.text(c),e},"drawText"),k=(0,e.K2)((a,b,c,d)=>{let e=a.append("image");e.attr("x",b),e.attr("y",c);let g=(0,f.J)(d);e.attr("xlink:href",g)},"drawImage"),l=(0,e.K2)((a,b,c,d)=>{let e=a.append("use");e.attr("x",b),e.attr("y",c);let g=(0,f.J)(d);e.attr("xlink:href",`#${g}`)},"drawEmbeddedImage"),m=(0,e.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),n=(0,e.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),o=(0,e.K2)(()=>{let a=(0,g.Ltv)(".mermaidTooltip");return a.empty()&&(a=(0,g.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),a},"createTooltip")},34091:(a,b,c)=>{c.d(b,{P:()=>f});var d=c(65246),e=c(21143),f=(0,e.K2)((a,b,c,f)=>{a.attr("class",c);let{width:i,height:j,x:k,y:l}=g(a,b);(0,d.a$)(a,j,i,f);let m=h(k,l,i,j,b);a.attr("viewBox",m),e.Rm.debug(`viewBox configured: ${m} with padding: ${b}`)},"setupViewPortForSVG"),g=(0,e.K2)((a,b)=>{let c=a.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:c.width+2*b,height:c.height+2*b,x:c.x,y:c.y}},"calculateDimensionsWithPadding"),h=(0,e.K2)((a,b,c,d,e)=>`${a-e} ${b-e} ${c} ${d}`,"createViewBox")},35293:(a,b,c)=>{c.d(b,{diagram:()=>x});var d=c(61827),e=c(30193),f=c(21661),g=c(80339),h=c(34091),i=c(44906);c(73865),c(65144);var j=c(30800);c(90355),c(19203),c(31792);var k=c(70400),l=c(65246),m=c(21143),n=c(69085),o=c(11656),p=c(75899),q=c(14120),r=class{constructor(){this.vertexCounter=0,this.config=(0,l.D7)(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=l.SV,this.setAccDescription=l.EI,this.setDiagramTitle=l.ke,this.getAccTitle=l.iN,this.getAccDescription=l.m7,this.getDiagramTitle=l.ab,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{(0,m.K2)(this,"FlowDB")}sanitizeText(a){return l.Y2.sanitizeText(a,this.config)}sanitizeNodeLabelType(a){switch(a){case"markdown":case"string":case"text":return a;default:return"markdown"}}setDiagramId(a){this.diagramId=a}lookUpDomId(a){for(let b of this.vertices.values())if(b.id===a)return this.diagramId?`${this.diagramId}-${b.domId}`:b.domId;return this.diagramId?`${this.diagramId}-${a}`:a}addVertex(a,b,c,d,f,g,h={},i){let k,n;if(!a||0===a.trim().length)return;if(void 0!==i){let a;a=i.includes("\n")?i+"\n":"{\n"+i+"\n}",k=(0,e.H)(a,{schema:e.r})}let o=this.edges.find(b=>b.id===a);if(o){let a=k;a?.animate!==void 0&&(o.animate=a.animate),a?.animation!==void 0&&(o.animation=a.animation),a?.curve!==void 0&&(o.interpolate=a.curve);return}let p=this.vertices.get(a);if(void 0===p&&(void 0===b&&void 0===c&&null!=d&&m.Rm.warn(`Style applied to unknown node "${a}". This may indicate a typo. The node will be created automatically.`),p={id:a,labelType:"text",domId:"flowchart-"+a+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(a,p)),this.vertexCounter++,void 0!==b?(this.config=(0,l.D7)(),n=this.sanitizeText(b.text.trim()),p.labelType=b.type,n.startsWith('"')&&n.endsWith('"')&&(n=n.substring(1,n.length-1)),p.text=n):void 0===p.text&&(p.text=a),void 0!==c&&(p.type=c),null!=d&&d.forEach(a=>{p.styles.push(a)}),null!=f&&f.forEach(a=>{p.classes.push(a)}),void 0!==g&&(p.dir=g),void 0===p.props?p.props=h:void 0!==h&&Object.assign(p.props,h),void 0!==k){if(k.shape){if(k.shape!==k.shape.toLowerCase()||k.shape.includes("_"))throw Error(`No such shape: ${k.shape}. Shape names should be lowercase.`);if(!(0,j.aP)(k.shape))throw Error(`No such shape: ${k.shape}.`);p.type=k?.shape}k?.label&&(p.text=k?.label,p.labelType=this.sanitizeNodeLabelType(k?.labelType)),k?.icon&&(p.icon=k?.icon,k.label?.trim()||p.text!==a||(p.text="")),k?.form&&(p.form=k?.form),k?.pos&&(p.pos=k?.pos),k?.img&&(p.img=k?.img,k.label?.trim()||p.text!==a||(p.text="")),k?.constraint&&(p.constraint=k.constraint),k.w&&(p.assetWidth=Number(k.w)),k.h&&(p.assetHeight=Number(k.h))}}addSingleLink(a,b,c,d){let e={start:a,end:b,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};m.Rm.info("abc78 Got edge...",e);let f=c.text;if(void 0!==f&&(e.text=this.sanitizeText(f.text.trim()),e.text.startsWith('"')&&e.text.endsWith('"')&&(e.text=e.text.substring(1,e.text.length-1)),e.labelType=this.sanitizeNodeLabelType(f.type)),void 0!==c&&(e.type=c.type,e.stroke=c.stroke,e.length=c.length>10?10:c.length),d&&!this.edges.some(a=>a.id===d))e.id=d,e.isUserDefinedId=!0;else{let a=this.edges.filter(a=>a.start===e.start&&a.end===e.end);0===a.length?e.id=(0,k.rY)(e.start,e.end,{counter:0,prefix:"L"}):e.id=(0,k.rY)(e.start,e.end,{counter:a.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))m.Rm.info("Pushing edge..."),this.edges.push(e);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
|
|
2
2
|
|
|
3
3
|
Initialize mermaid with maxEdges set to a higher number to allow more edges.
|
|
4
4
|
You cannot set this config via configuration inside the diagram as it is a secure config.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=5797,exports.ids=[5797],exports.modules={25797:(a,b,c)=>{c.d(b,{diagram:()=>F});var d=c(39636),e=c(61827),f=c(30193),g=c(30800);c(90355),c(19203),c(551),c(70400);var h=c(65246),i=c(21143),j=c(67821),k=c(61255),l=c(30089),m=function(){var a=(0,i.K2)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,4],c=[1,13],d=[1,12],e=[1,15],f=[1,16],g=[1,20],h=[1,19],j=[6,7,8],k=[1,26],l=[1,24],m=[1,25],n=[6,7,11],o=[1,31],p=[6,7,11,24],q=[1,6,13,16,17,20,23],r=[1,35],s=[1,36],t=[1,6,7,11,13,16,17,20,23],u=[1,38],v={trace:(0,i.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,i.K2)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 6:case 7:return d;case 8:d.getLogger().trace("Stop NL ");break;case 9:d.getLogger().trace("Stop EOF ");break;case 11:d.getLogger().trace("Stop NL2 ");break;case 12:d.getLogger().trace("Stop EOF2 ");break;case 15:d.getLogger().info("Node: ",f[h-1].id),d.addNode(f[h-2].length,f[h-1].id,f[h-1].descr,f[h-1].type,f[h]);break;case 16:d.getLogger().info("Node: ",f[h].id),d.addNode(f[h-1].length,f[h].id,f[h].descr,f[h].type);break;case 17:d.getLogger().trace("Icon: ",f[h]),d.decorateNode({icon:f[h]});break;case 18:case 23:d.decorateNode({class:f[h]});break;case 19:d.getLogger().trace("SPACELIST");break;case 20:d.getLogger().trace("Node: ",f[h-1].id),d.addNode(0,f[h-1].id,f[h-1].descr,f[h-1].type,f[h]);break;case 21:d.getLogger().trace("Node: ",f[h].id),d.addNode(0,f[h].id,f[h].descr,f[h].type);break;case 22:d.decorateNode({icon:f[h]});break;case 27:d.getLogger().trace("node found ..",f[h-2]),this.$={id:f[h-1],descr:f[h-1],type:d.getType(f[h-2],f[h])};break;case 28:this.$={id:f[h],descr:f[h],type:0};break;case 29:d.getLogger().trace("node found ..",f[h-3]),this.$={id:f[h-3],descr:f[h-1],type:d.getType(f[h-2],f[h])};break;case 30:this.$=f[h-1]+f[h];break;case 31:this.$=f[h]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:b},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:b},{6:c,7:[1,10],9:9,12:11,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},a(j,[2,3]),{1:[2,2]},a(j,[2,4]),a(j,[2,5]),{1:[2,6],6:c,12:21,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},{6:c,9:22,12:11,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},{6:k,7:l,10:23,11:m},a(n,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:g,23:h}),a(n,[2,19]),a(n,[2,21],{15:30,24:o}),a(n,[2,22]),a(n,[2,23]),a(p,[2,25]),a(p,[2,26]),a(p,[2,28],{20:[1,32]}),{21:[1,33]},{6:k,7:l,10:34,11:m},{1:[2,7],6:c,12:21,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},a(q,[2,14],{7:r,11:s}),a(t,[2,8]),a(t,[2,9]),a(t,[2,10]),a(n,[2,16],{15:37,24:o}),a(n,[2,17]),a(n,[2,18]),a(n,[2,20],{24:u}),a(p,[2,31]),{21:[1,39]},{22:[1,40]},a(q,[2,13],{7:r,11:s}),a(t,[2,11]),a(t,[2,12]),a(n,[2,15],{24:u}),a(p,[2,30]),{22:[1,41]},a(p,[2,27]),a(p,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,i.K2)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,i.K2)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",j=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,i.K2)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,h=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,k,j,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function w(){this.yy={}}return v.lexer={EOF:1,parseError:(0,i.K2)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,i.K2)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,i.K2)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,i.K2)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,i.K2)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,i.K2)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,i.K2)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,i.K2)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,i.K2)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,i.K2)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(a,b,c,d){switch(c){case 0:return this.pushState("shapeData"),b.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:return b.yytext=b.yytext.replace(/\n\s*/g,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return a.getLogger().trace("Found comment",b.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:a.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return a.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:a.getLogger().trace("end icon"),this.popState();break;case 16:return a.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return a.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return a.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return a.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:a.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return a.getLogger().trace("description:",b.yytext),"NODE_DESCR";case 33:return this.popState(),a.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),a.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),a.getLogger().trace("node end ...",b.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),a.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),a.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return a.getLogger().trace("Long description:",b.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}},(0,i.K2)(w,"Parser"),w.prototype=v,v.Parser=w,new w}();m.parser=m;var n=[],o=[],p=0,q={},r=(0,i.K2)(()=>{n=[],o=[],p=0,q={}},"clear"),s=(0,i.K2)(a=>{if(0===n.length)return null;let b=n[0].level,c=null;for(let a=n.length-1;a>=0;a--)if(n[a].level!==b||c||(c=n[a]),n[a].level<b)throw Error('Items without section detected, found section ("'+n[a].label+'")');return a===c?.level?null:c},"getSection"),t=(0,i.K2)(function(){return o},"getSections"),u=(0,i.K2)(function(){let a=[],b=t(),c=(0,h.D7)();for(let d of b){let b={id:d.id,label:(0,h.jZ)(d.label??"",c),labelType:"markdown",isGroup:!0,ticket:d.ticket,shape:"kanbanSection",level:d.level,look:c.look};for(let e of(a.push(b),n.filter(a=>a.parentId===d.id))){let b={id:e.id,parentId:d.id,label:(0,h.jZ)(e.label??"",c),labelType:"markdown",isGroup:!1,ticket:e?.ticket,priority:e?.priority,assigned:e?.assigned,icon:e?.icon,shape:"kanbanItem",level:e.level,rx:5,ry:5,cssStyles:["text-align: left"]};a.push(b)}}return{nodes:a,edges:[],other:{},config:(0,h.D7)()}},"getData"),v=(0,i.K2)((a,b,c,d,e)=>{let g=(0,h.D7)(),i=g.mindmap?.padding??h.UI.mindmap.padding;switch(d){case w.ROUNDED_RECT:case w.RECT:case w.HEXAGON:i*=2}let j={id:(0,h.jZ)(b,g)||"kbn"+p++,level:a,label:(0,h.jZ)(c,g),width:g.mindmap?.maxNodeWidth??h.UI.mindmap.maxNodeWidth,padding:i,isGroup:!1};if(void 0!==e){let a;a=e.includes("\n")?e+"\n":"{\n"+e+"\n}";let b=(0,f.H)(a,{schema:f.r});if(b.shape&&(b.shape!==b.shape.toLowerCase()||b.shape.includes("_")))throw Error(`No such shape: ${b.shape}. Shape names should be lowercase.`);b?.shape&&"kanbanItem"===b.shape&&(j.shape=b?.shape),b?.label&&(j.label=b?.label),b?.icon&&(j.icon=b?.icon.toString()),b?.assigned&&(j.assigned=b?.assigned.toString()),b?.ticket&&(j.ticket=b?.ticket.toString()),b?.priority&&(j.priority=b?.priority)}let k=s(a);k?j.parentId=k.id||"kbn"+p++:o.push(j),n.push(j)},"addNode"),w={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},x=(0,i.K2)((a,b)=>{switch(i.Rm.debug("In get type",a,b),a){case"[":return w.RECT;case"(":return")"===b?w.ROUNDED_RECT:w.CLOUD;case"((":return w.CIRCLE;case")":return w.CLOUD;case"))":return w.BANG;case"{{":return w.HEXAGON;default:return w.DEFAULT}},"getType"),y=(0,i.K2)((a,b)=>{q[a]=b},"setElementForId"),z=(0,i.K2)(a=>{if(!a)return;let b=(0,h.D7)(),c=n[n.length-1];a.icon&&(c.icon=(0,h.jZ)(a.icon,b)),a.class&&(c.cssClasses=(0,h.jZ)(a.class,b))},"decorateNode"),A=(0,i.K2)(a=>{switch(a){case w.DEFAULT:return"no-border";case w.RECT:return"rect";case w.ROUNDED_RECT:return"rounded-rect";case w.CIRCLE:return"circle";case w.CLOUD:return"cloud";case w.BANG:return"bang";case w.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),B=(0,i.K2)(()=>i.Rm,"getLogger"),C=(0,i.K2)(a=>q[a],"getElementById"),D=(0,i.K2)(async(a,b,c,e)=>{i.Rm.debug("Rendering kanban diagram\n"+a);let f=e.db.getData(),j=(0,h.D7)();j.htmlLabels=!1;let k=(0,d.D)(b);for(let a of f.nodes)a.domId=`${b}-${a.id}`;let l=k.append("g");l.attr("class","sections");let m=k.append("g");m.attr("class","items");let n=f.nodes.filter(a=>a.isGroup),o=0,p=[],q=25;for(let a of n){let b=j?.kanban?.sectionWidth||200;a.x=b*(o+=1)+(o-1)*10/2,a.width=b,a.y=0,a.height=3*b,a.rx=5,a.ry=5,a.cssClasses=a.cssClasses+" section-"+o;let c=await (0,g.U)(l,a);q=Math.max(q,c?.labelBBox?.height),p.push(c)}let r=0;for(let a of n){let b=p[r];r+=1;let c=j?.kanban?.sectionWidth||200,d=-(3*c)/2+q,e=d;for(let b of f.nodes.filter(b=>b.parentId===a.id)){if(b.isGroup)throw Error("Groups within groups are not allowed in Kanban diagrams");b.x=a.x,b.width=c-15;let d=(await (0,g.on)(m,b,{config:j})).node().getBBox();b.y=e+d.height/2,await (0,g.U_)(b),e=b.y+d.height/2+5}let h=b.cluster.select("rect"),i=Math.max(e-d+30,50)+(q-25);h.attr("height",i)}(0,h.ot)(void 0,k,j.mindmap?.padding??h.UI.kanban.padding,j.mindmap?.useMaxWidth??h.UI.kanban.useMaxWidth)},"draw"),E=(0,i.K2)(a=>{let b="";for(let b=0;b<a.THEME_COLOR_LIMIT;b++)a["lineColor"+b]=a["lineColor"+b]||a["cScaleInv"+b],(0,j.A)(a["lineColor"+b])?a["lineColor"+b]=(0,k.A)(a["lineColor"+b],20):a["lineColor"+b]=(0,l.A)(a["lineColor"+b],20);let c=(0,i.K2)((b,c)=>a.darkMode?(0,l.A)(b,c):(0,k.A)(b,c),"adjuster");for(let d=0;d<a.THEME_COLOR_LIMIT;d++){let e=""+(17-3*d);b+=`
|
|
1
|
+
"use strict";exports.id=5797,exports.ids=[5797],exports.modules={25797:(a,b,c)=>{c.d(b,{diagram:()=>F});var d=c(39636),e=c(61827),f=c(30193),g=c(30800);c(90355),c(19203),c(31792),c(70400);var h=c(65246),i=c(21143),j=c(67821),k=c(61255),l=c(30089),m=function(){var a=(0,i.K2)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,4],c=[1,13],d=[1,12],e=[1,15],f=[1,16],g=[1,20],h=[1,19],j=[6,7,8],k=[1,26],l=[1,24],m=[1,25],n=[6,7,11],o=[1,31],p=[6,7,11,24],q=[1,6,13,16,17,20,23],r=[1,35],s=[1,36],t=[1,6,7,11,13,16,17,20,23],u=[1,38],v={trace:(0,i.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,i.K2)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 6:case 7:return d;case 8:d.getLogger().trace("Stop NL ");break;case 9:d.getLogger().trace("Stop EOF ");break;case 11:d.getLogger().trace("Stop NL2 ");break;case 12:d.getLogger().trace("Stop EOF2 ");break;case 15:d.getLogger().info("Node: ",f[h-1].id),d.addNode(f[h-2].length,f[h-1].id,f[h-1].descr,f[h-1].type,f[h]);break;case 16:d.getLogger().info("Node: ",f[h].id),d.addNode(f[h-1].length,f[h].id,f[h].descr,f[h].type);break;case 17:d.getLogger().trace("Icon: ",f[h]),d.decorateNode({icon:f[h]});break;case 18:case 23:d.decorateNode({class:f[h]});break;case 19:d.getLogger().trace("SPACELIST");break;case 20:d.getLogger().trace("Node: ",f[h-1].id),d.addNode(0,f[h-1].id,f[h-1].descr,f[h-1].type,f[h]);break;case 21:d.getLogger().trace("Node: ",f[h].id),d.addNode(0,f[h].id,f[h].descr,f[h].type);break;case 22:d.decorateNode({icon:f[h]});break;case 27:d.getLogger().trace("node found ..",f[h-2]),this.$={id:f[h-1],descr:f[h-1],type:d.getType(f[h-2],f[h])};break;case 28:this.$={id:f[h],descr:f[h],type:0};break;case 29:d.getLogger().trace("node found ..",f[h-3]),this.$={id:f[h-3],descr:f[h-1],type:d.getType(f[h-2],f[h])};break;case 30:this.$=f[h-1]+f[h];break;case 31:this.$=f[h]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:b},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:b},{6:c,7:[1,10],9:9,12:11,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},a(j,[2,3]),{1:[2,2]},a(j,[2,4]),a(j,[2,5]),{1:[2,6],6:c,12:21,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},{6:c,9:22,12:11,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},{6:k,7:l,10:23,11:m},a(n,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:g,23:h}),a(n,[2,19]),a(n,[2,21],{15:30,24:o}),a(n,[2,22]),a(n,[2,23]),a(p,[2,25]),a(p,[2,26]),a(p,[2,28],{20:[1,32]}),{21:[1,33]},{6:k,7:l,10:34,11:m},{1:[2,7],6:c,12:21,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},a(q,[2,14],{7:r,11:s}),a(t,[2,8]),a(t,[2,9]),a(t,[2,10]),a(n,[2,16],{15:37,24:o}),a(n,[2,17]),a(n,[2,18]),a(n,[2,20],{24:u}),a(p,[2,31]),{21:[1,39]},{22:[1,40]},a(q,[2,13],{7:r,11:s}),a(t,[2,11]),a(t,[2,12]),a(n,[2,15],{24:u}),a(p,[2,30]),{22:[1,41]},a(p,[2,27]),a(p,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,i.K2)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,i.K2)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",j=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,i.K2)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,h=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,k,j,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function w(){this.yy={}}return v.lexer={EOF:1,parseError:(0,i.K2)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,i.K2)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,i.K2)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,i.K2)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,i.K2)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,i.K2)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,i.K2)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,i.K2)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,i.K2)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,i.K2)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(a,b,c,d){switch(c){case 0:return this.pushState("shapeData"),b.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:return b.yytext=b.yytext.replace(/\n\s*/g,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return a.getLogger().trace("Found comment",b.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:a.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return a.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:a.getLogger().trace("end icon"),this.popState();break;case 16:return a.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return a.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return a.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return a.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:a.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return a.getLogger().trace("description:",b.yytext),"NODE_DESCR";case 33:return this.popState(),a.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),a.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),a.getLogger().trace("node end ...",b.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),a.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),a.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return a.getLogger().trace("Long description:",b.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}},(0,i.K2)(w,"Parser"),w.prototype=v,v.Parser=w,new w}();m.parser=m;var n=[],o=[],p=0,q={},r=(0,i.K2)(()=>{n=[],o=[],p=0,q={}},"clear"),s=(0,i.K2)(a=>{if(0===n.length)return null;let b=n[0].level,c=null;for(let a=n.length-1;a>=0;a--)if(n[a].level!==b||c||(c=n[a]),n[a].level<b)throw Error('Items without section detected, found section ("'+n[a].label+'")');return a===c?.level?null:c},"getSection"),t=(0,i.K2)(function(){return o},"getSections"),u=(0,i.K2)(function(){let a=[],b=t(),c=(0,h.D7)();for(let d of b){let b={id:d.id,label:(0,h.jZ)(d.label??"",c),labelType:"markdown",isGroup:!0,ticket:d.ticket,shape:"kanbanSection",level:d.level,look:c.look};for(let e of(a.push(b),n.filter(a=>a.parentId===d.id))){let b={id:e.id,parentId:d.id,label:(0,h.jZ)(e.label??"",c),labelType:"markdown",isGroup:!1,ticket:e?.ticket,priority:e?.priority,assigned:e?.assigned,icon:e?.icon,shape:"kanbanItem",level:e.level,rx:5,ry:5,cssStyles:["text-align: left"]};a.push(b)}}return{nodes:a,edges:[],other:{},config:(0,h.D7)()}},"getData"),v=(0,i.K2)((a,b,c,d,e)=>{let g=(0,h.D7)(),i=g.mindmap?.padding??h.UI.mindmap.padding;switch(d){case w.ROUNDED_RECT:case w.RECT:case w.HEXAGON:i*=2}let j={id:(0,h.jZ)(b,g)||"kbn"+p++,level:a,label:(0,h.jZ)(c,g),width:g.mindmap?.maxNodeWidth??h.UI.mindmap.maxNodeWidth,padding:i,isGroup:!1};if(void 0!==e){let a;a=e.includes("\n")?e+"\n":"{\n"+e+"\n}";let b=(0,f.H)(a,{schema:f.r});if(b.shape&&(b.shape!==b.shape.toLowerCase()||b.shape.includes("_")))throw Error(`No such shape: ${b.shape}. Shape names should be lowercase.`);b?.shape&&"kanbanItem"===b.shape&&(j.shape=b?.shape),b?.label&&(j.label=b?.label),b?.icon&&(j.icon=b?.icon.toString()),b?.assigned&&(j.assigned=b?.assigned.toString()),b?.ticket&&(j.ticket=b?.ticket.toString()),b?.priority&&(j.priority=b?.priority)}let k=s(a);k?j.parentId=k.id||"kbn"+p++:o.push(j),n.push(j)},"addNode"),w={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},x=(0,i.K2)((a,b)=>{switch(i.Rm.debug("In get type",a,b),a){case"[":return w.RECT;case"(":return")"===b?w.ROUNDED_RECT:w.CLOUD;case"((":return w.CIRCLE;case")":return w.CLOUD;case"))":return w.BANG;case"{{":return w.HEXAGON;default:return w.DEFAULT}},"getType"),y=(0,i.K2)((a,b)=>{q[a]=b},"setElementForId"),z=(0,i.K2)(a=>{if(!a)return;let b=(0,h.D7)(),c=n[n.length-1];a.icon&&(c.icon=(0,h.jZ)(a.icon,b)),a.class&&(c.cssClasses=(0,h.jZ)(a.class,b))},"decorateNode"),A=(0,i.K2)(a=>{switch(a){case w.DEFAULT:return"no-border";case w.RECT:return"rect";case w.ROUNDED_RECT:return"rounded-rect";case w.CIRCLE:return"circle";case w.CLOUD:return"cloud";case w.BANG:return"bang";case w.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),B=(0,i.K2)(()=>i.Rm,"getLogger"),C=(0,i.K2)(a=>q[a],"getElementById"),D=(0,i.K2)(async(a,b,c,e)=>{i.Rm.debug("Rendering kanban diagram\n"+a);let f=e.db.getData(),j=(0,h.D7)();j.htmlLabels=!1;let k=(0,d.D)(b);for(let a of f.nodes)a.domId=`${b}-${a.id}`;let l=k.append("g");l.attr("class","sections");let m=k.append("g");m.attr("class","items");let n=f.nodes.filter(a=>a.isGroup),o=0,p=[],q=25;for(let a of n){let b=j?.kanban?.sectionWidth||200;a.x=b*(o+=1)+(o-1)*10/2,a.width=b,a.y=0,a.height=3*b,a.rx=5,a.ry=5,a.cssClasses=a.cssClasses+" section-"+o;let c=await (0,g.U)(l,a);q=Math.max(q,c?.labelBBox?.height),p.push(c)}let r=0;for(let a of n){let b=p[r];r+=1;let c=j?.kanban?.sectionWidth||200,d=-(3*c)/2+q,e=d;for(let b of f.nodes.filter(b=>b.parentId===a.id)){if(b.isGroup)throw Error("Groups within groups are not allowed in Kanban diagrams");b.x=a.x,b.width=c-15;let d=(await (0,g.on)(m,b,{config:j})).node().getBBox();b.y=e+d.height/2,await (0,g.U_)(b),e=b.y+d.height/2+5}let h=b.cluster.select("rect"),i=Math.max(e-d+30,50)+(q-25);h.attr("height",i)}(0,h.ot)(void 0,k,j.mindmap?.padding??h.UI.kanban.padding,j.mindmap?.useMaxWidth??h.UI.kanban.useMaxWidth)},"draw"),E=(0,i.K2)(a=>{let b="";for(let b=0;b<a.THEME_COLOR_LIMIT;b++)a["lineColor"+b]=a["lineColor"+b]||a["cScaleInv"+b],(0,j.A)(a["lineColor"+b])?a["lineColor"+b]=(0,k.A)(a["lineColor"+b],20):a["lineColor"+b]=(0,l.A)(a["lineColor"+b],20);let c=(0,i.K2)((b,c)=>a.darkMode?(0,l.A)(b,c):(0,k.A)(b,c),"adjuster");for(let d=0;d<a.THEME_COLOR_LIMIT;d++){let e=""+(17-3*d);b+=`
|
|
2
2
|
.section-${d-1} rect, .section-${d-1} path, .section-${d-1} circle, .section-${d-1} polygon, .section-${d-1} path {
|
|
3
3
|
fill: ${c(a["cScale"+d],10)};
|
|
4
4
|
stroke: ${c(a["cScale"+d],10)};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
exports.id=5851,exports.ids=[5851],exports.modules={5851:(a,b,c)=>{"use strict";c.d(b,{diagram:()=>Y});var d=c(39636),e=c(
|
|
1
|
+
exports.id=5851,exports.ids=[5851],exports.modules={5851:(a,b,c)=>{"use strict";c.d(b,{diagram:()=>Y});var d=c(39636),e=c(31792),f=c(93273),g=c(70400),h=c(65246),i=c(21143),j=c(92325),k=c(17307),l=c(18980),m=c(69085),n={L:"left",R:"right",T:"top",B:"bottom"},o={L:(0,i.K2)(a=>`${a},${a/2} 0,${a} 0,0`,"L"),R:(0,i.K2)(a=>`0,${a/2} ${a},0 ${a},${a}`,"R"),T:(0,i.K2)(a=>`0,0 ${a},0 ${a/2},${a}`,"T"),B:(0,i.K2)(a=>`${a/2},0 ${a},${a} 0,${a}`,"B")},p={L:(0,i.K2)((a,b)=>a-b+2,"L"),R:(0,i.K2)((a,b)=>a-2,"R"),T:(0,i.K2)((a,b)=>a-b+2,"T"),B:(0,i.K2)((a,b)=>a-2,"B")},q=(0,i.K2)(function(a){return s(a)?"L"===a?"R":"L":"T"===a?"B":"T"},"getOppositeArchitectureDirection"),r=(0,i.K2)(function(a){return"L"===a||"R"===a||"T"===a||"B"===a},"isArchitectureDirection"),s=(0,i.K2)(function(a){return"L"===a||"R"===a},"isArchitectureDirectionX"),t=(0,i.K2)(function(a){return"T"===a||"B"===a},"isArchitectureDirectionY"),u=(0,i.K2)(function(a,b){let c=s(a)&&t(b),d=t(a)&&s(b);return c||d},"isArchitectureDirectionXY"),v=(0,i.K2)(function(a){let b=a[0],c=a[1],d=s(b)&&t(c),e=t(b)&&s(c);return d||e},"isArchitecturePairXY"),w=(0,i.K2)(function(a){return"LL"!==a&&"RR"!==a&&"TT"!==a&&"BB"!==a},"isValidArchitectureDirectionPair"),x=(0,i.K2)(function(a,b){let c=`${a}${b}`;return w(c)?c:void 0},"getArchitectureDirectionPair"),y=(0,i.K2)(function([a,b],c){let d=c[0],e=c[1];if(s(d))if(t(e))return[a+("L"===d?-1:1),b+("T"===e?1:-1)];else return[a+("L"===d?-1:1),b];return s(e)?[a+("L"===e?1:-1),b+("T"===d?1:-1)]:[a,b+("T"===d?1:-1)]},"shiftPositionByArchitectureDirectionPair"),z=(0,i.K2)(function(a){return"LT"===a||"TL"===a?[1,1]:"BL"===a||"LB"===a?[1,-1]:"BR"===a||"RB"===a?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),A=(0,i.K2)(function(a,b){return u(a,b)?"bend":s(a)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),B=(0,i.K2)(function(a){return"service"===a.type},"isArchitectureService"),C=(0,i.K2)(function(a){return"junction"===a.type},"isArchitectureJunction"),D=(0,i.K2)(a=>a.data(),"edgeData"),E=(0,i.K2)(a=>a.data(),"nodeData"),F=h.UI.architecture,G=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=h.SV,this.getAccTitle=h.iN,this.setDiagramTitle=h.ke,this.getDiagramTitle=h.ab,this.getAccDescription=h.m7,this.setAccDescription=h.EI,this.clear()}static{(0,i.K2)(this,"ArchitectureDB")}setDiagramId(a){this.diagramId=a}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",(0,h.IU)()}addService({id:a,icon:b,in:c,title:d,iconText:e}){if(void 0!==this.registeredIds[a])throw Error(`The service id [${a}] is already in use by another ${this.registeredIds[a]}`);if(void 0!==c){if(a===c)throw Error(`The service [${a}] cannot be placed within itself`);if(void 0===this.registeredIds[c])throw Error(`The service [${a}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[c])throw Error(`The service [${a}]'s parent is not a group`)}this.registeredIds[a]="node",this.nodes[a]={id:a,type:"service",icon:b,iconText:e,title:d,edges:[],in:c}}getServices(){return Object.values(this.nodes).filter(B)}addJunction({id:a,in:b}){if(void 0!==this.registeredIds[a])throw Error(`The junction id [${a}] is already in use by another ${this.registeredIds[a]}`);if(void 0!==b){if(a===b)throw Error(`The junction [${a}] cannot be placed within itself`);if(void 0===this.registeredIds[b])throw Error(`The junction [${a}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds[b])throw Error(`The junction [${a}]'s parent is not a group`)}this.registeredIds[a]="node",this.nodes[a]={id:a,type:"junction",edges:[],in:b}}getJunctions(){return Object.values(this.nodes).filter(C)}getNodes(){return Object.values(this.nodes)}getNode(a){return this.nodes[a]??null}addGroup({id:a,icon:b,in:c,title:d}){if(this.registeredIds?.[a]!==void 0)throw Error(`The group id [${a}] is already in use by another ${this.registeredIds[a]}`);if(void 0!==c){if(a===c)throw Error(`The group [${a}] cannot be placed within itself`);if(this.registeredIds?.[c]===void 0)throw Error(`The group [${a}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[c]==="node")throw Error(`The group [${a}]'s parent is not a group`)}this.registeredIds[a]="group",this.groups[a]={id:a,icon:b,title:d,in:c}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:a,rhsId:b,lhsDir:c,rhsDir:d,lhsInto:e,rhsInto:f,lhsGroup:g,rhsGroup:h,title:i}){if(!r(c))throw Error(`Invalid direction given for left hand side of edge ${a}--${b}. Expected (L,R,T,B) got ${String(c)}`);if(!r(d))throw Error(`Invalid direction given for right hand side of edge ${a}--${b}. Expected (L,R,T,B) got ${String(d)}`);if(void 0===this.nodes[a]&&void 0===this.groups[a])throw Error(`The left-hand id [${a}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[b]&&void 0===this.groups[b])throw Error(`The right-hand id [${b}] does not yet exist. Please create the service/group before declaring an edge to it.`);let j=this.nodes[a].in,k=this.nodes[b].in;if(g&&j&&k&&j==k)throw Error(`The left-hand id [${a}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(h&&j&&k&&j==k)throw Error(`The right-hand id [${b}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);this.edges.push({lhsId:a,lhsDir:c,lhsInto:e,lhsGroup:g,rhsId:b,rhsDir:d,rhsInto:f,rhsGroup:h,title:i}),this.nodes[a]&&this.nodes[b]&&(this.nodes[a].edges.push(this.edges[this.edges.length-1]),this.nodes[b].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){let a={},b=Object.entries(this.nodes).reduce((b,[c,d])=>(b[c]=d.edges.reduce((b,d)=>{let e=this.getNode(d.lhsId)?.in,f=this.getNode(d.rhsId)?.in;if(e&&f&&e!==f){let b=A(d.lhsDir,d.rhsDir);"bend"!==b&&(a[e]??={},a[e][f]=b,a[f]??={},a[f][e]=b)}if(d.lhsId===c){let a=x(d.lhsDir,d.rhsDir);a&&(b[a]=d.rhsId)}else{let a=x(d.rhsDir,d.lhsDir);a&&(b[a]=d.lhsId)}return b},{}),b),{}),c=Object.keys(b)[0],d={[c]:1},e=Object.keys(b).reduce((a,b)=>b===c?a:{...a,[b]:1},{}),f=(0,i.K2)(a=>{let c={[a]:[0,0]},f=[a];for(;f.length>0;){let a=f.shift();if(a){d[a]=1,delete e[a];let g=b[a],[h,i]=c[a];Object.entries(g).forEach(([a,b])=>{d[b]||(c[b]=y([h,i],a),f.push(b))})}}return c},"BFS"),g=[f(c)];for(;Object.keys(e).length>0;)g.push(f(Object.keys(e)[0]));this.dataStructures={adjList:b,spatialMaps:g,groupAlignments:a}}return this.dataStructures}setElementForId(a,b){this.elements[a]=b}getElementById(a){return this.elements[a]}getConfig(){return(0,g.$t)({...F,...(0,h.zj)().architecture})}getConfigField(a){return this.getConfig()[a]}},H=(0,i.K2)((a,b)=>{(0,f.S)(a,b),a.groups.map(a=>b.addGroup(a)),a.services.map(a=>b.addService({...a,type:"service"})),a.junctions.map(a=>b.addJunction({...a,type:"junction"})),a.edges.map(a=>b.addEdge(a))},"populateDb"),I={parser:{yy:void 0},parse:(0,i.K2)(async a=>{let b=await (0,j.qg)("architecture",a);i.Rm.debug(b);let c=I.parser?.yy;if(!(c instanceof G))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");H(b,c)},"parse")},J=(0,i.K2)(a=>`
|
|
2
2
|
.edge {
|
|
3
3
|
stroke-width: ${a.archEdgeWidth};
|
|
4
4
|
stroke: ${a.archEdgeColor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=6206,exports.ids=[6206],exports.modules={6206:(a,b,c)=>{c.d(b,{diagram:()=>ab});var d,e=c(39636),f=c(551),g=c(70400),h=c(65246),i=c(21143),j=c(69085),k=function(){var a=(0,i.K2)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,10,12,14,16,18,19,21,23],c=[2,6],d=[1,3],e=[1,5],f=[1,6],g=[1,7],h=[1,5,10,12,14,16,18,19,21,23,34,35,36],j=[1,25],k=[1,26],l=[1,28],m=[1,29],n=[1,30],o=[1,31],p=[1,32],q=[1,33],r=[1,34],s=[1,35],t=[1,36],u=[1,37],v=[1,43],w=[1,42],x=[1,47],y=[1,50],z=[1,10,12,14,16,18,19,21,23,34,35,36],A=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],B=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],C=[1,64],D={trace:(0,i.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:(0,i.K2)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 5:d.setOrientation(f[h]);break;case 9:d.setDiagramTitle(f[h].text.trim());break;case 12:d.setLineData({text:"",type:"text"},f[h]);break;case 13:d.setLineData(f[h-1],f[h]);break;case 14:d.setBarData({text:"",type:"text"},f[h]);break;case 15:d.setBarData(f[h-1],f[h]);break;case 16:this.$=f[h].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=f[h].trim(),d.setAccDescription(this.$);break;case 19:case 27:this.$=f[h-1];break;case 20:this.$=[Number(f[h-2]),...f[h]];break;case 21:this.$=[Number(f[h])];break;case 22:d.setXAxisTitle(f[h]);break;case 23:d.setXAxisTitle(f[h-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(f[h]);break;case 26:d.setXAxisRangeData(Number(f[h-2]),Number(f[h]));break;case 28:this.$=[f[h-2],...f[h]];break;case 29:this.$=[f[h]];break;case 30:d.setYAxisTitle(f[h]);break;case 31:d.setYAxisTitle(f[h-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(f[h-2]),Number(f[h]));break;case 37:case 38:this.$={text:f[h],type:"text"};break;case 39:this.$={text:f[h],type:"markdown"};break;case 40:this.$=f[h];break;case 41:this.$=f[h-1]+""+f[h]}},"anonymous"),table:[a(b,c,{3:1,4:2,7:4,5:d,34:e,35:f,36:g}),{1:[3]},a(b,c,{4:2,7:4,3:8,5:d,34:e,35:f,36:g}),a(b,c,{4:2,7:4,6:9,3:10,5:d,8:[1,11],34:e,35:f,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},a(h,[2,34]),a(h,[2,35]),a(h,[2,36]),{1:[2,1]},a(b,c,{4:2,7:4,3:21,5:d,34:e,35:f,36:g}),{1:[2,3]},a(h,[2,5]),a(b,[2,7],{4:22,34:e,35:f,36:g}),{11:23,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:39,13:38,24:v,27:w,29:40,30:41,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:45,15:44,27:x,33:46,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:49,17:48,24:y,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:52,17:51,24:y,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{20:[1,53]},{22:[1,54]},a(z,[2,18]),{1:[2,2]},a(z,[2,8]),a(z,[2,9]),a(A,[2,37],{40:55,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u}),a(A,[2,38]),a(A,[2,39]),a(B,[2,40]),a(B,[2,42]),a(B,[2,43]),a(B,[2,44]),a(B,[2,45]),a(B,[2,46]),a(B,[2,47]),a(B,[2,48]),a(B,[2,49]),a(B,[2,50]),a(B,[2,51]),a(z,[2,10]),a(z,[2,22],{30:41,29:56,24:v,27:w}),a(z,[2,24]),a(z,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},a(z,[2,11]),a(z,[2,30],{33:60,27:x}),a(z,[2,32]),{31:[1,61]},a(z,[2,12]),{17:62,24:y},{25:63,27:C},a(z,[2,14]),{17:65,24:y},a(z,[2,16]),a(z,[2,17]),a(B,[2,41]),a(z,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},a(z,[2,31]),{27:[1,69]},a(z,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},a(z,[2,15]),a(z,[2,26]),a(z,[2,27]),{11:59,32:72,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},a(z,[2,33]),a(z,[2,19]),{25:73,27:C},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:(0,i.K2)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,i.K2)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",j=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,i.K2)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,h=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,k,j,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function E(){this.yy={}}return D.lexer={EOF:1,parseError:(0,i.K2)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,i.K2)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,i.K2)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,i.K2)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,i.K2)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,i.K2)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,i.K2)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,i.K2)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,i.K2)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,i.K2)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(a,b,c,d){switch(c){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}},(0,i.K2)(E,"Parser"),E.prototype=D,D.Parser=E,new E}();function l(a){return"bar"===a.type}function m(a){return"band"===a.type}function n(a){return"linear"===a.type}k.parser=k,(0,i.K2)(l,"isBarPlot"),(0,i.K2)(m,"isBandAxisData"),(0,i.K2)(n,"isLinearAxisData");var o=class{constructor(a){this.parentGroup=a}static{(0,i.K2)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(a,b){if(!this.parentGroup)return{width:a.reduce((a,b)=>Math.max(b.length,a),0)*b,height:b};let c={width:0,height:0},d=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",b);for(let e of a){let a=(0,f.W6)(d,1,e),g=a?a.width:e.length*b,h=a?a.height:b;c.width=Math.max(c.width,g),c.height=Math.max(c.height,h)}return d.remove(),c}},p=class{constructor(a,b,c,d){this.axisConfig=a,this.title=b,this.textDimensionCalculator=c,this.axisThemeConfig=d,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{(0,i.K2)(this,"BaseAxis")}setRange(a){this.range=a,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=a[1]-a[0]:this.boundingRect.width=a[1]-a[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(a){this.axisPosition=a,this.setRange(this.range)}getTickDistance(){let a=this.getRange();return Math.abs(a[0]-a[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(a=>a.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(a){let b=a.height;if(this.axisConfig.showAxisLine&&b>this.axisConfig.axisLineWidth&&(b-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let c=this.getLabelDimension(),d=.2*a.width;this.outerPadding=Math.min(c.width/2,d);let e=c.height+2*this.axisConfig.labelPadding;this.labelTextHeight=c.height,e<=b&&(b-=e,this.showLabel=!0)}if(this.axisConfig.showTick&&b>=this.axisConfig.tickLength&&(this.showTick=!0,b-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),c=a.height+2*this.axisConfig.titlePadding;this.titleTextHeight=a.height,c<=b&&(b-=c,this.showTitle=!0)}this.boundingRect.width=a.width,this.boundingRect.height=a.height-b}calculateSpaceIfDrawnVertical(a){let b=a.width;if(this.axisConfig.showAxisLine&&b>this.axisConfig.axisLineWidth&&(b-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let c=this.getLabelDimension(),d=.2*a.height;this.outerPadding=Math.min(c.height/2,d);let e=c.width+2*this.axisConfig.labelPadding;e<=b&&(b-=e,this.showLabel=!0)}if(this.axisConfig.showTick&&b>=this.axisConfig.tickLength&&(this.showTick=!0,b-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),c=a.height+2*this.axisConfig.titlePadding;this.titleTextHeight=a.height,c<=b&&(b-=c,this.showTitle=!0)}this.boundingRect.width=a.width-b,this.boundingRect.height=a.height}calculateSpace(a){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(a):this.calculateSpaceIfDrawnHorizontally(a),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}getDrawableElementsForLeftAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${b},${this.boundingRect.y} L ${b},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(a),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let b=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);a.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${b},${this.getScaleValue(a)} L ${b-this.axisConfig.tickLength},${this.getScaleValue(a)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),a}getDrawableElementsForBottomAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.y+this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${b} L ${this.boundingRect.x+this.boundingRect.width},${b}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.getScaleValue(a),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let b=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);a.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${b} L ${this.getScaleValue(a)},${b+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),a}getDrawableElementsForTopAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${b} L ${this.boundingRect.x+this.boundingRect.width},${b}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.getScaleValue(a),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let b=this.boundingRect.y;a.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${b+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(a)},${b+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),a}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},q=class extends p{static{(0,i.K2)(this,"BandAxis")}constructor(a,b,c,d,e){super(a,d,e,b),this.categories=c,this.scale=(0,j.WH)().domain(this.categories).range(this.getRange())}setRange(a){super.setRange(a)}recalculateScale(){this.scale=(0,j.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),i.Rm.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(a){return this.scale(a)??this.getRange()[0]}},r=class extends p{static{(0,i.K2)(this,"LinearAxis")}constructor(a,b,c,d,e){super(a,d,e,b),this.domain=c,this.scale=(0,j.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let a=[...this.domain];"left"===this.axisPosition&&a.reverse(),this.scale=(0,j.m4Y)().domain(a).range(this.getRange())}getScaleValue(a){return this.scale(a)}};function s(a,b,c,d){let e=new o(d);return m(a)?new q(b,c,a.categories,a.title,e):new r(b,c,[a.min,a.max],a.title,e)}(0,i.K2)(s,"getAxis");var t=class{constructor(a,b,c,d){this.textDimensionCalculator=a,this.chartConfig=b,this.chartData=c,this.chartThemeConfig=d,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,i.K2)(this,"ChartTitle")}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateSpace(a){let b=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),c=Math.max(b.width,a.width),d=b.height+2*this.chartConfig.titlePadding;return b.width<=c&&b.height<=d&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=c,this.boundingRect.height=d,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let a=[];return this.showChartTitle&&a.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),a}};function u(a,b,c,d){return new t(new o(d),a,b,c)}(0,i.K2)(u,"getChartTitleComponent");var v=class{constructor(a,b,c,d,e){this.plotData=a,this.xAxis=b,this.yAxis=c,this.orientation=d,this.plotIndex=e}static{(0,i.K2)(this,"LinePlot")}getDrawableElement(){let a,b=this.plotData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]);return(a="horizontal"===this.orientation?(0,j.n8j)().y(a=>a[0]).x(a=>a[1])(b):(0,j.n8j)().x(a=>a[0]).y(a=>a[1])(b))?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:a,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},w=class{constructor(a,b,c,d,e,f){this.barData=a,this.boundingRect=b,this.xAxis=c,this.yAxis=d,this.orientation=e,this.plotIndex=f}static{(0,i.K2)(this,"BarPlot")}getDrawableElement(){let a=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),b=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),c=b/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:a.map(a=>({x:this.boundingRect.x,y:a[0]-c,height:b,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:a.map(a=>({x:a[0]-c,y:a[1],width:b,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},x=class{constructor(a,b,c){this.chartConfig=a,this.chartData=b,this.chartThemeConfig=c,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,i.K2)(this,"BasePlot")}setAxes(a,b){this.xAxis=a,this.yAxis=b}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateSpace(a){return this.boundingRect.width=a.width,this.boundingRect.height=a.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let a=[];for(let[b,c]of this.chartData.plots.entries())switch(c.type){case"line":{let d=new v(c,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,b);a.push(...d.getDrawableElement())}break;case"bar":{let d=new w(c,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,b);a.push(...d.getDrawableElement())}}return a}};function y(a,b,c){return new x(a,b,c)}(0,i.K2)(y,"getPlotComponent");var z=class{constructor(a,b,c,d){this.chartConfig=a,this.chartData=b,this.componentStore={title:u(a,b,c,d),plot:y(a,b,c),xAxis:s(b.xAxis,a.xAxis,{titleColor:c.xAxisTitleColor,labelColor:c.xAxisLabelColor,tickColor:c.xAxisTickColor,axisLineColor:c.xAxisLineColor},d),yAxis:s(b.yAxis,a.yAxis,{titleColor:c.yAxisTitleColor,labelColor:c.yAxisLabelColor,tickColor:c.yAxisTickColor,axisLineColor:c.yAxisLineColor},d)}}static{(0,i.K2)(this,"Orchestrator")}calculateVerticalSpace(){let a=this.chartConfig.width,b=this.chartConfig.height,c=0,d=0,e=Math.floor(a*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(b*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:e,height:f});a-=g.width,b-=g.height,d=(g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:b})).height,b-=g.height,this.componentStore.xAxis.setAxisPosition("bottom"),g=this.componentStore.xAxis.calculateSpace({width:a,height:b}),b-=g.height,this.componentStore.yAxis.setAxisPosition("left"),c=(g=this.componentStore.yAxis.calculateSpace({width:a,height:b})).width,(a-=g.width)>0&&(e+=a,a=0),b>0&&(f+=b,b=0),this.componentStore.plot.calculateSpace({width:e,height:f}),this.componentStore.plot.setBoundingBoxXY({x:c,y:d}),this.componentStore.xAxis.setRange([c,c+e]),this.componentStore.xAxis.setBoundingBoxXY({x:c,y:d+f}),this.componentStore.yAxis.setRange([d,d+f]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:d}),this.chartData.plots.some(a=>l(a))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let a=this.chartConfig.width,b=this.chartConfig.height,c=0,d=0,e=0,f=Math.floor(a*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(b*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:f,height:g});a-=h.width,b-=h.height,c=(h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:b})).height,b-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:a,height:b}),a-=h.width,d=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:a,height:b}),b-=h.height,e=c+h.height,a>0&&(f+=a,a=0),b>0&&(g+=b,b=0),this.componentStore.plot.calculateSpace({width:f,height:g}),this.componentStore.plot.setBoundingBoxXY({x:d,y:e}),this.componentStore.yAxis.setRange([d,d+f]),this.componentStore.yAxis.setBoundingBoxXY({x:d,y:c}),this.componentStore.xAxis.setRange([e,e+g]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:e}),this.chartData.plots.some(a=>l(a))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let a=[];for(let b of(this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis),Object.values(this.componentStore)))a.push(...b.getDrawableElements());return a}},A=class{static{(0,i.K2)(this,"XYChartBuilder")}static build(a,b,c,d){return new z(a,b,c,d).getDrawableElement()}},B=0,C=J(),D=I(),E=K(),F=D.plotColorPalette.split(",").map(a=>a.trim()),G=!1,H=!1;function I(){let a=(0,h.P$)(),b=(0,h.zj)();return(0,g.$t)(a.xyChart,b.themeVariables.xyChart)}function J(){let a=(0,h.zj)();return(0,g.$t)(h.UI.xyChart,a.xyChart)}function K(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function L(a){let b=(0,h.zj)();return(0,h.jZ)(a.trim(),b)}function M(a){d=a}function N(a){"horizontal"===a?C.chartOrientation="horizontal":C.chartOrientation="vertical"}function O(a){E.xAxis.title=L(a.text)}function P(a,b){E.xAxis={type:"linear",title:E.xAxis.title,min:a,max:b},G=!0}function Q(a){E.xAxis={type:"band",title:E.xAxis.title,categories:a.map(a=>L(a.text))},G=!0}function R(a){E.yAxis.title=L(a.text)}function S(a,b){E.yAxis={type:"linear",title:E.yAxis.title,min:a,max:b},H=!0}function T(a){let b=Math.min(...a),c=Math.max(...a),d=n(E.yAxis)?E.yAxis.min:1/0,e=n(E.yAxis)?E.yAxis.max:-1/0;E.yAxis={type:"linear",title:E.yAxis.title,min:Math.min(d,b),max:Math.max(e,c)}}function U(a){let b=[];if(0===a.length)return b;if(G||P(Math.min(n(E.xAxis)?E.xAxis.min:1/0,1),Math.max(n(E.xAxis)?E.xAxis.max:-1/0,a.length)),H||T(a),m(E.xAxis)&&(b=E.xAxis.categories.map((b,c)=>[b,a[c]])),n(E.xAxis)){let c=E.xAxis.min,d=E.xAxis.max,e=(d-c)/(a.length-1),f=[];for(let a=c;a<=d;a+=e)f.push(`${a}`);b=f.map((b,c)=>[b,a[c]])}return b}function V(a){return F[0===a?0:a%F.length]}function W(a,b){let c=U(b);E.plots.push({type:"line",strokeFill:V(B),strokeWidth:2,data:c}),B++}function X(a,b){let c=U(b);E.plots.push({type:"bar",fill:V(B),data:c}),B++}function Y(){if(0===E.plots.length)throw Error("No Plot to render, please provide a plot with some data");return E.title=(0,h.ab)(),A.build(C,E,D,d)}function Z(){return D}function $(){return C}function _(){return E}(0,i.K2)(I,"getChartDefaultThemeConfig"),(0,i.K2)(J,"getChartDefaultConfig"),(0,i.K2)(K,"getChartDefaultData"),(0,i.K2)(L,"textSanitizer"),(0,i.K2)(M,"setTmpSVGG"),(0,i.K2)(N,"setOrientation"),(0,i.K2)(O,"setXAxisTitle"),(0,i.K2)(P,"setXAxisRangeData"),(0,i.K2)(Q,"setXAxisBand"),(0,i.K2)(R,"setYAxisTitle"),(0,i.K2)(S,"setYAxisRangeData"),(0,i.K2)(T,"setYAxisRangeFromPlotData"),(0,i.K2)(U,"transformDataWithoutCategory"),(0,i.K2)(V,"getPlotColorFromPalette"),(0,i.K2)(W,"setLineData"),(0,i.K2)(X,"setBarData"),(0,i.K2)(Y,"getDrawableElem"),(0,i.K2)(Z,"getChartThemeConfig"),(0,i.K2)($,"getChartConfig"),(0,i.K2)(_,"getXYChartData");var aa={getDrawableElem:Y,clear:(0,i.K2)(function(){(0,h.IU)(),B=0,C=J(),E=K(),F=(D=I()).plotColorPalette.split(",").map(a=>a.trim()),G=!1,H=!1},"clear"),setAccTitle:h.SV,getAccTitle:h.iN,setDiagramTitle:h.ke,getDiagramTitle:h.ab,getAccDescription:h.m7,setAccDescription:h.EI,setOrientation:N,setXAxisTitle:O,setXAxisRangeData:P,setXAxisBand:Q,setYAxisTitle:R,setYAxisRangeData:S,setLineData:W,setBarData:X,setTmpSVGG:M,getChartThemeConfig:Z,getChartConfig:$,getXYChartData:_},ab={parser:k,db:aa,renderer:{draw:(0,i.K2)((a,b,c,d)=>{let f=d.db,g=f.getChartThemeConfig(),j=f.getChartConfig(),k=f.getXYChartData().plots[0].data.map(a=>a[1]);function l(a){return"top"===a?"text-before-edge":"middle"}function m(a){return"left"===a?"start":"right"===a?"end":"middle"}function n(a){return`translate(${a.x}, ${a.y}) rotate(${a.rotation||0})`}(0,i.K2)(l,"getDominantBaseLine"),(0,i.K2)(m,"getTextAnchor"),(0,i.K2)(n,"getTextTransformation"),i.Rm.debug("Rendering xychart chart\n"+a);let o=(0,e.D)(b),p=o.append("g").attr("class","main"),q=p.append("rect").attr("width",j.width).attr("height",j.height).attr("class","background");(0,h.a$)(o,j.height,j.width,!0),o.attr("viewBox",`0 0 ${j.width} ${j.height}`),q.attr("fill",g.backgroundColor),f.setTmpSVGG(o.append("g").attr("class","mermaid-tmp-group"));let r=f.getDrawableElem(),s={};function t(a){let b=p,c="";for(let[d]of a.entries()){let e=p;d>0&&s[c]&&(e=s[c]),c+=a[d],(b=s[c])||(b=s[c]=e.append("g").attr("class",a[d]))}return b}for(let a of((0,i.K2)(t,"getGroup"),r)){if(0===a.data.length)continue;let b=t(a.groupTexts);switch(a.type){case"rect":if(b.selectAll("rect").data(a.data).enter().append("rect").attr("x",a=>a.x).attr("y",a=>a.y).attr("width",a=>a.width).attr("height",a=>a.height).attr("fill",a=>a.fill).attr("stroke",a=>a.strokeFill).attr("stroke-width",a=>a.strokeWidth),j.showDataLabel){let c=j.showDataLabelOutsideBar;if("horizontal"===j.chartOrientation){let d=function(a,b){let{data:c,label:d}=a;return b*d.length*e<=c.width-f};(0,i.K2)(d,"fitsHorizontally");let e=.7,f=10,h=a.data.map((a,b)=>({data:a,label:k[b].toString()})).filter(a=>a.data.width>0&&a.data.height>0),j=Math.floor(Math.min(...h.map(a=>{let{data:b}=a,c=.7*b.height;for(;!d(a,c)&&c>0;)c-=1;return c}))),l=(0,i.K2)(a=>c?a.data.x+a.data.width+f:a.data.x+a.data.width-f,"determineLabelXPosition");b.selectAll("text").data(h).enter().append("text").attr("x",l).attr("y",a=>a.data.y+a.data.height/2).attr("text-anchor",c?"start":"end").attr("dominant-baseline","middle").attr("fill",g.dataLabelColor).attr("font-size",`${j}px`).text(a=>a.label)}else{let d=function(a,b,c){let{data:d,label:e}=a,f=b*e.length*.7,g=d.x+d.width/2,h=g-f/2,i=g+f/2,j=h>=d.x&&i<=d.x+d.width,k=d.y+c+b<=d.y+d.height;return j&&k};(0,i.K2)(d,"fitsInBar");let e=a.data.map((a,b)=>({data:a,label:k[b].toString()})).filter(a=>a.data.width>0&&a.data.height>0),f=Math.floor(Math.min(...e.map(a=>{let{data:b,label:c}=a,e=b.width/(.7*c.length);for(;!d(a,e,10)&&e>0;)e-=1;return e}))),h=(0,i.K2)(a=>c?a.data.y-10:a.data.y+10,"determineLabelYPosition");b.selectAll("text").data(e).enter().append("text").attr("x",a=>a.data.x+a.data.width/2).attr("y",h).attr("text-anchor","middle").attr("dominant-baseline",c?"auto":"hanging").attr("fill",g.dataLabelColor).attr("font-size",`${f}px`).text(a=>a.label)}}break;case"text":b.selectAll("text").data(a.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",a=>a.fill).attr("font-size",a=>a.fontSize).attr("dominant-baseline",a=>l(a.verticalPos)).attr("text-anchor",a=>m(a.horizontalPos)).attr("transform",a=>n(a)).text(a=>a.text);break;case"path":b.selectAll("path").data(a.data).enter().append("path").attr("d",a=>a.path).attr("fill",a=>a.fill?a.fill:"none").attr("stroke",a=>a.strokeFill).attr("stroke-width",a=>a.strokeWidth)}}},"draw")}}}};
|
|
1
|
+
"use strict";exports.id=6206,exports.ids=[6206],exports.modules={6206:(a,b,c)=>{c.d(b,{diagram:()=>ab});var d,e=c(39636),f=c(31792),g=c(70400),h=c(65246),i=c(21143),j=c(69085),k=function(){var a=(0,i.K2)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,10,12,14,16,18,19,21,23],c=[2,6],d=[1,3],e=[1,5],f=[1,6],g=[1,7],h=[1,5,10,12,14,16,18,19,21,23,34,35,36],j=[1,25],k=[1,26],l=[1,28],m=[1,29],n=[1,30],o=[1,31],p=[1,32],q=[1,33],r=[1,34],s=[1,35],t=[1,36],u=[1,37],v=[1,43],w=[1,42],x=[1,47],y=[1,50],z=[1,10,12,14,16,18,19,21,23,34,35,36],A=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],B=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],C=[1,64],D={trace:(0,i.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:(0,i.K2)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 5:d.setOrientation(f[h]);break;case 9:d.setDiagramTitle(f[h].text.trim());break;case 12:d.setLineData({text:"",type:"text"},f[h]);break;case 13:d.setLineData(f[h-1],f[h]);break;case 14:d.setBarData({text:"",type:"text"},f[h]);break;case 15:d.setBarData(f[h-1],f[h]);break;case 16:this.$=f[h].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=f[h].trim(),d.setAccDescription(this.$);break;case 19:case 27:this.$=f[h-1];break;case 20:this.$=[Number(f[h-2]),...f[h]];break;case 21:this.$=[Number(f[h])];break;case 22:d.setXAxisTitle(f[h]);break;case 23:d.setXAxisTitle(f[h-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(f[h]);break;case 26:d.setXAxisRangeData(Number(f[h-2]),Number(f[h]));break;case 28:this.$=[f[h-2],...f[h]];break;case 29:this.$=[f[h]];break;case 30:d.setYAxisTitle(f[h]);break;case 31:d.setYAxisTitle(f[h-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(f[h-2]),Number(f[h]));break;case 37:case 38:this.$={text:f[h],type:"text"};break;case 39:this.$={text:f[h],type:"markdown"};break;case 40:this.$=f[h];break;case 41:this.$=f[h-1]+""+f[h]}},"anonymous"),table:[a(b,c,{3:1,4:2,7:4,5:d,34:e,35:f,36:g}),{1:[3]},a(b,c,{4:2,7:4,3:8,5:d,34:e,35:f,36:g}),a(b,c,{4:2,7:4,6:9,3:10,5:d,8:[1,11],34:e,35:f,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},a(h,[2,34]),a(h,[2,35]),a(h,[2,36]),{1:[2,1]},a(b,c,{4:2,7:4,3:21,5:d,34:e,35:f,36:g}),{1:[2,3]},a(h,[2,5]),a(b,[2,7],{4:22,34:e,35:f,36:g}),{11:23,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:39,13:38,24:v,27:w,29:40,30:41,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:45,15:44,27:x,33:46,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:49,17:48,24:y,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:52,17:51,24:y,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{20:[1,53]},{22:[1,54]},a(z,[2,18]),{1:[2,2]},a(z,[2,8]),a(z,[2,9]),a(A,[2,37],{40:55,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u}),a(A,[2,38]),a(A,[2,39]),a(B,[2,40]),a(B,[2,42]),a(B,[2,43]),a(B,[2,44]),a(B,[2,45]),a(B,[2,46]),a(B,[2,47]),a(B,[2,48]),a(B,[2,49]),a(B,[2,50]),a(B,[2,51]),a(z,[2,10]),a(z,[2,22],{30:41,29:56,24:v,27:w}),a(z,[2,24]),a(z,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},a(z,[2,11]),a(z,[2,30],{33:60,27:x}),a(z,[2,32]),{31:[1,61]},a(z,[2,12]),{17:62,24:y},{25:63,27:C},a(z,[2,14]),{17:65,24:y},a(z,[2,16]),a(z,[2,17]),a(B,[2,41]),a(z,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},a(z,[2,31]),{27:[1,69]},a(z,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},a(z,[2,15]),a(z,[2,26]),a(z,[2,27]),{11:59,32:72,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},a(z,[2,33]),a(z,[2,19]),{25:73,27:C},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:(0,i.K2)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,i.K2)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",j=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,i.K2)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,h=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,k,j,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function E(){this.yy={}}return D.lexer={EOF:1,parseError:(0,i.K2)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,i.K2)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,i.K2)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,i.K2)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,i.K2)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,i.K2)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,i.K2)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,i.K2)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,i.K2)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,i.K2)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(a,b,c,d){switch(c){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}},(0,i.K2)(E,"Parser"),E.prototype=D,D.Parser=E,new E}();function l(a){return"bar"===a.type}function m(a){return"band"===a.type}function n(a){return"linear"===a.type}k.parser=k,(0,i.K2)(l,"isBarPlot"),(0,i.K2)(m,"isBandAxisData"),(0,i.K2)(n,"isLinearAxisData");var o=class{constructor(a){this.parentGroup=a}static{(0,i.K2)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(a,b){if(!this.parentGroup)return{width:a.reduce((a,b)=>Math.max(b.length,a),0)*b,height:b};let c={width:0,height:0},d=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",b);for(let e of a){let a=(0,f.W6)(d,1,e),g=a?a.width:e.length*b,h=a?a.height:b;c.width=Math.max(c.width,g),c.height=Math.max(c.height,h)}return d.remove(),c}},p=class{constructor(a,b,c,d){this.axisConfig=a,this.title=b,this.textDimensionCalculator=c,this.axisThemeConfig=d,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{(0,i.K2)(this,"BaseAxis")}setRange(a){this.range=a,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=a[1]-a[0]:this.boundingRect.width=a[1]-a[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(a){this.axisPosition=a,this.setRange(this.range)}getTickDistance(){let a=this.getRange();return Math.abs(a[0]-a[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(a=>a.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(a){let b=a.height;if(this.axisConfig.showAxisLine&&b>this.axisConfig.axisLineWidth&&(b-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let c=this.getLabelDimension(),d=.2*a.width;this.outerPadding=Math.min(c.width/2,d);let e=c.height+2*this.axisConfig.labelPadding;this.labelTextHeight=c.height,e<=b&&(b-=e,this.showLabel=!0)}if(this.axisConfig.showTick&&b>=this.axisConfig.tickLength&&(this.showTick=!0,b-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),c=a.height+2*this.axisConfig.titlePadding;this.titleTextHeight=a.height,c<=b&&(b-=c,this.showTitle=!0)}this.boundingRect.width=a.width,this.boundingRect.height=a.height-b}calculateSpaceIfDrawnVertical(a){let b=a.width;if(this.axisConfig.showAxisLine&&b>this.axisConfig.axisLineWidth&&(b-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let c=this.getLabelDimension(),d=.2*a.height;this.outerPadding=Math.min(c.height/2,d);let e=c.width+2*this.axisConfig.labelPadding;e<=b&&(b-=e,this.showLabel=!0)}if(this.axisConfig.showTick&&b>=this.axisConfig.tickLength&&(this.showTick=!0,b-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),c=a.height+2*this.axisConfig.titlePadding;this.titleTextHeight=a.height,c<=b&&(b-=c,this.showTitle=!0)}this.boundingRect.width=a.width-b,this.boundingRect.height=a.height}calculateSpace(a){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(a):this.calculateSpaceIfDrawnHorizontally(a),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}getDrawableElementsForLeftAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${b},${this.boundingRect.y} L ${b},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(a),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let b=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);a.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${b},${this.getScaleValue(a)} L ${b-this.axisConfig.tickLength},${this.getScaleValue(a)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),a}getDrawableElementsForBottomAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.y+this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${b} L ${this.boundingRect.x+this.boundingRect.width},${b}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.getScaleValue(a),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let b=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);a.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${b} L ${this.getScaleValue(a)},${b+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),a}getDrawableElementsForTopAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${b} L ${this.boundingRect.x+this.boundingRect.width},${b}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.getScaleValue(a),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let b=this.boundingRect.y;a.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${b+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(a)},${b+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),a}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},q=class extends p{static{(0,i.K2)(this,"BandAxis")}constructor(a,b,c,d,e){super(a,d,e,b),this.categories=c,this.scale=(0,j.WH)().domain(this.categories).range(this.getRange())}setRange(a){super.setRange(a)}recalculateScale(){this.scale=(0,j.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),i.Rm.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(a){return this.scale(a)??this.getRange()[0]}},r=class extends p{static{(0,i.K2)(this,"LinearAxis")}constructor(a,b,c,d,e){super(a,d,e,b),this.domain=c,this.scale=(0,j.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let a=[...this.domain];"left"===this.axisPosition&&a.reverse(),this.scale=(0,j.m4Y)().domain(a).range(this.getRange())}getScaleValue(a){return this.scale(a)}};function s(a,b,c,d){let e=new o(d);return m(a)?new q(b,c,a.categories,a.title,e):new r(b,c,[a.min,a.max],a.title,e)}(0,i.K2)(s,"getAxis");var t=class{constructor(a,b,c,d){this.textDimensionCalculator=a,this.chartConfig=b,this.chartData=c,this.chartThemeConfig=d,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,i.K2)(this,"ChartTitle")}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateSpace(a){let b=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),c=Math.max(b.width,a.width),d=b.height+2*this.chartConfig.titlePadding;return b.width<=c&&b.height<=d&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=c,this.boundingRect.height=d,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let a=[];return this.showChartTitle&&a.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),a}};function u(a,b,c,d){return new t(new o(d),a,b,c)}(0,i.K2)(u,"getChartTitleComponent");var v=class{constructor(a,b,c,d,e){this.plotData=a,this.xAxis=b,this.yAxis=c,this.orientation=d,this.plotIndex=e}static{(0,i.K2)(this,"LinePlot")}getDrawableElement(){let a,b=this.plotData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]);return(a="horizontal"===this.orientation?(0,j.n8j)().y(a=>a[0]).x(a=>a[1])(b):(0,j.n8j)().x(a=>a[0]).y(a=>a[1])(b))?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:a,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},w=class{constructor(a,b,c,d,e,f){this.barData=a,this.boundingRect=b,this.xAxis=c,this.yAxis=d,this.orientation=e,this.plotIndex=f}static{(0,i.K2)(this,"BarPlot")}getDrawableElement(){let a=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),b=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),c=b/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:a.map(a=>({x:this.boundingRect.x,y:a[0]-c,height:b,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:a.map(a=>({x:a[0]-c,y:a[1],width:b,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},x=class{constructor(a,b,c){this.chartConfig=a,this.chartData=b,this.chartThemeConfig=c,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,i.K2)(this,"BasePlot")}setAxes(a,b){this.xAxis=a,this.yAxis=b}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateSpace(a){return this.boundingRect.width=a.width,this.boundingRect.height=a.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let a=[];for(let[b,c]of this.chartData.plots.entries())switch(c.type){case"line":{let d=new v(c,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,b);a.push(...d.getDrawableElement())}break;case"bar":{let d=new w(c,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,b);a.push(...d.getDrawableElement())}}return a}};function y(a,b,c){return new x(a,b,c)}(0,i.K2)(y,"getPlotComponent");var z=class{constructor(a,b,c,d){this.chartConfig=a,this.chartData=b,this.componentStore={title:u(a,b,c,d),plot:y(a,b,c),xAxis:s(b.xAxis,a.xAxis,{titleColor:c.xAxisTitleColor,labelColor:c.xAxisLabelColor,tickColor:c.xAxisTickColor,axisLineColor:c.xAxisLineColor},d),yAxis:s(b.yAxis,a.yAxis,{titleColor:c.yAxisTitleColor,labelColor:c.yAxisLabelColor,tickColor:c.yAxisTickColor,axisLineColor:c.yAxisLineColor},d)}}static{(0,i.K2)(this,"Orchestrator")}calculateVerticalSpace(){let a=this.chartConfig.width,b=this.chartConfig.height,c=0,d=0,e=Math.floor(a*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(b*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:e,height:f});a-=g.width,b-=g.height,d=(g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:b})).height,b-=g.height,this.componentStore.xAxis.setAxisPosition("bottom"),g=this.componentStore.xAxis.calculateSpace({width:a,height:b}),b-=g.height,this.componentStore.yAxis.setAxisPosition("left"),c=(g=this.componentStore.yAxis.calculateSpace({width:a,height:b})).width,(a-=g.width)>0&&(e+=a,a=0),b>0&&(f+=b,b=0),this.componentStore.plot.calculateSpace({width:e,height:f}),this.componentStore.plot.setBoundingBoxXY({x:c,y:d}),this.componentStore.xAxis.setRange([c,c+e]),this.componentStore.xAxis.setBoundingBoxXY({x:c,y:d+f}),this.componentStore.yAxis.setRange([d,d+f]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:d}),this.chartData.plots.some(a=>l(a))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let a=this.chartConfig.width,b=this.chartConfig.height,c=0,d=0,e=0,f=Math.floor(a*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(b*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:f,height:g});a-=h.width,b-=h.height,c=(h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:b})).height,b-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:a,height:b}),a-=h.width,d=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:a,height:b}),b-=h.height,e=c+h.height,a>0&&(f+=a,a=0),b>0&&(g+=b,b=0),this.componentStore.plot.calculateSpace({width:f,height:g}),this.componentStore.plot.setBoundingBoxXY({x:d,y:e}),this.componentStore.yAxis.setRange([d,d+f]),this.componentStore.yAxis.setBoundingBoxXY({x:d,y:c}),this.componentStore.xAxis.setRange([e,e+g]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:e}),this.chartData.plots.some(a=>l(a))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let a=[];for(let b of(this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis),Object.values(this.componentStore)))a.push(...b.getDrawableElements());return a}},A=class{static{(0,i.K2)(this,"XYChartBuilder")}static build(a,b,c,d){return new z(a,b,c,d).getDrawableElement()}},B=0,C=J(),D=I(),E=K(),F=D.plotColorPalette.split(",").map(a=>a.trim()),G=!1,H=!1;function I(){let a=(0,h.P$)(),b=(0,h.zj)();return(0,g.$t)(a.xyChart,b.themeVariables.xyChart)}function J(){let a=(0,h.zj)();return(0,g.$t)(h.UI.xyChart,a.xyChart)}function K(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function L(a){let b=(0,h.zj)();return(0,h.jZ)(a.trim(),b)}function M(a){d=a}function N(a){"horizontal"===a?C.chartOrientation="horizontal":C.chartOrientation="vertical"}function O(a){E.xAxis.title=L(a.text)}function P(a,b){E.xAxis={type:"linear",title:E.xAxis.title,min:a,max:b},G=!0}function Q(a){E.xAxis={type:"band",title:E.xAxis.title,categories:a.map(a=>L(a.text))},G=!0}function R(a){E.yAxis.title=L(a.text)}function S(a,b){E.yAxis={type:"linear",title:E.yAxis.title,min:a,max:b},H=!0}function T(a){let b=Math.min(...a),c=Math.max(...a),d=n(E.yAxis)?E.yAxis.min:1/0,e=n(E.yAxis)?E.yAxis.max:-1/0;E.yAxis={type:"linear",title:E.yAxis.title,min:Math.min(d,b),max:Math.max(e,c)}}function U(a){let b=[];if(0===a.length)return b;if(G||P(Math.min(n(E.xAxis)?E.xAxis.min:1/0,1),Math.max(n(E.xAxis)?E.xAxis.max:-1/0,a.length)),H||T(a),m(E.xAxis)&&(b=E.xAxis.categories.map((b,c)=>[b,a[c]])),n(E.xAxis)){let c=E.xAxis.min,d=E.xAxis.max,e=(d-c)/(a.length-1),f=[];for(let a=c;a<=d;a+=e)f.push(`${a}`);b=f.map((b,c)=>[b,a[c]])}return b}function V(a){return F[0===a?0:a%F.length]}function W(a,b){let c=U(b);E.plots.push({type:"line",strokeFill:V(B),strokeWidth:2,data:c}),B++}function X(a,b){let c=U(b);E.plots.push({type:"bar",fill:V(B),data:c}),B++}function Y(){if(0===E.plots.length)throw Error("No Plot to render, please provide a plot with some data");return E.title=(0,h.ab)(),A.build(C,E,D,d)}function Z(){return D}function $(){return C}function _(){return E}(0,i.K2)(I,"getChartDefaultThemeConfig"),(0,i.K2)(J,"getChartDefaultConfig"),(0,i.K2)(K,"getChartDefaultData"),(0,i.K2)(L,"textSanitizer"),(0,i.K2)(M,"setTmpSVGG"),(0,i.K2)(N,"setOrientation"),(0,i.K2)(O,"setXAxisTitle"),(0,i.K2)(P,"setXAxisRangeData"),(0,i.K2)(Q,"setXAxisBand"),(0,i.K2)(R,"setYAxisTitle"),(0,i.K2)(S,"setYAxisRangeData"),(0,i.K2)(T,"setYAxisRangeFromPlotData"),(0,i.K2)(U,"transformDataWithoutCategory"),(0,i.K2)(V,"getPlotColorFromPalette"),(0,i.K2)(W,"setLineData"),(0,i.K2)(X,"setBarData"),(0,i.K2)(Y,"getDrawableElem"),(0,i.K2)(Z,"getChartThemeConfig"),(0,i.K2)($,"getChartConfig"),(0,i.K2)(_,"getXYChartData");var aa={getDrawableElem:Y,clear:(0,i.K2)(function(){(0,h.IU)(),B=0,C=J(),E=K(),F=(D=I()).plotColorPalette.split(",").map(a=>a.trim()),G=!1,H=!1},"clear"),setAccTitle:h.SV,getAccTitle:h.iN,setDiagramTitle:h.ke,getDiagramTitle:h.ab,getAccDescription:h.m7,setAccDescription:h.EI,setOrientation:N,setXAxisTitle:O,setXAxisRangeData:P,setXAxisBand:Q,setYAxisTitle:R,setYAxisRangeData:S,setLineData:W,setBarData:X,setTmpSVGG:M,getChartThemeConfig:Z,getChartConfig:$,getXYChartData:_},ab={parser:k,db:aa,renderer:{draw:(0,i.K2)((a,b,c,d)=>{let f=d.db,g=f.getChartThemeConfig(),j=f.getChartConfig(),k=f.getXYChartData().plots[0].data.map(a=>a[1]);function l(a){return"top"===a?"text-before-edge":"middle"}function m(a){return"left"===a?"start":"right"===a?"end":"middle"}function n(a){return`translate(${a.x}, ${a.y}) rotate(${a.rotation||0})`}(0,i.K2)(l,"getDominantBaseLine"),(0,i.K2)(m,"getTextAnchor"),(0,i.K2)(n,"getTextTransformation"),i.Rm.debug("Rendering xychart chart\n"+a);let o=(0,e.D)(b),p=o.append("g").attr("class","main"),q=p.append("rect").attr("width",j.width).attr("height",j.height).attr("class","background");(0,h.a$)(o,j.height,j.width,!0),o.attr("viewBox",`0 0 ${j.width} ${j.height}`),q.attr("fill",g.backgroundColor),f.setTmpSVGG(o.append("g").attr("class","mermaid-tmp-group"));let r=f.getDrawableElem(),s={};function t(a){let b=p,c="";for(let[d]of a.entries()){let e=p;d>0&&s[c]&&(e=s[c]),c+=a[d],(b=s[c])||(b=s[c]=e.append("g").attr("class",a[d]))}return b}for(let a of((0,i.K2)(t,"getGroup"),r)){if(0===a.data.length)continue;let b=t(a.groupTexts);switch(a.type){case"rect":if(b.selectAll("rect").data(a.data).enter().append("rect").attr("x",a=>a.x).attr("y",a=>a.y).attr("width",a=>a.width).attr("height",a=>a.height).attr("fill",a=>a.fill).attr("stroke",a=>a.strokeFill).attr("stroke-width",a=>a.strokeWidth),j.showDataLabel){let c=j.showDataLabelOutsideBar;if("horizontal"===j.chartOrientation){let d=function(a,b){let{data:c,label:d}=a;return b*d.length*e<=c.width-f};(0,i.K2)(d,"fitsHorizontally");let e=.7,f=10,h=a.data.map((a,b)=>({data:a,label:k[b].toString()})).filter(a=>a.data.width>0&&a.data.height>0),j=Math.floor(Math.min(...h.map(a=>{let{data:b}=a,c=.7*b.height;for(;!d(a,c)&&c>0;)c-=1;return c}))),l=(0,i.K2)(a=>c?a.data.x+a.data.width+f:a.data.x+a.data.width-f,"determineLabelXPosition");b.selectAll("text").data(h).enter().append("text").attr("x",l).attr("y",a=>a.data.y+a.data.height/2).attr("text-anchor",c?"start":"end").attr("dominant-baseline","middle").attr("fill",g.dataLabelColor).attr("font-size",`${j}px`).text(a=>a.label)}else{let d=function(a,b,c){let{data:d,label:e}=a,f=b*e.length*.7,g=d.x+d.width/2,h=g-f/2,i=g+f/2,j=h>=d.x&&i<=d.x+d.width,k=d.y+c+b<=d.y+d.height;return j&&k};(0,i.K2)(d,"fitsInBar");let e=a.data.map((a,b)=>({data:a,label:k[b].toString()})).filter(a=>a.data.width>0&&a.data.height>0),f=Math.floor(Math.min(...e.map(a=>{let{data:b,label:c}=a,e=b.width/(.7*c.length);for(;!d(a,e,10)&&e>0;)e-=1;return e}))),h=(0,i.K2)(a=>c?a.data.y-10:a.data.y+10,"determineLabelYPosition");b.selectAll("text").data(e).enter().append("text").attr("x",a=>a.data.x+a.data.width/2).attr("y",h).attr("text-anchor","middle").attr("dominant-baseline",c?"auto":"hanging").attr("fill",g.dataLabelColor).attr("font-size",`${f}px`).text(a=>a.label)}}break;case"text":b.selectAll("text").data(a.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",a=>a.fill).attr("font-size",a=>a.fontSize).attr("dominant-baseline",a=>l(a.verticalPos)).attr("text-anchor",a=>m(a.horizontalPos)).attr("transform",a=>n(a)).text(a=>a.text);break;case"path":b.selectAll("path").data(a.data).enter().append("path").attr("d",a=>a.path).attr("fill",a=>a.fill?a.fill:"none").attr("stroke",a=>a.strokeFill).attr("stroke-width",a=>a.strokeWidth)}}},"draw")}}}};
|