git-history-ui 4.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/CODE_OF_CONDUCT.md +53 -0
  3. package/CONTRIBUTING.md +132 -0
  4. package/LICENSE +21 -0
  5. package/README.md +75 -15
  6. package/SECURITY.md +51 -0
  7. package/build/frontend/{chunk-CFCRPNUQ.js → chunk-3E3FVV4X.js} +1 -1
  8. package/build/frontend/chunk-465Y7ZAS.js +2 -0
  9. package/build/frontend/{chunk-I4VBIHH2.js → chunk-7VJNS7EY.js} +1 -1
  10. package/build/frontend/{chunk-UIWFTWLF.js → chunk-GBKH4M7W.js} +1 -1
  11. package/build/frontend/{chunk-UHWTLUOW.js → chunk-GJRIJIZY.js} +1 -1
  12. package/build/frontend/chunk-LRN4ELHN.js +9 -0
  13. package/build/frontend/chunk-PJETIVS4.js +1 -0
  14. package/build/frontend/chunk-QH2BEUIU.js +5 -0
  15. package/build/frontend/{chunk-3KK6F5JX.js → chunk-SJJTMQGL.js} +1 -1
  16. package/build/frontend/chunk-TI46NMVL.js +1 -0
  17. package/build/frontend/chunk-V6G3DEZ6.js +1 -0
  18. package/build/frontend/{chunk-UNROVCUZ.js → chunk-WPYI663L.js} +1 -1
  19. package/build/frontend/chunk-Y6GOUMAT.js +1 -0
  20. package/build/frontend/index.html +1 -1
  21. package/build/frontend/main-735KK4CH.js +1 -0
  22. package/dist/backend/aggregations.d.ts +1 -0
  23. package/dist/backend/aggregations.d.ts.map +1 -0
  24. package/dist/backend/annotations.d.ts +1 -0
  25. package/dist/backend/annotations.d.ts.map +1 -0
  26. package/dist/backend/cache/sqliteIndex.d.ts +1 -0
  27. package/dist/backend/cache/sqliteIndex.d.ts.map +1 -0
  28. package/dist/backend/dev-server.d.ts +1 -0
  29. package/dist/backend/dev-server.d.ts.map +1 -0
  30. package/dist/backend/gitService.d.ts +1 -0
  31. package/dist/backend/gitService.d.ts.map +1 -0
  32. package/dist/backend/grouping/prGrouping.d.ts +1 -0
  33. package/dist/backend/grouping/prGrouping.d.ts.map +1 -0
  34. package/dist/backend/impact.d.ts +1 -0
  35. package/dist/backend/impact.d.ts.map +1 -0
  36. package/dist/backend/insights.d.ts +1 -0
  37. package/dist/backend/insights.d.ts.map +1 -0
  38. package/dist/backend/llm/anthropicProvider.d.ts +2 -0
  39. package/dist/backend/llm/anthropicProvider.d.ts.map +1 -0
  40. package/dist/backend/llm/anthropicProvider.js +10 -4
  41. package/dist/backend/llm/anthropicProvider.js.map +1 -1
  42. package/dist/backend/llm/heuristicProvider.d.ts +2 -0
  43. package/dist/backend/llm/heuristicProvider.d.ts.map +1 -0
  44. package/dist/backend/llm/heuristicProvider.js +54 -4
  45. package/dist/backend/llm/heuristicProvider.js.map +1 -1
  46. package/dist/backend/llm/index.d.ts +7 -0
  47. package/dist/backend/llm/index.d.ts.map +1 -0
  48. package/dist/backend/llm/index.js +15 -5
  49. package/dist/backend/llm/index.js.map +1 -1
  50. package/dist/backend/llm/openaiProvider.d.ts +2 -0
  51. package/dist/backend/llm/openaiProvider.d.ts.map +1 -0
  52. package/dist/backend/llm/openaiProvider.js +8 -3
  53. package/dist/backend/llm/openaiProvider.js.map +1 -1
  54. package/dist/backend/llm/types.d.ts +3 -1
  55. package/dist/backend/llm/types.d.ts.map +1 -0
  56. package/dist/backend/presets.d.ts +1 -0
  57. package/dist/backend/presets.d.ts.map +1 -0
  58. package/dist/backend/search/datePhrase.d.ts +1 -0
  59. package/dist/backend/search/datePhrase.d.ts.map +1 -0
  60. package/dist/backend/search/nlSearch.d.ts +1 -0
  61. package/dist/backend/search/nlSearch.d.ts.map +1 -0
  62. package/dist/backend/server.d.ts +1 -0
  63. package/dist/backend/server.d.ts.map +1 -0
  64. package/dist/backend/server.js +47 -18
  65. package/dist/backend/server.js.map +1 -1
  66. package/dist/backend/snapshot.d.ts +1 -0
  67. package/dist/backend/snapshot.d.ts.map +1 -0
  68. package/dist/cli.d.ts +1 -0
  69. package/dist/cli.d.ts.map +1 -0
  70. package/docs/API.md +70 -0
  71. package/docs/architecture.md +85 -0
  72. package/docs/configuration.md +54 -0
  73. package/docs/troubleshooting.md +85 -0
  74. package/package.json +44 -8
  75. package/build/frontend/chunk-6VRZZB3T.js +0 -1
  76. package/build/frontend/chunk-AWMYL3YU.js +0 -1
  77. package/build/frontend/chunk-EZUFC4CQ.js +0 -1
  78. package/build/frontend/chunk-GRG6HTLW.js +0 -9
  79. package/build/frontend/chunk-L4LXF744.js +0 -2
  80. package/build/frontend/chunk-OBPR2XVH.js +0 -5
  81. package/build/frontend/chunk-VHEMN3MU.js +0 -1
  82. package/build/frontend/main-6PSVVDXD.js +0 -1
package/package.json CHANGED
@@ -1,8 +1,20 @@
1
1
  {
2
2
  "name": "git-history-ui",
3
- "version": "4.0.0",
4
- "description": "Git Intelligence in your browser — natural-language search, PR/feature grouping, time-travel snapshots, file history, blame, commit impact, and an insights dashboard. Optional AI integration (Anthropic / OpenAI).",
3
+ "version": "5.0.0",
4
+ "description": "Local-first Git history UI with natural-language search, PR grouping, time travel, blame, and optional AI.",
5
5
  "main": "dist/cli.js",
6
+ "types": "dist/backend/server.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/backend/server.d.ts",
10
+ "require": "./dist/backend/server.js"
11
+ },
12
+ "./cli": {
13
+ "types": "./dist/cli.d.ts",
14
+ "require": "./dist/cli.js"
15
+ },
16
+ "./package.json": "./package.json"
17
+ },
6
18
  "bin": {
7
19
  "git-history-ui": "dist/cli.js"
8
20
  },
@@ -13,7 +25,10 @@
13
25
  "public/**/*",
14
26
  "README.md",
15
27
  "LICENSE",
16
- "CHANGELOG.md"
28
+ "CHANGELOG.md",
29
+ "CONTRIBUTING.md",
30
+ "CODE_OF_CONDUCT.md",
31
+ "SECURITY.md"
17
32
  ],
18
33
  "scripts": {
19
34
  "build": "npm run build:backend && npm run build:frontend && npm run copy-frontend",
@@ -32,10 +47,12 @@
32
47
  "lint:fix": "eslint \"src/**/*.ts\" --fix",
33
48
  "format": "prettier --write \"src/**/*.{ts,js}\" \"frontend/src/**/*.{ts,html,css}\"",
34
49
  "format:check": "prettier --check \"src/**/*.{ts,js}\" \"frontend/src/**/*.{ts,html,css}\"",
50
+ "audit:prod": "npm audit --omit=dev --audit-level=moderate",
35
51
  "typecheck": "tsc -p tsconfig.json --noEmit",
36
52
  "clean": "rm -rf dist build coverage frontend/dist frontend/.angular",
37
- "copy-frontend": "mkdir -p build/frontend && cp -r frontend/dist/frontend/browser/* build/frontend/",
38
- "prepublishOnly": "npm run clean && npm run lint && npm run typecheck && npm test -- --ci && npm run build"
53
+ "copy-frontend": "rm -rf build/frontend && mkdir -p build/frontend && cp -r frontend/dist/frontend/browser/* build/frontend/",
54
+ "prepare": "husky",
55
+ "prepublishOnly": "npm run clean && npm run lint && npm run typecheck && npm test -- --ci && npm run audit:prod && npm run build"
39
56
  },
40
57
  "keywords": [
41
58
  "git",
@@ -63,6 +80,10 @@
63
80
  ],
64
81
  "author": "Ankit Sharma <ankit.sharma199803@gmail.com>",
65
82
  "license": "MIT",
83
+ "funding": {
84
+ "type": "github",
85
+ "url": "https://github.com/sponsors/beingmartinbmc"
86
+ },
66
87
  "dependencies": {
67
88
  "chalk": "^4.1.2",
68
89
  "commander": "^12.1.0",
@@ -74,9 +95,11 @@
74
95
  "open": "^8.4.2"
75
96
  },
76
97
  "optionalDependencies": {
77
- "better-sqlite3": "^11.5.0"
98
+ "better-sqlite3": "^12.9.0"
78
99
  },
79
100
  "devDependencies": {
101
+ "@commitlint/cli": "^20.5.3",
102
+ "@commitlint/config-conventional": "^20.5.3",
80
103
  "@types/compression": "^1.7.5",
81
104
  "@types/cors": "^2.8.17",
82
105
  "@types/express": "^4.17.21",
@@ -85,11 +108,12 @@
85
108
  "@types/supertest": "^6.0.2",
86
109
  "@typescript-eslint/eslint-plugin": "^8.8.0",
87
110
  "@typescript-eslint/parser": "^8.8.0",
88
- "better-sqlite3": "^12.9.0",
89
111
  "concurrently": "^9.0.0",
90
112
  "eslint": "^8.57.1",
91
113
  "eslint-config-prettier": "^9.1.0",
114
+ "husky": "^9.1.7",
92
115
  "jest": "^29.7.0",
116
+ "lint-staged": "^16.4.0",
93
117
  "nock": "^14.0.14",
94
118
  "prettier": "^3.3.3",
95
119
  "supertest": "^7.0.0",
@@ -107,5 +131,17 @@
107
131
  "bugs": {
108
132
  "url": "https://github.com/beingmartinbmc/git-history-ui/issues"
109
133
  },
110
- "homepage": "https://github.com/beingmartinbmc/git-history-ui#readme"
134
+ "homepage": "https://github.com/beingmartinbmc/git-history-ui#readme",
135
+ "lint-staged": {
136
+ "src/**/*.ts": [
137
+ "eslint --fix",
138
+ "prettier --write"
139
+ ],
140
+ "frontend/src/**/*.{ts,html,css}": [
141
+ "prettier --write"
142
+ ],
143
+ "*.{json,yml,yaml,cjs}": [
144
+ "prettier --write"
145
+ ]
146
+ }
111
147
  }
@@ -1 +0,0 @@
1
- import{$ as f,$a as an,$b as wn,Aa as Kt,B as Y,Ba as Xt,D as te,Da as Kr,E as ce,G as Ft,H as ue,Ha as Ae,J as tt,Ja as Xr,K as Q,Ka as Jt,L as Vt,La as k,M as $r,Ma as Jr,Na as en,O as zr,Oa as er,Ob as vn,Pa as tn,Q as Hr,Qb as K,R as _,Ra as Me,S as qt,T as I,Tb as mn,U as w,Ua as rn,Ub as yn,Va as re,Vb as it,W as R,Wa as De,Xb as Sn,Y as Br,Ya as nn,Yb as ot,Z as T,Za as on,Zb as Oe,_ as S,_a as sn,_b as Rn,a as l,aa as Fr,ab as cn,ac as Cn,b as U,ba as Vr,bb as un,bc as st,ca as le,cb as ln,da as j,e as Pr,f as Ur,g as Lr,gb as dn,h as $t,hc as En,i as zt,ia as qr,ic as bn,j as V,ja as Gt,jc as In,k as L,ka as x,la as Gr,ma as Wt,na as rt,nb as hn,o as q,oa as nt,p as D,pa as Wr,q as d,r as be,rb as fn,s as xr,sa as Ie,t as jr,ta as Zt,tb as pn,u as y,ua as Zr,ub as gn,v as Ht,va as Yt,w as O,wa as Yr,x as Bt,xa as Qt,y as kr,ya as Qr,z as et,za as Te}from"./chunk-OBPR2XVH.js";var ut=new T(""),or=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,r){this._zone=r,e.forEach(i=>{i.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,r,i,o){return this._findPluginFor(r).addEventListener(e,r,i,o)}getZone(){return this._zone}_findPluginFor(e){let r=this._eventNameToPlugin.get(e);if(r)return r;if(r=this._plugins.find(o=>o.supports(e)),!r)throw new w(5101,!1);return this._eventNameToPlugin.set(e,r),r}static \u0275fac=function(r){return new(r||t)(S(ut),S(De))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),_e=class{_doc;constructor(n){this._doc=n}manager},tr="ng-app-id";function Tn(t){for(let n of t)n.remove()}function An(t,n){let e=n.createElement("style");return e.textContent=t,e}function Di(t,n,e,r){let i=t.head?.querySelectorAll(`style[${tr}="${n}"],link[${tr}="${n}"]`);if(i)for(let o of i)o.removeAttribute(tr),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&e.set(o.textContent,{usage:0,elements:[o]})}function nr(t,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e}var sr=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,r,i,o={}){this.doc=e,this.appId=r,this.nonce=i,Di(e,r,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,r){for(let i of e)this.addUsage(i,this.inline,An);r?.forEach(i=>this.addUsage(i,this.external,nr))}removeStyles(e,r){for(let i of e)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(e,r,i){let o=r.get(e);o?o.usage++:r.set(e,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(e,this.doc)))})}removeUsage(e,r){let i=r.get(e);i&&(i.usage--,i.usage<=0&&(Tn(i.elements),r.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Tn(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(e,An(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(e,nr(r,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,r){return this.nonce&&r.setAttribute("nonce",this.nonce),e.appendChild(r)}static \u0275fac=function(r){return new(r||t)(S(x),S(Qt),S(Kt,8),S(Te))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),rr={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},ar=/%COMP%/g;var Dn="%COMP%",Oi=`_nghost-${Dn}`,_i=`_ngcontent-${Dn}`,Ni=!0,Pi=new T("",{providedIn:"root",factory:()=>Ni});function Ui(t){return _i.replace(ar,t)}function Li(t){return Oi.replace(ar,t)}function On(t,n){return n.map(e=>e.replace(ar,t))}var cr=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;animationDisabled;maxAnimationTimeout;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;registry;constructor(e,r,i,o,s,a,c,u=null,h,v,m=null){this.eventManager=e,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=c,this.nonce=u,this.animationDisabled=h,this.maxAnimationTimeout=v,this.tracingService=m,this.platformIsServer=!1,this.defaultRenderer=new Ne(e,s,c,this.platformIsServer,this.tracingService,this.registry=qr(),this.maxAnimationTimeout)}createRenderer(e,r){if(!e||!r)return this.defaultRenderer;let i=this.getOrCreateRenderer(e,r);return i instanceof at?i.applyToHost(e):i instanceof Pe&&i.applyStyles(),i}getOrCreateRenderer(e,r){let i=this.rendererByCompId,o=i.get(r.id);if(!o){let s=this.doc,a=this.ngZone,c=this.eventManager,u=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,v=this.platformIsServer,m=this.tracingService;switch(r.encapsulation){case Xt.Emulated:o=new at(c,u,r,this.appId,h,s,a,v,m,this.registry,this.animationDisabled,this.maxAnimationTimeout);break;case Xt.ShadowDom:return new ir(c,u,e,r,s,a,this.nonce,v,m,this.registry,this.maxAnimationTimeout);default:o=new Pe(c,u,r,h,s,a,v,m,this.registry,this.animationDisabled,this.maxAnimationTimeout);break}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(r){return new(r||t)(S(or),S(sr),S(Qt),S(Pi),S(x),S(Te),S(De),S(Kt),S(un),S(ln),S(rn,8))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),Ne=class{eventManager;doc;ngZone;platformIsServer;tracingService;registry;maxAnimationTimeout;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,r,i,o,s,a){this.eventManager=n,this.doc=e,this.ngZone=r,this.platformIsServer=i,this.tracingService=o,this.registry=s,this.maxAnimationTimeout=a}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(rr[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(Mn(n)?n.content:n).appendChild(e)}insertBefore(n,e,r){n&&(Mn(n)?n.content:n).insertBefore(e,r)}removeChild(n,e){let{elements:r}=this.registry;if(r){r.animate(e,()=>e.remove(),this.maxAnimationTimeout);return}e.remove()}selectRootElement(n,e){let r=typeof n=="string"?this.doc.querySelector(n):n;if(!r)throw new w(-5104,!1);return e||(r.textContent=""),r}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,r,i){if(i){e=i+":"+e;let o=rr[i];o?n.setAttributeNS(o,e,r):n.setAttribute(e,r)}else n.setAttribute(e,r)}removeAttribute(n,e,r){if(r){let i=rr[r];i?n.removeAttributeNS(i,e):n.removeAttribute(`${r}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,r,i){i&(Ae.DashCase|Ae.Important)?n.style.setProperty(e,r,i&Ae.Important?"important":""):n.style[e]=r}removeStyle(n,e,r){r&Ae.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,r){n!=null&&(n[e]=r)}setValue(n,e){n.nodeValue=e}listen(n,e,r,i){if(typeof n=="string"&&(n=Oe().getGlobalEventTarget(this.doc,n),!n))throw new w(5102,!1);let o=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(n,e,o)),this.eventManager.addEventListener(n,e,o,i)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;n(e)===!1&&e.preventDefault()}}};function Mn(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var ir=class extends Ne{sharedStylesHost;hostEl;shadowRoot;constructor(n,e,r,i,o,s,a,c,u,h,v){super(n,o,s,c,u,h,v),this.sharedStylesHost=e,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let m=i.styles;m=On(i.id,m);for(let C of m){let M=document.createElement("style");a&&M.setAttribute("nonce",a),M.textContent=C,this.shadowRoot.appendChild(M)}let E=i.getExternalStyles?.();if(E)for(let C of E){let M=nr(C,o);a&&M.setAttribute("nonce",a),this.shadowRoot.appendChild(M)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,r){return super.insertBefore(this.nodeOrShadowRoot(n),e,r)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Pe=class extends Ne{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;_animationDisabled;constructor(n,e,r,i,o,s,a,c,u,h,v,m){super(n,o,s,a,c,u,v),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=i,this._animationDisabled=h;let E=r.styles;this.styles=m?On(m,E):E,this.styleUrls=r.getExternalStyles?.(m)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){if(this.removeStylesOnCompDestroy){if(!this._animationDisabled&&this.registry.elements){this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)},this.maxAnimationTimeout)});return}this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}}},at=class extends Pe{contentAttr;hostAttr;constructor(n,e,r,i,o,s,a,c,u,h,v,m){let E=i+"-"+r.id;super(n,e,r,o,s,a,c,u,h,v,m,E),this.contentAttr=Ui(E),this.hostAttr=Li(E)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let r=super.createElement(n,e);return super.setAttribute(r,this.contentAttr,""),r}};var lt=class t extends wn{supportsDOMEvents=!0;static makeCurrent(){Rn(new t)}onAndCancel(n,e,r,i){return n.addEventListener(e,r,i),()=>{n.removeEventListener(e,r,i)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=xi();return e==null?null:ji(e)}resetBaseElement(){Ue=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return En(document.cookie,n)}},Ue=null;function xi(){return Ue=Ue||document.head.querySelector("base"),Ue?Ue.getAttribute("href"):null}function ji(t){return new URL(t,document.baseURI).pathname}var ki=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),Un=(()=>{class t extends _e{constructor(e){super(e)}supports(e){return!0}addEventListener(e,r,i,o){return e.addEventListener(r,i,o),()=>this.removeEventListener(e,r,i,o)}removeEventListener(e,r,i,o){return e.removeEventListener(r,i,o)}static \u0275fac=function(r){return new(r||t)(S(x))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),_n=["alt","control","meta","shift"],$i={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},zi={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},Ln=(()=>{class t extends _e{constructor(e){super(e)}supports(e){return t.parseEventName(e)!=null}addEventListener(e,r,i,o){let s=t.parseEventName(r),a=t.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Oe().onAndCancel(e,s.domEventName,a,o))}static parseEventName(e){let r=e.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let o=t._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),_n.forEach(u=>{let h=r.indexOf(u);h>-1&&(r.splice(h,1),s+=u+".")}),s+=o,r.length!=0||o.length===0)return null;let c={};return c.domEventName=i,c.fullKey=s,c}static matchEventFullKeyCode(e,r){let i=$i[e.key]||e.key,o="";return r.indexOf("code.")>-1&&(i=e.code,o="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),_n.forEach(s=>{if(s!==i){let a=zi[s];a(e)&&(o+=s+".")}}),o+=i,o===r)}static eventCallback(e,r,i){return o=>{t.matchEventFullKeyCode(o,e)&&i.runGuarded(()=>r(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(r){return new(r||t)(S(x))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();function Hi(t,n){let e=l({rootComponent:t},Bi(n));return Sn(e)}function Bi(t){return{appProviders:[...Wi,...t?.providers??[]],platformProviders:Gi}}function Fi(){lt.makeCurrent()}function Vi(){return new Wt}function qi(){return Yr(document),document}var Gi=[{provide:Te,useValue:In},{provide:Qr,useValue:Fi,multi:!0},{provide:x,useFactory:qi}];var Wi=[{provide:Vr,useValue:"root"},{provide:Wt,useFactory:Vi},{provide:ut,useClass:Un,multi:!0,deps:[x]},{provide:ut,useClass:Ln,multi:!0,deps:[x]},cr,sr,or,{provide:Xr,useExisting:cr},{provide:bn,useClass:ki},[]];var xn=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(r){return new(r||t)(S(x))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p="primary",Ye=Symbol("RouteTitle"),fr=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function oe(t){return new fr(t)}function Vn(t,n,e){let r=e.path.split("/");if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let i={};for(let o=0;o<r.length;o++){let s=r[o],a=t[o];if(s[0]===":")i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:t.slice(0,r.length),posParams:i}}function Yi(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!H(t[e],n[e]))return!1;return!0}function H(t,n){let e=t?pr(t):void 0,r=n?pr(n):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!qn(t[i],n[i]))return!1;return!0}function pr(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function qn(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;let e=[...t].sort(),r=[...n].sort();return e.every((i,o)=>r[o]===i)}else return t===n}function Gn(t){return t.length>0?t[t.length-1]:null}function Z(t){return xr(t)?t:on(t)?D(Promise.resolve(t)):d(t)}var Qi={exact:Zn,subset:Yn},Wn={exact:Ki,subset:Xi,ignored:()=>!0};function jn(t,n,e){return Qi[e.paths](t.root,n.root,e.matrixParams)&&Wn[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function Ki(t,n){return H(t,n)}function Zn(t,n,e){if(!ne(t.segments,n.segments)||!ft(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!Zn(t.children[r],n.children[r],e))return!1;return!0}function Xi(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>qn(t[e],n[e]))}function Yn(t,n,e){return Qn(t,n,n.segments,e)}function Qn(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!ne(i,e)||n.hasChildren()||!ft(i,e,r))}else if(t.segments.length===e.length){if(!ne(t.segments,e)||!ft(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!Yn(t.children[i],n.children[i],r))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!ne(t.segments,i)||!ft(t.segments,i,r)||!t.children[p]?!1:Qn(t.children[p],n,o,r)}}function ft(t,n,e){return n.every((r,i)=>Wn[e](t[i].parameters,r.parameters))}var F=class{root;queryParams;fragment;_queryParamMap;constructor(n=new g([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=oe(this.queryParams),this._queryParamMap}toString(){return to.serialize(this)}},g=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return pt(this)}},X=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=oe(this.parameters),this._parameterMap}toString(){return Xn(this)}};function Ji(t,n){return ne(t,n)&&t.every((e,r)=>H(e.parameters,n[r].parameters))}function ne(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function eo(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===p&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==p&&(e=e.concat(n(i,r)))}),e}var Qe=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>new se,providedIn:"root"})}return t})(),se=class{parse(n){let e=new vr(n);return new F(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Le(n.root,!0)}`,r=io(n.queryParams),i=typeof n.fragment=="string"?`#${ro(n.fragment)}`:"";return`${e}${r}${i}`}},to=new se;function pt(t){return t.segments.map(n=>Xn(n)).join("/")}function Le(t,n){if(!t.hasChildren())return pt(t);if(n){let e=t.children[p]?Le(t.children[p],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==p&&r.push(`${i}:${Le(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=eo(t,(r,i)=>i===p?[Le(t.children[p],!1)]:[`${i}:${Le(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[p]!=null?`${pt(t)}/${e[0]}`:`${pt(t)}/(${e.join("//")})`}}function Kn(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function dt(t){return Kn(t).replace(/%3B/gi,";")}function ro(t){return encodeURI(t)}function gr(t){return Kn(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function gt(t){return decodeURIComponent(t)}function kn(t){return gt(t.replace(/\+/g,"%20"))}function Xn(t){return`${gr(t.path)}${no(t.parameters)}`}function no(t){return Object.entries(t).map(([n,e])=>`;${gr(n)}=${gr(e)}`).join("")}function io(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${dt(e)}=${dt(i)}`).join("&"):`${dt(e)}=${dt(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var oo=/^[^\/()?;#]+/;function ur(t){let n=t.match(oo);return n?n[0]:""}var so=/^[^\/()?;=#]+/;function ao(t){let n=t.match(so);return n?n[0]:""}var co=/^[^=?&#]+/;function uo(t){let n=t.match(co);return n?n[0]:""}var lo=/^[^&#]+/;function ho(t){let n=t.match(lo);return n?n[0]:""}var vr=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new g([],{}):new g([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(r[p]=new g(n,e)),r}parseSegment(){let n=ur(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new w(4009,!1);return this.capture(n),new X(gt(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=ao(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=ur(this.remaining);i&&(r=i,this.capture(r))}n[gt(e)]=gt(r)}parseQueryParam(n){let e=uo(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=ho(this.remaining);s&&(r=s,this.capture(r))}let i=kn(e),o=kn(r);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(o)}else n[i]=o}parseParens(n){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=ur(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new w(4010,!1);let o;r.indexOf(":")>-1?(o=r.slice(0,r.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=p);let s=this.parseChildren();e[o]=Object.keys(s).length===1?s[p]:new g([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new w(4011,!1)}};function Jn(t){return t.segments.length>0?new g([],{[p]:t}):t}function ei(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=ei(i);if(r===p&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))n[s]=a;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}let e=new g(t.segments,n);return fo(e)}function fo(t){if(t.numberOfChildren===1&&t.children[p]){let n=t.children[p];return new g(t.segments.concat(n.segments),n.children)}return t}function J(t){return t instanceof F}function ti(t,n,e=null,r=null){let i=ri(t);return ni(i,n,e,r)}function ri(t){let n;function e(o){let s={};for(let c of o.children){let u=e(c);s[c.outlet]=u}let a=new g(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=Jn(r);return n??i}function ni(t,n,e,r){let i=t;for(;i.parent;)i=i.parent;if(n.length===0)return lr(i,i,i,e,r);let o=po(n);if(o.toRoot())return lr(i,i,new g([],{}),e,r);let s=go(o,i,t),a=s.processChildren?je(s.segmentGroup,s.index,o.commands):oi(s.segmentGroup,s.index,o.commands);return lr(i,s.segmentGroup,a,e,r)}function vt(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function ze(t){return typeof t=="object"&&t!=null&&t.outlets}function lr(t,n,e,r,i){let o={};r&&Object.entries(r).forEach(([c,u])=>{o[c]=Array.isArray(u)?u.map(h=>`${h}`):`${u}`});let s;t===n?s=e:s=ii(t,n,e);let a=Jn(ei(s));return new F(a,o,i)}function ii(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=ii(o,n,e)}),new g(t.segments,r)}var mt=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&vt(r[0]))throw new w(4003,!1);let i=r.find(ze);if(i&&i!==Gn(r))throw new w(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function po(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new mt(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,u])=>{a[c]=typeof u=="string"?u.split("/"):u}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new mt(e,n,r)}var fe=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function go(t,n,e){if(t.isAbsolute)return new fe(n,!0,0);if(!e)return new fe(n,!1,NaN);if(e.parent===null)return new fe(e,!0,0);let r=vt(t.commands[0])?0:1,i=e.segments.length-1+r;return vo(e,i,t.numberOfDoubleDots)}function vo(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new w(4005,!1);i=r.segments.length}return new fe(r,!1,i-o)}function mo(t){return ze(t[0])?t[0].outlets:{[p]:t}}function oi(t,n,e){if(t??=new g([],{}),t.segments.length===0&&t.hasChildren())return je(t,n,e);let r=yo(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new g(t.segments.slice(0,r.pathIndex),{});return o.children[p]=new g(t.segments.slice(r.pathIndex),t.children),je(o,0,i)}else return r.match&&i.length===0?new g(t.segments,{}):r.match&&!t.hasChildren()?mr(t,n,e):r.match?je(t,0,i):mr(t,n,e)}function je(t,n,e){if(e.length===0)return new g(t.segments,{});{let r=mo(e),i={};if(Object.keys(r).some(o=>o!==p)&&t.children[p]&&t.numberOfChildren===1&&t.children[p].segments.length===0){let o=je(t.children[p],n,e);return new g(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=oi(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new g(t.segments,i)}}function yo(t,n,e){let r=0,i=n,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=e.length)return o;let s=t.segments[i],a=e[r];if(ze(a))break;let c=`${a}`,u=r<e.length-1?e[r+1]:null;if(i>0&&c===void 0)break;if(c&&u&&typeof u=="object"&&u.outlets===void 0){if(!zn(c,u,s))return o;r+=2}else{if(!zn(c,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function mr(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(ze(o)){let c=So(o.outlets);return new g(r,c)}if(i===0&&vt(e[0])){let c=t.segments[n];r.push(new X(c.path,$n(e[0]))),i++;continue}let s=ze(o)?o.outlets[p]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&vt(a)?(r.push(new X(s,$n(a))),i+=2):(r.push(new X(s,{})),i++)}return new g(r,{})}function So(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=mr(new g([],{}),0,r))}),n}function $n(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function zn(t,n,e){return t==e.path&&H(n,e.parameters)}var ke="imperative",b=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(b||{}),P=class{id;url;constructor(n,e){this.id=n,this.url=e}},ae=class extends P{type=b.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r="imperative",i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},z=class extends P{urlAfterRedirects;type=b.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},A=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(A||{}),He=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(He||{}),B=class extends P{reason;code;type=b.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},G=class extends P{reason;code;type=b.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},ge=class extends P{error;target;type=b.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Be=class extends P{urlAfterRedirects;state;type=b.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},yt=class extends P{urlAfterRedirects;state;type=b.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},St=class extends P{urlAfterRedirects;state;shouldActivate;type=b.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Rt=class extends P{urlAfterRedirects;state;type=b.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},wt=class extends P{urlAfterRedirects;state;type=b.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ct=class{route;type=b.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Et=class{route;type=b.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},bt=class{snapshot;type=b.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},It=class{snapshot;type=b.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Tt=class{snapshot;type=b.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},At=class{snapshot;type=b.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Fe=class{},ve=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function Ro(t){return!(t instanceof Fe)&&!(t instanceof ve)}function wo(t,n){return t.providers&&!t._injector&&(t._injector=er(t.providers,n,`Route: ${t.path}`)),t._injector??n}function $(t){return t.outlet||p}function Co(t,n){let e=t.filter(r=>$(r)===n);return e.push(...t.filter(r=>$(r)!==n)),e}function Se(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){let e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var Mt=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return Se(this.route?.snapshot)??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new Re(this.rootInjector)}},Re=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new Mt(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(S(le))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Dt=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=yr(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=yr(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=Sr(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return Sr(n,this._root).map(e=>e.value)}};function yr(t,n){if(t===n.value)return n;for(let e of n.children){let r=yr(t,e);if(r)return r}return null}function Sr(t,n){if(t===n.value)return[n];for(let e of n.children){let r=Sr(t,e);if(r.length)return r.unshift(n),r}return[]}var N=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function he(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var Ve=class extends Dt{snapshot;constructor(n,e){super(n),this.snapshot=e,Ar(this,n)}toString(){return this.snapshot.toString()}};function si(t){let n=Eo(t),e=new L([new X("",{})]),r=new L({}),i=new L({}),o=new L({}),s=new L(""),a=new W(e,r,o,s,i,p,t,n.root);return a.snapshot=n.root,new Ve(new N(a,[]),n)}function Eo(t){let n={},e={},r={},o=new ie([],n,r,"",e,p,t,null,{});return new qe("",new N(o,[]))}var W=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,r,i,o,s,a,c){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(y(u=>u[Ye]))??d(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(y(n=>oe(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(y(n=>oe(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Ot(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:l(l({},n.params),t.params),data:l(l({},n.data),t.data),resolve:l(l(l(l({},t.data),n.data),i?.data),t._resolvedData)}:r={params:l({},t.params),data:l({},t.data),resolve:l(l({},t.data),t._resolvedData??{})},i&&ci(i)&&(r.resolve[Ye]=i.title),r}var ie=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Ye]}constructor(n,e,r,i,o,s,a,c,u){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=oe(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=oe(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},qe=class extends Dt{url;constructor(n,e){super(e),this.url=n,Ar(this,e)}toString(){return ai(this._root)}};function Ar(t,n){n.value._routerState=t,n.children.forEach(e=>Ar(t,e))}function ai(t){let n=t.children.length>0?` { ${t.children.map(ai).join(", ")} } `:"";return`${t.value}${n}`}function dr(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,H(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),H(n.params,e.params)||t.paramsSubject.next(e.params),Yi(n.url,e.url)||t.urlSubject.next(e.url),H(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Rr(t,n){let e=H(t.params,n.params)&&Ji(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Rr(t.parent,n.parent))}function ci(t){return typeof t.title=="string"||t.title===null}var ui=new T(""),Mr=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=p;activateEvents=new re;deactivateEvents=new re;attachEvents=new re;detachEvents=new re;routerOutletData=yn(void 0);parentContexts=f(Re);location=f(Jr);changeDetector=f(it);inputBinder=f(Ut,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new w(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new w(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new w(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new w(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,c=new wr(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Me({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Ie]})}return t})(),wr=class{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i}get(n,e){return n===W?this.route:n===Re?this.childContexts:n===ui?this.outletData:this.parent.get(n,e)}},Ut=new T("");var Dr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=tn({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&dn(0,"router-outlet")},dependencies:[Mr],encapsulation:2})}return t})();function Or(t){let n=t.children&&t.children.map(Or),e=n?U(l({},t),{children:n}):l({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==p&&(e.component=Dr),e}function bo(t,n,e){let r=Ge(t,n._root,e?e._root:void 0);return new Ve(r,n)}function Ge(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=Io(t,n,e);return new N(r,i)}else{if(t.shouldAttach(n.value)){let o=t.retrieve(n.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>Ge(t,a)),s}}let r=To(n.value),i=n.children.map(o=>Ge(t,o));return new N(r,i)}}function Io(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return Ge(t,r,i);return Ge(t,r)})}function To(t){return new W(new L(t.url),new L(t.params),new L(t.queryParams),new L(t.fragment),new L(t.data),t.outlet,t.component,t)}var me=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},li="ngNavigationCancelingError";function _t(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=J(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=di(!1,A.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function di(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[li]=!0,e.cancellationCode=n,e}function Ao(t){return hi(t)&&J(t.url)}function hi(t){return!!t&&t[li]}var Mo=(t,n,e,r)=>y(i=>(new Cr(n,i.targetRouterState,i.currentRouterState,e,r).activate(t),i)),Cr=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),dr(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=he(e);n.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=he(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=he(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,e,r){let i=he(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new At(o.value.snapshot))}),n.children.length&&this.forwardEvent(new It(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(dr(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),dr(a.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,r)}},Nt=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},pe=class{component;route;constructor(n,e){this.component=n,this.route=e}};function Do(t,n,e){let r=t._root,i=n?n._root:null;return xe(r,i,e,[r.value])}function Oo(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function we(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!Br(t)?t:n.get(t):r}function xe(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=he(n);return t.children.forEach(s=>{_o(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>$e(a,e.getContext(s),i)),i}function _o(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=No(s,o,o.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new Nt(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?xe(t,n,a?a.children:null,r,i):xe(t,n,e,r,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new pe(a.outlet.component,s))}else s&&$e(n,a,i),i.canActivateChecks.push(new Nt(r)),o.component?xe(t,null,a?a.children:null,r,i):xe(t,null,e,r,i);return i}function No(t,n,e){if(typeof e=="function")return e(t,n);switch(e){case"pathParamsChange":return!ne(t.url,n.url);case"pathParamsOrQueryParamsChange":return!ne(t.url,n.url)||!H(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Rr(t,n)||!H(t.queryParams,n.queryParams);case"paramsChange":default:return!Rr(t,n)}}function $e(t,n,e){let r=he(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?$e(s,n.children.getContext(o),e):$e(s,null,e):$e(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new pe(n.outlet.component,i)):e.canDeactivateChecks.push(new pe(null,i)):e.canDeactivateChecks.push(new pe(null,i))}function Ke(t){return typeof t=="function"}function Po(t){return typeof t=="boolean"}function Uo(t){return t&&Ke(t.canLoad)}function Lo(t){return t&&Ke(t.canActivate)}function xo(t){return t&&Ke(t.canActivateChild)}function jo(t){return t&&Ke(t.canDeactivate)}function ko(t){return t&&Ke(t.canMatch)}function fi(t){return t instanceof jr||t?.name==="EmptyError"}var ht=Symbol("INITIAL_VALUE");function ye(){return _(t=>Ht(t.map(n=>n.pipe(ue(1),Hr(ht)))).pipe(y(n=>{for(let e of n)if(e!==!0){if(e===ht)return ht;if(e===!1||$o(e))return e}return!0}),Y(n=>n!==ht),ue(1)))}function $o(t){return J(t)||t instanceof me}function zo(t,n){return O(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?d(U(l({},e),{guardsResult:!0})):Ho(s,r,i,t).pipe(O(a=>a&&Po(a)?Bo(r,o,t,n):d(a)),y(a=>U(l({},e),{guardsResult:a})))})}function Ho(t,n,e,r){return D(t).pipe(O(i=>Wo(i.component,i.route,e,n,r)),Q(i=>i!==!0,!0))}function Bo(t,n,e,r){return D(n).pipe(ce(i=>kr(Vo(i.route.parent,r),Fo(i.route,r),Go(t,i.path,e),qo(t,i.route,e))),Q(i=>i!==!0,!0))}function Fo(t,n){return t!==null&&n&&n(new Tt(t)),d(!0)}function Vo(t,n){return t!==null&&n&&n(new bt(t)),d(!0)}function qo(t,n,e){let r=n.routeConfig?n.routeConfig.canActivate:null;if(!r||r.length===0)return d(!0);let i=r.map(o=>et(()=>{let s=Se(n)??e,a=we(o,s),c=Lo(a)?a.canActivate(n,t):j(s,()=>a(n,t));return Z(c).pipe(Q())}));return d(i).pipe(ye())}function Go(t,n,e){let r=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>Oo(s)).filter(s=>s!==null).map(s=>et(()=>{let a=s.guards.map(c=>{let u=Se(s.node)??e,h=we(c,u),v=xo(h)?h.canActivateChild(r,t):j(u,()=>h(r,t));return Z(v).pipe(Q())});return d(a).pipe(ye())}));return d(o).pipe(ye())}function Wo(t,n,e,r,i){let o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!o||o.length===0)return d(!0);let s=o.map(a=>{let c=Se(n)??i,u=we(a,c),h=jo(u)?u.canDeactivate(t,n,e,r):j(c,()=>u(t,n,e,r));return Z(h).pipe(Q())});return d(s).pipe(ye())}function Zo(t,n,e,r){let i=n.canLoad;if(i===void 0||i.length===0)return d(!0);let o=i.map(s=>{let a=we(s,t),c=Uo(a)?a.canLoad(n,e):j(t,()=>a(n,e));return Z(c)});return d(o).pipe(ye(),pi(r))}function pi(t){return Ur(I(n=>{if(typeof n!="boolean")throw _t(t,n)}),y(n=>n===!0))}function Yo(t,n,e,r){let i=n.canMatch;if(!i||i.length===0)return d(!0);let o=i.map(s=>{let a=we(s,t),c=ko(a)?a.canMatch(n,e):j(t,()=>a(n,e));return Z(c)});return d(o).pipe(ye(),pi(r))}var We=class{segmentGroup;constructor(n){this.segmentGroup=n||null}},Ze=class extends Error{urlTree;constructor(n){super(),this.urlTree=n}};function de(t){return be(new We(t))}function Qo(t){return be(new w(4e3,!1))}function Ko(t){return be(di(!1,A.GuardRejected))}var Er=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return d(r);if(i.numberOfChildren>1||!i.children[p])return Qo(`${n.redirectTo}`);i=i.children[p]}}applyRedirectCommands(n,e,r,i,o){return Xo(e,i,o).pipe(y(s=>{if(s instanceof F)throw new Ze(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new Ze(a);return a}))}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new F(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(n,c,r,i)}),new g(o,s)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new w(4001,!1);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++}return n}};function Xo(t,n,e){if(typeof t=="string")return d(t);let r=t,{queryParams:i,fragment:o,routeConfig:s,url:a,outlet:c,params:u,data:h,title:v}=n;return Z(j(e,()=>r({params:u,data:h,queryParams:i,fragment:o,routeConfig:s,url:a,outlet:c,title:v})))}var br={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Jo(t,n,e,r,i){let o=gi(t,n,e);return o.matched?(r=wo(n,r),Yo(r,n,e,i).pipe(y(s=>s===!0?o:l({},br)))):d(o)}function gi(t,n,e){if(n.path==="**")return es(e);if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?l({},br):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||Vn)(e,t,n);if(!i)return l({},br);let o={};Object.entries(i.posParams??{}).forEach(([a,c])=>{o[a]=c.path});let s=i.consumed.length>0?l(l({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function es(t){return{matched:!0,parameters:t.length>0?Gn(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Hn(t,n,e,r){return e.length>0&&ns(t,e,r)?{segmentGroup:new g(n,rs(r,new g(e,t.children))),slicedSegments:[]}:e.length===0&&is(t,e,r)?{segmentGroup:new g(t.segments,ts(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new g(t.segments,t.children),slicedSegments:e}}function ts(t,n,e,r){let i={};for(let o of e)if(Lt(t,n,o)&&!r[$(o)]){let s=new g([],{});i[$(o)]=s}return l(l({},r),i)}function rs(t,n){let e={};e[p]=n;for(let r of t)if(r.path===""&&$(r)!==p){let i=new g([],{});e[$(r)]=i}return e}function ns(t,n,e){return e.some(r=>Lt(t,n,r)&&$(r)!==p)}function is(t,n,e){return e.some(r=>Lt(t,n,r))}function Lt(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function os(t,n,e){return n.length===0&&!t.children[e]}var Ir=class{};function ss(t,n,e,r,i,o,s="emptyOnly"){return new Tr(t,n,e,r,i,s,o).recognize()}var as=31,Tr=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Er(this.urlSerializer,this.urlTree)}noMatchError(n){return new w(4002,`'${n.segmentGroup}'`)}recognize(){let n=Hn(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(y(({children:e,rootSnapshot:r})=>{let i=new N(r,e),o=new qe("",i),s=ti(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(n){let e=new ie([],Object.freeze({}),Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),p,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,n,p,e).pipe(y(r=>({children:r,rootSnapshot:e})),te(r=>{if(r instanceof Ze)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof We?this.noMatchError(r):r}))}processSegmentGroup(n,e,r,i,o){return r.segments.length===0&&r.hasChildren()?this.processChildren(n,e,r,o):this.processSegment(n,e,r,r.segments,i,!0,o).pipe(y(s=>s instanceof N?[s]:[]))}processChildren(n,e,r,i){let o=[];for(let s of Object.keys(r.children))s==="primary"?o.unshift(s):o.push(s);return D(o).pipe(ce(s=>{let a=r.children[s],c=Co(e,s);return this.processSegmentGroup(n,c,a,s,i)}),zr((s,a)=>(s.push(...a),s)),Ft(null),$r(),O(s=>{if(s===null)return de(r);let a=vi(s);return cs(a),d(a)}))}processSegment(n,e,r,i,o,s,a){return D(e).pipe(ce(c=>this.processSegmentAgainstRoute(c._injector??n,e,c,r,i,o,s,a).pipe(te(u=>{if(u instanceof We)return d(null);throw u}))),Q(c=>!!c),te(c=>{if(fi(c))return os(r,i,o)?d(new Ir):de(r);throw c}))}processSegmentAgainstRoute(n,e,r,i,o,s,a,c){return $(r)!==s&&(s===p||!Lt(i,o,r))?de(i):r.redirectTo===void 0?this.matchSegmentAgainstRoute(n,i,r,o,s,c):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,c):de(i)}expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){let{matched:c,parameters:u,consumedSegments:h,positionalParamSegments:v,remainingSegments:m}=gi(e,i,o);if(!c)return de(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>as&&(this.allowRedirects=!1));let E=new ie(o,u,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Bn(i),$(i),i.component??i._loadedComponent??null,i,Fn(i)),C=Ot(E,a,this.paramsInheritanceStrategy);return E.params=Object.freeze(C.params),E.data=Object.freeze(C.data),this.applyRedirects.applyRedirectCommands(h,i.redirectTo,v,E,n).pipe(_(ee=>this.applyRedirects.lineralizeSegments(i,ee)),O(ee=>this.processSegment(n,r,e,ee.concat(m),s,!1,a)))}matchSegmentAgainstRoute(n,e,r,i,o,s){let a=Jo(e,r,i,n,this.urlSerializer);return r.path==="**"&&(e.children={}),a.pipe(_(c=>c.matched?(n=r._injector??n,this.getChildConfig(n,r,i).pipe(_(({routes:u})=>{let h=r._loadedInjector??n,{parameters:v,consumedSegments:m,remainingSegments:E}=c,C=new ie(m,v,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Bn(r),$(r),r.component??r._loadedComponent??null,r,Fn(r)),M=Ot(C,s,this.paramsInheritanceStrategy);C.params=Object.freeze(M.params),C.data=Object.freeze(M.data);let{segmentGroup:ee,slicedSegments:kt}=Hn(e,m,E,u);if(kt.length===0&&ee.hasChildren())return this.processChildren(h,u,ee,C).pipe(y(Je=>new N(C,Je)));if(u.length===0&&kt.length===0)return d(new N(C,[]));let Mi=$(r)===o;return this.processSegment(h,u,ee,kt,Mi?p:o,!0,C).pipe(y(Je=>new N(C,Je instanceof N?[Je]:[])))}))):de(e)))}getChildConfig(n,e,r){return e.children?d({routes:e.children,injector:n}):e.loadChildren?e._loadedRoutes!==void 0?d({routes:e._loadedRoutes,injector:e._loadedInjector}):Zo(n,e,r,this.urlSerializer).pipe(O(i=>i?this.configLoader.loadChildren(n,e).pipe(I(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):Ko(e))):d({routes:[],injector:n})}};function cs(t){t.sort((n,e)=>n.value.outlet===p?-1:e.value.outlet===p?1:n.value.outlet.localeCompare(e.value.outlet))}function us(t){let n=t.value.routeConfig;return n&&n.path===""}function vi(t){let n=[],e=new Set;for(let r of t){if(!us(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r)}for(let r of e){let i=vi(r.children);n.push(new N(r.value,i))}return n.filter(r=>!e.has(r))}function Bn(t){return t.data||{}}function Fn(t){return t.resolve||{}}function ls(t,n,e,r,i,o){return O(s=>ss(t,n,e,r,s.extractedUrl,i,o).pipe(y(({state:a,tree:c})=>U(l({},s),{targetSnapshot:a,urlAfterRedirects:c}))))}function ds(t,n){return O(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return d(e);let o=new Set(i.map(c=>c.route)),s=new Set;for(let c of o)if(!s.has(c))for(let u of mi(c))s.add(u);let a=0;return D(s).pipe(ce(c=>o.has(c)?hs(c,r,t,n):(c.data=Ot(c,c.parent,t).resolve,d(void 0))),I(()=>a++),Vt(1),O(c=>a===s.size?d(e):q))})}function mi(t){let n=t.children.map(e=>mi(e)).flat();return[t,...n]}function hs(t,n,e,r){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!ci(i)&&(o[Ye]=i.title),et(()=>(t.data=Ot(t,t.parent,e).resolve,fs(o,t,n,r).pipe(y(s=>(t._resolvedData=s,t.data=l(l({},t.data),s),null)))))}function fs(t,n,e,r){let i=pr(t);if(i.length===0)return d({});let o={};return D(i).pipe(O(s=>ps(t[s],n,e,r).pipe(Q(),I(a=>{if(a instanceof me)throw _t(new se,a);o[s]=a}))),Vt(1),y(()=>o),te(s=>fi(s)?q:be(s)))}function ps(t,n,e,r){let i=Se(n)??r,o=we(t,i),s=o.resolve?o.resolve(n,e):j(i,()=>o(n,e));return Z(s)}function hr(t){return _(n=>{let e=t(n);return e?D(e).pipe(y(()=>n)):d(n)})}var _r=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===p);return r}getResolvedTitleForRoute(e){return e.data[Ye]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>f(yi),providedIn:"root"})}return t})(),yi=(()=>{class t extends _r{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(S(xn))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ce=new T("",{providedIn:"root",factory:()=>({})}),Xe=new T(""),Si=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=f(vn);loadComponent(e,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return d(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=Z(j(e,()=>r.loadComponent())).pipe(y(wi),_(Ci),I(s=>{this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s}),tt(()=>{this.componentLoaders.delete(r)})),o=new zt(i,()=>new V).pipe($t());return this.componentLoaders.set(r,o),o}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return d({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=Ri(r,this.compiler,e,this.onLoadEndListener).pipe(tt(()=>{this.childrenLoaders.delete(r)})),s=new zt(o,()=>new V).pipe($t());return this.childrenLoaders.set(r,s),s}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ri(t,n,e,r){return Z(j(e,()=>t.loadChildren())).pipe(y(wi),_(Ci),O(i=>i instanceof en||Array.isArray(i)?d(i):D(n.compileModuleAsync(i))),y(i=>{r&&r(t);let o,s,a=!1;return Array.isArray(i)?(s=i,a=!0):(o=i.create(e).injector,s=o.get(Xe,[],{optional:!0,self:!0}).flat()),{routes:s.map(Or),injector:o}}))}function gs(t){return t&&typeof t=="object"&&"default"in t}function wi(t){return gs(t)?t.default:t}function Ci(t){return d(t)}var xt=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>f(vs),providedIn:"root"})}return t})(),vs=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ei=new T("");var bi=new T(""),Ii=(()=>{class t{currentNavigation=nt(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new V;transitionAbortWithErrorSubject=new V;configLoader=f(Si);environmentInjector=f(le);destroyRef=f(Gr);urlSerializer=f(Qe);rootContexts=f(Re);location=f(st);inputBindingEnabled=f(Ut,{optional:!0})!==null;titleStrategy=f(_r);options=f(Ce,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=f(xt);createViewTransition=f(Ei,{optional:!0});navigationErrorHandler=f(bi,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>d(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new Ct(i)),r=i=>this.events.next(new Et(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;K(()=>{this.transitions?.next(U(l({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:r}))})}setupNavigations(e){return this.transitions=new L(null),this.transitions.pipe(Y(r=>r!==null),_(r=>{let i=!1;return d(r).pipe(_(o=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",A.SupersededByNewNavigation),q;this.currentTransition=r,this.currentNavigation.set({id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,targetBrowserUrl:typeof o.extras.browserUrl=="string"?this.urlSerializer.parse(o.extras.browserUrl):o.extras.browserUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?U(l({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>o.abortController.abort()});let s=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),a=o.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!s&&a!=="reload")return this.events.next(new G(o.id,this.urlSerializer.serialize(o.rawUrl),"",He.IgnoredSameUrlNavigation)),o.resolve(!1),q;if(this.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return d(o).pipe(_(c=>(this.events.next(new ae(c.id,this.urlSerializer.serialize(c.extractedUrl),c.source,c.restoredState)),c.id!==this.navigationId?q:Promise.resolve(c))),ls(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),I(c=>{r.targetSnapshot=c.targetSnapshot,r.urlAfterRedirects=c.urlAfterRedirects,this.currentNavigation.update(h=>(h.finalUrl=c.urlAfterRedirects,h));let u=new Be(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(u)}));if(s&&this.urlHandlingStrategy.shouldProcessUrl(o.currentRawUrl)){let{id:c,extractedUrl:u,source:h,restoredState:v,extras:m}=o,E=new ae(c,this.urlSerializer.serialize(u),h,v);this.events.next(E);let C=si(this.rootComponentType).snapshot;return this.currentTransition=r=U(l({},o),{targetSnapshot:C,urlAfterRedirects:u,extras:U(l({},m),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(M=>(M.finalUrl=u,M)),d(r)}else return this.events.next(new G(o.id,this.urlSerializer.serialize(o.extractedUrl),"",He.IgnoredByUrlHandlingStrategy)),o.resolve(!1),q}),I(o=>{let s=new yt(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(s)}),y(o=>(this.currentTransition=r=U(l({},o),{guards:Do(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),r)),zo(this.environmentInjector,o=>this.events.next(o)),I(o=>{if(r.guardsResult=o.guardsResult,o.guardsResult&&typeof o.guardsResult!="boolean")throw _t(this.urlSerializer,o.guardsResult);let s=new St(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(s)}),Y(o=>o.guardsResult?!0:(this.cancelNavigationTransition(o,"",A.GuardRejected),!1)),hr(o=>{if(o.guards.canActivateChecks.length!==0)return d(o).pipe(I(s=>{let a=new Rt(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),_(s=>{let a=!1;return d(s).pipe(ds(this.paramsInheritanceStrategy,this.environmentInjector),I({next:()=>a=!0,complete:()=>{a||this.cancelNavigationTransition(s,"",A.NoDataFromResolver)}}))}),I(s=>{let a=new wt(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}))}),hr(o=>{let s=a=>{let c=[];if(a.routeConfig?.loadComponent){let u=Se(a)??this.environmentInjector;c.push(this.configLoader.loadComponent(u,a.routeConfig).pipe(I(h=>{a.component=h}),y(()=>{})))}for(let u of a.children)c.push(...s(u));return c};return Ht(s(o.targetSnapshot.root)).pipe(Ft(null),ue(1))}),hr(()=>this.afterPreactivation()),_(()=>{let{currentSnapshot:o,targetSnapshot:s}=r,a=this.createViewTransition?.(this.environmentInjector,o.root,s.root);return a?D(a).pipe(y(()=>r)):d(r)}),y(o=>{let s=bo(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return this.currentTransition=r=U(l({},o),{targetRouterState:s}),this.currentNavigation.update(a=>(a.targetRouterState=s,a)),r}),I(()=>{this.events.next(new Fe)}),Mo(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o),this.inputBindingEnabled),ue(1),qt(new Lr(o=>{let s=r.abortController.signal,a=()=>o.next();return s.addEventListener("abort",a),()=>s.removeEventListener("abort",a)}).pipe(Y(()=>!i&&!r.targetRouterState),I(()=>{this.cancelNavigationTransition(r,r.abortController.signal.reason+"",A.Aborted)}))),I({next:o=>{i=!0,this.lastSuccessfulNavigation=K(this.currentNavigation),this.events.next(new z(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects))),this.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{i=!0}}),qt(this.transitionAbortWithErrorSubject.pipe(I(o=>{throw o}))),tt(()=>{i||this.cancelNavigationTransition(r,"",A.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),te(o=>{if(this.destroyed)return r.resolve(!1),q;if(i=!0,hi(o))this.events.next(new B(r.id,this.urlSerializer.serialize(r.extractedUrl),o.message,o.cancellationCode)),Ao(o)?this.events.next(new ve(o.url,o.navigationBehaviorOptions)):r.resolve(!1);else{let s=new ge(r.id,this.urlSerializer.serialize(r.extractedUrl),o,r.targetSnapshot??void 0);try{let a=j(this.environmentInjector,()=>this.navigationErrorHandler?.(s));if(a instanceof me){let{message:c,cancellationCode:u}=_t(this.urlSerializer,a);this.events.next(new B(r.id,this.urlSerializer.serialize(r.extractedUrl),c,u)),this.events.next(new ve(a.redirectTo,a.navigationBehaviorOptions))}else throw this.events.next(s),o}catch(a){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(a)}}return q}))}))}cancelNavigationTransition(e,r,i){let o=new B(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=K(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ms(t){return t!==ke}var Ti=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>f(ys),providedIn:"root"})}return t})(),Pt=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}},ys=(()=>{class t extends Pt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Zt(t)))(i||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ai=(()=>{class t{urlSerializer=f(Qe);options=f(Ce,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=f(st);urlHandlingStrategy=f(xt);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new F;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,s=i??o;return s instanceof F?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=si(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>f(Ss),providedIn:"root"})}return t})(),Ss=(()=>{class t extends Ai{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate")})})}handleRouterEvent(e,r){e instanceof ae?this.updateStateMemento():e instanceof G?this.commitTransition(r):e instanceof Be?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof Fe?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof B&&e.code!==A.SupersededByNewNavigation&&e.code!==A.Redirect?this.restoreHistory(r):e instanceof ge?this.restoreHistory(r,!0):e instanceof z&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:r,id:i}){let{replaceUrl:o,state:s}=r;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,c=l(l({},s),this.generateNgRouterState(i,a));this.location.replaceState(e,"",c)}else{let a=l(l({},s),this.generateNgRouterState(i,this.browserPageId+1));this.location.go(e,"",a)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Zt(t)))(i||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Nr(t,n){t.events.pipe(Y(e=>e instanceof z||e instanceof B||e instanceof ge||e instanceof G),y(e=>e instanceof z||e instanceof G?0:(e instanceof B?e.code===A.Redirect||e.code===A.SupersededByNewNavigation:!1)?2:1),Y(e=>e!==2),ue(1)).subscribe(()=>{n()})}var Rs={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},ws={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Ee=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=f(nn);stateManager=f(Ai);options=f(Ce,{optional:!0})||{};pendingTasks=f(Wr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=f(Ii);urlSerializer=f(Qe);location=f(st);urlHandlingStrategy=f(xt);injector=f(le);_events=new V;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=f(Ti);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=f(Xe,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!f(Ut,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new Pr;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=K(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof B&&r.code!==A.Redirect&&r.code!==A.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof z)this.navigated=!0;else if(r instanceof ve){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),c=l({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||ms(i.source)},s);this.scheduleNavigation(a,ke,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}Ro(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),ke,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i)=>{this.navigateToSyncWithBrowser(e,i,r)})}navigateToSyncWithBrowser(e,r,i){let o={replaceUrl:!0},s=i?.navigationId?i:null;if(i){let c=l({},i);delete c.navigationId,delete c.\u0275routerPageId,Object.keys(c).length!==0&&(o.state=c)}let a=this.parseUrl(e);this.scheduleNavigation(a,r,s,o).catch(c=>{this.disposed||this.injector.get(rt)(c)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return K(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Or),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:c}=r,u=c?this.currentUrlTree.fragment:s,h=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":h=l(l({},this.currentUrlTree.queryParams),o);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=o||null}h!==null&&(h=this.removeEmptyProps(h));let v;try{let m=i?i.snapshot:this.routerState.snapshot.root;v=ri(m)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),v=this.currentUrlTree.root}return ni(v,e,h,u??null)}navigateByUrl(e,r={skipLocationChange:!1}){let i=J(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,ke,null,r)}navigate(e,r={skipLocationChange:!1}){return Cs(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=l({},Rs):r===!1?i=l({},ws):i=r,J(e))return jn(this.currentUrlTree,e,i);let o=this.parseUrl(e);return jn(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,s){if(this.disposed)return Promise.resolve(!1);let a,c,u;s?(a=s.resolve,c=s.reject,u=s.promise):u=new Promise((v,m)=>{a=v,c=m});let h=this.pendingTasks.add();return Nr(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(h))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:c,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(v=>Promise.reject(v))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Cs(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new w(4008,!1)}var jt=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=nt(null);get href(){return K(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new V;applicationErrorHandler=f(rt);options=f(Ce,{optional:!0});constructor(e,r,i,o,s,a){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=a,this.reactiveHref.set(f(new mn("href"),{optional:!0}));let c=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=c==="a"||c==="area"||!!(typeof customElements=="object"&&customElements.get(c)?.observedAttributes?.includes?.("href")),this.isAnchorElement?this.setTabIndexIfNotOnNativeEl("0"):this.subscribeToNavigationEventsIfNecessary()}subscribeToNavigationEventsIfNecessary(){if(this.subscription!==void 0||!this.isAnchorElement)return;let e=this.preserveFragment,r=i=>i==="merge"||i==="preserve";e||=r(this.queryParamsHandling),e||=!this.queryParamsHandling&&!r(this.options?.defaultQueryParamsHandling),e&&(this.subscription=this.router.events.subscribe(i=>{i instanceof z&&this.updateHref()}))}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&(this.updateHref(),this.subscribeToNavigationEventsIfNecessary()),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(J(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,r,i,o,s){let a=this.urlTree;if(a===null||this.isAnchorElement&&(e!==0||r||i||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,c)?.catch(u=>{this.applicationErrorHandler(u)}),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.reactiveHref.set(e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null)}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}get urlTree(){return this.routerLinkInput===null?null:J(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||t)(k(Ee),k(W),Zr("tabindex"),k(Jt),k(Yt),k(Cn))};static \u0275dir=Me({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&hn("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&cn("href",i.reactiveHref(),Kr)("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",ot],skipLocationChange:[2,"skipLocationChange","skipLocationChange",ot],replaceUrl:[2,"replaceUrl","replaceUrl",ot],routerLink:"routerLink"},features:[Ie]})}return t})(),bs=(()=>{class t{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new re;constructor(e,r,i,o,s){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.link=s,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof z&&this.update()})}ngAfterContentInit(){d(this.links.changes,d(null)).pipe(Bt()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=D(e).pipe(Bt()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(e){let r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let r=Is(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let o=i.urlTree;return o?e.isActive(o,r):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(r){return new(r||t)(k(Ee),k(Yt),k(Jt),k(it),k(jt,8))};static \u0275dir=Me({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&fn(o,jt,5),r&2){let s;pn(s=gn())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[Ie]})}return t})();function Is(t){return!!t.paths}var Ts=new T("");function As(t,...n){return Fr([{provide:Xe,multi:!0,useValue:t},[],{provide:W,useFactory:Ms,deps:[Ee]},{provide:sn,multi:!0,useFactory:Ds},n.map(e=>e.\u0275providers)])}function Ms(t){return t.routerState.root}function Ds(){let t=f(Gt);return n=>{let e=t.get(an);if(n!==e.components[0])return;let r=t.get(Ee),i=t.get(Os);t.get(_s)===1&&r.initialNavigation(),t.get(Ns,null,{optional:!0})?.setUpPreloading(),t.get(Ts,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var Os=new T("",{factory:()=>new V}),_s=new T("",{providedIn:"root",factory:()=>1});var Ns=new T("");export{Hi as a,W as b,Mr as c,Ee as d,jt as e,bs as f,As as g};
@@ -1 +0,0 @@
1
- import{$ as u,W as d,g as b,lc as c,mc as v}from"./chunk-OBPR2XVH.js";var O=class g{http=u(v);base="/api";getCommits(t={}){let e=new c;for(let[m,i]of Object.entries(t))i!=null&&i!==""&&(e=e.set(m,String(i)));return this.http.get(`${this.base}/commits`,{params:e})}streamCommits(t={}){return new b(e=>{let m=new URL(`${window.location.origin}${this.base}/commits/stream`);for(let[a,o]of Object.entries(t))o!=null&&o!==""&&m.searchParams.set(a,String(o));let i=new EventSource(m.toString()),n=[],r=[],h=Math.max(1,t.page??1),f=0,s=0,l=!1,C=()=>{s=0,!(!r.length&&!l)&&(r.length&&n.push(...r.splice(0)),e.next({commits:n.slice(),total:l&&f||n.length,page:h,pageSize:n.length||t.pageSize||100,totalPages:1,hasNext:!1,hasPrevious:h>1}),l&&(i.close(),e.complete()))},p=()=>{s||(s=requestAnimationFrame(C))};return i.addEventListener("commit",a=>{r.push(JSON.parse(a.data)),p()}),i.addEventListener("done",a=>{f=JSON.parse(a.data).total??n.length+r.length,l=!0,p()}),i.addEventListener("error",a=>{i.close(),s&&cancelAnimationFrame(s),e.error(a)}),()=>{i.close(),s&&cancelAnimationFrame(s)}})}getCommit(t){return this.http.get(`${this.base}/commit/${t}`)}getDiff(t){return this.http.get(`${this.base}/diff/${t}`)}getBlame(t){let e=new c().set("file",t);return this.http.get(`${this.base}/blame`,{params:e})}getTags(){return this.http.get(`${this.base}/tags`)}getBranches(){return this.http.get(`${this.base}/branches`)}getAuthors(){return this.http.get(`${this.base}/authors`)}static \u0275fac=function(e){return new(e||g)};static \u0275prov=d({token:g,factory:g.\u0275fac,providedIn:"root"})};export{O as a};
@@ -1 +0,0 @@
1
- function St(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Dr(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ct(t){let e,r,n;t.length!==2?(e=St,r=(s,f)=>St(t(s),f),n=(s,f)=>t(s)-f):(e=t===St||t===Dr?t:wu,r=t,n=t);function o(s,f,u=0,c=s.length){if(u<c){if(e(f,f)!==0)return c;do{let h=u+c>>>1;r(s[h],f)<0?u=h+1:c=h}while(u<c)}return u}function i(s,f,u=0,c=s.length){if(u<c){if(e(f,f)!==0)return c;do{let h=u+c>>>1;r(s[h],f)<=0?u=h+1:c=h}while(u<c)}return u}function a(s,f,u=0,c=s.length){let h=o(s,f,u,c-1);return h>u&&n(s[h-1],f)>-n(s[h],f)?h-1:h}return{left:o,center:a,right:i}}function wu(){return 0}function An(t,e){let r,n;if(e===void 0)for(let o of t)o!=null&&(r===void 0?o>=o&&(r=n=o):(r>o&&(r=o),n<o&&(n=o)));else{let o=-1;for(let i of t)(i=e(i,++o,t))!=null&&(r===void 0?i>=i&&(r=n=i):(r>i&&(r=i),n<i&&(n=i)))}return[r,n]}function Dn(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let o of t)(o=e(o,++n,t))!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}return r}function Ir(t){return t===null?NaN:+t}var In=Ct(St),En=In.right,_u=In.left,bu=Ct(Ir).center,Er=En;var Mu=Math.sqrt(50),Tu=Math.sqrt(10),ku=Math.sqrt(2);function Ue(t,e,r){let n=(e-t)/Math.max(0,r),o=Math.floor(Math.log10(n)),i=n/Math.pow(10,o),a=i>=Mu?10:i>=Tu?5:i>=ku?2:1,s,f,u;return o<0?(u=Math.pow(10,-o)/a,s=Math.round(t*u),f=Math.round(e*u),s/u<t&&++s,f/u>e&&--f,u=-u):(u=Math.pow(10,o)*a,s=Math.round(t/u),f=Math.round(e/u),s*u<t&&++s,f*u>e&&--f),f<s&&.5<=r&&r<2?Ue(t,e,r*2):[s,f,u]}function Ye(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];let n=e<t,[o,i,a]=n?Ue(e,t,r):Ue(t,e,r);if(!(i>=o))return[];let s=i-o+1,f=new Array(s);if(n)if(a<0)for(let u=0;u<s;++u)f[u]=(i-u)/-a;else for(let u=0;u<s;++u)f[u]=(i-u)*a;else if(a<0)for(let u=0;u<s;++u)f[u]=(o+u)/-a;else for(let u=0;u<s;++u)f[u]=(o+u)*a;return f}function ue(t,e,r){return e=+e,t=+t,r=+r,Ue(t,e,r)[2]}function Wt(t,e,r){e=+e,t=+t,r=+r;let n=e<t,o=n?ue(e,t,r):ue(t,e,r);return(n?-1:1)*(o<0?1/-o:o)}function Fn(t){return t}var Fr=1,$e=2,zr=3,se=4,zn=1e-6;function Su(t){return"translate("+t+",0)"}function Cu(t){return"translate(0,"+t+")"}function Nu(t){return e=>+t(e)}function Au(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function Du(){return!this.__axis}function Or(t,e){var r=[],n=null,o=null,i=6,a=6,s=3,f=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===Fr||t===se?-1:1,c=t===se||t===$e?"x":"y",h=t===Fr||t===zr?Su:Cu;function l(m){var x=n??(e.ticks?e.ticks.apply(e,r):e.domain()),g=o??(e.tickFormat?e.tickFormat.apply(e,r):Fn),d=Math.max(i,0)+s,y=e.range(),_=+y[0]+f,M=+y[y.length-1]+f,p=(e.bandwidth?Au:Nu)(e.copy(),f),b=m.selection?m.selection():m,v=b.selectAll(".domain").data([null]),S=b.selectAll(".tick").data(x,e).order(),C=S.exit(),z=S.enter().append("g").attr("class","tick"),N=S.select("line"),k=S.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(z),N=N.merge(z.append("line").attr("stroke","currentColor").attr(c+"2",u*i)),k=k.merge(z.append("text").attr("fill","currentColor").attr(c,u*d).attr("dy",t===Fr?"0em":t===zr?"0.71em":"0.32em")),m!==b&&(v=v.transition(m),S=S.transition(m),N=N.transition(m),k=k.transition(m),C=C.transition(m).attr("opacity",zn).attr("transform",function(F){return isFinite(F=p(F))?h(F+f):this.getAttribute("transform")}),z.attr("opacity",zn).attr("transform",function(F){var D=this.parentNode.__axis;return h((D&&isFinite(D=D(F))?D:p(F))+f)})),C.remove(),v.attr("d",t===se||t===$e?a?"M"+u*a+","+_+"H"+f+"V"+M+"H"+u*a:"M"+f+","+_+"V"+M:a?"M"+_+","+u*a+"V"+f+"H"+M+"V"+u*a:"M"+_+","+f+"H"+M),S.attr("opacity",1).attr("transform",function(F){return h(p(F)+f)}),N.attr(c+"2",u*i),k.attr(c,u*d).text(g),b.filter(Du).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===$e?"start":t===se?"end":"middle"),b.each(function(){this.__axis=p})}return l.scale=function(m){return arguments.length?(e=m,l):e},l.ticks=function(){return r=Array.from(arguments),l},l.tickArguments=function(m){return arguments.length?(r=m==null?[]:Array.from(m),l):r.slice()},l.tickValues=function(m){return arguments.length?(n=m==null?null:Array.from(m),l):n&&n.slice()},l.tickFormat=function(m){return arguments.length?(o=m,l):o},l.tickSize=function(m){return arguments.length?(i=a=+m,l):i},l.tickSizeInner=function(m){return arguments.length?(i=+m,l):i},l.tickSizeOuter=function(m){return arguments.length?(a=+m,l):a},l.tickPadding=function(m){return arguments.length?(s=+m,l):s},l.offset=function(m){return arguments.length?(f=+m,l):f},l}function Iu(t){return Or($e,t)}function Eu(t){return Or(zr,t)}function Fu(t){return Or(se,t)}function zu(){}function Nt(t){return t==null?zu:function(){return this.querySelector(t)}}function On(t){typeof t!="function"&&(t=Nt(t));for(var e=this._groups,r=e.length,n=new Array(r),o=0;o<r;++o)for(var i=e[o],a=i.length,s=n[o]=new Array(a),f,u,c=0;c<a;++c)(f=i[c])&&(u=t.call(f,f.__data__,c,i))&&("__data__"in f&&(u.__data__=f.__data__),s[c]=u);return new Y(n,this._parents)}function Ur(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Ou(){return[]}function fe(t){return t==null?Ou:function(){return this.querySelectorAll(t)}}function Uu(t){return function(){return Ur(t.apply(this,arguments))}}function Un(t){typeof t=="function"?t=Uu(t):t=fe(t);for(var e=this._groups,r=e.length,n=[],o=[],i=0;i<r;++i)for(var a=e[i],s=a.length,f,u=0;u<s;++u)(f=a[u])&&(n.push(t.call(f,f.__data__,u,a)),o.push(f));return new Y(n,o)}function le(t){return function(){return this.matches(t)}}function Re(t){return function(e){return e.matches(t)}}var Yu=Array.prototype.find;function $u(t){return function(){return Yu.call(this.children,t)}}function Ru(){return this.firstElementChild}function Yn(t){return this.select(t==null?Ru:$u(typeof t=="function"?t:Re(t)))}var Lu=Array.prototype.filter;function Pu(){return Array.from(this.children)}function Hu(t){return function(){return Lu.call(this.children,t)}}function $n(t){return this.selectAll(t==null?Pu:Hu(typeof t=="function"?t:Re(t)))}function Rn(t){typeof t!="function"&&(t=le(t));for(var e=this._groups,r=e.length,n=new Array(r),o=0;o<r;++o)for(var i=e[o],a=i.length,s=n[o]=[],f,u=0;u<a;++u)(f=i[u])&&t.call(f,f.__data__,u,i)&&s.push(f);return new Y(n,this._parents)}function Le(t){return new Array(t.length)}function Ln(){return new Y(this._enter||this._groups.map(Le),this._parents)}function ce(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ce.prototype={constructor:ce,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Pn(t){return function(){return t}}function qu(t,e,r,n,o,i){for(var a=0,s,f=e.length,u=i.length;a<u;++a)(s=e[a])?(s.__data__=i[a],n[a]=s):r[a]=new ce(t,i[a]);for(;a<f;++a)(s=e[a])&&(o[a]=s)}function Bu(t,e,r,n,o,i,a){var s,f,u=new Map,c=e.length,h=i.length,l=new Array(c),m;for(s=0;s<c;++s)(f=e[s])&&(l[s]=m=a.call(f,f.__data__,s,e)+"",u.has(m)?o[s]=f:u.set(m,f));for(s=0;s<h;++s)m=a.call(t,i[s],s,i)+"",(f=u.get(m))?(n[s]=f,f.__data__=i[s],u.delete(m)):r[s]=new ce(t,i[s]);for(s=0;s<c;++s)(f=e[s])&&u.get(l[s])===f&&(o[s]=f)}function Xu(t){return t.__data__}function Hn(t,e){if(!arguments.length)return Array.from(this,Xu);var r=e?Bu:qu,n=this._parents,o=this._groups;typeof t!="function"&&(t=Pn(t));for(var i=o.length,a=new Array(i),s=new Array(i),f=new Array(i),u=0;u<i;++u){var c=n[u],h=o[u],l=h.length,m=Wu(t.call(c,c&&c.__data__,u,n)),x=m.length,g=s[u]=new Array(x),d=a[u]=new Array(x),y=f[u]=new Array(l);r(c,h,g,d,y,m,e);for(var _=0,M=0,p,b;_<x;++_)if(p=g[_]){for(_>=M&&(M=_+1);!(b=d[M])&&++M<x;);p._next=b||null}}return a=new Y(a,n),a._enter=s,a._exit=f,a}function Wu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function qn(){return new Y(this._exit||this._groups.map(Le),this._parents)}function Bn(t,e,r){var n=this.enter(),o=this,i=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),e!=null&&(o=e(o),o&&(o=o.selection())),r==null?i.remove():r(i),n&&o?n.merge(o).order():o}function Xn(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,o=r.length,i=n.length,a=Math.min(o,i),s=new Array(o),f=0;f<a;++f)for(var u=r[f],c=n[f],h=u.length,l=s[f]=new Array(h),m,x=0;x<h;++x)(m=u[x]||c[x])&&(l[x]=m);for(;f<o;++f)s[f]=r[f];return new Y(s,this._parents)}function Wn(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n=t[e],o=n.length-1,i=n[o],a;--o>=0;)(a=n[o])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function Vn(t){t||(t=Vu);function e(h,l){return h&&l?t(h.__data__,l.__data__):!h-!l}for(var r=this._groups,n=r.length,o=new Array(n),i=0;i<n;++i){for(var a=r[i],s=a.length,f=o[i]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(f[c]=u);f.sort(e)}return new Y(o,this._parents).order()}function Vu(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Zn(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Qn(){return Array.from(this)}function Gn(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],o=0,i=n.length;o<i;++o){var a=n[o];if(a)return a}return null}function Kn(){let t=0;for(let e of this)++t;return t}function Jn(){return!this.node()}function jn(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var o=e[r],i=0,a=o.length,s;i<a;++i)(s=o[i])&&t.call(s,s.__data__,i,o);return this}var Pe="http://www.w3.org/1999/xhtml",Yr={svg:"http://www.w3.org/2000/svg",xhtml:Pe,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function lt(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Yr.hasOwnProperty(e)?{space:Yr[e],local:t}:t}function Zu(t){return function(){this.removeAttribute(t)}}function Qu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Gu(t,e){return function(){this.setAttribute(t,e)}}function Ku(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ju(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function ju(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function to(t,e){var r=lt(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?Qu:Zu:typeof e=="function"?r.local?ju:Ju:r.local?Ku:Gu)(r,e))}function He(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ts(t){return function(){this.style.removeProperty(t)}}function es(t,e,r){return function(){this.style.setProperty(t,e,r)}}function rs(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function eo(t,e,r){return arguments.length>1?this.each((e==null?ts:typeof e=="function"?rs:es)(t,e,r??"")):yt(this.node(),t)}function yt(t,e){return t.style.getPropertyValue(e)||He(t).getComputedStyle(t,null).getPropertyValue(e)}function ns(t){return function(){delete this[t]}}function os(t,e){return function(){this[t]=e}}function is(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function ro(t,e){return arguments.length>1?this.each((e==null?ns:typeof e=="function"?is:os)(t,e)):this.node()[t]}function no(t){return t.trim().split(/^|\s+/)}function $r(t){return t.classList||new oo(t)}function oo(t){this._node=t,this._names=no(t.getAttribute("class")||"")}oo.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function io(t,e){for(var r=$r(t),n=-1,o=e.length;++n<o;)r.add(e[n])}function ao(t,e){for(var r=$r(t),n=-1,o=e.length;++n<o;)r.remove(e[n])}function as(t){return function(){io(this,t)}}function us(t){return function(){ao(this,t)}}function ss(t,e){return function(){(e.apply(this,arguments)?io:ao)(this,t)}}function uo(t,e){var r=no(t+"");if(arguments.length<2){for(var n=$r(this.node()),o=-1,i=r.length;++o<i;)if(!n.contains(r[o]))return!1;return!0}return this.each((typeof e=="function"?ss:e?as:us)(r,e))}function fs(){this.textContent=""}function ls(t){return function(){this.textContent=t}}function cs(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function so(t){return arguments.length?this.each(t==null?fs:(typeof t=="function"?cs:ls)(t)):this.node().textContent}function hs(){this.innerHTML=""}function ms(t){return function(){this.innerHTML=t}}function ps(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function fo(t){return arguments.length?this.each(t==null?hs:(typeof t=="function"?ps:ms)(t)):this.node().innerHTML}function ds(){this.nextSibling&&this.parentNode.appendChild(this)}function lo(){return this.each(ds)}function gs(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function co(){return this.each(gs)}function xs(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Pe&&e.documentElement.namespaceURI===Pe?e.createElement(t):e.createElementNS(r,t)}}function ys(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function qe(t){var e=lt(t);return(e.local?ys:xs)(e)}function ho(t){var e=typeof t=="function"?t:qe(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function vs(){return null}function mo(t,e){var r=typeof t=="function"?t:qe(t),n=e==null?vs:typeof e=="function"?e:Nt(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function ws(){var t=this.parentNode;t&&t.removeChild(this)}function po(){return this.each(ws)}function _s(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function bs(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function go(t){return this.select(t?bs:_s)}function xo(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Ms(t){return function(e){t.call(this,e,this.__data__)}}function Ts(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function ks(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,o=e.length,i;r<o;++r)i=e[r],(!t.type||i.type===t.type)&&i.name===t.name?this.removeEventListener(i.type,i.listener,i.options):e[++n]=i;++n?e.length=n:delete this.__on}}}function Ss(t,e,r){return function(){var n=this.__on,o,i=Ms(e);if(n){for(var a=0,s=n.length;a<s;++a)if((o=n[a]).type===t.type&&o.name===t.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=r),o.value=e;return}}this.addEventListener(t.type,i,r),o={type:t.type,name:t.name,value:e,listener:i,options:r},n?n.push(o):this.__on=[o]}}function yo(t,e,r){var n=Ts(t+""),o,i=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var f=0,u=s.length,c;f<u;++f)for(o=0,c=s[f];o<i;++o)if((a=n[o]).type===c.type&&a.name===c.name)return c.value}return}for(s=e?Ss:ks,o=0;o<i;++o)this.each(s(n[o],e,r));return this}function vo(t,e,r){var n=He(t),o=n.CustomEvent;typeof o=="function"?o=new o(e,r):(o=n.document.createEvent("Event"),r?(o.initEvent(e,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function Cs(t,e){return function(){return vo(this,t,e)}}function Ns(t,e){return function(){return vo(this,t,e.apply(this,arguments))}}function wo(t,e){return this.each((typeof e=="function"?Ns:Cs)(t,e))}function*_o(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],o=0,i=n.length,a;o<i;++o)(a=n[o])&&(yield a)}var Rr=[null];function Y(t,e){this._groups=t,this._parents=e}function bo(){return new Y([[document.documentElement]],Rr)}function As(){return this}Y.prototype=bo.prototype={constructor:Y,select:On,selectAll:Un,selectChild:Yn,selectChildren:$n,filter:Rn,data:Hn,enter:Ln,exit:qn,join:Bn,merge:Xn,selection:As,order:Wn,sort:Vn,call:Zn,nodes:Qn,node:Gn,size:Kn,empty:Jn,each:jn,attr:to,style:eo,property:ro,classed:uo,text:so,html:fo,raise:lo,lower:co,append:ho,insert:mo,remove:po,clone:go,datum:xo,on:yo,dispatch:wo,[Symbol.iterator]:_o};var ct=bo;function At(t){return typeof t=="string"?new Y([[document.querySelector(t)]],[document.documentElement]):new Y([[t]],Rr)}function Mo(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Be(t,e){if(t=Mo(t),e===void 0&&(e=t.currentTarget),e){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}if(e.getBoundingClientRect){var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}}return[t.pageX,t.pageY]}function Xe(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Lr(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function pe(){}var he=.7,Ze=1/he,Vt="\\s*([+-]?\\d+)\\s*",me="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ot="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ds=/^#([0-9a-f]{3,8})$/,Is=new RegExp(`^rgb\\(${Vt},${Vt},${Vt}\\)$`),Es=new RegExp(`^rgb\\(${ot},${ot},${ot}\\)$`),Fs=new RegExp(`^rgba\\(${Vt},${Vt},${Vt},${me}\\)$`),zs=new RegExp(`^rgba\\(${ot},${ot},${ot},${me}\\)$`),Os=new RegExp(`^hsl\\(${me},${ot},${ot}\\)$`),Us=new RegExp(`^hsla\\(${me},${ot},${ot},${me}\\)$`),To={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Xe(pe,tt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ko,formatHex:ko,formatHex8:Ys,formatHsl:$s,formatRgb:So,toString:So});function ko(){return this.rgb().formatHex()}function Ys(){return this.rgb().formatHex8()}function $s(){return Eo(this).formatHsl()}function So(){return this.rgb().formatRgb()}function tt(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Ds.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?Co(e):r===3?new Z(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?We(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?We(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Is.exec(t))?new Z(e[1],e[2],e[3],1):(e=Es.exec(t))?new Z(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Fs.exec(t))?We(e[1],e[2],e[3],e[4]):(e=zs.exec(t))?We(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Os.exec(t))?Do(e[1],e[2]/100,e[3]/100,1):(e=Us.exec(t))?Do(e[1],e[2]/100,e[3]/100,e[4]):To.hasOwnProperty(t)?Co(To[t]):t==="transparent"?new Z(NaN,NaN,NaN,0):null}function Co(t){return new Z(t>>16&255,t>>8&255,t&255,1)}function We(t,e,r,n){return n<=0&&(t=e=r=NaN),new Z(t,e,r,n)}function Rs(t){return t instanceof pe||(t=tt(t)),t?(t=t.rgb(),new Z(t.r,t.g,t.b,t.opacity)):new Z}function Zt(t,e,r,n){return arguments.length===1?Rs(t):new Z(t,e,r,n??1)}function Z(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}Xe(Z,Zt,Lr(pe,{brighter(t){return t=t==null?Ze:Math.pow(Ze,t),new Z(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?he:Math.pow(he,t),new Z(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Z(It(this.r),It(this.g),It(this.b),Qe(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:No,formatHex:No,formatHex8:Ls,formatRgb:Ao,toString:Ao}));function No(){return`#${Dt(this.r)}${Dt(this.g)}${Dt(this.b)}`}function Ls(){return`#${Dt(this.r)}${Dt(this.g)}${Dt(this.b)}${Dt((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ao(){let t=Qe(this.opacity);return`${t===1?"rgb(":"rgba("}${It(this.r)}, ${It(this.g)}, ${It(this.b)}${t===1?")":`, ${t})`}`}function Qe(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function It(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Dt(t){return t=It(t),(t<16?"0":"")+t.toString(16)}function Do(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new j(t,e,r,n)}function Eo(t){if(t instanceof j)return new j(t.h,t.s,t.l,t.opacity);if(t instanceof pe||(t=tt(t)),!t)return new j;if(t instanceof j)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,o=Math.min(e,r,n),i=Math.max(e,r,n),a=NaN,s=i-o,f=(i+o)/2;return s?(e===i?a=(r-n)/s+(r<n)*6:r===i?a=(n-e)/s+2:a=(e-r)/s+4,s/=f<.5?i+o:2-i-o,a*=60):s=f>0&&f<1?0:a,new j(a,s,f,t.opacity)}function Fo(t,e,r,n){return arguments.length===1?Eo(t):new j(t,e,r,n??1)}function j(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}Xe(j,Fo,Lr(pe,{brighter(t){return t=t==null?Ze:Math.pow(Ze,t),new j(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?he:Math.pow(he,t),new j(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,o=2*r-n;return new Z(Pr(t>=240?t-240:t+120,o,n),Pr(t,o,n),Pr(t<120?t+240:t-120,o,n),this.opacity)},clamp(){return new j(Io(this.h),Ve(this.s),Ve(this.l),Qe(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=Qe(this.opacity);return`${t===1?"hsl(":"hsla("}${Io(this.h)}, ${Ve(this.s)*100}%, ${Ve(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Io(t){return t=(t||0)%360,t<0?t+360:t}function Ve(t){return Math.max(0,Math.min(1,t||0))}function Pr(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}function Hr(t,e,r,n,o){var i=t*t,a=i*t;return((1-3*t+3*i-a)*e+(4-6*i+3*a)*r+(1+3*t+3*i-3*a)*n+a*o)/6}function zo(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),o=t[n],i=t[n+1],a=n>0?t[n-1]:2*o-i,s=n<e-1?t[n+2]:2*i-o;return Hr((r-n/e)*e,a,o,i,s)}}function Oo(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),o=t[(n+e-1)%e],i=t[n%e],a=t[(n+1)%e],s=t[(n+2)%e];return Hr((r-n/e)*e,o,i,a,s)}}var de=t=>()=>t;function Ps(t,e){return function(r){return t+r*e}}function Hs(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function Uo(t){return(t=+t)==1?Ge:function(e,r){return r-e?Hs(e,r,t):de(isNaN(e)?r:e)}}function Ge(t,e){var r=e-t;return r?Ps(t,r):de(isNaN(t)?e:t)}var Et=(function t(e){var r=Uo(e);function n(o,i){var a=r((o=Zt(o)).r,(i=Zt(i)).r),s=r(o.g,i.g),f=r(o.b,i.b),u=Ge(o.opacity,i.opacity);return function(c){return o.r=a(c),o.g=s(c),o.b=f(c),o.opacity=u(c),o+""}}return n.gamma=t,n})(1);function Yo(t){return function(e){var r=e.length,n=new Array(r),o=new Array(r),i=new Array(r),a,s;for(a=0;a<r;++a)s=Zt(e[a]),n[a]=s.r||0,o[a]=s.g||0,i[a]=s.b||0;return n=t(n),o=t(o),i=t(i),s.opacity=1,function(f){return s.r=n(f),s.g=o(f),s.b=i(f),s+""}}}var qs=Yo(zo),Bs=Yo(Oo);function $o(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),o;return function(i){for(o=0;o<r;++o)n[o]=t[o]*(1-i)+e[o]*i;return n}}function Ro(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Lo(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,o=new Array(n),i=new Array(r),a;for(a=0;a<n;++a)o[a]=ht(t[a],e[a]);for(;a<r;++a)i[a]=e[a];return function(s){for(a=0;a<n;++a)i[a]=o[a](s);return i}}function Po(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function H(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function Ho(t,e){var r={},n={},o;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(o in e)o in t?r[o]=ht(t[o],e[o]):n[o]=e[o];return function(i){for(o in r)n[o]=r[o](i);return n}}var Br=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qr=new RegExp(Br.source,"g");function Xs(t){return function(){return t}}function Ws(t){return function(e){return t(e)+""}}function ge(t,e){var r=Br.lastIndex=qr.lastIndex=0,n,o,i,a=-1,s=[],f=[];for(t=t+"",e=e+"";(n=Br.exec(t))&&(o=qr.exec(e));)(i=o.index)>r&&(i=e.slice(r,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,f.push({i:a,x:H(n,o)})),r=qr.lastIndex;return r<e.length&&(i=e.slice(r),s[a]?s[a]+=i:s[++a]=i),s.length<2?f[0]?Ws(f[0].x):Xs(e):(e=f.length,function(u){for(var c=0,h;c<e;++c)s[(h=f[c]).i]=h.x(u);return s.join("")})}function ht(t,e){var r=typeof e,n;return e==null||r==="boolean"?de(e):(r==="number"?H:r==="string"?(n=tt(e))?(e=n,Et):ge:e instanceof tt?Et:e instanceof Date?Po:Ro(e)?$o:Array.isArray(e)?Lo:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Ho:H)(t,e)}function xe(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var qo=180/Math.PI,Ke={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Xr(t,e,r,n,o,i){var a,s,f;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(f=t*r+e*n)&&(r-=t*f,n-=e*f),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,f/=s),t*n<e*r&&(t=-t,e=-e,f=-f,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*qo,skewX:Math.atan(f)*qo,scaleX:a,scaleY:s}}var Je;function Bo(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Ke:Xr(e.a,e.b,e.c,e.d,e.e,e.f)}function Xo(t){return t==null?Ke:(Je||(Je=document.createElementNS("http://www.w3.org/2000/svg","g")),Je.setAttribute("transform",t),(t=Je.transform.baseVal.consolidate())?(t=t.matrix,Xr(t.a,t.b,t.c,t.d,t.e,t.f)):Ke)}function Wo(t,e,r,n){function o(u){return u.length?u.pop()+" ":""}function i(u,c,h,l,m,x){if(u!==h||c!==l){var g=m.push("translate(",null,e,null,r);x.push({i:g-4,x:H(u,h)},{i:g-2,x:H(c,l)})}else(h||l)&&m.push("translate("+h+e+l+r)}function a(u,c,h,l){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),l.push({i:h.push(o(h)+"rotate(",null,n)-2,x:H(u,c)})):c&&h.push(o(h)+"rotate("+c+n)}function s(u,c,h,l){u!==c?l.push({i:h.push(o(h)+"skewX(",null,n)-2,x:H(u,c)}):c&&h.push(o(h)+"skewX("+c+n)}function f(u,c,h,l,m,x){if(u!==h||c!==l){var g=m.push(o(m)+"scale(",null,",",null,")");x.push({i:g-4,x:H(u,h)},{i:g-2,x:H(c,l)})}else(h!==1||l!==1)&&m.push(o(m)+"scale("+h+","+l+")")}return function(u,c){var h=[],l=[];return u=t(u),c=t(c),i(u.translateX,u.translateY,c.translateX,c.translateY,h,l),a(u.rotate,c.rotate,h,l),s(u.skewX,c.skewX,h,l),f(u.scaleX,u.scaleY,c.scaleX,c.scaleY,h,l),u=c=null,function(m){for(var x=-1,g=l.length,d;++x<g;)h[(d=l[x]).i]=d.x(m);return h.join("")}}}var Wr=Wo(Bo,"px, ","px)","deg)"),Vr=Wo(Xo,", ",")",")");function Vo(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ft(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function it(t){return t=Ft(Math.abs(t)),t?t[1]:NaN}function Zo(t,e){return function(r,n){for(var o=r.length,i=[],a=0,s=t[0],f=0;o>0&&s>0&&(f+s+1>n&&(s=Math.max(1,n-f)),i.push(r.substring(o-=s,o+s)),!((f+=s+1)>n));)s=t[a=(a+1)%t.length];return i.reverse().join(e)}}function Qo(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var Vs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vt(t){if(!(e=Vs.exec(t)))throw new Error("invalid format: "+t);var e;return new je({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}vt.prototype=je.prototype;function je(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}je.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Go(t){t:for(var e=t.length,r=1,n=-1,o;r<e;++r)switch(t[r]){case".":n=o=r;break;case"0":n===0&&(n=r),o=r;break;default:if(!+t[r])break t;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(o+1):t}var Zr;function Ko(t,e){var r=Ft(t,e);if(!r)return t+"";var n=r[0],o=r[1],i=o-(Zr=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=n.length;return i===a?n:i>a?n+new Array(i-a+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Ft(t,Math.max(0,e+i-1))[0]}function Qr(t,e){var r=Ft(t,e);if(!r)return t+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}var Gr={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Vo,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Qr(t*100,e),r:Qr,s:Ko,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Kr(t){return t}var Jo=Array.prototype.map,jo=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function ti(t){var e=t.grouping===void 0||t.thousands===void 0?Kr:Zo(Jo.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",o=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?Kr:Qo(Jo.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"\u2212":t.minus+"",f=t.nan===void 0?"NaN":t.nan+"";function u(h){h=vt(h);var l=h.fill,m=h.align,x=h.sign,g=h.symbol,d=h.zero,y=h.width,_=h.comma,M=h.precision,p=h.trim,b=h.type;b==="n"?(_=!0,b="g"):Gr[b]||(M===void 0&&(M=12),p=!0,b="g"),(d||l==="0"&&m==="=")&&(d=!0,l="0",m="=");var v=g==="$"?r:g==="#"&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",S=g==="$"?n:/[%p]/.test(b)?a:"",C=Gr[b],z=/[defgprs%]/.test(b);M=M===void 0?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,M)):Math.max(0,Math.min(20,M));function N(k){var F=v,D=S,Q,Xt,nt;if(b==="c")D=C(k)+D,k="";else{k=+k;var ft=k<0||1/k<0;if(k=isNaN(k)?f:C(Math.abs(k),M),p&&(k=Go(k)),ft&&+k==0&&x!=="+"&&(ft=!1),F=(ft?x==="("?x:s:x==="-"||x==="("?"":x)+F,D=(b==="s"?jo[8+Zr/3]:"")+D+(ft&&x==="("?")":""),z){for(Q=-1,Xt=k.length;++Q<Xt;)if(nt=k.charCodeAt(Q),48>nt||nt>57){D=(nt===46?o+k.slice(Q+1):k.slice(Q))+D,k=k.slice(0,Q);break}}}_&&!d&&(k=e(k,1/0));var xt=F.length+k.length+D.length,W=xt<y?new Array(y-xt+1).join(l):"";switch(_&&d&&(k=e(W+k,W.length?y-D.length:1/0),W=""),m){case"<":k=F+k+D+W;break;case"=":k=F+W+k+D;break;case"^":k=W.slice(0,xt=W.length>>1)+F+k+D+W.slice(xt);break;default:k=W+F+k+D;break}return i(k)}return N.toString=function(){return h+""},N}function c(h,l){var m=u((h=vt(h),h.type="f",h)),x=Math.max(-8,Math.min(8,Math.floor(it(l)/3)))*3,g=Math.pow(10,-x),d=jo[8+x/3];return function(y){return m(g*y)+d}}return{format:u,formatPrefix:c}}var tr,er,rr;Jr({thousands:",",grouping:[3],currency:["$",""]});function Jr(t){return tr=ti(t),er=tr.format,rr=tr.formatPrefix,tr}function jr(t){return Math.max(0,-it(Math.abs(t)))}function tn(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(it(e)/3)))*3-it(Math.abs(t)))}function en(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,it(e)-it(t))+1}function Zs(t){var e=0,r=t.children,n=r&&r.length;if(!n)e=1;else for(;--n>=0;)e+=r[n].value;t.value=e}function ei(){return this.eachAfter(Zs)}function ri(t,e){let r=-1;for(let n of this)t.call(e,n,++r,this);return this}function ni(t,e){for(var r=this,n=[r],o,i,a=-1;r=n.pop();)if(t.call(e,r,++a,this),o=r.children)for(i=o.length-1;i>=0;--i)n.push(o[i]);return this}function oi(t,e){for(var r=this,n=[r],o=[],i,a,s,f=-1;r=n.pop();)if(o.push(r),i=r.children)for(a=0,s=i.length;a<s;++a)n.push(i[a]);for(;r=o.pop();)t.call(e,r,++f,this);return this}function ii(t,e){let r=-1;for(let n of this)if(t.call(e,n,++r,this))return n}function ai(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,n=e.children,o=n&&n.length;--o>=0;)r+=n[o].value;e.value=r})}function ui(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function si(t){for(var e=this,r=Qs(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var o=n.length;t!==r;)n.splice(o,0,t),t=t.parent;return n}function Qs(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),o=null;for(t=r.pop(),e=n.pop();t===e;)o=t,t=r.pop(),e=n.pop();return o}function fi(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function li(){return Array.from(this)}function ci(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function hi(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}function*mi(){var t=this,e,r=[t],n,o,i;do for(e=r.reverse(),r=[];t=e.pop();)if(yield t,n=t.children)for(o=0,i=n.length;o<i;++o)r.push(n[o]);while(r.length)}function nr(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=Js)):e===void 0&&(e=Ks);for(var r=new ye(t),n,o=[r],i,a,s,f;n=o.pop();)if((a=e(n.data))&&(f=(a=Array.from(a)).length))for(n.children=a,s=f-1;s>=0;--s)o.push(i=a[s]=new ye(a[s])),i.parent=n,i.depth=n.depth+1;return r.eachBefore(tf)}function Gs(){return nr(this).eachBefore(js)}function Ks(t){return t.children}function Js(t){return Array.isArray(t)?t[1]:null}function js(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function tf(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function ye(t){this.data=t,this.depth=this.height=0,this.parent=null}ye.prototype=nr.prototype={constructor:ye,count:ei,each:ri,eachAfter:oi,eachBefore:ni,find:ii,sum:ai,sort:ui,path:si,ancestors:fi,descendants:li,leaves:ci,links:hi,copy:Gs,[Symbol.iterator]:mi};function pi(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function di(t,e,r,n,o){for(var i=t.children,a,s=-1,f=i.length,u=t.value&&(n-e)/t.value;++s<f;)a=i[s],a.y0=r,a.y1=o,a.x0=e,a.x1=e+=a.value*u}function gi(t,e,r,n,o){for(var i=t.children,a,s=-1,f=i.length,u=t.value&&(o-r)/t.value;++s<f;)a=i[s],a.x0=e,a.x1=n,a.y0=r,a.y1=r+=a.value*u}var ef=(1+Math.sqrt(5))/2;function rf(t,e,r,n,o,i){for(var a=[],s=e.children,f,u,c=0,h=0,l=s.length,m,x,g=e.value,d,y,_,M,p,b,v;c<l;){m=o-r,x=i-n;do d=s[h++].value;while(!d&&h<l);for(y=_=d,b=Math.max(x/m,m/x)/(g*t),v=d*d*b,p=Math.max(_/v,v/y);h<l;++h){if(d+=u=s[h].value,u<y&&(y=u),u>_&&(_=u),v=d*d*b,M=Math.max(_/v,v/y),M>p){d-=u;break}p=M}a.push(f={value:d,dice:m<x,children:s.slice(c,h)}),f.dice?di(f,r,n,o,g?n+=x*d/g:i):gi(f,r,n,g?r+=m*d/g:o,i),g-=d,c=h}return a}var xi=(function t(e){function r(n,o,i,a,s){rf(e,n,o,i,a,s)}return r.ratio=function(n){return t((n=+n)>1?n:1)},r})(ef);function yi(t){if(typeof t!="function")throw new Error;return t}function Qt(){return 0}function Gt(t){return function(){return t}}function nf(){var t=xi,e=!1,r=1,n=1,o=[0],i=Qt,a=Qt,s=Qt,f=Qt,u=Qt;function c(l){return l.x0=l.y0=0,l.x1=r,l.y1=n,l.eachBefore(h),o=[0],e&&l.eachBefore(pi),l}function h(l){var m=o[l.depth],x=l.x0+m,g=l.y0+m,d=l.x1-m,y=l.y1-m;d<x&&(x=d=(x+d)/2),y<g&&(g=y=(g+y)/2),l.x0=x,l.y0=g,l.x1=d,l.y1=y,l.children&&(m=o[l.depth+1]=i(l)/2,x+=u(l)-m,g+=a(l)-m,d-=s(l)-m,y-=f(l)-m,d<x&&(x=d=(x+d)/2),y<g&&(g=y=(g+y)/2),t(l,x,g,d,y))}return c.round=function(l){return arguments.length?(e=!!l,c):e},c.size=function(l){return arguments.length?(r=+l[0],n=+l[1],c):[r,n]},c.tile=function(l){return arguments.length?(t=yi(l),c):t},c.padding=function(l){return arguments.length?c.paddingInner(l).paddingOuter(l):c.paddingInner()},c.paddingInner=function(l){return arguments.length?(i=typeof l=="function"?l:Gt(+l),c):i},c.paddingOuter=function(l){return arguments.length?c.paddingTop(l).paddingRight(l).paddingBottom(l).paddingLeft(l):c.paddingTop()},c.paddingTop=function(l){return arguments.length?(a=typeof l=="function"?l:Gt(+l),c):a},c.paddingRight=function(l){return arguments.length?(s=typeof l=="function"?l:Gt(+l),c):s},c.paddingBottom=function(l){return arguments.length?(f=typeof l=="function"?l:Gt(+l),c):f},c.paddingLeft=function(l){return arguments.length?(u=typeof l=="function"?l:Gt(+l),c):u},c}function rn(t){return function(){return t}}function nn(t){return+t}var vi=[0,1];function mt(t){return t}function on(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:rn(isNaN(e)?NaN:.5)}function of(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function af(t,e,r){var n=t[0],o=t[1],i=e[0],a=e[1];return o<n?(n=on(o,n),i=r(a,i)):(n=on(n,o),i=r(i,a)),function(s){return i(n(s))}}function uf(t,e,r){var n=Math.min(t.length,e.length)-1,o=new Array(n),i=new Array(n),a=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<n;)o[a]=on(t[a],t[a+1]),i[a]=r(e[a],e[a+1]);return function(s){var f=Er(t,s,1,n)-1;return i[f](o[f](s))}}function or(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function sf(){var t=vi,e=vi,r=ht,n,o,i,a=mt,s,f,u;function c(){var l=Math.min(t.length,e.length);return a!==mt&&(a=of(t[0],t[l-1])),s=l>2?uf:af,f=u=null,h}function h(l){return l==null||isNaN(l=+l)?i:(f||(f=s(t.map(n),e,r)))(n(a(l)))}return h.invert=function(l){return a(o((u||(u=s(e,t.map(n),H)))(l)))},h.domain=function(l){return arguments.length?(t=Array.from(l,nn),c()):t.slice()},h.range=function(l){return arguments.length?(e=Array.from(l),c()):e.slice()},h.rangeRound=function(l){return e=Array.from(l),r=xe,c()},h.clamp=function(l){return arguments.length?(a=l?!0:mt,c()):a!==mt},h.interpolate=function(l){return arguments.length?(r=l,c()):r},h.unknown=function(l){return arguments.length?(i=l,h):i},function(l,m){return n=l,o=m,c()}}function ve(){return sf()(mt,mt)}function ir(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function wi(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}function an(t,e,r,n){var o=Wt(t,e,r),i;switch(n=vt(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(i=tn(o,a))&&(n.precision=i),rr(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=en(o,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=jr(o))&&(n.precision=i-(n.type==="%")*2);break}}return er(n)}function un(t){var e=t.domain;return t.ticks=function(r){var n=e();return Ye(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var o=e();return an(o[0],o[o.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),o=0,i=n.length-1,a=n[o],s=n[i],f,u,c=10;for(s<a&&(u=a,a=s,s=u,u=o,o=i,i=u);c-- >0;){if(u=ue(a,s,r),u===f)return n[o]=a,n[i]=s,e(n);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;f=u}return t},t}function sn(){var t=ve();return t.copy=function(){return or(t,sn())},ir.apply(t,arguments),un(t)}var fn=new Date,ln=new Date;function O(t,e,r,n){function o(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(t(i=new Date(+i)),i),o.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),o.round=i=>{let a=o(i),s=o.ceil(i);return i-a<s-i?a:s},o.offset=(i,a)=>(e(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{let f=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i<a)||!(s>0))return f;let u;do f.push(u=new Date(+i)),e(i,s),t(i);while(u<i&&i<a);return f},o.filter=i=>O(a=>{if(a>=a)for(;t(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!i(a););else for(;--s>=0;)for(;e(a,1),!i(a););}),r&&(o.count=(i,a)=>(fn.setTime(+i),ln.setTime(+a),t(fn),t(ln),Math.floor(r(fn,ln))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(n?a=>n(a)%i===0:a=>o.count(0,a)%i===0):o)),o}var we=O(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);we.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?O(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):we);var vg=we.range;var at=O(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),_i=at.range;var Kt=O(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),ff=Kt.range,ar=O(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),lf=ar.range;var Jt=O(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),cf=Jt.range,ur=O(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),hf=ur.range;var pt=O(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),mf=pt.range,be=O(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),pf=be.range,sr=O(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),df=sr.range;function Ut(t){return O(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}var dt=Ut(0),jt=Ut(1),Mi=Ut(2),Ti=Ut(3),wt=Ut(4),ki=Ut(5),Si=Ut(6),Ci=dt.range,gf=jt.range,xf=Mi.range,yf=Ti.range,vf=wt.range,wf=ki.range,_f=Si.range;function Yt(t){return O(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var $t=Yt(0),te=Yt(1),Ni=Yt(2),Ai=Yt(3),_t=Yt(4),Di=Yt(5),Ii=Yt(6),Ei=$t.range,bf=te.range,Mf=Ni.range,Tf=Ai.range,kf=_t.range,Sf=Di.range,Cf=Ii.range;var ee=O(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),Nf=ee.range,fr=O(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),Af=fr.range;var J=O(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());J.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:O(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});var Df=J.range,et=O(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());et.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:O(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});var If=et.range;function zi(t,e,r,n,o,i){let a=[[at,1,1e3],[at,5,5*1e3],[at,15,15*1e3],[at,30,30*1e3],[i,1,6e4],[i,5,5*6e4],[i,15,15*6e4],[i,30,30*6e4],[o,1,36e5],[o,3,3*36e5],[o,6,6*36e5],[o,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function s(u,c,h){let l=c<u;l&&([u,c]=[c,u]);let m=h&&typeof h.range=="function"?h:f(u,c,h),x=m?m.range(u,+c+1):[];return l?x.reverse():x}function f(u,c,h){let l=Math.abs(c-u)/h,m=Ct(([,,d])=>d).right(a,l);if(m===a.length)return t.every(Wt(u/31536e6,c/31536e6,h));if(m===0)return we.every(Math.max(Wt(u,c,h),1));let[x,g]=a[l/a[m-1][2]<a[m][2]/l?m-1:m];return x.every(g)}return[s,f]}var[Ff,zf]=zi(et,fr,$t,sr,ur,ar),[cn,hn]=zi(J,ee,dt,pt,Jt,Kt);function mn(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function pn(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Me(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function dn(t){var e=t.dateTime,r=t.date,n=t.time,o=t.periods,i=t.days,a=t.shortDays,s=t.months,f=t.shortMonths,u=Te(o),c=ke(o),h=Te(i),l=ke(i),m=Te(a),x=ke(a),g=Te(s),d=ke(s),y=Te(f),_=ke(f),M={a:ft,A:xt,b:W,B:ae,c:null,d:Li,e:Li,f:nl,g:ml,G:dl,H:tl,I:el,j:rl,L:Xi,m:ol,M:il,p:hu,q:mu,Q:qi,s:Bi,S:al,u:ul,U:sl,V:fl,w:ll,W:cl,x:null,X:null,y:hl,Y:pl,Z:gl,"%":Hi},p={a:pu,A:du,b:gu,B:xu,c:null,d:Pi,e:Pi,f:wl,g:Dl,G:El,H:xl,I:yl,j:vl,L:Vi,m:_l,M:bl,p:yu,q:vu,Q:qi,s:Bi,S:Ml,u:Tl,U:kl,V:Sl,w:Cl,W:Nl,x:null,X:null,y:Al,Y:Il,Z:Fl,"%":Hi},b={a:N,A:k,b:F,B:D,c:Q,d:$i,e:$i,f:Gf,g:Yi,G:Ui,H:Ri,I:Ri,j:Wf,L:Qf,m:Xf,M:Vf,p:z,q:Bf,Q:Jf,s:jf,S:Zf,u:Rf,U:Lf,V:Pf,w:$f,W:Hf,x:Xt,X:nt,y:Yi,Y:Ui,Z:qf,"%":Kf};M.x=v(r,M),M.X=v(n,M),M.c=v(e,M),p.x=v(r,p),p.X=v(n,p),p.c=v(e,p);function v(T,A){return function(I){var w=[],V=-1,U=0,G=T.length,K,kt,Nn;for(I instanceof Date||(I=new Date(+I));++V<G;)T.charCodeAt(V)===37&&(w.push(T.slice(U,V)),(kt=Oi[K=T.charAt(++V)])!=null?K=T.charAt(++V):kt=K==="e"?" ":"0",(Nn=A[K])&&(K=Nn(I,kt)),w.push(K),U=V+1);return w.push(T.slice(U,V)),w.join("")}}function S(T,A){return function(I){var w=Me(1900,void 0,1),V=C(w,T,I+="",0),U,G;if(V!=I.length)return null;if("Q"in w)return new Date(w.Q);if("s"in w)return new Date(w.s*1e3+("L"in w?w.L:0));if(A&&!("Z"in w)&&(w.Z=0),"p"in w&&(w.H=w.H%12+w.p*12),w.m===void 0&&(w.m="q"in w?w.q:0),"V"in w){if(w.V<1||w.V>53)return null;"w"in w||(w.w=1),"Z"in w?(U=pn(Me(w.y,0,1)),G=U.getUTCDay(),U=G>4||G===0?te.ceil(U):te(U),U=be.offset(U,(w.V-1)*7),w.y=U.getUTCFullYear(),w.m=U.getUTCMonth(),w.d=U.getUTCDate()+(w.w+6)%7):(U=mn(Me(w.y,0,1)),G=U.getDay(),U=G>4||G===0?jt.ceil(U):jt(U),U=pt.offset(U,(w.V-1)*7),w.y=U.getFullYear(),w.m=U.getMonth(),w.d=U.getDate()+(w.w+6)%7)}else("W"in w||"U"in w)&&("w"in w||(w.w="u"in w?w.u%7:"W"in w?1:0),G="Z"in w?pn(Me(w.y,0,1)).getUTCDay():mn(Me(w.y,0,1)).getDay(),w.m=0,w.d="W"in w?(w.w+6)%7+w.W*7-(G+5)%7:w.w+w.U*7-(G+6)%7);return"Z"in w?(w.H+=w.Z/100|0,w.M+=w.Z%100,pn(w)):mn(w)}}function C(T,A,I,w){for(var V=0,U=A.length,G=I.length,K,kt;V<U;){if(w>=G)return-1;if(K=A.charCodeAt(V++),K===37){if(K=A.charAt(V++),kt=b[K in Oi?A.charAt(V++):K],!kt||(w=kt(T,I,w))<0)return-1}else if(K!=I.charCodeAt(w++))return-1}return w}function z(T,A,I){var w=u.exec(A.slice(I));return w?(T.p=c.get(w[0].toLowerCase()),I+w[0].length):-1}function N(T,A,I){var w=m.exec(A.slice(I));return w?(T.w=x.get(w[0].toLowerCase()),I+w[0].length):-1}function k(T,A,I){var w=h.exec(A.slice(I));return w?(T.w=l.get(w[0].toLowerCase()),I+w[0].length):-1}function F(T,A,I){var w=y.exec(A.slice(I));return w?(T.m=_.get(w[0].toLowerCase()),I+w[0].length):-1}function D(T,A,I){var w=g.exec(A.slice(I));return w?(T.m=d.get(w[0].toLowerCase()),I+w[0].length):-1}function Q(T,A,I){return C(T,e,A,I)}function Xt(T,A,I){return C(T,r,A,I)}function nt(T,A,I){return C(T,n,A,I)}function ft(T){return a[T.getDay()]}function xt(T){return i[T.getDay()]}function W(T){return f[T.getMonth()]}function ae(T){return s[T.getMonth()]}function hu(T){return o[+(T.getHours()>=12)]}function mu(T){return 1+~~(T.getMonth()/3)}function pu(T){return a[T.getUTCDay()]}function du(T){return i[T.getUTCDay()]}function gu(T){return f[T.getUTCMonth()]}function xu(T){return s[T.getUTCMonth()]}function yu(T){return o[+(T.getUTCHours()>=12)]}function vu(T){return 1+~~(T.getUTCMonth()/3)}return{format:function(T){var A=v(T+="",M);return A.toString=function(){return T},A},parse:function(T){var A=S(T+="",!1);return A.toString=function(){return T},A},utcFormat:function(T){var A=v(T+="",p);return A.toString=function(){return T},A},utcParse:function(T){var A=S(T+="",!0);return A.toString=function(){return T},A}}}var Oi={"-":"",_:" ",0:"0"},L=/^\s*\d+/,Of=/^%/,Uf=/[\\^$*+?|[\]().{}]/g;function E(t,e,r){var n=t<0?"-":"",o=(n?-t:t)+"",i=o.length;return n+(i<r?new Array(r-i+1).join(e)+o:o)}function Yf(t){return t.replace(Uf,"\\$&")}function Te(t){return new RegExp("^(?:"+t.map(Yf).join("|")+")","i")}function ke(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function $f(t,e,r){var n=L.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function Rf(t,e,r){var n=L.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function Lf(t,e,r){var n=L.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function Pf(t,e,r){var n=L.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function Hf(t,e,r){var n=L.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function Ui(t,e,r){var n=L.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function Yi(t,e,r){var n=L.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function qf(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Bf(t,e,r){var n=L.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function Xf(t,e,r){var n=L.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function $i(t,e,r){var n=L.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Wf(t,e,r){var n=L.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function Ri(t,e,r){var n=L.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function Vf(t,e,r){var n=L.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function Zf(t,e,r){var n=L.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function Qf(t,e,r){var n=L.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function Gf(t,e,r){var n=L.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Kf(t,e,r){var n=Of.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function Jf(t,e,r){var n=L.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function jf(t,e,r){var n=L.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function Li(t,e){return E(t.getDate(),e,2)}function tl(t,e){return E(t.getHours(),e,2)}function el(t,e){return E(t.getHours()%12||12,e,2)}function rl(t,e){return E(1+pt.count(J(t),t),e,3)}function Xi(t,e){return E(t.getMilliseconds(),e,3)}function nl(t,e){return Xi(t,e)+"000"}function ol(t,e){return E(t.getMonth()+1,e,2)}function il(t,e){return E(t.getMinutes(),e,2)}function al(t,e){return E(t.getSeconds(),e,2)}function ul(t){var e=t.getDay();return e===0?7:e}function sl(t,e){return E(dt.count(J(t)-1,t),e,2)}function Wi(t){var e=t.getDay();return e>=4||e===0?wt(t):wt.ceil(t)}function fl(t,e){return t=Wi(t),E(wt.count(J(t),t)+(J(t).getDay()===4),e,2)}function ll(t){return t.getDay()}function cl(t,e){return E(jt.count(J(t)-1,t),e,2)}function hl(t,e){return E(t.getFullYear()%100,e,2)}function ml(t,e){return t=Wi(t),E(t.getFullYear()%100,e,2)}function pl(t,e){return E(t.getFullYear()%1e4,e,4)}function dl(t,e){var r=t.getDay();return t=r>=4||r===0?wt(t):wt.ceil(t),E(t.getFullYear()%1e4,e,4)}function gl(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+E(e/60|0,"0",2)+E(e%60,"0",2)}function Pi(t,e){return E(t.getUTCDate(),e,2)}function xl(t,e){return E(t.getUTCHours(),e,2)}function yl(t,e){return E(t.getUTCHours()%12||12,e,2)}function vl(t,e){return E(1+be.count(et(t),t),e,3)}function Vi(t,e){return E(t.getUTCMilliseconds(),e,3)}function wl(t,e){return Vi(t,e)+"000"}function _l(t,e){return E(t.getUTCMonth()+1,e,2)}function bl(t,e){return E(t.getUTCMinutes(),e,2)}function Ml(t,e){return E(t.getUTCSeconds(),e,2)}function Tl(t){var e=t.getUTCDay();return e===0?7:e}function kl(t,e){return E($t.count(et(t)-1,t),e,2)}function Zi(t){var e=t.getUTCDay();return e>=4||e===0?_t(t):_t.ceil(t)}function Sl(t,e){return t=Zi(t),E(_t.count(et(t),t)+(et(t).getUTCDay()===4),e,2)}function Cl(t){return t.getUTCDay()}function Nl(t,e){return E(te.count(et(t)-1,t),e,2)}function Al(t,e){return E(t.getUTCFullYear()%100,e,2)}function Dl(t,e){return t=Zi(t),E(t.getUTCFullYear()%100,e,2)}function Il(t,e){return E(t.getUTCFullYear()%1e4,e,4)}function El(t,e){var r=t.getUTCDay();return t=r>=4||r===0?_t(t):_t.ceil(t),E(t.getUTCFullYear()%1e4,e,4)}function Fl(){return"+0000"}function Hi(){return"%"}function qi(t){return+t}function Bi(t){return Math.floor(+t/1e3)}var re,lr,Qi,Gi,Ki;gn({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function gn(t){return re=dn(t),lr=re.format,Qi=re.parse,Gi=re.utcFormat,Ki=re.utcParse,re}function xn(t,e){t=t.slice();var r=0,n=t.length-1,o=t[r],i=t[n],a;return i<o&&(a=r,r=n,n=a,a=o,o=i,i=a),t[r]=e.floor(o),t[n]=e.ceil(i),t}function zl(t){return new Date(t)}function Ol(t){return t instanceof Date?+t:+new Date(+t)}function Ji(t,e,r,n,o,i,a,s,f,u){var c=ve(),h=c.invert,l=c.domain,m=u(".%L"),x=u(":%S"),g=u("%I:%M"),d=u("%I %p"),y=u("%a %d"),_=u("%b %d"),M=u("%B"),p=u("%Y");function b(v){return(f(v)<v?m:s(v)<v?x:a(v)<v?g:i(v)<v?d:n(v)<v?o(v)<v?y:_:r(v)<v?M:p)(v)}return c.invert=function(v){return new Date(h(v))},c.domain=function(v){return arguments.length?l(Array.from(v,Ol)):l().map(zl)},c.ticks=function(v){var S=l();return t(S[0],S[S.length-1],v??10)},c.tickFormat=function(v,S){return S==null?b:u(S)},c.nice=function(v){var S=l();return(!v||typeof v.range!="function")&&(v=e(S[0],S[S.length-1],v??10)),v?l(xn(S,v)):c},c.copy=function(){return or(c,Ji(t,e,r,n,o,i,a,s,f,u))},c}function ji(){return ir.apply(Ji(cn,hn,J,ee,dt,pt,Jt,Kt,at,lr).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ul(){var t=0,e=1,r,n,o,i,a=mt,s=!1,f;function u(h){return h==null||isNaN(h=+h)?f:a(o===0?.5:(h=(i(h)-r)*o,s?Math.max(0,Math.min(1,h)):h))}u.domain=function(h){return arguments.length?([t,e]=h,r=i(t=+t),n=i(e=+e),o=r===n?0:1/(n-r),u):[t,e]},u.clamp=function(h){return arguments.length?(s=!!h,u):s},u.interpolator=function(h){return arguments.length?(a=h,u):a};function c(h){return function(l){var m,x;return arguments.length?([m,x]=l,a=h(m,x),u):[a(0),a(1)]}}return u.range=c(ht),u.rangeRound=c(xe),u.unknown=function(h){return arguments.length?(f=h,u):f},function(h){return i=h,r=h(t),n=h(e),o=r===n?0:1/(n-r),u}}function Yl(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function yn(){var t=un(Ul()(mt));return t.copy=function(){return Yl(t,yn())},wi.apply(t,arguments)}var Sx=Array.prototype.slice;function cr(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function $(t){return function(){return t}}function ta(t){this._context=t}ta.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function hr(t){return new ta(t)}var vn=Math.PI,wn=2*vn,Rt=1e-6,$l=wn-Rt;function ea(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function Rl(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return ea;let r=10**e;return function(n){this._+=n[0];for(let o=1,i=n.length;o<i;++o)this._+=Math.round(arguments[o]*r)/r+n[o]}}var Lt=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?ea:Rl(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,o){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+o}`}bezierCurveTo(e,r,n,o,i,a){this._append`C${+e},${+r},${+n},${+o},${this._x1=+i},${this._y1=+a}`}arcTo(e,r,n,o,i){if(e=+e,r=+r,n=+n,o=+o,i=+i,i<0)throw new Error(`negative radius: ${i}`);let a=this._x1,s=this._y1,f=n-e,u=o-r,c=a-e,h=s-r,l=c*c+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(l>Rt)if(!(Math.abs(h*f-u*c)>Rt)||!i)this._append`L${this._x1=e},${this._y1=r}`;else{let m=n-a,x=o-s,g=f*f+u*u,d=m*m+x*x,y=Math.sqrt(g),_=Math.sqrt(l),M=i*Math.tan((vn-Math.acos((g+l-d)/(2*y*_)))/2),p=M/_,b=M/y;Math.abs(p-1)>Rt&&this._append`L${e+p*c},${r+p*h}`,this._append`A${i},${i},0,0,${+(h*m>c*x)},${this._x1=e+b*f},${this._y1=r+b*u}`}}arc(e,r,n,o,i,a){if(e=+e,r=+r,n=+n,a=!!a,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(o),f=n*Math.sin(o),u=e+s,c=r+f,h=1^a,l=a?o-i:i-o;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>Rt||Math.abs(this._y1-c)>Rt)&&this._append`L${u},${c}`,n&&(l<0&&(l=l%wn+wn),l>$l?this._append`A${n},${n},0,1,${h},${e-s},${r-f}A${n},${n},0,1,${h},${this._x1=u},${this._y1=c}`:l>Rt&&this._append`A${n},${n},0,${+(l>=vn)},${h},${this._x1=e+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(e,r,n,o){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+o}h${-n}Z`}toString(){return this._}};function ra(){return new Lt}ra.prototype=Lt.prototype;function mr(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new Lt(e)}function pr(t){return t[0]}function dr(t){return t[1]}function _n(t,e){var r=$(!0),n=null,o=hr,i=null,a=mr(s);t=typeof t=="function"?t:t===void 0?pr:$(t),e=typeof e=="function"?e:e===void 0?dr:$(e);function s(f){var u,c=(f=cr(f)).length,h,l=!1,m;for(n==null&&(i=o(m=a())),u=0;u<=c;++u)!(u<c&&r(h=f[u],u,f))===l&&((l=!l)?i.lineStart():i.lineEnd()),l&&i.point(+t(h,u,f),+e(h,u,f));if(m)return i=null,m+""||null}return s.x=function(f){return arguments.length?(t=typeof f=="function"?f:$(+f),s):t},s.y=function(f){return arguments.length?(e=typeof f=="function"?f:$(+f),s):e},s.defined=function(f){return arguments.length?(r=typeof f=="function"?f:$(!!f),s):r},s.curve=function(f){return arguments.length?(o=f,n!=null&&(i=o(n)),s):o},s.context=function(f){return arguments.length?(f==null?n=i=null:i=o(n=f),s):n},s}function Ll(t,e,r){var n=null,o=$(!0),i=null,a=hr,s=null,f=mr(u);t=typeof t=="function"?t:t===void 0?pr:$(+t),e=typeof e=="function"?e:e===void 0?$(0):$(+e),r=typeof r=="function"?r:r===void 0?dr:$(+r);function u(h){var l,m,x,g=(h=cr(h)).length,d,y=!1,_,M=new Array(g),p=new Array(g);for(i==null&&(s=a(_=f())),l=0;l<=g;++l){if(!(l<g&&o(d=h[l],l,h))===y)if(y=!y)m=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),x=l-1;x>=m;--x)s.point(M[x],p[x]);s.lineEnd(),s.areaEnd()}y&&(M[l]=+t(d,l,h),p[l]=+e(d,l,h),s.point(n?+n(d,l,h):M[l],r?+r(d,l,h):p[l]))}if(_)return s=null,_+""||null}function c(){return _n().defined(o).curve(a).context(i)}return u.x=function(h){return arguments.length?(t=typeof h=="function"?h:$(+h),n=null,u):t},u.x0=function(h){return arguments.length?(t=typeof h=="function"?h:$(+h),u):t},u.x1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:$(+h),u):n},u.y=function(h){return arguments.length?(e=typeof h=="function"?h:$(+h),r=null,u):e},u.y0=function(h){return arguments.length?(e=typeof h=="function"?h:$(+h),u):e},u.y1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:$(+h),u):r},u.lineX0=u.lineY0=function(){return c().x(t).y(e)},u.lineY1=function(){return c().x(t).y(r)},u.lineX1=function(){return c().x(n).y(e)},u.defined=function(h){return arguments.length?(o=typeof h=="function"?h:$(!!h),u):o},u.curve=function(h){return arguments.length?(a=h,i!=null&&(s=a(i)),u):a},u.context=function(h){return arguments.length?(h==null?i=s=null:s=a(i=h),u):i},u}function na(t){return t<0?-1:1}function oa(t,e,r){var n=t._x1-t._x0,o=e-t._x1,i=(t._y1-t._y0)/(n||o<0&&-0),a=(r-t._y1)/(o||n<0&&-0),s=(i*o+a*n)/(n+o);return(na(i)+na(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function ia(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function bn(t,e,r){var n=t._x0,o=t._y0,i=t._x1,a=t._y1,s=(i-n)/3;t._context.bezierCurveTo(n+s,o+s*e,i-s,a-s*r,i,a)}function gr(t){this._context=t}gr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:bn(this,this._t0,ia(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,bn(this,ia(this,r=oa(this,t,e)),r);break;default:bn(this,this._t0,r=oa(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function Pl(t){this._context=new aa(t)}(Pl.prototype=Object.create(gr.prototype)).point=function(t,e){gr.prototype.point.call(this,e,t)};function aa(t){this._context=t}aa.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,n,o,i){this._context.bezierCurveTo(e,t,n,r,i,o)}};function Hl(t){return new gr(t)}var ql={value:()=>{}};function sa(){for(var t=0,e=arguments.length,r={},n;t<e;++t){if(!(n=arguments[t]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new xr(r)}function xr(t){this._=t}function Bl(t,e){return t.trim().split(/^|\s+/).map(function(r){var n="",o=r.indexOf(".");if(o>=0&&(n=r.slice(o+1),r=r.slice(0,o)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}xr.prototype=sa.prototype={constructor:xr,on:function(t,e){var r=this._,n=Bl(t+"",r),o,i=-1,a=n.length;if(arguments.length<2){for(;++i<a;)if((o=(t=n[i]).type)&&(o=Xl(r[o],t.name)))return o;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++i<a;)if(o=(t=n[i]).type)r[o]=ua(r[o],t.name,e);else if(e==null)for(o in r)r[o]=ua(r[o],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new xr(t)},call:function(t,e){if((o=arguments.length-2)>0)for(var r=new Array(o),n=0,o,i;n<o;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=this._[t],n=0,o=i.length;n<o;++n)i[n].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],o=0,i=n.length;o<i;++o)n[o].value.apply(e,r)}};function Xl(t,e){for(var r=0,n=t.length,o;r<n;++r)if((o=t[r]).name===e)return o.value}function ua(t,e,r){for(var n=0,o=t.length;n<o;++n)if(t[n].name===e){t[n]=ql,t=t.slice(0,n).concat(t.slice(n+1));break}return r!=null&&t.push({name:e,value:r}),t}var Pt=sa;var fa={passive:!1},Ht={capture:!0,passive:!1};function yr(t){t.stopImmediatePropagation()}function bt(t){t.preventDefault(),t.stopImmediatePropagation()}function la(t){var e=t.document.documentElement,r=At(t).on("dragstart.drag",bt,Ht);"onselectstart"in e?r.on("selectstart.drag",bt,Ht):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function ca(t,e){var r=t.document.documentElement,n=At(t).on("dragstart.drag",null);e&&(n.on("click.drag",bt,Ht),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}var Se=t=>()=>t;function Ce(t,{sourceEvent:e,subject:r,target:n,identifier:o,active:i,x:a,y:s,dx:f,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}Ce.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Wl(t){return!t.ctrlKey&&!t.button}function Vl(){return this.parentNode}function Zl(t,e){return e??{x:t.x,y:t.y}}function Ql(){return navigator.maxTouchPoints||"ontouchstart"in this}function Gl(){var t=Wl,e=Vl,r=Zl,n=Ql,o={},i=Pt("start","drag","end"),a=0,s,f,u,c,h=0;function l(p){p.on("mousedown.drag",m).filter(n).on("touchstart.drag",d).on("touchmove.drag",y,fa).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(p,b){if(!(c||!t.call(this,p,b))){var v=M(this,e.call(this,p,b),p,b,"mouse");v&&(At(p.view).on("mousemove.drag",x,Ht).on("mouseup.drag",g,Ht),la(p.view),yr(p),u=!1,s=p.clientX,f=p.clientY,v("start",p))}}function x(p){if(bt(p),!u){var b=p.clientX-s,v=p.clientY-f;u=b*b+v*v>h}o.mouse("drag",p)}function g(p){At(p.view).on("mousemove.drag mouseup.drag",null),ca(p.view,u),bt(p),o.mouse("end",p)}function d(p,b){if(t.call(this,p,b)){var v=p.changedTouches,S=e.call(this,p,b),C=v.length,z,N;for(z=0;z<C;++z)(N=M(this,S,p,b,v[z].identifier,v[z]))&&(yr(p),N("start",p,v[z]))}}function y(p){var b=p.changedTouches,v=b.length,S,C;for(S=0;S<v;++S)(C=o[b[S].identifier])&&(bt(p),C("drag",p,b[S]))}function _(p){var b=p.changedTouches,v=b.length,S,C;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),S=0;S<v;++S)(C=o[b[S].identifier])&&(yr(p),C("end",p,b[S]))}function M(p,b,v,S,C,z){var N=i.copy(),k=Be(z||v,b),F,D,Q;if((Q=r.call(p,new Ce("beforestart",{sourceEvent:v,target:l,identifier:C,active:a,x:k[0],y:k[1],dx:0,dy:0,dispatch:N}),S))!=null)return F=Q.x-k[0]||0,D=Q.y-k[1]||0,function Xt(nt,ft,xt){var W=k,ae;switch(nt){case"start":o[C]=Xt,ae=a++;break;case"end":delete o[C],--a;case"drag":k=Be(xt||ft,b),ae=a;break}N.call(nt,p,new Ce(nt,{sourceEvent:ft,subject:Q,target:l,identifier:C,active:ae,x:k[0]+F,y:k[1]+D,dx:k[0]-W[0],dy:k[1]-W[1],dispatch:N}),S)}}return l.filter=function(p){return arguments.length?(t=typeof p=="function"?p:Se(!!p),l):t},l.container=function(p){return arguments.length?(e=typeof p=="function"?p:Se(p),l):e},l.subject=function(p){return arguments.length?(r=typeof p=="function"?p:Se(p),l):r},l.touchable=function(p){return arguments.length?(n=typeof p=="function"?p:Se(!!p),l):n},l.on=function(){var p=i.on.apply(i,arguments);return p===i?l:p},l.clickDistance=function(p){return arguments.length?(h=(p=+p)*p,l):Math.sqrt(h)},l}var ne=0,Ae=0,Ne=0,ma=1e3,vr,De,wr=0,qt=0,_r=0,Ie=typeof performance=="object"&&performance.now?performance:Date,pa=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Fe(){return qt||(pa(Kl),qt=Ie.now()+_r)}function Kl(){qt=0}function Ee(){this._call=this._time=this._next=null}Ee.prototype=oe.prototype={constructor:Ee,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?Fe():+r)+(e==null?0:+e),!this._next&&De!==this&&(De?De._next=this:vr=this,De=this),this._call=t,this._time=r,Mn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Mn())}};function oe(t,e,r){var n=new Ee;return n.restart(t,e,r),n}function da(){Fe(),++ne;for(var t=vr,e;t;)(e=qt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--ne}function ha(){qt=(wr=Ie.now())+_r,ne=Ae=0;try{da()}finally{ne=0,jl(),qt=0}}function Jl(){var t=Ie.now(),e=t-wr;e>ma&&(_r-=e,wr=t)}function jl(){for(var t,e=vr,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:vr=r);De=t,Mn(n)}function Mn(t){if(!ne){Ae&&(Ae=clearTimeout(Ae));var e=t-qt;e>24?(t<1/0&&(Ae=setTimeout(ha,t-Ie.now()-_r)),Ne&&(Ne=clearInterval(Ne))):(Ne||(wr=Ie.now(),Ne=setInterval(Jl,ma)),ne=1,pa(ha))}}function br(t,e,r){var n=new Ee;return e=e==null?0:+e,n.restart(o=>{n.stop(),t(o+e)},e,r),n}var tc=Pt("start","end","cancel","interrupt"),ec=[],ya=0,ga=1,Tr=2,Mr=3,xa=4,kr=5,ze=6;function Mt(t,e,r,n,o,i){var a=t.__transition;if(!a)t.__transition={};else if(r in a)return;rc(t,r,{name:e,index:n,group:o,on:tc,tween:ec,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:ya})}function Oe(t,e){var r=R(t,e);if(r.state>ya)throw new Error("too late; already scheduled");return r}function q(t,e){var r=R(t,e);if(r.state>Mr)throw new Error("too late; already running");return r}function R(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function rc(t,e,r){var n=t.__transition,o;n[e]=r,r.timer=oe(i,0,r.time);function i(u){r.state=ga,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var c,h,l,m;if(r.state!==ga)return f();for(c in n)if(m=n[c],m.name===r.name){if(m.state===Mr)return br(a);m.state===xa?(m.state=ze,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete n[c]):+c<e&&(m.state=ze,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete n[c])}if(br(function(){r.state===Mr&&(r.state=xa,r.timer.restart(s,r.delay,r.time),s(u))}),r.state=Tr,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Tr){for(r.state=Mr,o=new Array(l=r.tween.length),c=0,h=-1;c<l;++c)(m=r.tween[c].value.call(t,t.__data__,r.index,r.group))&&(o[++h]=m);o.length=h+1}}function s(u){for(var c=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(f),r.state=kr,1),h=-1,l=o.length;++h<l;)o[h].call(t,c);r.state===kr&&(r.on.call("end",t,t.__data__,r.index,r.group),f())}function f(){r.state=ze,r.timer.stop(),delete n[e];for(var u in n)return;delete t.__transition}}function Sr(t,e){var r=t.__transition,n,o,i=!0,a;if(r){e=e==null?null:e+"";for(a in r){if((n=r[a]).name!==e){i=!1;continue}o=n.state>Tr&&n.state<kr,n.state=ze,n.timer.stop(),n.on.call(o?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete r[a]}i&&delete t.__transition}}function va(t){return this.each(function(){Sr(this,t)})}function nc(t,e){var r,n;return function(){var o=q(this,t),i=o.tween;if(i!==r){n=r=i;for(var a=0,s=n.length;a<s;++a)if(n[a].name===e){n=n.slice(),n.splice(a,1);break}}o.tween=n}}function oc(t,e,r){var n,o;if(typeof r!="function")throw new Error;return function(){var i=q(this,t),a=i.tween;if(a!==n){o=(n=a).slice();for(var s={name:e,value:r},f=0,u=o.length;f<u;++f)if(o[f].name===e){o[f]=s;break}f===u&&o.push(s)}i.tween=o}}function wa(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n=R(this.node(),r).tween,o=0,i=n.length,a;o<i;++o)if((a=n[o]).name===t)return a.value;return null}return this.each((e==null?nc:oc)(r,t,e))}function ie(t,e,r){var n=t._id;return t.each(function(){var o=q(this,n);(o.value||(o.value={}))[e]=r.apply(this,arguments)}),function(o){return R(o,n).value[e]}}function Cr(t,e){var r;return(typeof e=="number"?H:e instanceof tt?Et:(r=tt(e))?(e=r,Et):ge)(t,e)}function ic(t){return function(){this.removeAttribute(t)}}function ac(t){return function(){this.removeAttributeNS(t.space,t.local)}}function uc(t,e,r){var n,o=r+"",i;return function(){var a=this.getAttribute(t);return a===o?null:a===n?i:i=e(n=a,r)}}function sc(t,e,r){var n,o=r+"",i;return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===n?i:i=e(n=a,r)}}function fc(t,e,r){var n,o,i;return function(){var a,s=r(this),f;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),f=s+"",a===f?null:a===n&&f===o?i:(o=f,i=e(n=a,s)))}}function lc(t,e,r){var n,o,i;return function(){var a,s=r(this),f;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),f=s+"",a===f?null:a===n&&f===o?i:(o=f,i=e(n=a,s)))}}function _a(t,e){var r=lt(t),n=r==="transform"?Vr:Cr;return this.attrTween(t,typeof e=="function"?(r.local?lc:fc)(r,n,ie(this,"attr."+t,e)):e==null?(r.local?ac:ic)(r):(r.local?sc:uc)(r,n,e))}function cc(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function hc(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function mc(t,e){var r,n;function o(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&hc(t,i)),r}return o._value=e,o}function pc(t,e){var r,n;function o(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&cc(t,i)),r}return o._value=e,o}function ba(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=lt(t);return this.tween(r,(n.local?mc:pc)(n,e))}function dc(t,e){return function(){Oe(this,t).delay=+e.apply(this,arguments)}}function gc(t,e){return e=+e,function(){Oe(this,t).delay=e}}function Ma(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?dc:gc)(e,t)):R(this.node(),e).delay}function xc(t,e){return function(){q(this,t).duration=+e.apply(this,arguments)}}function yc(t,e){return e=+e,function(){q(this,t).duration=e}}function Ta(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?xc:yc)(e,t)):R(this.node(),e).duration}function vc(t,e){if(typeof e!="function")throw new Error;return function(){q(this,t).ease=e}}function ka(t){var e=this._id;return arguments.length?this.each(vc(e,t)):R(this.node(),e).ease}function wc(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;q(this,t).ease=r}}function Sa(t){if(typeof t!="function")throw new Error;return this.each(wc(this._id,t))}function Ca(t){typeof t!="function"&&(t=le(t));for(var e=this._groups,r=e.length,n=new Array(r),o=0;o<r;++o)for(var i=e[o],a=i.length,s=n[o]=[],f,u=0;u<a;++u)(f=i[u])&&t.call(f,f.__data__,u,i)&&s.push(f);return new B(n,this._parents,this._name,this._id)}function Na(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,o=r.length,i=Math.min(n,o),a=new Array(n),s=0;s<i;++s)for(var f=e[s],u=r[s],c=f.length,h=a[s]=new Array(c),l,m=0;m<c;++m)(l=f[m]||u[m])&&(h[m]=l);for(;s<n;++s)a[s]=e[s];return new B(a,this._parents,this._name,this._id)}function _c(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function bc(t,e,r){var n,o,i=_c(e)?Oe:q;return function(){var a=i(this,t),s=a.on;s!==n&&(o=(n=s).copy()).on(e,r),a.on=o}}function Aa(t,e){var r=this._id;return arguments.length<2?R(this.node(),r).on.on(t):this.each(bc(r,t,e))}function Mc(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function Da(){return this.on("end.remove",Mc(this._id))}function Ia(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Nt(t));for(var n=this._groups,o=n.length,i=new Array(o),a=0;a<o;++a)for(var s=n[a],f=s.length,u=i[a]=new Array(f),c,h,l=0;l<f;++l)(c=s[l])&&(h=t.call(c,c.__data__,l,s))&&("__data__"in c&&(h.__data__=c.__data__),u[l]=h,Mt(u[l],e,r,l,u,R(c,r)));return new B(i,this._parents,e,r)}function Ea(t){var e=this._name,r=this._id;typeof t!="function"&&(t=fe(t));for(var n=this._groups,o=n.length,i=[],a=[],s=0;s<o;++s)for(var f=n[s],u=f.length,c,h=0;h<u;++h)if(c=f[h]){for(var l=t.call(c,c.__data__,h,f),m,x=R(c,r),g=0,d=l.length;g<d;++g)(m=l[g])&&Mt(m,e,r,g,l,x);i.push(l),a.push(c)}return new B(i,a,e,r)}var Tc=ct.prototype.constructor;function Fa(){return new Tc(this._groups,this._parents)}function kc(t,e){var r,n,o;return function(){var i=yt(this,t),a=(this.style.removeProperty(t),yt(this,t));return i===a?null:i===r&&a===n?o:o=e(r=i,n=a)}}function za(t){return function(){this.style.removeProperty(t)}}function Sc(t,e,r){var n,o=r+"",i;return function(){var a=yt(this,t);return a===o?null:a===n?i:i=e(n=a,r)}}function Cc(t,e,r){var n,o,i;return function(){var a=yt(this,t),s=r(this),f=s+"";return s==null&&(f=s=(this.style.removeProperty(t),yt(this,t))),a===f?null:a===n&&f===o?i:(o=f,i=e(n=a,s))}}function Nc(t,e){var r,n,o,i="style."+e,a="end."+i,s;return function(){var f=q(this,t),u=f.on,c=f.value[i]==null?s||(s=za(e)):void 0;(u!==r||o!==c)&&(n=(r=u).copy()).on(a,o=c),f.on=n}}function Oa(t,e,r){var n=(t+="")=="transform"?Wr:Cr;return e==null?this.styleTween(t,kc(t,n)).on("end.style."+t,za(t)):typeof e=="function"?this.styleTween(t,Cc(t,n,ie(this,"style."+t,e))).each(Nc(this._id,t)):this.styleTween(t,Sc(t,n,e),r).on("end.style."+t,null)}function Ac(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}function Dc(t,e,r){var n,o;function i(){var a=e.apply(this,arguments);return a!==o&&(n=(o=a)&&Ac(t,a,r)),n}return i._value=e,i}function Ua(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,Dc(t,e,r??""))}function Ic(t){return function(){this.textContent=t}}function Ec(t){return function(){var e=t(this);this.textContent=e??""}}function Ya(t){return this.tween("text",typeof t=="function"?Ec(ie(this,"text",t)):Ic(t==null?"":t+""))}function Fc(t){return function(e){this.textContent=t.call(this,e)}}function zc(t){var e,r;function n(){var o=t.apply(this,arguments);return o!==r&&(e=(r=o)&&Fc(o)),e}return n._value=t,n}function $a(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,zc(t))}function Ra(){for(var t=this._name,e=this._id,r=Nr(),n=this._groups,o=n.length,i=0;i<o;++i)for(var a=n[i],s=a.length,f,u=0;u<s;++u)if(f=a[u]){var c=R(f,e);Mt(f,t,r,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new B(n,this._parents,t,r)}function La(){var t,e,r=this,n=r._id,o=r.size();return new Promise(function(i,a){var s={value:a},f={value:function(){--o===0&&i()}};r.each(function(){var u=q(this,n),c=u.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(f)),u.on=e}),o===0&&i()})}var Oc=0;function B(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function Pa(t){return ct().transition(t)}function Nr(){return++Oc}var gt=ct.prototype;B.prototype=Pa.prototype={constructor:B,select:Ia,selectAll:Ea,selectChild:gt.selectChild,selectChildren:gt.selectChildren,filter:Ca,merge:Na,selection:Fa,transition:Ra,call:gt.call,nodes:gt.nodes,node:gt.node,size:gt.size,empty:gt.empty,each:gt.each,on:Aa,attr:_a,attrTween:ba,style:Oa,styleTween:Ua,text:Ya,textTween:$a,remove:Da,tween:wa,delay:Ma,duration:Ta,ease:ka,easeVarying:Sa,end:La,[Symbol.iterator]:gt[Symbol.iterator]};function Ar(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Uc={time:null,delay:0,duration:250,ease:Ar};function Yc(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function Ha(t){var e,r;t instanceof B?(e=t._id,t=t._name):(e=Nr(),(r=Uc).time=Fe(),t=t==null?null:t+"");for(var n=this._groups,o=n.length,i=0;i<o;++i)for(var a=n[i],s=a.length,f,u=0;u<s;++u)(f=a[u])&&Mt(f,t,e,u,a,r||Yc(f,e));return new B(n,this._parents,t,e)}ct.prototype.interrupt=va;ct.prototype.transition=Ha;var{abs:Sv,max:Cv,min:Nv}=Math;function qa(t){return[+t[0],+t[1]]}function $c(t){return[qa(t[0]),qa(t[1])]}var Av={name:"x",handles:["w","e"].map(Tn),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Dv={name:"y",handles:["n","s"].map(Tn),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Iv={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Tn),input:function(t){return t==null?null:$c(t)},output:function(t){return t}};function Tn(t){return{type:t}}function Rc(t,e){var r,n=1;t==null&&(t=0),e==null&&(e=0);function o(){var i,a=r.length,s,f=0,u=0;for(i=0;i<a;++i)s=r[i],f+=s.x,u+=s.y;for(f=(f/a-t)*n,u=(u/a-e)*n,i=0;i<a;++i)s=r[i],s.x-=f,s.y-=u}return o.initialize=function(i){r=i},o.x=function(i){return arguments.length?(t=+i,o):t},o.y=function(i){return arguments.length?(e=+i,o):e},o.strength=function(i){return arguments.length?(n=+i,o):n},o}function Ba(t){let e=+this._x.call(null,t),r=+this._y.call(null,t);return Xa(this.cover(e,r),e,r,t)}function Xa(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var o,i=t._root,a={data:n},s=t._x0,f=t._y0,u=t._x1,c=t._y1,h,l,m,x,g,d,y,_;if(!i)return t._root=a,t;for(;i.length;)if((g=e>=(h=(s+u)/2))?s=h:u=h,(d=r>=(l=(f+c)/2))?f=l:c=l,o=i,!(i=i[y=d<<1|g]))return o[y]=a,t;if(m=+t._x.call(null,i.data),x=+t._y.call(null,i.data),e===m&&r===x)return a.next=i,o?o[y]=a:t._root=a,t;do o=o?o[y]=new Array(4):t._root=new Array(4),(g=e>=(h=(s+u)/2))?s=h:u=h,(d=r>=(l=(f+c)/2))?f=l:c=l;while((y=d<<1|g)===(_=(x>=l)<<1|m>=h));return o[_]=i,o[y]=a,t}function Wa(t){var e,r,n=t.length,o,i,a=new Array(n),s=new Array(n),f=1/0,u=1/0,c=-1/0,h=-1/0;for(r=0;r<n;++r)isNaN(o=+this._x.call(null,e=t[r]))||isNaN(i=+this._y.call(null,e))||(a[r]=o,s[r]=i,o<f&&(f=o),o>c&&(c=o),i<u&&(u=i),i>h&&(h=i));if(f>c||u>h)return this;for(this.cover(f,u).cover(c,h),r=0;r<n;++r)Xa(this,a[r],s[r],t[r]);return this}function Va(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var r=this._x0,n=this._y0,o=this._x1,i=this._y1;if(isNaN(r))o=(r=Math.floor(t))+1,i=(n=Math.floor(e))+1;else{for(var a=o-r||1,s=this._root,f,u;r>t||t>=o||n>e||e>=i;)switch(u=(e<n)<<1|t<r,f=new Array(4),f[u]=s,s=f,a*=2,u){case 0:o=r+a,i=n+a;break;case 1:r=o-a,i=n+a;break;case 2:o=r+a,n=i-a;break;case 3:r=o-a,n=i-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=r,this._y0=n,this._x1=o,this._y1=i,this}function Za(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function Qa(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function P(t,e,r,n,o){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=o}function Ga(t,e,r){var n,o=this._x0,i=this._y0,a,s,f,u,c=this._x1,h=this._y1,l=[],m=this._root,x,g;for(m&&l.push(new P(m,o,i,c,h)),r==null?r=1/0:(o=t-r,i=e-r,c=t+r,h=e+r,r*=r);x=l.pop();)if(!(!(m=x.node)||(a=x.x0)>c||(s=x.y0)>h||(f=x.x1)<o||(u=x.y1)<i))if(m.length){var d=(a+f)/2,y=(s+u)/2;l.push(new P(m[3],d,y,f,u),new P(m[2],a,y,d,u),new P(m[1],d,s,f,y),new P(m[0],a,s,d,y)),(g=(e>=y)<<1|t>=d)&&(x=l[l.length-1],l[l.length-1]=l[l.length-1-g],l[l.length-1-g]=x)}else{var _=t-+this._x.call(null,m.data),M=e-+this._y.call(null,m.data),p=_*_+M*M;if(p<r){var b=Math.sqrt(r=p);o=t-b,i=e-b,c=t+b,h=e+b,n=m.data}}return n}function Ka(t){if(isNaN(c=+this._x.call(null,t))||isNaN(h=+this._y.call(null,t)))return this;var e,r=this._root,n,o,i,a=this._x0,s=this._y0,f=this._x1,u=this._y1,c,h,l,m,x,g,d,y;if(!r)return this;if(r.length)for(;;){if((x=c>=(l=(a+f)/2))?a=l:f=l,(g=h>=(m=(s+u)/2))?s=m:u=m,e=r,!(r=r[d=g<<1|x]))return this;if(!r.length)break;(e[d+1&3]||e[d+2&3]||e[d+3&3])&&(n=e,y=d)}for(;r.data!==t;)if(o=r,!(r=r.next))return this;return(i=r.next)&&delete r.next,o?(i?o.next=i:delete o.next,this):e?(i?e[d]=i:delete e[d],(r=e[0]||e[1]||e[2]||e[3])&&r===(e[3]||e[2]||e[1]||e[0])&&!r.length&&(n?n[y]=r:this._root=r),this):(this._root=i,this)}function Ja(t){for(var e=0,r=t.length;e<r;++e)this.remove(t[e]);return this}function ja(){return this._root}function tu(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function eu(t){var e=[],r,n=this._root,o,i,a,s,f;for(n&&e.push(new P(n,this._x0,this._y0,this._x1,this._y1));r=e.pop();)if(!t(n=r.node,i=r.x0,a=r.y0,s=r.x1,f=r.y1)&&n.length){var u=(i+s)/2,c=(a+f)/2;(o=n[3])&&e.push(new P(o,u,c,s,f)),(o=n[2])&&e.push(new P(o,i,c,u,f)),(o=n[1])&&e.push(new P(o,u,a,s,c)),(o=n[0])&&e.push(new P(o,i,a,u,c))}return this}function ru(t){var e=[],r=[],n;for(this._root&&e.push(new P(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var o=n.node;if(o.length){var i,a=n.x0,s=n.y0,f=n.x1,u=n.y1,c=(a+f)/2,h=(s+u)/2;(i=o[0])&&e.push(new P(i,a,s,c,h)),(i=o[1])&&e.push(new P(i,c,s,f,h)),(i=o[2])&&e.push(new P(i,a,h,c,u)),(i=o[3])&&e.push(new P(i,c,h,f,u))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this}function nu(t){return t[0]}function ou(t){return arguments.length?(this._x=t,this):this._x}function iu(t){return t[1]}function au(t){return arguments.length?(this._y=t,this):this._y}function Bt(t,e,r){var n=new kn(e??nu,r??iu,NaN,NaN,NaN,NaN);return t==null?n:n.addAll(t)}function kn(t,e,r,n,o,i){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=o,this._y1=i,this._root=void 0}function uu(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var X=Bt.prototype=kn.prototype;X.copy=function(){var t=new kn(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,r,n;if(!e)return t;if(!e.length)return t._root=uu(e),t;for(r=[{source:e,target:t._root=new Array(4)}];e=r.pop();)for(var o=0;o<4;++o)(n=e.source[o])&&(n.length?r.push({source:n,target:e.target[o]=new Array(4)}):e.target[o]=uu(n));return t};X.add=Ba;X.addAll=Wa;X.cover=Va;X.data=Za;X.extent=Qa;X.find=Ga;X.remove=Ka;X.removeAll=Ja;X.root=ja;X.size=tu;X.visit=eu;X.visitAfter=ru;X.x=ou;X.y=au;function st(t){return function(){return t}}function rt(t){return(t()-.5)*1e-6}function Lc(t){return t.x+t.vx}function Pc(t){return t.y+t.vy}function Hc(t){var e,r,n,o=1,i=1;typeof t!="function"&&(t=st(t==null?1:+t));function a(){for(var u,c=e.length,h,l,m,x,g,d,y=0;y<i;++y)for(h=Bt(e,Lc,Pc).visitAfter(s),u=0;u<c;++u)l=e[u],g=r[l.index],d=g*g,m=l.x+l.vx,x=l.y+l.vy,h.visit(_);function _(M,p,b,v,S){var C=M.data,z=M.r,N=g+z;if(C){if(C.index>l.index){var k=m-C.x-C.vx,F=x-C.y-C.vy,D=k*k+F*F;D<N*N&&(k===0&&(k=rt(n),D+=k*k),F===0&&(F=rt(n),D+=F*F),D=(N-(D=Math.sqrt(D)))/D*o,l.vx+=(k*=D)*(N=(z*=z)/(d+z)),l.vy+=(F*=D)*N,C.vx-=k*(N=1-N),C.vy-=F*N)}return}return p>m+N||v<m-N||b>x+N||S<x-N}}function s(u){if(u.data)return u.r=r[u.data.index];for(var c=u.r=0;c<4;++c)u[c]&&u[c].r>u.r&&(u.r=u[c].r)}function f(){if(e){var u,c=e.length,h;for(r=new Array(c),u=0;u<c;++u)h=e[u],r[h.index]=+t(h,u,e)}}return a.initialize=function(u,c){e=u,n=c,f()},a.iterations=function(u){return arguments.length?(i=+u,a):i},a.strength=function(u){return arguments.length?(o=+u,a):o},a.radius=function(u){return arguments.length?(t=typeof u=="function"?u:st(+u),f(),a):t},a}function qc(t){return t.index}function su(t,e){var r=t.get(e);if(!r)throw new Error("node not found: "+e);return r}function Bc(t){var e=qc,r=h,n,o=st(30),i,a,s,f,u,c=1;t==null&&(t=[]);function h(d){return 1/Math.min(s[d.source.index],s[d.target.index])}function l(d){for(var y=0,_=t.length;y<c;++y)for(var M=0,p,b,v,S,C,z,N;M<_;++M)p=t[M],b=p.source,v=p.target,S=v.x+v.vx-b.x-b.vx||rt(u),C=v.y+v.vy-b.y-b.vy||rt(u),z=Math.sqrt(S*S+C*C),z=(z-i[M])/z*d*n[M],S*=z,C*=z,v.vx-=S*(N=f[M]),v.vy-=C*N,b.vx+=S*(N=1-N),b.vy+=C*N}function m(){if(a){var d,y=a.length,_=t.length,M=new Map(a.map((b,v)=>[e(b,v,a),b])),p;for(d=0,s=new Array(y);d<_;++d)p=t[d],p.index=d,typeof p.source!="object"&&(p.source=su(M,p.source)),typeof p.target!="object"&&(p.target=su(M,p.target)),s[p.source.index]=(s[p.source.index]||0)+1,s[p.target.index]=(s[p.target.index]||0)+1;for(d=0,f=new Array(_);d<_;++d)p=t[d],f[d]=s[p.source.index]/(s[p.source.index]+s[p.target.index]);n=new Array(_),x(),i=new Array(_),g()}}function x(){if(a)for(var d=0,y=t.length;d<y;++d)n[d]=+r(t[d],d,t)}function g(){if(a)for(var d=0,y=t.length;d<y;++d)i[d]=+o(t[d],d,t)}return l.initialize=function(d,y){a=d,u=y,m()},l.links=function(d){return arguments.length?(t=d,m(),l):t},l.id=function(d){return arguments.length?(e=d,l):e},l.iterations=function(d){return arguments.length?(c=+d,l):c},l.strength=function(d){return arguments.length?(r=typeof d=="function"?d:st(+d),x(),l):r},l.distance=function(d){return arguments.length?(o=typeof d=="function"?d:st(+d),g(),l):o},l}function fu(){let t=1;return()=>(t=(1664525*t+1013904223)%4294967296)/4294967296}function lu(t){return t.x}function cu(t){return t.y}var Xc=10,Wc=Math.PI*(3-Math.sqrt(5));function Vc(t){var e,r=1,n=.001,o=1-Math.pow(n,1/300),i=0,a=.6,s=new Map,f=oe(h),u=Pt("tick","end"),c=fu();t==null&&(t=[]);function h(){l(),u.call("tick",e),r<n&&(f.stop(),u.call("end",e))}function l(g){var d,y=t.length,_;g===void 0&&(g=1);for(var M=0;M<g;++M)for(r+=(i-r)*o,s.forEach(function(p){p(r)}),d=0;d<y;++d)_=t[d],_.fx==null?_.x+=_.vx*=a:(_.x=_.fx,_.vx=0),_.fy==null?_.y+=_.vy*=a:(_.y=_.fy,_.vy=0);return e}function m(){for(var g=0,d=t.length,y;g<d;++g){if(y=t[g],y.index=g,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var _=Xc*Math.sqrt(.5+g),M=g*Wc;y.x=_*Math.cos(M),y.y=_*Math.sin(M)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function x(g){return g.initialize&&g.initialize(t,c),g}return m(),e={tick:l,restart:function(){return f.restart(h),e},stop:function(){return f.stop(),e},nodes:function(g){return arguments.length?(t=g,m(),s.forEach(x),e):t},alpha:function(g){return arguments.length?(r=+g,e):r},alphaMin:function(g){return arguments.length?(n=+g,e):n},alphaDecay:function(g){return arguments.length?(o=+g,e):+o},alphaTarget:function(g){return arguments.length?(i=+g,e):i},velocityDecay:function(g){return arguments.length?(a=1-g,e):1-a},randomSource:function(g){return arguments.length?(c=g,s.forEach(x),e):c},force:function(g,d){return arguments.length>1?(d==null?s.delete(g):s.set(g,x(d)),e):s.get(g)},find:function(g,d,y){var _=0,M=t.length,p,b,v,S,C;for(y==null?y=1/0:y*=y,_=0;_<M;++_)S=t[_],p=g-S.x,b=d-S.y,v=p*p+b*b,v<y&&(C=S,y=v);return C},on:function(g,d){return arguments.length>1?(u.on(g,d),e):u.on(g)}}}function Zc(){var t,e,r,n,o=st(-30),i,a=1,s=1/0,f=.81;function u(m){var x,g=t.length,d=Bt(t,lu,cu).visitAfter(h);for(n=m,x=0;x<g;++x)e=t[x],d.visit(l)}function c(){if(t){var m,x=t.length,g;for(i=new Array(x),m=0;m<x;++m)g=t[m],i[g.index]=+o(g,m,t)}}function h(m){var x=0,g,d,y=0,_,M,p;if(m.length){for(_=M=p=0;p<4;++p)(g=m[p])&&(d=Math.abs(g.value))&&(x+=g.value,y+=d,_+=d*g.x,M+=d*g.y);m.x=_/y,m.y=M/y}else{g=m,g.x=g.data.x,g.y=g.data.y;do x+=i[g.data.index];while(g=g.next)}m.value=x}function l(m,x,g,d){if(!m.value)return!0;var y=m.x-e.x,_=m.y-e.y,M=d-x,p=y*y+_*_;if(M*M/f<p)return p<s&&(y===0&&(y=rt(r),p+=y*y),_===0&&(_=rt(r),p+=_*_),p<a&&(p=Math.sqrt(a*p)),e.vx+=y*m.value*n/p,e.vy+=_*m.value*n/p),!0;if(m.length||p>=s)return;(m.data!==e||m.next)&&(y===0&&(y=rt(r),p+=y*y),_===0&&(_=rt(r),p+=_*_),p<a&&(p=Math.sqrt(a*p)));do m.data!==e&&(M=i[m.data.index]*n/p,e.vx+=y*M,e.vy+=_*M);while(m=m.next)}return u.initialize=function(m,x){t=m,r=x,c()},u.strength=function(m){return arguments.length?(o=typeof m=="function"?m:st(+m),c(),u):o},u.distanceMin=function(m){return arguments.length?(a=m*m,u):Math.sqrt(a)},u.distanceMax=function(m){return arguments.length?(s=m*m,u):Math.sqrt(s)},u.theta=function(m){return arguments.length?(f=m*m,u):Math.sqrt(f)},u}function Tt(t,e,r){this.k=t,this.x=e,this.y=r}Tt.prototype={constructor:Tt,scale:function(t){return t===1?this:new Tt(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Tt(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Sn=new Tt(1,0,0);Cn.prototype=Tt.prototype;function Cn(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Sn;return t.__zoom}export{Ct as a,An as b,Dn as c,Iu as d,Eu as e,Fu as f,At as g,Be as h,Gl as i,Et as j,Rc as k,Hc as l,Bc as m,Vc as n,Zc as o,er as p,nr as q,nf as r,sn as s,ji as t,yn as u,_n as v,Ll as w,Hl as x};