@ngrr/ds 0.1.17 → 0.1.20

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.
@@ -1,301 +1,301 @@
1
- (function(ie,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],h):(ie=typeof globalThis<"u"?globalThis:ie||self,h(ie.DSNagarro={},ie.jsxRuntime,ie.React,ie.ReactDOM))})(this,function(ie,h,_,Zr){"use strict";var uH=Object.defineProperty;var dH=(ie,h,_)=>h in ie?uH(ie,h,{enumerable:!0,configurable:!0,writable:!0,value:_}):ie[h]=_;var J=(ie,h,_)=>dH(ie,typeof h!="symbol"?h+"":h,_);function XE(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const wa=XE(_);function Id({label:e="⌘ ↵","aria-label":t,contentColor:n="default",className:r}){return h.jsx("span",{className:`dsn-shortcut${r?` ${r}`:""}`,"aria-label":t,role:"img",children:h.jsx("kbd",{className:"dsn-shortcut-content","data-color":n,"aria-hidden":"true",children:e})})}function me({variant:e="primary",size:t="md",disabled:n=!1,loading:r=!1,destructive:i=!1,showLeadingIcon:a=!1,leadingIcon:o,showLabel:s=!0,children:l,showTrailingIcon:c=!1,trailingIcon:u,shortcut:d=!1,shortcutLabel:f="⌘K",shortcutAriaLabel:g,type:p="button",onClick:v,"aria-label":m,"aria-haspopup":b,className:y}){const x=n||r,k=d&&!r&&!!g,w=e==="primary"?"inverted":"default";return h.jsxs("button",{type:p,className:`dsn-button${y?` ${y}`:""}`,"data-variant":e,"data-size":t,"data-destructive":i||void 0,disabled:x,"aria-busy":r||void 0,"aria-label":m,"aria-haspopup":b,onClick:v,children:[r?h.jsx("span",{className:"dsn-button-spinner","aria-hidden":"true"}):a&&o!=null&&h.jsx("span",{className:"dsn-button-icon","aria-hidden":"true",children:o}),s&&h.jsx("span",{className:"dsn-button-label",children:l}),!r&&c&&u!=null&&h.jsx("span",{className:"dsn-button-icon","aria-hidden":"true",children:u}),k&&h.jsx(Id,{label:f,"aria-label":g,contentColor:w})]})}function Yt({size:e="md",variant:t="ghost",selected:n=!1,disabled:r=!1,icon:i,onClick:a,onSelectedChange:o,className:s,"aria-label":l}){return h.jsx("button",{type:"button",className:["dsn-toggle-button",s].filter(Boolean).join(" "),"data-size":e,"data-variant":t,"data-selected":n||void 0,disabled:r,"aria-label":l,"aria-pressed":n,onClick:c=>{r||(o==null||o(!n),a==null||a(c))},children:h.jsx("span",{className:"dsn-toggle-button-icon","aria-hidden":"true",children:i})})}function ZE({variant:e="ghost",size:t="md",disabled:n=!1,loading:r=!1,badge:i=!1,showLabel:a=!0,icon:o,children:s,"aria-label":l,onClick:c,className:u}){return h.jsxs("button",{type:"button",className:`dsn-vertical-button${u?` ${u}`:""}`,"data-variant":e,"data-size":t,"data-loading":r||void 0,disabled:n,"aria-label":l,"aria-busy":r||void 0,onClick:c,children:[h.jsxs("span",{className:"dsn-vertical-button__icon-area",children:[r?h.jsx("span",{className:"dsn-vertical-button__spinner","aria-hidden":"true"}):o!=null&&h.jsx("span",{className:"dsn-vertical-button__icon","aria-hidden":"true",children:o}),i&&h.jsx("span",{className:"dsn-vertical-button__badge","aria-hidden":"true"})]}),a&&s!=null&&h.jsx("span",{className:"dsn-vertical-button__label",children:s})]})}function Jr({size:e="md",spaceBetween:t=!1,children:n,className:r,"aria-label":i="Button group"}){const a=["dsn-button-group",r].filter(Boolean).join(" ");return h.jsx("div",{className:a,"data-size":e,"data-space-between":t||void 0,role:"group","aria-label":i,children:n})}function JE({size:e="md",spaceBetween:t=!1,children:n,className:r,"aria-label":i="Button group vertical"}){const a=["dsn-button-group-vertical",r].filter(Boolean).join(" ");return h.jsx("div",{className:a,"data-size":e,"data-space-between":t||void 0,role:"group","aria-label":i,children:n})}/**
1
+ (function(oe,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],h):(oe=typeof globalThis<"u"?globalThis:oe||self,h(oe.DSNagarro={},oe.jsxRuntime,oe.React,oe.ReactDOM))})(this,function(oe,h,_,Qr){"use strict";var wH=Object.defineProperty;var kH=(oe,h,_)=>h in oe?wH(oe,h,{enumerable:!0,configurable:!0,writable:!0,value:_}):oe[h]=_;var R=(oe,h,_)=>kH(oe,typeof h!="symbol"?h+"":h,_);function dT(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Ma=dT(_);function Vd({label:e="⌘ ↵","aria-label":t,contentColor:n="default",className:r}){return h.jsx("span",{className:`dsn-shortcut${r?` ${r}`:""}`,"aria-label":t,role:"img",children:h.jsx("kbd",{className:"dsn-shortcut-content","data-color":n,"aria-hidden":"true",children:e})})}function ve({variant:e="primary",size:t="md",disabled:n=!1,loading:r=!1,destructive:i=!1,showLeadingIcon:a=!1,leadingIcon:o,showLabel:s=!0,children:l,showTrailingIcon:c=!1,trailingIcon:u,shortcut:d=!1,shortcutLabel:f="⌘K",shortcutAriaLabel:g,type:p="button",onClick:v,"aria-label":m,"aria-haspopup":x,className:y}){const b=n||r,k=d&&!r&&!!g,w=e==="primary"?"inverted":"default";return h.jsxs("button",{type:p,className:`dsn-button${y?` ${y}`:""}`,"data-variant":e,"data-size":t,"data-destructive":i||void 0,disabled:b,"aria-busy":r||void 0,"aria-label":m,"aria-haspopup":x,onClick:v,children:[r?h.jsx("span",{className:"dsn-button-spinner","aria-hidden":"true"}):a&&o!=null&&h.jsx("span",{className:"dsn-button-icon","aria-hidden":"true",children:o}),s&&h.jsx("span",{className:"dsn-button-label",children:l}),!r&&c&&u!=null&&h.jsx("span",{className:"dsn-button-icon","aria-hidden":"true",children:u}),k&&h.jsx(Vd,{label:f,"aria-label":g,contentColor:w})]})}function Kt({size:e="md",variant:t="ghost",selected:n=!1,disabled:r=!1,icon:i,onClick:a,onSelectedChange:o,className:s,"aria-label":l}){return h.jsx("button",{type:"button",className:["dsn-toggle-button",s].filter(Boolean).join(" "),"data-size":e,"data-variant":t,"data-selected":n||void 0,disabled:r,"aria-label":l,"aria-pressed":n,onClick:c=>{r||(o==null||o(!n),a==null||a(c))},children:h.jsx("span",{className:"dsn-toggle-button-icon","aria-hidden":"true",children:i})})}function fT({variant:e="ghost",size:t="md",disabled:n=!1,loading:r=!1,badge:i=!1,showLabel:a=!0,icon:o,children:s,"aria-label":l,onClick:c,className:u}){return h.jsxs("button",{type:"button",className:`dsn-vertical-button${u?` ${u}`:""}`,"data-variant":e,"data-size":t,"data-loading":r||void 0,disabled:n,"aria-label":l,"aria-busy":r||void 0,onClick:c,children:[h.jsxs("span",{className:"dsn-vertical-button__icon-area",children:[r?h.jsx("span",{className:"dsn-vertical-button__spinner","aria-hidden":"true"}):o!=null&&h.jsx("span",{className:"dsn-vertical-button__icon","aria-hidden":"true",children:o}),i&&h.jsx("span",{className:"dsn-vertical-button__badge","aria-hidden":"true"})]}),a&&s!=null&&h.jsx("span",{className:"dsn-vertical-button__label",children:s})]})}function Rr({size:e="md",spaceBetween:t=!1,children:n,className:r,"aria-label":i="Button group"}){const a=["dsn-button-group",r].filter(Boolean).join(" ");return h.jsx("div",{className:a,"data-size":e,"data-space-between":t||void 0,role:"group","aria-label":i,children:n})}function hT({size:e="md",spaceBetween:t=!1,children:n,className:r,"aria-label":i="Button group vertical"}){const a=["dsn-button-group-vertical",r].filter(Boolean).join(" ");return h.jsx("div",{className:a,"data-size":e,"data-space-between":t||void 0,role:"group","aria-label":i,children:n})}/**
2
2
  * @license lucide-react v0.575.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const by=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
6
+ */const Ty=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
7
7
  * @license lucide-react v0.575.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const QE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
11
+ */const pT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
12
12
  * @license lucide-react v0.575.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const RE=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
16
+ */const gT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
17
17
  * @license lucide-react v0.575.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const xy=e=>{const t=RE(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
21
+ */const My=e=>{const t=gT(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
22
22
  * @license lucide-react v0.575.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */var eT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
26
+ */var vT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
27
27
  * @license lucide-react v0.575.0 - ISC
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const tT=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
31
+ */const mT=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
32
32
  * @license lucide-react v0.575.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const nT=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...s},l)=>_.createElement("svg",{ref:l,...eT,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:by("lucide",i),...!a&&!tT(s)&&{"aria-hidden":"true"},...s},[...o.map(([c,u])=>_.createElement(c,u)),...Array.isArray(a)?a:[a]]));/**
36
+ */const yT=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...s},l)=>_.createElement("svg",{ref:l,...vT,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ty("lucide",i),...!a&&!mT(s)&&{"aria-hidden":"true"},...s},[...o.map(([c,u])=>_.createElement(c,u)),...Array.isArray(a)?a:[a]]));/**
37
37
  * @license lucide-react v0.575.0 - ISC
38
38
  *
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
- */const Se=(e,t)=>{const n=_.forwardRef(({className:r,...i},a)=>_.createElement(nT,{ref:a,iconNode:t,className:by(`lucide-${QE(xy(e))}`,`lucide-${e}`,r),...i}));return n.displayName=xy(e),n};/**
41
+ */const we=(e,t)=>{const n=_.forwardRef(({className:r,...i},a)=>_.createElement(yT,{ref:a,iconNode:t,className:Ty(`lucide-${pT(My(e))}`,`lucide-${e}`,r),...i}));return n.displayName=My(e),n};/**
42
42
  * @license lucide-react v0.575.0 - ISC
43
43
  *
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
- */const rT=Se("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
46
+ */const bT=we("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
47
47
  * @license lucide-react v0.575.0 - ISC
48
48
  *
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
- */const iT=Se("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
51
+ */const xT=we("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
52
52
  * @license lucide-react v0.575.0 - ISC
53
53
  *
54
54
  * This source code is licensed under the ISC license.
55
55
  * See the LICENSE file in the root directory of this source tree.
56
- */const aT=Se("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
56
+ */const _T=we("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
57
57
  * @license lucide-react v0.575.0 - ISC
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */const oT=Se("bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/**
61
+ */const wT=we("bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/**
62
62
  * @license lucide-react v0.575.0 - ISC
63
63
  *
64
64
  * This source code is licensed under the ISC license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
- */const sT=Se("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);/**
66
+ */const kT=we("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);/**
67
67
  * @license lucide-react v0.575.0 - ISC
68
68
  *
69
69
  * This source code is licensed under the ISC license.
70
70
  * See the LICENSE file in the root directory of this source tree.
71
- */const _y=Se("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
71
+ */const $y=we("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
72
72
  * @license lucide-react v0.575.0 - ISC
73
73
  *
74
74
  * This source code is licensed under the ISC license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
- */const wr=Se("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
76
+ */const Sr=we("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
77
77
  * @license lucide-react v0.575.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
- */const lT=Se("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
81
+ */const ST=we("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
82
82
  * @license lucide-react v0.575.0 - ISC
83
83
  *
84
84
  * This source code is licensed under the ISC license.
85
85
  * See the LICENSE file in the root directory of this source tree.
86
- */const $i=Se("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
86
+ */const Li=we("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
87
87
  * @license lucide-react v0.575.0 - ISC
88
88
  *
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
- */const cT=Se("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
91
+ */const NT=we("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
92
92
  * @license lucide-react v0.575.0 - ISC
93
93
  *
94
94
  * This source code is licensed under the ISC license.
95
95
  * See the LICENSE file in the root directory of this source tree.
96
- */const Fd=Se("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
96
+ */const Kd=we("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
97
97
  * @license lucide-react v0.575.0 - ISC
98
98
  *
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
- */const uT=Se("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
101
+ */const ET=we("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
102
102
  * @license lucide-react v0.575.0 - ISC
103
103
  *
104
104
  * This source code is licensed under the ISC license.
105
105
  * See the LICENSE file in the root directory of this source tree.
106
- */const dT=Se("diamond",[["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z",key:"1f1r0c"}]]);/**
106
+ */const CT=we("diamond",[["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z",key:"1f1r0c"}]]);/**
107
107
  * @license lucide-react v0.575.0 - ISC
108
108
  *
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
- */const wy=Se("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);/**
111
+ */const Oy=we("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);/**
112
112
  * @license lucide-react v0.575.0 - ISC
113
113
  *
114
114
  * This source code is licensed under the ISC license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
- */const zd=Se("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
116
+ */const Yd=we("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
117
117
  * @license lucide-react v0.575.0 - ISC
118
118
  *
119
119
  * This source code is licensed under the ISC license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
- */const fT=Se("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
121
+ */const TT=we("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
122
122
  * @license lucide-react v0.575.0 - ISC
123
123
  *
124
124
  * This source code is licensed under the ISC license.
125
125
  * See the LICENSE file in the root directory of this source tree.
126
- */const hT=Se("eraser",[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]]);/**
126
+ */const MT=we("eraser",[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]]);/**
127
127
  * @license lucide-react v0.575.0 - ISC
128
128
  *
129
129
  * This source code is licensed under the ISC license.
130
130
  * See the LICENSE file in the root directory of this source tree.
131
- */const ky=Se("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);/**
131
+ */const Py=we("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);/**
132
132
  * @license lucide-react v0.575.0 - ISC
133
133
  *
134
134
  * This source code is licensed under the ISC license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
- */const Bd=Se("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
136
+ */const Gd=we("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
137
137
  * @license lucide-react v0.575.0 - ISC
138
138
  *
139
139
  * This source code is licensed under the ISC license.
140
140
  * See the LICENSE file in the root directory of this source tree.
141
- */const pT=Se("italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
141
+ */const $T=we("italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
142
142
  * @license lucide-react v0.575.0 - ISC
143
143
  *
144
144
  * This source code is licensed under the ISC license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
- */const Sy=Se("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
146
+ */const Ay=we("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
147
147
  * @license lucide-react v0.575.0 - ISC
148
148
  *
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
- */const gT=Se("list-ordered",[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]);/**
151
+ */const OT=we("list-ordered",[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]);/**
152
152
  * @license lucide-react v0.575.0 - ISC
153
153
  *
154
154
  * This source code is licensed under the ISC license.
155
155
  * See the LICENSE file in the root directory of this source tree.
156
- */const vT=Se("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]);/**
156
+ */const PT=we("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]);/**
157
157
  * @license lucide-react v0.575.0 - ISC
158
158
  *
159
159
  * This source code is licensed under the ISC license.
160
160
  * See the LICENSE file in the root directory of this source tree.
161
- */const mT=Se("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
161
+ */const AT=we("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
162
162
  * @license lucide-react v0.575.0 - ISC
163
163
  *
164
164
  * This source code is licensed under the ISC license.
165
165
  * See the LICENSE file in the root directory of this source tree.
166
- */const yT=Se("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);/**
166
+ */const LT=we("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);/**
167
167
  * @license lucide-react v0.575.0 - ISC
168
168
  *
169
169
  * This source code is licensed under the ISC license.
170
170
  * See the LICENSE file in the root directory of this source tree.
171
- */const bT=Se("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
171
+ */const DT=we("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
172
172
  * @license lucide-react v0.575.0 - ISC
173
173
  *
174
174
  * This source code is licensed under the ISC license.
175
175
  * See the LICENSE file in the root directory of this source tree.
176
- */const xT=Se("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
176
+ */const IT=we("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
177
177
  * @license lucide-react v0.575.0 - ISC
178
178
  *
179
179
  * This source code is licensed under the ISC license.
180
180
  * See the LICENSE file in the root directory of this source tree.
181
- */const _T=Se("quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
181
+ */const FT=we("quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
182
182
  * @license lucide-react v0.575.0 - ISC
183
183
  *
184
184
  * This source code is licensed under the ISC license.
185
185
  * See the LICENSE file in the root directory of this source tree.
186
- */const wT=Se("redo-2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]);/**
186
+ */const zT=we("redo-2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]);/**
187
187
  * @license lucide-react v0.575.0 - ISC
188
188
  *
189
189
  * This source code is licensed under the ISC license.
190
190
  * See the LICENSE file in the root directory of this source tree.
191
- */const kT=Se("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);/**
191
+ */const BT=we("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);/**
192
192
  * @license lucide-react v0.575.0 - ISC
193
193
  *
194
194
  * This source code is licensed under the ISC license.
195
195
  * See the LICENSE file in the root directory of this source tree.
196
- */const ST=Se("smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/**
196
+ */const jT=we("smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/**
197
197
  * @license lucide-react v0.575.0 - ISC
198
198
  *
199
199
  * This source code is licensed under the ISC license.
200
200
  * See the LICENSE file in the root directory of this source tree.
201
- */const NT=Se("strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);/**
201
+ */const WT=we("strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);/**
202
202
  * @license lucide-react v0.575.0 - ISC
203
203
  *
204
204
  * This source code is licensed under the ISC license.
205
205
  * See the LICENSE file in the root directory of this source tree.
206
- */const CT=Se("text-align-center",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]]);/**
206
+ */const UT=we("text-align-center",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]]);/**
207
207
  * @license lucide-react v0.575.0 - ISC
208
208
  *
209
209
  * This source code is licensed under the ISC license.
210
210
  * See the LICENSE file in the root directory of this source tree.
211
- */const ET=Se("text-align-end",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]]);/**
211
+ */const HT=we("text-align-end",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]]);/**
212
212
  * @license lucide-react v0.575.0 - ISC
213
213
  *
214
214
  * This source code is licensed under the ISC license.
215
215
  * See the LICENSE file in the root directory of this source tree.
216
- */const TT=Se("text-align-justify",[["path",{d:"M3 5h18",key:"1u36vt"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 19h18",key:"awlh7x"}]]);/**
216
+ */const qT=we("text-align-justify",[["path",{d:"M3 5h18",key:"1u36vt"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 19h18",key:"awlh7x"}]]);/**
217
217
  * @license lucide-react v0.575.0 - ISC
218
218
  *
219
219
  * This source code is licensed under the ISC license.
220
220
  * See the LICENSE file in the root directory of this source tree.
221
- */const MT=Se("text-align-start",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]]);/**
221
+ */const VT=we("text-align-start",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]]);/**
222
222
  * @license lucide-react v0.575.0 - ISC
223
223
  *
224
224
  * This source code is licensed under the ISC license.
225
225
  * See the LICENSE file in the root directory of this source tree.
226
- */const Ny=Se("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
226
+ */const Ly=we("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
227
227
  * @license lucide-react v0.575.0 - ISC
228
228
  *
229
229
  * This source code is licensed under the ISC license.
230
230
  * See the LICENSE file in the root directory of this source tree.
231
- */const $T=Se("underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);/**
231
+ */const KT=we("underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);/**
232
232
  * @license lucide-react v0.575.0 - ISC
233
233
  *
234
234
  * This source code is licensed under the ISC license.
235
235
  * See the LICENSE file in the root directory of this source tree.
236
- */const OT=Se("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
236
+ */const YT=we("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
237
237
  * @license lucide-react v0.575.0 - ISC
238
238
  *
239
239
  * This source code is licensed under the ISC license.
240
240
  * See the LICENSE file in the root directory of this source tree.
241
- */const PT=Se("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);/**
241
+ */const GT=we("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);/**
242
242
  * @license lucide-react v0.575.0 - ISC
243
243
  *
244
244
  * This source code is licensed under the ISC license.
245
245
  * See the LICENSE file in the root directory of this source tree.
246
- */const AT=Se("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
246
+ */const XT=we("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
247
247
  * @license lucide-react v0.575.0 - ISC
248
248
  *
249
249
  * This source code is licensed under the ISC license.
250
250
  * See the LICENSE file in the root directory of this source tree.
251
- */const Qn=Se("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function LT({size:e="md",variant:t="secondary",children:n,leadingIcon:r,disabled:i=!1,loading:a=!1,triggerIcon:o,onMainClick:s,onDropdownClick:l,dropdownAriaLabel:c="More options",className:u}){const d=o??h.jsx(wr,{size:16,strokeWidth:1.5,"aria-hidden":"true"});return h.jsxs("div",{className:`dsn-split-button${u?` ${u}`:""}`,"data-size":e,role:"group",children:[h.jsx(me,{variant:t,size:e,showLeadingIcon:r!=null,leadingIcon:r,disabled:i,loading:a,onClick:s,children:n}),h.jsx(me,{variant:t,size:e,showLabel:!1,showLeadingIcon:!0,leadingIcon:d,disabled:i||a,"aria-label":c,"aria-haspopup":"true",onClick:l})]})}function Oi({size:e="md",variant:t="profile",fill:n="initials",src:r,initials:i,icon:a,name:o,alt:s,className:l,style:c}){const u=["dsn-avatar",l].filter(Boolean).join(" "),d=o??void 0,f=o?void 0:!0,g=i?i.trim().slice(0,2).toUpperCase():void 0;return h.jsxs("div",{className:u,"data-size":e,"data-variant":t,"data-fill":n,role:"img","aria-label":d,"aria-hidden":f,style:c,children:[n==="picture"&&r&&h.jsx("img",{className:"dsn-avatar-image",src:r,alt:s??o??""}),n==="initials"&&g,n==="icon"&&h.jsx("span",{className:"dsn-avatar-icon","aria-hidden":"true",children:(()=>{const p=a??(t==="organization"?sT:AT);return h.jsx(p,{"aria-hidden":"true"})})()})]})}function DT({size:e="sm",avatars:t,maxVisible:n=5,className:r,"aria-label":i}){const a=t.slice(0,n),o=t.length-a.length,s=i??(()=>{const c=t.map(d=>d.name);return c.length<=n?c.join(", "):`${c.slice(0,n).join(", ")}, and ${o} ${o===1?"other":"others"}`})(),l=["dsn-avatar-group",r].filter(Boolean).join(" ");return h.jsxs("div",{className:l,"data-size":e,role:"group","aria-label":s,children:[a.map((c,u)=>h.jsx(Oi,{size:e,variant:c.variant??"profile",fill:c.fill??(c.src?"picture":c.initials?"initials":"icon"),src:c.src,initials:c.initials,name:c.name,style:{zIndex:u+1}},u)),o>0&&h.jsxs("span",{className:"dsn-avatar-group-overflow","aria-hidden":"true",style:{zIndex:a.length+1},children:["+",o]})]})}function Do({size:e="sm",variant:t="highlight-soft",count:n,className:r,"aria-label":i}){const a=e==="dot",o=a?void 0:n!==void 0?n>99?"99+":String(n):void 0,s=["dsn-badge",r].filter(Boolean).join(" ");return h.jsx("span",{className:s,"data-size":e,"data-variant":t,"aria-label":i,"aria-hidden":a&&!i?!0:void 0,children:o})}function IT({title:e,value:t,variant:n="default",className:r,"aria-label":i}){const a=["dsn-stat",r].filter(Boolean).join(" ");return h.jsxs("div",{className:a,"data-variant":n,"aria-label":i,children:[h.jsx("p",{className:"dsn-stat-title",children:e}),h.jsx("p",{className:"dsn-stat-value",children:t})]})}function kr({label:e,variant:t="neutral",size:n="md",iconLeft:r,iconRight:i,showIcon:a=!0,className:o,"aria-label":s}){const l=["dsn-tag",o].filter(Boolean).join(" "),c=n==="sm"?10:12;return h.jsxs("span",{className:l,"data-variant":t,"data-size":n,role:"status","aria-label":s,children:[a&&r&&(()=>{const u=r;return h.jsx("span",{className:"dsn-tag-icon dsn-tag-icon-left","aria-hidden":"true",children:h.jsx(u,{size:c,"aria-hidden":"true"})})})(),h.jsx("span",{className:"dsn-tag-label",children:e}),a&&i&&(()=>{const u=i;return h.jsx("span",{className:"dsn-tag-icon dsn-tag-icon-right","aria-hidden":"true",children:h.jsx(u,{size:c,"aria-hidden":"true"})})})()]})}function Io({label:e,selected:t=!1,disabled:n=!1,size:r="md",leadingIcon:i,trailingIcon:a,showLeadingIcon:o=!0,showTrailingIcon:s=!0,onDismiss:l,onClick:c,className:u,"aria-label":d}){const f=["dsn-chip",u].filter(Boolean).join(" ");function g(p){(p.key===" "||p.key==="Enter")&&!n&&(p.preventDefault(),c==null||c())}return h.jsxs("div",{role:"checkbox","aria-checked":t,"aria-disabled":n?!0:void 0,tabIndex:n?-1:0,className:f,"data-size":r,"data-selected":t,onClick:n?void 0:c,onKeyDown:g,"aria-label":d,children:[o&&h.jsx("span",{className:"dsn-chip-leading","aria-hidden":"true","data-icon":i?"custom":void 0,children:i&&(()=>{const p=i;return h.jsx(p,{size:12,"aria-hidden":"true"})})()}),h.jsx("span",{className:"dsn-chip-label",children:e}),l?h.jsx("button",{type:"button",className:"dsn-chip-dismiss","aria-label":`Remove ${e}`,tabIndex:n?-1:0,onClick:p=>{p.stopPropagation(),n||l()},children:h.jsx(Qn,{size:12,"aria-hidden":"true"})}):s?h.jsx("span",{className:"dsn-chip-trailing","aria-hidden":"true","data-icon":a?"custom":void 0,children:a&&(()=>{const p=a;return h.jsx(p,{size:12,"aria-hidden":"true"})})()}):null]})}function Fl({label:e,children:t,className:n}){const r=["dsn-chip-group",n].filter(Boolean).join(" ");return h.jsx("div",{role:"group","aria-label":e,className:r,children:t})}const FT="https://images.unsplash.com/photo-1541701494587-cb58502866ab?auto=format&fit=crop&w=512&q=80";function zT(e){switch(e){case"xxSmall":return 12;case"xSmall":case"small":case"medium":return 16;case"large":case"xLarge":return 24;case"xxLarge":return 48;default:return 16}}function jd({variant:e="file",size:t="xxSmall",imageSrc:n,imageAlt:r="Image thumbnail",icon:i,className:a,"aria-label":o}){const s=["dsn-file-thumbnail",a].filter(Boolean).join(" "),l=zT(t),c=n??FT;return h.jsxs("span",{className:s,"data-variant":e,"data-size":t,role:"img","aria-label":o??(e==="image"?r:"File thumbnail"),children:[e==="image"?h.jsx("img",{src:c,alt:"",className:"dsn-file-thumbnail-image","aria-hidden":"true"}):null,e==="file"?h.jsx("span",{className:"dsn-file-thumbnail-icon","aria-hidden":"true",children:i??h.jsx(ky,{size:l,strokeWidth:1.75,"aria-hidden":"true"})}):null]})}function ka({checked:e,onChange:t,disabled:n=!1,size:r="md",id:i,className:a,"aria-label":o,"aria-labelledby":s}){const l=["dsn-switcher",a].filter(Boolean).join(" ");function c(){t==null||t(!e)}return h.jsx("button",{type:"button",role:"switch",id:i,"aria-checked":e,"aria-disabled":n?!0:void 0,disabled:n,"aria-label":o,"aria-labelledby":s,className:l,"data-size":r,"data-checked":e,onClick:c,children:h.jsx("span",{className:"dsn-switcher-track","aria-hidden":"true",children:h.jsx("span",{className:"dsn-switcher-thumb"})})})}function Rn({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M8 2 L14 8 L8 14 L2 8 Z",fill:"none",stroke:"currentColor",strokeOpacity:.85,strokeWidth:"1.5",strokeLinejoin:"round"})})}function BT(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M3.5 8.5L6.5 11.5L12.5 5.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}const Pi=_.forwardRef(function({variant:t="default",destructive:n=!1,disabled:r=!1,selected:i=!1,fullWidth:a=!1,label:o="Label",description:s="Description",descriptionRight:l="Description",showLabel:c=!0,showDescription:u=!1,showDescriptionRight:d=!1,showLeadingIcon:f=!0,leadingIcon:g,showTrailingIcon:p=!0,trailingIcon:v,showAvatar:m=!1,avatarProps:b,shortcut:y=!1,shortcutLabel:x="⌘ ↵",shortcutAriaLabel:k="Command Enter",showBadge:w=!1,badgeCount:S=1,badgeSize:N="sm",badgeVariant:C="critical",showTag:E=!1,tagLabel:T="Label",tagVariant:O="highlight",showButtons:P=!1,actionAriaLabel:M="Open actions",onActionClick:$,switcherChecked:L,onSwitcherChange:z,onClick:j,onKeyDown:B,tabIndex:H,className:F,"aria-label":D},U){const V=["dsn-menu-cell",a&&"dsn-menu-cell--full-width",F].filter(Boolean).join(" "),Y=t==="switcher",G=L??i,te=!(P||Y),le=I=>{B==null||B(I),I.target===I.currentTarget&&(r||!j||(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),j(I)))},W={className:V,"data-variant":t,"data-destructive":n||void 0,"data-selected":i||void 0,"data-disabled":r||void 0,role:"menuitem","aria-label":D,"aria-disabled":r||void 0},Z=h.jsxs(h.Fragment,{children:[m&&h.jsx("span",{className:"dsn-menu-cell-avatar-wrap",children:h.jsx(Oi,{size:"xs",variant:"profile",fill:"initials",initials:"AC",name:"Avatar",...b})}),!m&&f&&h.jsx("span",{className:"dsn-menu-cell-icon-wrap","aria-hidden":"true",children:g??h.jsx(Rn,{})}),c&&h.jsxs("span",{className:"dsn-menu-cell-label-wrap",children:[h.jsx("span",{className:"dsn-menu-cell-label",children:o}),u&&h.jsx("span",{className:"dsn-menu-cell-description",children:s})]}),d&&h.jsx("span",{className:"dsn-menu-cell-description-right",children:l}),w&&h.jsx("span",{className:"dsn-menu-cell-badge-wrap",children:h.jsx(Do,{size:N,variant:C,count:S})}),E&&h.jsx("span",{className:"dsn-menu-cell-tag-wrap",children:h.jsx(kr,{size:"sm",variant:O,label:T})}),p&&h.jsx("span",{className:"dsn-menu-cell-icon-wrap","aria-hidden":"true",children:i&&!Y?h.jsx(BT,{}):v??h.jsx(Rn,{})}),y&&h.jsx("span",{className:"dsn-menu-cell-shortcut-wrap",children:h.jsx(Id,{label:x,"aria-label":k})}),P&&h.jsx("span",{className:"dsn-menu-cell-action-wrap",onClick:I=>I.stopPropagation(),onKeyDown:I=>I.stopPropagation(),children:h.jsx(me,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Rn,{}),"aria-label":M,onClick:I=>{I.stopPropagation(),$==null||$(I)}})}),Y&&h.jsx("span",{className:"dsn-menu-cell-switcher-wrap",onClick:I=>I.stopPropagation(),onKeyDown:I=>I.stopPropagation(),children:h.jsx(ka,{size:"sm",checked:G,disabled:r,"aria-label":"Toggle option",onChange:z})})]});return te?h.jsx("button",{type:"button",...W,ref:U,disabled:r,onClick:j,onKeyDown:B,tabIndex:H,children:Z}):h.jsx("div",{...W,ref:U,tabIndex:H??(r?-1:0),onClick:r?void 0:j,onKeyDown:le,children:Z})});function Cy(e,t){if(typeof window>"u"||typeof document>"u")return t;const n=window.getComputedStyle(document.documentElement).getPropertyValue(e).trim(),r=Number.parseFloat(n);return Number.isFinite(r)?r:t}function Sr({header:e,segment:t,search:n,content:r,bottomBar:i,role:a="menu",width:o,contentPadding:s="none",className:l,contentClassName:c,anchorRef:u,offset:d,viewportMargin:f,matchAnchorWidth:g=!1,minWidth:p,"aria-label":v="Popover"}){const m=_.useRef(null),[b,y]=_.useState(null),x=d??Cy("--space-tiny",4),k=f??Cy("--space-medium",16),w=p??192,S=_.useCallback(()=>{if(!(u!=null&&u.current)||!m.current)return;const T=u.current.getBoundingClientRect(),O=m.current.getBoundingClientRect(),P=O.height,M=Math.max(g?T.width:O.width,w),$=M,L=window.innerHeight-T.bottom-k,z=T.top-k,j=P+x>L&&z>=P+x,B=j?T.top-P-x:T.bottom+x,H=Math.max(k,window.innerHeight-P-k),F=Math.min(Math.max(B,k),H),D=T.left,U=Math.max(k,window.innerWidth-$-k),V=Math.min(Math.max(D,k),U);y({top:F,left:V,width:g?M:void 0,placement:j?"top":"bottom"})},[u,g,w,x,k]);_.useEffect(()=>{if(!(u!=null&&u.current))return;S();const T=()=>S(),O=()=>S();return window.addEventListener("resize",T),window.addEventListener("scroll",O,!0),()=>{window.removeEventListener("resize",T),window.removeEventListener("scroll",O,!0)}},[u,S]),_.useEffect(()=>{if(!(u!=null&&u.current)||!m.current||typeof ResizeObserver>"u")return;const T=new ResizeObserver(()=>S());return T.observe(u.current),T.observe(m.current),()=>T.disconnect()},[u,S]);const N=["dsn-popover-wrapper",l].filter(Boolean).join(" "),C=["dsn-popover-wrapper-content-slot",c].filter(Boolean).join(" "),E=_.useMemo(()=>{const T={};return o!==void 0&&(T.width=o),T.minWidth=w,u!=null&&u.current&&b&&(T.position="fixed",T.top=b.top,T.left=b.left,b.width!==void 0&&o===void 0&&(T.width=b.width),T.zIndex=1e3),Object.keys(T).length>0?T:void 0},[u,b,w,o]);return h.jsxs("div",{ref:m,className:N,role:a,"aria-label":v,"data-content-padding":s,"data-placement":b==null?void 0:b.placement,style:E,children:[e&&h.jsx("div",{className:"dsn-popover-wrapper-header",children:e}),t&&h.jsx("div",{className:"dsn-popover-wrapper-segment",children:t}),n&&h.jsx("div",{className:"dsn-popover-wrapper-search",children:n}),h.jsx("div",{className:"dsn-popover-wrapper-content",children:h.jsx("div",{className:C,children:r})}),i&&h.jsx("div",{className:"dsn-popover-wrapper-bottom-bar",children:i})]})}const jT=[{id:"download",label:"Download",icon:h.jsx(wy,{size:16,"aria-hidden":"true"})},{id:"rename",label:"Rename",icon:h.jsx(bT,{size:16,"aria-hidden":"true"})},{id:"details",label:"Details",icon:h.jsx(Bd,{size:16,"aria-hidden":"true"})}];function Wd({fileName:e,fileSize:t,previewVariant:n="file",previewSrc:r,size:i="md",disabled:a=!1,loading:o=!1,action:s="none",menuOptions:l=jT,onMenuSelect:c,onRemove:u,className:d,"aria-label":f}){const p=`dsn-attachment-chip-menu-${_.useId()}`,v=_.useRef(null),m=_.useRef(null),[b,y]=_.useState(!1),x=s==="more"&&!a&&!o;return _.useEffect(()=>{if(!b)return;const k=S=>{var N;(N=v.current)!=null&&N.contains(S.target)||y(!1)},w=S=>{var N;S.key==="Escape"&&(y(!1),(N=m.current)==null||N.focus())};return document.addEventListener("mousedown",k),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",w)}},[b]),h.jsxs("div",{ref:v,className:["dsn-attachment-chip",d].filter(Boolean).join(" "),"data-size":i,"data-disabled":a||void 0,"data-loading":o||void 0,role:"group","aria-label":f??e,children:[h.jsxs("div",{className:"dsn-attachment-chip-content",children:[h.jsx("span",{className:"dsn-attachment-chip-preview","aria-hidden":"true",children:o?h.jsx(mT,{size:16,className:"dsn-attachment-chip-spinner"}):h.jsx(jd,{variant:n,imageSrc:r,size:"xSmall","aria-label":`${n} preview`})}),h.jsxs("span",{className:"dsn-attachment-chip-label-wrap",children:[h.jsx("span",{className:"dsn-attachment-chip-label",children:e}),h.jsx("span",{className:"dsn-attachment-chip-meta",children:t})]})]}),s==="remove"&&h.jsx("button",{type:"button",disabled:a||o,"aria-label":`Remove ${e}`,className:"dsn-attachment-chip-action",onClick:u,children:h.jsx(Qn,{size:16,"aria-hidden":"true"})}),s==="more"&&h.jsxs(h.Fragment,{children:[h.jsx("button",{type:"button",disabled:a||o,"aria-label":`More options for ${e}`,"aria-haspopup":"menu","aria-controls":b?p:void 0,className:"dsn-attachment-chip-action",onClick:()=>{x&&y(k=>!k)},ref:m,children:h.jsx(zd,{size:16,"aria-hidden":"true"})}),b&&x&&h.jsx(Sr,{role:"menu","aria-label":"Attachment options",contentPadding:"small",className:"dsn-attachment-chip-popover",contentClassName:"dsn-attachment-chip-menu",anchorRef:m,matchAnchorWidth:!0,content:h.jsx("div",{id:p,children:l.map(k=>h.jsx(Pi,{className:"dsn-attachment-chip-menu-item",label:k.label,showLeadingIcon:!!k.icon,leadingIcon:k.icon,showTrailingIcon:!1,disabled:k.disabled,onClick:()=>{var w;k.disabled||(c==null||c(k.id),y(!1),(w=m.current)==null||w.focus())}},k.id))})})]})]})}function WT(e){return e>=1024*1024*1024?`${Math.round(e/(1024*1024*1024)*10)/10} GB`:e>=1024*1024?`${Math.round(e/(1024*1024)*10)/10} MB`:e>=1024?`${Math.round(e/1024*10)/10} KB`:`${e} B`}function UT({id:e,label:t="Label",showLabel:n=!0,helperText:r="Help text",showHelpText:i=!0,error:a=!1,errorMessage:o="File extends size limit",disabled:s=!1,loading:l=!1,accept:c,uploadButtonLabel:u="Upload file",value:d,defaultValue:f=null,onChange:g,className:p,"aria-label":v}){const m=_.useId(),b=e??`dsn-attachment-field-${m}`,y=`${b}-helper`,x=_.useRef(null),k=d!==void 0,[w,S]=_.useState(f),N=k?d??null:w,[C,E]=_.useState(void 0);_.useEffect(()=>{if(!N||!N.type.startsWith("image/")){E(void 0);return}const M=URL.createObjectURL(N);return E(M),()=>URL.revokeObjectURL(M)},[N]);const T=a?o:r,O=_.useMemo(()=>N?WT(N.size):"",[N]);function P(M){k||S(M),g==null||g(M)}return h.jsxs("div",{className:["dsn-attachment-field",p].filter(Boolean).join(" "),"data-disabled":s||void 0,"data-error":a||void 0,children:[n&&h.jsx("p",{className:"dsn-attachment-field-label",children:t}),h.jsxs("div",{className:"dsn-attachment-field-control",children:[N?h.jsx(Wd,{fileName:N.name,fileSize:O,previewVariant:N.type.startsWith("image/")?"image":"file",previewSrc:C,loading:l,disabled:s,action:"remove",onRemove:s||l?void 0:()=>{P(null),x.current&&(x.current.value="")},"aria-label":N.name}):h.jsx(me,{variant:"secondary",size:"md",disabled:s,showLeadingIcon:!0,leadingIcon:h.jsx(PT,{size:16,"aria-hidden":"true"}),onClick:()=>{var M;return(M=x.current)==null?void 0:M.click()},"aria-label":v??u,children:u}),h.jsx("input",{ref:x,id:b,className:"dsn-attachment-field-native",type:"file",disabled:s,accept:c,"aria-label":v??u,"aria-describedby":i&&T?y:void 0,onChange:M=>{var L;const $=((L=M.target.files)==null?void 0:L[0])??null;P($)}})]}),i&&T&&h.jsx("p",{id:y,className:"dsn-attachment-field-helper",children:T})]})}const Ud=15,Ey=2*Math.PI*Ud,HT="70.7 23.6";function Ty({value:e,size:t="lg",label:n,className:r}){const i=e!==void 0,a=i?Math.min(100,Math.max(0,e)):void 0,o=i?Ey*(1-a/100):void 0,s=["dsn-progress-ring",r].filter(Boolean).join(" "),l=i?"progressbar":"status";return h.jsx("div",{role:l,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,"aria-label":n,"aria-live":"polite",className:s,"data-size":t,"data-mode":i?"determinate":"indeterminate",children:h.jsxs("svg",{viewBox:"0 0 36 36","aria-hidden":"true",focusable:"false",children:[i&&h.jsx("circle",{className:"dsn-progress-ring-track",cx:"18",cy:"18",r:Ud,fill:"none",strokeWidth:"3"}),h.jsx("circle",{className:"dsn-progress-ring-fill",cx:"18",cy:"18",r:Ud,fill:"none",strokeWidth:"3",strokeLinecap:"round",transform:"rotate(-90 18 18)",strokeDasharray:i?Ey:HT,strokeDashoffset:o})]})})}function qT({variant:e="file",descriptionPosition:t="outside",loading:n=!1,title:r="Title",metaData:i="Meta data",hasMetadata:a=!0,showDescription:o=!0,imageSrc:s,imageAlt:l="Attachment preview",action:c="remove",showActionOnHover:u=!1,onActionClick:d,className:f,"aria-label":g}){const p=["dsn-attachment-card",f].filter(Boolean).join(" "),v=c!=="none",m=c==="more"?`More options for ${r}`:`Remove ${r}`;return h.jsxs("article",{className:p,"data-variant":e,"data-description-position":t,"data-loading":n||void 0,"data-show-action-on-hover":u||void 0,"aria-label":g??r,children:[h.jsxs("div",{className:"dsn-attachment-card-thumbnail",children:[e==="picture"&&s?h.jsx("img",{src:s,alt:l,className:"dsn-attachment-card-image"}):null,e==="file"&&!n&&h.jsx("span",{className:"dsn-attachment-card-file-icon","aria-hidden":"true",children:h.jsx(ky,{size:32,strokeWidth:1.75})}),n&&h.jsx("span",{className:"dsn-attachment-card-loading",children:h.jsx(Ty,{size:"lg",label:`Loading ${r}`})}),v&&h.jsx(me,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:c==="more"?h.jsx(zd,{size:16,"aria-hidden":"true"}):h.jsx(Qn,{size:16,"aria-hidden":"true"}),className:"dsn-attachment-card-action",onClick:d,"aria-label":m,"aria-haspopup":c==="more"?"menu":void 0}),o&&t==="inside"&&h.jsxs("div",{className:"dsn-attachment-card-info dsn-attachment-card-info--inside",children:[h.jsx("p",{className:"dsn-attachment-card-title",children:r}),a&&h.jsx("p",{className:"dsn-attachment-card-meta",children:i})]})]}),o&&t==="outside"&&h.jsxs("div",{className:"dsn-attachment-card-info dsn-attachment-card-info--outside",children:[h.jsx("p",{className:"dsn-attachment-card-title",children:r}),a&&h.jsx("p",{className:"dsn-attachment-card-meta",children:i})]})]})}function My(e,t){if(typeof window>"u"||typeof document>"u")return t;const n=window.getComputedStyle(document.documentElement).getPropertyValue(e).trim(),r=Number.parseFloat(n);return Number.isFinite(r)?r:t}function KT(e,t,n){return n?e:e?`${e} ${t}`:t}function Hd({content:e,children:t,placement:n="top",delay:r=150,open:i,defaultOpen:a=!1,disabled:o=!1,className:s,id:l}){const c=_.useId(),u=l??`dsn-tooltip-${c}`,d=_.useRef(null),f=_.useRef(null),g=_.useRef(null),p=_.useRef(null),v=i!==void 0,[m,b]=_.useState(a),[y,x]=_.useState(null),k=o?!1:v?i:m,w=T=>{v||b(T)},S=()=>{p.current&&(clearTimeout(p.current),p.current=null)},N=()=>{o||(S(),p.current=setTimeout(()=>w(!0),r))},C=()=>{S(),w(!1)};_.useEffect(()=>()=>S(),[]),_.useEffect(()=>{if(!k)return;const T=O=>{O.key==="Escape"&&w(!1)};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[k]),_.useEffect(()=>{if(!k||!f.current||!g.current)return;const T=My("--space-small",8),O=My("--space-tiny",4),P=()=>{if(!f.current||!g.current)return;const L=f.current.getBoundingClientRect(),z=g.current.getBoundingClientRect(),j=z.width,B=z.height,H=L.left+L.width/2,F=L.top-B-O,D=F>=T,U=D?"top":"bottom",V=D?F:L.bottom+O,Y=Math.max(T,window.innerHeight-B-T),G=Math.min(Math.max(V,T),Y),R=H-j/2,te=Math.max(T,window.innerWidth-j-T),le=Math.min(Math.max(R,T),te);x({top:G,left:le,placement:U})};P();const M=window.requestAnimationFrame(P),$=typeof ResizeObserver<"u"?new ResizeObserver(()=>P()):null;return $&&($.observe(f.current),$.observe(g.current)),window.addEventListener("resize",P),window.addEventListener("scroll",P,!0),()=>{window.cancelAnimationFrame(M),$==null||$.disconnect(),window.removeEventListener("resize",P),window.removeEventListener("scroll",P,!0)}},[k]);const E=_.cloneElement(t,{"aria-describedby":KT(t.props["aria-describedby"],u,o)});return h.jsxs("span",{ref:d,className:["dsn-tooltip",s].filter(Boolean).join(" "),onMouseEnter:N,onMouseLeave:C,onFocus:N,onBlur:T=>{var P;const O=T.relatedTarget;O&&((P=d.current)!=null&&P.contains(O))||C()},children:[h.jsx("span",{ref:f,className:"dsn-tooltip-trigger",children:E}),h.jsx("span",{ref:g,id:u,role:"tooltip",className:"dsn-tooltip-bubble","data-placement":(y==null?void 0:y.placement)??n,hidden:!k,style:y?{top:y.top,left:y.left}:void 0,children:e})]})}function $y({value:e,label:t,className:n}){const r=Math.min(100,Math.max(0,e)),i=r===0?"0px":`calc(${r}% + 2px)`,a=["dsn-progress-bar",n].filter(Boolean).join(" ");return h.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r,"aria-label":t,className:a,children:h.jsx("div",{className:"dsn-progress-bar-track",children:h.jsx("div",{className:"dsn-progress-bar-fill",style:{width:i}})})})}function VT({fileName:e="File name",fileType:t="PDF",fileSize:n="10 Mb",previewVariant:r="image",previewSrc:i,state:a="default",uploadProgress:o=40,className:s,onCopyLink:l,onDownload:c,onCancelUpload:u,"aria-label":d}){const f=a==="uploading",g=["dsn-file-row",s].filter(Boolean).join(" ");return h.jsxs("article",{className:g,"data-state":a,"aria-label":d??e,children:[h.jsx("div",{className:"dsn-file-row-thumbnail",children:h.jsx(jd,{variant:r,imageSrc:i,size:"large","aria-label":`${r} preview`})}),h.jsxs("div",{className:"dsn-file-row-content",children:[h.jsxs("div",{className:"dsn-file-row-title-wrap",children:[h.jsx("p",{className:"dsn-file-row-title",children:e}),f&&h.jsx(me,{variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Qn,{size:16,"aria-hidden":"true"}),className:"dsn-file-row-action-btn","aria-label":`Cancel upload for ${e}`,onClick:u})]}),!f&&h.jsxs(h.Fragment,{children:[h.jsxs("p",{className:"dsn-file-row-meta",children:[h.jsx("span",{children:t}),h.jsx("span",{"aria-hidden":"true",children:"•"}),h.jsx("span",{children:n})]}),h.jsxs(Jr,{size:"sm",spaceBetween:!0,className:"dsn-file-row-actions","aria-label":`Actions for ${e}`,children:[h.jsx(Hd,{content:"Copy link",children:h.jsx(me,{variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Sy,{size:16,"aria-hidden":"true"}),className:"dsn-file-row-action-btn","aria-label":`Copy link for ${e}`,onClick:l})}),h.jsx(Hd,{content:"Download",children:h.jsx(me,{variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(wy,{size:16,"aria-hidden":"true"}),className:"dsn-file-row-action-btn","aria-label":`Download ${e}`,onClick:c})})]})]}),f&&h.jsx("div",{className:"dsn-file-row-progress",children:h.jsx($y,{value:o,label:`Uploading ${e}`})})]})]})}function qd({direction:e="horizontal",decorative:t=!1,className:n}){const r=["dsn-separator",n].filter(Boolean).join(" ");return e==="horizontal"?h.jsx("hr",{className:r,"data-direction":"horizontal","aria-hidden":t?!0:void 0}):h.jsx("div",{role:"separator","aria-orientation":"vertical",className:r,"data-direction":"vertical","aria-hidden":t?!0:void 0})}function YT({value:e,label:t,className:n}){const r=e!==void 0,i=r?Math.min(100,Math.max(0,e)):void 0,a=["dsn-loading-bar",n].filter(Boolean).join(" ");return h.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,"aria-label":t,"aria-live":"polite",className:a,"data-mode":r?"determinate":"indeterminate",children:h.jsx("div",{className:"dsn-loading-bar-fill",style:r?{width:`${i}%`}:void 0})})}function GT({type:e="avatar",className:t}){const n=["dsn-skeleton-loading",t].filter(Boolean).join(" ");return h.jsx("div",{className:n,"data-type":e,"aria-hidden":"true",children:h.jsx("div",{className:"dsn-skeleton-loading-glow"})})}function XT(){return h.jsx("svg",{width:"9",height:"7",viewBox:"0 0 9 7",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M0.625 3.125L3.125 5.625L8.125 0.625",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})}function ZT(){return h.jsx("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M0.5 1H7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}function Pn({size:e="md",checked:t=!1,indeterminate:n=!1,disabled:r=!1,label:i="Label",description:a="Description",descriptionRight:o="Assist label",showContent:s=!0,showLabel:l=!0,showDescription:c=!1,showDescriptionRight:u=!1,showAvatar:d=!1,avatarProps:f,showLeadingIcon:g=!1,leadingIcon:p,showTrailingIcon:v=!0,trailingIcon:m,showBadge:b=!1,badgeCount:y=1,badgeSize:x="sm",badgeVariant:k="critical",showTag:w=!1,tagLabel:S="Label",tagVariant:N="error",showButtons:C=!1,actionAriaLabel:E="Open actions",onActionClick:T,showSwitcherRight:O=!1,switcherChecked:P=!1,onSwitcherChange:M,onCheckedChange:$,className:L,"aria-label":z}){const j=["dsn-checkbox",L].filter(Boolean).join(" "),B=n?"mixed":t?"true":"false";function H(){r||$==null||$(!t)}function F(D){D.target===D.currentTarget&&D.key===" "&&(D.preventDefault(),H())}return h.jsxs("div",{className:j,"data-size":e,"data-has-content":s||void 0,"data-disabled":r||void 0,"data-checked":t||void 0,"data-indeterminate":n||void 0,role:"checkbox","aria-checked":B,"aria-disabled":r||void 0,"aria-label":z,tabIndex:r?-1:0,onClick:r?void 0:H,onKeyDown:F,children:[h.jsx("span",{className:"dsn-checkbox-indicator-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-checkbox-indicator",children:(t||n)&&h.jsx("span",{className:"dsn-checkbox-mark",children:n?h.jsx(ZT,{}):h.jsx(XT,{})})})}),s&&h.jsxs("span",{className:"dsn-checkbox-content",children:[d&&h.jsx("span",{className:"dsn-checkbox-avatar-wrap",children:h.jsx(Oi,{size:"xs",variant:"profile",fill:"initials",initials:"AC",name:"Avatar",...f})}),g&&h.jsx("span",{className:"dsn-checkbox-icon-wrap","aria-hidden":"true",children:p??h.jsx(Rn,{})}),l&&h.jsxs("span",{className:"dsn-checkbox-label-wrap",children:[h.jsx("span",{className:"dsn-checkbox-label",children:i}),c&&h.jsx("span",{className:"dsn-checkbox-description",children:a})]}),u&&h.jsx("span",{className:"dsn-checkbox-description-right",children:o}),b&&h.jsx("span",{className:"dsn-checkbox-badge-wrap",children:h.jsx(Do,{size:x,variant:k,count:y})}),w&&h.jsx("span",{className:"dsn-checkbox-tag-wrap",children:h.jsx(kr,{size:"sm",variant:N,label:S})}),v&&h.jsx("span",{className:"dsn-checkbox-icon-wrap","aria-hidden":"true",children:m??h.jsx(Rn,{})}),C&&h.jsx("span",{className:"dsn-checkbox-action-wrap",onClick:D=>D.stopPropagation(),onKeyDown:D=>D.stopPropagation(),children:h.jsx(me,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Rn,{}),"aria-label":E,onClick:D=>{D.stopPropagation(),T==null||T(D)}})}),O&&h.jsx("span",{className:"dsn-checkbox-switcher-wrap",onClick:D=>D.stopPropagation(),onKeyDown:D=>D.stopPropagation(),children:h.jsx(ka,{size:"sm",checked:P,disabled:r,"aria-label":"Toggle option",onChange:M})})]})]})}function Kd({size:e="md",checked:t=!1,disabled:n=!1,label:r="Label",description:i="Description",descriptionRight:a="Assist label",showContent:o=!0,showLabel:s=!0,showDescription:l=!1,showDescriptionRight:c=!1,showAvatar:u=!1,avatarProps:d,showLeadingIcon:f=!1,leadingIcon:g,showTrailingIcon:p=!0,trailingIcon:v,showBadge:m=!1,badgeCount:b=1,badgeSize:y="sm",badgeVariant:x="critical",showTag:k=!1,tagLabel:w="Label",tagVariant:S="error",showButtons:N=!1,actionAriaLabel:C="Open actions",onActionClick:E,showSwitcherRight:T=!1,switcherChecked:O=!1,onSwitcherChange:P,onCheckedChange:M,className:$,"aria-label":L}){const z=["dsn-radio",$].filter(Boolean).join(" ");function j(){n||t||M==null||M(!0)}function B(H){H.target===H.currentTarget&&H.key===" "&&(H.preventDefault(),j())}return h.jsxs("div",{className:z,"data-size":e,"data-has-content":o||void 0,"data-disabled":n||void 0,"data-checked":t||void 0,role:"radio","aria-checked":t?"true":"false","aria-disabled":n||void 0,"aria-label":L,tabIndex:n?-1:0,onClick:n?void 0:j,onKeyDown:B,children:[h.jsx("span",{className:"dsn-radio-indicator-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-radio-indicator",children:h.jsx("span",{className:"dsn-radio-dot"})})}),o&&h.jsxs("span",{className:"dsn-radio-content",children:[u&&h.jsx("span",{className:"dsn-radio-avatar-wrap",children:h.jsx(Oi,{size:"xs",variant:"profile",fill:"initials",initials:"AC",name:"Avatar",...d})}),f&&h.jsx("span",{className:"dsn-radio-icon-wrap","aria-hidden":"true",children:g??h.jsx(Rn,{})}),s&&h.jsxs("span",{className:"dsn-radio-label-wrap",children:[h.jsx("span",{className:"dsn-radio-label",children:r}),l&&h.jsx("span",{className:"dsn-radio-description",children:i})]}),c&&h.jsx("span",{className:"dsn-radio-description-right",children:a}),m&&h.jsx("span",{className:"dsn-radio-badge-wrap",children:h.jsx(Do,{size:y,variant:x,count:b})}),k&&h.jsx("span",{className:"dsn-radio-tag-wrap",children:h.jsx(kr,{size:"sm",variant:S,label:w})}),p&&h.jsx("span",{className:"dsn-radio-icon-wrap","aria-hidden":"true",children:v??h.jsx(Rn,{})}),N&&h.jsx("span",{className:"dsn-radio-action-wrap",onClick:H=>H.stopPropagation(),onKeyDown:H=>H.stopPropagation(),children:h.jsx(me,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Rn,{}),"aria-label":C,onClick:H=>{H.stopPropagation(),E==null||E(H)}})}),T&&h.jsx("span",{className:"dsn-radio-switcher-wrap",onClick:H=>H.stopPropagation(),onKeyDown:H=>H.stopPropagation(),children:h.jsx(ka,{size:"sm",checked:O,disabled:n,"aria-label":"Toggle option",onChange:P})})]})]})}function JT({id:e,label:t,placeholder:n,value:r,defaultValue:i,disabled:a=!1,error:o=!1,required:s=!1,helperText:l,errorMessage:c,maxLength:u,leadingIcon:d,trailingIcon:f,helperIcon:g,onChange:p,onBlur:v,onFocus:m,"aria-label":b,"aria-labelledby":y,autoComplete:x,name:k,className:w}){const S=_.useId(),N=e??`dsn-text-input-${S}`,C=`${N}-helper`,T=!!l||o&&!!c?C:void 0,[O,P]=_.useState(()=>(r??i??"").length),M=r!==void 0?r.length:O;function $(B){r===void 0&&P(B.target.value.length),p==null||p(B)}const L=!!l||o&&!!c||u!==void 0,z=f!=null&&u===void 0,j=o&&c?c:l;return h.jsxs("div",{className:`dsn-text-input${w?` ${w}`:""}`,"data-error":o||void 0,"data-disabled":a||void 0,children:[t&&h.jsxs("label",{className:"dsn-text-input-label",htmlFor:N,children:[t,s&&h.jsxs("span",{className:"dsn-text-input-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{className:"dsn-text-input-control",children:[d&&h.jsx("span",{className:"dsn-text-input-icon","aria-hidden":"true",children:d}),h.jsx("input",{type:"text",id:N,className:"dsn-text-input-field",placeholder:n,value:r,defaultValue:i,disabled:a,maxLength:u,"aria-invalid":o||void 0,"aria-required":s||void 0,"aria-describedby":T,"aria-label":b,"aria-labelledby":y,autoComplete:x,name:k,onChange:$,onBlur:v,onFocus:m}),z&&h.jsx("span",{className:"dsn-text-input-icon","aria-hidden":"true",children:f})]}),L&&h.jsxs("div",{className:"dsn-text-input-meta",children:[h.jsxs("div",{className:"dsn-text-input-helper-inner",children:[g&&h.jsx("span",{className:"dsn-text-input-icon","aria-hidden":"true",children:g}),j!==void 0&&h.jsx("p",{id:C,className:"dsn-text-input-helper",children:j})]}),u!==void 0&&h.jsxs("span",{className:"dsn-text-input-count","aria-live":"polite","aria-atomic":"true",children:[M,"/",u]})]})]})}function QT(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}function RT(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M8 3V13M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}function Vd(e,t,n){let r=e;return t!==void 0&&(r=Math.max(t,r)),n!==void 0&&(r=Math.min(n,r)),r}function Ai({id:e,label:t,placeholder:n,value:r,defaultValue:i,min:a,max:o,step:s=1,disabled:l=!1,error:c=!1,required:u=!1,helperText:d,errorMessage:f,helperIcon:g,onChange:p,onBlur:v,onFocus:m,"aria-label":b,"aria-labelledby":y,name:x,className:k}){const w=_.useId(),S=e??`dsn-number-input-${w}`,N=`${S}-helper`,E=!!d||c&&!!f?N:void 0,[T,O]=_.useState(()=>i!==void 0?String(i):""),P=r!==void 0?String(r):T,M=r!==void 0?r:T!==""?parseFloat(T):NaN,$=l||a!==void 0&&!isNaN(M)&&M<=a,L=l||o!==void 0&&!isNaN(M)&&M>=o;function z(U){const V=U.target.value;if(r===void 0&&O(V),V===""||V==="-")p==null||p(null);else{const Y=parseFloat(V);isNaN(Y)||p==null||p(Y)}}function j(U){const V=parseFloat(P);if(!isNaN(V)){const Y=Vd(V,a,o);if(Y!==V){const G=String(Y);r===void 0&&O(G),p==null||p(Y)}}v==null||v(U)}function B(){if(l||$)return;const U=isNaN(M)?a??0:M,V=Vd(U-s,a,o);r===void 0&&O(String(V)),p==null||p(V)}function H(){if(l||L)return;const U=isNaN(M)?a??0:M,V=Vd(U+s,a,o);r===void 0&&O(String(V)),p==null||p(V)}const F=!!d||c&&!!f,D=c&&f?f:d;return h.jsxs("div",{className:`dsn-number-input${k?` ${k}`:""}`,"data-error":c||void 0,"data-disabled":l||void 0,children:[t&&h.jsxs("label",{className:"dsn-number-input-label",htmlFor:S,children:[t,u&&h.jsxs("span",{className:"dsn-number-input-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{className:"dsn-number-input-control",children:[h.jsx("input",{type:"text",inputMode:"numeric",id:S,className:"dsn-number-input-field",value:P,placeholder:n,disabled:l,name:x,"aria-invalid":c||void 0,"aria-required":u||void 0,"aria-describedby":E,"aria-label":b,"aria-labelledby":y,onChange:z,onBlur:j,onFocus:m}),h.jsxs("div",{className:"dsn-number-input-stepper",role:"group","aria-label":"Adjust value",children:[h.jsx("button",{type:"button",className:"dsn-number-input-btn","aria-label":"Decrease value",disabled:$,onClick:B,tabIndex:l?-1:void 0,children:h.jsx(QT,{})}),h.jsx("button",{type:"button",className:"dsn-number-input-btn","aria-label":"Increase value",disabled:L,onClick:H,tabIndex:l?-1:void 0,children:h.jsx(RT,{})})]})]}),F&&h.jsx("div",{className:"dsn-number-input-meta",children:h.jsxs("div",{className:"dsn-number-input-helper-inner",children:[g&&h.jsx("span",{className:"dsn-number-input-icon","aria-hidden":"true",children:g}),D!==void 0&&h.jsx("p",{id:N,className:"dsn-number-input-helper",children:D})]})})]})}function eM(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("rect",{x:"2.5",y:"7.5",width:"11",height:"7",rx:"1.5",stroke:"currentColor",strokeWidth:"1.25"}),h.jsx("path",{d:"M5.5 7.5V5.5a2.5 2.5 0 0 1 5 0v2",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"})]})}function tM(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M1.5 8C2.5 5.5 5 3.5 8 3.5S13.5 5.5 14.5 8 12 12.5 8 12.5 2.5 10.5 1.5 8Z",stroke:"currentColor",strokeWidth:"1.25"}),h.jsx("circle",{cx:"8",cy:"8",r:"2",stroke:"currentColor",strokeWidth:"1.25"})]})}function nM(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M2 2.5L14 13.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M6.5 6.8A2 2 0 0 0 8 10a2 2 0 0 0 1.5-.7M4.2 4.7C2.7 5.8 1.5 8 1.5 8s2 4.5 6.5 4.5c1.2 0 2.2-.3 3-.8M8 3.5c4 0 6.5 4.5 6.5 4.5s-.5 1-1.5 2",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}function rM({id:e,label:t,placeholder:n,value:r,defaultValue:i,disabled:a=!1,error:o=!1,required:s=!1,helperText:l,errorMessage:c,helperIcon:u,trailingIcon:d,labelAction:f,autoComplete:g="current-password",name:p,className:v,onChange:m,onBlur:b,onFocus:y,"aria-label":x,"aria-labelledby":k}){const w=_.useId(),S=e??`dsn-password-input-${w}`,N=`${S}-helper`,[C,E]=_.useState(!1),T=o&&c?c:l,O=!!l||o&&!!c,P=O?N:void 0,M=O;return h.jsxs("div",{className:`dsn-password-input${v?` ${v}`:""}`,"data-error":o||void 0,"data-disabled":a||void 0,children:[t&&h.jsxs("div",{className:"dsn-password-input-label-row",children:[h.jsxs("label",{className:"dsn-password-input-label",htmlFor:S,children:[t,s&&h.jsxs("span",{className:"dsn-password-input-required","aria-hidden":"true",children:[" ","*"]})]}),f&&h.jsx("span",{className:"dsn-password-input-label-action",children:f})]}),h.jsxs("div",{className:"dsn-password-input-control",children:[h.jsx("span",{className:"dsn-password-input-lock","aria-hidden":"true",children:h.jsx(eM,{})}),h.jsx("input",{type:C?"text":"password",id:S,className:"dsn-password-input-field",placeholder:n,value:r,defaultValue:i,disabled:a,"aria-invalid":o||void 0,"aria-required":s||void 0,"aria-describedby":P,"aria-label":x,"aria-labelledby":k,autoComplete:g,name:p,onChange:m,onBlur:b,onFocus:y}),d&&h.jsx("span",{className:"dsn-password-input-trailing","aria-hidden":"true",children:d}),h.jsx("button",{type:"button",className:"dsn-password-input-toggle","aria-label":C?"Hide password":"Show password","aria-pressed":C,onClick:()=>E($=>!$),disabled:a,tabIndex:a?-1:void 0,children:C?h.jsx(nM,{}):h.jsx(tM,{})})]}),M&&h.jsx("div",{className:"dsn-password-input-meta",children:h.jsxs("div",{className:"dsn-password-input-helper-inner",children:[u&&h.jsx("span",{className:"dsn-password-input-icon","aria-hidden":"true",children:u}),h.jsx("p",{id:N,className:"dsn-password-input-helper",children:T})]})})]})}function iM(){return h.jsx("span",{className:"dsn-pw-req-radio","aria-hidden":"true"})}function aM(){return h.jsxs("svg",{className:"dsn-pw-req-check",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("circle",{cx:"8",cy:"8",r:"6.5",fill:"var(--surface-toggle-on)"}),h.jsx("path",{d:"M5.5 8.5l1.75 1.75L10.5 6.5",stroke:"white",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function oM({label:e,met:t,className:n}){return h.jsxs("div",{className:`dsn-pw-requirement${n?` ${n}`:""}`,"data-met":t||void 0,role:"status","aria-label":`${e}: ${t?"satisfied":"not satisfied"}`,children:[t?h.jsx(aM,{}):h.jsx(iM,{}),h.jsx("span",{className:"dsn-pw-requirement-label",children:e})]})}function sM({length:e=6,value:t,defaultValue:n,status:r="idle",disabled:i=!1,label:a,labelAction:o,helperText:s,helperIcon:l,errorMessage:c,onChange:u,onComplete:d,"aria-label":f,className:g}){const m=`${`dsn-otp-${_.useId()}`}-status`,[b,y]=_.useState(()=>{const M=(t??n??"").slice(0,e);return Array.from({length:e},($,L)=>M[L]??"")});_.useEffect(()=>{t!==void 0&&y(Array.from({length:e},(M,$)=>t[$]??""))},[t,e]);const x=_.useRef([]),k=!i&&r!=="verifying"&&r!=="correct";function w(M){y(M);const $=M.join("");u==null||u($),M.every(L=>L!=="")&&(d==null||d($))}function S(M,$){var B;const z=$.target.value.replace(/[^0-9]/g,"").slice(-1),j=[...b];j[M]=z,w(j),z&&M<e-1&&((B=x.current[M+1])==null||B.focus())}function N(M,$){var L,z,j;if($.key==="Backspace"){$.preventDefault();const B=[...b];B[M]?(B[M]="",w(B)):M>0&&(B[M-1]="",w(B),(L=x.current[M-1])==null||L.focus())}else $.key==="ArrowLeft"&&M>0?($.preventDefault(),(z=x.current[M-1])==null||z.focus()):$.key==="ArrowRight"&&M<e-1&&($.preventDefault(),(j=x.current[M+1])==null||j.focus())}function C(M){M.target.select()}function E(M){var H;M.preventDefault();const $=M.clipboardData.getData("text").replace(/[^0-9]/g,"").slice(0,e);if(!$)return;const L=[...b];for(let F=0;F<$.length;F++)L[F]=$[F];y(L);const z=L.join("");u==null||u(z);const j=L.findIndex(F=>F===""),B=j===-1?e-1:j;(H=x.current[B])==null||H.focus(),L.every(F=>F!=="")&&(d==null||d(z))}function T(){return r==="verifying"?"Verifying code…":r==="correct"?"Verification successful":r==="error"?c??"Verification failed":""}const O=r==="error"&&c?c:s,P=!!O;return h.jsxs("div",{className:`dsn-otp${g?` ${g}`:""}`,"data-status":r!=="idle"?r:void 0,"data-disabled":i||void 0,children:[(a||o)&&h.jsxs("div",{className:"dsn-otp-label-row",children:[a&&h.jsx("span",{className:"dsn-otp-label",children:a}),o&&h.jsx("span",{className:"dsn-otp-label-action",children:o})]}),h.jsx("div",{className:"dsn-otp-stack",role:"group","aria-label":f??`Enter ${e}-digit verification code`,"aria-describedby":r!=="idle"?m:void 0,children:b.map((M,$)=>h.jsx("input",{ref:L=>{x.current[$]=L},className:"dsn-otp-cell",type:"text",inputMode:"numeric",pattern:"[0-9]*",autoComplete:$===0?"one-time-code":"off",maxLength:1,value:M,disabled:!k,"aria-label":`Digit ${$+1} of ${e}`,onChange:L=>S($,L),onKeyDown:L=>N($,L),onFocus:C,onPaste:E},$))}),h.jsx("div",{id:m,role:"status","aria-live":"polite","aria-atomic":"true",className:"dsn-otp-sr-only",children:T()}),P&&h.jsxs("div",{className:"dsn-otp-helper-row",children:[l&&h.jsx("span",{className:"dsn-otp-helper-icon","aria-hidden":"true",children:l}),h.jsx("p",{className:"dsn-otp-helper",children:O})]})]})}const Oy=[{label:"United States (+1)",value:"+1"},{label:"Portugal (+351)",value:"+351"},{label:"United Kingdom (+44)",value:"+44"},{label:"Germany (+49)",value:"+49"}];function zl(e){return e.replace(/\s+/g,"").replace(/^\+/,"")}function lM(e,t){const n=e.trim();if(!n.startsWith("+"))return null;const i=n.replace(/[^\d+]/g,"").slice(1);if(!i)return null;const o=[...t].sort((l,c)=>zl(c.value).length-zl(l.value).length).find(l=>i.startsWith(zl(l.value)));if(!o)return null;const s=i.slice(zl(o.value).length);return{countryCode:o.value,localNumber:s}}function cM({id:e,label:t,placeholder:n="1234567890",value:r,defaultValue:i,disabled:a=!1,error:o=!1,required:s=!1,helperText:l,errorMessage:c,helperIcon:u,countryCode:d,defaultCountryCode:f="+1",countryOptions:g=Oy,onChange:p,onCountryCodeChange:v,onBlur:m,onFocus:b,"aria-label":y,"aria-labelledby":x,countryCodeAriaLabel:k="Country code",autoComplete:w="tel",name:S,className:N}){const C=_.useId(),E=e??`dsn-phone-input-${C}`,T=`${E}-helper`,O=`${E}-country-menu`,[P,M]=_.useState(f),$=d??P,[L,z]=_.useState(i??""),j=r??L,[B,H]=_.useState(!1),F=_.useRef(null),D=_.useRef(null),U=_.useRef([]),[V,Y]=_.useState(-1),G=o&&c?c:l,te=!!l||o&&!!c?T:void 0,le=_.useMemo(()=>g.length===0?Oy:g,[g]);function W(Q=!1){const de=le.findIndex(ne=>ne.value===$);return de>=0?de:le.length===0?-1:Q?le.length-1:0}function Z(Q,de){return le.length===0?-1:(Q+de+le.length)%le.length}function I(Q){d===void 0&&M(Q),v==null||v(Q)}function A(Q){r===void 0&&z(Q.target.value),p==null||p(Q)}function q(Q){const de=lM(Q.clipboardData.getData("text"),le);de&&(Q.preventDefault(),I(de.countryCode??$),r===void 0&&z(de.localNumber))}return _.useEffect(()=>{const Q=de=>{!F.current||!B||F.current.contains(de.target)||H(!1)};return document.addEventListener("mousedown",Q),()=>document.removeEventListener("mousedown",Q)},[B]),_.useEffect(()=>{var de;if(!B||a){Y(-1);return}const Q=W();Y(Q),Q>=0&&((de=U.current[Q])==null||de.focus())},[$,a,B,le]),h.jsxs("div",{ref:F,className:`dsn-phone-input${N?` ${N}`:""}`,"data-error":o||void 0,"data-disabled":a||void 0,children:[t&&h.jsxs("label",{className:"dsn-phone-input-label",htmlFor:E,children:[t,s&&h.jsxs("span",{className:"dsn-phone-input-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{className:"dsn-phone-input-control",role:"group","aria-label":"Phone number",children:[h.jsxs("span",{className:"dsn-phone-input-country-wrap",children:[h.jsxs("button",{ref:D,type:"button",className:"dsn-phone-input-country-visual",disabled:a,"aria-label":k,"aria-haspopup":"menu","aria-expanded":B,"aria-controls":B?O:void 0,onClick:()=>H(Q=>!Q),onKeyDown:Q=>{(Q.key==="Enter"||Q.key===" "||Q.key==="ArrowDown")&&(Q.preventDefault(),H(!0)),Q.key==="ArrowUp"&&(Q.preventDefault(),Y(W(!0)),H(!0)),Q.key==="Escape"&&H(!1)},children:[h.jsx("span",{className:"dsn-phone-input-country-code",children:$}),h.jsx("span",{className:"dsn-phone-input-country-chevron","aria-hidden":"true",children:h.jsx(wr,{size:16,strokeWidth:1.5,"aria-hidden":"true"})})]}),B&&!a&&h.jsx(Sr,{role:"menu","aria-label":`${k} options`,className:"dsn-phone-input-country-popover",contentClassName:"dsn-phone-input-country-popover-content",contentPadding:"small",anchorRef:D,offset:4,viewportMargin:16,matchAnchorWidth:!0,content:h.jsx("div",{id:O,children:le.map((Q,de)=>h.jsx(Pi,{ref:ne=>{U.current[de]=ne},tabIndex:V===de?0:-1,onKeyDown:ne=>{var he,xe,Ye,Ge,ut;if(ne.key==="ArrowDown"){ne.preventDefault();const je=Z(V>=0?V:W(),1);Y(je),(he=U.current[je])==null||he.focus();return}if(ne.key==="ArrowUp"){ne.preventDefault();const je=Z(V>=0?V:W(!0),-1);Y(je),(xe=U.current[je])==null||xe.focus();return}if(ne.key==="Home"){ne.preventDefault(),Y(0),(Ye=U.current[0])==null||Ye.focus();return}if(ne.key==="End"){ne.preventDefault();const je=le.length-1;Y(je),(Ge=U.current[je])==null||Ge.focus();return}ne.key==="Escape"&&(ne.preventDefault(),H(!1),(ut=D.current)==null||ut.focus())},className:"dsn-phone-input-country-option",label:Q.label,showLeadingIcon:!1,showTrailingIcon:$===Q.value,selected:$===Q.value,"aria-label":Q.label,onClick:()=>{var ne;I(Q.value),H(!1),(ne=D.current)==null||ne.focus()}},Q.value))})})]}),h.jsx("input",{type:"tel",id:E,className:"dsn-phone-input-field",placeholder:n,value:j,defaultValue:i,disabled:a,name:S,autoComplete:w,"aria-invalid":o||void 0,"aria-required":s||void 0,"aria-describedby":te,"aria-label":y,"aria-labelledby":x,onChange:A,onPaste:q,onBlur:m,onFocus:b})]}),G&&h.jsx("div",{className:"dsn-phone-input-meta",children:h.jsxs("div",{className:"dsn-phone-input-helper-inner",children:[u&&h.jsx("span",{className:"dsn-phone-input-icon","aria-hidden":"true",children:u}),h.jsx("p",{id:T,className:"dsn-phone-input-helper",children:G})]})})]})}function uM({error:e=!1}){return e?h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M8 5V8M8 11H8.01M14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8C2 4.68629 4.68629 2 8 2C11.3137 2 14 4.68629 14 8Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}):h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M8 2.5L13.5 8L8 13.5L2.5 8L8 2.5Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinejoin:"round"})})}function dM({id:e,label:t,placeholder:n="Placeholder",value:r,defaultValue:i,disabled:a=!1,error:o=!1,required:s=!1,helperText:l,errorMessage:c,maxLength:u,minRows:d=3,helperIcon:f,leadingIcon:g,onChange:p,onBlur:v,onFocus:m,"aria-label":b,"aria-labelledby":y,autoComplete:x,name:k,className:w}){const S=_.useId(),N=e??`dsn-text-area-${S}`,C=`${N}-helper`,[E,T]=_.useState(()=>(r??i??"").length),O=r!==void 0?r.length:E,P=o&&c?c:l,M=!!l||o&&!!c,$=M||u!==void 0,L=M?C:void 0,z=f??(M?h.jsx(uM,{error:o}):null);function j(B){r===void 0&&T(B.target.value.length),p==null||p(B)}return h.jsxs("div",{className:`dsn-text-area${w?` ${w}`:""}`,"data-error":o||void 0,"data-disabled":a||void 0,children:[t&&h.jsxs("label",{className:"dsn-text-area-label",htmlFor:N,children:[t,s&&h.jsxs("span",{className:"dsn-text-area-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{className:"dsn-text-area-control",children:[g&&h.jsx("span",{className:"dsn-text-area-leading-icon","aria-hidden":"true",children:g}),h.jsx("textarea",{id:N,className:"dsn-text-area-field",rows:d,placeholder:n,value:r,defaultValue:i,disabled:a,maxLength:u,"aria-invalid":o||void 0,"aria-required":s||void 0,"aria-describedby":L,"aria-label":b,"aria-labelledby":y,autoComplete:x,name:k,onChange:j,onBlur:v,onFocus:m})]}),$&&h.jsxs("div",{className:"dsn-text-area-meta",children:[h.jsxs("div",{className:"dsn-text-area-helper-inner",children:[z&&h.jsx("span",{className:"dsn-text-area-helper-icon","aria-hidden":"true",children:z}),P&&h.jsx("p",{id:C,className:"dsn-text-area-helper",children:P})]}),u!==void 0&&h.jsxs("span",{className:"dsn-text-area-count","aria-live":"polite","aria-atomic":"true",children:[O,"/",u]})]})]})}function fM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M11.5 11.5L14 14M12.6667 7.33333C12.6667 10.2789 10.2789 12.6667 7.33333 12.6667C4.38781 12.6667 2 10.2789 2 7.33333C2 4.38781 4.38781 2 7.33333 2C10.2789 2 12.6667 4.38781 12.6667 7.33333Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function hM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M11.5 4.5L4.5 11.5M4.5 4.5L11.5 11.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Py({id:e,variant:t="default",label:n="Label",placeholder:r="Search",value:i,defaultValue:a,disabled:o=!1,error:s=!1,helperText:l="Help text",errorMessage:c,maxLength:u,required:d=!1,helperIcon:f,onChange:g,onFocus:p,onBlur:v,onClear:m,className:b,name:y,autoComplete:x,"aria-label":k,"aria-labelledby":w}){const S=_.useId(),N=e??`dsn-search-bar-${S}`,C=`${N}-helper`,[E,T]=_.useState(()=>(i??a??"").length),O=i!==void 0,P=i??void 0,M=(i??"").length,$=O?M:E,L=O?M>0:E>0,j=t==="default"&&(!!l||s&&!!c||u!==void 0||s&&!!c),B=s&&c?c:l,H=["dsn-search-bar",b].filter(Boolean).join(" ");function F(U){O||T(U.target.value.length),g==null||g(U)}function D(){if(!O){T(0);const U=document.getElementById(N);U&&(U.value="",U.focus())}m==null||m()}return h.jsxs("div",{className:H,"data-variant":t,"data-error":s||void 0,"data-disabled":o||void 0,children:[t==="default"&&h.jsxs("label",{className:"dsn-search-bar-label",htmlFor:N,children:[n,d&&h.jsxs("span",{className:"dsn-search-bar-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{className:"dsn-search-bar-control",children:[h.jsx("span",{className:"dsn-search-bar-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-search-bar-icon",children:h.jsx(fM,{})})}),h.jsx("span",{className:"dsn-search-bar-label-wrap",children:h.jsx("input",{id:N,type:"search",className:"dsn-search-bar-field",placeholder:r,value:P,defaultValue:a,disabled:o,maxLength:u,name:y,autoComplete:x,"aria-invalid":s||void 0,"aria-required":d||void 0,"aria-describedby":j?C:void 0,"aria-label":k,"aria-labelledby":w,onChange:F,onFocus:p,onBlur:v})}),L&&!o&&h.jsx("span",{className:"dsn-search-bar-icon-wrap dsn-search-bar-clear",children:h.jsx("button",{type:"button",className:"dsn-search-bar-clear-btn","aria-label":"Clear search",onClick:D,children:h.jsx("span",{className:"dsn-search-bar-icon","aria-hidden":"true",children:h.jsx(hM,{})})})})]}),j&&h.jsxs("div",{className:"dsn-search-bar-meta",children:[h.jsxs("div",{className:"dsn-search-bar-helper-inner",children:[f&&h.jsx("span",{className:"dsn-search-bar-helper-icon","aria-hidden":"true",children:f}),B!==void 0&&h.jsx("p",{id:C,className:"dsn-search-bar-helper",children:B})]}),u!==void 0&&h.jsxs("span",{className:"dsn-search-bar-count","aria-live":"polite","aria-atomic":"true",children:[$,"/",u]})]})]})}const pM=[{value:"placeholder-a",label:"Placeholder A"},{value:"placeholder-b",label:"Placeholder B"},{value:"placeholder-c",label:"Placeholder C"},{value:"placeholder-d",label:"Placeholder D"}];function gM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function vM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M8 2.5L13.5 8L8 13.5L2.5 8L8 2.5Z",stroke:"currentColor",strokeWidth:"1.5"})})}function mM({id:e,label:t="Label",placeholder:n="Placeholder",options:r=pM,value:i,defaultValue:a,open:o,defaultOpen:s=!1,disabled:l=!1,error:c=!1,helperText:u="Help text",errorMessage:d,required:f=!1,helperIcon:g,className:p,name:v,onChange:m,onOpenChange:b,"aria-label":y,"aria-labelledby":x}){const k=_.useId(),w=e??`dsn-select-${k}`,S=`${w}-menu`,N=`${w}-helper`,C=`${w}-label`,E=i!==void 0,[T,O]=_.useState(a??""),P=E?i:T,M=o!==void 0,[$,L]=_.useState(s),z=M?o:$,j=_.useRef(null),B=_.useRef(null),H=_.useRef(null),F=_.useRef([]),[D,U]=_.useState(-1),V=_.useMemo(()=>r.find(W=>W.value===P),[r,P]),Y=c&&d?d:u,G=_.useCallback((W,Z)=>{var A;if(r.length===0)return-1;let I=W;for(let q=0;q<r.length;q+=1)if(I=(I+Z+r.length)%r.length,!((A=r[I])!=null&&A.disabled))return I;return-1},[r]),R=_.useCallback((W=!1)=>{var I;if(r.length===0)return-1;const Z=r.findIndex(A=>A.value===P&&!A.disabled);if(Z>=0)return Z;if(W){for(let A=r.length-1;A>=0;A-=1)if(!((I=r[A])!=null&&I.disabled))return A;return-1}return r.findIndex(A=>!A.disabled)},[r,P]),te=_.useCallback(W=>{M||L(W),b==null||b(W)},[M,b]);function le(W){var Z;W.disabled||l||(E||O(W.value),m==null||m(W.value,W),te(!1),(Z=H.current)==null||Z.focus())}return _.useEffect(()=>{function W(Z){j.current&&(j.current.contains(Z.target)||te(!1))}return document.addEventListener("mousedown",W),()=>{document.removeEventListener("mousedown",W)}},[te]),_.useEffect(()=>{var Z;if(!z||l){U(-1);return}const W=R();U(W),W>=0&&((Z=F.current[W])==null||Z.focus())},[l,R,z]),h.jsxs("div",{ref:j,className:["dsn-select",p].filter(Boolean).join(" "),"data-disabled":l||void 0,"data-error":c||void 0,"data-open":z||void 0,children:[h.jsxs("label",{className:"dsn-select-label",id:C,htmlFor:w,children:[t,f&&h.jsxs("span",{className:"dsn-select-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{ref:B,className:"dsn-select-control-wrap",children:[h.jsxs("button",{ref:H,id:w,type:"button",className:"dsn-select-control",disabled:l,"aria-haspopup":"menu","aria-expanded":z,"aria-controls":z?S:void 0,"aria-label":y,"aria-labelledby":x??C,"aria-invalid":c||void 0,"aria-required":f||void 0,"aria-describedby":Y?N:void 0,onClick:()=>te(!z),onKeyDown:W=>{(W.key==="ArrowDown"||W.key==="ArrowUp"||W.key==="Enter"||W.key===" ")&&(W.preventDefault(),W.key==="ArrowUp"&&U(R(!0)),te(!0)),W.key==="Escape"&&te(!1)},children:[h.jsx("span",{className:"dsn-select-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-select-icon",children:h.jsx(vM,{})})}),h.jsx("span",{className:"dsn-select-label-wrap",children:h.jsx("span",{className:"dsn-select-value","data-placeholder":!V||void 0,children:(V==null?void 0:V.label)??n})}),h.jsx("span",{className:"dsn-select-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-select-icon",children:h.jsx(gM,{})})})]}),z&&!l&&h.jsx(Sr,{role:"menu","aria-label":`${t} options`,className:"dsn-select-popover",contentClassName:"dsn-select-popover-stack",contentPadding:"small",anchorRef:B,offset:4,viewportMargin:16,matchAnchorWidth:!0,content:h.jsx("div",{id:S,children:r.map((W,Z)=>h.jsx(Pi,{tabIndex:D===Z?0:-1,onKeyDown:I=>{var A,q,Q,de,ne,he;if(I.key==="ArrowDown"){I.preventDefault();const xe=G(D>=0?D:R(),1);U(xe),xe>=0&&((A=F.current[xe])==null||A.focus());return}if(I.key==="ArrowUp"){I.preventDefault();const xe=G(D>=0?D:R(!0),-1);U(xe),xe>=0&&((q=F.current[xe])==null||q.focus());return}if(I.key==="Home"){I.preventDefault();const xe=r.findIndex(Ye=>!Ye.disabled);U(xe),xe>=0&&((Q=F.current[xe])==null||Q.focus());return}if(I.key==="End"){I.preventDefault();let xe=-1;for(let Ye=r.length-1;Ye>=0;Ye-=1)if(!((de=r[Ye])!=null&&de.disabled)){xe=Ye;break}U(xe),xe>=0&&((ne=F.current[xe])==null||ne.focus());return}I.key==="Escape"&&(I.preventDefault(),te(!1),(he=H.current)==null||he.focus())},ref:I=>{F.current[Z]=I},className:"dsn-select-option",label:W.label,description:W.description,showDescription:!!W.description,showLeadingIcon:!0,showTrailingIcon:P===W.value,selected:P===W.value,disabled:W.disabled,onClick:()=>le(W),"aria-label":W.label},W.value))})})]}),v&&h.jsx("input",{type:"hidden",name:v,value:P??""}),Y&&h.jsxs("div",{className:"dsn-select-meta",children:[g&&h.jsx("span",{className:"dsn-select-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-select-meta-icon",children:g})}),h.jsx("p",{id:N,className:"dsn-select-helper",children:Y})]})]})}const yM=[{value:"placeholder-a",label:"Label A"},{value:"placeholder-b",label:"Label B"},{value:"placeholder-c",label:"Label C"},{value:"placeholder-d",label:"Label D"}];function Ay({selectionMode:e="single",id:t,label:n="Label",showLabel:r=!0,placeholder:i="Placeholder",options:a=yM,value:o,defaultValue:s,values:l,defaultValues:c=[],open:u,defaultOpen:d=!1,disabled:f=!1,error:g=!1,helperText:p="Help text",showHelper:v=!0,errorMessage:m,required:b=!1,helperIcon:y,className:x,name:k,onChange:w,onValuesChange:S,onOpenChange:N,onInputChange:C,confirmLabel:E="Confirm","aria-label":T,"aria-labelledby":O}){const P=e==="multi",M=_.useId(),$=t??`dsn-combobox-${M}`,L=`${$}-listbox`,z=`${$}-helper`,j=`${$}-label`,B=o!==void 0,[H,F]=_.useState(s??""),D=B?o:H,U=_.useMemo(()=>a.find(ae=>ae.value===D),[a,D]),V=l!==void 0,[Y,G]=_.useState(c),R=_.useMemo(()=>(V?l??[]:Y).filter(ae=>a.some(ve=>ve.value===ae)),[Y,V,a,l]),te=_.useMemo(()=>new Set(R),[R]),[le,W]=_.useState(R),Z=_.useMemo(()=>new Set(le),[le]),I=_.useMemo(()=>a.filter(ae=>te.has(ae.value)),[te,a]),[A,q]=_.useState(P?"":(U==null?void 0:U.label)??"");_.useEffect(()=>{P||q((U==null?void 0:U.label)??"")},[P,U==null?void 0:U.label]),_.useEffect(()=>{if(P&&!V){const ae=Y.filter(ve=>a.some(ge=>ge.value===ve));ae.length!==Y.length&&G(ae)}},[Y,P,V,a]);const Q=u!==void 0,[de,ne]=_.useState(d),he=Q?u:de,xe=_.useRef(null),Ye=_.useRef(null),Ge=_.useRef(null),ut=_.useRef(!1),je=_.useRef([]),[We,nt]=_.useState(-1),rt=g&&m?m:p,mt=A.trim().toLowerCase(),$e=_.useMemo(()=>mt.length===0?a:a.filter(ae=>ae.label.toLowerCase().includes(mt)),[mt,a]),Ct=_.useCallback((ae,ve)=>{var Ne;if($e.length===0)return-1;let ge=ae;for(let bt=0;bt<$e.length;bt+=1)if(ge=(ge+ve+$e.length)%$e.length,!((Ne=$e[ge])!=null&&Ne.disabled))return ge;return-1},[$e]),At=_.useCallback((ae=!1)=>{var ge;if($e.length===0)return-1;const ve=$e.findIndex(Ne=>Ne.value===D&&!Ne.disabled);if(ve>=0)return ve;if(ae){for(let Ne=$e.length-1;Ne>=0;Ne-=1)if(!((ge=$e[Ne])!=null&&ge.disabled))return Ne;return-1}return $e.findIndex(Ne=>!Ne.disabled)},[$e,D]),Re=_.useCallback(ae=>{Q||ne(ae),N==null||N(ae)},[Q,N]),Yr=_.useCallback(ae=>{const ve=new Set(ae);return a.filter(ge=>ve.has(ge.value)).map(ge=>ge.value)},[a]),Xn=_.useCallback(()=>{if(!P)return;const ae=Yr(le);V||G(ae),S==null||S(ae,a.filter(ve=>ae.includes(ve.value)))},[P,V,Yr,S,a,le]),Vt=_.useCallback(()=>{Xn(),Re(!1)},[Xn,Re]),pe=_.useCallback(ae=>{W(ve=>ve.includes(ae)?ve.filter(ge=>ge!==ae):[...ve,ae])},[]),Pe=_.useCallback(ae=>{const ve=R.filter(ge=>ge!==ae);V||G(ve),S==null||S(ve,a.filter(ge=>ve.includes(ge.value))),he&&W(ge=>ge.filter(Ne=>Ne!==ae))},[R,he,V,S,a]);function Et(ae){var ve;ae.disabled||f||(B||F(ae.value),q(ae.label),C==null||C(ae.label),w==null||w(ae.value,ae),Re(!1),ut.current=!0,(ve=Ge.current)==null||ve.focus())}function yt(){var ae,ve;if(P){q(""),C==null||C(""),Re(!0),(ae=Ge.current)==null||ae.focus();return}B||F(""),q(""),C==null||C(""),Re(!0),(ve=Ge.current)==null||ve.focus()}return _.useEffect(()=>{function ae(ve){xe.current&&(xe.current.contains(ve.target)||Re(!1))}return document.addEventListener("mousedown",ae),()=>{document.removeEventListener("mousedown",ae)}},[Re]),_.useEffect(()=>{if(!he||f){nt(-1);return}nt(At())},[f,At,he]),_.useEffect(()=>{P&&he&&W(R)},[R,P,he]),h.jsxs("div",{ref:xe,className:["dsn-combobox",x].filter(Boolean).join(" "),"data-disabled":f||void 0,"data-error":g||void 0,"data-open":he||void 0,"data-filled":(P?I.length>0:!!U)||void 0,children:[r&&h.jsxs("label",{className:"dsn-combobox-label",id:j,htmlFor:$,children:[n,b&&h.jsxs("span",{className:"dsn-combobox-required","aria-hidden":"true",children:[" ","*"]})]}),P&&I.length>0&&h.jsx("div",{className:"dsn-combobox-chip-stack",children:I.map(ae=>h.jsx(Io,{size:"md",label:ae.label,showLeadingIcon:!1,showTrailingIcon:!1,onDismiss:()=>Pe(ae.value)},ae.value))}),h.jsxs("div",{ref:Ye,className:"dsn-combobox-control-wrap",children:[h.jsx("div",{className:"dsn-combobox-control",children:h.jsxs("div",{className:"dsn-combobox-input-row",children:[h.jsx("span",{className:"dsn-combobox-value-wrap",children:h.jsx("input",{ref:Ge,id:$,className:"dsn-combobox-input",type:"text",role:"combobox",autoComplete:"off",disabled:f,value:A,placeholder:i,"aria-expanded":he,"aria-controls":he?L:void 0,"aria-haspopup":P?"dialog":"listbox","aria-autocomplete":"list","aria-label":T,"aria-labelledby":O??(r?j:void 0),"aria-invalid":g||void 0,"aria-required":b||void 0,"aria-describedby":rt?z:void 0,onFocus:()=>{if(ut.current){ut.current=!1;return}f||Re(!0)},onBlur:ae=>{var ve;if(P){const ge=ae.relatedTarget;if(ge&&((ve=xe.current)!=null&&ve.contains(ge)))return;Vt()}},onClick:()=>{f||Re(!0)},onChange:ae=>{const ve=ae.target.value;q(ve),C==null||C(ve),he||Re(!0)},onKeyDown:ae=>{var ve,ge;if(ae.key==="ArrowDown"){if(ae.preventDefault(),!he){Re(!0);return}const Ne=Ct(We>=0?We:At(),1);nt(Ne),Ne>=0&&((ve=je.current[Ne])==null||ve.focus())}if(ae.key==="ArrowUp"){if(ae.preventDefault(),!he){Re(!0);return}const Ne=Ct(We>=0?We:At(!0),-1);nt(Ne),Ne>=0&&((ge=je.current[Ne])==null||ge.focus())}if(ae.key==="Enter"&&he){if(P)ae.preventDefault(),Vt();else if(We>=0){ae.preventDefault();const Ne=$e[We];Ne&&Et(Ne)}}ae.key==="Escape"&&(ae.preventDefault(),P?Vt():Re(!1))}})}),!!A&&!f&&h.jsx("button",{type:"button",className:"dsn-combobox-clear","aria-label":P?"Clear search":"Clear selection",onClick:yt,children:h.jsx(Fd,{size:16,"aria-hidden":"true"})}),h.jsx("span",{className:"dsn-combobox-chevron","aria-hidden":"true",children:h.jsx(wr,{size:16})})]})}),he&&!f&&h.jsx(Sr,{role:P?"dialog":"listbox","aria-label":`${n} options`,className:"dsn-combobox-popover",contentClassName:"dsn-combobox-popover-stack",contentPadding:"small",anchorRef:Ye,offset:4,viewportMargin:16,matchAnchorWidth:!0,content:h.jsx("div",{id:L,children:$e.length===0?h.jsx("div",{className:"dsn-combobox-empty",children:"No options"}):P?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"dsn-combobox-multi-options",onMouseDown:ae=>{ae.preventDefault()},children:$e.map((ae,ve)=>h.jsx("div",{ref:ge=>{je.current[ve]=ge},className:"dsn-combobox-multi-option","aria-disabled":ae.disabled||void 0,tabIndex:We===ve?0:-1,onKeyDown:ge=>{var Ne,bt;if(ge.key==="ArrowDown"){ge.preventDefault();const Lt=Ct(We>=0?We:At(),1);nt(Lt),Lt>=0&&((Ne=je.current[Lt])==null||Ne.focus());return}if(ge.key==="ArrowUp"){ge.preventDefault();const Lt=Ct(We>=0?We:At(!0),-1);nt(Lt),Lt>=0&&((bt=je.current[Lt])==null||bt.focus());return}if(ge.key==="Enter"||ge.key===" "){ge.preventDefault(),ae.disabled||pe(ae.value);return}ge.key==="Escape"&&(ge.preventDefault(),Vt())},children:h.jsx(Pn,{size:"md",checked:Z.has(ae.value),disabled:ae.disabled,label:ae.label,showLeadingIcon:!1,showTrailingIcon:!1,onCheckedChange:()=>{ae.disabled||pe(ae.value)}})},ae.value))}),h.jsx("div",{className:"dsn-combobox-multi-footer",children:h.jsx(me,{size:"md",variant:"primary",onClick:Vt,children:E})})]}):$e.map((ae,ve)=>h.jsx(Pi,{tabIndex:We===ve?0:-1,ref:ge=>{je.current[ve]=ge},className:"dsn-combobox-option",label:ae.label,description:ae.description,showDescription:!!ae.description,showLeadingIcon:!1,showTrailingIcon:!1,selected:D===ae.value,disabled:ae.disabled,onClick:()=>Et(ae),onKeyDown:ge=>{var Ne,bt,Lt;if(ge.key==="ArrowDown"){ge.preventDefault();const hn=Ct(We>=0?We:At(),1);nt(hn),hn>=0&&((Ne=je.current[hn])==null||Ne.focus());return}if(ge.key==="ArrowUp"){ge.preventDefault();const hn=Ct(We>=0?We:At(!0),-1);nt(hn),hn>=0&&((bt=je.current[hn])==null||bt.focus());return}if(ge.key==="Enter"||ge.key===" "){ge.preventDefault(),Et(ae);return}ge.key==="Escape"&&(ge.preventDefault(),Re(!1),(Lt=Ge.current)==null||Lt.focus())}},ae.value))})})]}),k&&(P?R.map(ae=>h.jsx("input",{type:"hidden",name:k,value:ae},ae)):h.jsx("input",{type:"hidden",name:k,value:D??""})),v&&rt&&h.jsxs("div",{className:"dsn-combobox-meta",children:[y&&h.jsx("span",{className:"dsn-combobox-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-combobox-meta-icon",children:y})}),h.jsx("p",{id:z,className:"dsn-combobox-helper",children:rt})]})]})}function bM({id:e,label:t,active:n,disabled:r,tabIndex:i,showLeadingIcon:a=!1,leadingIcon:o,showTrailingIcon:s=!1,trailingIcon:l,onSelect:c,onKeyDown:u,onFocus:d,buttonRef:f,ariaLabel:g}){return h.jsxs("button",{ref:f,id:e,type:"button",className:"dsn-segment-control-selector",role:"radio","aria-checked":n,"aria-disabled":r||void 0,"aria-label":g,"data-active":n||void 0,disabled:r,tabIndex:i,onClick:c,onKeyDown:u,onFocus:d,children:[a&&o&&h.jsx("span",{className:"dsn-segment-control-selector-icon","aria-hidden":"true",children:o}),h.jsx("span",{className:"dsn-segment-control-selector-label-wrap",children:h.jsx("span",{className:"dsn-segment-control-selector-label",children:t})}),s&&l&&h.jsx("span",{className:"dsn-segment-control-selector-icon","aria-hidden":"true",children:l})]})}function xM(e){var n;return((n=e.find(r=>!r.disabled)??e[0])==null?void 0:n.value)??""}function Yd({options:e,value:t,defaultValue:n,onChange:r,fullWidth:i=!0,className:a,"aria-label":o="Segment control"}){const s=_.useMemo(()=>xM(e),[e]),l=t!==void 0,[c,u]=_.useState(n??s),d=l?t:c,[f,g]=_.useState(()=>{const y=e.findIndex(x=>x.value===d);return y>=0?y:0}),p=_.useRef([]);_.useEffect(()=>{!l&&e.every(y=>y.value!==c)&&u(s)},[s,c,l,e]),_.useEffect(()=>{const y=e.findIndex(x=>x.value===d);y>=0&&g(y)},[e,d]);const v=_.useCallback(y=>{const x=e.find(k=>k.value===y);!x||x.disabled||(l||u(y),y!==d&&(r==null||r(y)))},[l,r,e,d]),m=_.useCallback((y,x)=>{var w;if(e.length===0)return;let k=y;for(let S=0;S<e.length;S+=1)if(k=(k+x+e.length)%e.length,!e[k].disabled){const N=e[k];g(k),v(N.value),(w=p.current[k])==null||w.focus();return}},[e,v]),b=["dsn-segment-control",a].filter(Boolean).join(" ");return h.jsx("div",{className:b,role:"radiogroup","aria-label":o,"data-full-width":i,children:e.map((y,x)=>{const k=y.value===d,w=x===f?0:-1,S=`dsn-segment-control-${y.value}`;return h.jsx(bM,{id:S,label:y.label,active:k,disabled:!!y.disabled,tabIndex:w,showLeadingIcon:y.showLeadingIcon,leadingIcon:y.leadingIcon,showTrailingIcon:y.showTrailingIcon,trailingIcon:y.trailingIcon,ariaLabel:y["aria-label"],buttonRef:N=>{p.current[x]=N},onSelect:()=>v(y.value),onFocus:()=>g(x),onKeyDown:N=>{if(N.key==="ArrowRight"||N.key==="ArrowDown"){N.preventDefault(),m(x,1);return}if(N.key==="ArrowLeft"||N.key==="ArrowUp"){N.preventDefault(),m(x,-1);return}(N.key===" "||N.key==="Enter")&&(N.preventDefault(),v(y.value))}},y.value)})})}function Gd(e,t){const n=t==="sm"?"sm":"md";return _.Children.map(e,r=>{if(!_.isValidElement(r))return r;const i=Gd(r.props.children,t);if(r.type===me){const a=r.props.variant,o=a==="plain"?"secondary":a??"primary";return _.cloneElement(r,{variant:o,size:n,children:i})}return _.cloneElement(r,{children:i})})}function Sa({size:e="lg",variant:t="default",leftActions:n,rightActions:r,className:i,"aria-label":a="Toolbar"}){const o=["dsn-toolbar",i].filter(Boolean).join(" "),s=Gd(n,e),l=Gd(r,e);return h.jsxs("div",{className:o,"data-size":e,"data-variant":t,role:"toolbar","aria-label":a,children:[h.jsx("div",{className:"dsn-toolbar-side dsn-toolbar-side-left",children:s}),h.jsx("div",{className:"dsn-toolbar-side dsn-toolbar-side-right",children:l})]})}const _M=["S","M","T","W","T","F","S"],wM=["07:00","08:00","09:00","10:00","11:00","12:00","01:00","02:00","03:00","04:00","05:00","06:00"];function kM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M9.5 4.5L6 8L9.5 11.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function SM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M6.5 4.5L10 8L6.5 11.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Xd(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M5.33333 2V4M10.6667 2V4M2.66667 6H13.3333M4 3.33333H12C12.7364 3.33333 13.3333 3.93029 13.3333 4.66667V12C13.3333 12.7364 12.7364 13.3333 12 13.3333H4C3.26362 13.3333 2.66667 12.7364 2.66667 12V4.66667C2.66667 3.93029 3.26362 3.33333 4 3.33333Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})}function NM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M11.5 4.5L4.5 11.5M4.5 4.5L11.5 11.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Nr(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function Fo(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Ly(e){return`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`}function Li(e){const t=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0"),r=String(e.getFullYear());return`${t}-${n}-${r}`}function CM(e,t,n){return`${Li(e)} ${t} ${n}`}function EM(e){return e.toLocaleDateString("en-US",{weekday:"long",day:"numeric",month:"long",year:"numeric"})}function TM(e){const r=(e.trim().split(/\s+/)[0]??"").match(/^(\d{1,2})[-/](\d{1,2})[-/](\d{4})$/);if(!r)return null;const i=Number(r[1]),a=Number(r[2]),o=Number(r[3]),s=new Date(o,i-1,a);return s.getFullYear()!==o||s.getMonth()!==i-1||s.getDate()!==a?null:Nr(s)}function Qr(e){return new Date(e.getFullYear(),e.getMonth(),1)}function Bl(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function rn(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),Nr(n)}function MM(e){return e.toLocaleDateString("en-US",{month:"short"})}function $M(e){const t=Qr(e),n=t.getDay(),r=rn(t,-n);return Array.from({length:42},(i,a)=>rn(r,a))}function OM(e){return!e||e instanceof Date?{start:null,end:null}:{start:e.start?Nr(e.start):null,end:e.end?Nr(e.end):null}}function PM(e){return!e||!(e instanceof Date)?null:Nr(e)}function AM(e,t,n){if(!t||!n)return!1;const r=e.getTime();return r>t.getTime()&&r<n.getTime()}function LM({id:e,displayMode:t="popover",selectionMode:n="single",withTime:r=!1,label:i="Date and time",placeholder:a="MM-DD-YYY 00:00 AM",startPlaceholder:o="Start date",endPlaceholder:s="End date",value:l,defaultValue:c=null,open:u,defaultOpen:d=!1,disabled:f=!1,required:g=!1,error:p=!1,helperText:v="Help text",errorMessage:m,helperIcon:b,className:y,onChange:x,onOpenChange:k,presets:w,selectedPresetId:S,defaultSelectedPresetId:N=null,onPresetSelect:C,showActions:E=!0,cancelLabel:T="Cancel",confirmLabel:O="Confirm",onCancel:P,onConfirm:M,"aria-label":$,"aria-labelledby":L}){const z=_.useId(),j=e??`dsn-date-time-picker-${z}`,B=`${j}-label`,H=`${j}-helper`,F=`${j}-dialog`,D=n==="range",U=t==="popover",V=p&&m?m:v,Y=u!==void 0,[G,R]=_.useState(d),te=Y?u:G,le=l!==void 0,[W,Z]=_.useState(c),I=le?l:W,A=PM(I),q=OM(I),Q=_.useMemo(()=>A?Qr(A):q.start?Qr(q.start):Qr(new Date),[q.start,A]),[de,ne]=_.useState(Q),he=_.useMemo(()=>{const ee=Nr(new Date),Ke=rn(ee,-1);if(D){const Qe=rn(ee,-4);return[{id:"today",label:"Today",value:{start:ee,end:ee}},{id:"yesterday",label:"Yesterday",value:{start:Ke,end:Ke}},{id:"last-week",label:"Last week",value:{start:Qe,end:ee}},{id:"last-month",label:"Last month",value:{start:rn(ee,-30),end:ee}},{id:"last-year",label:"Last year",value:{start:rn(ee,-365),end:ee}}]}return[{id:"today",label:"Today",value:ee},{id:"yesterday",label:"Yesterday",value:Ke},{id:"last-friday",label:"Last Friday",value:rn(ee,-2)}]},[D]),xe=w??he,Ye=E,Ge=S!==void 0,[ut,je]=_.useState(N),We=Ge?S??null:ut,[nt,rt]=_.useState(Nr(new Date)),[mt,$e]=_.useState(null),[Ct,At]=_.useState("07:00"),[Re,Yr]=_.useState("AM"),[Xn,Vt]=_.useState(A?Li(A):""),[pe,Pe]=_.useState(q.start?Li(q.start):""),[Et,yt]=_.useState(q.end?Li(q.end):""),ae=_.useRef(null),ve=_.useRef(null),ge=_.useRef(null),Ne=_.useRef({}),bt=D&&q.start?Li(q.start):"",Lt=D&&q.end?Li(q.end):"",hn=!D&&A?r?CM(A,Ct,Re):Li(A):"",Pd=_.useMemo(()=>$M(de),[de]),Tt=ee=>{Y||R(ee),k==null||k(ee)},et=ee=>{le||Z(ee),x==null||x(ee)},pn=ee=>{const Ke=Ly(ee),Qe=Ne.current[Ke];Qe&&Qe.focus()},Zn=(ee,Ke)=>{const Qe=TM(ee);if(!Qe)return;if(Ke==="single"){et(Qe),ne(Qr(Qe)),rt(Qe);return}const Gr=Ke==="range-start"?Qe:q.start,Jn=Ke==="range-end"?Qe:q.end;if(Gr&&Jn&&Gr.getTime()>Jn.getTime()){et({start:Jn,end:Gr}),ne(Qr(Jn)),rt(Jn);return}et({start:Gr??null,end:Jn??null}),ne(Qr(Qe)),rt(Qe)},xr=ee=>{Ge||je(ee.id),C==null||C(ee.id),et(ee.value)},nn=ee=>{if($e(null),!D){et(ee),rt(ee),!r&&!Ye&&U&&Tt(!1);return}const{start:Ke,end:Qe}=q;if(!Ke||Ke&&Qe){et({start:ee,end:null}),rt(ee);return}ee.getTime()<Ke.getTime()?(et({start:ee,end:Ke}),rt(ee)):(et({start:Ke,end:ee}),rt(ee)),!r&&!Ye&&U&&Tt(!1)};_.useEffect(()=>{if(!te)return;const ee=D?q.start??nt:A??nt;Fo(ee,nt)||rt(ee);const Ke=setTimeout(()=>pn(ee),0);return()=>clearTimeout(Ke)},[nt,te,D,q.start,A]),_.useEffect(()=>{const ee=Ke=>{!ae.current||!te||ae.current.contains(Ke.target)||Tt(!1)};return document.addEventListener("mousedown",ee),()=>document.removeEventListener("mousedown",ee)},[te]),_.useEffect(()=>{D||Vt(hn)},[D,hn]),_.useEffect(()=>{(!D||!te||q.end)&&$e(null)},[te,D,q.end]),_.useEffect(()=>{D&&(Pe(bt),yt(Lt))},[Lt,D,bt]);const Mi=h.jsxs("div",{className:"dsn-date-time-picker-panel",children:[h.jsxs("div",{className:"dsn-date-time-picker-calendar-header",children:[h.jsx("button",{type:"button",className:"dsn-date-time-picker-nav-button","aria-label":"Previous month",onClick:()=>ne(ee=>Bl(ee,-1)),children:h.jsx(kM,{})}),h.jsxs("div",{className:"dsn-date-time-picker-calendar-title-wrap",children:[h.jsx("span",{className:"dsn-date-time-picker-calendar-title",children:MM(de)}),h.jsx("span",{className:"dsn-date-time-picker-calendar-title",children:de.getFullYear()})]}),h.jsx("button",{type:"button",className:"dsn-date-time-picker-nav-button","aria-label":"Next month",onClick:()=>ne(ee=>Bl(ee,1)),children:h.jsx(SM,{})})]}),h.jsx("div",{className:"dsn-date-time-picker-weekday-row",children:_M.map((ee,Ke)=>h.jsx("span",{className:"dsn-date-time-picker-weekday",children:ee},`${ee}-${Ke}`))}),h.jsx("div",{className:"dsn-date-time-picker-days-grid",role:"grid","aria-label":"Calendar",onMouseLeave:()=>$e(null),children:Pd.map(ee=>{const Ke=ee.getMonth()===de.getMonth(),Qe=D&&!!(q.start&&!q.end&&mt),Gr=Qe&&q.start&&mt?mt.getTime()<q.start.getTime()?mt:q.start:null,Jn=Qe&&q.start&&mt?mt.getTime()<q.start.getTime()?q.start:mt:null,Ad=D?q.end?q.start:Gr??q.start:A,Ld=D?q.end??Jn:null,WE=Fo(ee,Ad),UE=D&&Fo(ee,Ld),HE=WE||UE,oH=D&&AM(ee,Ad,Ld),sH=D&&!!(Ad&&Ld&&ee.getTime()>=Ad.getTime()&&ee.getTime()<=Ld.getTime()),lH=Fo(ee,Nr(new Date)),cH=Fo(ee,nt),qE=Ly(ee);return h.jsx("button",{ref:Dt=>{Ne.current[qE]=Dt},type:"button",role:"gridcell",className:"dsn-date-time-picker-day","data-selected":HE||void 0,"data-in-range":oH||void 0,"data-within-range":sH||void 0,"data-range-start":D&&WE?!0:void 0,"data-range-end":D&&UE?!0:void 0,"data-today":lH||void 0,"data-outside-month":!Ke||void 0,"aria-selected":HE,"aria-label":EM(ee),tabIndex:cH?0:-1,onClick:()=>nn(ee),onFocus:()=>rt(ee),onMouseEnter:()=>{D&&q.start&&!q.end&&$e(ee)},onKeyDown:Dt=>{var KE;let _r=null;if(Dt.key==="ArrowRight"&&(_r=rn(ee,1)),Dt.key==="ArrowLeft"&&(_r=rn(ee,-1)),Dt.key==="ArrowDown"&&(_r=rn(ee,7)),Dt.key==="ArrowUp"&&(_r=rn(ee,-7)),Dt.key==="Home"&&(_r=rn(ee,-ee.getDay())),Dt.key==="End"&&(_r=rn(ee,6-ee.getDay())),Dt.key==="PageUp"){const Xr=Bl(ee,-1);_r=new Date(Xr.getFullYear(),Xr.getMonth(),ee.getDate())}if(Dt.key==="PageDown"){const Xr=Bl(ee,1);_r=new Date(Xr.getFullYear(),Xr.getMonth(),ee.getDate())}if(_r){Dt.preventDefault();const Xr=Nr(_r);rt(Xr),ne(Qr(Xr)),setTimeout(()=>pn(Xr),0);return}if(Dt.key==="Enter"||Dt.key===" "){Dt.preventDefault(),nn(ee);return}Dt.key==="Escape"&&(Dt.preventDefault(),Tt(!1),(KE=ve.current)==null||KE.focus())},children:h.jsx("span",{className:"dsn-date-time-picker-day-inner",children:ee.getDate()})},qE)})}),r&&h.jsxs("div",{className:"dsn-date-time-picker-time-bar",children:[h.jsx("div",{className:"dsn-date-time-picker-time-hour",children:h.jsx(Ay,{label:"Hour",showLabel:!1,showHelper:!1,placeholder:"07:00",helperText:"",selectionMode:"single",defaultValue:Ct,options:wM.map(ee=>({value:ee,label:ee})),onChange:ee=>At(ee),onInputChange:ee=>At(ee),"aria-label":"Select time"})}),h.jsx("div",{className:"dsn-date-time-picker-time-meridiem",children:h.jsx(Yd,{fullWidth:!1,"aria-label":"Select meridiem",value:Re,onChange:Yr,options:[{value:"AM",label:"AM"},{value:"PM",label:"PM"}]})})]})]});return U?h.jsxs("div",{ref:ae,className:["dsn-date-time-picker",y].filter(Boolean).join(" "),"data-error":p||void 0,"data-disabled":f||void 0,"data-open":te||void 0,children:[!D&&h.jsxs("label",{id:B,className:"dsn-date-time-picker-label",htmlFor:`${j}-single`,children:[i,g&&h.jsxs("span",{className:"dsn-date-time-picker-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{ref:ge,className:"dsn-date-time-picker-control-wrap",children:[!D&&h.jsxs("div",{className:"dsn-date-time-picker-control",children:[h.jsx("span",{className:"dsn-date-time-picker-leading-icon","aria-hidden":"true",children:h.jsx(Xd,{})}),h.jsx("input",{ref:ve,id:`${j}-single`,className:"dsn-date-time-picker-control-input",placeholder:a,value:Xn,onChange:ee=>Vt(ee.target.value),disabled:f,"aria-label":$,"aria-labelledby":L??B,"aria-required":g||void 0,"aria-invalid":p||void 0,"aria-describedby":V?H:void 0,"aria-haspopup":"dialog","aria-expanded":te,"aria-controls":te?F:void 0,onFocus:()=>{f||Tt(!0)},onClick:()=>{f||Tt(!0)},onKeyDown:ee=>{(ee.key==="ArrowDown"||ee.key==="Enter")&&(ee.preventDefault(),Tt(!0)),ee.key==="Escape"&&Tt(!1)},onBlur:ee=>Zn(ee.target.value,"single")}),Xn&&!f&&h.jsx("button",{type:"button",className:"dsn-date-time-picker-clear-button","aria-label":"Clear date value",onClick:()=>{var ee;Vt(""),et(null),Tt(!1),(ee=ve.current)==null||ee.focus()},children:h.jsx(NM,{})})]}),D&&h.jsxs("div",{className:"dsn-date-time-picker-range-fields",children:[h.jsxs("div",{className:"dsn-date-time-picker-range-field",children:[h.jsx("label",{className:"dsn-date-time-picker-range-field-label",htmlFor:`${j}-start`,children:"Start"}),h.jsxs("div",{className:"dsn-date-time-picker-control",children:[h.jsx("span",{className:"dsn-date-time-picker-leading-icon","aria-hidden":"true",children:h.jsx(Xd,{})}),h.jsx("input",{ref:ve,id:`${j}-start`,className:"dsn-date-time-picker-control-input",placeholder:o,value:pe,onChange:ee=>Pe(ee.target.value),disabled:f,"aria-label":$??"Start date","aria-required":g||void 0,"aria-invalid":p||void 0,"aria-describedby":V?H:void 0,"aria-haspopup":"dialog","aria-expanded":te,"aria-controls":te?F:void 0,onFocus:()=>{f||Tt(!0)},onClick:()=>{f||Tt(!0)},onBlur:ee=>Zn(ee.target.value,"range-start")})]})]}),h.jsxs("div",{className:"dsn-date-time-picker-range-field",children:[h.jsx("label",{className:"dsn-date-time-picker-range-field-label",htmlFor:`${j}-end`,children:"End"}),h.jsxs("div",{className:"dsn-date-time-picker-control",children:[h.jsx("span",{className:"dsn-date-time-picker-leading-icon","aria-hidden":"true",children:h.jsx(Xd,{})}),h.jsx("input",{id:`${j}-end`,className:"dsn-date-time-picker-control-input",placeholder:s,value:Et,onChange:ee=>yt(ee.target.value),disabled:f,"aria-label":"End date","aria-required":g||void 0,"aria-invalid":p||void 0,"aria-describedby":V?H:void 0,onFocus:()=>{f||Tt(!0)},onClick:()=>{f||Tt(!0)},onBlur:ee=>Zn(ee.target.value,"range-end")})]})]})]}),te&&!f&&h.jsx(Sr,{role:"dialog","aria-label":D?"Choose date range":"Choose date",className:"dsn-date-time-picker-popover",contentClassName:"dsn-date-time-picker-popover-content",contentPadding:"none",anchorRef:ge,width:320,matchAnchorWidth:!1,minWidth:192,segment:xe.length>0?h.jsx("div",{className:"dsn-date-time-picker-presets",children:h.jsx(Fl,{label:"Date shortcuts",children:xe.map(ee=>h.jsx(Io,{size:"md",label:ee.label,showLeadingIcon:!1,showTrailingIcon:!1,selected:We===ee.id,onClick:()=>xr(ee)},ee.id))})}):void 0,content:h.jsx("div",{id:F,children:Mi}),bottomBar:Ye?h.jsx(Sa,{size:"md",leftActions:null,rightActions:h.jsxs(Jr,{size:"md",spaceBetween:!0,"aria-label":"Date picker actions",children:[h.jsx(me,{variant:"ghost",size:"md",onClick:()=>{P==null||P(),Tt(!1)},children:T}),h.jsx(me,{variant:"primary",size:"md",onClick:()=>{M==null||M(I??null),Tt(!1)},children:O})]})}):void 0})]}),V&&h.jsxs("div",{className:"dsn-date-time-picker-meta",children:[b&&h.jsx("span",{className:"dsn-date-time-picker-meta-icon",children:b}),h.jsx("p",{id:H,className:"dsn-date-time-picker-helper",children:V})]})]}):h.jsxs("div",{ref:ae,className:["dsn-date-time-picker",y].filter(Boolean).join(" "),"data-error":p||void 0,"data-disabled":f||void 0,children:[i&&h.jsx("p",{id:B,className:"dsn-date-time-picker-label",children:i}),xe.length>0&&h.jsx("div",{className:"dsn-date-time-picker-presets",children:h.jsx(Fl,{label:"Quick date presets",children:xe.map(ee=>h.jsx(Io,{size:"md",label:ee.label,showLeadingIcon:!1,showTrailingIcon:!1,selected:We===ee.id,onClick:()=>xr(ee)},ee.id))})}),h.jsx("div",{role:"dialog","aria-label":D?"Choose date range":"Choose date",children:Mi}),V&&h.jsxs("div",{className:"dsn-date-time-picker-meta",children:[b&&h.jsx("span",{className:"dsn-date-time-picker-meta-icon",children:b}),h.jsx("p",{id:H,className:"dsn-date-time-picker-helper",children:V})]})]})}function DM(){return h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M16 16L12 12M12 12L8 16M12 12V20M20.39 18.39C21.3655 17.8573 22.1359 17.0176 22.5789 16.0004C23.0218 14.9833 23.1125 13.8474 22.836 12.7737C22.5595 11.7 21.9317 10.7502 21.051 10.0757C20.1703 9.40118 19.0898 9.0399 17.98 9.05H16.72C16.4176 7.88024 15.854 6.79419 15.0709 5.87368C14.2878 4.95316 13.3058 4.22212 12.1998 3.73454C11.0938 3.24696 9.89114 3.01595 8.68219 3.05892C7.47325 3.10189 6.29018 3.41772 5.22287 3.98282C4.15556 4.54793 3.23226 5.3472 2.52208 6.32053C1.81191 7.29386 1.33398 8.41797 1.12408 9.605C0.914179 10.792 0.977588 12.0116 1.30956 13.1704C1.64154 14.3292 2.23322 15.3974 3.03999 16.29",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function IM({id:e,label:t="Label",helperText:n="Help text",helperIcon:r,disabled:i=!1,accept:a,multiple:o=!1,maxSizeText:s="Up to 100Mb",dragText:l="Drag and drop or press to upload",dropText:c="Drop here",onFilesSelected:u,onFocus:d,onBlur:f,className:g,"aria-label":p}){const v=_.useId(),m=e??`dsn-upload-area-${v}`,b=`${m}-label`,y=`${m}-helper`,x=_.useRef(null),[k,w]=_.useState(!1);function S(){var C;i||(C=x.current)==null||C.click()}function N(C){!C||C.length===0||u==null||u(Array.from(C))}return h.jsxs("div",{className:["dsn-upload-area",g].filter(Boolean).join(" "),children:[t&&h.jsx("p",{className:"dsn-upload-area-label",id:b,children:t}),h.jsxs("button",{id:m,type:"button",className:"dsn-upload-area-zone","data-disabled":i||void 0,"data-dragging":k||void 0,disabled:i,"aria-label":p??"Upload files - click or drag and drop","aria-labelledby":t?b:void 0,"aria-describedby":n?y:void 0,onClick:S,onFocus:d,onBlur:f,onDragOver:C=>{C.preventDefault(),i||w(!0)},onDragLeave:C=>{C.preventDefault(),w(!1)},onDrop:C=>{C.preventDefault(),w(!1),i||N(C.dataTransfer.files)},children:[h.jsx("span",{className:"dsn-upload-area-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-upload-area-icon",children:h.jsx(DM,{})})}),h.jsx("span",{className:"dsn-upload-area-label-wrap",children:h.jsx("span",{className:"dsn-upload-area-main-text",children:k&&!i?c:l})}),!k&&h.jsx("span",{className:"dsn-upload-area-size-text",children:s})]}),h.jsx("input",{ref:x,type:"file",className:"dsn-upload-area-native",accept:a,multiple:o,disabled:i,onChange:C=>N(C.target.files)}),n&&h.jsxs("div",{className:"dsn-upload-area-meta",children:[r&&h.jsx("span",{className:"dsn-upload-area-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-upload-area-meta-icon",children:r})}),h.jsx("p",{id:y,className:"dsn-upload-area-helper",children:n})]})]})}function Zd(e){if(e==null||typeof e=="boolean")return null;if(typeof e=="string"||typeof e=="number")return e;if(Array.isArray(e)){const t=e.map(n=>Zd(n)).filter(n=>n!==null);return t.length>0?t:null}return _.isValidElement(e)?e:null}function er({title:e,description:t,size:n="medium",leadingControl:r,trailingControl:i,className:a}){const o=["dsn-section-header",a].filter(Boolean).join(" "),s=Zd(r),l=Zd(i);return h.jsxs("div",{className:o,"data-size":n,"data-has-description":!!t||void 0,"data-has-leading-control":!!s||void 0,"data-has-trailing-control":!!l||void 0,children:[s&&h.jsx("div",{className:"dsn-section-header-control",children:s}),h.jsx("div",{className:"dsn-section-header-title-wrapper",children:h.jsxs("div",{className:"dsn-section-header-text",children:[h.jsx("p",{className:"dsn-section-header-title",children:e}),t&&h.jsx("p",{className:"dsn-section-header-description",children:t})]})}),l&&h.jsx("div",{className:"dsn-section-header-control",children:l})]})}function FM(e){var n;return((n=e.find(r=>!r.disabled)??e[0])==null?void 0:n.value)??""}function zM({tabs:e,value:t,defaultValue:n,onChange:r,className:i,showPanels:a=!0,panelClassName:o,"aria-label":s="Tabs"}){const l=_.useMemo(()=>FM(e),[e]),c=t!==void 0,[u,d]=_.useState(n??l),f=c?t:u,g=_.useRef([]);_.useEffect(()=>{!c&&e.every(x=>x.value!==u)&&d(l)},[l,u,c,e]);const p=_.useCallback(x=>{const k=e.find(w=>w.value===x);!k||k.disabled||(c||d(x),x!==f&&(r==null||r(x)))},[c,r,f,e]),v=_.useCallback((x,k)=>{if(e.length===0)return-1;let w=x;for(let S=0;S<e.length;S+=1)if(w=(w+k+e.length)%e.length,!e[w].disabled)return w;return-1},[e]),m=_.useCallback(x=>{var k;x<0||(k=g.current[x])==null||k.focus()},[]),b=["dsn-tab",i].filter(Boolean).join(" "),y=["dsn-tab-panel",o].filter(Boolean).join(" ");return h.jsxs("div",{className:b,children:[h.jsx("div",{className:"dsn-tab-list",role:"tablist","aria-label":s,children:e.map((x,k)=>{const w=x.value===f,S=!!x.disabled,N=`dsn-tab-${x.value}`,C=`dsn-tabpanel-${x.value}`,E=w?0:-1;return h.jsx("button",{ref:T=>{g.current[k]=T},className:"dsn-tab-trigger",type:"button",role:"tab",id:N,"aria-controls":C,"aria-selected":w,"aria-label":x["aria-label"],"aria-disabled":S||void 0,disabled:S,"data-selected":w||void 0,tabIndex:E,onClick:()=>p(x.value),onKeyDown:T=>{if(T.key==="ArrowRight"){T.preventDefault();const O=v(k,1);m(O);return}if(T.key==="ArrowLeft"){T.preventDefault();const O=v(k,-1);m(O);return}if(T.key==="Home"){T.preventDefault();const O=e.findIndex(P=>!P.disabled);m(O);return}if(T.key==="End"){T.preventDefault();const O=[...e].reverse().findIndex(M=>!M.disabled),P=O<0?-1:e.length-1-O;m(P);return}(T.key===" "||T.key==="Enter")&&(T.preventDefault(),p(x.value))},children:h.jsxs("span",{className:"dsn-tab-trigger-content",children:[x.showLeadingIcon&&h.jsx("span",{className:"dsn-tab-icon-wrap","aria-hidden":"true",children:x.leadingIcon}),h.jsx("span",{className:"dsn-tab-label-wrap",children:h.jsx("span",{className:"dsn-tab-label",children:x.label})}),x.showTrailingIcon&&h.jsx("span",{className:"dsn-tab-icon-wrap","aria-hidden":"true",children:x.trailingIcon})]})},x.value)})}),a&&e.map(x=>{const k=`dsn-tabpanel-${x.value}`,w=`dsn-tab-${x.value}`,S=x.value===f;return h.jsx("div",{className:y,role:"tabpanel",id:k,"aria-labelledby":w,hidden:!S,children:x.panel},x.value)})]})}function BM(e){var n;return((n=e.find(r=>!r.disabled)??e[0])==null?void 0:n.value)??""}function Dy({tabs:e,value:t,defaultValue:n,onChange:r,onRemove:i,addActionLabel:a,addActionLeadingIcon:o,onAddAction:s,addActionAriaLabel:l,className:c,showPanels:u=!0,panelClassName:d,"aria-label":f="Custom views"}){const g=_.useMemo(()=>BM(e),[e]),p=t!==void 0,[v,m]=_.useState(n??g),b=p?t:v,y=_.useRef([]);_.useEffect(()=>{!p&&e.every(C=>C.value!==v)&&m(g)},[g,v,p,e]);const x=_.useCallback(C=>{const E=e.find(T=>T.value===C);!E||E.disabled||(p||m(C),C!==b&&(r==null||r(C)))},[p,r,b,e]),k=_.useCallback((C,E)=>{if(e.length===0)return-1;let T=C;for(let O=0;O<e.length;O+=1)if(T=(T+E+e.length)%e.length,!e[T].disabled)return T;return-1},[e]),w=_.useCallback(C=>{var E;C<0||(E=y.current[C])==null||E.focus()},[]),S=["dsn-custom-view-tabs",c].filter(Boolean).join(" "),N=["dsn-custom-view-tabs-panel",d].filter(Boolean).join(" ");return h.jsxs("div",{className:S,children:[h.jsxs("div",{className:"dsn-custom-view-tabs-list",role:"tablist","aria-label":f,children:[e.map((C,E)=>{const T=C.value===b,O=!!C.disabled,P=C.removable!==!1,M=C.showLeadingIcon!==!1,$=`dsn-custom-tab-${C.value}`,L=`dsn-custom-tabpanel-${C.value}`,z=T?0:-1;return h.jsxs("div",{className:"dsn-custom-view-tabs-item",ref:j=>{y.current[E]=j},role:"tab",id:$,"aria-controls":L,"aria-selected":T,"aria-label":C["aria-label"],"aria-disabled":O||void 0,"data-selected":T||void 0,"data-disabled":O||void 0,tabIndex:O?-1:z,onClick:()=>{O||x(C.value)},onKeyDown:j=>{if(!O){if(j.key==="ArrowRight"){j.preventDefault();const B=k(E,1);w(B);return}if(j.key==="ArrowLeft"){j.preventDefault();const B=k(E,-1);w(B);return}if(j.key==="Home"){j.preventDefault();const B=e.findIndex(H=>!H.disabled);w(B);return}if(j.key==="End"){j.preventDefault();const B=[...e].reverse().findIndex(F=>!F.disabled),H=B<0?-1:e.length-1-B;w(H);return}(j.key===" "||j.key==="Enter")&&(j.preventDefault(),x(C.value))}},children:[M&&h.jsx("span",{className:"dsn-custom-view-tabs-icon","data-icon":C.leadingIcon?"custom":"default","aria-hidden":"true",children:C.leadingIcon}),h.jsx("span",{className:"dsn-custom-view-tabs-label-wrap",children:h.jsx("span",{className:"dsn-custom-view-tabs-label",children:C.label})}),P&&h.jsx(me,{className:"dsn-custom-view-tabs-remove",variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Qn,{size:16,"aria-hidden":"true"}),"aria-label":C.removeAriaLabel??`Remove ${C.label}`,disabled:O,onClick:j=>{j.stopPropagation(),j.preventDefault(),i==null||i(C.value)}})]},C.value)}),a&&h.jsx("span",{className:"dsn-custom-view-tabs-add-wrap",children:h.jsx(me,{className:"dsn-custom-view-tabs-add-button",variant:"ghost",size:"md",showLeadingIcon:!0,leadingIcon:o??h.jsx(xT,{size:16,"aria-hidden":"true"}),"aria-label":l??a,onClick:s,children:a})})]}),u&&e.map(C=>{const E=`dsn-custom-tabpanel-${C.value}`,T=`dsn-custom-tab-${C.value}`,O=C.value===b;return h.jsx("div",{className:N,role:"tabpanel",id:E,"aria-labelledby":T,hidden:!O,children:C.panel},C.value)})]})}const jM=Dy;function WM(e){return e==="none"?"desc":e==="desc"?"asc":"desc"}function UM(e){return e==="asc"?"ascending":e==="desc"?"descending":"none"}function Iy({variant:e="title",state:t="default",label:n="Label",width:r,sortable:i=!1,sortDirection:a="none",reorderable:o=!0,resizable:s=!0,checkboxChecked:l=!1,checkboxIndeterminate:c=!1,onCheckboxChange:u,onSortChange:d,onResizeCommand:f,onResizePointerDown:g,onMoreClick:p,onReorderDragStart:v,onReorderDragEnd:m,filterValue:b,onFilterChange:y,leadingAccessory:x,className:k,"aria-label":w}){const S=["dsn-data-table-header-cell",k].filter(Boolean).join(" "),N=e==="title",C=N&&i,E=()=>{C&&(d==null||d(WM(a)))},T=P=>{C&&(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),E())},O=N&&typeof r=="number"?{width:`${r}px`}:void 0;return h.jsx("div",{className:S,"data-variant":e,"data-state":t,role:"columnheader","aria-sort":N&&i?UM(a):void 0,"aria-label":w,style:O,tabIndex:C||o?0:-1,draggable:o||void 0,onClick:E,onKeyDown:T,onDragStart:o?v:void 0,onDragEnd:o?m:void 0,children:N?h.jsxs(h.Fragment,{children:[o&&h.jsxs("div",{className:"dsn-data-table-header-drag-indicator","aria-hidden":"true",children:[h.jsx("span",{}),h.jsx("span",{}),h.jsx("span",{}),h.jsx("span",{})]}),h.jsxs("div",{className:"dsn-data-table-header-cell-main",children:[x&&h.jsx("span",{className:"dsn-data-table-header-cell-leading-accessory",onClick:P=>P.stopPropagation(),children:x}),h.jsxs("div",{className:"dsn-data-table-header-cell-title",children:[h.jsx("span",{className:"dsn-data-table-header-cell-label",children:n}),i&&h.jsx("span",{className:"dsn-data-table-header-cell-sort","data-direction":a,"aria-hidden":"true",children:a==="asc"?h.jsx(aT,{size:14,strokeWidth:1.5}):h.jsx(rT,{size:14,strokeWidth:1.5})})]})]}),h.jsx("div",{className:"dsn-data-table-header-cell-controls",children:h.jsx(me,{variant:"ghost",size:"sm",showLeadingIcon:!0,leadingIcon:h.jsx(zd,{size:14,strokeWidth:1.5,"aria-hidden":"true"}),showLabel:!1,onClick:P=>{P.stopPropagation(),p==null||p(P)},"aria-label":"Column options"})}),s&&h.jsx("button",{type:"button",className:"dsn-data-table-header-resizer","aria-label":"Resize column",onClick:P=>P.stopPropagation(),onPointerDown:P=>{P.stopPropagation(),g==null||g(P)},onKeyDown:P=>{P.stopPropagation(),P.key==="ArrowLeft"?(P.preventDefault(),f==null||f("decrease")):P.key==="ArrowRight"&&(P.preventDefault(),f==null||f("increase"))}})]}):h.jsx("div",{className:"dsn-data-table-header-cell-checkbox-wrap",onClick:P=>P.stopPropagation(),children:h.jsx(Pn,{size:"sm",checked:l,indeterminate:c,showContent:!1,"aria-label":w??"Select all rows",onCheckedChange:u})})})}function HM({values:e}){const t=_.useRef(null),n=_.useRef(null),r=_.useRef(null),i=_.useRef(null),a=_.useRef(null),[o,s]=_.useState(e.length),[l,c]=_.useState(!1),u=Math.max(0,e.length-o),d=_.useCallback(()=>{const f=t.current,g=n.current,p=r.current;if(!f||!g)return;const v=f.clientWidth;if(v<=0)return;const b=Array.from(g.querySelectorAll("[data-measure-tag]")).map(S=>S.getBoundingClientRect().width),y=Number.parseFloat(window.getComputedStyle(f).columnGap||"0")||0,x=(p==null?void 0:p.getBoundingClientRect().width)??0;let k=0,w=0;for(let S=0;S<b.length;S+=1){const N=k+(w>0?y:0)+b[S],E=b.length-(S+1)>0?(w>=0?y:0)+x:0;if(N+E<=v)k=N,w+=1;else break}s(w)},[]);return _.useEffect(()=>{s(e.length)},[e]),_.useEffect(()=>{d()},[d,e]),_.useEffect(()=>{u===0&&l&&c(!1)},[l,u]),_.useEffect(()=>{const f=t.current;if(!f||typeof ResizeObserver>"u")return;const g=new ResizeObserver(()=>d());return g.observe(f),()=>g.disconnect()},[d]),_.useEffect(()=>{if(!l)return;const f=p=>{p.key==="Escape"&&c(!1)},g=p=>{const v=p.target,m=i.current,b=a.current;m!=null&&m.contains(v)||b!=null&&b.contains(v)||c(!1)};return window.addEventListener("keydown",f),window.addEventListener("mousedown",g),()=>{window.removeEventListener("keydown",f),window.removeEventListener("mousedown",g)}},[l]),h.jsxs(h.Fragment,{children:[h.jsxs("span",{className:"dsn-data-table-cell-tags",ref:t,children:[e.slice(0,o).map((f,g)=>h.jsx(kr,{size:"sm",variant:"highlight",label:f,showIcon:!1},`${f}-${g}`)),u>0&&h.jsx("button",{ref:i,type:"button",className:"dsn-data-table-cell-tags-overflow-trigger","aria-label":`Show ${u} more tags`,"aria-haspopup":"dialog","aria-expanded":l,onClick:f=>{f.stopPropagation(),c(g=>!g)},children:h.jsx(kr,{size:"sm",variant:"neutral",label:`+${u}`,showIcon:!1})})]}),h.jsxs("span",{className:"dsn-data-table-cell-tags-measure",ref:n,"aria-hidden":"true",children:[e.map((f,g)=>h.jsx("span",{"data-measure-tag":!0,children:h.jsx(kr,{size:"sm",variant:"highlight",label:f,showIcon:!1})},`${f}-${g}`)),h.jsx("span",{ref:r,children:h.jsx(kr,{size:"sm",variant:"neutral",label:`+${e.length}`,showIcon:!1})})]}),l&&u>0&&h.jsx("div",{className:"dsn-data-table-cell-tags-popover",ref:a,children:h.jsx(Sr,{anchorRef:i,role:"dialog","aria-label":"Hidden tags",width:280,contentPadding:"small",content:h.jsx("div",{className:"dsn-data-table-cell-tags-popover-content",children:e.map((f,g)=>h.jsx(kr,{size:"sm",variant:"highlight",label:f,showIcon:!1},`${f}-${g}`))})})})]})}function jl(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M6 6.5H3.5V12.5H9.5V10",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("path",{d:"M6.5 3.5H12.5V9.5H6.5V3.5Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}function qM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M3 11.5L5 11L11.5 4.5L10 3L3.5 9.5L3 11.5Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})}function Fy(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M5.5 5.5V11",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M8 5.5V11",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M10.5 5.5V11",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M3.5 4H12.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M5 4V3.5C5 3.22 5.22 3 5.5 3H10.5C10.78 3 11 3.22 11 3.5V4",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M4.5 4L5 12.5H11L11.5 4",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}function KM(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("rect",{x:"3",y:"4.5",width:"10",height:"8.5",rx:"1.5",stroke:"currentColor",strokeWidth:"1.25"}),h.jsx("path",{d:"M3 7H13",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M5.5 3V5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M10.5 3V5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"})]})}function VM(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M6.5 3.5H3.5V12.5H12.5V9.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("path",{d:"M9.5 3.5H12.5M12.5 3.5V6.5M12.5 3.5L7.5 8.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}function YM(e,t,n){switch(e){case"number":return h.jsx("span",{children:typeof t=="number"?t.toLocaleString():String(t??"")});case"date":return h.jsx("span",{children:String(t??"")});case"tag":{const i=(Array.isArray(t)?t:t!=null?[t]:[]).map(a=>String(a));return h.jsx(HM,{values:i})}case"user":{const r=t??{name:""};return h.jsxs("span",{className:"dsn-data-table-cell-user",children:[h.jsx(Oi,{size:"xs",variant:"profile",fill:"initials",initials:r.initials??r.name.slice(0,2).toUpperCase(),name:r.name}),h.jsx("span",{children:r.name})]})}case"boolean":return h.jsx(ka,{size:"sm",checked:!!t,disabled:!0,"aria-label":t?"True value":"False value"});case"checkbox":return h.jsx(Pn,{size:"sm",checked:!!t,showContent:!1,"aria-label":t?"Selected row":"Unselected row",onCheckedChange:n});case"url":return h.jsx("a",{className:"dsn-data-table-cell-link",href:String(t??"#"),children:String(t??"")});case"empty":return h.jsx("span",{className:"dsn-data-table-cell-empty",children:String(t??"Add [field name]")});case"string":default:return h.jsx("span",{children:String(t??"")})}}function GM(e){return e==="string"?h.jsx(me,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(jl,{}),"aria-label":"Copy cell value"}):e==="number"?h.jsxs(Jr,{size:"sm",spaceBetween:!1,"aria-label":"Number cell actions",children:[h.jsx(me,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(qM,{}),"aria-label":"Edit number value"}),h.jsx(me,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Fy,{}),"aria-label":"Delete number value"})]}):e==="date"?h.jsxs(Jr,{size:"sm",spaceBetween:!1,"aria-label":"Date cell actions",children:[h.jsx(me,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(KM,{}),"aria-label":"Open date picker"}),h.jsx(me,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Fy,{}),"aria-label":"Clear date value"})]}):e==="user"?h.jsx(me,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(jl,{}),"aria-label":"Copy user name"}):e==="tag"?h.jsx(me,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(jl,{}),"aria-label":"Copy tags"}):e==="url"?h.jsxs(Jr,{size:"sm",spaceBetween:!1,"aria-label":"URL cell actions",children:[h.jsx(me,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(jl,{}),"aria-label":"Copy URL"}),h.jsx(me,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(VM,{}),"aria-label":"Open URL in new tab"})]}):null}function zy({fieldType:e="string",state:t="default",loading:n=!1,value:r="Label",width:i,onCheckboxChange:a,leadingAccessory:o,align:s="left",className:l,"aria-label":c}){const u=["dsn-data-table-cell",l].filter(Boolean).join(" "),d=t==="hover"&&!n?GM(e):null,f=typeof i=="number"?{width:`${i}px`}:void 0;return h.jsx("div",{className:u,"data-field-type":e,"data-state":t,"data-loading":n||void 0,"data-align":s,"aria-label":c,style:f,children:n?h.jsx("span",{className:"dsn-data-table-cell-skeleton","aria-hidden":"true"}):h.jsxs(h.Fragment,{children:[o&&h.jsx("span",{className:"dsn-data-table-cell-leading-accessory",children:o}),h.jsx("span",{className:"dsn-data-table-cell-content",children:YM(e,r,a)}),d&&h.jsx("span",{className:"dsn-data-table-cell-actions",children:d})]})})}function By(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M8 2.5L13.5 8L8 13.5L2.5 8L8 2.5Z",stroke:"currentColor",strokeWidth:"var(--border-width-medium)",strokeLinejoin:"round"})})}function XM(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M6 6.5H3.5V12.5H9.5V10",stroke:"currentColor",strokeWidth:"var(--border-width-medium)",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("path",{d:"M6.5 3.5H12.5V9.5H6.5V3.5Z",stroke:"currentColor",strokeWidth:"var(--border-width-medium)",strokeLinecap:"round",strokeLinejoin:"round"})]})}function ZM({alignment:e="inline",variant:t="with-title",state:n="default",title:r="Title",description:i="Description",content:a,showIcon:o=!0,icon:s,showActions:l=!0,actionAriaLabel:c="Copy description",onActionClick:u,className:d,"aria-label":f}){const g=t==="with-title",p=a!=null,v=["dsn-data-list-cell",d].filter(Boolean).join(" "),m=p?h.jsx("span",{className:"dsn-data-list-cell-interactive-content",children:a}):h.jsx("p",{className:"dsn-data-list-cell-description",children:i});return h.jsxs("div",{className:v,"data-alignment":e,"data-variant":t,"data-state":n,role:"group","aria-label":f,children:[e==="inline"?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"dsn-data-list-cell-title-wrapper",children:[o&&h.jsx("span",{className:"dsn-data-list-cell-icon","aria-hidden":"true",children:s??h.jsx(By,{})}),g&&h.jsx("p",{className:"dsn-data-list-cell-title",children:r})]}),h.jsx("div",{className:"dsn-data-list-cell-text-block",children:m})]}):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"dsn-data-list-cell-title-description-wrapper",children:h.jsxs("div",{className:"dsn-data-list-cell-title-wrapper",children:[o&&h.jsx("span",{className:"dsn-data-list-cell-icon","aria-hidden":"true",children:s??h.jsx(By,{})}),g&&h.jsx("p",{className:"dsn-data-list-cell-title",children:r})]})}),h.jsx("div",{className:"dsn-data-list-cell-text-block",children:m})]}),l&&h.jsx("span",{className:"dsn-data-list-cell-actions",children:h.jsx(me,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(XM,{}),"aria-label":c,onClick:b=>{b.stopPropagation(),u==null||u(b)}})})]})}function JM(e){if(e.kind==="menu-cell"){const n=e.props??{};return h.jsx(Pi,{variant:e.variant??"default",label:"Label",showLeadingIcon:!0,...n})}if(e.kind==="checkbox-cell"){const n=e.props??{};return h.jsx(Pn,{label:"Label",showLeadingIcon:!0,...n})}const t=e.props??{};return h.jsx(Kd,{label:"Label",showLeadingIcon:!0,...t})}function jy({title:e="Choice list",description:t,sections:n,showHeader:r=!0,showSectionHeaders:i=!0,className:a,sectionClassName:o,enableMenuKeyboardNavigation:s=!1,onMenuEscape:l}){const c=_.useRef(null),u=["dsn-choice-list",a].filter(Boolean).join(" "),d=["dsn-choice-list-section",o].filter(Boolean).join(" "),f=_.useCallback(()=>c.current?Array.from(c.current.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')):[],[]),g=_.useCallback(p=>{const v=f();if(v.length===0)return;const m=Math.min(Math.max(p,0),v.length-1);v.forEach((b,y)=>{b.tabIndex=y===m?0:-1})},[f]);return _.useEffect(()=>{s&&g(0)},[s,n,g]),h.jsxs("section",{ref:c,className:u,"aria-label":e,onKeyDown:p=>{var x,k,w,S;if(!s)return;const v=f();if(v.length===0)return;const m=document.activeElement,b=m?v.indexOf(m):-1,y=b>=0?b:0;if(p.key==="ArrowDown"){p.preventDefault();const N=(y+1)%v.length;g(N),(x=v[N])==null||x.focus();return}if(p.key==="ArrowUp"){p.preventDefault();const N=(y-1+v.length)%v.length;g(N),(k=v[N])==null||k.focus();return}if(p.key==="Home"){p.preventDefault(),g(0),(w=v[0])==null||w.focus();return}if(p.key==="End"){p.preventDefault();const N=v.length-1;g(N),(S=v[N])==null||S.focus();return}p.key==="Escape"&&(p.preventDefault(),l==null||l())},children:[r&&h.jsx("header",{className:"dsn-choice-list-header",children:h.jsx(er,{title:e,description:t,size:"large"})}),h.jsx("div",{className:"dsn-choice-list-sections",children:n.map(p=>h.jsxs("section",{className:d,"aria-label":p.title,children:[i&&h.jsx(er,{title:p.title,size:"small"}),h.jsx("div",{className:"dsn-choice-list-items",children:p.items.map(v=>h.jsx("div",{className:"dsn-choice-list-item",children:JM(v)},v.id))})]},p.id))})]})}function QM({id:e,label:t="Label",checkboxLabel:n="Label",checked:r,defaultChecked:i=!1,disabled:a=!1,helperText:o="Help text",helperIcon:s,error:l=!1,errorMessage:c,required:u=!1,className:d,checkboxProps:f,onCheckedChange:g,"aria-label":p}){const v=_.useId(),b=`${e??`dsn-checkbox-field-${v}`}-helper`,y=r!==void 0,[x,k]=_.useState(i),w=y?r:x,S=l&&c?c:o;function N(C){y||k(C),g==null||g(C)}return h.jsxs("div",{className:["dsn-checkbox-field",d].filter(Boolean).join(" "),"data-error":l||void 0,"data-disabled":a||void 0,children:[h.jsxs("fieldset",{className:"dsn-checkbox-fieldset","aria-label":p,"aria-describedby":S?b:void 0,"aria-invalid":l||void 0,"aria-required":u||void 0,children:[h.jsxs("legend",{className:"dsn-checkbox-field-label",children:[t,u&&h.jsxs("span",{className:"dsn-checkbox-field-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsx("div",{className:"dsn-checkbox-field-control",children:h.jsx(Pn,{className:"dsn-checkbox--full-width",label:n,checked:w,disabled:a,showTrailingIcon:!1,onCheckedChange:N,...f})})]}),S&&h.jsxs("div",{className:"dsn-checkbox-field-meta",children:[s&&h.jsx("span",{className:"dsn-checkbox-field-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-checkbox-field-meta-icon",children:s})}),h.jsx("p",{id:b,className:"dsn-checkbox-field-helper",children:S})]})]})}function RM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M8 2.5L13.5 8L8 13.5L2.5 8L8 2.5Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinejoin:"round"})})}function e2({label:e,description:t,showDescription:n=!0,showIcon:r=!1,iconSlot:i,error:a=!1,labelWidth:o,children:s,className:l}){const c=_.useId(),u=`dsn-horizontal-input-label-${c}`,d=`dsn-horizontal-input-description-${c}`,f=n&&!!t,g=i??h.jsx(RM,{}),p={...o?{"--dsn-horizontal-input-label-width":o}:{}};return h.jsx("div",{className:["dsn-horizontal-input",l].filter(Boolean).join(" "),"data-error":a||void 0,"data-has-icon":r||void 0,style:p,children:h.jsxs("div",{className:"dsn-horizontal-input-row",children:[h.jsxs("div",{className:"dsn-horizontal-input-meta",children:[h.jsxs("div",{className:"dsn-horizontal-input-label-row",children:[r&&h.jsx("span",{className:"dsn-horizontal-input-icon","aria-hidden":"true",children:g}),h.jsx("span",{id:u,className:"dsn-horizontal-input-label",children:e})]}),f&&h.jsx("p",{id:d,className:"dsn-horizontal-input-description",children:t})]}),h.jsx("div",{className:"dsn-horizontal-input-content",role:"group","aria-labelledby":u,"aria-describedby":f?d:void 0,children:s})]})})}const t2=Array.from({length:6},(e,t)=>({id:`option-${t+1}`,label:"Label",checked:!1}));function n2({id:e,label:t="Label",options:n=t2,helperText:r="Help text",helperIcon:i,error:a=!1,errorMessage:o,required:s=!1,disabled:l=!1,className:c,onOptionChange:u,"aria-label":d}){const f=_.useId(),p=`${e??`dsn-multi-choice-${f}`}-helper`,v=a&&o?o:r;return h.jsxs("div",{className:["dsn-multi-choice",c].filter(Boolean).join(" "),"data-error":a||void 0,"data-disabled":l||void 0,children:[h.jsxs("fieldset",{className:"dsn-multi-choice-fieldset","aria-label":d,"aria-describedby":v?p:void 0,"aria-invalid":a||void 0,"aria-required":s||void 0,children:[h.jsxs("legend",{className:"dsn-multi-choice-label",children:[t,s&&h.jsxs("span",{className:"dsn-multi-choice-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsx("div",{className:"dsn-multi-choice-stack",children:n.map(m=>h.jsx(Pn,{className:"dsn-checkbox--full-width",label:m.label,checked:m.checked,disabled:l||m.disabled,showTrailingIcon:!1,showDescription:!!m.description,description:m.description,showDescriptionRight:!!m.descriptionRight,descriptionRight:m.descriptionRight,onCheckedChange:b=>u==null?void 0:u(m.id,b),...m.checkboxProps},m.id))})]}),v&&h.jsxs("div",{className:"dsn-multi-choice-meta",children:[i&&h.jsx("span",{className:"dsn-multi-choice-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-multi-choice-meta-icon",children:i})}),h.jsx("p",{id:p,className:"dsn-multi-choice-helper",children:v})]})]})}const r2=Array.from({length:6},(e,t)=>({id:`option-${t+1}`,label:"Label"}));function i2({id:e,label:t="Label",options:n=r2,value:r,defaultValue:i,helperText:a="Help text",helperIcon:o,error:s=!1,errorMessage:l,required:c=!1,disabled:u=!1,className:d,onValueChange:f,"aria-label":g}){const p=_.useId(),v=e??`dsn-single-choice-${p}`,m=`${v}-legend`,b=`${v}-helper`,y=s&&l?l:a,x=r!==void 0,[k,w]=_.useState(i??""),S=x?r:k;function N(C){x||w(C),f==null||f(C)}return h.jsxs("div",{className:["dsn-single-choice",d].filter(Boolean).join(" "),"data-error":s||void 0,"data-disabled":u||void 0,children:[h.jsxs("fieldset",{className:"dsn-single-choice-fieldset","aria-label":g,"aria-describedby":y?b:void 0,"aria-invalid":s||void 0,"aria-required":c||void 0,children:[h.jsxs("legend",{id:m,className:"dsn-single-choice-label",children:[t,c&&h.jsxs("span",{className:"dsn-single-choice-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsx("div",{className:"dsn-single-choice-stack",role:"radiogroup","aria-labelledby":m,children:n.map(C=>h.jsx(Kd,{className:"dsn-radio--full-width",label:C.label,checked:S===C.id,disabled:u||C.disabled,showTrailingIcon:!1,showDescription:!!C.description,description:C.description,showDescriptionRight:!!C.descriptionRight,descriptionRight:C.descriptionRight,onCheckedChange:E=>{E&&N(C.id)},...C.radioProps},C.id))})]}),y&&h.jsxs("div",{className:"dsn-single-choice-meta",children:[o&&h.jsx("span",{className:"dsn-single-choice-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-single-choice-meta-icon",children:o})}),h.jsx("p",{id:b,className:"dsn-single-choice-helper",children:y})]})]})}function a2({selectedCount:e,onCountClick:t,onDismiss:n,actions:r,className:i}){const a=e===1?"item":"items";return h.jsx("div",{className:`dsn-bulk-action-bar${i?` ${i}`:""}`,role:"toolbar","aria-label":`${e} ${a} selected`,children:h.jsxs("div",{className:"dsn-bulk-action-bar-container",children:[h.jsxs("div",{className:"dsn-bulk-action-bar-selection",role:"group","aria-label":"Selection",children:[h.jsxs(me,{variant:"secondary",size:"md",showLabel:!0,showTrailingIcon:!0,trailingIcon:h.jsx(wr,{size:16,strokeWidth:1.5,"aria-hidden":"true"}),onClick:t,"aria-label":`${e} selected, click to view selection options`,children:[e," selected"]}),h.jsx(me,{variant:"secondary",size:"md",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Qn,{size:16,strokeWidth:1.5,"aria-hidden":"true"}),onClick:n,"aria-label":"Clear selection"})]}),h.jsx(Jr,{size:"md",spaceBetween:!0,"aria-label":"Bulk actions",children:r.map((o,s)=>h.jsx(me,{variant:"secondary",size:"md",showLeadingIcon:o.icon!=null,leadingIcon:o.icon,showLabel:!0,showTrailingIcon:o.hasDropdown,trailingIcon:o.hasDropdown?h.jsx(wr,{size:16,strokeWidth:1.5,"aria-hidden":"true"}):void 0,destructive:o.destructive,disabled:o.disabled,onClick:o.onClick,"aria-haspopup":o.hasDropdown?"menu":void 0,"aria-label":o["aria-label"],children:o.label},s))})]})})}const o2=Array.from({length:8},(e,t)=>({id:`option-${t+1}`,label:"Label"}));function s2({id:e,label:t="Label",options:n=o2,value:r,defaultValue:i=[],helperText:a="Help text",helperIcon:o,error:s=!1,errorMessage:l,required:c=!1,disabled:u=!1,size:d="md",className:f,onValueChange:g,"aria-label":p}){const v=_.useId(),b=`${e??`dsn-chip-field-${v}`}-helper`,y=s&&l?l:a,x=r!==void 0,[k,w]=_.useState(i),S=x?r:k,N=new Set(S);function C(E){const T=N.has(E)?S.filter(O=>O!==E):[...S,E];x||w(T),g==null||g(T)}return h.jsxs("div",{className:["dsn-chip-field",f].filter(Boolean).join(" "),"data-error":s||void 0,"data-disabled":u||void 0,children:[h.jsxs("fieldset",{className:"dsn-chip-fieldset","aria-label":p,"aria-describedby":y?b:void 0,"aria-invalid":s||void 0,"aria-required":c||void 0,children:[h.jsxs("legend",{className:"dsn-chip-field-label",children:[t,c&&h.jsxs("span",{className:"dsn-chip-field-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsx(Fl,{label:t,className:"dsn-chip-field-group",children:n.map(E=>h.jsx(Io,{label:E.label,size:d,selected:N.has(E.id),disabled:u||E.disabled,onClick:()=>C(E.id),...E.chipProps},E.id))})]}),y&&h.jsxs("div",{className:"dsn-chip-field-meta",children:[o&&h.jsx("span",{className:"dsn-chip-field-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-chip-field-meta-icon",children:o})}),h.jsx("p",{id:b,className:"dsn-chip-field-helper",children:y})]})]})}function zo(e,t,n){return Math.min(n,Math.max(t,e))}function Na(e,t,n,r){if(r<=0)return zo(e,t,n);const i=t+Math.round((e-t)/r)*r,a=zo(i,t,n);return Number(a.toFixed(6))}function Jd(e,t,n,r){const i=Na(e[0],t,n,r),a=Na(e[1],t,n,r);return[Math.min(i,a),Math.max(i,a)]}function Qd(e){const r=72+e.length*9;return zo(r,104,184)}function l2({id:e,mode:t="single",stack:n="vertical",showInput:r=!1,value:i,defaultValue:a,rangeValue:o,defaultRangeValue:s,min:l=0,max:c=100,step:u=1,disabled:d=!1,showValue:f=!0,showMinMax:g=!1,minLabel:p,maxLabel:v,minInputLabel:m="Minimum",maxInputLabel:b="Maximum",className:y,onValueChange:x,onRangeChange:k,valueFormatter:w=O=>String(O),minHandleAriaLabel:S="Minimum value",maxHandleAriaLabel:N="Maximum value","aria-label":C,"aria-labelledby":E,"aria-valuetext":T}){const O=_.useId(),P=e??`dsn-slider-${O}`,M=Math.min(l,c),$=Math.max(l,c),L=u>0?u:1,z=t==="single",j=n==="vertical",B=i!==void 0,H=o!==void 0,[F,D]=_.useState(()=>Na(a??M,M,$,L)),[U,V]=_.useState(()=>Jd(s??[M,$],M,$,L)),[Y,G]=_.useState(!1),[R,te]=_.useState("single"),le=_.useRef(null),W=_.useRef(null),Z=B?Na(i,M,$,L):F,I=H?Jd(o,M,$,L):U,A=_.useMemo(()=>$<=M?0:(Z-M)/($-M)*100,[Z,M,$]),q=_.useMemo(()=>{if($<=M)return{minPct:0,maxPct:0};const pe=(I[0]-M)/($-M)*100,Pe=(I[1]-M)/($-M)*100;return{minPct:pe,maxPct:Pe}},[I,M,$]);function Q(pe){const Pe=Na(pe,M,$,L);B||D(Pe),x==null||x(Pe)}function de(pe){const Pe=Jd(pe,M,$,L);H||V(Pe),k==null||k(Pe)}function ne(pe,Pe){const Et=Na(Pe,M,$,L);if(pe==="min"){de([Math.min(Et,I[1]),I[1]]);return}de([I[0],Math.max(Et,I[0])])}function he(pe,Pe,Et){const yt=Pe.getBoundingClientRect(),ae=yt.width||1,ve=(pe-yt.left)/ae,ge=zo(ve,0,1),Ne=M+ge*($-M);if(z){Q(Ne);return}ne(Et??(R==="max"?"max":"min"),Ne)}function xe(pe){if(d)return;const Pe=pe.currentTarget;if(z)te("single");else{const Et=Pe.getBoundingClientRect(),yt=Et.width||1,ae=zo((pe.clientX-Et.left)/yt,0,1),ve=M+ae*($-M),ge=Math.abs(ve-I[0]),Ne=Math.abs(ve-I[1]),bt=ge<=Ne?"min":"max";te(bt),Pe.setPointerCapture(pe.pointerId),G(!0),he(pe.clientX,Pe,bt);return}Pe.setPointerCapture(pe.pointerId),G(!0),he(pe.clientX,Pe)}function Ye(pe){d||!Y||he(pe.clientX,pe.currentTarget)}function Ge(pe){pe.currentTarget.hasPointerCapture(pe.pointerId)&&(pe.currentTarget.releasePointerCapture(pe.pointerId),G(!1))}function ut(pe){if(d)return;const Pe=L*10,yt=pe.currentTarget.getAttribute("data-handle")??"single",ae=yt==="min"?I[0]:yt==="max"?I[1]:Z;function ve(ge){yt==="min"||yt==="max"?ne(yt,ge):Q(ge)}switch(pe.key){case"ArrowRight":case"ArrowUp":pe.preventDefault(),ve(ae+L);break;case"ArrowLeft":case"ArrowDown":pe.preventDefault(),ve(ae-L);break;case"PageUp":pe.preventDefault(),ve(ae+Pe);break;case"PageDown":pe.preventDefault(),ve(ae-Pe);break;case"Home":pe.preventDefault(),ve(M);break;case"End":pe.preventDefault(),ve($);break}}const je=p??w(M),We=v??w($),nt=T??w(Z),rt=`${w(I[0])} - ${w(I[1])}`,mt=q.minPct,$e=q.maxPct-q.minPct,Ct=f&&(z||!r),At=Qd(w(Z)),Re=Qd(w(I[0])),Yr=Qd(w(I[1]));function Xn(){var Pe;const pe=(Pe=W.current)==null?void 0:Pe.querySelector("input");pe instanceof HTMLInputElement&&(pe.focus(),pe.select())}function Vt(pe){pe.key==="Enter"&&(pe.preventDefault(),Xn())}return h.jsxs("div",{className:["dsn-slider",y].filter(Boolean).join(" "),id:P,"data-disabled":d||void 0,"data-stack":n,children:[Ct&&h.jsx("div",{className:"dsn-slider-value",children:z?w(Z):rt}),r&&z&&j&&h.jsx(Ai,{value:Z,min:M,max:$,step:L,disabled:d,onChange:pe=>{pe!==null&&Q(pe)},"aria-label":C??"Slider value"}),r&&!z&&j&&h.jsxs("div",{className:"dsn-slider-input-row",children:[h.jsx("div",{ref:le,onKeyDown:Vt,children:h.jsx(Ai,{label:m,value:I[0],min:M,max:I[1],step:L,disabled:d,onChange:pe=>{pe!==null&&ne("min",pe)},"aria-label":S})}),h.jsx("div",{ref:W,children:h.jsx(Ai,{label:b,value:I[1],min:I[0],max:$,step:L,disabled:d,onChange:pe=>{pe!==null&&ne("max",pe)},"aria-label":N})})]}),h.jsxs("div",{className:"dsn-slider-main-row",children:[r&&!z&&!j&&h.jsx("div",{ref:le,onKeyDown:Vt,style:{width:`${Re}px`},children:h.jsx(Ai,{className:"dsn-slider-inline-input",value:I[0],min:M,max:I[1],step:L,disabled:d,onChange:pe=>{pe!==null&&ne("min",pe)},"aria-label":S})}),h.jsxs("div",{className:"dsn-slider-track",onPointerDown:xe,onPointerMove:Ye,onPointerUp:Ge,onPointerCancel:Ge,onLostPointerCapture:()=>G(!1),children:[h.jsx("div",{className:"dsn-slider-bar"}),h.jsx("div",{className:"dsn-slider-range",style:z?{width:`${A}%`}:{left:`${mt}%`,width:`${$e}%`}}),h.jsx("div",{className:"dsn-slider-handle-wrap",style:{left:`${z?A:mt}%`},children:h.jsx("div",{role:"slider",tabIndex:d?-1:0,className:"dsn-slider-handle","data-handle":z?"single":"min","data-dragging":Y&&R===(z?"single":"min")?!0:void 0,"aria-disabled":d||void 0,"aria-valuemin":M,"aria-valuemax":z?$:I[1],"aria-valuenow":z?Z:I[0],"aria-valuetext":z?nt:w(I[0]),"aria-label":z?C??"Slider value":S,"aria-labelledby":z?E:void 0,onKeyDown:ut})}),!z&&h.jsx("div",{className:"dsn-slider-handle-wrap",style:{left:`${q.maxPct}%`},children:h.jsx("div",{role:"slider",tabIndex:d?-1:0,className:"dsn-slider-handle","data-handle":"max","data-dragging":Y&&R==="max"?!0:void 0,"aria-disabled":d||void 0,"aria-valuemin":I[0],"aria-valuemax":$,"aria-valuenow":I[1],"aria-valuetext":w(I[1]),"aria-label":N,onKeyDown:ut})})]}),r&&z&&!j&&h.jsx("div",{style:{width:`${At}px`},children:h.jsx(Ai,{className:"dsn-slider-inline-input",value:Z,min:M,max:$,step:L,disabled:d,onChange:pe=>{pe!==null&&Q(pe)},"aria-label":C??"Slider value"})}),r&&!z&&!j&&h.jsx("div",{ref:W,style:{width:`${Yr}px`},children:h.jsx(Ai,{className:"dsn-slider-inline-input",value:I[1],min:I[0],max:$,step:L,disabled:d,onChange:pe=>{pe!==null&&ne("max",pe)},"aria-label":N})})]}),g&&h.jsxs("div",{className:"dsn-slider-minmax","aria-hidden":"true",children:[h.jsx("span",{children:je}),h.jsx("span",{children:We})]})]})}const c2=3e3,u2=200;function d2(e){switch(e){case"success":return h.jsx(_y,{size:16,"aria-hidden":"true"});case"warning":return h.jsx(Ny,{size:16,"aria-hidden":"true"});case"error":return h.jsx(Fd,{size:16,"aria-hidden":"true"});case"default":default:return h.jsx(Bd,{size:16,"aria-hidden":"true"})}}function f2({variant:e="inline",severity:t="default",title:n,description:r,actionLabel:i,onAction:a,dismissible:o=!0,dismissLabel:s="Dismiss notification",onDismiss:l,icon:c,className:u}){const[d,f]=_.useState(!0),[g,p]=_.useState(!1),v=_.useRef(null),m=_.useRef(null),b=_.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]),y=_.useCallback(()=>{b(),!g&&(v.current=setTimeout(()=>{p(!0)},c2))},[b,g]);_.useEffect(()=>(y(),()=>{b()}),[b,y]),_.useEffect(()=>{if(g)return b(),m.current=setTimeout(()=>{f(!1),l==null||l()},u2),()=>{m.current&&(clearTimeout(m.current),m.current=null)}},[b,g,l]);const x=t==="error"?"assertive":"polite",k=t==="error"?"alert":"status",w=e==="rich"&&!!r;return d?h.jsxs("div",{className:["dsn-toast",u].filter(Boolean).join(" "),"data-severity":t,"data-variant":e,"data-state":g?"exit":"enter",role:k,"aria-live":x,"aria-atomic":"true",onMouseEnter:b,onMouseLeave:y,children:[h.jsx("span",{className:"dsn-toast-icon","aria-hidden":"true",children:c??d2(t)}),h.jsxs("div",{className:"dsn-toast-content",children:[h.jsx("div",{className:"dsn-toast-title",children:n}),w?h.jsx("div",{className:"dsn-toast-description",children:r}):null]}),i?h.jsx(me,{className:"dsn-toast-action",variant:"secondary",size:"sm",onClick:a,children:i}):null,o?h.jsx(me,{className:"dsn-toast-dismiss",variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Qn,{size:16,"aria-hidden":"true"}),"aria-label":s,onClick:()=>p(!0)}):null]}):null}function h2(e){switch(e){case"success":return h.jsx(_y,{size:16,"aria-hidden":"true"});case"warning":return h.jsx(Ny,{size:16,"aria-hidden":"true"});case"error":return h.jsx(Fd,{size:16,"aria-hidden":"true"});case"default":default:return h.jsx(Bd,{size:16,"aria-hidden":"true"})}}function p2({severity:e="default",title:t,description:n,icon:r,content:i,actions:a,supporting:o,dismissible:s=!0,dismissLabel:l="Dismiss callout",onDismiss:c,className:u}){const d=!!i,f=!!a||!!o,g=e==="error"?"alert":"status",p=e==="error"?"assertive":"polite";return h.jsxs("section",{className:["dsn-callout",u].filter(Boolean).join(" "),"data-severity":e,role:g,"aria-live":p,"aria-atomic":"true",children:[h.jsxs("div",{className:"dsn-callout-header",children:[h.jsx("span",{className:"dsn-callout-icon","aria-hidden":"true",children:r??h2(e)}),h.jsxs("div",{className:"dsn-callout-text",children:[h.jsx("p",{className:"dsn-callout-title",children:t}),n?h.jsx("p",{className:"dsn-callout-description",children:n}):null]}),s?h.jsx(me,{className:"dsn-callout-dismiss",variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Qn,{size:16,"aria-hidden":"true"}),"aria-label":l,onClick:c}):null]}),d?h.jsx("div",{className:"dsn-callout-content",children:i}):null,f?h.jsxs("div",{className:"dsn-callout-footer",children:[h.jsx("div",{className:"dsn-callout-supporting",children:o}),h.jsx("div",{className:"dsn-callout-actions",children:a})]}):null]})}function g2({title:e,description:t,disclosure:n="left",bordered:r=!1,expanded:i,defaultExpanded:a=!1,disabled:o=!1,children:s,className:l,contentClassName:c,onExpandedChange:u}){const d=_.useId(),f=`dsn-accordion-trigger-${d}`,g=`dsn-accordion-content-${d}`,p=i!==void 0,[v,m]=_.useState(a),b=p?i:v,y=["dsn-accordion",l].filter(Boolean).join(" "),x=["dsn-accordion-content-inner",c].filter(Boolean).join(" "),k=h.jsx(wr,{size:16,"aria-hidden":"true"});function w(N){p||m(N),u==null||u(N)}function S(){return h.jsx("span",{className:"dsn-accordion-disclosure-icon",children:k})}return h.jsxs("div",{className:y,"data-bordered":r||void 0,"data-expanded":b||void 0,"data-disclosure":n,"data-disabled":o||void 0,children:[h.jsx("button",{id:f,type:"button",className:"dsn-accordion-trigger","aria-expanded":b,"aria-controls":g,disabled:o,onClick:()=>w(!b),children:h.jsx(er,{title:e,description:t,size:"medium",leadingControl:n==="left"?S():void 0,trailingControl:n==="right"?S():void 0,className:"dsn-accordion-section-header"})}),b&&h.jsx("div",{id:g,role:"region","aria-labelledby":f,className:"dsn-accordion-content",children:h.jsx("div",{className:x,children:s})})]})}function Wy({page:e,selected:t=!1,disabled:n=!1,onClick:r,className:i}){return h.jsx("button",{type:"button",className:`dsn-page-selector${i?` ${i}`:""}`,"data-selected":t||void 0,disabled:n,"aria-current":t?"page":void 0,onClick:n?void 0:r,children:h.jsx("span",{className:"dsn-page-selector-number",children:e})})}function v2(e,t){if(t<=0)return[];const n=new Set([1,t]);for(let o=Math.max(1,e-1);o<=Math.min(t,e+1);o++)n.add(o);const r=Array.from(n).sort((o,s)=>o-s),i=[];let a=0;for(let o=0;o<r.length;o++){if(o>0){const s=r[o]-r[o-1];s===2?i.push(r[o-1]+1):s>2&&(i.push(a===0?"ellipsis-start":"ellipsis-end"),a++)}i.push(r[o])}return i}function Uy({page:e,totalPages:t,onPageChange:n,totalRecords:r,pageSize:i,rowsPerPage:a,rowsPerPageOptions:o=[10,25,50,100],onRowsPerPageChange:s,className:l}){const c=v2(e,t),[u,d]=_.useState(!1),f=_.useRef(null);_.useEffect(()=>{if(!u)return;const p=v=>{f.current&&!f.current.contains(v.target)&&d(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[u]);let g=null;if(r!==void 0&&i!==void 0){const p=(e-1)*i+1,v=Math.min(e*i,r);g=`${p}–${v} of ${r}`}return h.jsxs("nav",{className:`dsn-pagination${l?` ${l}`:""}`,"aria-label":"Pagination",children:[a!==void 0&&h.jsx("div",{className:"dsn-pagination-meta",children:h.jsxs("div",{className:"dsn-pagination-rows",children:[h.jsxs("div",{ref:f,className:"dsn-pagination-rows-trigger",children:[h.jsx(me,{variant:"ghost",size:"sm",showTrailingIcon:!0,trailingIcon:h.jsx(wr,{size:16,strokeWidth:1.5}),"aria-label":"Rows per page","aria-haspopup":"menu","aria-expanded":u,onClick:()=>d(p=>!p),children:a}),u&&h.jsx(Sr,{role:"menu","aria-label":"Rows per page options",anchorRef:f,offset:4,viewportMargin:16,contentPadding:"small",content:h.jsx("div",{children:o.map(p=>h.jsx(Pi,{label:String(p),fullWidth:!0,showLeadingIcon:!1,showTrailingIcon:a===p,selected:a===p,"aria-label":String(p),onClick:()=>{s==null||s(p),d(!1)}},p))})})]}),h.jsx("span",{className:"dsn-pagination-rows-label",children:"Rows per page"})]})}),h.jsxs("div",{className:"dsn-pagination-controls",children:[g&&h.jsx("span",{className:"dsn-pagination-summary","aria-live":"polite","aria-atomic":"true",children:g}),h.jsx(me,{variant:"ghost",size:"md",showLeadingIcon:!0,leadingIcon:h.jsx(lT,{size:16,strokeWidth:1.5}),showLabel:!1,disabled:e<=1,"aria-label":"Go to previous page","aria-disabled":e<=1,onClick:()=>n(e-1)}),h.jsx("div",{className:"dsn-pagination-pages",role:"group","aria-label":"Pages",children:c.map(p=>p==="ellipsis-start"||p==="ellipsis-end"?h.jsx(me,{variant:"ghost",size:"md",showLeadingIcon:!0,leadingIcon:h.jsx(fT,{size:16,strokeWidth:1.5}),showLabel:!1,"aria-label":"More pages",className:"dsn-pagination-ellipsis"},p):h.jsx(Wy,{page:p,selected:p===e,onClick:()=>n(p)},p))}),h.jsx(me,{variant:"ghost",size:"md",showLeadingIcon:!0,leadingIcon:h.jsx($i,{size:16,strokeWidth:1.5}),showLabel:!1,disabled:e>=t,"aria-label":"Go to next page","aria-disabled":e>=t,onClick:()=>n(e+1)})]})]})}function m2(e,t,n){return!n||t<3?!1:e>t}function y2({items:e,maxVisibleItems:t=4,showEllipsis:n=!0,ellipsisLabel:r="...",ellipsisAriaLabel:i="Show more breadcrumbs",separator:a,className:o,"aria-label":s="Breadcrumb",onItemClick:l}){const[c,u]=_.useState(!1),d="sm",f=a??h.jsx($i,{size:16,"aria-hidden":"true"}),g=["dsn-breadcrumbs",o].filter(Boolean).join(" "),p=_.useMemo(()=>{const m=e.map((w,S)=>({type:"item",item:w,index:S}));if(!m2(e.length,t,n)||c)return m;const y=m[0],x=Math.max(1,t-2),k=m.slice(-x);return[y,{type:"ellipsis"},...k]},[c,e,t,n]);function v(m,b,y){var x;(x=b.onClick)==null||x.call(b,m,b,y),l==null||l(m,b,y)}return h.jsx("nav",{className:g,"aria-label":s,children:h.jsx("ol",{className:"dsn-breadcrumbs-list",children:p.map((m,b)=>{const y=b===p.length-1;if(m.type==="ellipsis")return h.jsxs("li",{className:"dsn-breadcrumbs-item",children:[h.jsx(me,{variant:"plain",size:d,"aria-label":i,onClick:()=>u(!0),children:r}),y?null:h.jsx("span",{className:"dsn-breadcrumbs-separator","aria-hidden":"true",children:f})]},`ellipsis-${b}`);const{item:x,index:k}=m,w=k===e.length-1;return h.jsxs("li",{className:"dsn-breadcrumbs-item",children:[w?h.jsx("span",{className:"dsn-breadcrumbs-current","aria-current":"page",children:x.label}):x.href&&!x.disabled?h.jsx("a",{className:"dsn-breadcrumbs-link",href:x.href,"aria-label":x.ariaLabel,onClick:S=>v(S,x,k),children:x.label}):h.jsx(me,{variant:"plain",size:d,disabled:x.disabled,"aria-label":x.ariaLabel,onClick:S=>v(S,x,k),children:x.label}),y?null:h.jsx("span",{className:"dsn-breadcrumbs-separator","aria-hidden":"true",children:f})]},x.id??`${k}-${String(x.label)}`)})})})}function b2(e,t,n){return!n||t<3?!1:e>t}function x2(e,t,n){return e.variant?e.variant:t===n-1?"current":"previous"}function Hy({items:e,maxVisibleItems:t=4,showEllipsis:n=!0,ellipsisLabel:r="...",ellipsisAriaLabel:i="Show more breadcrumbs",className:a,"aria-label":o="Breadcrumb",onItemClick:s}){const[l,c]=_.useState(!1),u=["dsn-breadcrumbs dsn-breadcrumbs-controller",a].filter(Boolean).join(" "),d=_.useMemo(()=>{const g=e.map((y,x)=>({type:"item",item:y,index:x}));if(!b2(e.length,t,n)||l)return g;const v=g[0],m=Math.max(1,t-2),b=g.slice(-m);return[v,{type:"ellipsis"},...b]},[l,e,t,n]);function f(g,p,v){var m;(m=p.onClick)==null||m.call(p,g,p,v),s==null||s(g,p,v)}return h.jsx("nav",{className:u,"aria-label":o,children:h.jsx("ol",{className:"dsn-breadcrumbs-list",children:d.map((g,p)=>{const v=p===d.length-1;if(g.type==="ellipsis")return h.jsxs("li",{className:"dsn-breadcrumbs-item",children:[h.jsx("button",{type:"button",className:"dsn-breadcrumbs-controller-trigger dsn-breadcrumbs-controller-trigger-ellipsis","aria-label":i,onClick:()=>c(!0),children:h.jsx("span",{className:"dsn-breadcrumbs-controller-label",children:r})}),v?null:h.jsx("span",{className:"dsn-breadcrumbs-separator","aria-hidden":"true",children:h.jsx($i,{size:16})})]},`ellipsis-${p}`);const{item:m,index:b}=g,y=x2(m,b,e.length),x=y==="ellipsis"?r:m.label,k=y==="current",w=m.showDisclosure??y!=="ellipsis";return h.jsxs("li",{className:"dsn-breadcrumbs-item",children:[k?h.jsxs("span",{className:"dsn-breadcrumbs-controller-current","aria-current":"page",children:[h.jsx("span",{className:"dsn-breadcrumbs-controller-label",children:x}),w?h.jsx("span",{className:"dsn-breadcrumbs-controller-disclosure","aria-hidden":"true",children:h.jsx(wr,{size:16})}):null]}):h.jsxs("button",{type:"button",className:"dsn-breadcrumbs-controller-trigger",disabled:m.disabled,"aria-label":m.ariaLabel,onClick:S=>f(S,m,b),children:[h.jsx("span",{className:"dsn-breadcrumbs-controller-label",children:x}),w?h.jsx("span",{className:"dsn-breadcrumbs-controller-disclosure","aria-hidden":"true",children:h.jsx(wr,{size:16})}):null]}),v?null:h.jsx("span",{className:"dsn-breadcrumbs-separator","aria-hidden":"true",children:h.jsx($i,{size:16})})]},m.id??`${b}-${String(x)}`)})})})}function Wl({variant:e="full",label:t="Label",showIcon:n=!0,icon:r,showAvatar:i=!1,avatarProps:a,showBadge:o=!1,badgeCount:s=3,badgeVariant:l="highlight-strong",showDisclosure:c=!1,showRightButton:u=!1,rightButton:d,selected:f=!1,disabled:g=!1,onClick:p,className:v,"aria-label":m}){const b=e==="icon",y=["dsn-sidebar-selector",v].filter(Boolean).join(" "),x=m??(b?t:void 0);return h.jsxs("div",{className:y,"data-variant":e,"data-selected":f||void 0,"data-disabled":g||void 0,children:[h.jsxs("button",{type:"button",className:"dsn-sidebar-selector-container",disabled:g,"aria-label":x,onClick:p,children:[n&&!i&&h.jsx("span",{className:"dsn-sidebar-selector-icon-wrap","aria-hidden":"true",children:r??h.jsx(Rn,{})}),i&&h.jsx("span",{className:"dsn-sidebar-selector-avatar-wrap",children:h.jsx(Oi,{size:"xs",variant:"organization",fill:"initials",initials:"AA",name:"Avatar",...a})}),!b&&h.jsx("span",{className:"dsn-sidebar-selector-label-wrap",children:h.jsx("span",{className:"dsn-sidebar-selector-label",children:t})}),!b&&o&&h.jsx("span",{className:"dsn-sidebar-selector-badge-wrap",children:h.jsx(Do,{size:"sm",variant:l,count:s})}),!b&&c&&h.jsx("span",{className:"dsn-sidebar-selector-disclosure","aria-hidden":"true",children:h.jsx(cT,{size:16})}),!b&&u&&d&&h.jsx("span",{className:"dsn-sidebar-selector-action-wrap",onClick:k=>k.stopPropagation(),onKeyDown:k=>k.stopPropagation(),children:d})]}),f&&h.jsx("span",{className:"dsn-sidebar-selector-rail","aria-hidden":"true"})]})}function _2({size:e="default",className:t,hasPicture:n=!0,picture:r,hasTitle:i=!0,title:a="Title",hasSubtitle:o=!0,subtitle:s="Subtitle.",hasActions:l=!0,showMainCta:c=!0,mainCtaLabel:u="Button",onMainCtaClick:d,showSecondaryOption:f=!0,secondaryOptionLabel:g="Button",onSecondaryOptionClick:p,showTertiaryOption:v=!0,tertiaryOptionLabel:m="Button",onTertiaryOptionClick:b,showLink:y=!0,linkLabel:x="Button",onLinkClick:k,showHelpText:w=!0,helpText:S="Help text"}){const N=["dsn-empty-state",t].filter(Boolean).join(" "),C=e==="small"?"sm":"md",E=c||f||v||y||w;return h.jsx("div",{className:N,"data-size":e,children:h.jsxs("div",{className:"dsn-empty-state-content",children:[n?h.jsx("div",{className:"dsn-empty-state-picture","aria-hidden":"true",children:r}):null,(i||o)&&h.jsxs("div",{className:"dsn-empty-state-copy",children:[i?h.jsx("p",{className:"dsn-empty-state-title",children:a}):null,o?h.jsx("p",{className:"dsn-empty-state-subtitle",children:s}):null]}),l&&E?h.jsxs("div",{className:"dsn-empty-state-actions",children:[c?h.jsx(me,{variant:"primary",size:C,onClick:d,children:u}):null,f?h.jsx(me,{variant:"secondary",size:C,onClick:p,children:g}):null,v?h.jsx(me,{variant:"ghost",size:C,onClick:b,children:m}):null,y?h.jsx(me,{variant:"plain",size:"sm",onClick:k,children:x}):null,w?h.jsx("p",{className:"dsn-empty-state-help-text",children:S}):null]}):null]})})}function oe(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function qy(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const An=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,w2=An&&"documentMode"in document?document.documentMode:null,Ln=An&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Rr=An&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Ul=!(!An||!("InputEvent"in window)||w2)&&"getTargetRanges"in new window.InputEvent("input"),Hl=An&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Bo=An&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,k2=An&&/Android/.test(navigator.userAgent),Ky=An&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Rd=An&&k2&&Ky,ql=An&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Ln&&!Ky,S2=0,N2=1,C2=2,Vy=128,E2=1,T2=2,M2=3,$2=4,O2=5,P2=6,jo=Hl||Bo||ql?" ":"​",Kl=`
251
+ */const er=we("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function ZT({size:e="md",variant:t="secondary",children:n,leadingIcon:r,disabled:i=!1,loading:a=!1,triggerIcon:o,onMainClick:s,onDropdownClick:l,dropdownAriaLabel:c="More options",className:u}){const d=o??h.jsx(Sr,{size:16,strokeWidth:1.5,"aria-hidden":"true"});return h.jsxs("div",{className:`dsn-split-button${u?` ${u}`:""}`,"data-size":e,role:"group",children:[h.jsx(ve,{variant:t,size:e,showLeadingIcon:r!=null,leadingIcon:r,disabled:i,loading:a,onClick:s,children:n}),h.jsx(ve,{variant:t,size:e,showLabel:!1,showLeadingIcon:!0,leadingIcon:d,disabled:i||a,"aria-label":c,"aria-haspopup":"true",onClick:l})]})}function Di({size:e="md",variant:t="profile",fill:n="initials",src:r,initials:i,icon:a,name:o,alt:s,className:l,style:c}){const u=["dsn-avatar",l].filter(Boolean).join(" "),d=o??void 0,f=o?void 0:!0,g=i?i.trim().slice(0,2).toUpperCase():void 0;return h.jsxs("div",{className:u,"data-size":e,"data-variant":t,"data-fill":n,role:"img","aria-label":d,"aria-hidden":f,style:c,children:[n==="picture"&&r&&h.jsx("img",{className:"dsn-avatar-image",src:r,alt:s??o??""}),n==="initials"&&g,n==="icon"&&h.jsx("span",{className:"dsn-avatar-icon","aria-hidden":"true",children:(()=>{const p=a??(t==="organization"?kT:XT);return h.jsx(p,{"aria-hidden":"true"})})()})]})}function JT({size:e="sm",avatars:t,maxVisible:n=5,className:r,"aria-label":i}){const a=t.slice(0,n),o=t.length-a.length,s=i??(()=>{const c=t.map(d=>d.name);return c.length<=n?c.join(", "):`${c.slice(0,n).join(", ")}, and ${o} ${o===1?"other":"others"}`})(),l=["dsn-avatar-group",r].filter(Boolean).join(" ");return h.jsxs("div",{className:l,"data-size":e,role:"group","aria-label":s,children:[a.map((c,u)=>h.jsx(Di,{size:e,variant:c.variant??"profile",fill:c.fill??(c.src?"picture":c.initials?"initials":"icon"),src:c.src,initials:c.initials,name:c.name,style:{zIndex:u+1}},u)),o>0&&h.jsxs("span",{className:"dsn-avatar-group-overflow","aria-hidden":"true",style:{zIndex:a.length+1},children:["+",o]})]})}function Uo({size:e="sm",variant:t="highlight-soft",count:n,className:r,"aria-label":i}){const a=e==="dot",o=a?void 0:n!==void 0?n>99?"99+":String(n):void 0,s=["dsn-badge",r].filter(Boolean).join(" ");return h.jsx("span",{className:s,"data-size":e,"data-variant":t,"aria-label":i,"aria-hidden":a&&!i?!0:void 0,children:o})}function QT({title:e,value:t,variant:n="default",className:r,"aria-label":i}){const a=["dsn-stat",r].filter(Boolean).join(" ");return h.jsxs("div",{className:a,"data-variant":n,"aria-label":i,children:[h.jsx("p",{className:"dsn-stat-title",children:e}),h.jsx("p",{className:"dsn-stat-value",children:t})]})}function Nr({label:e,variant:t="neutral",size:n="md",iconLeft:r,iconRight:i,showIcon:a=!0,className:o,"aria-label":s}){const l=["dsn-tag",o].filter(Boolean).join(" "),c=n==="sm"?10:12;return h.jsxs("span",{className:l,"data-variant":t,"data-size":n,role:"status","aria-label":s,children:[a&&r&&(()=>{const u=r;return h.jsx("span",{className:"dsn-tag-icon dsn-tag-icon-left","aria-hidden":"true",children:h.jsx(u,{size:c,"aria-hidden":"true"})})})(),h.jsx("span",{className:"dsn-tag-label",children:e}),a&&i&&(()=>{const u=i;return h.jsx("span",{className:"dsn-tag-icon dsn-tag-icon-right","aria-hidden":"true",children:h.jsx(u,{size:c,"aria-hidden":"true"})})})()]})}function Ho({label:e,selected:t=!1,disabled:n=!1,size:r="md",leadingIcon:i,trailingIcon:a,showLeadingIcon:o=!0,showTrailingIcon:s=!0,onDismiss:l,onClick:c,className:u,"aria-label":d}){const f=["dsn-chip",u].filter(Boolean).join(" ");function g(p){(p.key===" "||p.key==="Enter")&&!n&&(p.preventDefault(),c==null||c())}return h.jsxs("div",{role:"checkbox","aria-checked":t,"aria-disabled":n?!0:void 0,tabIndex:n?-1:0,className:f,"data-size":r,"data-selected":t,onClick:n?void 0:c,onKeyDown:g,"aria-label":d,children:[o&&h.jsx("span",{className:"dsn-chip-leading","aria-hidden":"true","data-icon":i?"custom":void 0,children:i&&(()=>{const p=i;return h.jsx(p,{size:12,"aria-hidden":"true"})})()}),h.jsx("span",{className:"dsn-chip-label",children:e}),l?h.jsx("button",{type:"button",className:"dsn-chip-dismiss","aria-label":`Remove ${e}`,tabIndex:n?-1:0,onClick:p=>{p.stopPropagation(),n||l()},children:h.jsx(er,{size:12,"aria-hidden":"true"})}):s?h.jsx("span",{className:"dsn-chip-trailing","aria-hidden":"true","data-icon":a?"custom":void 0,children:a&&(()=>{const p=a;return h.jsx(p,{size:12,"aria-hidden":"true"})})()}):null]})}function Gl({label:e,children:t,className:n}){const r=["dsn-chip-group",n].filter(Boolean).join(" ");return h.jsx("div",{role:"group","aria-label":e,className:r,children:t})}const RT="https://images.unsplash.com/photo-1541701494587-cb58502866ab?auto=format&fit=crop&w=512&q=80";function eM(e){switch(e){case"xxSmall":return 12;case"xSmall":case"small":case"medium":return 16;case"large":case"xLarge":return 24;case"xxLarge":return 48;default:return 16}}function Xd({variant:e="file",size:t="xxSmall",imageSrc:n,imageAlt:r="Image thumbnail",icon:i,className:a,"aria-label":o}){const s=["dsn-file-thumbnail",a].filter(Boolean).join(" "),l=eM(t),c=n??RT;return h.jsxs("span",{className:s,"data-variant":e,"data-size":t,role:"img","aria-label":o??(e==="image"?r:"File thumbnail"),children:[e==="image"?h.jsx("img",{src:c,alt:"",className:"dsn-file-thumbnail-image","aria-hidden":"true"}):null,e==="file"?h.jsx("span",{className:"dsn-file-thumbnail-icon","aria-hidden":"true",children:i??h.jsx(Py,{size:l,strokeWidth:1.75,"aria-hidden":"true"})}):null]})}function $a({checked:e,onChange:t,disabled:n=!1,size:r="md",id:i,className:a,"aria-label":o,"aria-labelledby":s}){const l=["dsn-switcher",a].filter(Boolean).join(" ");function c(){t==null||t(!e)}return h.jsx("button",{type:"button",role:"switch",id:i,"aria-checked":e,"aria-disabled":n?!0:void 0,disabled:n,"aria-label":o,"aria-labelledby":s,className:l,"data-size":r,"data-checked":e,onClick:c,children:h.jsx("span",{className:"dsn-switcher-track","aria-hidden":"true",children:h.jsx("span",{className:"dsn-switcher-thumb"})})})}function tr({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M8 2 L14 8 L8 14 L2 8 Z",fill:"none",stroke:"currentColor",strokeOpacity:.85,strokeWidth:"1.5",strokeLinejoin:"round"})})}function tM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M3.5 8.5L6.5 11.5L12.5 5.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}const Ii=_.forwardRef(function({variant:t="default",destructive:n=!1,disabled:r=!1,selected:i=!1,fullWidth:a=!1,label:o="Label",description:s="Description",descriptionRight:l="Description",showLabel:c=!0,showDescription:u=!1,showDescriptionRight:d=!1,showLeadingIcon:f=!0,leadingIcon:g,showTrailingIcon:p=!0,trailingIcon:v,showAvatar:m=!1,avatarProps:x,shortcut:y=!1,shortcutLabel:b="⌘ ↵",shortcutAriaLabel:k="Command Enter",showBadge:w=!1,badgeCount:S=1,badgeSize:N="sm",badgeVariant:E="critical",showTag:C=!1,tagLabel:T="Label",tagVariant:O="highlight",showButtons:P=!1,actionAriaLabel:M="Open actions",onActionClick:$,switcherChecked:A,onSwitcherChange:I,onClick:j,onKeyDown:B,tabIndex:H,className:F,"aria-label":D},W){const Y=["dsn-menu-cell",a&&"dsn-menu-cell--full-width",F].filter(Boolean).join(" "),U=t==="switcher",K=A??i,ie=!(P||U),ce=z=>{B==null||B(z),z.target===z.currentTarget&&(r||!j||(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),j(z)))},Z={className:Y,"data-variant":t,"data-destructive":n||void 0,"data-selected":i||void 0,"data-disabled":r||void 0,role:"menuitem","aria-label":D,"aria-disabled":r||void 0},J=h.jsxs(h.Fragment,{children:[m&&h.jsx("span",{className:"dsn-menu-cell-avatar-wrap",children:h.jsx(Di,{size:"xs",variant:"profile",fill:"initials",initials:"AC",name:"Avatar",...x})}),!m&&f&&h.jsx("span",{className:"dsn-menu-cell-icon-wrap","aria-hidden":"true",children:g??h.jsx(tr,{})}),c&&h.jsxs("span",{className:"dsn-menu-cell-label-wrap",children:[h.jsx("span",{className:"dsn-menu-cell-label",children:o}),u&&h.jsx("span",{className:"dsn-menu-cell-description",children:s})]}),d&&h.jsx("span",{className:"dsn-menu-cell-description-right",children:l}),w&&h.jsx("span",{className:"dsn-menu-cell-badge-wrap",children:h.jsx(Uo,{size:N,variant:E,count:S})}),C&&h.jsx("span",{className:"dsn-menu-cell-tag-wrap",children:h.jsx(Nr,{size:"sm",variant:O,label:T})}),p&&h.jsx("span",{className:"dsn-menu-cell-icon-wrap","aria-hidden":"true",children:i&&!U?h.jsx(tM,{}):v??h.jsx(tr,{})}),y&&h.jsx("span",{className:"dsn-menu-cell-shortcut-wrap",children:h.jsx(Vd,{label:b,"aria-label":k})}),P&&h.jsx("span",{className:"dsn-menu-cell-action-wrap",onClick:z=>z.stopPropagation(),onKeyDown:z=>z.stopPropagation(),children:h.jsx(ve,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(tr,{}),"aria-label":M,onClick:z=>{z.stopPropagation(),$==null||$(z)}})}),U&&h.jsx("span",{className:"dsn-menu-cell-switcher-wrap",onClick:z=>z.stopPropagation(),onKeyDown:z=>z.stopPropagation(),children:h.jsx($a,{size:"sm",checked:K,disabled:r,"aria-label":"Toggle option",onChange:I})})]});return ie?h.jsx("button",{type:"button",...Z,ref:W,disabled:r,onClick:j,onKeyDown:B,tabIndex:H,children:J}):h.jsx("div",{...Z,ref:W,tabIndex:H??(r?-1:0),onClick:r?void 0:j,onKeyDown:ce,children:J})});function Dy(e,t){if(typeof window>"u"||typeof document>"u")return t;const n=window.getComputedStyle(document.documentElement).getPropertyValue(e).trim(),r=Number.parseFloat(n);return Number.isFinite(r)?r:t}function Er({header:e,segment:t,search:n,content:r,bottomBar:i,role:a="menu",width:o,contentPadding:s="none",className:l,contentClassName:c,anchorRef:u,offset:d,viewportMargin:f,matchAnchorWidth:g=!1,minWidth:p,"aria-label":v="Popover"}){const m=_.useRef(null),[x,y]=_.useState(null),b=d??Dy("--space-tiny",4),k=f??Dy("--space-medium",16),w=p??192,S=_.useCallback(()=>{if(!(u!=null&&u.current)||!m.current)return;const T=u.current.getBoundingClientRect(),O=m.current.getBoundingClientRect(),P=O.height,M=Math.max(g?T.width:O.width,w),$=M,A=window.innerHeight-T.bottom-k,I=T.top-k,j=P+b>A&&I>=P+b,B=j?T.top-P-b:T.bottom+b,H=Math.max(k,window.innerHeight-P-k),F=Math.min(Math.max(B,k),H),D=T.left,W=Math.max(k,window.innerWidth-$-k),Y=Math.min(Math.max(D,k),W);y({top:F,left:Y,width:g?M:void 0,placement:j?"top":"bottom"})},[u,g,w,b,k]);_.useEffect(()=>{if(!(u!=null&&u.current))return;S();const T=()=>S(),O=()=>S();return window.addEventListener("resize",T),window.addEventListener("scroll",O,!0),()=>{window.removeEventListener("resize",T),window.removeEventListener("scroll",O,!0)}},[u,S]),_.useEffect(()=>{if(!(u!=null&&u.current)||!m.current||typeof ResizeObserver>"u")return;const T=new ResizeObserver(()=>S());T.observe(u.current),T.observe(m.current);const O=u.current.parentElement;return O&&T.observe(O),()=>T.disconnect()},[u,S]);const N=["dsn-popover-wrapper",l].filter(Boolean).join(" "),E=["dsn-popover-wrapper-content-slot",c].filter(Boolean).join(" "),C=_.useMemo(()=>{const T={};return o!==void 0&&(T.width=o),T.minWidth=w,u!=null&&u.current&&x&&(T.position="fixed",T.top=x.top,T.left=x.left,x.width!==void 0&&o===void 0&&(T.width=x.width),T.zIndex=1e3),Object.keys(T).length>0?T:void 0},[u,x,w,o]);return h.jsxs("div",{ref:m,className:N,role:a,"aria-label":v,"data-content-padding":s,"data-placement":x==null?void 0:x.placement,style:C,children:[e&&h.jsx("div",{className:"dsn-popover-wrapper-header",children:e}),t&&h.jsx("div",{className:"dsn-popover-wrapper-segment",children:t}),n&&h.jsx("div",{className:"dsn-popover-wrapper-search",children:n}),h.jsx("div",{className:"dsn-popover-wrapper-content",children:h.jsx("div",{className:E,children:r})}),i&&h.jsx("div",{className:"dsn-popover-wrapper-bottom-bar",children:i})]})}const nM=[{id:"download",label:"Download",icon:h.jsx(Oy,{size:16,"aria-hidden":"true"})},{id:"rename",label:"Rename",icon:h.jsx(DT,{size:16,"aria-hidden":"true"})},{id:"details",label:"Details",icon:h.jsx(Gd,{size:16,"aria-hidden":"true"})}];function Zd({fileName:e,fileSize:t,previewVariant:n="file",previewSrc:r,size:i="md",disabled:a=!1,loading:o=!1,action:s="none",menuOptions:l=nM,onMenuSelect:c,onRemove:u,className:d,"aria-label":f}){const p=`dsn-attachment-chip-menu-${_.useId()}`,v=_.useRef(null),m=_.useRef(null),[x,y]=_.useState(!1),b=s==="more"&&!a&&!o;return _.useEffect(()=>{if(!x)return;const k=S=>{var N;(N=v.current)!=null&&N.contains(S.target)||y(!1)},w=S=>{var N;S.key==="Escape"&&(y(!1),(N=m.current)==null||N.focus())};return document.addEventListener("mousedown",k),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",w)}},[x]),h.jsxs("div",{ref:v,className:["dsn-attachment-chip",d].filter(Boolean).join(" "),"data-size":i,"data-disabled":a||void 0,"data-loading":o||void 0,role:"group","aria-label":f??e,children:[h.jsxs("div",{className:"dsn-attachment-chip-content",children:[h.jsx("span",{className:"dsn-attachment-chip-preview","aria-hidden":"true",children:o?h.jsx(AT,{size:16,className:"dsn-attachment-chip-spinner"}):h.jsx(Xd,{variant:n,imageSrc:r,size:"xSmall","aria-label":`${n} preview`})}),h.jsxs("span",{className:"dsn-attachment-chip-label-wrap",children:[h.jsx("span",{className:"dsn-attachment-chip-label",children:e}),h.jsx("span",{className:"dsn-attachment-chip-meta",children:t})]})]}),s==="remove"&&h.jsx("button",{type:"button",disabled:a||o,"aria-label":`Remove ${e}`,className:"dsn-attachment-chip-action",onClick:u,children:h.jsx(er,{size:16,"aria-hidden":"true"})}),s==="more"&&h.jsxs(h.Fragment,{children:[h.jsx("button",{type:"button",disabled:a||o,"aria-label":`More options for ${e}`,"aria-haspopup":"menu","aria-controls":x?p:void 0,className:"dsn-attachment-chip-action",onClick:()=>{b&&y(k=>!k)},ref:m,children:h.jsx(Yd,{size:16,"aria-hidden":"true"})}),x&&b&&h.jsx(Er,{role:"menu","aria-label":"Attachment options",contentPadding:"small",className:"dsn-attachment-chip-popover",contentClassName:"dsn-attachment-chip-menu",anchorRef:m,matchAnchorWidth:!0,content:h.jsx("div",{id:p,children:l.map(k=>h.jsx(Ii,{className:"dsn-attachment-chip-menu-item",label:k.label,showLeadingIcon:!!k.icon,leadingIcon:k.icon,showTrailingIcon:!1,disabled:k.disabled,onClick:()=>{var w;k.disabled||(c==null||c(k.id),y(!1),(w=m.current)==null||w.focus())}},k.id))})})]})]})}function rM(e){return e>=1024*1024*1024?`${Math.round(e/(1024*1024*1024)*10)/10} GB`:e>=1024*1024?`${Math.round(e/(1024*1024)*10)/10} MB`:e>=1024?`${Math.round(e/1024*10)/10} KB`:`${e} B`}function iM({id:e,label:t="Label",showLabel:n=!0,helperText:r="Help text",showHelpText:i=!0,error:a=!1,errorMessage:o="File extends size limit",disabled:s=!1,loading:l=!1,accept:c,uploadButtonLabel:u="Upload file",value:d,defaultValue:f=null,onChange:g,className:p,"aria-label":v}){const m=_.useId(),x=e??`dsn-attachment-field-${m}`,y=`${x}-helper`,b=_.useRef(null),k=d!==void 0,[w,S]=_.useState(f),N=k?d??null:w,[E,C]=_.useState(void 0);_.useEffect(()=>{if(!N||!N.type.startsWith("image/")){C(void 0);return}const M=URL.createObjectURL(N);return C(M),()=>URL.revokeObjectURL(M)},[N]);const T=a?o:r,O=_.useMemo(()=>N?rM(N.size):"",[N]);function P(M){k||S(M),g==null||g(M)}return h.jsxs("div",{className:["dsn-attachment-field",p].filter(Boolean).join(" "),"data-disabled":s||void 0,"data-error":a||void 0,children:[n&&h.jsx("p",{className:"dsn-attachment-field-label",children:t}),h.jsxs("div",{className:"dsn-attachment-field-control",children:[N?h.jsx(Zd,{fileName:N.name,fileSize:O,previewVariant:N.type.startsWith("image/")?"image":"file",previewSrc:E,loading:l,disabled:s,action:"remove",onRemove:s||l?void 0:()=>{P(null),b.current&&(b.current.value="")},"aria-label":N.name}):h.jsx(ve,{variant:"secondary",size:"md",disabled:s,showLeadingIcon:!0,leadingIcon:h.jsx(GT,{size:16,"aria-hidden":"true"}),onClick:()=>{var M;return(M=b.current)==null?void 0:M.click()},"aria-label":v??u,children:u}),h.jsx("input",{ref:b,id:x,className:"dsn-attachment-field-native",type:"file",disabled:s,accept:c,"aria-label":v??u,"aria-describedby":i&&T?y:void 0,onChange:M=>{var A;const $=((A=M.target.files)==null?void 0:A[0])??null;P($)}})]}),i&&T&&h.jsx("p",{id:y,className:"dsn-attachment-field-helper",children:T})]})}const Jd=15,Iy=2*Math.PI*Jd,aM="70.7 23.6";function Fy({value:e,size:t="lg",label:n,className:r}){const i=e!==void 0,a=i?Math.min(100,Math.max(0,e)):void 0,o=i?Iy*(1-a/100):void 0,s=["dsn-progress-ring",r].filter(Boolean).join(" "),l=i?"progressbar":"status";return h.jsx("div",{role:l,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,"aria-label":n,"aria-live":"polite",className:s,"data-size":t,"data-mode":i?"determinate":"indeterminate",children:h.jsxs("svg",{viewBox:"0 0 36 36","aria-hidden":"true",focusable:"false",children:[i&&h.jsx("circle",{className:"dsn-progress-ring-track",cx:"18",cy:"18",r:Jd,fill:"none",strokeWidth:"3"}),h.jsx("circle",{className:"dsn-progress-ring-fill",cx:"18",cy:"18",r:Jd,fill:"none",strokeWidth:"3",strokeLinecap:"round",transform:"rotate(-90 18 18)",strokeDasharray:i?Iy:aM,strokeDashoffset:o})]})})}function oM({variant:e="file",descriptionPosition:t="outside",loading:n=!1,title:r="Title",metaData:i="Meta data",hasMetadata:a=!0,showDescription:o=!0,imageSrc:s,imageAlt:l="Attachment preview",action:c="remove",showActionOnHover:u=!1,onActionClick:d,className:f,"aria-label":g}){const p=["dsn-attachment-card",f].filter(Boolean).join(" "),v=c!=="none",m=c==="more"?`More options for ${r}`:`Remove ${r}`;return h.jsxs("article",{className:p,"data-variant":e,"data-description-position":t,"data-loading":n||void 0,"data-show-action-on-hover":u||void 0,"aria-label":g??r,children:[h.jsxs("div",{className:"dsn-attachment-card-thumbnail",children:[e==="picture"&&s?h.jsx("img",{src:s,alt:l,className:"dsn-attachment-card-image"}):null,e==="file"&&!n&&h.jsx("span",{className:"dsn-attachment-card-file-icon","aria-hidden":"true",children:h.jsx(Py,{size:32,strokeWidth:1.75})}),n&&h.jsx("span",{className:"dsn-attachment-card-loading",children:h.jsx(Fy,{size:"lg",label:`Loading ${r}`})}),v&&h.jsx(ve,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:c==="more"?h.jsx(Yd,{size:16,"aria-hidden":"true"}):h.jsx(er,{size:16,"aria-hidden":"true"}),className:"dsn-attachment-card-action",onClick:d,"aria-label":m,"aria-haspopup":c==="more"?"menu":void 0}),o&&t==="inside"&&h.jsxs("div",{className:"dsn-attachment-card-info dsn-attachment-card-info--inside",children:[h.jsx("p",{className:"dsn-attachment-card-title",children:r}),a&&h.jsx("p",{className:"dsn-attachment-card-meta",children:i})]})]}),o&&t==="outside"&&h.jsxs("div",{className:"dsn-attachment-card-info dsn-attachment-card-info--outside",children:[h.jsx("p",{className:"dsn-attachment-card-title",children:r}),a&&h.jsx("p",{className:"dsn-attachment-card-meta",children:i})]})]})}function zy(e,t){if(typeof window>"u"||typeof document>"u")return t;const n=window.getComputedStyle(document.documentElement).getPropertyValue(e).trim(),r=Number.parseFloat(n);return Number.isFinite(r)?r:t}function sM(e,t,n){return n?e:e?`${e} ${t}`:t}function Qd({content:e,children:t,placement:n="top",delay:r=150,open:i,defaultOpen:a=!1,disabled:o=!1,className:s,id:l}){const c=_.useId(),u=l??`dsn-tooltip-${c}`,d=_.useRef(null),f=_.useRef(null),g=_.useRef(null),p=_.useRef(null),v=i!==void 0,[m,x]=_.useState(a),[y,b]=_.useState(null),k=o?!1:v?i:m,w=T=>{v||x(T)},S=()=>{p.current&&(clearTimeout(p.current),p.current=null)},N=()=>{o||(S(),p.current=setTimeout(()=>w(!0),r))},E=()=>{S(),w(!1)};_.useEffect(()=>()=>S(),[]),_.useEffect(()=>{if(!k)return;const T=O=>{O.key==="Escape"&&w(!1)};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[k]),_.useEffect(()=>{if(!k||!f.current||!g.current)return;const T=zy("--space-small",8),O=zy("--space-tiny",4),P=()=>{if(!f.current||!g.current)return;const A=f.current.getBoundingClientRect(),I=g.current.getBoundingClientRect(),j=I.width,B=I.height,H=A.left+A.width/2,F=A.top-B-O,D=F>=T,W=D?"top":"bottom",Y=D?F:A.bottom+O,U=Math.max(T,window.innerHeight-B-T),K=Math.min(Math.max(Y,T),U),ee=H-j/2,ie=Math.max(T,window.innerWidth-j-T),ce=Math.min(Math.max(ee,T),ie);b({top:K,left:ce,placement:W})};P();const M=window.requestAnimationFrame(P),$=typeof ResizeObserver<"u"?new ResizeObserver(()=>P()):null;return $&&($.observe(f.current),$.observe(g.current)),window.addEventListener("resize",P),window.addEventListener("scroll",P,!0),()=>{window.cancelAnimationFrame(M),$==null||$.disconnect(),window.removeEventListener("resize",P),window.removeEventListener("scroll",P,!0)}},[k]);const C=_.cloneElement(t,{"aria-describedby":sM(t.props["aria-describedby"],u,o)});return h.jsxs("span",{ref:d,className:["dsn-tooltip",s].filter(Boolean).join(" "),onMouseEnter:N,onMouseLeave:E,onFocus:N,onBlur:T=>{var P;const O=T.relatedTarget;O&&((P=d.current)!=null&&P.contains(O))||E()},children:[h.jsx("span",{ref:f,className:"dsn-tooltip-trigger",children:C}),h.jsx("span",{ref:g,id:u,role:"tooltip",className:"dsn-tooltip-bubble","data-placement":(y==null?void 0:y.placement)??n,hidden:!k,style:y?{top:y.top,left:y.left}:void 0,children:e})]})}function By({value:e,label:t,className:n}){const r=Math.min(100,Math.max(0,e)),i=r===0?"0px":`calc(${r}% + 2px)`,a=["dsn-progress-bar",n].filter(Boolean).join(" ");return h.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r,"aria-label":t,className:a,children:h.jsx("div",{className:"dsn-progress-bar-track",children:h.jsx("div",{className:"dsn-progress-bar-fill",style:{width:i}})})})}function lM({fileName:e="File name",fileType:t="PDF",fileSize:n="10 Mb",previewVariant:r="image",previewSrc:i,state:a="default",uploadProgress:o=40,className:s,onCopyLink:l,onDownload:c,onCancelUpload:u,"aria-label":d}){const f=a==="uploading",g=["dsn-file-row",s].filter(Boolean).join(" ");return h.jsxs("article",{className:g,"data-state":a,"aria-label":d??e,children:[h.jsx("div",{className:"dsn-file-row-thumbnail",children:h.jsx(Xd,{variant:r,imageSrc:i,size:"large","aria-label":`${r} preview`})}),h.jsxs("div",{className:"dsn-file-row-content",children:[h.jsxs("div",{className:"dsn-file-row-title-wrap",children:[h.jsx("p",{className:"dsn-file-row-title",children:e}),f&&h.jsx(ve,{variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(er,{size:16,"aria-hidden":"true"}),className:"dsn-file-row-action-btn","aria-label":`Cancel upload for ${e}`,onClick:u})]}),!f&&h.jsxs(h.Fragment,{children:[h.jsxs("p",{className:"dsn-file-row-meta",children:[h.jsx("span",{children:t}),h.jsx("span",{"aria-hidden":"true",children:"•"}),h.jsx("span",{children:n})]}),h.jsxs(Rr,{size:"sm",spaceBetween:!0,className:"dsn-file-row-actions","aria-label":`Actions for ${e}`,children:[h.jsx(Qd,{content:"Copy link",children:h.jsx(ve,{variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Ay,{size:16,"aria-hidden":"true"}),className:"dsn-file-row-action-btn","aria-label":`Copy link for ${e}`,onClick:l})}),h.jsx(Qd,{content:"Download",children:h.jsx(ve,{variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Oy,{size:16,"aria-hidden":"true"}),className:"dsn-file-row-action-btn","aria-label":`Download ${e}`,onClick:c})})]})]}),f&&h.jsx("div",{className:"dsn-file-row-progress",children:h.jsx(By,{value:o,label:`Uploading ${e}`})})]})]})}function Rd({direction:e="horizontal",decorative:t=!1,className:n}){const r=["dsn-separator",n].filter(Boolean).join(" ");return e==="horizontal"?h.jsx("hr",{className:r,"data-direction":"horizontal","aria-hidden":t?!0:void 0}):h.jsx("div",{role:"separator","aria-orientation":"vertical",className:r,"data-direction":"vertical","aria-hidden":t?!0:void 0})}function cM({value:e,label:t,className:n}){const r=e!==void 0,i=r?Math.min(100,Math.max(0,e)):void 0,a=["dsn-loading-bar",n].filter(Boolean).join(" ");return h.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,"aria-label":t,"aria-live":"polite",className:a,"data-mode":r?"determinate":"indeterminate",children:h.jsx("div",{className:"dsn-loading-bar-fill",style:r?{width:`${i}%`}:void 0})})}function uM({type:e="avatar",className:t}){const n=["dsn-skeleton-loading",t].filter(Boolean).join(" ");return h.jsx("div",{className:n,"data-type":e,"aria-hidden":"true",children:h.jsx("div",{className:"dsn-skeleton-loading-glow"})})}function dM(){return h.jsx("svg",{width:"9",height:"7",viewBox:"0 0 9 7",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M0.625 3.125L3.125 5.625L8.125 0.625",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})}function fM(){return h.jsx("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M0.5 1H7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}function hn({size:e="md",checked:t=!1,indeterminate:n=!1,disabled:r=!1,label:i="Label",description:a="Description",descriptionRight:o="Assist label",showContent:s=!0,showLabel:l=!0,showDescription:c=!1,showDescriptionRight:u=!1,showAvatar:d=!1,avatarProps:f,showLeadingIcon:g=!1,leadingIcon:p,showTrailingIcon:v=!0,trailingIcon:m,showBadge:x=!1,badgeCount:y=1,badgeSize:b="sm",badgeVariant:k="critical",showTag:w=!1,tagLabel:S="Label",tagVariant:N="error",showButtons:E=!1,actionAriaLabel:C="Open actions",onActionClick:T,showSwitcherRight:O=!1,switcherChecked:P=!1,onSwitcherChange:M,onCheckedChange:$,fullWidth:A=!1,className:I,"aria-label":j}){const B=["dsn-checkbox",A&&"dsn-checkbox--full-width",I].filter(Boolean).join(" "),H=n?"mixed":t?"true":"false";function F(){r||$==null||$(!t)}function D(W){W.target===W.currentTarget&&W.key===" "&&(W.preventDefault(),F())}return h.jsxs("div",{className:B,"data-size":e,"data-has-content":s||void 0,"data-disabled":r||void 0,"data-checked":t||void 0,"data-indeterminate":n||void 0,role:"checkbox","aria-checked":H,"aria-disabled":r||void 0,"aria-label":j,tabIndex:r?-1:0,onClick:r?void 0:F,onKeyDown:D,children:[h.jsx("span",{className:"dsn-checkbox-indicator-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-checkbox-indicator",children:(t||n)&&h.jsx("span",{className:"dsn-checkbox-mark",children:n?h.jsx(fM,{}):h.jsx(dM,{})})})}),s&&h.jsxs("span",{className:"dsn-checkbox-content",children:[d&&h.jsx("span",{className:"dsn-checkbox-avatar-wrap",children:h.jsx(Di,{size:"xs",variant:"profile",fill:"initials",initials:"AC",name:"Avatar",...f})}),g&&h.jsx("span",{className:"dsn-checkbox-icon-wrap","aria-hidden":"true",children:p??h.jsx(tr,{})}),l&&h.jsxs("span",{className:"dsn-checkbox-label-wrap",children:[h.jsx("span",{className:"dsn-checkbox-label",children:i}),c&&h.jsx("span",{className:"dsn-checkbox-description",children:a})]}),u&&h.jsx("span",{className:"dsn-checkbox-description-right",children:o}),x&&h.jsx("span",{className:"dsn-checkbox-badge-wrap",children:h.jsx(Uo,{size:b,variant:k,count:y})}),w&&h.jsx("span",{className:"dsn-checkbox-tag-wrap",children:h.jsx(Nr,{size:"sm",variant:N,label:S})}),v&&h.jsx("span",{className:"dsn-checkbox-icon-wrap","aria-hidden":"true",children:m??h.jsx(tr,{})}),E&&h.jsx("span",{className:"dsn-checkbox-action-wrap",onClick:W=>W.stopPropagation(),onKeyDown:W=>W.stopPropagation(),children:h.jsx(ve,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(tr,{}),"aria-label":C,onClick:W=>{W.stopPropagation(),T==null||T(W)}})}),O&&h.jsx("span",{className:"dsn-checkbox-switcher-wrap",onClick:W=>W.stopPropagation(),onKeyDown:W=>W.stopPropagation(),children:h.jsx($a,{size:"sm",checked:P,disabled:r,"aria-label":"Toggle option",onChange:M})})]})]})}function ef({size:e="md",checked:t=!1,disabled:n=!1,label:r="Label",description:i="Description",descriptionRight:a="Assist label",showContent:o=!0,showLabel:s=!0,showDescription:l=!1,showDescriptionRight:c=!1,showAvatar:u=!1,avatarProps:d,showLeadingIcon:f=!1,leadingIcon:g,showTrailingIcon:p=!0,trailingIcon:v,showBadge:m=!1,badgeCount:x=1,badgeSize:y="sm",badgeVariant:b="critical",showTag:k=!1,tagLabel:w="Label",tagVariant:S="error",showButtons:N=!1,actionAriaLabel:E="Open actions",onActionClick:C,showSwitcherRight:T=!1,switcherChecked:O=!1,onSwitcherChange:P,onCheckedChange:M,className:$,"aria-label":A}){const I=["dsn-radio",$].filter(Boolean).join(" ");function j(){n||t||M==null||M(!0)}function B(H){H.target===H.currentTarget&&H.key===" "&&(H.preventDefault(),j())}return h.jsxs("div",{className:I,"data-size":e,"data-has-content":o||void 0,"data-disabled":n||void 0,"data-checked":t||void 0,role:"radio","aria-checked":t?"true":"false","aria-disabled":n||void 0,"aria-label":A,tabIndex:n?-1:0,onClick:n?void 0:j,onKeyDown:B,children:[h.jsx("span",{className:"dsn-radio-indicator-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-radio-indicator",children:h.jsx("span",{className:"dsn-radio-dot"})})}),o&&h.jsxs("span",{className:"dsn-radio-content",children:[u&&h.jsx("span",{className:"dsn-radio-avatar-wrap",children:h.jsx(Di,{size:"xs",variant:"profile",fill:"initials",initials:"AC",name:"Avatar",...d})}),f&&h.jsx("span",{className:"dsn-radio-icon-wrap","aria-hidden":"true",children:g??h.jsx(tr,{})}),s&&h.jsxs("span",{className:"dsn-radio-label-wrap",children:[h.jsx("span",{className:"dsn-radio-label",children:r}),l&&h.jsx("span",{className:"dsn-radio-description",children:i})]}),c&&h.jsx("span",{className:"dsn-radio-description-right",children:a}),m&&h.jsx("span",{className:"dsn-radio-badge-wrap",children:h.jsx(Uo,{size:y,variant:b,count:x})}),k&&h.jsx("span",{className:"dsn-radio-tag-wrap",children:h.jsx(Nr,{size:"sm",variant:S,label:w})}),p&&h.jsx("span",{className:"dsn-radio-icon-wrap","aria-hidden":"true",children:v??h.jsx(tr,{})}),N&&h.jsx("span",{className:"dsn-radio-action-wrap",onClick:H=>H.stopPropagation(),onKeyDown:H=>H.stopPropagation(),children:h.jsx(ve,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(tr,{}),"aria-label":E,onClick:H=>{H.stopPropagation(),C==null||C(H)}})}),T&&h.jsx("span",{className:"dsn-radio-switcher-wrap",onClick:H=>H.stopPropagation(),onKeyDown:H=>H.stopPropagation(),children:h.jsx($a,{size:"sm",checked:O,disabled:n,"aria-label":"Toggle option",onChange:P})})]})]})}function hM({id:e,label:t,placeholder:n,value:r,defaultValue:i,disabled:a=!1,error:o=!1,required:s=!1,helperText:l,errorMessage:c,maxLength:u,leadingIcon:d,trailingIcon:f,helperIcon:g,onChange:p,onBlur:v,onFocus:m,"aria-label":x,"aria-labelledby":y,autoComplete:b,name:k,className:w}){const S=_.useId(),N=e??`dsn-text-input-${S}`,E=`${N}-helper`,T=!!l||o&&!!c?E:void 0,[O,P]=_.useState(()=>(r??i??"").length),M=r!==void 0?r.length:O;function $(B){r===void 0&&P(B.target.value.length),p==null||p(B)}const A=!!l||o&&!!c||u!==void 0,I=f!=null&&u===void 0,j=o&&c?c:l;return h.jsxs("div",{className:`dsn-text-input${w?` ${w}`:""}`,"data-error":o||void 0,"data-disabled":a||void 0,children:[t&&h.jsxs("label",{className:"dsn-text-input-label",htmlFor:N,children:[t,s&&h.jsxs("span",{className:"dsn-text-input-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{className:"dsn-text-input-control",children:[d&&h.jsx("span",{className:"dsn-text-input-icon","aria-hidden":"true",children:d}),h.jsx("input",{type:"text",id:N,className:"dsn-text-input-field",placeholder:n,value:r,defaultValue:i,disabled:a,maxLength:u,"aria-invalid":o||void 0,"aria-required":s||void 0,"aria-describedby":T,"aria-label":x,"aria-labelledby":y,autoComplete:b,name:k,onChange:$,onBlur:v,onFocus:m}),I&&h.jsx("span",{className:"dsn-text-input-icon","aria-hidden":"true",children:f})]}),A&&h.jsxs("div",{className:"dsn-text-input-meta",children:[h.jsxs("div",{className:"dsn-text-input-helper-inner",children:[g&&h.jsx("span",{className:"dsn-text-input-icon","aria-hidden":"true",children:g}),j!==void 0&&h.jsx("p",{id:E,className:"dsn-text-input-helper",children:j})]}),u!==void 0&&h.jsxs("span",{className:"dsn-text-input-count","aria-live":"polite","aria-atomic":"true",children:[M,"/",u]})]})]})}function pM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}function gM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M8 3V13M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}function tf(e,t,n){let r=e;return t!==void 0&&(r=Math.max(t,r)),n!==void 0&&(r=Math.min(n,r)),r}function Fi({id:e,label:t,placeholder:n,value:r,defaultValue:i,min:a,max:o,step:s=1,disabled:l=!1,error:c=!1,required:u=!1,helperText:d,errorMessage:f,helperIcon:g,onChange:p,onBlur:v,onFocus:m,"aria-label":x,"aria-labelledby":y,name:b,className:k}){const w=_.useId(),S=e??`dsn-number-input-${w}`,N=`${S}-helper`,C=!!d||c&&!!f?N:void 0,[T,O]=_.useState(()=>i!==void 0?String(i):""),P=r!==void 0?String(r):T,M=r!==void 0?r:T!==""?parseFloat(T):NaN,$=l||a!==void 0&&!isNaN(M)&&M<=a,A=l||o!==void 0&&!isNaN(M)&&M>=o;function I(Y){const U=Y.target.value;if(r===void 0&&O(U),U===""||U==="-")p==null||p(null);else{const K=parseFloat(U);isNaN(K)||p==null||p(K)}}function j(Y){const U=parseFloat(P);if(!isNaN(U)){const K=tf(U,a,o);if(K!==U){const ee=String(K);r===void 0&&O(ee),p==null||p(K)}}v==null||v(Y)}function B(){if(l||$)return;const Y=isNaN(M)?a??0:M,U=tf(Y-s,a,o);r===void 0&&O(String(U)),p==null||p(U)}function H(){if(l||A)return;const Y=isNaN(M)?a??0:M,U=tf(Y+s,a,o);r===void 0&&O(String(U)),p==null||p(U)}function F(Y){Y.key==="ArrowUp"?(Y.preventDefault(),H()):Y.key==="ArrowDown"&&(Y.preventDefault(),B())}const D=!!d||c&&!!f,W=c&&f?f:d;return h.jsxs("div",{className:`dsn-number-input${k?` ${k}`:""}`,"data-error":c||void 0,"data-disabled":l||void 0,children:[t&&h.jsxs("label",{className:"dsn-number-input-label",htmlFor:S,children:[t,u&&h.jsxs("span",{className:"dsn-number-input-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{className:"dsn-number-input-control",children:[h.jsx("input",{type:"text",inputMode:"numeric",id:S,className:"dsn-number-input-field",value:P,placeholder:n,disabled:l,name:b,"aria-invalid":c||void 0,"aria-required":u||void 0,"aria-describedby":C,"aria-label":x,"aria-labelledby":y,onChange:I,onBlur:j,onFocus:m,onKeyDown:F}),h.jsxs("div",{className:"dsn-number-input-stepper",role:"group","aria-label":"Adjust value",children:[h.jsx("button",{type:"button",className:"dsn-number-input-btn","aria-label":"Decrease value",disabled:$,onClick:B,tabIndex:l?-1:void 0,children:h.jsx(pM,{})}),h.jsx("button",{type:"button",className:"dsn-number-input-btn","aria-label":"Increase value",disabled:A,onClick:H,tabIndex:l?-1:void 0,children:h.jsx(gM,{})})]})]}),D&&h.jsx("div",{className:"dsn-number-input-meta",children:h.jsxs("div",{className:"dsn-number-input-helper-inner",children:[g&&h.jsx("span",{className:"dsn-number-input-icon","aria-hidden":"true",children:g}),W!==void 0&&h.jsx("p",{id:N,className:"dsn-number-input-helper",children:W})]})})]})}function vM(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("rect",{x:"2.5",y:"7.5",width:"11",height:"7",rx:"1.5",stroke:"currentColor",strokeWidth:"1.25"}),h.jsx("path",{d:"M5.5 7.5V5.5a2.5 2.5 0 0 1 5 0v2",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"})]})}function mM(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M1.5 8C2.5 5.5 5 3.5 8 3.5S13.5 5.5 14.5 8 12 12.5 8 12.5 2.5 10.5 1.5 8Z",stroke:"currentColor",strokeWidth:"1.25"}),h.jsx("circle",{cx:"8",cy:"8",r:"2",stroke:"currentColor",strokeWidth:"1.25"})]})}function yM(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M2 2.5L14 13.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M6.5 6.8A2 2 0 0 0 8 10a2 2 0 0 0 1.5-.7M4.2 4.7C2.7 5.8 1.5 8 1.5 8s2 4.5 6.5 4.5c1.2 0 2.2-.3 3-.8M8 3.5c4 0 6.5 4.5 6.5 4.5s-.5 1-1.5 2",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}function bM({id:e,label:t,placeholder:n,value:r,defaultValue:i,disabled:a=!1,error:o=!1,required:s=!1,helperText:l,errorMessage:c,helperIcon:u,trailingIcon:d,labelAction:f,autoComplete:g="current-password",name:p,className:v,onChange:m,onBlur:x,onFocus:y,"aria-label":b,"aria-labelledby":k}){const w=_.useId(),S=e??`dsn-password-input-${w}`,N=`${S}-helper`,[E,C]=_.useState(!1),T=o&&c?c:l,O=!!l||o&&!!c,P=O?N:void 0,M=O;return h.jsxs("div",{className:`dsn-password-input${v?` ${v}`:""}`,"data-error":o||void 0,"data-disabled":a||void 0,children:[t&&h.jsxs("div",{className:"dsn-password-input-label-row",children:[h.jsxs("label",{className:"dsn-password-input-label",htmlFor:S,children:[t,s&&h.jsxs("span",{className:"dsn-password-input-required","aria-hidden":"true",children:[" ","*"]})]}),f&&h.jsx("span",{className:"dsn-password-input-label-action",children:f})]}),h.jsxs("div",{className:"dsn-password-input-control",children:[h.jsx("span",{className:"dsn-password-input-lock","aria-hidden":"true",children:h.jsx(vM,{})}),h.jsx("input",{type:E?"text":"password",id:S,className:"dsn-password-input-field",placeholder:n,value:r,defaultValue:i,disabled:a,"aria-invalid":o||void 0,"aria-required":s||void 0,"aria-describedby":P,"aria-label":b,"aria-labelledby":k,autoComplete:g,name:p,onChange:m,onBlur:x,onFocus:y}),d&&h.jsx("span",{className:"dsn-password-input-trailing","aria-hidden":"true",children:d}),h.jsx("button",{type:"button",className:"dsn-password-input-toggle","aria-label":E?"Hide password":"Show password","aria-pressed":E,onClick:()=>C($=>!$),disabled:a,tabIndex:a?-1:void 0,children:E?h.jsx(yM,{}):h.jsx(mM,{})})]}),M&&h.jsx("div",{className:"dsn-password-input-meta",children:h.jsxs("div",{className:"dsn-password-input-helper-inner",children:[u&&h.jsx("span",{className:"dsn-password-input-icon","aria-hidden":"true",children:u}),h.jsx("p",{id:N,className:"dsn-password-input-helper",children:T})]})})]})}function xM(){return h.jsx("span",{className:"dsn-pw-req-radio","aria-hidden":"true"})}function _M(){return h.jsxs("svg",{className:"dsn-pw-req-check",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("circle",{cx:"8",cy:"8",r:"6.5",fill:"var(--surface-toggle-on)"}),h.jsx("path",{d:"M5.5 8.5l1.75 1.75L10.5 6.5",stroke:"white",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function wM({label:e,met:t,className:n}){return h.jsxs("div",{className:`dsn-pw-requirement${n?` ${n}`:""}`,"data-met":t||void 0,role:"status","aria-label":`${e}: ${t?"satisfied":"not satisfied"}`,children:[t?h.jsx(_M,{}):h.jsx(xM,{}),h.jsx("span",{className:"dsn-pw-requirement-label",children:e})]})}function kM({length:e=6,value:t,defaultValue:n,status:r="idle",disabled:i=!1,label:a,labelAction:o,helperText:s,helperIcon:l,errorMessage:c,onChange:u,onComplete:d,"aria-label":f,className:g}){const m=`${`dsn-otp-${_.useId()}`}-status`,[x,y]=_.useState(()=>{const M=(t??n??"").slice(0,e);return Array.from({length:e},($,A)=>M[A]??"")});_.useEffect(()=>{t!==void 0&&y(Array.from({length:e},(M,$)=>t[$]??""))},[t,e]);const b=_.useRef([]),k=!i&&r!=="verifying"&&r!=="correct";function w(M){y(M);const $=M.join("");u==null||u($),M.every(A=>A!=="")&&(d==null||d($))}function S(M,$){var B;const I=$.target.value.replace(/[^0-9]/g,"").slice(-1),j=[...x];j[M]=I,w(j),I&&M<e-1&&((B=b.current[M+1])==null||B.focus())}function N(M,$){var A,I,j;if($.key==="Backspace"){$.preventDefault();const B=[...x];B[M]?(B[M]="",w(B)):M>0&&(B[M-1]="",w(B),(A=b.current[M-1])==null||A.focus())}else $.key==="ArrowLeft"&&M>0?($.preventDefault(),(I=b.current[M-1])==null||I.focus()):$.key==="ArrowRight"&&M<e-1&&($.preventDefault(),(j=b.current[M+1])==null||j.focus())}function E(M){M.target.select()}function C(M){var H;M.preventDefault();const $=M.clipboardData.getData("text").replace(/[^0-9]/g,"").slice(0,e);if(!$)return;const A=[...x];for(let F=0;F<$.length;F++)A[F]=$[F];y(A);const I=A.join("");u==null||u(I);const j=A.findIndex(F=>F===""),B=j===-1?e-1:j;(H=b.current[B])==null||H.focus(),A.every(F=>F!=="")&&(d==null||d(I))}function T(){return r==="verifying"?"Verifying code…":r==="correct"?"Verification successful":r==="error"?c??"Verification failed":""}const O=r==="error"&&c?c:s,P=!!O;return h.jsxs("div",{className:`dsn-otp${g?` ${g}`:""}`,"data-status":r!=="idle"?r:void 0,"data-disabled":i||void 0,children:[(a||o)&&h.jsxs("div",{className:"dsn-otp-label-row",children:[a&&h.jsx("span",{className:"dsn-otp-label",children:a}),o&&h.jsx("span",{className:"dsn-otp-label-action",children:o})]}),h.jsx("div",{className:"dsn-otp-stack",role:"group","aria-label":f??`Enter ${e}-digit verification code`,"aria-describedby":r!=="idle"?m:void 0,children:x.map((M,$)=>h.jsx("input",{ref:A=>{b.current[$]=A},className:"dsn-otp-cell",type:"text",inputMode:"numeric",pattern:"[0-9]*",autoComplete:$===0?"one-time-code":"off",maxLength:1,value:M,disabled:!k,"aria-label":`Digit ${$+1} of ${e}`,onChange:A=>S($,A),onKeyDown:A=>N($,A),onFocus:E,onPaste:C},$))}),h.jsx("div",{id:m,role:"status","aria-live":"polite","aria-atomic":"true",className:"dsn-otp-sr-only",children:T()}),P&&h.jsxs("div",{className:"dsn-otp-helper-row",children:[l&&h.jsx("span",{className:"dsn-otp-helper-icon","aria-hidden":"true",children:l}),h.jsx("p",{className:"dsn-otp-helper",children:O})]})]})}const jy=[{label:"United States (+1)",value:"+1"},{label:"Portugal (+351)",value:"+351"},{label:"United Kingdom (+44)",value:"+44"},{label:"Germany (+49)",value:"+49"}];function Xl(e){return e.replace(/\s+/g,"").replace(/^\+/,"")}function SM(e,t){const n=e.trim();if(!n.startsWith("+"))return null;const i=n.replace(/[^\d+]/g,"").slice(1);if(!i)return null;const o=[...t].sort((l,c)=>Xl(c.value).length-Xl(l.value).length).find(l=>i.startsWith(Xl(l.value)));if(!o)return null;const s=i.slice(Xl(o.value).length);return{countryCode:o.value,localNumber:s}}function NM({id:e,label:t,placeholder:n="1234567890",value:r,defaultValue:i,disabled:a=!1,error:o=!1,required:s=!1,helperText:l,errorMessage:c,helperIcon:u,countryCode:d,defaultCountryCode:f="+1",countryOptions:g=jy,onChange:p,onCountryCodeChange:v,onBlur:m,onFocus:x,"aria-label":y,"aria-labelledby":b,countryCodeAriaLabel:k="Country code",autoComplete:w="tel",name:S,className:N}){const E=_.useId(),C=e??`dsn-phone-input-${E}`,T=`${C}-helper`,O=`${C}-country-menu`,[P,M]=_.useState(f),$=d??P,[A,I]=_.useState(i??""),j=r??A,[B,H]=_.useState(!1),F=_.useRef(null),D=_.useRef(null),W=_.useRef([]),[Y,U]=_.useState(-1),K=o&&c?c:l,ie=!!l||o&&!!c?T:void 0,ce=_.useMemo(()=>g.length===0?jy:g,[g]);function Z(G=!1){const ne=ce.findIndex(X=>X.value===$);return ne>=0?ne:ce.length===0?-1:G?ce.length-1:0}function J(G,ne){return ce.length===0?-1:(G+ne+ce.length)%ce.length}function z(G){d===void 0&&M(G),v==null||v(G)}function L(G){r===void 0&&I(G.target.value),p==null||p(G)}function q(G){const ne=SM(G.clipboardData.getData("text"),ce);ne&&(G.preventDefault(),z(ne.countryCode??$),r===void 0&&I(ne.localNumber))}return _.useEffect(()=>{const G=ne=>{!F.current||!B||F.current.contains(ne.target)||H(!1)};return document.addEventListener("mousedown",G),()=>document.removeEventListener("mousedown",G)},[B]),_.useEffect(()=>{var ne;if(!B||a){U(-1);return}const G=Z();U(G),G>=0&&((ne=W.current[G])==null||ne.focus())},[$,a,B,ce]),h.jsxs("div",{ref:F,className:`dsn-phone-input${N?` ${N}`:""}`,"data-error":o||void 0,"data-disabled":a||void 0,children:[t&&h.jsxs("label",{className:"dsn-phone-input-label",htmlFor:C,children:[t,s&&h.jsxs("span",{className:"dsn-phone-input-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{className:"dsn-phone-input-control",role:"group","aria-label":"Phone number",children:[h.jsxs("span",{className:"dsn-phone-input-country-wrap",children:[h.jsxs("button",{ref:D,type:"button",className:"dsn-phone-input-country-visual",disabled:a,"aria-label":k,"aria-haspopup":"menu","aria-expanded":B,"aria-controls":B?O:void 0,onClick:()=>H(G=>!G),onKeyDown:G=>{(G.key==="Enter"||G.key===" "||G.key==="ArrowDown")&&(G.preventDefault(),H(!0)),G.key==="ArrowUp"&&(G.preventDefault(),U(Z(!0)),H(!0)),G.key==="Escape"&&H(!1)},children:[h.jsx("span",{className:"dsn-phone-input-country-code",children:$}),h.jsx("span",{className:"dsn-phone-input-country-chevron","aria-hidden":"true",children:h.jsx(Sr,{size:16,strokeWidth:1.5,"aria-hidden":"true"})})]}),B&&!a&&h.jsx(Er,{role:"menu","aria-label":`${k} options`,className:"dsn-phone-input-country-popover",contentClassName:"dsn-phone-input-country-popover-content",contentPadding:"small",anchorRef:D,offset:4,viewportMargin:16,matchAnchorWidth:!0,content:h.jsx("div",{id:O,children:ce.map((G,ne)=>h.jsx(Ii,{ref:X=>{W.current[ne]=X},tabIndex:Y===ne?0:-1,onKeyDown:X=>{var ge,Pe,ze,ke,Be;if(X.key==="ArrowDown"){X.preventDefault();const Se=J(Y>=0?Y:Z(),1);U(Se),(ge=W.current[Se])==null||ge.focus();return}if(X.key==="ArrowUp"){X.preventDefault();const Se=J(Y>=0?Y:Z(!0),-1);U(Se),(Pe=W.current[Se])==null||Pe.focus();return}if(X.key==="Home"){X.preventDefault(),U(0),(ze=W.current[0])==null||ze.focus();return}if(X.key==="End"){X.preventDefault();const Se=ce.length-1;U(Se),(ke=W.current[Se])==null||ke.focus();return}X.key==="Escape"&&(X.preventDefault(),H(!1),(Be=D.current)==null||Be.focus())},className:"dsn-phone-input-country-option",label:G.label,showLeadingIcon:!1,showTrailingIcon:$===G.value,selected:$===G.value,"aria-label":G.label,onClick:()=>{var X;z(G.value),H(!1),(X=D.current)==null||X.focus()}},G.value))})})]}),h.jsx("input",{type:"tel",id:C,className:"dsn-phone-input-field",placeholder:n,value:j,defaultValue:i,disabled:a,name:S,autoComplete:w,"aria-invalid":o||void 0,"aria-required":s||void 0,"aria-describedby":ie,"aria-label":y,"aria-labelledby":b,onChange:L,onPaste:q,onBlur:m,onFocus:x})]}),K&&h.jsx("div",{className:"dsn-phone-input-meta",children:h.jsxs("div",{className:"dsn-phone-input-helper-inner",children:[u&&h.jsx("span",{className:"dsn-phone-input-icon","aria-hidden":"true",children:u}),h.jsx("p",{id:T,className:"dsn-phone-input-helper",children:K})]})})]})}function EM({error:e=!1}){return e?h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M8 5V8M8 11H8.01M14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8C2 4.68629 4.68629 2 8 2C11.3137 2 14 4.68629 14 8Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}):h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M8 2.5L13.5 8L8 13.5L2.5 8L8 2.5Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinejoin:"round"})})}function CM({id:e,label:t,placeholder:n="Placeholder",value:r,defaultValue:i,disabled:a=!1,error:o=!1,required:s=!1,helperText:l,errorMessage:c,maxLength:u,minRows:d=3,helperIcon:f,leadingIcon:g,onChange:p,onBlur:v,onFocus:m,"aria-label":x,"aria-labelledby":y,autoComplete:b,name:k,className:w}){const S=_.useId(),N=e??`dsn-text-area-${S}`,E=`${N}-helper`,[C,T]=_.useState(()=>(r??i??"").length),O=r!==void 0?r.length:C,P=o&&c?c:l,M=!!l||o&&!!c,$=M||u!==void 0,A=M?E:void 0,I=f??(M?h.jsx(EM,{error:o}):null);function j(B){r===void 0&&T(B.target.value.length),p==null||p(B)}return h.jsxs("div",{className:`dsn-text-area${w?` ${w}`:""}`,"data-error":o||void 0,"data-disabled":a||void 0,children:[t&&h.jsxs("label",{className:"dsn-text-area-label",htmlFor:N,children:[t,s&&h.jsxs("span",{className:"dsn-text-area-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{className:"dsn-text-area-control",children:[g&&h.jsx("span",{className:"dsn-text-area-leading-icon","aria-hidden":"true",children:g}),h.jsx("textarea",{id:N,className:"dsn-text-area-field",rows:d,placeholder:n,value:r,defaultValue:i,disabled:a,maxLength:u,"aria-invalid":o||void 0,"aria-required":s||void 0,"aria-describedby":A,"aria-label":x,"aria-labelledby":y,autoComplete:b,name:k,onChange:j,onBlur:v,onFocus:m})]}),$&&h.jsxs("div",{className:"dsn-text-area-meta",children:[h.jsxs("div",{className:"dsn-text-area-helper-inner",children:[I&&h.jsx("span",{className:"dsn-text-area-helper-icon","aria-hidden":"true",children:I}),P&&h.jsx("p",{id:E,className:"dsn-text-area-helper",children:P})]}),u!==void 0&&h.jsxs("span",{className:"dsn-text-area-count","aria-live":"polite","aria-atomic":"true",children:[O,"/",u]})]})]})}function TM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M11.5 11.5L14 14M12.6667 7.33333C12.6667 10.2789 10.2789 12.6667 7.33333 12.6667C4.38781 12.6667 2 10.2789 2 7.33333C2 4.38781 4.38781 2 7.33333 2C10.2789 2 12.6667 4.38781 12.6667 7.33333Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function MM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M11.5 4.5L4.5 11.5M4.5 4.5L11.5 11.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Wy({id:e,variant:t="default",label:n="Label",placeholder:r="Search",value:i,defaultValue:a,disabled:o=!1,error:s=!1,helperText:l="Help text",errorMessage:c,maxLength:u,required:d=!1,helperIcon:f,onChange:g,onFocus:p,onBlur:v,onClear:m,className:x,name:y,autoComplete:b,"aria-label":k,"aria-labelledby":w}){const S=_.useId(),N=e??`dsn-search-bar-${S}`,E=`${N}-helper`,[C,T]=_.useState(()=>(i??a??"").length),O=i!==void 0,P=i??void 0,M=(i??"").length,$=O?M:C,A=O?M>0:C>0,j=t==="default"&&(!!l||s&&!!c||u!==void 0||s&&!!c),B=s&&c?c:l,H=["dsn-search-bar",x].filter(Boolean).join(" ");function F(W){O||T(W.target.value.length),g==null||g(W)}function D(){if(!O){T(0);const W=document.getElementById(N);W&&(W.value="",W.focus())}m==null||m()}return h.jsxs("div",{className:H,"data-variant":t,"data-error":s||void 0,"data-disabled":o||void 0,children:[t==="default"&&h.jsxs("label",{className:"dsn-search-bar-label",htmlFor:N,children:[n,d&&h.jsxs("span",{className:"dsn-search-bar-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{className:"dsn-search-bar-control",children:[h.jsx("span",{className:"dsn-search-bar-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-search-bar-icon",children:h.jsx(TM,{})})}),h.jsx("span",{className:"dsn-search-bar-label-wrap",children:h.jsx("input",{id:N,type:"search",className:"dsn-search-bar-field",placeholder:r,value:P,defaultValue:a,disabled:o,maxLength:u,name:y,autoComplete:b,"aria-invalid":s||void 0,"aria-required":d||void 0,"aria-describedby":j?E:void 0,"aria-label":k,"aria-labelledby":w,onChange:F,onFocus:p,onBlur:v})}),A&&!o&&h.jsx("span",{className:"dsn-search-bar-icon-wrap dsn-search-bar-clear",children:h.jsx("button",{type:"button",className:"dsn-search-bar-clear-btn","aria-label":"Clear search",onClick:D,children:h.jsx("span",{className:"dsn-search-bar-icon","aria-hidden":"true",children:h.jsx(MM,{})})})})]}),j&&h.jsxs("div",{className:"dsn-search-bar-meta",children:[h.jsxs("div",{className:"dsn-search-bar-helper-inner",children:[f&&h.jsx("span",{className:"dsn-search-bar-helper-icon","aria-hidden":"true",children:f}),B!==void 0&&h.jsx("p",{id:E,className:"dsn-search-bar-helper",children:B})]}),u!==void 0&&h.jsxs("span",{className:"dsn-search-bar-count","aria-live":"polite","aria-atomic":"true",children:[$,"/",u]})]})]})}const $M=[{value:"placeholder-a",label:"Placeholder A"},{value:"placeholder-b",label:"Placeholder B"},{value:"placeholder-c",label:"Placeholder C"},{value:"placeholder-d",label:"Placeholder D"}];function OM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function PM({id:e,label:t,placeholder:n="Placeholder",options:r=$M,value:i,defaultValue:a,open:o,defaultOpen:s=!1,disabled:l=!1,error:c=!1,helperText:u,errorMessage:d,required:f=!1,helperIcon:g,icon:p=!1,leadingIcon:v,className:m,name:x,onChange:y,onOpenChange:b,"aria-label":k,"aria-labelledby":w}){const S=_.useId(),N=e??`dsn-select-${S}`,E=`${N}-menu`,C=`${N}-helper`,T=`${N}-label`,O=t!=null&&t!=="",P=!!(p&&v),M=i!==void 0,[$,A]=_.useState(a??""),I=M?i:$,j=o!==void 0,[B,H]=_.useState(s),F=j?o:B,D=_.useRef(null),W=_.useRef(null),Y=_.useRef(null),U=_.useRef([]),[K,ee]=_.useState(-1),ie=_.useMemo(()=>r.find(q=>q.value===I),[r,I]),ce=c&&d?d:u,Z=_.useCallback((q,G)=>{var X;if(r.length===0)return-1;let ne=q;for(let ge=0;ge<r.length;ge+=1)if(ne=(ne+G+r.length)%r.length,!((X=r[ne])!=null&&X.disabled))return ne;return-1},[r]),J=_.useCallback((q=!1)=>{var ne;if(r.length===0)return-1;const G=r.findIndex(X=>X.value===I&&!X.disabled);if(G>=0)return G;if(q){for(let X=r.length-1;X>=0;X-=1)if(!((ne=r[X])!=null&&ne.disabled))return X;return-1}return r.findIndex(X=>!X.disabled)},[r,I]),z=_.useCallback(q=>{j||H(q),b==null||b(q)},[j,b]);function L(q){var G;q.disabled||l||(M||A(q.value),y==null||y(q.value,q),z(!1),(G=Y.current)==null||G.focus())}return _.useEffect(()=>{function q(G){D.current&&(D.current.contains(G.target)||z(!1))}return document.addEventListener("mousedown",q),()=>{document.removeEventListener("mousedown",q)}},[z]),_.useEffect(()=>{var G;if(!F||l){ee(-1);return}const q=J();ee(q),q>=0&&((G=U.current[q])==null||G.focus())},[l,J,F]),h.jsxs("div",{ref:D,className:["dsn-select",m].filter(Boolean).join(" "),"data-disabled":l||void 0,"data-error":c||void 0,"data-open":F||void 0,children:[O&&h.jsxs("label",{className:"dsn-select-label",id:T,htmlFor:N,children:[t,f&&h.jsxs("span",{className:"dsn-select-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{ref:W,className:"dsn-select-control-wrap",children:[h.jsxs("button",{ref:Y,id:N,type:"button",className:"dsn-select-control",disabled:l,"aria-haspopup":"menu","aria-expanded":F,"aria-controls":F?E:void 0,"aria-label":k,"aria-labelledby":w??(O?T:void 0),"aria-invalid":c||void 0,"aria-required":f||void 0,"aria-describedby":ce?C:void 0,onClick:()=>z(!F),onKeyDown:q=>{(q.key==="ArrowDown"||q.key==="ArrowUp"||q.key==="Enter"||q.key===" ")&&(q.preventDefault(),q.key==="ArrowUp"&&ee(J(!0)),z(!0)),q.key==="Escape"&&z(!1)},children:[P&&h.jsx("span",{className:"dsn-select-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-select-icon",children:v})}),h.jsx("span",{className:"dsn-select-label-wrap",children:h.jsx("span",{className:"dsn-select-value","data-placeholder":!ie||void 0,children:(ie==null?void 0:ie.label)??n})}),h.jsx("span",{className:"dsn-select-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-select-icon",children:h.jsx(OM,{})})})]}),F&&!l&&h.jsx(Er,{role:"menu","aria-label":O?`${t} options`:k?`${k} options`:"Options",className:"dsn-select-popover",contentClassName:"dsn-select-popover-stack",contentPadding:"small",anchorRef:W,offset:4,viewportMargin:16,matchAnchorWidth:!0,content:h.jsx("div",{id:E,children:r.map((q,G)=>h.jsx(Ii,{tabIndex:K===G?0:-1,onKeyDown:ne=>{var X,ge,Pe,ze,ke,Be;if(ne.key==="ArrowDown"){ne.preventDefault();const Se=Z(K>=0?K:J(),1);ee(Se),Se>=0&&((X=U.current[Se])==null||X.focus());return}if(ne.key==="ArrowUp"){ne.preventDefault();const Se=Z(K>=0?K:J(!0),-1);ee(Se),Se>=0&&((ge=U.current[Se])==null||ge.focus());return}if(ne.key==="Home"){ne.preventDefault();const Se=r.findIndex(nt=>!nt.disabled);ee(Se),Se>=0&&((Pe=U.current[Se])==null||Pe.focus());return}if(ne.key==="End"){ne.preventDefault();let Se=-1;for(let nt=r.length-1;nt>=0;nt-=1)if(!((ze=r[nt])!=null&&ze.disabled)){Se=nt;break}ee(Se),Se>=0&&((ke=U.current[Se])==null||ke.focus());return}ne.key==="Escape"&&(ne.preventDefault(),z(!1),(Be=Y.current)==null||Be.focus())},ref:ne=>{U.current[G]=ne},className:"dsn-select-option",label:q.label,description:q.description,showDescription:!!q.description,showLeadingIcon:!1,showTrailingIcon:I===q.value,selected:I===q.value,disabled:q.disabled,onClick:()=>L(q),"aria-label":q.label},q.value))})})]}),x&&h.jsx("input",{type:"hidden",name:x,value:I??""}),ce&&h.jsxs("div",{className:"dsn-select-meta",children:[g!=null&&h.jsx("span",{className:"dsn-select-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-select-meta-icon",children:g})}),h.jsx("p",{id:C,className:"dsn-select-helper",children:ce})]})]})}const AM=[{value:"placeholder-a",label:"Label A"},{value:"placeholder-b",label:"Label B"},{value:"placeholder-c",label:"Label C"},{value:"placeholder-d",label:"Label D"}];function Uy({selectionMode:e="single",id:t,label:n="Label",showLabel:r=!0,placeholder:i="Placeholder",options:a=AM,value:o,defaultValue:s,values:l,defaultValues:c=[],open:u,defaultOpen:d=!1,disabled:f=!1,error:g=!1,helperText:p="Help text",showHelper:v=!0,errorMessage:m,required:x=!1,helperIcon:y,className:b,name:k,onChange:w,onValuesChange:S,onOpenChange:N,onInputChange:E,popoverOffset:C,"aria-label":T,"aria-labelledby":O}){const P=e==="multi",M=_.useId(),$=t??`dsn-combobox-${M}`,A=`${$}-listbox`,I=`${$}-helper`,j=`${$}-label`,B=o!==void 0,[H,F]=_.useState(s??""),D=B?o:H,W=_.useMemo(()=>a.find(ue=>ue.value===D),[a,D]),Y=l!==void 0,[U,K]=_.useState(c),ee=_.useMemo(()=>(Y?l??[]:U).filter(ue=>a.some(re=>re.value===ue)),[U,Y,a,l]),ie=_.useMemo(()=>new Set(ee),[ee]),ce=_.useMemo(()=>a.filter(ue=>ie.has(ue.value)),[ie,a]),[Z,J]=_.useState(P?"":(W==null?void 0:W.label)??"");_.useEffect(()=>{P||J((W==null?void 0:W.label)??"")},[P,W==null?void 0:W.label]),_.useEffect(()=>{if(P&&!Y){const ue=U.filter(re=>a.some(de=>de.value===re));ue.length!==U.length&&K(ue)}},[U,P,Y,a]);const z=u!==void 0,[L,q]=_.useState(d),G=z?u:L,ne=_.useRef(null),X=_.useRef(null),ge=_.useRef(null),Pe=_.useRef(!1),ze=_.useRef([]),[ke,Be]=_.useState(-1),Se=g&&m?m:p,nt=Z.trim().toLowerCase(),qe=_.useMemo(()=>nt.length===0?a:a.filter(ue=>ue.label.toLowerCase().includes(nt)),[nt,a]),Tt=_.useCallback((ue,re)=>{var Ne;if(qe.length===0)return-1;let de=ue;for(let Me=0;Me<qe.length;Me+=1)if(de=(de+re+qe.length)%qe.length,!((Ne=qe[de])!=null&&Ne.disabled))return de;return-1},[qe]),xt=_.useCallback((ue=!1)=>{var de;if(qe.length===0)return-1;const re=qe.findIndex(Ne=>Ne.value===D&&!Ne.disabled);if(re>=0)return re;if(ue){for(let Ne=qe.length-1;Ne>=0;Ne-=1)if(!((de=qe[Ne])!=null&&de.disabled))return Ne;return-1}return qe.findIndex(Ne=>!Ne.disabled)},[qe,D]),Ae=_.useCallback(ue=>{z||q(ue),N==null||N(ue)},[z,N]),it=_.useCallback(ue=>{const re=new Set(ue);return a.filter(de=>re.has(de.value)).map(de=>de.value)},[a]),At=_.useCallback(ue=>{const re=ee.filter(de=>de!==ue);Y||K(re),S==null||S(re,a.filter(de=>re.includes(de.value)))},[ee,Y,S,a]),dn=_.useCallback(ue=>{if(!(ue.disabled||f))if(ie.has(ue.value))At(ue.value);else{const re=it([...ee,ue.value]);Y||K(re),S==null||S(re,a.filter(de=>re.includes(de.value)))}},[ie,ee,f,Y,it,S,a,At]);function Pn(ue){var re;ue.disabled||f||(B||F(ue.value),J(ue.label),E==null||E(ue.label),w==null||w(ue.value,ue),Ae(!1),Pe.current=!0,(re=ge.current)==null||re.focus())}function Qn(){var ue,re;if(P){J(""),E==null||E(""),Ae(!0),(ue=ge.current)==null||ue.focus();return}B||F(""),J(""),E==null||E(""),Ae(!0),(re=ge.current)==null||re.focus()}return _.useEffect(()=>{function ue(re){ne.current&&(ne.current.contains(re.target)||Ae(!1))}return document.addEventListener("mousedown",ue),()=>{document.removeEventListener("mousedown",ue)}},[Ae]),_.useEffect(()=>{if(!G||f){Be(-1);return}Be(xt())},[f,xt,G]),_.useEffect(()=>{if(P&&G&&qe.length>0){const ue=qe.findIndex(de=>!de.disabled&&!ie.has(de.value)),re=ue>=0?ue:Tt(-1,1);re>=0&&Be(re)}},[P,G,qe,ie,Tt]),h.jsxs("div",{ref:ne,className:["dsn-combobox",b].filter(Boolean).join(" "),"data-disabled":f||void 0,"data-error":g||void 0,"data-open":G||void 0,"data-filled":(P?ce.length>0:!!W)||void 0,children:[r&&h.jsxs("label",{className:"dsn-combobox-label",id:j,htmlFor:$,children:[n,x&&h.jsxs("span",{className:"dsn-combobox-required","aria-hidden":"true",children:[" ","*"]})]}),P&&ce.length>0&&h.jsx("div",{className:"dsn-combobox-chip-stack",children:ce.map(ue=>h.jsx(Ho,{size:"md",label:ue.label,showLeadingIcon:!1,showTrailingIcon:!1,onDismiss:()=>At(ue.value)},ue.value))}),h.jsxs("div",{ref:X,className:"dsn-combobox-control-wrap",children:[h.jsx("div",{className:"dsn-combobox-control",children:h.jsxs("div",{className:"dsn-combobox-input-row",children:[h.jsx("span",{className:"dsn-combobox-value-wrap",children:h.jsx("input",{ref:ge,id:$,className:"dsn-combobox-input",type:"text",role:"combobox",autoComplete:"off",disabled:f,value:Z,placeholder:i,"aria-expanded":G,"aria-controls":G?A:void 0,"aria-haspopup":P?"dialog":"listbox","aria-autocomplete":"list","aria-label":T,"aria-labelledby":O??(r?j:void 0),"aria-invalid":g||void 0,"aria-required":x||void 0,"aria-describedby":Se?I:void 0,onFocus:()=>{if(Pe.current){Pe.current=!1;return}f||Ae(!0)},onBlur:ue=>{var re;if(P){const de=ue.relatedTarget;if(de&&((re=ne.current)!=null&&re.contains(de)))return;Ae(!1)}},onClick:()=>{f||Ae(!0)},onChange:ue=>{const re=ue.target.value;J(re),E==null||E(re),G||Ae(!0)},onKeyDown:ue=>{var re,de,Ne;if(ue.key==="ArrowDown"){if(ue.preventDefault(),!G){Ae(!0);return}const Me=Tt(ke>=0?ke:xt(),1);Be(Me),Me>=0&&((re=ze.current[Me])==null||re.focus())}if(ue.key==="ArrowUp"){if(ue.preventDefault(),!G){Ae(!0);return}const Me=Tt(ke>=0?ke:xt(!0),-1);Be(Me),Me>=0&&((de=ze.current[Me])==null||de.focus())}if(ue.key==="Enter"&&G){if(P){if(ke>=0){ue.preventDefault();const Me=qe[ke];Me&&!Me.disabled&&dn(Me)}}else if(ke>=0){ue.preventDefault();const Me=qe[ke];Me&&Pn(Me)}}ue.key==="Escape"&&(ue.preventDefault(),P?(Ae(!1),(Ne=ge.current)==null||Ne.focus()):Ae(!1))}})}),!!Z&&!f&&h.jsx("button",{type:"button",className:"dsn-combobox-clear","aria-label":P?"Clear search":"Clear selection",onClick:Qn,children:h.jsx(Kd,{size:16,"aria-hidden":"true"})}),h.jsx("span",{className:"dsn-combobox-chevron","aria-hidden":"true",children:h.jsx(Sr,{size:16})})]})}),G&&!f&&h.jsx(Er,{role:P?"dialog":"listbox","aria-label":`${n} options`,className:"dsn-combobox-popover",contentClassName:"dsn-combobox-popover-stack",contentPadding:"small",anchorRef:X,offset:C??4,viewportMargin:16,matchAnchorWidth:!0,content:h.jsx("div",{id:A,className:"dsn-combobox-popover-list",children:qe.length===0?h.jsx("div",{className:"dsn-combobox-empty",children:"No options"}):P?h.jsx(h.Fragment,{children:h.jsx("div",{className:"dsn-combobox-multi-options",onMouseDown:ue=>{ue.preventDefault()},children:qe.map((ue,re)=>h.jsx("div",{ref:de=>{ze.current[re]=de},className:["dsn-combobox-multi-option",ke===re&&"dsn-combobox-multi-option--active"].filter(Boolean).join(" "),"aria-disabled":ue.disabled||void 0,tabIndex:ke===re?0:-1,onKeyDown:de=>{var Ne,Me,at;if(de.key==="ArrowDown"){de.preventDefault();const De=Tt(ke>=0?ke:xt(),1);Be(De),De>=0&&((Ne=ze.current[De])==null||Ne.focus());return}if(de.key==="ArrowUp"){de.preventDefault();const De=Tt(ke>=0?ke:xt(!0),-1);Be(De),De>=0&&((Me=ze.current[De])==null||Me.focus());return}if(de.key==="Enter"||de.key===" "){de.preventDefault(),ue.disabled||dn(ue);return}de.key==="Escape"&&(de.preventDefault(),Ae(!1),(at=ge.current)==null||at.focus())},children:h.jsx(hn,{size:"md",checked:ie.has(ue.value),disabled:ue.disabled,label:ue.label,showLeadingIcon:!1,showTrailingIcon:!1,onCheckedChange:()=>{ue.disabled||dn(ue)}})},ue.value))})}):qe.map((ue,re)=>h.jsx(Ii,{tabIndex:ke===re?0:-1,ref:de=>{ze.current[re]=de},className:"dsn-combobox-option",label:ue.label,description:ue.description,showDescription:!!ue.description,showLeadingIcon:!1,showTrailingIcon:!1,selected:D===ue.value,disabled:ue.disabled,onClick:()=>Pn(ue),onKeyDown:de=>{var Ne,Me,at;if(de.key==="ArrowDown"){de.preventDefault();const De=Tt(ke>=0?ke:xt(),1);Be(De),De>=0&&((Ne=ze.current[De])==null||Ne.focus());return}if(de.key==="ArrowUp"){de.preventDefault();const De=Tt(ke>=0?ke:xt(!0),-1);Be(De),De>=0&&((Me=ze.current[De])==null||Me.focus());return}if(de.key==="Enter"||de.key===" "){de.preventDefault(),Pn(ue);return}de.key==="Escape"&&(de.preventDefault(),Ae(!1),(at=ge.current)==null||at.focus())}},ue.value))})})]}),k&&(P?ee.map(ue=>h.jsx("input",{type:"hidden",name:k,value:ue},ue)):h.jsx("input",{type:"hidden",name:k,value:D??""})),v&&Se&&h.jsxs("div",{className:"dsn-combobox-meta",children:[y&&h.jsx("span",{className:"dsn-combobox-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-combobox-meta-icon",children:y})}),h.jsx("p",{id:I,className:"dsn-combobox-helper",children:Se})]})]})}function LM({id:e,label:t,active:n,disabled:r,tabIndex:i,showLeadingIcon:a=!1,leadingIcon:o,showTrailingIcon:s=!1,trailingIcon:l,onSelect:c,onKeyDown:u,onFocus:d,buttonRef:f,ariaLabel:g}){return h.jsxs("button",{ref:f,id:e,type:"button",className:"dsn-segment-control-selector",role:"radio","aria-checked":n,"aria-disabled":r||void 0,"aria-label":g,"data-active":n||void 0,disabled:r,tabIndex:i,onClick:c,onKeyDown:u,onFocus:d,children:[a&&o&&h.jsx("span",{className:"dsn-segment-control-selector-icon","aria-hidden":"true",children:o}),h.jsx("span",{className:"dsn-segment-control-selector-label-wrap",children:h.jsx("span",{className:"dsn-segment-control-selector-label",children:t})}),s&&l&&h.jsx("span",{className:"dsn-segment-control-selector-icon","aria-hidden":"true",children:l})]})}function DM(e){var n;return((n=e.find(r=>!r.disabled)??e[0])==null?void 0:n.value)??""}function nf({options:e,value:t,defaultValue:n,onChange:r,fullWidth:i=!0,className:a,"aria-label":o="Segment control"}){const s=_.useMemo(()=>DM(e),[e]),l=t!==void 0,[c,u]=_.useState(n??s),d=l?t:c,[f,g]=_.useState(()=>{const y=e.findIndex(b=>b.value===d);return y>=0?y:0}),p=_.useRef([]);_.useEffect(()=>{!l&&e.every(y=>y.value!==c)&&u(s)},[s,c,l,e]),_.useEffect(()=>{const y=e.findIndex(b=>b.value===d);y>=0&&g(y)},[e,d]);const v=_.useCallback(y=>{const b=e.find(k=>k.value===y);!b||b.disabled||(l||u(y),y!==d&&(r==null||r(y)))},[l,r,e,d]),m=_.useCallback((y,b)=>{var w;if(e.length===0)return;let k=y;for(let S=0;S<e.length;S+=1)if(k=(k+b+e.length)%e.length,!e[k].disabled){const N=e[k];g(k),v(N.value),(w=p.current[k])==null||w.focus();return}},[e,v]),x=["dsn-segment-control",a].filter(Boolean).join(" ");return h.jsx("div",{className:x,role:"radiogroup","aria-label":o,"data-full-width":i,children:e.map((y,b)=>{const k=y.value===d,w=b===f?0:-1,S=`dsn-segment-control-${y.value}`;return h.jsx(LM,{id:S,label:y.label,active:k,disabled:!!y.disabled,tabIndex:w,showLeadingIcon:y.showLeadingIcon,leadingIcon:y.leadingIcon,showTrailingIcon:y.showTrailingIcon,trailingIcon:y.trailingIcon,ariaLabel:y["aria-label"],buttonRef:N=>{p.current[b]=N},onSelect:()=>v(y.value),onFocus:()=>g(b),onKeyDown:N=>{if(N.key==="ArrowRight"||N.key==="ArrowDown"){N.preventDefault(),m(b,1);return}if(N.key==="ArrowLeft"||N.key==="ArrowUp"){N.preventDefault(),m(b,-1);return}(N.key===" "||N.key==="Enter")&&(N.preventDefault(),v(y.value))}},y.value)})})}function rf(e,t){const n=t==="sm"?"sm":"md",r=t==="sm"?"sm":"md";return _.Children.map(e,i=>{if(!_.isValidElement(i))return i;const a=rf(i.props.children,t);if(i.type===ve){const o=i.props.variant,s=o==="plain"?"secondary":o??"primary";return _.cloneElement(i,{variant:s,size:n,children:a})}return i.type===hn?_.cloneElement(i,{size:r,children:a}):_.cloneElement(i,{children:a})})}function zi({size:e="lg",variant:t="default",leftActions:n,rightActions:r,className:i,"aria-label":a="Toolbar"}){const o=["dsn-toolbar",i].filter(Boolean).join(" "),s=rf(n,e),l=rf(r,e);return h.jsxs("div",{className:o,"data-size":e,"data-variant":t,role:"toolbar","aria-label":a,children:[h.jsx("div",{className:"dsn-toolbar-side dsn-toolbar-side-left",children:s}),h.jsx("div",{className:"dsn-toolbar-side dsn-toolbar-side-right",children:l})]})}const IM=["S","M","T","W","T","F","S"],FM=["07:00","08:00","09:00","10:00","11:00","12:00","01:00","02:00","03:00","04:00","05:00","06:00"];function zM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M9.5 4.5L6 8L9.5 11.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function BM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M6.5 4.5L10 8L6.5 11.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function af(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M5.33333 2V4M10.6667 2V4M2.66667 6H13.3333M4 3.33333H12C12.7364 3.33333 13.3333 3.93029 13.3333 4.66667V12C13.3333 12.7364 12.7364 13.3333 12 13.3333H4C3.26362 13.3333 2.66667 12.7364 2.66667 12V4.66667C2.66667 3.93029 3.26362 3.33333 4 3.33333Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})}function jM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M11.5 4.5L4.5 11.5M4.5 4.5L11.5 11.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function pn(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function qo(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Hy(e){return`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`}function nr(e){const t=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0"),r=String(e.getFullYear());return`${t}-${n}-${r}`}function qy(e,t,n){return`${nr(e)} ${t} ${n}`}function Vy(e){const t=e.trim().split(/\s+/)[0]??"";return/^\d{1,2}[-/]\d{1,2}[-/]\d{4}$/.test(t)}function WM(e){const t=e.trim().toLowerCase();if(!t)return null;if(t==="noon"||t==="12 noon")return{time:"12:00",meridiem:"PM"};if(t==="midnight"||t==="12 midnight")return{time:"12:00",meridiem:"AM"};const n=t.match(/^(\d{1,2})(?::(\d{2}))?\s*(am|pm)?$/);if(!n)return null;let r=parseInt(n[1],10);const i=n[2]!=null?parseInt(n[2],10):0,a=(n[3]??"").toLowerCase();if(a==="pm"&&r!==12&&(r+=12),a==="am"&&r===12&&(r=0),r<0||r>23||i<0||i>59)return null;const o=r===0?12:r>12?r-12:r,s=r<12?"AM":"PM";return{time:`${String(o).padStart(2,"0")}:${String(i).padStart(2,"0")}`,meridiem:s}}function UM(e){return e.toLocaleDateString("en-US",{weekday:"long",day:"numeric",month:"long",year:"numeric"})}function Ky(e){return e.replace(/\D/g,"")}function Yy(e){const t=e.slice(0,2),n=e.slice(2,4),r=e.slice(4,8),i=[t];return n.length>0&&i.push(n),r.length>0&&i.push(r),i.join("-")}function Gy(e){const r=(e.trim().split(/\s+/)[0]??"").match(/^(\d{1,2})[-/](\d{1,2})[-/](\d{4})$/);if(!r)return null;const i=Number(r[1]),a=Number(r[2]),o=Number(r[3]),s=new Date(o,i-1,a);return s.getFullYear()!==o||s.getMonth()!==i-1||s.getDate()!==a?null:pn(s)}const Xy=["january","february","march","april","may","june","july","august","september","october","november","december"],Zy=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],Jy=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function Qy(e,t){const n=e.trim().toLowerCase();if(!n)return null;const r=pn(t);if(r.getTime(),n==="today")return r;if(n==="tomorrow")return ct(r,1);if(n==="yesterday")return ct(r,-1);const i=n.match(/^next\s+(\w+)$/);if(i){const s=i[1],l=Jy.indexOf(s);if(l!==-1){let c=ct(r,1);for(;c.getDay()!==l;)c=ct(c,1);return c}}const a=n.match(/^last\s+(\w+)$/);if(a){const s=a[1],l=Jy.indexOf(s);if(l!==-1){let c=ct(r,-1);for(;c.getDay()!==l;)c=ct(c,-1);return c}}for(let s=0;s<12;s++){const l=Xy[s],c=Zy[s],u=new RegExp(`^(?:${l}|${c})\\s+(\\d{1,2})(?:\\s*(?:st|nd|rd|th))?(?:\\s*,?\\s*(\\d{4}))?$`,"i"),d=n.match(u);if(d){const f=Math.min(31,Math.max(1,Number(d[1]))),g=d[2]?Number(d[2]):t.getFullYear(),p=new Date(g,s,f);if(p.getMonth()===s&&p.getDate()===f)return pn(p)}}const o=n.match(/^(\d{1,2})\s+(?:of\s+)?(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sep|oct|nov|dec)(?:\s*,?\s*(\d{4}))?$/i);if(o){const s=Math.min(31,Math.max(1,Number(o[1]))),l=o[2].toLowerCase();let c=Xy.indexOf(l);if(c===-1&&(c=Zy.indexOf(l)),c!==-1){const u=o[3]?Number(o[3]):t.getFullYear(),d=new Date(u,c,s);if(d.getMonth()===c&&d.getDate()===s)return pn(d)}}return null}function ei(e){return new Date(e.getFullYear(),e.getMonth(),1)}function Zl(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function ct(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),pn(n)}function HM(e){return e.toLocaleDateString("en-US",{month:"short"})}function qM(e){const t=ei(e),n=t.getDay(),r=ct(t,-n);return Array.from({length:42},(i,a)=>ct(r,a))}function VM(e){return!e||e instanceof Date?{start:null,end:null}:{start:e.start?pn(e.start):null,end:e.end?pn(e.end):null}}function KM(e){return!e||!(e instanceof Date)?null:pn(e)}function YM(e,t,n){if(!t||!n)return!1;const r=e.getTime();return r>t.getTime()&&r<n.getTime()}function GM({id:e,displayMode:t="popover",selectionMode:n="single",withTime:r=!1,label:i="Date and time",placeholder:a="MM-DD-YYYY 00:00 AM",startPlaceholder:o="Start date",endPlaceholder:s="End date",value:l,defaultValue:c=null,open:u,defaultOpen:d=!1,disabled:f=!1,required:g=!1,error:p=!1,helperText:v="Help text",errorMessage:m,helperIcon:x,className:y,onChange:b,onOpenChange:k,presets:w,selectedPresetId:S,defaultSelectedPresetId:N=null,onPresetSelect:E,showActions:C=!0,cancelLabel:T="Cancel",confirmLabel:O="Confirm",onCancel:P,onConfirm:M,"aria-label":$,"aria-labelledby":A}){const I=_.useId(),j=e??`dsn-date-time-picker-${I}`,B=`${j}-label`,H=`${j}-helper`,F=`${j}-dialog`,D=n==="range",W=t==="popover",[Y,U]=_.useState(null),K=p||!!Y,ee=Y??(p&&m?m:v),ie=u!==void 0,[ce,Z]=_.useState(d),J=ie?u:ce,z=l!==void 0,[L,q]=_.useState(c),G=z?l:L,ne=KM(G),X=VM(G),ge=_.useMemo(()=>ne?ei(ne):X.start?ei(X.start):ei(new Date),[X.start,ne]),[Pe,ze]=_.useState(ge),ke=_.useMemo(()=>{const te=pn(new Date),Ee=ct(te,-1);if(D){const et=ct(te,-4);return[{id:"today",label:"Today",value:{start:te,end:te}},{id:"yesterday",label:"Yesterday",value:{start:Ee,end:Ee}},{id:"last-week",label:"Last week",value:{start:et,end:te}},{id:"last-month",label:"Last month",value:{start:ct(te,-30),end:te}},{id:"last-year",label:"Last year",value:{start:ct(te,-365),end:te}}]}return[{id:"today",label:"Today",value:te},{id:"yesterday",label:"Yesterday",value:Ee},{id:"last-friday",label:"Last Friday",value:ct(te,-2)}]},[D]),Be=w??ke,Se=C,nt=S!==void 0,[qe,Tt]=_.useState(N),xt=nt?S??null:qe,[Ae,it]=_.useState(pn(new Date)),[At,dn]=_.useState(null),[Pn,Qn]=_.useState("07:00"),[ue,re]=_.useState("AM"),[de,Ne]=_.useState(ne?nr(ne):""),[Me,at]=_.useState(X.start?nr(X.start):""),[De,fn]=_.useState(X.end?nr(X.end):""),An=_.useRef(null),Rn=_.useRef(null),ql=_.useRef(null),Vl=_.useRef({}),Kl=D&&X.start?nr(X.start):"",Hd=D&&X.end?nr(X.end):"",Vt=!D&&ne?r?qy(ne,Pn,ue):nr(ne):"",Ln=_.useMemo(()=>qM(Pe),[Pe]),Re=te=>{ie||Z(te),k==null||k(te)},_t=te=>{z||q(te),b==null||b(te)},tn=te=>{const Ee=Hy(te),et=Vl.current[Ee];et&&et.focus()},Pi=Pe,Gr=(te,Ee)=>{const et=te.trim();if(!et){U(null);return}const wr=Ee==="single",Xr=wr&&r?(et.split(/\s+/)[0]??"").trim():et,lt=wr&&r?et.slice(Xr.length).trim():"",Xe=Qy(Xr,Pi)??Gy(Xr);if(!Xe){Vy(Xr)&&U("Enter a valid date");return}U(null);let Ai=Pn,Ca=ue;if(wr&&r&&lt){const Ta=WM(lt);Ta&&(Ai=Ta.time,Ca=Ta.meridiem,Qn(Ta.time),re(Ta.meridiem))}if(Ee==="single"){_t(Xe),ze(ei(Xe)),it(Xe),Ne(r?qy(Xe,Ai,Ca):nr(Xe));return}const Zr=Ee==="range-start"?Xe:X.start,Dn=Ee==="range-end"?Xe:X.end;if(Zr&&Dn&&Zr.getTime()>Dn.getTime()){_t({start:Dn,end:Zr}),ze(ei(Dn)),it(Dn);return}_t({start:Zr??null,end:Dn??null}),ze(ei(Xe)),it(Xe),Ee==="range-start"&&at(nr(Xe)),Ee==="range-end"&&fn(nr(Xe))},Wo=te=>{nt||Tt(te.id),E==null||E(te.id),_t(te.value)},Ea=te=>{if(dn(null),!D){_t(te),it(te),!r&&!Se&&W&&Re(!1);return}const{start:Ee,end:et}=X;if(!Ee||Ee&&et){_t({start:te,end:null}),it(te);return}te.getTime()<Ee.getTime()?(_t({start:te,end:Ee}),it(te)):(_t({start:Ee,end:te}),it(te)),!r&&!Se&&W&&Re(!1)};_.useEffect(()=>{if(!J)return;const te=D?X.start??Ae:ne??Ae;qo(te,Ae)||it(te);const Ee=setTimeout(()=>tn(te),0);return()=>clearTimeout(Ee)},[Ae,J,D,X.start,ne]),_.useEffect(()=>{const te=Ee=>{!An.current||!J||An.current.contains(Ee.target)||Re(!1)};return document.addEventListener("mousedown",te),()=>document.removeEventListener("mousedown",te)},[J]),_.useEffect(()=>{D||Ne(Vt)},[D,Vt]),_.useEffect(()=>{(!D||!J||X.end)&&dn(null)},[J,D,X.end]),_.useEffect(()=>{D&&(at(Kl),fn(Hd))},[Hd,D,Kl]);const Yl=h.jsxs("div",{className:"dsn-date-time-picker-panel",children:[h.jsxs("div",{className:"dsn-date-time-picker-calendar-header",children:[h.jsx(ve,{variant:"ghost",size:"md",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(zM,{}),"aria-label":"Previous month",onClick:()=>ze(te=>Zl(te,-1))}),h.jsxs("div",{className:"dsn-date-time-picker-calendar-title-wrap",children:[h.jsx("span",{className:"dsn-date-time-picker-calendar-title",children:HM(Pe)}),h.jsx("span",{className:"dsn-date-time-picker-calendar-title",children:Pe.getFullYear()})]}),h.jsx(ve,{variant:"ghost",size:"md",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(BM,{}),"aria-label":"Next month",onClick:()=>ze(te=>Zl(te,1))})]}),h.jsx("div",{className:"dsn-date-time-picker-weekday-row",children:IM.map((te,Ee)=>h.jsx("span",{className:"dsn-date-time-picker-weekday",children:te},`${te}-${Ee}`))}),h.jsx("div",{className:"dsn-date-time-picker-days-grid",role:"grid","aria-label":"Calendar",onMouseLeave:()=>dn(null),children:Ln.map(te=>{const Ee=te.getMonth()===Pe.getMonth(),et=D&&!!(X.start&&!X.end&&At),wr=et&&X.start&&At?At.getTime()<X.start.getTime()?At:X.start:null,Xr=et&&X.start&&At?At.getTime()<X.start.getTime()?X.start:At:null,lt=D?X.end?X.start:wr??X.start:ne,Xe=D?X.end??Xr:null,Ai=qo(te,lt),Ca=D&&qo(te,Xe),Zr=Ai||Ca,Dn=D&&YM(te,lt,Xe),Ta=D&&!!(lt&&Xe&&te.getTime()>=lt.getTime()&&te.getTime()<=Xe.getTime()),xH=qo(te,pn(new Date)),_H=qo(te,Ae),oT=Hy(te);return h.jsx("button",{ref:Lt=>{Vl.current[oT]=Lt},type:"button",role:"gridcell",className:"dsn-date-time-picker-day","data-selected":Zr||void 0,"data-in-range":Dn||void 0,"data-within-range":Ta||void 0,"data-range-start":D&&Ai?!0:void 0,"data-range-end":D&&Ca?!0:void 0,"data-today":xH||void 0,"data-outside-month":!Ee||void 0,"aria-selected":Zr,"aria-label":UM(te),tabIndex:_H?0:-1,onClick:()=>Ea(te),onFocus:()=>it(te),onMouseEnter:()=>{D&&X.start&&!X.end&&dn(te)},onKeyDown:Lt=>{var sT;let kr=null;if(Lt.key==="ArrowRight"&&(kr=ct(te,1)),Lt.key==="ArrowLeft"&&(kr=ct(te,-1)),Lt.key==="ArrowDown"&&(kr=ct(te,7)),Lt.key==="ArrowUp"&&(kr=ct(te,-7)),Lt.key==="Home"&&(kr=ct(te,-te.getDay())),Lt.key==="End"&&(kr=ct(te,6-te.getDay())),Lt.key==="PageUp"){const Jr=Zl(te,-1);kr=new Date(Jr.getFullYear(),Jr.getMonth(),te.getDate())}if(Lt.key==="PageDown"){const Jr=Zl(te,1);kr=new Date(Jr.getFullYear(),Jr.getMonth(),te.getDate())}if(kr){Lt.preventDefault();const Jr=pn(kr);it(Jr),ze(ei(Jr)),setTimeout(()=>tn(Jr),0);return}if(Lt.key==="Enter"||Lt.key===" "){Lt.preventDefault(),Ea(te);return}Lt.key==="Escape"&&(Lt.preventDefault(),Re(!1),(sT=Rn.current)==null||sT.focus())},children:h.jsx("span",{className:"dsn-date-time-picker-day-inner",children:te.getDate()})},oT)})}),r&&h.jsxs("div",{className:"dsn-date-time-picker-time-bar",children:[h.jsx("div",{className:"dsn-date-time-picker-time-hour",children:h.jsx(Uy,{label:"Hour",showLabel:!1,showHelper:!1,placeholder:"07:00",helperText:"",selectionMode:"single",value:Pn,options:FM.map(te=>({value:te,label:te})),onChange:te=>Qn(te),onInputChange:te=>Qn(te),"aria-label":"Select time",className:"dsn-date-time-picker-time-combobox"})}),h.jsx("div",{className:"dsn-date-time-picker-time-meridiem",children:h.jsx(nf,{fullWidth:!1,"aria-label":"Select meridiem",value:ue,onChange:re,options:[{value:"AM",label:"AM"},{value:"PM",label:"PM"}]})})]})]});return W?h.jsxs("div",{ref:An,className:["dsn-date-time-picker",y].filter(Boolean).join(" "),"data-error":K||void 0,"data-disabled":f||void 0,"data-open":J||void 0,children:[!D&&h.jsxs("label",{id:B,className:"dsn-date-time-picker-label",htmlFor:`${j}-single`,children:[i,g&&h.jsxs("span",{className:"dsn-date-time-picker-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{ref:ql,className:"dsn-date-time-picker-control-wrap",children:[!D&&h.jsxs("div",{className:"dsn-date-time-picker-control",children:[h.jsx("span",{className:"dsn-date-time-picker-leading-icon","aria-hidden":"true",children:h.jsx(af,{})}),h.jsx("input",{ref:Rn,id:`${j}-single`,className:"dsn-date-time-picker-control-input",placeholder:a,value:de,onChange:te=>{U(null);const Ee=te.target,et=Ee.value,wr=Ky(et);if(/[a-zA-Z]/.test(et)||wr.length!==et.replace(/-/g,"").length){Ne(et);return}const lt=wr.slice(0,8),Xe=Yy(lt);Ne(Xe),requestAnimationFrame(()=>{Ee.setSelectionRange(Xe.length,Xe.length)})},disabled:f,"aria-label":$,"aria-labelledby":A??B,"aria-required":g||void 0,"aria-invalid":K||void 0,"aria-describedby":ee?H:void 0,"aria-haspopup":"dialog","aria-expanded":J,"aria-controls":J?F:void 0,onFocus:()=>{f||Re(!0)},onClick:()=>{f||Re(!0)},onKeyDown:te=>{const Ee=te.target,et=Ee.value.length,wr=et>0&&(Ee.selectionStart??0)===0&&(Ee.selectionEnd??0)===et,Xr=Ee.selectionStart===Ee.selectionEnd&&(Ee.selectionStart??0)===et;if(te.key==="Enter"){te.preventDefault();const lt=Ee.value.trim(),Xe=r?(lt.split(/\s+/)[0]??"").trim():lt;(lt?Qy(Xe,Pi)??Gy(Xe):null)?Gr(lt,"single"):lt&&Vy(Xe)?U("Enter a valid date"):Re(!0);return}if((te.key==="Backspace"||te.key==="Delete")&&(wr||te.key==="Backspace"&&Xr&&et>0)){te.preventDefault(),Ne(""),U(null),_t(null);return}if(te.key==="Backspace"&&Ee.selectionStart===Ee.selectionEnd){const lt=Ee.selectionStart??0;if(lt===3||lt===6){te.preventDefault(),U(null);const Xe=Ky(de),Ai=(de.slice(0,lt).match(/-/g)??[]).length,Ca=lt-Ai,Zr=Xe.slice(0,Math.max(0,Ca-1)),Dn=Yy(Zr);Ne(Dn),requestAnimationFrame(()=>{Ee.setSelectionRange(Dn.length,Dn.length)})}else U(null);return}te.key==="ArrowDown"&&(te.preventDefault(),Re(!0)),te.key==="Escape"&&Re(!1)},onBlur:te=>Gr(te.target.value,"single")}),de&&!f&&h.jsx("button",{type:"button",className:"dsn-date-time-picker-clear-button","aria-label":"Clear date value",onClick:()=>{var te;Ne(""),U(null),_t(null),Re(!1),(te=Rn.current)==null||te.focus()},children:h.jsx(jM,{})})]}),D&&h.jsxs("div",{className:"dsn-date-time-picker-range-fields",children:[h.jsxs("div",{className:"dsn-date-time-picker-range-field",children:[h.jsx("label",{className:"dsn-date-time-picker-range-field-label",htmlFor:`${j}-start`,children:"Start"}),h.jsxs("div",{className:"dsn-date-time-picker-control",children:[h.jsx("span",{className:"dsn-date-time-picker-leading-icon","aria-hidden":"true",children:h.jsx(af,{})}),h.jsx("input",{ref:Rn,id:`${j}-start`,className:"dsn-date-time-picker-control-input",placeholder:o,value:Me,onChange:te=>at(te.target.value),disabled:f,"aria-label":$??"Start date","aria-required":g||void 0,"aria-invalid":p||void 0,"aria-describedby":ee?H:void 0,"aria-haspopup":"dialog","aria-expanded":J,"aria-controls":J?F:void 0,onFocus:()=>{f||Re(!0)},onClick:()=>{f||Re(!0)},onBlur:te=>Gr(te.target.value,"range-start")})]})]}),h.jsxs("div",{className:"dsn-date-time-picker-range-field",children:[h.jsx("label",{className:"dsn-date-time-picker-range-field-label",htmlFor:`${j}-end`,children:"End"}),h.jsxs("div",{className:"dsn-date-time-picker-control",children:[h.jsx("span",{className:"dsn-date-time-picker-leading-icon","aria-hidden":"true",children:h.jsx(af,{})}),h.jsx("input",{id:`${j}-end`,className:"dsn-date-time-picker-control-input",placeholder:s,value:De,onChange:te=>fn(te.target.value),disabled:f,"aria-label":"End date","aria-required":g||void 0,"aria-invalid":p||void 0,"aria-describedby":ee?H:void 0,onFocus:()=>{f||Re(!0)},onClick:()=>{f||Re(!0)},onBlur:te=>Gr(te.target.value,"range-end")})]})]})]}),J&&!f&&h.jsx(Er,{role:"dialog","aria-label":D?"Choose date range":"Choose date",className:"dsn-date-time-picker-popover",contentClassName:"dsn-date-time-picker-popover-content",contentPadding:"none",anchorRef:ql,offset:4,width:320,matchAnchorWidth:!1,minWidth:192,segment:Be.length>0?h.jsx("div",{className:"dsn-date-time-picker-presets",children:h.jsx(Gl,{label:"Date shortcuts",children:Be.map(te=>h.jsx(Ho,{size:"md",label:te.label,showLeadingIcon:!1,showTrailingIcon:!1,selected:xt===te.id,onClick:()=>Wo(te)},te.id))})}):void 0,content:h.jsx("div",{id:F,children:Yl}),bottomBar:Se?h.jsx(zi,{size:"md",leftActions:null,rightActions:h.jsxs(Rr,{size:"md",spaceBetween:!0,"aria-label":"Date picker actions",children:[h.jsx(ve,{variant:"ghost",size:"md",onClick:()=>{P==null||P(),Re(!1)},children:T}),h.jsx(ve,{variant:"primary",size:"md",onClick:()=>{M==null||M(G??null),Re(!1)},children:O})]})}):void 0})]}),ee&&h.jsxs("div",{className:"dsn-date-time-picker-meta",children:[x&&h.jsx("span",{className:"dsn-date-time-picker-meta-icon",children:x}),h.jsx("p",{id:H,className:"dsn-date-time-picker-helper",children:ee})]})]}):h.jsxs("div",{ref:An,className:["dsn-date-time-picker",y].filter(Boolean).join(" "),"data-error":p||void 0,"data-disabled":f||void 0,children:[i&&h.jsx("p",{id:B,className:"dsn-date-time-picker-label",children:i}),Be.length>0&&h.jsx("div",{className:"dsn-date-time-picker-presets",children:h.jsx(Gl,{label:"Quick date presets",children:Be.map(te=>h.jsx(Ho,{size:"md",label:te.label,showLeadingIcon:!1,showTrailingIcon:!1,selected:xt===te.id,onClick:()=>Wo(te)},te.id))})}),h.jsx("div",{role:"dialog","aria-label":D?"Choose date range":"Choose date",children:Yl}),ee&&h.jsxs("div",{className:"dsn-date-time-picker-meta",children:[x&&h.jsx("span",{className:"dsn-date-time-picker-meta-icon",children:x}),h.jsx("p",{id:H,className:"dsn-date-time-picker-helper",children:ee})]})]})}function XM(){return h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M16 16L12 12M12 12L8 16M12 12V20M20.39 18.39C21.3655 17.8573 22.1359 17.0176 22.5789 16.0004C23.0218 14.9833 23.1125 13.8474 22.836 12.7737C22.5595 11.7 21.9317 10.7502 21.051 10.0757C20.1703 9.40118 19.0898 9.0399 17.98 9.05H16.72C16.4176 7.88024 15.854 6.79419 15.0709 5.87368C14.2878 4.95316 13.3058 4.22212 12.1998 3.73454C11.0938 3.24696 9.89114 3.01595 8.68219 3.05892C7.47325 3.10189 6.29018 3.41772 5.22287 3.98282C4.15556 4.54793 3.23226 5.3472 2.52208 6.32053C1.81191 7.29386 1.33398 8.41797 1.12408 9.605C0.914179 10.792 0.977588 12.0116 1.30956 13.1704C1.64154 14.3292 2.23322 15.3974 3.03999 16.29",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function ZM({id:e,label:t="Label",helperText:n="Help text",helperIcon:r,disabled:i=!1,accept:a,multiple:o=!1,maxSizeText:s="Up to 100Mb",dragText:l="Drag and drop or press to upload",dropText:c="Drop here",onFilesSelected:u,onFocus:d,onBlur:f,className:g,"aria-label":p}){const v=_.useId(),m=e??`dsn-upload-area-${v}`,x=`${m}-label`,y=`${m}-helper`,b=_.useRef(null),[k,w]=_.useState(!1);function S(){var E;i||(E=b.current)==null||E.click()}function N(E){!E||E.length===0||u==null||u(Array.from(E))}return h.jsxs("div",{className:["dsn-upload-area",g].filter(Boolean).join(" "),children:[t&&h.jsx("p",{className:"dsn-upload-area-label",id:x,children:t}),h.jsxs("button",{id:m,type:"button",className:"dsn-upload-area-zone","data-disabled":i||void 0,"data-dragging":k||void 0,disabled:i,"aria-label":p??"Upload files - click or drag and drop","aria-labelledby":t?x:void 0,"aria-describedby":n?y:void 0,onClick:S,onFocus:d,onBlur:f,onDragOver:E=>{E.preventDefault(),i||w(!0)},onDragLeave:E=>{E.preventDefault(),w(!1)},onDrop:E=>{E.preventDefault(),w(!1),i||N(E.dataTransfer.files)},children:[h.jsx("span",{className:"dsn-upload-area-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-upload-area-icon",children:h.jsx(XM,{})})}),h.jsx("span",{className:"dsn-upload-area-label-wrap",children:h.jsx("span",{className:"dsn-upload-area-main-text",children:k&&!i?c:l})}),!k&&h.jsx("span",{className:"dsn-upload-area-size-text",children:s})]}),h.jsx("input",{ref:b,type:"file",className:"dsn-upload-area-native",accept:a,multiple:o,disabled:i,onChange:E=>N(E.target.files)}),n&&h.jsxs("div",{className:"dsn-upload-area-meta",children:[r&&h.jsx("span",{className:"dsn-upload-area-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-upload-area-meta-icon",children:r})}),h.jsx("p",{id:y,className:"dsn-upload-area-helper",children:n})]})]})}function of(e){if(e==null||typeof e=="boolean")return null;if(typeof e=="string"||typeof e=="number")return e;if(Array.isArray(e)){const t=e.map(n=>of(n)).filter(n=>n!==null);return t.length>0?t:null}return _.isValidElement(e)?e:null}function ti({title:e,description:t,size:n="medium",leadingControl:r,trailingControl:i,className:a}){const o=["dsn-section-header",a].filter(Boolean).join(" "),s=of(r),l=of(i);return h.jsxs("div",{className:o,"data-size":n,"data-has-description":!!t||void 0,"data-has-leading-control":!!s||void 0,"data-has-trailing-control":!!l||void 0,children:[s&&h.jsx("div",{className:"dsn-section-header-control",children:s}),h.jsx("div",{className:"dsn-section-header-title-wrapper",children:h.jsxs("div",{className:"dsn-section-header-text",children:[h.jsx("p",{className:"dsn-section-header-title",children:e}),t&&h.jsx("p",{className:"dsn-section-header-description",children:t})]})}),l&&h.jsx("div",{className:"dsn-section-header-control",children:l})]})}function JM(e){var n;return((n=e.find(r=>!r.disabled)??e[0])==null?void 0:n.value)??""}function QM({tabs:e,value:t,defaultValue:n,onChange:r,className:i,showPanels:a=!0,panelClassName:o,"aria-label":s="Tabs"}){const l=_.useMemo(()=>JM(e),[e]),c=t!==void 0,[u,d]=_.useState(n??l),f=c?t:u,g=_.useRef([]);_.useEffect(()=>{!c&&e.every(b=>b.value!==u)&&d(l)},[l,u,c,e]);const p=_.useCallback(b=>{const k=e.find(w=>w.value===b);!k||k.disabled||(c||d(b),b!==f&&(r==null||r(b)))},[c,r,f,e]),v=_.useCallback((b,k)=>{if(e.length===0)return-1;let w=b;for(let S=0;S<e.length;S+=1)if(w=(w+k+e.length)%e.length,!e[w].disabled)return w;return-1},[e]),m=_.useCallback(b=>{var k;b<0||(k=g.current[b])==null||k.focus()},[]),x=["dsn-tab",i].filter(Boolean).join(" "),y=["dsn-tab-panel",o].filter(Boolean).join(" ");return h.jsxs("div",{className:x,children:[h.jsx("div",{className:"dsn-tab-list",role:"tablist","aria-label":s,children:e.map((b,k)=>{const w=b.value===f,S=!!b.disabled,N=`dsn-tab-${b.value}`,E=`dsn-tabpanel-${b.value}`,C=w?0:-1;return h.jsx("button",{ref:T=>{g.current[k]=T},className:"dsn-tab-trigger",type:"button",role:"tab",id:N,"aria-controls":E,"aria-selected":w,"aria-label":b["aria-label"],"aria-disabled":S||void 0,disabled:S,"data-selected":w||void 0,tabIndex:C,onClick:()=>p(b.value),onKeyDown:T=>{if(T.key==="ArrowRight"){T.preventDefault();const O=v(k,1);m(O);return}if(T.key==="ArrowLeft"){T.preventDefault();const O=v(k,-1);m(O);return}if(T.key==="Home"){T.preventDefault();const O=e.findIndex(P=>!P.disabled);m(O);return}if(T.key==="End"){T.preventDefault();const O=[...e].reverse().findIndex(M=>!M.disabled),P=O<0?-1:e.length-1-O;m(P);return}(T.key===" "||T.key==="Enter")&&(T.preventDefault(),p(b.value))},children:h.jsxs("span",{className:"dsn-tab-trigger-content",children:[b.showLeadingIcon&&h.jsx("span",{className:"dsn-tab-icon-wrap","aria-hidden":"true",children:b.leadingIcon}),h.jsx("span",{className:"dsn-tab-label-wrap",children:h.jsx("span",{className:"dsn-tab-label",children:b.label})}),b.showTrailingIcon&&h.jsx("span",{className:"dsn-tab-icon-wrap","aria-hidden":"true",children:b.trailingIcon})]})},b.value)})}),a&&e.map(b=>{const k=`dsn-tabpanel-${b.value}`,w=`dsn-tab-${b.value}`,S=b.value===f;return h.jsx("div",{className:y,role:"tabpanel",id:k,"aria-labelledby":w,hidden:!S,children:b.panel},b.value)})]})}function RM(e){var n;return((n=e.find(r=>!r.disabled)??e[0])==null?void 0:n.value)??""}function Ry({tabs:e,value:t,defaultValue:n,onChange:r,onRemove:i,addActionLabel:a,addActionLeadingIcon:o,onAddAction:s,addActionAriaLabel:l,className:c,showPanels:u=!0,panelClassName:d,"aria-label":f="Custom views"}){const g=_.useMemo(()=>RM(e),[e]),p=t!==void 0,[v,m]=_.useState(n??g),x=p?t:v,y=_.useRef([]);_.useEffect(()=>{!p&&e.every(E=>E.value!==v)&&m(g)},[g,v,p,e]);const b=_.useCallback(E=>{const C=e.find(T=>T.value===E);!C||C.disabled||(p||m(E),E!==x&&(r==null||r(E)))},[p,r,x,e]),k=_.useCallback((E,C)=>{if(e.length===0)return-1;let T=E;for(let O=0;O<e.length;O+=1)if(T=(T+C+e.length)%e.length,!e[T].disabled)return T;return-1},[e]),w=_.useCallback(E=>{var C;E<0||(C=y.current[E])==null||C.focus()},[]),S=["dsn-custom-view-tabs",c].filter(Boolean).join(" "),N=["dsn-custom-view-tabs-panel",d].filter(Boolean).join(" ");return h.jsxs("div",{className:S,children:[h.jsxs("div",{className:"dsn-custom-view-tabs-list",role:"tablist","aria-label":f,children:[e.map((E,C)=>{const T=E.value===x,O=!!E.disabled,P=E.removable!==!1,M=E.showLeadingIcon!==!1,$=`dsn-custom-tab-${E.value}`,A=`dsn-custom-tabpanel-${E.value}`,I=T?0:-1;return h.jsxs("div",{className:"dsn-custom-view-tabs-item",ref:j=>{y.current[C]=j},role:"tab",id:$,"aria-controls":A,"aria-selected":T,"aria-label":E["aria-label"],"aria-disabled":O||void 0,"data-selected":T||void 0,"data-disabled":O||void 0,tabIndex:O?-1:I,onClick:()=>{O||b(E.value)},onKeyDown:j=>{if(!O){if(j.key==="ArrowRight"){j.preventDefault();const B=k(C,1);w(B);return}if(j.key==="ArrowLeft"){j.preventDefault();const B=k(C,-1);w(B);return}if(j.key==="Home"){j.preventDefault();const B=e.findIndex(H=>!H.disabled);w(B);return}if(j.key==="End"){j.preventDefault();const B=[...e].reverse().findIndex(F=>!F.disabled),H=B<0?-1:e.length-1-B;w(H);return}(j.key===" "||j.key==="Enter")&&(j.preventDefault(),b(E.value))}},children:[M&&h.jsx("span",{className:"dsn-custom-view-tabs-icon","data-icon":E.leadingIcon?"custom":"default","aria-hidden":"true",children:E.leadingIcon}),h.jsx("span",{className:"dsn-custom-view-tabs-label-wrap",children:h.jsx("span",{className:"dsn-custom-view-tabs-label",children:E.label})}),P&&h.jsx(ve,{className:"dsn-custom-view-tabs-remove",variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(er,{size:16,"aria-hidden":"true"}),"aria-label":E.removeAriaLabel??`Remove ${E.label}`,disabled:O,onClick:j=>{j.stopPropagation(),j.preventDefault(),i==null||i(E.value)}})]},E.value)}),a&&h.jsx("span",{className:"dsn-custom-view-tabs-add-wrap",children:h.jsx(ve,{className:"dsn-custom-view-tabs-add-button",variant:"ghost",size:"md",showLeadingIcon:!0,leadingIcon:o??h.jsx(IT,{size:16,"aria-hidden":"true"}),"aria-label":l??a,onClick:s,children:a})})]}),u&&e.map(E=>{const C=`dsn-custom-tabpanel-${E.value}`,T=`dsn-custom-tab-${E.value}`,O=E.value===x;return h.jsx("div",{className:N,role:"tabpanel",id:C,"aria-labelledby":T,hidden:!O,children:E.panel},E.value)})]})}const e2=Ry;function t2(e){return e==="none"?"desc":e==="desc"?"asc":"desc"}function n2(e){return e==="asc"?"ascending":e==="desc"?"descending":"none"}function e0({variant:e="title",state:t="default",label:n="Label",width:r,sortable:i=!1,sortDirection:a="none",reorderable:o=!0,resizable:s=!0,checkboxChecked:l=!1,checkboxIndeterminate:c=!1,onCheckboxChange:u,onSortChange:d,onResizeCommand:f,onResizePointerDown:g,onMoreClick:p,onReorderDragStart:v,onReorderDragEnd:m,filterValue:x,onFilterChange:y,leadingAccessory:b,className:k,"aria-label":w}){const[S,N]=_.useState(!1),E=["dsn-data-table-header-cell",k].filter(Boolean).join(" "),C=e==="title",T=C&&i,O=()=>{T&&(d==null||d(t2(a)))},P=$=>{T&&($.key==="Enter"||$.key===" ")&&($.preventDefault(),O())},M=C&&typeof r=="number"?{width:`${r}px`}:void 0;return h.jsx("div",{className:E,"data-variant":e,"data-state":t,"data-dragging":S?"":void 0,role:"columnheader","aria-sort":C&&i?n2(a):void 0,"aria-label":w,style:M,tabIndex:T||o?0:-1,draggable:o||void 0,onClick:O,onKeyDown:P,onDragStart:o?$=>{N(!0),v==null||v($)}:void 0,onDragEnd:o?$=>{N(!1),m==null||m($)}:void 0,children:C?h.jsxs(h.Fragment,{children:[o&&h.jsxs("div",{className:"dsn-data-table-header-drag-indicator","aria-hidden":"true",children:[h.jsx("span",{}),h.jsx("span",{}),h.jsx("span",{}),h.jsx("span",{})]}),h.jsxs("div",{className:"dsn-data-table-header-cell-main",children:[b&&h.jsx("span",{className:"dsn-data-table-header-cell-leading-accessory",onClick:$=>$.stopPropagation(),children:b}),h.jsxs("div",{className:"dsn-data-table-header-cell-title",children:[h.jsx("span",{className:"dsn-data-table-header-cell-label",children:n}),i&&h.jsx("span",{className:"dsn-data-table-header-cell-sort","data-direction":a,"aria-hidden":"true",children:a==="asc"?h.jsx(_T,{size:14,strokeWidth:1.5}):h.jsx(bT,{size:14,strokeWidth:1.5})})]})]}),h.jsx("div",{className:"dsn-data-table-header-cell-controls",children:h.jsx(ve,{variant:"ghost",size:"sm",showLeadingIcon:!0,leadingIcon:h.jsx(Yd,{size:14,strokeWidth:1.5,"aria-hidden":"true"}),showLabel:!1,onClick:$=>{$.stopPropagation(),p==null||p($)},"aria-label":"Column options"})}),s&&h.jsx("button",{type:"button",className:"dsn-data-table-header-resizer","aria-label":"Resize column",onClick:$=>$.stopPropagation(),onPointerDown:$=>{$.stopPropagation(),g==null||g($)},onKeyDown:$=>{$.stopPropagation(),$.key==="ArrowLeft"?($.preventDefault(),f==null||f("decrease")):$.key==="ArrowRight"&&($.preventDefault(),f==null||f("increase"))}})]}):h.jsx("div",{className:"dsn-data-table-header-cell-checkbox-wrap",onClick:$=>$.stopPropagation(),children:h.jsx(hn,{size:"sm",checked:l,indeterminate:c,showContent:!1,"aria-label":w??"Select all rows",onCheckedChange:u})})})}const t0=["highlight","warning","error","success","neutral"];function r2({values:e}){const t=g=>t0[g%t0.length],n=_.useRef(null),r=_.useRef(null),i=_.useRef(null),a=_.useRef(null),o=_.useRef(null),[s,l]=_.useState(e.length),[c,u]=_.useState(!1),d=Math.max(0,e.length-s),f=_.useCallback(()=>{const g=n.current,p=r.current,v=i.current;if(!g||!p)return;const m=g.clientWidth;if(m<=0)return;const y=Array.from(p.querySelectorAll("[data-measure-tag]")).map(N=>N.getBoundingClientRect().width),b=Number.parseFloat(window.getComputedStyle(g).columnGap||"0")||0,k=(v==null?void 0:v.getBoundingClientRect().width)??0;let w=0,S=0;for(let N=0;N<y.length;N+=1){const E=w+(S>0?b:0)+y[N],T=y.length-(N+1)>0?(S>=0?b:0)+k:0;if(E+T<=m)w=E,S+=1;else break}l(S)},[]);return _.useEffect(()=>{l(e.length)},[e]),_.useEffect(()=>{f()},[f,e]),_.useEffect(()=>{d===0&&c&&u(!1)},[c,d]),_.useEffect(()=>{const g=n.current;if(!g||typeof ResizeObserver>"u")return;const p=new ResizeObserver(()=>f());return p.observe(g),()=>p.disconnect()},[f]),_.useEffect(()=>{if(!c)return;const g=v=>{v.key==="Escape"&&u(!1)},p=v=>{const m=v.target,x=a.current,y=o.current;x!=null&&x.contains(m)||y!=null&&y.contains(m)||u(!1)};return window.addEventListener("keydown",g),window.addEventListener("mousedown",p),()=>{window.removeEventListener("keydown",g),window.removeEventListener("mousedown",p)}},[c]),h.jsxs(h.Fragment,{children:[h.jsxs("span",{className:"dsn-data-table-cell-tags",ref:n,children:[e.slice(0,s).map((g,p)=>h.jsx(Nr,{size:"sm",variant:t(p),label:g,showIcon:!1},`${g}-${p}`)),d>0&&h.jsx("button",{ref:a,type:"button",className:"dsn-data-table-cell-tags-overflow-trigger","aria-label":`Show ${d} more tags`,"aria-haspopup":"dialog","aria-expanded":c,onClick:g=>{g.stopPropagation(),u(p=>!p)},children:h.jsx(Nr,{size:"sm",variant:"neutral",label:`+${d}`,showIcon:!1})})]}),h.jsxs("span",{className:"dsn-data-table-cell-tags-measure",ref:r,"aria-hidden":"true",children:[e.map((g,p)=>h.jsx("span",{"data-measure-tag":!0,children:h.jsx(Nr,{size:"sm",variant:t(p),label:g,showIcon:!1})},`${g}-${p}`)),h.jsx("span",{ref:i,children:h.jsx(Nr,{size:"sm",variant:"neutral",label:`+${e.length}`,showIcon:!1})})]}),c&&d>0&&h.jsx("div",{className:"dsn-data-table-cell-tags-popover",ref:o,children:h.jsx(Er,{anchorRef:a,role:"dialog","aria-label":"Hidden tags",width:280,contentPadding:"small",content:h.jsx("div",{className:"dsn-data-table-cell-tags-popover-content",children:e.map((g,p)=>h.jsx(Nr,{size:"sm",variant:t(p),label:g,showIcon:!1},`${g}-${p}`))})})})]})}function Jl(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M6 6.5H3.5V12.5H9.5V10",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("path",{d:"M6.5 3.5H12.5V9.5H6.5V3.5Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}function i2(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M3 11.5L5 11L11.5 4.5L10 3L3.5 9.5L3 11.5Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})}function n0(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M5.5 5.5V11",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M8 5.5V11",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M10.5 5.5V11",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M3.5 4H12.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M5 4V3.5C5 3.22 5.22 3 5.5 3H10.5C10.78 3 11 3.22 11 3.5V4",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M4.5 4L5 12.5H11L11.5 4",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}function a2(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("rect",{x:"3",y:"4.5",width:"10",height:"8.5",rx:"1.5",stroke:"currentColor",strokeWidth:"1.25"}),h.jsx("path",{d:"M3 7H13",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M5.5 3V5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M10.5 3V5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"})]})}function o2(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M6.5 3.5H3.5V12.5H12.5V9.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("path",{d:"M9.5 3.5H12.5M12.5 3.5V6.5M12.5 3.5L7.5 8.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}function s2(e,t,n){switch(e){case"number":return h.jsx("span",{children:typeof t=="number"?t.toLocaleString():String(t??"")});case"date":return h.jsx("span",{children:String(t??"")});case"tag":{const i=(Array.isArray(t)?t:t!=null?[t]:[]).map(a=>String(a));return h.jsx(r2,{values:i})}case"user":{const r=t??{name:""};return h.jsxs("span",{className:"dsn-data-table-cell-user",children:[h.jsx(Di,{size:"xs",variant:"profile",fill:"initials",initials:r.initials??r.name.slice(0,2).toUpperCase(),name:r.name}),h.jsx("span",{children:r.name})]})}case"boolean":return h.jsx($a,{size:"sm",checked:!!t,disabled:!0,"aria-label":t?"True value":"False value"});case"checkbox":return h.jsx(hn,{size:"sm",checked:!!t,showContent:!1,"aria-label":t?"Selected row":"Unselected row",onCheckedChange:n});case"url":return h.jsx("a",{className:"dsn-data-table-cell-link",href:String(t??"#"),children:String(t??"")});case"empty":return h.jsx("span",{className:"dsn-data-table-cell-empty",children:String(t??"Add [field name]")});case"string":default:return h.jsx("span",{children:String(t??"")})}}function l2(e){return e==="string"?h.jsx(ve,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Jl,{}),"aria-label":"Copy cell value"}):e==="number"?h.jsxs(Rr,{size:"sm",spaceBetween:!1,"aria-label":"Number cell actions",children:[h.jsx(ve,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(i2,{}),"aria-label":"Edit number value"}),h.jsx(ve,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(n0,{}),"aria-label":"Delete number value"})]}):e==="date"?h.jsxs(Rr,{size:"sm",spaceBetween:!1,"aria-label":"Date cell actions",children:[h.jsx(ve,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(a2,{}),"aria-label":"Open date picker"}),h.jsx(ve,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(n0,{}),"aria-label":"Clear date value"})]}):e==="user"?h.jsx(ve,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Jl,{}),"aria-label":"Copy user name"}):e==="tag"?h.jsx(ve,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Jl,{}),"aria-label":"Copy tags"}):e==="url"?h.jsxs(Rr,{size:"sm",spaceBetween:!1,"aria-label":"URL cell actions",children:[h.jsx(ve,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Jl,{}),"aria-label":"Copy URL"}),h.jsx(ve,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(o2,{}),"aria-label":"Open URL in new tab"})]}):null}function r0({fieldType:e="string",state:t="default",loading:n=!1,value:r="Label",width:i,onCheckboxChange:a,leadingAccessory:o,align:s="left",className:l,"aria-label":c}){const u=["dsn-data-table-cell",l].filter(Boolean).join(" "),d=t==="hover"&&!n?l2(e):null,f=typeof i=="number"?{width:`${i}px`}:void 0;return h.jsx("div",{className:u,"data-field-type":e,"data-state":t,"data-loading":n||void 0,"data-align":s,"aria-label":c,style:f,children:n?h.jsx("span",{className:"dsn-data-table-cell-skeleton","aria-hidden":"true"}):h.jsxs(h.Fragment,{children:[o&&h.jsx("span",{className:"dsn-data-table-cell-leading-accessory",children:o}),h.jsx("span",{className:"dsn-data-table-cell-content",children:s2(e,r,a)}),d&&h.jsx("span",{className:"dsn-data-table-cell-actions",children:d})]})})}function i0(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M8 2.5L13.5 8L8 13.5L2.5 8L8 2.5Z",stroke:"currentColor",strokeWidth:"var(--border-width-medium)",strokeLinejoin:"round"})})}function c2(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M6 6.5H3.5V12.5H9.5V10",stroke:"currentColor",strokeWidth:"var(--border-width-medium)",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("path",{d:"M6.5 3.5H12.5V9.5H6.5V3.5Z",stroke:"currentColor",strokeWidth:"var(--border-width-medium)",strokeLinecap:"round",strokeLinejoin:"round"})]})}function u2({alignment:e="inline",variant:t="with-title",state:n="default",title:r="Title",description:i="Description",content:a,showIcon:o=!0,icon:s,showActions:l=!0,actionAriaLabel:c="Copy description",onActionClick:u,className:d,"aria-label":f}){const g=t==="with-title",p=a!=null,v=["dsn-data-list-cell",d].filter(Boolean).join(" "),m=p?h.jsx("span",{className:"dsn-data-list-cell-interactive-content",children:a}):h.jsx("p",{className:"dsn-data-list-cell-description",children:i});return h.jsxs("div",{className:v,"data-alignment":e,"data-variant":t,"data-state":n,role:"group","aria-label":f,children:[e==="inline"?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"dsn-data-list-cell-title-wrapper",children:[o&&h.jsx("span",{className:"dsn-data-list-cell-icon","aria-hidden":"true",children:s??h.jsx(i0,{})}),g&&h.jsx("p",{className:"dsn-data-list-cell-title",children:r})]}),h.jsx("div",{className:"dsn-data-list-cell-text-block",children:m})]}):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"dsn-data-list-cell-title-description-wrapper",children:h.jsxs("div",{className:"dsn-data-list-cell-title-wrapper",children:[o&&h.jsx("span",{className:"dsn-data-list-cell-icon","aria-hidden":"true",children:s??h.jsx(i0,{})}),g&&h.jsx("p",{className:"dsn-data-list-cell-title",children:r})]})}),h.jsx("div",{className:"dsn-data-list-cell-text-block",children:m})]}),l&&h.jsx("span",{className:"dsn-data-list-cell-actions",children:h.jsx(ve,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(c2,{}),"aria-label":c,onClick:x=>{x.stopPropagation(),u==null||u(x)}})})]})}function d2(e){if(e.kind==="menu-cell"){const n=e.props??{};return h.jsx(Ii,{variant:e.variant??"default",label:"Label",showLeadingIcon:!0,...n})}if(e.kind==="checkbox-cell"){const n=e.props??{};return h.jsx(hn,{label:"Label",showLeadingIcon:!0,...n})}const t=e.props??{};return h.jsx(ef,{label:"Label",showLeadingIcon:!0,...t})}function a0({title:e="Choice list",sections:t,showSectionHeaders:n=!0,className:r,sectionClassName:i,enableMenuKeyboardNavigation:a=!1,onMenuEscape:o}){const s=_.useRef(null),l=["dsn-choice-list",r].filter(Boolean).join(" "),c=["dsn-choice-list-section",i].filter(Boolean).join(" "),u=_.useCallback(()=>s.current?Array.from(s.current.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')):[],[]),d=_.useCallback(f=>{const g=u();if(g.length===0)return;const p=Math.min(Math.max(f,0),g.length-1);g.forEach((v,m)=>{v.tabIndex=m===p?0:-1})},[u]);return _.useEffect(()=>{a&&d(0)},[a,t,d]),h.jsx("section",{ref:s,className:l,"aria-label":e,onKeyDown:f=>{var x,y,b,k;if(!a)return;const g=u();if(g.length===0)return;const p=document.activeElement,v=p?g.indexOf(p):-1,m=v>=0?v:0;if(f.key==="ArrowDown"){f.preventDefault();const w=(m+1)%g.length;d(w),(x=g[w])==null||x.focus();return}if(f.key==="ArrowUp"){f.preventDefault();const w=(m-1+g.length)%g.length;d(w),(y=g[w])==null||y.focus();return}if(f.key==="Home"){f.preventDefault(),d(0),(b=g[0])==null||b.focus();return}if(f.key==="End"){f.preventDefault();const w=g.length-1;d(w),(k=g[w])==null||k.focus();return}f.key==="Escape"&&(f.preventDefault(),o==null||o())},children:h.jsx("div",{className:"dsn-choice-list-sections",children:t.map(f=>h.jsxs("section",{className:c,"aria-label":f.title,children:[n&&h.jsx(ti,{title:f.title,size:"small"}),h.jsx("div",{className:"dsn-choice-list-items",children:f.items.map(g=>h.jsx("div",{className:"dsn-choice-list-item",children:d2(g)},g.id))})]},f.id))})})}function f2({id:e,label:t="Label",checkboxLabel:n="Label",checked:r,defaultChecked:i=!1,disabled:a=!1,helperText:o="Help text",helperIcon:s,error:l=!1,errorMessage:c,required:u=!1,className:d,checkboxProps:f,onCheckedChange:g,"aria-label":p}){const v=_.useId(),x=`${e??`dsn-checkbox-field-${v}`}-helper`,y=r!==void 0,[b,k]=_.useState(i),w=y?r:b,S=l&&c?c:o;function N(E){y||k(E),g==null||g(E)}return h.jsxs("div",{className:["dsn-checkbox-field",d].filter(Boolean).join(" "),"data-error":l||void 0,"data-disabled":a||void 0,children:[h.jsxs("fieldset",{className:"dsn-checkbox-fieldset","aria-label":p,"aria-describedby":S?x:void 0,"aria-invalid":l||void 0,"aria-required":u||void 0,children:[h.jsxs("legend",{className:"dsn-checkbox-field-label",children:[t,u&&h.jsxs("span",{className:"dsn-checkbox-field-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsx("div",{className:"dsn-checkbox-field-control",children:h.jsx(hn,{fullWidth:!0,label:n,checked:w,disabled:a,showTrailingIcon:!1,onCheckedChange:N,...f})})]}),S&&h.jsxs("div",{className:"dsn-checkbox-field-meta",children:[s&&h.jsx("span",{className:"dsn-checkbox-field-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-checkbox-field-meta-icon",children:s})}),h.jsx("p",{id:x,className:"dsn-checkbox-field-helper",children:S})]})]})}function h2(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M8 2.5L13.5 8L8 13.5L2.5 8L8 2.5Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinejoin:"round"})})}function p2({label:e,description:t,showDescription:n=!0,showIcon:r=!1,iconSlot:i,error:a=!1,labelWidth:o,children:s,className:l}){const c=_.useId(),u=`dsn-horizontal-input-label-${c}`,d=`dsn-horizontal-input-description-${c}`,f=n&&!!t,g=i??h.jsx(h2,{}),p={...o?{"--dsn-horizontal-input-label-width":o}:{}};return h.jsx("div",{className:["dsn-horizontal-input",l].filter(Boolean).join(" "),"data-error":a||void 0,"data-has-icon":r||void 0,style:p,children:h.jsxs("div",{className:"dsn-horizontal-input-row",children:[h.jsxs("div",{className:"dsn-horizontal-input-meta",children:[h.jsxs("div",{className:"dsn-horizontal-input-label-row",children:[r&&h.jsx("span",{className:"dsn-horizontal-input-icon","aria-hidden":"true",children:g}),h.jsx("span",{id:u,className:"dsn-horizontal-input-label",children:e})]}),f&&h.jsx("p",{id:d,className:"dsn-horizontal-input-description",children:t})]}),h.jsx("div",{className:"dsn-horizontal-input-content",role:"group","aria-labelledby":u,"aria-describedby":f?d:void 0,children:s})]})})}const g2=Array.from({length:6},(e,t)=>({id:`option-${t+1}`,label:"Label",checked:!1}));function v2({id:e,label:t="Label",options:n=g2,helperText:r="Help text",helperIcon:i,error:a=!1,errorMessage:o,required:s=!1,disabled:l=!1,className:c,onOptionChange:u,"aria-label":d}){const f=_.useId(),p=`${e??`dsn-multi-choice-${f}`}-helper`,v=a&&o?o:r;return h.jsxs("div",{className:["dsn-multi-choice",c].filter(Boolean).join(" "),"data-error":a||void 0,"data-disabled":l||void 0,children:[h.jsxs("fieldset",{className:"dsn-multi-choice-fieldset","aria-label":d,"aria-describedby":v?p:void 0,"aria-invalid":a||void 0,"aria-required":s||void 0,children:[h.jsxs("legend",{className:"dsn-multi-choice-label",children:[t,s&&h.jsxs("span",{className:"dsn-multi-choice-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsx("div",{className:"dsn-multi-choice-stack",children:n.map(m=>h.jsx(hn,{fullWidth:!0,label:m.label,checked:m.checked,disabled:l||m.disabled,showTrailingIcon:!1,showDescription:!!m.description,description:m.description,showDescriptionRight:!!m.descriptionRight,descriptionRight:m.descriptionRight,onCheckedChange:x=>u==null?void 0:u(m.id,x),...m.checkboxProps},m.id))})]}),v&&h.jsxs("div",{className:"dsn-multi-choice-meta",children:[i&&h.jsx("span",{className:"dsn-multi-choice-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-multi-choice-meta-icon",children:i})}),h.jsx("p",{id:p,className:"dsn-multi-choice-helper",children:v})]})]})}const m2=Array.from({length:6},(e,t)=>({id:`option-${t+1}`,label:"Label"}));function y2({id:e,label:t="Label",options:n=m2,value:r,defaultValue:i,helperText:a="Help text",helperIcon:o,error:s=!1,errorMessage:l,required:c=!1,disabled:u=!1,className:d,onValueChange:f,"aria-label":g}){const p=_.useId(),v=e??`dsn-single-choice-${p}`,m=`${v}-legend`,x=`${v}-helper`,y=s&&l?l:a,b=r!==void 0,[k,w]=_.useState(i??""),S=b?r:k;function N(E){b||w(E),f==null||f(E)}return h.jsxs("div",{className:["dsn-single-choice",d].filter(Boolean).join(" "),"data-error":s||void 0,"data-disabled":u||void 0,children:[h.jsxs("fieldset",{className:"dsn-single-choice-fieldset","aria-label":g,"aria-describedby":y?x:void 0,"aria-invalid":s||void 0,"aria-required":c||void 0,children:[h.jsxs("legend",{id:m,className:"dsn-single-choice-label",children:[t,c&&h.jsxs("span",{className:"dsn-single-choice-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsx("div",{className:"dsn-single-choice-stack",role:"radiogroup","aria-labelledby":m,children:n.map(E=>h.jsx(ef,{className:"dsn-radio--full-width",label:E.label,checked:S===E.id,disabled:u||E.disabled,showTrailingIcon:!1,showDescription:!!E.description,description:E.description,showDescriptionRight:!!E.descriptionRight,descriptionRight:E.descriptionRight,onCheckedChange:C=>{C&&N(E.id)},...E.radioProps},E.id))})]}),y&&h.jsxs("div",{className:"dsn-single-choice-meta",children:[o&&h.jsx("span",{className:"dsn-single-choice-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-single-choice-meta-icon",children:o})}),h.jsx("p",{id:x,className:"dsn-single-choice-helper",children:y})]})]})}function b2({selectedCount:e,onCountClick:t,onDismiss:n,actions:r,className:i}){const a=e===1?"item":"items";return h.jsx("div",{className:`dsn-bulk-action-bar${i?` ${i}`:""}`,role:"toolbar","aria-label":`${e} ${a} selected`,children:h.jsxs("div",{className:"dsn-bulk-action-bar-container",children:[h.jsxs(ve,{variant:"secondary",size:"md",showLabel:!0,showTrailingIcon:!0,trailingIcon:h.jsx(Sr,{size:16,strokeWidth:1.5,"aria-hidden":"true"}),onClick:t,"aria-label":`${e} selected, click to view selection options`,children:[e," selected"]}),h.jsxs(Rr,{size:"md",spaceBetween:!0,"aria-label":"Bulk actions",children:[r.map((o,s)=>h.jsx(ve,{variant:"secondary",size:"md",showLeadingIcon:o.icon!=null,leadingIcon:o.icon,showLabel:!0,showTrailingIcon:o.hasDropdown,trailingIcon:o.hasDropdown?h.jsx(Sr,{size:16,strokeWidth:1.5,"aria-hidden":"true"}):void 0,destructive:o.destructive,disabled:o.disabled,onClick:o.onClick,"aria-haspopup":o.hasDropdown?"menu":void 0,"aria-label":o["aria-label"],children:o.label},s)),h.jsx(ve,{variant:"ghost",size:"md",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(er,{size:16,strokeWidth:1.5,"aria-hidden":"true"}),onClick:n,"aria-label":"Clear selection"})]})]})})}const x2=Array.from({length:8},(e,t)=>({id:`option-${t+1}`,label:"Label"}));function _2({id:e,label:t="Label",options:n=x2,value:r,defaultValue:i=[],helperText:a="Help text",helperIcon:o,error:s=!1,errorMessage:l,required:c=!1,disabled:u=!1,size:d="md",className:f,onValueChange:g,"aria-label":p}){const v=_.useId(),x=`${e??`dsn-chip-field-${v}`}-helper`,y=s&&l?l:a,b=r!==void 0,[k,w]=_.useState(i),S=b?r:k,N=new Set(S);function E(C){const T=N.has(C)?S.filter(O=>O!==C):[...S,C];b||w(T),g==null||g(T)}return h.jsxs("div",{className:["dsn-chip-field",f].filter(Boolean).join(" "),"data-error":s||void 0,"data-disabled":u||void 0,children:[h.jsxs("fieldset",{className:"dsn-chip-fieldset","aria-label":p,"aria-describedby":y?x:void 0,"aria-invalid":s||void 0,"aria-required":c||void 0,children:[h.jsxs("legend",{className:"dsn-chip-field-label",children:[t,c&&h.jsxs("span",{className:"dsn-chip-field-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsx(Gl,{label:t,className:"dsn-chip-field-group",children:n.map(C=>h.jsx(Ho,{label:C.label,size:d,selected:N.has(C.id),disabled:u||C.disabled,onClick:()=>E(C.id),...C.chipProps},C.id))})]}),y&&h.jsxs("div",{className:"dsn-chip-field-meta",children:[o&&h.jsx("span",{className:"dsn-chip-field-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-chip-field-meta-icon",children:o})}),h.jsx("p",{id:x,className:"dsn-chip-field-helper",children:y})]})]})}function Vo(e,t,n){return Math.min(n,Math.max(t,e))}function Oa(e,t,n,r){if(r<=0)return Vo(e,t,n);const i=t+Math.round((e-t)/r)*r,a=Vo(i,t,n);return Number(a.toFixed(6))}function sf(e,t,n,r){const i=Oa(e[0],t,n,r),a=Oa(e[1],t,n,r);return[Math.min(i,a),Math.max(i,a)]}function lf(e){const r=72+e.length*9;return Vo(r,104,184)}function w2({id:e,mode:t="single",stack:n="vertical",showInput:r=!1,value:i,defaultValue:a,rangeValue:o,defaultRangeValue:s,min:l=0,max:c=100,step:u=1,disabled:d=!1,showValue:f=!0,showMinMax:g=!1,minLabel:p,maxLabel:v,minInputLabel:m="Minimum",maxInputLabel:x="Maximum",className:y,onValueChange:b,onRangeChange:k,valueFormatter:w=O=>String(O),minHandleAriaLabel:S="Minimum value",maxHandleAriaLabel:N="Maximum value","aria-label":E,"aria-labelledby":C,"aria-valuetext":T}){const O=_.useId(),P=e??`dsn-slider-${O}`,M=Math.min(l,c),$=Math.max(l,c),A=u>0?u:1,I=t==="single",j=n==="vertical",B=i!==void 0,H=o!==void 0,[F,D]=_.useState(()=>Oa(a??M,M,$,A)),[W,Y]=_.useState(()=>sf(s??[M,$],M,$,A)),[U,K]=_.useState(!1),[ee,ie]=_.useState("single"),ce=_.useRef(null),Z=_.useRef(null),J=B?Oa(i,M,$,A):F,z=H?sf(o,M,$,A):W,L=_.useMemo(()=>$<=M?0:(J-M)/($-M)*100,[J,M,$]),q=_.useMemo(()=>{if($<=M)return{minPct:0,maxPct:0};const re=(z[0]-M)/($-M)*100,de=(z[1]-M)/($-M)*100;return{minPct:re,maxPct:de}},[z,M,$]);function G(re){const de=Oa(re,M,$,A);B||D(de),b==null||b(de)}function ne(re){const de=sf(re,M,$,A);H||Y(de),k==null||k(de)}function X(re,de){const Ne=Oa(de,M,$,A);if(re==="min"){ne([Math.min(Ne,z[1]),z[1]]);return}ne([z[0],Math.max(Ne,z[0])])}function ge(re,de,Ne){const Me=de.getBoundingClientRect(),at=Me.width||1,De=(re-Me.left)/at,fn=Vo(De,0,1),An=M+fn*($-M);if(I){G(An);return}X(Ne??(ee==="max"?"max":"min"),An)}function Pe(re){if(d)return;const de=re.currentTarget;if(I)ie("single");else{const Ne=de.getBoundingClientRect(),Me=Ne.width||1,at=Vo((re.clientX-Ne.left)/Me,0,1),De=M+at*($-M),fn=Math.abs(De-z[0]),An=Math.abs(De-z[1]),Rn=fn<=An?"min":"max";ie(Rn),de.setPointerCapture(re.pointerId),K(!0),ge(re.clientX,de,Rn);return}de.setPointerCapture(re.pointerId),K(!0),ge(re.clientX,de)}function ze(re){d||!U||ge(re.clientX,re.currentTarget)}function ke(re){re.currentTarget.hasPointerCapture(re.pointerId)&&(re.currentTarget.releasePointerCapture(re.pointerId),K(!1))}function Be(re){if(d)return;const de=A*10,Me=re.currentTarget.getAttribute("data-handle")??"single",at=Me==="min"?z[0]:Me==="max"?z[1]:J;function De(fn){Me==="min"||Me==="max"?X(Me,fn):G(fn)}switch(re.key){case"ArrowRight":case"ArrowUp":re.preventDefault(),De(at+A);break;case"ArrowLeft":case"ArrowDown":re.preventDefault(),De(at-A);break;case"PageUp":re.preventDefault(),De(at+de);break;case"PageDown":re.preventDefault(),De(at-de);break;case"Home":re.preventDefault(),De(M);break;case"End":re.preventDefault(),De($);break}}const Se=p??w(M),nt=v??w($),qe=T??w(J),Tt=`${w(z[0])} - ${w(z[1])}`,xt=q.minPct,Ae=q.maxPct-q.minPct,it=f&&(I||!r)&&!(r&&I),At=lf(w(J)),dn=lf(w(z[0])),Pn=lf(w(z[1]));function Qn(){var de;const re=(de=Z.current)==null?void 0:de.querySelector("input");re instanceof HTMLInputElement&&(re.focus(),re.select())}function ue(re){re.key==="Enter"&&(re.preventDefault(),Qn())}return h.jsxs("div",{className:["dsn-slider",y].filter(Boolean).join(" "),id:P,"data-disabled":d||void 0,"data-stack":n,children:[it&&h.jsx("div",{className:"dsn-slider-value",children:I?w(J):Tt}),r&&I&&j&&h.jsx(Fi,{value:J,min:M,max:$,step:A,disabled:d,onChange:re=>{re!==null&&G(re)},"aria-label":E??"Slider value"}),r&&!I&&j&&h.jsxs("div",{className:"dsn-slider-input-row",children:[h.jsx("div",{ref:ce,onKeyDown:ue,children:h.jsx(Fi,{label:m,value:z[0],min:M,max:z[1],step:A,disabled:d,onChange:re=>{re!==null&&X("min",re)},"aria-label":S})}),h.jsx("div",{ref:Z,children:h.jsx(Fi,{label:x,value:z[1],min:z[0],max:$,step:A,disabled:d,onChange:re=>{re!==null&&X("max",re)},"aria-label":N})})]}),h.jsxs("div",{className:"dsn-slider-main-row",children:[r&&!I&&!j&&h.jsx("div",{ref:ce,onKeyDown:ue,style:{width:`${dn}px`},children:h.jsx(Fi,{className:"dsn-slider-inline-input",value:z[0],min:M,max:z[1],step:A,disabled:d,onChange:re=>{re!==null&&X("min",re)},"aria-label":S})}),h.jsxs("div",{className:"dsn-slider-track",onPointerDown:Pe,onPointerMove:ze,onPointerUp:ke,onPointerCancel:ke,onLostPointerCapture:()=>K(!1),children:[h.jsx("div",{className:"dsn-slider-bar"}),h.jsx("div",{className:"dsn-slider-range",style:I?{width:`${L}%`}:{left:`${xt}%`,width:`${Ae}%`}}),h.jsx("div",{className:"dsn-slider-handle-wrap",style:{left:`${I?L:xt}%`},children:h.jsx("div",{role:"slider",tabIndex:d?-1:0,className:"dsn-slider-handle","data-handle":I?"single":"min","data-dragging":U&&ee===(I?"single":"min")?!0:void 0,"aria-disabled":d||void 0,"aria-valuemin":M,"aria-valuemax":I?$:z[1],"aria-valuenow":I?J:z[0],"aria-valuetext":I?qe:w(z[0]),"aria-label":I?E??"Slider value":S,"aria-labelledby":I?C:void 0,onKeyDown:Be})}),!I&&h.jsx("div",{className:"dsn-slider-handle-wrap",style:{left:`${q.maxPct}%`},children:h.jsx("div",{role:"slider",tabIndex:d?-1:0,className:"dsn-slider-handle","data-handle":"max","data-dragging":U&&ee==="max"?!0:void 0,"aria-disabled":d||void 0,"aria-valuemin":z[0],"aria-valuemax":$,"aria-valuenow":z[1],"aria-valuetext":w(z[1]),"aria-label":N,onKeyDown:Be})})]}),r&&I&&!j&&h.jsx("div",{style:{width:`${At}px`},children:h.jsx(Fi,{className:"dsn-slider-inline-input",value:J,min:M,max:$,step:A,disabled:d,onChange:re=>{re!==null&&G(re)},"aria-label":E??"Slider value"})}),r&&!I&&!j&&h.jsx("div",{ref:Z,style:{width:`${Pn}px`},children:h.jsx(Fi,{className:"dsn-slider-inline-input",value:z[1],min:z[0],max:$,step:A,disabled:d,onChange:re=>{re!==null&&X("max",re)},"aria-label":N})})]}),g&&h.jsxs("div",{className:"dsn-slider-minmax","aria-hidden":"true",children:[h.jsx("span",{children:Se}),h.jsx("span",{children:nt})]})]})}const k2=3e3,S2=200;function N2(e){switch(e){case"success":return h.jsx($y,{size:16,"aria-hidden":"true"});case"warning":return h.jsx(Ly,{size:16,"aria-hidden":"true"});case"error":return h.jsx(Kd,{size:16,"aria-hidden":"true"});case"default":default:return h.jsx(Gd,{size:16,"aria-hidden":"true"})}}function E2({variant:e="inline",severity:t="default",title:n,description:r,actionLabel:i,onAction:a,dismissible:o=!0,dismissLabel:s="Dismiss notification",onDismiss:l,icon:c,className:u}){const[d,f]=_.useState(!0),[g,p]=_.useState(!1),v=_.useRef(null),m=_.useRef(null),x=_.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]),y=_.useCallback(()=>{x(),!g&&(v.current=setTimeout(()=>{p(!0)},k2))},[x,g]);_.useEffect(()=>(y(),()=>{x()}),[x,y]),_.useEffect(()=>{if(g)return x(),m.current=setTimeout(()=>{f(!1),l==null||l()},S2),()=>{m.current&&(clearTimeout(m.current),m.current=null)}},[x,g,l]);const b=t==="error"?"assertive":"polite",k=t==="error"?"alert":"status",w=e==="rich"&&!!r;return d?h.jsxs("div",{className:["dsn-toast",u].filter(Boolean).join(" "),"data-severity":t,"data-variant":e,"data-state":g?"exit":"enter",role:k,"aria-live":b,"aria-atomic":"true",onMouseEnter:x,onMouseLeave:y,children:[h.jsx("span",{className:"dsn-toast-icon","aria-hidden":"true",children:c??N2(t)}),h.jsxs("div",{className:"dsn-toast-content",children:[h.jsx("div",{className:"dsn-toast-title",children:n}),w?h.jsx("div",{className:"dsn-toast-description",children:r}):null]}),i?h.jsx(ve,{className:"dsn-toast-action",variant:"secondary",size:"sm",onClick:a,children:i}):null,o?h.jsx(ve,{className:"dsn-toast-dismiss",variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(er,{size:16,"aria-hidden":"true"}),"aria-label":s,onClick:()=>p(!0)}):null]}):null}function C2(e){switch(e){case"success":return h.jsx($y,{size:16,"aria-hidden":"true"});case"warning":return h.jsx(Ly,{size:16,"aria-hidden":"true"});case"error":return h.jsx(Kd,{size:16,"aria-hidden":"true"});case"default":default:return h.jsx(Gd,{size:16,"aria-hidden":"true"})}}function T2({severity:e="default",title:t,description:n,icon:r,content:i,actions:a,supporting:o,dismissible:s=!0,dismissLabel:l="Dismiss callout",onDismiss:c,className:u}){const d=!!i,f=!!a||!!o,g=e==="error"?"alert":"status",p=e==="error"?"assertive":"polite";return h.jsxs("section",{className:["dsn-callout",u].filter(Boolean).join(" "),"data-severity":e,role:g,"aria-live":p,"aria-atomic":"true",children:[h.jsxs("div",{className:"dsn-callout-header",children:[h.jsx("span",{className:"dsn-callout-icon","aria-hidden":"true",children:r??C2(e)}),h.jsxs("div",{className:"dsn-callout-text",children:[h.jsx("p",{className:"dsn-callout-title",children:t}),n?h.jsx("p",{className:"dsn-callout-description",children:n}):null]}),s?h.jsx(ve,{className:"dsn-callout-dismiss",variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(er,{size:16,"aria-hidden":"true"}),"aria-label":l,onClick:c}):null]}),d?h.jsx("div",{className:"dsn-callout-content",children:i}):null,f?h.jsx(zi,{size:"sm",variant:"plain",leftActions:o,rightActions:a,"aria-label":"Callout actions"}):null]})}function M2({title:e,description:t,disclosure:n="left",bordered:r=!1,expanded:i,defaultExpanded:a=!1,disabled:o=!1,children:s,className:l,contentClassName:c,onExpandedChange:u}){const d=_.useId(),f=`dsn-accordion-trigger-${d}`,g=`dsn-accordion-content-${d}`,p=i!==void 0,[v,m]=_.useState(a),x=p?i:v,y=["dsn-accordion",l].filter(Boolean).join(" "),b=["dsn-accordion-content-inner",c].filter(Boolean).join(" "),k=h.jsx(Sr,{size:16,"aria-hidden":"true"});function w(N){p||m(N),u==null||u(N)}function S(){return h.jsx("span",{className:"dsn-accordion-disclosure-icon",children:k})}return h.jsxs("div",{className:y,"data-bordered":r||void 0,"data-expanded":x||void 0,"data-disclosure":n,"data-disabled":o||void 0,children:[h.jsx("button",{id:f,type:"button",className:"dsn-accordion-trigger","aria-expanded":x,"aria-controls":g,disabled:o,onClick:()=>w(!x),children:h.jsx(ti,{title:e,description:t,size:"medium",leadingControl:n==="left"?S():void 0,trailingControl:n==="right"?S():void 0,className:"dsn-accordion-section-header"})}),x&&h.jsx("div",{id:g,role:"region","aria-labelledby":f,className:"dsn-accordion-content",children:h.jsx("div",{className:b,children:s})})]})}function o0({page:e,selected:t=!1,disabled:n=!1,onClick:r,className:i}){return h.jsx("button",{type:"button",className:`dsn-page-selector${i?` ${i}`:""}`,"data-selected":t||void 0,disabled:n,"aria-current":t?"page":void 0,onClick:n?void 0:r,children:h.jsx("span",{className:"dsn-page-selector-number",children:e})})}function $2(e,t){if(t<=0)return[];const n=new Set([1,t]);for(let o=Math.max(1,e-1);o<=Math.min(t,e+1);o++)n.add(o);const r=Array.from(n).sort((o,s)=>o-s),i=[];let a=0;for(let o=0;o<r.length;o++){if(o>0){const s=r[o]-r[o-1];s===2?i.push(r[o-1]+1):s>2&&(i.push(a===0?"ellipsis-start":"ellipsis-end"),a++)}i.push(r[o])}return i}function s0({page:e,totalPages:t,onPageChange:n,totalRecords:r,pageSize:i,rowsPerPage:a,rowsPerPageOptions:o=[10,25,50,100],onRowsPerPageChange:s,className:l}){const c=$2(e,t),[u,d]=_.useState(!1),f=_.useRef(null);_.useEffect(()=>{if(!u)return;const p=v=>{f.current&&!f.current.contains(v.target)&&d(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[u]);let g=null;if(r!==void 0&&i!==void 0){const p=(e-1)*i+1,v=Math.min(e*i,r);g=`${p}–${v} of ${r}`}return h.jsxs("nav",{className:`dsn-pagination${l?` ${l}`:""}`,"aria-label":"Pagination",children:[a!==void 0&&h.jsx("div",{className:"dsn-pagination-meta",children:h.jsxs("div",{className:"dsn-pagination-rows",children:[h.jsxs("div",{ref:f,className:"dsn-pagination-rows-trigger",children:[h.jsx(ve,{variant:"ghost",size:"sm",showTrailingIcon:!0,trailingIcon:h.jsx(Sr,{size:16,strokeWidth:1.5}),"aria-label":"Rows per page","aria-haspopup":"menu","aria-expanded":u,onClick:()=>d(p=>!p),children:a}),u&&h.jsx(Er,{role:"menu","aria-label":"Rows per page options",anchorRef:f,offset:4,viewportMargin:16,contentPadding:"small",content:h.jsx("div",{children:o.map(p=>h.jsx(Ii,{label:String(p),fullWidth:!0,showLeadingIcon:!1,showTrailingIcon:a===p,selected:a===p,"aria-label":String(p),onClick:()=>{s==null||s(p),d(!1)}},p))})})]}),h.jsx("span",{className:"dsn-pagination-rows-label",children:"Rows per page"})]})}),h.jsxs("div",{className:"dsn-pagination-controls",children:[g&&h.jsx("span",{className:"dsn-pagination-summary","aria-live":"polite","aria-atomic":"true",children:g}),h.jsx(ve,{variant:"ghost",size:"md",showLeadingIcon:!0,leadingIcon:h.jsx(ST,{size:16,strokeWidth:1.5}),showLabel:!1,disabled:e<=1,"aria-label":"Go to previous page","aria-disabled":e<=1,onClick:()=>n(e-1)}),h.jsx("div",{className:"dsn-pagination-pages",role:"group","aria-label":"Pages",children:c.map(p=>p==="ellipsis-start"||p==="ellipsis-end"?h.jsx(ve,{variant:"ghost",size:"md",showLeadingIcon:!0,leadingIcon:h.jsx(TT,{size:16,strokeWidth:1.5}),showLabel:!1,"aria-label":"More pages",className:"dsn-pagination-ellipsis"},p):h.jsx(o0,{page:p,selected:p===e,onClick:()=>n(p)},p))}),h.jsx(ve,{variant:"ghost",size:"md",showLeadingIcon:!0,leadingIcon:h.jsx(Li,{size:16,strokeWidth:1.5}),showLabel:!1,disabled:e>=t,"aria-label":"Go to next page","aria-disabled":e>=t,onClick:()=>n(e+1)})]})]})}function O2(e,t,n){return!n||t<3?!1:e>t}function P2({items:e,maxVisibleItems:t=4,showEllipsis:n=!0,ellipsisLabel:r="...",ellipsisAriaLabel:i="Show more breadcrumbs",separator:a,className:o,"aria-label":s="Breadcrumb",onItemClick:l}){const[c,u]=_.useState(!1),d="sm",f=a??h.jsx(Li,{size:16,"aria-hidden":"true"}),g=["dsn-breadcrumbs",o].filter(Boolean).join(" "),p=_.useMemo(()=>{const m=e.map((w,S)=>({type:"item",item:w,index:S}));if(!O2(e.length,t,n)||c)return m;const y=m[0],b=Math.max(1,t-2),k=m.slice(-b);return[y,{type:"ellipsis"},...k]},[c,e,t,n]);function v(m,x,y){var b;(b=x.onClick)==null||b.call(x,m,x,y),l==null||l(m,x,y)}return h.jsx("nav",{className:g,"aria-label":s,children:h.jsx("ol",{className:"dsn-breadcrumbs-list",children:p.map((m,x)=>{const y=x===p.length-1;if(m.type==="ellipsis")return h.jsxs("li",{className:"dsn-breadcrumbs-item",children:[h.jsx(ve,{variant:"plain",size:d,"aria-label":i,onClick:()=>u(!0),children:r}),y?null:h.jsx("span",{className:"dsn-breadcrumbs-separator","aria-hidden":"true",children:f})]},`ellipsis-${x}`);const{item:b,index:k}=m,w=k===e.length-1;return h.jsxs("li",{className:"dsn-breadcrumbs-item",children:[w?h.jsx("span",{className:"dsn-breadcrumbs-current","aria-current":"page",children:b.label}):b.href&&!b.disabled?h.jsx("a",{className:"dsn-breadcrumbs-link",href:b.href,"aria-label":b.ariaLabel,onClick:S=>v(S,b,k),children:b.label}):h.jsx(ve,{variant:"plain",size:d,disabled:b.disabled,"aria-label":b.ariaLabel,onClick:S=>v(S,b,k),children:b.label}),y?null:h.jsx("span",{className:"dsn-breadcrumbs-separator","aria-hidden":"true",children:f})]},b.id??`${k}-${String(b.label)}`)})})})}function A2(e,t,n){return!n||t<3?!1:e>t}function L2(e,t,n){return e.variant?e.variant:t===n-1?"current":"previous"}function l0({items:e,maxVisibleItems:t=4,showEllipsis:n=!0,ellipsisLabel:r="...",ellipsisAriaLabel:i="Show more breadcrumbs",className:a,"aria-label":o="Breadcrumb",onItemClick:s}){const[l,c]=_.useState(!1),u=["dsn-breadcrumbs dsn-breadcrumbs-large",a].filter(Boolean).join(" "),d=_.useMemo(()=>{const g=e.map((y,b)=>({type:"item",item:y,index:b}));if(!A2(e.length,t,n)||l)return g;const v=g[0],m=Math.max(1,t-2),x=g.slice(-m);return[v,{type:"ellipsis"},...x]},[l,e,t,n]);function f(g,p,v){var m;(m=p.onClick)==null||m.call(p,g,p,v),s==null||s(g,p,v)}return h.jsx("nav",{className:u,"aria-label":o,children:h.jsx("ol",{className:"dsn-breadcrumbs-list",children:d.map((g,p)=>{const v=p===d.length-1;if(g.type==="ellipsis")return h.jsxs("li",{className:"dsn-breadcrumbs-item",children:[h.jsx("button",{type:"button",className:"dsn-breadcrumbs-large-trigger dsn-breadcrumbs-large-trigger-ellipsis","aria-label":i,onClick:()=>c(!0),children:h.jsx("span",{className:"dsn-breadcrumbs-large-label",children:r})}),v?null:h.jsx("span",{className:"dsn-breadcrumbs-separator","aria-hidden":"true",children:h.jsx(Li,{size:16})})]},`ellipsis-${p}`);const{item:m,index:x}=g,y=L2(m,x,e.length),b=y==="ellipsis"?r:m.label,k=y==="current",w=m.showDisclosure===!0;return h.jsxs("li",{className:"dsn-breadcrumbs-item",children:[k?h.jsxs("span",{className:"dsn-breadcrumbs-large-current","aria-current":"page",children:[h.jsx("span",{className:"dsn-breadcrumbs-large-label",children:b}),w?h.jsx("span",{className:"dsn-breadcrumbs-large-disclosure","aria-hidden":"true",children:h.jsx(Sr,{size:16})}):null]}):h.jsxs("button",{type:"button",className:"dsn-breadcrumbs-large-trigger",disabled:m.disabled,"aria-label":m.ariaLabel,onClick:S=>f(S,m,x),children:[h.jsx("span",{className:"dsn-breadcrumbs-large-label",children:b}),w?h.jsx("span",{className:"dsn-breadcrumbs-large-disclosure","aria-hidden":"true",children:h.jsx(Sr,{size:16})}):null]}),v?null:h.jsx("span",{className:"dsn-breadcrumbs-separator","aria-hidden":"true",children:h.jsx(Li,{size:16})})]},m.id??`${x}-${String(b)}`)})})})}function Ql({variant:e="full",label:t="Label",showIcon:n=!0,icon:r,showAvatar:i=!1,avatarProps:a,showBadge:o=!1,badgeCount:s=3,badgeVariant:l="highlight-strong",showDisclosure:c=!1,showRightButton:u=!1,rightButton:d,selected:f=!1,disabled:g=!1,onClick:p,className:v,"aria-label":m}){const x=e==="icon",y=["dsn-sidebar-selector",v].filter(Boolean).join(" "),b=m??(x?t:void 0);return h.jsxs("div",{className:y,"data-variant":e,"data-selected":f||void 0,"data-disabled":g||void 0,children:[h.jsxs("button",{type:"button",className:"dsn-sidebar-selector-container",disabled:g,"aria-label":b,onClick:p,children:[n&&!i&&h.jsx("span",{className:"dsn-sidebar-selector-icon-wrap","aria-hidden":"true",children:r??h.jsx(tr,{})}),i&&h.jsx("span",{className:"dsn-sidebar-selector-avatar-wrap",children:h.jsx(Di,{size:"xs",variant:"organization",fill:"initials",initials:"AA",name:"Avatar",...a})}),!x&&h.jsx("span",{className:"dsn-sidebar-selector-label-wrap",children:h.jsx("span",{className:"dsn-sidebar-selector-label",children:t})}),!x&&o&&h.jsx("span",{className:"dsn-sidebar-selector-badge-wrap",children:h.jsx(Uo,{size:"sm",variant:l,count:s})}),!x&&c&&h.jsx("span",{className:"dsn-sidebar-selector-disclosure","aria-hidden":"true",children:h.jsx(NT,{size:16})}),!x&&u&&d&&h.jsx("span",{className:"dsn-sidebar-selector-action-wrap",onClick:k=>k.stopPropagation(),onKeyDown:k=>k.stopPropagation(),children:d})]}),f&&h.jsx("span",{className:"dsn-sidebar-selector-rail","aria-hidden":"true"})]})}function D2({size:e="default",className:t,hasPicture:n=!0,picture:r,hasTitle:i=!0,title:a="Title",hasSubtitle:o=!0,subtitle:s="Subtitle.",hasActions:l=!0,showMainCta:c=!0,mainCtaLabel:u="Button",onMainCtaClick:d,showSecondaryOption:f=!0,secondaryOptionLabel:g="Button",onSecondaryOptionClick:p,showTertiaryOption:v=!0,tertiaryOptionLabel:m="Button",onTertiaryOptionClick:x,showLink:y=!0,linkLabel:b="Button",onLinkClick:k,showHelpText:w=!0,helpText:S="Help text"}){const N=["dsn-empty-state",t].filter(Boolean).join(" "),E=e==="small"?"sm":"md",C=c||f||v||y||w;return h.jsx("div",{className:N,"data-size":e,children:h.jsxs("div",{className:"dsn-empty-state-content",children:[n?h.jsx("div",{className:"dsn-empty-state-picture","aria-hidden":"true",children:r}):null,(i||o)&&h.jsxs("div",{className:"dsn-empty-state-copy",children:[i?h.jsx("p",{className:"dsn-empty-state-title",children:a}):null,o?h.jsx("p",{className:"dsn-empty-state-subtitle",children:s}):null]}),l&&C?h.jsxs("div",{className:"dsn-empty-state-actions",children:[c?h.jsx(ve,{variant:"primary",size:E,onClick:d,children:u}):null,f?h.jsx(ve,{variant:"secondary",size:E,onClick:p,children:g}):null,v?h.jsx(ve,{variant:"ghost",size:E,onClick:x,children:m}):null,y?h.jsx(ve,{variant:"plain",size:"sm",onClick:k,children:b}):null,w?h.jsx("p",{className:"dsn-empty-state-help-text",children:S}):null]}):null]})})}function se(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function c0(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const In=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,I2=In&&"documentMode"in document?document.documentMode:null,Fn=In&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ni=In&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Rl=!(!In||!("InputEvent"in window)||I2)&&"getTargetRanges"in new window.InputEvent("input"),ec=In&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Ko=In&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,F2=In&&/Android/.test(navigator.userAgent),u0=In&&/^(?=.*Chrome).*/i.test(navigator.userAgent),cf=In&&F2&&u0,tc=In&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Fn&&!u0,z2=0,B2=1,j2=2,d0=128,W2=1,U2=2,H2=3,q2=4,V2=5,K2=6,Yo=ec||Ko||tc?" ":"​",nc=`
252
252
 
253
- `,ef=Rr?" ":jo,Di={bold:1,capitalize:1024,code:16,highlight:Vy,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},A2={directionless:1,unmergeable:2},tf={center:2,end:6,justify:4,left:1,right:3,start:5},L2={[T2]:"center",[P2]:"end",[$2]:"justify",[E2]:"left",[M2]:"right",[O2]:"start"},D2={normal:0,segmented:2,token:1},I2={[S2]:"normal",[C2]:"segmented",[N2]:"token"},Yy="$config";function Gy(e,t,n,r,i,a){let o=e.getFirstChild();for(;o!==null;){const s=o.__key;o.__parent===t&&(X(o)&&Gy(o,s,n,r,i,a),n.has(s)||a.delete(s),i.push(s)),o=o.getNextSibling()}}let nf=!1,rf=0;function F2(e){rf=e.timeStamp}function af(e,t,n){const r=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&xc(e,n)!==void 0}function z2(e,t,n){const r=gn(sn(n));let i=null,a=null;r!==null&&r.anchorNode===e&&(i=r.anchorOffset,a=r.focusOffset);const o=e.nodeValue;o!==null&&Kf(t,o,i,a,!1)}function B2(e,t,n){if(re(e)){const r=e.anchor.getNode();if(r.is(n)&&e.format!==r.getFormat())return!1}return Pr(t)&&n.isAttached()}function j2(e,t,n,r){for(let i=e;i&&!K$(i);i=ns(i)){const a=xc(i,t);if(a!==void 0){const o=lt(a,n);if(o)return Ae(o)||!it(i)?void 0:[i,o]}else if(i===r)return[r,zb(n)]}}function Xy(e,t,n){nf=!0;const r=performance.now()-rf>100;try{rr(e,()=>{const i=ue()||function(f){return f.getEditorState().read(()=>{const g=ue();return g!==null?g.clone():null})}(e),a=new Map,o=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let c=!1,u="";for(let f=0;f<t.length;f++){const g=t[f],p=g.type,v=g.target,m=j2(v,e,s,o);if(!m)continue;const[b,y]=m;if(p==="characterData")r&&ce(y)&&Pr(v)&&B2(i,v,y)&&z2(v,y,e);else if(p==="childList"){c=!0;const x=g.addedNodes;for(let S=0;S<x.length;S++){const N=x[S],C=Db(N),E=N.parentNode;if(E!=null&&N!==l&&C===null&&!af(N,E,e)){if(Rr){const T=(it(N)?N.innerText:null)||N.nodeValue;T&&(u+=T)}E.removeChild(N)}}const k=g.removedNodes,w=k.length;if(w>0){let S=0;for(let N=0;N<w;N++){const C=k[N];(af(C,v,e)||l===C)&&(v.appendChild(C),S++)}w!==S&&a.set(b,y)}}}if(a.size>0)for(const[f,g]of a)g.reconcileObservedMutation(f,e);const d=n.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const g=d[f],p=g.addedNodes,v=g.target;for(let m=0;m<p.length;m++){const b=p[m],y=b.parentNode;y==null||b.nodeName!=="BR"||af(b,v,e)||y.removeChild(b)}}n.takeRecords()}i!==null&&(c&&$t(i),Rr&&Yb(e)&&i.insertRawText(u))})}finally{nf=!1}}function Zy(e){const t=e._observer;t!==null&&Xy(e,t.takeRecords(),t)}function Jy(e){(function(t){rf===0&&sn(t).addEventListener("textInput",F2,!0)})(e),e._observer=new MutationObserver((t,n)=>{Xy(e,t,n)})}let W2=class{constructor(t,n){J(this,"key");J(this,"parse");J(this,"unparse");J(this,"isEqual");J(this,"defaultValue");this.key=t,this.parse=n.parse.bind(n),this.unparse=(n.unparse||V2).bind(n),this.isEqual=(n.isEqual||Object.is).bind(n),this.defaultValue=this.parse(void 0)}};function U2(e,t){return new W2(e,t)}function H2(e){const t=new Map,n=new Set;for(let r=typeof e=="function"?e:e.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:i}=Sc(r);if(i&&i.stateConfigs)for(const a of i.stateConfigs){let o;"stateConfig"in a?(o=a.stateConfig,a.flat&&n.add(o.key)):o=a,t.set(o.key,o)}}return{flatKeys:n,sharedConfigMap:t}}let q2=class VE{constructor(t,n,r=void 0,i=new Map,a=void 0){J(this,"node");J(this,"knownState");J(this,"unknownState");J(this,"sharedNodeState");J(this,"size");this.node=t,this.sharedNodeState=n,this.unknownState=r,this.knownState=i;const{sharedConfigMap:o}=this.sharedNodeState,s=a!==void 0?a:function(l,c,u){let d=u.size;if(c)for(const f in c){const g=l.get(f);g&&u.has(g)||d++}return d}(o,r,i);this.size=s}getValue(t){const n=this.knownState.get(t);if(n!==void 0)return n;this.sharedNodeState.sharedConfigMap.set(t.key,t);let r=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const i=this.unknownState[t.key];i!==void 0&&(r=t.parse(i)),this.updateFromKnown(t,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},n={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete t[r.key]:t[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in t&&(n[r]=t[r],delete t[r]);return Ry(t)&&(n.$=t),n}getWritable(t){if(this.node===t)return this;const{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new VE(t,n,function(a,o,s){let l;if(s)for(const[c,u]of Object.entries(s)){const d=a.get(c);d?o.has(d)||o.set(d,d.parse(u)):(l=l||{},l[c]=u)}return l}(n.sharedConfigMap,i,r),i,this.size)}updateFromKnown(t,n){const r=t.key;this.sharedNodeState.sharedConfigMap.set(r,t);const{knownState:i,unknownState:a}=this;i.has(t)||a&&r in a||(a&&(delete a[r],this.unknownState=Ry(a)),this.size++),i.set(t,n)}updateFromUnknown(t,n){const r=this.sharedNodeState.sharedConfigMap.get(t);r?this.updateFromKnown(r,r.parse(n)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=n)}updateFromJSON(t){const{knownState:n}=this;for(const r of n.keys())n.set(r,r.defaultValue);if(this.size=n.size,this.unknownState=void 0,t)for(const[r,i]of Object.entries(t))this.updateFromUnknown(r,i)}};function K2(e){const t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new q2(t,Qy(t));return t.__state=n,n}function Qy(e){return e.__state?e.__state.sharedNodeState:Mb(kc(),e.getType()).sharedNodeState}function Ry(e){if(e)for(const t in e)return e}function V2(e){return e}function e0(e,t,n){for(const[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);const a=n?n.getValue(r):r.defaultValue;if(a!==i&&!r.isEqual(a,i))return!0}return!1}function t0(e,t,n){const{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(const[a,o]of Object.entries(r))if(!e.has(a)&&(e.add(a),o!==(i?i[a]:void 0)))return!0}return!1}function n0(e,t){const n=e.__state;return n&&n.node===e?n.getWritable(t):n}function r0(e,t){const n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,o=t.__format,s=t.__style,l=e.__state,c=t.__state;return(n===null||n===a)&&(r===null||r===o)&&(i===null||i===s)&&(e.__state===null||l===c||function(u,d){if(u===d)return!0;if(u&&d&&u.size!==d.size)return!1;const f=new Set;return!(u&&e0(f,u,d)||d&&e0(f,d,u)||u&&t0(f,u,d)||d&&t0(f,d,u))}(l,c))}function i0(e,t){const n=e.mergeWithSibling(t),r=Ue()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function a0(e){let t,n,r=e;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&ce(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(r0(t,r)){r=i0(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&ce(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(r0(r,n)){r=i0(r,n);break}break}n.remove()}}else r.remove()}function Ii(e){return o0(e.anchor),o0(e.focus),e}function o0(e){for(;e.type==="element";){const t=e.getNode(),n=e.offset;let r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),ce(r)){e.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!X(r))break;e.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let Fi,xt,Wo,Vl,of,sf,zi,Dn,lf,Uo,ot="",tr=null,Bi=null,Ca=!1,Yl=!1;function Gl(e,t){const n=zi.get(e);if(t!==null){const r=hf(e);r.parentNode===t&&t.removeChild(r)}if(Dn.has(e)||xt._keyToDOMMap.delete(e),X(n)){const r=Zl(n,zi);cf(r,0,r.length-1,null)}n!==void 0&&Vf(Uo,Wo,Vl,n,"destroyed")}function cf(e,t,n,r){for(let i=t;i<=n;++i){const a=e[i];a!==void 0&&Gl(a,r)}}function ji(e,t){e.setProperty("text-align",t)}const Y2="40px";function s0(e,t){const n=Fi.theme.indent;if(typeof n=="string"){const i=e.classList.contains(n);t>0&&!i?e.classList.add(n):t<1&&i&&e.classList.remove(n)}if(t===0)return void e.style.setProperty("padding-inline-start","");const r=getComputedStyle(xt._rootElement||e).getPropertyValue("--lexical-indent-base-value")||Y2;e.style.setProperty("padding-inline-start",`calc(${t} * ${r})`)}function l0(e,t){const n=e.style;t===0?ji(n,""):t===1?ji(n,"left"):t===2?ji(n,"center"):t===3?ji(n,"right"):t===4?ji(n,"justify"):t===5?ji(n,"start"):t===6&&ji(n,"end")}function uf(e,t){const n=function(r){const i=r.__dir;if(i!==null)return i;if(st(r))return null;const a=r.getParentOrThrow();return st(a)&&a.__dir===null?"auto":null}(t);n!==null?e.dir=n:e.removeAttribute("dir")}function Xl(e,t){const n=Dn.get(e);n===void 0&&oe(60);const r=n.createDOM(Fi,xt);if(function(i,a,o){const s=o._keyToDOMMap;(function(l,c,u){const d=`__lexicalKey_${c._key}`;l[d]=u})(a,o,i),s.set(i,a)}(e,r,xt),ce(n)?r.setAttribute("data-lexical-text","true"):Ae(n)&&r.setAttribute("data-lexical-decorator","true"),X(n)){const i=n.__indent,a=n.__size;if(uf(r,n),i!==0&&s0(r,i),a!==0){const s=a-1;df(Zl(n,Dn),n,0,s,n.getDOMSlot(r))}const o=n.__format;o!==0&&l0(r,o),n.isInline()||u0(null,n,r)}else{const i=n.getTextContent();if(Ae(n)){const a=n.decorate(xt,Fi);a!==null&&d0(e,a),r.contentEditable="false"}ot+=i}return t!==null&&t.insertChild(r),Vf(Uo,Wo,Vl,n,"created"),r}function df(e,t,n,r,i){const a=ot;ot="";let o=n;for(;o<=r;++o){Xl(e[o],i);const s=Dn.get(e[o]);s!==null&&ce(s)?tr===null&&(tr=s.getFormat(),Bi=s.getStyle()):X(s)&&o<r&&!s.isInline()&&(ot+=Kl)}i.element.__lexicalTextContent=ot,ot=a+ot}function c0(e,t){if(e){const n=e.__last;if(n){const r=t.get(n);if(r)return Aa(r)?"line-break":Ae(r)&&r.isInline()?"decorator":null}return"empty"}return null}function u0(e,t,n){const r=c0(e,zi),i=c0(t,Dn);r!==i&&t.getDOMSlot(n).setManagedLineBreak(i)}function G2(e,t,n){var r;tr=null,Bi=null,function(i,a,o){const s=ot,l=i.__size,c=a.__size;ot="";const u=o.element;if(l===1&&c===1){const d=i.__first,f=a.__first;if(d===f)Jl(d,u);else{const p=hf(d),v=Xl(f,null);try{u.replaceChild(v,p)}catch(m){if(typeof m=="object"&&m!=null){const b=`${m.toString()} Parent: ${u.tagName}, new child: {tag: ${v.tagName} key: ${f}}, old child: {tag: ${p.tagName}, key: ${d}}.`;throw new Error(b)}throw m}Gl(d,null)}const g=Dn.get(f);ce(g)&&tr===null&&(tr=g.getFormat(),Bi=g.getStyle())}else{const d=Zl(i,zi),f=Zl(a,Dn);if(d.length!==l&&oe(227),f.length!==c&&oe(228),l===0)c!==0&&df(f,0,0,c-1,o);else if(c===0){if(l!==0){const g=o.after==null&&o.before==null&&o.element.__lexicalLineBreak==null;cf(d,0,l-1,g?null:u),g&&(u.textContent="")}}else(function(g,p,v,m,b,y){const x=m-1,k=b-1;let w,S,N=y.getFirstChild(),C=0,E=0;for(;C<=x&&E<=k;){const P=p[C],M=v[E];if(P===M)N=ff(Jl(M,y.element)),C++,E++;else{if(S===void 0&&(S=f0(v,E)),w===void 0)w=f0(p,C);else if(!w.has(P)){C++;continue}if(!S.has(P)){N=ff(hf(P)),Gl(P,y.element),C++,w.delete(P);continue}if(w.has(M)){const L=Ha(xt,M);L!==N&&y.withBefore(N).insertChild(L),N=ff(Jl(M,y.element)),C++,E++}else Xl(M,y.withBefore(N)),E++}const $=Dn.get(M);$!==null&&ce($)?tr===null&&(tr=$.getFormat(),Bi=$.getStyle()):X($)&&E<=k&&!$.isInline()&&(ot+=Kl)}const T=C>x,O=E>k;if(T&&!O){const P=v[k+1],M=P===void 0?null:xt.getElementByKey(P);df(v,0,E,k,y.withBefore(M))}else O&&!T&&cf(p,C,x,y.element)})(0,d,f,l,c,o)}u.__lexicalTextContent=ot,ot=s+ot}(e,t,t.getDOMSlot(n)),r=t,tr==null||tr===r.__textFormat||Yl||r.setTextFormat(tr),function(i){Bi==null||Bi===i.__textStyle||Yl||i.setTextStyle(Bi)}(t)}function Zl(e,t){const n=[];let r=e.__first;for(;r!==null;){const i=t.get(r);i===void 0&&oe(101),n.push(r),r=i.__next}return n}function Jl(e,t){const n=zi.get(e);let r=Dn.get(e);n!==void 0&&r!==void 0||oe(61);const i=Ca||sf.has(e)||of.has(e),a=Ha(xt,e);if(n===r&&!i){let o;if(X(n)){const s=a.__lexicalTextContent;typeof s=="string"?o=s:(o=n.getTextContent(),a.__lexicalTextContent=o)}else o=n.getTextContent();return ot+=o,a}if(n!==r&&i&&Vf(Uo,Wo,Vl,r,"updated"),r.updateDOM(n,a,Fi)){const o=Xl(e,null);return t===null&&oe(62),t.replaceChild(o,a),Gl(e,null),o}if(X(n)){X(r)||oe(334,e);const o=r.__indent;(Ca||o!==n.__indent)&&s0(a,o);const s=r.__format;if((Ca||s!==n.__format)&&l0(a,s),i)G2(n,r,a),st(r)||r.isInline()||u0(n,r,a);else{const l=a.__lexicalTextContent;let c;typeof l=="string"?c=l:(c=n.getTextContent(),a.__lexicalTextContent=c),ot+=c}if((Ca||r.__dir!==n.__dir)&&(uf(a,r),st(r)&&!Ca))for(const l of r.getChildren())X(l)&&uf(Ha(xt,l.getKey()),l)}else{const o=r.getTextContent();if(Ae(r)){const s=r.decorate(xt,Fi);s!==null&&d0(e,s)}ot+=o}if(!Yl&&st(r)&&r.__cachedText!==ot){const o=r.getWritable();o.__cachedText=ot,r=o}return a}function d0(e,t){let n=xt._pendingDecorators;const r=xt._decorators;if(n===null){if(r[e]===t)return;n=Ib(xt)}n[e]=t}function ff(e){let t=e.nextSibling;return t!==null&&t===xt._blockCursorElement&&(t=t.nextSibling),t}function f0(e,t){const n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function X2(e,t,n,r,i,a){ot="",Ca=r===2,xt=n,Fi=n._config,Wo=n._nodes,Vl=xt._listeners.mutation,of=i,sf=a,zi=e._nodeMap,Dn=t._nodeMap,Yl=t._readOnly,lf=new Map(n._keyToDOMMap);const o=new Map;return Uo=o,Jl("root",null),xt=void 0,Wo=void 0,of=void 0,sf=void 0,zi=void 0,Dn=void 0,Fi=void 0,lf=void 0,Uo=void 0,o}function hf(e){const t=lf.get(e);return t===void 0&&oe(75,e),t}function ye(e){return{type:e}}const pf=ye("SELECTION_CHANGE_COMMAND"),Z2=ye("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),h0=ye("CLICK_COMMAND"),p0=ye("BEFORE_INPUT_COMMAND"),g0=ye("INPUT_COMMAND"),v0=ye("COMPOSITION_START_COMMAND"),m0=ye("COMPOSITION_END_COMMAND"),Wi=ye("DELETE_CHARACTER_COMMAND"),Ea=ye("INSERT_LINE_BREAK_COMMAND"),Ho=ye("INSERT_PARAGRAPH_COMMAND"),Ta=ye("CONTROLLED_TEXT_INSERTION_COMMAND"),Ql=ye("PASTE_COMMAND"),gf=ye("REMOVE_TEXT_COMMAND"),qo=ye("DELETE_WORD_COMMAND"),Ko=ye("DELETE_LINE_COMMAND"),an=ye("FORMAT_TEXT_COMMAND"),Rl=ye("UNDO_COMMAND"),ec=ye("REDO_COMMAND"),y0=ye("KEYDOWN_COMMAND"),b0=ye("KEY_ARROW_RIGHT_COMMAND"),J2=ye("MOVE_TO_END"),x0=ye("KEY_ARROW_LEFT_COMMAND"),Q2=ye("MOVE_TO_START"),_0=ye("KEY_ARROW_UP_COMMAND"),w0=ye("KEY_ARROW_DOWN_COMMAND"),tc=ye("KEY_ENTER_COMMAND"),k0=ye("KEY_SPACE_COMMAND"),S0=ye("KEY_BACKSPACE_COMMAND"),N0=ye("KEY_ESCAPE_COMMAND"),C0=ye("KEY_DELETE_COMMAND"),E0=ye("KEY_TAB_COMMAND"),R2=ye("INSERT_TAB_COMMAND"),e$=ye("INDENT_CONTENT_COMMAND"),T0=ye("OUTDENT_CONTENT_COMMAND"),M0=ye("DROP_COMMAND"),Ma=ye("FORMAT_ELEMENT_COMMAND"),$0=ye("DRAGSTART_COMMAND"),O0=ye("DRAGOVER_COMMAND"),t$=ye("DRAGEND_COMMAND"),nc=ye("COPY_COMMAND"),vf=ye("CUT_COMMAND"),mf=ye("SELECT_ALL_COMMAND"),n$=ye("CLEAR_EDITOR_COMMAND"),r$=ye("CLEAR_HISTORY_COMMAND"),Vo=ye("CAN_REDO_COMMAND"),Yo=ye("CAN_UNDO_COMMAND"),i$=ye("FOCUS_COMMAND"),a$=ye("BLUR_COMMAND"),o$=ye("KEY_MODIFIER_COMMAND"),Cr=Object.freeze({}),yf=[["keydown",function(e,t){Go=e.timeStamp,P0=e.key,!t.isComposing()&&fe(t,y0,e)}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;qa(n)&&r!=="touch"&&r!=="pen"&&e.button===0&&rr(t,()=>{$b(n)||(_f=!0)})}],["compositionstart",function(e,t){fe(t,v0,e)}],["compositionend",function(e,t){Rr?Zo=!0:Bo||!Hl&&!ql?fe(t,m0,e):(ic=!0,ac=e.data)}],["input",function(e,t){e.stopPropagation(),rr(t,()=>{t.dispatchCommand(g0,e)},{event:e}),$a=null}],["click",function(e,t){rr(t,()=>{const n=ue(),r=gn(sn(t)),i=Ia();if(r){if(re(n)){const a=n.anchor,o=a.getNode();if(a.type==="element"&&a.offset===0&&n.isCollapsed()&&!st(o)&&Ze().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(e.detail===3&&!n.isCollapsed()&&o!==n.focus.getNode()){const s=kt(o,l=>X(l)&&!l.isInline());X(s)&&s.select(0)}}else if(e.pointerType==="touch"||e.pointerType==="pen"){const a=r.anchorNode;(it(a)||Pr(a))&&$t(Of(i,r,t,e))}}fe(t,h0,e)})}],["cut",Cr],["copy",Cr],["dragstart",Cr],["dragover",Cr],["dragend",Cr],["paste",Cr],["focus",Cr],["blur",Cr],["drop",Cr]];Ul&&yf.push(["beforeinput",(e,t)=>function(n,r){const i=n.inputType;i==="deleteCompositionText"||Rr&&Yb(r)||i!=="insertCompositionText"&&fe(r,p0,n)}(e,t)]);let Go=0,P0=null,A0=0,$a=null;const bf=new WeakMap,rc=new WeakMap;let xf=!1,_f=!1,Xo=!1,Zo=!1,ic=!1,ac="",Ui=null,L0=[0,"",0,"root",0];function D0(e,t,n,r,i){const a=e.anchor,o=e.focus,s=a.getNode(),l=Ue(),c=gn(sn(l)),u=c!==null?c.anchorNode:null,d=a.key,f=l.getElementByKey(d),g=n.length;return d!==o.key||!ce(s)||(!i&&(!Ul||A0<r+50)||s.isDirty()&&g<2||Bb(n))&&a.offset!==o.offset&&!s.isComposing()||Or(s)||s.isDirty()&&g>1||(i||!Ul)&&f!==null&&!s.isComposing()&&u!==Ba(f)||c!==null&&t!==null&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||!s.isComposing()&&(s.getFormat()!==e.format||s.getStyle()!==e.style)||function(p,v){if(v.isSegmented())return!0;if(!p.isCollapsed())return!1;const m=p.anchor.offset,b=v.getParentOrThrow(),y=Vi(v);return m===0?!v.canInsertTextBefore()||!b.canInsertTextBefore()&&!v.isComposing()||y||function(x){const k=x.getPreviousSibling();return(ce(k)||X(k)&&k.isInline())&&!k.canInsertTextAfter()}(v):m===v.getTextContentSize()&&(!v.canInsertTextAfter()||!b.canInsertTextAfter()&&!v.isComposing()||y)}(e,s)}function I0(e,t){return Pr(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function F0(e,t,n){const{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=e;xf&&(xf=!1,I0(r,i)&&I0(a,o)&&!Ui)||rr(t,()=>{if(!n)return void $t(null);if(!ts(t,r,a))return;let s=ue();if(Ui&&re(s)&&s.isCollapsed()){const l=s.anchor,c=Ui.anchor;(l.key===c.key&&l.offset===c.offset+1||l.offset===1&&c.getNode().is(l.getNode().getPreviousSibling()))&&(s=Ui.clone(),$t(s))}if(Ui=null,re(s)){const l=s.anchor,c=l.getNode();if(s.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(s.dirty=!0);const u=sn(t).event,d=u?u.timeStamp:performance.now(),[f,g,p,v,m]=L0,b=Ze(),y=t.isComposing()===!1&&b.getTextContent()==="";if(d<m+200&&l.offset===p&&l.key===v)oc(s,f,g);else if(l.type==="text")ce(c)||oe(141),z0(s,c);else if(l.type==="element"&&!y){X(c)||oe(259);const x=l.getNode();x.isEmpty()?function(k,w){const S=w.getTextFormat(),N=w.getTextStyle();oc(k,S,N)}(s,x):oc(s,0,"")}}else{const u=l.key,d=s.focus.key,f=s.getNodes(),g=f.length,p=s.isBackward(),v=p?o:i,m=p?i:o,b=p?d:u,y=p?u:d;let x=2047,k=!1;for(let w=0;w<g;w++){const S=f[w],N=S.getTextContentSize();if(ce(S)&&N!==0&&!(w===0&&S.__key===b&&v===N||w===g-1&&S.__key===y&&m===0)&&(k=!0,x&=S.getFormat(),x===0))break}s.format=k?x:0}}fe(t,pf,void 0)})}function oc(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function z0(e,t){oc(e,t.getFormat(),t.getStyle())}function B0(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function s$(e){const t=e.inputType,n=B0(e),r=Ue(),i=ue();if(t==="deleteContentBackward"){if(i===null){const d=Ia();if(!re(d))return!0;$t(d.clone())}if(re(i)){const d=i.anchor.key===i.focus.key;if(a=e.timeStamp,P0==="MediaLast"&&a<Go+30&&r.isComposing()&&d){if(wt(null),Go=0,setTimeout(()=>{rr(r,()=>{wt(null)})},30),re(i)){const f=i.anchor.getNode();f.markDirty(),ce(f)||oe(142),z0(i,f)}}else{wt(null),e.preventDefault();const f=i.anchor.getNode(),g=f.getTextContent(),p=f.canInsertTextAfter(),v=i.anchor.offset===0&&i.focus.offset===g.length;let m=Rd&&d&&!v&&p;if(m&&i.isCollapsed()&&(m=!Ae(Yf(i.anchor,!0))),!m){fe(r,Wi,!0);const b=ue();Rd&&re(b)&&b.isCollapsed()&&(Ui=b,setTimeout(()=>Ui=null))}}return!0}}var a;if(!re(i))return!0;const o=e.data;$a!==null&&qf(!1,r,$a),i.dirty&&$a===null||!i.isCollapsed()||st(i.anchor.getNode())||n===null||i.applyDOMRange(n),$a=null;const s=i.anchor,l=i.focus,c=s.getNode(),u=l.getNode();if(t==="insertText"||t==="insertTranspose"){if(o===`
254
- `)e.preventDefault(),fe(r,Ea,!1);else if(o===Kl)e.preventDefault(),fe(r,Ho,void 0);else if(o==null&&e.dataTransfer){const d=e.dataTransfer.getData("text/plain");e.preventDefault(),i.insertRawText(d)}else o!=null&&D0(i,n,o,e.timeStamp,!0)?(e.preventDefault(),fe(r,Ta,o)):$a=o;return A0=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":fe(r,Ta,e);break;case"insertFromComposition":wt(null),fe(r,Ta,e);break;case"insertLineBreak":wt(null),fe(r,Ea,!1);break;case"insertParagraph":wt(null),Xo&&!Bo?(Xo=!1,fe(r,Ea,!1)):fe(r,Ho,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":fe(r,Ql,e);break;case"deleteByComposition":(function(d,f){return d!==f||X(d)||X(f)||!Vi(d)||!Vi(f)})(c,u)&&fe(r,gf,e);break;case"deleteByDrag":case"deleteByCut":fe(r,gf,e);break;case"deleteContent":fe(r,Wi,!1);break;case"deleteWordBackward":fe(r,qo,!0);break;case"deleteWordForward":fe(r,qo,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":fe(r,Ko,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":fe(r,Ko,!1);break;case"formatStrikeThrough":fe(r,an,"strikethrough");break;case"formatBold":fe(r,an,"bold");break;case"formatItalic":fe(r,an,"italic");break;case"formatUnderline":fe(r,an,"underline");break;case"historyUndo":fe(r,Rl,void 0);break;case"historyRedo":fe(r,ec,void 0)}return!0}function l$(e){if(it(e.target)&&$b(e.target))return!0;const t=Ue(),n=ue(),r=e.data,i=B0(e);if(r!=null&&re(n)&&D0(n,i,r,e.timeStamp,!1)){Zo&&(sc(t,r),Zo=!1);const a=n.anchor.getNode(),o=gn(sn(t));if(o===null)return!0;const s=n.isBackward(),l=s?n.anchor.offset:n.focus.offset,c=s?n.focus.offset:n.anchor.offset;Ul&&!n.isCollapsed()&&ce(a)&&o.anchorNode!==null&&a.getTextContent().slice(0,l)+r+a.getTextContent().slice(l+c)===Wb(o.anchorNode)||fe(t,Ta,r);const u=r.length;Rr&&u>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=u),Rd&&t.isComposing()&&(Go=0,wt(null))}else qf(!1,t,r!==null?r:void 0),Zo&&(sc(t,r||void 0),Zo=!1);return function(){_t();const a=Ue();Zy(a)}(),!0}function c$(e){const t=Ue(),n=ue();if(re(n)&&!t.isComposing()){const r=n.anchor,i=n.anchor.getNode();wt(r.key),Gf(V0),(e.timeStamp<Go+30||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||ce(i)&&i.getStyle()!==n.style)&&fe(t,Ta,ef)}return!0}function u$(e){return sc(Ue(),e.data),Gf(Y0),!0}function sc(e,t){const n=e._compositionKey;if(wt(null),n!==null&&t!=null){if(t===""){const r=lt(n),i=Ba(e.getElementByKey(n));if(i!==null&&i.nodeValue!==null&&ce(r)){const a=gn(sn(e));let o=null,s=null;a!==null&&a.anchorNode===i&&(o=a.anchorOffset,s=a.focusOffset),Kf(r,i.nodeValue,o,s,!0)}return}if(t[t.length-1]===`
255
- `){const r=ue();if(re(r)||Mt(r)){if(re(r)){const i=r.focus;r.anchor.set(i.key,i.offset,i.type)}return void fe(e,tc,null)}}}qf(!0,e,t)}function d$(e){const t=Ue();if(e.key==null)return!0;if(ic){if(qb(e))return rr(t,()=>{sc(t,ac)}),ic=!1,ac="",!0;ic=!1,ac=""}if(function(n){return ze(n,"ArrowRight",{shiftKey:"any"})}(e))fe(t,b0,e);else if(function(n){return ze(n,"ArrowRight",Ar)}(e))fe(t,J2,e);else if(function(n){return ze(n,"ArrowLeft",{shiftKey:"any"})}(e))fe(t,x0,e);else if(function(n){return ze(n,"ArrowLeft",Ar)}(e))fe(t,Q2,e);else if(function(n){return ze(n,"ArrowUp",{altKey:"any",shiftKey:"any"})}(e))fe(t,_0,e);else if(function(n){return ze(n,"ArrowDown",{altKey:"any",shiftKey:"any"})}(e))fe(t,w0,e);else if(function(n){return ze(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(e))Xo=!0,fe(t,tc,e);else if(function(n){return n.key===" "}(e))fe(t,k0,e);else if(function(n){return Ln&&ze(n,"o",{ctrlKey:!0})}(e))e.preventDefault(),Xo=!0,fe(t,Ea,!0);else if(function(n){return ze(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(e))Xo=!1,fe(t,tc,e);else if(function(n){return ze(n,"Backspace",{shiftKey:"any"})||Ln&&ze(n,"h",{ctrlKey:!0})}(e))qb(e)?fe(t,S0,e):(e.preventDefault(),fe(t,Wi,!0));else if(function(n){return n.key==="Escape"}(e))fe(t,N0,e);else if(function(n){return ze(n,"Delete",{})||Ln&&ze(n,"d",{ctrlKey:!0})}(e))(function(n){return n.key==="Delete"})(e)?fe(t,C0,e):(e.preventDefault(),fe(t,Wi,!1));else if(function(n){return ze(n,"Backspace",Hb)}(e))e.preventDefault(),fe(t,qo,!0);else if(function(n){return ze(n,"Delete",Hb)}(e))e.preventDefault(),fe(t,qo,!1);else if(function(n){return Ln&&ze(n,"Backspace",{metaKey:!0})}(e))e.preventDefault(),fe(t,Ko,!0);else if(function(n){return Ln&&(ze(n,"Delete",{metaKey:!0})||ze(n,"k",{ctrlKey:!0}))}(e))e.preventDefault(),fe(t,Ko,!1);else if(function(n){return ze(n,"b",Ar)}(e))e.preventDefault(),fe(t,an,"bold");else if(function(n){return ze(n,"u",Ar)}(e))e.preventDefault(),fe(t,an,"underline");else if(function(n){return ze(n,"i",Ar)}(e))e.preventDefault(),fe(t,an,"italic");else if(function(n){return ze(n,"Tab",{shiftKey:"any"})}(e))fe(t,E0,e);else if(function(n){return ze(n,"z",Ar)}(e))e.preventDefault(),fe(t,Rl,void 0);else if(function(n){return Ln?ze(n,"z",{metaKey:!0,shiftKey:!0}):ze(n,"y",{ctrlKey:!0})||ze(n,"z",{ctrlKey:!0,shiftKey:!0})}(e))e.preventDefault(),fe(t,ec,void 0);else{const n=t._editorState._selection;n===null||re(n)?Kb(e)&&(e.preventDefault(),fe(t,mf,e)):function(r){return ze(r,"c",Ar)}(e)?(e.preventDefault(),fe(t,nc,e)):function(r){return ze(r,"x",Ar)}(e)?(e.preventDefault(),fe(t,vf,e)):Kb(e)&&(e.preventDefault(),fe(t,mf,e))}return function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey}(e)&&t.dispatchCommand(o$,e),!0}function j0(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const Oa=new Map;function W0(e){const t=U$(e.target);if(t===null)return;const n=Ob(t.anchorNode);if(n===null)return;_f&&(_f=!1,rr(n,()=>{const l=Ia(),c=t.anchorNode;(it(c)||Pr(c))&&$t(Of(l,t,n,e))}));const r=Hf(n),i=r[r.length-1],a=i._key,o=Oa.get(a),s=o||i;s!==n&&F0(t,s,!1),F0(t,n,!0),n!==i?Oa.set(a,n):o&&Oa.delete(a)}function U0(e){e._lexicalHandled=!0}function H0(e){return e._lexicalHandled===!0}function f$(e){const t=bf.get(e);if(t===void 0)return;const n=rc.get(t);if(n===void 0)return;const r=n-1;r>=0||oe(164),bf.delete(e),rc.set(t,r),r===0&&t.removeEventListener("selectionchange",W0);const i=mc(e);Uf(i)?(function(o){if(o._parentEditor!==null){const s=Hf(o),l=s[s.length-1]._key;Oa.get(l)===o&&Oa.delete(l)}else Oa.delete(o._key)}(i),e.__lexicalEditor=null):i&&oe(198);const a=j0(e);for(let o=0;o<a.length;o++)a[o]();e.__lexicalEventHandles=[]}function wf(e,t,n){_t();const r=e.__key,i=e.getParent();if(i===null)return;const a=function(s){const l=ue();if(!re(l)||!X(s))return l;const{anchor:c,focus:u}=l,d=c.getNode(),f=u.getNode();return Xf(d,s)&&c.set(s.__key,0,"element"),Xf(f,s)&&u.set(s.__key,0,"element"),l}(e);let o=!1;if(re(a)&&t){const s=a.anchor,l=a.focus;s.key===r&&(pc(s,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0),l.key===r&&(pc(l,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0)}else Mt(a)&&t&&e.isSelected()&&e.selectPrevious();if(re(a)&&t&&!o){const s=e.getIndexWithinParent();Yi(e),hc(a,i,s,-1)}else Yi(e);n||Xt(i)||i.canBeEmpty()||!i.isEmpty()||wf(i,t),t&&a&&st(i)&&i.isEmpty()&&i.selectEnd()}function eq(e){return e}const q0=Symbol.for("ephemeral");function lc(e){return e[q0]||!1}class In{constructor(t){J(this,"__type");J(this,"__key");J(this,"__parent");J(this,"__prev");J(this,"__next");J(this,"__state");this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),Lb(this,t)}static getType(){const{ownNodeType:t}=Sc(this);return t===void 0&&oe(64,this.name),t}static clone(t){oe(65,this.name)}$config(){return{}}config(t,n){const r=n.extends||Object.getPrototypeOf(this.constructor);return Object.assign(n,{extends:r,type:t}),{[t]:n}}afterCloneFrom(t){this.__key===t.__key?(this.__parent=t.__parent,this.__next=t.__next,this.__prev=t.__prev,this.__state=t.__state):t.__state&&(this.__state=t.__state.getWritable(this))}getType(){return this.__type}isInline(){oe(137,this.constructor.name)}isAttached(){let t=this.__key;for(;t!==null;){if(t==="root")return!0;const n=lt(t);if(n===null)break;t=n.__parent}return!1}isSelected(t){const n=t||ue();if(n==null)return!1;const r=n.getNodes().some(i=>i.__key===this.__key);if(ce(this))return r;if(re(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const i=this.getParent();if(Ae(this)&&this.isInline()&&i){const a=n.isBackward()?n.focus:n.anchor;if(i.is(a.getNode())&&a.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(t===null)return-1;let n=t.getFirstChild(),r=0;for(;n!==null;){if(this.is(n))return r;r++,n=n.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return t===null?null:lt(t)}getParentOrThrow(){const t=this.getParent();return t===null&&oe(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const n=t.getParent();if(Xt(n))return X(t)||t===this&&Ae(t)||oe(194),t;t=n}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&oe(67,this.__key),t}getParents(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n),n=n.getParent();return t}getParentKeys(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n.__key),n=n.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return t===null?null:lt(t)}getPreviousSiblings(){const t=[],n=this.getParent();if(n===null)return t;let r=n.getFirstChild();for(;r!==null&&!r.is(this);)t.push(r),r=r.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return t===null?null:lt(t)}getNextSiblings(){const t=[];let n=this.getNextSibling();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getCommonAncestor(t){const n=X(this)?this:this.getParent(),r=X(t)?t:t.getParent(),i=n&&r?Cc(n,r):null;return i?i.commonAncestor:null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){const n=Cc(this,t);return n!==null&&(n.type==="descendant"||(n.type==="branch"?rx(n)===-1:(n.type!=="same"&&n.type!=="ancestor"&&oe(279),!1)))}isParentOf(t){const n=Cc(this,t);return n!==null&&n.type==="ancestor"}getNodesBetween(t){const n=this.isBefore(t),r=[],i=new Set;let a=this;for(;a!==null;){const o=a.__key;if(i.has(o)||(i.add(o),r.push(a)),a===t)break;const s=X(a)?n?a.getFirstChild():a.getLastChild():null;if(s!==null){a=s;continue}const l=n?a.getNextSibling():a.getPreviousSibling();if(l!==null){a=l;continue}const c=a.getParentOrThrow();if(i.has(c.__key)||r.push(c),c===t)break;let u=null,d=c;do{if(d===null&&oe(68),u=n?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;u!==null||i.has(d.__key)||r.push(d)}while(u===null);a=u}return n||r.reverse(),r}isDirty(){const t=Ue()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){if(lc(this))return this;const t=lt(this.__key);return t===null&&oe(113),t}getWritable(){if(lc(this))return this;_t();const t=ei(),n=Ue(),r=t._nodeMap,i=this.__key,a=this.getLatest(),o=n._cloneNotNeeded,s=ue();if(s!==null&&s.setCachedNodes(null),o.has(i))return bc(a),a;const l=Rb(a);return o.add(i),bc(l),r.set(i,l),l}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(t,n){oe(70)}updateDOM(t,n,r){oe(71)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(t){oe(18,this.name)}updateFromJSON(t){return function(n,r){const i=n.getWritable(),a=r.$;let o=a;for(const s of Qy(i).flatKeys)s in r&&(o!==void 0&&o!==a||(o={...a}),o[s]=r[s]);return(i.__state||o)&&K2(n).updateFromJSON(o),i}(this,t)}static transform(){return null}remove(t){wf(this,!0,t)}replace(t,n){_t();let r=ue();r!==null&&(r=r.clone()),Jf(this,t);const i=this.getLatest(),a=this.__key,o=t.__key,s=t.getWritable(),l=this.getParentOrThrow().getWritable(),c=l.__size;Yi(s);const u=i.getPreviousSibling(),d=i.getNextSibling(),f=i.__prev,g=i.__next,p=i.__parent;if(wf(i,!1,!0),u===null?l.__first=o:u.getWritable().__next=o,s.__prev=f,d===null?l.__last=o:d.getWritable().__prev=o,s.__next=g,s.__parent=p,l.__size=c,n&&(X(this)&&X(s)||oe(139),this.getChildren().forEach(v=>{s.append(v)})),re(r)){$t(r);const v=r.anchor,m=r.focus;v.key===a&&R0(v,s),m.key===a&&R0(m,s)}return ti()===a&&wt(o),s}insertAfter(t,n=!0){_t(),Jf(this,t);const r=this.getWritable(),i=t.getWritable(),a=i.getParent(),o=ue();let s=!1,l=!1;if(a!==null){const g=t.getIndexWithinParent();if(Yi(i),re(o)){const p=a.__key,v=o.anchor,m=o.focus;s=v.type==="element"&&v.key===p&&v.offset===g+1,l=m.type==="element"&&m.key===p&&m.offset===g+1}}const c=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),d=i.__key,f=r.__next;if(c===null?u.__last=d:c.getWritable().__prev=d,u.__size++,r.__next=d,i.__next=f,i.__prev=r.__key,i.__parent=r.__parent,n&&re(o)){const g=this.getIndexWithinParent();hc(o,u,g+1);const p=u.__key;s&&o.anchor.set(p,g+2,"element"),l&&o.focus.set(p,g+2,"element")}return t}insertBefore(t,n=!0){_t(),Jf(this,t);const r=this.getWritable(),i=t.getWritable(),a=i.__key;Yi(i);const o=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),l=r.__prev,c=this.getIndexWithinParent();o===null?s.__first=a:o.getWritable().__next=a,s.__size++,r.__prev=a,i.__prev=l,i.__next=r.__key,i.__parent=r.__parent;const u=ue();return n&&re(u)&&hc(u,this.getParentOrThrow(),c),t}isParentRequired(){return!1}createParentElementNode(){return He()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,n){_t();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(X(r))return r.select();if(!ce(r)){const a=r.getIndexWithinParent()+1;return i.select(a,a)}return r.select(t,n)}selectNext(t,n){_t();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(X(r))return r.select(0,0);if(!ce(r)){const a=r.getIndexWithinParent();return i.select(a,a)}return r.select(t,n)}markDirty(){this.getWritable()}reconcileObservedMutation(t,n){this.markDirty()}}J(In,"importDOM");const kf="historic",h$="history-push",Hi="history-merge",p$="paste",g$="collaboration",v$="skip-scroll-into-view",m$="skip-dom-selection",K0="skip-selection-focus",V0="composition-start",Y0="composition-end";class Pa extends In{static getType(){return"linebreak"}static clone(t){return new Pa(t.__key)}constructor(t){super(t)}getTextContent(){return`
256
- `}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>function(n){const r=n.parentElement;if(r!==null&&wc(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&cc(i)){const a=r.lastChild;if(a===n||a.previousSibling===n&&cc(a))return!0}}return!1}(t)||function(n){const r=n.parentElement;if(r!==null&&wc(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&cc(i))return!1;const a=r.lastChild;if(a===n||a.previousSibling===n&&cc(a))return!0}return!1}(t)?null:{conversion:y$,priority:0}}}static importJSON(t){return Er().updateFromJSON(t)}}function y$(e){return{node:Er()}}function Er(){return Fn(new Pa)}function Aa(e){return e instanceof Pa}function cc(e){return Pr(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function Sf(e,t){return 16&t?"code":t&Vy?"mark":32&t?"sub":64&t?"sup":null}function Nf(e,t){return 1&t?"strong":2&t?"em":"span"}function G0(e,t,n,r,i){const a=r.classList;let o=Ua(i,"base");o!==void 0&&a.add(...o),o=Ua(i,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;o!==void 0&&(8&n&&4&n?(s=!0,l||a.add(...o)):l&&a.remove(...o));for(const c in Di){const u=Di[c];if(o=Ua(i,c),o!==void 0)if(n&u){if(s&&(c==="underline"||c==="strikethrough")){t&u&&a.remove(...o);continue}(!(t&u)||l&&c==="underline"||c==="strikethrough")&&a.add(...o)}else t&u&&a.remove(...o)}}function X0(e,t,n){const r=t.firstChild,i=n.isComposing(),a=e+(i?jo:"");if(r==null)t.textContent=a;else{const o=r.nodeValue;if(o!==a)if(i||Rr){const[s,l,c]=function(u,d){const f=u.length,g=d.length;let p=0,v=0;for(;p<f&&p<g&&u[p]===d[p];)p++;for(;v+p<f&&v+p<g&&u[f-v-1]===d[g-v-1];)v++;return[p,f-p-v,d.slice(p,g-v)]}(o,a);l!==0&&r.deleteData(s,l),r.insertData(s,c)}else r.nodeValue=a}}function Z0(e,t,n,r,i,a){X0(i,e,t);const o=a.theme.text;o!==void 0&&G0(0,0,r,e,o)}function uc(e,t){const n=document.createElement(t);return n.appendChild(e),n}class Tr extends In{constructor(n="",r){super(r);J(this,"__text");J(this,"__format");J(this,"__style");J(this,"__mode");J(this,"__detail");this.__text=n,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}static getType(){return"text"}static clone(n){return new Tr(n.__text,n.__key)}afterCloneFrom(n){super.afterCloneFrom(n),this.__text=n.__text,this.__format=n.__format,this.__style=n.__style,this.__mode=n.__mode,this.__detail=n.__detail}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const n=this.getLatest();return I2[n.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===ti()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(n){const r=Di[n];return(this.getFormat()&r)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(n,r){return yc(this.getLatest().__format,n,r)}canHaveFormat(){return!0}isInline(){return!0}createDOM(n,r){const i=this.__format,a=Sf(0,i),o=Nf(0,i),s=a===null?o:a,l=document.createElement(s);let c=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),a!==null&&(c=document.createElement(o),l.appendChild(c)),Z0(c,this,0,i,this.__text,n);const u=this.__style;return u!==""&&(l.style.cssText=u),l}updateDOM(n,r,i){const a=this.__text,o=n.__format,s=this.__format,l=Sf(0,o),c=Sf(0,s),u=Nf(0,o),d=Nf(0,s);if((l===null?u:l)!==(c===null?d:c))return!0;if(l===c&&u!==d){const m=r.firstChild;m==null&&oe(48);const b=document.createElement(d);return Z0(b,this,0,s,a,i),r.replaceChild(b,m),!1}let f=r;c!==null&&l!==null&&(f=r.firstChild,f==null&&oe(49)),X0(a,f,this);const g=i.theme.text;g!==void 0&&o!==s&&G0(0,o,s,f,g);const p=n.__style,v=this.__style;return p!==v&&(r.style.cssText=v),!1}static importDOM(){return{"#text":()=>({conversion:w$,priority:0}),b:()=>({conversion:x$,priority:0}),code:()=>({conversion:Mr,priority:0}),em:()=>({conversion:Mr,priority:0}),i:()=>({conversion:Mr,priority:0}),mark:()=>({conversion:Mr,priority:0}),s:()=>({conversion:Mr,priority:0}),span:()=>({conversion:b$,priority:0}),strong:()=>({conversion:Mr,priority:0}),sub:()=>({conversion:Mr,priority:0}),sup:()=>({conversion:Mr,priority:0}),u:()=>({conversion:Mr,priority:0})}}static importJSON(n){return dt().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setTextContent(n.text).setFormat(n.format).setDetail(n.detail).setMode(n.mode).setStyle(n.style)}exportDOM(n){let{element:r}=super.exportDOM(n);return it(r)||oe(132),r.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?r.style.textTransform="lowercase":this.hasFormat("uppercase")?r.style.textTransform="uppercase":this.hasFormat("capitalize")&&(r.style.textTransform="capitalize"),this.hasFormat("bold")&&(r=uc(r,"b")),this.hasFormat("italic")&&(r=uc(r,"i")),this.hasFormat("strikethrough")&&(r=uc(r,"s")),this.hasFormat("underline")&&(r=uc(r,"u")),{element:r}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(n,r){}setFormat(n){const r=this.getWritable();return r.__format=typeof n=="string"?Di[n]:n,r}setDetail(n){const r=this.getWritable();return r.__detail=typeof n=="string"?A2[n]:n,r}setStyle(n){const r=this.getWritable();return r.__style=n,r}toggleFormat(n){const r=yc(this.getFormat(),n,null);return this.setFormat(r)}toggleDirectionless(){const n=this.getWritable();return n.__detail^=1,n}toggleUnmergeable(){const n=this.getWritable();return n.__detail^=2,n}setMode(n){const r=D2[n];if(this.__mode===r)return this;const i=this.getWritable();return i.__mode=r,i}setTextContent(n){if(this.__text===n)return this;const r=this.getWritable();return r.__text=n,r}select(n,r){_t();let i=n,a=r;const o=ue(),s=this.getTextContent(),l=this.__key;if(typeof s=="string"){const c=s.length;i===void 0&&(i=c),a===void 0&&(a=c)}else i=0,a=0;if(!re(o))return sb(l,i,l,a,"text","text");{const c=ti();c!==o.anchor.key&&c!==o.focus.key||wt(l),o.setTextNodeRange(this,i,this,a)}return o}selectStart(){return this.select(0,0)}selectEnd(){const n=this.getTextContentSize();return this.select(n,n)}spliceText(n,r,i,a){const o=this.getWritable(),s=o.__text,l=i.length;let c=n;c<0&&(c=l+c,c<0&&(c=0));const u=ue();if(a&&re(u)){const f=n+l;u.setTextNodeRange(o,f,o,f)}const d=s.slice(0,c)+i+s.slice(c+r);return o.__text=d,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...n){_t();const r=this.getLatest(),i=r.getTextContent();if(i==="")return[];const a=r.__key,o=ti(),s=i.length;n.sort((E,T)=>E-T),n.push(s);const l=[],c=n.length;for(let E=0,T=0;E<s&&T<=c;T++){const O=n[T];O>E&&(l.push(i.slice(E,O)),E=O)}const u=l.length;if(u===1)return[r];const d=l[0],f=r.getParent();let g;const p=r.getFormat(),v=r.getStyle(),m=r.__detail;let b=!1,y=null,x=null;const k=ue();if(re(k)){const[E,T]=k.isBackward()?[k.focus,k.anchor]:[k.anchor,k.focus];E.type==="text"&&E.key===a&&(y=E),T.type==="text"&&T.key===a&&(x=T)}r.isSegmented()?(g=dt(d),g.__format=p,g.__style=v,g.__detail=m,g.__state=n0(r,g),b=!0):g=r.setTextContent(d);const w=[g];for(let E=1;E<u;E++){const T=dt(l[E]);T.__format=p,T.__style=v,T.__detail=m,T.__state=n0(r,T);const O=T.__key;o===a&&wt(O),w.push(T)}const S=y?y.offset:null,N=x?x.offset:null;let C=0;for(const E of w){if(!y&&!x)break;const T=C+E.getTextContentSize();if(y!==null&&S!==null&&S<=T&&S>=C&&(y.set(E.getKey(),S-C,"text"),S<T&&(y=null)),x!==null&&N!==null&&N<=T&&N>=C){x.set(E.getKey(),N-C,"text");break}C=T}if(f!==null){(function(O){const P=O.getPreviousSibling(),M=O.getNextSibling();P!==null&&bc(P),M!==null&&bc(M)})(this);const E=f.getWritable(),T=this.getIndexWithinParent();b?(E.splice(T,0,w),this.remove()):E.splice(T,1,w),re(k)&&hc(k,f,T,u-1)}return w}mergeWithSibling(n){const r=n===this.getPreviousSibling();r||n===this.getNextSibling()||oe(50);const i=this.__key,a=n.__key,o=this.__text,s=o.length;ti()===a&&wt(i);const l=ue();if(re(l)){const f=l.anchor,g=l.focus;f!==null&&f.key===a&&ub(f,r,i,n,s),g!==null&&g.key===a&&ub(g,r,i,n,s)}const c=n.__text,u=r?c+o:o+c;this.setTextContent(u);const d=this.getWritable();return n.remove(),d}isTextEntity(){return!1}}function b$(e){return{forChild:Cf(e.style),node:null}}function x$(e){const t=e,n=t.style.fontWeight==="normal";return{forChild:Cf(t.style,n?void 0:"bold"),node:null}}const J0=new WeakMap;function _$(e){if(!it(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function w$(e){const t=e;e.parentElement===null&&oe(129);let n=t.textContent||"";if(function(r){let i,a=r.parentNode;const o=[r];for(;a!==null&&(i=J0.get(a))===void 0&&!_$(a);)o.push(a),a=a.parentNode;const s=i===void 0?a:i;for(let l=0;l<o.length;l++)J0.set(o[l],s);return s}(t)!==null){const r=n.split(/(\r?\n|\t)/),i=[],a=r.length;for(let o=0;o<a;o++){const s=r[o];s===`
253
+ `,uf=ni?" ":Yo,Bi={bold:1,capitalize:1024,code:16,highlight:d0,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},Y2={directionless:1,unmergeable:2},df={center:2,end:6,justify:4,left:1,right:3,start:5},G2={[U2]:"center",[K2]:"end",[q2]:"justify",[W2]:"left",[H2]:"right",[V2]:"start"},X2={normal:0,segmented:2,token:1},Z2={[z2]:"normal",[j2]:"segmented",[B2]:"token"},f0="$config";function h0(e,t,n,r,i,a){let o=e.getFirstChild();for(;o!==null;){const s=o.__key;o.__parent===t&&(Q(o)&&h0(o,s,n,r,i,a),n.has(s)||a.delete(s),i.push(s)),o=o.getNextSibling()}}let ff=!1,hf=0;function J2(e){hf=e.timeStamp}function pf(e,t,n){const r=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&Oc(e,n)!==void 0}function Q2(e,t,n){const r=gn(an(n));let i=null,a=null;r!==null&&r.anchorNode===e&&(i=r.anchorOffset,a=r.focusOffset);const o=e.nodeValue;o!==null&&eh(t,o,i,a,!1)}function R2(e,t,n){if(ae(e)){const r=e.anchor.getNode();if(r.is(n)&&e.format!==r.getFormat())return!1}return Ar(t)&&n.isAttached()}function e$(e,t,n,r){for(let i=e;i&&!aO(i);i=cs(i)){const a=Oc(i,t);if(a!==void 0){const o=ft(a,n);if(o)return Ie(o)||!ot(i)?void 0:[i,o]}else if(i===r)return[r,r1(n)]}}function p0(e,t,n){ff=!0;const r=performance.now()-hf>100;try{ar(e,()=>{const i=he()||function(f){return f.getEditorState().read(()=>{const g=he();return g!==null?g.clone():null})}(e),a=new Map,o=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let c=!1,u="";for(let f=0;f<t.length;f++){const g=t[f],p=g.type,v=g.target,m=e$(v,e,s,o);if(!m)continue;const[x,y]=m;if(p==="characterData")r&&fe(y)&&Ar(v)&&R2(i,v,y)&&Q2(v,y,e);else if(p==="childList"){c=!0;const b=g.addedNodes;for(let S=0;S<b.length;S++){const N=b[S],E=e1(N),C=N.parentNode;if(C!=null&&N!==l&&E===null&&!pf(N,C,e)){if(ni){const T=(ot(N)?N.innerText:null)||N.nodeValue;T&&(u+=T)}C.removeChild(N)}}const k=g.removedNodes,w=k.length;if(w>0){let S=0;for(let N=0;N<w;N++){const E=k[N];(pf(E,v,e)||l===E)&&(v.appendChild(E),S++)}w!==S&&a.set(x,y)}}}if(a.size>0)for(const[f,g]of a)g.reconcileObservedMutation(f,e);const d=n.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const g=d[f],p=g.addedNodes,v=g.target;for(let m=0;m<p.length;m++){const x=p[m],y=x.parentNode;y==null||x.nodeName!=="BR"||pf(x,v,e)||y.removeChild(x)}}n.takeRecords()}i!==null&&(c&&$t(i),ni&&f1(e)&&i.insertRawText(u))})}finally{ff=!1}}function g0(e){const t=e._observer;t!==null&&p0(e,t.takeRecords(),t)}function v0(e){(function(t){hf===0&&an(t).addEventListener("textInput",J2,!0)})(e),e._observer=new MutationObserver((t,n)=>{p0(e,t,n)})}let t$=class{constructor(t,n){R(this,"key");R(this,"parse");R(this,"unparse");R(this,"isEqual");R(this,"defaultValue");this.key=t,this.parse=n.parse.bind(n),this.unparse=(n.unparse||o$).bind(n),this.isEqual=(n.isEqual||Object.is).bind(n),this.defaultValue=this.parse(void 0)}};function n$(e,t){return new t$(e,t)}function r$(e){const t=new Map,n=new Set;for(let r=typeof e=="function"?e:e.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:i}=Dc(r);if(i&&i.stateConfigs)for(const a of i.stateConfigs){let o;"stateConfig"in a?(o=a.stateConfig,a.flat&&n.add(o.key)):o=a,t.set(o.key,o)}}return{flatKeys:n,sharedConfigMap:t}}let i$=class lT{constructor(t,n,r=void 0,i=new Map,a=void 0){R(this,"node");R(this,"knownState");R(this,"unknownState");R(this,"sharedNodeState");R(this,"size");this.node=t,this.sharedNodeState=n,this.unknownState=r,this.knownState=i;const{sharedConfigMap:o}=this.sharedNodeState,s=a!==void 0?a:function(l,c,u){let d=u.size;if(c)for(const f in c){const g=l.get(f);g&&u.has(g)||d++}return d}(o,r,i);this.size=s}getValue(t){const n=this.knownState.get(t);if(n!==void 0)return n;this.sharedNodeState.sharedConfigMap.set(t.key,t);let r=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const i=this.unknownState[t.key];i!==void 0&&(r=t.parse(i)),this.updateFromKnown(t,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},n={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete t[r.key]:t[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in t&&(n[r]=t[r],delete t[r]);return y0(t)&&(n.$=t),n}getWritable(t){if(this.node===t)return this;const{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new lT(t,n,function(a,o,s){let l;if(s)for(const[c,u]of Object.entries(s)){const d=a.get(c);d?o.has(d)||o.set(d,d.parse(u)):(l=l||{},l[c]=u)}return l}(n.sharedConfigMap,i,r),i,this.size)}updateFromKnown(t,n){const r=t.key;this.sharedNodeState.sharedConfigMap.set(r,t);const{knownState:i,unknownState:a}=this;i.has(t)||a&&r in a||(a&&(delete a[r],this.unknownState=y0(a)),this.size++),i.set(t,n)}updateFromUnknown(t,n){const r=this.sharedNodeState.sharedConfigMap.get(t);r?this.updateFromKnown(r,r.parse(n)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=n)}updateFromJSON(t){const{knownState:n}=this;for(const r of n.keys())n.set(r,r.defaultValue);if(this.size=n.size,this.unknownState=void 0,t)for(const[r,i]of Object.entries(t))this.updateFromUnknown(r,i)}};function a$(e){const t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new i$(t,m0(t));return t.__state=n,n}function m0(e){return e.__state?e.__state.sharedNodeState:Gb(Lc(),e.getType()).sharedNodeState}function y0(e){if(e)for(const t in e)return e}function o$(e){return e}function b0(e,t,n){for(const[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);const a=n?n.getValue(r):r.defaultValue;if(a!==i&&!r.isEqual(a,i))return!0}return!1}function x0(e,t,n){const{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(const[a,o]of Object.entries(r))if(!e.has(a)&&(e.add(a),o!==(i?i[a]:void 0)))return!0}return!1}function _0(e,t){const n=e.__state;return n&&n.node===e?n.getWritable(t):n}function w0(e,t){const n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,o=t.__format,s=t.__style,l=e.__state,c=t.__state;return(n===null||n===a)&&(r===null||r===o)&&(i===null||i===s)&&(e.__state===null||l===c||function(u,d){if(u===d)return!0;if(u&&d&&u.size!==d.size)return!1;const f=new Set;return!(u&&b0(f,u,d)||d&&b0(f,d,u)||u&&x0(f,u,d)||d&&x0(f,d,u))}(l,c))}function k0(e,t){const n=e.mergeWithSibling(t),r=Ke()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function S0(e){let t,n,r=e;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&fe(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(w0(t,r)){r=k0(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&fe(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(w0(r,n)){r=k0(r,n);break}break}n.remove()}}else r.remove()}function ji(e){return N0(e.anchor),N0(e.focus),e}function N0(e){for(;e.type==="element";){const t=e.getNode(),n=e.offset;let r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),fe(r)){e.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!Q(r))break;e.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let Wi,wt,Go,rc,gf,vf,Ui,zn,mf,Xo,ut="",rr=null,Hi=null,Pa=!1,ic=!1;function ac(e,t){const n=Ui.get(e);if(t!==null){const r=wf(e);r.parentNode===t&&t.removeChild(r)}if(zn.has(e)||wt._keyToDOMMap.delete(e),Q(n)){const r=sc(n,Ui);yf(r,0,r.length-1,null)}n!==void 0&&th(Xo,Go,rc,n,"destroyed")}function yf(e,t,n,r){for(let i=t;i<=n;++i){const a=e[i];a!==void 0&&ac(a,r)}}function qi(e,t){e.setProperty("text-align",t)}const s$="40px";function E0(e,t){const n=Wi.theme.indent;if(typeof n=="string"){const i=e.classList.contains(n);t>0&&!i?e.classList.add(n):t<1&&i&&e.classList.remove(n)}if(t===0)return void e.style.setProperty("padding-inline-start","");const r=getComputedStyle(wt._rootElement||e).getPropertyValue("--lexical-indent-base-value")||s$;e.style.setProperty("padding-inline-start",`calc(${t} * ${r})`)}function C0(e,t){const n=e.style;t===0?qi(n,""):t===1?qi(n,"left"):t===2?qi(n,"center"):t===3?qi(n,"right"):t===4?qi(n,"justify"):t===5?qi(n,"start"):t===6&&qi(n,"end")}function bf(e,t){const n=function(r){const i=r.__dir;if(i!==null)return i;if(dt(r))return null;const a=r.getParentOrThrow();return dt(a)&&a.__dir===null?"auto":null}(t);n!==null?e.dir=n:e.removeAttribute("dir")}function oc(e,t){const n=zn.get(e);n===void 0&&se(60);const r=n.createDOM(Wi,wt);if(function(i,a,o){const s=o._keyToDOMMap;(function(l,c,u){const d=`__lexicalKey_${c._key}`;l[d]=u})(a,o,i),s.set(i,a)}(e,r,wt),fe(n)?r.setAttribute("data-lexical-text","true"):Ie(n)&&r.setAttribute("data-lexical-decorator","true"),Q(n)){const i=n.__indent,a=n.__size;if(bf(r,n),i!==0&&E0(r,i),a!==0){const s=a-1;xf(sc(n,zn),n,0,s,n.getDOMSlot(r))}const o=n.__format;o!==0&&C0(r,o),n.isInline()||M0(null,n,r)}else{const i=n.getTextContent();if(Ie(n)){const a=n.decorate(wt,Wi);a!==null&&$0(e,a),r.contentEditable="false"}ut+=i}return t!==null&&t.insertChild(r),th(Xo,Go,rc,n,"created"),r}function xf(e,t,n,r,i){const a=ut;ut="";let o=n;for(;o<=r;++o){oc(e[o],i);const s=zn.get(e[o]);s!==null&&fe(s)?rr===null&&(rr=s.getFormat(),Hi=s.getStyle()):Q(s)&&o<r&&!s.isInline()&&(ut+=nc)}i.element.__lexicalTextContent=ut,ut=a+ut}function T0(e,t){if(e){const n=e.__last;if(n){const r=t.get(n);if(r)return Ba(r)?"line-break":Ie(r)&&r.isInline()?"decorator":null}return"empty"}return null}function M0(e,t,n){const r=T0(e,Ui),i=T0(t,zn);r!==i&&t.getDOMSlot(n).setManagedLineBreak(i)}function l$(e,t,n){var r;rr=null,Hi=null,function(i,a,o){const s=ut,l=i.__size,c=a.__size;ut="";const u=o.element;if(l===1&&c===1){const d=i.__first,f=a.__first;if(d===f)lc(d,u);else{const p=wf(d),v=oc(f,null);try{u.replaceChild(v,p)}catch(m){if(typeof m=="object"&&m!=null){const x=`${m.toString()} Parent: ${u.tagName}, new child: {tag: ${v.tagName} key: ${f}}, old child: {tag: ${p.tagName}, key: ${d}}.`;throw new Error(x)}throw m}ac(d,null)}const g=zn.get(f);fe(g)&&rr===null&&(rr=g.getFormat(),Hi=g.getStyle())}else{const d=sc(i,Ui),f=sc(a,zn);if(d.length!==l&&se(227),f.length!==c&&se(228),l===0)c!==0&&xf(f,0,0,c-1,o);else if(c===0){if(l!==0){const g=o.after==null&&o.before==null&&o.element.__lexicalLineBreak==null;yf(d,0,l-1,g?null:u),g&&(u.textContent="")}}else(function(g,p,v,m,x,y){const b=m-1,k=x-1;let w,S,N=y.getFirstChild(),E=0,C=0;for(;E<=b&&C<=k;){const P=p[E],M=v[C];if(P===M)N=_f(lc(M,y.element)),E++,C++;else{if(S===void 0&&(S=O0(v,C)),w===void 0)w=O0(p,E);else if(!w.has(P)){E++;continue}if(!S.has(P)){N=_f(wf(P)),ac(P,y.element),E++,w.delete(P);continue}if(w.has(M)){const A=Xa(wt,M);A!==N&&y.withBefore(N).insertChild(A),N=_f(lc(M,y.element)),E++,C++}else oc(M,y.withBefore(N)),C++}const $=zn.get(M);$!==null&&fe($)?rr===null&&(rr=$.getFormat(),Hi=$.getStyle()):Q($)&&C<=k&&!$.isInline()&&(ut+=nc)}const T=E>b,O=C>k;if(T&&!O){const P=v[k+1],M=P===void 0?null:wt.getElementByKey(P);xf(v,0,C,k,y.withBefore(M))}else O&&!T&&yf(p,E,b,y.element)})(0,d,f,l,c,o)}u.__lexicalTextContent=ut,ut=s+ut}(e,t,t.getDOMSlot(n)),r=t,rr==null||rr===r.__textFormat||ic||r.setTextFormat(rr),function(i){Hi==null||Hi===i.__textStyle||ic||i.setTextStyle(Hi)}(t)}function sc(e,t){const n=[];let r=e.__first;for(;r!==null;){const i=t.get(r);i===void 0&&se(101),n.push(r),r=i.__next}return n}function lc(e,t){const n=Ui.get(e);let r=zn.get(e);n!==void 0&&r!==void 0||se(61);const i=Pa||vf.has(e)||gf.has(e),a=Xa(wt,e);if(n===r&&!i){let o;if(Q(n)){const s=a.__lexicalTextContent;typeof s=="string"?o=s:(o=n.getTextContent(),a.__lexicalTextContent=o)}else o=n.getTextContent();return ut+=o,a}if(n!==r&&i&&th(Xo,Go,rc,r,"updated"),r.updateDOM(n,a,Wi)){const o=oc(e,null);return t===null&&se(62),t.replaceChild(o,a),ac(e,null),o}if(Q(n)){Q(r)||se(334,e);const o=r.__indent;(Pa||o!==n.__indent)&&E0(a,o);const s=r.__format;if((Pa||s!==n.__format)&&C0(a,s),i)l$(n,r,a),dt(r)||r.isInline()||M0(n,r,a);else{const l=a.__lexicalTextContent;let c;typeof l=="string"?c=l:(c=n.getTextContent(),a.__lexicalTextContent=c),ut+=c}if((Pa||r.__dir!==n.__dir)&&(bf(a,r),dt(r)&&!Pa))for(const l of r.getChildren())Q(l)&&bf(Xa(wt,l.getKey()),l)}else{const o=r.getTextContent();if(Ie(r)){const s=r.decorate(wt,Wi);s!==null&&$0(e,s)}ut+=o}if(!ic&&dt(r)&&r.__cachedText!==ut){const o=r.getWritable();o.__cachedText=ut,r=o}return a}function $0(e,t){let n=wt._pendingDecorators;const r=wt._decorators;if(n===null){if(r[e]===t)return;n=t1(wt)}n[e]=t}function _f(e){let t=e.nextSibling;return t!==null&&t===wt._blockCursorElement&&(t=t.nextSibling),t}function O0(e,t){const n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function c$(e,t,n,r,i,a){ut="",Pa=r===2,wt=n,Wi=n._config,Go=n._nodes,rc=wt._listeners.mutation,gf=i,vf=a,Ui=e._nodeMap,zn=t._nodeMap,ic=t._readOnly,mf=new Map(n._keyToDOMMap);const o=new Map;return Xo=o,lc("root",null),wt=void 0,Go=void 0,gf=void 0,vf=void 0,Ui=void 0,zn=void 0,Wi=void 0,mf=void 0,Xo=void 0,o}function wf(e){const t=mf.get(e);return t===void 0&&se(75,e),t}function me(e){return{type:e}}const kf=me("SELECTION_CHANGE_COMMAND"),u$=me("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),P0=me("CLICK_COMMAND"),A0=me("BEFORE_INPUT_COMMAND"),L0=me("INPUT_COMMAND"),D0=me("COMPOSITION_START_COMMAND"),I0=me("COMPOSITION_END_COMMAND"),Vi=me("DELETE_CHARACTER_COMMAND"),Aa=me("INSERT_LINE_BREAK_COMMAND"),Zo=me("INSERT_PARAGRAPH_COMMAND"),La=me("CONTROLLED_TEXT_INSERTION_COMMAND"),cc=me("PASTE_COMMAND"),Sf=me("REMOVE_TEXT_COMMAND"),Jo=me("DELETE_WORD_COMMAND"),Qo=me("DELETE_LINE_COMMAND"),nn=me("FORMAT_TEXT_COMMAND"),uc=me("UNDO_COMMAND"),dc=me("REDO_COMMAND"),F0=me("KEYDOWN_COMMAND"),z0=me("KEY_ARROW_RIGHT_COMMAND"),d$=me("MOVE_TO_END"),B0=me("KEY_ARROW_LEFT_COMMAND"),f$=me("MOVE_TO_START"),j0=me("KEY_ARROW_UP_COMMAND"),W0=me("KEY_ARROW_DOWN_COMMAND"),fc=me("KEY_ENTER_COMMAND"),U0=me("KEY_SPACE_COMMAND"),H0=me("KEY_BACKSPACE_COMMAND"),q0=me("KEY_ESCAPE_COMMAND"),V0=me("KEY_DELETE_COMMAND"),K0=me("KEY_TAB_COMMAND"),h$=me("INSERT_TAB_COMMAND"),p$=me("INDENT_CONTENT_COMMAND"),Y0=me("OUTDENT_CONTENT_COMMAND"),G0=me("DROP_COMMAND"),Da=me("FORMAT_ELEMENT_COMMAND"),X0=me("DRAGSTART_COMMAND"),Z0=me("DRAGOVER_COMMAND"),g$=me("DRAGEND_COMMAND"),hc=me("COPY_COMMAND"),Nf=me("CUT_COMMAND"),Ef=me("SELECT_ALL_COMMAND"),v$=me("CLEAR_EDITOR_COMMAND"),m$=me("CLEAR_HISTORY_COMMAND"),Ro=me("CAN_REDO_COMMAND"),es=me("CAN_UNDO_COMMAND"),y$=me("FOCUS_COMMAND"),b$=me("BLUR_COMMAND"),x$=me("KEY_MODIFIER_COMMAND"),Cr=Object.freeze({}),Cf=[["keydown",function(e,t){ts=e.timeStamp,J0=e.key,!t.isComposing()&&pe(t,F0,e)}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;Za(n)&&r!=="touch"&&r!=="pen"&&e.button===0&&ar(t,()=>{Xb(n)||($f=!0)})}],["compositionstart",function(e,t){pe(t,D0,e)}],["compositionend",function(e,t){ni?rs=!0:Ko||!ec&&!tc?pe(t,I0,e):(gc=!0,vc=e.data)}],["input",function(e,t){e.stopPropagation(),ar(t,()=>{t.dispatchCommand(L0,e)},{event:e}),Ia=null}],["click",function(e,t){ar(t,()=>{const n=he(),r=gn(an(t)),i=Ua();if(r){if(ae(n)){const a=n.anchor,o=a.getNode();if(a.type==="element"&&a.offset===0&&n.isCollapsed()&&!dt(o)&&Qe().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(e.detail===3&&!n.isCollapsed()&&o!==n.focus.getNode()){const s=Nt(o,l=>Q(l)&&!l.isInline());Q(s)&&s.select(0)}}else if(e.pointerType==="touch"||e.pointerType==="pen"){const a=r.anchorNode;(ot(a)||Ar(a))&&$t(jf(i,r,t,e))}}pe(t,P0,e)})}],["cut",Cr],["copy",Cr],["dragstart",Cr],["dragover",Cr],["dragend",Cr],["paste",Cr],["focus",Cr],["blur",Cr],["drop",Cr]];Rl&&Cf.push(["beforeinput",(e,t)=>function(n,r){const i=n.inputType;i==="deleteCompositionText"||ni&&f1(r)||i!=="insertCompositionText"&&pe(r,A0,n)}(e,t)]);let ts=0,J0=null,Q0=0,Ia=null;const Tf=new WeakMap,pc=new WeakMap;let Mf=!1,$f=!1,ns=!1,rs=!1,gc=!1,vc="",Ki=null,R0=[0,"",0,"root",0];function eb(e,t,n,r,i){const a=e.anchor,o=e.focus,s=a.getNode(),l=Ke(),c=gn(an(l)),u=c!==null?c.anchorNode:null,d=a.key,f=l.getElementByKey(d),g=n.length;return d!==o.key||!fe(s)||(!i&&(!Rl||Q0<r+50)||s.isDirty()&&g<2||i1(n))&&a.offset!==o.offset&&!s.isComposing()||Pr(s)||s.isDirty()&&g>1||(i||!Rl)&&f!==null&&!s.isComposing()&&u!==Va(f)||c!==null&&t!==null&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||!s.isComposing()&&(s.getFormat()!==e.format||s.getStyle()!==e.style)||function(p,v){if(v.isSegmented())return!0;if(!p.isCollapsed())return!1;const m=p.anchor.offset,x=v.getParentOrThrow(),y=Zi(v);return m===0?!v.canInsertTextBefore()||!x.canInsertTextBefore()&&!v.isComposing()||y||function(b){const k=b.getPreviousSibling();return(fe(k)||Q(k)&&k.isInline())&&!k.canInsertTextAfter()}(v):m===v.getTextContentSize()&&(!v.canInsertTextAfter()||!x.canInsertTextAfter()&&!v.isComposing()||y)}(e,s)}function tb(e,t){return Ar(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function nb(e,t,n){const{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=e;Mf&&(Mf=!1,tb(r,i)&&tb(a,o)&&!Ki)||ar(t,()=>{if(!n)return void $t(null);if(!ls(t,r,a))return;let s=he();if(Ki&&ae(s)&&s.isCollapsed()){const l=s.anchor,c=Ki.anchor;(l.key===c.key&&l.offset===c.offset+1||l.offset===1&&c.getNode().is(l.getNode().getPreviousSibling()))&&(s=Ki.clone(),$t(s))}if(Ki=null,ae(s)){const l=s.anchor,c=l.getNode();if(s.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(s.dirty=!0);const u=an(t).event,d=u?u.timeStamp:performance.now(),[f,g,p,v,m]=R0,x=Qe(),y=t.isComposing()===!1&&x.getTextContent()==="";if(d<m+200&&l.offset===p&&l.key===v)mc(s,f,g);else if(l.type==="text")fe(c)||se(141),rb(s,c);else if(l.type==="element"&&!y){Q(c)||se(259);const b=l.getNode();b.isEmpty()?function(k,w){const S=w.getTextFormat(),N=w.getTextStyle();mc(k,S,N)}(s,b):mc(s,0,"")}}else{const u=l.key,d=s.focus.key,f=s.getNodes(),g=f.length,p=s.isBackward(),v=p?o:i,m=p?i:o,x=p?d:u,y=p?u:d;let b=2047,k=!1;for(let w=0;w<g;w++){const S=f[w],N=S.getTextContentSize();if(fe(S)&&N!==0&&!(w===0&&S.__key===x&&v===N||w===g-1&&S.__key===y&&m===0)&&(k=!0,b&=S.getFormat(),b===0))break}s.format=k?b:0}}pe(t,kf,void 0)})}function mc(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function rb(e,t){mc(e,t.getFormat(),t.getStyle())}function ib(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function _$(e){const t=e.inputType,n=ib(e),r=Ke(),i=he();if(t==="deleteContentBackward"){if(i===null){const d=Ua();if(!ae(d))return!0;$t(d.clone())}if(ae(i)){const d=i.anchor.key===i.focus.key;if(a=e.timeStamp,J0==="MediaLast"&&a<ts+30&&r.isComposing()&&d){if(St(null),ts=0,setTimeout(()=>{ar(r,()=>{St(null)})},30),ae(i)){const f=i.anchor.getNode();f.markDirty(),fe(f)||se(142),rb(i,f)}}else{St(null),e.preventDefault();const f=i.anchor.getNode(),g=f.getTextContent(),p=f.canInsertTextAfter(),v=i.anchor.offset===0&&i.focus.offset===g.length;let m=cf&&d&&!v&&p;if(m&&i.isCollapsed()&&(m=!Ie(nh(i.anchor,!0))),!m){pe(r,Vi,!0);const x=he();cf&&ae(x)&&x.isCollapsed()&&(Ki=x,setTimeout(()=>Ki=null))}}return!0}}var a;if(!ae(i))return!0;const o=e.data;Ia!==null&&Rf(!1,r,Ia),i.dirty&&Ia===null||!i.isCollapsed()||dt(i.anchor.getNode())||n===null||i.applyDOMRange(n),Ia=null;const s=i.anchor,l=i.focus,c=s.getNode(),u=l.getNode();if(t==="insertText"||t==="insertTranspose"){if(o===`
254
+ `)e.preventDefault(),pe(r,Aa,!1);else if(o===nc)e.preventDefault(),pe(r,Zo,void 0);else if(o==null&&e.dataTransfer){const d=e.dataTransfer.getData("text/plain");e.preventDefault(),i.insertRawText(d)}else o!=null&&eb(i,n,o,e.timeStamp,!0)?(e.preventDefault(),pe(r,La,o)):Ia=o;return Q0=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":pe(r,La,e);break;case"insertFromComposition":St(null),pe(r,La,e);break;case"insertLineBreak":St(null),pe(r,Aa,!1);break;case"insertParagraph":St(null),ns&&!Ko?(ns=!1,pe(r,Aa,!1)):pe(r,Zo,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":pe(r,cc,e);break;case"deleteByComposition":(function(d,f){return d!==f||Q(d)||Q(f)||!Zi(d)||!Zi(f)})(c,u)&&pe(r,Sf,e);break;case"deleteByDrag":case"deleteByCut":pe(r,Sf,e);break;case"deleteContent":pe(r,Vi,!1);break;case"deleteWordBackward":pe(r,Jo,!0);break;case"deleteWordForward":pe(r,Jo,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":pe(r,Qo,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":pe(r,Qo,!1);break;case"formatStrikeThrough":pe(r,nn,"strikethrough");break;case"formatBold":pe(r,nn,"bold");break;case"formatItalic":pe(r,nn,"italic");break;case"formatUnderline":pe(r,nn,"underline");break;case"historyUndo":pe(r,uc,void 0);break;case"historyRedo":pe(r,dc,void 0)}return!0}function w$(e){if(ot(e.target)&&Xb(e.target))return!0;const t=Ke(),n=he(),r=e.data,i=ib(e);if(r!=null&&ae(n)&&eb(n,i,r,e.timeStamp,!1)){rs&&(yc(t,r),rs=!1);const a=n.anchor.getNode(),o=gn(an(t));if(o===null)return!0;const s=n.isBackward(),l=s?n.anchor.offset:n.focus.offset,c=s?n.focus.offset:n.anchor.offset;Rl&&!n.isCollapsed()&&fe(a)&&o.anchorNode!==null&&a.getTextContent().slice(0,l)+r+a.getTextContent().slice(l+c)===o1(o.anchorNode)||pe(t,La,r);const u=r.length;ni&&u>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=u),cf&&t.isComposing()&&(ts=0,St(null))}else Rf(!1,t,r!==null?r:void 0),rs&&(yc(t,r||void 0),rs=!1);return function(){kt();const a=Ke();g0(a)}(),!0}function k$(e){const t=Ke(),n=he();if(ae(n)&&!t.isComposing()){const r=n.anchor,i=n.anchor.getNode();St(r.key),rh(db),(e.timeStamp<ts+30||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||fe(i)&&i.getStyle()!==n.style)&&pe(t,La,uf)}return!0}function S$(e){return yc(Ke(),e.data),rh(fb),!0}function yc(e,t){const n=e._compositionKey;if(St(null),n!==null&&t!=null){if(t===""){const r=ft(n),i=Va(e.getElementByKey(n));if(i!==null&&i.nodeValue!==null&&fe(r)){const a=gn(an(e));let o=null,s=null;a!==null&&a.anchorNode===i&&(o=a.anchorOffset,s=a.focusOffset),eh(r,i.nodeValue,o,s,!0)}return}if(t[t.length-1]===`
255
+ `){const r=he();if(ae(r)||Mt(r)){if(ae(r)){const i=r.focus;r.anchor.set(i.key,i.offset,i.type)}return void pe(e,fc,null)}}}Rf(!0,e,t)}function N$(e){const t=Ke();if(e.key==null)return!0;if(gc){if(c1(e))return ar(t,()=>{yc(t,vc)}),gc=!1,vc="",!0;gc=!1,vc=""}if(function(n){return He(n,"ArrowRight",{shiftKey:"any"})}(e))pe(t,z0,e);else if(function(n){return He(n,"ArrowRight",Lr)}(e))pe(t,d$,e);else if(function(n){return He(n,"ArrowLeft",{shiftKey:"any"})}(e))pe(t,B0,e);else if(function(n){return He(n,"ArrowLeft",Lr)}(e))pe(t,f$,e);else if(function(n){return He(n,"ArrowUp",{altKey:"any",shiftKey:"any"})}(e))pe(t,j0,e);else if(function(n){return He(n,"ArrowDown",{altKey:"any",shiftKey:"any"})}(e))pe(t,W0,e);else if(function(n){return He(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(e))ns=!0,pe(t,fc,e);else if(function(n){return n.key===" "}(e))pe(t,U0,e);else if(function(n){return Fn&&He(n,"o",{ctrlKey:!0})}(e))e.preventDefault(),ns=!0,pe(t,Aa,!0);else if(function(n){return He(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(e))ns=!1,pe(t,fc,e);else if(function(n){return He(n,"Backspace",{shiftKey:"any"})||Fn&&He(n,"h",{ctrlKey:!0})}(e))c1(e)?pe(t,H0,e):(e.preventDefault(),pe(t,Vi,!0));else if(function(n){return n.key==="Escape"}(e))pe(t,q0,e);else if(function(n){return He(n,"Delete",{})||Fn&&He(n,"d",{ctrlKey:!0})}(e))(function(n){return n.key==="Delete"})(e)?pe(t,V0,e):(e.preventDefault(),pe(t,Vi,!1));else if(function(n){return He(n,"Backspace",l1)}(e))e.preventDefault(),pe(t,Jo,!0);else if(function(n){return He(n,"Delete",l1)}(e))e.preventDefault(),pe(t,Jo,!1);else if(function(n){return Fn&&He(n,"Backspace",{metaKey:!0})}(e))e.preventDefault(),pe(t,Qo,!0);else if(function(n){return Fn&&(He(n,"Delete",{metaKey:!0})||He(n,"k",{ctrlKey:!0}))}(e))e.preventDefault(),pe(t,Qo,!1);else if(function(n){return He(n,"b",Lr)}(e))e.preventDefault(),pe(t,nn,"bold");else if(function(n){return He(n,"u",Lr)}(e))e.preventDefault(),pe(t,nn,"underline");else if(function(n){return He(n,"i",Lr)}(e))e.preventDefault(),pe(t,nn,"italic");else if(function(n){return He(n,"Tab",{shiftKey:"any"})}(e))pe(t,K0,e);else if(function(n){return He(n,"z",Lr)}(e))e.preventDefault(),pe(t,uc,void 0);else if(function(n){return Fn?He(n,"z",{metaKey:!0,shiftKey:!0}):He(n,"y",{ctrlKey:!0})||He(n,"z",{ctrlKey:!0,shiftKey:!0})}(e))e.preventDefault(),pe(t,dc,void 0);else{const n=t._editorState._selection;n===null||ae(n)?u1(e)&&(e.preventDefault(),pe(t,Ef,e)):function(r){return He(r,"c",Lr)}(e)?(e.preventDefault(),pe(t,hc,e)):function(r){return He(r,"x",Lr)}(e)?(e.preventDefault(),pe(t,Nf,e)):u1(e)&&(e.preventDefault(),pe(t,Ef,e))}return function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey}(e)&&t.dispatchCommand(x$,e),!0}function ab(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const Fa=new Map;function ob(e){const t=nO(e.target);if(t===null)return;const n=Zb(t.anchorNode);if(n===null)return;$f&&($f=!1,ar(n,()=>{const l=Ua(),c=t.anchorNode;(ot(c)||Ar(c))&&$t(jf(l,t,n,e))}));const r=Qf(n),i=r[r.length-1],a=i._key,o=Fa.get(a),s=o||i;s!==n&&nb(t,s,!1),nb(t,n,!0),n!==i?Fa.set(a,n):o&&Fa.delete(a)}function sb(e){e._lexicalHandled=!0}function lb(e){return e._lexicalHandled===!0}function E$(e){const t=Tf.get(e);if(t===void 0)return;const n=pc.get(t);if(n===void 0)return;const r=n-1;r>=0||se(164),Tf.delete(e),pc.set(t,r),r===0&&t.removeEventListener("selectionchange",ob);const i=Tc(e);Jf(i)?(function(o){if(o._parentEditor!==null){const s=Qf(o),l=s[s.length-1]._key;Fa.get(l)===o&&Fa.delete(l)}else Fa.delete(o._key)}(i),e.__lexicalEditor=null):i&&se(198);const a=ab(e);for(let o=0;o<a.length;o++)a[o]();e.__lexicalEventHandles=[]}function Of(e,t,n){kt();const r=e.__key,i=e.getParent();if(i===null)return;const a=function(s){const l=he();if(!ae(l)||!Q(s))return l;const{anchor:c,focus:u}=l,d=c.getNode(),f=u.getNode();return ih(d,s)&&c.set(s.__key,0,"element"),ih(f,s)&&u.set(s.__key,0,"element"),l}(e);let o=!1;if(ae(a)&&t){const s=a.anchor,l=a.focus;s.key===r&&(Nc(s,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0),l.key===r&&(Nc(l,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0)}else Mt(a)&&t&&e.isSelected()&&e.selectPrevious();if(ae(a)&&t&&!o){const s=e.getIndexWithinParent();Ji(e),Sc(a,i,s,-1)}else Ji(e);n||Gt(i)||i.canBeEmpty()||!i.isEmpty()||Of(i,t),t&&a&&dt(i)&&i.isEmpty()&&i.selectEnd()}function fq(e){return e}const cb=Symbol.for("ephemeral");function bc(e){return e[cb]||!1}class Bn{constructor(t){R(this,"__type");R(this,"__key");R(this,"__parent");R(this,"__prev");R(this,"__next");R(this,"__state");this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),Rb(this,t)}static getType(){const{ownNodeType:t}=Dc(this);return t===void 0&&se(64,this.name),t}static clone(t){se(65,this.name)}$config(){return{}}config(t,n){const r=n.extends||Object.getPrototypeOf(this.constructor);return Object.assign(n,{extends:r,type:t}),{[t]:n}}afterCloneFrom(t){this.__key===t.__key?(this.__parent=t.__parent,this.__next=t.__next,this.__prev=t.__prev,this.__state=t.__state):t.__state&&(this.__state=t.__state.getWritable(this))}getType(){return this.__type}isInline(){se(137,this.constructor.name)}isAttached(){let t=this.__key;for(;t!==null;){if(t==="root")return!0;const n=ft(t);if(n===null)break;t=n.__parent}return!1}isSelected(t){const n=t||he();if(n==null)return!1;const r=n.getNodes().some(i=>i.__key===this.__key);if(fe(this))return r;if(ae(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const i=this.getParent();if(Ie(this)&&this.isInline()&&i){const a=n.isBackward()?n.focus:n.anchor;if(i.is(a.getNode())&&a.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(t===null)return-1;let n=t.getFirstChild(),r=0;for(;n!==null;){if(this.is(n))return r;r++,n=n.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return t===null?null:ft(t)}getParentOrThrow(){const t=this.getParent();return t===null&&se(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const n=t.getParent();if(Gt(n))return Q(t)||t===this&&Ie(t)||se(194),t;t=n}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&se(67,this.__key),t}getParents(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n),n=n.getParent();return t}getParentKeys(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n.__key),n=n.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return t===null?null:ft(t)}getPreviousSiblings(){const t=[],n=this.getParent();if(n===null)return t;let r=n.getFirstChild();for(;r!==null&&!r.is(this);)t.push(r),r=r.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return t===null?null:ft(t)}getNextSiblings(){const t=[];let n=this.getNextSibling();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getCommonAncestor(t){const n=Q(this)?this:this.getParent(),r=Q(t)?t:t.getParent(),i=n&&r?Fc(n,r):null;return i?i.commonAncestor:null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){const n=Fc(this,t);return n!==null&&(n.type==="descendant"||(n.type==="branch"?w1(n)===-1:(n.type!=="same"&&n.type!=="ancestor"&&se(279),!1)))}isParentOf(t){const n=Fc(this,t);return n!==null&&n.type==="ancestor"}getNodesBetween(t){const n=this.isBefore(t),r=[],i=new Set;let a=this;for(;a!==null;){const o=a.__key;if(i.has(o)||(i.add(o),r.push(a)),a===t)break;const s=Q(a)?n?a.getFirstChild():a.getLastChild():null;if(s!==null){a=s;continue}const l=n?a.getNextSibling():a.getPreviousSibling();if(l!==null){a=l;continue}const c=a.getParentOrThrow();if(i.has(c.__key)||r.push(c),c===t)break;let u=null,d=c;do{if(d===null&&se(68),u=n?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;u!==null||i.has(d.__key)||r.push(d)}while(u===null);a=u}return n||r.reverse(),r}isDirty(){const t=Ke()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){if(bc(this))return this;const t=ft(this.__key);return t===null&&se(113),t}getWritable(){if(bc(this))return this;kt();const t=ri(),n=Ke(),r=t._nodeMap,i=this.__key,a=this.getLatest(),o=n._cloneNotNeeded,s=he();if(s!==null&&s.setCachedNodes(null),o.has(i))return $c(a),a;const l=y1(a);return o.add(i),$c(l),r.set(i,l),l}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(t,n){se(70)}updateDOM(t,n,r){se(71)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(t){se(18,this.name)}updateFromJSON(t){return function(n,r){const i=n.getWritable(),a=r.$;let o=a;for(const s of m0(i).flatKeys)s in r&&(o!==void 0&&o!==a||(o={...a}),o[s]=r[s]);return(i.__state||o)&&a$(n).updateFromJSON(o),i}(this,t)}static transform(){return null}remove(t){Of(this,!0,t)}replace(t,n){kt();let r=he();r!==null&&(r=r.clone()),oh(this,t);const i=this.getLatest(),a=this.__key,o=t.__key,s=t.getWritable(),l=this.getParentOrThrow().getWritable(),c=l.__size;Ji(s);const u=i.getPreviousSibling(),d=i.getNextSibling(),f=i.__prev,g=i.__next,p=i.__parent;if(Of(i,!1,!0),u===null?l.__first=o:u.getWritable().__next=o,s.__prev=f,d===null?l.__last=o:d.getWritable().__prev=o,s.__next=g,s.__parent=p,l.__size=c,n&&(Q(this)&&Q(s)||se(139),this.getChildren().forEach(v=>{s.append(v)})),ae(r)){$t(r);const v=r.anchor,m=r.focus;v.key===a&&yb(v,s),m.key===a&&yb(m,s)}return ii()===a&&St(o),s}insertAfter(t,n=!0){kt(),oh(this,t);const r=this.getWritable(),i=t.getWritable(),a=i.getParent(),o=he();let s=!1,l=!1;if(a!==null){const g=t.getIndexWithinParent();if(Ji(i),ae(o)){const p=a.__key,v=o.anchor,m=o.focus;s=v.type==="element"&&v.key===p&&v.offset===g+1,l=m.type==="element"&&m.key===p&&m.offset===g+1}}const c=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),d=i.__key,f=r.__next;if(c===null?u.__last=d:c.getWritable().__prev=d,u.__size++,r.__next=d,i.__next=f,i.__prev=r.__key,i.__parent=r.__parent,n&&ae(o)){const g=this.getIndexWithinParent();Sc(o,u,g+1);const p=u.__key;s&&o.anchor.set(p,g+2,"element"),l&&o.focus.set(p,g+2,"element")}return t}insertBefore(t,n=!0){kt(),oh(this,t);const r=this.getWritable(),i=t.getWritable(),a=i.__key;Ji(i);const o=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),l=r.__prev,c=this.getIndexWithinParent();o===null?s.__first=a:o.getWritable().__next=a,s.__size++,r.__prev=a,i.__prev=l,i.__next=r.__key,i.__parent=r.__parent;const u=he();return n&&ae(u)&&Sc(u,this.getParentOrThrow(),c),t}isParentRequired(){return!1}createParentElementNode(){return Ye()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,n){kt();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(Q(r))return r.select();if(!fe(r)){const a=r.getIndexWithinParent()+1;return i.select(a,a)}return r.select(t,n)}selectNext(t,n){kt();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(Q(r))return r.select(0,0);if(!fe(r)){const a=r.getIndexWithinParent();return i.select(a,a)}return r.select(t,n)}markDirty(){this.getWritable()}reconcileObservedMutation(t,n){this.markDirty()}}R(Bn,"importDOM");const Pf="historic",C$="history-push",Yi="history-merge",T$="paste",M$="collaboration",$$="skip-scroll-into-view",O$="skip-dom-selection",ub="skip-selection-focus",db="composition-start",fb="composition-end";class za extends Bn{static getType(){return"linebreak"}static clone(t){return new za(t.__key)}constructor(t){super(t)}getTextContent(){return`
256
+ `}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>function(n){const r=n.parentElement;if(r!==null&&Ac(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&xc(i)){const a=r.lastChild;if(a===n||a.previousSibling===n&&xc(a))return!0}}return!1}(t)||function(n){const r=n.parentElement;if(r!==null&&Ac(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&xc(i))return!1;const a=r.lastChild;if(a===n||a.previousSibling===n&&xc(a))return!0}return!1}(t)?null:{conversion:P$,priority:0}}}static importJSON(t){return Tr().updateFromJSON(t)}}function P$(e){return{node:Tr()}}function Tr(){return jn(new za)}function Ba(e){return e instanceof za}function xc(e){return Ar(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function Af(e,t){return 16&t?"code":t&d0?"mark":32&t?"sub":64&t?"sup":null}function Lf(e,t){return 1&t?"strong":2&t?"em":"span"}function hb(e,t,n,r,i){const a=r.classList;let o=Ga(i,"base");o!==void 0&&a.add(...o),o=Ga(i,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;o!==void 0&&(8&n&&4&n?(s=!0,l||a.add(...o)):l&&a.remove(...o));for(const c in Bi){const u=Bi[c];if(o=Ga(i,c),o!==void 0)if(n&u){if(s&&(c==="underline"||c==="strikethrough")){t&u&&a.remove(...o);continue}(!(t&u)||l&&c==="underline"||c==="strikethrough")&&a.add(...o)}else t&u&&a.remove(...o)}}function pb(e,t,n){const r=t.firstChild,i=n.isComposing(),a=e+(i?Yo:"");if(r==null)t.textContent=a;else{const o=r.nodeValue;if(o!==a)if(i||ni){const[s,l,c]=function(u,d){const f=u.length,g=d.length;let p=0,v=0;for(;p<f&&p<g&&u[p]===d[p];)p++;for(;v+p<f&&v+p<g&&u[f-v-1]===d[g-v-1];)v++;return[p,f-p-v,d.slice(p,g-v)]}(o,a);l!==0&&r.deleteData(s,l),r.insertData(s,c)}else r.nodeValue=a}}function gb(e,t,n,r,i,a){pb(i,e,t);const o=a.theme.text;o!==void 0&&hb(0,0,r,e,o)}function _c(e,t){const n=document.createElement(t);return n.appendChild(e),n}class Mr extends Bn{constructor(n="",r){super(r);R(this,"__text");R(this,"__format");R(this,"__style");R(this,"__mode");R(this,"__detail");this.__text=n,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}static getType(){return"text"}static clone(n){return new Mr(n.__text,n.__key)}afterCloneFrom(n){super.afterCloneFrom(n),this.__text=n.__text,this.__format=n.__format,this.__style=n.__style,this.__mode=n.__mode,this.__detail=n.__detail}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const n=this.getLatest();return Z2[n.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===ii()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(n){const r=Bi[n];return(this.getFormat()&r)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(n,r){return Mc(this.getLatest().__format,n,r)}canHaveFormat(){return!0}isInline(){return!0}createDOM(n,r){const i=this.__format,a=Af(0,i),o=Lf(0,i),s=a===null?o:a,l=document.createElement(s);let c=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),a!==null&&(c=document.createElement(o),l.appendChild(c)),gb(c,this,0,i,this.__text,n);const u=this.__style;return u!==""&&(l.style.cssText=u),l}updateDOM(n,r,i){const a=this.__text,o=n.__format,s=this.__format,l=Af(0,o),c=Af(0,s),u=Lf(0,o),d=Lf(0,s);if((l===null?u:l)!==(c===null?d:c))return!0;if(l===c&&u!==d){const m=r.firstChild;m==null&&se(48);const x=document.createElement(d);return gb(x,this,0,s,a,i),r.replaceChild(x,m),!1}let f=r;c!==null&&l!==null&&(f=r.firstChild,f==null&&se(49)),pb(a,f,this);const g=i.theme.text;g!==void 0&&o!==s&&hb(0,o,s,f,g);const p=n.__style,v=this.__style;return p!==v&&(r.style.cssText=v),!1}static importDOM(){return{"#text":()=>({conversion:I$,priority:0}),b:()=>({conversion:L$,priority:0}),code:()=>({conversion:$r,priority:0}),em:()=>({conversion:$r,priority:0}),i:()=>({conversion:$r,priority:0}),mark:()=>({conversion:$r,priority:0}),s:()=>({conversion:$r,priority:0}),span:()=>({conversion:A$,priority:0}),strong:()=>({conversion:$r,priority:0}),sub:()=>({conversion:$r,priority:0}),sup:()=>({conversion:$r,priority:0}),u:()=>({conversion:$r,priority:0})}}static importJSON(n){return pt().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setTextContent(n.text).setFormat(n.format).setDetail(n.detail).setMode(n.mode).setStyle(n.style)}exportDOM(n){let{element:r}=super.exportDOM(n);return ot(r)||se(132),r.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?r.style.textTransform="lowercase":this.hasFormat("uppercase")?r.style.textTransform="uppercase":this.hasFormat("capitalize")&&(r.style.textTransform="capitalize"),this.hasFormat("bold")&&(r=_c(r,"b")),this.hasFormat("italic")&&(r=_c(r,"i")),this.hasFormat("strikethrough")&&(r=_c(r,"s")),this.hasFormat("underline")&&(r=_c(r,"u")),{element:r}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(n,r){}setFormat(n){const r=this.getWritable();return r.__format=typeof n=="string"?Bi[n]:n,r}setDetail(n){const r=this.getWritable();return r.__detail=typeof n=="string"?Y2[n]:n,r}setStyle(n){const r=this.getWritable();return r.__style=n,r}toggleFormat(n){const r=Mc(this.getFormat(),n,null);return this.setFormat(r)}toggleDirectionless(){const n=this.getWritable();return n.__detail^=1,n}toggleUnmergeable(){const n=this.getWritable();return n.__detail^=2,n}setMode(n){const r=X2[n];if(this.__mode===r)return this;const i=this.getWritable();return i.__mode=r,i}setTextContent(n){if(this.__text===n)return this;const r=this.getWritable();return r.__text=n,r}select(n,r){kt();let i=n,a=r;const o=he(),s=this.getTextContent(),l=this.__key;if(typeof s=="string"){const c=s.length;i===void 0&&(i=c),a===void 0&&(a=c)}else i=0,a=0;if(!ae(o))return Eb(l,i,l,a,"text","text");{const c=ii();c!==o.anchor.key&&c!==o.focus.key||St(l),o.setTextNodeRange(this,i,this,a)}return o}selectStart(){return this.select(0,0)}selectEnd(){const n=this.getTextContentSize();return this.select(n,n)}spliceText(n,r,i,a){const o=this.getWritable(),s=o.__text,l=i.length;let c=n;c<0&&(c=l+c,c<0&&(c=0));const u=he();if(a&&ae(u)){const f=n+l;u.setTextNodeRange(o,f,o,f)}const d=s.slice(0,c)+i+s.slice(c+r);return o.__text=d,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...n){kt();const r=this.getLatest(),i=r.getTextContent();if(i==="")return[];const a=r.__key,o=ii(),s=i.length;n.sort((C,T)=>C-T),n.push(s);const l=[],c=n.length;for(let C=0,T=0;C<s&&T<=c;T++){const O=n[T];O>C&&(l.push(i.slice(C,O)),C=O)}const u=l.length;if(u===1)return[r];const d=l[0],f=r.getParent();let g;const p=r.getFormat(),v=r.getStyle(),m=r.__detail;let x=!1,y=null,b=null;const k=he();if(ae(k)){const[C,T]=k.isBackward()?[k.focus,k.anchor]:[k.anchor,k.focus];C.type==="text"&&C.key===a&&(y=C),T.type==="text"&&T.key===a&&(b=T)}r.isSegmented()?(g=pt(d),g.__format=p,g.__style=v,g.__detail=m,g.__state=_0(r,g),x=!0):g=r.setTextContent(d);const w=[g];for(let C=1;C<u;C++){const T=pt(l[C]);T.__format=p,T.__style=v,T.__detail=m,T.__state=_0(r,T);const O=T.__key;o===a&&St(O),w.push(T)}const S=y?y.offset:null,N=b?b.offset:null;let E=0;for(const C of w){if(!y&&!b)break;const T=E+C.getTextContentSize();if(y!==null&&S!==null&&S<=T&&S>=E&&(y.set(C.getKey(),S-E,"text"),S<T&&(y=null)),b!==null&&N!==null&&N<=T&&N>=E){b.set(C.getKey(),N-E,"text");break}E=T}if(f!==null){(function(O){const P=O.getPreviousSibling(),M=O.getNextSibling();P!==null&&$c(P),M!==null&&$c(M)})(this);const C=f.getWritable(),T=this.getIndexWithinParent();x?(C.splice(T,0,w),this.remove()):C.splice(T,1,w),ae(k)&&Sc(k,f,T,u-1)}return w}mergeWithSibling(n){const r=n===this.getPreviousSibling();r||n===this.getNextSibling()||se(50);const i=this.__key,a=n.__key,o=this.__text,s=o.length;ii()===a&&St(i);const l=he();if(ae(l)){const f=l.anchor,g=l.focus;f!==null&&f.key===a&&Mb(f,r,i,n,s),g!==null&&g.key===a&&Mb(g,r,i,n,s)}const c=n.__text,u=r?c+o:o+c;this.setTextContent(u);const d=this.getWritable();return n.remove(),d}isTextEntity(){return!1}}function A$(e){return{forChild:Df(e.style),node:null}}function L$(e){const t=e,n=t.style.fontWeight==="normal";return{forChild:Df(t.style,n?void 0:"bold"),node:null}}const vb=new WeakMap;function D$(e){if(!ot(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function I$(e){const t=e;e.parentElement===null&&se(129);let n=t.textContent||"";if(function(r){let i,a=r.parentNode;const o=[r];for(;a!==null&&(i=vb.get(a))===void 0&&!D$(a);)o.push(a),a=a.parentNode;const s=i===void 0?a:i;for(let l=0;l<o.length;l++)vb.set(o[l],s);return s}(t)!==null){const r=n.split(/(\r?\n|\t)/),i=[],a=r.length;for(let o=0;o<a;o++){const s=r[o];s===`
257
257
  `||s===`\r
258
- `?i.push(Er()):s===" "?i.push(Da()):s!==""&&i.push(dt(s))}return{node:i}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let r=t,i=!0;for(;r!==null&&(r=Q0(r,!1))!==null;){const a=r.textContent||"";if(a.length>0){/[ \t\n]$/.test(a)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=t,i=!0;for(;r!==null&&(r=Q0(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:dt(n)}}function Q0(e,t){let n=e;for(;;){let r;for(;(r=t?n.nextSibling:n.previousSibling)===null;){const a=n.parentElement;if(a===null)return null;n=a}if(n=r,it(n)){const a=n.style.display;if(a===""&&!th(n)||a!==""&&!a.startsWith("inline"))return null}let i=n;for(;(i=t?n.firstChild:n.lastChild)!==null;)n=i;if(Pr(n))return n;if(n.nodeName==="BR")return null}}const k$={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Mr(e){const t=k$[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:Cf(e.style,t),node:null}}function dt(e=""){return Fn(new Tr(e))}function ce(e){return e instanceof Tr}function Cf(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),i=n==="700"||n==="bold",a=r.includes("line-through"),o=e.fontStyle==="italic",s=r.includes("underline"),l=e.verticalAlign;return c=>(ce(c)&&(i&&!c.hasFormat("bold")&&c.toggleFormat("bold"),a&&!c.hasFormat("strikethrough")&&c.toggleFormat("strikethrough"),o&&!c.hasFormat("italic")&&c.toggleFormat("italic"),s&&!c.hasFormat("underline")&&c.toggleFormat("underline"),l!=="sub"||c.hasFormat("subscript")||c.toggleFormat("subscript"),l!=="super"||c.hasFormat("superscript")||c.toggleFormat("superscript"),t&&!c.hasFormat(t)&&c.toggleFormat(t)),c)}class La extends Tr{static getType(){return"tab"}static clone(t){return new La(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const n=super.createDOM(t),r=Ua(t.theme,"tab");return r!==void 0&&n.classList.add(...r),n}static importJSON(t){return Da().updateFromJSON(t)}setTextContent(t){return t!==" "&&t!==""&&qy(126),super.setTextContent(" ")}spliceText(t,n,r,i){return r===""&&n===0||r===" "&&n===1||oe(286),this}setDetail(t){return t!==2&&oe(127),this}setMode(t){return t!=="normal"&&oe(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Da(){return Fn(new La)}function dc(e){return e instanceof La}class S${constructor(t,n,r){J(this,"key");J(this,"offset");J(this,"type");J(this,"_selection");this._selection=null,this.key=t,this.offset=n,this.type=r}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){return this.key===t.key?this.offset<t.offset:nx(ln(sr(this,"next")),ln(sr(t,"next")))<0}getNode(){const t=lt(this.key);return t===null&&oe(20),t}set(t,n,r,i){const a=this._selection,o=this.key;i&&this.key===t&&this.offset===n&&this.type===r||(this.key=t,this.offset=n,this.type=r,Jo()||(ti()===o&&wt(t),a!==null&&(a.setCachedNodes(null),a.dirty=!0)))}}function nr(e,t,n){return new S$(e,t,n)}function Ef(e,t){let n=t.__key,r=e.offset,i="element";if(ce(t)){i="text";const a=t.getTextContentSize();r>a&&(r=a)}else if(!X(t)){const a=t.getNextSibling();if(ce(a))n=a.__key,r=0,i="text";else{const o=t.getParent();o&&(n=o.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function R0(e,t){if(X(t)){const n=t.getLastDescendant();X(n)||ce(n)?Ef(e,n):Ef(e,t)}else Ef(e,t)}class fc{constructor(t){J(this,"_nodes");J(this,"_cachedNodes");J(this,"dirty");this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!Mt(t))return!1;const n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new fc(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const n=this.getNodes(),r=n.length,i=n[r-1];let a;if(ce(i))a=i.select();else{const o=i.getIndexWithinParent()+1;a=i.getParentOrThrow().select(o,o)}a.insertNodes(t);for(let o=0;o<r;o++)n[o].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=this._nodes,r=[];for(const i of n){const a=lt(i);a!==null&&r.push(a)}return Jo()||(this._cachedNodes=r),r}getTextContent(){const t=this.getNodes();let n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}deleteNodes(){const t=this.getNodes();if((ue()||Ia())===this&&t[0]){const n=ct(t[0],"next");tO(ni(n,n))}for(const n of t)n.remove()}}function re(e){return e instanceof qi}class qi{constructor(t,n,r,i){J(this,"format");J(this,"style");J(this,"anchor");J(this,"focus");J(this,"_cachedNodes");J(this,"dirty");this.anchor=t,this.focus=n,t._selection=this,n._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!re(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=function(r){const i=[],[a,o]=r.getTextSlices();a&&i.push(a.caret.origin);const s=new Set,l=new Set;for(const c of r)if(zn(c)){const{origin:u}=c;i.length===0?s.add(u):(l.add(u),i.push(u))}else{const{origin:u}=c;X(u)&&l.has(u)||i.push(u)}if(o&&i.push(o.caret.origin),Ka(r.focus)&&X(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let c=mn(r.focus.origin,"previous");zn(c)&&s.has(c.origin)&&!c.origin.isEmpty()&&c.origin.is(i[i.length-1]);c=ah(c))s.delete(c.origin),i.pop();for(;i.length>1;){const c=i[i.length-1];if(!X(c)||l.has(c)||c.isEmpty()||s.has(c))break;i.pop()}if(i.length===0&&r.isCollapsed()){const c=ln(r.anchor),u=ln(r.anchor.getFlipped()),d=g=>ar(g)?g.origin:g.getNodeAtCaret(),f=d(c)||d(u)||(r.anchor.getNodeAtCaret()?c.origin:u.origin);i.push(f)}return i}(lx(ax(this),"next"));return Jo()||(this._cachedNodes=n),n}setTextNodeRange(t,n,r,i){this.anchor.set(t.__key,n,"text"),this.focus.set(r.__key,i,"text")}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const n=t[0],r=t[t.length-1],i=this.anchor,a=this.focus,o=i.isBefore(a),[s,l]=Tf(this);let c="",u=!0;for(let d=0;d<t.length;d++){const f=t[d];if(X(f)&&!f.isInline())u||(c+=`
259
- `),u=!f.isEmpty();else if(u=!1,ce(f)){let g=f.getTextContent();f===n?f===r?i.type==="element"&&a.type==="element"&&a.offset!==i.offset||(g=s<l?g.slice(s,l):g.slice(l,s)):g=o?g.slice(s):g.slice(l):f===r&&(g=o?g.slice(0,l):g.slice(0,s)),c+=g}else!Ae(f)&&!Aa(f)||f===r&&this.isCollapsed()||(c+=f.getTextContent())}return c}applyDOMRange(t){const n=Ue(),r=n.getEditorState()._selection,i=ob(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r);if(i===null)return;const[a,o]=i;this.anchor.set(a.key,a.offset,a.type,!0),this.focus.set(o.key,o.offset,o.type,!0),Ii(this)}clone(){const t=this.anchor,n=this.focus;return new qi(nr(t.key,t.offset,t.type),nr(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=yc(this.format,t,null),this.dirty=!0}setFormat(t){this.format=t,this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const n=Di[t];return(this.format&n)!==0}insertRawText(t){const n=t.split(/(\r?\n|\t)/),r=[],i=n.length;for(let a=0;a<i;a++){const o=n[a];o===`
258
+ `?i.push(Tr()):s===" "?i.push(Wa()):s!==""&&i.push(pt(s))}return{node:i}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let r=t,i=!0;for(;r!==null&&(r=mb(r,!1))!==null;){const a=r.textContent||"";if(a.length>0){/[ \t\n]$/.test(a)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=t,i=!0;for(;r!==null&&(r=mb(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:pt(n)}}function mb(e,t){let n=e;for(;;){let r;for(;(r=t?n.nextSibling:n.previousSibling)===null;){const a=n.parentElement;if(a===null)return null;n=a}if(n=r,ot(n)){const a=n.style.display;if(a===""&&!uh(n)||a!==""&&!a.startsWith("inline"))return null}let i=n;for(;(i=t?n.firstChild:n.lastChild)!==null;)n=i;if(Ar(n))return n;if(n.nodeName==="BR")return null}}const F$={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function $r(e){const t=F$[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:Df(e.style,t),node:null}}function pt(e=""){return jn(new Mr(e))}function fe(e){return e instanceof Mr}function Df(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),i=n==="700"||n==="bold",a=r.includes("line-through"),o=e.fontStyle==="italic",s=r.includes("underline"),l=e.verticalAlign;return c=>(fe(c)&&(i&&!c.hasFormat("bold")&&c.toggleFormat("bold"),a&&!c.hasFormat("strikethrough")&&c.toggleFormat("strikethrough"),o&&!c.hasFormat("italic")&&c.toggleFormat("italic"),s&&!c.hasFormat("underline")&&c.toggleFormat("underline"),l!=="sub"||c.hasFormat("subscript")||c.toggleFormat("subscript"),l!=="super"||c.hasFormat("superscript")||c.toggleFormat("superscript"),t&&!c.hasFormat(t)&&c.toggleFormat(t)),c)}class ja extends Mr{static getType(){return"tab"}static clone(t){return new ja(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const n=super.createDOM(t),r=Ga(t.theme,"tab");return r!==void 0&&n.classList.add(...r),n}static importJSON(t){return Wa().updateFromJSON(t)}setTextContent(t){return t!==" "&&t!==""&&c0(126),super.setTextContent(" ")}spliceText(t,n,r,i){return r===""&&n===0||r===" "&&n===1||se(286),this}setDetail(t){return t!==2&&se(127),this}setMode(t){return t!=="normal"&&se(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Wa(){return jn(new ja)}function wc(e){return e instanceof ja}class z${constructor(t,n,r){R(this,"key");R(this,"offset");R(this,"type");R(this,"_selection");this._selection=null,this.key=t,this.offset=n,this.type=r}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){return this.key===t.key?this.offset<t.offset:_1(on(cr(this,"next")),on(cr(t,"next")))<0}getNode(){const t=ft(this.key);return t===null&&se(20),t}set(t,n,r,i){const a=this._selection,o=this.key;i&&this.key===t&&this.offset===n&&this.type===r||(this.key=t,this.offset=n,this.type=r,is()||(ii()===o&&St(t),a!==null&&(a.setCachedNodes(null),a.dirty=!0)))}}function ir(e,t,n){return new z$(e,t,n)}function If(e,t){let n=t.__key,r=e.offset,i="element";if(fe(t)){i="text";const a=t.getTextContentSize();r>a&&(r=a)}else if(!Q(t)){const a=t.getNextSibling();if(fe(a))n=a.__key,r=0,i="text";else{const o=t.getParent();o&&(n=o.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function yb(e,t){if(Q(t)){const n=t.getLastDescendant();Q(n)||fe(n)?If(e,n):If(e,t)}else If(e,t)}class kc{constructor(t){R(this,"_nodes");R(this,"_cachedNodes");R(this,"dirty");this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!Mt(t))return!1;const n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new kc(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const n=this.getNodes(),r=n.length,i=n[r-1];let a;if(fe(i))a=i.select();else{const o=i.getIndexWithinParent()+1;a=i.getParentOrThrow().select(o,o)}a.insertNodes(t);for(let o=0;o<r;o++)n[o].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=this._nodes,r=[];for(const i of n){const a=ft(i);a!==null&&r.push(a)}return is()||(this._cachedNodes=r),r}getTextContent(){const t=this.getNodes();let n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}deleteNodes(){const t=this.getNodes();if((he()||Ua())===this&&t[0]){const n=ht(t[0],"next");gO(ai(n,n))}for(const n of t)n.remove()}}function ae(e){return e instanceof Gi}class Gi{constructor(t,n,r,i){R(this,"format");R(this,"style");R(this,"anchor");R(this,"focus");R(this,"_cachedNodes");R(this,"dirty");this.anchor=t,this.focus=n,t._selection=this,n._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!ae(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=function(r){const i=[],[a,o]=r.getTextSlices();a&&i.push(a.caret.origin);const s=new Set,l=new Set;for(const c of r)if(Wn(c)){const{origin:u}=c;i.length===0?s.add(u):(l.add(u),i.push(u))}else{const{origin:u}=c;Q(u)&&l.has(u)||i.push(u)}if(o&&i.push(o.caret.origin),Ja(r.focus)&&Q(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let c=mn(r.focus.origin,"previous");Wn(c)&&s.has(c.origin)&&!c.origin.isEmpty()&&c.origin.is(i[i.length-1]);c=ph(c))s.delete(c.origin),i.pop();for(;i.length>1;){const c=i[i.length-1];if(!Q(c)||l.has(c)||c.isEmpty()||s.has(c))break;i.pop()}if(i.length===0&&r.isCollapsed()){const c=on(r.anchor),u=on(r.anchor.getFlipped()),d=g=>sr(g)?g.origin:g.getNodeAtCaret(),f=d(c)||d(u)||(r.anchor.getNodeAtCaret()?c.origin:u.origin);i.push(f)}return i}(C1(S1(this),"next"));return is()||(this._cachedNodes=n),n}setTextNodeRange(t,n,r,i){this.anchor.set(t.__key,n,"text"),this.focus.set(r.__key,i,"text")}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const n=t[0],r=t[t.length-1],i=this.anchor,a=this.focus,o=i.isBefore(a),[s,l]=Ff(this);let c="",u=!0;for(let d=0;d<t.length;d++){const f=t[d];if(Q(f)&&!f.isInline())u||(c+=`
259
+ `),u=!f.isEmpty();else if(u=!1,fe(f)){let g=f.getTextContent();f===n?f===r?i.type==="element"&&a.type==="element"&&a.offset!==i.offset||(g=s<l?g.slice(s,l):g.slice(l,s)):g=o?g.slice(s):g.slice(l):f===r&&(g=o?g.slice(0,l):g.slice(0,s)),c+=g}else!Ie(f)&&!Ba(f)||f===r&&this.isCollapsed()||(c+=f.getTextContent())}return c}applyDOMRange(t){const n=Ke(),r=n.getEditorState()._selection,i=Nb(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r);if(i===null)return;const[a,o]=i;this.anchor.set(a.key,a.offset,a.type,!0),this.focus.set(o.key,o.offset,o.type,!0),ji(this)}clone(){const t=this.anchor,n=this.focus;return new Gi(ir(t.key,t.offset,t.type),ir(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=Mc(this.format,t,null),this.dirty=!0}setFormat(t){this.format=t,this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const n=Bi[t];return(this.format&n)!==0}insertRawText(t){const n=t.split(/(\r?\n|\t)/),r=[],i=n.length;for(let a=0;a<i;a++){const o=n[a];o===`
260
260
  `||o===`\r
261
- `?r.push(Er()):o===" "?r.push(Da()):r.push(dt(o))}this.insertNodes(r)}insertText(t){const n=this.anchor,r=this.focus,i=this.format,a=this.style;let o=n,s=r;!this.isCollapsed()&&r.isBefore(n)&&(o=r,s=n),o.type==="element"&&function(m,b,y,x){const k=m.getNode(),w=k.getChildAtIndex(m.offset),S=dt();if(S.setFormat(y),S.setStyle(x),Ff(w))w.splice(0,0,[S]);else{const N=st(k)?He().append(S):S;w===null?k.append(N):w.insertBefore(N)}m.is(b)&&b.set(S.__key,0,"text"),m.set(S.__key,0,"text")}(o,s,i,a),s.type==="element"&&ri(s,ln(sr(s,"next")));const l=o.offset;let c=s.offset;const u=this.getNodes(),d=u.length;let f=u[0];ce(f)||oe(26);const g=f.getTextContent().length,p=f.getParentOrThrow();let v=u[d-1];if(d===1&&s.type==="element"&&(c=g,s.set(o.key,c,"text")),this.isCollapsed()&&l===g&&(Or(f)||!f.canInsertTextAfter()||!p.canInsertTextAfter()&&f.getNextSibling()===null)){let m=f.getNextSibling();if(ce(m)&&m.canInsertTextBefore()&&!Or(m)||(m=dt(),m.setFormat(i),m.setStyle(a),p.canInsertTextAfter()?f.insertAfter(m):p.insertAfter(m)),m.select(0,0),f=m,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&l===0&&(Or(f)||!f.canInsertTextBefore()||!p.canInsertTextBefore()&&f.getPreviousSibling()===null)){let m=f.getPreviousSibling();if(ce(m)&&!Or(m)||(m=dt(),m.setFormat(i),p.canInsertTextBefore()?f.insertBefore(m):p.insertBefore(m)),m.select(),f=m,t!=="")return void this.insertText(t)}else if(f.isSegmented()&&l!==g){const m=dt(f.getTextContent());m.setFormat(i),f.replace(m),f=m}else if(!this.isCollapsed()&&t!==""){const m=v.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||X(m)&&(!m.canInsertTextBefore()||!m.canInsertTextAfter()))return this.insertText(""),ab(this.anchor,this.focus),void this.insertText(t)}if(d===1){if(Vi(f)){const x=dt(t);return x.select(),void f.replace(x)}const m=f.getFormat(),b=f.getStyle();if(l!==c||m===i&&b===a){if(dc(f)){const x=dt(t);return x.setFormat(i),x.setStyle(a),x.select(),void f.replace(x)}}else{if(f.getTextContent()!==""){const x=dt(t);if(x.setFormat(i),x.setStyle(a),x.select(),l===0)f.insertBefore(x,!1);else{const[k]=f.splitText(l);k.insertAfter(x,!1)}return void(x.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length))}f.setFormat(i),f.setStyle(a)}const y=c-l;f=f.spliceText(l,y,t,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(this.format=m,this.style=b,f.isComposing()&&(this.anchor.offset-=t.length))}else{const m=new Set([...f.getParentKeys(),...v.getParentKeys()]),b=X(f)?f:f.getParentOrThrow();let y=X(v)?v:v.getParentOrThrow(),x=v;if(!b.is(y)&&y.isInline())do x=y,y=y.getParentOrThrow();while(y.isInline());if(s.type==="text"&&(c!==0||v.getTextContent()==="")||s.type==="element"&&v.getIndexWithinParent()<c)if(ce(v)&&!Vi(v)&&c!==v.getTextContentSize()){if(v.isSegmented()){const C=dt(v.getTextContent());v.replace(C),v=C}st(s.getNode())||s.type!=="text"||(v=v.spliceText(0,c,"")),m.add(v.__key)}else{const C=v.getParentOrThrow();C.canBeEmpty()||C.getChildrenSize()!==1?v.remove():C.remove()}else m.add(v.__key);const k=y.getChildren(),w=new Set(u),S=b.is(y),N=b.isInline()&&f.getNextSibling()===null?b:f;for(let C=k.length-1;C>=0;C--){const E=k[C];if(E.is(f)||X(E)&&E.isParentOf(f))break;E.isAttached()&&(!w.has(E)||E.is(x)?S||N.insertAfter(E,!1):E.remove())}if(!S){let C=y,E=null;for(;C!==null;){const T=C.getChildren(),O=T.length;(O===0||T[O-1].is(E))&&(m.delete(C.__key),E=C),C=C.getParent()}}if(Vi(f))if(l===g)f.select();else{const C=dt(t);C.select(),f.replace(C)}else f=f.spliceText(l,g-l,t,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(this.format=f.getFormat(),this.style=f.getStyle(),f.isComposing()&&(this.anchor.offset-=t.length));for(let C=1;C<d;C++){const E=u[C],T=E.__key;m.has(T)||E.remove()}}}removeText(){const t=ue()===this;Ec(this,nO(ax(this))),t&&ue()!==this&&$t(this)}formatText(t,n=null){if(this.isCollapsed())return this.toggleFormat(t),void wt(null);const r=this.getNodes(),i=[];for(const k of r)ce(k)&&i.push(k);const a=k=>{r.forEach(w=>{if(X(w)){const S=w.getFormatFlags(t,k);w.setTextFormat(S)}})},o=i.length;if(o===0)return this.toggleFormat(t),wt(null),void a(n);const s=this.anchor,l=this.focus,c=this.isBackward(),u=c?l:s,d=c?s:l;let f=0,g=i[0],p=u.type==="element"?0:u.offset;if(u.type==="text"&&p===g.getTextContentSize()&&(f=1,g=i[1],p=0),g==null)return;const v=g.getFormatFlags(t,n);a(v);const m=o-1;let b=i[m];const y=d.type==="text"?d.offset:b.getTextContentSize();if(g.is(b)){if(p===y)return;if(Or(g)||p===0&&y===g.getTextContentSize())g.setFormat(v);else{const k=g.splitText(p,y),w=p===0?k[0]:k[1];w.setFormat(v),u.type==="text"&&u.set(w.__key,0,"text"),d.type==="text"&&d.set(w.__key,y-p,"text")}return void(this.format=v)}p===0||Or(g)||([,g]=g.splitText(p),p=0),g.setFormat(v);const x=b.getFormatFlags(t,v);y>0&&(y===b.getTextContentSize()||Or(b)||([b]=b.splitText(y)),b.setFormat(x));for(let k=f+1;k<m;k++){const w=i[k],S=w.getFormatFlags(t,x);w.setFormat(S)}u.type==="text"&&u.set(g.__key,p,"text"),d.type==="text"&&d.set(b.__key,y,"text"),this.format=v|x}insertNodes(t){if(t.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const p=ue();return re(p)||oe(134),p.insertNodes(t)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),r=kt(n,vn),i=t[t.length-1];if(X(r)&&"__language"in r){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const p=Pf(this);r.splice(p,0,t),i.selectEnd()}return}if(!t.some(p=>(X(p)||Ae(p))&&!p.isInline())){X(r)||oe(211,n.constructor.name,n.getType());const p=Pf(this);return r.splice(p,0,t),void i.selectEnd()}const a=function(p){const v=He();let m=null;for(let b=0;b<p.length;b++){const y=p[b],x=Aa(y);if(x||Ae(y)&&y.isInline()||X(y)&&y.isInline()||ce(y)||y.isParentRequired()){if(m===null&&(m=y.createParentElementNode(),v.append(m),x))continue;m!==null&&m.append(y)}else v.append(y),m=null}return v}(t),o=a.getLastDescendant(),s=a.getChildren(),l=!X(r)||!r.isEmpty()?this.insertParagraph():null,c=s[s.length-1];let u=s[0];var d;X(d=u)&&vn(d)&&!d.isEmpty()&&X(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(X(r)||oe(211,n.constructor.name,n.getType()),r.append(...u.getChildren()),u=s[1]),u&&(r===null&&oe(212,n.constructor.name,n.getType()),function(p,v){const m=v.getParentOrThrow().getLastChild();let b=v;const y=[v];for(;b!==m;)b.getNextSibling()||oe(140),b=b.getNextSibling(),y.push(b);let x=p;for(const k of y)x=x.insertAfter(k)}(r,u));const f=kt(o,vn);l&&X(f)&&(l.canMergeWhenEmpty()||vn(c))&&(f.append(...l.getChildren()),l.remove()),X(r)&&r.isEmpty()&&r.remove(),o.selectEnd();const g=X(r)?r.getLastChild():null;Aa(g)&&f!==r&&g.remove()}insertParagraph(){if(this.anchor.key==="root"){const o=He();return Ze().splice(this.anchor.offset,0,[o]),o.select(),o}const t=Pf(this),n=kt(this.anchor.getNode(),vn);X(n)||oe(213);const r=n.getChildAtIndex(t),i=r?[r,...r.getNextSiblings()]:[],a=n.insertNewAfter(this,!1);return a?(a.append(...i),a.selectStart(),a):null}insertLineBreak(t){const n=Er();if(this.insertNodes([n]),t){const r=n.getParentOrThrow(),i=n.getIndexWithinParent();r.select(i,i)}}extract(){const t=[...this.getNodes()],n=t.length;let r=t[0],i=t[n-1];const[a,o]=Tf(this),s=this.isBackward(),[l,c]=s?[this.focus,this.anchor]:[this.anchor,this.focus],[u,d]=s?[o,a]:[a,o];if(n===0)return[];if(n===1){if(ce(r)&&!this.isCollapsed()){const f=r.splitText(u,d),g=u===0?f[0]:f[1];return g?(l.set(g.getKey(),0,"text"),c.set(g.getKey(),g.getTextContentSize(),"text"),[g]):[]}return[r]}if(ce(r)&&(u===r.getTextContentSize()?t.shift():u!==0&&([,r]=r.splitText(u),t[0]=r,l.set(r.getKey(),0,"text"))),ce(i)){const f=i.getTextContent().length;d===0?t.pop():d!==f&&([i]=i.splitText(d),t[t.length-1]=i,c.set(i.getKey(),i.getTextContentSize(),"text"))}return t}modify(t,n,r){if(hb(this,t,n,r))return;const i=t==="move",a=Ue(),o=gn(sn(a));if(!o)return;const s=a._blockCursorElement,l=a._rootElement,c=this.focus.getNode();if(l===null||s===null||!X(c)||c.isInline()||c.canBeEmpty()||Rf(s,a,l),this.dirty){let u=Ha(a,this.anchor.key),d=Ha(a,this.focus.key);this.anchor.type==="text"&&(u=Ba(u)),this.focus.type==="text"&&(d=Ba(d)),u&&d&&db(o,u,this.anchor.offset,d,this.focus.offset)}if(function(u,d,f,g){u.modify(d,f,g)}(o,t,n?"backward":"forward",r),o.rangeCount>0){const u=o.getRangeAt(0),d=this.anchor.getNode(),f=st(d)?d:j$(d);if(this.applyDOMRange(u),this.dirty=!0,!i){const g=this.getNodes(),p=[];let v=!1;for(let m=0;m<g.length;m++){const b=g[m];Xf(b,f)?p.push(b):v=!0}if(v&&p.length>0)if(n){const m=p[0];X(m)?m.selectStart():m.getParentOrThrow().selectStart()}else{const m=p[p.length-1];X(m)?m.selectEnd():m.getParentOrThrow().selectEnd()}o.anchorNode===u.startContainer&&o.anchorOffset===u.startOffset||function(m){const b=m.focus,y=m.anchor,x=y.key,k=y.offset,w=y.type;y.set(b.key,b.offset,b.type,!0),b.set(x,k,w,!0)}(this)}}r==="lineboundary"&&hb(this,t,n,r,"decorators")}forwardDeletion(t,n,r){if(!r&&(t.type==="element"&&X(n)&&t.offset===n.getChildrenSize()||t.type==="text"&&t.offset===n.getTextContentSize())){const i=n.getParent(),a=n.getNextSibling()||(i===null?null:i.getNextSibling());if(X(a)&&a.isShadowRoot())return!0}return!1}deleteCharacter(t){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,t))return;const a=sh(sr(r,t?"previous":"next"));if(a.getTextSlices().every(s=>s===null||s.distance===0)){let s={type:"initial"};for(const l of a.iterNodeCarets("shadowRoot"))if(zn(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(s.type==="merge-block")break;if(X(a.anchor.origin)&&a.anchor.origin.isEmpty()){const c=ln(l);Ec(this,ni(c,c)),a.anchor.origin.remove()}return}s.type!=="merge-next-block"&&s.type!=="merge-block"||(s={block:s.block,caret:l,type:"merge-block"})}}else{if(s.type==="merge-block")break;if(Ka(l)){if(X(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(a.anchor.origin))break}else s={block:l.origin,type:"merge-next-block"};continue}if(Ae(l.origin)){if(!l.origin.isIsolated())if(s.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&X(a.anchor.origin)&&a.anchor.origin.isEmpty()){a.anchor.origin.remove();const c=lb();c.add(l.origin.getKey()),$t(c)}else l.origin.remove();return}break}}if(s.type==="merge-block"){const{caret:l,block:c}=s;return Ec(this,ni(!l.origin.isEmpty()&&c.isEmpty()?Va(ct(c,l.direction)):a.anchor,l)),this.removeText()}}const o=this.focus;if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&tb(this,r.getNode()))return}else{const s=o.type==="text"?o.getNode():null;if(i=r.type==="text"?r.getNode():null,s!==null&&s.isSegmented()){const l=o.offset,c=s.getTextContentSize();if(s.is(i)||t&&l!==c||!t&&l!==0)return void nb(s,t,l)}else if(i!==null&&i.isSegmented()){const l=r.offset,c=i.getTextContentSize();if(i.is(s)||t&&l!==0||!t&&l!==c)return void nb(i,t,l)}(function(l,c){const u=l.anchor,d=l.focus,f=u.getNode(),g=d.getNode();if(f===g&&u.type==="text"&&d.type==="text"){const p=u.offset,v=d.offset,m=p<v,b=m?p:v,y=m?v:p,x=y-1;b!==x&&function(k){return!(Bb(k)||N$(k))}(f.getTextContent().slice(b,y))&&(c?d.set(d.key,x,d.type):u.set(u.key,x,u.type))}})(this,t)}}if(this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&st(r.getParent())&&r.getPreviousSibling()===null&&tb(this,r)}}deleteLine(t){this.isCollapsed()&&this.modify("extend",t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):this.removeText()}deleteWord(t){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,t))return;this.modify("extend",t,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function Mt(e){return e instanceof fc}function eb(e){const t=e.offset;if(e.type==="text")return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Tf(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[n,r]=t;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[eb(n),eb(r)]}function tb(e,t){for(let n=t;n;n=n.getParent()){if(X(n)){if(n.collapseAtStart(e))return!0;if(Xt(n))break}if(n.getPreviousSibling())break}return!1}const N$=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function nb(e,t,n){const r=e,i=r.getTextContent().split(/(?=\s)/g),a=i.length;let o=0,s=0;for(let c=0;c<a;c++){const u=c===a-1;if(s=o,o+=i[c].length,t&&o===n||o>n||u){i.splice(c,1),u&&(s=void 0);break}}const l=i.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(s,s))}function rb(e,t,n,r){let i,a=t;if(it(e)){let o=!1;const s=e.childNodes,l=s.length,c=r._blockCursorElement;a===l&&(o=!0,a=l-1);let u=s[a],d=!1;if(u===c)u=s[a+1],d=!0;else if(c!==null){const f=c.parentNode;e===f&&t>Array.prototype.indexOf.call(f.children,c)&&a--}if(i=Wa(u),ce(i))a=or(i,o?"next":"previous");else{let f=Wa(e);if(f===null)return null;if(X(f)){const g=r.getElementByKey(f.getKey());g===null&&oe(214),[f,a]=f.getDOMSlot(g).resolveChildIndex(f,g,e,t),X(f)||oe(215),o&&a>=f.getChildrenSize()&&(a=Math.max(0,f.getChildrenSize()-1));let v=f.getChildAtIndex(a);if(X(v)&&function(m,b,y){const x=m.getParent();return y===null||x===null||!x.canBeEmpty()||x!==y.getNode()}(v,0,n)){const m=o?v.getLastDescendant():v.getFirstDescendant();m===null?f=v:(v=m,f=X(v)?v:v.getParentOrThrow()),a=0}ce(v)?(i=v,f=null,a=or(v,o?"next":"previous")):v!==f&&o&&!d&&(X(f)||oe(216),a=Math.min(f.getChildrenSize(),a+1))}else{const g=f.getIndexWithinParent();a=t===0&&Ae(f)&&Wa(e)===f?g:g+1,f=f.getParentOrThrow()}if(X(f))return nr(f.__key,a,"element")}}else i=Wa(e);return ce(i)?nr(i.__key,or(i,a,"clamp"),"text"):null}function ib(e,t,n){const r=e.offset,i=e.getNode();if(r===0){const a=i.getPreviousSibling(),o=i.getParent();if(t){if((n||!t)&&a===null&&X(o)&&o.isInline()){const s=o.getPreviousSibling();ce(s)&&e.set(s.__key,s.getTextContent().length,"text")}}else X(a)&&!n&&a.isInline()?e.set(a.__key,a.getChildrenSize(),"element"):ce(a)&&e.set(a.__key,a.getTextContent().length,"text")}else if(r===i.getTextContent().length){const a=i.getNextSibling(),o=i.getParent();if(t&&X(a)&&a.isInline())e.set(a.__key,0,"element");else if((n||t)&&a===null&&X(o)&&o.isInline()&&!o.canInsertTextAfter()){const s=o.getNextSibling();ce(s)&&e.set(s.__key,0,"text")}}}function ab(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),i=e.is(t);ib(e,r,i),ib(t,!r,i),i&&t.set(e.key,e.offset,e.type)}}function ob(e,t,n,r,i,a){if(e===null||n===null||!ts(i,e,n))return null;const o=rb(e,t,re(a)?a.anchor:null,i);if(o===null)return null;const s=rb(n,r,re(a)?a.focus:null,i);if(s===null)return null;if(o.type==="element"&&s.type==="element"){const l=Wa(e),c=Wa(n);if(Ae(l)&&Ae(c))return null}return ab(o,s),[o,s]}function Mf(e){return X(e)&&!e.isInline()}function sb(e,t,n,r,i,a){const o=ei(),s=new qi(nr(e,t,i),nr(n,r,a),0,"");return s.dirty=!0,o._selection=s,s}function $f(){const e=nr("root",0,"element"),t=nr("root",0,"element");return new qi(e,t,0,"")}function lb(){return new fc(new Set)}function Of(e,t,n,r){const i=n._window;if(i===null)return null;const a=r||i.event,o=a?a.type:void 0,s=o==="selectionchange",l=!nf&&(s||o==="beforeinput"||o==="compositionstart"||o==="compositionend"||o==="click"&&a&&a.detail===3||o==="drop"||o===void 0);let c,u,d,f;if(re(e)&&!l)return e.clone();if(t===null)return null;if(c=t.anchorNode,u=t.focusNode,d=t.anchorOffset,f=t.focusOffset,(s||o===void 0)&&re(e)&&!ts(n,c,u))return e.clone();const g=ob(c,d,u,f,n,e);if(g===null)return null;const[p,v]=g;let m=0,b="";if(re(e)){const y=e.anchor;if(p.key===y.key)m=e.format,b=e.style;else{const x=p.getNode();ce(x)?(m=x.getFormat(),b=x.getStyle()):X(x)&&(m=x.getTextFormat(),b=x.getTextStyle())}}return new qi(p,v,m,b)}function ue(){return ei()._selection}function Ia(){return Ue()._editorState._selection}function hc(e,t,n,r=1){const i=e.anchor,a=e.focus,o=i.getNode(),s=a.getNode();if(!t.is(o)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const c=i.offset;if(n<=c&&r>0||n<c&&r<0){const u=Math.max(0,c+r);i.set(l,u,"element"),a.set(l,u,"element"),cb(e)}}else{const c=e.isBackward(),u=c?a:i,d=u.getNode(),f=c?i:a,g=f.getNode();if(t.is(d)){const p=u.offset;(n<=p&&r>0||n<p&&r<0)&&u.set(l,Math.max(0,p+r),"element")}if(t.is(g)){const p=f.offset;(n<=p&&r>0||n<p&&r<0)&&f.set(l,Math.max(0,p+r),"element")}}cb(e)}function cb(e){const t=e.anchor,n=t.offset,r=e.focus,i=r.offset,a=t.getNode(),o=r.getNode();if(e.isCollapsed()){if(!X(a))return;const s=a.getChildrenSize(),l=n>=s,c=l?a.getChildAtIndex(s-1):a.getChildAtIndex(n);if(ce(c)){let u=0;l&&(u=c.getTextContentSize()),t.set(c.__key,u,"text"),r.set(c.__key,u,"text")}return}if(X(a)){const s=a.getChildrenSize(),l=n>=s,c=l?a.getChildAtIndex(s-1):a.getChildAtIndex(n);if(ce(c)){let u=0;l&&(u=c.getTextContentSize()),t.set(c.__key,u,"text")}}if(X(o)){const s=o.getChildrenSize(),l=i>=s,c=l?o.getChildAtIndex(s-1):o.getChildAtIndex(i);if(ce(c)){let u=0;l&&(u=c.getTextContentSize()),r.set(c.__key,u,"text")}}}function pc(e,t,n,r,i){let a=null,o=0,s=null;r!==null?(a=r.__key,ce(r)?(o=r.getTextContentSize(),s="text"):X(r)&&(o=r.getChildrenSize(),s="element")):i!==null&&(a=i.__key,ce(i)?s="text":X(i)&&(s="element")),a!==null&&s!==null?e.set(a,o,s):(o=t.getIndexWithinParent(),o===-1&&(o=n.getChildrenSize()),e.set(n.__key,o,"element"))}function ub(e,t,n,r,i){e.type==="text"?e.set(n,e.offset+(t?0:i),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function db(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}function fb(e,t,n){const r=Ha(e,t.getKey());if(X(t)){const i=t.getDOMSlot(r);return[i.element,n+i.getFirstChildOffset()]}return[r,n]}function C$(e,t,n,r,i,a,o){const s=r.anchorNode,l=r.focusNode,c=r.anchorOffset,u=r.focusOffset,d=document.activeElement;if(i.has(g$)&&d!==a||d!==null&&Wf(d))return;if(!re(t))return void(e!==null&&ts(n,s,l)&&r.removeAllRanges());const f=t.anchor,g=t.focus,p=f.getNode(),v=g.getNode(),[m,b]=fb(n,p,f.offset),[y,x]=fb(n,v,g.offset),k=t.format,w=t.style,S=t.isCollapsed();let N=m,C=y,E=!1;var T,O,P,M,$;if(f.type==="text"?(N=Ba(m),E=p.getFormat()!==k||p.getStyle()!==w):re(e)&&e.anchor.type==="text"&&(E=!0),g.type==="text"&&(C=Ba(y)),N!==null&&C!==null&&(S&&(e===null||E||re(e)&&(e.format!==k||e.style!==w))&&(T=k,O=w,P=b,M=f.key,$=performance.now(),L0=[T,O,P,M,$]),c!==b||u!==x||s!==N||l!==C||r.type==="Range"&&S||(d!==null&&a.contains(d)||i.has(K0)||a.focus({preventScroll:!0}),f.type==="element"))){if(db(r,N,b,C,x),!Rr||!t.isCollapsed()||a===null||i.has(K0)||document.activeElement!==null&&a.contains(document.activeElement)||a.focus({preventScroll:!0}),!i.has(v$)&&t.isCollapsed()&&a!==null&&a===document.activeElement){const L=re(t)&&t.anchor.type==="element"?N.childNodes[b]||null:r.rangeCount>0?r.getRangeAt(0):null;if(L!==null){let z;if(L instanceof Text){const j=document.createRange();j.selectNode(L),z=j.getBoundingClientRect()}else z=L.getBoundingClientRect();(function(j,B,H){const F=Gb(H),D=Zf(F);if(F===null||D===null)return;let{top:U,bottom:V}=B,Y=0,G=0,R=H;for(;R!==null;){const te=R===F.body;if(te)Y=0,G=sn(j).innerHeight;else{const W=R.getBoundingClientRect();Y=W.top,G=W.bottom}let le=0;if(U<Y?le=-(Y-U):V>G&&(le=V-G),le!==0)if(te)D.scrollBy(0,le);else{const W=R.scrollTop;R.scrollTop+=le;const Z=R.scrollTop-W;U-=Z,V-=Z}if(te)break;R=ns(R)}})(n,z,a)}}xf=!0}}function E$(e){let t=ue()||Ia();t===null&&(t=Ze().selectEnd()),t.insertNodes(e)}function Pf(e){let t=e;e.isCollapsed()||t.removeText();const n=ue();re(n)&&(t=n),re(t)||oe(161);const r=t.anchor;let i=r.getNode(),a=r.offset;for(;!vn(i);){const o=i;if([i,a]=T$(i,a),o.is(i))break}return a}function T$(e,t){const n=e.getParent();if(!n){const i=He();return Ze().append(i),i.select(),[Ze(),0]}if(ce(e)){const i=e.splitText(t);if(i.length===0)return[n,e.getIndexWithinParent()];const a=t===0?0:1;return[n,i[0].getIndexWithinParent()+a]}if(!X(e)||t===0)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const i=new qi(nr(e.__key,t,"element"),nr(e.__key,t,"element"),0,""),a=e.insertNewAfter(i);a&&a.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}function hb(e,t,n,r,i="decorators-and-blocks"){if(t==="move"&&r==="character"&&!e.isCollapsed()){const[u,d]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return d.set(u.key,u.offset,u.type),!0}const a=sr(e.focus,n?"previous":"next"),o=r==="lineboundary",s=t==="move";let l=a,c=i==="decorators-and-blocks";if(!sx(l)){for(const u of l){c=!1;const{origin:d}=u;if(!Ae(d)||d.isIsolated()||(l=u,!o||!d.isInline()))break}if(c)for(const u of sh(a).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(zn(u))u.origin.isInline()||(l=u);else{if(X(u.origin))continue;Ae(u.origin)&&!u.origin.isInline()&&(l=u)}break}}if(l===a)return!1;if(s&&!o&&Ae(l.origin)&&l.origin.isKeyboardSelectable()){const u=lb();return u.add(l.origin.getKey()),$t(u),!0}return l=ln(l),s&&ri(e.anchor,l),ri(e.focus,l),c||!o}let ft=null,ht=null,Gt=!1,Af=!1,gc=0;const pb={characterData:!0,childList:!0,subtree:!0};function Jo(){return Gt||ft!==null&&ft._readOnly}function _t(){Gt&&oe(13)}function gb(){gc>99&&oe(14)}function ei(){return ft===null&&oe(195,vb()),ft}function Ue(){return ht===null&&oe(196,vb()),ht}function vb(){let e=0;const t=new Set,n=Ki.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const a=mc(i);if(Uf(a))e++;else if(a){let o=String(a.constructor.version||"<0.17.1");o===n&&(o+=" (separately built, likely a bundler configuration issue)"),t.add(o)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function M$(){return ht}function mb(e,t,n){const r=t.__type,i=Mb(e,r);let a=n.get(r);a===void 0&&(a=Array.from(i.transforms),n.set(r,a));const o=a.length;for(let s=0;s<o&&(a[s](t),t.isAttached());s++);}function yb(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function bb(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const i of r)n.add(i)}function $$(e){return Lf(e,Ue()._nodes)}function Lf(e,t){const n=e.type,r=t.get(n);r===void 0&&oe(17,n);const i=r.klass;e.type!==i.getType()&&oe(18,i.name);const a=i.importJSON(e),o=e.children;if(X(a)&&Array.isArray(o))for(let s=0;s<o.length;s++){const l=Lf(o[s],t);a.append(l)}return a}function xb(e,t,n){const r=ft,i=Gt,a=ht;ft=t,Gt=!0,ht=e;try{return n()}finally{ft=r,Gt=i,ht=a}}function $r(e,t){const n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return;const a=e._editorState,o=a._selection,s=n._selection,l=e._dirtyType!==0,c=ft,u=Gt,d=ht,f=e._updating,g=e._observer;let p=null;if(e._pendingEditorState=null,e._editorState=n,!i&&l&&g!==null){ht=e,ft=n,Gt=!1,e._updating=!0;try{const S=e._dirtyType,N=e._dirtyElements,C=e._dirtyLeaves;g.disconnect(),p=X2(a,n,e,S,N,C)}catch(S){if(S instanceof Error&&e._onError(S),Af)throw S;return Eb(e,null,r,n),Jy(e),e._dirtyType=2,Af=!0,$r(e,a),void(Af=!1)}finally{g.observe(r,pb),e._updating=f,ft=c,Gt=u,ht=d}}n._readOnly||(n._readOnly=!0);const v=e._dirtyLeaves,m=e._dirtyElements,b=e._normalizedNodes,y=e._updateTags,x=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(S,N){const C=S._decorators;let E=S._pendingDecorators||C;const T=N._nodeMap;let O;for(O in E)T.has(O)||(E===C&&(E=Ib(S)),delete E[O])}(e,n);const k=i?null:gn(sn(e));if(e._editable&&k!==null&&(l||s===null||s.dirty||!s.is(o))&&r!==null&&!y.has(m$)){ht=e,ft=n;try{if(g!==null&&g.disconnect(),l||s===null||s.dirty){const S=e._blockCursorElement;S!==null&&Rf(S,e,r),C$(o,s,e,k,y,r)}(function(S,N,C){let E=S._blockCursorElement;if(re(C)&&C.isCollapsed()&&C.anchor.type==="element"&&N.contains(document.activeElement)){const T=C.anchor,O=T.getNode(),P=T.offset;let M=!1,$=null;if(P===O.getChildrenSize())Qf(O.getChildAtIndex(P-1))&&(M=!0);else{const L=O.getChildAtIndex(P);if(L!==null&&Qf(L)){const z=L.getPreviousSibling();(z===null||Qf(z))&&(M=!0,$=S.getElementByKey(L.__key))}}if(M){const L=S.getElementByKey(O.__key);return E===null&&(S._blockCursorElement=E=function(z){const j=z.theme,B=document.createElement("div");B.contentEditable="false",B.setAttribute("data-lexical-cursor","true");let H=j.blockCursor;if(H!==void 0){if(typeof H=="string"){const F=ii(H);H=j.blockCursor=F}H!==void 0&&B.classList.add(...H)}return B}(S._config)),N.style.caretColor="transparent",void($===null?L.appendChild(E):L.insertBefore(E,$))}}E!==null&&Rf(E,S,N)})(e,r,s)}finally{g!==null&&g.observe(r,pb),ht=d,ft=c}}p!==null&&function(S,N,C,E,T){const O=Array.from(S._listeners.mutation),P=O.length;for(let M=0;M<P;M++){const[$,L]=O[M];for(const z of L){const j=N.get(z);j!==void 0&&$(j,{dirtyLeaves:E,prevEditorState:T,updateTags:C})}}}(e,p,y,v,a),re(s)||s===null||o!==null&&o.is(s)||e.dispatchCommand(pf,void 0);const w=e._pendingDecorators;w!==null&&(e._decorators=w,e._pendingDecorators=null,Qo("decorator",e,!0,w)),function(S,N,C){const E=Fb(N),T=Fb(C);E!==T&&Qo("textcontent",S,!0,T)}(e,t||a,n),Qo("update",e,!0,{dirtyElements:m,dirtyLeaves:v,editorState:n,mutatedNodes:p,normalizedNodes:b,prevEditorState:t||a,tags:y}),function(S,N){if(S._deferred=[],N.length!==0){const C=S._updating;S._updating=!0;try{for(let E=0;E<N.length;E++)N[E]()}finally{S._updating=C}}}(e,x),function(S){const N=S._updates;if(N.length!==0){const C=N.shift();if(C){const[E,T]=C;vc(S,E,T)}}}(e)}function Qo(e,t,n,...r){const i=t._updating;t._updating=n;try{const a=Array.from(t._listeners[e]);for(let o=0;o<a.length;o++)a[o].apply(null,r)}finally{t._updating=i}}function _b(e,t){const n=e._updates;let r=t||!1;for(;n.length!==0;){const i=n.shift();if(i){const[a,o]=i,s=e._pendingEditorState;let l;o!==void 0&&(l=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete&&(s===null&&oe(191),s._flushSync=!0),l&&e._deferred.push(l),bb(e,o.tag)),s==null?vc(e,a,o):a()}}return r}function vc(e,t,n){const r=e._updateTags;let i,a=!1,o=!1;n!==void 0&&(i=n.onUpdate,bb(e,n.tag),a=n.skipTransforms||!1,o=n.discrete||!1),i&&e._deferred.push(i);const s=e._editorState;let l=e._pendingEditorState,c=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=Nb(l||s),c=!0),l._flushSync=o;const u=ft,d=Gt,f=ht,g=e._updating;ft=l,Gt=!1,e._updating=!0,ht=e;const p=e._headless||e.getRootElement()===null;Bf(null);try{c&&(p?s._selection!==null&&(l._selection=s._selection.clone()):l._selection=function(y,x){const k=y.getEditorState()._selection,w=gn(sn(y));return re(k)||k==null?Of(k,w,y,x):k.clone()}(e,n&&n.event||null));const m=e._compositionKey;t(),a=_b(e,a),function(y,x){const k=x.getEditorState()._selection,w=y._selection;if(re(w)){const S=w.anchor,N=w.focus;let C;if(S.type==="text"&&(C=S.getNode(),C.selectionTransform(k,w)),N.type==="text"){const E=N.getNode();C!==E&&E.selectionTransform(k,w)}}}(l,e),e._dirtyType!==0&&(a?function(y,x){const k=x._dirtyLeaves,w=y._nodeMap;for(const S of k){const N=w.get(S);ce(N)&&N.isAttached()&&N.isSimpleText()&&!N.isUnmergeable()&&a0(N)}}(l,e):function(y,x){const k=x._dirtyLeaves,w=x._dirtyElements,S=y._nodeMap,N=ti(),C=new Map;let E=k,T=E.size,O=w,P=O.size;for(;T>0||P>0;){if(T>0){x._dirtyLeaves=new Set;for(const M of E){const $=S.get(M);ce($)&&$.isAttached()&&$.isSimpleText()&&!$.isUnmergeable()&&a0($),$!==void 0&&yb($,N)&&mb(x,$,C),k.add(M)}if(E=x._dirtyLeaves,T=E.size,T>0){gc++;continue}}x._dirtyLeaves=new Set,x._dirtyElements=new Map,O.delete("root")&&O.set("root",!0);for(const M of O){const $=M[0],L=M[1];if(w.set($,L),!L)continue;const z=S.get($);z!==void 0&&yb(z,N)&&mb(x,z,C)}E=x._dirtyLeaves,T=E.size,O=x._dirtyElements,P=O.size,gc++}x._dirtyLeaves=k,x._dirtyElements=w}(l,e),_b(e),function(y,x,k,w){const S=y._nodeMap,N=x._nodeMap,C=[];for(const[E]of w){const T=N.get(E);T!==void 0&&(T.isAttached()||(X(T)&&Gy(T,E,S,N,C,w),S.has(E)||w.delete(E),C.push(E)))}for(const E of C)N.delete(E);for(const E of k){const T=N.get(E);T===void 0||T.isAttached()||(S.has(E)||k.delete(E),N.delete(E))}}(s,l,e._dirtyLeaves,e._dirtyElements)),m!==e._compositionKey&&(l._flushSync=!0);const b=l._selection;if(re(b)){const y=l._nodeMap,x=b.anchor.key,k=b.focus.key;y.get(x)!==void 0&&y.get(k)!==void 0||oe(19)}else Mt(b)&&b._nodes.size===0&&(l._selection=null)}catch(m){return m instanceof Error&&e._onError(m),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void $r(e)}finally{ft=u,Gt=d,ht=f,e._updating=g,gc=0}e._dirtyType!==0||e._deferred.length>0||function(m,b){const y=b.getEditorState()._selection,x=m._selection;if(x!==null){if(x.dirty||!x.is(y))return!0}else if(y!==null)return!0;return!1}(l,e)?l._flushSync?(l._flushSync=!1,$r(e)):c&&I$(()=>{$r(e)}):(l._flushSync=!1,c&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function rr(e,t,n){ht===e&&n===void 0?t():vc(e,t,n)}class Ro{constructor(t,n,r){J(this,"element");J(this,"before");J(this,"after");this.element=t,this.before=n||null,this.after=r||null}withBefore(t){return new Ro(this.element,t,this.after)}withAfter(t){return new Ro(this.element,this.before,t)}withElement(t){return this.element===t?this:new Ro(t,this.before,this.after)}insertChild(t){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&oe(222),this.element.insertBefore(t,n),this}removeChild(t){return t.parentElement!==this.element&&oe(223),this.element.removeChild(t),this}replaceChild(t,n){return n.parentElement!==this.element&&oe(224),this.element.replaceChild(t,n),this}getFirstChild(){const t=this.after?this.after.nextSibling:this.element.firstChild;return t===this.before||t===this.getManagedLineBreak()?null:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(t===null)this.removeManagedLineBreak();else{const n=t==="decorator"&&(ql||Bo||Hl);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const n=this.element,r=t.nodeName==="IMG"?t.nextSibling:null;r&&n.removeChild(r),n.removeChild(t),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const n=this.getManagedLineBreak();if(n){if(t===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,a=document.createElement("br");if(r.insertBefore(a,i),t){const o=document.createElement("img");o.setAttribute("data-lexical-linebreak","true"),o.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",o.alt="",r.insertBefore(o,a),r.__lexicalLineBreak=o}else r.__lexicalLineBreak=a}getFirstChildOffset(){let t=0;for(let n=this.after;n!==null;n=n.previousSibling)t++;return t}resolveChildIndex(t,n,r,i){if(r===this.element){const l=this.getFirstChildOffset();return[t,Math.min(l+t.getChildrenSize(),Math.max(l,i))]}const a=wb(n,r);a.push(i);const o=wb(n,this.element);let s=t.getIndexWithinParent();for(let l=0;l<o.length;l++){const c=a[l],u=o[l];if(c===void 0||c<u)break;if(c>u){s+=1;break}}return[t.getParentOrThrow(),s]}}function wb(e,t){const n=[];let r=t;for(;r!==e&&r!==null;r=r.parentNode){let i=0;for(let a=r.previousSibling;a!==null;a=a.previousSibling)i++;n.push(i)}return r!==e&&oe(225),n.reverse()}class on extends In{constructor(n){super(n);J(this,"__first");J(this,"__last");J(this,"__size");J(this,"__format");J(this,"__style");J(this,"__indent");J(this,"__dir");J(this,"__textFormat");J(this,"__textStyle");this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(n){super.afterCloneFrom(n),this.__key===n.__key&&(this.__first=n.__first,this.__last=n.__last,this.__size=n.__size),this.__indent=n.__indent,this.__format=n.__format,this.__style=n.__style,this.__dir=n.__dir,this.__textFormat=n.__textFormat,this.__textStyle=n.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const n=this.getFormat();return L2[n]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const n=[];let r=this.getFirstChild();for(;r!==null;)n.push(r),r=r.getNextSibling();return n}getChildrenKeys(){const n=[];let r=this.getFirstChild();for(;r!==null;)n.push(r.__key),r=r.getNextSibling();return n}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const n=Ue()._dirtyElements;return n!==null&&n.has(this.__key)}isLastChild(){const n=this.getLatest(),r=this.getParentOrThrow().getLastChild();return r!==null&&r.is(n)}getAllTextNodes(){const n=[];let r=this.getFirstChild();for(;r!==null;){if(ce(r)&&n.push(r),X(r)){const i=r.getAllTextNodes();n.push(...i)}r=r.getNextSibling()}return n}getFirstDescendant(){let n=this.getFirstChild();for(;X(n);){const r=n.getFirstChild();if(r===null)break;n=r}return n}getLastDescendant(){let n=this.getLastChild();for(;X(n);){const r=n.getLastChild();if(r===null)break;n=r}return n}getDescendantByIndex(n){const r=this.getChildren(),i=r.length;if(n>=i){const o=r[i-1];return X(o)&&o.getLastDescendant()||o||null}const a=r[n];return X(a)&&a.getFirstDescendant()||a||null}getFirstChild(){const n=this.getLatest().__first;return n===null?null:lt(n)}getFirstChildOrThrow(){const n=this.getFirstChild();return n===null&&oe(45,this.__key),n}getLastChild(){const n=this.getLatest().__last;return n===null?null:lt(n)}getLastChildOrThrow(){const n=this.getLastChild();return n===null&&oe(96,this.__key),n}getChildAtIndex(n){const r=this.getChildrenSize();let i,a;if(n<r/2){for(i=this.getFirstChild(),a=0;i!==null&&a<=n;){if(a===n)return i;i=i.getNextSibling(),a++}return null}for(i=this.getLastChild(),a=r-1;i!==null&&a>=n;){if(a===n)return i;i=i.getPreviousSibling(),a--}return null}getTextContent(){let n="";const r=this.getChildren(),i=r.length;for(let a=0;a<i;a++){const o=r[a];n+=o.getTextContent(),X(o)&&a!==i-1&&!o.isInline()&&(n+=Kl)}return n}getTextContentSize(){let n=0;const r=this.getChildren(),i=r.length;for(let a=0;a<i;a++){const o=r[a];n+=o.getTextContentSize(),X(o)&&a!==i-1&&!o.isInline()&&(n+=2)}return n}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(n){if(n!==""){const r=tf[n];return(this.getFormat()&r)!==0}return!1}hasTextFormat(n){const r=Di[n];return(this.getTextFormat()&r)!==0}getFormatFlags(n,r){return yc(this.getLatest().__textFormat,n,r)}getTextStyle(){return this.getLatest().__textStyle}select(n,r){_t();const i=ue();let a=n,o=r;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(n===0&&r===0){const c=this.getFirstChild();if(ce(c)||X(c))return c.select(0,0)}else if(!(n!==void 0&&n!==s||r!==void 0&&r!==s)){const c=this.getLastChild();if(ce(c)||X(c))return c.select()}}a===void 0&&(a=s),o===void 0&&(o=s);const l=this.__key;return re(i)?(i.anchor.set(l,a,"element"),i.focus.set(l,o,"element"),i.dirty=!0,i):sb(l,a,l,o,"element","element")}selectStart(){const n=this.getFirstDescendant();return n?n.selectStart():this.select()}selectEnd(){const n=this.getLastDescendant();return n?n.selectEnd():this.select()}clear(){const n=this.getWritable();return this.getChildren().forEach(r=>r.remove()),n}append(...n){return this.splice(this.getChildrenSize(),0,n)}setDirection(n){const r=this.getWritable();return r.__dir=n,r}setFormat(n){return this.getWritable().__format=n!==""?tf[n]:0,this}setStyle(n){return this.getWritable().__style=n||"",this}setTextFormat(n){const r=this.getWritable();return r.__textFormat=n,r}setTextStyle(n){const r=this.getWritable();return r.__textStyle=n,r}setIndent(n){return this.getWritable().__indent=n,this}splice(n,r,i){lc(this)&&oe(324,this.__key,this.__type);const a=this.getChildrenSize(),o=this.getWritable();n+r<=a||oe(226,String(n),String(r),String(a));const s=o.__key,l=[],c=[],u=this.getChildAtIndex(n+r);let d=null,f=a-r+i.length;if(n!==0)if(n===a)d=this.getLastChild();else{const p=this.getChildAtIndex(n);p!==null&&(d=p.getPreviousSibling())}if(r>0){let p=d===null?this.getFirstChild():d.getNextSibling();for(let v=0;v<r;v++){p===null&&oe(100);const m=p.getNextSibling(),b=p.__key;Yi(p.getWritable()),c.push(b),p=m}}let g=d;for(const p of i){g!==null&&p.is(g)&&(d=g=g.getPreviousSibling());const v=p.getWritable();v.__parent===s&&f--,Yi(v);const m=p.__key;if(g===null)o.__first=m,v.__prev=null;else{const b=g.getWritable();b.__next=m,v.__prev=b.__key}p.__key===s&&oe(76),v.__parent=s,l.push(m),g=p}if(n+r===a)g!==null&&(g.getWritable().__next=null,o.__last=g.__key);else if(u!==null){const p=u.getWritable();if(g!==null){const v=g.getWritable();p.__prev=g.__key,v.__next=u.__key}else p.__prev=null}if(o.__size=f,c.length){const p=ue();if(re(p)){const v=new Set(c),m=new Set(l),{anchor:b,focus:y}=p;kb(b,v,m)&&pc(b,b.getNode(),this,d,u),kb(y,v,m)&&pc(y,y.getNode(),this,d,u),f!==0||this.canBeEmpty()||Xt(this)||this.remove()}}return o}getDOMSlot(n){return new Ro(n)}exportDOM(n){const{element:r}=super.exportDOM(n);if(it(r)){const i=this.getIndent();i>0&&(r.style.paddingInlineStart=40*i+"px");const a=this.getDirection();a&&(r.dir=a)}return{element:r}}exportJSON(){const n={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},r=this.getTextFormat(),i=this.getTextStyle();return r===0&&i===""||Xt(this)||this.getChildren().some(ce)||(r!==0&&(n.textFormat=r),i!==""&&(n.textStyle=i)),n}updateFromJSON(n){return super.updateFromJSON(n).setFormat(n.format).setIndent(n.indent).setDirection(n.direction).setTextFormat(n.textFormat||0).setTextStyle(n.textStyle||"")}insertNewAfter(n,r){return null}canIndent(){return!0}collapseAtStart(n){return!1}excludeFromCopy(n){return!1}canReplaceWith(n){return!0}canInsertAfter(n){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(n){return!1}extractWithChild(n,r,i){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(n,r){const i=this.getDOMSlot(n);let a=i.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const s=r.getElementByKey(o.getKey());s!==null&&(a==null?(i.insertChild(s),a=s):a!==s&&i.replaceChild(s,a),a=a.nextSibling)}}}function X(e){return e instanceof on}function kb(e,t,n){let r=e.getNode();for(;r;){const i=r.__key;if(t.has(i)&&!n.has(i))return!0;r=r.getParent()}return!1}class Sb extends In{decorate(t,n){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ae(e){return e instanceof Sb}class Fa extends on{constructor(){super("root");J(this,"__cachedText");this.__cachedText=null}static getType(){return"root"}static clone(){return new Fa}getTopLevelElementOrThrow(){oe(51)}getTextContent(){const n=this.__cachedText;return!Jo()&&Ue()._dirtyType!==0||n===null?super.getTextContent():n}remove(){oe(52)}replace(n){oe(53)}insertBefore(n){oe(54)}insertAfter(n){oe(55)}updateDOM(n,r){return!1}splice(n,r,i){for(const a of i)X(a)||Ae(a)||oe(282);return super.splice(n,r,i)}static importJSON(n){return Ze().updateFromJSON(n)}collapseAtStart(){return!0}}function st(e){return e instanceof Fa}function Nb(e){return new es(new Map(e._nodeMap))}function Df(){return new es(new Map([["root",new Fa]]))}function Cb(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&oe(130,n.name),X(e)){const r=t.children;Array.isArray(r)||oe(59,n.name);const i=e.getChildren();for(let a=0;a<i.length;a++){const o=Cb(i[a]);r.push(o)}}return t}function O$(e){return e instanceof es}class es{constructor(t,n){J(this,"_nodeMap");J(this,"_selection");J(this,"_flushSync");J(this,"_readOnly");this._nodeMap=t,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,n){return xb(n&&n.editor||null,this,t)}clone(t){const n=new es(this._nodeMap,t===void 0?this._selection:t);return n._readOnly=!0,n}toJSON(){return xb(null,this,()=>({root:Cb(Ze())}))}}class If extends on{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}}class za extends on{static getType(){return"paragraph"}static clone(t){return new za(t.__key)}createDOM(t){const n=document.createElement("p"),r=Ua(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:t=>({conversion:P$,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(it(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r)}return{element:n}}static importJSON(t){return He().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(t.textFormat===void 0||t.textStyle===void 0){const n=this.getChildren().find(ce);n?(t.textFormat=n.getFormat(),t.textStyle=n.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,n){const r=He();r.setTextFormat(t.format),r.setTextStyle(t.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const t=this.getChildren();if(t.length===0||ce(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function P$(e){const t=He();if(e.style&&(t.setFormat(e.style.textAlign),nh(e,t)),t.getFormatType()===""){const n=e.getAttribute("align");n&&n&&n in tf&&t.setFormat(n)}return{node:t}}function He(){return Fn(new za)}function Ff(e){return e instanceof za}const Ee=0,ir=1,A$=4;function Eb(e,t,n,r){const i=e._keyToDOMMap;i.clear(),e._editorState=Df(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const a=e._observer;a!==null&&(a.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function L$(e){const t=new Set,n=new Set;let r=e;for(;r;){const{ownNodeConfig:i}=Sc(r),a=r.transform;if(!n.has(a)){n.add(a);const o=r.transform();o&&t.add(o)}if(i){const o=i.$transform;o&&t.add(o),r=i.extends}else{const o=Object.getPrototypeOf(r);r=o.prototype instanceof In&&o!==In?o:void 0}}return t}function Tb(e){const t=e||{},n=M$(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,a=t.disableEvents||!1,o=Df(),s=t.namespace||(i!==null?i._config.namespace:jb()),l=t.editorState,c=[Fa,Tr,Pa,La,za,If,...t.nodes||[]],{onError:u,html:d}=t,f=t.editable===void 0||t.editable;let g;if(e===void 0&&n!==null)g=n._nodes;else{g=new Map;for(let v=0;v<c.length;v++){let m=c[v],b=null,y=null;if(typeof m!="function"){const w=m;m=w.replace,b=w.with,y=w.withKlass||null}Sc(m);const x=m.getType(),k=L$(m);g.set(x,{exportDOM:d&&d.export?d.export.get(m):void 0,klass:m,replace:b,replaceWithKlass:y,sharedNodeState:H2(c[v]),transforms:k})}}const p=new Ki(o,i,g,{disableEvents:a,namespace:s,theme:r},u||console.error,function(v,m){const b=new Map,y=new Set,x=k=>{Object.keys(k).forEach(w=>{let S=b.get(w);S===void 0&&(S=[],b.set(w,S)),S.push(k[w])})};return v.forEach(k=>{const w=k.klass.importDOM;if(w==null||y.has(w))return;y.add(w);const S=w.call(k.klass);S!==null&&x(S)}),m&&x(m),b}(g,d?d.import:void 0),f,e);return l!==void 0&&(p._pendingEditorState=l,p._dirtyType=2),function(v){v.registerCommand(p0,s$,Ee),v.registerCommand(g0,l$,Ee),v.registerCommand(v0,c$,Ee),v.registerCommand(m0,u$,Ee),v.registerCommand(y0,d$,Ee)}(p),p}class Ki{constructor(t,n,r,i,a,o,s,l){J(this,"_headless");J(this,"_parentEditor");J(this,"_rootElement");J(this,"_editorState");J(this,"_pendingEditorState");J(this,"_compositionKey");J(this,"_deferred");J(this,"_keyToDOMMap");J(this,"_updates");J(this,"_updating");J(this,"_listeners");J(this,"_commands");J(this,"_nodes");J(this,"_decorators");J(this,"_pendingDecorators");J(this,"_config");J(this,"_dirtyType");J(this,"_cloneNotNeeded");J(this,"_dirtyLeaves");J(this,"_dirtyElements");J(this,"_normalizedNodes");J(this,"_updateTags");J(this,"_observer");J(this,"_key");J(this,"_onError");J(this,"_htmlConversions");J(this,"_window");J(this,"_editable");J(this,"_blockCursorElement");J(this,"_createEditorArgs");this._createEditorArgs=l,this._parentEditor=n,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=jb(),this._onError=a,this._htmlConversions=o,this._editable=s,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){const n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){const n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){const n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){const n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){const n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&oe(35);const i=this._commands;i.has(t)||i.set(t,[new Set,new Set,new Set,new Set,new Set]);const a=i.get(t);a===void 0&&oe(36,String(t));const o=a[r];return o.add(n),()=>{o.delete(n),a.every(s=>s.size===0)&&i.delete(t)}}registerMutationListener(t,n,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,a=this._listeners.mutation;let o=a.get(n);o===void 0&&(o=new Set,a.set(n,o)),o.add(i);const s=r&&r.skipInitialization;return s!==void 0&&s||this.initializeMutationListener(n,i),()=>{o.delete(i),o.size===0&&a.delete(n)}}getRegisteredNode(t){const n=this._nodes.get(t.getType());return n===void 0&&oe(37,t.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,n){const r=this._editorState,i=Qb(r).get(n.getType());if(!i)return;const a=new Map;for(const o of i.keys())a.set(o,"created");a.size>0&&t(a,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,n){const r=this.getRegisteredNode(t);return r.transforms.add(n),r}registerNodeTransform(t,n){const r=this.registerNodeTransformToKlass(t,n),i=[r],a=r.replaceWithKlass;if(a!=null){const o=this.registerNodeTransformToKlass(a,n);i.push(o)}return function(o,s){const l=Qb(o.getEditorState()),c=[];for(const u of s){const d=l.get(u);d&&c.push(d)}c.length!==0&&o.update(()=>{for(const u of c)for(const d of u.keys()){const f=lt(d);f&&f.markDirty()}},o._pendingEditorState===null?{tag:Hi}:void 0)}(this,i.map(o=>o.klass.getType())),()=>{i.forEach(o=>o.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return fe(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const n=this._rootElement;if(t!==n){const r=Ua(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,Eb(this,n,t,i),n!==null&&(this._config.disableEvents||f$(n),r!=null&&n.classList.remove(...r)),t!==null){const a=Zf(t),o=t.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=a,this._dirtyType=2,Jy(this),this._updateTags.add(Hi),$r(this),this._config.disableEvents||function(s,l){const c=s.ownerDocument;bf.set(s,c);const u=rc.get(c)??0;u<1&&c.addEventListener("selectionchange",W0),rc.set(c,u+1),s.__lexicalEditor=l;const d=j0(s);for(let f=0;f<yf.length;f++){const[g,p]=yf[f],v=typeof p=="function"?m=>{H0(m)||(U0(m),(l.isEditable()||g==="click")&&p(m,l))}:m=>{if(H0(m))return;U0(m);const b=l.isEditable();switch(g){case"cut":return b&&fe(l,vf,m);case"copy":return fe(l,nc,m);case"paste":return b&&fe(l,Ql,m);case"dragstart":return b&&fe(l,$0,m);case"dragover":return b&&fe(l,O0,m);case"dragend":return b&&fe(l,t$,m);case"focus":return b&&fe(l,i$,m);case"blur":return b&&fe(l,a$,m);case"drop":return b&&fe(l,M0,m)}};s.addEventListener(g,v),d.push(()=>{s.removeEventListener(g,v)})}}(t,this),r!=null&&t.classList.add(...r)}else this._window=null,this._updateTags.add(Hi),$r(this);Qo("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&oe(38);let r=t;r._readOnly&&(r=Nb(t),r._selection=t._selection?t._selection.clone():null),Zy(this);const i=this._pendingEditorState,a=this._updateTags,o=n!==void 0?n.tag:null;i===null||i.isEmpty()||(o!=null&&a.add(o),$r(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,o!=null&&a.add(o),this._updating||$r(this)}parseEditorState(t,n){return function(r,i,a){const o=Df(),s=ft,l=Gt,c=ht,u=i._dirtyElements,d=i._dirtyLeaves,f=i._cloneNotNeeded,g=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,ft=o,Gt=!1,ht=i,Bf(null);try{const p=i._nodes;Lf(r.root,p),a&&a(),o._readOnly=!0}catch(p){p instanceof Error&&i._onError(p)}finally{i._dirtyElements=u,i._dirtyLeaves=d,i._cloneNotNeeded=f,i._dirtyType=g,ft=s,Gt=l,ht=c}return o}(typeof t=="string"?JSON.parse(t):t,this,n)}read(t){return $r(this),this.getEditorState().read(t,{editor:this})}update(t,n){(function(r,i,a){r._updating?r._updates.push([i,a]):vc(r,i,a)})(this,t,n)}focus(t,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),rr(this,()=>{const i=ue(),a=Ze();i!==null?i.dirty||$t(i.clone()):a.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?a.selectStart():a.selectEnd()),Gf("focus"),B$(()=>{r.removeAttribute("autocapitalize"),t&&t()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const n=gn(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Qo("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}J(Ki,"version"),Ki.version="0.41.0+prod.esm";let zf=null;function Bf(e){zf=e}let D$=1;function Mb(e,t){const n=jf(e,t);return n===void 0&&oe(30,t),n}function jf(e,t){return e._nodes.get(t)}const I$=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function $b(e){return Ae(ja(e))}function Wf(e){const t=document.activeElement;if(!it(t))return!1;const n=t.nodeName;return Ae(ja(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&mc(t)==null)}function ts(e,t,n){const r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!Wf(t)&&Ob(t)===e}catch{return!1}}function Uf(e){return e instanceof Ki}function Ob(e){let t=e;for(;t!=null;){const n=mc(t);if(Uf(n))return n;t=ns(t)}return null}function mc(e){return e?e.__lexicalEditor:null}function Vi(e){return dc(e)||e.isToken()}function Or(e){return Vi(e)||e.isSegmented()}function Pr(e){return qa(e)&&e.nodeType===3}function Pb(e){return qa(e)&&e.nodeType===9}function Ba(e){let t=e;for(;t!=null;){if(Pr(t))return t;t=t.firstChild}return null}function yc(e,t,n){const r=Di[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t==="subscript"?i&=-65:t==="superscript"?i&=-33:t==="lowercase"?(i&=-513,i&=-1025):t==="uppercase"?(i&=-257,i&=-1025):t==="capitalize"&&(i&=-257,i&=-513),i}function Ab(e){return ce(e)||Aa(e)||Ae(e)}function Lb(e,t){const n=function(){const o=zf;return zf=null,o}();if((t=t||n&&n.__key)!=null)return void(e.__key=t);_t(),gb();const r=Ue(),i=ei(),a=""+D$++;i._nodeMap.set(a,e),X(e)?r._dirtyElements.set(a,!0):r._dirtyLeaves.add(a),r._cloneNotNeeded.add(a),r._dirtyType=1,e.__key=a}function Yi(e){const t=e.getParent();if(t!==null){const n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),a=e.getNextSibling(),o=a!==null?a.__key:null,s=i!==null?i.__key:null,l=i!==null?i.getWritable():null,c=a!==null?a.getWritable():null;i===null&&(r.__first=o),a===null&&(r.__last=s),l!==null&&(l.__next=o),c!==null&&(c.__prev=s),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function bc(e){gb(),lc(e)&&oe(323,e.__key,e.__type);const t=e.getLatest(),n=t.__parent,r=ei(),i=Ue(),a=r._nodeMap,o=i._dirtyElements;n!==null&&function(l,c,u){let d=l;for(;d!==null;){if(u.has(d))return;const f=c.get(d);if(f===void 0)break;u.set(d,!1),d=f.__parent}}(n,a,o);const s=t.__key;i._dirtyType=1,X(e)?o.set(s,!0):i._dirtyLeaves.add(s)}function wt(e){_t();const t=Ue(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){const r=lt(n);r!==null&&r.getWritable()}if(e!==null){const r=lt(e);r!==null&&r.getWritable()}}}function ti(){return Jo()?null:Ue()._compositionKey}function lt(e,t){const n=(t||ei())._nodeMap.get(e);return n===void 0?null:n}function Db(e,t){const n=xc(e,Ue());return n!==void 0?lt(n,t):null}function xc(e,t){return e[`__lexicalKey_${t._key}`]}function ja(e,t){let n=e;for(;n!=null;){const r=Db(n,t);if(r!==null)return r;n=ns(n)}return null}function Ib(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Fb(e){return e.read(()=>Ze().getTextContent())}function Ze(){return zb(ei())}function zb(e){return e._nodeMap.get("root")}function $t(e){_t();const t=ei();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function Wa(e){const t=Ue(),n=function(r,i){let a=r;for(;a!=null;){const o=xc(a,i);if(o!==void 0)return o;a=ns(a)}return null}(e,t);return n===null?e===t.getRootElement()?lt("root"):null:lt(n)}function Bb(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Hf(e){const t=[];let n=e;for(;n!==null;)t.push(n),n=n._parentEditor;return t}function jb(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function Wb(e){return Pr(e)?e.nodeValue:null}function qf(e,t,n){const r=gn(sn(t));if(r===null)return;const i=r.anchorNode;let{anchorOffset:a,focusOffset:o}=r;if(i!==null){let s=Wb(i);const l=ja(i);if(s!==null&&ce(l)){if((s===jo||s===ef)&&n){const c=n.length;s=n,a=c,o=c}s!==null&&Kf(l,s,a,o,e)}}}function Kf(e,t,n,r,i){let a=e;if(a.isAttached()&&(i||!a.isDirty())){const o=a.isComposing();let s=t;if((o||i)&&(t.endsWith(jo)&&(s=t.slice(0,-jo.length)),i)){const c=ef;let u;for(;(u=s.indexOf(c))!==-1;)s=s.slice(0,u)+s.slice(u+c.length),n!==null&&n>u&&(n=Math.max(u,n-c.length)),r!==null&&r>u&&(r=Math.max(u,r-c.length))}const l=a.getTextContent();if(i||s!==l){if(s===""){if(wt(null),Hl||Bo||ql)a.remove();else{const v=Ue();setTimeout(()=>{v.update(()=>{a.isAttached()&&a.remove()})},20)}return}const c=a.getParent(),u=Ia(),d=a.getTextContentSize(),f=ti(),g=a.getKey();if(a.isToken()||f!==null&&g===f&&!o||re(u)&&(c!==null&&!c.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===e.__key&&u.anchor.offset===0&&!a.canInsertTextBefore()&&!o||u.focus.key===e.__key&&u.focus.offset===d&&!a.canInsertTextAfter()&&!o))return void a.markDirty();const p=ue();if(!re(p)||n===null||r===null)return void Ub(a,s,p);if(p.setTextNodeRange(a,n,a,r),a.isSegmented()){const v=dt(a.getTextContent());a.replace(v),a=v}Ub(a,s,p)}}}function Ub(e,t,n){if(e.setTextContent(t),re(n)){const r=e.getKey();for(const i of["anchor","focus"]){const a=n[i];a.type==="text"&&a.key===r&&(a.offset=or(e,a.offset,"clamp"))}}}function _c(e,t,n){const r=t[n]||!1;return r==="any"||r===e[n]}function F$(e,t){return _c(e,t,"altKey")&&_c(e,t,"ctrlKey")&&_c(e,t,"shiftKey")&&_c(e,t,"metaKey")}function ze(e,t,n){if(!F$(e,n))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||e.key.length===1&&e.key.charCodeAt(0)<=127)return!1;const r="Key"+t.toUpperCase();return e.code===r}const Ar={ctrlKey:!Ln,metaKey:Ln},Hb={altKey:Ln,ctrlKey:!Ln};function qb(e){return e.key==="Backspace"}function Kb(e){return ze(e,"a",Ar)}function z$(e){const t=Ze();if(re(e)){const n=e.anchor,r=e.focus,i=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),Ii(e),e}{const n=t.select(0,t.getChildrenSize());return $t(Ii(n)),n}}function Ua(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;const i=e[t];if(typeof i=="string"){const a=ii(i);return n[t]=a,a}return i}function Vf(e,t,n,r,i){if(n.size===0)return;const a=r.__type,o=r.__key,s=t.get(a);s===void 0&&oe(33,a);const l=s.klass;let c=e.get(l);c===void 0&&(c=new Map,e.set(l,c));const u=c.get(o),d=u==="destroyed"&&i==="created";(u===void 0||d)&&c.set(o,d?"updated":i)}function Vb(e,t,n){const r=e.getParent();let i=n,a=e;return r!==null&&(t&&n===0?(i=a.getIndexWithinParent(),a=r):t||n!==a.getChildrenSize()||(i=a.getIndexWithinParent()+1,a=r)),a.getChildAtIndex(t?i-1:i)}function Yf(e,t){const n=e.offset;if(e.type==="element")return Vb(e.getNode(),t,n);{const r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){const i=t?r.getPreviousSibling():r.getNextSibling();return i===null?Vb(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):i}}return null}function Yb(e){const t=sn(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function fe(e,t,n){return function(r,i,a){const o=Hf(r);for(let s=4;s>=0;s--)for(let l=0;l<o.length;l++){const c=o[l],u=c._commands.get(i);if(u!==void 0){const d=u[s];if(d!==void 0){const f=Array.from(d),g=f.length;let p=!1;if(rr(c,()=>{for(let v=0;v<g;v++)if(f[v](a,r))return void(p=!0)}),p)return p}}}return!1}(e,t,n)}function Ha(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&oe(75,t),n}function ns(e){const t=e.assignedSlot||e.parentElement;return eh(t)?t.host:t}function Gb(e){return Pb(e)?e:it(e)?e.ownerDocument:null}function Gf(e){_t(),Ue()._updateTags.add(e)}function B$(e){_t(),Ue()._deferred.push(e)}function Xf(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function Zf(e){const t=Gb(e);return t?t.defaultView:null}function sn(e){const t=e._window;return t===null&&oe(78),t}function j$(e){let t=e.getParentOrThrow();for(;t!==null;){if(Xt(t))return t;t=t.getParentOrThrow()}return t}function Xt(e){return st(e)||X(e)&&e.isShadowRoot()}function Xb(e){const t=e.constructor.clone(e);return Lb(t,null),t.afterCloneFrom(e),t}function Fn(e){const t=Ue(),n=e.getType(),r=jf(t,n);r===void 0&&oe(200,e.constructor.name,n);const{replace:i,replaceWithKlass:a}=r;if(i!==null){const o=i(e),s=o.constructor;return a!==null?o instanceof a||oe(201,a.name,a.getType(),s.name,s.getType(),e.constructor.name,n):o instanceof e.constructor&&s!==e.constructor||oe(202,s.name,s.getType(),e.constructor.name,n),o.__key===e.__key&&oe(203,e.constructor.name,n,s.name,s.getType()),o}return e}function Jf(e,t){!st(e.getParent())||X(t)||Ae(t)||oe(99)}function W$(e){const t=lt(e);return t===null&&oe(63,e),t}function Qf(e){return(Ae(e)||X(e)&&!e.canBeEmpty())&&!e.isInline()}function Rf(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}function gn(e){return An?(e||window).getSelection():null}function U$(e){const t=Zf(e);return t?t.getSelection():null}function Zb(e){return it(e)&&e.tagName==="A"}function it(e){return qa(e)&&e.nodeType===1}function qa(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function eh(e){return qa(e)&&e.nodeType===11}function th(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return e.nodeName.match(t)!==null}function wc(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return e.nodeName.match(t)!==null}function vn(e){if(Ae(e)&&!e.isInline())return!0;if(!X(e)||Xt(e))return!1;const t=e.getFirstChild(),n=t===null||Aa(t)||ce(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function kc(){return Ue()}const Jb=new WeakMap,H$=new Map;function Qb(e){if(!e._readOnly&&e.isEmpty())return H$;e._readOnly||oe(192);let t=Jb.get(e);return t||(t=function(n){const r=new Map;for(const[i,a]of n._nodeMap){const o=a.__type;let s=r.get(o);s||(s=new Map,r.set(o,s)),s.set(i,a)}return r}(e),Jb.set(e,t)),t}function Rb(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function q$(e){return(t=Rb(e))[q0]=!0,t;var t}function nh(e,t){const n=parseInt(e.style.paddingInlineStart,10)||0,r=Math.round(n/40);t.setIndent(r)}function K$(e){return e.__lexicalUnmanaged===!0}function rs(e,t){return function(n,r){return Object.prototype.hasOwnProperty.call(n,r)}(e,t)&&e[t]!==In[t]}function Sc(e){const t=Yy in e.prototype?e.prototype[Yy]():void 0,n=function(o){if(!(o===In||o.prototype instanceof In)){let s="<unknown>",l="<unknown>";try{s=o.getType()}catch{}try{Ki.version&&(l=JSON.parse(Ki.version))}catch{}oe(290,o.name,s,l)}return o===Sb||o===on||o===In}(e),r=!n&&rs(e,"getType")?e.getType():void 0;let i,a=r;if(t)if(r)i=t[r];else for(const[o,s]of Object.entries(t))a=o,i=s;if(!n&&a&&(rs(e,"getType")||(e.getType=()=>a),rs(e,"clone")||(e.clone=o=>(Bf(o),new e)),rs(e,"importJSON")||(e.importJSON=i&&i.$importJSON||(o=>new e().updateFromJSON(o))),!rs(e,"importDOM")&&i)){const{importDOM:o}=i;o&&(e.importDOM=()=>o)}return{ownNodeConfig:i,ownNodeType:a}}function V$(e){const t=kc();return _t(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}const kt=(e,t)=>{let n=e;for(;n!=null&&!st(n);){if(t(n))return n;n=n.getParent()}return null},Y$={next:"previous",previous:"next"};class rh{constructor(t){J(this,"origin");this.origin=t}[Symbol.iterator](){return tx({hasNext:Ka,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return ct(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return ct(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,n){const r=this.getNodeAtCaret();return t.is(this.origin)||t.is(r)||(r===null?this.insert(t):r.replace(t,n)),this}splice(t,n,r="next"){const i=r===this.direction?n:Array.from(n).reverse();let a=this;const o=this.getParentAtCaret(),s=new Map;for(let l=a.getAdjacentCaret();l!==null&&s.size<t;l=l.getAdjacentCaret()){const c=l.origin.getWritable();s.set(c.getKey(),c)}for(const l of i){if(s.size>0){const c=a.getNodeAtCaret();if(c){if(s.delete(c.getKey()),s.delete(l.getKey()),!(c.is(l)||a.origin.is(l))){const u=l.getParent();u&&u.is(o)&&l.remove(),c.replace(l)}}else c===null&&oe(263,Array.from(s).join(" "))}else a.insert(l);a=ct(l,this.direction)}for(const l of s.values())l.remove();return this}}class is extends rh{constructor(){super(...arguments);J(this,"type","child")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:mn(n,this.direction)}getParentCaret(n="root"){return ct(ih(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=Gi(this.direction);return ct(this.getNodeAtCaret(),n)||mn(this.origin,n)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(n){return n instanceof is&&this.direction===n.direction&&this.origin.is(n.origin)}isSamePointCaret(n){return this.isSameNodeCaret(n)}}const G$={root:st,shadowRoot:Xt};function Gi(e){return Y$[e]}function ih(e,t="root"){return G$[t](e)?null:e}class Xi extends rh{constructor(){super(...arguments);J(this,"type","sibling")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:ct(n,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return X(this.origin)?mn(this.origin,this.direction):null}getParentCaret(n="root"){return ct(ih(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=Gi(this.direction);return ct(this.getNodeAtCaret(),n)||mn(this.origin.getParentOrThrow(),n)}isSamePointCaret(n){return n instanceof Xi&&this.direction===n.direction&&this.origin.is(n.origin)}isSameNodeCaret(n){return(n instanceof Xi||n instanceof Zi)&&this.direction===n.direction&&this.origin.is(n.origin)}}class Zi extends rh{constructor(n,r){super(n);J(this,"type","text");J(this,"offset");this.offset=r}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:Ji(n,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(n="root"){return ct(ih(this.getParentAtCaret(),n),this.direction)}getFlipped(){return Ji(this.origin,Gi(this.direction),this.offset)}isSamePointCaret(n){return n instanceof Zi&&this.direction===n.direction&&this.origin.is(n.origin)&&this.offset===n.offset}isSameNodeCaret(n){return(n instanceof Xi||n instanceof Zi)&&this.direction===n.direction&&this.origin.is(n.origin)}getSiblingCaret(){return ct(this.origin,this.direction)}}function ar(e){return e instanceof Zi}function Ka(e){return e instanceof Xi}function zn(e){return e instanceof is}const X$={next:class extends Zi{constructor(){super(...arguments);J(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Zi{constructor(){super(...arguments);J(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Z$={next:class extends Xi{constructor(){super(...arguments);J(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Xi{constructor(){super(...arguments);J(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},J$={next:class extends is{constructor(){super(...arguments);J(this,"direction","next")}getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends is{constructor(){super(...arguments);J(this,"direction","previous")}getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function ct(e,t){return e?new Z$[t](e):null}function Ji(e,t,n){return e?new X$[t](e,or(e,n)):null}function or(e,t,n="error"){const r=e.getTextContentSize();let i=t==="next"?r:t==="previous"?0:t;return(i<0||i>r)&&(n!=="clamp"&&qy(284,String(t),String(r),e.getKey()),i=i<0?0:r),i}function ex(e,t){return new R$(e,t)}function mn(e,t){return X(e)?new J$[t](e):null}function Q$(e){return e&&e.getChildCaret()||e}function ah(e){return e&&Q$(e.getAdjacentCaret())}class oh{constructor(t,n,r){J(this,"type","node-caret-range");J(this,"direction");J(this,"anchor");J(this,"focus");this.anchor=t,this.focus=n,this.direction=r}getLatest(){const t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new oh(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=i=>{const a=this[i].getLatest();return ar(a)?function(o,s){const{direction:l,origin:c}=o,u=or(c,s==="focus"?Gi(l):l);return ex(o,u-o.offset)}(a,i):null},n=t("anchor"),r=t("focus");if(n&&r){const{caret:i}=n,{caret:a}=r;if(i.isSameNodeCaret(a))return[ex(i,a.offset-i.offset),null]}return[n,r]}iterNodeCarets(t="root"){const n=ar(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=ar(r),a=o=>o.isSameNodeCaret(r)?null:ah(o)||o.getParentCaret(t);return tx({hasNext:o=>o!==null&&!(i&&r.isSameNodeCaret(o)),initial:n.isSameNodeCaret(r)?null:a(n),map:o=>o,step:a})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class R${constructor(t,n){J(this,"type","slice");J(this,"caret");J(this,"distance");this.caret=t,this.distance=n}getSliceIndices(){const{distance:t,caret:{offset:n}}=this,r=n+t;return r<n?[r,n]:[n,r]}getTextContent(){const[t,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(t,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:t,direction:n}}=this,[r,i]=this.getSliceIndices(),a=t.getTextContent();return Ji(t.setTextContent(a.slice(0,r)+a.slice(i)),n,r)}}function sh(e){return ni(e,ct(Ze(),e.direction))}function eO(e){return ni(e,e)}function ni(e,t){return e.direction!==t.direction&&oe(265),new oh(e,t,e.direction)}function tx(e){const{initial:t,hasNext:n,step:r,map:i}=e;let a=t;return{[Symbol.iterator](){return this},next(){if(!n(a))return{done:!0,value:void 0};const o={done:!1,value:i(a)};return a=r(a),o}}}function nx(e,t){const n=Cc(e.origin,t.origin);switch(n===null&&oe(275,e.origin.getKey(),t.origin.getKey()),n.type){case"same":{const r=e.type==="text",i=t.type==="text";return r&&i?function(a,o){return Math.sign(a-o)}(e.offset,t.offset):e.type===t.type?0:r?-1:i?1:e.type==="child"?-1:1}case"ancestor":return e.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return rx(n)}}function rx(e){const{a:t,b:n}=e,r=t.__key,i=n.__key;let a=t,o=n;for(;a&&o;a=a.getNextSibling(),o=o.getNextSibling()){if(a.__key===i)return-1;if(o.__key===r)return 1}return a===null?1:-1}function Nc(e,t){return t.is(e)}function ix(e){return X(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function Cc(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const n=new Map;for(let[r,i]=ix(e);r;i=r,r=r.getParent())n.set(r,i);for(let[r,i]=ix(t);r;i=r,r=r.getParent()){const a=n.get(r);if(a!==void 0)return a===null?(Nc(e,r)||oe(276),{commonAncestor:r,type:"ancestor"}):i===null?(Nc(t,r)||oe(277),{commonAncestor:r,type:"descendant"}):((X(a)||Nc(e,a))&&(X(i)||Nc(t,i))&&r.is(a.getParent())&&r.is(i.getParent())||oe(278),{a,b:i,commonAncestor:r,type:"branch"})}return null}function sr(e,t){const{type:n,key:r,offset:i}=e,a=W$(e.key);return n==="text"?(ce(a)||oe(266,a.getType(),r),Ji(a,t,i)):(X(a)||oe(267,a.getType(),r),rO(a,e.offset,t))}function ri(e,t){const{origin:n,direction:r}=t,i=r==="next";ar(t)?e.set(n.getKey(),t.offset,"text"):Ka(t)?ce(n)?e.set(n.getKey(),or(n,r),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(i?1:0),"element"):(zn(t)&&X(n)||oe(268),e.set(n.getKey(),i?0:n.getChildrenSize(),"element"))}function tO(e){const t=ue(),n=re(t)?t:$f();return Ec(n,e),$t(n),n}function Ec(e,t){ri(e.anchor,t.anchor),ri(e.focus,t.focus)}function ax(e){const{anchor:t,focus:n}=e,r=sr(t,"next"),i=sr(n,"next"),a=nx(r,i)<=0?"next":"previous";return ni(Lr(r,a),Lr(i,a))}function Va(e){const{direction:t,origin:n}=e,r=ct(n,Gi(t)).getNodeAtCaret();return r?ct(r,t):mn(n.getParentOrThrow(),t)}function ox(e,t="root"){const n=[e];for(let r=zn(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(Va(r));return n}function lh(e){return!!e&&e.origin.isAttached()}function nO(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const n="root",r="next";let i=t;const a=lx(e,r),o=ox(a.anchor,n),s=ox(a.focus.getFlipped(),n),l=new Set,c=[];for(const p of a.iterNodeCarets(n))if(zn(p))l.add(p.origin.getKey());else if(Ka(p)){const{origin:v}=p;X(v)&&!l.has(v.getKey())||c.push(v)}for(const p of c)p.remove();for(const p of a.getTextSlices()){if(!p)continue;const{origin:v}=p.caret,m=v.getTextContentSize(),b=Va(ct(v,r)),y=v.getMode();if(Math.abs(p.distance)===m&&i==="removeEmptySlices"||y==="token"&&p.distance!==0)b.remove();else if(p.distance!==0){i="removeEmptySlices";let x=p.removeTextSlice();const k=p.caret.origin;if(y==="segmented"){const w=x.origin,S=dt(w.getTextContent()).setStyle(w.getStyle()).setFormat(w.getFormat());b.replaceOrInsert(S),x=Ji(S,r,x.offset)}k.is(o[0].origin)&&(o[0]=x),k.is(s[0].origin)&&(s[0]=x.getFlipped())}}let u,d;for(const p of o)if(lh(p)){u=ln(p);break}for(const p of s)if(lh(p)){d=ln(p);break}const f=function(p,v,m){if(!p||!v)return null;const b=p.getParentAtCaret(),y=v.getParentAtCaret();if(!b||!y)return null;const x=b.getParents().reverse();x.push(b);const k=y.getParents().reverse();k.push(y);const w=Math.min(x.length,k.length);let S;for(S=0;S<w&&x[S]===k[S];S++);const N=(T,O)=>{let P;for(let M=S;M<T.length;M++){const $=T[M];if(Xt($))return;!P&&O($)&&(P=$)}return P},C=N(x,vn),E=C&&N(k,T=>m.has(T.getKey())&&vn(T));return C&&E?[C,E]:null}(u,d,l);if(f){const[p,v]=f;mn(p,"previous").splice(0,v.getChildren());let m=v.getParent();for(v.remove(!0);m&&m.isEmpty();){const b=m;m=m.getParent(),b.remove(!0)}}const g=[u,d,...o,...s].find(lh);if(g)return eO(Lr(ln(g),e.direction));oe(269,JSON.stringify(o.map(p=>p.origin.__key)))}function ln(e){const t=function(i){let a=i;for(;zn(a);){const o=ah(a);if(!zn(o))break;a=o}return a}(e.getLatest()),{direction:n}=t;if(ce(t.origin))return ar(t)?t:Ji(t.origin,n,n);const r=t.getAdjacentCaret();return Ka(r)&&ce(r.origin)?Ji(r.origin,n,Gi(n)):t}function sx(e){return ar(e)&&e.offset!==or(e.origin,e.direction)}function Lr(e,t){return e.direction===t?e:e.getFlipped()}function lx(e,t){return e.direction===t?e:ni(Lr(e.focus,t),Lr(e.anchor,t))}function rO(e,t,n){let r=mn(e,"next");for(let i=0;i<t;i++){const a=r.getAdjacentCaret();if(a===null)break;r=a}return Lr(r,n)}function iO(e){const{origin:t,offset:n,direction:r}=e;if(n===or(t,r))return e.getSiblingCaret();if(n===or(t,Gi(r)))return Va(e.getSiblingCaret());const[i]=t.splitText(n);return ce(i)||oe(281),Lr(ct(i,"next"),r)}function aO(e,t){return!0}function oO(e,{$copyElementNode:t=Xb,$splitTextPointCaretNext:n=iO,rootMode:r="shadowRoot",$shouldSplit:i=aO}={}){if(ar(e))return n(e);const a=e.getParentCaret(r);if(a){const{origin:o}=a;if(zn(e)&&(!o.canBeEmpty()||!i(o,"first")))return Va(a);const s=function(l){const c=[];for(let u=l.getAdjacentCaret();u;u=u.getAdjacentCaret())c.push(u.origin);return c}(e);(s.length>0||o.canBeEmpty()&&i(o,"last"))&&a.insert(t(o).splice(0,0,s))}return a}function tq(e){return e}function sO(...e){return e}function nq(e){return e}function lO(e,t){if(!t||e===t)return e;for(const n in t)if(e[n]!==t[n])return{...e,...t};return e}function ii(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}function Dr(e,...t){const n=ii(...t);n.length>0&&e.classList.add(...n)}function ch(e,...t){const n=ii(...t);n.length>0&&e.classList.remove(...n)}function lr(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}const cx=_.createContext(null);function cO(e,t){return{getTheme:function(){return t??null}}}function Ir(){const e=_.useContext(cx);return e==null&&function(t,...n){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const a of n)i.append("v",a);throw r.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),e}const ux=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,uO=ux?_.useLayoutEffect:_.useEffect,Tc={tag:Hi};function dO({initialConfig:e,children:t}){const n=_.useMemo(()=>{const{theme:r,namespace:i,nodes:a,onError:o,editorState:s,html:l}=e,c=cO(null,r),u=Tb({editable:e.editable,html:l,namespace:i,nodes:a,onError:d=>o(d,u),theme:r});return function(d,f){if(f!==null){if(f===void 0)d.update(()=>{const g=Ze();if(g.isEmpty()){const p=He();g.append(p);const v=ux?document.activeElement:null;(ue()!==null||v!==null&&v===d.getRootElement())&&p.select()}},Tc);else if(f!==null)switch(typeof f){case"string":{const g=d.parseEditorState(f);d.setEditorState(g,Tc);break}case"object":d.setEditorState(f,Tc);break;case"function":d.update(()=>{Ze().isEmpty()&&f(d)},Tc)}}}(u,s),[u,c]},[]);return uO(()=>{const r=e.editable,[i]=n;i.setEditable(r===void 0||r)},[]),h.jsx(cx.Provider,{value:n,children:t})}const fO=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?_.useLayoutEffect:_.useEffect;function hO(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function pO(){return function(e){const[t]=Ir(),n=_.useMemo(()=>e(t),[t,e]),[r,i]=_.useState(()=>n.initialValueFn()),a=_.useRef(r);return fO(()=>{const{initialValueFn:o,subscribe:s}=n,l=o();return a.current!==l&&(a.current=l,i(l)),s(c=>{a.current=c,i(c)})},[n,e]),r}(hO)}const uh=new Map;function dx(e){const t={};if(!e)return t;const n=e.split(";");for(const r of n)if(r!==""){const[i,a]=r.split(/:([^]+)/);i&&a&&(t[i.trim()]=a.trim())}return t}function fx(e){let t=uh.get(e);return t===void 0&&(t=dx(e),uh.set(e,t)),t}function hx(e){const t=kc().getElementByKey(e.getKey());if(t===null)return null;const n=t.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(t)}function px(e){return hx(st(e)?e:e.getParentOrThrow())}function gx(e){const t=px(e);return t!==null&&t.direction==="rtl"}function vx(e,t,n="self"){const r=e.getStartEndPoints();if(t.isSelected(e)&&!Or(t)&&r!==null){const[i,a]=r,o=e.isBackward(),s=i.getNode(),l=a.getNode(),c=t.is(s),u=t.is(l);if(c||u){const[d,f]=Tf(e),g=s.is(l),p=t.is(o?l:s),v=t.is(o?s:l);let m,b=0;g?(b=d>f?f:d,m=d>f?d:f):p?(b=o?f:d,m=void 0):v&&(b=0,m=o?d:f);const y=t.__text.slice(b,m);y!==t.__text&&(n==="clone"&&(t=q$(t)),t.__text=y)}}return t}function gO(e){const t=e.getStyle(),n=dx(t);uh.set(t,n)}function vO(e,t){const n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}function as(e,t,n=vO){if(e===null)return;const r=e.getStartEndPoints(),i=new Map;let a=null;if(r){const[o,s]=r;a=$f(),a.anchor.set(o.key,o.offset,o.type),a.focus.set(s.key,s.offset,s.type);const l=kt(o.getNode(),vn),c=kt(s.getNode(),vn);X(l)&&i.set(l.getKey(),l),X(c)&&i.set(c.getKey(),c)}for(const o of e.getNodes())if(X(o)&&vn(o))i.set(o.getKey(),o);else if(r===null){const s=kt(o,vn);X(s)&&i.set(s.getKey(),s)}for(const[o,s]of i){const l=t();n(s,l),s.replace(l,!0),a&&(o===a.anchor.key&&a.anchor.set(l.getKey(),a.anchor.offset,a.anchor.type),o===a.focus.key&&a.focus.set(l.getKey(),a.focus.offset,a.focus.type))}a&&e.is(ue())&&$t(a)}function mx(e){const t=yx(e);return t!==null&&t.writingMode==="vertical-rl"}function yx(e){const t=e.anchor.getNode();return X(t)?hx(t):px(t)}function bx(e,t){let n=mx(e)?!t:t;xx(e)&&(n=!n);const r=sr(e.focus,n?"previous":"next");if(sx(r))return!1;for(const i of sh(r)){if(zn(i))return!i.origin.isInline();if(!X(i.origin)){if(Ae(i.origin))return!0;break}}return!1}function mO(e,t,n,r){e.modify(t?"extend":"move",n,r)}function xx(e){const t=yx(e);return t!==null&&t.direction==="rtl"}function _x(e,t,n){const r=xx(e);let i;i=mx(e)||r?!n:n,mO(e,t,i,"character")}function wx(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const kx=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,yO=kx&&"documentMode"in document?document.documentMode:null;!(!kx||!("InputEvent"in window)||yO)&&"getTargetRanges"in new window.InputEvent("input");function bO(e){return e?e.getAdjacentCaret():null}function xO(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function _O(e){const t=kt(e,n=>X(n)&&!n.isInline());return X(t)||wx(4,e.__key),t}function wO(e,t,n){let r=Lr(t,"next");for(let i=r;i;i=oO(i,n))r=i;return ar(r)&&wx(283),r.insert(e.isInline()?He().append(e):e),Lr(ct(e.getLatest(),"next"),t.direction)}function ai(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function Sx(e){const t=ue();if(!re(t))return!1;const n=new Set,r=t.getNodes();for(let i=0;i<r.length;i++){const a=r[i],o=a.getKey();if(n.has(o))continue;const s=kt(a,c=>X(c)&&!c.isInline());if(s===null)continue;const l=s.getKey();s.canIndent()&&!n.has(l)&&(n.add(l),e(s))}return n.size>0}const kO=Symbol.for("preact-signals");function Mc(){if(oi>1)return void oi--;let e,t=!1;for(;os!==void 0;){let n=os;for(os=void 0,dh++;n!==void 0;){const r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Ex(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(dh=0,oi--,t)throw e}function SO(e){if(oi>0)return e();oi++;try{return e()}finally{Mc()}}let De,os;function Nx(e){const t=De;De=void 0;try{return e()}finally{De=t}}let oi=0,dh=0,$c=0;function Cx(e){if(De===void 0)return;let t=e.n;return t===void 0||t.t!==De?(t={i:0,S:e,p:De.s,n:void 0,t:De,e:void 0,x:void 0,r:t},De.s!==void 0&&(De.s.n=t),De.s=t,e.n=t,32&De.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=De.s,t.n=void 0,De.s.n=t,De.s=t),t):void 0}function It(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched,this.name=t==null?void 0:t.name}function NO(e,t){return new It(e,t)}function Ex(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Tx(e){for(let t=e.s;t!==void 0;t=t.n){const n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Mx(e){let t,n=e.s;for(;n!==void 0;){const r=n.p;n.i===-1?(n.S.U(n),r!==void 0&&(r.n=n.n),n.n!==void 0&&(n.n.p=r)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=r}e.s=t}function Ya(e,t){It.call(this,void 0),this.x=e,this.s=void 0,this.g=$c-1,this.f=4,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched,this.name=t==null?void 0:t.name}function $x(e){const t=e.u;if(e.u=void 0,typeof t=="function"){oi++;const n=De;De=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,fh(e),r}finally{De=n,Mc()}}}function fh(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,$x(e)}function CO(e){if(De!==this)throw new Error("Out-of-order effect");Mx(this),De=e,this.f&=-2,8&this.f&&fh(this),Mc()}function Ga(e,t){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=t==null?void 0:t.name}function ss(e,t){const n=new Ga(e,t);try{n.c()}catch(i){throw n.d(),i}const r=n.d.bind(n);return r[Symbol.dispose]=r,r}function Ox(e,t={}){const n={};for(const r in e){const i=t[r],a=NO(i===void 0?e[r]:i);n[r]=a}return n}It.prototype.brand=kO,It.prototype.h=function(){return!0},It.prototype.S=function(e){const t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t!==void 0?t.e=e:Nx(()=>{var n;(n=this.W)==null||n.call(this)}))},It.prototype.U=function(e){if(this.t!==void 0){const t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&Nx(()=>{var r;(r=this.Z)==null||r.call(this)}))}},It.prototype.subscribe=function(e){return ss(()=>{const t=this.value,n=De;De=void 0;try{e(t)}finally{De=n}},{name:"sub"})},It.prototype.valueOf=function(){return this.value},It.prototype.toString=function(){return this.value+""},It.prototype.toJSON=function(){return this.value},It.prototype.peek=function(){const e=De;De=void 0;try{return this.value}finally{De=e}},Object.defineProperty(It.prototype,"value",{get(){const e=Cx(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(dh>100)throw new Error("Cycle detected");this.v=e,this.i++,$c++,oi++;try{for(let t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Mc()}}}}),Ya.prototype=new It,Ya.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===$c))return!0;if(this.g=$c,this.f|=1,this.i>0&&!Ex(this))return this.f&=-2,!0;const e=De;try{Tx(this),De=this;const t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return De=e,Mx(this),this.f&=-2,!0},Ya.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let t=this.s;t!==void 0;t=t.n)t.S.S(t)}It.prototype.S.call(this,e)},Ya.prototype.U=function(e){if(this.t!==void 0&&(It.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Ya.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Ya.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const e=Cx(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Ga.prototype.c=function(){const e=this.S();try{if(8&this.f||this.x===void 0)return;const t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},Ga.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,$x(this),Tx(this),oi++;const e=De;return De=this,CO.bind(this,e)},Ga.prototype.N=function(){2&this.f||(this.f|=2,this.o=os,os=this)},Ga.prototype.d=function(){this.f|=8,1&this.f||fh(this)},Ga.prototype.dispose=function(){this.d()};function EO(e){return(typeof e.nodes=="function"?e.nodes():e.nodes)||[]}U2("format",{parse:e=>typeof e=="number"?e:0});function qe(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Px(e,t){if(e&&t&&!Array.isArray(t)&&typeof e=="object"&&typeof t=="object"){const n=e,r=t;for(const i in r)n[i]=Px(n[i],r[i]);return e}return t}const hh=0,ph=1,Ax=2,gh=3,Oc=4,Xa=5,vh=6,ls=7;function mh(e){return e.id===hh}function Lx(e){return e.id===Ax}function TO(e){return function(t){return t.id===ph}(e)||qe(305,String(e.id),String(ph)),Object.assign(e,{id:Ax})}const MO=new Set;class $O{constructor(t,n){J(this,"builder");J(this,"configs");J(this,"_dependency");J(this,"_peerNameSet");J(this,"extension");J(this,"state");J(this,"_signal");this.builder=t,this.extension=n,this.configs=new Set,this.state={id:hh}}mergeConfigs(){let t=this.extension.config||{};const n=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):lO;for(const r of this.configs)t=n(t,r);return t}init(t){const n=this.state;Lx(n)||qe(306,String(n.id));const r={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},i={...r,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},a=function(s,l,c){return Object.assign(s,{config:l,id:gh,registerState:c})}(n,this.mergeConfigs(),r);let o;this.state=a,this.extension.init&&(o=this.extension.init(t,a.config,r)),this.state=function(s,l,c){return Object.assign(s,{id:Oc,initResult:l,registerState:c})}(a,o,i)}build(t){const n=this.state;let r;n.id!==Oc&&qe(307,String(n.id),String(Xa)),this.extension.build&&(r=this.extension.build(t,n.config,n.registerState));const i={...n.registerState,getOutput:()=>r,getSignal:this.getSignal.bind(this)};this.state=function(a,o,s){return Object.assign(a,{id:Xa,output:o,registerState:s})}(n,r,i)}register(t,n){this._signal=n;const r=this.state;r.id!==Xa&&qe(308,String(r.id),String(Xa));const i=this.extension.register&&this.extension.register(t,r.config,r.registerState);return this.state=function(a){return Object.assign(a,{id:vh})}(r),()=>{const a=this.state;a.id!==ls&&qe(309,String(r.id),String(ls)),this.state=function(o){return Object.assign(o,{id:Xa})}(a),i&&i()}}afterRegistration(t){const n=this.state;let r;return n.id!==vh&&qe(310,String(n.id),String(vh)),this.extension.afterRegistration&&(r=this.extension.afterRegistration(t,n.config,n.registerState)),this.state=function(i){return Object.assign(i,{id:ls})}(n),r}getSignal(){return this._signal===void 0&&qe(311),this._signal}getInitResult(){this.extension.init===void 0&&qe(312,this.extension.name);const t=this.state;return function(n){return n.id>=Oc}(t)||qe(313,String(t.id),String(Oc)),t.initResult}getInitPeer(t){const n=this.builder.extensionNameMap.get(t);return n?n.getExtensionInitDependency():void 0}getExtensionInitDependency(){const t=this.state;return function(n){return n.id>=gh}(t)||qe(314,String(t.id),String(gh)),{config:t.config}}getPeer(t){const n=this.builder.extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}getInitDependency(t){const n=this.builder.getExtensionRep(t);return n===void 0&&qe(315,this.extension.name,t.name),n.getExtensionInitDependency()}getDependency(t){const n=this.builder.getExtensionRep(t);return n===void 0&&qe(315,this.extension.name,t.name),n.getExtensionDependency()}getState(){const t=this.state;return function(n){return n.id>=ls}(t)||qe(316,String(t.id),String(ls)),t}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||MO}getPeerNameSet(){let t=this._peerNameSet;return t||(t=new Set((this.extension.peerDependencies||[]).map(([n])=>n)),this._peerNameSet=t),t}getExtensionDependency(){if(!this._dependency){const t=this.state;(function(n){return n.id>=Xa})(t)||qe(317,this.extension.name),this._dependency={config:t.config,init:t.initResult,output:t.output}}return this._dependency}}const Dx={tag:Hi};function OO(){const e=Ze();e.isEmpty()&&e.append(He())}const PO={config:{setOptions:Dx,updateOptions:Dx},init:({$initialEditorState:e=OO})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:n},r){const i=r.getInitResult();if(!i.initialized){i.initialized=!0;const{$initialEditorState:a}=i;if(O$(a))e.setEditorState(a,n);else if(typeof a=="function")e.update(()=>{a(e)},t);else if(a&&(typeof a=="string"||typeof a=="object")){const o=e.parseEditorState(a);e.setEditorState(o,n)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[Fa,Tr,Pa,La,za]},Ix=Symbol.for("@lexical/extension/LexicalBuilder");function Fx(){}function AO(e){throw e}function Pc(e){return Array.isArray(e)?e:[e]}const yh="0.41.0+prod.esm";let zx=class Dd{constructor(t){J(this,"roots");J(this,"extensionNameMap");J(this,"outgoingConfigEdges");J(this,"incomingEdges");J(this,"conflicts");J(this,"_sortedExtensionReps");J(this,"PACKAGE_VERSION");this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=yh,this.roots=t;for(const n of t)this.addExtension(n)}static fromExtensions(t){const n=[Pc(PO)];for(const r of t)n.push(Pc(r));return new Dd(n)}static maybeFromEditor(t){const n=t[Ix];return n&&(n.PACKAGE_VERSION!==yh&&qe(292,n.PACKAGE_VERSION,yh),n instanceof Dd||qe(293)),n}static fromEditor(t){const n=Dd.maybeFromEditor(t);return n===void 0&&qe(294),n}constructEditor(){const{$initialEditorState:t,onError:n,...r}=this.buildCreateEditorArgs(),i=Object.assign(Tb({...r,...n?{onError:a=>{n(a,i)}}:{}}),{[Ix]:this});for(const a of this.sortedExtensionReps())a.build(i);return i}buildEditor(){let t=Fx;function n(){try{t()}finally{t=Fx}}const r=Object.assign(this.constructEditor(),{dispose:n,[Symbol.dispose]:n});return t=lr(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(t){return this.extensionNameMap.has(t)}getExtensionRep(t){const n=this.extensionNameMap.get(t.name);if(n)return n.extension!==t&&qe(295,t.name),n}addEdge(t,n,r){const i=this.outgoingConfigEdges.get(t);i?i.set(n,r):this.outgoingConfigEdges.set(t,new Map([[n,r]]));const a=this.incomingEdges.get(n);a?a.add(t):this.incomingEdges.set(n,new Set([t]))}addExtension(t){this._sortedExtensionReps!==void 0&&qe(296);const n=Pc(t),[r]=n;typeof r.name!="string"&&qe(297,typeof r.name);let i=this.extensionNameMap.get(r.name);if(i!==void 0&&i.extension!==r&&qe(298,r.name),!i){i=new $O(this,r),this.extensionNameMap.set(r.name,i);const a=this.conflicts.get(r.name);typeof a=="string"&&qe(299,r.name,a);for(const o of r.conflictsWith||[])this.extensionNameMap.has(o)&&qe(299,r.name,o),this.conflicts.set(o,r.name);for(const o of r.dependencies||[]){const s=Pc(o);this.addEdge(r.name,s[0].name,s.slice(1)),this.addExtension(s)}for(const[o,s]of r.peerDependencies||[])this.addEdge(r.name,o,s?[s]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const t=[],n=(r,i)=>{let a=r.state;if(Lx(a))return;const o=r.extension.name;var s;mh(a)||qe(300,o,i||"[unknown]"),mh(s=a)||qe(304,String(s.id),String(hh)),a=Object.assign(s,{id:ph}),r.state=a;const l=this.outgoingConfigEdges.get(o);if(l)for(const c of l.keys()){const u=this.extensionNameMap.get(c);u&&n(u,o)}a=TO(a),r.state=a,t.push(r)};for(const r of this.extensionNameMap.values())mh(r.state)&&n(r);for(const r of t)for(const[i,a]of this.outgoingConfigEdges.get(r.extension.name)||[])if(a.length>0){const o=this.extensionNameMap.get(i);if(o)for(const s of a)o.configs.add(s)}for(const[r,...i]of this.roots)if(i.length>0){const a=this.extensionNameMap.get(r.name);a===void 0&&qe(301,r.name);for(const o of i)a.configs.add(o)}return this._sortedExtensionReps=t,this._sortedExtensionReps}registerEditor(t){const n=this.sortedExtensionReps(),r=new AbortController,i=[()=>r.abort()],a=r.signal;for(const o of n){const s=o.register(t,a);s&&i.push(s)}for(const o of n){const s=o.afterRegistration(t);s&&i.push(s)}return lr(...i)}buildCreateEditorArgs(){const t={},n=new Set,r=new Map,i=new Map,a={},o={},s=this.sortedExtensionReps();for(const u of s){const{extension:d}=u;if(d.onError!==void 0&&(t.onError=d.onError),d.disableEvents!==void 0&&(t.disableEvents=d.disableEvents),d.parentEditor!==void 0&&(t.parentEditor=d.parentEditor),d.editable!==void 0&&(t.editable=d.editable),d.namespace!==void 0&&(t.namespace=d.namespace),d.$initialEditorState!==void 0&&(t.$initialEditorState=d.$initialEditorState),d.nodes)for(const f of EO(d)){if(typeof f!="function"){const g=r.get(f.replace);g&&qe(302,d.name,f.replace.name,g.extension.name),r.set(f.replace,u)}n.add(f)}if(d.html){if(d.html.export)for(const[f,g]of d.html.export.entries())i.set(f,g);d.html.import&&Object.assign(a,d.html.import)}d.theme&&Px(o,d.theme)}Object.keys(o).length>0&&(t.theme=o),n.size&&(t.nodes=[...n]);const l=Object.keys(a).length>0,c=i.size>0;(l||c)&&(t.html={},l&&(t.html.import=a),c&&(t.html.export=i));for(const u of s)u.init(t);return t.onError||(t.onError=AO),t}};function LO(e,t){const n=zx.fromEditor(e).extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}const DO={name:"@lexical/react/ReactProvider"};function IO(){return Ze().getTextContent()}function FO(e,t=!0){if(e)return!1;let n=IO();return t&&(n=n.trim()),n===""}function zO(e){if(!FO(e,!1))return!1;const t=Ze().getChildren(),n=t.length;if(n>1)return!1;for(let r=0;r<n;r++){const i=t[r];if(Ae(i))return!1;if(X(i)){if(!Ff(i)||i.__indent!==0)return!1;const a=i.getChildren(),o=a.length;for(let s=0;s<o;s++){const l=a[r];if(!ce(l))return!1}}}return!0}function Bx(e){return()=>zO(e)}function BO(e){const t=window.location.origin,n=r=>{if(r.origin!==t)return;const i=e.getRootElement();if(document.activeElement!==i)return;const a=r.data;if(typeof a=="string"){let o;try{o=JSON.parse(a)}catch{return}if(o&&o.protocol==="nuanria_messaging"&&o.type==="request"){const s=o.payload;if(s&&s.functionId==="makeChanges"){const l=s.args;if(l){const[c,u,d,f,g]=l;e.update(()=>{const p=ue();if(re(p)){const v=p.anchor;let m=v.getNode(),b=0,y=0;if(ce(m)&&c>=0&&u>=0&&(b=c,y=c+u,p.setTextNodeRange(m,b,m,y)),b===y&&d===""||(p.insertRawText(d),m=v.getNode()),ce(m)){b=f,y=f+g;const x=m.getTextContentSize();b=b>x?x:b,y=y>x?x:y,p.setTextNodeRange(m,b,m,y)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}function bh(e,t){const n=Pb(t)?t.body.childNodes:t.childNodes;let r=[];const i=[];for(const a of n)if(!Ux.has(a.nodeName)){const o=Hx(a,e,i,!1);o!==null&&(r=r.concat(o))}return function(a){for(const o of a)o.getNextSibling()instanceof If&&o.insertAfter(Er());for(const o of a){const s=o.getChildren();for(const l of s)o.insertBefore(l);o.remove()}}(i),r}function jx(e,t){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=Ze().getChildren();for(let i=0;i<r.length;i++)Wx(e,r[i],n,t);return n.innerHTML}function Wx(e,t,n,r=null){let i=r===null||t.isSelected(r);const a=X(t)&&t.excludeFromCopy("html");let o=t;r!==null&&ce(t)&&(o=vx(r,t,"clone"));const s=X(o)?o.getChildren():[],l=jf(e,o.getType());let c;c=l&&l.exportDOM!==void 0?l.exportDOM(e,o):o.exportDOM(e);const{element:u,after:d}=c;if(!u)return!1;const f=document.createDocumentFragment();for(let g=0;g<s.length;g++){const p=s[g],v=Wx(e,p,f,r);!i&&X(t)&&v&&t.extractWithChild(p,r,"html")&&(i=!0)}if(i&&!a){if((it(u)||eh(u))&&u.append(f),n.append(u),d){const g=d.call(o,u);g&&(eh(u)?u.replaceChildren(g):u.replaceWith(g))}}else n.append(f);return i}const Ux=new Set(["STYLE","SCRIPT"]);function Hx(e,t,n,r,i=new Map,a){let o=[];if(Ux.has(e.nodeName))return o;let s=null;const l=function(p,v){const{nodeName:m}=p,b=v._htmlConversions.get(m.toLowerCase());let y=null;if(b!==void 0)for(const x of b){const k=x(p);k!==null&&(y===null||(y.priority||0)<=(k.priority||0))&&(y=k)}return y!==null?y.conversion:null}(e,t),c=l?l(e):null;let u=null;if(c!==null){u=c.after;const p=c.node;if(s=Array.isArray(p)?p[p.length-1]:p,s!==null){for(const[,v]of i)if(s=v(s,a),!s)break;s&&o.push(...Array.isArray(p)?p:[s])}c.forChild!=null&&i.set(e.nodeName,c.forChild)}const d=e.childNodes;let f=[];const g=(s==null||!Xt(s))&&(s!=null&&Mf(s)||r);for(let p=0;p<d.length;p++)f.push(...Hx(d[p],t,n,g,new Map(i),s));return u!=null&&(f=u(f)),wc(e)&&(f=jO(e,f,g?()=>{const p=new If;return n.push(p),p}:He)),s==null?f.length>0?o=o.concat(f):wc(e)&&function(p){return p.nextSibling==null||p.previousSibling==null?!1:th(p.nextSibling)&&th(p.previousSibling)}(e)&&(o=o.concat(Er())):X(s)&&s.append(...f),o}function jO(e,t,n){const r=e.style.textAlign,i=[];let a=[];for(let o=0;o<t.length;o++){const s=t[o];if(Mf(s))r&&!s.getFormat()&&s.setFormat(r),i.push(s);else if(a.push(s),o===t.length-1||o<t.length-1&&Mf(t[o+1])){const l=n();l.setFormat(r),l.append(...a),i.push(l),a=[]}}return i}function Ac(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function WO(e,t=ue()){return t==null&&Ac(166),re(t)&&t.isCollapsed()||t.getNodes().length===0?"":jx(e,t)}function UO(e,t=ue()){return t==null&&Ac(166),re(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(HO(e,t))}function qx(e,t,n){const r=e.getData("application/x-lexical-editor");if(r)try{const s=JSON.parse(r);if(s.namespace===n._config.namespace&&Array.isArray(s.nodes))return Kx(n,qO(s.nodes),t)}catch(s){console.error(s)}const i=e.getData("text/html"),a=e.getData("text/plain");if(i&&a!==i)try{const s=new DOMParser().parseFromString(function(l){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:c=>c}).createHTML(l):l}(i),"text/html");return Kx(n,bh(n,s),t)}catch(s){console.error(s)}const o=a||e.getData("text/uri-list");if(o!=null)if(re(t)){const s=o.split(/(\r?\n|\t)/);s[s.length-1]===""&&s.pop();for(let l=0;l<s.length;l++){const c=ue();if(re(c)){const u=s[l];u===`
261
+ `?r.push(Tr()):o===" "?r.push(Wa()):r.push(pt(o))}this.insertNodes(r)}insertText(t){const n=this.anchor,r=this.focus,i=this.format,a=this.style;let o=n,s=r;!this.isCollapsed()&&r.isBefore(n)&&(o=r,s=n),o.type==="element"&&function(m,x,y,b){const k=m.getNode(),w=k.getChildAtIndex(m.offset),S=pt();if(S.setFormat(y),S.setStyle(b),Kf(w))w.splice(0,0,[S]);else{const N=dt(k)?Ye().append(S):S;w===null?k.append(N):w.insertBefore(N)}m.is(x)&&x.set(S.__key,0,"text"),m.set(S.__key,0,"text")}(o,s,i,a),s.type==="element"&&oi(s,on(cr(s,"next")));const l=o.offset;let c=s.offset;const u=this.getNodes(),d=u.length;let f=u[0];fe(f)||se(26);const g=f.getTextContent().length,p=f.getParentOrThrow();let v=u[d-1];if(d===1&&s.type==="element"&&(c=g,s.set(o.key,c,"text")),this.isCollapsed()&&l===g&&(Pr(f)||!f.canInsertTextAfter()||!p.canInsertTextAfter()&&f.getNextSibling()===null)){let m=f.getNextSibling();if(fe(m)&&m.canInsertTextBefore()&&!Pr(m)||(m=pt(),m.setFormat(i),m.setStyle(a),p.canInsertTextAfter()?f.insertAfter(m):p.insertAfter(m)),m.select(0,0),f=m,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&l===0&&(Pr(f)||!f.canInsertTextBefore()||!p.canInsertTextBefore()&&f.getPreviousSibling()===null)){let m=f.getPreviousSibling();if(fe(m)&&!Pr(m)||(m=pt(),m.setFormat(i),p.canInsertTextBefore()?f.insertBefore(m):p.insertBefore(m)),m.select(),f=m,t!=="")return void this.insertText(t)}else if(f.isSegmented()&&l!==g){const m=pt(f.getTextContent());m.setFormat(i),f.replace(m),f=m}else if(!this.isCollapsed()&&t!==""){const m=v.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||Q(m)&&(!m.canInsertTextBefore()||!m.canInsertTextAfter()))return this.insertText(""),Sb(this.anchor,this.focus),void this.insertText(t)}if(d===1){if(Zi(f)){const b=pt(t);return b.select(),void f.replace(b)}const m=f.getFormat(),x=f.getStyle();if(l!==c||m===i&&x===a){if(wc(f)){const b=pt(t);return b.setFormat(i),b.setStyle(a),b.select(),void f.replace(b)}}else{if(f.getTextContent()!==""){const b=pt(t);if(b.setFormat(i),b.setStyle(a),b.select(),l===0)f.insertBefore(b,!1);else{const[k]=f.splitText(l);k.insertAfter(b,!1)}return void(b.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length))}f.setFormat(i),f.setStyle(a)}const y=c-l;f=f.spliceText(l,y,t,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(this.format=m,this.style=x,f.isComposing()&&(this.anchor.offset-=t.length))}else{const m=new Set([...f.getParentKeys(),...v.getParentKeys()]),x=Q(f)?f:f.getParentOrThrow();let y=Q(v)?v:v.getParentOrThrow(),b=v;if(!x.is(y)&&y.isInline())do b=y,y=y.getParentOrThrow();while(y.isInline());if(s.type==="text"&&(c!==0||v.getTextContent()==="")||s.type==="element"&&v.getIndexWithinParent()<c)if(fe(v)&&!Zi(v)&&c!==v.getTextContentSize()){if(v.isSegmented()){const E=pt(v.getTextContent());v.replace(E),v=E}dt(s.getNode())||s.type!=="text"||(v=v.spliceText(0,c,"")),m.add(v.__key)}else{const E=v.getParentOrThrow();E.canBeEmpty()||E.getChildrenSize()!==1?v.remove():E.remove()}else m.add(v.__key);const k=y.getChildren(),w=new Set(u),S=x.is(y),N=x.isInline()&&f.getNextSibling()===null?x:f;for(let E=k.length-1;E>=0;E--){const C=k[E];if(C.is(f)||Q(C)&&C.isParentOf(f))break;C.isAttached()&&(!w.has(C)||C.is(b)?S||N.insertAfter(C,!1):C.remove())}if(!S){let E=y,C=null;for(;E!==null;){const T=E.getChildren(),O=T.length;(O===0||T[O-1].is(C))&&(m.delete(E.__key),C=E),E=E.getParent()}}if(Zi(f))if(l===g)f.select();else{const E=pt(t);E.select(),f.replace(E)}else f=f.spliceText(l,g-l,t,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(this.format=f.getFormat(),this.style=f.getStyle(),f.isComposing()&&(this.anchor.offset-=t.length));for(let E=1;E<d;E++){const C=u[E],T=C.__key;m.has(T)||C.remove()}}}removeText(){const t=he()===this;zc(this,vO(S1(this))),t&&he()!==this&&$t(this)}formatText(t,n=null){if(this.isCollapsed())return this.toggleFormat(t),void St(null);const r=this.getNodes(),i=[];for(const k of r)fe(k)&&i.push(k);const a=k=>{r.forEach(w=>{if(Q(w)){const S=w.getFormatFlags(t,k);w.setTextFormat(S)}})},o=i.length;if(o===0)return this.toggleFormat(t),St(null),void a(n);const s=this.anchor,l=this.focus,c=this.isBackward(),u=c?l:s,d=c?s:l;let f=0,g=i[0],p=u.type==="element"?0:u.offset;if(u.type==="text"&&p===g.getTextContentSize()&&(f=1,g=i[1],p=0),g==null)return;const v=g.getFormatFlags(t,n);a(v);const m=o-1;let x=i[m];const y=d.type==="text"?d.offset:x.getTextContentSize();if(g.is(x)){if(p===y)return;if(Pr(g)||p===0&&y===g.getTextContentSize())g.setFormat(v);else{const k=g.splitText(p,y),w=p===0?k[0]:k[1];w.setFormat(v),u.type==="text"&&u.set(w.__key,0,"text"),d.type==="text"&&d.set(w.__key,y-p,"text")}return void(this.format=v)}p===0||Pr(g)||([,g]=g.splitText(p),p=0),g.setFormat(v);const b=x.getFormatFlags(t,v);y>0&&(y===x.getTextContentSize()||Pr(x)||([x]=x.splitText(y)),x.setFormat(b));for(let k=f+1;k<m;k++){const w=i[k],S=w.getFormatFlags(t,b);w.setFormat(S)}u.type==="text"&&u.set(g.__key,p,"text"),d.type==="text"&&d.set(x.__key,y,"text"),this.format=v|b}insertNodes(t){if(t.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const p=he();return ae(p)||se(134),p.insertNodes(t)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),r=Nt(n,vn),i=t[t.length-1];if(Q(r)&&"__language"in r){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const p=Wf(this);r.splice(p,0,t),i.selectEnd()}return}if(!t.some(p=>(Q(p)||Ie(p))&&!p.isInline())){Q(r)||se(211,n.constructor.name,n.getType());const p=Wf(this);return r.splice(p,0,t),void i.selectEnd()}const a=function(p){const v=Ye();let m=null;for(let x=0;x<p.length;x++){const y=p[x],b=Ba(y);if(b||Ie(y)&&y.isInline()||Q(y)&&y.isInline()||fe(y)||y.isParentRequired()){if(m===null&&(m=y.createParentElementNode(),v.append(m),b))continue;m!==null&&m.append(y)}else v.append(y),m=null}return v}(t),o=a.getLastDescendant(),s=a.getChildren(),l=!Q(r)||!r.isEmpty()?this.insertParagraph():null,c=s[s.length-1];let u=s[0];var d;Q(d=u)&&vn(d)&&!d.isEmpty()&&Q(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(Q(r)||se(211,n.constructor.name,n.getType()),r.append(...u.getChildren()),u=s[1]),u&&(r===null&&se(212,n.constructor.name,n.getType()),function(p,v){const m=v.getParentOrThrow().getLastChild();let x=v;const y=[v];for(;x!==m;)x.getNextSibling()||se(140),x=x.getNextSibling(),y.push(x);let b=p;for(const k of y)b=b.insertAfter(k)}(r,u));const f=Nt(o,vn);l&&Q(f)&&(l.canMergeWhenEmpty()||vn(c))&&(f.append(...l.getChildren()),l.remove()),Q(r)&&r.isEmpty()&&r.remove(),o.selectEnd();const g=Q(r)?r.getLastChild():null;Ba(g)&&f!==r&&g.remove()}insertParagraph(){if(this.anchor.key==="root"){const o=Ye();return Qe().splice(this.anchor.offset,0,[o]),o.select(),o}const t=Wf(this),n=Nt(this.anchor.getNode(),vn);Q(n)||se(213);const r=n.getChildAtIndex(t),i=r?[r,...r.getNextSiblings()]:[],a=n.insertNewAfter(this,!1);return a?(a.append(...i),a.selectStart(),a):null}insertLineBreak(t){const n=Tr();if(this.insertNodes([n]),t){const r=n.getParentOrThrow(),i=n.getIndexWithinParent();r.select(i,i)}}extract(){const t=[...this.getNodes()],n=t.length;let r=t[0],i=t[n-1];const[a,o]=Ff(this),s=this.isBackward(),[l,c]=s?[this.focus,this.anchor]:[this.anchor,this.focus],[u,d]=s?[o,a]:[a,o];if(n===0)return[];if(n===1){if(fe(r)&&!this.isCollapsed()){const f=r.splitText(u,d),g=u===0?f[0]:f[1];return g?(l.set(g.getKey(),0,"text"),c.set(g.getKey(),g.getTextContentSize(),"text"),[g]):[]}return[r]}if(fe(r)&&(u===r.getTextContentSize()?t.shift():u!==0&&([,r]=r.splitText(u),t[0]=r,l.set(r.getKey(),0,"text"))),fe(i)){const f=i.getTextContent().length;d===0?t.pop():d!==f&&([i]=i.splitText(d),t[t.length-1]=i,c.set(i.getKey(),i.getTextContentSize(),"text"))}return t}modify(t,n,r){if(Pb(this,t,n,r))return;const i=t==="move",a=Ke(),o=gn(an(a));if(!o)return;const s=a._blockCursorElement,l=a._rootElement,c=this.focus.getNode();if(l===null||s===null||!Q(c)||c.isInline()||c.canBeEmpty()||lh(s,a,l),this.dirty){let u=Xa(a,this.anchor.key),d=Xa(a,this.focus.key);this.anchor.type==="text"&&(u=Va(u)),this.focus.type==="text"&&(d=Va(d)),u&&d&&$b(o,u,this.anchor.offset,d,this.focus.offset)}if(function(u,d,f,g){u.modify(d,f,g)}(o,t,n?"backward":"forward",r),o.rangeCount>0){const u=o.getRangeAt(0),d=this.anchor.getNode(),f=dt(d)?d:eO(d);if(this.applyDOMRange(u),this.dirty=!0,!i){const g=this.getNodes(),p=[];let v=!1;for(let m=0;m<g.length;m++){const x=g[m];ih(x,f)?p.push(x):v=!0}if(v&&p.length>0)if(n){const m=p[0];Q(m)?m.selectStart():m.getParentOrThrow().selectStart()}else{const m=p[p.length-1];Q(m)?m.selectEnd():m.getParentOrThrow().selectEnd()}o.anchorNode===u.startContainer&&o.anchorOffset===u.startOffset||function(m){const x=m.focus,y=m.anchor,b=y.key,k=y.offset,w=y.type;y.set(x.key,x.offset,x.type,!0),x.set(b,k,w,!0)}(this)}}r==="lineboundary"&&Pb(this,t,n,r,"decorators")}forwardDeletion(t,n,r){if(!r&&(t.type==="element"&&Q(n)&&t.offset===n.getChildrenSize()||t.type==="text"&&t.offset===n.getTextContentSize())){const i=n.getParent(),a=n.getNextSibling()||(i===null?null:i.getNextSibling());if(Q(a)&&a.isShadowRoot())return!0}return!1}deleteCharacter(t){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,t))return;const a=vh(cr(r,t?"previous":"next"));if(a.getTextSlices().every(s=>s===null||s.distance===0)){let s={type:"initial"};for(const l of a.iterNodeCarets("shadowRoot"))if(Wn(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(s.type==="merge-block")break;if(Q(a.anchor.origin)&&a.anchor.origin.isEmpty()){const c=on(l);zc(this,ai(c,c)),a.anchor.origin.remove()}return}s.type!=="merge-next-block"&&s.type!=="merge-block"||(s={block:s.block,caret:l,type:"merge-block"})}}else{if(s.type==="merge-block")break;if(Ja(l)){if(Q(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(a.anchor.origin))break}else s={block:l.origin,type:"merge-next-block"};continue}if(Ie(l.origin)){if(!l.origin.isIsolated())if(s.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&Q(a.anchor.origin)&&a.anchor.origin.isEmpty()){a.anchor.origin.remove();const c=Cb();c.add(l.origin.getKey()),$t(c)}else l.origin.remove();return}break}}if(s.type==="merge-block"){const{caret:l,block:c}=s;return zc(this,ai(!l.origin.isEmpty()&&c.isEmpty()?Qa(ht(c,l.direction)):a.anchor,l)),this.removeText()}}const o=this.focus;if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&xb(this,r.getNode()))return}else{const s=o.type==="text"?o.getNode():null;if(i=r.type==="text"?r.getNode():null,s!==null&&s.isSegmented()){const l=o.offset,c=s.getTextContentSize();if(s.is(i)||t&&l!==c||!t&&l!==0)return void _b(s,t,l)}else if(i!==null&&i.isSegmented()){const l=r.offset,c=i.getTextContentSize();if(i.is(s)||t&&l!==0||!t&&l!==c)return void _b(i,t,l)}(function(l,c){const u=l.anchor,d=l.focus,f=u.getNode(),g=d.getNode();if(f===g&&u.type==="text"&&d.type==="text"){const p=u.offset,v=d.offset,m=p<v,x=m?p:v,y=m?v:p,b=y-1;x!==b&&function(k){return!(i1(k)||B$(k))}(f.getTextContent().slice(x,y))&&(c?d.set(d.key,b,d.type):u.set(u.key,b,u.type))}})(this,t)}}if(this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&dt(r.getParent())&&r.getPreviousSibling()===null&&xb(this,r)}}deleteLine(t){this.isCollapsed()&&this.modify("extend",t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):this.removeText()}deleteWord(t){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,t))return;this.modify("extend",t,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function Mt(e){return e instanceof kc}function bb(e){const t=e.offset;if(e.type==="text")return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Ff(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[n,r]=t;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[bb(n),bb(r)]}function xb(e,t){for(let n=t;n;n=n.getParent()){if(Q(n)){if(n.collapseAtStart(e))return!0;if(Gt(n))break}if(n.getPreviousSibling())break}return!1}const B$=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function _b(e,t,n){const r=e,i=r.getTextContent().split(/(?=\s)/g),a=i.length;let o=0,s=0;for(let c=0;c<a;c++){const u=c===a-1;if(s=o,o+=i[c].length,t&&o===n||o>n||u){i.splice(c,1),u&&(s=void 0);break}}const l=i.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(s,s))}function wb(e,t,n,r){let i,a=t;if(ot(e)){let o=!1;const s=e.childNodes,l=s.length,c=r._blockCursorElement;a===l&&(o=!0,a=l-1);let u=s[a],d=!1;if(u===c)u=s[a+1],d=!0;else if(c!==null){const f=c.parentNode;e===f&&t>Array.prototype.indexOf.call(f.children,c)&&a--}if(i=Ya(u),fe(i))a=lr(i,o?"next":"previous");else{let f=Ya(e);if(f===null)return null;if(Q(f)){const g=r.getElementByKey(f.getKey());g===null&&se(214),[f,a]=f.getDOMSlot(g).resolveChildIndex(f,g,e,t),Q(f)||se(215),o&&a>=f.getChildrenSize()&&(a=Math.max(0,f.getChildrenSize()-1));let v=f.getChildAtIndex(a);if(Q(v)&&function(m,x,y){const b=m.getParent();return y===null||b===null||!b.canBeEmpty()||b!==y.getNode()}(v,0,n)){const m=o?v.getLastDescendant():v.getFirstDescendant();m===null?f=v:(v=m,f=Q(v)?v:v.getParentOrThrow()),a=0}fe(v)?(i=v,f=null,a=lr(v,o?"next":"previous")):v!==f&&o&&!d&&(Q(f)||se(216),a=Math.min(f.getChildrenSize(),a+1))}else{const g=f.getIndexWithinParent();a=t===0&&Ie(f)&&Ya(e)===f?g:g+1,f=f.getParentOrThrow()}if(Q(f))return ir(f.__key,a,"element")}}else i=Ya(e);return fe(i)?ir(i.__key,lr(i,a,"clamp"),"text"):null}function kb(e,t,n){const r=e.offset,i=e.getNode();if(r===0){const a=i.getPreviousSibling(),o=i.getParent();if(t){if((n||!t)&&a===null&&Q(o)&&o.isInline()){const s=o.getPreviousSibling();fe(s)&&e.set(s.__key,s.getTextContent().length,"text")}}else Q(a)&&!n&&a.isInline()?e.set(a.__key,a.getChildrenSize(),"element"):fe(a)&&e.set(a.__key,a.getTextContent().length,"text")}else if(r===i.getTextContent().length){const a=i.getNextSibling(),o=i.getParent();if(t&&Q(a)&&a.isInline())e.set(a.__key,0,"element");else if((n||t)&&a===null&&Q(o)&&o.isInline()&&!o.canInsertTextAfter()){const s=o.getNextSibling();fe(s)&&e.set(s.__key,0,"text")}}}function Sb(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),i=e.is(t);kb(e,r,i),kb(t,!r,i),i&&t.set(e.key,e.offset,e.type)}}function Nb(e,t,n,r,i,a){if(e===null||n===null||!ls(i,e,n))return null;const o=wb(e,t,ae(a)?a.anchor:null,i);if(o===null)return null;const s=wb(n,r,ae(a)?a.focus:null,i);if(s===null)return null;if(o.type==="element"&&s.type==="element"){const l=Ya(e),c=Ya(n);if(Ie(l)&&Ie(c))return null}return Sb(o,s),[o,s]}function zf(e){return Q(e)&&!e.isInline()}function Eb(e,t,n,r,i,a){const o=ri(),s=new Gi(ir(e,t,i),ir(n,r,a),0,"");return s.dirty=!0,o._selection=s,s}function Bf(){const e=ir("root",0,"element"),t=ir("root",0,"element");return new Gi(e,t,0,"")}function Cb(){return new kc(new Set)}function jf(e,t,n,r){const i=n._window;if(i===null)return null;const a=r||i.event,o=a?a.type:void 0,s=o==="selectionchange",l=!ff&&(s||o==="beforeinput"||o==="compositionstart"||o==="compositionend"||o==="click"&&a&&a.detail===3||o==="drop"||o===void 0);let c,u,d,f;if(ae(e)&&!l)return e.clone();if(t===null)return null;if(c=t.anchorNode,u=t.focusNode,d=t.anchorOffset,f=t.focusOffset,(s||o===void 0)&&ae(e)&&!ls(n,c,u))return e.clone();const g=Nb(c,d,u,f,n,e);if(g===null)return null;const[p,v]=g;let m=0,x="";if(ae(e)){const y=e.anchor;if(p.key===y.key)m=e.format,x=e.style;else{const b=p.getNode();fe(b)?(m=b.getFormat(),x=b.getStyle()):Q(b)&&(m=b.getTextFormat(),x=b.getTextStyle())}}return new Gi(p,v,m,x)}function he(){return ri()._selection}function Ua(){return Ke()._editorState._selection}function Sc(e,t,n,r=1){const i=e.anchor,a=e.focus,o=i.getNode(),s=a.getNode();if(!t.is(o)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const c=i.offset;if(n<=c&&r>0||n<c&&r<0){const u=Math.max(0,c+r);i.set(l,u,"element"),a.set(l,u,"element"),Tb(e)}}else{const c=e.isBackward(),u=c?a:i,d=u.getNode(),f=c?i:a,g=f.getNode();if(t.is(d)){const p=u.offset;(n<=p&&r>0||n<p&&r<0)&&u.set(l,Math.max(0,p+r),"element")}if(t.is(g)){const p=f.offset;(n<=p&&r>0||n<p&&r<0)&&f.set(l,Math.max(0,p+r),"element")}}Tb(e)}function Tb(e){const t=e.anchor,n=t.offset,r=e.focus,i=r.offset,a=t.getNode(),o=r.getNode();if(e.isCollapsed()){if(!Q(a))return;const s=a.getChildrenSize(),l=n>=s,c=l?a.getChildAtIndex(s-1):a.getChildAtIndex(n);if(fe(c)){let u=0;l&&(u=c.getTextContentSize()),t.set(c.__key,u,"text"),r.set(c.__key,u,"text")}return}if(Q(a)){const s=a.getChildrenSize(),l=n>=s,c=l?a.getChildAtIndex(s-1):a.getChildAtIndex(n);if(fe(c)){let u=0;l&&(u=c.getTextContentSize()),t.set(c.__key,u,"text")}}if(Q(o)){const s=o.getChildrenSize(),l=i>=s,c=l?o.getChildAtIndex(s-1):o.getChildAtIndex(i);if(fe(c)){let u=0;l&&(u=c.getTextContentSize()),r.set(c.__key,u,"text")}}}function Nc(e,t,n,r,i){let a=null,o=0,s=null;r!==null?(a=r.__key,fe(r)?(o=r.getTextContentSize(),s="text"):Q(r)&&(o=r.getChildrenSize(),s="element")):i!==null&&(a=i.__key,fe(i)?s="text":Q(i)&&(s="element")),a!==null&&s!==null?e.set(a,o,s):(o=t.getIndexWithinParent(),o===-1&&(o=n.getChildrenSize()),e.set(n.__key,o,"element"))}function Mb(e,t,n,r,i){e.type==="text"?e.set(n,e.offset+(t?0:i),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function $b(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}function Ob(e,t,n){const r=Xa(e,t.getKey());if(Q(t)){const i=t.getDOMSlot(r);return[i.element,n+i.getFirstChildOffset()]}return[r,n]}function j$(e,t,n,r,i,a,o){const s=r.anchorNode,l=r.focusNode,c=r.anchorOffset,u=r.focusOffset,d=document.activeElement;if(i.has(M$)&&d!==a||d!==null&&Zf(d))return;if(!ae(t))return void(e!==null&&ls(n,s,l)&&r.removeAllRanges());const f=t.anchor,g=t.focus,p=f.getNode(),v=g.getNode(),[m,x]=Ob(n,p,f.offset),[y,b]=Ob(n,v,g.offset),k=t.format,w=t.style,S=t.isCollapsed();let N=m,E=y,C=!1;var T,O,P,M,$;if(f.type==="text"?(N=Va(m),C=p.getFormat()!==k||p.getStyle()!==w):ae(e)&&e.anchor.type==="text"&&(C=!0),g.type==="text"&&(E=Va(y)),N!==null&&E!==null&&(S&&(e===null||C||ae(e)&&(e.format!==k||e.style!==w))&&(T=k,O=w,P=x,M=f.key,$=performance.now(),R0=[T,O,P,M,$]),c!==x||u!==b||s!==N||l!==E||r.type==="Range"&&S||(d!==null&&a.contains(d)||i.has(ub)||a.focus({preventScroll:!0}),f.type==="element"))){if($b(r,N,x,E,b),!ni||!t.isCollapsed()||a===null||i.has(ub)||document.activeElement!==null&&a.contains(document.activeElement)||a.focus({preventScroll:!0}),!i.has($$)&&t.isCollapsed()&&a!==null&&a===document.activeElement){const A=ae(t)&&t.anchor.type==="element"?N.childNodes[x]||null:r.rangeCount>0?r.getRangeAt(0):null;if(A!==null){let I;if(A instanceof Text){const j=document.createRange();j.selectNode(A),I=j.getBoundingClientRect()}else I=A.getBoundingClientRect();(function(j,B,H){const F=h1(H),D=ah(F);if(F===null||D===null)return;let{top:W,bottom:Y}=B,U=0,K=0,ee=H;for(;ee!==null;){const ie=ee===F.body;if(ie)U=0,K=an(j).innerHeight;else{const Z=ee.getBoundingClientRect();U=Z.top,K=Z.bottom}let ce=0;if(W<U?ce=-(U-W):Y>K&&(ce=Y-K),ce!==0)if(ie)D.scrollBy(0,ce);else{const Z=ee.scrollTop;ee.scrollTop+=ce;const J=ee.scrollTop-Z;W-=J,Y-=J}if(ie)break;ee=cs(ee)}})(n,I,a)}}Mf=!0}}function W$(e){let t=he()||Ua();t===null&&(t=Qe().selectEnd()),t.insertNodes(e)}function Wf(e){let t=e;e.isCollapsed()||t.removeText();const n=he();ae(n)&&(t=n),ae(t)||se(161);const r=t.anchor;let i=r.getNode(),a=r.offset;for(;!vn(i);){const o=i;if([i,a]=U$(i,a),o.is(i))break}return a}function U$(e,t){const n=e.getParent();if(!n){const i=Ye();return Qe().append(i),i.select(),[Qe(),0]}if(fe(e)){const i=e.splitText(t);if(i.length===0)return[n,e.getIndexWithinParent()];const a=t===0?0:1;return[n,i[0].getIndexWithinParent()+a]}if(!Q(e)||t===0)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const i=new Gi(ir(e.__key,t,"element"),ir(e.__key,t,"element"),0,""),a=e.insertNewAfter(i);a&&a.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}function Pb(e,t,n,r,i="decorators-and-blocks"){if(t==="move"&&r==="character"&&!e.isCollapsed()){const[u,d]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return d.set(u.key,u.offset,u.type),!0}const a=cr(e.focus,n?"previous":"next"),o=r==="lineboundary",s=t==="move";let l=a,c=i==="decorators-and-blocks";if(!E1(l)){for(const u of l){c=!1;const{origin:d}=u;if(!Ie(d)||d.isIsolated()||(l=u,!o||!d.isInline()))break}if(c)for(const u of vh(a).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(Wn(u))u.origin.isInline()||(l=u);else{if(Q(u.origin))continue;Ie(u.origin)&&!u.origin.isInline()&&(l=u)}break}}if(l===a)return!1;if(s&&!o&&Ie(l.origin)&&l.origin.isKeyboardSelectable()){const u=Cb();return u.add(l.origin.getKey()),$t(u),!0}return l=on(l),s&&oi(e.anchor,l),oi(e.focus,l),c||!o}let gt=null,vt=null,Yt=!1,Uf=!1,Ec=0;const Ab={characterData:!0,childList:!0,subtree:!0};function is(){return Yt||gt!==null&&gt._readOnly}function kt(){Yt&&se(13)}function Lb(){Ec>99&&se(14)}function ri(){return gt===null&&se(195,Db()),gt}function Ke(){return vt===null&&se(196,Db()),vt}function Db(){let e=0;const t=new Set,n=Xi.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const a=Tc(i);if(Jf(a))e++;else if(a){let o=String(a.constructor.version||"<0.17.1");o===n&&(o+=" (separately built, likely a bundler configuration issue)"),t.add(o)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function H$(){return vt}function Ib(e,t,n){const r=t.__type,i=Gb(e,r);let a=n.get(r);a===void 0&&(a=Array.from(i.transforms),n.set(r,a));const o=a.length;for(let s=0;s<o&&(a[s](t),t.isAttached());s++);}function Fb(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function zb(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const i of r)n.add(i)}function q$(e){return Hf(e,Ke()._nodes)}function Hf(e,t){const n=e.type,r=t.get(n);r===void 0&&se(17,n);const i=r.klass;e.type!==i.getType()&&se(18,i.name);const a=i.importJSON(e),o=e.children;if(Q(a)&&Array.isArray(o))for(let s=0;s<o.length;s++){const l=Hf(o[s],t);a.append(l)}return a}function Bb(e,t,n){const r=gt,i=Yt,a=vt;gt=t,Yt=!0,vt=e;try{return n()}finally{gt=r,Yt=i,vt=a}}function Or(e,t){const n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return;const a=e._editorState,o=a._selection,s=n._selection,l=e._dirtyType!==0,c=gt,u=Yt,d=vt,f=e._updating,g=e._observer;let p=null;if(e._pendingEditorState=null,e._editorState=n,!i&&l&&g!==null){vt=e,gt=n,Yt=!1,e._updating=!0;try{const S=e._dirtyType,N=e._dirtyElements,E=e._dirtyLeaves;g.disconnect(),p=c$(a,n,e,S,N,E)}catch(S){if(S instanceof Error&&e._onError(S),Uf)throw S;return Kb(e,null,r,n),v0(e),e._dirtyType=2,Uf=!0,Or(e,a),void(Uf=!1)}finally{g.observe(r,Ab),e._updating=f,gt=c,Yt=u,vt=d}}n._readOnly||(n._readOnly=!0);const v=e._dirtyLeaves,m=e._dirtyElements,x=e._normalizedNodes,y=e._updateTags,b=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(S,N){const E=S._decorators;let C=S._pendingDecorators||E;const T=N._nodeMap;let O;for(O in C)T.has(O)||(C===E&&(C=t1(S)),delete C[O])}(e,n);const k=i?null:gn(an(e));if(e._editable&&k!==null&&(l||s===null||s.dirty||!s.is(o))&&r!==null&&!y.has(O$)){vt=e,gt=n;try{if(g!==null&&g.disconnect(),l||s===null||s.dirty){const S=e._blockCursorElement;S!==null&&lh(S,e,r),j$(o,s,e,k,y,r)}(function(S,N,E){let C=S._blockCursorElement;if(ae(E)&&E.isCollapsed()&&E.anchor.type==="element"&&N.contains(document.activeElement)){const T=E.anchor,O=T.getNode(),P=T.offset;let M=!1,$=null;if(P===O.getChildrenSize())sh(O.getChildAtIndex(P-1))&&(M=!0);else{const A=O.getChildAtIndex(P);if(A!==null&&sh(A)){const I=A.getPreviousSibling();(I===null||sh(I))&&(M=!0,$=S.getElementByKey(A.__key))}}if(M){const A=S.getElementByKey(O.__key);return C===null&&(S._blockCursorElement=C=function(I){const j=I.theme,B=document.createElement("div");B.contentEditable="false",B.setAttribute("data-lexical-cursor","true");let H=j.blockCursor;if(H!==void 0){if(typeof H=="string"){const F=si(H);H=j.blockCursor=F}H!==void 0&&B.classList.add(...H)}return B}(S._config)),N.style.caretColor="transparent",void($===null?A.appendChild(C):A.insertBefore(C,$))}}C!==null&&lh(C,S,N)})(e,r,s)}finally{g!==null&&g.observe(r,Ab),vt=d,gt=c}}p!==null&&function(S,N,E,C,T){const O=Array.from(S._listeners.mutation),P=O.length;for(let M=0;M<P;M++){const[$,A]=O[M];for(const I of A){const j=N.get(I);j!==void 0&&$(j,{dirtyLeaves:C,prevEditorState:T,updateTags:E})}}}(e,p,y,v,a),ae(s)||s===null||o!==null&&o.is(s)||e.dispatchCommand(kf,void 0);const w=e._pendingDecorators;w!==null&&(e._decorators=w,e._pendingDecorators=null,as("decorator",e,!0,w)),function(S,N,E){const C=n1(N),T=n1(E);C!==T&&as("textcontent",S,!0,T)}(e,t||a,n),as("update",e,!0,{dirtyElements:m,dirtyLeaves:v,editorState:n,mutatedNodes:p,normalizedNodes:x,prevEditorState:t||a,tags:y}),function(S,N){if(S._deferred=[],N.length!==0){const E=S._updating;S._updating=!0;try{for(let C=0;C<N.length;C++)N[C]()}finally{S._updating=E}}}(e,b),function(S){const N=S._updates;if(N.length!==0){const E=N.shift();if(E){const[C,T]=E;Cc(S,C,T)}}}(e)}function as(e,t,n,...r){const i=t._updating;t._updating=n;try{const a=Array.from(t._listeners[e]);for(let o=0;o<a.length;o++)a[o].apply(null,r)}finally{t._updating=i}}function jb(e,t){const n=e._updates;let r=t||!1;for(;n.length!==0;){const i=n.shift();if(i){const[a,o]=i,s=e._pendingEditorState;let l;o!==void 0&&(l=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete&&(s===null&&se(191),s._flushSync=!0),l&&e._deferred.push(l),zb(e,o.tag)),s==null?Cc(e,a,o):a()}}return r}function Cc(e,t,n){const r=e._updateTags;let i,a=!1,o=!1;n!==void 0&&(i=n.onUpdate,zb(e,n.tag),a=n.skipTransforms||!1,o=n.discrete||!1),i&&e._deferred.push(i);const s=e._editorState;let l=e._pendingEditorState,c=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=qb(l||s),c=!0),l._flushSync=o;const u=gt,d=Yt,f=vt,g=e._updating;gt=l,Yt=!1,e._updating=!0,vt=e;const p=e._headless||e.getRootElement()===null;Gf(null);try{c&&(p?s._selection!==null&&(l._selection=s._selection.clone()):l._selection=function(y,b){const k=y.getEditorState()._selection,w=gn(an(y));return ae(k)||k==null?jf(k,w,y,b):k.clone()}(e,n&&n.event||null));const m=e._compositionKey;t(),a=jb(e,a),function(y,b){const k=b.getEditorState()._selection,w=y._selection;if(ae(w)){const S=w.anchor,N=w.focus;let E;if(S.type==="text"&&(E=S.getNode(),E.selectionTransform(k,w)),N.type==="text"){const C=N.getNode();E!==C&&C.selectionTransform(k,w)}}}(l,e),e._dirtyType!==0&&(a?function(y,b){const k=b._dirtyLeaves,w=y._nodeMap;for(const S of k){const N=w.get(S);fe(N)&&N.isAttached()&&N.isSimpleText()&&!N.isUnmergeable()&&S0(N)}}(l,e):function(y,b){const k=b._dirtyLeaves,w=b._dirtyElements,S=y._nodeMap,N=ii(),E=new Map;let C=k,T=C.size,O=w,P=O.size;for(;T>0||P>0;){if(T>0){b._dirtyLeaves=new Set;for(const M of C){const $=S.get(M);fe($)&&$.isAttached()&&$.isSimpleText()&&!$.isUnmergeable()&&S0($),$!==void 0&&Fb($,N)&&Ib(b,$,E),k.add(M)}if(C=b._dirtyLeaves,T=C.size,T>0){Ec++;continue}}b._dirtyLeaves=new Set,b._dirtyElements=new Map,O.delete("root")&&O.set("root",!0);for(const M of O){const $=M[0],A=M[1];if(w.set($,A),!A)continue;const I=S.get($);I!==void 0&&Fb(I,N)&&Ib(b,I,E)}C=b._dirtyLeaves,T=C.size,O=b._dirtyElements,P=O.size,Ec++}b._dirtyLeaves=k,b._dirtyElements=w}(l,e),jb(e),function(y,b,k,w){const S=y._nodeMap,N=b._nodeMap,E=[];for(const[C]of w){const T=N.get(C);T!==void 0&&(T.isAttached()||(Q(T)&&h0(T,C,S,N,E,w),S.has(C)||w.delete(C),E.push(C)))}for(const C of E)N.delete(C);for(const C of k){const T=N.get(C);T===void 0||T.isAttached()||(S.has(C)||k.delete(C),N.delete(C))}}(s,l,e._dirtyLeaves,e._dirtyElements)),m!==e._compositionKey&&(l._flushSync=!0);const x=l._selection;if(ae(x)){const y=l._nodeMap,b=x.anchor.key,k=x.focus.key;y.get(b)!==void 0&&y.get(k)!==void 0||se(19)}else Mt(x)&&x._nodes.size===0&&(l._selection=null)}catch(m){return m instanceof Error&&e._onError(m),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Or(e)}finally{gt=u,Yt=d,vt=f,e._updating=g,Ec=0}e._dirtyType!==0||e._deferred.length>0||function(m,x){const y=x.getEditorState()._selection,b=m._selection;if(b!==null){if(b.dirty||!b.is(y))return!0}else if(y!==null)return!0;return!1}(l,e)?l._flushSync?(l._flushSync=!1,Or(e)):c&&Z$(()=>{Or(e)}):(l._flushSync=!1,c&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function ar(e,t,n){vt===e&&n===void 0?t():Cc(e,t,n)}class os{constructor(t,n,r){R(this,"element");R(this,"before");R(this,"after");this.element=t,this.before=n||null,this.after=r||null}withBefore(t){return new os(this.element,t,this.after)}withAfter(t){return new os(this.element,this.before,t)}withElement(t){return this.element===t?this:new os(t,this.before,this.after)}insertChild(t){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&se(222),this.element.insertBefore(t,n),this}removeChild(t){return t.parentElement!==this.element&&se(223),this.element.removeChild(t),this}replaceChild(t,n){return n.parentElement!==this.element&&se(224),this.element.replaceChild(t,n),this}getFirstChild(){const t=this.after?this.after.nextSibling:this.element.firstChild;return t===this.before||t===this.getManagedLineBreak()?null:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(t===null)this.removeManagedLineBreak();else{const n=t==="decorator"&&(tc||Ko||ec);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const n=this.element,r=t.nodeName==="IMG"?t.nextSibling:null;r&&n.removeChild(r),n.removeChild(t),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const n=this.getManagedLineBreak();if(n){if(t===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,a=document.createElement("br");if(r.insertBefore(a,i),t){const o=document.createElement("img");o.setAttribute("data-lexical-linebreak","true"),o.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",o.alt="",r.insertBefore(o,a),r.__lexicalLineBreak=o}else r.__lexicalLineBreak=a}getFirstChildOffset(){let t=0;for(let n=this.after;n!==null;n=n.previousSibling)t++;return t}resolveChildIndex(t,n,r,i){if(r===this.element){const l=this.getFirstChildOffset();return[t,Math.min(l+t.getChildrenSize(),Math.max(l,i))]}const a=Wb(n,r);a.push(i);const o=Wb(n,this.element);let s=t.getIndexWithinParent();for(let l=0;l<o.length;l++){const c=a[l],u=o[l];if(c===void 0||c<u)break;if(c>u){s+=1;break}}return[t.getParentOrThrow(),s]}}function Wb(e,t){const n=[];let r=t;for(;r!==e&&r!==null;r=r.parentNode){let i=0;for(let a=r.previousSibling;a!==null;a=a.previousSibling)i++;n.push(i)}return r!==e&&se(225),n.reverse()}class rn extends Bn{constructor(n){super(n);R(this,"__first");R(this,"__last");R(this,"__size");R(this,"__format");R(this,"__style");R(this,"__indent");R(this,"__dir");R(this,"__textFormat");R(this,"__textStyle");this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(n){super.afterCloneFrom(n),this.__key===n.__key&&(this.__first=n.__first,this.__last=n.__last,this.__size=n.__size),this.__indent=n.__indent,this.__format=n.__format,this.__style=n.__style,this.__dir=n.__dir,this.__textFormat=n.__textFormat,this.__textStyle=n.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const n=this.getFormat();return G2[n]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const n=[];let r=this.getFirstChild();for(;r!==null;)n.push(r),r=r.getNextSibling();return n}getChildrenKeys(){const n=[];let r=this.getFirstChild();for(;r!==null;)n.push(r.__key),r=r.getNextSibling();return n}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const n=Ke()._dirtyElements;return n!==null&&n.has(this.__key)}isLastChild(){const n=this.getLatest(),r=this.getParentOrThrow().getLastChild();return r!==null&&r.is(n)}getAllTextNodes(){const n=[];let r=this.getFirstChild();for(;r!==null;){if(fe(r)&&n.push(r),Q(r)){const i=r.getAllTextNodes();n.push(...i)}r=r.getNextSibling()}return n}getFirstDescendant(){let n=this.getFirstChild();for(;Q(n);){const r=n.getFirstChild();if(r===null)break;n=r}return n}getLastDescendant(){let n=this.getLastChild();for(;Q(n);){const r=n.getLastChild();if(r===null)break;n=r}return n}getDescendantByIndex(n){const r=this.getChildren(),i=r.length;if(n>=i){const o=r[i-1];return Q(o)&&o.getLastDescendant()||o||null}const a=r[n];return Q(a)&&a.getFirstDescendant()||a||null}getFirstChild(){const n=this.getLatest().__first;return n===null?null:ft(n)}getFirstChildOrThrow(){const n=this.getFirstChild();return n===null&&se(45,this.__key),n}getLastChild(){const n=this.getLatest().__last;return n===null?null:ft(n)}getLastChildOrThrow(){const n=this.getLastChild();return n===null&&se(96,this.__key),n}getChildAtIndex(n){const r=this.getChildrenSize();let i,a;if(n<r/2){for(i=this.getFirstChild(),a=0;i!==null&&a<=n;){if(a===n)return i;i=i.getNextSibling(),a++}return null}for(i=this.getLastChild(),a=r-1;i!==null&&a>=n;){if(a===n)return i;i=i.getPreviousSibling(),a--}return null}getTextContent(){let n="";const r=this.getChildren(),i=r.length;for(let a=0;a<i;a++){const o=r[a];n+=o.getTextContent(),Q(o)&&a!==i-1&&!o.isInline()&&(n+=nc)}return n}getTextContentSize(){let n=0;const r=this.getChildren(),i=r.length;for(let a=0;a<i;a++){const o=r[a];n+=o.getTextContentSize(),Q(o)&&a!==i-1&&!o.isInline()&&(n+=2)}return n}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(n){if(n!==""){const r=df[n];return(this.getFormat()&r)!==0}return!1}hasTextFormat(n){const r=Bi[n];return(this.getTextFormat()&r)!==0}getFormatFlags(n,r){return Mc(this.getLatest().__textFormat,n,r)}getTextStyle(){return this.getLatest().__textStyle}select(n,r){kt();const i=he();let a=n,o=r;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(n===0&&r===0){const c=this.getFirstChild();if(fe(c)||Q(c))return c.select(0,0)}else if(!(n!==void 0&&n!==s||r!==void 0&&r!==s)){const c=this.getLastChild();if(fe(c)||Q(c))return c.select()}}a===void 0&&(a=s),o===void 0&&(o=s);const l=this.__key;return ae(i)?(i.anchor.set(l,a,"element"),i.focus.set(l,o,"element"),i.dirty=!0,i):Eb(l,a,l,o,"element","element")}selectStart(){const n=this.getFirstDescendant();return n?n.selectStart():this.select()}selectEnd(){const n=this.getLastDescendant();return n?n.selectEnd():this.select()}clear(){const n=this.getWritable();return this.getChildren().forEach(r=>r.remove()),n}append(...n){return this.splice(this.getChildrenSize(),0,n)}setDirection(n){const r=this.getWritable();return r.__dir=n,r}setFormat(n){return this.getWritable().__format=n!==""?df[n]:0,this}setStyle(n){return this.getWritable().__style=n||"",this}setTextFormat(n){const r=this.getWritable();return r.__textFormat=n,r}setTextStyle(n){const r=this.getWritable();return r.__textStyle=n,r}setIndent(n){return this.getWritable().__indent=n,this}splice(n,r,i){bc(this)&&se(324,this.__key,this.__type);const a=this.getChildrenSize(),o=this.getWritable();n+r<=a||se(226,String(n),String(r),String(a));const s=o.__key,l=[],c=[],u=this.getChildAtIndex(n+r);let d=null,f=a-r+i.length;if(n!==0)if(n===a)d=this.getLastChild();else{const p=this.getChildAtIndex(n);p!==null&&(d=p.getPreviousSibling())}if(r>0){let p=d===null?this.getFirstChild():d.getNextSibling();for(let v=0;v<r;v++){p===null&&se(100);const m=p.getNextSibling(),x=p.__key;Ji(p.getWritable()),c.push(x),p=m}}let g=d;for(const p of i){g!==null&&p.is(g)&&(d=g=g.getPreviousSibling());const v=p.getWritable();v.__parent===s&&f--,Ji(v);const m=p.__key;if(g===null)o.__first=m,v.__prev=null;else{const x=g.getWritable();x.__next=m,v.__prev=x.__key}p.__key===s&&se(76),v.__parent=s,l.push(m),g=p}if(n+r===a)g!==null&&(g.getWritable().__next=null,o.__last=g.__key);else if(u!==null){const p=u.getWritable();if(g!==null){const v=g.getWritable();p.__prev=g.__key,v.__next=u.__key}else p.__prev=null}if(o.__size=f,c.length){const p=he();if(ae(p)){const v=new Set(c),m=new Set(l),{anchor:x,focus:y}=p;Ub(x,v,m)&&Nc(x,x.getNode(),this,d,u),Ub(y,v,m)&&Nc(y,y.getNode(),this,d,u),f!==0||this.canBeEmpty()||Gt(this)||this.remove()}}return o}getDOMSlot(n){return new os(n)}exportDOM(n){const{element:r}=super.exportDOM(n);if(ot(r)){const i=this.getIndent();i>0&&(r.style.paddingInlineStart=40*i+"px");const a=this.getDirection();a&&(r.dir=a)}return{element:r}}exportJSON(){const n={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},r=this.getTextFormat(),i=this.getTextStyle();return r===0&&i===""||Gt(this)||this.getChildren().some(fe)||(r!==0&&(n.textFormat=r),i!==""&&(n.textStyle=i)),n}updateFromJSON(n){return super.updateFromJSON(n).setFormat(n.format).setIndent(n.indent).setDirection(n.direction).setTextFormat(n.textFormat||0).setTextStyle(n.textStyle||"")}insertNewAfter(n,r){return null}canIndent(){return!0}collapseAtStart(n){return!1}excludeFromCopy(n){return!1}canReplaceWith(n){return!0}canInsertAfter(n){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(n){return!1}extractWithChild(n,r,i){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(n,r){const i=this.getDOMSlot(n);let a=i.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const s=r.getElementByKey(o.getKey());s!==null&&(a==null?(i.insertChild(s),a=s):a!==s&&i.replaceChild(s,a),a=a.nextSibling)}}}function Q(e){return e instanceof rn}function Ub(e,t,n){let r=e.getNode();for(;r;){const i=r.__key;if(t.has(i)&&!n.has(i))return!0;r=r.getParent()}return!1}class Hb extends Bn{decorate(t,n){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ie(e){return e instanceof Hb}class Ha extends rn{constructor(){super("root");R(this,"__cachedText");this.__cachedText=null}static getType(){return"root"}static clone(){return new Ha}getTopLevelElementOrThrow(){se(51)}getTextContent(){const n=this.__cachedText;return!is()&&Ke()._dirtyType!==0||n===null?super.getTextContent():n}remove(){se(52)}replace(n){se(53)}insertBefore(n){se(54)}insertAfter(n){se(55)}updateDOM(n,r){return!1}splice(n,r,i){for(const a of i)Q(a)||Ie(a)||se(282);return super.splice(n,r,i)}static importJSON(n){return Qe().updateFromJSON(n)}collapseAtStart(){return!0}}function dt(e){return e instanceof Ha}function qb(e){return new ss(new Map(e._nodeMap))}function qf(){return new ss(new Map([["root",new Ha]]))}function Vb(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&se(130,n.name),Q(e)){const r=t.children;Array.isArray(r)||se(59,n.name);const i=e.getChildren();for(let a=0;a<i.length;a++){const o=Vb(i[a]);r.push(o)}}return t}function V$(e){return e instanceof ss}class ss{constructor(t,n){R(this,"_nodeMap");R(this,"_selection");R(this,"_flushSync");R(this,"_readOnly");this._nodeMap=t,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,n){return Bb(n&&n.editor||null,this,t)}clone(t){const n=new ss(this._nodeMap,t===void 0?this._selection:t);return n._readOnly=!0,n}toJSON(){return Bb(null,this,()=>({root:Vb(Qe())}))}}class Vf extends rn{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}}class qa extends rn{static getType(){return"paragraph"}static clone(t){return new qa(t.__key)}createDOM(t){const n=document.createElement("p"),r=Ga(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:t=>({conversion:K$,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(ot(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r)}return{element:n}}static importJSON(t){return Ye().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(t.textFormat===void 0||t.textStyle===void 0){const n=this.getChildren().find(fe);n?(t.textFormat=n.getFormat(),t.textStyle=n.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,n){const r=Ye();r.setTextFormat(t.format),r.setTextStyle(t.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const t=this.getChildren();if(t.length===0||fe(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function K$(e){const t=Ye();if(e.style&&(t.setFormat(e.style.textAlign),dh(e,t)),t.getFormatType()===""){const n=e.getAttribute("align");n&&n&&n in df&&t.setFormat(n)}return{node:t}}function Ye(){return jn(new qa)}function Kf(e){return e instanceof qa}const Te=0,or=1,Y$=4;function Kb(e,t,n,r){const i=e._keyToDOMMap;i.clear(),e._editorState=qf(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const a=e._observer;a!==null&&(a.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function G$(e){const t=new Set,n=new Set;let r=e;for(;r;){const{ownNodeConfig:i}=Dc(r),a=r.transform;if(!n.has(a)){n.add(a);const o=r.transform();o&&t.add(o)}if(i){const o=i.$transform;o&&t.add(o),r=i.extends}else{const o=Object.getPrototypeOf(r);r=o.prototype instanceof Bn&&o!==Bn?o:void 0}}return t}function Yb(e){const t=e||{},n=H$(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,a=t.disableEvents||!1,o=qf(),s=t.namespace||(i!==null?i._config.namespace:a1()),l=t.editorState,c=[Ha,Mr,za,ja,qa,Vf,...t.nodes||[]],{onError:u,html:d}=t,f=t.editable===void 0||t.editable;let g;if(e===void 0&&n!==null)g=n._nodes;else{g=new Map;for(let v=0;v<c.length;v++){let m=c[v],x=null,y=null;if(typeof m!="function"){const w=m;m=w.replace,x=w.with,y=w.withKlass||null}Dc(m);const b=m.getType(),k=G$(m);g.set(b,{exportDOM:d&&d.export?d.export.get(m):void 0,klass:m,replace:x,replaceWithKlass:y,sharedNodeState:r$(c[v]),transforms:k})}}const p=new Xi(o,i,g,{disableEvents:a,namespace:s,theme:r},u||console.error,function(v,m){const x=new Map,y=new Set,b=k=>{Object.keys(k).forEach(w=>{let S=x.get(w);S===void 0&&(S=[],x.set(w,S)),S.push(k[w])})};return v.forEach(k=>{const w=k.klass.importDOM;if(w==null||y.has(w))return;y.add(w);const S=w.call(k.klass);S!==null&&b(S)}),m&&b(m),x}(g,d?d.import:void 0),f,e);return l!==void 0&&(p._pendingEditorState=l,p._dirtyType=2),function(v){v.registerCommand(A0,_$,Te),v.registerCommand(L0,w$,Te),v.registerCommand(D0,k$,Te),v.registerCommand(I0,S$,Te),v.registerCommand(F0,N$,Te)}(p),p}class Xi{constructor(t,n,r,i,a,o,s,l){R(this,"_headless");R(this,"_parentEditor");R(this,"_rootElement");R(this,"_editorState");R(this,"_pendingEditorState");R(this,"_compositionKey");R(this,"_deferred");R(this,"_keyToDOMMap");R(this,"_updates");R(this,"_updating");R(this,"_listeners");R(this,"_commands");R(this,"_nodes");R(this,"_decorators");R(this,"_pendingDecorators");R(this,"_config");R(this,"_dirtyType");R(this,"_cloneNotNeeded");R(this,"_dirtyLeaves");R(this,"_dirtyElements");R(this,"_normalizedNodes");R(this,"_updateTags");R(this,"_observer");R(this,"_key");R(this,"_onError");R(this,"_htmlConversions");R(this,"_window");R(this,"_editable");R(this,"_blockCursorElement");R(this,"_createEditorArgs");this._createEditorArgs=l,this._parentEditor=n,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=a1(),this._onError=a,this._htmlConversions=o,this._editable=s,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){const n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){const n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){const n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){const n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){const n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&se(35);const i=this._commands;i.has(t)||i.set(t,[new Set,new Set,new Set,new Set,new Set]);const a=i.get(t);a===void 0&&se(36,String(t));const o=a[r];return o.add(n),()=>{o.delete(n),a.every(s=>s.size===0)&&i.delete(t)}}registerMutationListener(t,n,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,a=this._listeners.mutation;let o=a.get(n);o===void 0&&(o=new Set,a.set(n,o)),o.add(i);const s=r&&r.skipInitialization;return s!==void 0&&s||this.initializeMutationListener(n,i),()=>{o.delete(i),o.size===0&&a.delete(n)}}getRegisteredNode(t){const n=this._nodes.get(t.getType());return n===void 0&&se(37,t.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,n){const r=this._editorState,i=m1(r).get(n.getType());if(!i)return;const a=new Map;for(const o of i.keys())a.set(o,"created");a.size>0&&t(a,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,n){const r=this.getRegisteredNode(t);return r.transforms.add(n),r}registerNodeTransform(t,n){const r=this.registerNodeTransformToKlass(t,n),i=[r],a=r.replaceWithKlass;if(a!=null){const o=this.registerNodeTransformToKlass(a,n);i.push(o)}return function(o,s){const l=m1(o.getEditorState()),c=[];for(const u of s){const d=l.get(u);d&&c.push(d)}c.length!==0&&o.update(()=>{for(const u of c)for(const d of u.keys()){const f=ft(d);f&&f.markDirty()}},o._pendingEditorState===null?{tag:Yi}:void 0)}(this,i.map(o=>o.klass.getType())),()=>{i.forEach(o=>o.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return pe(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const n=this._rootElement;if(t!==n){const r=Ga(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,Kb(this,n,t,i),n!==null&&(this._config.disableEvents||E$(n),r!=null&&n.classList.remove(...r)),t!==null){const a=ah(t),o=t.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=a,this._dirtyType=2,v0(this),this._updateTags.add(Yi),Or(this),this._config.disableEvents||function(s,l){const c=s.ownerDocument;Tf.set(s,c);const u=pc.get(c)??0;u<1&&c.addEventListener("selectionchange",ob),pc.set(c,u+1),s.__lexicalEditor=l;const d=ab(s);for(let f=0;f<Cf.length;f++){const[g,p]=Cf[f],v=typeof p=="function"?m=>{lb(m)||(sb(m),(l.isEditable()||g==="click")&&p(m,l))}:m=>{if(lb(m))return;sb(m);const x=l.isEditable();switch(g){case"cut":return x&&pe(l,Nf,m);case"copy":return pe(l,hc,m);case"paste":return x&&pe(l,cc,m);case"dragstart":return x&&pe(l,X0,m);case"dragover":return x&&pe(l,Z0,m);case"dragend":return x&&pe(l,g$,m);case"focus":return x&&pe(l,y$,m);case"blur":return x&&pe(l,b$,m);case"drop":return x&&pe(l,G0,m)}};s.addEventListener(g,v),d.push(()=>{s.removeEventListener(g,v)})}}(t,this),r!=null&&t.classList.add(...r)}else this._window=null,this._updateTags.add(Yi),Or(this);as("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&se(38);let r=t;r._readOnly&&(r=qb(t),r._selection=t._selection?t._selection.clone():null),g0(this);const i=this._pendingEditorState,a=this._updateTags,o=n!==void 0?n.tag:null;i===null||i.isEmpty()||(o!=null&&a.add(o),Or(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,o!=null&&a.add(o),this._updating||Or(this)}parseEditorState(t,n){return function(r,i,a){const o=qf(),s=gt,l=Yt,c=vt,u=i._dirtyElements,d=i._dirtyLeaves,f=i._cloneNotNeeded,g=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,gt=o,Yt=!1,vt=i,Gf(null);try{const p=i._nodes;Hf(r.root,p),a&&a(),o._readOnly=!0}catch(p){p instanceof Error&&i._onError(p)}finally{i._dirtyElements=u,i._dirtyLeaves=d,i._cloneNotNeeded=f,i._dirtyType=g,gt=s,Yt=l,vt=c}return o}(typeof t=="string"?JSON.parse(t):t,this,n)}read(t){return Or(this),this.getEditorState().read(t,{editor:this})}update(t,n){(function(r,i,a){r._updating?r._updates.push([i,a]):Cc(r,i,a)})(this,t,n)}focus(t,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),ar(this,()=>{const i=he(),a=Qe();i!==null?i.dirty||$t(i.clone()):a.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?a.selectStart():a.selectEnd()),rh("focus"),R$(()=>{r.removeAttribute("autocapitalize"),t&&t()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const n=gn(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,as("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}R(Xi,"version"),Xi.version="0.41.0+prod.esm";let Yf=null;function Gf(e){Yf=e}let X$=1;function Gb(e,t){const n=Xf(e,t);return n===void 0&&se(30,t),n}function Xf(e,t){return e._nodes.get(t)}const Z$=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function Xb(e){return Ie(Ka(e))}function Zf(e){const t=document.activeElement;if(!ot(t))return!1;const n=t.nodeName;return Ie(Ka(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&Tc(t)==null)}function ls(e,t,n){const r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!Zf(t)&&Zb(t)===e}catch{return!1}}function Jf(e){return e instanceof Xi}function Zb(e){let t=e;for(;t!=null;){const n=Tc(t);if(Jf(n))return n;t=cs(t)}return null}function Tc(e){return e?e.__lexicalEditor:null}function Zi(e){return wc(e)||e.isToken()}function Pr(e){return Zi(e)||e.isSegmented()}function Ar(e){return Za(e)&&e.nodeType===3}function Jb(e){return Za(e)&&e.nodeType===9}function Va(e){let t=e;for(;t!=null;){if(Ar(t))return t;t=t.firstChild}return null}function Mc(e,t,n){const r=Bi[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t==="subscript"?i&=-65:t==="superscript"?i&=-33:t==="lowercase"?(i&=-513,i&=-1025):t==="uppercase"?(i&=-257,i&=-1025):t==="capitalize"&&(i&=-257,i&=-513),i}function Qb(e){return fe(e)||Ba(e)||Ie(e)}function Rb(e,t){const n=function(){const o=Yf;return Yf=null,o}();if((t=t||n&&n.__key)!=null)return void(e.__key=t);kt(),Lb();const r=Ke(),i=ri(),a=""+X$++;i._nodeMap.set(a,e),Q(e)?r._dirtyElements.set(a,!0):r._dirtyLeaves.add(a),r._cloneNotNeeded.add(a),r._dirtyType=1,e.__key=a}function Ji(e){const t=e.getParent();if(t!==null){const n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),a=e.getNextSibling(),o=a!==null?a.__key:null,s=i!==null?i.__key:null,l=i!==null?i.getWritable():null,c=a!==null?a.getWritable():null;i===null&&(r.__first=o),a===null&&(r.__last=s),l!==null&&(l.__next=o),c!==null&&(c.__prev=s),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function $c(e){Lb(),bc(e)&&se(323,e.__key,e.__type);const t=e.getLatest(),n=t.__parent,r=ri(),i=Ke(),a=r._nodeMap,o=i._dirtyElements;n!==null&&function(l,c,u){let d=l;for(;d!==null;){if(u.has(d))return;const f=c.get(d);if(f===void 0)break;u.set(d,!1),d=f.__parent}}(n,a,o);const s=t.__key;i._dirtyType=1,Q(e)?o.set(s,!0):i._dirtyLeaves.add(s)}function St(e){kt();const t=Ke(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){const r=ft(n);r!==null&&r.getWritable()}if(e!==null){const r=ft(e);r!==null&&r.getWritable()}}}function ii(){return is()?null:Ke()._compositionKey}function ft(e,t){const n=(t||ri())._nodeMap.get(e);return n===void 0?null:n}function e1(e,t){const n=Oc(e,Ke());return n!==void 0?ft(n,t):null}function Oc(e,t){return e[`__lexicalKey_${t._key}`]}function Ka(e,t){let n=e;for(;n!=null;){const r=e1(n,t);if(r!==null)return r;n=cs(n)}return null}function t1(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function n1(e){return e.read(()=>Qe().getTextContent())}function Qe(){return r1(ri())}function r1(e){return e._nodeMap.get("root")}function $t(e){kt();const t=ri();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function Ya(e){const t=Ke(),n=function(r,i){let a=r;for(;a!=null;){const o=Oc(a,i);if(o!==void 0)return o;a=cs(a)}return null}(e,t);return n===null?e===t.getRootElement()?ft("root"):null:ft(n)}function i1(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Qf(e){const t=[];let n=e;for(;n!==null;)t.push(n),n=n._parentEditor;return t}function a1(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function o1(e){return Ar(e)?e.nodeValue:null}function Rf(e,t,n){const r=gn(an(t));if(r===null)return;const i=r.anchorNode;let{anchorOffset:a,focusOffset:o}=r;if(i!==null){let s=o1(i);const l=Ka(i);if(s!==null&&fe(l)){if((s===Yo||s===uf)&&n){const c=n.length;s=n,a=c,o=c}s!==null&&eh(l,s,a,o,e)}}}function eh(e,t,n,r,i){let a=e;if(a.isAttached()&&(i||!a.isDirty())){const o=a.isComposing();let s=t;if((o||i)&&(t.endsWith(Yo)&&(s=t.slice(0,-Yo.length)),i)){const c=uf;let u;for(;(u=s.indexOf(c))!==-1;)s=s.slice(0,u)+s.slice(u+c.length),n!==null&&n>u&&(n=Math.max(u,n-c.length)),r!==null&&r>u&&(r=Math.max(u,r-c.length))}const l=a.getTextContent();if(i||s!==l){if(s===""){if(St(null),ec||Ko||tc)a.remove();else{const v=Ke();setTimeout(()=>{v.update(()=>{a.isAttached()&&a.remove()})},20)}return}const c=a.getParent(),u=Ua(),d=a.getTextContentSize(),f=ii(),g=a.getKey();if(a.isToken()||f!==null&&g===f&&!o||ae(u)&&(c!==null&&!c.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===e.__key&&u.anchor.offset===0&&!a.canInsertTextBefore()&&!o||u.focus.key===e.__key&&u.focus.offset===d&&!a.canInsertTextAfter()&&!o))return void a.markDirty();const p=he();if(!ae(p)||n===null||r===null)return void s1(a,s,p);if(p.setTextNodeRange(a,n,a,r),a.isSegmented()){const v=pt(a.getTextContent());a.replace(v),a=v}s1(a,s,p)}}}function s1(e,t,n){if(e.setTextContent(t),ae(n)){const r=e.getKey();for(const i of["anchor","focus"]){const a=n[i];a.type==="text"&&a.key===r&&(a.offset=lr(e,a.offset,"clamp"))}}}function Pc(e,t,n){const r=t[n]||!1;return r==="any"||r===e[n]}function J$(e,t){return Pc(e,t,"altKey")&&Pc(e,t,"ctrlKey")&&Pc(e,t,"shiftKey")&&Pc(e,t,"metaKey")}function He(e,t,n){if(!J$(e,n))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||e.key.length===1&&e.key.charCodeAt(0)<=127)return!1;const r="Key"+t.toUpperCase();return e.code===r}const Lr={ctrlKey:!Fn,metaKey:Fn},l1={altKey:Fn,ctrlKey:!Fn};function c1(e){return e.key==="Backspace"}function u1(e){return He(e,"a",Lr)}function Q$(e){const t=Qe();if(ae(e)){const n=e.anchor,r=e.focus,i=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),ji(e),e}{const n=t.select(0,t.getChildrenSize());return $t(ji(n)),n}}function Ga(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;const i=e[t];if(typeof i=="string"){const a=si(i);return n[t]=a,a}return i}function th(e,t,n,r,i){if(n.size===0)return;const a=r.__type,o=r.__key,s=t.get(a);s===void 0&&se(33,a);const l=s.klass;let c=e.get(l);c===void 0&&(c=new Map,e.set(l,c));const u=c.get(o),d=u==="destroyed"&&i==="created";(u===void 0||d)&&c.set(o,d?"updated":i)}function d1(e,t,n){const r=e.getParent();let i=n,a=e;return r!==null&&(t&&n===0?(i=a.getIndexWithinParent(),a=r):t||n!==a.getChildrenSize()||(i=a.getIndexWithinParent()+1,a=r)),a.getChildAtIndex(t?i-1:i)}function nh(e,t){const n=e.offset;if(e.type==="element")return d1(e.getNode(),t,n);{const r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){const i=t?r.getPreviousSibling():r.getNextSibling();return i===null?d1(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):i}}return null}function f1(e){const t=an(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function pe(e,t,n){return function(r,i,a){const o=Qf(r);for(let s=4;s>=0;s--)for(let l=0;l<o.length;l++){const c=o[l],u=c._commands.get(i);if(u!==void 0){const d=u[s];if(d!==void 0){const f=Array.from(d),g=f.length;let p=!1;if(ar(c,()=>{for(let v=0;v<g;v++)if(f[v](a,r))return void(p=!0)}),p)return p}}}return!1}(e,t,n)}function Xa(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&se(75,t),n}function cs(e){const t=e.assignedSlot||e.parentElement;return ch(t)?t.host:t}function h1(e){return Jb(e)?e:ot(e)?e.ownerDocument:null}function rh(e){kt(),Ke()._updateTags.add(e)}function R$(e){kt(),Ke()._deferred.push(e)}function ih(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function ah(e){const t=h1(e);return t?t.defaultView:null}function an(e){const t=e._window;return t===null&&se(78),t}function eO(e){let t=e.getParentOrThrow();for(;t!==null;){if(Gt(t))return t;t=t.getParentOrThrow()}return t}function Gt(e){return dt(e)||Q(e)&&e.isShadowRoot()}function p1(e){const t=e.constructor.clone(e);return Rb(t,null),t.afterCloneFrom(e),t}function jn(e){const t=Ke(),n=e.getType(),r=Xf(t,n);r===void 0&&se(200,e.constructor.name,n);const{replace:i,replaceWithKlass:a}=r;if(i!==null){const o=i(e),s=o.constructor;return a!==null?o instanceof a||se(201,a.name,a.getType(),s.name,s.getType(),e.constructor.name,n):o instanceof e.constructor&&s!==e.constructor||se(202,s.name,s.getType(),e.constructor.name,n),o.__key===e.__key&&se(203,e.constructor.name,n,s.name,s.getType()),o}return e}function oh(e,t){!dt(e.getParent())||Q(t)||Ie(t)||se(99)}function tO(e){const t=ft(e);return t===null&&se(63,e),t}function sh(e){return(Ie(e)||Q(e)&&!e.canBeEmpty())&&!e.isInline()}function lh(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}function gn(e){return In?(e||window).getSelection():null}function nO(e){const t=ah(e);return t?t.getSelection():null}function g1(e){return ot(e)&&e.tagName==="A"}function ot(e){return Za(e)&&e.nodeType===1}function Za(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function ch(e){return Za(e)&&e.nodeType===11}function uh(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return e.nodeName.match(t)!==null}function Ac(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return e.nodeName.match(t)!==null}function vn(e){if(Ie(e)&&!e.isInline())return!0;if(!Q(e)||Gt(e))return!1;const t=e.getFirstChild(),n=t===null||Ba(t)||fe(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function Lc(){return Ke()}const v1=new WeakMap,rO=new Map;function m1(e){if(!e._readOnly&&e.isEmpty())return rO;e._readOnly||se(192);let t=v1.get(e);return t||(t=function(n){const r=new Map;for(const[i,a]of n._nodeMap){const o=a.__type;let s=r.get(o);s||(s=new Map,r.set(o,s)),s.set(i,a)}return r}(e),v1.set(e,t)),t}function y1(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function iO(e){return(t=y1(e))[cb]=!0,t;var t}function dh(e,t){const n=parseInt(e.style.paddingInlineStart,10)||0,r=Math.round(n/40);t.setIndent(r)}function aO(e){return e.__lexicalUnmanaged===!0}function us(e,t){return function(n,r){return Object.prototype.hasOwnProperty.call(n,r)}(e,t)&&e[t]!==Bn[t]}function Dc(e){const t=f0 in e.prototype?e.prototype[f0]():void 0,n=function(o){if(!(o===Bn||o.prototype instanceof Bn)){let s="<unknown>",l="<unknown>";try{s=o.getType()}catch{}try{Xi.version&&(l=JSON.parse(Xi.version))}catch{}se(290,o.name,s,l)}return o===Hb||o===rn||o===Bn}(e),r=!n&&us(e,"getType")?e.getType():void 0;let i,a=r;if(t)if(r)i=t[r];else for(const[o,s]of Object.entries(t))a=o,i=s;if(!n&&a&&(us(e,"getType")||(e.getType=()=>a),us(e,"clone")||(e.clone=o=>(Gf(o),new e)),us(e,"importJSON")||(e.importJSON=i&&i.$importJSON||(o=>new e().updateFromJSON(o))),!us(e,"importDOM")&&i)){const{importDOM:o}=i;o&&(e.importDOM=()=>o)}return{ownNodeConfig:i,ownNodeType:a}}function oO(e){const t=Lc();return kt(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}const Nt=(e,t)=>{let n=e;for(;n!=null&&!dt(n);){if(t(n))return n;n=n.getParent()}return null},sO={next:"previous",previous:"next"};class fh{constructor(t){R(this,"origin");this.origin=t}[Symbol.iterator](){return x1({hasNext:Ja,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return ht(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return ht(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,n){const r=this.getNodeAtCaret();return t.is(this.origin)||t.is(r)||(r===null?this.insert(t):r.replace(t,n)),this}splice(t,n,r="next"){const i=r===this.direction?n:Array.from(n).reverse();let a=this;const o=this.getParentAtCaret(),s=new Map;for(let l=a.getAdjacentCaret();l!==null&&s.size<t;l=l.getAdjacentCaret()){const c=l.origin.getWritable();s.set(c.getKey(),c)}for(const l of i){if(s.size>0){const c=a.getNodeAtCaret();if(c){if(s.delete(c.getKey()),s.delete(l.getKey()),!(c.is(l)||a.origin.is(l))){const u=l.getParent();u&&u.is(o)&&l.remove(),c.replace(l)}}else c===null&&se(263,Array.from(s).join(" "))}else a.insert(l);a=ht(l,this.direction)}for(const l of s.values())l.remove();return this}}class ds extends fh{constructor(){super(...arguments);R(this,"type","child")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:mn(n,this.direction)}getParentCaret(n="root"){return ht(hh(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=Qi(this.direction);return ht(this.getNodeAtCaret(),n)||mn(this.origin,n)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(n){return n instanceof ds&&this.direction===n.direction&&this.origin.is(n.origin)}isSamePointCaret(n){return this.isSameNodeCaret(n)}}const lO={root:dt,shadowRoot:Gt};function Qi(e){return sO[e]}function hh(e,t="root"){return lO[t](e)?null:e}class Ri extends fh{constructor(){super(...arguments);R(this,"type","sibling")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:ht(n,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return Q(this.origin)?mn(this.origin,this.direction):null}getParentCaret(n="root"){return ht(hh(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=Qi(this.direction);return ht(this.getNodeAtCaret(),n)||mn(this.origin.getParentOrThrow(),n)}isSamePointCaret(n){return n instanceof Ri&&this.direction===n.direction&&this.origin.is(n.origin)}isSameNodeCaret(n){return(n instanceof Ri||n instanceof ea)&&this.direction===n.direction&&this.origin.is(n.origin)}}class ea extends fh{constructor(n,r){super(n);R(this,"type","text");R(this,"offset");this.offset=r}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:ta(n,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(n="root"){return ht(hh(this.getParentAtCaret(),n),this.direction)}getFlipped(){return ta(this.origin,Qi(this.direction),this.offset)}isSamePointCaret(n){return n instanceof ea&&this.direction===n.direction&&this.origin.is(n.origin)&&this.offset===n.offset}isSameNodeCaret(n){return(n instanceof Ri||n instanceof ea)&&this.direction===n.direction&&this.origin.is(n.origin)}getSiblingCaret(){return ht(this.origin,this.direction)}}function sr(e){return e instanceof ea}function Ja(e){return e instanceof Ri}function Wn(e){return e instanceof ds}const cO={next:class extends ea{constructor(){super(...arguments);R(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends ea{constructor(){super(...arguments);R(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},uO={next:class extends Ri{constructor(){super(...arguments);R(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Ri{constructor(){super(...arguments);R(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},dO={next:class extends ds{constructor(){super(...arguments);R(this,"direction","next")}getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends ds{constructor(){super(...arguments);R(this,"direction","previous")}getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function ht(e,t){return e?new uO[t](e):null}function ta(e,t,n){return e?new cO[t](e,lr(e,n)):null}function lr(e,t,n="error"){const r=e.getTextContentSize();let i=t==="next"?r:t==="previous"?0:t;return(i<0||i>r)&&(n!=="clamp"&&c0(284,String(t),String(r),e.getKey()),i=i<0?0:r),i}function b1(e,t){return new hO(e,t)}function mn(e,t){return Q(e)?new dO[t](e):null}function fO(e){return e&&e.getChildCaret()||e}function ph(e){return e&&fO(e.getAdjacentCaret())}class gh{constructor(t,n,r){R(this,"type","node-caret-range");R(this,"direction");R(this,"anchor");R(this,"focus");this.anchor=t,this.focus=n,this.direction=r}getLatest(){const t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new gh(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=i=>{const a=this[i].getLatest();return sr(a)?function(o,s){const{direction:l,origin:c}=o,u=lr(c,s==="focus"?Qi(l):l);return b1(o,u-o.offset)}(a,i):null},n=t("anchor"),r=t("focus");if(n&&r){const{caret:i}=n,{caret:a}=r;if(i.isSameNodeCaret(a))return[b1(i,a.offset-i.offset),null]}return[n,r]}iterNodeCarets(t="root"){const n=sr(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=sr(r),a=o=>o.isSameNodeCaret(r)?null:ph(o)||o.getParentCaret(t);return x1({hasNext:o=>o!==null&&!(i&&r.isSameNodeCaret(o)),initial:n.isSameNodeCaret(r)?null:a(n),map:o=>o,step:a})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class hO{constructor(t,n){R(this,"type","slice");R(this,"caret");R(this,"distance");this.caret=t,this.distance=n}getSliceIndices(){const{distance:t,caret:{offset:n}}=this,r=n+t;return r<n?[r,n]:[n,r]}getTextContent(){const[t,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(t,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:t,direction:n}}=this,[r,i]=this.getSliceIndices(),a=t.getTextContent();return ta(t.setTextContent(a.slice(0,r)+a.slice(i)),n,r)}}function vh(e){return ai(e,ht(Qe(),e.direction))}function pO(e){return ai(e,e)}function ai(e,t){return e.direction!==t.direction&&se(265),new gh(e,t,e.direction)}function x1(e){const{initial:t,hasNext:n,step:r,map:i}=e;let a=t;return{[Symbol.iterator](){return this},next(){if(!n(a))return{done:!0,value:void 0};const o={done:!1,value:i(a)};return a=r(a),o}}}function _1(e,t){const n=Fc(e.origin,t.origin);switch(n===null&&se(275,e.origin.getKey(),t.origin.getKey()),n.type){case"same":{const r=e.type==="text",i=t.type==="text";return r&&i?function(a,o){return Math.sign(a-o)}(e.offset,t.offset):e.type===t.type?0:r?-1:i?1:e.type==="child"?-1:1}case"ancestor":return e.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return w1(n)}}function w1(e){const{a:t,b:n}=e,r=t.__key,i=n.__key;let a=t,o=n;for(;a&&o;a=a.getNextSibling(),o=o.getNextSibling()){if(a.__key===i)return-1;if(o.__key===r)return 1}return a===null?1:-1}function Ic(e,t){return t.is(e)}function k1(e){return Q(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function Fc(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const n=new Map;for(let[r,i]=k1(e);r;i=r,r=r.getParent())n.set(r,i);for(let[r,i]=k1(t);r;i=r,r=r.getParent()){const a=n.get(r);if(a!==void 0)return a===null?(Ic(e,r)||se(276),{commonAncestor:r,type:"ancestor"}):i===null?(Ic(t,r)||se(277),{commonAncestor:r,type:"descendant"}):((Q(a)||Ic(e,a))&&(Q(i)||Ic(t,i))&&r.is(a.getParent())&&r.is(i.getParent())||se(278),{a,b:i,commonAncestor:r,type:"branch"})}return null}function cr(e,t){const{type:n,key:r,offset:i}=e,a=tO(e.key);return n==="text"?(fe(a)||se(266,a.getType(),r),ta(a,t,i)):(Q(a)||se(267,a.getType(),r),mO(a,e.offset,t))}function oi(e,t){const{origin:n,direction:r}=t,i=r==="next";sr(t)?e.set(n.getKey(),t.offset,"text"):Ja(t)?fe(n)?e.set(n.getKey(),lr(n,r),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(i?1:0),"element"):(Wn(t)&&Q(n)||se(268),e.set(n.getKey(),i?0:n.getChildrenSize(),"element"))}function gO(e){const t=he(),n=ae(t)?t:Bf();return zc(n,e),$t(n),n}function zc(e,t){oi(e.anchor,t.anchor),oi(e.focus,t.focus)}function S1(e){const{anchor:t,focus:n}=e,r=cr(t,"next"),i=cr(n,"next"),a=_1(r,i)<=0?"next":"previous";return ai(Dr(r,a),Dr(i,a))}function Qa(e){const{direction:t,origin:n}=e,r=ht(n,Qi(t)).getNodeAtCaret();return r?ht(r,t):mn(n.getParentOrThrow(),t)}function N1(e,t="root"){const n=[e];for(let r=Wn(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(Qa(r));return n}function mh(e){return!!e&&e.origin.isAttached()}function vO(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const n="root",r="next";let i=t;const a=C1(e,r),o=N1(a.anchor,n),s=N1(a.focus.getFlipped(),n),l=new Set,c=[];for(const p of a.iterNodeCarets(n))if(Wn(p))l.add(p.origin.getKey());else if(Ja(p)){const{origin:v}=p;Q(v)&&!l.has(v.getKey())||c.push(v)}for(const p of c)p.remove();for(const p of a.getTextSlices()){if(!p)continue;const{origin:v}=p.caret,m=v.getTextContentSize(),x=Qa(ht(v,r)),y=v.getMode();if(Math.abs(p.distance)===m&&i==="removeEmptySlices"||y==="token"&&p.distance!==0)x.remove();else if(p.distance!==0){i="removeEmptySlices";let b=p.removeTextSlice();const k=p.caret.origin;if(y==="segmented"){const w=b.origin,S=pt(w.getTextContent()).setStyle(w.getStyle()).setFormat(w.getFormat());x.replaceOrInsert(S),b=ta(S,r,b.offset)}k.is(o[0].origin)&&(o[0]=b),k.is(s[0].origin)&&(s[0]=b.getFlipped())}}let u,d;for(const p of o)if(mh(p)){u=on(p);break}for(const p of s)if(mh(p)){d=on(p);break}const f=function(p,v,m){if(!p||!v)return null;const x=p.getParentAtCaret(),y=v.getParentAtCaret();if(!x||!y)return null;const b=x.getParents().reverse();b.push(x);const k=y.getParents().reverse();k.push(y);const w=Math.min(b.length,k.length);let S;for(S=0;S<w&&b[S]===k[S];S++);const N=(T,O)=>{let P;for(let M=S;M<T.length;M++){const $=T[M];if(Gt($))return;!P&&O($)&&(P=$)}return P},E=N(b,vn),C=E&&N(k,T=>m.has(T.getKey())&&vn(T));return E&&C?[E,C]:null}(u,d,l);if(f){const[p,v]=f;mn(p,"previous").splice(0,v.getChildren());let m=v.getParent();for(v.remove(!0);m&&m.isEmpty();){const x=m;m=m.getParent(),x.remove(!0)}}const g=[u,d,...o,...s].find(mh);if(g)return pO(Dr(on(g),e.direction));se(269,JSON.stringify(o.map(p=>p.origin.__key)))}function on(e){const t=function(i){let a=i;for(;Wn(a);){const o=ph(a);if(!Wn(o))break;a=o}return a}(e.getLatest()),{direction:n}=t;if(fe(t.origin))return sr(t)?t:ta(t.origin,n,n);const r=t.getAdjacentCaret();return Ja(r)&&fe(r.origin)?ta(r.origin,n,Qi(n)):t}function E1(e){return sr(e)&&e.offset!==lr(e.origin,e.direction)}function Dr(e,t){return e.direction===t?e:e.getFlipped()}function C1(e,t){return e.direction===t?e:ai(Dr(e.focus,t),Dr(e.anchor,t))}function mO(e,t,n){let r=mn(e,"next");for(let i=0;i<t;i++){const a=r.getAdjacentCaret();if(a===null)break;r=a}return Dr(r,n)}function yO(e){const{origin:t,offset:n,direction:r}=e;if(n===lr(t,r))return e.getSiblingCaret();if(n===lr(t,Qi(r)))return Qa(e.getSiblingCaret());const[i]=t.splitText(n);return fe(i)||se(281),Dr(ht(i,"next"),r)}function bO(e,t){return!0}function xO(e,{$copyElementNode:t=p1,$splitTextPointCaretNext:n=yO,rootMode:r="shadowRoot",$shouldSplit:i=bO}={}){if(sr(e))return n(e);const a=e.getParentCaret(r);if(a){const{origin:o}=a;if(Wn(e)&&(!o.canBeEmpty()||!i(o,"first")))return Qa(a);const s=function(l){const c=[];for(let u=l.getAdjacentCaret();u;u=u.getAdjacentCaret())c.push(u.origin);return c}(e);(s.length>0||o.canBeEmpty()&&i(o,"last"))&&a.insert(t(o).splice(0,0,s))}return a}function hq(e){return e}function _O(...e){return e}function pq(e){return e}function wO(e,t){if(!t||e===t)return e;for(const n in t)if(e[n]!==t[n])return{...e,...t};return e}function si(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}function Ir(e,...t){const n=si(...t);n.length>0&&e.classList.add(...n)}function yh(e,...t){const n=si(...t);n.length>0&&e.classList.remove(...n)}function ur(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}const T1=_.createContext(null);function kO(e,t){return{getTheme:function(){return t??null}}}function Fr(){const e=_.useContext(T1);return e==null&&function(t,...n){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const a of n)i.append("v",a);throw r.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),e}const M1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,SO=M1?_.useLayoutEffect:_.useEffect,Bc={tag:Yi};function NO({initialConfig:e,children:t}){const n=_.useMemo(()=>{const{theme:r,namespace:i,nodes:a,onError:o,editorState:s,html:l}=e,c=kO(null,r),u=Yb({editable:e.editable,html:l,namespace:i,nodes:a,onError:d=>o(d,u),theme:r});return function(d,f){if(f!==null){if(f===void 0)d.update(()=>{const g=Qe();if(g.isEmpty()){const p=Ye();g.append(p);const v=M1?document.activeElement:null;(he()!==null||v!==null&&v===d.getRootElement())&&p.select()}},Bc);else if(f!==null)switch(typeof f){case"string":{const g=d.parseEditorState(f);d.setEditorState(g,Bc);break}case"object":d.setEditorState(f,Bc);break;case"function":d.update(()=>{Qe().isEmpty()&&f(d)},Bc)}}}(u,s),[u,c]},[]);return SO(()=>{const r=e.editable,[i]=n;i.setEditable(r===void 0||r)},[]),h.jsx(T1.Provider,{value:n,children:t})}const EO=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?_.useLayoutEffect:_.useEffect;function CO(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function TO(){return function(e){const[t]=Fr(),n=_.useMemo(()=>e(t),[t,e]),[r,i]=_.useState(()=>n.initialValueFn()),a=_.useRef(r);return EO(()=>{const{initialValueFn:o,subscribe:s}=n,l=o();return a.current!==l&&(a.current=l,i(l)),s(c=>{a.current=c,i(c)})},[n,e]),r}(CO)}const bh=new Map;function $1(e){const t={};if(!e)return t;const n=e.split(";");for(const r of n)if(r!==""){const[i,a]=r.split(/:([^]+)/);i&&a&&(t[i.trim()]=a.trim())}return t}function O1(e){let t=bh.get(e);return t===void 0&&(t=$1(e),bh.set(e,t)),t}function P1(e){const t=Lc().getElementByKey(e.getKey());if(t===null)return null;const n=t.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(t)}function A1(e){return P1(dt(e)?e:e.getParentOrThrow())}function L1(e){const t=A1(e);return t!==null&&t.direction==="rtl"}function D1(e,t,n="self"){const r=e.getStartEndPoints();if(t.isSelected(e)&&!Pr(t)&&r!==null){const[i,a]=r,o=e.isBackward(),s=i.getNode(),l=a.getNode(),c=t.is(s),u=t.is(l);if(c||u){const[d,f]=Ff(e),g=s.is(l),p=t.is(o?l:s),v=t.is(o?s:l);let m,x=0;g?(x=d>f?f:d,m=d>f?d:f):p?(x=o?f:d,m=void 0):v&&(x=0,m=o?d:f);const y=t.__text.slice(x,m);y!==t.__text&&(n==="clone"&&(t=iO(t)),t.__text=y)}}return t}function MO(e){const t=e.getStyle(),n=$1(t);bh.set(t,n)}function $O(e,t){const n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}function fs(e,t,n=$O){if(e===null)return;const r=e.getStartEndPoints(),i=new Map;let a=null;if(r){const[o,s]=r;a=Bf(),a.anchor.set(o.key,o.offset,o.type),a.focus.set(s.key,s.offset,s.type);const l=Nt(o.getNode(),vn),c=Nt(s.getNode(),vn);Q(l)&&i.set(l.getKey(),l),Q(c)&&i.set(c.getKey(),c)}for(const o of e.getNodes())if(Q(o)&&vn(o))i.set(o.getKey(),o);else if(r===null){const s=Nt(o,vn);Q(s)&&i.set(s.getKey(),s)}for(const[o,s]of i){const l=t();n(s,l),s.replace(l,!0),a&&(o===a.anchor.key&&a.anchor.set(l.getKey(),a.anchor.offset,a.anchor.type),o===a.focus.key&&a.focus.set(l.getKey(),a.focus.offset,a.focus.type))}a&&e.is(he())&&$t(a)}function I1(e){const t=F1(e);return t!==null&&t.writingMode==="vertical-rl"}function F1(e){const t=e.anchor.getNode();return Q(t)?P1(t):A1(t)}function z1(e,t){let n=I1(e)?!t:t;B1(e)&&(n=!n);const r=cr(e.focus,n?"previous":"next");if(E1(r))return!1;for(const i of vh(r)){if(Wn(i))return!i.origin.isInline();if(!Q(i.origin)){if(Ie(i.origin))return!0;break}}return!1}function OO(e,t,n,r){e.modify(t?"extend":"move",n,r)}function B1(e){const t=F1(e);return t!==null&&t.direction==="rtl"}function j1(e,t,n){const r=B1(e);let i;i=I1(e)||r?!n:n,OO(e,t,i,"character")}function W1(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const U1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,PO=U1&&"documentMode"in document?document.documentMode:null;!(!U1||!("InputEvent"in window)||PO)&&"getTargetRanges"in new window.InputEvent("input");function AO(e){return e?e.getAdjacentCaret():null}function LO(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function DO(e){const t=Nt(e,n=>Q(n)&&!n.isInline());return Q(t)||W1(4,e.__key),t}function IO(e,t,n){let r=Dr(t,"next");for(let i=r;i;i=xO(i,n))r=i;return sr(r)&&W1(283),r.insert(e.isInline()?Ye().append(e):e),Dr(ht(e.getLatest(),"next"),t.direction)}function li(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function H1(e){const t=he();if(!ae(t))return!1;const n=new Set,r=t.getNodes();for(let i=0;i<r.length;i++){const a=r[i],o=a.getKey();if(n.has(o))continue;const s=Nt(a,c=>Q(c)&&!c.isInline());if(s===null)continue;const l=s.getKey();s.canIndent()&&!n.has(l)&&(n.add(l),e(s))}return n.size>0}const FO=Symbol.for("preact-signals");function jc(){if(ci>1)return void ci--;let e,t=!1;for(;hs!==void 0;){let n=hs;for(hs=void 0,xh++;n!==void 0;){const r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&K1(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(xh=0,ci--,t)throw e}function zO(e){if(ci>0)return e();ci++;try{return e()}finally{jc()}}let je,hs;function q1(e){const t=je;je=void 0;try{return e()}finally{je=t}}let ci=0,xh=0,Wc=0;function V1(e){if(je===void 0)return;let t=e.n;return t===void 0||t.t!==je?(t={i:0,S:e,p:je.s,n:void 0,t:je,e:void 0,x:void 0,r:t},je.s!==void 0&&(je.s.n=t),je.s=t,e.n=t,32&je.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=je.s,t.n=void 0,je.s.n=t,je.s=t),t):void 0}function Dt(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched,this.name=t==null?void 0:t.name}function BO(e,t){return new Dt(e,t)}function K1(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Y1(e){for(let t=e.s;t!==void 0;t=t.n){const n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function G1(e){let t,n=e.s;for(;n!==void 0;){const r=n.p;n.i===-1?(n.S.U(n),r!==void 0&&(r.n=n.n),n.n!==void 0&&(n.n.p=r)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=r}e.s=t}function Ra(e,t){Dt.call(this,void 0),this.x=e,this.s=void 0,this.g=Wc-1,this.f=4,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched,this.name=t==null?void 0:t.name}function X1(e){const t=e.u;if(e.u=void 0,typeof t=="function"){ci++;const n=je;je=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,_h(e),r}finally{je=n,jc()}}}function _h(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,X1(e)}function jO(e){if(je!==this)throw new Error("Out-of-order effect");G1(this),je=e,this.f&=-2,8&this.f&&_h(this),jc()}function eo(e,t){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=t==null?void 0:t.name}function ps(e,t){const n=new eo(e,t);try{n.c()}catch(i){throw n.d(),i}const r=n.d.bind(n);return r[Symbol.dispose]=r,r}function Z1(e,t={}){const n={};for(const r in e){const i=t[r],a=BO(i===void 0?e[r]:i);n[r]=a}return n}Dt.prototype.brand=FO,Dt.prototype.h=function(){return!0},Dt.prototype.S=function(e){const t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t!==void 0?t.e=e:q1(()=>{var n;(n=this.W)==null||n.call(this)}))},Dt.prototype.U=function(e){if(this.t!==void 0){const t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&q1(()=>{var r;(r=this.Z)==null||r.call(this)}))}},Dt.prototype.subscribe=function(e){return ps(()=>{const t=this.value,n=je;je=void 0;try{e(t)}finally{je=n}},{name:"sub"})},Dt.prototype.valueOf=function(){return this.value},Dt.prototype.toString=function(){return this.value+""},Dt.prototype.toJSON=function(){return this.value},Dt.prototype.peek=function(){const e=je;je=void 0;try{return this.value}finally{je=e}},Object.defineProperty(Dt.prototype,"value",{get(){const e=V1(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(xh>100)throw new Error("Cycle detected");this.v=e,this.i++,Wc++,ci++;try{for(let t=this.t;t!==void 0;t=t.x)t.t.N()}finally{jc()}}}}),Ra.prototype=new Dt,Ra.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Wc))return!0;if(this.g=Wc,this.f|=1,this.i>0&&!K1(this))return this.f&=-2,!0;const e=je;try{Y1(this),je=this;const t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return je=e,G1(this),this.f&=-2,!0},Ra.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let t=this.s;t!==void 0;t=t.n)t.S.S(t)}Dt.prototype.S.call(this,e)},Ra.prototype.U=function(e){if(this.t!==void 0&&(Dt.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Ra.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Ra.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const e=V1(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),eo.prototype.c=function(){const e=this.S();try{if(8&this.f||this.x===void 0)return;const t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},eo.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,X1(this),Y1(this),ci++;const e=je;return je=this,jO.bind(this,e)},eo.prototype.N=function(){2&this.f||(this.f|=2,this.o=hs,hs=this)},eo.prototype.d=function(){this.f|=8,1&this.f||_h(this)},eo.prototype.dispose=function(){this.d()};function WO(e){return(typeof e.nodes=="function"?e.nodes():e.nodes)||[]}n$("format",{parse:e=>typeof e=="number"?e:0});function Ge(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function J1(e,t){if(e&&t&&!Array.isArray(t)&&typeof e=="object"&&typeof t=="object"){const n=e,r=t;for(const i in r)n[i]=J1(n[i],r[i]);return e}return t}const wh=0,kh=1,Q1=2,Sh=3,Uc=4,to=5,Nh=6,gs=7;function Eh(e){return e.id===wh}function R1(e){return e.id===Q1}function UO(e){return function(t){return t.id===kh}(e)||Ge(305,String(e.id),String(kh)),Object.assign(e,{id:Q1})}const HO=new Set;class qO{constructor(t,n){R(this,"builder");R(this,"configs");R(this,"_dependency");R(this,"_peerNameSet");R(this,"extension");R(this,"state");R(this,"_signal");this.builder=t,this.extension=n,this.configs=new Set,this.state={id:wh}}mergeConfigs(){let t=this.extension.config||{};const n=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):wO;for(const r of this.configs)t=n(t,r);return t}init(t){const n=this.state;R1(n)||Ge(306,String(n.id));const r={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},i={...r,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},a=function(s,l,c){return Object.assign(s,{config:l,id:Sh,registerState:c})}(n,this.mergeConfigs(),r);let o;this.state=a,this.extension.init&&(o=this.extension.init(t,a.config,r)),this.state=function(s,l,c){return Object.assign(s,{id:Uc,initResult:l,registerState:c})}(a,o,i)}build(t){const n=this.state;let r;n.id!==Uc&&Ge(307,String(n.id),String(to)),this.extension.build&&(r=this.extension.build(t,n.config,n.registerState));const i={...n.registerState,getOutput:()=>r,getSignal:this.getSignal.bind(this)};this.state=function(a,o,s){return Object.assign(a,{id:to,output:o,registerState:s})}(n,r,i)}register(t,n){this._signal=n;const r=this.state;r.id!==to&&Ge(308,String(r.id),String(to));const i=this.extension.register&&this.extension.register(t,r.config,r.registerState);return this.state=function(a){return Object.assign(a,{id:Nh})}(r),()=>{const a=this.state;a.id!==gs&&Ge(309,String(r.id),String(gs)),this.state=function(o){return Object.assign(o,{id:to})}(a),i&&i()}}afterRegistration(t){const n=this.state;let r;return n.id!==Nh&&Ge(310,String(n.id),String(Nh)),this.extension.afterRegistration&&(r=this.extension.afterRegistration(t,n.config,n.registerState)),this.state=function(i){return Object.assign(i,{id:gs})}(n),r}getSignal(){return this._signal===void 0&&Ge(311),this._signal}getInitResult(){this.extension.init===void 0&&Ge(312,this.extension.name);const t=this.state;return function(n){return n.id>=Uc}(t)||Ge(313,String(t.id),String(Uc)),t.initResult}getInitPeer(t){const n=this.builder.extensionNameMap.get(t);return n?n.getExtensionInitDependency():void 0}getExtensionInitDependency(){const t=this.state;return function(n){return n.id>=Sh}(t)||Ge(314,String(t.id),String(Sh)),{config:t.config}}getPeer(t){const n=this.builder.extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}getInitDependency(t){const n=this.builder.getExtensionRep(t);return n===void 0&&Ge(315,this.extension.name,t.name),n.getExtensionInitDependency()}getDependency(t){const n=this.builder.getExtensionRep(t);return n===void 0&&Ge(315,this.extension.name,t.name),n.getExtensionDependency()}getState(){const t=this.state;return function(n){return n.id>=gs}(t)||Ge(316,String(t.id),String(gs)),t}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||HO}getPeerNameSet(){let t=this._peerNameSet;return t||(t=new Set((this.extension.peerDependencies||[]).map(([n])=>n)),this._peerNameSet=t),t}getExtensionDependency(){if(!this._dependency){const t=this.state;(function(n){return n.id>=to})(t)||Ge(317,this.extension.name),this._dependency={config:t.config,init:t.initResult,output:t.output}}return this._dependency}}const ex={tag:Yi};function VO(){const e=Qe();e.isEmpty()&&e.append(Ye())}const KO={config:{setOptions:ex,updateOptions:ex},init:({$initialEditorState:e=VO})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:n},r){const i=r.getInitResult();if(!i.initialized){i.initialized=!0;const{$initialEditorState:a}=i;if(V$(a))e.setEditorState(a,n);else if(typeof a=="function")e.update(()=>{a(e)},t);else if(a&&(typeof a=="string"||typeof a=="object")){const o=e.parseEditorState(a);e.setEditorState(o,n)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[Ha,Mr,za,ja,qa]},tx=Symbol.for("@lexical/extension/LexicalBuilder");function nx(){}function YO(e){throw e}function Hc(e){return Array.isArray(e)?e:[e]}const Ch="0.41.0+prod.esm";let rx=class qd{constructor(t){R(this,"roots");R(this,"extensionNameMap");R(this,"outgoingConfigEdges");R(this,"incomingEdges");R(this,"conflicts");R(this,"_sortedExtensionReps");R(this,"PACKAGE_VERSION");this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=Ch,this.roots=t;for(const n of t)this.addExtension(n)}static fromExtensions(t){const n=[Hc(KO)];for(const r of t)n.push(Hc(r));return new qd(n)}static maybeFromEditor(t){const n=t[tx];return n&&(n.PACKAGE_VERSION!==Ch&&Ge(292,n.PACKAGE_VERSION,Ch),n instanceof qd||Ge(293)),n}static fromEditor(t){const n=qd.maybeFromEditor(t);return n===void 0&&Ge(294),n}constructEditor(){const{$initialEditorState:t,onError:n,...r}=this.buildCreateEditorArgs(),i=Object.assign(Yb({...r,...n?{onError:a=>{n(a,i)}}:{}}),{[tx]:this});for(const a of this.sortedExtensionReps())a.build(i);return i}buildEditor(){let t=nx;function n(){try{t()}finally{t=nx}}const r=Object.assign(this.constructEditor(),{dispose:n,[Symbol.dispose]:n});return t=ur(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(t){return this.extensionNameMap.has(t)}getExtensionRep(t){const n=this.extensionNameMap.get(t.name);if(n)return n.extension!==t&&Ge(295,t.name),n}addEdge(t,n,r){const i=this.outgoingConfigEdges.get(t);i?i.set(n,r):this.outgoingConfigEdges.set(t,new Map([[n,r]]));const a=this.incomingEdges.get(n);a?a.add(t):this.incomingEdges.set(n,new Set([t]))}addExtension(t){this._sortedExtensionReps!==void 0&&Ge(296);const n=Hc(t),[r]=n;typeof r.name!="string"&&Ge(297,typeof r.name);let i=this.extensionNameMap.get(r.name);if(i!==void 0&&i.extension!==r&&Ge(298,r.name),!i){i=new qO(this,r),this.extensionNameMap.set(r.name,i);const a=this.conflicts.get(r.name);typeof a=="string"&&Ge(299,r.name,a);for(const o of r.conflictsWith||[])this.extensionNameMap.has(o)&&Ge(299,r.name,o),this.conflicts.set(o,r.name);for(const o of r.dependencies||[]){const s=Hc(o);this.addEdge(r.name,s[0].name,s.slice(1)),this.addExtension(s)}for(const[o,s]of r.peerDependencies||[])this.addEdge(r.name,o,s?[s]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const t=[],n=(r,i)=>{let a=r.state;if(R1(a))return;const o=r.extension.name;var s;Eh(a)||Ge(300,o,i||"[unknown]"),Eh(s=a)||Ge(304,String(s.id),String(wh)),a=Object.assign(s,{id:kh}),r.state=a;const l=this.outgoingConfigEdges.get(o);if(l)for(const c of l.keys()){const u=this.extensionNameMap.get(c);u&&n(u,o)}a=UO(a),r.state=a,t.push(r)};for(const r of this.extensionNameMap.values())Eh(r.state)&&n(r);for(const r of t)for(const[i,a]of this.outgoingConfigEdges.get(r.extension.name)||[])if(a.length>0){const o=this.extensionNameMap.get(i);if(o)for(const s of a)o.configs.add(s)}for(const[r,...i]of this.roots)if(i.length>0){const a=this.extensionNameMap.get(r.name);a===void 0&&Ge(301,r.name);for(const o of i)a.configs.add(o)}return this._sortedExtensionReps=t,this._sortedExtensionReps}registerEditor(t){const n=this.sortedExtensionReps(),r=new AbortController,i=[()=>r.abort()],a=r.signal;for(const o of n){const s=o.register(t,a);s&&i.push(s)}for(const o of n){const s=o.afterRegistration(t);s&&i.push(s)}return ur(...i)}buildCreateEditorArgs(){const t={},n=new Set,r=new Map,i=new Map,a={},o={},s=this.sortedExtensionReps();for(const u of s){const{extension:d}=u;if(d.onError!==void 0&&(t.onError=d.onError),d.disableEvents!==void 0&&(t.disableEvents=d.disableEvents),d.parentEditor!==void 0&&(t.parentEditor=d.parentEditor),d.editable!==void 0&&(t.editable=d.editable),d.namespace!==void 0&&(t.namespace=d.namespace),d.$initialEditorState!==void 0&&(t.$initialEditorState=d.$initialEditorState),d.nodes)for(const f of WO(d)){if(typeof f!="function"){const g=r.get(f.replace);g&&Ge(302,d.name,f.replace.name,g.extension.name),r.set(f.replace,u)}n.add(f)}if(d.html){if(d.html.export)for(const[f,g]of d.html.export.entries())i.set(f,g);d.html.import&&Object.assign(a,d.html.import)}d.theme&&J1(o,d.theme)}Object.keys(o).length>0&&(t.theme=o),n.size&&(t.nodes=[...n]);const l=Object.keys(a).length>0,c=i.size>0;(l||c)&&(t.html={},l&&(t.html.import=a),c&&(t.html.export=i));for(const u of s)u.init(t);return t.onError||(t.onError=YO),t}};function GO(e,t){const n=rx.fromEditor(e).extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}const XO={name:"@lexical/react/ReactProvider"};function ZO(){return Qe().getTextContent()}function JO(e,t=!0){if(e)return!1;let n=ZO();return t&&(n=n.trim()),n===""}function QO(e){if(!JO(e,!1))return!1;const t=Qe().getChildren(),n=t.length;if(n>1)return!1;for(let r=0;r<n;r++){const i=t[r];if(Ie(i))return!1;if(Q(i)){if(!Kf(i)||i.__indent!==0)return!1;const a=i.getChildren(),o=a.length;for(let s=0;s<o;s++){const l=a[r];if(!fe(l))return!1}}}return!0}function ix(e){return()=>QO(e)}function RO(e){const t=window.location.origin,n=r=>{if(r.origin!==t)return;const i=e.getRootElement();if(document.activeElement!==i)return;const a=r.data;if(typeof a=="string"){let o;try{o=JSON.parse(a)}catch{return}if(o&&o.protocol==="nuanria_messaging"&&o.type==="request"){const s=o.payload;if(s&&s.functionId==="makeChanges"){const l=s.args;if(l){const[c,u,d,f,g]=l;e.update(()=>{const p=he();if(ae(p)){const v=p.anchor;let m=v.getNode(),x=0,y=0;if(fe(m)&&c>=0&&u>=0&&(x=c,y=c+u,p.setTextNodeRange(m,x,m,y)),x===y&&d===""||(p.insertRawText(d),m=v.getNode()),fe(m)){x=f,y=f+g;const b=m.getTextContentSize();x=x>b?b:x,y=y>b?b:y,p.setTextNodeRange(m,x,m,y)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}function Th(e,t){const n=Jb(t)?t.body.childNodes:t.childNodes;let r=[];const i=[];for(const a of n)if(!sx.has(a.nodeName)){const o=lx(a,e,i,!1);o!==null&&(r=r.concat(o))}return function(a){for(const o of a)o.getNextSibling()instanceof Vf&&o.insertAfter(Tr());for(const o of a){const s=o.getChildren();for(const l of s)o.insertBefore(l);o.remove()}}(i),r}function ax(e,t){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=Qe().getChildren();for(let i=0;i<r.length;i++)ox(e,r[i],n,t);return n.innerHTML}function ox(e,t,n,r=null){let i=r===null||t.isSelected(r);const a=Q(t)&&t.excludeFromCopy("html");let o=t;r!==null&&fe(t)&&(o=D1(r,t,"clone"));const s=Q(o)?o.getChildren():[],l=Xf(e,o.getType());let c;c=l&&l.exportDOM!==void 0?l.exportDOM(e,o):o.exportDOM(e);const{element:u,after:d}=c;if(!u)return!1;const f=document.createDocumentFragment();for(let g=0;g<s.length;g++){const p=s[g],v=ox(e,p,f,r);!i&&Q(t)&&v&&t.extractWithChild(p,r,"html")&&(i=!0)}if(i&&!a){if((ot(u)||ch(u))&&u.append(f),n.append(u),d){const g=d.call(o,u);g&&(ch(u)?u.replaceChildren(g):u.replaceWith(g))}}else n.append(f);return i}const sx=new Set(["STYLE","SCRIPT"]);function lx(e,t,n,r,i=new Map,a){let o=[];if(sx.has(e.nodeName))return o;let s=null;const l=function(p,v){const{nodeName:m}=p,x=v._htmlConversions.get(m.toLowerCase());let y=null;if(x!==void 0)for(const b of x){const k=b(p);k!==null&&(y===null||(y.priority||0)<=(k.priority||0))&&(y=k)}return y!==null?y.conversion:null}(e,t),c=l?l(e):null;let u=null;if(c!==null){u=c.after;const p=c.node;if(s=Array.isArray(p)?p[p.length-1]:p,s!==null){for(const[,v]of i)if(s=v(s,a),!s)break;s&&o.push(...Array.isArray(p)?p:[s])}c.forChild!=null&&i.set(e.nodeName,c.forChild)}const d=e.childNodes;let f=[];const g=(s==null||!Gt(s))&&(s!=null&&zf(s)||r);for(let p=0;p<d.length;p++)f.push(...lx(d[p],t,n,g,new Map(i),s));return u!=null&&(f=u(f)),Ac(e)&&(f=eP(e,f,g?()=>{const p=new Vf;return n.push(p),p}:Ye)),s==null?f.length>0?o=o.concat(f):Ac(e)&&function(p){return p.nextSibling==null||p.previousSibling==null?!1:uh(p.nextSibling)&&uh(p.previousSibling)}(e)&&(o=o.concat(Tr())):Q(s)&&s.append(...f),o}function eP(e,t,n){const r=e.style.textAlign,i=[];let a=[];for(let o=0;o<t.length;o++){const s=t[o];if(zf(s))r&&!s.getFormat()&&s.setFormat(r),i.push(s);else if(a.push(s),o===t.length-1||o<t.length-1&&zf(t[o+1])){const l=n();l.setFormat(r),l.append(...a),i.push(l),a=[]}}return i}function qc(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function tP(e,t=he()){return t==null&&qc(166),ae(t)&&t.isCollapsed()||t.getNodes().length===0?"":ax(e,t)}function nP(e,t=he()){return t==null&&qc(166),ae(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(rP(e,t))}function cx(e,t,n){const r=e.getData("application/x-lexical-editor");if(r)try{const s=JSON.parse(r);if(s.namespace===n._config.namespace&&Array.isArray(s.nodes))return ux(n,iP(s.nodes),t)}catch(s){console.error(s)}const i=e.getData("text/html"),a=e.getData("text/plain");if(i&&a!==i)try{const s=new DOMParser().parseFromString(function(l){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:c=>c}).createHTML(l):l}(i),"text/html");return ux(n,Th(n,s),t)}catch(s){console.error(s)}const o=a||e.getData("text/uri-list");if(o!=null)if(ae(t)){const s=o.split(/(\r?\n|\t)/);s[s.length-1]===""&&s.pop();for(let l=0;l<s.length;l++){const c=he();if(ae(c)){const u=s[l];u===`
262
262
  `||u===`\r
263
- `?c.insertParagraph():u===" "?c.insertNodes([Da()]):c.insertText(u)}}}else t.insertRawText(o)}function Kx(e,t,n){e.dispatchCommand(Z2,{nodes:t,selection:n})||(n.insertNodes(t),function(r){if(re(r)&&r.isCollapsed()){const i=r.anchor;let a=null;const o=sr(i,"previous");if(o)if(ar(o))a=o.origin;else{const s=ni(o,mn(Ze(),"next").getFlipped());for(const l of s){if(ce(l.origin)){a=l.origin;break}if(X(l.origin)&&!l.origin.isInline())break}}if(a&&ce(a)){const s=a.getFormat(),l=a.getStyle();r.format===s&&r.style===l||(r.format=s,r.style=l,r.dirty=!0)}}}(n))}function Vx(e,t,n,r=[]){let i=t===null||n.isSelected(t);const a=X(n)&&n.excludeFromCopy("html");let o=n;t!==null&&ce(o)&&(o=vx(t,o,"clone"));const s=X(o)?o.getChildren():[],l=function(c){const u=c.exportJSON(),d=c.constructor;if(u.type!==d.getType()&&Ac(58,d.name),X(c)){const f=u.children;Array.isArray(f)||Ac(59,d.name)}return u}(o);ce(o)&&o.getTextContentSize()===0&&(i=!1);for(let c=0;c<s.length;c++){const u=s[c],d=Vx(e,t,u,l.children);!i&&X(n)&&d&&n.extractWithChild(u,t,"clone")&&(i=!0)}if(i&&!a)r.push(l);else if(Array.isArray(l.children))for(let c=0;c<l.children.length;c++){const u=l.children[c];r.push(u)}return i}function HO(e,t){const n=[],r=Ze().getChildren();for(let i=0;i<r.length;i++)Vx(e,t,r[i],n);return{namespace:e._config.namespace,nodes:n}}function qO(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],i=$$(r);ce(i)&&gO(i),t.push(i)}return t}let Za=null;async function Yx(e,t,n){if(Za!==null)return!1;if(t!==null)return new Promise((c,u)=>{e.update(()=>{c(Gx(e,t,n))})});const r=e.getRootElement(),i=e._window||window,a=i.document,o=gn(i);if(r===null||o===null)return!1;const s=a.createElement("span");s.style.cssText="position: fixed; top: -1000px;",s.append(a.createTextNode("#")),r.append(s);const l=new Range;return l.setStart(s,0),l.setEnd(s,1),o.removeAllRanges(),o.addRange(l),new Promise((c,u)=>{const d=e.registerCommand(nc,f=>(ai(f,ClipboardEvent)&&(d(),Za!==null&&(i.clearTimeout(Za),Za=null),c(Gx(e,f,n))),!0),A$);Za=i.setTimeout(()=>{d(),Za=null,c(!1)},50),a.execCommand("copy"),s.remove()})}function Gx(e,t,n){if(n===void 0){const i=gn(e._window),a=ue();if(!a||a.isCollapsed()||!i)return!1;const o=i.anchorNode,s=i.focusNode;if(o!==null&&s!==null&&!ts(e,o,s))return!1;n=KO(a)}t.preventDefault();const r=t.clipboardData;return r!==null&&(VO(r,n),!0)}const Xx=[["text/html",WO],["application/x-lexical-editor",UO]];function KO(e=ue()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=kc();for(const[r,i]of Xx){const a=i(n,e);a!==null&&(t[r]=a)}}return t}function VO(e,t){for(const[n]of Xx)t[n]===void 0&&e.setData(n,"");for(const n in t){const r=t[n];r!==void 0&&e.setData(n,r)}}function Zx(e,t){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const Qi=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,YO=Qi&&"documentMode"in document?document.documentMode:null,GO=Qi&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),XO=!(!Qi||!("InputEvent"in window)||YO)&&"getTargetRanges"in new window.InputEvent("input"),ZO=Qi&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Jx=Qi&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,JO=Qi&&/^(?=.*Chrome).*/i.test(navigator.userAgent),QO=Qi&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&GO&&!JO,Qx=ye("DRAG_DROP_PASTE_FILE");class cs extends on{static getType(){return"quote"}static clone(t){return new cs(t.__key)}createDOM(t){const n=document.createElement("blockquote");return Dr(n,t.theme.quote),n}updateDOM(t,n){return!1}static importDOM(){return{blockquote:t=>({conversion:eP,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(it(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return xh().updateFromJSON(t)}insertNewAfter(t,n){const r=He(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,n),r}collapseAtStart(){const t=He();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}canMergeWhenEmpty(){return!0}}function xh(){return Fn(new cs)}function RO(e){return e instanceof cs}class us extends on{constructor(n,r){super(r);J(this,"__tag");this.__tag=n}static getType(){return"heading"}static clone(n){return new us(n.__tag,n.__key)}getTag(){return this.__tag}setTag(n){const r=this.getWritable();return this.__tag=n,r}createDOM(n){const r=this.__tag,i=document.createElement(r),a=n.theme.heading;if(a!==void 0){const o=a[r];Dr(i,o)}return i}updateDOM(n,r,i){return n.__tag!==this.__tag}static importDOM(){return{h1:n=>({conversion:Ja,priority:0}),h2:n=>({conversion:Ja,priority:0}),h3:n=>({conversion:Ja,priority:0}),h4:n=>({conversion:Ja,priority:0}),h5:n=>({conversion:Ja,priority:0}),h6:n=>({conversion:Ja,priority:0}),p:n=>{const r=n.firstChild;return r!==null&&Rx(r)?{conversion:()=>({node:null}),priority:3}:null},span:n=>Rx(n)?{conversion:r=>({node:Qa("h1")}),priority:3}:null}}exportDOM(n){const{element:r}=super.exportDOM(n);if(it(r)){this.isEmpty()&&r.append(document.createElement("br"));const i=this.getFormatType();i&&(r.style.textAlign=i);const a=this.getDirection();a&&(r.dir=a)}return{element:r}}static importJSON(n){return Qa(n.tag).updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setTag(n.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(n,r=!0){const i=n?n.anchor.offset:0,a=this.getLastDescendant(),o=!a||n&&n.anchor.key===a.getKey()&&i===a.getTextContentSize()||!n?He():Qa(this.getTag()),s=this.getDirection();if(o.setDirection(s),this.insertAfter(o,r),i===0&&!this.isEmpty()&&n){const l=He();l.select(),this.replace(l,!0)}return o}collapseAtStart(){const n=this.isEmpty()?He():Qa(this.getTag());return this.getChildren().forEach(r=>n.append(r)),this.replace(n),!0}extractWithChild(){return!0}}function Rx(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}function Ja(e){const t=e.nodeName.toLowerCase();let n=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(n=Qa(t),e.style!==null&&(nh(e,n),n.setFormat(e.style.textAlign))),{node:n}}function eP(e){const t=xh();return e.style!==null&&(t.setFormat(e.style.textAlign),nh(e,t)),{node:t}}function Qa(e="h1"){return Fn(new us(e))}function tP(e){return e instanceof us}function Lc(e){let t=null;if(ai(e,DragEvent)?t=e.dataTransfer:ai(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const n=t.types,r=n.includes("Files"),i=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),i]}function e1(e){const t=ja(e);return Ae(t)}function _h(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function nP(e){return lr(e.registerCommand(h0,t=>{const n=ue();return!!Mt(n)&&(n.clear(),!0)},Ee),e.registerCommand(Wi,t=>{const n=ue();return re(n)?(n.deleteCharacter(t),!0):!!Mt(n)&&(n.deleteNodes(),!0)},Ee),e.registerCommand(qo,t=>{const n=ue();return!!re(n)&&(n.deleteWord(t),!0)},Ee),e.registerCommand(Ko,t=>{const n=ue();return!!re(n)&&(n.deleteLine(t),!0)},Ee),e.registerCommand(Ta,t=>{const n=ue();if(typeof t=="string")n!==null&&n.insertText(t);else{if(n===null)return!1;const r=t.dataTransfer;if(r!=null)qx(r,n,e);else if(re(n)){const i=t.data;return i&&n.insertText(i),!0}}return!0},Ee),e.registerCommand(gf,()=>{const t=ue();return!!re(t)&&(t.removeText(),!0)},Ee),e.registerCommand(an,t=>{const n=ue();return!!re(n)&&(n.formatText(t),!0)},Ee),e.registerCommand(Ma,t=>{const n=ue();if(!re(n)&&!Mt(n))return!1;const r=n.getNodes();for(const i of r){const a=kt(i,o=>X(o)&&!o.isInline());a!==null&&a.setFormat(t)}return!0},Ee),e.registerCommand(Ea,t=>{const n=ue();return!!re(n)&&(n.insertLineBreak(t),!0)},Ee),e.registerCommand(Ho,()=>{const t=ue();return!!re(t)&&(t.insertParagraph(),!0)},Ee),e.registerCommand(R2,()=>{const t=Da(),n=ue();return re(n)&&(t.setFormat(n.format),t.setStyle(n.style)),E$([t]),!0},Ee),e.registerCommand(e$,()=>Sx(t=>{const n=t.getIndent();t.setIndent(n+1)}),Ee),e.registerCommand(T0,()=>Sx(t=>{const n=t.getIndent();n>0&&t.setIndent(Math.max(0,n-1))}),Ee),e.registerCommand(_0,t=>{const n=ue();if(Mt(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectPrevious(),!0}else if(re(n)){const r=Yf(n.focus,!0);if(!t.shiftKey&&Ae(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),t.preventDefault(),!0}return!1},Ee),e.registerCommand(w0,t=>{const n=ue();if(Mt(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectNext(0,0),!0}else if(re(n)){if(function(i){const a=i.focus;return a.key==="root"&&a.offset===Ze().getChildrenSize()}(n))return t.preventDefault(),!0;const r=Yf(n.focus,!1);if(!t.shiftKey&&Ae(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),t.preventDefault(),!0}return!1},Ee),e.registerCommand(x0,t=>{const n=ue();if(Mt(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),gx(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!re(n))return!1;if(bx(n,!0)){const r=t.shiftKey;return t.preventDefault(),_x(n,r,!0),!0}return!1},Ee),e.registerCommand(b0,t=>{const n=ue();if(Mt(n)){const i=n.getNodes();if(i.length>0)return t.preventDefault(),gx(i[0])?i[0].selectPrevious():i[0].selectNext(0,0),!0}if(!re(n))return!1;const r=t.shiftKey;return!!bx(n,!1)&&(t.preventDefault(),_x(n,r,!1),!0)},Ee),e.registerCommand(S0,t=>{if(e1(t.target))return!1;const n=ue();if(re(n)){if(function(r){if(!r.isCollapsed())return!1;const{anchor:i}=r;if(i.offset!==0)return!1;const a=i.getNode();if(st(a))return!1;const o=_O(a);return o.getIndent()>0&&(o.is(a)||a.is(o.getFirstDescendant()))}(n))return t.preventDefault(),e.dispatchCommand(T0,void 0);if(Jx&&navigator.language==="ko-KR")return!1}else if(!Mt(n))return!1;return t.preventDefault(),e.dispatchCommand(Wi,!0)},Ee),e.registerCommand(C0,t=>{if(e1(t.target))return!1;const n=ue();return!(!re(n)&&!Mt(n))&&(t.preventDefault(),e.dispatchCommand(Wi,!1))},Ee),e.registerCommand(tc,t=>{const n=ue();if(!re(n))return!1;if(_h(n),t!==null){if((Jx||ZO||QO)&&XO)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(Ea,!1)}return e.dispatchCommand(Ho,void 0)},Ee),e.registerCommand(N0,()=>{const t=ue();return!!re(t)&&(e.blur(),!0)},Ee),e.registerCommand(M0,t=>{const[,n]=Lc(t);if(n.length>0){const i=Zx(t.clientX,t.clientY);if(i!==null){const{offset:a,node:o}=i,s=ja(o);if(s!==null){const l=$f();if(ce(s))l.anchor.set(s.getKey(),a,"text"),l.focus.set(s.getKey(),a,"text");else{const u=s.getParentOrThrow().getKey(),d=s.getIndexWithinParent()+1;l.anchor.set(u,d,"element"),l.focus.set(u,d,"element")}const c=Ii(l);$t(c)}e.dispatchCommand(Qx,n)}return t.preventDefault(),!0}const r=ue();return!!re(r)},Ee),e.registerCommand($0,t=>{const[n]=Lc(t),r=ue();return!(n&&!re(r))},Ee),e.registerCommand(O0,t=>{const[n]=Lc(t),r=ue();if(n&&!re(r))return!1;const i=Zx(t.clientX,t.clientY);if(i!==null){const a=ja(i.node);Ae(a)&&t.preventDefault()}return!0},Ee),e.registerCommand(mf,()=>(z$(),!0),Ee),e.registerCommand(nc,t=>(Yx(e,ai(t,ClipboardEvent)?t:null),!0),Ee),e.registerCommand(vf,t=>(async function(n,r){await Yx(r,ai(n,ClipboardEvent)?n:null),r.update(()=>{const i=ue();re(i)?i.removeText():Mt(i)&&i.getNodes().forEach(a=>a.remove())})}(t,e),!0),Ee),e.registerCommand(Ql,t=>{const[,n,r]=Lc(t);return n.length>0&&!r?(e.dispatchCommand(Qx,n),!0):qa(t.target)&&Wf(t.target)?!1:ue()!==null&&(function(i,a){i.preventDefault(),a.update(()=>{const o=ue(),s=ai(i,InputEvent)||ai(i,KeyboardEvent)?null:i.clipboardData;s!=null&&o!==null&&qx(s,o,a)},{tag:p$})}(t,e),!0)},Ee),e.registerCommand(k0,t=>{const n=ue();return re(n)&&_h(n),!1},Ee),e.registerCommand(E0,t=>{const n=ue();return re(n)&&_h(n),!1},Ee))}function rP(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const wh=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?_.useLayoutEffect:_.useEffect;function iP({editor:e,ErrorBoundary:t}){return function(n,r){const[i,a]=_.useState(()=>n.getDecorators());return wh(()=>n.registerDecoratorListener(o=>{Zr.flushSync(()=>{a(o)})}),[n]),_.useEffect(()=>{a(n.getDecorators())},[n]),_.useMemo(()=>{const o=[],s=Object.keys(i);for(let l=0;l<s.length;l++){const c=s[l],u=h.jsx(r,{onError:f=>n._onError(f),children:h.jsx(_.Suspense,{fallback:null,children:i[c]})}),d=n.getElementByKey(c);d!==null&&o.push(Zr.createPortal(u,d,c))}return o},[r,i,n])}(e,t)}function aP({editor:e,ErrorBoundary:t}){return function(n){const r=zx.maybeFromEditor(n);if(r&&r.hasExtensionByName(DO.name)){for(const i of["@lexical/plain-text","@lexical/rich-text"])r.hasExtensionByName(i)&&rP(320,i);return!0}return!1}(e)?null:h.jsx(iP,{editor:e,ErrorBoundary:t})}function t1(e){return e.getEditorState().read(Bx(e.isComposing()))}function oP({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=Ir();return function(i){wh(()=>lr(nP(i),BO(i)),[i])}(r),h.jsxs(h.Fragment,{children:[e,h.jsx(sP,{content:t}),h.jsx(aP,{editor:r,ErrorBoundary:n})]})}function sP({content:e}){const[t]=Ir(),n=function(i){const[a,o]=_.useState(()=>t1(i));return wh(()=>{function s(){const l=t1(i);o(l)}return s(),lr(i.registerUpdateListener(()=>{s()}),i.registerEditableListener(()=>{s()}))},[i]),a}(t),r=pO();return n?typeof e=="function"?e(r):e:null}const n1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?_.useLayoutEffect:_.useEffect;function lP({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:a,ariaExpanded:o,ariaInvalid:s,ariaLabel:l,ariaLabelledBy:c,ariaMultiline:u,ariaOwns:d,ariaRequired:f,autoCapitalize:g,className:p,id:v,role:m="textbox",spellCheck:b=!0,style:y,tabIndex:x,"data-testid":k,...w},S){const[N,C]=_.useState(e.isEditable()),E=_.useCallback(O=>{O&&O.ownerDocument&&O.ownerDocument.defaultView?e.setRootElement(O):e.setRootElement(null)},[e]),T=_.useMemo(()=>function(...O){return P=>{for(const M of O)typeof M=="function"?M(P):M!=null&&(M.current=P)}}(S,E),[E,S]);return n1(()=>(C(e.isEditable()),e.registerEditableListener(O=>{C(O)})),[e]),h.jsx("div",{"aria-activedescendant":N?t:void 0,"aria-autocomplete":N?n:"none","aria-controls":N?r:void 0,"aria-describedby":i,...a!=null?{"aria-errormessage":a}:{},"aria-expanded":N&&m==="combobox"?!!o:void 0,...s!=null?{"aria-invalid":s}:{},"aria-label":l,"aria-labelledby":c,"aria-multiline":u,"aria-owns":N?d:void 0,"aria-readonly":!N||void 0,"aria-required":f,autoCapitalize:g,className:p,contentEditable:N,"data-testid":k,id:v,ref:T,role:m,spellCheck:b,style:y,tabIndex:x,...w})}const cP=_.forwardRef(lP);function r1(e){return e.getEditorState().read(Bx(e.isComposing()))}const uP=_.forwardRef(dP);function dP(e,t){const{placeholder:n,...r}=e,[i]=Ir();return h.jsxs(h.Fragment,{children:[h.jsx(cP,{editor:i,...r,ref:t}),n!=null&&h.jsx(fP,{editor:i,content:n})]})}function fP({content:e,editor:t}){const n=function(o){const[s,l]=_.useState(()=>r1(o));return n1(()=>{function c(){const u=r1(o);l(u)}return c(),lr(o.registerUpdateListener(()=>{c()}),o.registerEditableListener(()=>{c()}))},[o]),s}(t),[r,i]=_.useState(t.isEditable());if(_.useLayoutEffect(()=>(i(t.isEditable()),t.registerEditableListener(o=>{i(o)})),[t]),!n)return null;let a=null;return typeof e=="function"?a=e(r):e!==null&&(a=e),a===null?null:h.jsx("div",{"aria-hidden":!0,children:a})}function hP(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return 0;const a=t._selection,o=e._selection;if(i)return 1;if(!(re(a)&&re(o)&&o.isCollapsed()&&a.isCollapsed()))return 0;const s=function(b,y,x){const k=b._nodeMap,w=[];for(const S of y){const N=k.get(S);N!==void 0&&w.push(N)}for(const[S,N]of x){if(!N)continue;const C=k.get(S);C===void 0||st(C)||w.push(C)}return w}(t,n,r);if(s.length===0)return 0;if(s.length>1){const b=t._nodeMap,y=b.get(a.anchor.key),x=b.get(o.anchor.key);return y&&x&&!e._nodeMap.has(y.__key)&&ce(y)&&y.__text.length===1&&a.anchor.offset===1?2:0}const l=s[0],c=e._nodeMap.get(l.__key);if(!ce(c)||!ce(l)||c.__mode!==l.__mode)return 0;const u=c.__text,d=l.__text;if(u===d)return 0;const f=a.anchor,g=o.anchor;if(f.key!==g.key||f.type!=="text")return 0;const p=f.offset,v=g.offset,m=d.length-u.length;return m===1&&v===p-1?2:m===-1&&v===p+1?3:m===-1&&v===p?4:0}function pP(e,t){let n=Date.now(),r=0,i=Date.now(),a=0,o=null;return(s,l,c,u,d,f)=>{const g=Date.now();if(f.has(V0)&&(i=n,a=r,o=s),f.has(kf))return r=0,n=g,2;f.has(Y0)&&o&&(n=i,r=a,s=o);const p=hP(s,l,u,d,e.isComposing()),v=(()=>{const m=c===null||c.editor===e,b=f.has(h$);if(!b&&m&&f.has(Hi))return 0;if(p===1)return 2;if(s===null)return 1;const y=l._selection;if(!(u.size>0||d.size>0))return y!==null?0:2;const x=typeof t=="number"?t:t.peek();return b===!1&&p!==0&&p===r&&g<n+x&&m||u.size===1&&function(k,w,S){const N=w._nodeMap.get(k),C=S._nodeMap.get(k),E=w._selection,T=S._selection;return!(re(E)&&re(T)&&E.anchor.type==="element"&&E.focus.type==="element"&&T.anchor.type==="text"&&T.focus.type==="text"||!ce(N)||!ce(C)||N.__parent!==C.__parent)&&JSON.stringify(w.read(()=>N.exportJSON()))===JSON.stringify(S.read(()=>C.exportJSON()))}(Array.from(u)[0],s,l)?0:1})();return n=g,r=p,v}}function i1(e){e.undoStack=[],e.redoStack=[],e.current=null}function a1(e,t,n){const r=pP(e,n);return lr(e.registerCommand(Rl,()=>(function(a,o){const s=o.redoStack,l=o.undoStack;if(l.length!==0){const c=o.current,u=l.pop();c!==null&&(s.push(c),a.dispatchCommand(Vo,!0)),l.length===0&&a.dispatchCommand(Yo,!1),o.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:kf})}}(e,t),!0),Ee),e.registerCommand(ec,()=>(function(a,o){const s=o.redoStack,l=o.undoStack;if(s.length!==0){const c=o.current;c!==null&&(l.push(c),a.dispatchCommand(Yo,!0));const u=s.pop();s.length===0&&a.dispatchCommand(Vo,!1),o.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:kf})}}(e,t),!0),Ee),e.registerCommand(n$,()=>(i1(t),!1),Ee),e.registerCommand(r$,()=>(i1(t),e.dispatchCommand(Vo,!1),e.dispatchCommand(Yo,!1),!0),Ee),e.registerUpdateListener(({editorState:a,prevEditorState:o,dirtyLeaves:s,dirtyElements:l,tags:c})=>{const u=t.current,d=t.redoStack,f=t.undoStack,g=u===null?null:u.editorState;if(u!==null&&a===g)return;const p=r(o,a,u,s,l,c);if(p===1)d.length!==0&&(t.redoStack=[],e.dispatchCommand(Vo,!1)),u!==null&&(f.push({...u}),e.dispatchCommand(Yo,!0));else if(p===2)return;t.current={editor:e,editorState:a}}))}function o1(){return{current:null,redoStack:[],undoStack:[]}}const kh={build:(e,{delay:t,createInitialHistoryState:n,disabled:r})=>Ox({delay:t,disabled:r,historyState:n(e)}),config:{createInitialHistoryState:o1,delay:300,disabled:typeof window>"u"},name:"@lexical/history/History",register:(e,t,n)=>{const r=n.getOutput();return ss(()=>r.disabled.value?void 0:a1(e,r.historyState.value,r.delay))}};sO(kh,{createInitialHistoryState:()=>{throw new Error("SharedHistory did not inherit parent history")},disabled:!0});function gP({delay:e,externalHistoryState:t}){const[n]=Ir();return function(r,i,a=1e3){const o=_.useMemo(()=>i||o1(),[i]);_.useEffect(()=>a1(r,o,a),[a,r,o])}(n,t,e),null}const vP=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?_.useLayoutEffect:_.useEffect;function mP({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){const[r]=Ir();return vP(()=>{if(n)return r.registerUpdateListener(({editorState:i,dirtyElements:a,dirtyLeaves:o,prevEditorState:s,tags:l})=>{t&&a.size===0&&o.size===0||e&&l.has(Hi)||s.isEmpty()||n(i,r,l)})},[r,e,t,n]),null}function si(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Sh(e){let t=1,n=e.getParent();for(;n!=null;){if(Le(n)){const r=n.getParent();if(Ce(r)){t++,n=r.getParent();continue}si(40)}return t}return t}function Nh(e){let t=e.getParent();Ce(t)||si(40);let n=t;for(;n!==null;)n=n.getParent(),Ce(n)&&(t=n);return t}function s1(e){let t=[];const n=e.getChildren().filter(Le);for(let r=0;r<n.length;r++){const i=n[r],a=i.getFirstChild();Ce(a)?t=t.concat(s1(a)):t.push(i)}return t}function cr(e){return Le(e)&&Ce(e.getFirstChild())}function l1(e){return yn().append(e)}function c1(e,t){return Le(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function u1(e){const t=ue();if(t!==null){let n=t.getNodes();if(re(t)){const i=t.getStartEndPoints();i===null&&si(143);const[a]=i,o=a.getNode(),s=o.getParent();if(Xt(o)){const l=o.getFirstChild();if(l)n=l.selectStart().getNodes();else{const c=He();o.append(c),n=c.select().getNodes()}}else if(c1(o,n)){const l=cn(e);if(Xt(s)){o.replace(l);const c=yn();X(o)&&(c.setFormat(o.getFormatType()),c.setIndent(o.getIndent())),l.append(c)}else if(Le(o)){const c=o.getParentOrThrow();Ri(l,c.getChildren()),c.replace(l)}return}}const r=new Set;for(let i=0;i<n.length;i++){const a=n[i];if(X(a)&&a.isEmpty()&&!Le(a)&&!r.has(a.getKey())){d1(a,e);continue}let o=Ab(a)?a.getParent():Le(a)&&a.isEmpty()?a:null;for(;o!=null;){const s=o.getKey();if(Ce(o)){if(!r.has(s)){const l=cn(e);Ri(l,o.getChildren()),o.replace(l),r.add(s)}break}{const l=o.getParent();if(Xt(l)&&!r.has(s)){r.add(s),d1(o,e);break}o=l}}}}}function Ri(e,t){e.splice(e.getChildrenSize(),0,t)}function d1(e,t){if(Ce(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),i=yn();let a;if(Ri(i,e.getChildren()),Ce(n)&&t===n.getListType())n.append(i),Ce(r)&&t===r.getListType()&&(Ri(n,r.getChildren()),r.remove()),a=n;else if(Ce(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),a=r;else{const s=cn(t);s.append(i),e.replace(s),a=s}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());const o=ue();return re(o)&&(a.getKey()===o.anchor.key&&o.anchor.set(i.getKey(),o.anchor.offset,"element"),a.getKey()===o.focus.key&&o.focus.set(i.getKey(),o.focus.offset,"element")),e.remove(),a}function Ch(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&cr(n)&&cr(r)&&(Ch(n.getFirstChild(),r.getFirstChild()),r.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function yP(){const e=ue();if(re(e)){const t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(c1(r,n))t.add(Nh(r));else for(let i=0;i<n.length;i++){const a=n[i];if(Ab(a)){const o=xO(a,Ra);o!=null&&t.add(Nh(o))}}for(const i of t){let a=i;const o=s1(i);for(const s of o){const l=He().setTextStyle(e.style).setTextFormat(e.format);Ri(l,s.getChildren()),a.insertAfter(l),a=l,s.__key===e.anchor.key&&ri(e.anchor,ln(mn(l,"next"))),s.__key===e.focus.key&&ri(e.focus,ln(mn(l,"next"))),s.remove()}i.remove()}}}function f1(e){const t=e.getListType()!=="check";let n=e.getStart();for(const r of e.getChildren())Le(r)&&(r.getValue()!==n&&r.setValue(n),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),Ce(r.getFirstChild())||n++)}function bP(e){const t=new Set;if(cr(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(cr(r)&&cr(i)){const a=i.getFirstChild();if(Ce(a)){a.append(e);const o=r.getFirstChild();Ce(o)&&(Ri(a,o.getChildren()),r.remove(),t.add(r.getKey()))}}else if(cr(r)){const a=r.getFirstChild();if(Ce(a)){const o=a.getFirstChild();o!==null&&o.insertBefore(e)}}else if(cr(i)){const a=i.getFirstChild();Ce(a)&&a.append(e)}else if(Ce(n)){const a=yn().setTextFormat(e.getTextFormat()).setTextStyle(e.getTextStyle()),o=cn(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());a.append(o),o.append(e),i?i.insertAfter(a):r?r.insertBefore(a):n.append(a)}}function xP(e){if(cr(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(Ce(n?n.getParent():void 0)&&Le(n)&&Ce(t)){const r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{const a=t.getListType(),o=yn(),s=cn(a);o.append(s),e.getPreviousSiblings().forEach(u=>s.append(u));const l=yn(),c=cn(a);l.append(c),Ri(c,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(l),n.replace(e)}}}function _P(e=!1){const t=ue();if(!re(t)||!t.isCollapsed())return!1;const n=t.anchor.getNode();let r=null;if(Le(n)&&n.getChildrenSize()===0)r=n;else if(ce(n)){const c=n.getParent();Le(c)&&c.getChildren().every(u=>ce(u)&&u.getTextContent().trim()==="")&&(r=c)}if(r===null)return!1;const i=Nh(r),a=r.getParent();Ce(a)||si(40);const o=a.getParent();let s;if(Xt(o))s=He(),i.insertAfter(s);else{if(!Le(o))return!1;s=yn(),o.insertAfter(s)}s.setTextStyle(t.style).setTextFormat(t.format).select();const l=r.getNextSiblings();if(l.length>0){const c=e?function(d,f){return d.getStart()+f.getIndexWithinParent()}(a,r):1,u=cn(a.getListType(),c);if(Le(s)){const d=yn();d.append(u),s.insertAfter(d)}else s.insertAfter(u);u.append(...l)}return function(c){let u=c;for(;u.getNextSibling()==null&&u.getPreviousSibling()==null;){const d=u.getParent();if(d==null||!Le(d)&&!Ce(d))break;u=d}u.remove()}(r),!0}class Ra extends on{constructor(n=1,r=void 0,i){super(i);J(this,"__value");J(this,"__checked");this.__value=n===void 0?1:n,this.__checked=r}$config(){return this.config("listitem",{$transform:n=>{if(n.__checked==null)return;const r=n.getParent();Ce(r)&&r.getListType()!=="check"&&n.getChecked()!=null&&n.setChecked(void 0)},extends:on,importDOM:{li:()=>({conversion:wP,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__value=n.__value,this.__checked=n.__checked}createDOM(n){const r=document.createElement("li");return this.updateListItemDOM(null,r,n),r}updateListItemDOM(n,r,i){(function(s,l,c){const u=l.getParent();!Ce(u)||u.getListType()!=="check"||Ce(l.getFirstChild())?(s.removeAttribute("role"),s.removeAttribute("tabIndex"),s.removeAttribute("aria-checked")):(s.setAttribute("role","checkbox"),s.setAttribute("tabIndex","-1"),c&&l.__checked===c.__checked||s.setAttribute("aria-checked",l.getChecked()?"true":"false"))})(r,this,n),r.value=this.__value,function(s,l,c){const u=[],d=[],f=l.list,g=f?f.listitem:void 0;let p;if(f&&f.nested&&(p=f.nested.listitem),g!==void 0&&u.push(...ii(g)),f){const v=c.getParent(),m=Ce(v)&&v.getListType()==="check",b=c.getChecked();m&&!b||d.push(f.listitemUnchecked),m&&b||d.push(f.listitemChecked),m&&u.push(b?f.listitemChecked:f.listitemUnchecked)}if(p!==void 0){const v=ii(p);c.getChildren().some(m=>Ce(m))?u.push(...v):d.push(...v)}d.length>0&&ch(s,...d),u.length>0&&Dr(s,...u)}(r,i.theme,this);const a=n?n.__style:"",o=this.__style;a!==o&&(o===""?r.removeAttribute("style"):r.style.cssText=o),function(s,l,c){const u=fx(l.__textStyle);for(const d in u)s.style.setProperty(`--listitem-marker-${d}`,u[d]);if(c)for(const d in fx(c.__textStyle))d in u||s.style.removeProperty(`--listitem-marker-${d}`)}(r,this,n)}updateDOM(n,r,i){const a=r;return this.updateListItemDOM(n,a,i),!1}updateFromJSON(n){return super.updateFromJSON(n).setValue(n.value).setChecked(n.checked)}exportDOM(n){const r=this.createDOM(n._config),i=this.getFormatType();i&&(r.style.textAlign=i);const a=this.getDirection();return a&&(r.dir=a),{element:r}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...n){for(let r=0;r<n.length;r++){const i=n[r];if(X(i)&&this.canMergeWith(i)){const a=i.getChildren();this.append(...a),i.remove()}else super.append(i)}return this}replace(n,r){if(Le(n))return super.replace(n);this.setIndent(0);const i=this.getParentOrThrow();if(!Ce(i))return n;if(i.__first===this.getKey())i.insertBefore(n);else if(i.__last===this.getKey())i.insertAfter(n);else{const a=cn(i.getListType());let o=this.getNextSibling();for(;o;){const s=o;o=o.getNextSibling(),a.append(s)}i.insertAfter(n),n.insertAfter(a)}return r&&(X(n)||si(139),this.getChildren().forEach(a=>{n.append(a)})),this.remove(),i.getChildrenSize()===0&&i.remove(),n}insertAfter(n,r=!0){const i=this.getParentOrThrow();if(Ce(i)||si(39),Le(n))return super.insertAfter(n,r);const a=this.getNextSiblings();if(i.insertAfter(n,r),a.length!==0){const o=cn(i.getListType());a.forEach(s=>o.append(s)),n.insertAfter(o,r)}return n}remove(n){const r=this.getPreviousSibling(),i=this.getNextSibling();super.remove(n),r&&i&&cr(r)&&cr(i)&&(Ch(r.getFirstChild(),i.getFirstChild()),i.remove())}insertNewAfter(n,r=!0){const i=yn().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(i,r),i}collapseAtStart(n){const r=He();this.getChildren().forEach(s=>r.append(s));const i=this.getParentOrThrow(),a=i.getParentOrThrow(),o=Le(a);if(i.getChildrenSize()===1)if(o)i.remove(),a.select();else{i.insertBefore(r),i.remove();const s=n.anchor,l=n.focus,c=r.getKey();s.type==="element"&&s.getNode().is(this)&&s.set(c,s.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(c,l.offset,"element")}else i.insertBefore(r),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(n){const r=this.getWritable();return r.__value=n,r}getChecked(){const n=this.getLatest();let r;const i=this.getParent();return Ce(i)&&(r=i.getListType()),r==="check"?!!n.__checked:void 0}setChecked(n){const r=this.getWritable();return r.__checked=n,r}toggleChecked(){const n=this.getWritable();return n.setChecked(!n.__checked)}getIndent(){const n=this.getParent();if(n===null||!this.isAttached())return this.getLatest().__indent;let r=n.getParentOrThrow(),i=0;for(;Le(r);)r=r.getParentOrThrow().getParentOrThrow(),i++;return i}setIndent(n){typeof n!="number"&&si(117),(n=Math.floor(n))>=0||si(199);let r=this.getIndent();for(;r!==n;)r<n?(bP(this),r++):(xP(this),r--);return this}canInsertAfter(n){return Le(n)}canReplaceWith(n){return Le(n)}canMergeWith(n){return Le(n)||Ff(n)}extractWithChild(n,r){if(!re(r))return!1;const i=r.anchor.getNode(),a=r.focus.getNode();return this.isParentOf(i)&&this.isParentOf(a)&&this.getTextContent().length===r.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return cn("bullet")}canMergeWhenEmpty(){return!0}}function wP(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return h1(n)}if(e.classList.contains("joplin-checkbox")){for(const n of e.children)if(n.classList.contains("checkbox-wrapper")&&n.children.length>0&&n.children[0].tagName==="INPUT")return h1(n.children[0])}const t=e.getAttribute("aria-checked");return{node:yn(t==="true"||t!=="false"&&void 0)}}function h1(e){return e.getAttribute("type")!=="checkbox"?{node:null}:{node:yn(e.hasAttribute("checked"))}}function yn(e){return Fn(new Ra(void 0,e))}function Le(e){return e instanceof Ra}class ds extends on{constructor(n="number",r=1,i){super(i);J(this,"__tag");J(this,"__start");J(this,"__listType");const a=SP[n]||n;this.__listType=a,this.__tag=a==="number"?"ol":"ul",this.__start=r}$config(){return this.config("list",{$transform:n=>{(function(r){const i=r.getNextSibling();Ce(i)&&r.getListType()===i.getListType()&&Ch(r,i)})(n),f1(n)},extends:on,importDOM:{ol:()=>({conversion:g1,priority:0}),ul:()=>({conversion:g1,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__listType=n.__listType,this.__tag=n.__tag,this.__start=n.__start}getTag(){return this.getLatest().__tag}setListType(n){const r=this.getWritable();return r.__listType=n,r.__tag=n==="number"?"ol":"ul",r}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(n){const r=this.getWritable();return r.__start=n,r}createDOM(n,r){const i=this.__tag,a=document.createElement(i);return this.__start!==1&&a.setAttribute("start",String(this.__start)),a.__lexicalListType=this.__listType,p1(a,n.theme,this),a}updateDOM(n,r,i){return n.__tag!==this.__tag||n.__listType!==this.__listType||(p1(r,i.theme,this),n.__start!==this.__start&&r.setAttribute("start",String(this.__start)),!1)}updateFromJSON(n){return super.updateFromJSON(n).setListType(n.listType).setStart(n.start)}exportDOM(n){const r=this.createDOM(n._config,n);return it(r)&&(this.__start!==1&&r.setAttribute("start",String(this.__start)),this.__listType==="check"&&r.setAttribute("__lexicalListType","check")),{element:r}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(n,r,i){let a=i;for(let o=0;o<i.length;o++){const s=i[o];Le(s)||(a===i&&(a=[...i]),a[o]=yn().append(!X(s)||Ce(s)||s.isInline()?s:dt(s.getTextContent())))}return super.splice(n,r,a)}extractWithChild(n){return Le(n)}}function p1(e,t,n){const r=[],i=[],a=t.list;if(a!==void 0){const o=a[`${n.__tag}Depth`]||[],s=Sh(n)-1,l=s%o.length,c=o[l],u=a[n.__tag];let d;const f=a.nested,g=a.checklist;if(f!==void 0&&f.list&&(d=f.list),u!==void 0&&r.push(u),g!==void 0&&n.__listType==="check"&&r.push(g),c!==void 0){r.push(...ii(c));for(let p=0;p<o.length;p++)p!==l&&i.push(n.__tag+p)}if(d!==void 0){const p=ii(d);s>1?r.push(...p):i.push(...p)}}i.length>0&&ch(e,...i),r.length>0&&Dr(e,...r)}function kP(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(Le(r)){t.push(r);const i=r.getChildren();i.length>1&&i.forEach(a=>{Ce(a)&&t.push(l1(a))})}else t.push(l1(r))}return t}function g1(e){const t=e.nodeName.toLowerCase();let n=null;return t==="ol"?n=cn("number",e.start):t==="ul"&&(n=function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(const i of r.childNodes)if(it(i)&&i.hasAttribute("aria-checked"))return!0;return!1}(e)?cn("check"):cn("bullet")),{after:kP,node:n}}const SP={ol:"number",ul:"bullet"};function cn(e="number",t=1){return Fn(new ds(e,t))}function Ce(e){return e instanceof ds}const NP=ye("UPDATE_LIST_START_COMMAND"),v1=ye("INSERT_UNORDERED_LIST_COMMAND"),m1=ye("INSERT_ORDERED_LIST_COMMAND"),Eh=ye("REMOVE_LIST_COMMAND");function y1(e,t){return lr(e.registerCommand(m1,()=>(u1("number"),!0),ir),e.registerCommand(NP,n=>{const{listNodeKey:r,newStart:i}=n,a=lt(r);return!!Ce(a)&&(a.getListType()==="number"&&(a.setStart(i),f1(a)),!0)},ir),e.registerCommand(v1,()=>(u1("bullet"),!0),ir),e.registerCommand(Eh,()=>(yP(),!0),ir),e.registerCommand(Ho,()=>_P(!!(t&&t.restoreNumbering)),ir),e.registerNodeTransform(Ra,n=>{const r=n.getFirstChild();if(r){if(ce(r)){const i=r.getStyle(),a=r.getFormat();n.getTextStyle()!==i&&n.setTextStyle(i),n.getTextFormat()!==a&&n.setTextFormat(a)}}else{const i=ue();re(i)&&(i.style!==n.getTextStyle()||i.format!==n.getTextFormat())&&i.isCollapsed()&&n.is(i.anchor.getNode())&&n.setTextStyle(i.style).setTextFormat(i.format)}}),e.registerNodeTransform(Tr,n=>{const r=n.getParent();if(Le(r)&&n.is(r.getFirstChild())){const i=n.getStyle(),a=n.getFormat();i===r.getTextStyle()&&a===r.getTextFormat()||r.setTextStyle(i).setTextFormat(a)}}))}function CP(e){const t=n=>{const r=n.getParent();if(Ce(n.getFirstChild())||!Ce(r))return;const i=kt(n,a=>Le(a)&&Ce(a.getParent())&&Le(a.getPreviousSibling()));if(i===null&&n.getIndent()>0)n.setIndent(0);else if(Le(i)){const a=i.getPreviousSibling();if(Le(a)){const o=function(l){let c=l,u=c.getFirstChild();for(;Ce(u);){const d=u.getLastChild();if(!Le(d))break;c=d,u=c.getFirstChild()}return c}(a),s=o.getParent();if(Ce(s)){const l=Sh(s);l+1<Sh(r)&&n.setIndent(l)}}}};return e.registerNodeTransform(ds,n=>{const r=[n];for(;r.length>0;){const i=r.shift();if(Ce(i)){for(const a of i.getChildren())if(Le(a)){t(a);const o=a.getFirstChild();Ce(o)&&r.push(o)}}}})}function EP({hasStrictIndent:e=!1,shouldPreserveNumbering:t=!1}){const[n]=Ir();return _.useEffect(()=>{if(!n.hasNodes([ds,Ra]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[n]),_.useEffect(()=>lr(y1(n,{restoreNumbering:t}),e?CP(n):()=>{}),[n,e,t]),function(r){_.useEffect(()=>y1(r),[r])}(n),null}const TP=new Set(["http:","https:","mailto:","sms:","tel:"]);let eo=class YE extends on{constructor(n="",r={},i){super(i);J(this,"__url");J(this,"__target");J(this,"__rel");J(this,"__title");const{target:a=null,rel:o=null,title:s=null}=r;this.__url=n,this.__target=a,this.__rel=o,this.__title=s}static getType(){return"link"}static clone(n){return new YE(n.__url,{rel:n.__rel,target:n.__target,title:n.__title},n.__key)}createDOM(n){const r=document.createElement("a");return this.updateLinkDOM(null,r,n),Dr(r,n.theme.link),r}updateLinkDOM(n,r,i){if(Zb(r)){n&&n.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const a of["target","rel","title"]){const o=`__${a}`,s=this[o];n&&n[o]===s||(s?r[a]=s:r.removeAttribute(a))}}}updateDOM(n,r,i){return this.updateLinkDOM(n,r,i),!1}static importDOM(){return{a:n=>({conversion:$P,priority:1})}}static importJSON(n){return to().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setURL(n.url).setRel(n.rel||null).setTarget(n.target||null).setTitle(n.title||null)}sanitizeUrl(n){n=k1(n);try{const r=new URL(k1(n));if(!TP.has(r.protocol))return"about:blank"}catch{return n}return n}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(n){const r=this.getWritable();return r.__url=n,r}getTarget(){return this.getLatest().__target}setTarget(n){const r=this.getWritable();return r.__target=n,r}getRel(){return this.getLatest().__rel}setRel(n){const r=this.getWritable();return r.__rel=n,r}getTitle(){return this.getLatest().__title}setTitle(n){const r=this.getWritable();return r.__title=n,r}insertNewAfter(n,r=!0){const i=to(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(i,r),i}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(n,r,i){if(!re(r))return!1;const a=r.anchor.getNode(),o=r.focus.getNode();return this.isParentOf(a)&&this.isParentOf(o)&&r.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}};function b1(e){const t=sr(e,"next");return[t,t.getFlipped()]}function x1(e,t){for(const n of t)if(n.origin.isAttached()){const r=ln(n);return void ri(e,r)}}function MP(e){const t=ue();let n=null,r=null;re(t)&&(n=b1(t.anchor),r=b1(t.focus));for(const i of mn(e,"next")){const a=i.origin;if(X(a)&&!a.isInline()){const o=a.getChildren();if(o.length>0){const s=Xb(e);s.append(...o),a.append(s)}wO(a,Va(i),{$shouldSplit:()=>!1})}}if(e.isEmpty()){const i=e.getParent();e.remove(),i&&i.isEmpty()&&i.remove()}re(t)&&(x1(t.anchor,n),x1(t.focus,r),Ii(t))}function $P(e){let t=null;if(Zb(e)){const n=e.textContent;(n!==null&&n!==""||e.children.length>0)&&(t=to(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function to(e="",t){return Fn(new eo(e,t))}function ur(e){return e instanceof eo}let Th=class GE extends eo{constructor(n="",r={},i){super(n,r,i);J(this,"__isUnlinked");this.__isUnlinked=r.isUnlinked!==void 0&&r.isUnlinked!==null&&r.isUnlinked}static getType(){return"autolink"}static clone(n){return new GE(n.__url,{isUnlinked:n.__isUnlinked,rel:n.__rel,target:n.__target,title:n.__title},n.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(n){const r=this.getWritable();return r.__isUnlinked=n,r}createDOM(n){return this.__isUnlinked?document.createElement("span"):super.createDOM(n)}updateDOM(n,r,i){return super.updateDOM(n,r,i)||n.__isUnlinked!==this.__isUnlinked}static importJSON(n){return _1().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setIsUnlinked(n.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(n,r=!0){const i=_1(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(i,r),i}};function _1(e="",t){return Fn(new Th(e,t))}function fs(e){return e instanceof Th}const hs=ye("TOGGLE_LINK_COMMAND");function w1(e,t){if(e.type==="element"){const n=e.getNode();return X(n)||function(r,...i){const a=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",r);for(const s of i)o.append("v",s);throw a.search=o.toString(),Error(`Minified Lexical error #${r}; visit ${a.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(252),n.getChildren()[e.offset+t]||null}return null}function Mh(e,t={}){let n;if(e&&typeof e=="object"){const{url:u,...d}=e;n=u,t={...d,...t}}else n=e;const{target:r,title:i}=t,a=t.rel===void 0?"noreferrer":t.rel,o=ue();if(o===null||!re(o)&&!Mt(o))return;if(Mt(o)){const u=o.getNodes();return u.length===0?void 0:void u.forEach(d=>{if(n===null){const f=kt(d,g=>!fs(g)&&ur(g));f&&(f.insertBefore(d),f.getChildren().length===0&&f.remove())}else{const f=kt(d,g=>!fs(g)&&ur(g));if(f)f.setURL(n),r!==void 0&&f.setTarget(r),a!==void 0&&f.setRel(a);else{const g=to(n,{rel:a,target:r});d.insertBefore(g),g.append(d)}}})}if(o.isCollapsed()&&n===null)for(const u of o.getNodes()){const d=kt(u,f=>!fs(f)&&ur(f));return void(d!==null&&(d.getChildren().forEach(f=>{d.insertBefore(f)}),d.remove()))}const s=o.extract();if(n===null){const u=new Set;return void s.forEach(d=>{const f=kt(d,g=>!fs(g)&&ur(g));if(f!==null){const g=f.getKey();if(u.has(g))return;(function(p,v){const m=new Set(v.filter(C=>p.isParentOf(C)).map(C=>C.getKey())),b=p.getChildren(),y=C=>m.has(C.getKey())||X(C)&&v.some(E=>p.isParentOf(E)&&C.isParentOf(E)),x=b.filter(y);if(x.length===b.length)return b.forEach(C=>p.insertBefore(C)),void p.remove();const k=b.findIndex(y),w=b.findLastIndex(y),S=k===0,N=w===b.length-1;if(S)x.forEach(C=>p.insertBefore(C));else if(N)for(let C=x.length-1;C>=0;C--)p.insertAfter(x[C]);else{for(let E=x.length-1;E>=0;E--)p.insertAfter(x[E]);const C=b.slice(w+1);if(C.length>0){const E=to(p.getURL(),{rel:p.getRel(),target:p.getTarget(),title:p.getTitle()});x[x.length-1].insertAfter(E),C.forEach(T=>E.append(T))}}})(f,s),u.add(g)}})}const l=new Set,c=u=>{l.has(u.getKey())||(l.add(u.getKey()),u.setURL(n),r!==void 0&&u.setTarget(r),a!==void 0&&u.setRel(a),i!==void 0&&u.setTitle(i))};if(s.length===1){const u=s[0],d=kt(u,ur);if(d!==null)return c(d)}(function(u){const d=ue();if(!re(d))return u();const f=Ii(d),g=f.isBackward(),p=w1(f.anchor,g?-1:0),v=w1(f.focus,g?0:-1);if(u(),p||v){const m=ue();if(re(m)){const b=m.clone();if(p){const y=p.getParent();y&&b.anchor.set(y.getKey(),p.getIndexWithinParent()+(g?1:0),"element")}if(v){const y=v.getParent();y&&b.focus.set(y.getKey(),v.getIndexWithinParent()+(g?0:1),"element")}$t(Ii(b))}}})(()=>{let u=null;for(const d of s){if(!d.isAttached())continue;const f=kt(d,ur);if(f){c(f);continue}if(X(d)){if(!d.isInline())continue;if(ur(d)){if(!(fs(d)||u!==null&&u.getParentOrThrow().isParentOf(d))){c(d),u=d;continue}for(const p of d.getChildren())d.insertBefore(p);d.remove();continue}}const g=d.getPreviousSibling();ur(g)&&g.is(u)?g.append(d):(u=to(n,{rel:a,target:r,title:i}),d.insertAfter(u),u.append(d))}})}const OP=/^\+?[0-9\s()-]{5,}$/;function k1(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:OP.test(e)?`tel:${e}`:`https://${e}`}function PP(e,t){return lr(e.registerNodeTransform(eo,MP),ss(()=>e.registerCommand(hs,n=>{const r=t.validateUrl.peek(),i=t.attributes.peek();if(n===null)return Mh(null),!0;if(typeof n=="string")return!(r!==void 0&&!r(n))&&(Mh(n,i),!0);{const{url:a,target:o,rel:s,title:l}=n;return Mh(a,{...i,rel:s,target:o,title:l}),!0}},ir)),ss(()=>{const n=t.validateUrl.value;if(!n)return;const r=t.attributes.value;return e.registerCommand(Ql,i=>{const a=ue();if(!re(a)||a.isCollapsed()||!ai(i,ClipboardEvent)||i.clipboardData===null)return!1;const o=i.clipboardData.getData("text");return!!n(o)&&!a.getNodes().some(s=>X(s))&&(e.dispatchCommand(hs,{...r,url:o}),i.preventDefault(),!0)},ir)}))}function AP({validateUrl:e,attributes:t}){const[n]=Ir();return _.useEffect(()=>{if(!n.hasNodes([eo]))throw new Error("LinkPlugin: LinkNode not registered on editor")}),_.useEffect(()=>PP(n,Ox({attributes:t,validateUrl:e})),[n,e,t]),null}const LP=_.createContext(null),$h={didCatch:!1,error:null};class DP extends _.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=$h}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(...t){var r,i;const{error:n}=this.state;n!==null&&((i=(r=this.props).onReset)==null||i.call(r,{args:t,reason:"imperative-api"}),this.setState($h))}componentDidCatch(t,n){var r,i;(i=(r=this.props).onError)==null||i.call(r,t,n)}componentDidUpdate(t,n){var a,o;const{didCatch:r}=this.state,{resetKeys:i}=this.props;r&&n.error!==null&&IP(t.resetKeys,i)&&((o=(a=this.props).onReset)==null||o.call(a,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState($h))}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:a,error:o}=this.state;let s=t;if(a){const l={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")s=n(l);else if(r)s=_.createElement(r,l);else if(i!==void 0)s=i;else throw o}return _.createElement(LP.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},s)}}function IP(e=[],t=[]){return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function FP({children:e,onError:t}){return h.jsx(DP,{fallback:h.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}var no=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ps(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Bn(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var zP={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
263
+ `?c.insertParagraph():u===" "?c.insertNodes([Wa()]):c.insertText(u)}}}else t.insertRawText(o)}function ux(e,t,n){e.dispatchCommand(u$,{nodes:t,selection:n})||(n.insertNodes(t),function(r){if(ae(r)&&r.isCollapsed()){const i=r.anchor;let a=null;const o=cr(i,"previous");if(o)if(sr(o))a=o.origin;else{const s=ai(o,mn(Qe(),"next").getFlipped());for(const l of s){if(fe(l.origin)){a=l.origin;break}if(Q(l.origin)&&!l.origin.isInline())break}}if(a&&fe(a)){const s=a.getFormat(),l=a.getStyle();r.format===s&&r.style===l||(r.format=s,r.style=l,r.dirty=!0)}}}(n))}function dx(e,t,n,r=[]){let i=t===null||n.isSelected(t);const a=Q(n)&&n.excludeFromCopy("html");let o=n;t!==null&&fe(o)&&(o=D1(t,o,"clone"));const s=Q(o)?o.getChildren():[],l=function(c){const u=c.exportJSON(),d=c.constructor;if(u.type!==d.getType()&&qc(58,d.name),Q(c)){const f=u.children;Array.isArray(f)||qc(59,d.name)}return u}(o);fe(o)&&o.getTextContentSize()===0&&(i=!1);for(let c=0;c<s.length;c++){const u=s[c],d=dx(e,t,u,l.children);!i&&Q(n)&&d&&n.extractWithChild(u,t,"clone")&&(i=!0)}if(i&&!a)r.push(l);else if(Array.isArray(l.children))for(let c=0;c<l.children.length;c++){const u=l.children[c];r.push(u)}return i}function rP(e,t){const n=[],r=Qe().getChildren();for(let i=0;i<r.length;i++)dx(e,t,r[i],n);return{namespace:e._config.namespace,nodes:n}}function iP(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],i=q$(r);fe(i)&&MO(i),t.push(i)}return t}let no=null;async function fx(e,t,n){if(no!==null)return!1;if(t!==null)return new Promise((c,u)=>{e.update(()=>{c(hx(e,t,n))})});const r=e.getRootElement(),i=e._window||window,a=i.document,o=gn(i);if(r===null||o===null)return!1;const s=a.createElement("span");s.style.cssText="position: fixed; top: -1000px;",s.append(a.createTextNode("#")),r.append(s);const l=new Range;return l.setStart(s,0),l.setEnd(s,1),o.removeAllRanges(),o.addRange(l),new Promise((c,u)=>{const d=e.registerCommand(hc,f=>(li(f,ClipboardEvent)&&(d(),no!==null&&(i.clearTimeout(no),no=null),c(hx(e,f,n))),!0),Y$);no=i.setTimeout(()=>{d(),no=null,c(!1)},50),a.execCommand("copy"),s.remove()})}function hx(e,t,n){if(n===void 0){const i=gn(e._window),a=he();if(!a||a.isCollapsed()||!i)return!1;const o=i.anchorNode,s=i.focusNode;if(o!==null&&s!==null&&!ls(e,o,s))return!1;n=aP(a)}t.preventDefault();const r=t.clipboardData;return r!==null&&(oP(r,n),!0)}const px=[["text/html",tP],["application/x-lexical-editor",nP]];function aP(e=he()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=Lc();for(const[r,i]of px){const a=i(n,e);a!==null&&(t[r]=a)}}return t}function oP(e,t){for(const[n]of px)t[n]===void 0&&e.setData(n,"");for(const n in t){const r=t[n];r!==void 0&&e.setData(n,r)}}function gx(e,t){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const na=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,sP=na&&"documentMode"in document?document.documentMode:null,lP=na&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),cP=!(!na||!("InputEvent"in window)||sP)&&"getTargetRanges"in new window.InputEvent("input"),uP=na&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),vx=na&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,dP=na&&/^(?=.*Chrome).*/i.test(navigator.userAgent),fP=na&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&lP&&!dP,mx=me("DRAG_DROP_PASTE_FILE");class vs extends rn{static getType(){return"quote"}static clone(t){return new vs(t.__key)}createDOM(t){const n=document.createElement("blockquote");return Ir(n,t.theme.quote),n}updateDOM(t,n){return!1}static importDOM(){return{blockquote:t=>({conversion:pP,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(ot(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return Mh().updateFromJSON(t)}insertNewAfter(t,n){const r=Ye(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,n),r}collapseAtStart(){const t=Ye();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}canMergeWhenEmpty(){return!0}}function Mh(){return jn(new vs)}function hP(e){return e instanceof vs}class ms extends rn{constructor(n,r){super(r);R(this,"__tag");this.__tag=n}static getType(){return"heading"}static clone(n){return new ms(n.__tag,n.__key)}getTag(){return this.__tag}setTag(n){const r=this.getWritable();return this.__tag=n,r}createDOM(n){const r=this.__tag,i=document.createElement(r),a=n.theme.heading;if(a!==void 0){const o=a[r];Ir(i,o)}return i}updateDOM(n,r,i){return n.__tag!==this.__tag}static importDOM(){return{h1:n=>({conversion:ro,priority:0}),h2:n=>({conversion:ro,priority:0}),h3:n=>({conversion:ro,priority:0}),h4:n=>({conversion:ro,priority:0}),h5:n=>({conversion:ro,priority:0}),h6:n=>({conversion:ro,priority:0}),p:n=>{const r=n.firstChild;return r!==null&&yx(r)?{conversion:()=>({node:null}),priority:3}:null},span:n=>yx(n)?{conversion:r=>({node:io("h1")}),priority:3}:null}}exportDOM(n){const{element:r}=super.exportDOM(n);if(ot(r)){this.isEmpty()&&r.append(document.createElement("br"));const i=this.getFormatType();i&&(r.style.textAlign=i);const a=this.getDirection();a&&(r.dir=a)}return{element:r}}static importJSON(n){return io(n.tag).updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setTag(n.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(n,r=!0){const i=n?n.anchor.offset:0,a=this.getLastDescendant(),o=!a||n&&n.anchor.key===a.getKey()&&i===a.getTextContentSize()||!n?Ye():io(this.getTag()),s=this.getDirection();if(o.setDirection(s),this.insertAfter(o,r),i===0&&!this.isEmpty()&&n){const l=Ye();l.select(),this.replace(l,!0)}return o}collapseAtStart(){const n=this.isEmpty()?Ye():io(this.getTag());return this.getChildren().forEach(r=>n.append(r)),this.replace(n),!0}extractWithChild(){return!0}}function yx(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}function ro(e){const t=e.nodeName.toLowerCase();let n=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(n=io(t),e.style!==null&&(dh(e,n),n.setFormat(e.style.textAlign))),{node:n}}function pP(e){const t=Mh();return e.style!==null&&(t.setFormat(e.style.textAlign),dh(e,t)),{node:t}}function io(e="h1"){return jn(new ms(e))}function gP(e){return e instanceof ms}function Vc(e){let t=null;if(li(e,DragEvent)?t=e.dataTransfer:li(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const n=t.types,r=n.includes("Files"),i=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),i]}function bx(e){const t=Ka(e);return Ie(t)}function $h(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function vP(e){return ur(e.registerCommand(P0,t=>{const n=he();return!!Mt(n)&&(n.clear(),!0)},Te),e.registerCommand(Vi,t=>{const n=he();return ae(n)?(n.deleteCharacter(t),!0):!!Mt(n)&&(n.deleteNodes(),!0)},Te),e.registerCommand(Jo,t=>{const n=he();return!!ae(n)&&(n.deleteWord(t),!0)},Te),e.registerCommand(Qo,t=>{const n=he();return!!ae(n)&&(n.deleteLine(t),!0)},Te),e.registerCommand(La,t=>{const n=he();if(typeof t=="string")n!==null&&n.insertText(t);else{if(n===null)return!1;const r=t.dataTransfer;if(r!=null)cx(r,n,e);else if(ae(n)){const i=t.data;return i&&n.insertText(i),!0}}return!0},Te),e.registerCommand(Sf,()=>{const t=he();return!!ae(t)&&(t.removeText(),!0)},Te),e.registerCommand(nn,t=>{const n=he();return!!ae(n)&&(n.formatText(t),!0)},Te),e.registerCommand(Da,t=>{const n=he();if(!ae(n)&&!Mt(n))return!1;const r=n.getNodes();for(const i of r){const a=Nt(i,o=>Q(o)&&!o.isInline());a!==null&&a.setFormat(t)}return!0},Te),e.registerCommand(Aa,t=>{const n=he();return!!ae(n)&&(n.insertLineBreak(t),!0)},Te),e.registerCommand(Zo,()=>{const t=he();return!!ae(t)&&(t.insertParagraph(),!0)},Te),e.registerCommand(h$,()=>{const t=Wa(),n=he();return ae(n)&&(t.setFormat(n.format),t.setStyle(n.style)),W$([t]),!0},Te),e.registerCommand(p$,()=>H1(t=>{const n=t.getIndent();t.setIndent(n+1)}),Te),e.registerCommand(Y0,()=>H1(t=>{const n=t.getIndent();n>0&&t.setIndent(Math.max(0,n-1))}),Te),e.registerCommand(j0,t=>{const n=he();if(Mt(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectPrevious(),!0}else if(ae(n)){const r=nh(n.focus,!0);if(!t.shiftKey&&Ie(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),t.preventDefault(),!0}return!1},Te),e.registerCommand(W0,t=>{const n=he();if(Mt(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectNext(0,0),!0}else if(ae(n)){if(function(i){const a=i.focus;return a.key==="root"&&a.offset===Qe().getChildrenSize()}(n))return t.preventDefault(),!0;const r=nh(n.focus,!1);if(!t.shiftKey&&Ie(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),t.preventDefault(),!0}return!1},Te),e.registerCommand(B0,t=>{const n=he();if(Mt(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),L1(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!ae(n))return!1;if(z1(n,!0)){const r=t.shiftKey;return t.preventDefault(),j1(n,r,!0),!0}return!1},Te),e.registerCommand(z0,t=>{const n=he();if(Mt(n)){const i=n.getNodes();if(i.length>0)return t.preventDefault(),L1(i[0])?i[0].selectPrevious():i[0].selectNext(0,0),!0}if(!ae(n))return!1;const r=t.shiftKey;return!!z1(n,!1)&&(t.preventDefault(),j1(n,r,!1),!0)},Te),e.registerCommand(H0,t=>{if(bx(t.target))return!1;const n=he();if(ae(n)){if(function(r){if(!r.isCollapsed())return!1;const{anchor:i}=r;if(i.offset!==0)return!1;const a=i.getNode();if(dt(a))return!1;const o=DO(a);return o.getIndent()>0&&(o.is(a)||a.is(o.getFirstDescendant()))}(n))return t.preventDefault(),e.dispatchCommand(Y0,void 0);if(vx&&navigator.language==="ko-KR")return!1}else if(!Mt(n))return!1;return t.preventDefault(),e.dispatchCommand(Vi,!0)},Te),e.registerCommand(V0,t=>{if(bx(t.target))return!1;const n=he();return!(!ae(n)&&!Mt(n))&&(t.preventDefault(),e.dispatchCommand(Vi,!1))},Te),e.registerCommand(fc,t=>{const n=he();if(!ae(n))return!1;if($h(n),t!==null){if((vx||uP||fP)&&cP)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(Aa,!1)}return e.dispatchCommand(Zo,void 0)},Te),e.registerCommand(q0,()=>{const t=he();return!!ae(t)&&(e.blur(),!0)},Te),e.registerCommand(G0,t=>{const[,n]=Vc(t);if(n.length>0){const i=gx(t.clientX,t.clientY);if(i!==null){const{offset:a,node:o}=i,s=Ka(o);if(s!==null){const l=Bf();if(fe(s))l.anchor.set(s.getKey(),a,"text"),l.focus.set(s.getKey(),a,"text");else{const u=s.getParentOrThrow().getKey(),d=s.getIndexWithinParent()+1;l.anchor.set(u,d,"element"),l.focus.set(u,d,"element")}const c=ji(l);$t(c)}e.dispatchCommand(mx,n)}return t.preventDefault(),!0}const r=he();return!!ae(r)},Te),e.registerCommand(X0,t=>{const[n]=Vc(t),r=he();return!(n&&!ae(r))},Te),e.registerCommand(Z0,t=>{const[n]=Vc(t),r=he();if(n&&!ae(r))return!1;const i=gx(t.clientX,t.clientY);if(i!==null){const a=Ka(i.node);Ie(a)&&t.preventDefault()}return!0},Te),e.registerCommand(Ef,()=>(Q$(),!0),Te),e.registerCommand(hc,t=>(fx(e,li(t,ClipboardEvent)?t:null),!0),Te),e.registerCommand(Nf,t=>(async function(n,r){await fx(r,li(n,ClipboardEvent)?n:null),r.update(()=>{const i=he();ae(i)?i.removeText():Mt(i)&&i.getNodes().forEach(a=>a.remove())})}(t,e),!0),Te),e.registerCommand(cc,t=>{const[,n,r]=Vc(t);return n.length>0&&!r?(e.dispatchCommand(mx,n),!0):Za(t.target)&&Zf(t.target)?!1:he()!==null&&(function(i,a){i.preventDefault(),a.update(()=>{const o=he(),s=li(i,InputEvent)||li(i,KeyboardEvent)?null:i.clipboardData;s!=null&&o!==null&&cx(s,o,a)},{tag:T$})}(t,e),!0)},Te),e.registerCommand(U0,t=>{const n=he();return ae(n)&&$h(n),!1},Te),e.registerCommand(K0,t=>{const n=he();return ae(n)&&$h(n),!1},Te))}function mP(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Oh=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?_.useLayoutEffect:_.useEffect;function yP({editor:e,ErrorBoundary:t}){return function(n,r){const[i,a]=_.useState(()=>n.getDecorators());return Oh(()=>n.registerDecoratorListener(o=>{Qr.flushSync(()=>{a(o)})}),[n]),_.useEffect(()=>{a(n.getDecorators())},[n]),_.useMemo(()=>{const o=[],s=Object.keys(i);for(let l=0;l<s.length;l++){const c=s[l],u=h.jsx(r,{onError:f=>n._onError(f),children:h.jsx(_.Suspense,{fallback:null,children:i[c]})}),d=n.getElementByKey(c);d!==null&&o.push(Qr.createPortal(u,d,c))}return o},[r,i,n])}(e,t)}function bP({editor:e,ErrorBoundary:t}){return function(n){const r=rx.maybeFromEditor(n);if(r&&r.hasExtensionByName(XO.name)){for(const i of["@lexical/plain-text","@lexical/rich-text"])r.hasExtensionByName(i)&&mP(320,i);return!0}return!1}(e)?null:h.jsx(yP,{editor:e,ErrorBoundary:t})}function xx(e){return e.getEditorState().read(ix(e.isComposing()))}function xP({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=Fr();return function(i){Oh(()=>ur(vP(i),RO(i)),[i])}(r),h.jsxs(h.Fragment,{children:[e,h.jsx(_P,{content:t}),h.jsx(bP,{editor:r,ErrorBoundary:n})]})}function _P({content:e}){const[t]=Fr(),n=function(i){const[a,o]=_.useState(()=>xx(i));return Oh(()=>{function s(){const l=xx(i);o(l)}return s(),ur(i.registerUpdateListener(()=>{s()}),i.registerEditableListener(()=>{s()}))},[i]),a}(t),r=TO();return n?typeof e=="function"?e(r):e:null}const _x=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?_.useLayoutEffect:_.useEffect;function wP({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:a,ariaExpanded:o,ariaInvalid:s,ariaLabel:l,ariaLabelledBy:c,ariaMultiline:u,ariaOwns:d,ariaRequired:f,autoCapitalize:g,className:p,id:v,role:m="textbox",spellCheck:x=!0,style:y,tabIndex:b,"data-testid":k,...w},S){const[N,E]=_.useState(e.isEditable()),C=_.useCallback(O=>{O&&O.ownerDocument&&O.ownerDocument.defaultView?e.setRootElement(O):e.setRootElement(null)},[e]),T=_.useMemo(()=>function(...O){return P=>{for(const M of O)typeof M=="function"?M(P):M!=null&&(M.current=P)}}(S,C),[C,S]);return _x(()=>(E(e.isEditable()),e.registerEditableListener(O=>{E(O)})),[e]),h.jsx("div",{"aria-activedescendant":N?t:void 0,"aria-autocomplete":N?n:"none","aria-controls":N?r:void 0,"aria-describedby":i,...a!=null?{"aria-errormessage":a}:{},"aria-expanded":N&&m==="combobox"?!!o:void 0,...s!=null?{"aria-invalid":s}:{},"aria-label":l,"aria-labelledby":c,"aria-multiline":u,"aria-owns":N?d:void 0,"aria-readonly":!N||void 0,"aria-required":f,autoCapitalize:g,className:p,contentEditable:N,"data-testid":k,id:v,ref:T,role:m,spellCheck:x,style:y,tabIndex:b,...w})}const kP=_.forwardRef(wP);function wx(e){return e.getEditorState().read(ix(e.isComposing()))}const SP=_.forwardRef(NP);function NP(e,t){const{placeholder:n,...r}=e,[i]=Fr();return h.jsxs(h.Fragment,{children:[h.jsx(kP,{editor:i,...r,ref:t}),n!=null&&h.jsx(EP,{editor:i,content:n})]})}function EP({content:e,editor:t}){const n=function(o){const[s,l]=_.useState(()=>wx(o));return _x(()=>{function c(){const u=wx(o);l(u)}return c(),ur(o.registerUpdateListener(()=>{c()}),o.registerEditableListener(()=>{c()}))},[o]),s}(t),[r,i]=_.useState(t.isEditable());if(_.useLayoutEffect(()=>(i(t.isEditable()),t.registerEditableListener(o=>{i(o)})),[t]),!n)return null;let a=null;return typeof e=="function"?a=e(r):e!==null&&(a=e),a===null?null:h.jsx("div",{"aria-hidden":!0,children:a})}function CP(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return 0;const a=t._selection,o=e._selection;if(i)return 1;if(!(ae(a)&&ae(o)&&o.isCollapsed()&&a.isCollapsed()))return 0;const s=function(x,y,b){const k=x._nodeMap,w=[];for(const S of y){const N=k.get(S);N!==void 0&&w.push(N)}for(const[S,N]of b){if(!N)continue;const E=k.get(S);E===void 0||dt(E)||w.push(E)}return w}(t,n,r);if(s.length===0)return 0;if(s.length>1){const x=t._nodeMap,y=x.get(a.anchor.key),b=x.get(o.anchor.key);return y&&b&&!e._nodeMap.has(y.__key)&&fe(y)&&y.__text.length===1&&a.anchor.offset===1?2:0}const l=s[0],c=e._nodeMap.get(l.__key);if(!fe(c)||!fe(l)||c.__mode!==l.__mode)return 0;const u=c.__text,d=l.__text;if(u===d)return 0;const f=a.anchor,g=o.anchor;if(f.key!==g.key||f.type!=="text")return 0;const p=f.offset,v=g.offset,m=d.length-u.length;return m===1&&v===p-1?2:m===-1&&v===p+1?3:m===-1&&v===p?4:0}function TP(e,t){let n=Date.now(),r=0,i=Date.now(),a=0,o=null;return(s,l,c,u,d,f)=>{const g=Date.now();if(f.has(db)&&(i=n,a=r,o=s),f.has(Pf))return r=0,n=g,2;f.has(fb)&&o&&(n=i,r=a,s=o);const p=CP(s,l,u,d,e.isComposing()),v=(()=>{const m=c===null||c.editor===e,x=f.has(C$);if(!x&&m&&f.has(Yi))return 0;if(p===1)return 2;if(s===null)return 1;const y=l._selection;if(!(u.size>0||d.size>0))return y!==null?0:2;const b=typeof t=="number"?t:t.peek();return x===!1&&p!==0&&p===r&&g<n+b&&m||u.size===1&&function(k,w,S){const N=w._nodeMap.get(k),E=S._nodeMap.get(k),C=w._selection,T=S._selection;return!(ae(C)&&ae(T)&&C.anchor.type==="element"&&C.focus.type==="element"&&T.anchor.type==="text"&&T.focus.type==="text"||!fe(N)||!fe(E)||N.__parent!==E.__parent)&&JSON.stringify(w.read(()=>N.exportJSON()))===JSON.stringify(S.read(()=>E.exportJSON()))}(Array.from(u)[0],s,l)?0:1})();return n=g,r=p,v}}function kx(e){e.undoStack=[],e.redoStack=[],e.current=null}function Sx(e,t,n){const r=TP(e,n);return ur(e.registerCommand(uc,()=>(function(a,o){const s=o.redoStack,l=o.undoStack;if(l.length!==0){const c=o.current,u=l.pop();c!==null&&(s.push(c),a.dispatchCommand(Ro,!0)),l.length===0&&a.dispatchCommand(es,!1),o.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:Pf})}}(e,t),!0),Te),e.registerCommand(dc,()=>(function(a,o){const s=o.redoStack,l=o.undoStack;if(s.length!==0){const c=o.current;c!==null&&(l.push(c),a.dispatchCommand(es,!0));const u=s.pop();s.length===0&&a.dispatchCommand(Ro,!1),o.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:Pf})}}(e,t),!0),Te),e.registerCommand(v$,()=>(kx(t),!1),Te),e.registerCommand(m$,()=>(kx(t),e.dispatchCommand(Ro,!1),e.dispatchCommand(es,!1),!0),Te),e.registerUpdateListener(({editorState:a,prevEditorState:o,dirtyLeaves:s,dirtyElements:l,tags:c})=>{const u=t.current,d=t.redoStack,f=t.undoStack,g=u===null?null:u.editorState;if(u!==null&&a===g)return;const p=r(o,a,u,s,l,c);if(p===1)d.length!==0&&(t.redoStack=[],e.dispatchCommand(Ro,!1)),u!==null&&(f.push({...u}),e.dispatchCommand(es,!0));else if(p===2)return;t.current={editor:e,editorState:a}}))}function Nx(){return{current:null,redoStack:[],undoStack:[]}}const Ph={build:(e,{delay:t,createInitialHistoryState:n,disabled:r})=>Z1({delay:t,disabled:r,historyState:n(e)}),config:{createInitialHistoryState:Nx,delay:300,disabled:typeof window>"u"},name:"@lexical/history/History",register:(e,t,n)=>{const r=n.getOutput();return ps(()=>r.disabled.value?void 0:Sx(e,r.historyState.value,r.delay))}};_O(Ph,{createInitialHistoryState:()=>{throw new Error("SharedHistory did not inherit parent history")},disabled:!0});function MP({delay:e,externalHistoryState:t}){const[n]=Fr();return function(r,i,a=1e3){const o=_.useMemo(()=>i||Nx(),[i]);_.useEffect(()=>Sx(r,o,a),[a,r,o])}(n,t,e),null}const $P=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?_.useLayoutEffect:_.useEffect;function OP({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){const[r]=Fr();return $P(()=>{if(n)return r.registerUpdateListener(({editorState:i,dirtyElements:a,dirtyLeaves:o,prevEditorState:s,tags:l})=>{t&&a.size===0&&o.size===0||e&&l.has(Yi)||s.isEmpty()||n(i,r,l)})},[r,e,t,n]),null}function ui(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Ah(e){let t=1,n=e.getParent();for(;n!=null;){if(Fe(n)){const r=n.getParent();if(Ce(r)){t++,n=r.getParent();continue}ui(40)}return t}return t}function Lh(e){let t=e.getParent();Ce(t)||ui(40);let n=t;for(;n!==null;)n=n.getParent(),Ce(n)&&(t=n);return t}function Ex(e){let t=[];const n=e.getChildren().filter(Fe);for(let r=0;r<n.length;r++){const i=n[r],a=i.getFirstChild();Ce(a)?t=t.concat(Ex(a)):t.push(i)}return t}function dr(e){return Fe(e)&&Ce(e.getFirstChild())}function Cx(e){return yn().append(e)}function Tx(e,t){return Fe(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function Mx(e){const t=he();if(t!==null){let n=t.getNodes();if(ae(t)){const i=t.getStartEndPoints();i===null&&ui(143);const[a]=i,o=a.getNode(),s=o.getParent();if(Gt(o)){const l=o.getFirstChild();if(l)n=l.selectStart().getNodes();else{const c=Ye();o.append(c),n=c.select().getNodes()}}else if(Tx(o,n)){const l=sn(e);if(Gt(s)){o.replace(l);const c=yn();Q(o)&&(c.setFormat(o.getFormatType()),c.setIndent(o.getIndent())),l.append(c)}else if(Fe(o)){const c=o.getParentOrThrow();ra(l,c.getChildren()),c.replace(l)}return}}const r=new Set;for(let i=0;i<n.length;i++){const a=n[i];if(Q(a)&&a.isEmpty()&&!Fe(a)&&!r.has(a.getKey())){$x(a,e);continue}let o=Qb(a)?a.getParent():Fe(a)&&a.isEmpty()?a:null;for(;o!=null;){const s=o.getKey();if(Ce(o)){if(!r.has(s)){const l=sn(e);ra(l,o.getChildren()),o.replace(l),r.add(s)}break}{const l=o.getParent();if(Gt(l)&&!r.has(s)){r.add(s),$x(o,e);break}o=l}}}}}function ra(e,t){e.splice(e.getChildrenSize(),0,t)}function $x(e,t){if(Ce(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),i=yn();let a;if(ra(i,e.getChildren()),Ce(n)&&t===n.getListType())n.append(i),Ce(r)&&t===r.getListType()&&(ra(n,r.getChildren()),r.remove()),a=n;else if(Ce(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),a=r;else{const s=sn(t);s.append(i),e.replace(s),a=s}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());const o=he();return ae(o)&&(a.getKey()===o.anchor.key&&o.anchor.set(i.getKey(),o.anchor.offset,"element"),a.getKey()===o.focus.key&&o.focus.set(i.getKey(),o.focus.offset,"element")),e.remove(),a}function Dh(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&dr(n)&&dr(r)&&(Dh(n.getFirstChild(),r.getFirstChild()),r.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function PP(){const e=he();if(ae(e)){const t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(Tx(r,n))t.add(Lh(r));else for(let i=0;i<n.length;i++){const a=n[i];if(Qb(a)){const o=LO(a,ao);o!=null&&t.add(Lh(o))}}for(const i of t){let a=i;const o=Ex(i);for(const s of o){const l=Ye().setTextStyle(e.style).setTextFormat(e.format);ra(l,s.getChildren()),a.insertAfter(l),a=l,s.__key===e.anchor.key&&oi(e.anchor,on(mn(l,"next"))),s.__key===e.focus.key&&oi(e.focus,on(mn(l,"next"))),s.remove()}i.remove()}}}function Ox(e){const t=e.getListType()!=="check";let n=e.getStart();for(const r of e.getChildren())Fe(r)&&(r.getValue()!==n&&r.setValue(n),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),Ce(r.getFirstChild())||n++)}function AP(e){const t=new Set;if(dr(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(dr(r)&&dr(i)){const a=i.getFirstChild();if(Ce(a)){a.append(e);const o=r.getFirstChild();Ce(o)&&(ra(a,o.getChildren()),r.remove(),t.add(r.getKey()))}}else if(dr(r)){const a=r.getFirstChild();if(Ce(a)){const o=a.getFirstChild();o!==null&&o.insertBefore(e)}}else if(dr(i)){const a=i.getFirstChild();Ce(a)&&a.append(e)}else if(Ce(n)){const a=yn().setTextFormat(e.getTextFormat()).setTextStyle(e.getTextStyle()),o=sn(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());a.append(o),o.append(e),i?i.insertAfter(a):r?r.insertBefore(a):n.append(a)}}function LP(e){if(dr(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(Ce(n?n.getParent():void 0)&&Fe(n)&&Ce(t)){const r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{const a=t.getListType(),o=yn(),s=sn(a);o.append(s),e.getPreviousSiblings().forEach(u=>s.append(u));const l=yn(),c=sn(a);l.append(c),ra(c,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(l),n.replace(e)}}}function DP(e=!1){const t=he();if(!ae(t)||!t.isCollapsed())return!1;const n=t.anchor.getNode();let r=null;if(Fe(n)&&n.getChildrenSize()===0)r=n;else if(fe(n)){const c=n.getParent();Fe(c)&&c.getChildren().every(u=>fe(u)&&u.getTextContent().trim()==="")&&(r=c)}if(r===null)return!1;const i=Lh(r),a=r.getParent();Ce(a)||ui(40);const o=a.getParent();let s;if(Gt(o))s=Ye(),i.insertAfter(s);else{if(!Fe(o))return!1;s=yn(),o.insertAfter(s)}s.setTextStyle(t.style).setTextFormat(t.format).select();const l=r.getNextSiblings();if(l.length>0){const c=e?function(d,f){return d.getStart()+f.getIndexWithinParent()}(a,r):1,u=sn(a.getListType(),c);if(Fe(s)){const d=yn();d.append(u),s.insertAfter(d)}else s.insertAfter(u);u.append(...l)}return function(c){let u=c;for(;u.getNextSibling()==null&&u.getPreviousSibling()==null;){const d=u.getParent();if(d==null||!Fe(d)&&!Ce(d))break;u=d}u.remove()}(r),!0}class ao extends rn{constructor(n=1,r=void 0,i){super(i);R(this,"__value");R(this,"__checked");this.__value=n===void 0?1:n,this.__checked=r}$config(){return this.config("listitem",{$transform:n=>{if(n.__checked==null)return;const r=n.getParent();Ce(r)&&r.getListType()!=="check"&&n.getChecked()!=null&&n.setChecked(void 0)},extends:rn,importDOM:{li:()=>({conversion:IP,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__value=n.__value,this.__checked=n.__checked}createDOM(n){const r=document.createElement("li");return this.updateListItemDOM(null,r,n),r}updateListItemDOM(n,r,i){(function(s,l,c){const u=l.getParent();!Ce(u)||u.getListType()!=="check"||Ce(l.getFirstChild())?(s.removeAttribute("role"),s.removeAttribute("tabIndex"),s.removeAttribute("aria-checked")):(s.setAttribute("role","checkbox"),s.setAttribute("tabIndex","-1"),c&&l.__checked===c.__checked||s.setAttribute("aria-checked",l.getChecked()?"true":"false"))})(r,this,n),r.value=this.__value,function(s,l,c){const u=[],d=[],f=l.list,g=f?f.listitem:void 0;let p;if(f&&f.nested&&(p=f.nested.listitem),g!==void 0&&u.push(...si(g)),f){const v=c.getParent(),m=Ce(v)&&v.getListType()==="check",x=c.getChecked();m&&!x||d.push(f.listitemUnchecked),m&&x||d.push(f.listitemChecked),m&&u.push(x?f.listitemChecked:f.listitemUnchecked)}if(p!==void 0){const v=si(p);c.getChildren().some(m=>Ce(m))?u.push(...v):d.push(...v)}d.length>0&&yh(s,...d),u.length>0&&Ir(s,...u)}(r,i.theme,this);const a=n?n.__style:"",o=this.__style;a!==o&&(o===""?r.removeAttribute("style"):r.style.cssText=o),function(s,l,c){const u=O1(l.__textStyle);for(const d in u)s.style.setProperty(`--listitem-marker-${d}`,u[d]);if(c)for(const d in O1(c.__textStyle))d in u||s.style.removeProperty(`--listitem-marker-${d}`)}(r,this,n)}updateDOM(n,r,i){const a=r;return this.updateListItemDOM(n,a,i),!1}updateFromJSON(n){return super.updateFromJSON(n).setValue(n.value).setChecked(n.checked)}exportDOM(n){const r=this.createDOM(n._config),i=this.getFormatType();i&&(r.style.textAlign=i);const a=this.getDirection();return a&&(r.dir=a),{element:r}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...n){for(let r=0;r<n.length;r++){const i=n[r];if(Q(i)&&this.canMergeWith(i)){const a=i.getChildren();this.append(...a),i.remove()}else super.append(i)}return this}replace(n,r){if(Fe(n))return super.replace(n);this.setIndent(0);const i=this.getParentOrThrow();if(!Ce(i))return n;if(i.__first===this.getKey())i.insertBefore(n);else if(i.__last===this.getKey())i.insertAfter(n);else{const a=sn(i.getListType());let o=this.getNextSibling();for(;o;){const s=o;o=o.getNextSibling(),a.append(s)}i.insertAfter(n),n.insertAfter(a)}return r&&(Q(n)||ui(139),this.getChildren().forEach(a=>{n.append(a)})),this.remove(),i.getChildrenSize()===0&&i.remove(),n}insertAfter(n,r=!0){const i=this.getParentOrThrow();if(Ce(i)||ui(39),Fe(n))return super.insertAfter(n,r);const a=this.getNextSiblings();if(i.insertAfter(n,r),a.length!==0){const o=sn(i.getListType());a.forEach(s=>o.append(s)),n.insertAfter(o,r)}return n}remove(n){const r=this.getPreviousSibling(),i=this.getNextSibling();super.remove(n),r&&i&&dr(r)&&dr(i)&&(Dh(r.getFirstChild(),i.getFirstChild()),i.remove())}insertNewAfter(n,r=!0){const i=yn().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(i,r),i}collapseAtStart(n){const r=Ye();this.getChildren().forEach(s=>r.append(s));const i=this.getParentOrThrow(),a=i.getParentOrThrow(),o=Fe(a);if(i.getChildrenSize()===1)if(o)i.remove(),a.select();else{i.insertBefore(r),i.remove();const s=n.anchor,l=n.focus,c=r.getKey();s.type==="element"&&s.getNode().is(this)&&s.set(c,s.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(c,l.offset,"element")}else i.insertBefore(r),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(n){const r=this.getWritable();return r.__value=n,r}getChecked(){const n=this.getLatest();let r;const i=this.getParent();return Ce(i)&&(r=i.getListType()),r==="check"?!!n.__checked:void 0}setChecked(n){const r=this.getWritable();return r.__checked=n,r}toggleChecked(){const n=this.getWritable();return n.setChecked(!n.__checked)}getIndent(){const n=this.getParent();if(n===null||!this.isAttached())return this.getLatest().__indent;let r=n.getParentOrThrow(),i=0;for(;Fe(r);)r=r.getParentOrThrow().getParentOrThrow(),i++;return i}setIndent(n){typeof n!="number"&&ui(117),(n=Math.floor(n))>=0||ui(199);let r=this.getIndent();for(;r!==n;)r<n?(AP(this),r++):(LP(this),r--);return this}canInsertAfter(n){return Fe(n)}canReplaceWith(n){return Fe(n)}canMergeWith(n){return Fe(n)||Kf(n)}extractWithChild(n,r){if(!ae(r))return!1;const i=r.anchor.getNode(),a=r.focus.getNode();return this.isParentOf(i)&&this.isParentOf(a)&&this.getTextContent().length===r.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return sn("bullet")}canMergeWhenEmpty(){return!0}}function IP(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return Px(n)}if(e.classList.contains("joplin-checkbox")){for(const n of e.children)if(n.classList.contains("checkbox-wrapper")&&n.children.length>0&&n.children[0].tagName==="INPUT")return Px(n.children[0])}const t=e.getAttribute("aria-checked");return{node:yn(t==="true"||t!=="false"&&void 0)}}function Px(e){return e.getAttribute("type")!=="checkbox"?{node:null}:{node:yn(e.hasAttribute("checked"))}}function yn(e){return jn(new ao(void 0,e))}function Fe(e){return e instanceof ao}class ys extends rn{constructor(n="number",r=1,i){super(i);R(this,"__tag");R(this,"__start");R(this,"__listType");const a=zP[n]||n;this.__listType=a,this.__tag=a==="number"?"ol":"ul",this.__start=r}$config(){return this.config("list",{$transform:n=>{(function(r){const i=r.getNextSibling();Ce(i)&&r.getListType()===i.getListType()&&Dh(r,i)})(n),Ox(n)},extends:rn,importDOM:{ol:()=>({conversion:Lx,priority:0}),ul:()=>({conversion:Lx,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__listType=n.__listType,this.__tag=n.__tag,this.__start=n.__start}getTag(){return this.getLatest().__tag}setListType(n){const r=this.getWritable();return r.__listType=n,r.__tag=n==="number"?"ol":"ul",r}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(n){const r=this.getWritable();return r.__start=n,r}createDOM(n,r){const i=this.__tag,a=document.createElement(i);return this.__start!==1&&a.setAttribute("start",String(this.__start)),a.__lexicalListType=this.__listType,Ax(a,n.theme,this),a}updateDOM(n,r,i){return n.__tag!==this.__tag||n.__listType!==this.__listType||(Ax(r,i.theme,this),n.__start!==this.__start&&r.setAttribute("start",String(this.__start)),!1)}updateFromJSON(n){return super.updateFromJSON(n).setListType(n.listType).setStart(n.start)}exportDOM(n){const r=this.createDOM(n._config,n);return ot(r)&&(this.__start!==1&&r.setAttribute("start",String(this.__start)),this.__listType==="check"&&r.setAttribute("__lexicalListType","check")),{element:r}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(n,r,i){let a=i;for(let o=0;o<i.length;o++){const s=i[o];Fe(s)||(a===i&&(a=[...i]),a[o]=yn().append(!Q(s)||Ce(s)||s.isInline()?s:pt(s.getTextContent())))}return super.splice(n,r,a)}extractWithChild(n){return Fe(n)}}function Ax(e,t,n){const r=[],i=[],a=t.list;if(a!==void 0){const o=a[`${n.__tag}Depth`]||[],s=Ah(n)-1,l=s%o.length,c=o[l],u=a[n.__tag];let d;const f=a.nested,g=a.checklist;if(f!==void 0&&f.list&&(d=f.list),u!==void 0&&r.push(u),g!==void 0&&n.__listType==="check"&&r.push(g),c!==void 0){r.push(...si(c));for(let p=0;p<o.length;p++)p!==l&&i.push(n.__tag+p)}if(d!==void 0){const p=si(d);s>1?r.push(...p):i.push(...p)}}i.length>0&&yh(e,...i),r.length>0&&Ir(e,...r)}function FP(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(Fe(r)){t.push(r);const i=r.getChildren();i.length>1&&i.forEach(a=>{Ce(a)&&t.push(Cx(a))})}else t.push(Cx(r))}return t}function Lx(e){const t=e.nodeName.toLowerCase();let n=null;return t==="ol"?n=sn("number",e.start):t==="ul"&&(n=function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(const i of r.childNodes)if(ot(i)&&i.hasAttribute("aria-checked"))return!0;return!1}(e)?sn("check"):sn("bullet")),{after:FP,node:n}}const zP={ol:"number",ul:"bullet"};function sn(e="number",t=1){return jn(new ys(e,t))}function Ce(e){return e instanceof ys}const BP=me("UPDATE_LIST_START_COMMAND"),Dx=me("INSERT_UNORDERED_LIST_COMMAND"),Ix=me("INSERT_ORDERED_LIST_COMMAND"),Ih=me("REMOVE_LIST_COMMAND");function Fx(e,t){return ur(e.registerCommand(Ix,()=>(Mx("number"),!0),or),e.registerCommand(BP,n=>{const{listNodeKey:r,newStart:i}=n,a=ft(r);return!!Ce(a)&&(a.getListType()==="number"&&(a.setStart(i),Ox(a)),!0)},or),e.registerCommand(Dx,()=>(Mx("bullet"),!0),or),e.registerCommand(Ih,()=>(PP(),!0),or),e.registerCommand(Zo,()=>DP(!!(t&&t.restoreNumbering)),or),e.registerNodeTransform(ao,n=>{const r=n.getFirstChild();if(r){if(fe(r)){const i=r.getStyle(),a=r.getFormat();n.getTextStyle()!==i&&n.setTextStyle(i),n.getTextFormat()!==a&&n.setTextFormat(a)}}else{const i=he();ae(i)&&(i.style!==n.getTextStyle()||i.format!==n.getTextFormat())&&i.isCollapsed()&&n.is(i.anchor.getNode())&&n.setTextStyle(i.style).setTextFormat(i.format)}}),e.registerNodeTransform(Mr,n=>{const r=n.getParent();if(Fe(r)&&n.is(r.getFirstChild())){const i=n.getStyle(),a=n.getFormat();i===r.getTextStyle()&&a===r.getTextFormat()||r.setTextStyle(i).setTextFormat(a)}}))}function jP(e){const t=n=>{const r=n.getParent();if(Ce(n.getFirstChild())||!Ce(r))return;const i=Nt(n,a=>Fe(a)&&Ce(a.getParent())&&Fe(a.getPreviousSibling()));if(i===null&&n.getIndent()>0)n.setIndent(0);else if(Fe(i)){const a=i.getPreviousSibling();if(Fe(a)){const o=function(l){let c=l,u=c.getFirstChild();for(;Ce(u);){const d=u.getLastChild();if(!Fe(d))break;c=d,u=c.getFirstChild()}return c}(a),s=o.getParent();if(Ce(s)){const l=Ah(s);l+1<Ah(r)&&n.setIndent(l)}}}};return e.registerNodeTransform(ys,n=>{const r=[n];for(;r.length>0;){const i=r.shift();if(Ce(i)){for(const a of i.getChildren())if(Fe(a)){t(a);const o=a.getFirstChild();Ce(o)&&r.push(o)}}}})}function WP({hasStrictIndent:e=!1,shouldPreserveNumbering:t=!1}){const[n]=Fr();return _.useEffect(()=>{if(!n.hasNodes([ys,ao]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[n]),_.useEffect(()=>ur(Fx(n,{restoreNumbering:t}),e?jP(n):()=>{}),[n,e,t]),function(r){_.useEffect(()=>Fx(r),[r])}(n),null}const UP=new Set(["http:","https:","mailto:","sms:","tel:"]);let oo=class cT extends rn{constructor(n="",r={},i){super(i);R(this,"__url");R(this,"__target");R(this,"__rel");R(this,"__title");const{target:a=null,rel:o=null,title:s=null}=r;this.__url=n,this.__target=a,this.__rel=o,this.__title=s}static getType(){return"link"}static clone(n){return new cT(n.__url,{rel:n.__rel,target:n.__target,title:n.__title},n.__key)}createDOM(n){const r=document.createElement("a");return this.updateLinkDOM(null,r,n),Ir(r,n.theme.link),r}updateLinkDOM(n,r,i){if(g1(r)){n&&n.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const a of["target","rel","title"]){const o=`__${a}`,s=this[o];n&&n[o]===s||(s?r[a]=s:r.removeAttribute(a))}}}updateDOM(n,r,i){return this.updateLinkDOM(n,r,i),!1}static importDOM(){return{a:n=>({conversion:qP,priority:1})}}static importJSON(n){return so().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setURL(n.url).setRel(n.rel||null).setTarget(n.target||null).setTitle(n.title||null)}sanitizeUrl(n){n=Ux(n);try{const r=new URL(Ux(n));if(!UP.has(r.protocol))return"about:blank"}catch{return n}return n}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(n){const r=this.getWritable();return r.__url=n,r}getTarget(){return this.getLatest().__target}setTarget(n){const r=this.getWritable();return r.__target=n,r}getRel(){return this.getLatest().__rel}setRel(n){const r=this.getWritable();return r.__rel=n,r}getTitle(){return this.getLatest().__title}setTitle(n){const r=this.getWritable();return r.__title=n,r}insertNewAfter(n,r=!0){const i=so(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(i,r),i}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(n,r,i){if(!ae(r))return!1;const a=r.anchor.getNode(),o=r.focus.getNode();return this.isParentOf(a)&&this.isParentOf(o)&&r.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}};function zx(e){const t=cr(e,"next");return[t,t.getFlipped()]}function Bx(e,t){for(const n of t)if(n.origin.isAttached()){const r=on(n);return void oi(e,r)}}function HP(e){const t=he();let n=null,r=null;ae(t)&&(n=zx(t.anchor),r=zx(t.focus));for(const i of mn(e,"next")){const a=i.origin;if(Q(a)&&!a.isInline()){const o=a.getChildren();if(o.length>0){const s=p1(e);s.append(...o),a.append(s)}IO(a,Qa(i),{$shouldSplit:()=>!1})}}if(e.isEmpty()){const i=e.getParent();e.remove(),i&&i.isEmpty()&&i.remove()}ae(t)&&(Bx(t.anchor,n),Bx(t.focus,r),ji(t))}function qP(e){let t=null;if(g1(e)){const n=e.textContent;(n!==null&&n!==""||e.children.length>0)&&(t=so(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function so(e="",t){return jn(new oo(e,t))}function fr(e){return e instanceof oo}let Fh=class uT extends oo{constructor(n="",r={},i){super(n,r,i);R(this,"__isUnlinked");this.__isUnlinked=r.isUnlinked!==void 0&&r.isUnlinked!==null&&r.isUnlinked}static getType(){return"autolink"}static clone(n){return new uT(n.__url,{isUnlinked:n.__isUnlinked,rel:n.__rel,target:n.__target,title:n.__title},n.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(n){const r=this.getWritable();return r.__isUnlinked=n,r}createDOM(n){return this.__isUnlinked?document.createElement("span"):super.createDOM(n)}updateDOM(n,r,i){return super.updateDOM(n,r,i)||n.__isUnlinked!==this.__isUnlinked}static importJSON(n){return jx().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setIsUnlinked(n.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(n,r=!0){const i=jx(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(i,r),i}};function jx(e="",t){return jn(new Fh(e,t))}function bs(e){return e instanceof Fh}const xs=me("TOGGLE_LINK_COMMAND");function Wx(e,t){if(e.type==="element"){const n=e.getNode();return Q(n)||function(r,...i){const a=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",r);for(const s of i)o.append("v",s);throw a.search=o.toString(),Error(`Minified Lexical error #${r}; visit ${a.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(252),n.getChildren()[e.offset+t]||null}return null}function zh(e,t={}){let n;if(e&&typeof e=="object"){const{url:u,...d}=e;n=u,t={...d,...t}}else n=e;const{target:r,title:i}=t,a=t.rel===void 0?"noreferrer":t.rel,o=he();if(o===null||!ae(o)&&!Mt(o))return;if(Mt(o)){const u=o.getNodes();return u.length===0?void 0:void u.forEach(d=>{if(n===null){const f=Nt(d,g=>!bs(g)&&fr(g));f&&(f.insertBefore(d),f.getChildren().length===0&&f.remove())}else{const f=Nt(d,g=>!bs(g)&&fr(g));if(f)f.setURL(n),r!==void 0&&f.setTarget(r),a!==void 0&&f.setRel(a);else{const g=so(n,{rel:a,target:r});d.insertBefore(g),g.append(d)}}})}if(o.isCollapsed()&&n===null)for(const u of o.getNodes()){const d=Nt(u,f=>!bs(f)&&fr(f));return void(d!==null&&(d.getChildren().forEach(f=>{d.insertBefore(f)}),d.remove()))}const s=o.extract();if(n===null){const u=new Set;return void s.forEach(d=>{const f=Nt(d,g=>!bs(g)&&fr(g));if(f!==null){const g=f.getKey();if(u.has(g))return;(function(p,v){const m=new Set(v.filter(E=>p.isParentOf(E)).map(E=>E.getKey())),x=p.getChildren(),y=E=>m.has(E.getKey())||Q(E)&&v.some(C=>p.isParentOf(C)&&E.isParentOf(C)),b=x.filter(y);if(b.length===x.length)return x.forEach(E=>p.insertBefore(E)),void p.remove();const k=x.findIndex(y),w=x.findLastIndex(y),S=k===0,N=w===x.length-1;if(S)b.forEach(E=>p.insertBefore(E));else if(N)for(let E=b.length-1;E>=0;E--)p.insertAfter(b[E]);else{for(let C=b.length-1;C>=0;C--)p.insertAfter(b[C]);const E=x.slice(w+1);if(E.length>0){const C=so(p.getURL(),{rel:p.getRel(),target:p.getTarget(),title:p.getTitle()});b[b.length-1].insertAfter(C),E.forEach(T=>C.append(T))}}})(f,s),u.add(g)}})}const l=new Set,c=u=>{l.has(u.getKey())||(l.add(u.getKey()),u.setURL(n),r!==void 0&&u.setTarget(r),a!==void 0&&u.setRel(a),i!==void 0&&u.setTitle(i))};if(s.length===1){const u=s[0],d=Nt(u,fr);if(d!==null)return c(d)}(function(u){const d=he();if(!ae(d))return u();const f=ji(d),g=f.isBackward(),p=Wx(f.anchor,g?-1:0),v=Wx(f.focus,g?0:-1);if(u(),p||v){const m=he();if(ae(m)){const x=m.clone();if(p){const y=p.getParent();y&&x.anchor.set(y.getKey(),p.getIndexWithinParent()+(g?1:0),"element")}if(v){const y=v.getParent();y&&x.focus.set(y.getKey(),v.getIndexWithinParent()+(g?0:1),"element")}$t(ji(x))}}})(()=>{let u=null;for(const d of s){if(!d.isAttached())continue;const f=Nt(d,fr);if(f){c(f);continue}if(Q(d)){if(!d.isInline())continue;if(fr(d)){if(!(bs(d)||u!==null&&u.getParentOrThrow().isParentOf(d))){c(d),u=d;continue}for(const p of d.getChildren())d.insertBefore(p);d.remove();continue}}const g=d.getPreviousSibling();fr(g)&&g.is(u)?g.append(d):(u=so(n,{rel:a,target:r,title:i}),d.insertAfter(u),u.append(d))}})}const VP=/^\+?[0-9\s()-]{5,}$/;function Ux(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:VP.test(e)?`tel:${e}`:`https://${e}`}function KP(e,t){return ur(e.registerNodeTransform(oo,HP),ps(()=>e.registerCommand(xs,n=>{const r=t.validateUrl.peek(),i=t.attributes.peek();if(n===null)return zh(null),!0;if(typeof n=="string")return!(r!==void 0&&!r(n))&&(zh(n,i),!0);{const{url:a,target:o,rel:s,title:l}=n;return zh(a,{...i,rel:s,target:o,title:l}),!0}},or)),ps(()=>{const n=t.validateUrl.value;if(!n)return;const r=t.attributes.value;return e.registerCommand(cc,i=>{const a=he();if(!ae(a)||a.isCollapsed()||!li(i,ClipboardEvent)||i.clipboardData===null)return!1;const o=i.clipboardData.getData("text");return!!n(o)&&!a.getNodes().some(s=>Q(s))&&(e.dispatchCommand(xs,{...r,url:o}),i.preventDefault(),!0)},or)}))}function YP({validateUrl:e,attributes:t}){const[n]=Fr();return _.useEffect(()=>{if(!n.hasNodes([oo]))throw new Error("LinkPlugin: LinkNode not registered on editor")}),_.useEffect(()=>KP(n,Z1({attributes:t,validateUrl:e})),[n,e,t]),null}const GP=_.createContext(null),Bh={didCatch:!1,error:null};class XP extends _.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Bh}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(...t){var r,i;const{error:n}=this.state;n!==null&&((i=(r=this.props).onReset)==null||i.call(r,{args:t,reason:"imperative-api"}),this.setState(Bh))}componentDidCatch(t,n){var r,i;(i=(r=this.props).onError)==null||i.call(r,t,n)}componentDidUpdate(t,n){var a,o;const{didCatch:r}=this.state,{resetKeys:i}=this.props;r&&n.error!==null&&ZP(t.resetKeys,i)&&((o=(a=this.props).onReset)==null||o.call(a,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(Bh))}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:a,error:o}=this.state;let s=t;if(a){const l={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")s=n(l);else if(r)s=_.createElement(r,l);else if(i!==void 0)s=i;else throw o}return _.createElement(GP.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},s)}}function ZP(e=[],t=[]){return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function JP({children:e,onError:t}){return h.jsx(XP,{fallback:h.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}var lo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Un(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var QP={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
264
264
  * Prism: Lightweight, robust, elegant syntax highlighting
265
265
  *
266
266
  * @license MIT <https://opensource.org/licenses/MIT>
267
267
  * @author Lea Verou <https://lea.verou.me>
268
268
  * @namespace
269
269
  * @public
270
- */var n=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,a=0,o={},s={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function y(x){return x instanceof l?new l(x.type,y(x.content),x.alias):Array.isArray(x)?x.map(y):x.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(y){return Object.prototype.toString.call(y).slice(8,-1)},objId:function(y){return y.__id||Object.defineProperty(y,"__id",{value:++a}),y.__id},clone:function y(x,k){k=k||{};var w,S;switch(s.util.type(x)){case"Object":if(S=s.util.objId(x),k[S])return k[S];w={},k[S]=w;for(var N in x)x.hasOwnProperty(N)&&(w[N]=y(x[N],k));return w;case"Array":return S=s.util.objId(x),k[S]?k[S]:(w=[],k[S]=w,x.forEach(function(C,E){w[E]=y(C,k)}),w);default:return x}},getLanguage:function(y){for(;y;){var x=i.exec(y.className);if(x)return x[1].toLowerCase();y=y.parentElement}return"none"},setLanguage:function(y,x){y.className=y.className.replace(RegExp(i,"gi"),""),y.classList.add("language-"+x)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(w){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(w.stack)||[])[1];if(y){var x=document.getElementsByTagName("script");for(var k in x)if(x[k].src==y)return x[k]}return null}},isActive:function(y,x,k){for(var w="no-"+x;y;){var S=y.classList;if(S.contains(x))return!0;if(S.contains(w))return!1;y=y.parentElement}return!!k}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(y,x){var k=s.util.clone(s.languages[y]);for(var w in x)k[w]=x[w];return k},insertBefore:function(y,x,k,w){w=w||s.languages;var S=w[y],N={};for(var C in S)if(S.hasOwnProperty(C)){if(C==x)for(var E in k)k.hasOwnProperty(E)&&(N[E]=k[E]);k.hasOwnProperty(C)||(N[C]=S[C])}var T=w[y];return w[y]=N,s.languages.DFS(s.languages,function(O,P){P===T&&O!=y&&(this[O]=N)}),N},DFS:function y(x,k,w,S){S=S||{};var N=s.util.objId;for(var C in x)if(x.hasOwnProperty(C)){k.call(x,C,x[C],w||C);var E=x[C],T=s.util.type(E);T==="Object"&&!S[N(E)]?(S[N(E)]=!0,y(E,k,null,S)):T==="Array"&&!S[N(E)]&&(S[N(E)]=!0,y(E,k,C,S))}}},plugins:{},highlightAll:function(y,x){s.highlightAllUnder(document,y,x)},highlightAllUnder:function(y,x,k){var w={callback:k,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",w),w.elements=Array.prototype.slice.apply(w.container.querySelectorAll(w.selector)),s.hooks.run("before-all-elements-highlight",w);for(var S=0,N;N=w.elements[S++];)s.highlightElement(N,x===!0,w.callback)},highlightElement:function(y,x,k){var w=s.util.getLanguage(y),S=s.languages[w];s.util.setLanguage(y,w);var N=y.parentElement;N&&N.nodeName.toLowerCase()==="pre"&&s.util.setLanguage(N,w);var C=y.textContent,E={element:y,language:w,grammar:S,code:C};function T(P){E.highlightedCode=P,s.hooks.run("before-insert",E),E.element.innerHTML=E.highlightedCode,s.hooks.run("after-highlight",E),s.hooks.run("complete",E),k&&k.call(E.element)}if(s.hooks.run("before-sanity-check",E),N=E.element.parentElement,N&&N.nodeName.toLowerCase()==="pre"&&!N.hasAttribute("tabindex")&&N.setAttribute("tabindex","0"),!E.code){s.hooks.run("complete",E),k&&k.call(E.element);return}if(s.hooks.run("before-highlight",E),!E.grammar){T(s.util.encode(E.code));return}if(x&&r.Worker){var O=new Worker(s.filename);O.onmessage=function(P){T(P.data)},O.postMessage(JSON.stringify({language:E.language,code:E.code,immediateClose:!0}))}else T(s.highlight(E.code,E.grammar,E.language))},highlight:function(y,x,k){var w={code:y,grammar:x,language:k};if(s.hooks.run("before-tokenize",w),!w.grammar)throw new Error('The language "'+w.language+'" has no grammar.');return w.tokens=s.tokenize(w.code,w.grammar),s.hooks.run("after-tokenize",w),l.stringify(s.util.encode(w.tokens),w.language)},tokenize:function(y,x){var k=x.rest;if(k){for(var w in k)x[w]=k[w];delete x.rest}var S=new d;return f(S,S.head,y),u(y,S,x,S.head,0),p(S)},hooks:{all:{},add:function(y,x){var k=s.hooks.all;k[y]=k[y]||[],k[y].push(x)},run:function(y,x){var k=s.hooks.all[y];if(!(!k||!k.length))for(var w=0,S;S=k[w++];)S(x)}},Token:l};r.Prism=s;function l(y,x,k,w){this.type=y,this.content=x,this.alias=k,this.length=(w||"").length|0}l.stringify=function y(x,k){if(typeof x=="string")return x;if(Array.isArray(x)){var w="";return x.forEach(function(T){w+=y(T,k)}),w}var S={type:x.type,content:y(x.content,k),tag:"span",classes:["token",x.type],attributes:{},language:k},N=x.alias;N&&(Array.isArray(N)?Array.prototype.push.apply(S.classes,N):S.classes.push(N)),s.hooks.run("wrap",S);var C="";for(var E in S.attributes)C+=" "+E+'="'+(S.attributes[E]||"").replace(/"/g,"&quot;")+'"';return"<"+S.tag+' class="'+S.classes.join(" ")+'"'+C+">"+S.content+"</"+S.tag+">"};function c(y,x,k,w){y.lastIndex=x;var S=y.exec(k);if(S&&w&&S[1]){var N=S[1].length;S.index+=N,S[0]=S[0].slice(N)}return S}function u(y,x,k,w,S,N){for(var C in k)if(!(!k.hasOwnProperty(C)||!k[C])){var E=k[C];E=Array.isArray(E)?E:[E];for(var T=0;T<E.length;++T){if(N&&N.cause==C+","+T)return;var O=E[T],P=O.inside,M=!!O.lookbehind,$=!!O.greedy,L=O.alias;if($&&!O.pattern.global){var z=O.pattern.toString().match(/[imsuy]*$/)[0];O.pattern=RegExp(O.pattern.source,z+"g")}for(var j=O.pattern||O,B=w.next,H=S;B!==x.tail&&!(N&&H>=N.reach);H+=B.value.length,B=B.next){var F=B.value;if(x.length>y.length)return;if(!(F instanceof l)){var D=1,U;if($){if(U=c(j,H,y,M),!U||U.index>=y.length)break;var R=U.index,V=U.index+U[0].length,Y=H;for(Y+=B.value.length;R>=Y;)B=B.next,Y+=B.value.length;if(Y-=B.value.length,H=Y,B.value instanceof l)continue;for(var G=B;G!==x.tail&&(Y<V||typeof G.value=="string");G=G.next)D++,Y+=G.value.length;D--,F=y.slice(H,Y),U.index-=H}else if(U=c(j,0,F,M),!U)continue;var R=U.index,te=U[0],le=F.slice(0,R),W=F.slice(R+te.length),Z=H+F.length;N&&Z>N.reach&&(N.reach=Z);var I=B.prev;le&&(I=f(x,I,le),H+=le.length),g(x,I,D);var A=new l(C,P?s.tokenize(te,P):te,L,te);if(B=f(x,I,A),W&&f(x,B,W),D>1){var q={cause:C+","+T,reach:Z};u(y,x,k,B.prev,H,q),N&&q.reach>N.reach&&(N.reach=q.reach)}}}}}}function d(){var y={value:null,prev:null,next:null},x={value:null,prev:y,next:null};y.next=x,this.head=y,this.tail=x,this.length=0}function f(y,x,k){var w=x.next,S={value:k,prev:x,next:w};return x.next=S,w.prev=S,y.length++,S}function g(y,x,k){for(var w=x.next,S=0;S<k&&w!==y.tail;S++)w=w.next;x.next=w,w.prev=x,y.length-=S}function p(y){for(var x=[],k=y.head.next;k!==y.tail;)x.push(k.value),k=k.next;return x}if(!r.document)return r.addEventListener&&(s.disableWorkerMessageHandler||r.addEventListener("message",function(y){var x=JSON.parse(y.data),k=x.language,w=x.code,S=x.immediateClose;r.postMessage(s.highlight(w,s.languages[k],k)),S&&r.close()},!1)),s;var v=s.util.currentScript();v&&(s.filename=v.src,v.hasAttribute("data-manual")&&(s.manual=!0));function m(){s.manual||s.highlightAll()}if(!s.manual){var b=document.readyState;b==="loading"||b==="interactive"&&v&&v.defer?document.addEventListener("DOMContentLoaded",m):window.requestAnimationFrame?window.requestAnimationFrame(m):window.setTimeout(m,16)}return s}(t);e.exports&&(e.exports=n),typeof no<"u"&&(no.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,a){var o={};o["language-"+a]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[a]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var s={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};s["language-"+a]={pattern:/[\s\S]+/,inside:n.languages[a]};var l={};l[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:s},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var a=r.languages.markup;a&&(a.tag.addInlined("style","css"),a.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(v,m){return"✖ Error "+v+" while fetching file: "+m},a="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},s="data-src-status",l="loading",c="loaded",u="failed",d="pre[data-src]:not(["+s+'="'+c+'"]):not(['+s+'="'+l+'"])';function f(v,m,b){var y=new XMLHttpRequest;y.open("GET",v,!0),y.onreadystatechange=function(){y.readyState==4&&(y.status<400&&y.responseText?m(y.responseText):y.status>=400?b(i(y.status,y.statusText)):b(a))},y.send(null)}function g(v){var m=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(v||"");if(m){var b=Number(m[1]),y=m[2],x=m[3];return y?x?[b,Number(x)]:[b,void 0]:[b,b]}}n.hooks.add("before-highlightall",function(v){v.selector+=", "+d}),n.hooks.add("before-sanity-check",function(v){var m=v.element;if(m.matches(d)){v.code="",m.setAttribute(s,l);var b=m.appendChild(document.createElement("CODE"));b.textContent=r;var y=m.getAttribute("data-src"),x=v.language;if(x==="none"){var k=(/\.(\w+)$/.exec(y)||[,"none"])[1];x=o[k]||k}n.util.setLanguage(b,x),n.util.setLanguage(m,x);var w=n.plugins.autoloader;w&&w.loadLanguages(x),f(y,function(S){m.setAttribute(s,c);var N=g(m.getAttribute("data-range"));if(N){var C=S.split(/\r\n?|\n/g),E=N[0],T=N[1]==null?C.length:N[1];E<0&&(E+=C.length),E=Math.max(0,Math.min(E-1,C.length)),T<0&&(T+=C.length),T=Math.max(0,Math.min(T,C.length)),S=C.slice(E,T).join(`
271
- `),m.hasAttribute("data-start")||m.setAttribute("data-start",String(E+1))}b.textContent=S,n.highlightElement(b)},function(S){m.setAttribute(s,u),b.textContent=S})}}),n.plugins.fileHighlight={highlight:function(m){for(var b=(m||document).querySelectorAll(d),y=0,x;x=b[y++];)n.highlightElement(x)}};var p=!1;n.fileHighlight=function(){p||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),p=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(zP),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(u){return u=u.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+u+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(u){["url","bold","italic","strike","code-snippet"].forEach(function(d){u!==d&&(e.languages.markdown[u].inside.content.inside[d]=e.languages.markdown[d])})}),e.hooks.add("after-tokenize",function(u){if(u.language!=="markdown"&&u.language!=="md")return;function d(f){if(!(!f||typeof f=="string"))for(var g=0,p=f.length;g<p;g++){var v=f[g];if(v.type!=="code"){d(v.content);continue}var m=v.content[1],b=v.content[3];if(m&&b&&m.type==="code-language"&&b.type==="code-block"&&typeof m.content=="string"){var y=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");y=(/[a-z][\w-]*/i.exec(y)||[""])[0].toLowerCase();var x="language-"+y;b.alias?typeof b.alias=="string"?b.alias=[b.alias,x]:b.alias.push(x):b.alias=[x]}}}d(u.tokens)}),e.hooks.add("wrap",function(u){if(u.type==="code-block"){for(var d="",f=0,g=u.classes.length;f<g;f++){var p=u.classes[f],v=/language-(.+)/.exec(p);if(v){d=v[1];break}}var m=e.languages[d];if(m)u.content=e.highlight(c(u.content),m,d);else if(d&&d!=="none"&&e.plugins.autoloader){var b="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);u.attributes.id=b,e.plugins.autoloader.loadLanguages(d,function(){var y=document.getElementById(b);y&&(y.innerHTML=e.highlight(y.textContent,e.languages[d],d))})}}});var o=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function c(u){var d=u.replace(o,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(f,g){if(g=g.toLowerCase(),g[0]==="#"){var p;return g[1]==="x"?p=parseInt(g.slice(2),16):p=Number(g.slice(1)),l(p)}else{var v=s[g];return v||f}}),d}e.languages.md=e.languages.markdown}(Prism),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism),Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec,Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}}(Prism),Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift}),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism),function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism),function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism);function S1(e,t){for(const n of e.childNodes){if(it(n)&&n.tagName===t)return!0;S1(n,t)}return!1}const gs="data-language",vs="data-highlight-language",Dc="data-theme";class ms extends on{constructor(n,r){super(r);J(this,"__language");J(this,"__theme");J(this,"__isSyntaxHighlightSupported");this.__language=n||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}static getType(){return"code"}static clone(n){return new ms(n.__language,n.__key)}afterCloneFrom(n){super.afterCloneFrom(n),this.__language=n.__language,this.__theme=n.__theme,this.__isSyntaxHighlightSupported=n.__isSyntaxHighlightSupported}createDOM(n){const r=document.createElement("code");Dr(r,n.theme.code),r.setAttribute("spellcheck","false");const i=this.getLanguage();i&&(r.setAttribute(gs,i),this.getIsSyntaxHighlightSupported()&&r.setAttribute(vs,i));const a=this.getTheme();a&&r.setAttribute(Dc,a);const o=this.getStyle();return o&&r.setAttribute("style",o),r}updateDOM(n,r,i){const a=this.__language,o=n.__language;a?a!==o&&r.setAttribute(gs,a):o&&r.removeAttribute(gs);const s=this.__isSyntaxHighlightSupported;n.__isSyntaxHighlightSupported&&o?s&&a?a!==o&&r.setAttribute(vs,a):r.removeAttribute(vs):s&&a&&r.setAttribute(vs,a);const l=this.__theme,c=n.__theme;l?l!==c&&r.setAttribute(Dc,l):c&&r.removeAttribute(Dc);const u=this.__style,d=n.__style;return u?u!==d&&r.setAttribute("style",u):d&&r.removeAttribute("style"),!1}exportDOM(n){const r=document.createElement("pre");Dr(r,n._config.theme.code),r.setAttribute("spellcheck","false");const i=this.getLanguage();i&&(r.setAttribute(gs,i),this.getIsSyntaxHighlightSupported()&&r.setAttribute(vs,i));const a=this.getTheme();a&&r.setAttribute(Dc,a);const o=this.getStyle();return o&&r.setAttribute("style",o),{element:r}}static importDOM(){return{code:n=>n.textContent!=null&&(/\r?\n/.test(n.textContent)||S1(n,"BR"))?{conversion:C1,priority:1}:null,div:()=>({conversion:BP,priority:1}),pre:()=>({conversion:C1,priority:0}),table:n=>Oh(n)?{conversion:jP,priority:3}:null,td:n=>{const r=n,i=r.closest("table");return r.classList.contains("js-file-line")||i&&Oh(i)?{conversion:E1,priority:3}:null},tr:n=>{const r=n.closest("table");return r&&Oh(r)?{conversion:E1,priority:3}:null}}}static importJSON(n){return ro().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setLanguage(n.language).setTheme(n.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(n,r=!0){const i=this.getChildren(),a=i.length;if(a>=2&&i[a-1].getTextContent()===`
270
+ */var n=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,a=0,o={},s={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function y(b){return b instanceof l?new l(b.type,y(b.content),b.alias):Array.isArray(b)?b.map(y):b.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(y){return Object.prototype.toString.call(y).slice(8,-1)},objId:function(y){return y.__id||Object.defineProperty(y,"__id",{value:++a}),y.__id},clone:function y(b,k){k=k||{};var w,S;switch(s.util.type(b)){case"Object":if(S=s.util.objId(b),k[S])return k[S];w={},k[S]=w;for(var N in b)b.hasOwnProperty(N)&&(w[N]=y(b[N],k));return w;case"Array":return S=s.util.objId(b),k[S]?k[S]:(w=[],k[S]=w,b.forEach(function(E,C){w[C]=y(E,k)}),w);default:return b}},getLanguage:function(y){for(;y;){var b=i.exec(y.className);if(b)return b[1].toLowerCase();y=y.parentElement}return"none"},setLanguage:function(y,b){y.className=y.className.replace(RegExp(i,"gi"),""),y.classList.add("language-"+b)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(w){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(w.stack)||[])[1];if(y){var b=document.getElementsByTagName("script");for(var k in b)if(b[k].src==y)return b[k]}return null}},isActive:function(y,b,k){for(var w="no-"+b;y;){var S=y.classList;if(S.contains(b))return!0;if(S.contains(w))return!1;y=y.parentElement}return!!k}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(y,b){var k=s.util.clone(s.languages[y]);for(var w in b)k[w]=b[w];return k},insertBefore:function(y,b,k,w){w=w||s.languages;var S=w[y],N={};for(var E in S)if(S.hasOwnProperty(E)){if(E==b)for(var C in k)k.hasOwnProperty(C)&&(N[C]=k[C]);k.hasOwnProperty(E)||(N[E]=S[E])}var T=w[y];return w[y]=N,s.languages.DFS(s.languages,function(O,P){P===T&&O!=y&&(this[O]=N)}),N},DFS:function y(b,k,w,S){S=S||{};var N=s.util.objId;for(var E in b)if(b.hasOwnProperty(E)){k.call(b,E,b[E],w||E);var C=b[E],T=s.util.type(C);T==="Object"&&!S[N(C)]?(S[N(C)]=!0,y(C,k,null,S)):T==="Array"&&!S[N(C)]&&(S[N(C)]=!0,y(C,k,E,S))}}},plugins:{},highlightAll:function(y,b){s.highlightAllUnder(document,y,b)},highlightAllUnder:function(y,b,k){var w={callback:k,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",w),w.elements=Array.prototype.slice.apply(w.container.querySelectorAll(w.selector)),s.hooks.run("before-all-elements-highlight",w);for(var S=0,N;N=w.elements[S++];)s.highlightElement(N,b===!0,w.callback)},highlightElement:function(y,b,k){var w=s.util.getLanguage(y),S=s.languages[w];s.util.setLanguage(y,w);var N=y.parentElement;N&&N.nodeName.toLowerCase()==="pre"&&s.util.setLanguage(N,w);var E=y.textContent,C={element:y,language:w,grammar:S,code:E};function T(P){C.highlightedCode=P,s.hooks.run("before-insert",C),C.element.innerHTML=C.highlightedCode,s.hooks.run("after-highlight",C),s.hooks.run("complete",C),k&&k.call(C.element)}if(s.hooks.run("before-sanity-check",C),N=C.element.parentElement,N&&N.nodeName.toLowerCase()==="pre"&&!N.hasAttribute("tabindex")&&N.setAttribute("tabindex","0"),!C.code){s.hooks.run("complete",C),k&&k.call(C.element);return}if(s.hooks.run("before-highlight",C),!C.grammar){T(s.util.encode(C.code));return}if(b&&r.Worker){var O=new Worker(s.filename);O.onmessage=function(P){T(P.data)},O.postMessage(JSON.stringify({language:C.language,code:C.code,immediateClose:!0}))}else T(s.highlight(C.code,C.grammar,C.language))},highlight:function(y,b,k){var w={code:y,grammar:b,language:k};if(s.hooks.run("before-tokenize",w),!w.grammar)throw new Error('The language "'+w.language+'" has no grammar.');return w.tokens=s.tokenize(w.code,w.grammar),s.hooks.run("after-tokenize",w),l.stringify(s.util.encode(w.tokens),w.language)},tokenize:function(y,b){var k=b.rest;if(k){for(var w in k)b[w]=k[w];delete b.rest}var S=new d;return f(S,S.head,y),u(y,S,b,S.head,0),p(S)},hooks:{all:{},add:function(y,b){var k=s.hooks.all;k[y]=k[y]||[],k[y].push(b)},run:function(y,b){var k=s.hooks.all[y];if(!(!k||!k.length))for(var w=0,S;S=k[w++];)S(b)}},Token:l};r.Prism=s;function l(y,b,k,w){this.type=y,this.content=b,this.alias=k,this.length=(w||"").length|0}l.stringify=function y(b,k){if(typeof b=="string")return b;if(Array.isArray(b)){var w="";return b.forEach(function(T){w+=y(T,k)}),w}var S={type:b.type,content:y(b.content,k),tag:"span",classes:["token",b.type],attributes:{},language:k},N=b.alias;N&&(Array.isArray(N)?Array.prototype.push.apply(S.classes,N):S.classes.push(N)),s.hooks.run("wrap",S);var E="";for(var C in S.attributes)E+=" "+C+'="'+(S.attributes[C]||"").replace(/"/g,"&quot;")+'"';return"<"+S.tag+' class="'+S.classes.join(" ")+'"'+E+">"+S.content+"</"+S.tag+">"};function c(y,b,k,w){y.lastIndex=b;var S=y.exec(k);if(S&&w&&S[1]){var N=S[1].length;S.index+=N,S[0]=S[0].slice(N)}return S}function u(y,b,k,w,S,N){for(var E in k)if(!(!k.hasOwnProperty(E)||!k[E])){var C=k[E];C=Array.isArray(C)?C:[C];for(var T=0;T<C.length;++T){if(N&&N.cause==E+","+T)return;var O=C[T],P=O.inside,M=!!O.lookbehind,$=!!O.greedy,A=O.alias;if($&&!O.pattern.global){var I=O.pattern.toString().match(/[imsuy]*$/)[0];O.pattern=RegExp(O.pattern.source,I+"g")}for(var j=O.pattern||O,B=w.next,H=S;B!==b.tail&&!(N&&H>=N.reach);H+=B.value.length,B=B.next){var F=B.value;if(b.length>y.length)return;if(!(F instanceof l)){var D=1,W;if($){if(W=c(j,H,y,M),!W||W.index>=y.length)break;var ee=W.index,Y=W.index+W[0].length,U=H;for(U+=B.value.length;ee>=U;)B=B.next,U+=B.value.length;if(U-=B.value.length,H=U,B.value instanceof l)continue;for(var K=B;K!==b.tail&&(U<Y||typeof K.value=="string");K=K.next)D++,U+=K.value.length;D--,F=y.slice(H,U),W.index-=H}else if(W=c(j,0,F,M),!W)continue;var ee=W.index,ie=W[0],ce=F.slice(0,ee),Z=F.slice(ee+ie.length),J=H+F.length;N&&J>N.reach&&(N.reach=J);var z=B.prev;ce&&(z=f(b,z,ce),H+=ce.length),g(b,z,D);var L=new l(E,P?s.tokenize(ie,P):ie,A,ie);if(B=f(b,z,L),Z&&f(b,B,Z),D>1){var q={cause:E+","+T,reach:J};u(y,b,k,B.prev,H,q),N&&q.reach>N.reach&&(N.reach=q.reach)}}}}}}function d(){var y={value:null,prev:null,next:null},b={value:null,prev:y,next:null};y.next=b,this.head=y,this.tail=b,this.length=0}function f(y,b,k){var w=b.next,S={value:k,prev:b,next:w};return b.next=S,w.prev=S,y.length++,S}function g(y,b,k){for(var w=b.next,S=0;S<k&&w!==y.tail;S++)w=w.next;b.next=w,w.prev=b,y.length-=S}function p(y){for(var b=[],k=y.head.next;k!==y.tail;)b.push(k.value),k=k.next;return b}if(!r.document)return r.addEventListener&&(s.disableWorkerMessageHandler||r.addEventListener("message",function(y){var b=JSON.parse(y.data),k=b.language,w=b.code,S=b.immediateClose;r.postMessage(s.highlight(w,s.languages[k],k)),S&&r.close()},!1)),s;var v=s.util.currentScript();v&&(s.filename=v.src,v.hasAttribute("data-manual")&&(s.manual=!0));function m(){s.manual||s.highlightAll()}if(!s.manual){var x=document.readyState;x==="loading"||x==="interactive"&&v&&v.defer?document.addEventListener("DOMContentLoaded",m):window.requestAnimationFrame?window.requestAnimationFrame(m):window.setTimeout(m,16)}return s}(t);e.exports&&(e.exports=n),typeof lo<"u"&&(lo.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,a){var o={};o["language-"+a]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[a]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var s={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};s["language-"+a]={pattern:/[\s\S]+/,inside:n.languages[a]};var l={};l[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:s},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var a=r.languages.markup;a&&(a.tag.addInlined("style","css"),a.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(v,m){return"✖ Error "+v+" while fetching file: "+m},a="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},s="data-src-status",l="loading",c="loaded",u="failed",d="pre[data-src]:not(["+s+'="'+c+'"]):not(['+s+'="'+l+'"])';function f(v,m,x){var y=new XMLHttpRequest;y.open("GET",v,!0),y.onreadystatechange=function(){y.readyState==4&&(y.status<400&&y.responseText?m(y.responseText):y.status>=400?x(i(y.status,y.statusText)):x(a))},y.send(null)}function g(v){var m=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(v||"");if(m){var x=Number(m[1]),y=m[2],b=m[3];return y?b?[x,Number(b)]:[x,void 0]:[x,x]}}n.hooks.add("before-highlightall",function(v){v.selector+=", "+d}),n.hooks.add("before-sanity-check",function(v){var m=v.element;if(m.matches(d)){v.code="",m.setAttribute(s,l);var x=m.appendChild(document.createElement("CODE"));x.textContent=r;var y=m.getAttribute("data-src"),b=v.language;if(b==="none"){var k=(/\.(\w+)$/.exec(y)||[,"none"])[1];b=o[k]||k}n.util.setLanguage(x,b),n.util.setLanguage(m,b);var w=n.plugins.autoloader;w&&w.loadLanguages(b),f(y,function(S){m.setAttribute(s,c);var N=g(m.getAttribute("data-range"));if(N){var E=S.split(/\r\n?|\n/g),C=N[0],T=N[1]==null?E.length:N[1];C<0&&(C+=E.length),C=Math.max(0,Math.min(C-1,E.length)),T<0&&(T+=E.length),T=Math.max(0,Math.min(T,E.length)),S=E.slice(C,T).join(`
271
+ `),m.hasAttribute("data-start")||m.setAttribute("data-start",String(C+1))}x.textContent=S,n.highlightElement(x)},function(S){m.setAttribute(s,u),x.textContent=S})}}),n.plugins.fileHighlight={highlight:function(m){for(var x=(m||document).querySelectorAll(d),y=0,b;b=x[y++];)n.highlightElement(b)}};var p=!1;n.fileHighlight=function(){p||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),p=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(QP),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(u){return u=u.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+u+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(u){["url","bold","italic","strike","code-snippet"].forEach(function(d){u!==d&&(e.languages.markdown[u].inside.content.inside[d]=e.languages.markdown[d])})}),e.hooks.add("after-tokenize",function(u){if(u.language!=="markdown"&&u.language!=="md")return;function d(f){if(!(!f||typeof f=="string"))for(var g=0,p=f.length;g<p;g++){var v=f[g];if(v.type!=="code"){d(v.content);continue}var m=v.content[1],x=v.content[3];if(m&&x&&m.type==="code-language"&&x.type==="code-block"&&typeof m.content=="string"){var y=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");y=(/[a-z][\w-]*/i.exec(y)||[""])[0].toLowerCase();var b="language-"+y;x.alias?typeof x.alias=="string"?x.alias=[x.alias,b]:x.alias.push(b):x.alias=[b]}}}d(u.tokens)}),e.hooks.add("wrap",function(u){if(u.type==="code-block"){for(var d="",f=0,g=u.classes.length;f<g;f++){var p=u.classes[f],v=/language-(.+)/.exec(p);if(v){d=v[1];break}}var m=e.languages[d];if(m)u.content=e.highlight(c(u.content),m,d);else if(d&&d!=="none"&&e.plugins.autoloader){var x="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);u.attributes.id=x,e.plugins.autoloader.loadLanguages(d,function(){var y=document.getElementById(x);y&&(y.innerHTML=e.highlight(y.textContent,e.languages[d],d))})}}});var o=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function c(u){var d=u.replace(o,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(f,g){if(g=g.toLowerCase(),g[0]==="#"){var p;return g[1]==="x"?p=parseInt(g.slice(2),16):p=Number(g.slice(1)),l(p)}else{var v=s[g];return v||f}}),d}e.languages.md=e.languages.markdown}(Prism),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism),Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec,Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}}(Prism),Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift}),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism),function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism),function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism);function Hx(e,t){for(const n of e.childNodes){if(ot(n)&&n.tagName===t)return!0;Hx(n,t)}return!1}const ws="data-language",ks="data-highlight-language",Kc="data-theme";class Ss extends rn{constructor(n,r){super(r);R(this,"__language");R(this,"__theme");R(this,"__isSyntaxHighlightSupported");this.__language=n||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}static getType(){return"code"}static clone(n){return new Ss(n.__language,n.__key)}afterCloneFrom(n){super.afterCloneFrom(n),this.__language=n.__language,this.__theme=n.__theme,this.__isSyntaxHighlightSupported=n.__isSyntaxHighlightSupported}createDOM(n){const r=document.createElement("code");Ir(r,n.theme.code),r.setAttribute("spellcheck","false");const i=this.getLanguage();i&&(r.setAttribute(ws,i),this.getIsSyntaxHighlightSupported()&&r.setAttribute(ks,i));const a=this.getTheme();a&&r.setAttribute(Kc,a);const o=this.getStyle();return o&&r.setAttribute("style",o),r}updateDOM(n,r,i){const a=this.__language,o=n.__language;a?a!==o&&r.setAttribute(ws,a):o&&r.removeAttribute(ws);const s=this.__isSyntaxHighlightSupported;n.__isSyntaxHighlightSupported&&o?s&&a?a!==o&&r.setAttribute(ks,a):r.removeAttribute(ks):s&&a&&r.setAttribute(ks,a);const l=this.__theme,c=n.__theme;l?l!==c&&r.setAttribute(Kc,l):c&&r.removeAttribute(Kc);const u=this.__style,d=n.__style;return u?u!==d&&r.setAttribute("style",u):d&&r.removeAttribute("style"),!1}exportDOM(n){const r=document.createElement("pre");Ir(r,n._config.theme.code),r.setAttribute("spellcheck","false");const i=this.getLanguage();i&&(r.setAttribute(ws,i),this.getIsSyntaxHighlightSupported()&&r.setAttribute(ks,i));const a=this.getTheme();a&&r.setAttribute(Kc,a);const o=this.getStyle();return o&&r.setAttribute("style",o),{element:r}}static importDOM(){return{code:n=>n.textContent!=null&&(/\r?\n/.test(n.textContent)||Hx(n,"BR"))?{conversion:Vx,priority:1}:null,div:()=>({conversion:RP,priority:1}),pre:()=>({conversion:Vx,priority:0}),table:n=>jh(n)?{conversion:eA,priority:3}:null,td:n=>{const r=n,i=r.closest("table");return r.classList.contains("js-file-line")||i&&jh(i)?{conversion:Kx,priority:3}:null},tr:n=>{const r=n.closest("table");return r&&jh(r)?{conversion:Kx,priority:3}:null}}}static importJSON(n){return co().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setLanguage(n.language).setTheme(n.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(n,r=!0){const i=this.getChildren(),a=i.length;if(a>=2&&i[a-1].getTextContent()===`
272
272
  `&&i[a-2].getTextContent()===`
273
- `&&n.isCollapsed()&&n.anchor.key===this.__key&&n.anchor.offset===a){i[a-1].remove(),i[a-2].remove();const c=He();return this.insertAfter(c,r),c}const{anchor:o,focus:s}=n,l=(o.isBefore(s)?o:s).getNode();if(ce(l)){let c=UP(l);const u=[];for(;;)if(dc(c))u.push(Da()),c=c.getNextSibling();else{if(!$1(c))break;{let b=0;const y=c.getTextContent(),x=c.getTextContentSize();for(;b<x&&y[b]===" ";)b++;if(b!==0&&u.push(M1(" ".repeat(b))),b!==x)break;c=c.getNextSibling()}}const d=l.splitText(o.offset)[0],f=o.offset===0?0:1,g=d.getIndexWithinParent()+f,p=l.getParentOrThrow(),v=[Er(),...u];p.splice(g,0,v);const m=u[u.length-1];m?m.select():o.offset===0?d.selectPrevious():d.getNextSibling().selectNext(0,0)}if(N1(l)){const{offset:c}=n.anchor;l.splice(c,0,[Er()]),l.select(c+1,c+1)}return null}canIndent(){return!1}collapseAtStart(){const n=He();return this.getChildren().forEach(r=>n.append(r)),this.replace(n),!0}setLanguage(n){const r=this.getWritable();return r.__language=n||void 0,r}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(n){const r=this.getWritable();return r.__isSyntaxHighlightSupported=n,r}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(n){const r=this.getWritable();return r.__theme=n||void 0,r}getTheme(){return this.getLatest().__theme}}function ro(e,t){return V$(ms).setLanguage(e).setTheme(t)}function N1(e){return e instanceof ms}function C1(e){return{node:ro(e.getAttribute(gs))}}function BP(e){const t=e,n=T1(t);return n||function(r){let i=r.parentElement;for(;i!==null;){if(T1(i))return!0;i=i.parentElement}return!1}(t)?{node:n?ro():null}:{node:null}}function jP(){return{node:ro()}}function E1(){return{node:null}}function T1(e){return e.style.fontFamily.match("monospace")!==null}function Oh(e){return e.classList.contains("js-file-line-container")}class Ic extends Tr{constructor(n="",r,i){super(n,i);J(this,"__highlightType");this.__highlightType=r}static getType(){return"code-highlight"}static clone(n){return new Ic(n.__text,n.__highlightType||void 0,n.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(n){const r=this.getWritable();return r.__highlightType=n||void 0,r}canHaveFormat(){return!1}createDOM(n){const r=super.createDOM(n),i=Ph(n.theme,this.__highlightType);return Dr(r,i),r}updateDOM(n,r,i){const a=super.updateDOM(n,r,i),o=Ph(i.theme,n.__highlightType),s=Ph(i.theme,this.__highlightType);return o!==s&&(o&&ch(r,o),s&&Dr(r,s)),a}static importJSON(n){return M1().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setHighlightType(n.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(n){return this}isParentRequired(){return!0}createParentElementNode(){return ro()}}function Ph(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function M1(e="",t){return Fn(new Ic(e,t))}function $1(e){return e instanceof Ic}function WP(e,t){let n=e;for(let r=ct(e,t);r&&($1(r.origin)||dc(r.origin));r=bO(r))n=r.origin;return n}function UP(e){return WP(e,"previous")}(function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),n==="diff"&&i.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+`].*(?:\r
273
+ `&&n.isCollapsed()&&n.anchor.key===this.__key&&n.anchor.offset===a){i[a-1].remove(),i[a-2].remove();const c=Ye();return this.insertAfter(c,r),c}const{anchor:o,focus:s}=n,l=(o.isBefore(s)?o:s).getNode();if(fe(l)){let c=nA(l);const u=[];for(;;)if(wc(c))u.push(Wa()),c=c.getNextSibling();else{if(!Xx(c))break;{let x=0;const y=c.getTextContent(),b=c.getTextContentSize();for(;x<b&&y[x]===" ";)x++;if(x!==0&&u.push(Gx(" ".repeat(x))),x!==b)break;c=c.getNextSibling()}}const d=l.splitText(o.offset)[0],f=o.offset===0?0:1,g=d.getIndexWithinParent()+f,p=l.getParentOrThrow(),v=[Tr(),...u];p.splice(g,0,v);const m=u[u.length-1];m?m.select():o.offset===0?d.selectPrevious():d.getNextSibling().selectNext(0,0)}if(qx(l)){const{offset:c}=n.anchor;l.splice(c,0,[Tr()]),l.select(c+1,c+1)}return null}canIndent(){return!1}collapseAtStart(){const n=Ye();return this.getChildren().forEach(r=>n.append(r)),this.replace(n),!0}setLanguage(n){const r=this.getWritable();return r.__language=n||void 0,r}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(n){const r=this.getWritable();return r.__isSyntaxHighlightSupported=n,r}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(n){const r=this.getWritable();return r.__theme=n||void 0,r}getTheme(){return this.getLatest().__theme}}function co(e,t){return oO(Ss).setLanguage(e).setTheme(t)}function qx(e){return e instanceof Ss}function Vx(e){return{node:co(e.getAttribute(ws))}}function RP(e){const t=e,n=Yx(t);return n||function(r){let i=r.parentElement;for(;i!==null;){if(Yx(i))return!0;i=i.parentElement}return!1}(t)?{node:n?co():null}:{node:null}}function eA(){return{node:co()}}function Kx(){return{node:null}}function Yx(e){return e.style.fontFamily.match("monospace")!==null}function jh(e){return e.classList.contains("js-file-line-container")}class Yc extends Mr{constructor(n="",r,i){super(n,i);R(this,"__highlightType");this.__highlightType=r}static getType(){return"code-highlight"}static clone(n){return new Yc(n.__text,n.__highlightType||void 0,n.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(n){const r=this.getWritable();return r.__highlightType=n||void 0,r}canHaveFormat(){return!1}createDOM(n){const r=super.createDOM(n),i=Wh(n.theme,this.__highlightType);return Ir(r,i),r}updateDOM(n,r,i){const a=super.updateDOM(n,r,i),o=Wh(i.theme,n.__highlightType),s=Wh(i.theme,this.__highlightType);return o!==s&&(o&&yh(r,o),s&&Ir(r,s)),a}static importJSON(n){return Gx().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setHighlightType(n.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(n){return this}isParentRequired(){return!0}createParentElementNode(){return co()}}function Wh(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function Gx(e="",t){return jn(new Yc(e,t))}function Xx(e){return e instanceof Yc}function tA(e,t){let n=e;for(let r=ht(e,t);r&&(Xx(r.origin)||wc(r.origin));r=AO(r))n=r.origin;return n}function nA(e){return tA(e,"previous")}(function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),n==="diff"&&i.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+`].*(?:\r
274
274
  ?|
275
- |(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})})(Prism);const HP=["bold","italic","underline","strikethrough","code"],Ah=["paragraph","h2","quote","code"];function qP(e){const t=Ah.indexOf(e);return t===-1?"paragraph":Ah[(t+1)%Ah.length]}function KP(e){switch(e){case"h2":return"Heading";case"quote":return"Quote";case"code":return"Code";case"paragraph":default:return"Paragraph"}}function O1(e){var n;return typeof window>"u"||typeof DOMParser>"u"?e.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim():((n=new DOMParser().parseFromString(e,"text/html").body.textContent)==null?void 0:n.replace(/\s+/g," ").trim())??""}function ys(e){return!e||e.trim().length===0?"<p><br></p>":e}function VP({id:e,editorValue:t,placeholder:n,disabled:r,readOnly:i,attachments:a,footerChecked:o,footerLabel:s,showFooter:l,cancelLabel:c,confirmLabel:u,onCancel:d,onConfirm:f,onAttachmentRemove:g,onAddAttachment:p,onFooterCheckedChange:v,onHtmlChange:m,onCharacterCountChange:b,labelledBy:y,ariaLabel:x,describedBy:k}){const[w]=Ir(),S=_.useRef(ys(t)),[N,C]=_.useState({canUndo:!1,canRedo:!1,isBold:!1,isItalic:!1,isUnderline:!1,isStrikethrough:!1,isLink:!1,blockType:"paragraph",alignment:"left"});_.useEffect(()=>{w.setEditable(!(r||i))},[r,w,i]),_.useEffect(()=>{const L=ys(t);L!==S.current&&(w.update(()=>{const j=new DOMParser().parseFromString(L,"text/html"),B=bh(w,j),H=Ze();H.clear(),B.length>0?H.append(...B):H.append(He())}),S.current=L,b(O1(L).length))},[w,t,b]),_.useEffect(()=>{const L=()=>{w.getEditorState().read(()=>{const F=ue();if(!re(F)){C(te=>({...te,isBold:!1,isItalic:!1,isUnderline:!1,isStrikethrough:!1,isLink:!1,blockType:"paragraph"}));return}const D=F.anchor.getNode(),U=D.getTopLevelElementOrThrow(),V=D.getParent();let Y="paragraph";tP(U)&&U.getTag()==="h2"?Y="h2":RO(U)?Y="quote":N1(U)?Y="code":Ce(U)&&(Y=U.getListType()==="bullet"?"ul":"ol");const G=U.getFormatType(),R=G===""?"left":G;C(te=>({...te,isBold:F.hasFormat("bold"),isItalic:F.hasFormat("italic"),isUnderline:F.hasFormat("underline"),isStrikethrough:F.hasFormat("strikethrough"),isLink:ur(D)||V!=null&&ur(V),blockType:Y,alignment:R}))})},z=w.registerUpdateListener(()=>{L()}),j=w.registerCommand(pf,()=>(L(),!1),ir),B=w.registerCommand(Yo,F=>(C(D=>({...D,canUndo:F})),!1),ir),H=w.registerCommand(Vo,F=>(C(D=>({...D,canRedo:F})),!1),ir);return L(),()=>{z(),j(),B(),H()}},[w]);function E(L){w.update(()=>{const z=ue();if(re(z)){if(L==="paragraph"){as(z,()=>He());return}if(L==="h2"){as(z,()=>Qa("h2"));return}if(L==="quote"){as(z,()=>xh());return}if(L==="code"){as(z,()=>ro());return}}})}function T(L){if(N.blockType===L){w.dispatchCommand(Eh,void 0);return}w.dispatchCommand(L==="ul"?v1:m1,void 0)}function O(){if(N.isLink){w.dispatchCommand(hs,null);return}const L=window.prompt("Enter link URL");L&&w.dispatchCommand(hs,L)}function P(){w.update(()=>{const L=ue();re(L)&&(HP.forEach(z=>{L.hasFormat(z)&&w.dispatchCommand(an,z)}),w.dispatchCommand(hs,null),w.dispatchCommand(Eh,void 0),w.dispatchCommand(Ma,"left"),as(L,()=>He()))})}const M=r||i;function $(L){w.update(()=>{const z=ue();re(z)&&z.insertText(L)})}return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"dsn-rich-text-editor-toolbar",role:"toolbar","aria-label":"Rich text formatting toolbar",children:[h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-select",disabled:M,"aria-label":"Cycle block style",onClick:()=>E(qP(N.blockType)),children:KP(N.blockType)}),h.jsx("div",{className:"dsn-rich-text-editor-toolbar-divider","aria-hidden":"true"}),h.jsx(Yt,{variant:"ghost",size:"sm",disabled:M,selected:N.isBold,"aria-label":"Bold",onClick:()=>w.dispatchCommand(an,"bold"),icon:h.jsx(oT,{size:16,"aria-hidden":"true"})}),h.jsx(Yt,{variant:"ghost",size:"sm",disabled:M,selected:N.isItalic,"aria-label":"Italic",onClick:()=>w.dispatchCommand(an,"italic"),icon:h.jsx(pT,{size:16,"aria-hidden":"true"})}),h.jsx(Yt,{variant:"ghost",size:"sm",disabled:M,selected:N.isUnderline,"aria-label":"Underline",onClick:()=>w.dispatchCommand(an,"underline"),icon:h.jsx($T,{size:16,"aria-hidden":"true"})}),h.jsx(Yt,{variant:"ghost",size:"sm",disabled:M,selected:N.isStrikethrough,"aria-label":"Strikethrough",onClick:()=>w.dispatchCommand(an,"strikethrough"),icon:h.jsx(NT,{size:16,"aria-hidden":"true"})}),h.jsx("div",{className:"dsn-rich-text-editor-toolbar-divider","aria-hidden":"true"}),h.jsx(Yt,{variant:"ghost",size:"sm",disabled:M,selected:N.alignment==="left","aria-label":"Align left",onClick:()=>w.dispatchCommand(Ma,"left"),icon:h.jsx(MT,{size:16,"aria-hidden":"true"})}),h.jsx(Yt,{variant:"ghost",size:"sm",disabled:M,selected:N.alignment==="center","aria-label":"Align center",onClick:()=>w.dispatchCommand(Ma,"center"),icon:h.jsx(CT,{size:16,"aria-hidden":"true"})}),h.jsx(Yt,{variant:"ghost",size:"sm",disabled:M,selected:N.alignment==="right","aria-label":"Align right",onClick:()=>w.dispatchCommand(Ma,"right"),icon:h.jsx(ET,{size:16,"aria-hidden":"true"})}),h.jsx(Yt,{variant:"ghost",size:"sm",disabled:M,selected:N.alignment==="justify","aria-label":"Justify",onClick:()=>w.dispatchCommand(Ma,"justify"),icon:h.jsx(TT,{size:16,"aria-hidden":"true"})}),h.jsx("div",{className:"dsn-rich-text-editor-toolbar-divider","aria-hidden":"true"}),h.jsx(Yt,{variant:"ghost",size:"sm",disabled:M,selected:N.blockType==="ul","aria-label":"Bulleted list",onClick:()=>T("ul"),icon:h.jsx(vT,{size:16,"aria-hidden":"true"})}),h.jsx(Yt,{variant:"ghost",size:"sm",disabled:M,selected:N.blockType==="ol","aria-label":"Numbered list",onClick:()=>T("ol"),icon:h.jsx(gT,{size:16,"aria-hidden":"true"})}),h.jsx(Yt,{variant:"ghost",size:"sm",disabled:M,selected:N.blockType==="quote","aria-label":"Quote block",onClick:()=>E(N.blockType==="quote"?"paragraph":"quote"),icon:h.jsx(_T,{size:16,"aria-hidden":"true"})}),h.jsx(Yt,{variant:"ghost",size:"sm",disabled:M,selected:N.blockType==="code","aria-label":"Code block",onClick:()=>E(N.blockType==="code"?"paragraph":"code"),icon:h.jsx(uT,{size:16,"aria-hidden":"true"})}),h.jsx(Yt,{variant:"ghost",size:"sm",disabled:M,selected:N.isLink,"aria-label":"Toggle link",onClick:O,icon:h.jsx(Sy,{size:16,"aria-hidden":"true"})}),h.jsx("div",{className:"dsn-rich-text-editor-toolbar-divider","aria-hidden":"true"}),h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-icon",disabled:M||!N.canUndo,"aria-label":"Undo",onClick:()=>w.dispatchCommand(Rl,void 0),children:h.jsx(OT,{size:16,"aria-hidden":"true"})}),h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-icon",disabled:M||!N.canRedo,"aria-label":"Redo",onClick:()=>w.dispatchCommand(ec,void 0),children:h.jsx(wT,{size:16,"aria-hidden":"true"})}),h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-icon",disabled:M,"aria-label":"Clear formatting",onClick:P,children:h.jsx(hT,{size:16,"aria-hidden":"true"})})]}),h.jsxs("div",{className:"dsn-rich-text-editor-content-wrap",children:[h.jsx(oP,{contentEditable:h.jsx(uP,{id:e,className:"dsn-rich-text-editor-content","aria-label":x,"aria-labelledby":y,"aria-describedby":k,"aria-readonly":i||r||void 0,"aria-disabled":r||void 0}),placeholder:h.jsx("div",{className:"dsn-rich-text-editor-placeholder",children:n}),ErrorBoundary:FP}),h.jsx(gP,{}),h.jsx(EP,{}),h.jsx(AP,{}),h.jsx(mP,{onChange:(L,z)=>{L.read(()=>{const j=jx(z,null),B=Ze().getTextContent();S.current=j,b(B.length),m(j)})}})]}),(a.length>0||p)&&h.jsxs("div",{className:"dsn-rich-text-editor-attachments","aria-label":"Attached files",children:[a.map(L=>h.jsx(Wd,{fileName:L.fileName,fileSize:L.fileSize,action:"remove",size:"md",disabled:M,onRemove:g?()=>g(L.id):void 0,"aria-label":L.fileName},L.id)),p&&h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-icon",disabled:M,"aria-label":"Add attachment",onClick:p,children:h.jsx(yT,{size:16,"aria-hidden":"true"})}),h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-icon",disabled:M,"aria-label":"Insert emoji",onClick:()=>$("🙂"),children:h.jsx(ST,{size:16,"aria-hidden":"true"})})]}),l&&h.jsxs("div",{className:"dsn-rich-text-editor-footer",children:[h.jsx(Pn,{className:"dsn-rich-text-editor-footer-checkbox",label:s,checked:o,disabled:M,showTrailingIcon:!1,showDescription:!1,onCheckedChange:v}),h.jsxs("div",{className:"dsn-rich-text-editor-footer-actions",children:[h.jsx(me,{variant:"ghost",size:"md",disabled:M,onClick:d,children:c}),h.jsx(me,{variant:"primary",size:"md",disabled:M,onClick:f,children:u})]})]})]})}function YP({id:e,label:t="Label",placeholder:n="Type here...",value:r,defaultValue:i,disabled:a=!1,readOnly:o=!1,error:s=!1,helperText:l="Help text",errorMessage:c="There is an issue with this content.",maxLength:u,attachments:d=[],footerChecked:f=!1,footerLabel:g="Label",showFooter:p=!0,cancelLabel:v="Cancel",confirmLabel:m="Confirm",onChange:b,onFooterCheckedChange:y,onCancel:x,onConfirm:k,onAttachmentRemove:w,onAddAttachment:S,className:N,"aria-label":C,"aria-labelledby":E}){const T=_.useId(),O=e??`dsn-rich-text-editor-${T}`,P=`${O}-label`,M=`${O}-help`,[$,L]=_.useState(ys(i)),[z,j]=_.useState(O1(ys(r??i)).length),B=r!==void 0?ys(r):$,H=s?c:l,F=u!==void 0&&z>u,D=_.useMemo(()=>({namespace:O,editable:!(a||o),theme:{paragraph:"dsn-rich-text-editor-paragraph",text:{bold:"dsn-rich-text-editor-text-bold",italic:"dsn-rich-text-editor-text-italic",underline:"dsn-rich-text-editor-text-underline",strikethrough:"dsn-rich-text-editor-text-strikethrough",code:"dsn-rich-text-editor-text-code"},heading:{h2:"dsn-rich-text-editor-heading-h2"},quote:"dsn-rich-text-editor-quote",code:"dsn-rich-text-editor-code",link:"dsn-rich-text-editor-link",list:{ul:"dsn-rich-text-editor-list-ul",ol:"dsn-rich-text-editor-list-ol",listitem:"dsn-rich-text-editor-list-item"}},editorState:U=>{const Y=new DOMParser().parseFromString(B,"text/html"),G=bh(U,Y),R=Ze();R.clear(),G.length>0?R.append(...G):R.append(He())},onError:U=>{throw U},nodes:[us,cs,ds,Ra,eo,Th,ms]}),[a,O,B,o]);return h.jsxs("div",{className:["dsn-rich-text-editor",N].filter(Boolean).join(" "),"data-error":s||void 0,"data-disabled":a||void 0,"data-readonly":o||void 0,"data-over-limit":F||void 0,children:[t&&h.jsx("label",{id:P,className:"dsn-rich-text-editor-label",htmlFor:O,children:t}),h.jsx("div",{className:"dsn-rich-text-editor-shell",children:h.jsx(dO,{initialConfig:D,children:h.jsx(VP,{id:O,editorValue:B,placeholder:n,disabled:a,readOnly:o,attachments:d,footerChecked:f,footerLabel:g,showFooter:p,cancelLabel:v,confirmLabel:m,onCancel:x,onConfirm:k,onAttachmentRemove:w,onAddAttachment:S,onFooterCheckedChange:y,onCharacterCountChange:j,onHtmlChange:U=>{r===void 0&&L(U),b==null||b(U)},labelledBy:E??(t?P:void 0),ariaLabel:C,describedBy:H?M:void 0})})}),(H||u!==void 0)&&h.jsxs("div",{className:"dsn-rich-text-editor-meta",children:[h.jsxs("div",{className:"dsn-rich-text-editor-meta-main",children:[h.jsx("span",{className:"dsn-rich-text-editor-meta-icon","aria-hidden":"true",children:h.jsx(dT,{size:16})}),H&&h.jsx("p",{id:M,className:"dsn-rich-text-editor-help",children:H})]}),u!==void 0&&h.jsxs("span",{className:"dsn-rich-text-editor-count","aria-live":"polite","aria-atomic":"true",children:[z,"/",u]})]})]})}const GP=[{value:"first",label:"Label"},{value:"second",label:"Label"}],XP=Array.from({length:4},(e,t)=>({id:`simple-item-${t+1}`,kind:"menu-cell",props:{label:"Label",showLeadingIcon:!0,showTrailingIcon:!1}}));function ZP({variant:e="rich",title:t="Title",showHeader:n=!0,showSegmentControl:r=!1,segmentControlOptions:i=GP,segmentControlProps:a,showSearch:o=!1,searchProps:s,choiceLists:l,simpleItems:c=XP,showBottomBar:u=!1,bottomBarLeftActions:d,bottomBarRightActions:f,className:g,"aria-label":p="Popover menu",onEscape:v}){const m=["dsn-popover-menu",g].filter(Boolean).join(" "),b=l??(e==="simple"?[{id:"simple-choice-list",showHeader:!1,showSectionHeaders:!1,sections:[{id:"simple-section",title:"Actions",items:c}]}]:[]);return h.jsx(Sr,{className:m,role:"menu","aria-label":p,header:n?h.jsx(er,{title:t,size:"medium"}):void 0,segment:r?h.jsx("div",{className:"dsn-popover-menu-segment",children:h.jsx(Yd,{options:i,...a})}):void 0,search:o?h.jsx("div",{className:"dsn-popover-menu-search",children:h.jsx(Py,{variant:"ghost",placeholder:"Search","aria-label":"Search",...s})}):void 0,content:h.jsx("div",{className:"dsn-popover-menu-lists","data-variant":e,children:b.map(y=>h.jsx(jy,{title:y.title,description:y.description,showHeader:y.showHeader,showSectionHeaders:y.showSectionHeaders,sections:y.sections,className:"dsn-popover-menu-choice-list",enableMenuKeyboardNavigation:!0,onMenuEscape:v},y.id))}),bottomBar:u?h.jsx(Sa,{size:"md",className:"dsn-popover-menu-bottom-bar",leftActions:d,rightActions:f??h.jsxs(Jr,{size:"md",spaceBetween:!0,"aria-label":"Popover actions",children:[h.jsx(me,{variant:"ghost",size:"md",children:"Cancel"}),h.jsx(me,{variant:"primary",size:"md",children:"Confirm"})]})}):void 0})}const P1='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function JP({open:e,defaultOpen:t=!1,onOpenChange:n,onClose:r,closeOnOverlayClick:i=!0,closeOnEscape:a=!0,title:o="Title",description:s,showHeader:l=!0,headerSize:c="large",headerLeadingControl:u,headerTrailingControl:d,showCloseButton:f=!0,header:g,children:p,showBottomBar:v=!0,bottomBarSize:m="lg",bottomBarLeftActions:b,bottomBarRightActions:y,bottomBar:x,cancelLabel:k="Cancel",confirmLabel:w="Confirm",onCancel:S,onConfirm:N,className:C,"aria-label":E="Modal","aria-describedby":T}){const O=_.useId(),P=e!==void 0,[M,$]=_.useState(t),L=P?e:M,z=_.useRef(null),j=_.useRef(null),B=_.useRef(L),H=()=>{P||$(!1),n==null||n(!1),r==null||r()};if(_.useEffect(()=>{var G;const Y=B.current;L&&!Y&&(j.current=document.activeElement),!L&&Y&&((G=j.current)==null||G.focus()),B.current=L},[L]),_.useEffect(()=>{if(!L)return;const Y=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Y}},[L]),_.useEffect(()=>{if(!L||!z.current)return;const G=z.current.querySelectorAll(P1)[0];G?G.focus():z.current.focus()},[L]),_.useEffect(()=>{if(!L)return;const Y=G=>{if(G.key==="Escape"&&a){G.preventDefault(),H();return}if(G.key!=="Tab"||!z.current)return;const R=Array.from(z.current.querySelectorAll(P1));if(R.length===0){G.preventDefault(),z.current.focus();return}const te=R[0],le=R[R.length-1],W=document.activeElement;!G.shiftKey&&W===le?(G.preventDefault(),te.focus()):G.shiftKey&&W===te&&(G.preventDefault(),le.focus())};return document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[a,L]),!L)return null;const F=["dsn-modal",C].filter(Boolean).join(" "),D=f?h.jsx(me,{variant:"ghost",size:"md",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Qn,{size:16}),"aria-label":"Close modal",onClick:H}):void 0,U=g??h.jsx(er,{title:o,description:s,size:c,leadingControl:u,trailingControl:d??D,className:"dsn-modal-title"}),V=x??h.jsx(Sa,{size:m,leftActions:b,rightActions:y??h.jsxs(h.Fragment,{children:[h.jsx(me,{variant:"ghost",size:"md",onClick:S??H,children:k}),h.jsx(me,{variant:"primary",size:"md",onClick:N,children:w})]}),"aria-label":"Modal actions"});return Zr.createPortal(h.jsxs("div",{className:"dsn-modal-overlay",onMouseDown:Y=>{Y.target===Y.currentTarget&&i&&H()},children:[h.jsx("div",{className:"dsn-modal-backdrop","aria-hidden":"true"}),h.jsxs("div",{className:F,role:"dialog","aria-modal":"true","aria-label":l&&!g?void 0:E,"aria-labelledby":l&&!g?O:void 0,"aria-describedby":T,ref:z,tabIndex:-1,children:[l&&U?h.jsx("div",{className:"dsn-modal-header",children:U}):null,l&&!g?h.jsx("h2",{id:O,className:"dsn-modal-title-assistive",children:o}):null,h.jsx("div",{className:"dsn-modal-content",children:p}),v?h.jsx("div",{className:"dsn-modal-bottom-bar",children:V}):null]})]}),document.body)}const A1='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])',QP=200;function RP({variant:e="overlay",placement:t="right",open:n,defaultOpen:r,onOpenChange:i,onClose:a,closeOnOverlayClick:o=!0,closeOnEscape:s=!0,width:l="var(--size-surface-popover-width-large, 320px)",title:c="Title",description:u,showHeader:d=!0,headerSize:f=e==="stacked"?"medium":"large",headerLeadingControl:g,headerTrailingControl:p,showCloseButton:v=!0,showToggle:m=!1,toggleChecked:b=!1,onToggleChange:y,toggleAriaLabel:x="Toggle drawer option",header:k,children:w,showBottomBar:S=!0,bottomBarSize:N=e==="stacked"?"md":"lg",bottomBarLeftActions:C,bottomBarRightActions:E,bottomBar:T,cancelLabel:O="Cancel",confirmLabel:P="Confirm",onCancel:M,onConfirm:$,className:L,"aria-label":z="Drawer","aria-describedby":j}){const B=n!==void 0,[H,F]=_.useState(r??e==="stacked"),D=B?n:H,[U,V]=_.useState(D),[Y,G]=_.useState(!1),R=_.useId(),te=_.useRef(null),le=_.useRef(null),W=_.useRef(D),Z=()=>{B||F(!1),i==null||i(!1),a==null||a()};if(_.useEffect(()=>{var he;if(e!=="overlay")return;const ne=W.current;D&&!ne&&(le.current=document.activeElement),!D&&ne&&((he=le.current)==null||he.focus()),W.current=D},[D,e]),_.useEffect(()=>{if(e!=="overlay"||!U)return;const ne=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ne}},[U,e]),_.useEffect(()=>{if(e!=="overlay"){V(D),G(!1);return}if(D){V(!0),G(!1);return}if(!U)return;G(!0);const ne=window.setTimeout(()=>{V(!1),G(!1)},QP);return()=>window.clearTimeout(ne)},[D,U,e]),_.useEffect(()=>{if(e!=="overlay"||!D||!te.current)return;const he=te.current.querySelectorAll(A1)[0];he?he.focus():te.current.focus()},[D,e]),_.useEffect(()=>{if(e!=="overlay"||!D)return;const ne=he=>{if(he.key==="Escape"&&s){he.preventDefault(),Z();return}if(he.key!=="Tab"||!te.current)return;const xe=Array.from(te.current.querySelectorAll(A1));if(xe.length===0){he.preventDefault(),te.current.focus();return}const Ye=xe[0],Ge=xe[xe.length-1],ut=document.activeElement;!he.shiftKey&&ut===Ge?(he.preventDefault(),Ye.focus()):he.shiftKey&&ut===Ye&&(he.preventDefault(),Ge.focus())};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[s,D,e]),e==="overlay"&&!U||e==="stacked"&&!D)return null;const I=["dsn-drawer",L].filter(Boolean).join(" "),A=h.jsxs("div",{className:"dsn-drawer-header-controls",children:[m?h.jsx(ka,{checked:b,onChange:y,size:"md","aria-label":x}):null,v?h.jsx(me,{variant:"ghost",size:"md",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Qn,{size:16}),"aria-label":"Close drawer",onClick:Z}):null]}),q=k??h.jsx(er,{title:c,description:u,size:f,leadingControl:g,trailingControl:p??A,className:"dsn-drawer-title"}),Q=T??h.jsx(Sa,{size:N,leftActions:C,rightActions:E??h.jsxs(h.Fragment,{children:[h.jsx(me,{variant:"ghost",size:"md",onClick:M??Z,children:O}),h.jsx(me,{variant:"primary",size:"md",onClick:$,children:P})]}),"aria-label":"Drawer actions"}),de=h.jsxs("div",{className:I,"data-variant":e,"data-placement":t,style:{width:l},ref:te,role:e==="overlay"?"dialog":"complementary","aria-modal":e==="overlay"?!0:void 0,"aria-label":d&&!k?void 0:z,"aria-labelledby":d&&!k?R:void 0,"aria-describedby":j,tabIndex:e==="overlay"?-1:void 0,children:[d&&q?h.jsx("div",{className:"dsn-drawer-header",children:q}):null,d&&!k?h.jsx("h2",{id:R,className:"dsn-drawer-title-assistive",children:c}):null,h.jsx("div",{className:"dsn-drawer-content",children:w}),S?h.jsx("div",{className:"dsn-drawer-bottom-bar",children:Q}):null]});return e==="stacked"?de:Zr.createPortal(h.jsxs("div",{className:"dsn-drawer-overlay","data-placement":t,"data-state":Y?"closing":"open",onMouseDown:ne=>{ne.target===ne.currentTarget&&o&&Z()},children:[h.jsx("div",{className:"dsn-drawer-backdrop","aria-hidden":"true"}),de]}),document.body)}const L1='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function eA({open:e,defaultOpen:t=!1,onOpenChange:n,onClose:r,closeOnOverlayClick:i=!0,closeOnEscape:a=!0,variant:o="default",title:s="Title",message:l="Message",confirmLabel:c=o==="danger"?"Delete":"Confirm",cancelLabel:u="Cancel",onConfirm:d,onCancel:f,requireAcknowledgement:g=!1,acknowledgementLabel:p="Confirm",acknowledgementChecked:v,defaultAcknowledgementChecked:m=!1,onAcknowledgementChange:b,className:y,"aria-label":x="Alert dialog"}){const k=e!==void 0,[w,S]=_.useState(t),N=k?e:w,C=v!==void 0,[E,T]=_.useState(m),O=C?v:E,P=_.useId(),M=_.useId(),$=_.useRef(null),L=_.useRef(null),z=_.useRef(N),j=()=>{k||S(!1),n==null||n(!1),r==null||r()},B=D=>{C||T(D),b==null||b(D)};if(_.useEffect(()=>{var U;const D=z.current;N&&!D&&(L.current=document.activeElement),!N&&D&&((U=L.current)==null||U.focus()),z.current=N},[N]),_.useEffect(()=>{if(!N)return;const D=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=D}},[N]),_.useEffect(()=>{if(!N||!$.current)return;const U=$.current.querySelectorAll(L1)[0];U?U.focus():$.current.focus()},[N]),_.useEffect(()=>{if(!N)return;const D=U=>{if(U.key==="Escape"&&a){U.preventDefault(),j();return}if(U.key!=="Tab"||!$.current)return;const V=Array.from($.current.querySelectorAll(L1));if(V.length===0){U.preventDefault(),$.current.focus();return}const Y=V[0],G=V[V.length-1],R=document.activeElement;!U.shiftKey&&R===G?(U.preventDefault(),Y.focus()):U.shiftKey&&R===Y&&(U.preventDefault(),G.focus())};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[a,N]),!N)return null;const H=g&&!O,F=["dsn-alert-dialog",y].filter(Boolean).join(" ");return Zr.createPortal(h.jsxs("div",{className:"dsn-alert-dialog-overlay",onMouseDown:D=>{D.target===D.currentTarget&&i&&j()},children:[h.jsx("div",{className:"dsn-alert-dialog-backdrop","aria-hidden":"true"}),h.jsxs("div",{className:F,"data-variant":o,ref:$,role:"alertdialog","aria-modal":"true","aria-label":x,"aria-labelledby":P,"aria-describedby":M,tabIndex:-1,children:[h.jsxs("div",{className:"dsn-alert-dialog-content",children:[h.jsx("h2",{id:P,className:"dsn-alert-dialog-title",children:s}),h.jsx("p",{id:M,className:"dsn-alert-dialog-message",children:l})]}),h.jsxs("div",{className:"dsn-alert-dialog-footer",children:[h.jsx("div",{className:"dsn-alert-dialog-footer-left",children:g?h.jsx(Pn,{size:"md",checked:O,onCheckedChange:B,label:p,showTrailingIcon:!1,"aria-label":p}):null}),h.jsxs("div",{className:"dsn-alert-dialog-footer-right",children:[h.jsx(me,{variant:"ghost",size:"md",onClick:f??j,children:u}),h.jsx(me,{variant:"primary",size:"md",destructive:o==="danger",disabled:H,onClick:d,children:c})]})]})]})]}),document.body)}function D1(e,t,n){let r=e;return typeof t=="number"&&(r=Math.max(r,t)),typeof n=="number"&&(r=Math.min(r,n)),r}function tA({columns:e,rows:t,columnOrder:n,onColumnOrderChange:r,selectedRowIds:i=[],onSelectedRowIdsChange:a,sortState:o=null,onSortStateChange:s,filterState:l,onFilterStateChange:c,pagination:u,className:d,"aria-label":f="Data table"}){const g=["dsn-data-table",d].filter(Boolean).join(" "),[p,v]=_.useState(null),[m,b]=_.useState(null),[y,x]=_.useState({}),[k,w]=_.useState(null),[S,N]=_.useState(null),C=_.useRef(null),E=_.useMemo(()=>new Map(e.map(I=>[I.id,I])),[e]),T=_.useMemo(()=>e.map(I=>I.id),[e]),O=_.useMemo(()=>{if(!(n!=null&&n.length))return T;const I=n.filter(q=>E.has(q)),A=T.filter(q=>!I.includes(q));return[...I,...A]},[n,T,E]),P=_.useMemo(()=>{var A;return((A=e.find(q=>q.frozen))==null?void 0:A.id)??T[0]},[e,T]),$=_.useMemo(()=>{const I=O.filter(A=>A!==P);return[P,...I]},[O,P]).map(I=>E.get(I)).filter(I=>!!I),L=_.useMemo(()=>$.find(I=>I.fieldType==="checkbox"||I.headerVariant==="checkbox"),[$]),z=_.useMemo(()=>L?$.filter(I=>I.id!==L.id):$,[$,L]),j=_.useMemo(()=>z.map(I=>I.id),[z]),B=_.useMemo(()=>j.slice(0,1),[j]),H=_.useMemo(()=>z.reduce((I,A)=>I+(y[A.id]??A.width??160),0),[z,y]),F=_.useMemo(()=>{const I={};let A=0;for(let q=0;q<B.length;q++){const Q=z[q];if(!Q)break;I[Q.id]=A,A+=y[Q.id]??Q.width??160}return I},[z,B,y]),D=(I,A)=>{const q=new Set(i);A?q.add(I):q.delete(I),a==null||a(Array.from(q))},U=I=>{a==null||a(I?t.map(A=>A.id):[])},V=(I,A)=>{if(B.includes(I)||B.includes(A)||I===A)return;const q=[...j],Q=q.indexOf(I),de=q.indexOf(A);if(Q===-1||de===-1)return;const[ne]=q.splice(Q,1);q.splice(de,0,ne),r==null||r(L?[L.id,...q]:q)},Y=(I,A)=>{if(B.includes(I))return;const q=j.filter(xe=>!B.includes(xe)),Q=q.indexOf(I);if(Q===-1)return;const de=A==="left"?Q-1:Q+1;if(de<0||de>=q.length)return;const ne=[...q],[he]=ne.splice(Q,1);ne.splice(de,0,he),r==null||r(L?[L.id,...B,...ne]:[...B,...ne])},G=(I,A)=>{const Q=y[I.id]??I.width??160,ne=D1(Q+(A==="increase"?16:-16),I.minWidth??96,I.maxWidth);x(he=>({...he,[I.id]:ne}))},R=(I,A)=>{var Q,de;const q=y[A.id]??A.width??160;C.current={columnId:A.id,startX:I.clientX,startWidth:q,minWidth:A.minWidth??96,maxWidth:A.maxWidth},w(A.id),N(I.pointerId),(de=(Q=I.currentTarget).setPointerCapture)==null||de.call(Q,I.pointerId),I.preventDefault()};_.useEffect(()=>{if(!k)return;const I=he=>{if(!C.current)return;const{columnId:xe,startX:Ye,startWidth:Ge,minWidth:ut,maxWidth:je}=C.current,We=he-Ye,nt=D1(Ge+We,ut,je);x(rt=>({...rt,[xe]:nt}))},A=he=>{I(he.clientX)},q=he=>{I(he.clientX)},Q=()=>{C.current=null,w(null),N(null)},de=he=>{S!=null&&he.pointerId!==S||Q()},ne=he=>{S!=null&&he.pointerId!==S||Q()};return window.addEventListener("pointermove",A),window.addEventListener("pointerup",de),window.addEventListener("pointercancel",ne),window.addEventListener("mousemove",q),window.addEventListener("mouseup",Q),()=>{window.removeEventListener("pointermove",A),window.removeEventListener("pointerup",de),window.removeEventListener("pointercancel",ne),window.removeEventListener("mousemove",q),window.removeEventListener("mouseup",Q)}},[S,k]);const te=(I,A)=>{if(A==="none"){s==null||s(null);return}s==null||s({columnId:I,direction:A})},le=t.filter(I=>i.includes(I.id)).length,W=t.length>0&&le===t.length,Z=le>0&&le<t.length;return h.jsxs("div",{className:g,"data-resizing":k?"":void 0,children:[h.jsxs("table",{className:"dsn-data-table-table",role:"table","aria-label":f,style:{minWidth:`${H}px`},children:[h.jsx("colgroup",{children:z.map(I=>{const A=y[I.id]??I.width,q={};return I.widthMode==="fixed"&&typeof A=="number"?(q.width=`${A}px`,q.minWidth=`${A}px`,q.maxWidth=`${A}px`):I.widthMode==="hug"&&(q.width="1%"),h.jsx("col",{style:q},I.id)})}),h.jsx("thead",{children:h.jsx("tr",{children:z.map((I,A)=>{const q=A<B.length,Q=(o==null?void 0:o.columnId)===I.id?o.direction:"none",de=q?{left:`${F[I.id]??0}px`}:void 0;return h.jsx("th",{scope:"col",className:q?"dsn-data-table-sticky-column":void 0,"data-first-column":A===0||void 0,style:de,"data-drag-over":m===I.id?"":void 0,onDragOver:ne=>{p&&(B.includes(I.id)||I.id!==p&&(ne.preventDefault(),b(I.id)))},onDragLeave:()=>{m===I.id&&b(null)},onDrop:ne=>{ne.preventDefault(),p&&(V(p,I.id),v(null),b(null))},children:h.jsx(Iy,{variant:"title",label:I.header,sortable:!!I.sortable,sortDirection:Q,reorderable:!q&&I.reorderable!==!1,resizable:!q,checkboxChecked:W,checkboxIndeterminate:Z,onCheckboxChange:U,leadingAccessory:L&&A===0?h.jsx(Pn,{size:"sm",checked:W,indeterminate:Z,showContent:!1,"aria-label":"Select all rows",onCheckedChange:U}):void 0,filterValue:l==null?void 0:l[I.id],onFilterChange:ne=>c==null?void 0:c({...l,[I.id]:ne}),onSortChange:ne=>te(I.id,ne),onReorderCommand:ne=>Y(I.id,ne),onResizeCommand:ne=>G(I,ne),onResizePointerDown:ne=>R(ne,I),onReorderDragStart:ne=>{if(ne.stopPropagation(),B.includes(I.id)||I.reorderable===!1){ne.preventDefault();return}ne.dataTransfer.effectAllowed="move",ne.dataTransfer.setData("text/plain",I.id),v(I.id)},onReorderDragEnd:()=>{v(null),b(null)}})},I.id)})})}),h.jsx("tbody",{children:t.map(I=>h.jsx("tr",{children:z.map((A,q)=>{const Q=q<B.length,de=Q?{left:`${F[A.id]??0}px`}:void 0,ne=I.cells[A.id],he=i.includes(I.id);return h.jsx("td",{className:Q?"dsn-data-table-sticky-column dsn-data-table-sticky-cell":void 0,"data-first-column":q===0||void 0,style:de,children:h.jsx(zy,{fieldType:A.fieldType,value:ne,leadingAccessory:L&&q===0?h.jsx(Pn,{size:"sm",checked:he,showContent:!1,"aria-label":he?"Selected row":"Unselected row",onCheckedChange:xe=>D(I.id,xe)}):void 0,align:A.align,"aria-label":`${A.header} value`})},`${I.id}-${A.id}`)})},I.id))})]}),u&&h.jsx(Uy,{page:u.currentPage,totalPages:u.totalPages,onPageChange:u.onPageChange})]})}function I1({showHeader:e=!0,title:t="Title",description:n,headerSize:r="large",headerLeadingControl:i,headerTrailingControl:a,header:o,children:s,showBottomBar:l=!1,bottomBarSize:c="lg",bottomBarLeftActions:u,bottomBarRightActions:d,bottomBar:f,className:g,"aria-label":p="Card"}){const v=["dsn-card",g].filter(Boolean).join(" "),m=o??h.jsx(er,{title:t,description:n,size:r,leadingControl:i,trailingControl:a}),b=f??h.jsx(Sa,{size:c,leftActions:u,rightActions:d,"aria-label":"Card actions"});return h.jsxs("section",{className:v,"aria-label":p,children:[e&&m?h.jsx("div",{className:"dsn-card-header",children:m}):null,h.jsx("div",{className:"dsn-card-content",children:s}),l?h.jsx("div",{className:"dsn-card-bottom-bar",children:b}):null]})}var Lh={exports:{}},Fc={exports:{}},Ie={};/** @license React v16.13.1
275
+ |(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})})(Prism);const rA=["bold","italic","underline","strikethrough","code"],Uh=["paragraph","h2","quote","code"];function iA(e){const t=Uh.indexOf(e);return t===-1?"paragraph":Uh[(t+1)%Uh.length]}function aA(e){switch(e){case"h2":return"Heading";case"quote":return"Quote";case"code":return"Code";case"paragraph":default:return"Paragraph"}}function Zx(e){var n;return typeof window>"u"||typeof DOMParser>"u"?e.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim():((n=new DOMParser().parseFromString(e,"text/html").body.textContent)==null?void 0:n.replace(/\s+/g," ").trim())??""}function Ns(e){return!e||e.trim().length===0?"<p><br></p>":e}function oA({id:e,editorValue:t,placeholder:n,disabled:r,readOnly:i,attachments:a,footerChecked:o,footerLabel:s,showFooter:l,cancelLabel:c,confirmLabel:u,onCancel:d,onConfirm:f,onAttachmentRemove:g,onAddAttachment:p,onFooterCheckedChange:v,onHtmlChange:m,onCharacterCountChange:x,labelledBy:y,ariaLabel:b,describedBy:k}){const[w]=Fr(),S=_.useRef(Ns(t)),[N,E]=_.useState({canUndo:!1,canRedo:!1,isBold:!1,isItalic:!1,isUnderline:!1,isStrikethrough:!1,isLink:!1,blockType:"paragraph",alignment:"left"});_.useEffect(()=>{w.setEditable(!(r||i))},[r,w,i]),_.useEffect(()=>{const A=Ns(t);A!==S.current&&(w.update(()=>{const j=new DOMParser().parseFromString(A,"text/html"),B=Th(w,j),H=Qe();H.clear(),B.length>0?H.append(...B):H.append(Ye())}),S.current=A,x(Zx(A).length))},[w,t,x]),_.useEffect(()=>{const A=()=>{w.getEditorState().read(()=>{const F=he();if(!ae(F)){E(ie=>({...ie,isBold:!1,isItalic:!1,isUnderline:!1,isStrikethrough:!1,isLink:!1,blockType:"paragraph"}));return}const D=F.anchor.getNode(),W=D.getTopLevelElementOrThrow(),Y=D.getParent();let U="paragraph";gP(W)&&W.getTag()==="h2"?U="h2":hP(W)?U="quote":qx(W)?U="code":Ce(W)&&(U=W.getListType()==="bullet"?"ul":"ol");const K=W.getFormatType(),ee=K===""?"left":K;E(ie=>({...ie,isBold:F.hasFormat("bold"),isItalic:F.hasFormat("italic"),isUnderline:F.hasFormat("underline"),isStrikethrough:F.hasFormat("strikethrough"),isLink:fr(D)||Y!=null&&fr(Y),blockType:U,alignment:ee}))})},I=w.registerUpdateListener(()=>{A()}),j=w.registerCommand(kf,()=>(A(),!1),or),B=w.registerCommand(es,F=>(E(D=>({...D,canUndo:F})),!1),or),H=w.registerCommand(Ro,F=>(E(D=>({...D,canRedo:F})),!1),or);return A(),()=>{I(),j(),B(),H()}},[w]);function C(A){w.update(()=>{const I=he();if(ae(I)){if(A==="paragraph"){fs(I,()=>Ye());return}if(A==="h2"){fs(I,()=>io("h2"));return}if(A==="quote"){fs(I,()=>Mh());return}if(A==="code"){fs(I,()=>co());return}}})}function T(A){if(N.blockType===A){w.dispatchCommand(Ih,void 0);return}w.dispatchCommand(A==="ul"?Dx:Ix,void 0)}function O(){if(N.isLink){w.dispatchCommand(xs,null);return}const A=window.prompt("Enter link URL");A&&w.dispatchCommand(xs,A)}function P(){w.update(()=>{const A=he();ae(A)&&(rA.forEach(I=>{A.hasFormat(I)&&w.dispatchCommand(nn,I)}),w.dispatchCommand(xs,null),w.dispatchCommand(Ih,void 0),w.dispatchCommand(Da,"left"),fs(A,()=>Ye()))})}const M=r||i;function $(A){w.update(()=>{const I=he();ae(I)&&I.insertText(A)})}return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"dsn-rich-text-editor-toolbar",role:"toolbar","aria-label":"Rich text formatting toolbar",children:[h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-select",disabled:M,"aria-label":"Cycle block style",onClick:()=>C(iA(N.blockType)),children:aA(N.blockType)}),h.jsx("div",{className:"dsn-rich-text-editor-toolbar-divider","aria-hidden":"true"}),h.jsx(Kt,{variant:"ghost",size:"sm",disabled:M,selected:N.isBold,"aria-label":"Bold",onClick:()=>w.dispatchCommand(nn,"bold"),icon:h.jsx(wT,{size:16,"aria-hidden":"true"})}),h.jsx(Kt,{variant:"ghost",size:"sm",disabled:M,selected:N.isItalic,"aria-label":"Italic",onClick:()=>w.dispatchCommand(nn,"italic"),icon:h.jsx($T,{size:16,"aria-hidden":"true"})}),h.jsx(Kt,{variant:"ghost",size:"sm",disabled:M,selected:N.isUnderline,"aria-label":"Underline",onClick:()=>w.dispatchCommand(nn,"underline"),icon:h.jsx(KT,{size:16,"aria-hidden":"true"})}),h.jsx(Kt,{variant:"ghost",size:"sm",disabled:M,selected:N.isStrikethrough,"aria-label":"Strikethrough",onClick:()=>w.dispatchCommand(nn,"strikethrough"),icon:h.jsx(WT,{size:16,"aria-hidden":"true"})}),h.jsx("div",{className:"dsn-rich-text-editor-toolbar-divider","aria-hidden":"true"}),h.jsx(Kt,{variant:"ghost",size:"sm",disabled:M,selected:N.alignment==="left","aria-label":"Align left",onClick:()=>w.dispatchCommand(Da,"left"),icon:h.jsx(VT,{size:16,"aria-hidden":"true"})}),h.jsx(Kt,{variant:"ghost",size:"sm",disabled:M,selected:N.alignment==="center","aria-label":"Align center",onClick:()=>w.dispatchCommand(Da,"center"),icon:h.jsx(UT,{size:16,"aria-hidden":"true"})}),h.jsx(Kt,{variant:"ghost",size:"sm",disabled:M,selected:N.alignment==="right","aria-label":"Align right",onClick:()=>w.dispatchCommand(Da,"right"),icon:h.jsx(HT,{size:16,"aria-hidden":"true"})}),h.jsx(Kt,{variant:"ghost",size:"sm",disabled:M,selected:N.alignment==="justify","aria-label":"Justify",onClick:()=>w.dispatchCommand(Da,"justify"),icon:h.jsx(qT,{size:16,"aria-hidden":"true"})}),h.jsx("div",{className:"dsn-rich-text-editor-toolbar-divider","aria-hidden":"true"}),h.jsx(Kt,{variant:"ghost",size:"sm",disabled:M,selected:N.blockType==="ul","aria-label":"Bulleted list",onClick:()=>T("ul"),icon:h.jsx(PT,{size:16,"aria-hidden":"true"})}),h.jsx(Kt,{variant:"ghost",size:"sm",disabled:M,selected:N.blockType==="ol","aria-label":"Numbered list",onClick:()=>T("ol"),icon:h.jsx(OT,{size:16,"aria-hidden":"true"})}),h.jsx(Kt,{variant:"ghost",size:"sm",disabled:M,selected:N.blockType==="quote","aria-label":"Quote block",onClick:()=>C(N.blockType==="quote"?"paragraph":"quote"),icon:h.jsx(FT,{size:16,"aria-hidden":"true"})}),h.jsx(Kt,{variant:"ghost",size:"sm",disabled:M,selected:N.blockType==="code","aria-label":"Code block",onClick:()=>C(N.blockType==="code"?"paragraph":"code"),icon:h.jsx(ET,{size:16,"aria-hidden":"true"})}),h.jsx(Kt,{variant:"ghost",size:"sm",disabled:M,selected:N.isLink,"aria-label":"Toggle link",onClick:O,icon:h.jsx(Ay,{size:16,"aria-hidden":"true"})}),h.jsx("div",{className:"dsn-rich-text-editor-toolbar-divider","aria-hidden":"true"}),h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-icon",disabled:M||!N.canUndo,"aria-label":"Undo",onClick:()=>w.dispatchCommand(uc,void 0),children:h.jsx(YT,{size:16,"aria-hidden":"true"})}),h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-icon",disabled:M||!N.canRedo,"aria-label":"Redo",onClick:()=>w.dispatchCommand(dc,void 0),children:h.jsx(zT,{size:16,"aria-hidden":"true"})}),h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-icon",disabled:M,"aria-label":"Clear formatting",onClick:P,children:h.jsx(MT,{size:16,"aria-hidden":"true"})})]}),h.jsxs("div",{className:"dsn-rich-text-editor-content-wrap",children:[h.jsx(xP,{contentEditable:h.jsx(SP,{id:e,className:"dsn-rich-text-editor-content","aria-label":b,"aria-labelledby":y,"aria-describedby":k,"aria-readonly":i||r||void 0,"aria-disabled":r||void 0}),placeholder:h.jsx("div",{className:"dsn-rich-text-editor-placeholder",children:n}),ErrorBoundary:JP}),h.jsx(MP,{}),h.jsx(WP,{}),h.jsx(YP,{}),h.jsx(OP,{onChange:(A,I)=>{A.read(()=>{const j=ax(I,null),B=Qe().getTextContent();S.current=j,x(B.length),m(j)})}})]}),(a.length>0||p)&&h.jsxs("div",{className:"dsn-rich-text-editor-attachments","aria-label":"Attached files",children:[a.map(A=>h.jsx(Zd,{fileName:A.fileName,fileSize:A.fileSize,action:"remove",size:"md",disabled:M,onRemove:g?()=>g(A.id):void 0,"aria-label":A.fileName},A.id)),p&&h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-icon",disabled:M,"aria-label":"Add attachment",onClick:p,children:h.jsx(LT,{size:16,"aria-hidden":"true"})}),h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-icon",disabled:M,"aria-label":"Insert emoji",onClick:()=>$("🙂"),children:h.jsx(jT,{size:16,"aria-hidden":"true"})})]}),l&&h.jsxs("div",{className:"dsn-rich-text-editor-footer",children:[h.jsx(hn,{className:"dsn-rich-text-editor-footer-checkbox",label:s,checked:o,disabled:M,showTrailingIcon:!1,showDescription:!1,onCheckedChange:v}),h.jsxs("div",{className:"dsn-rich-text-editor-footer-actions",children:[h.jsx(ve,{variant:"ghost",size:"md",disabled:M,onClick:d,children:c}),h.jsx(ve,{variant:"primary",size:"md",disabled:M,onClick:f,children:u})]})]})]})}function sA({id:e,label:t="Label",placeholder:n="Type here...",value:r,defaultValue:i,disabled:a=!1,readOnly:o=!1,error:s=!1,helperText:l="Help text",errorMessage:c="There is an issue with this content.",maxLength:u,attachments:d=[],footerChecked:f=!1,footerLabel:g="Label",showFooter:p=!0,cancelLabel:v="Cancel",confirmLabel:m="Confirm",onChange:x,onFooterCheckedChange:y,onCancel:b,onConfirm:k,onAttachmentRemove:w,onAddAttachment:S,className:N,"aria-label":E,"aria-labelledby":C}){const T=_.useId(),O=e??`dsn-rich-text-editor-${T}`,P=`${O}-label`,M=`${O}-help`,[$,A]=_.useState(Ns(i)),[I,j]=_.useState(Zx(Ns(r??i)).length),B=r!==void 0?Ns(r):$,H=s?c:l,F=u!==void 0&&I>u,D=_.useMemo(()=>({namespace:O,editable:!(a||o),theme:{paragraph:"dsn-rich-text-editor-paragraph",text:{bold:"dsn-rich-text-editor-text-bold",italic:"dsn-rich-text-editor-text-italic",underline:"dsn-rich-text-editor-text-underline",strikethrough:"dsn-rich-text-editor-text-strikethrough",code:"dsn-rich-text-editor-text-code"},heading:{h2:"dsn-rich-text-editor-heading-h2"},quote:"dsn-rich-text-editor-quote",code:"dsn-rich-text-editor-code",link:"dsn-rich-text-editor-link",list:{ul:"dsn-rich-text-editor-list-ul",ol:"dsn-rich-text-editor-list-ol",listitem:"dsn-rich-text-editor-list-item"}},editorState:W=>{const U=new DOMParser().parseFromString(B,"text/html"),K=Th(W,U),ee=Qe();ee.clear(),K.length>0?ee.append(...K):ee.append(Ye())},onError:W=>{throw W},nodes:[ms,vs,ys,ao,oo,Fh,Ss]}),[a,O,B,o]);return h.jsxs("div",{className:["dsn-rich-text-editor",N].filter(Boolean).join(" "),"data-error":s||void 0,"data-disabled":a||void 0,"data-readonly":o||void 0,"data-over-limit":F||void 0,children:[t&&h.jsx("label",{id:P,className:"dsn-rich-text-editor-label",htmlFor:O,children:t}),h.jsx("div",{className:"dsn-rich-text-editor-shell",children:h.jsx(NO,{initialConfig:D,children:h.jsx(oA,{id:O,editorValue:B,placeholder:n,disabled:a,readOnly:o,attachments:d,footerChecked:f,footerLabel:g,showFooter:p,cancelLabel:v,confirmLabel:m,onCancel:b,onConfirm:k,onAttachmentRemove:w,onAddAttachment:S,onFooterCheckedChange:y,onCharacterCountChange:j,onHtmlChange:W=>{r===void 0&&A(W),x==null||x(W)},labelledBy:C??(t?P:void 0),ariaLabel:E,describedBy:H?M:void 0})})}),(H||u!==void 0)&&h.jsxs("div",{className:"dsn-rich-text-editor-meta",children:[h.jsxs("div",{className:"dsn-rich-text-editor-meta-main",children:[h.jsx("span",{className:"dsn-rich-text-editor-meta-icon","aria-hidden":"true",children:h.jsx(CT,{size:16})}),H&&h.jsx("p",{id:M,className:"dsn-rich-text-editor-help",children:H})]}),u!==void 0&&h.jsxs("span",{className:"dsn-rich-text-editor-count","aria-live":"polite","aria-atomic":"true",children:[I,"/",u]})]})]})}const lA=[{value:"first",label:"Label"},{value:"second",label:"Label"}],cA=Array.from({length:4},(e,t)=>({id:`simple-item-${t+1}`,kind:"menu-cell",props:{label:"Label",showLeadingIcon:!0,showTrailingIcon:!1}}));function uA({variant:e="rich",title:t="Title",showHeader:n=!0,showSegmentControl:r=!1,segmentControlOptions:i=lA,segmentControlProps:a,showSearch:o=!1,searchProps:s,choiceLists:l,simpleItems:c=cA,showBottomBar:u=!1,bottomBarLeftActions:d,bottomBarRightActions:f,className:g,"aria-label":p="Popover menu",onEscape:v}){const m=["dsn-popover-menu",g].filter(Boolean).join(" "),x=l??(e==="simple"?[{id:"simple-choice-list",showSectionHeaders:!1,sections:[{id:"simple-section",title:"Actions",items:c}]}]:[]);return h.jsx(Er,{className:m,role:"menu","aria-label":p,header:n?h.jsx(ti,{title:t,size:"medium"}):void 0,segment:r?h.jsx("div",{className:"dsn-popover-menu-segment",children:h.jsx(nf,{options:i,...a})}):void 0,search:o?h.jsx("div",{className:"dsn-popover-menu-search",children:h.jsx(Wy,{variant:"ghost",placeholder:"Search","aria-label":"Search",...s})}):void 0,content:h.jsx("div",{className:"dsn-popover-menu-lists","data-variant":e,children:x.map(y=>h.jsx(a0,{title:y.title,showSectionHeaders:y.showSectionHeaders,sections:y.sections,className:"dsn-popover-menu-choice-list",enableMenuKeyboardNavigation:!0,onMenuEscape:v},y.id))}),bottomBar:u?h.jsx(zi,{size:"md",className:"dsn-popover-menu-bottom-bar",leftActions:d,rightActions:f??h.jsxs(Rr,{size:"md",spaceBetween:!0,"aria-label":"Popover actions",children:[h.jsx(ve,{variant:"ghost",size:"md",children:"Cancel"}),h.jsx(ve,{variant:"primary",size:"md",children:"Confirm"})]})}):void 0})}const Jx='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function dA({open:e,defaultOpen:t=!1,onOpenChange:n,onClose:r,closeOnOverlayClick:i=!0,closeOnEscape:a=!0,title:o="Title",description:s,showHeader:l=!0,headerSize:c="large",headerLeadingControl:u,headerTrailingControl:d,showCloseButton:f=!0,header:g,children:p,showBottomBar:v=!0,bottomBarSize:m="lg",bottomBarLeftActions:x,bottomBarRightActions:y,bottomBar:b,cancelLabel:k="Cancel",confirmLabel:w="Confirm",onCancel:S,onConfirm:N,className:E,"aria-label":C="Modal","aria-describedby":T}){const O=_.useId(),P=e!==void 0,[M,$]=_.useState(t),A=P?e:M,I=_.useRef(null),j=_.useRef(null),B=_.useRef(A),H=()=>{P||$(!1),n==null||n(!1),r==null||r()};if(_.useEffect(()=>{var K;const U=B.current;A&&!U&&(j.current=document.activeElement),!A&&U&&((K=j.current)==null||K.focus()),B.current=A},[A]),_.useEffect(()=>{if(!A)return;const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=U}},[A]),_.useEffect(()=>{if(!A||!I.current)return;const K=I.current.querySelectorAll(Jx)[0];K?K.focus():I.current.focus()},[A]),_.useEffect(()=>{if(!A)return;const U=K=>{if(K.key==="Escape"&&a){K.preventDefault(),H();return}if(K.key!=="Tab"||!I.current)return;const ee=Array.from(I.current.querySelectorAll(Jx));if(ee.length===0){K.preventDefault(),I.current.focus();return}const ie=ee[0],ce=ee[ee.length-1],Z=document.activeElement;!K.shiftKey&&Z===ce?(K.preventDefault(),ie.focus()):K.shiftKey&&Z===ie&&(K.preventDefault(),ce.focus())};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[a,A]),!A)return null;const F=["dsn-modal",E].filter(Boolean).join(" "),D=f?h.jsx(ve,{variant:"ghost",size:"md",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(er,{size:16}),"aria-label":"Close modal",onClick:H}):void 0,W=g??h.jsx(ti,{title:o,description:s,size:c,leadingControl:u,trailingControl:d??D,className:"dsn-modal-title"}),Y=b??h.jsx(zi,{size:m,leftActions:x,rightActions:y??h.jsxs(h.Fragment,{children:[h.jsx(ve,{variant:"ghost",size:"md",onClick:S??H,children:k}),h.jsx(ve,{variant:"primary",size:"md",onClick:N,children:w})]}),"aria-label":"Modal actions"});return Qr.createPortal(h.jsxs("div",{className:"dsn-modal-overlay",onMouseDown:U=>{U.target===U.currentTarget&&i&&H()},children:[h.jsx("div",{className:"dsn-modal-backdrop","aria-hidden":"true"}),h.jsxs("div",{className:F,role:"dialog","aria-modal":"true","aria-label":l&&!g?void 0:C,"aria-labelledby":l&&!g?O:void 0,"aria-describedby":T,ref:I,tabIndex:-1,children:[l&&W?h.jsx("div",{className:"dsn-modal-header",children:W}):null,l&&!g?h.jsx("h2",{id:O,className:"dsn-modal-title-assistive",children:o}):null,h.jsx("div",{className:"dsn-modal-content",children:p}),v?h.jsx("div",{className:"dsn-modal-bottom-bar",children:Y}):null]})]}),document.body)}const Qx='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])',fA=200;function hA({variant:e="overlay",placement:t="right",open:n,defaultOpen:r,onOpenChange:i,onClose:a,closeOnOverlayClick:o=!0,closeOnEscape:s=!0,width:l="var(--size-surface-popover-width-large, 320px)",title:c="Title",description:u,showHeader:d=!0,headerSize:f=e==="stacked"?"medium":"large",headerLeadingControl:g,headerTrailingControl:p,showCloseButton:v=!0,showToggle:m=!1,toggleChecked:x=!1,onToggleChange:y,toggleAriaLabel:b="Toggle drawer option",header:k,children:w,showBottomBar:S=!0,bottomBarSize:N=e==="stacked"?"md":"lg",bottomBarLeftActions:E,bottomBarRightActions:C,bottomBar:T,cancelLabel:O="Cancel",confirmLabel:P="Confirm",onCancel:M,onConfirm:$,className:A,"aria-label":I="Drawer","aria-describedby":j}){const B=n!==void 0,[H,F]=_.useState(r??e==="stacked"),D=B?n:H,[W,Y]=_.useState(D),[U,K]=_.useState(!1),ee=_.useId(),ie=_.useRef(null),ce=_.useRef(null),Z=_.useRef(D),J=()=>{B||F(!1),i==null||i(!1),a==null||a()};if(_.useEffect(()=>{var ge;if(e!=="overlay")return;const X=Z.current;D&&!X&&(ce.current=document.activeElement),!D&&X&&((ge=ce.current)==null||ge.focus()),Z.current=D},[D,e]),_.useEffect(()=>{if(e!=="overlay"||!W)return;const X=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=X}},[W,e]),_.useEffect(()=>{if(e!=="overlay"){Y(D),K(!1);return}if(D){Y(!0),K(!1);return}if(!W)return;K(!0);const X=window.setTimeout(()=>{Y(!1),K(!1)},fA);return()=>window.clearTimeout(X)},[D,W,e]),_.useEffect(()=>{if(e!=="overlay"||!D||!ie.current)return;const ge=ie.current.querySelectorAll(Qx)[0];ge?ge.focus():ie.current.focus()},[D,e]),_.useEffect(()=>{if(e!=="overlay"||!D)return;const X=ge=>{if(ge.key==="Escape"&&s){ge.preventDefault(),J();return}if(ge.key!=="Tab"||!ie.current)return;const Pe=Array.from(ie.current.querySelectorAll(Qx));if(Pe.length===0){ge.preventDefault(),ie.current.focus();return}const ze=Pe[0],ke=Pe[Pe.length-1],Be=document.activeElement;!ge.shiftKey&&Be===ke?(ge.preventDefault(),ze.focus()):ge.shiftKey&&Be===ze&&(ge.preventDefault(),ke.focus())};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[s,D,e]),e==="overlay"&&!W||e==="stacked"&&!D)return null;const z=["dsn-drawer",A].filter(Boolean).join(" "),L=h.jsxs("div",{className:"dsn-drawer-header-controls",children:[m?h.jsx($a,{checked:x,onChange:y,size:"md","aria-label":b}):null,v?h.jsx(ve,{variant:"ghost",size:"md",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(er,{size:16}),"aria-label":"Close drawer",onClick:J}):null]}),q=k??h.jsx(ti,{title:c,description:u,size:f,leadingControl:g,trailingControl:p??L,className:"dsn-drawer-title"}),G=T??h.jsx(zi,{size:N,leftActions:E,rightActions:C??h.jsxs(h.Fragment,{children:[h.jsx(ve,{variant:"ghost",size:"md",onClick:M??J,children:O}),h.jsx(ve,{variant:"primary",size:"md",onClick:$,children:P})]}),"aria-label":"Drawer actions"}),ne=h.jsxs("div",{className:z,"data-variant":e,"data-placement":t,style:{width:l},ref:ie,role:e==="overlay"?"dialog":"complementary","aria-modal":e==="overlay"?!0:void 0,"aria-label":d&&!k?void 0:I,"aria-labelledby":d&&!k?ee:void 0,"aria-describedby":j,tabIndex:e==="overlay"?-1:void 0,children:[d&&q?h.jsx("div",{className:"dsn-drawer-header",children:q}):null,d&&!k?h.jsx("h2",{id:ee,className:"dsn-drawer-title-assistive",children:c}):null,h.jsx("div",{className:"dsn-drawer-content",children:w}),S?h.jsx("div",{className:"dsn-drawer-bottom-bar",children:G}):null]});return e==="stacked"?ne:Qr.createPortal(h.jsxs("div",{className:"dsn-drawer-overlay","data-placement":t,"data-state":U?"closing":"open",onMouseDown:X=>{X.target===X.currentTarget&&o&&J()},children:[h.jsx("div",{className:"dsn-drawer-backdrop","aria-hidden":"true"}),ne]}),document.body)}const Rx='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function pA({open:e,defaultOpen:t=!1,onOpenChange:n,onClose:r,closeOnOverlayClick:i=!0,closeOnEscape:a=!0,variant:o="default",title:s="Title",message:l="Message",confirmLabel:c=o==="danger"?"Delete":"Confirm",cancelLabel:u="Cancel",onConfirm:d,onCancel:f,requireAcknowledgement:g=!1,acknowledgementLabel:p="Confirm",acknowledgementChecked:v,defaultAcknowledgementChecked:m=!1,onAcknowledgementChange:x,className:y,"aria-label":b="Alert dialog"}){const k=e!==void 0,[w,S]=_.useState(t),N=k?e:w,E=v!==void 0,[C,T]=_.useState(m),O=E?v:C,P=_.useId(),M=_.useId(),$=_.useRef(null),A=_.useRef(null),I=_.useRef(N),j=()=>{k||S(!1),n==null||n(!1),r==null||r()},B=D=>{E||T(D),x==null||x(D)};if(_.useEffect(()=>{var W;const D=I.current;N&&!D&&(A.current=document.activeElement),!N&&D&&((W=A.current)==null||W.focus()),I.current=N},[N]),_.useEffect(()=>{if(!N)return;const D=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=D}},[N]),_.useEffect(()=>{if(!N||!$.current)return;const W=$.current.querySelectorAll(Rx)[0];W?W.focus():$.current.focus()},[N]),_.useEffect(()=>{if(!N)return;const D=W=>{if(W.key==="Escape"&&a){W.preventDefault(),j();return}if(W.key!=="Tab"||!$.current)return;const Y=Array.from($.current.querySelectorAll(Rx));if(Y.length===0){W.preventDefault(),$.current.focus();return}const U=Y[0],K=Y[Y.length-1],ee=document.activeElement;!W.shiftKey&&ee===K?(W.preventDefault(),U.focus()):W.shiftKey&&ee===U&&(W.preventDefault(),K.focus())};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[a,N]),!N)return null;const H=g&&!O,F=["dsn-alert-dialog",y].filter(Boolean).join(" ");return Qr.createPortal(h.jsxs("div",{className:"dsn-alert-dialog-overlay",onMouseDown:D=>{D.target===D.currentTarget&&i&&j()},children:[h.jsx("div",{className:"dsn-alert-dialog-backdrop","aria-hidden":"true"}),h.jsxs("div",{className:F,"data-variant":o,ref:$,role:"alertdialog","aria-modal":"true","aria-label":b,"aria-labelledby":P,"aria-describedby":M,tabIndex:-1,children:[h.jsxs("div",{className:"dsn-alert-dialog-content",children:[h.jsx("h2",{id:P,className:"dsn-alert-dialog-title",children:s}),h.jsx("p",{id:M,className:"dsn-alert-dialog-message",children:l})]}),h.jsxs("div",{className:"dsn-alert-dialog-footer",children:[h.jsx("div",{className:"dsn-alert-dialog-footer-left",children:g?h.jsx(hn,{size:"md",checked:O,onCheckedChange:B,label:p,showTrailingIcon:!1,"aria-label":p}):null}),h.jsxs("div",{className:"dsn-alert-dialog-footer-right",children:[h.jsx(ve,{variant:"ghost",size:"md",onClick:f??j,children:u}),h.jsx(ve,{variant:"primary",size:"md",destructive:o==="danger",disabled:H,onClick:d,children:c})]})]})]})]}),document.body)}function e_(e,t,n){let r=e;return typeof t=="number"&&(r=Math.max(r,t)),typeof n=="number"&&(r=Math.min(r,n)),r}function gA({columns:e,rows:t,columnOrder:n,onColumnOrderChange:r,selectedRowIds:i=[],onSelectedRowIdsChange:a,sortState:o=null,onSortStateChange:s,filterState:l,onFilterStateChange:c,pagination:u,className:d,"aria-label":f="Data table"}){const g=["dsn-data-table",d].filter(Boolean).join(" "),[p,v]=_.useState(null),[m,x]=_.useState(null),[y,b]=_.useState({}),[k,w]=_.useState(null),[S,N]=_.useState(null),E=_.useRef(null),C=_.useMemo(()=>new Map(e.map(z=>[z.id,z])),[e]),T=_.useMemo(()=>e.map(z=>z.id),[e]),O=_.useMemo(()=>{if(!(n!=null&&n.length))return T;const z=n.filter(q=>C.has(q)),L=T.filter(q=>!z.includes(q));return[...z,...L]},[n,T,C]),P=_.useMemo(()=>{var L;return((L=e.find(q=>q.frozen))==null?void 0:L.id)??T[0]},[e,T]),$=_.useMemo(()=>{const z=O.filter(L=>L!==P);return[P,...z]},[O,P]).map(z=>C.get(z)).filter(z=>!!z),A=_.useMemo(()=>$.find(z=>z.fieldType==="checkbox"||z.headerVariant==="checkbox"),[$]),I=_.useMemo(()=>A?$.filter(z=>z.id!==A.id):$,[$,A]),j=_.useMemo(()=>I.map(z=>z.id),[I]),B=_.useMemo(()=>j.slice(0,1),[j]),H=_.useMemo(()=>{if(I.length===0)return 0;const z=I.length-1;let L=0;for(let G=0;G<z;G++){const ne=I[G];ne&&(L+=y[ne.id]??ne.width??160)}const q=I[I.length-1];if(q){const G=y[q.id];L+=G??q.minWidth??q.width??96}return L},[I,y]),F=_.useMemo(()=>{const z={};let L=0;for(let q=0;q<B.length;q++){const G=I[q];if(!G)break;z[G.id]=L,L+=y[G.id]??G.width??160}return z},[I,B,y]),D=(z,L)=>{const q=new Set(i);L?q.add(z):q.delete(z),a==null||a(Array.from(q))},W=z=>{a==null||a(z?t.map(L=>L.id):[])},Y=(z,L)=>{if(B.includes(z)||B.includes(L)||z===L)return;const q=[...j],G=q.indexOf(z),ne=q.indexOf(L);if(G===-1||ne===-1)return;const[X]=q.splice(G,1);q.splice(ne,0,X),r==null||r(A?[A.id,...q]:q)},U=(z,L)=>{if(B.includes(z))return;const q=j.filter(Pe=>!B.includes(Pe)),G=q.indexOf(z);if(G===-1)return;const ne=L==="left"?G-1:G+1;if(ne<0||ne>=q.length)return;const X=[...q],[ge]=X.splice(G,1);X.splice(ne,0,ge),r==null||r(A?[A.id,...B,...X]:[...B,...X])},K=(z,L)=>{const G=y[z.id]??z.width??160,X=e_(G+(L==="increase"?16:-16),z.minWidth??96,z.maxWidth);b(ge=>({...ge,[z.id]:X}))},ee=(z,L)=>{var G,ne;const q=y[L.id]??L.width??160;E.current={columnId:L.id,startX:z.clientX,startWidth:q,minWidth:L.minWidth??96,maxWidth:L.maxWidth},w(L.id),N(z.pointerId),(ne=(G=z.currentTarget).setPointerCapture)==null||ne.call(G,z.pointerId),z.preventDefault()};_.useEffect(()=>{if(!k)return;const z=ge=>{if(!E.current)return;const{columnId:Pe,startX:ze,startWidth:ke,minWidth:Be,maxWidth:Se}=E.current,nt=ge-ze,qe=e_(ke+nt,Be,Se);b(Tt=>({...Tt,[Pe]:qe}))},L=ge=>{z(ge.clientX)},q=ge=>{z(ge.clientX)},G=()=>{E.current=null,w(null),N(null)},ne=ge=>{S!=null&&ge.pointerId!==S||G()},X=ge=>{S!=null&&ge.pointerId!==S||G()};return window.addEventListener("pointermove",L),window.addEventListener("pointerup",ne),window.addEventListener("pointercancel",X),window.addEventListener("mousemove",q),window.addEventListener("mouseup",G),()=>{window.removeEventListener("pointermove",L),window.removeEventListener("pointerup",ne),window.removeEventListener("pointercancel",X),window.removeEventListener("mousemove",q),window.removeEventListener("mouseup",G)}},[S,k]);const ie=(z,L)=>{if(L==="none"){s==null||s(null);return}s==null||s({columnId:z,direction:L})},ce=t.filter(z=>i.includes(z.id)).length,Z=t.length>0&&ce===t.length,J=ce>0&&ce<t.length;return h.jsxs("div",{className:g,"data-resizing":k?"":void 0,children:[h.jsxs("table",{className:"dsn-data-table-table",role:"table","aria-label":f,style:{width:"100%",minWidth:`${H}px`},children:[h.jsx("colgroup",{children:I.map((z,L)=>{const q=L===I.length-1,G=y[z.id]!=null,ne=y[z.id]??z.width,X={};return q&&!G?(X.width="1%",X.minWidth=`${z.minWidth??z.width??96}px`):z.widthMode==="fixed"&&typeof ne=="number"?(X.width=`${ne}px`,X.minWidth=`${ne}px`,X.maxWidth=`${ne}px`):z.widthMode==="hug"&&(X.width="1%"),h.jsx("col",{style:X},z.id)})}),h.jsx("thead",{children:h.jsx("tr",{children:I.map((z,L)=>{const q=L<B.length,G=(o==null?void 0:o.columnId)===z.id?o.direction:"none",ne=q?{left:`${F[z.id]??0}px`}:void 0;return h.jsx("th",{scope:"col",className:q?"dsn-data-table-sticky-column":void 0,"data-first-column":L===0||void 0,style:ne,"data-drag-over":m===z.id?"":void 0,onDragOver:X=>{p&&(B.includes(z.id)||z.id!==p&&(X.preventDefault(),x(z.id)))},onDragLeave:()=>{m===z.id&&x(null)},onDrop:X=>{X.preventDefault(),p&&(Y(p,z.id),v(null),x(null))},children:h.jsx(e0,{variant:"title",label:z.header,sortable:!!z.sortable,sortDirection:G,reorderable:!q&&z.reorderable!==!1,resizable:!0,checkboxChecked:Z,checkboxIndeterminate:J,onCheckboxChange:W,leadingAccessory:A&&L===0?h.jsx(hn,{size:"sm",checked:Z,indeterminate:J,showContent:!1,"aria-label":"Select all rows",onCheckedChange:W}):void 0,filterValue:l==null?void 0:l[z.id],onFilterChange:X=>c==null?void 0:c({...l,[z.id]:X}),onSortChange:X=>ie(z.id,X),onReorderCommand:X=>U(z.id,X),onResizeCommand:X=>K(z,X),onResizePointerDown:X=>ee(X,z),onReorderDragStart:X=>{if(X.stopPropagation(),B.includes(z.id)||z.reorderable===!1){X.preventDefault();return}X.dataTransfer.effectAllowed="move",X.dataTransfer.setData("text/plain",z.id),v(z.id)},onReorderDragEnd:()=>{v(null),x(null)}})},z.id)})})}),h.jsx("tbody",{children:t.map(z=>h.jsx("tr",{children:I.map((L,q)=>{const G=q<B.length,ne=G?{left:`${F[L.id]??0}px`}:void 0,X=z.cells[L.id],ge=i.includes(z.id);return h.jsx("td",{className:G?"dsn-data-table-sticky-column dsn-data-table-sticky-cell":void 0,"data-first-column":q===0||void 0,style:ne,children:h.jsx(r0,{fieldType:L.fieldType,value:X,leadingAccessory:A&&q===0?h.jsx(hn,{size:"sm",checked:ge,showContent:!1,"aria-label":ge?"Selected row":"Unselected row",onCheckedChange:Pe=>D(z.id,Pe)}):void 0,align:L.align,"aria-label":`${L.header} value`})},`${z.id}-${L.id}`)})},z.id))})]}),u&&h.jsx(s0,{page:u.currentPage,totalPages:u.totalPages,onPageChange:u.onPageChange})]})}function t_({showHeader:e=!0,title:t="Title",description:n,headerSize:r="large",headerLeadingControl:i,headerTrailingControl:a,header:o,children:s,showBottomBar:l=!0,bottomBarSize:c="lg",bottomBarLeftActions:u,bottomBarRightActions:d,bottomBar:f,className:g,"aria-label":p="Card"}){const v=["dsn-card",g].filter(Boolean).join(" "),m=o??h.jsx(ti,{title:t,description:n,size:r,leadingControl:i,trailingControl:a}),x=f??h.jsx(zi,{size:c,variant:"plain",leftActions:u,rightActions:d,"aria-label":"Card actions"}),y=!!(e&&m),b=!!l;return h.jsxs("section",{className:v,"aria-label":p,"data-has-header":y||void 0,"data-has-bottom-bar":b||void 0,children:[y?h.jsx("div",{className:"dsn-card-header",children:m}):null,h.jsx("div",{className:"dsn-card-content",children:s}),b?h.jsx("div",{className:"dsn-card-bottom-bar",children:x}):null]})}var Hh={exports:{}},Gc={exports:{}},We={};/** @license React v16.13.1
276
276
  * react-is.production.min.js
277
277
  *
278
278
  * Copyright (c) Facebook, Inc. and its affiliates.
279
279
  *
280
280
  * This source code is licensed under the MIT license found in the
281
281
  * LICENSE file in the root directory of this source tree.
282
- */var F1;function nA(){if(F1)return Ie;F1=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(w){if(typeof w=="object"&&w!==null){var S=w.$$typeof;switch(S){case t:switch(w=w.type,w){case l:case c:case r:case a:case i:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case p:case g:case o:return w;default:return S}}case n:return S}}}function k(w){return x(w)===c}return Ie.AsyncMode=l,Ie.ConcurrentMode=c,Ie.ContextConsumer=s,Ie.ContextProvider=o,Ie.Element=t,Ie.ForwardRef=u,Ie.Fragment=r,Ie.Lazy=p,Ie.Memo=g,Ie.Portal=n,Ie.Profiler=a,Ie.StrictMode=i,Ie.Suspense=d,Ie.isAsyncMode=function(w){return k(w)||x(w)===l},Ie.isConcurrentMode=k,Ie.isContextConsumer=function(w){return x(w)===s},Ie.isContextProvider=function(w){return x(w)===o},Ie.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ie.isForwardRef=function(w){return x(w)===u},Ie.isFragment=function(w){return x(w)===r},Ie.isLazy=function(w){return x(w)===p},Ie.isMemo=function(w){return x(w)===g},Ie.isPortal=function(w){return x(w)===n},Ie.isProfiler=function(w){return x(w)===a},Ie.isStrictMode=function(w){return x(w)===i},Ie.isSuspense=function(w){return x(w)===d},Ie.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===a||w===i||w===d||w===f||typeof w=="object"&&w!==null&&(w.$$typeof===p||w.$$typeof===g||w.$$typeof===o||w.$$typeof===s||w.$$typeof===u||w.$$typeof===m||w.$$typeof===b||w.$$typeof===y||w.$$typeof===v)},Ie.typeOf=x,Ie}var Fe={};/** @license React v16.13.1
282
+ */var n_;function vA(){if(n_)return We;n_=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(w){if(typeof w=="object"&&w!==null){var S=w.$$typeof;switch(S){case t:switch(w=w.type,w){case l:case c:case r:case a:case i:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case p:case g:case o:return w;default:return S}}case n:return S}}}function k(w){return b(w)===c}return We.AsyncMode=l,We.ConcurrentMode=c,We.ContextConsumer=s,We.ContextProvider=o,We.Element=t,We.ForwardRef=u,We.Fragment=r,We.Lazy=p,We.Memo=g,We.Portal=n,We.Profiler=a,We.StrictMode=i,We.Suspense=d,We.isAsyncMode=function(w){return k(w)||b(w)===l},We.isConcurrentMode=k,We.isContextConsumer=function(w){return b(w)===s},We.isContextProvider=function(w){return b(w)===o},We.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},We.isForwardRef=function(w){return b(w)===u},We.isFragment=function(w){return b(w)===r},We.isLazy=function(w){return b(w)===p},We.isMemo=function(w){return b(w)===g},We.isPortal=function(w){return b(w)===n},We.isProfiler=function(w){return b(w)===a},We.isStrictMode=function(w){return b(w)===i},We.isSuspense=function(w){return b(w)===d},We.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===a||w===i||w===d||w===f||typeof w=="object"&&w!==null&&(w.$$typeof===p||w.$$typeof===g||w.$$typeof===o||w.$$typeof===s||w.$$typeof===u||w.$$typeof===m||w.$$typeof===x||w.$$typeof===y||w.$$typeof===v)},We.typeOf=b,We}var Ue={};/** @license React v16.13.1
283
283
  * react-is.development.js
284
284
  *
285
285
  * Copyright (c) Facebook, Inc. and its affiliates.
286
286
  *
287
287
  * This source code is licensed under the MIT license found in the
288
288
  * LICENSE file in the root directory of this source tree.
289
- */var z1;function rA(){return z1||(z1=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(A){return typeof A=="string"||typeof A=="function"||A===r||A===c||A===a||A===i||A===d||A===f||typeof A=="object"&&A!==null&&(A.$$typeof===p||A.$$typeof===g||A.$$typeof===o||A.$$typeof===s||A.$$typeof===u||A.$$typeof===m||A.$$typeof===b||A.$$typeof===y||A.$$typeof===v)}function k(A){if(typeof A=="object"&&A!==null){var q=A.$$typeof;switch(q){case t:var Q=A.type;switch(Q){case l:case c:case r:case a:case i:case d:return Q;default:var de=Q&&Q.$$typeof;switch(de){case s:case u:case p:case g:case o:return de;default:return q}}case n:return q}}}var w=l,S=c,N=s,C=o,E=t,T=u,O=r,P=p,M=g,$=n,L=a,z=i,j=d,B=!1;function H(A){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(A)||k(A)===l}function F(A){return k(A)===c}function D(A){return k(A)===s}function U(A){return k(A)===o}function V(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function Y(A){return k(A)===u}function G(A){return k(A)===r}function R(A){return k(A)===p}function te(A){return k(A)===g}function le(A){return k(A)===n}function W(A){return k(A)===a}function Z(A){return k(A)===i}function I(A){return k(A)===d}Fe.AsyncMode=w,Fe.ConcurrentMode=S,Fe.ContextConsumer=N,Fe.ContextProvider=C,Fe.Element=E,Fe.ForwardRef=T,Fe.Fragment=O,Fe.Lazy=P,Fe.Memo=M,Fe.Portal=$,Fe.Profiler=L,Fe.StrictMode=z,Fe.Suspense=j,Fe.isAsyncMode=H,Fe.isConcurrentMode=F,Fe.isContextConsumer=D,Fe.isContextProvider=U,Fe.isElement=V,Fe.isForwardRef=Y,Fe.isFragment=G,Fe.isLazy=R,Fe.isMemo=te,Fe.isPortal=le,Fe.isProfiler=W,Fe.isStrictMode=Z,Fe.isSuspense=I,Fe.isValidElementType=x,Fe.typeOf=k}()),Fe}var B1;function j1(){return B1||(B1=1,process.env.NODE_ENV==="production"?Fc.exports=nA():Fc.exports=rA()),Fc.exports}/*
289
+ */var r_;function mA(){return r_||(r_=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(L){return typeof L=="string"||typeof L=="function"||L===r||L===c||L===a||L===i||L===d||L===f||typeof L=="object"&&L!==null&&(L.$$typeof===p||L.$$typeof===g||L.$$typeof===o||L.$$typeof===s||L.$$typeof===u||L.$$typeof===m||L.$$typeof===x||L.$$typeof===y||L.$$typeof===v)}function k(L){if(typeof L=="object"&&L!==null){var q=L.$$typeof;switch(q){case t:var G=L.type;switch(G){case l:case c:case r:case a:case i:case d:return G;default:var ne=G&&G.$$typeof;switch(ne){case s:case u:case p:case g:case o:return ne;default:return q}}case n:return q}}}var w=l,S=c,N=s,E=o,C=t,T=u,O=r,P=p,M=g,$=n,A=a,I=i,j=d,B=!1;function H(L){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(L)||k(L)===l}function F(L){return k(L)===c}function D(L){return k(L)===s}function W(L){return k(L)===o}function Y(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function U(L){return k(L)===u}function K(L){return k(L)===r}function ee(L){return k(L)===p}function ie(L){return k(L)===g}function ce(L){return k(L)===n}function Z(L){return k(L)===a}function J(L){return k(L)===i}function z(L){return k(L)===d}Ue.AsyncMode=w,Ue.ConcurrentMode=S,Ue.ContextConsumer=N,Ue.ContextProvider=E,Ue.Element=C,Ue.ForwardRef=T,Ue.Fragment=O,Ue.Lazy=P,Ue.Memo=M,Ue.Portal=$,Ue.Profiler=A,Ue.StrictMode=I,Ue.Suspense=j,Ue.isAsyncMode=H,Ue.isConcurrentMode=F,Ue.isContextConsumer=D,Ue.isContextProvider=W,Ue.isElement=Y,Ue.isForwardRef=U,Ue.isFragment=K,Ue.isLazy=ee,Ue.isMemo=ie,Ue.isPortal=ce,Ue.isProfiler=Z,Ue.isStrictMode=J,Ue.isSuspense=z,Ue.isValidElementType=b,Ue.typeOf=k}()),Ue}var i_;function a_(){return i_||(i_=1,process.env.NODE_ENV==="production"?Gc.exports=vA():Gc.exports=mA()),Gc.exports}/*
290
290
  object-assign
291
291
  (c) Sindre Sorhus
292
292
  @license MIT
293
- */var Dh,W1;function iA(){if(W1)return Dh;W1=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Dh=i()?Object.assign:function(a,o){for(var s,l=r(a),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var f=0;f<c.length;f++)n.call(s,c[f])&&(l[c[f]]=s[c[f]])}}return l},Dh}var Ih,U1;function Fh(){if(U1)return Ih;U1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ih=e,Ih}var zh,H1;function q1(){return H1||(H1=1,zh=Function.call.bind(Object.prototype.hasOwnProperty)),zh}var Bh,K1;function aA(){if(K1)return Bh;K1=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Fh(),n={},r=q1();e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in a)if(r(a,u)){var d;try{if(typeof a[u]!="function"){var f=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=a[u](o,u,l,s,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var g=c?c():"";e("Failed "+s+" type: "+d.message+(g??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Bh=i,Bh}var jh,V1;function oA(){if(V1)return jh;V1=1;var e=j1(),t=iA(),n=Fh(),r=q1(),i=aA(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return jh=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(F){var D=F&&(c&&F[c]||F[u]);if(typeof D=="function")return D}var f="<<anonymous>>",g={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:y(),arrayOf:x,element:k(),elementType:w(),instanceOf:S,node:T(),objectOf:C,oneOf:N,oneOfType:E,shape:P,exact:M};function p(F,D){return F===D?F!==0||1/F===1/D:F!==F&&D!==D}function v(F,D){this.message=F,this.data=D&&typeof D=="object"?D:{},this.stack=""}v.prototype=Error.prototype;function m(F){if(process.env.NODE_ENV!=="production")var D={},U=0;function V(G,R,te,le,W,Z,I){if(le=le||f,Z=Z||te,I!==n){if(l){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var q=le+":"+te;!D[q]&&U<3&&(a("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+le+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),D[q]=!0,U++)}}return R[te]==null?G?R[te]===null?new v("The "+W+" `"+Z+"` is marked as required "+("in `"+le+"`, but its value is `null`.")):new v("The "+W+" `"+Z+"` is marked as required in "+("`"+le+"`, but its value is `undefined`.")):null:F(R,te,le,W,Z)}var Y=V.bind(null,!1);return Y.isRequired=V.bind(null,!0),Y}function b(F){function D(U,V,Y,G,R,te){var le=U[V],W=z(le);if(W!==F){var Z=j(le);return new v("Invalid "+G+" `"+R+"` of type "+("`"+Z+"` supplied to `"+Y+"`, expected ")+("`"+F+"`."),{expectedType:F})}return null}return m(D)}function y(){return m(o)}function x(F){function D(U,V,Y,G,R){if(typeof F!="function")return new v("Property `"+R+"` of component `"+Y+"` has invalid PropType notation inside arrayOf.");var te=U[V];if(!Array.isArray(te)){var le=z(te);return new v("Invalid "+G+" `"+R+"` of type "+("`"+le+"` supplied to `"+Y+"`, expected an array."))}for(var W=0;W<te.length;W++){var Z=F(te,W,Y,G,R+"["+W+"]",n);if(Z instanceof Error)return Z}return null}return m(D)}function k(){function F(D,U,V,Y,G){var R=D[U];if(!s(R)){var te=z(R);return new v("Invalid "+Y+" `"+G+"` of type "+("`"+te+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return m(F)}function w(){function F(D,U,V,Y,G){var R=D[U];if(!e.isValidElementType(R)){var te=z(R);return new v("Invalid "+Y+" `"+G+"` of type "+("`"+te+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return m(F)}function S(F){function D(U,V,Y,G,R){if(!(U[V]instanceof F)){var te=F.name||f,le=H(U[V]);return new v("Invalid "+G+" `"+R+"` of type "+("`"+le+"` supplied to `"+Y+"`, expected ")+("instance of `"+te+"`."))}return null}return m(D)}function N(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function D(U,V,Y,G,R){for(var te=U[V],le=0;le<F.length;le++)if(p(te,F[le]))return null;var W=JSON.stringify(F,function(I,A){var q=j(A);return q==="symbol"?String(A):A});return new v("Invalid "+G+" `"+R+"` of value `"+String(te)+"` "+("supplied to `"+Y+"`, expected one of "+W+"."))}return m(D)}function C(F){function D(U,V,Y,G,R){if(typeof F!="function")return new v("Property `"+R+"` of component `"+Y+"` has invalid PropType notation inside objectOf.");var te=U[V],le=z(te);if(le!=="object")return new v("Invalid "+G+" `"+R+"` of type "+("`"+le+"` supplied to `"+Y+"`, expected an object."));for(var W in te)if(r(te,W)){var Z=F(te,W,Y,G,R+"."+W,n);if(Z instanceof Error)return Z}return null}return m(D)}function E(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var D=0;D<F.length;D++){var U=F[D];if(typeof U!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+B(U)+" at index "+D+"."),o}function V(Y,G,R,te,le){for(var W=[],Z=0;Z<F.length;Z++){var I=F[Z],A=I(Y,G,R,te,le,n);if(A==null)return null;A.data&&r(A.data,"expectedType")&&W.push(A.data.expectedType)}var q=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new v("Invalid "+te+" `"+le+"` supplied to "+("`"+R+"`"+q+"."))}return m(V)}function T(){function F(D,U,V,Y,G){return $(D[U])?null:new v("Invalid "+Y+" `"+G+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return m(F)}function O(F,D,U,V,Y){return new v((F||"React class")+": "+D+" type `"+U+"."+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Y+"`.")}function P(F){function D(U,V,Y,G,R){var te=U[V],le=z(te);if(le!=="object")return new v("Invalid "+G+" `"+R+"` of type `"+le+"` "+("supplied to `"+Y+"`, expected `object`."));for(var W in F){var Z=F[W];if(typeof Z!="function")return O(Y,G,R,W,j(Z));var I=Z(te,W,Y,G,R+"."+W,n);if(I)return I}return null}return m(D)}function M(F){function D(U,V,Y,G,R){var te=U[V],le=z(te);if(le!=="object")return new v("Invalid "+G+" `"+R+"` of type `"+le+"` "+("supplied to `"+Y+"`, expected `object`."));var W=t({},U[V],F);for(var Z in W){var I=F[Z];if(r(F,Z)&&typeof I!="function")return O(Y,G,R,Z,j(I));if(!I)return new v("Invalid "+G+" `"+R+"` key `"+Z+"` supplied to `"+Y+"`.\nBad object: "+JSON.stringify(U[V],null," ")+`
294
- Valid keys: `+JSON.stringify(Object.keys(F),null," "));var A=I(te,Z,Y,G,R+"."+Z,n);if(A)return A}return null}return m(D)}function $(F){switch(typeof F){case"number":case"string":case"undefined":return!0;case"boolean":return!F;case"object":if(Array.isArray(F))return F.every($);if(F===null||s(F))return!0;var D=d(F);if(D){var U=D.call(F),V;if(D!==F.entries){for(;!(V=U.next()).done;)if(!$(V.value))return!1}else for(;!(V=U.next()).done;){var Y=V.value;if(Y&&!$(Y[1]))return!1}}else return!1;return!0;default:return!1}}function L(F,D){return F==="symbol"?!0:D?D["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&D instanceof Symbol:!1}function z(F){var D=typeof F;return Array.isArray(F)?"array":F instanceof RegExp?"object":L(D,F)?"symbol":D}function j(F){if(typeof F>"u"||F===null)return""+F;var D=z(F);if(D==="object"){if(F instanceof Date)return"date";if(F instanceof RegExp)return"regexp"}return D}function B(F){var D=j(F);switch(D){case"array":case"object":return"an "+D;case"boolean":case"date":case"regexp":return"a "+D;default:return D}}function H(F){return!F.constructor||!F.constructor.name?f:F.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},jh}var Wh,Y1;function sA(){if(Y1)return Wh;Y1=1;var e=Fh();function t(){}function n(){}return n.resetWarningCache=t,Wh=function(){function r(o,s,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},Wh}if(process.env.NODE_ENV!=="production"){var lA=j1(),cA=!0;Lh.exports=oA()(lA.isElement,cA)}else Lh.exports=sA()();var li=Lh.exports;const K=ps(li);var G1={exports:{}};/*!
293
+ */var qh,o_;function yA(){if(o_)return qh;o_=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return qh=i()?Object.assign:function(a,o){for(var s,l=r(a),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var f=0;f<c.length;f++)n.call(s,c[f])&&(l[c[f]]=s[c[f]])}}return l},qh}var Vh,s_;function Kh(){if(s_)return Vh;s_=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Vh=e,Vh}var Yh,l_;function c_(){return l_||(l_=1,Yh=Function.call.bind(Object.prototype.hasOwnProperty)),Yh}var Gh,u_;function bA(){if(u_)return Gh;u_=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Kh(),n={},r=c_();e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in a)if(r(a,u)){var d;try{if(typeof a[u]!="function"){var f=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=a[u](o,u,l,s,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var g=c?c():"";e("Failed "+s+" type: "+d.message+(g??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Gh=i,Gh}var Xh,d_;function xA(){if(d_)return Xh;d_=1;var e=a_(),t=yA(),n=Kh(),r=c_(),i=bA(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return Xh=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(F){var D=F&&(c&&F[c]||F[u]);if(typeof D=="function")return D}var f="<<anonymous>>",g={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:y(),arrayOf:b,element:k(),elementType:w(),instanceOf:S,node:T(),objectOf:E,oneOf:N,oneOfType:C,shape:P,exact:M};function p(F,D){return F===D?F!==0||1/F===1/D:F!==F&&D!==D}function v(F,D){this.message=F,this.data=D&&typeof D=="object"?D:{},this.stack=""}v.prototype=Error.prototype;function m(F){if(process.env.NODE_ENV!=="production")var D={},W=0;function Y(K,ee,ie,ce,Z,J,z){if(ce=ce||f,J=J||ie,z!==n){if(l){var L=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw L.name="Invariant Violation",L}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var q=ce+":"+ie;!D[q]&&W<3&&(a("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+ce+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),D[q]=!0,W++)}}return ee[ie]==null?K?ee[ie]===null?new v("The "+Z+" `"+J+"` is marked as required "+("in `"+ce+"`, but its value is `null`.")):new v("The "+Z+" `"+J+"` is marked as required in "+("`"+ce+"`, but its value is `undefined`.")):null:F(ee,ie,ce,Z,J)}var U=Y.bind(null,!1);return U.isRequired=Y.bind(null,!0),U}function x(F){function D(W,Y,U,K,ee,ie){var ce=W[Y],Z=I(ce);if(Z!==F){var J=j(ce);return new v("Invalid "+K+" `"+ee+"` of type "+("`"+J+"` supplied to `"+U+"`, expected ")+("`"+F+"`."),{expectedType:F})}return null}return m(D)}function y(){return m(o)}function b(F){function D(W,Y,U,K,ee){if(typeof F!="function")return new v("Property `"+ee+"` of component `"+U+"` has invalid PropType notation inside arrayOf.");var ie=W[Y];if(!Array.isArray(ie)){var ce=I(ie);return new v("Invalid "+K+" `"+ee+"` of type "+("`"+ce+"` supplied to `"+U+"`, expected an array."))}for(var Z=0;Z<ie.length;Z++){var J=F(ie,Z,U,K,ee+"["+Z+"]",n);if(J instanceof Error)return J}return null}return m(D)}function k(){function F(D,W,Y,U,K){var ee=D[W];if(!s(ee)){var ie=I(ee);return new v("Invalid "+U+" `"+K+"` of type "+("`"+ie+"` supplied to `"+Y+"`, expected a single ReactElement."))}return null}return m(F)}function w(){function F(D,W,Y,U,K){var ee=D[W];if(!e.isValidElementType(ee)){var ie=I(ee);return new v("Invalid "+U+" `"+K+"` of type "+("`"+ie+"` supplied to `"+Y+"`, expected a single ReactElement type."))}return null}return m(F)}function S(F){function D(W,Y,U,K,ee){if(!(W[Y]instanceof F)){var ie=F.name||f,ce=H(W[Y]);return new v("Invalid "+K+" `"+ee+"` of type "+("`"+ce+"` supplied to `"+U+"`, expected ")+("instance of `"+ie+"`."))}return null}return m(D)}function N(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function D(W,Y,U,K,ee){for(var ie=W[Y],ce=0;ce<F.length;ce++)if(p(ie,F[ce]))return null;var Z=JSON.stringify(F,function(z,L){var q=j(L);return q==="symbol"?String(L):L});return new v("Invalid "+K+" `"+ee+"` of value `"+String(ie)+"` "+("supplied to `"+U+"`, expected one of "+Z+"."))}return m(D)}function E(F){function D(W,Y,U,K,ee){if(typeof F!="function")return new v("Property `"+ee+"` of component `"+U+"` has invalid PropType notation inside objectOf.");var ie=W[Y],ce=I(ie);if(ce!=="object")return new v("Invalid "+K+" `"+ee+"` of type "+("`"+ce+"` supplied to `"+U+"`, expected an object."));for(var Z in ie)if(r(ie,Z)){var J=F(ie,Z,U,K,ee+"."+Z,n);if(J instanceof Error)return J}return null}return m(D)}function C(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var D=0;D<F.length;D++){var W=F[D];if(typeof W!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+B(W)+" at index "+D+"."),o}function Y(U,K,ee,ie,ce){for(var Z=[],J=0;J<F.length;J++){var z=F[J],L=z(U,K,ee,ie,ce,n);if(L==null)return null;L.data&&r(L.data,"expectedType")&&Z.push(L.data.expectedType)}var q=Z.length>0?", expected one of type ["+Z.join(", ")+"]":"";return new v("Invalid "+ie+" `"+ce+"` supplied to "+("`"+ee+"`"+q+"."))}return m(Y)}function T(){function F(D,W,Y,U,K){return $(D[W])?null:new v("Invalid "+U+" `"+K+"` supplied to "+("`"+Y+"`, expected a ReactNode."))}return m(F)}function O(F,D,W,Y,U){return new v((F||"React class")+": "+D+" type `"+W+"."+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+U+"`.")}function P(F){function D(W,Y,U,K,ee){var ie=W[Y],ce=I(ie);if(ce!=="object")return new v("Invalid "+K+" `"+ee+"` of type `"+ce+"` "+("supplied to `"+U+"`, expected `object`."));for(var Z in F){var J=F[Z];if(typeof J!="function")return O(U,K,ee,Z,j(J));var z=J(ie,Z,U,K,ee+"."+Z,n);if(z)return z}return null}return m(D)}function M(F){function D(W,Y,U,K,ee){var ie=W[Y],ce=I(ie);if(ce!=="object")return new v("Invalid "+K+" `"+ee+"` of type `"+ce+"` "+("supplied to `"+U+"`, expected `object`."));var Z=t({},W[Y],F);for(var J in Z){var z=F[J];if(r(F,J)&&typeof z!="function")return O(U,K,ee,J,j(z));if(!z)return new v("Invalid "+K+" `"+ee+"` key `"+J+"` supplied to `"+U+"`.\nBad object: "+JSON.stringify(W[Y],null," ")+`
294
+ Valid keys: `+JSON.stringify(Object.keys(F),null," "));var L=z(ie,J,U,K,ee+"."+J,n);if(L)return L}return null}return m(D)}function $(F){switch(typeof F){case"number":case"string":case"undefined":return!0;case"boolean":return!F;case"object":if(Array.isArray(F))return F.every($);if(F===null||s(F))return!0;var D=d(F);if(D){var W=D.call(F),Y;if(D!==F.entries){for(;!(Y=W.next()).done;)if(!$(Y.value))return!1}else for(;!(Y=W.next()).done;){var U=Y.value;if(U&&!$(U[1]))return!1}}else return!1;return!0;default:return!1}}function A(F,D){return F==="symbol"?!0:D?D["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&D instanceof Symbol:!1}function I(F){var D=typeof F;return Array.isArray(F)?"array":F instanceof RegExp?"object":A(D,F)?"symbol":D}function j(F){if(typeof F>"u"||F===null)return""+F;var D=I(F);if(D==="object"){if(F instanceof Date)return"date";if(F instanceof RegExp)return"regexp"}return D}function B(F){var D=j(F);switch(D){case"array":case"object":return"an "+D;case"boolean":case"date":case"regexp":return"a "+D;default:return D}}function H(F){return!F.constructor||!F.constructor.name?f:F.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},Xh}var Zh,f_;function _A(){if(f_)return Zh;f_=1;var e=Kh();function t(){}function n(){}return n.resetWarningCache=t,Zh=function(){function r(o,s,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},Zh}if(process.env.NODE_ENV!=="production"){var wA=a_(),kA=!0;Hh.exports=xA()(wA.isElement,kA)}else Hh.exports=_A()();var di=Hh.exports;const V=_s(di);var h_={exports:{}};/*!
295
295
  Copyright (c) 2018 Jed Watson.
296
296
  Licensed under the MIT License (MIT), see
297
297
  http://jedwatson.github.io/classnames
298
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",o=0;o<arguments.length;o++){var s=arguments[o];s&&(a=i(a,r(s)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var o="";for(var s in a)t.call(a,s)&&a[s]&&(o=i(o,s));return o}function i(a,o){return o?a?a+" "+o:a+o:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(G1);var Fr=G1.exports;const Te=ps(Fr);var uA=["top","left","transform","className","children","innerRef"];function Uh(){return Uh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uh.apply(this,arguments)}function dA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Je(e){var t=e.top,n=t===void 0?0:t,r=e.left,i=r===void 0?0:r,a=e.transform,o=e.className,s=e.children,l=e.innerRef,c=dA(e,uA);return _.createElement("g",Uh({ref:l,className:Te("visx-group",o),transform:a||"translate("+i+", "+n+")"},c),s)}Je.propTypes={top:K.number,left:K.number,transform:K.string,className:K.string,children:K.node,innerRef:K.oneOfType([K.string,K.func,K.object])};const fA=Object.freeze(Object.defineProperty({__proto__:null,Group:Je},Symbol.toStringTag,{value:"Module"}));function ci(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function hA(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function zc(e){let t,n,r;e.length!==2?(t=ci,n=(s,l)=>ci(e(s),l),r=(s,l)=>e(s)-l):(t=e===ci||e===hA?e:pA,n=e,r=e);function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<0?c=d+1:u=d}while(c<u)}return c}function a(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function o(s,l,c=0,u=s.length){const d=i(s,l,c,u-1);return d>c&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:o,right:a}}function pA(){return 0}function X1(e){return e===null?NaN:+e}function*gA(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Z1=zc(ci),bs=Z1.right,vA=Z1.left;zc(X1).center;function J1(e,t){let n,r;for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));return[n,r]}class Q1 extends Map{constructor(t,n=bA){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(R1(this,t))}has(t){return super.has(R1(this,t))}set(t,n){return super.set(mA(this,t),n)}delete(t){return super.delete(yA(this,t))}}function R1({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function mA({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function yA({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function bA(e){return e!==null&&typeof e=="object"?e.valueOf():e}function xA(e=ci){if(e===ci)return e_;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function e_(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var Hh=Math.sqrt(50),qh=Math.sqrt(10),Kh=Math.sqrt(2);function Vh(e,t,n){var r,i=-1,a,o,s;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t<e)&&(a=e,e=t,t=a),(s=t_(e,t,n))===0||!isFinite(s))return[];if(s>0){let l=Math.round(e/s),c=Math.round(t/s);for(l*s<e&&++l,c*s>t&&--c,o=new Array(a=c-l+1);++i<a;)o[i]=(l+i)*s}else{s=-s;let l=Math.round(e*s),c=Math.round(t*s);for(l/s<e&&++l,c/s>t&&--c,o=new Array(a=c-l+1);++i<a;)o[i]=(l+i)/s}return r&&o.reverse(),o}function t_(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=Hh?10:a>=qh?5:a>=Kh?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=Hh?10:a>=qh?5:a>=Kh?2:1)}function Yh(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=Hh?i*=10:a>=qh?i*=5:a>=Kh&&(i*=2),t<e?-i:i}function n_(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function r_(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function i_(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?e_:xA(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),g=Math.max(n,Math.floor(t-c*d/l+f)),p=Math.min(r,Math.floor(t+(l-c)*d/l+f));i_(e,t,g,p,i)}const a=e[t];let o=n,s=r;for(xs(e,n,t),i(e[r],a)>0&&xs(e,n,r);o<s;){for(xs(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?xs(e,n,s):(++s,xs(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function xs(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function _A(e,t,n){if(e=Float64Array.from(gA(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return r_(e);if(t>=1)return n_(e);var r,i=(r-1)*t,a=Math.floor(i),o=n_(i_(e,a).subarray(0,a+1)),s=r_(e.subarray(a+1));return o+(s-o)*(i-a)}}function wA(e,t,n=X1){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function a_(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function bn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function zr(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Gh=Symbol("implicit");function Bc(){var e=new Q1,t=[],n=[],r=Gh;function i(a){let o=e.get(a);if(o===void 0){if(r!==Gh)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Q1;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Bc(t,n).unknown(r)},bn.apply(i,arguments),i}function jc(){var e=Bc().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var f=t().length,g=i<r,p=g?i:r,v=g?r:i;a=(v-p)/Math.max(1,f-l+c*2),s&&(a=Math.floor(a)),p+=(v-p-a*(f-l))*u,o=a*(1-l),s&&(p=Math.round(p),o=Math.round(o));var m=a_(f).map(function(b){return p+a*b});return n(g?m.reverse():m)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,d()):c},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return jc(t(),[r,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},bn.apply(d(),arguments)}function o_(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return o_(t())},e}function s_(){return o_(jc.apply(null,arguments).paddingInner(1))}function io(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _s(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ui(){}var ea=.7,ao=1/ea,oo="\\s*([+-]?\\d+)\\s*",ws="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",dr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kA=/^#([0-9a-f]{3,8})$/,SA=new RegExp(`^rgb\\(${oo},${oo},${oo}\\)$`),NA=new RegExp(`^rgb\\(${dr},${dr},${dr}\\)$`),CA=new RegExp(`^rgba\\(${oo},${oo},${oo},${ws}\\)$`),EA=new RegExp(`^rgba\\(${dr},${dr},${dr},${ws}\\)$`),TA=new RegExp(`^hsl\\(${ws},${dr},${dr}\\)$`),MA=new RegExp(`^hsla\\(${ws},${dr},${dr},${ws}\\)$`),l_={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};io(ui,ks,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:c_,formatHex:c_,formatHex8:$A,formatHsl:OA,formatRgb:u_,toString:u_});function c_(){return this.rgb().formatHex()}function $A(){return this.rgb().formatHex8()}function OA(){return g_(this).formatHsl()}function u_(){return this.rgb().formatRgb()}function ks(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=kA.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?d_(t):n===3?new pt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Wc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Wc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=SA.exec(e))?new pt(t[1],t[2],t[3],1):(t=NA.exec(e))?new pt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=CA.exec(e))?Wc(t[1],t[2],t[3],t[4]):(t=EA.exec(e))?Wc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=TA.exec(e))?p_(t[1],t[2]/100,t[3]/100,1):(t=MA.exec(e))?p_(t[1],t[2]/100,t[3]/100,t[4]):l_.hasOwnProperty(e)?d_(l_[e]):e==="transparent"?new pt(NaN,NaN,NaN,0):null}function d_(e){return new pt(e>>16&255,e>>8&255,e&255,1)}function Wc(e,t,n,r){return r<=0&&(e=t=n=NaN),new pt(e,t,n,r)}function Xh(e){return e instanceof ui||(e=ks(e)),e?(e=e.rgb(),new pt(e.r,e.g,e.b,e.opacity)):new pt}function Uc(e,t,n,r){return arguments.length===1?Xh(e):new pt(e,t,n,r??1)}function pt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}io(pt,Uc,_s(ui,{brighter(e){return e=e==null?ao:Math.pow(ao,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ea:Math.pow(ea,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new pt(ta(this.r),ta(this.g),ta(this.b),Hc(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:f_,formatHex:f_,formatHex8:PA,formatRgb:h_,toString:h_}));function f_(){return`#${na(this.r)}${na(this.g)}${na(this.b)}`}function PA(){return`#${na(this.r)}${na(this.g)}${na(this.b)}${na((isNaN(this.opacity)?1:this.opacity)*255)}`}function h_(){const e=Hc(this.opacity);return`${e===1?"rgb(":"rgba("}${ta(this.r)}, ${ta(this.g)}, ${ta(this.b)}${e===1?")":`, ${e})`}`}function Hc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ta(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function na(e){return e=ta(e),(e<16?"0":"")+e.toString(16)}function p_(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new jn(e,t,n,r)}function g_(e){if(e instanceof jn)return new jn(e.h,e.s,e.l,e.opacity);if(e instanceof ui||(e=ks(e)),!e)return new jn;if(e instanceof jn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new jn(o,s,l,e.opacity)}function Zh(e,t,n,r){return arguments.length===1?g_(e):new jn(e,t,n,r??1)}function jn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}io(jn,Zh,_s(ui,{brighter(e){return e=e==null?ao:Math.pow(ao,e),new jn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ea:Math.pow(ea,e),new jn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new pt(Jh(e>=240?e-240:e+120,i,r),Jh(e,i,r),Jh(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new jn(v_(this.h),qc(this.s),qc(this.l),Hc(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(){const e=Hc(this.opacity);return`${e===1?"hsl(":"hsla("}${v_(this.h)}, ${qc(this.s)*100}%, ${qc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function v_(e){return e=(e||0)%360,e<0?e+360:e}function qc(e){return Math.max(0,Math.min(1,e||0))}function Jh(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const m_=Math.PI/180,y_=180/Math.PI,Kc=18,b_=.96422,x_=1,__=.82521,w_=4/29,so=6/29,k_=3*so*so,AA=so*so*so;function S_(e){if(e instanceof fr)return new fr(e.l,e.a,e.b,e.opacity);if(e instanceof Br)return N_(e);e instanceof pt||(e=Xh(e));var t=np(e.r),n=np(e.g),r=np(e.b),i=Rh((.2225045*t+.7168786*n+.0606169*r)/x_),a,o;return t===n&&n===r?a=o=i:(a=Rh((.4360747*t+.3850649*n+.1430804*r)/b_),o=Rh((.0139322*t+.0971045*n+.7141733*r)/__)),new fr(116*i-16,500*(a-i),200*(i-o),e.opacity)}function Qh(e,t,n,r){return arguments.length===1?S_(e):new fr(e,t,n,r??1)}function fr(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}io(fr,Qh,_s(ui,{brighter(e){return new fr(this.l+Kc*(e??1),this.a,this.b,this.opacity)},darker(e){return new fr(this.l-Kc*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=b_*ep(t),e=x_*ep(e),n=__*ep(n),new pt(tp(3.1338561*t-1.6168667*e-.4906146*n),tp(-.9787684*t+1.9161415*e+.033454*n),tp(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function Rh(e){return e>AA?Math.pow(e,1/3):e/k_+w_}function ep(e){return e>so?e*e*e:k_*(e-w_)}function tp(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function np(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function LA(e){if(e instanceof Br)return new Br(e.h,e.c,e.l,e.opacity);if(e instanceof fr||(e=S_(e)),e.a===0&&e.b===0)return new Br(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*y_;return new Br(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function rp(e,t,n,r){return arguments.length===1?LA(e):new Br(e,t,n,r??1)}function Br(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function N_(e){if(isNaN(e.h))return new fr(e.l,0,0,e.opacity);var t=e.h*m_;return new fr(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}io(Br,rp,_s(ui,{brighter(e){return new Br(this.h,this.c,this.l+Kc*(e??1),this.opacity)},darker(e){return new Br(this.h,this.c,this.l-Kc*(e??1),this.opacity)},rgb(){return N_(this).rgb()}}));var C_=-.14861,ip=1.78277,ap=-.29227,Vc=-.90649,Ss=1.97294,E_=Ss*Vc,T_=Ss*ip,M_=ip*ap-Vc*C_;function DA(e){if(e instanceof ra)return new ra(e.h,e.s,e.l,e.opacity);e instanceof pt||(e=Xh(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(M_*r+E_*t-T_*n)/(M_+E_-T_),a=r-i,o=(Ss*(n-i)-ap*a)/Vc,s=Math.sqrt(o*o+a*a)/(Ss*i*(1-i)),l=s?Math.atan2(o,a)*y_-120:NaN;return new ra(l<0?l+360:l,s,i,e.opacity)}function op(e,t,n,r){return arguments.length===1?DA(e):new ra(e,t,n,r??1)}function ra(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}io(ra,op,_s(ui,{brighter(e){return e=e==null?ao:Math.pow(ao,e),new ra(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ea:Math.pow(ea,e),new ra(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*m_,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new pt(255*(t+n*(C_*r+ip*i)),255*(t+n*(ap*r+Vc*i)),255*(t+n*(Ss*r)),this.opacity)}}));function $_(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function O_(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return $_((n-r/t)*t,o,i,a,s)}}function P_(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],a=e[r%t],o=e[(r+1)%t],s=e[(r+2)%t];return $_((n-r/t)*t,i,a,o,s)}}const Yc=e=>()=>e;function A_(e,t){return function(n){return e+n*t}}function IA(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Gc(e,t){var n=t-e;return n?A_(e,n>180||n<-180?n-360*Math.round(n/360):n):Yc(isNaN(e)?t:e)}function FA(e){return(e=+e)==1?gt:function(t,n){return n-t?IA(t,n,e):Yc(isNaN(t)?n:t)}}function gt(e,t){var n=t-e;return n?A_(e,n):Yc(isNaN(e)?t:e)}const Xc=function e(t){var n=FA(t);function r(i,a){var o=n((i=Uc(i)).r,(a=Uc(a)).r),s=n(i.g,a.g),l=n(i.b,a.b),c=gt(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r}(1);function L_(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o,s;for(o=0;o<n;++o)s=Uc(t[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=e(r),i=e(i),a=e(a),s.opacity=1,function(l){return s.r=r(l),s.g=i(l),s.b=a(l),s+""}}}var zA=L_(O_),BA=L_(P_);function sp(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function D_(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function jA(e,t){return(D_(t)?sp:I_)(e,t)}function I_(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=ia(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(s){for(o=0;o<r;++o)a[o]=i[o](s);return a}}function F_(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Wn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function z_(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ia(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var lp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,cp=new RegExp(lp.source,"g");function WA(e){return function(){return e}}function UA(e){return function(t){return e(t)+""}}function B_(e,t){var n=lp.lastIndex=cp.lastIndex=0,r,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(r=lp.exec(e))&&(i=cp.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Wn(r,i)})),n=cp.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?UA(l[0].x):WA(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function ia(e,t){var n=typeof t,r;return t==null||n==="boolean"?Yc(t):(n==="number"?Wn:n==="string"?(r=ks(t))?(t=r,Xc):B_:t instanceof ks?Xc:t instanceof Date?F_:D_(t)?sp:Array.isArray(t)?I_:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?z_:Wn)(e,t)}function HA(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function qA(e,t){var n=Gc(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ns(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var j_=180/Math.PI,up={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function W_(e,t,n,r,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*j_,skewX:Math.atan(l)*j_,scaleX:o,scaleY:s}}var Zc;function KA(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?up:W_(t.a,t.b,t.c,t.d,t.e,t.f)}function VA(e){return e==null||(Zc||(Zc=document.createElementNS("http://www.w3.org/2000/svg","g")),Zc.setAttribute("transform",e),!(e=Zc.transform.baseVal.consolidate()))?up:(e=e.matrix,W_(e.a,e.b,e.c,e.d,e.e,e.f))}function U_(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function a(c,u,d,f,g,p){if(c!==d||u!==f){var v=g.push("translate(",null,t,null,n);p.push({i:v-4,x:Wn(c,d)},{i:v-2,x:Wn(u,f)})}else(d||f)&&g.push("translate("+d+t+f+n)}function o(c,u,d,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:d.push(i(d)+"rotate(",null,r)-2,x:Wn(c,u)})):u&&d.push(i(d)+"rotate("+u+r)}function s(c,u,d,f){c!==u?f.push({i:d.push(i(d)+"skewX(",null,r)-2,x:Wn(c,u)}):u&&d.push(i(d)+"skewX("+u+r)}function l(c,u,d,f,g,p){if(c!==d||u!==f){var v=g.push(i(g)+"scale(",null,",",null,")");p.push({i:v-4,x:Wn(c,d)},{i:v-2,x:Wn(u,f)})}else(d!==1||f!==1)&&g.push(i(g)+"scale("+d+","+f+")")}return function(c,u){var d=[],f=[];return c=e(c),u=e(u),a(c.translateX,c.translateY,u.translateX,u.translateY,d,f),o(c.rotate,u.rotate,d,f),s(c.skewX,u.skewX,d,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,f),c=u=null,function(g){for(var p=-1,v=f.length,m;++p<v;)d[(m=f[p]).i]=m.x(g);return d.join("")}}}var YA=U_(KA,"px, ","px)","deg)"),GA=U_(VA,", ",")",")"),XA=1e-12;function H_(e){return((e=Math.exp(e))+1/e)/2}function ZA(e){return((e=Math.exp(e))-1/e)/2}function JA(e){return((e=Math.exp(2*e))-1)/(e+1)}const QA=function e(t,n,r){function i(a,o){var s=a[0],l=a[1],c=a[2],u=o[0],d=o[1],f=o[2],g=u-s,p=d-l,v=g*g+p*p,m,b;if(v<XA)b=Math.log(f/c)/t,m=function(N){return[s+N*g,l+N*p,c*Math.exp(t*N*b)]};else{var y=Math.sqrt(v),x=(f*f-c*c+r*v)/(2*c*n*y),k=(f*f-c*c-r*v)/(2*f*n*y),w=Math.log(Math.sqrt(x*x+1)-x),S=Math.log(Math.sqrt(k*k+1)-k);b=(S-w)/t,m=function(N){var C=N*b,E=H_(w),T=c/(n*y)*(E*JA(t*C+w)-ZA(w));return[s+T*g,l+T*p,c*E/H_(t*C+w)]}}return m.duration=b*1e3*t/Math.SQRT2,m}return i.rho=function(a){var o=Math.max(.001,+a),s=o*o,l=s*s;return e(o,s,l)},i}(Math.SQRT2,2,4);function q_(e){return function(t,n){var r=e((t=Zh(t)).h,(n=Zh(n)).h),i=gt(t.s,n.s),a=gt(t.l,n.l),o=gt(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=i(s),t.l=a(s),t.opacity=o(s),t+""}}}const K_=q_(Gc);var V_=q_(gt);function Y_(e,t){var n=gt((e=Qh(e)).l,(t=Qh(t)).l),r=gt(e.a,t.a),i=gt(e.b,t.b),a=gt(e.opacity,t.opacity);return function(o){return e.l=n(o),e.a=r(o),e.b=i(o),e.opacity=a(o),e+""}}function G_(e){return function(t,n){var r=e((t=rp(t)).h,(n=rp(n)).h),i=gt(t.c,n.c),a=gt(t.l,n.l),o=gt(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=i(s),t.l=a(s),t.opacity=o(s),t+""}}}const X_=G_(Gc);var Z_=G_(gt);function J_(e){return function t(n){n=+n;function r(i,a){var o=e((i=op(i)).h,(a=op(a)).h),s=gt(i.s,a.s),l=gt(i.l,a.l),c=gt(i.opacity,a.opacity);return function(u){return i.h=o(u),i.s=s(u),i.l=l(Math.pow(u,n)),i.opacity=c(u),i+""}}return r.gamma=t,r}(1)}const Q_=J_(Gc);var R_=J_(gt);function ew(e,t){t===void 0&&(t=e,e=ia);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(o){var s=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[s](o-s)}}function RA(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}function eL(e){return function(){return e}}function Jc(e){return+e}var tw=[0,1];function Ft(e){return e}function dp(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:eL(isNaN(t)?NaN:.5)}function tL(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function nL(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=dp(i,r),a=n(o,a)):(r=dp(r,i),a=n(a,o)),function(s){return a(r(s))}}function rL(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=dp(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(s){var l=bs(e,s,1,r)-1;return a[l](i[l](s))}}function Cs(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Qc(){var e=tw,t=tw,n=ia,r,i,a,o=Ft,s,l,c;function u(){var f=Math.min(e.length,t.length);return o!==Ft&&(o=tL(e[0],e[f-1])),s=f>2?rL:nL,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?a:(l||(l=s(e.map(r),t,n)))(r(o(f)))}return d.invert=function(f){return o(i((c||(c=s(t,e.map(r),Wn)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,Jc),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=Ns,u()},d.clamp=function(f){return arguments.length?(o=f?!0:Ft,u()):o!==Ft},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(a=f,d):a},function(f,g){return r=f,i=g,u()}}function fp(){return Qc()(Ft,Ft)}function iL(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Rc(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function lo(e){return e=Rc(Math.abs(e)),e?e[1]:NaN}function aL(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function oL(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var sL=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Es(e){if(!(t=sL.exec(e)))throw new Error("invalid format: "+e);var t;return new hp({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Es.prototype=hp.prototype;function hp(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}hp.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 lL(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var nw;function cL(e,t){var n=Rc(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(nw=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Rc(e,Math.max(0,t+a-1))[0]}function rw(e,t){var n=Rc(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const iw={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:iL,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>rw(e*100,t),r:rw,s:cL,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function aw(e){return e}var ow=Array.prototype.map,sw=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function uL(e){var t=e.grouping===void 0||e.thousands===void 0?aw:aL(ow.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?aw:oL(ow.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=Es(d);var f=d.fill,g=d.align,p=d.sign,v=d.symbol,m=d.zero,b=d.width,y=d.comma,x=d.precision,k=d.trim,w=d.type;w==="n"?(y=!0,w="g"):iw[w]||(x===void 0&&(x=12),k=!0,w="g"),(m||f==="0"&&g==="=")&&(m=!0,f="0",g="=");var S=v==="$"?n:v==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",N=v==="$"?r:/[%p]/.test(w)?o:"",C=iw[w],E=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function T(O){var P=S,M=N,$,L,z;if(w==="c")M=C(O)+M,O="";else{O=+O;var j=O<0||1/O<0;if(O=isNaN(O)?l:C(Math.abs(O),x),k&&(O=lL(O)),j&&+O==0&&p!=="+"&&(j=!1),P=(j?p==="("?p:s:p==="-"||p==="("?"":p)+P,M=(w==="s"?sw[8+nw/3]:"")+M+(j&&p==="("?")":""),E){for($=-1,L=O.length;++$<L;)if(z=O.charCodeAt($),48>z||z>57){M=(z===46?i+O.slice($+1):O.slice($))+M,O=O.slice(0,$);break}}}y&&!m&&(O=t(O,1/0));var B=P.length+O.length+M.length,H=B<b?new Array(b-B+1).join(f):"";switch(y&&m&&(O=t(H+O,H.length?b-M.length:1/0),H=""),g){case"<":O=P+O+M+H;break;case"=":O=P+H+O+M;break;case"^":O=H.slice(0,B=H.length>>1)+P+O+M+H.slice(B);break;default:O=H+P+O+M;break}return a(O)}return T.toString=function(){return d+""},T}function u(d,f){var g=c((d=Es(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(lo(f)/3)))*3,v=Math.pow(10,-p),m=sw[8+p/3];return function(b){return g(v*b)+m}}return{format:c,formatPrefix:u}}var eu,pp,lw;dL({thousands:",",grouping:[3],currency:["$",""]});function dL(e){return eu=uL(e),pp=eu.format,lw=eu.formatPrefix,eu}function fL(e){return Math.max(0,-lo(Math.abs(e)))}function hL(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(lo(t)/3)))*3-lo(Math.abs(e)))}function pL(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,lo(t)-lo(e))+1}function cw(e,t,n,r){var i=Yh(e,t,n),a;switch(r=Es(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=hL(i,o))&&(r.precision=a),lw(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=pL(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=fL(i))&&(r.precision=a-(r.type==="%")*2);break}}return pp(r)}function di(e){var t=e.domain;return e.ticks=function(n){var r=t();return Vh(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return cw(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],l,c,u=10;for(s<o&&(c=o,o=s,s=c,c=i,i=a,a=c);u-- >0;){if(c=t_(o,s,n),c===l)return r[i]=o,r[a]=s,t(r);if(c>0)o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c;else if(c<0)o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function gp(){var e=fp();return e.copy=function(){return Cs(e,gp())},bn.apply(e,arguments),di(e)}function uw(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Jc),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return uw(e).unknown(t)},e=arguments.length?Array.from(e,Jc):[0,1],di(n)}function dw(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function fw(e){return Math.log(e)}function hw(e){return Math.exp(e)}function gL(e){return-Math.log(-e)}function vL(e){return-Math.exp(-e)}function mL(e){return isFinite(e)?+("1e"+e):e<0?0:e}function yL(e){return e===10?mL:e===Math.E?Math.exp:t=>Math.pow(e,t)}function bL(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function pw(e){return(t,n)=>-e(-t,n)}function vp(e){const t=e(fw,hw),n=t.domain;let r=10,i,a;function o(){return i=bL(r),a=yL(r),n()[0]<0?(i=pw(i),a=pw(a),e(gL,vL)):e(fw,hw),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let f=i(c),g=i(u),p,v;const m=s==null?10:+s;let b=[];if(!(r%1)&&g-f<m){if(f=Math.floor(f),g=Math.ceil(g),c>0){for(;f<=g;++f)for(p=1;p<r;++p)if(v=f<0?p/a(-f):p*a(f),!(v<c)){if(v>u)break;b.push(v)}}else for(;f<=g;++f)for(p=r-1;p>=1;--p)if(v=f>0?p/a(-f):p*a(f),!(v<c)){if(v>u)break;b.push(v)}b.length*2<m&&(b=Vh(c,u,m))}else b=Vh(f,g,Math.min(g-f,m)).map(a);return d?b.reverse():b},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Es(l)).precision==null&&(l.trim=!0),l=pp(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/a(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(dw(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function mp(){const e=vp(Qc()).domain([1,10]);return e.copy=()=>Cs(e,mp()).base(e.base()),bn.apply(e,arguments),e}function gw(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function vw(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function yp(e){var t=1,n=e(gw(t),vw(t));return n.constant=function(r){return arguments.length?e(gw(t=+r),vw(t)):t},di(n)}function bp(){var e=yp(Qc());return e.copy=function(){return Cs(e,bp()).constant(e.constant())},bn.apply(e,arguments)}function mw(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function xL(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function _L(e){return e<0?-e*e:e*e}function xp(e){var t=e(Ft,Ft),n=1;function r(){return n===1?e(Ft,Ft):n===.5?e(xL,_L):e(mw(n),mw(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},di(t)}function tu(){var e=xp(Qc());return e.copy=function(){return Cs(e,tu()).exponent(e.exponent())},bn.apply(e,arguments),e}function yw(){return tu.apply(null,arguments).exponent(.5)}function bw(e){return Math.sign(e)*e*e}function wL(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function _p(){var e=fp(),t=[0,1],n=!1,r;function i(a){var o=wL(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(bw(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Jc)).map(bw)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return _p(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},bn.apply(i,arguments),di(i)}function wp(){var e=[],t=[],n=[],r;function i(){var o=0,s=Math.max(1,t.length);for(n=new Array(s-1);++o<s;)n[o-1]=wA(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?r:t[bs(n,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(ci),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return wp().domain(e).range(t).unknown(r)},bn.apply(a,arguments)}function kp(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(l){return l!=null&&l<=l?i[bs(r,l,0,n)]:a}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},o.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return r.slice()},o.copy=function(){return kp().domain([e,t]).range(i).unknown(a)},bn.apply(di(o),arguments)}function Sp(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[bs(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Sp().domain(e).range(t).unknown(n)},bn.apply(i,arguments)}const Np=new Date,Cp=new Date;function at(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return l;let c;do l.push(c=new Date(+a)),t(a,s),e(a);while(c<a&&a<o);return l},i.filter=a=>at(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(Np.setTime(+a),Cp.setTime(+o),e(Np),e(Cp),Math.floor(n(Np,Cp))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const co=at(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);co.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?at(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):co);const xw=co.range,jr=1e3,xn=jr*60,Wr=xn*60,Ur=Wr*24,Ep=Ur*7,_w=Ur*30,Tp=Ur*365,Un=at(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*jr)},(e,t)=>(t-e)/jr,e=>e.getUTCSeconds()),ww=Un.range,Ts=at(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jr)},(e,t)=>{e.setTime(+e+t*xn)},(e,t)=>(t-e)/xn,e=>e.getMinutes()),kL=Ts.range,Ms=at(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*xn)},(e,t)=>(t-e)/xn,e=>e.getUTCMinutes()),SL=Ms.range,$s=at(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jr-e.getMinutes()*xn)},(e,t)=>{e.setTime(+e+t*Wr)},(e,t)=>(t-e)/Wr,e=>e.getHours()),NL=$s.range,Os=at(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Wr)},(e,t)=>(t-e)/Wr,e=>e.getUTCHours()),CL=Os.range,aa=at(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xn)/Ur,e=>e.getDate()-1),EL=aa.range,uo=at(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ur,e=>e.getUTCDate()-1),TL=uo.range,Mp=at(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ur,e=>Math.floor(e/Ur)),ML=Mp.range;function oa(e){return at(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*xn)/Ep)}const sa=oa(0),Ps=oa(1),kw=oa(2),Sw=oa(3),la=oa(4),Nw=oa(5),Cw=oa(6),Ew=sa.range,$L=Ps.range,OL=kw.range,PL=Sw.range,AL=la.range,LL=Nw.range,DL=Cw.range;function ca(e){return at(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Ep)}const ua=ca(0),As=ca(1),Tw=ca(2),Mw=ca(3),da=ca(4),$w=ca(5),Ow=ca(6),Pw=ua.range,IL=As.range,FL=Tw.range,zL=Mw.range,BL=da.range,jL=$w.range,WL=Ow.range,Ls=at(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),UL=Ls.range,Ds=at(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),HL=Ds.range,Hn=at(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Hn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:at(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});const qL=Hn.range,qn=at(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());qn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:at(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});const KL=qn.range;function Aw(e,t,n,r,i,a){const o=[[Un,1,jr],[Un,5,5*jr],[Un,15,15*jr],[Un,30,30*jr],[a,1,xn],[a,5,5*xn],[a,15,15*xn],[a,30,30*xn],[i,1,Wr],[i,3,3*Wr],[i,6,6*Wr],[i,12,12*Wr],[r,1,Ur],[r,2,2*Ur],[n,1,Ep],[t,1,_w],[t,3,3*_w],[e,1,Tp]];function s(c,u,d){const f=u<c;f&&([c,u]=[u,c]);const g=d&&typeof d.range=="function"?d:l(c,u,d),p=g?g.range(c,+u+1):[];return f?p.reverse():p}function l(c,u,d){const f=Math.abs(u-c)/d,g=zc(([,,m])=>m).right(o,f);if(g===o.length)return e.every(Yh(c/Tp,u/Tp,d));if(g===0)return co.every(Math.max(Yh(c,u,d),1));const[p,v]=o[f/o[g-1][2]<o[g][2]/f?g-1:g];return p.every(v)}return[s,l]}const[Lw,Dw]=Aw(qn,Ds,ua,Mp,Os,Ms),[Iw,Fw]=Aw(Hn,Ls,sa,aa,$s,Ts);function $p(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Op(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Is(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function VL(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,c=Fs(i),u=zs(i),d=Fs(a),f=zs(a),g=Fs(o),p=zs(o),v=Fs(s),m=zs(s),b=Fs(l),y=zs(l),x={a:j,A:B,b:H,B:F,c:null,d:Hw,e:Hw,f:gD,g:ND,G:ED,H:fD,I:hD,j:pD,L:qw,m:vD,M:mD,p:D,q:U,Q:Zw,s:Jw,S:yD,u:bD,U:xD,V:_D,w:wD,W:kD,x:null,X:null,y:SD,Y:CD,Z:TD,"%":Xw},k={a:V,A:Y,b:G,B:R,c:null,d:Vw,e:Vw,f:PD,g:UD,G:qD,H:MD,I:$D,j:OD,L:Yw,m:AD,M:LD,p:te,q:le,Q:Zw,s:Jw,S:DD,u:ID,U:FD,V:zD,w:BD,W:jD,x:null,X:null,y:WD,Y:HD,Z:KD,"%":Xw},w={a:T,A:O,b:P,B:M,c:$,d:Ww,e:Ww,f:lD,g:jw,G:Bw,H:Uw,I:Uw,j:iD,L:sD,m:rD,M:aD,p:E,q:nD,Q:uD,s:dD,S:oD,u:JL,U:QL,V:RL,w:ZL,W:eD,x:L,X:z,y:jw,Y:Bw,Z:tD,"%":cD};x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),k.x=S(n,k),k.X=S(r,k),k.c=S(t,k);function S(W,Z){return function(I){var A=[],q=-1,Q=0,de=W.length,ne,he,xe;for(I instanceof Date||(I=new Date(+I));++q<de;)W.charCodeAt(q)===37&&(A.push(W.slice(Q,q)),(he=zw[ne=W.charAt(++q)])!=null?ne=W.charAt(++q):he=ne==="e"?" ":"0",(xe=Z[ne])&&(ne=xe(I,he)),A.push(ne),Q=q+1);return A.push(W.slice(Q,q)),A.join("")}}function N(W,Z){return function(I){var A=Is(1900,void 0,1),q=C(A,W,I+="",0),Q,de;if(q!=I.length)return null;if("Q"in A)return new Date(A.Q);if("s"in A)return new Date(A.s*1e3+("L"in A?A.L:0));if(Z&&!("Z"in A)&&(A.Z=0),"p"in A&&(A.H=A.H%12+A.p*12),A.m===void 0&&(A.m="q"in A?A.q:0),"V"in A){if(A.V<1||A.V>53)return null;"w"in A||(A.w=1),"Z"in A?(Q=Op(Is(A.y,0,1)),de=Q.getUTCDay(),Q=de>4||de===0?As.ceil(Q):As(Q),Q=uo.offset(Q,(A.V-1)*7),A.y=Q.getUTCFullYear(),A.m=Q.getUTCMonth(),A.d=Q.getUTCDate()+(A.w+6)%7):(Q=$p(Is(A.y,0,1)),de=Q.getDay(),Q=de>4||de===0?Ps.ceil(Q):Ps(Q),Q=aa.offset(Q,(A.V-1)*7),A.y=Q.getFullYear(),A.m=Q.getMonth(),A.d=Q.getDate()+(A.w+6)%7)}else("W"in A||"U"in A)&&("w"in A||(A.w="u"in A?A.u%7:"W"in A?1:0),de="Z"in A?Op(Is(A.y,0,1)).getUTCDay():$p(Is(A.y,0,1)).getDay(),A.m=0,A.d="W"in A?(A.w+6)%7+A.W*7-(de+5)%7:A.w+A.U*7-(de+6)%7);return"Z"in A?(A.H+=A.Z/100|0,A.M+=A.Z%100,Op(A)):$p(A)}}function C(W,Z,I,A){for(var q=0,Q=Z.length,de=I.length,ne,he;q<Q;){if(A>=de)return-1;if(ne=Z.charCodeAt(q++),ne===37){if(ne=Z.charAt(q++),he=w[ne in zw?Z.charAt(q++):ne],!he||(A=he(W,I,A))<0)return-1}else if(ne!=I.charCodeAt(A++))return-1}return A}function E(W,Z,I){var A=c.exec(Z.slice(I));return A?(W.p=u.get(A[0].toLowerCase()),I+A[0].length):-1}function T(W,Z,I){var A=g.exec(Z.slice(I));return A?(W.w=p.get(A[0].toLowerCase()),I+A[0].length):-1}function O(W,Z,I){var A=d.exec(Z.slice(I));return A?(W.w=f.get(A[0].toLowerCase()),I+A[0].length):-1}function P(W,Z,I){var A=b.exec(Z.slice(I));return A?(W.m=y.get(A[0].toLowerCase()),I+A[0].length):-1}function M(W,Z,I){var A=v.exec(Z.slice(I));return A?(W.m=m.get(A[0].toLowerCase()),I+A[0].length):-1}function $(W,Z,I){return C(W,t,Z,I)}function L(W,Z,I){return C(W,n,Z,I)}function z(W,Z,I){return C(W,r,Z,I)}function j(W){return o[W.getDay()]}function B(W){return a[W.getDay()]}function H(W){return l[W.getMonth()]}function F(W){return s[W.getMonth()]}function D(W){return i[+(W.getHours()>=12)]}function U(W){return 1+~~(W.getMonth()/3)}function V(W){return o[W.getUTCDay()]}function Y(W){return a[W.getUTCDay()]}function G(W){return l[W.getUTCMonth()]}function R(W){return s[W.getUTCMonth()]}function te(W){return i[+(W.getUTCHours()>=12)]}function le(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var Z=S(W+="",x);return Z.toString=function(){return W},Z},parse:function(W){var Z=N(W+="",!1);return Z.toString=function(){return W},Z},utcFormat:function(W){var Z=S(W+="",k);return Z.toString=function(){return W},Z},utcParse:function(W){var Z=N(W+="",!0);return Z.toString=function(){return W},Z}}}var zw={"-":"",_:" ",0:"0"},vt=/^\s*\d+/,YL=/^%/,GL=/[\\^$*+?|[\]().{}]/g;function Oe(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function XL(e){return e.replace(GL,"\\$&")}function Fs(e){return new RegExp("^(?:"+e.map(XL).join("|")+")","i")}function zs(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function ZL(e,t,n){var r=vt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function JL(e,t,n){var r=vt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function QL(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function RL(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function eD(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Bw(e,t,n){var r=vt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function jw(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function tD(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function nD(e,t,n){var r=vt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function rD(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Ww(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function iD(e,t,n){var r=vt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Uw(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function aD(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function oD(e,t,n){var r=vt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function sD(e,t,n){var r=vt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function lD(e,t,n){var r=vt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function cD(e,t,n){var r=YL.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function uD(e,t,n){var r=vt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function dD(e,t,n){var r=vt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Hw(e,t){return Oe(e.getDate(),t,2)}function fD(e,t){return Oe(e.getHours(),t,2)}function hD(e,t){return Oe(e.getHours()%12||12,t,2)}function pD(e,t){return Oe(1+aa.count(Hn(e),e),t,3)}function qw(e,t){return Oe(e.getMilliseconds(),t,3)}function gD(e,t){return qw(e,t)+"000"}function vD(e,t){return Oe(e.getMonth()+1,t,2)}function mD(e,t){return Oe(e.getMinutes(),t,2)}function yD(e,t){return Oe(e.getSeconds(),t,2)}function bD(e){var t=e.getDay();return t===0?7:t}function xD(e,t){return Oe(sa.count(Hn(e)-1,e),t,2)}function Kw(e){var t=e.getDay();return t>=4||t===0?la(e):la.ceil(e)}function _D(e,t){return e=Kw(e),Oe(la.count(Hn(e),e)+(Hn(e).getDay()===4),t,2)}function wD(e){return e.getDay()}function kD(e,t){return Oe(Ps.count(Hn(e)-1,e),t,2)}function SD(e,t){return Oe(e.getFullYear()%100,t,2)}function ND(e,t){return e=Kw(e),Oe(e.getFullYear()%100,t,2)}function CD(e,t){return Oe(e.getFullYear()%1e4,t,4)}function ED(e,t){var n=e.getDay();return e=n>=4||n===0?la(e):la.ceil(e),Oe(e.getFullYear()%1e4,t,4)}function TD(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Oe(t/60|0,"0",2)+Oe(t%60,"0",2)}function Vw(e,t){return Oe(e.getUTCDate(),t,2)}function MD(e,t){return Oe(e.getUTCHours(),t,2)}function $D(e,t){return Oe(e.getUTCHours()%12||12,t,2)}function OD(e,t){return Oe(1+uo.count(qn(e),e),t,3)}function Yw(e,t){return Oe(e.getUTCMilliseconds(),t,3)}function PD(e,t){return Yw(e,t)+"000"}function AD(e,t){return Oe(e.getUTCMonth()+1,t,2)}function LD(e,t){return Oe(e.getUTCMinutes(),t,2)}function DD(e,t){return Oe(e.getUTCSeconds(),t,2)}function ID(e){var t=e.getUTCDay();return t===0?7:t}function FD(e,t){return Oe(ua.count(qn(e)-1,e),t,2)}function Gw(e){var t=e.getUTCDay();return t>=4||t===0?da(e):da.ceil(e)}function zD(e,t){return e=Gw(e),Oe(da.count(qn(e),e)+(qn(e).getUTCDay()===4),t,2)}function BD(e){return e.getUTCDay()}function jD(e,t){return Oe(As.count(qn(e)-1,e),t,2)}function WD(e,t){return Oe(e.getUTCFullYear()%100,t,2)}function UD(e,t){return e=Gw(e),Oe(e.getUTCFullYear()%100,t,2)}function HD(e,t){return Oe(e.getUTCFullYear()%1e4,t,4)}function qD(e,t){var n=e.getUTCDay();return e=n>=4||n===0?da(e):da.ceil(e),Oe(e.getUTCFullYear()%1e4,t,4)}function KD(){return"+0000"}function Xw(){return"%"}function Zw(e){return+e}function Jw(e){return Math.floor(+e/1e3)}var fo,Qw,Rw;VD({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 VD(e){return fo=VL(e),Qw=fo.format,fo.parse,Rw=fo.utcFormat,fo.utcParse,fo}function YD(e){return new Date(e)}function GD(e){return e instanceof Date?+e:+new Date(+e)}function Pp(e,t,n,r,i,a,o,s,l,c){var u=fp(),d=u.invert,f=u.domain,g=c(".%L"),p=c(":%S"),v=c("%I:%M"),m=c("%I %p"),b=c("%a %d"),y=c("%b %d"),x=c("%B"),k=c("%Y");function w(S){return(l(S)<S?g:s(S)<S?p:o(S)<S?v:a(S)<S?m:r(S)<S?i(S)<S?b:y:n(S)<S?x:k)(S)}return u.invert=function(S){return new Date(d(S))},u.domain=function(S){return arguments.length?f(Array.from(S,GD)):f().map(YD)},u.ticks=function(S){var N=f();return e(N[0],N[N.length-1],S??10)},u.tickFormat=function(S,N){return N==null?w:c(N)},u.nice=function(S){var N=f();return(!S||typeof S.range!="function")&&(S=t(N[0],N[N.length-1],S??10)),S?f(dw(N,S)):u},u.copy=function(){return Cs(u,Pp(e,t,n,r,i,a,o,s,l,c))},u}function ek(){return bn.apply(Pp(Iw,Fw,Hn,Ls,sa,aa,$s,Ts,Un,Qw).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function tk(){return bn.apply(Pp(Lw,Dw,qn,Ds,ua,uo,Os,Ms,Un,Rw).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function nu(){var e=0,t=1,n,r,i,a,o=Ft,s=!1,l;function c(d){return d==null||isNaN(d=+d)?l:o(i===0?.5:(d=(a(d)-n)*i,s?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(d){return arguments.length?(s=!!d,c):s},c.interpolator=function(d){return arguments.length?(o=d,c):o};function u(d){return function(f){var g,p;return arguments.length?([g,p]=f,o=d(g,p),c):[o(0),o(1)]}}return c.range=u(ia),c.rangeRound=u(Ns),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return a=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),c}}function fi(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function nk(){var e=di(nu()(Ft));return e.copy=function(){return fi(e,nk())},zr.apply(e,arguments)}function rk(){var e=vp(nu()).domain([1,10]);return e.copy=function(){return fi(e,rk()).base(e.base())},zr.apply(e,arguments)}function ik(){var e=yp(nu());return e.copy=function(){return fi(e,ik()).constant(e.constant())},zr.apply(e,arguments)}function Ap(){var e=xp(nu());return e.copy=function(){return fi(e,Ap()).exponent(e.exponent())},zr.apply(e,arguments)}function XD(){return Ap.apply(null,arguments).exponent(.5)}function ak(){var e=[],t=Ft;function n(r){if(r!=null&&!isNaN(r=+r))return t((bs(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(ci),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>_A(e,a/r))},n.copy=function(){return ak(t).domain(e)},zr.apply(n,arguments)}function ru(){var e=0,t=.5,n=1,r=1,i,a,o,s,l,c=Ft,u,d=!1,f;function g(v){return isNaN(v=+v)?f:(v=.5+((v=+u(v))-a)*(r*v<r*a?s:l),c(d?Math.max(0,Math.min(1,v)):v))}g.domain=function(v){return arguments.length?([e,t,n]=v,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),r=a<i?-1:1,g):[e,t,n]},g.clamp=function(v){return arguments.length?(d=!!v,g):d},g.interpolator=function(v){return arguments.length?(c=v,g):c};function p(v){return function(m){var b,y,x;return arguments.length?([b,y,x]=m,c=ew(v,[b,y,x]),g):[c(0),c(.5),c(1)]}}return g.range=p(ia),g.rangeRound=p(Ns),g.unknown=function(v){return arguments.length?(f=v,g):f},function(v){return u=v,i=v(e),a=v(t),o=v(n),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),r=a<i?-1:1,g}}function ok(){var e=di(ru()(Ft));return e.copy=function(){return fi(e,ok())},zr.apply(e,arguments)}function sk(){var e=vp(ru()).domain([.1,1,10]);return e.copy=function(){return fi(e,sk()).base(e.base())},zr.apply(e,arguments)}function lk(){var e=yp(ru());return e.copy=function(){return fi(e,lk()).constant(e.constant())},zr.apply(e,arguments)}function Lp(){var e=xp(ru());return e.copy=function(){return fi(e,Lp()).exponent(e.exponent())},zr.apply(e,arguments)}function ZD(){return Lp.apply(null,arguments).exponent(.5)}const JD=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:jc,scaleDiverging:ok,scaleDivergingLog:sk,scaleDivergingPow:Lp,scaleDivergingSqrt:ZD,scaleDivergingSymlog:lk,scaleIdentity:uw,scaleImplicit:Gh,scaleLinear:gp,scaleLog:mp,scaleOrdinal:Bc,scalePoint:s_,scalePow:tu,scaleQuantile:wp,scaleQuantize:kp,scaleRadial:_p,scaleSequential:nk,scaleSequentialLog:rk,scaleSequentialPow:Ap,scaleSequentialQuantile:ak,scaleSequentialSqrt:XD,scaleSequentialSymlog:ik,scaleSqrt:yw,scaleSymlog:bp,scaleThreshold:Sp,scaleTime:ek,scaleUtc:tk,tickFormat:cw},Symbol.toStringTag,{value:"Module"}));function QD(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}function RD(e,t){t.range&&("padding"in e,e.range(t.range))}function eI(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}function tI(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}function nI(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}function rI(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}function iI(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}const aI=Object.freeze(Object.defineProperty({__proto__:null,interpolate:ia,interpolateArray:jA,interpolateBasis:O_,interpolateBasisClosed:P_,interpolateCubehelix:Q_,interpolateCubehelixLong:R_,interpolateDate:F_,interpolateDiscrete:HA,interpolateHcl:X_,interpolateHclLong:Z_,interpolateHsl:K_,interpolateHslLong:V_,interpolateHue:qA,interpolateLab:Y_,interpolateNumber:Wn,interpolateNumberArray:sp,interpolateObject:z_,interpolateRgb:Xc,interpolateRgbBasis:zA,interpolateRgbBasisClosed:BA,interpolateRound:Ns,interpolateString:B_,interpolateTransformCss:YA,interpolateTransformSvg:GA,interpolateZoom:QA,piecewise:ew,quantize:RA},Symbol.toStringTag,{value:"Module"}));var ck={lab:Y_,hcl:X_,"hcl-long":Z_,hsl:K_,"hsl-long":V_,cubehelix:Q_,"cubehelix-long":R_,rgb:Xc};function oI(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return ck[e]}var t=e.type,n=e.gamma,r=ck[t];return typeof n>"u"?r:r.gamma(n)}function sI(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=oI(t.interpolate);e.interpolate(n)}}const lI=Object.freeze(Object.defineProperty({__proto__:null,timeDay:aa,timeDays:EL,timeFriday:Nw,timeFridays:LL,timeHour:$s,timeHours:NL,timeInterval:at,timeMillisecond:co,timeMilliseconds:xw,timeMinute:Ts,timeMinutes:kL,timeMonday:Ps,timeMondays:$L,timeMonth:Ls,timeMonths:UL,timeSaturday:Cw,timeSaturdays:DL,timeSecond:Un,timeSeconds:ww,timeSunday:sa,timeSundays:Ew,timeThursday:la,timeThursdays:AL,timeTickInterval:Fw,timeTicks:Iw,timeTuesday:kw,timeTuesdays:OL,timeWednesday:Sw,timeWednesdays:PL,timeWeek:sa,timeWeeks:Ew,timeYear:Hn,timeYears:qL,unixDay:Mp,unixDays:ML,utcDay:uo,utcDays:TL,utcFriday:$w,utcFridays:jL,utcHour:Os,utcHours:CL,utcMillisecond:co,utcMilliseconds:xw,utcMinute:Ms,utcMinutes:SL,utcMonday:As,utcMondays:IL,utcMonth:Ds,utcMonths:HL,utcSaturday:Ow,utcSaturdays:WL,utcSecond:Un,utcSeconds:ww,utcSunday:ua,utcSundays:Pw,utcThursday:da,utcThursdays:BL,utcTickInterval:Dw,utcTicks:Lw,utcTuesday:Tw,utcTuesdays:FL,utcWednesday:Mw,utcWednesdays:zL,utcWeek:ua,utcWeeks:Pw,utcYear:qn,utcYears:KL},Symbol.toStringTag,{value:"Module"}));var cI=new Date(Date.UTC(2020,1,2,3,4,5)),uI="%Y-%m-%d %H:%M";function uk(e){var t=e.tickFormat(1,uI)(cI);return t==="2020-02-02 03:04"}var dk={day:aa,hour:$s,minute:Ts,month:Ls,second:Un,week:sa,year:Hn},fk={day:uo,hour:Os,minute:Ms,month:Ds,second:Un,week:ua,year:qn};function dI(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,i=uk(r);if(typeof n=="string")r.nice(i?fk[n]:dk[n]);else{var a=n.interval,o=n.step,s=(i?fk[a]:dk[a]).every(o);s!=null&&r.nice(s)}}}}function fI(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}function hI(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}function pI(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(Ns))}function gI(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}function vI(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],i=n[1],a=i<r,o=a?[i,r]:[r,i],s=o[0],l=o[1],c=[Math.min(0,s),Math.max(0,l)];e.domain(a?c.reverse():c)}}var hk=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"],mI={domain:QD,nice:dI,zero:vI,interpolate:sI,round:pI,align:eI,base:tI,clamp:nI,constant:rI,exponent:iI,padding:fI,range:RD,reverse:hI,unknown:gI};function zt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),i=hk.filter(function(a){return r.has(a)});return function(o,s){return typeof s<"u"&&i.forEach(function(l){mI[l](o,s)}),o}}var yI=zt("domain","range","reverse","align","padding","round");function Kn(e){return yI(jc(),e)}var bI=zt("domain","range","reverse","align","padding","round");function pk(e){return bI(s_(),e)}var xI=zt("domain","range","reverse","clamp","interpolate","nice","round","zero");function _n(e){return xI(gp(),e)}var _I=zt("domain","range","clamp","nice","round","unknown");function wI(e){return _I(_p(),e)}var kI=zt("domain","range","reverse","clamp","interpolate","nice","round");function gk(e){return kI(ek(),e)}var SI=zt("domain","range","reverse","clamp","interpolate","nice","round");function vk(e){return SI(tk(),e)}var NI=zt("domain","range","reverse","base","clamp","interpolate","nice","round");function mk(e){return NI(mp(),e)}var CI=zt("domain","range","reverse","clamp","exponent","interpolate","nice","round","zero");function yk(e){return CI(tu(),e)}var EI=zt("domain","range","reverse","unknown");function Dp(e){return EI(Bc(),e)}var TI=zt("domain","range","reverse","nice","zero");function bk(e){return TI(kp(),e)}var MI=zt("domain","range","reverse");function xk(e){return MI(wp(),e)}var $I=zt("domain","range","reverse","clamp","constant","nice","zero","round");function _k(e){return $I(bp(),e)}var OI=zt("domain","range","reverse");function wk(e){return OI(Sp(),e)}var PI=zt("domain","range","reverse","clamp","interpolate","nice","round","zero");function kk(e){return PI(yw(),e)}function Bs(e){if(typeof e<"u"&&"type"in e)switch(e.type){case"linear":return _n(e);case"log":return mk(e);case"pow":return yk(e);case"sqrt":return kk(e);case"symlog":return _k(e);case"time":return gk(e);case"utc":return vk(e);case"quantile":return xk(e);case"quantize":return bk(e);case"threshold":return wk(e);case"ordinal":return Dp(e);case"point":return pk(e);case"band":return Kn(e)}return _n(e)}var AI=zt.apply(void 0,hk);function LI(e,t){return AI(e.copy(),t)}function DI(e){return"paddingInner"in e?"band":"padding"in e?"point":"quantiles"in e?"quantile":"base"in e?"log":"exponent"in e?e.exponent()===.5?"sqrt":"pow":"constant"in e?"symlog":"clamp"in e?e.ticks()[0]instanceof Date?uk(e)?"utc":"time":"linear":"nice"in e?"quantize":"invertExtent"in e?"threshold":"ordinal"}function Sk(e){if((typeof e=="function"||typeof e=="object"&&e)&&"valueOf"in e){var t=e.valueOf();if(typeof t=="number")return t}return e}function Nk(e,t){var n=e;return"ticks"in n?n.ticks(t):n.domain().filter(function(r,i,a){return t==null||a.length<=t||i%Math.round((a.length-1)/t)===0})}function Ck(e){return e==null?void 0:e.toString()}var II=new Set(["linear","pow","quantize","sqrt","symlog"]);function Ip(e){return II.has(e.type)}const FI=Object.freeze(Object.defineProperty({__proto__:null,coerceNumber:Sk,createScale:Bs,getTicks:Nk,inferScaleType:DI,scaleBand:Kn,scaleCanBeZeroed:Ip,scaleLinear:_n,scaleLog:mk,scaleOrdinal:Dp,scalePoint:pk,scalePower:yk,scaleQuantile:xk,scaleQuantize:bk,scaleRadial:wI,scaleSqrt:kk,scaleSymlog:_k,scaleThreshold:wk,scaleTime:gk,scaleUtc:vk,toString:Ck,updateScale:LI},Symbol.toStringTag,{value:"Module"}));var Fp=Math.PI,zp=2*Fp,fa=1e-6,zI=zp-fa;function Bp(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Zt(){return new Bp}Bp.prototype=Zt.prototype={constructor:Bp,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,l=r-t,c=a-e,u=o-t,d=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>fa)if(!(Math.abs(u*s-l*c)>fa)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var f=n-a,g=r-o,p=s*s+l*l,v=f*f+g*g,m=Math.sqrt(p),b=Math.sqrt(d),y=i*Math.tan((Fp-Math.acos((p+d-v)/(2*m*b)))/2),x=y/b,k=y/m;Math.abs(x-1)>fa&&(this._+="L"+(e+x*c)+","+(t+x*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>c*g)+","+(this._x1=e+k*s)+","+(this._y1=t+k*l)}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),l=e+o,c=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>fa||Math.abs(this._y1-c)>fa)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%zp+zp),d>zI?this._+="A"+n+","+n+",0,1,"+u+","+(e-o)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>fa&&(this._+="A"+n+","+n+",0,"+ +(d>=Fp)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function Me(e){return function(){return e}}var Ek=Math.abs,Ot=Math.atan2,ha=Math.cos,BI=Math.max,jp=Math.min,hr=Math.sin,ho=Math.sqrt,Pt=1e-12,hi=Math.PI,iu=hi/2,pi=2*hi;function jI(e){return e>1?0:e<-1?hi:Math.acos(e)}function Tk(e){return e>=1?iu:e<=-1?-iu:Math.asin(e)}function WI(e){return e.innerRadius}function UI(e){return e.outerRadius}function HI(e){return e.startAngle}function qI(e){return e.endAngle}function KI(e){return e&&e.padAngle}function VI(e,t,n,r,i,a,o,s){var l=n-e,c=r-t,u=o-i,d=s-a,f=d*l-u*c;if(!(f*f<Pt))return f=(u*(t-a)-d*(e-i))/f,[e+f*l,t+f*c]}function au(e,t,n,r,i,a,o){var s=e-n,l=t-r,c=(o?a:-a)/ho(s*s+l*l),u=c*l,d=-c*s,f=e+u,g=t+d,p=n+u,v=r+d,m=(f+p)/2,b=(g+v)/2,y=p-f,x=v-g,k=y*y+x*x,w=i-a,S=f*v-p*g,N=(x<0?-1:1)*ho(BI(0,w*w*k-S*S)),C=(S*x-y*N)/k,E=(-S*y-x*N)/k,T=(S*x+y*N)/k,O=(-S*y+x*N)/k,P=C-m,M=E-b,$=T-m,L=O-b;return P*P+M*M>$*$+L*L&&(C=T,E=O),{cx:C,cy:E,x01:-u,y01:-d,x11:C*(i/w-1),y11:E*(i/w-1)}}function Mk(){var e=WI,t=UI,n=Me(0),r=null,i=HI,a=qI,o=KI,s=null;function l(){var c,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),g=i.apply(this,arguments)-iu,p=a.apply(this,arguments)-iu,v=Ek(p-g),m=p>g;if(s||(s=c=Zt()),f<d&&(u=f,f=d,d=u),!(f>Pt))s.moveTo(0,0);else if(v>pi-Pt)s.moveTo(f*ha(g),f*hr(g)),s.arc(0,0,f,g,p,!m),d>Pt&&(s.moveTo(d*ha(p),d*hr(p)),s.arc(0,0,d,p,g,m));else{var b=g,y=p,x=g,k=p,w=v,S=v,N=o.apply(this,arguments)/2,C=N>Pt&&(r?+r.apply(this,arguments):ho(d*d+f*f)),E=jp(Ek(f-d)/2,+n.apply(this,arguments)),T=E,O=E,P,M;if(C>Pt){var $=Tk(C/d*hr(N)),L=Tk(C/f*hr(N));(w-=$*2)>Pt?($*=m?1:-1,x+=$,k-=$):(w=0,x=k=(g+p)/2),(S-=L*2)>Pt?(L*=m?1:-1,b+=L,y-=L):(S=0,b=y=(g+p)/2)}var z=f*ha(b),j=f*hr(b),B=d*ha(k),H=d*hr(k);if(E>Pt){var F=f*ha(y),D=f*hr(y),U=d*ha(x),V=d*hr(x),Y;if(v<hi&&(Y=VI(z,j,U,V,F,D,B,H))){var G=z-Y[0],R=j-Y[1],te=F-Y[0],le=D-Y[1],W=1/hr(jI((G*te+R*le)/(ho(G*G+R*R)*ho(te*te+le*le)))/2),Z=ho(Y[0]*Y[0]+Y[1]*Y[1]);T=jp(E,(d-Z)/(W-1)),O=jp(E,(f-Z)/(W+1))}}S>Pt?O>Pt?(P=au(U,V,z,j,f,O,m),M=au(F,D,B,H,f,O,m),s.moveTo(P.cx+P.x01,P.cy+P.y01),O<E?s.arc(P.cx,P.cy,O,Ot(P.y01,P.x01),Ot(M.y01,M.x01),!m):(s.arc(P.cx,P.cy,O,Ot(P.y01,P.x01),Ot(P.y11,P.x11),!m),s.arc(0,0,f,Ot(P.cy+P.y11,P.cx+P.x11),Ot(M.cy+M.y11,M.cx+M.x11),!m),s.arc(M.cx,M.cy,O,Ot(M.y11,M.x11),Ot(M.y01,M.x01),!m))):(s.moveTo(z,j),s.arc(0,0,f,b,y,!m)):s.moveTo(z,j),!(d>Pt)||!(w>Pt)?s.lineTo(B,H):T>Pt?(P=au(B,H,F,D,d,-T,m),M=au(z,j,U,V,d,-T,m),s.lineTo(P.cx+P.x01,P.cy+P.y01),T<E?s.arc(P.cx,P.cy,T,Ot(P.y01,P.x01),Ot(M.y01,M.x01),!m):(s.arc(P.cx,P.cy,T,Ot(P.y01,P.x01),Ot(P.y11,P.x11),!m),s.arc(0,0,d,Ot(P.cy+P.y11,P.cx+P.x11),Ot(M.cy+M.y11,M.cx+M.x11),m),s.arc(M.cx,M.cy,T,Ot(M.y11,M.x11),Ot(M.y01,M.x01),!m))):s.arc(0,0,d,k,x,m)}if(s.closePath(),c)return s=null,c+""||null}return l.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,u=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-hi/2;return[ha(u)*c,hr(u)*c]},l.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:Me(+c),l):e},l.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:Me(+c),l):t},l.cornerRadius=function(c){return arguments.length?(n=typeof c=="function"?c:Me(+c),l):n},l.padRadius=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:Me(+c),l):r},l.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:Me(+c),l):i},l.endAngle=function(c){return arguments.length?(a=typeof c=="function"?c:Me(+c),l):a},l.padAngle=function(c){return arguments.length?(o=typeof c=="function"?c:Me(+c),l):o},l.context=function(c){return arguments.length?(s=c??null,l):s},l}function $k(e){this._context=e}$k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ou(e){return new $k(e)}function Wp(e){return e[0]}function Up(e){return e[1]}function su(){var e=Wp,t=Up,n=Me(!0),r=null,i=ou,a=null;function o(s){var l,c=s.length,u,d=!1,f;for(r==null&&(a=i(f=Zt())),l=0;l<=c;++l)!(l<c&&n(u=s[l],l,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,l,s),+t(u,l,s));if(f)return a=null,f+""||null}return o.x=function(s){return arguments.length?(e=typeof s=="function"?s:Me(+s),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Me(+s),o):t},o.defined=function(s){return arguments.length?(n=typeof s=="function"?s:Me(!!s),o):n},o.curve=function(s){return arguments.length?(i=s,r!=null&&(a=i(r)),o):i},o.context=function(s){return arguments.length?(s==null?r=a=null:a=i(r=s),o):r},o}function Hp(){var e=Wp,t=null,n=Me(0),r=Up,i=Me(!0),a=null,o=ou,s=null;function l(u){var d,f,g,p=u.length,v,m=!1,b,y=new Array(p),x=new Array(p);for(a==null&&(s=o(b=Zt())),d=0;d<=p;++d){if(!(d<p&&i(v=u[d],d,u))===m)if(m=!m)f=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=d-1;g>=f;--g)s.point(y[g],x[g]);s.lineEnd(),s.areaEnd()}m&&(y[d]=+e(v,d,u),x[d]=+n(v,d,u),s.point(t?+t(v,d,u):y[d],r?+r(v,d,u):x[d]))}if(b)return s=null,b+""||null}function c(){return su().defined(i).curve(o).context(a)}return l.x=function(u){return arguments.length?(e=typeof u=="function"?u:Me(+u),t=null,l):e},l.x0=function(u){return arguments.length?(e=typeof u=="function"?u:Me(+u),l):e},l.x1=function(u){return arguments.length?(t=u==null?null:typeof u=="function"?u:Me(+u),l):t},l.y=function(u){return arguments.length?(n=typeof u=="function"?u:Me(+u),r=null,l):n},l.y0=function(u){return arguments.length?(n=typeof u=="function"?u:Me(+u),l):n},l.y1=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:Me(+u),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(n)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(t).y(n)},l.defined=function(u){return arguments.length?(i=typeof u=="function"?u:Me(!!u),l):i},l.curve=function(u){return arguments.length?(o=u,a!=null&&(s=o(a)),l):o},l.context=function(u){return arguments.length?(u==null?a=s=null:s=o(a=u),l):a},l}function YI(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function GI(e){return e}function Ok(){var e=GI,t=YI,n=null,r=Me(0),i=Me(pi),a=Me(0);function o(s){var l,c=s.length,u,d,f=0,g=new Array(c),p=new Array(c),v=+r.apply(this,arguments),m=Math.min(pi,Math.max(-pi,i.apply(this,arguments)-v)),b,y=Math.min(Math.abs(m)/c,a.apply(this,arguments)),x=y*(m<0?-1:1),k;for(l=0;l<c;++l)(k=p[g[l]=l]=+e(s[l],l,s))>0&&(f+=k);for(t!=null?g.sort(function(w,S){return t(p[w],p[S])}):n!=null&&g.sort(function(w,S){return n(s[w],s[S])}),l=0,d=f?(m-c*x)/f:0;l<c;++l,v=b)u=g[l],k=p[u],b=v+(k>0?k*d:0)+x,p[u]={data:s[u],index:l,value:k,startAngle:v,endAngle:b,padAngle:y};return p}return o.value=function(s){return arguments.length?(e=typeof s=="function"?s:Me(+s),o):e},o.sortValues=function(s){return arguments.length?(t=s,n=null,o):t},o.sort=function(s){return arguments.length?(n=s,t=null,o):n},o.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:Me(+s),o):r},o.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:Me(+s),o):i},o.padAngle=function(s){return arguments.length?(a=typeof s=="function"?s:Me(+s),o):a},o}var Pk=qp(ou);function Ak(e){this._curve=e}Ak.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function qp(e){function t(n){return new Ak(e(n))}return t._curve=e,t}function js(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(qp(n)):t()._curve},e}function Kp(){return js(su().curve(Pk))}function Lk(){var e=Hp().curve(Pk),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return js(n())},delete e.lineX0,e.lineEndAngle=function(){return js(r())},delete e.lineX1,e.lineInnerRadius=function(){return js(i())},delete e.lineY0,e.lineOuterRadius=function(){return js(a())},delete e.lineY1,e.curve=function(o){return arguments.length?t(qp(o)):t()._curve},e}function Ws(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var Vp=Array.prototype.slice;function XI(e){return e.source}function ZI(e){return e.target}function Yp(e){var t=XI,n=ZI,r=Wp,i=Up,a=null;function o(){var s,l=Vp.call(arguments),c=t.apply(this,l),u=n.apply(this,l);if(a||(a=s=Zt()),e(a,+r.apply(this,(l[0]=c,l)),+i.apply(this,l),+r.apply(this,(l[0]=u,l)),+i.apply(this,l)),s)return a=null,s+""||null}return o.source=function(s){return arguments.length?(t=s,o):t},o.target=function(s){return arguments.length?(n=s,o):n},o.x=function(s){return arguments.length?(r=typeof s=="function"?s:Me(+s),o):r},o.y=function(s){return arguments.length?(i=typeof s=="function"?s:Me(+s),o):i},o.context=function(s){return arguments.length?(a=s??null,o):a},o}function JI(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function QI(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function RI(e,t,n,r,i){var a=Ws(t,n),o=Ws(t,n=(n+i)/2),s=Ws(r,n),l=Ws(r,i);e.moveTo(a[0],a[1]),e.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}function Dk(){return Yp(JI)}function Ik(){return Yp(QI)}function Fk(){var e=Yp(RI);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const Gp={draw:function(e,t){var n=Math.sqrt(t/hi);e.moveTo(n,0),e.arc(0,0,n,0,pi)}},zk={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};var Bk=Math.sqrt(1/3),eF=Bk*2;const jk={draw:function(e,t){var n=Math.sqrt(t/eF),r=n*Bk;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}};var tF=.8908130915292852,Wk=Math.sin(hi/10)/Math.sin(7*hi/10),nF=Math.sin(pi/10)*Wk,rF=-Math.cos(pi/10)*Wk;const Uk={draw:function(e,t){var n=Math.sqrt(t*tF),r=nF*n,i=rF*n;e.moveTo(0,-n),e.lineTo(r,i);for(var a=1;a<5;++a){var o=pi*a/5,s=Math.cos(o),l=Math.sin(o);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},Hk={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}};var Xp=Math.sqrt(3);const qk={draw:function(e,t){var n=-Math.sqrt(t/(Xp*3));e.moveTo(0,n*2),e.lineTo(-Xp*n,-n),e.lineTo(Xp*n,-n),e.closePath()}};var wn=-.5,kn=Math.sqrt(3)/2,Zp=1/Math.sqrt(12),iF=(Zp/2+1)*3;const Kk={draw:function(e,t){var n=Math.sqrt(t/iF),r=n/2,i=n*Zp,a=r,o=n*Zp+n,s=-a,l=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(wn*r-kn*i,kn*r+wn*i),e.lineTo(wn*a-kn*o,kn*a+wn*o),e.lineTo(wn*s-kn*l,kn*s+wn*l),e.lineTo(wn*r+kn*i,wn*i-kn*r),e.lineTo(wn*a+kn*o,wn*o-kn*a),e.lineTo(wn*s+kn*l,wn*l-kn*s),e.closePath()}};var aF=[Gp,zk,jk,Hk,Uk,qk,Kk];function oF(){var e=Me(Gp),t=Me(64),n=null;function r(){var i;if(n||(n=i=Zt()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return r.type=function(i){return arguments.length?(e=typeof i=="function"?i:Me(i),r):e},r.size=function(i){return arguments.length?(t=typeof i=="function"?i:Me(+i),r):t},r.context=function(i){return arguments.length?(n=i??null,r):n},r}function gi(){}function lu(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function cu(e){this._context=e}cu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:lu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:lu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sF(e){return new cu(e)}function Vk(e){this._context=e}Vk.prototype={areaStart:gi,areaEnd:gi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:lu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lF(e){return new Vk(e)}function Yk(e){this._context=e}Yk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:lu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cF(e){return new Yk(e)}function Gk(e,t){this._basis=new cu(e),this._beta=t}Gk.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,l;++s<=n;)l=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+l*a),this._beta*t[s]+(1-this._beta)*(i+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const uF=function e(t){function n(r){return t===1?new cu(r):new Gk(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function uu(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Jp(e,t){this._context=e,this._k=(1-t)/6}Jp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:uu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:uu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const dF=function e(t){function n(r){return new Jp(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Qp(e,t){this._context=e,this._k=(1-t)/6}Qp.prototype={areaStart:gi,areaEnd:gi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:uu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const fF=function e(t){function n(r){return new Qp(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Rp(e,t){this._context=e,this._k=(1-t)/6}Rp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:uu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const hF=function e(t){function n(r){return new Rp(r,t)}return n.tension=function(r){return e(+r)},n}(0);function eg(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Pt){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Pt){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Xk(e,t){this._context=e,this._alpha=t}Xk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:eg(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const pF=function e(t){function n(r){return t?new Xk(r,t):new Jp(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Zk(e,t){this._context=e,this._alpha=t}Zk.prototype={areaStart:gi,areaEnd:gi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:eg(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const gF=function e(t){function n(r){return t?new Zk(r,t):new Qp(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Jk(e,t){this._context=e,this._alpha=t}Jk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:eg(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const vF=function e(t){function n(r){return t?new Jk(r,t):new Rp(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Qk(e){this._context=e}Qk.prototype={areaStart:gi,areaEnd:gi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function mF(e){return new Qk(e)}function Rk(e){return e<0?-1:1}function eS(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Rk(a)+Rk(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function tS(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function tg(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function du(e){this._context=e}du.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:tg(this,this._t0,tS(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,tg(this,tS(this,n=eS(this,e,t)),n);break;default:tg(this,this._t0,n=eS(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function nS(e){this._context=new rS(e)}(nS.prototype=Object.create(du.prototype)).point=function(e,t){du.prototype.point.call(this,t,e)};function rS(e){this._context=e}rS.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function yF(e){return new du(e)}function bF(e){return new nS(e)}function iS(e){this._context=e}iS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=aS(e),i=aS(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function aS(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function xF(e){return new iS(e)}function fu(e,t){this._context=e,this._t=t}fu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function _F(e){return new fu(e,.5)}function wF(e){return new fu(e,0)}function kF(e){return new fu(e,1)}function pa(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ga(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function SF(e,t){return e[t]}function hu(){var e=Me([]),t=ga,n=pa,r=SF;function i(a){var o=e.apply(this,arguments),s,l=a.length,c=o.length,u=new Array(c),d;for(s=0;s<c;++s){for(var f=o[s],g=u[s]=new Array(l),p=0,v;p<l;++p)g[p]=v=[0,+r(a[p],f,p,a)],v.data=a[p];g.key=f}for(s=0,d=t(u);s<c;++s)u[d[s]].index=s;return n(u,d),u}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Me(Vp.call(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:Me(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?ga:typeof a=="function"?a:Me(Vp.call(a)),i):t},i.offset=function(a){return arguments.length?(n=a??pa,i):n},i}function oS(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}pa(e,t)}}function sS(e,t){if((l=e.length)>0)for(var n,r=0,i,a,o,s,l,c=e[t[0]].length;r<c;++r)for(o=s=0,n=0;n<l;++n)(a=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=o,i[1]=o+=a):a<0?(i[1]=s,i[0]=s+=a):(i[0]=0,i[1]=a)}function lS(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}pa(e,t)}}function cS(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=u[r-1][1]||0,g=(d-f)/2,p=0;p<s;++p){var v=e[t[p]],m=v[r][1]||0,b=v[r-1][1]||0;g+=m-b}l+=d,c+=g*d}i[r-1][1]+=i[r-1][0]=n,l&&(n-=c/l)}i[r-1][1]+=i[r-1][0]=n,pa(e,t)}}function uS(e){var t=e.map(NF);return ga(e).sort(function(n,r){return t[n]-t[r]})}function NF(e){for(var t=-1,n=0,r=e.length,i,a=-1/0;++t<r;)(i=+e[t][1])>a&&(a=i,n=t);return n}function ng(e){var t=e.map(dS);return ga(e).sort(function(n,r){return t[n]-t[r]})}function dS(e){for(var t=0,n=-1,r=e.length,i;++n<r;)(i=+e[n][1])&&(t+=i);return t}function fS(e){return ng(e).reverse()}function hS(e){var t=e.length,n,r,i=e.map(dS),a=uS(e),o=0,s=0,l=[],c=[];for(n=0;n<t;++n)r=a[n],o<s?(o+=i[r],l.push(r)):(s+=i[r],c.push(r));return c.reverse().concat(l)}function pS(e){return ga(e).reverse()}const CF=Object.freeze(Object.defineProperty({__proto__:null,arc:Mk,area:Hp,areaRadial:Lk,curveBasis:sF,curveBasisClosed:lF,curveBasisOpen:cF,curveBundle:uF,curveCardinal:dF,curveCardinalClosed:fF,curveCardinalOpen:hF,curveCatmullRom:pF,curveCatmullRomClosed:gF,curveCatmullRomOpen:vF,curveLinear:ou,curveLinearClosed:mF,curveMonotoneX:yF,curveMonotoneY:bF,curveNatural:xF,curveStep:_F,curveStepAfter:kF,curveStepBefore:wF,line:su,lineRadial:Kp,linkHorizontal:Dk,linkRadial:Fk,linkVertical:Ik,pie:Ok,pointRadial:Ws,radialArea:Lk,radialLine:Kp,stack:hu,stackOffsetDiverging:sS,stackOffsetExpand:oS,stackOffsetNone:pa,stackOffsetSilhouette:lS,stackOffsetWiggle:cS,stackOrderAppearance:uS,stackOrderAscending:ng,stackOrderDescending:fS,stackOrderInsideOut:hS,stackOrderNone:ga,stackOrderReverse:pS,symbol:oF,symbolCircle:Gp,symbolCross:zk,symbolDiamond:jk,symbolSquare:Hk,symbolStar:Uk,symbolTriangle:qk,symbolWye:Kk,symbols:aF},Symbol.toStringTag,{value:"Module"}));function Ve(e,t){e(t)}var pu={ascending:ng,descending:fS,insideout:hS,none:ga,reverse:pS},EF=Object.keys(pu);function gu(e){return e&&pu[e]||pu.none}var vu={expand:oS,diverging:sS,none:pa,silhouette:lS,wiggle:cS},TF=Object.keys(vu);function mu(e){return e&&vu[e]||vu.none}function rg(e){var t=e===void 0?{}:e,n=t.innerRadius,r=t.outerRadius,i=t.cornerRadius,a=t.startAngle,o=t.endAngle,s=t.padAngle,l=t.padRadius,c=Mk();return n!=null&&Ve(c.innerRadius,n),r!=null&&Ve(c.outerRadius,r),i!=null&&Ve(c.cornerRadius,i),a!=null&&Ve(c.startAngle,a),o!=null&&Ve(c.endAngle,o),s!=null&&Ve(c.padAngle,s),l!=null&&Ve(c.padRadius,l),c}function yu(e){var t=e===void 0?{}:e,n=t.x,r=t.x0,i=t.x1,a=t.y,o=t.y0,s=t.y1,l=t.defined,c=t.curve,u=Hp();return n&&Ve(u.x,n),r&&Ve(u.x0,r),i&&Ve(u.x1,i),a&&Ve(u.y,a),o&&Ve(u.y0,o),s&&Ve(u.y1,s),l&&u.defined(l),c&&u.curve(c),u}function ig(e){var t=e===void 0?{}:e,n=t.x,r=t.y,i=t.defined,a=t.curve,o=su();return n&&Ve(o.x,n),r&&Ve(o.y,r),i&&o.defined(i),a&&o.curve(a),o}function gS(e){var t=e===void 0?{}:e,n=t.startAngle,r=t.endAngle,i=t.padAngle,a=t.value,o=t.sort,s=t.sortValues,l=Ok();return(o===null||o!=null)&&l.sort(o),(s===null||s!=null)&&l.sortValues(s),a!=null&&l.value(a),i!=null&&Ve(l.padAngle,i),n!=null&&Ve(l.startAngle,n),r!=null&&Ve(l.endAngle,r),l}function vS(e){var t=e===void 0?{}:e,n=t.angle,r=t.radius,i=t.defined,a=t.curve,o=Kp();return n&&Ve(o.angle,n),r&&Ve(o.radius,r),i&&o.defined(i),a&&o.curve(a),o}function mS(e){var t=e.keys,n=e.value,r=e.order,i=e.offset,a=hu();return t&&a.keys(t),n&&Ve(a.value,n),r&&a.order(gu(r)),i&&a.offset(mu(i)),a}var MF=["className","data","innerRadius","outerRadius","cornerRadius","startAngle","endAngle","padAngle","padRadius","children","innerRef"];function ag(){return ag=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ag.apply(this,arguments)}function $F(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function OF(e){var t=e.className,n=e.data,r=e.innerRadius,i=e.outerRadius,a=e.cornerRadius,o=e.startAngle,s=e.endAngle,l=e.padAngle,c=e.padRadius,u=e.children,d=e.innerRef,f=$F(e,MF),g=rg({innerRadius:r,outerRadius:i,cornerRadius:a,startAngle:o,endAngle:s,padAngle:l,padRadius:c});return u?_.createElement(_.Fragment,null,u({path:g})):!n&&(o==null||s==null||r==null||i==null)?(console.warn("[@visx/shape/Arc]: expected data because one of startAngle, endAngle, innerRadius, outerRadius is undefined. Bailing."),null):_.createElement("path",ag({ref:d,className:Te("visx-arc",t),d:g(n)||""},f))}var PF=["className","top","left","data","centroid","innerRadius","outerRadius","cornerRadius","startAngle","endAngle","padAngle","padRadius","pieSort","pieSortValues","pieValue","children","fill"];function og(){return og=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},og.apply(this,arguments)}function AF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function yS(e){var t=e.className,n=e.top,r=e.left,i=e.data,a=i===void 0?[]:i,o=e.centroid,s=e.innerRadius,l=s===void 0?0:s,c=e.outerRadius,u=e.cornerRadius,d=e.startAngle,f=e.endAngle,g=e.padAngle,p=e.padRadius,v=e.pieSort,m=e.pieSortValues,b=e.pieValue,y=e.children,x=e.fill,k=x===void 0?"":x,w=AF(e,PF),S=rg({innerRadius:l,outerRadius:c,cornerRadius:u,padRadius:p}),N=gS({startAngle:d,endAngle:f,padAngle:g,value:b,sort:v,sortValues:m}),C=N(a);return y?_.createElement(_.Fragment,null,y({arcs:C,path:S,pie:N})):_.createElement(Je,{className:"visx-pie-arcs-group",top:n,left:r},C.map(function(E,T){return _.createElement("g",{key:"pie-arc-"+T},_.createElement("path",og({className:Te("visx-pie-arc",t),d:S(E)||"",fill:k==null||typeof k=="string"?k:k(E)},w)),o==null?void 0:o(S.centroid(E),E))}))}var LF=["from","to","fill","className","innerRef"];function sg(){return sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sg.apply(this,arguments)}function DF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function lg(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,i=r===void 0?{x:1,y:1}:r,a=e.fill,o=a===void 0?"transparent":a,s=e.className,l=e.innerRef,c=DF(e,LF),u=n.x===i.x||n.y===i.y;return _.createElement("line",sg({ref:l,className:Te("visx-line",s),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:o,shapeRendering:u?"crispEdges":"auto"},c))}var IF=["children","data","x","y","fill","className","curve","innerRef","defined"];function cg(){return cg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cg.apply(this,arguments)}function FF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function po(e){var t=e.children,n=e.data,r=n===void 0?[]:n,i=e.x,a=e.y,o=e.fill,s=o===void 0?"transparent":o,l=e.className,c=e.curve,u=e.innerRef,d=e.defined,f=d===void 0?function(){return!0}:d,g=FF(e,IF),p=ig({x:i,y:a,defined:f,curve:c});return t?_.createElement(_.Fragment,null,t({path:p})):_.createElement("path",cg({ref:u,className:Te("visx-linepath",l),d:p(r)||"",fill:s,strokeLinecap:"round"},g))}var zF=["className","angle","radius","defined","curve","data","innerRef","children","fill"];function ug(){return ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ug.apply(this,arguments)}function BF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function jF(e){var t=e.className,n=e.angle,r=e.radius,i=e.defined,a=e.curve,o=e.data,s=o===void 0?[]:o,l=e.innerRef,c=e.children,u=e.fill,d=u===void 0?"transparent":u,f=BF(e,zF),g=vS({angle:n,radius:r,defined:i,curve:a});return c?_.createElement(_.Fragment,null,c({path:g})):_.createElement("path",ug({ref:l,className:Te("visx-line-radial",t),d:g(s)||"",fill:d},f))}var WF=["children","x","x0","x1","y","y0","y1","data","defined","className","curve","innerRef"];function dg(){return dg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dg.apply(this,arguments)}function UF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function HF(e){var t=e.children,n=e.x,r=e.x0,i=e.x1,a=e.y,o=e.y0,s=e.y1,l=e.data,c=l===void 0?[]:l,u=e.defined,d=u===void 0?function(){return!0}:u,f=e.className,g=e.curve,p=e.innerRef,v=UF(e,WF),m=yu({x:n,x0:r,x1:i,y:a,y0:o,y1:s,defined:d,curve:g});return t?_.createElement(_.Fragment,null,t({path:m})):_.createElement("path",dg({ref:p,className:Te("visx-area",f),d:m(c)||""},v))}var qF=["x","x0","x1","y","y1","y0","yScale","data","defined","className","curve","innerRef","children"];function fg(){return fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fg.apply(this,arguments)}function KF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function hg(e){var t=e.x,n=e.x0,r=e.x1,i=e.y,a=e.y1,o=e.y0,s=e.yScale,l=e.data,c=l===void 0?[]:l,u=e.defined,d=u===void 0?function(){return!0}:u,f=e.className,g=e.curve,p=e.innerRef,v=e.children,m=KF(e,qF),b=yu({x:t,x0:n,x1:r,defined:d,curve:g});return o==null?b.y0(s.range()[0]):Ve(b.y0,o),i&&!a&&Ve(b.y1,i),a&&!i&&Ve(b.y1,a),v?_.createElement(_.Fragment,null,v({path:b})):_.createElement("path",fg({ref:p,className:Te("visx-area-closed",f),d:b(c)||""},m))}var VF=["className","top","left","keys","data","curve","defined","x","x0","x1","y0","y1","value","order","offset","color","children"];function pg(){return pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pg.apply(this,arguments)}function YF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function bS(e){var t=e.className,n=e.top,r=e.left,i=e.keys,a=e.data,o=e.curve,s=e.defined,l=e.x,c=e.x0,u=e.x1,d=e.y0,f=e.y1,g=e.value,p=e.order,v=e.offset,m=e.color,b=e.children,y=YF(e,VF),x=mS({keys:i,value:g,order:p,offset:v}),k=yu({x:l,x0:c,x1:u,y0:d,y1:f,curve:o,defined:s}),w=x(a);return b?_.createElement(_.Fragment,null,b({stacks:w,path:k,stack:x})):_.createElement(Je,{top:n,left:r},w.map(function(S,N){return _.createElement("path",pg({className:Te("visx-stack",t),key:"stack-"+N+"-"+(S.key||""),d:k(S)||"",fill:m==null?void 0:m(S.key,N)},y))}))}var GF=["className","top","left","keys","data","curve","defined","x","x0","x1","y0","y1","value","order","offset","color","children"];function bu(){return bu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bu.apply(this,arguments)}function XF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function ZF(e){var t=e.className,n=e.top,r=e.left,i=e.keys,a=e.data,o=e.curve,s=e.defined,l=e.x,c=e.x0,u=e.x1,d=e.y0,f=e.y1,g=e.value,p=e.order,v=e.offset,m=e.color,b=e.children,y=XF(e,GF);return _.createElement(bS,bu({className:t,top:n,left:r,keys:i,data:a,curve:o,defined:s,x:l,x0:c,x1:u,y0:d,y1:f,value:g,order:p,offset:v,color:m},y),b||function(x){var k=x.stacks,w=x.path;return k.map(function(S,N){return _.createElement("path",bu({className:Te("visx-area-stack",t),key:"area-stack-"+N+"-"+(S.key||""),d:w(S)||"",fill:m==null?void 0:m(S.key,N)},y))})})}var JF=["className","innerRef"];function gg(){return gg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gg.apply(this,arguments)}function QF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function vi(e){var t=e.className,n=e.innerRef,r=QF(e,JF);return _.createElement("rect",gg({ref:n,className:Te("visx-bar",t)},r))}var RF=["children","className","innerRef","x","y","width","height","radius","all","top","bottom","left","right","topLeft","topRight","bottomLeft","bottomRight"];function vg(){return vg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vg.apply(this,arguments)}function e3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function t3(e){var t=e.all,n=e.bottom,r=e.bottomLeft,i=e.bottomRight,a=e.height,o=e.left,s=e.radius,l=e.right,c=e.top,u=e.topLeft,d=e.topRight,f=e.width,g=e.x,p=e.y;d=t||c||l||d,i=t||n||l||i,r=t||n||o||r,u=t||c||o||u,s=Math.max(1,Math.min(s,Math.min(f,a)/2));var v=2*s,m=("M"+(g+s)+","+p+" h"+(f-v)+`
298
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",o=0;o<arguments.length;o++){var s=arguments[o];s&&(a=i(a,r(s)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var o="";for(var s in a)t.call(a,s)&&a[s]&&(o=i(o,s));return o}function i(a,o){return o?a?a+" "+o:a+o:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(h_);var zr=h_.exports;const $e=_s(zr);var SA=["top","left","transform","className","children","innerRef"];function Jh(){return Jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jh.apply(this,arguments)}function NA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function tt(e){var t=e.top,n=t===void 0?0:t,r=e.left,i=r===void 0?0:r,a=e.transform,o=e.className,s=e.children,l=e.innerRef,c=NA(e,SA);return _.createElement("g",Jh({ref:l,className:$e("visx-group",o),transform:a||"translate("+i+", "+n+")"},c),s)}tt.propTypes={top:V.number,left:V.number,transform:V.string,className:V.string,children:V.node,innerRef:V.oneOfType([V.string,V.func,V.object])};const EA=Object.freeze(Object.defineProperty({__proto__:null,Group:tt},Symbol.toStringTag,{value:"Module"}));function fi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function CA(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Xc(e){let t,n,r;e.length!==2?(t=fi,n=(s,l)=>fi(e(s),l),r=(s,l)=>e(s)-l):(t=e===fi||e===CA?e:TA,n=e,r=e);function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<0?c=d+1:u=d}while(c<u)}return c}function a(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function o(s,l,c=0,u=s.length){const d=i(s,l,c,u-1);return d>c&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:o,right:a}}function TA(){return 0}function p_(e){return e===null?NaN:+e}function*MA(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const g_=Xc(fi),Es=g_.right,$A=g_.left;Xc(p_).center;function v_(e,t){let n,r;for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));return[n,r]}class m_ extends Map{constructor(t,n=AA){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(y_(this,t))}has(t){return super.has(y_(this,t))}set(t,n){return super.set(OA(this,t),n)}delete(t){return super.delete(PA(this,t))}}function y_({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function OA({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function PA({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function AA(e){return e!==null&&typeof e=="object"?e.valueOf():e}function LA(e=fi){if(e===fi)return b_;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function b_(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var Qh=Math.sqrt(50),Rh=Math.sqrt(10),ep=Math.sqrt(2);function tp(e,t,n){var r,i=-1,a,o,s;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t<e)&&(a=e,e=t,t=a),(s=x_(e,t,n))===0||!isFinite(s))return[];if(s>0){let l=Math.round(e/s),c=Math.round(t/s);for(l*s<e&&++l,c*s>t&&--c,o=new Array(a=c-l+1);++i<a;)o[i]=(l+i)*s}else{s=-s;let l=Math.round(e*s),c=Math.round(t*s);for(l/s<e&&++l,c/s>t&&--c,o=new Array(a=c-l+1);++i<a;)o[i]=(l+i)/s}return r&&o.reverse(),o}function x_(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=Qh?10:a>=Rh?5:a>=ep?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=Qh?10:a>=Rh?5:a>=ep?2:1)}function np(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=Qh?i*=10:a>=Rh?i*=5:a>=ep&&(i*=2),t<e?-i:i}function __(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function w_(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function k_(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?b_:LA(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),g=Math.max(n,Math.floor(t-c*d/l+f)),p=Math.min(r,Math.floor(t+(l-c)*d/l+f));k_(e,t,g,p,i)}const a=e[t];let o=n,s=r;for(Cs(e,n,t),i(e[r],a)>0&&Cs(e,n,r);o<s;){for(Cs(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?Cs(e,n,s):(++s,Cs(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Cs(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function DA(e,t,n){if(e=Float64Array.from(MA(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return w_(e);if(t>=1)return __(e);var r,i=(r-1)*t,a=Math.floor(i),o=__(k_(e,a).subarray(0,a+1)),s=w_(e.subarray(a+1));return o+(s-o)*(i-a)}}function IA(e,t,n=p_){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function S_(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function bn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Br(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const rp=Symbol("implicit");function Zc(){var e=new m_,t=[],n=[],r=rp;function i(a){let o=e.get(a);if(o===void 0){if(r!==rp)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new m_;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Zc(t,n).unknown(r)},bn.apply(i,arguments),i}function Jc(){var e=Zc().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var f=t().length,g=i<r,p=g?i:r,v=g?r:i;a=(v-p)/Math.max(1,f-l+c*2),s&&(a=Math.floor(a)),p+=(v-p-a*(f-l))*u,o=a*(1-l),s&&(p=Math.round(p),o=Math.round(o));var m=S_(f).map(function(x){return p+a*x});return n(g?m.reverse():m)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,d()):c},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return Jc(t(),[r,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},bn.apply(d(),arguments)}function N_(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return N_(t())},e}function E_(){return N_(Jc.apply(null,arguments).paddingInner(1))}function uo(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ts(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function hi(){}var ia=.7,fo=1/ia,ho="\\s*([+-]?\\d+)\\s*",Ms="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",hr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",FA=/^#([0-9a-f]{3,8})$/,zA=new RegExp(`^rgb\\(${ho},${ho},${ho}\\)$`),BA=new RegExp(`^rgb\\(${hr},${hr},${hr}\\)$`),jA=new RegExp(`^rgba\\(${ho},${ho},${ho},${Ms}\\)$`),WA=new RegExp(`^rgba\\(${hr},${hr},${hr},${Ms}\\)$`),UA=new RegExp(`^hsl\\(${Ms},${hr},${hr}\\)$`),HA=new RegExp(`^hsla\\(${Ms},${hr},${hr},${Ms}\\)$`),C_={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};uo(hi,$s,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:T_,formatHex:T_,formatHex8:qA,formatHsl:VA,formatRgb:M_,toString:M_});function T_(){return this.rgb().formatHex()}function qA(){return this.rgb().formatHex8()}function VA(){return L_(this).formatHsl()}function M_(){return this.rgb().formatRgb()}function $s(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=FA.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?$_(t):n===3?new mt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Qc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Qc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=zA.exec(e))?new mt(t[1],t[2],t[3],1):(t=BA.exec(e))?new mt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=jA.exec(e))?Qc(t[1],t[2],t[3],t[4]):(t=WA.exec(e))?Qc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=UA.exec(e))?A_(t[1],t[2]/100,t[3]/100,1):(t=HA.exec(e))?A_(t[1],t[2]/100,t[3]/100,t[4]):C_.hasOwnProperty(e)?$_(C_[e]):e==="transparent"?new mt(NaN,NaN,NaN,0):null}function $_(e){return new mt(e>>16&255,e>>8&255,e&255,1)}function Qc(e,t,n,r){return r<=0&&(e=t=n=NaN),new mt(e,t,n,r)}function ip(e){return e instanceof hi||(e=$s(e)),e?(e=e.rgb(),new mt(e.r,e.g,e.b,e.opacity)):new mt}function Rc(e,t,n,r){return arguments.length===1?ip(e):new mt(e,t,n,r??1)}function mt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}uo(mt,Rc,Ts(hi,{brighter(e){return e=e==null?fo:Math.pow(fo,e),new mt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ia:Math.pow(ia,e),new mt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new mt(aa(this.r),aa(this.g),aa(this.b),eu(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:O_,formatHex:O_,formatHex8:KA,formatRgb:P_,toString:P_}));function O_(){return`#${oa(this.r)}${oa(this.g)}${oa(this.b)}`}function KA(){return`#${oa(this.r)}${oa(this.g)}${oa(this.b)}${oa((isNaN(this.opacity)?1:this.opacity)*255)}`}function P_(){const e=eu(this.opacity);return`${e===1?"rgb(":"rgba("}${aa(this.r)}, ${aa(this.g)}, ${aa(this.b)}${e===1?")":`, ${e})`}`}function eu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function aa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function oa(e){return e=aa(e),(e<16?"0":"")+e.toString(16)}function A_(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Hn(e,t,n,r)}function L_(e){if(e instanceof Hn)return new Hn(e.h,e.s,e.l,e.opacity);if(e instanceof hi||(e=$s(e)),!e)return new Hn;if(e instanceof Hn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new Hn(o,s,l,e.opacity)}function ap(e,t,n,r){return arguments.length===1?L_(e):new Hn(e,t,n,r??1)}function Hn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}uo(Hn,ap,Ts(hi,{brighter(e){return e=e==null?fo:Math.pow(fo,e),new Hn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ia:Math.pow(ia,e),new Hn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new mt(op(e>=240?e-240:e+120,i,r),op(e,i,r),op(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Hn(D_(this.h),tu(this.s),tu(this.l),eu(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(){const e=eu(this.opacity);return`${e===1?"hsl(":"hsla("}${D_(this.h)}, ${tu(this.s)*100}%, ${tu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function D_(e){return e=(e||0)%360,e<0?e+360:e}function tu(e){return Math.max(0,Math.min(1,e||0))}function op(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const I_=Math.PI/180,F_=180/Math.PI,nu=18,z_=.96422,B_=1,j_=.82521,W_=4/29,po=6/29,U_=3*po*po,YA=po*po*po;function H_(e){if(e instanceof pr)return new pr(e.l,e.a,e.b,e.opacity);if(e instanceof jr)return q_(e);e instanceof mt||(e=ip(e));var t=dp(e.r),n=dp(e.g),r=dp(e.b),i=lp((.2225045*t+.7168786*n+.0606169*r)/B_),a,o;return t===n&&n===r?a=o=i:(a=lp((.4360747*t+.3850649*n+.1430804*r)/z_),o=lp((.0139322*t+.0971045*n+.7141733*r)/j_)),new pr(116*i-16,500*(a-i),200*(i-o),e.opacity)}function sp(e,t,n,r){return arguments.length===1?H_(e):new pr(e,t,n,r??1)}function pr(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}uo(pr,sp,Ts(hi,{brighter(e){return new pr(this.l+nu*(e??1),this.a,this.b,this.opacity)},darker(e){return new pr(this.l-nu*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=z_*cp(t),e=B_*cp(e),n=j_*cp(n),new mt(up(3.1338561*t-1.6168667*e-.4906146*n),up(-.9787684*t+1.9161415*e+.033454*n),up(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function lp(e){return e>YA?Math.pow(e,1/3):e/U_+W_}function cp(e){return e>po?e*e*e:U_*(e-W_)}function up(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function dp(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function GA(e){if(e instanceof jr)return new jr(e.h,e.c,e.l,e.opacity);if(e instanceof pr||(e=H_(e)),e.a===0&&e.b===0)return new jr(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*F_;return new jr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function fp(e,t,n,r){return arguments.length===1?GA(e):new jr(e,t,n,r??1)}function jr(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function q_(e){if(isNaN(e.h))return new pr(e.l,0,0,e.opacity);var t=e.h*I_;return new pr(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}uo(jr,fp,Ts(hi,{brighter(e){return new jr(this.h,this.c,this.l+nu*(e??1),this.opacity)},darker(e){return new jr(this.h,this.c,this.l-nu*(e??1),this.opacity)},rgb(){return q_(this).rgb()}}));var V_=-.14861,hp=1.78277,pp=-.29227,ru=-.90649,Os=1.97294,K_=Os*ru,Y_=Os*hp,G_=hp*pp-ru*V_;function XA(e){if(e instanceof sa)return new sa(e.h,e.s,e.l,e.opacity);e instanceof mt||(e=ip(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(G_*r+K_*t-Y_*n)/(G_+K_-Y_),a=r-i,o=(Os*(n-i)-pp*a)/ru,s=Math.sqrt(o*o+a*a)/(Os*i*(1-i)),l=s?Math.atan2(o,a)*F_-120:NaN;return new sa(l<0?l+360:l,s,i,e.opacity)}function gp(e,t,n,r){return arguments.length===1?XA(e):new sa(e,t,n,r??1)}function sa(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}uo(sa,gp,Ts(hi,{brighter(e){return e=e==null?fo:Math.pow(fo,e),new sa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ia:Math.pow(ia,e),new sa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*I_,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new mt(255*(t+n*(V_*r+hp*i)),255*(t+n*(pp*r+ru*i)),255*(t+n*(Os*r)),this.opacity)}}));function X_(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function Z_(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return X_((n-r/t)*t,o,i,a,s)}}function J_(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],a=e[r%t],o=e[(r+1)%t],s=e[(r+2)%t];return X_((n-r/t)*t,i,a,o,s)}}const iu=e=>()=>e;function Q_(e,t){return function(n){return e+n*t}}function ZA(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function au(e,t){var n=t-e;return n?Q_(e,n>180||n<-180?n-360*Math.round(n/360):n):iu(isNaN(e)?t:e)}function JA(e){return(e=+e)==1?yt:function(t,n){return n-t?ZA(t,n,e):iu(isNaN(t)?n:t)}}function yt(e,t){var n=t-e;return n?Q_(e,n):iu(isNaN(e)?t:e)}const ou=function e(t){var n=JA(t);function r(i,a){var o=n((i=Rc(i)).r,(a=Rc(a)).r),s=n(i.g,a.g),l=n(i.b,a.b),c=yt(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r}(1);function R_(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o,s;for(o=0;o<n;++o)s=Rc(t[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=e(r),i=e(i),a=e(a),s.opacity=1,function(l){return s.r=r(l),s.g=i(l),s.b=a(l),s+""}}}var QA=R_(Z_),RA=R_(J_);function vp(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function ew(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function eL(e,t){return(ew(t)?vp:tw)(e,t)}function tw(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=la(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(s){for(o=0;o<r;++o)a[o]=i[o](s);return a}}function nw(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function qn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function rw(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=la(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var mp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,yp=new RegExp(mp.source,"g");function tL(e){return function(){return e}}function nL(e){return function(t){return e(t)+""}}function iw(e,t){var n=mp.lastIndex=yp.lastIndex=0,r,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(r=mp.exec(e))&&(i=yp.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:qn(r,i)})),n=yp.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?nL(l[0].x):tL(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function la(e,t){var n=typeof t,r;return t==null||n==="boolean"?iu(t):(n==="number"?qn:n==="string"?(r=$s(t))?(t=r,ou):iw:t instanceof $s?ou:t instanceof Date?nw:ew(t)?vp:Array.isArray(t)?tw:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?rw:qn)(e,t)}function rL(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function iL(e,t){var n=au(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ps(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var aw=180/Math.PI,bp={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ow(e,t,n,r,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*aw,skewX:Math.atan(l)*aw,scaleX:o,scaleY:s}}var su;function aL(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?bp:ow(t.a,t.b,t.c,t.d,t.e,t.f)}function oL(e){return e==null||(su||(su=document.createElementNS("http://www.w3.org/2000/svg","g")),su.setAttribute("transform",e),!(e=su.transform.baseVal.consolidate()))?bp:(e=e.matrix,ow(e.a,e.b,e.c,e.d,e.e,e.f))}function sw(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function a(c,u,d,f,g,p){if(c!==d||u!==f){var v=g.push("translate(",null,t,null,n);p.push({i:v-4,x:qn(c,d)},{i:v-2,x:qn(u,f)})}else(d||f)&&g.push("translate("+d+t+f+n)}function o(c,u,d,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:d.push(i(d)+"rotate(",null,r)-2,x:qn(c,u)})):u&&d.push(i(d)+"rotate("+u+r)}function s(c,u,d,f){c!==u?f.push({i:d.push(i(d)+"skewX(",null,r)-2,x:qn(c,u)}):u&&d.push(i(d)+"skewX("+u+r)}function l(c,u,d,f,g,p){if(c!==d||u!==f){var v=g.push(i(g)+"scale(",null,",",null,")");p.push({i:v-4,x:qn(c,d)},{i:v-2,x:qn(u,f)})}else(d!==1||f!==1)&&g.push(i(g)+"scale("+d+","+f+")")}return function(c,u){var d=[],f=[];return c=e(c),u=e(u),a(c.translateX,c.translateY,u.translateX,u.translateY,d,f),o(c.rotate,u.rotate,d,f),s(c.skewX,u.skewX,d,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,f),c=u=null,function(g){for(var p=-1,v=f.length,m;++p<v;)d[(m=f[p]).i]=m.x(g);return d.join("")}}}var sL=sw(aL,"px, ","px)","deg)"),lL=sw(oL,", ",")",")"),cL=1e-12;function lw(e){return((e=Math.exp(e))+1/e)/2}function uL(e){return((e=Math.exp(e))-1/e)/2}function dL(e){return((e=Math.exp(2*e))-1)/(e+1)}const fL=function e(t,n,r){function i(a,o){var s=a[0],l=a[1],c=a[2],u=o[0],d=o[1],f=o[2],g=u-s,p=d-l,v=g*g+p*p,m,x;if(v<cL)x=Math.log(f/c)/t,m=function(N){return[s+N*g,l+N*p,c*Math.exp(t*N*x)]};else{var y=Math.sqrt(v),b=(f*f-c*c+r*v)/(2*c*n*y),k=(f*f-c*c-r*v)/(2*f*n*y),w=Math.log(Math.sqrt(b*b+1)-b),S=Math.log(Math.sqrt(k*k+1)-k);x=(S-w)/t,m=function(N){var E=N*x,C=lw(w),T=c/(n*y)*(C*dL(t*E+w)-uL(w));return[s+T*g,l+T*p,c*C/lw(t*E+w)]}}return m.duration=x*1e3*t/Math.SQRT2,m}return i.rho=function(a){var o=Math.max(.001,+a),s=o*o,l=s*s;return e(o,s,l)},i}(Math.SQRT2,2,4);function cw(e){return function(t,n){var r=e((t=ap(t)).h,(n=ap(n)).h),i=yt(t.s,n.s),a=yt(t.l,n.l),o=yt(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=i(s),t.l=a(s),t.opacity=o(s),t+""}}}const uw=cw(au);var dw=cw(yt);function fw(e,t){var n=yt((e=sp(e)).l,(t=sp(t)).l),r=yt(e.a,t.a),i=yt(e.b,t.b),a=yt(e.opacity,t.opacity);return function(o){return e.l=n(o),e.a=r(o),e.b=i(o),e.opacity=a(o),e+""}}function hw(e){return function(t,n){var r=e((t=fp(t)).h,(n=fp(n)).h),i=yt(t.c,n.c),a=yt(t.l,n.l),o=yt(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=i(s),t.l=a(s),t.opacity=o(s),t+""}}}const pw=hw(au);var gw=hw(yt);function vw(e){return function t(n){n=+n;function r(i,a){var o=e((i=gp(i)).h,(a=gp(a)).h),s=yt(i.s,a.s),l=yt(i.l,a.l),c=yt(i.opacity,a.opacity);return function(u){return i.h=o(u),i.s=s(u),i.l=l(Math.pow(u,n)),i.opacity=c(u),i+""}}return r.gamma=t,r}(1)}const mw=vw(au);var yw=vw(yt);function bw(e,t){t===void 0&&(t=e,e=la);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(o){var s=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[s](o-s)}}function hL(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}function pL(e){return function(){return e}}function lu(e){return+e}var xw=[0,1];function It(e){return e}function xp(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:pL(isNaN(t)?NaN:.5)}function gL(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function vL(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=xp(i,r),a=n(o,a)):(r=xp(r,i),a=n(a,o)),function(s){return a(r(s))}}function mL(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=xp(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(s){var l=Es(e,s,1,r)-1;return a[l](i[l](s))}}function As(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function cu(){var e=xw,t=xw,n=la,r,i,a,o=It,s,l,c;function u(){var f=Math.min(e.length,t.length);return o!==It&&(o=gL(e[0],e[f-1])),s=f>2?mL:vL,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?a:(l||(l=s(e.map(r),t,n)))(r(o(f)))}return d.invert=function(f){return o(i((c||(c=s(t,e.map(r),qn)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,lu),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=Ps,u()},d.clamp=function(f){return arguments.length?(o=f?!0:It,u()):o!==It},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(a=f,d):a},function(f,g){return r=f,i=g,u()}}function _p(){return cu()(It,It)}function yL(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function uu(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function go(e){return e=uu(Math.abs(e)),e?e[1]:NaN}function bL(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function xL(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var _L=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ls(e){if(!(t=_L.exec(e)))throw new Error("invalid format: "+e);var t;return new wp({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ls.prototype=wp.prototype;function wp(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}wp.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 wL(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var _w;function kL(e,t){var n=uu(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(_w=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+uu(e,Math.max(0,t+a-1))[0]}function ww(e,t){var n=uu(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const kw={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:yL,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>ww(e*100,t),r:ww,s:kL,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Sw(e){return e}var Nw=Array.prototype.map,Ew=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function SL(e){var t=e.grouping===void 0||e.thousands===void 0?Sw:bL(Nw.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?Sw:xL(Nw.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=Ls(d);var f=d.fill,g=d.align,p=d.sign,v=d.symbol,m=d.zero,x=d.width,y=d.comma,b=d.precision,k=d.trim,w=d.type;w==="n"?(y=!0,w="g"):kw[w]||(b===void 0&&(b=12),k=!0,w="g"),(m||f==="0"&&g==="=")&&(m=!0,f="0",g="=");var S=v==="$"?n:v==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",N=v==="$"?r:/[%p]/.test(w)?o:"",E=kw[w],C=/[defgprs%]/.test(w);b=b===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function T(O){var P=S,M=N,$,A,I;if(w==="c")M=E(O)+M,O="";else{O=+O;var j=O<0||1/O<0;if(O=isNaN(O)?l:E(Math.abs(O),b),k&&(O=wL(O)),j&&+O==0&&p!=="+"&&(j=!1),P=(j?p==="("?p:s:p==="-"||p==="("?"":p)+P,M=(w==="s"?Ew[8+_w/3]:"")+M+(j&&p==="("?")":""),C){for($=-1,A=O.length;++$<A;)if(I=O.charCodeAt($),48>I||I>57){M=(I===46?i+O.slice($+1):O.slice($))+M,O=O.slice(0,$);break}}}y&&!m&&(O=t(O,1/0));var B=P.length+O.length+M.length,H=B<x?new Array(x-B+1).join(f):"";switch(y&&m&&(O=t(H+O,H.length?x-M.length:1/0),H=""),g){case"<":O=P+O+M+H;break;case"=":O=P+H+O+M;break;case"^":O=H.slice(0,B=H.length>>1)+P+O+M+H.slice(B);break;default:O=H+P+O+M;break}return a(O)}return T.toString=function(){return d+""},T}function u(d,f){var g=c((d=Ls(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(go(f)/3)))*3,v=Math.pow(10,-p),m=Ew[8+p/3];return function(x){return g(v*x)+m}}return{format:c,formatPrefix:u}}var du,kp,Cw;NL({thousands:",",grouping:[3],currency:["$",""]});function NL(e){return du=SL(e),kp=du.format,Cw=du.formatPrefix,du}function EL(e){return Math.max(0,-go(Math.abs(e)))}function CL(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(go(t)/3)))*3-go(Math.abs(e)))}function TL(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,go(t)-go(e))+1}function Tw(e,t,n,r){var i=np(e,t,n),a;switch(r=Ls(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=CL(i,o))&&(r.precision=a),Cw(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=TL(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=EL(i))&&(r.precision=a-(r.type==="%")*2);break}}return kp(r)}function pi(e){var t=e.domain;return e.ticks=function(n){var r=t();return tp(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Tw(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],l,c,u=10;for(s<o&&(c=o,o=s,s=c,c=i,i=a,a=c);u-- >0;){if(c=x_(o,s,n),c===l)return r[i]=o,r[a]=s,t(r);if(c>0)o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c;else if(c<0)o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function Sp(){var e=_p();return e.copy=function(){return As(e,Sp())},bn.apply(e,arguments),pi(e)}function Mw(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,lu),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Mw(e).unknown(t)},e=arguments.length?Array.from(e,lu):[0,1],pi(n)}function $w(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function Ow(e){return Math.log(e)}function Pw(e){return Math.exp(e)}function ML(e){return-Math.log(-e)}function $L(e){return-Math.exp(-e)}function OL(e){return isFinite(e)?+("1e"+e):e<0?0:e}function PL(e){return e===10?OL:e===Math.E?Math.exp:t=>Math.pow(e,t)}function AL(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Aw(e){return(t,n)=>-e(-t,n)}function Np(e){const t=e(Ow,Pw),n=t.domain;let r=10,i,a;function o(){return i=AL(r),a=PL(r),n()[0]<0?(i=Aw(i),a=Aw(a),e(ML,$L)):e(Ow,Pw),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let f=i(c),g=i(u),p,v;const m=s==null?10:+s;let x=[];if(!(r%1)&&g-f<m){if(f=Math.floor(f),g=Math.ceil(g),c>0){for(;f<=g;++f)for(p=1;p<r;++p)if(v=f<0?p/a(-f):p*a(f),!(v<c)){if(v>u)break;x.push(v)}}else for(;f<=g;++f)for(p=r-1;p>=1;--p)if(v=f>0?p/a(-f):p*a(f),!(v<c)){if(v>u)break;x.push(v)}x.length*2<m&&(x=tp(c,u,m))}else x=tp(f,g,Math.min(g-f,m)).map(a);return d?x.reverse():x},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Ls(l)).precision==null&&(l.trim=!0),l=kp(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/a(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n($w(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function Ep(){const e=Np(cu()).domain([1,10]);return e.copy=()=>As(e,Ep()).base(e.base()),bn.apply(e,arguments),e}function Lw(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Dw(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Cp(e){var t=1,n=e(Lw(t),Dw(t));return n.constant=function(r){return arguments.length?e(Lw(t=+r),Dw(t)):t},pi(n)}function Tp(){var e=Cp(cu());return e.copy=function(){return As(e,Tp()).constant(e.constant())},bn.apply(e,arguments)}function Iw(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function LL(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function DL(e){return e<0?-e*e:e*e}function Mp(e){var t=e(It,It),n=1;function r(){return n===1?e(It,It):n===.5?e(LL,DL):e(Iw(n),Iw(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},pi(t)}function fu(){var e=Mp(cu());return e.copy=function(){return As(e,fu()).exponent(e.exponent())},bn.apply(e,arguments),e}function Fw(){return fu.apply(null,arguments).exponent(.5)}function zw(e){return Math.sign(e)*e*e}function IL(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function $p(){var e=_p(),t=[0,1],n=!1,r;function i(a){var o=IL(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(zw(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,lu)).map(zw)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return $p(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},bn.apply(i,arguments),pi(i)}function Op(){var e=[],t=[],n=[],r;function i(){var o=0,s=Math.max(1,t.length);for(n=new Array(s-1);++o<s;)n[o-1]=IA(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?r:t[Es(n,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(fi),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return Op().domain(e).range(t).unknown(r)},bn.apply(a,arguments)}function Pp(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(l){return l!=null&&l<=l?i[Es(r,l,0,n)]:a}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},o.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Pp().domain([e,t]).range(i).unknown(a)},bn.apply(pi(o),arguments)}function Ap(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Es(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Ap().domain(e).range(t).unknown(n)},bn.apply(i,arguments)}const Lp=new Date,Dp=new Date;function st(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return l;let c;do l.push(c=new Date(+a)),t(a,s),e(a);while(c<a&&a<o);return l},i.filter=a=>st(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(Lp.setTime(+a),Dp.setTime(+o),e(Lp),e(Dp),Math.floor(n(Lp,Dp))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const vo=st(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);vo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?st(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):vo);const Bw=vo.range,Wr=1e3,xn=Wr*60,Ur=xn*60,Hr=Ur*24,Ip=Hr*7,jw=Hr*30,Fp=Hr*365,Vn=st(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Wr)},(e,t)=>(t-e)/Wr,e=>e.getUTCSeconds()),Ww=Vn.range,Ds=st(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wr)},(e,t)=>{e.setTime(+e+t*xn)},(e,t)=>(t-e)/xn,e=>e.getMinutes()),FL=Ds.range,Is=st(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*xn)},(e,t)=>(t-e)/xn,e=>e.getUTCMinutes()),zL=Is.range,Fs=st(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wr-e.getMinutes()*xn)},(e,t)=>{e.setTime(+e+t*Ur)},(e,t)=>(t-e)/Ur,e=>e.getHours()),BL=Fs.range,zs=st(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ur)},(e,t)=>(t-e)/Ur,e=>e.getUTCHours()),jL=zs.range,ca=st(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xn)/Hr,e=>e.getDate()-1),WL=ca.range,mo=st(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Hr,e=>e.getUTCDate()-1),UL=mo.range,zp=st(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Hr,e=>Math.floor(e/Hr)),HL=zp.range;function ua(e){return st(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*xn)/Ip)}const da=ua(0),Bs=ua(1),Uw=ua(2),Hw=ua(3),fa=ua(4),qw=ua(5),Vw=ua(6),Kw=da.range,qL=Bs.range,VL=Uw.range,KL=Hw.range,YL=fa.range,GL=qw.range,XL=Vw.range;function ha(e){return st(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Ip)}const pa=ha(0),js=ha(1),Yw=ha(2),Gw=ha(3),ga=ha(4),Xw=ha(5),Zw=ha(6),Jw=pa.range,ZL=js.range,JL=Yw.range,QL=Gw.range,RL=ga.range,eD=Xw.range,tD=Zw.range,Ws=st(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),nD=Ws.range,Us=st(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),rD=Us.range,Kn=st(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Kn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:st(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});const iD=Kn.range,Yn=st(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Yn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:st(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});const aD=Yn.range;function Qw(e,t,n,r,i,a){const o=[[Vn,1,Wr],[Vn,5,5*Wr],[Vn,15,15*Wr],[Vn,30,30*Wr],[a,1,xn],[a,5,5*xn],[a,15,15*xn],[a,30,30*xn],[i,1,Ur],[i,3,3*Ur],[i,6,6*Ur],[i,12,12*Ur],[r,1,Hr],[r,2,2*Hr],[n,1,Ip],[t,1,jw],[t,3,3*jw],[e,1,Fp]];function s(c,u,d){const f=u<c;f&&([c,u]=[u,c]);const g=d&&typeof d.range=="function"?d:l(c,u,d),p=g?g.range(c,+u+1):[];return f?p.reverse():p}function l(c,u,d){const f=Math.abs(u-c)/d,g=Xc(([,,m])=>m).right(o,f);if(g===o.length)return e.every(np(c/Fp,u/Fp,d));if(g===0)return vo.every(Math.max(np(c,u,d),1));const[p,v]=o[f/o[g-1][2]<o[g][2]/f?g-1:g];return p.every(v)}return[s,l]}const[Rw,ek]=Qw(Yn,Us,pa,zp,zs,Is),[tk,nk]=Qw(Kn,Ws,da,ca,Fs,Ds);function Bp(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function jp(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Hs(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function oD(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,c=qs(i),u=Vs(i),d=qs(a),f=Vs(a),g=qs(o),p=Vs(o),v=qs(s),m=Vs(s),x=qs(l),y=Vs(l),b={a:j,A:B,b:H,B:F,c:null,d:lk,e:lk,f:MD,g:BD,G:WD,H:ED,I:CD,j:TD,L:ck,m:$D,M:OD,p:D,q:W,Q:gk,s:vk,S:PD,u:AD,U:LD,V:DD,w:ID,W:FD,x:null,X:null,y:zD,Y:jD,Z:UD,"%":pk},k={a:Y,A:U,b:K,B:ee,c:null,d:dk,e:dk,f:KD,g:nI,G:iI,H:HD,I:qD,j:VD,L:fk,m:YD,M:GD,p:ie,q:ce,Q:gk,s:vk,S:XD,u:ZD,U:JD,V:QD,w:RD,W:eI,x:null,X:null,y:tI,Y:rI,Z:aI,"%":pk},w={a:T,A:O,b:P,B:M,c:$,d:ok,e:ok,f:wD,g:ak,G:ik,H:sk,I:sk,j:yD,L:_D,m:mD,M:bD,p:C,q:vD,Q:SD,s:ND,S:xD,u:dD,U:fD,V:hD,w:uD,W:pD,x:A,X:I,y:ak,Y:ik,Z:gD,"%":kD};b.x=S(n,b),b.X=S(r,b),b.c=S(t,b),k.x=S(n,k),k.X=S(r,k),k.c=S(t,k);function S(Z,J){return function(z){var L=[],q=-1,G=0,ne=Z.length,X,ge,Pe;for(z instanceof Date||(z=new Date(+z));++q<ne;)Z.charCodeAt(q)===37&&(L.push(Z.slice(G,q)),(ge=rk[X=Z.charAt(++q)])!=null?X=Z.charAt(++q):ge=X==="e"?" ":"0",(Pe=J[X])&&(X=Pe(z,ge)),L.push(X),G=q+1);return L.push(Z.slice(G,q)),L.join("")}}function N(Z,J){return function(z){var L=Hs(1900,void 0,1),q=E(L,Z,z+="",0),G,ne;if(q!=z.length)return null;if("Q"in L)return new Date(L.Q);if("s"in L)return new Date(L.s*1e3+("L"in L?L.L:0));if(J&&!("Z"in L)&&(L.Z=0),"p"in L&&(L.H=L.H%12+L.p*12),L.m===void 0&&(L.m="q"in L?L.q:0),"V"in L){if(L.V<1||L.V>53)return null;"w"in L||(L.w=1),"Z"in L?(G=jp(Hs(L.y,0,1)),ne=G.getUTCDay(),G=ne>4||ne===0?js.ceil(G):js(G),G=mo.offset(G,(L.V-1)*7),L.y=G.getUTCFullYear(),L.m=G.getUTCMonth(),L.d=G.getUTCDate()+(L.w+6)%7):(G=Bp(Hs(L.y,0,1)),ne=G.getDay(),G=ne>4||ne===0?Bs.ceil(G):Bs(G),G=ca.offset(G,(L.V-1)*7),L.y=G.getFullYear(),L.m=G.getMonth(),L.d=G.getDate()+(L.w+6)%7)}else("W"in L||"U"in L)&&("w"in L||(L.w="u"in L?L.u%7:"W"in L?1:0),ne="Z"in L?jp(Hs(L.y,0,1)).getUTCDay():Bp(Hs(L.y,0,1)).getDay(),L.m=0,L.d="W"in L?(L.w+6)%7+L.W*7-(ne+5)%7:L.w+L.U*7-(ne+6)%7);return"Z"in L?(L.H+=L.Z/100|0,L.M+=L.Z%100,jp(L)):Bp(L)}}function E(Z,J,z,L){for(var q=0,G=J.length,ne=z.length,X,ge;q<G;){if(L>=ne)return-1;if(X=J.charCodeAt(q++),X===37){if(X=J.charAt(q++),ge=w[X in rk?J.charAt(q++):X],!ge||(L=ge(Z,z,L))<0)return-1}else if(X!=z.charCodeAt(L++))return-1}return L}function C(Z,J,z){var L=c.exec(J.slice(z));return L?(Z.p=u.get(L[0].toLowerCase()),z+L[0].length):-1}function T(Z,J,z){var L=g.exec(J.slice(z));return L?(Z.w=p.get(L[0].toLowerCase()),z+L[0].length):-1}function O(Z,J,z){var L=d.exec(J.slice(z));return L?(Z.w=f.get(L[0].toLowerCase()),z+L[0].length):-1}function P(Z,J,z){var L=x.exec(J.slice(z));return L?(Z.m=y.get(L[0].toLowerCase()),z+L[0].length):-1}function M(Z,J,z){var L=v.exec(J.slice(z));return L?(Z.m=m.get(L[0].toLowerCase()),z+L[0].length):-1}function $(Z,J,z){return E(Z,t,J,z)}function A(Z,J,z){return E(Z,n,J,z)}function I(Z,J,z){return E(Z,r,J,z)}function j(Z){return o[Z.getDay()]}function B(Z){return a[Z.getDay()]}function H(Z){return l[Z.getMonth()]}function F(Z){return s[Z.getMonth()]}function D(Z){return i[+(Z.getHours()>=12)]}function W(Z){return 1+~~(Z.getMonth()/3)}function Y(Z){return o[Z.getUTCDay()]}function U(Z){return a[Z.getUTCDay()]}function K(Z){return l[Z.getUTCMonth()]}function ee(Z){return s[Z.getUTCMonth()]}function ie(Z){return i[+(Z.getUTCHours()>=12)]}function ce(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var J=S(Z+="",b);return J.toString=function(){return Z},J},parse:function(Z){var J=N(Z+="",!1);return J.toString=function(){return Z},J},utcFormat:function(Z){var J=S(Z+="",k);return J.toString=function(){return Z},J},utcParse:function(Z){var J=N(Z+="",!0);return J.toString=function(){return Z},J}}}var rk={"-":"",_:" ",0:"0"},bt=/^\s*\d+/,sD=/^%/,lD=/[\\^$*+?|[\]().{}]/g;function Le(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function cD(e){return e.replace(lD,"\\$&")}function qs(e){return new RegExp("^(?:"+e.map(cD).join("|")+")","i")}function Vs(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function uD(e,t,n){var r=bt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function dD(e,t,n){var r=bt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function fD(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function hD(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function pD(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ik(e,t,n){var r=bt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function ak(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function gD(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function vD(e,t,n){var r=bt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function mD(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ok(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function yD(e,t,n){var r=bt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function sk(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function bD(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function xD(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function _D(e,t,n){var r=bt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function wD(e,t,n){var r=bt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function kD(e,t,n){var r=sD.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function SD(e,t,n){var r=bt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ND(e,t,n){var r=bt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function lk(e,t){return Le(e.getDate(),t,2)}function ED(e,t){return Le(e.getHours(),t,2)}function CD(e,t){return Le(e.getHours()%12||12,t,2)}function TD(e,t){return Le(1+ca.count(Kn(e),e),t,3)}function ck(e,t){return Le(e.getMilliseconds(),t,3)}function MD(e,t){return ck(e,t)+"000"}function $D(e,t){return Le(e.getMonth()+1,t,2)}function OD(e,t){return Le(e.getMinutes(),t,2)}function PD(e,t){return Le(e.getSeconds(),t,2)}function AD(e){var t=e.getDay();return t===0?7:t}function LD(e,t){return Le(da.count(Kn(e)-1,e),t,2)}function uk(e){var t=e.getDay();return t>=4||t===0?fa(e):fa.ceil(e)}function DD(e,t){return e=uk(e),Le(fa.count(Kn(e),e)+(Kn(e).getDay()===4),t,2)}function ID(e){return e.getDay()}function FD(e,t){return Le(Bs.count(Kn(e)-1,e),t,2)}function zD(e,t){return Le(e.getFullYear()%100,t,2)}function BD(e,t){return e=uk(e),Le(e.getFullYear()%100,t,2)}function jD(e,t){return Le(e.getFullYear()%1e4,t,4)}function WD(e,t){var n=e.getDay();return e=n>=4||n===0?fa(e):fa.ceil(e),Le(e.getFullYear()%1e4,t,4)}function UD(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Le(t/60|0,"0",2)+Le(t%60,"0",2)}function dk(e,t){return Le(e.getUTCDate(),t,2)}function HD(e,t){return Le(e.getUTCHours(),t,2)}function qD(e,t){return Le(e.getUTCHours()%12||12,t,2)}function VD(e,t){return Le(1+mo.count(Yn(e),e),t,3)}function fk(e,t){return Le(e.getUTCMilliseconds(),t,3)}function KD(e,t){return fk(e,t)+"000"}function YD(e,t){return Le(e.getUTCMonth()+1,t,2)}function GD(e,t){return Le(e.getUTCMinutes(),t,2)}function XD(e,t){return Le(e.getUTCSeconds(),t,2)}function ZD(e){var t=e.getUTCDay();return t===0?7:t}function JD(e,t){return Le(pa.count(Yn(e)-1,e),t,2)}function hk(e){var t=e.getUTCDay();return t>=4||t===0?ga(e):ga.ceil(e)}function QD(e,t){return e=hk(e),Le(ga.count(Yn(e),e)+(Yn(e).getUTCDay()===4),t,2)}function RD(e){return e.getUTCDay()}function eI(e,t){return Le(js.count(Yn(e)-1,e),t,2)}function tI(e,t){return Le(e.getUTCFullYear()%100,t,2)}function nI(e,t){return e=hk(e),Le(e.getUTCFullYear()%100,t,2)}function rI(e,t){return Le(e.getUTCFullYear()%1e4,t,4)}function iI(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ga(e):ga.ceil(e),Le(e.getUTCFullYear()%1e4,t,4)}function aI(){return"+0000"}function pk(){return"%"}function gk(e){return+e}function vk(e){return Math.floor(+e/1e3)}var yo,mk,yk;oI({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 oI(e){return yo=oD(e),mk=yo.format,yo.parse,yk=yo.utcFormat,yo.utcParse,yo}function sI(e){return new Date(e)}function lI(e){return e instanceof Date?+e:+new Date(+e)}function Wp(e,t,n,r,i,a,o,s,l,c){var u=_p(),d=u.invert,f=u.domain,g=c(".%L"),p=c(":%S"),v=c("%I:%M"),m=c("%I %p"),x=c("%a %d"),y=c("%b %d"),b=c("%B"),k=c("%Y");function w(S){return(l(S)<S?g:s(S)<S?p:o(S)<S?v:a(S)<S?m:r(S)<S?i(S)<S?x:y:n(S)<S?b:k)(S)}return u.invert=function(S){return new Date(d(S))},u.domain=function(S){return arguments.length?f(Array.from(S,lI)):f().map(sI)},u.ticks=function(S){var N=f();return e(N[0],N[N.length-1],S??10)},u.tickFormat=function(S,N){return N==null?w:c(N)},u.nice=function(S){var N=f();return(!S||typeof S.range!="function")&&(S=t(N[0],N[N.length-1],S??10)),S?f($w(N,S)):u},u.copy=function(){return As(u,Wp(e,t,n,r,i,a,o,s,l,c))},u}function bk(){return bn.apply(Wp(tk,nk,Kn,Ws,da,ca,Fs,Ds,Vn,mk).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function xk(){return bn.apply(Wp(Rw,ek,Yn,Us,pa,mo,zs,Is,Vn,yk).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function hu(){var e=0,t=1,n,r,i,a,o=It,s=!1,l;function c(d){return d==null||isNaN(d=+d)?l:o(i===0?.5:(d=(a(d)-n)*i,s?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(d){return arguments.length?(s=!!d,c):s},c.interpolator=function(d){return arguments.length?(o=d,c):o};function u(d){return function(f){var g,p;return arguments.length?([g,p]=f,o=d(g,p),c):[o(0),o(1)]}}return c.range=u(la),c.rangeRound=u(Ps),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return a=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),c}}function gi(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function _k(){var e=pi(hu()(It));return e.copy=function(){return gi(e,_k())},Br.apply(e,arguments)}function wk(){var e=Np(hu()).domain([1,10]);return e.copy=function(){return gi(e,wk()).base(e.base())},Br.apply(e,arguments)}function kk(){var e=Cp(hu());return e.copy=function(){return gi(e,kk()).constant(e.constant())},Br.apply(e,arguments)}function Up(){var e=Mp(hu());return e.copy=function(){return gi(e,Up()).exponent(e.exponent())},Br.apply(e,arguments)}function cI(){return Up.apply(null,arguments).exponent(.5)}function Sk(){var e=[],t=It;function n(r){if(r!=null&&!isNaN(r=+r))return t((Es(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(fi),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>DA(e,a/r))},n.copy=function(){return Sk(t).domain(e)},Br.apply(n,arguments)}function pu(){var e=0,t=.5,n=1,r=1,i,a,o,s,l,c=It,u,d=!1,f;function g(v){return isNaN(v=+v)?f:(v=.5+((v=+u(v))-a)*(r*v<r*a?s:l),c(d?Math.max(0,Math.min(1,v)):v))}g.domain=function(v){return arguments.length?([e,t,n]=v,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),r=a<i?-1:1,g):[e,t,n]},g.clamp=function(v){return arguments.length?(d=!!v,g):d},g.interpolator=function(v){return arguments.length?(c=v,g):c};function p(v){return function(m){var x,y,b;return arguments.length?([x,y,b]=m,c=bw(v,[x,y,b]),g):[c(0),c(.5),c(1)]}}return g.range=p(la),g.rangeRound=p(Ps),g.unknown=function(v){return arguments.length?(f=v,g):f},function(v){return u=v,i=v(e),a=v(t),o=v(n),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),r=a<i?-1:1,g}}function Nk(){var e=pi(pu()(It));return e.copy=function(){return gi(e,Nk())},Br.apply(e,arguments)}function Ek(){var e=Np(pu()).domain([.1,1,10]);return e.copy=function(){return gi(e,Ek()).base(e.base())},Br.apply(e,arguments)}function Ck(){var e=Cp(pu());return e.copy=function(){return gi(e,Ck()).constant(e.constant())},Br.apply(e,arguments)}function Hp(){var e=Mp(pu());return e.copy=function(){return gi(e,Hp()).exponent(e.exponent())},Br.apply(e,arguments)}function uI(){return Hp.apply(null,arguments).exponent(.5)}const dI=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Jc,scaleDiverging:Nk,scaleDivergingLog:Ek,scaleDivergingPow:Hp,scaleDivergingSqrt:uI,scaleDivergingSymlog:Ck,scaleIdentity:Mw,scaleImplicit:rp,scaleLinear:Sp,scaleLog:Ep,scaleOrdinal:Zc,scalePoint:E_,scalePow:fu,scaleQuantile:Op,scaleQuantize:Pp,scaleRadial:$p,scaleSequential:_k,scaleSequentialLog:wk,scaleSequentialPow:Up,scaleSequentialQuantile:Sk,scaleSequentialSqrt:cI,scaleSequentialSymlog:kk,scaleSqrt:Fw,scaleSymlog:Tp,scaleThreshold:Ap,scaleTime:bk,scaleUtc:xk,tickFormat:Tw},Symbol.toStringTag,{value:"Module"}));function fI(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}function hI(e,t){t.range&&("padding"in e,e.range(t.range))}function pI(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}function gI(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}function vI(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}function mI(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}function yI(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}const bI=Object.freeze(Object.defineProperty({__proto__:null,interpolate:la,interpolateArray:eL,interpolateBasis:Z_,interpolateBasisClosed:J_,interpolateCubehelix:mw,interpolateCubehelixLong:yw,interpolateDate:nw,interpolateDiscrete:rL,interpolateHcl:pw,interpolateHclLong:gw,interpolateHsl:uw,interpolateHslLong:dw,interpolateHue:iL,interpolateLab:fw,interpolateNumber:qn,interpolateNumberArray:vp,interpolateObject:rw,interpolateRgb:ou,interpolateRgbBasis:QA,interpolateRgbBasisClosed:RA,interpolateRound:Ps,interpolateString:iw,interpolateTransformCss:sL,interpolateTransformSvg:lL,interpolateZoom:fL,piecewise:bw,quantize:hL},Symbol.toStringTag,{value:"Module"}));var Tk={lab:fw,hcl:pw,"hcl-long":gw,hsl:uw,"hsl-long":dw,cubehelix:mw,"cubehelix-long":yw,rgb:ou};function xI(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return Tk[e]}var t=e.type,n=e.gamma,r=Tk[t];return typeof n>"u"?r:r.gamma(n)}function _I(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=xI(t.interpolate);e.interpolate(n)}}const wI=Object.freeze(Object.defineProperty({__proto__:null,timeDay:ca,timeDays:WL,timeFriday:qw,timeFridays:GL,timeHour:Fs,timeHours:BL,timeInterval:st,timeMillisecond:vo,timeMilliseconds:Bw,timeMinute:Ds,timeMinutes:FL,timeMonday:Bs,timeMondays:qL,timeMonth:Ws,timeMonths:nD,timeSaturday:Vw,timeSaturdays:XL,timeSecond:Vn,timeSeconds:Ww,timeSunday:da,timeSundays:Kw,timeThursday:fa,timeThursdays:YL,timeTickInterval:nk,timeTicks:tk,timeTuesday:Uw,timeTuesdays:VL,timeWednesday:Hw,timeWednesdays:KL,timeWeek:da,timeWeeks:Kw,timeYear:Kn,timeYears:iD,unixDay:zp,unixDays:HL,utcDay:mo,utcDays:UL,utcFriday:Xw,utcFridays:eD,utcHour:zs,utcHours:jL,utcMillisecond:vo,utcMilliseconds:Bw,utcMinute:Is,utcMinutes:zL,utcMonday:js,utcMondays:ZL,utcMonth:Us,utcMonths:rD,utcSaturday:Zw,utcSaturdays:tD,utcSecond:Vn,utcSeconds:Ww,utcSunday:pa,utcSundays:Jw,utcThursday:ga,utcThursdays:RL,utcTickInterval:ek,utcTicks:Rw,utcTuesday:Yw,utcTuesdays:JL,utcWednesday:Gw,utcWednesdays:QL,utcWeek:pa,utcWeeks:Jw,utcYear:Yn,utcYears:aD},Symbol.toStringTag,{value:"Module"}));var kI=new Date(Date.UTC(2020,1,2,3,4,5)),SI="%Y-%m-%d %H:%M";function Mk(e){var t=e.tickFormat(1,SI)(kI);return t==="2020-02-02 03:04"}var $k={day:ca,hour:Fs,minute:Ds,month:Ws,second:Vn,week:da,year:Kn},Ok={day:mo,hour:zs,minute:Is,month:Us,second:Vn,week:pa,year:Yn};function NI(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,i=Mk(r);if(typeof n=="string")r.nice(i?Ok[n]:$k[n]);else{var a=n.interval,o=n.step,s=(i?Ok[a]:$k[a]).every(o);s!=null&&r.nice(s)}}}}function EI(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}function CI(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}function TI(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(Ps))}function MI(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}function $I(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],i=n[1],a=i<r,o=a?[i,r]:[r,i],s=o[0],l=o[1],c=[Math.min(0,s),Math.max(0,l)];e.domain(a?c.reverse():c)}}var Pk=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"],OI={domain:fI,nice:NI,zero:$I,interpolate:_I,round:TI,align:pI,base:gI,clamp:vI,constant:mI,exponent:yI,padding:EI,range:hI,reverse:CI,unknown:MI};function Ft(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),i=Pk.filter(function(a){return r.has(a)});return function(o,s){return typeof s<"u"&&i.forEach(function(l){OI[l](o,s)}),o}}var PI=Ft("domain","range","reverse","align","padding","round");function Gn(e){return PI(Jc(),e)}var AI=Ft("domain","range","reverse","align","padding","round");function Ak(e){return AI(E_(),e)}var LI=Ft("domain","range","reverse","clamp","interpolate","nice","round","zero");function _n(e){return LI(Sp(),e)}var DI=Ft("domain","range","clamp","nice","round","unknown");function II(e){return DI($p(),e)}var FI=Ft("domain","range","reverse","clamp","interpolate","nice","round");function Lk(e){return FI(bk(),e)}var zI=Ft("domain","range","reverse","clamp","interpolate","nice","round");function Dk(e){return zI(xk(),e)}var BI=Ft("domain","range","reverse","base","clamp","interpolate","nice","round");function Ik(e){return BI(Ep(),e)}var jI=Ft("domain","range","reverse","clamp","exponent","interpolate","nice","round","zero");function Fk(e){return jI(fu(),e)}var WI=Ft("domain","range","reverse","unknown");function qp(e){return WI(Zc(),e)}var UI=Ft("domain","range","reverse","nice","zero");function zk(e){return UI(Pp(),e)}var HI=Ft("domain","range","reverse");function Bk(e){return HI(Op(),e)}var qI=Ft("domain","range","reverse","clamp","constant","nice","zero","round");function jk(e){return qI(Tp(),e)}var VI=Ft("domain","range","reverse");function Wk(e){return VI(Ap(),e)}var KI=Ft("domain","range","reverse","clamp","interpolate","nice","round","zero");function Uk(e){return KI(Fw(),e)}function Ks(e){if(typeof e<"u"&&"type"in e)switch(e.type){case"linear":return _n(e);case"log":return Ik(e);case"pow":return Fk(e);case"sqrt":return Uk(e);case"symlog":return jk(e);case"time":return Lk(e);case"utc":return Dk(e);case"quantile":return Bk(e);case"quantize":return zk(e);case"threshold":return Wk(e);case"ordinal":return qp(e);case"point":return Ak(e);case"band":return Gn(e)}return _n(e)}var YI=Ft.apply(void 0,Pk);function GI(e,t){return YI(e.copy(),t)}function XI(e){return"paddingInner"in e?"band":"padding"in e?"point":"quantiles"in e?"quantile":"base"in e?"log":"exponent"in e?e.exponent()===.5?"sqrt":"pow":"constant"in e?"symlog":"clamp"in e?e.ticks()[0]instanceof Date?Mk(e)?"utc":"time":"linear":"nice"in e?"quantize":"invertExtent"in e?"threshold":"ordinal"}function Hk(e){if((typeof e=="function"||typeof e=="object"&&e)&&"valueOf"in e){var t=e.valueOf();if(typeof t=="number")return t}return e}function qk(e,t){var n=e;return"ticks"in n?n.ticks(t):n.domain().filter(function(r,i,a){return t==null||a.length<=t||i%Math.round((a.length-1)/t)===0})}function Vk(e){return e==null?void 0:e.toString()}var ZI=new Set(["linear","pow","quantize","sqrt","symlog"]);function Vp(e){return ZI.has(e.type)}const JI=Object.freeze(Object.defineProperty({__proto__:null,coerceNumber:Hk,createScale:Ks,getTicks:qk,inferScaleType:XI,scaleBand:Gn,scaleCanBeZeroed:Vp,scaleLinear:_n,scaleLog:Ik,scaleOrdinal:qp,scalePoint:Ak,scalePower:Fk,scaleQuantile:Bk,scaleQuantize:zk,scaleRadial:II,scaleSqrt:Uk,scaleSymlog:jk,scaleThreshold:Wk,scaleTime:Lk,scaleUtc:Dk,toString:Vk,updateScale:GI},Symbol.toStringTag,{value:"Module"}));var Kp=Math.PI,Yp=2*Kp,va=1e-6,QI=Yp-va;function Gp(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Xt(){return new Gp}Gp.prototype=Xt.prototype={constructor:Gp,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,l=r-t,c=a-e,u=o-t,d=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>va)if(!(Math.abs(u*s-l*c)>va)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var f=n-a,g=r-o,p=s*s+l*l,v=f*f+g*g,m=Math.sqrt(p),x=Math.sqrt(d),y=i*Math.tan((Kp-Math.acos((p+d-v)/(2*m*x)))/2),b=y/x,k=y/m;Math.abs(b-1)>va&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>c*g)+","+(this._x1=e+k*s)+","+(this._y1=t+k*l)}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),l=e+o,c=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>va||Math.abs(this._y1-c)>va)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%Yp+Yp),d>QI?this._+="A"+n+","+n+",0,1,"+u+","+(e-o)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>va&&(this._+="A"+n+","+n+",0,"+ +(d>=Kp)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function Oe(e){return function(){return e}}var Kk=Math.abs,Ot=Math.atan2,ma=Math.cos,RI=Math.max,Xp=Math.min,gr=Math.sin,bo=Math.sqrt,Pt=1e-12,vi=Math.PI,gu=vi/2,mi=2*vi;function eF(e){return e>1?0:e<-1?vi:Math.acos(e)}function Yk(e){return e>=1?gu:e<=-1?-gu:Math.asin(e)}function tF(e){return e.innerRadius}function nF(e){return e.outerRadius}function rF(e){return e.startAngle}function iF(e){return e.endAngle}function aF(e){return e&&e.padAngle}function oF(e,t,n,r,i,a,o,s){var l=n-e,c=r-t,u=o-i,d=s-a,f=d*l-u*c;if(!(f*f<Pt))return f=(u*(t-a)-d*(e-i))/f,[e+f*l,t+f*c]}function vu(e,t,n,r,i,a,o){var s=e-n,l=t-r,c=(o?a:-a)/bo(s*s+l*l),u=c*l,d=-c*s,f=e+u,g=t+d,p=n+u,v=r+d,m=(f+p)/2,x=(g+v)/2,y=p-f,b=v-g,k=y*y+b*b,w=i-a,S=f*v-p*g,N=(b<0?-1:1)*bo(RI(0,w*w*k-S*S)),E=(S*b-y*N)/k,C=(-S*y-b*N)/k,T=(S*b+y*N)/k,O=(-S*y+b*N)/k,P=E-m,M=C-x,$=T-m,A=O-x;return P*P+M*M>$*$+A*A&&(E=T,C=O),{cx:E,cy:C,x01:-u,y01:-d,x11:E*(i/w-1),y11:C*(i/w-1)}}function Gk(){var e=tF,t=nF,n=Oe(0),r=null,i=rF,a=iF,o=aF,s=null;function l(){var c,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),g=i.apply(this,arguments)-gu,p=a.apply(this,arguments)-gu,v=Kk(p-g),m=p>g;if(s||(s=c=Xt()),f<d&&(u=f,f=d,d=u),!(f>Pt))s.moveTo(0,0);else if(v>mi-Pt)s.moveTo(f*ma(g),f*gr(g)),s.arc(0,0,f,g,p,!m),d>Pt&&(s.moveTo(d*ma(p),d*gr(p)),s.arc(0,0,d,p,g,m));else{var x=g,y=p,b=g,k=p,w=v,S=v,N=o.apply(this,arguments)/2,E=N>Pt&&(r?+r.apply(this,arguments):bo(d*d+f*f)),C=Xp(Kk(f-d)/2,+n.apply(this,arguments)),T=C,O=C,P,M;if(E>Pt){var $=Yk(E/d*gr(N)),A=Yk(E/f*gr(N));(w-=$*2)>Pt?($*=m?1:-1,b+=$,k-=$):(w=0,b=k=(g+p)/2),(S-=A*2)>Pt?(A*=m?1:-1,x+=A,y-=A):(S=0,x=y=(g+p)/2)}var I=f*ma(x),j=f*gr(x),B=d*ma(k),H=d*gr(k);if(C>Pt){var F=f*ma(y),D=f*gr(y),W=d*ma(b),Y=d*gr(b),U;if(v<vi&&(U=oF(I,j,W,Y,F,D,B,H))){var K=I-U[0],ee=j-U[1],ie=F-U[0],ce=D-U[1],Z=1/gr(eF((K*ie+ee*ce)/(bo(K*K+ee*ee)*bo(ie*ie+ce*ce)))/2),J=bo(U[0]*U[0]+U[1]*U[1]);T=Xp(C,(d-J)/(Z-1)),O=Xp(C,(f-J)/(Z+1))}}S>Pt?O>Pt?(P=vu(W,Y,I,j,f,O,m),M=vu(F,D,B,H,f,O,m),s.moveTo(P.cx+P.x01,P.cy+P.y01),O<C?s.arc(P.cx,P.cy,O,Ot(P.y01,P.x01),Ot(M.y01,M.x01),!m):(s.arc(P.cx,P.cy,O,Ot(P.y01,P.x01),Ot(P.y11,P.x11),!m),s.arc(0,0,f,Ot(P.cy+P.y11,P.cx+P.x11),Ot(M.cy+M.y11,M.cx+M.x11),!m),s.arc(M.cx,M.cy,O,Ot(M.y11,M.x11),Ot(M.y01,M.x01),!m))):(s.moveTo(I,j),s.arc(0,0,f,x,y,!m)):s.moveTo(I,j),!(d>Pt)||!(w>Pt)?s.lineTo(B,H):T>Pt?(P=vu(B,H,F,D,d,-T,m),M=vu(I,j,W,Y,d,-T,m),s.lineTo(P.cx+P.x01,P.cy+P.y01),T<C?s.arc(P.cx,P.cy,T,Ot(P.y01,P.x01),Ot(M.y01,M.x01),!m):(s.arc(P.cx,P.cy,T,Ot(P.y01,P.x01),Ot(P.y11,P.x11),!m),s.arc(0,0,d,Ot(P.cy+P.y11,P.cx+P.x11),Ot(M.cy+M.y11,M.cx+M.x11),m),s.arc(M.cx,M.cy,T,Ot(M.y11,M.x11),Ot(M.y01,M.x01),!m))):s.arc(0,0,d,k,b,m)}if(s.closePath(),c)return s=null,c+""||null}return l.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,u=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-vi/2;return[ma(u)*c,gr(u)*c]},l.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:Oe(+c),l):e},l.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:Oe(+c),l):t},l.cornerRadius=function(c){return arguments.length?(n=typeof c=="function"?c:Oe(+c),l):n},l.padRadius=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:Oe(+c),l):r},l.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:Oe(+c),l):i},l.endAngle=function(c){return arguments.length?(a=typeof c=="function"?c:Oe(+c),l):a},l.padAngle=function(c){return arguments.length?(o=typeof c=="function"?c:Oe(+c),l):o},l.context=function(c){return arguments.length?(s=c??null,l):s},l}function Xk(e){this._context=e}Xk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function mu(e){return new Xk(e)}function Zp(e){return e[0]}function Jp(e){return e[1]}function yu(){var e=Zp,t=Jp,n=Oe(!0),r=null,i=mu,a=null;function o(s){var l,c=s.length,u,d=!1,f;for(r==null&&(a=i(f=Xt())),l=0;l<=c;++l)!(l<c&&n(u=s[l],l,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,l,s),+t(u,l,s));if(f)return a=null,f+""||null}return o.x=function(s){return arguments.length?(e=typeof s=="function"?s:Oe(+s),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Oe(+s),o):t},o.defined=function(s){return arguments.length?(n=typeof s=="function"?s:Oe(!!s),o):n},o.curve=function(s){return arguments.length?(i=s,r!=null&&(a=i(r)),o):i},o.context=function(s){return arguments.length?(s==null?r=a=null:a=i(r=s),o):r},o}function Qp(){var e=Zp,t=null,n=Oe(0),r=Jp,i=Oe(!0),a=null,o=mu,s=null;function l(u){var d,f,g,p=u.length,v,m=!1,x,y=new Array(p),b=new Array(p);for(a==null&&(s=o(x=Xt())),d=0;d<=p;++d){if(!(d<p&&i(v=u[d],d,u))===m)if(m=!m)f=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=d-1;g>=f;--g)s.point(y[g],b[g]);s.lineEnd(),s.areaEnd()}m&&(y[d]=+e(v,d,u),b[d]=+n(v,d,u),s.point(t?+t(v,d,u):y[d],r?+r(v,d,u):b[d]))}if(x)return s=null,x+""||null}function c(){return yu().defined(i).curve(o).context(a)}return l.x=function(u){return arguments.length?(e=typeof u=="function"?u:Oe(+u),t=null,l):e},l.x0=function(u){return arguments.length?(e=typeof u=="function"?u:Oe(+u),l):e},l.x1=function(u){return arguments.length?(t=u==null?null:typeof u=="function"?u:Oe(+u),l):t},l.y=function(u){return arguments.length?(n=typeof u=="function"?u:Oe(+u),r=null,l):n},l.y0=function(u){return arguments.length?(n=typeof u=="function"?u:Oe(+u),l):n},l.y1=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:Oe(+u),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(n)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(t).y(n)},l.defined=function(u){return arguments.length?(i=typeof u=="function"?u:Oe(!!u),l):i},l.curve=function(u){return arguments.length?(o=u,a!=null&&(s=o(a)),l):o},l.context=function(u){return arguments.length?(u==null?a=s=null:s=o(a=u),l):a},l}function sF(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function lF(e){return e}function Zk(){var e=lF,t=sF,n=null,r=Oe(0),i=Oe(mi),a=Oe(0);function o(s){var l,c=s.length,u,d,f=0,g=new Array(c),p=new Array(c),v=+r.apply(this,arguments),m=Math.min(mi,Math.max(-mi,i.apply(this,arguments)-v)),x,y=Math.min(Math.abs(m)/c,a.apply(this,arguments)),b=y*(m<0?-1:1),k;for(l=0;l<c;++l)(k=p[g[l]=l]=+e(s[l],l,s))>0&&(f+=k);for(t!=null?g.sort(function(w,S){return t(p[w],p[S])}):n!=null&&g.sort(function(w,S){return n(s[w],s[S])}),l=0,d=f?(m-c*b)/f:0;l<c;++l,v=x)u=g[l],k=p[u],x=v+(k>0?k*d:0)+b,p[u]={data:s[u],index:l,value:k,startAngle:v,endAngle:x,padAngle:y};return p}return o.value=function(s){return arguments.length?(e=typeof s=="function"?s:Oe(+s),o):e},o.sortValues=function(s){return arguments.length?(t=s,n=null,o):t},o.sort=function(s){return arguments.length?(n=s,t=null,o):n},o.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:Oe(+s),o):r},o.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:Oe(+s),o):i},o.padAngle=function(s){return arguments.length?(a=typeof s=="function"?s:Oe(+s),o):a},o}var Jk=Rp(mu);function Qk(e){this._curve=e}Qk.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Rp(e){function t(n){return new Qk(e(n))}return t._curve=e,t}function Ys(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Rp(n)):t()._curve},e}function eg(){return Ys(yu().curve(Jk))}function Rk(){var e=Qp().curve(Jk),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return Ys(n())},delete e.lineX0,e.lineEndAngle=function(){return Ys(r())},delete e.lineX1,e.lineInnerRadius=function(){return Ys(i())},delete e.lineY0,e.lineOuterRadius=function(){return Ys(a())},delete e.lineY1,e.curve=function(o){return arguments.length?t(Rp(o)):t()._curve},e}function Gs(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var tg=Array.prototype.slice;function cF(e){return e.source}function uF(e){return e.target}function ng(e){var t=cF,n=uF,r=Zp,i=Jp,a=null;function o(){var s,l=tg.call(arguments),c=t.apply(this,l),u=n.apply(this,l);if(a||(a=s=Xt()),e(a,+r.apply(this,(l[0]=c,l)),+i.apply(this,l),+r.apply(this,(l[0]=u,l)),+i.apply(this,l)),s)return a=null,s+""||null}return o.source=function(s){return arguments.length?(t=s,o):t},o.target=function(s){return arguments.length?(n=s,o):n},o.x=function(s){return arguments.length?(r=typeof s=="function"?s:Oe(+s),o):r},o.y=function(s){return arguments.length?(i=typeof s=="function"?s:Oe(+s),o):i},o.context=function(s){return arguments.length?(a=s??null,o):a},o}function dF(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function fF(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function hF(e,t,n,r,i){var a=Gs(t,n),o=Gs(t,n=(n+i)/2),s=Gs(r,n),l=Gs(r,i);e.moveTo(a[0],a[1]),e.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}function eS(){return ng(dF)}function tS(){return ng(fF)}function nS(){var e=ng(hF);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const rg={draw:function(e,t){var n=Math.sqrt(t/vi);e.moveTo(n,0),e.arc(0,0,n,0,mi)}},rS={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};var iS=Math.sqrt(1/3),pF=iS*2;const aS={draw:function(e,t){var n=Math.sqrt(t/pF),r=n*iS;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}};var gF=.8908130915292852,oS=Math.sin(vi/10)/Math.sin(7*vi/10),vF=Math.sin(mi/10)*oS,mF=-Math.cos(mi/10)*oS;const sS={draw:function(e,t){var n=Math.sqrt(t*gF),r=vF*n,i=mF*n;e.moveTo(0,-n),e.lineTo(r,i);for(var a=1;a<5;++a){var o=mi*a/5,s=Math.cos(o),l=Math.sin(o);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},lS={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}};var ig=Math.sqrt(3);const cS={draw:function(e,t){var n=-Math.sqrt(t/(ig*3));e.moveTo(0,n*2),e.lineTo(-ig*n,-n),e.lineTo(ig*n,-n),e.closePath()}};var wn=-.5,kn=Math.sqrt(3)/2,ag=1/Math.sqrt(12),yF=(ag/2+1)*3;const uS={draw:function(e,t){var n=Math.sqrt(t/yF),r=n/2,i=n*ag,a=r,o=n*ag+n,s=-a,l=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(wn*r-kn*i,kn*r+wn*i),e.lineTo(wn*a-kn*o,kn*a+wn*o),e.lineTo(wn*s-kn*l,kn*s+wn*l),e.lineTo(wn*r+kn*i,wn*i-kn*r),e.lineTo(wn*a+kn*o,wn*o-kn*a),e.lineTo(wn*s+kn*l,wn*l-kn*s),e.closePath()}};var bF=[rg,rS,aS,lS,sS,cS,uS];function xF(){var e=Oe(rg),t=Oe(64),n=null;function r(){var i;if(n||(n=i=Xt()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return r.type=function(i){return arguments.length?(e=typeof i=="function"?i:Oe(i),r):e},r.size=function(i){return arguments.length?(t=typeof i=="function"?i:Oe(+i),r):t},r.context=function(i){return arguments.length?(n=i??null,r):n},r}function yi(){}function bu(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function xu(e){this._context=e}xu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:bu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:bu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _F(e){return new xu(e)}function dS(e){this._context=e}dS.prototype={areaStart:yi,areaEnd:yi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:bu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wF(e){return new dS(e)}function fS(e){this._context=e}fS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:bu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kF(e){return new fS(e)}function hS(e,t){this._basis=new xu(e),this._beta=t}hS.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,l;++s<=n;)l=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+l*a),this._beta*t[s]+(1-this._beta)*(i+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const SF=function e(t){function n(r){return t===1?new xu(r):new hS(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function _u(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function og(e,t){this._context=e,this._k=(1-t)/6}og.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:_u(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:_u(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const NF=function e(t){function n(r){return new og(r,t)}return n.tension=function(r){return e(+r)},n}(0);function sg(e,t){this._context=e,this._k=(1-t)/6}sg.prototype={areaStart:yi,areaEnd:yi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:_u(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const EF=function e(t){function n(r){return new sg(r,t)}return n.tension=function(r){return e(+r)},n}(0);function lg(e,t){this._context=e,this._k=(1-t)/6}lg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_u(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const CF=function e(t){function n(r){return new lg(r,t)}return n.tension=function(r){return e(+r)},n}(0);function cg(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Pt){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Pt){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function pS(e,t){this._context=e,this._alpha=t}pS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:cg(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const TF=function e(t){function n(r){return t?new pS(r,t):new og(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function gS(e,t){this._context=e,this._alpha=t}gS.prototype={areaStart:yi,areaEnd:yi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:cg(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const MF=function e(t){function n(r){return t?new gS(r,t):new sg(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function vS(e,t){this._context=e,this._alpha=t}vS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:cg(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const $F=function e(t){function n(r){return t?new vS(r,t):new lg(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function mS(e){this._context=e}mS.prototype={areaStart:yi,areaEnd:yi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function OF(e){return new mS(e)}function yS(e){return e<0?-1:1}function bS(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(yS(a)+yS(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function xS(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ug(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function wu(e){this._context=e}wu.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:ug(this,this._t0,xS(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ug(this,xS(this,n=bS(this,e,t)),n);break;default:ug(this,this._t0,n=bS(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function _S(e){this._context=new wS(e)}(_S.prototype=Object.create(wu.prototype)).point=function(e,t){wu.prototype.point.call(this,t,e)};function wS(e){this._context=e}wS.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function PF(e){return new wu(e)}function AF(e){return new _S(e)}function kS(e){this._context=e}kS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=SS(e),i=SS(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function SS(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function LF(e){return new kS(e)}function ku(e,t){this._context=e,this._t=t}ku.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function DF(e){return new ku(e,.5)}function IF(e){return new ku(e,0)}function FF(e){return new ku(e,1)}function ya(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ba(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function zF(e,t){return e[t]}function Su(){var e=Oe([]),t=ba,n=ya,r=zF;function i(a){var o=e.apply(this,arguments),s,l=a.length,c=o.length,u=new Array(c),d;for(s=0;s<c;++s){for(var f=o[s],g=u[s]=new Array(l),p=0,v;p<l;++p)g[p]=v=[0,+r(a[p],f,p,a)],v.data=a[p];g.key=f}for(s=0,d=t(u);s<c;++s)u[d[s]].index=s;return n(u,d),u}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Oe(tg.call(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:Oe(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?ba:typeof a=="function"?a:Oe(tg.call(a)),i):t},i.offset=function(a){return arguments.length?(n=a??ya,i):n},i}function NS(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}ya(e,t)}}function ES(e,t){if((l=e.length)>0)for(var n,r=0,i,a,o,s,l,c=e[t[0]].length;r<c;++r)for(o=s=0,n=0;n<l;++n)(a=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=o,i[1]=o+=a):a<0?(i[1]=s,i[0]=s+=a):(i[0]=0,i[1]=a)}function CS(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}ya(e,t)}}function TS(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=u[r-1][1]||0,g=(d-f)/2,p=0;p<s;++p){var v=e[t[p]],m=v[r][1]||0,x=v[r-1][1]||0;g+=m-x}l+=d,c+=g*d}i[r-1][1]+=i[r-1][0]=n,l&&(n-=c/l)}i[r-1][1]+=i[r-1][0]=n,ya(e,t)}}function MS(e){var t=e.map(BF);return ba(e).sort(function(n,r){return t[n]-t[r]})}function BF(e){for(var t=-1,n=0,r=e.length,i,a=-1/0;++t<r;)(i=+e[t][1])>a&&(a=i,n=t);return n}function dg(e){var t=e.map($S);return ba(e).sort(function(n,r){return t[n]-t[r]})}function $S(e){for(var t=0,n=-1,r=e.length,i;++n<r;)(i=+e[n][1])&&(t+=i);return t}function OS(e){return dg(e).reverse()}function PS(e){var t=e.length,n,r,i=e.map($S),a=MS(e),o=0,s=0,l=[],c=[];for(n=0;n<t;++n)r=a[n],o<s?(o+=i[r],l.push(r)):(s+=i[r],c.push(r));return c.reverse().concat(l)}function AS(e){return ba(e).reverse()}const jF=Object.freeze(Object.defineProperty({__proto__:null,arc:Gk,area:Qp,areaRadial:Rk,curveBasis:_F,curveBasisClosed:wF,curveBasisOpen:kF,curveBundle:SF,curveCardinal:NF,curveCardinalClosed:EF,curveCardinalOpen:CF,curveCatmullRom:TF,curveCatmullRomClosed:MF,curveCatmullRomOpen:$F,curveLinear:mu,curveLinearClosed:OF,curveMonotoneX:PF,curveMonotoneY:AF,curveNatural:LF,curveStep:DF,curveStepAfter:FF,curveStepBefore:IF,line:yu,lineRadial:eg,linkHorizontal:eS,linkRadial:nS,linkVertical:tS,pie:Zk,pointRadial:Gs,radialArea:Rk,radialLine:eg,stack:Su,stackOffsetDiverging:ES,stackOffsetExpand:NS,stackOffsetNone:ya,stackOffsetSilhouette:CS,stackOffsetWiggle:TS,stackOrderAppearance:MS,stackOrderAscending:dg,stackOrderDescending:OS,stackOrderInsideOut:PS,stackOrderNone:ba,stackOrderReverse:AS,symbol:xF,symbolCircle:rg,symbolCross:rS,symbolDiamond:aS,symbolSquare:lS,symbolStar:sS,symbolTriangle:cS,symbolWye:uS,symbols:bF},Symbol.toStringTag,{value:"Module"}));function Ze(e,t){e(t)}var Nu={ascending:dg,descending:OS,insideout:PS,none:ba,reverse:AS},WF=Object.keys(Nu);function Eu(e){return e&&Nu[e]||Nu.none}var Cu={expand:NS,diverging:ES,none:ya,silhouette:CS,wiggle:TS},UF=Object.keys(Cu);function Tu(e){return e&&Cu[e]||Cu.none}function fg(e){var t=e===void 0?{}:e,n=t.innerRadius,r=t.outerRadius,i=t.cornerRadius,a=t.startAngle,o=t.endAngle,s=t.padAngle,l=t.padRadius,c=Gk();return n!=null&&Ze(c.innerRadius,n),r!=null&&Ze(c.outerRadius,r),i!=null&&Ze(c.cornerRadius,i),a!=null&&Ze(c.startAngle,a),o!=null&&Ze(c.endAngle,o),s!=null&&Ze(c.padAngle,s),l!=null&&Ze(c.padRadius,l),c}function Mu(e){var t=e===void 0?{}:e,n=t.x,r=t.x0,i=t.x1,a=t.y,o=t.y0,s=t.y1,l=t.defined,c=t.curve,u=Qp();return n&&Ze(u.x,n),r&&Ze(u.x0,r),i&&Ze(u.x1,i),a&&Ze(u.y,a),o&&Ze(u.y0,o),s&&Ze(u.y1,s),l&&u.defined(l),c&&u.curve(c),u}function hg(e){var t=e===void 0?{}:e,n=t.x,r=t.y,i=t.defined,a=t.curve,o=yu();return n&&Ze(o.x,n),r&&Ze(o.y,r),i&&o.defined(i),a&&o.curve(a),o}function LS(e){var t=e===void 0?{}:e,n=t.startAngle,r=t.endAngle,i=t.padAngle,a=t.value,o=t.sort,s=t.sortValues,l=Zk();return(o===null||o!=null)&&l.sort(o),(s===null||s!=null)&&l.sortValues(s),a!=null&&l.value(a),i!=null&&Ze(l.padAngle,i),n!=null&&Ze(l.startAngle,n),r!=null&&Ze(l.endAngle,r),l}function DS(e){var t=e===void 0?{}:e,n=t.angle,r=t.radius,i=t.defined,a=t.curve,o=eg();return n&&Ze(o.angle,n),r&&Ze(o.radius,r),i&&o.defined(i),a&&o.curve(a),o}function IS(e){var t=e.keys,n=e.value,r=e.order,i=e.offset,a=Su();return t&&a.keys(t),n&&Ze(a.value,n),r&&a.order(Eu(r)),i&&a.offset(Tu(i)),a}var HF=["className","data","innerRadius","outerRadius","cornerRadius","startAngle","endAngle","padAngle","padRadius","children","innerRef"];function pg(){return pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pg.apply(this,arguments)}function qF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function VF(e){var t=e.className,n=e.data,r=e.innerRadius,i=e.outerRadius,a=e.cornerRadius,o=e.startAngle,s=e.endAngle,l=e.padAngle,c=e.padRadius,u=e.children,d=e.innerRef,f=qF(e,HF),g=fg({innerRadius:r,outerRadius:i,cornerRadius:a,startAngle:o,endAngle:s,padAngle:l,padRadius:c});return u?_.createElement(_.Fragment,null,u({path:g})):!n&&(o==null||s==null||r==null||i==null)?(console.warn("[@visx/shape/Arc]: expected data because one of startAngle, endAngle, innerRadius, outerRadius is undefined. Bailing."),null):_.createElement("path",pg({ref:d,className:$e("visx-arc",t),d:g(n)||""},f))}var KF=["className","top","left","data","centroid","innerRadius","outerRadius","cornerRadius","startAngle","endAngle","padAngle","padRadius","pieSort","pieSortValues","pieValue","children","fill"];function gg(){return gg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gg.apply(this,arguments)}function YF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function FS(e){var t=e.className,n=e.top,r=e.left,i=e.data,a=i===void 0?[]:i,o=e.centroid,s=e.innerRadius,l=s===void 0?0:s,c=e.outerRadius,u=e.cornerRadius,d=e.startAngle,f=e.endAngle,g=e.padAngle,p=e.padRadius,v=e.pieSort,m=e.pieSortValues,x=e.pieValue,y=e.children,b=e.fill,k=b===void 0?"":b,w=YF(e,KF),S=fg({innerRadius:l,outerRadius:c,cornerRadius:u,padRadius:p}),N=LS({startAngle:d,endAngle:f,padAngle:g,value:x,sort:v,sortValues:m}),E=N(a);return y?_.createElement(_.Fragment,null,y({arcs:E,path:S,pie:N})):_.createElement(tt,{className:"visx-pie-arcs-group",top:n,left:r},E.map(function(C,T){return _.createElement("g",{key:"pie-arc-"+T},_.createElement("path",gg({className:$e("visx-pie-arc",t),d:S(C)||"",fill:k==null||typeof k=="string"?k:k(C)},w)),o==null?void 0:o(S.centroid(C),C))}))}var GF=["from","to","fill","className","innerRef"];function vg(){return vg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vg.apply(this,arguments)}function XF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function mg(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,i=r===void 0?{x:1,y:1}:r,a=e.fill,o=a===void 0?"transparent":a,s=e.className,l=e.innerRef,c=XF(e,GF),u=n.x===i.x||n.y===i.y;return _.createElement("line",vg({ref:l,className:$e("visx-line",s),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:o,shapeRendering:u?"crispEdges":"auto"},c))}var ZF=["children","data","x","y","fill","className","curve","innerRef","defined"];function yg(){return yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yg.apply(this,arguments)}function JF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function xo(e){var t=e.children,n=e.data,r=n===void 0?[]:n,i=e.x,a=e.y,o=e.fill,s=o===void 0?"transparent":o,l=e.className,c=e.curve,u=e.innerRef,d=e.defined,f=d===void 0?function(){return!0}:d,g=JF(e,ZF),p=hg({x:i,y:a,defined:f,curve:c});return t?_.createElement(_.Fragment,null,t({path:p})):_.createElement("path",yg({ref:u,className:$e("visx-linepath",l),d:p(r)||"",fill:s,strokeLinecap:"round"},g))}var QF=["className","angle","radius","defined","curve","data","innerRef","children","fill"];function bg(){return bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bg.apply(this,arguments)}function RF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function e3(e){var t=e.className,n=e.angle,r=e.radius,i=e.defined,a=e.curve,o=e.data,s=o===void 0?[]:o,l=e.innerRef,c=e.children,u=e.fill,d=u===void 0?"transparent":u,f=RF(e,QF),g=DS({angle:n,radius:r,defined:i,curve:a});return c?_.createElement(_.Fragment,null,c({path:g})):_.createElement("path",bg({ref:l,className:$e("visx-line-radial",t),d:g(s)||"",fill:d},f))}var t3=["children","x","x0","x1","y","y0","y1","data","defined","className","curve","innerRef"];function xg(){return xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xg.apply(this,arguments)}function n3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function r3(e){var t=e.children,n=e.x,r=e.x0,i=e.x1,a=e.y,o=e.y0,s=e.y1,l=e.data,c=l===void 0?[]:l,u=e.defined,d=u===void 0?function(){return!0}:u,f=e.className,g=e.curve,p=e.innerRef,v=n3(e,t3),m=Mu({x:n,x0:r,x1:i,y:a,y0:o,y1:s,defined:d,curve:g});return t?_.createElement(_.Fragment,null,t({path:m})):_.createElement("path",xg({ref:p,className:$e("visx-area",f),d:m(c)||""},v))}var i3=["x","x0","x1","y","y1","y0","yScale","data","defined","className","curve","innerRef","children"];function _g(){return _g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_g.apply(this,arguments)}function a3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function wg(e){var t=e.x,n=e.x0,r=e.x1,i=e.y,a=e.y1,o=e.y0,s=e.yScale,l=e.data,c=l===void 0?[]:l,u=e.defined,d=u===void 0?function(){return!0}:u,f=e.className,g=e.curve,p=e.innerRef,v=e.children,m=a3(e,i3),x=Mu({x:t,x0:n,x1:r,defined:d,curve:g});return o==null?x.y0(s.range()[0]):Ze(x.y0,o),i&&!a&&Ze(x.y1,i),a&&!i&&Ze(x.y1,a),v?_.createElement(_.Fragment,null,v({path:x})):_.createElement("path",_g({ref:p,className:$e("visx-area-closed",f),d:x(c)||""},m))}var o3=["className","top","left","keys","data","curve","defined","x","x0","x1","y0","y1","value","order","offset","color","children"];function kg(){return kg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kg.apply(this,arguments)}function s3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function zS(e){var t=e.className,n=e.top,r=e.left,i=e.keys,a=e.data,o=e.curve,s=e.defined,l=e.x,c=e.x0,u=e.x1,d=e.y0,f=e.y1,g=e.value,p=e.order,v=e.offset,m=e.color,x=e.children,y=s3(e,o3),b=IS({keys:i,value:g,order:p,offset:v}),k=Mu({x:l,x0:c,x1:u,y0:d,y1:f,curve:o,defined:s}),w=b(a);return x?_.createElement(_.Fragment,null,x({stacks:w,path:k,stack:b})):_.createElement(tt,{top:n,left:r},w.map(function(S,N){return _.createElement("path",kg({className:$e("visx-stack",t),key:"stack-"+N+"-"+(S.key||""),d:k(S)||"",fill:m==null?void 0:m(S.key,N)},y))}))}var l3=["className","top","left","keys","data","curve","defined","x","x0","x1","y0","y1","value","order","offset","color","children"];function $u(){return $u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$u.apply(this,arguments)}function c3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function u3(e){var t=e.className,n=e.top,r=e.left,i=e.keys,a=e.data,o=e.curve,s=e.defined,l=e.x,c=e.x0,u=e.x1,d=e.y0,f=e.y1,g=e.value,p=e.order,v=e.offset,m=e.color,x=e.children,y=c3(e,l3);return _.createElement(zS,$u({className:t,top:n,left:r,keys:i,data:a,curve:o,defined:s,x:l,x0:c,x1:u,y0:d,y1:f,value:g,order:p,offset:v,color:m},y),x||function(b){var k=b.stacks,w=b.path;return k.map(function(S,N){return _.createElement("path",$u({className:$e("visx-area-stack",t),key:"area-stack-"+N+"-"+(S.key||""),d:w(S)||"",fill:m==null?void 0:m(S.key,N)},y))})})}var d3=["className","innerRef"];function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sg.apply(this,arguments)}function f3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function bi(e){var t=e.className,n=e.innerRef,r=f3(e,d3);return _.createElement("rect",Sg({ref:n,className:$e("visx-bar",t)},r))}var h3=["children","className","innerRef","x","y","width","height","radius","all","top","bottom","left","right","topLeft","topRight","bottomLeft","bottomRight"];function Ng(){return Ng=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ng.apply(this,arguments)}function p3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function g3(e){var t=e.all,n=e.bottom,r=e.bottomLeft,i=e.bottomRight,a=e.height,o=e.left,s=e.radius,l=e.right,c=e.top,u=e.topLeft,d=e.topRight,f=e.width,g=e.x,p=e.y;d=t||c||l||d,i=t||n||l||i,r=t||n||o||r,u=t||c||o||u,s=Math.max(1,Math.min(s,Math.min(f,a)/2));var v=2*s,m=("M"+(g+s)+","+p+" h"+(f-v)+`
299
299
  `+(d?"a"+s+","+s+" 0 0 1 "+s+","+s:"h"+s+"v"+s)+`
300
300
  v`+(a-v)+`
301
301
  `+(i?"a"+s+","+s+" 0 0 1 "+-s+","+s:"v"+s+"h"+-s)+`
@@ -304,9 +304,9 @@ Valid keys: `+JSON.stringify(Object.keys(F),null," "));var A=I(te,Z,Y,G,R+"."+Z
304
304
  v`+(v-a)+`
305
305
  `+(u?"a"+s+","+s+" 0 0 1 "+s+","+-s:"v"+-s+"h"+s)+`
306
306
  z`).split(`
307
- `).join("");return m}function n3(e){var t=e.children,n=e.className,r=e.innerRef,i=e.x,a=e.y,o=e.width,s=e.height,l=e.radius,c=e.all,u=c===void 0?!1:c,d=e.top,f=d===void 0?!1:d,g=e.bottom,p=g===void 0?!1:g,v=e.left,m=v===void 0?!1:v,b=e.right,y=b===void 0?!1:b,x=e.topLeft,k=x===void 0?!1:x,w=e.topRight,S=w===void 0?!1:w,N=e.bottomLeft,C=N===void 0?!1:N,E=e.bottomRight,T=E===void 0?!1:E,O=e3(e,RF),P=t3({x:i,y:a,width:o,height:s,radius:l,all:u,top:f,bottom:p,left:m,right:y,topLeft:k,topRight:S,bottomLeft:C,bottomRight:T});return t?_.createElement(_.Fragment,null,t({path:P})):_.createElement("path",vg({ref:r,className:Te("visx-bar-rounded",n),d:P},O))}function xu(e){if("bandwidth"in e)return e.bandwidth();var t=e.range(),n=e.domain();return Math.abs(t[t.length-1]-t[0])/n.length}var r3=["data","className","top","left","x0","x0Scale","x1Scale","yScale","color","keys","height","children"];function mg(){return mg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mg.apply(this,arguments)}function i3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function a3(e){var t=e.data,n=e.className,r=e.top,i=e.left,a=e.x0,o=e.x0Scale,s=e.x1Scale,l=e.yScale,c=e.color,u=e.keys,d=e.height,f=e.children,g=i3(e,r3),p=xu(s),v=t.map(function(m,b){return{index:b,x0:o(a(m)),bars:u.map(function(y,x){var k=m[y];return{index:x,key:y,value:k,width:p,x:s(y)||0,y:l(k)||0,color:c(y,x),height:d-(l(k)||0)}})}});return f?_.createElement(_.Fragment,null,f(v)):_.createElement(Je,{className:Te("visx-bar-group",n),top:r,left:i},v.map(function(m){return _.createElement(Je,{key:"bar-group-"+m.index+"-"+m.x0,left:m.x0},m.bars.map(function(b){return _.createElement(vi,mg({key:"bar-group-bar-"+m.index+"-"+b.index+"-"+b.value+"-"+b.key,x:b.x,y:b.y,width:b.width,height:b.height,fill:b.color},g))}))}))}var o3=["data","className","top","left","x","y0","y0Scale","y1Scale","xScale","color","keys","width","children"];function yg(){return yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yg.apply(this,arguments)}function s3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function l3(e){var t=e.data,n=e.className,r=e.top,i=e.left,a=e.x,o=a===void 0?function(){return 0}:a,s=e.y0,l=e.y0Scale,c=e.y1Scale,u=e.xScale,d=e.color,f=e.keys;e.width;var g=e.children,p=s3(e,o3),v=xu(c),m=t.map(function(b,y){return{index:y,y0:l(s(b))||0,bars:f.map(function(x,k){var w=b[x];return{index:k,key:x,value:w,height:v,x:o(w)||0,y:c(x)||0,color:d(x,k),width:u(w)||0}})}});return g?_.createElement(_.Fragment,null,g(m)):_.createElement(Je,{className:Te("visx-bar-group-horizontal",n),top:r,left:i},m.map(function(b){return _.createElement(Je,{key:"bar-group-"+b.index+"-"+b.y0,top:b.y0},b.bars.map(function(y){return _.createElement(vi,yg({key:"bar-group-bar-"+b.index+"-"+y.index+"-"+y.value+"-"+y.key,x:y.x,y:y.y,width:y.width,height:y.height,fill:y.color},p))}))}))}function Sn(e){return typeof(e==null?void 0:e.x)=="number"?e==null?void 0:e.x:0}function Nn(e){return typeof(e==null?void 0:e.y)=="number"?e==null?void 0:e.y:0}function Cn(e){return e==null?void 0:e.source}function En(e){return e==null?void 0:e.target}function xS(e){return e==null?void 0:e[0]}function _S(e){return e==null?void 0:e[1]}var c3=["data","className","top","left","x","y0","y1","xScale","yScale","color","keys","value","order","offset","children"];function bg(){return bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bg.apply(this,arguments)}function u3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function d3(e){var t=e.data,n=e.className,r=e.top,i=e.left,a=e.x,o=e.y0,s=o===void 0?xS:o,l=e.y1,c=l===void 0?_S:l,u=e.xScale,d=e.yScale,f=e.color,g=e.keys,p=e.value,v=e.order,m=e.offset,b=e.children,y=u3(e,c3),x=hu();g&&x.keys(g),p&&Ve(x.value,p),v&&x.order(gu(v)),m&&x.offset(mu(m));var k=x(t),w=xu(u),S=k.map(function(N,C){var E=N.key;return{index:C,key:E,bars:N.map(function(T,O){var P=(d(s(T))||0)-(d(c(T))||0),M=d(c(T)),$="bandwidth"in u?u(a(T.data)):Math.max((u(a(T.data))||0)-w/2);return{bar:T,key:E,index:O,height:P,width:w,x:$||0,y:M||0,color:f(N.key,O)}})}});return b?_.createElement(_.Fragment,null,b(S)):_.createElement(Je,{className:Te("visx-bar-stack",n),top:r,left:i},S.map(function(N){return N.bars.map(function(C){return _.createElement(vi,bg({key:"bar-stack-"+N.index+"-"+C.index,x:C.x,y:C.y,height:C.height,width:C.width,fill:C.color},y))})}))}var f3=["data","className","top","left","y","x0","x1","xScale","yScale","color","keys","value","order","offset","children"];function xg(){return xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xg.apply(this,arguments)}function h3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function p3(e){var t=e.data,n=e.className,r=e.top,i=e.left,a=e.y,o=e.x0,s=o===void 0?xS:o,l=e.x1,c=l===void 0?_S:l,u=e.xScale,d=e.yScale,f=e.color,g=e.keys,p=e.value,v=e.order,m=e.offset,b=e.children,y=h3(e,f3),x=hu();g&&x.keys(g),p&&Ve(x.value,p),v&&x.order(gu(v)),m&&x.offset(mu(m));var k=x(t),w=xu(d),S=k.map(function(N,C){var E=N.key;return{index:C,key:E,bars:N.map(function(T,O){var P=(u(c(T))||0)-(u(s(T))||0),M=u(s(T)),$="bandwidth"in d?d(a(T.data)):Math.max((d(a(T.data))||0)-P/2);return{bar:T,key:E,index:O,height:w,width:P,x:M||0,y:$||0,color:f(N.key,O)}})}});return b?_.createElement(_.Fragment,null,b(S)):_.createElement(Je,{className:Te("visx-bar-stack-horizontal",n),top:r,left:i},S.map(function(N){return N.bars.map(function(C){return _.createElement(vi,xg({key:"bar-stack-"+N.index+"-"+C.index,x:C.x,y:C.y,height:C.height,width:C.width,fill:C.color},y))})}))}var wS=function(t){return Math.PI/180*t},g3=["className","children","data","innerRef","path","x","y","source","target"];function _g(){return _g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_g.apply(this,arguments)}function v3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function kS(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var o=Dk();return o.x(r),o.y(i),o.source(t),o.target(n),o(a)}}function m3(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,o=e.x,s=o===void 0?Nn:o,l=e.y,c=l===void 0?Sn:l,u=e.source,d=u===void 0?Cn:u,f=e.target,g=f===void 0?En:f,p=v3(e,g3),v=a||kS({source:d,target:g,x:s,y:c});return n?_.createElement(_.Fragment,null,n({path:v})):_.createElement("path",_g({ref:i,className:Te("visx-link visx-link-horizontal-diagonal",t),d:v(r)||""},p))}var y3=["className","children","data","innerRef","path","x","y","source","target"];function wg(){return wg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wg.apply(this,arguments)}function b3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function SS(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var o=Ik();return o.x(r),o.y(i),o.source(t),o.target(n),o(a)}}function x3(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,o=e.x,s=o===void 0?Sn:o,l=e.y,c=l===void 0?Nn:l,u=e.source,d=u===void 0?Cn:u,f=e.target,g=f===void 0?En:f,p=b3(e,y3),v=a||SS({source:d,target:g,x:s,y:c});return n?_.createElement(_.Fragment,null,n({path:v})):_.createElement("path",wg({ref:i,className:Te("visx-link visx-link-vertical-diagonal",t),d:v(r)||""},p))}var _3=["className","children","data","innerRef","path","angle","radius","source","target"];function kg(){return kg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kg.apply(this,arguments)}function w3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function NS(e){var t=e.source,n=e.target,r=e.angle,i=e.radius;return function(a){var o=Fk();return o.angle(r),o.radius(i),o.source(t),o.target(n),o(a)}}function k3(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,o=e.angle,s=o===void 0?Sn:o,l=e.radius,c=l===void 0?Nn:l,u=e.source,d=u===void 0?Cn:u,f=e.target,g=f===void 0?En:f,p=w3(e,_3),v=a||NS({source:d,target:g,angle:s,radius:c});return n?_.createElement(_.Fragment,null,n({path:v})):_.createElement("path",kg({ref:i,className:Te("visx-link visx-link-radial-diagonal",t),d:v(r)||""},p))}var S3=["className","children","data","innerRef","path","percent","x","y","source","target"];function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sg.apply(this,arguments)}function N3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function CS(e){var t=e.source,n=e.target,r=e.x,i=e.y,a=e.percent;return function(o){var s=t(o),l=n(o),c=r(s),u=i(s),d=r(l),f=i(l),g=d-c,p=f-u,v=a*(g+p),m=a*(p-g),b=Zt();return b.moveTo(c,u),b.bezierCurveTo(c+v,u+m,d+m,f-v,d,f),b.toString()}}function C3(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,o=e.percent,s=o===void 0?.2:o,l=e.x,c=l===void 0?Nn:l,u=e.y,d=u===void 0?Sn:u,f=e.source,g=f===void 0?Cn:f,p=e.target,v=p===void 0?En:p,m=N3(e,S3),b=a||CS({source:g,target:v,x:c,y:d,percent:s});return n?_.createElement(_.Fragment,null,n({path:b})):_.createElement("path",Sg({ref:i,className:Te("visx-link visx-link-horizontal-curve",t),d:b(r)||""},m))}var E3=["className","children","data","innerRef","path","percent","x","y","source","target"];function Ng(){return Ng=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ng.apply(this,arguments)}function T3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function ES(e){var t=e.source,n=e.target,r=e.x,i=e.y,a=e.percent;return function(o){var s=t(o),l=n(o),c=r(s),u=i(s),d=r(l),f=i(l),g=d-c,p=f-u,v=a*(g+p),m=a*(p-g),b=Zt();return b.moveTo(c,u),b.bezierCurveTo(c+v,u+m,d+m,f-v,d,f),b.toString()}}function M3(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,o=e.percent,s=o===void 0?.2:o,l=e.x,c=l===void 0?Sn:l,u=e.y,d=u===void 0?Nn:u,f=e.source,g=f===void 0?Cn:f,p=e.target,v=p===void 0?En:p,m=T3(e,E3),b=a||ES({source:g,target:v,x:c,y:d,percent:s});return n?_.createElement(_.Fragment,null,n({path:b})):_.createElement("path",Ng({ref:i,className:Te("visx-link visx-link-vertical-curve",t),d:b(r)||""},m))}var $3=["className","children","data","innerRef","path","percent","x","y","source","target"];function Cg(){return Cg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cg.apply(this,arguments)}function O3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function TS(e){var t=e.source,n=e.target,r=e.x,i=e.y,a=e.percent;return function(o){var s=t(o),l=n(o),c=r(s)-Math.PI/2,u=i(s),d=r(l)-Math.PI/2,f=i(l),g=Math.cos(c),p=Math.sin(c),v=Math.cos(d),m=Math.sin(d),b=u*g,y=u*p,x=f*v,k=f*m,w=x-b,S=k-y,N=a*(w+S),C=a*(S-w),E=Zt();return E.moveTo(b,y),E.bezierCurveTo(b+N,y+C,x+C,k-N,x,k),E.toString()}}function P3(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,o=e.percent,s=o===void 0?.2:o,l=e.x,c=l===void 0?Sn:l,u=e.y,d=u===void 0?Nn:u,f=e.source,g=f===void 0?Cn:f,p=e.target,v=p===void 0?En:p,m=O3(e,$3),b=a||TS({source:g,target:v,x:c,y:d,percent:s});return n?_.createElement(_.Fragment,null,n({path:b})):_.createElement("path",Cg({ref:i,className:Te("visx-link visx-link-radial-curve",t),d:b(r)||""},m))}var A3=["className","children","innerRef","data","path","x","y","source","target"];function Eg(){return Eg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eg.apply(this,arguments)}function L3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function MS(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var o=t(a),s=n(a),l=r(o),c=i(o),u=r(s),d=i(s),f=Zt();return f.moveTo(l,c),f.lineTo(u,d),f.toString()}}function D3(e){var t=e.className,n=e.children,r=e.innerRef,i=e.data,a=e.path,o=e.x,s=o===void 0?Nn:o,l=e.y,c=l===void 0?Sn:l,u=e.source,d=u===void 0?Cn:u,f=e.target,g=f===void 0?En:f,p=L3(e,A3),v=a||MS({source:d,target:g,x:s,y:c});return n?_.createElement(_.Fragment,null,n({path:v})):_.createElement("path",Eg({ref:r,className:Te("visx-link visx-link-horizontal-line",t),d:v(i)||""},p))}var I3=["className","innerRef","data","path","x","y","source","target","children"];function Tg(){return Tg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tg.apply(this,arguments)}function F3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function $S(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var o=t(a),s=n(a),l=r(o),c=i(o),u=r(s),d=i(s),f=Zt();return f.moveTo(l,c),f.lineTo(u,d),f.toString()}}function z3(e){var t=e.className,n=e.innerRef,r=e.data,i=e.path,a=e.x,o=a===void 0?Sn:a,s=e.y,l=s===void 0?Nn:s,c=e.source,u=c===void 0?Cn:c,d=e.target,f=d===void 0?En:d,g=e.children,p=F3(e,I3),v=i||$S({source:u,target:f,x:o,y:l});return g?_.createElement(_.Fragment,null,g({path:v})):_.createElement("path",Tg({ref:n,className:Te("visx-link visx-link-vertical-line",t),d:v(r)||""},p))}var B3=["className","innerRef","data","path","x","y","source","target","children"];function Mg(){return Mg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mg.apply(this,arguments)}function j3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function OS(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var o=t(a),s=n(a),l=r(o)-Math.PI/2,c=i(o),u=r(s)-Math.PI/2,d=i(s),f=Math.cos(l),g=Math.sin(l),p=Math.cos(u),v=Math.sin(u),m=Zt();return m.moveTo(c*f,c*g),m.lineTo(d*p,d*v),m.toString()}}function W3(e){var t=e.className,n=e.innerRef,r=e.data,i=e.path,a=e.x,o=a===void 0?Sn:a,s=e.y,l=s===void 0?Nn:s,c=e.source,u=c===void 0?Cn:c,d=e.target,f=d===void 0?En:d,g=e.children,p=j3(e,B3),v=i||OS({source:u,target:f,x:o,y:l});return g?_.createElement(_.Fragment,null,g({path:v})):_.createElement("path",Mg({ref:n,className:Te("visx-link visx-link-radial-line",t),d:v(r)||""},p))}var U3=["className","innerRef","data","path","percent","x","y","source","target","children"];function $g(){return $g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$g.apply(this,arguments)}function H3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function PS(e){var t=e.source,n=e.target,r=e.x,i=e.y,a=e.percent;return function(o){var s=t(o),l=n(o),c=r(s),u=i(s),d=r(l),f=i(l),g=Zt();return g.moveTo(c,u),g.lineTo(c+(d-c)*a,u),g.lineTo(c+(d-c)*a,f),g.lineTo(d,f),g.toString()}}function q3(e){var t=e.className,n=e.innerRef,r=e.data,i=e.path,a=e.percent,o=a===void 0?.5:a,s=e.x,l=s===void 0?Nn:s,c=e.y,u=c===void 0?Sn:c,d=e.source,f=d===void 0?Cn:d,g=e.target,p=g===void 0?En:g,v=e.children,m=H3(e,U3),b=i||PS({source:f,target:p,x:l,y:u,percent:o});return v?_.createElement(_.Fragment,null,v({path:b})):_.createElement("path",$g({ref:n,className:Te("visx-link visx-link-horizontal-step",t),d:b(r)||""},m))}var K3=["className","innerRef","data","path","percent","x","y","source","target","children"];function Og(){return Og=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Og.apply(this,arguments)}function V3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function AS(e){var t=e.source,n=e.target,r=e.x,i=e.y,a=e.percent;return function(o){var s=t(o),l=n(o),c=r(s),u=i(s),d=r(l),f=i(l),g=Zt();return g.moveTo(c,u),g.lineTo(c,u+(f-u)*a),g.lineTo(d,u+(f-u)*a),g.lineTo(d,f),g.toString()}}function Y3(e){var t=e.className,n=e.innerRef,r=e.data,i=e.path,a=e.percent,o=a===void 0?.5:a,s=e.x,l=s===void 0?Sn:s,c=e.y,u=c===void 0?Nn:c,d=e.source,f=d===void 0?Cn:d,g=e.target,p=g===void 0?En:g,v=e.children,m=V3(e,K3),b=i||AS({source:f,target:p,x:l,y:u,percent:o});return v?_.createElement(_.Fragment,null,v({path:b})):_.createElement("path",Og({ref:n,className:Te("visx-link visx-link-vertical-step",t),d:b(r)||""},m))}var G3=["className","innerRef","data","path","x","y","source","target","children"];function Pg(){return Pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pg.apply(this,arguments)}function X3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function LS(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var o=t(a),s=n(a),l=r(o),c=i(o),u=r(s),d=i(s),f=l-Math.PI/2,g=c,p=u-Math.PI/2,v=d,m=Math.cos(f),b=Math.sin(f),y=Math.cos(p),x=Math.sin(p),k=Math.abs(p-f)>Math.PI?p<=f:p>f;return`
308
- M`+g*m+","+g*b+`
309
- A`+g+","+g+",0,0,"+(k?1:0)+","+g*y+","+g*x+`
310
- L`+v*y+","+v*x+`
311
- `}}function Z3(e){var t=e.className,n=e.innerRef,r=e.data,i=e.path,a=e.x,o=a===void 0?Sn:a,s=e.y,l=s===void 0?Nn:s,c=e.source,u=c===void 0?Cn:c,d=e.target,f=d===void 0?En:d,g=e.children,p=X3(e,G3),v=i||LS({source:u,target:f,x:o,y:l});return g?_.createElement(_.Fragment,null,g({path:v})):_.createElement("path",Pg({ref:n,className:Te("visx-link visx-link-radial-step",t),d:v(r)||""},p))}var J3=["sides","size","center","rotate","className","children","innerRef","points"];function Ag(){return Ag=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ag.apply(this,arguments)}function Q3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var DS={x:0,y:0},IS=function(t){var n=t.sides,r=n===void 0?4:n,i=t.size,a=i===void 0?25:i,o=t.center,s=o===void 0?DS:o,l=t.rotate,c=l===void 0?0:l,u=t.side,d=360/r*u-c,f=wS(d);return{x:s.x+a*Math.cos(f),y:s.y+a*Math.sin(f)}},FS=function(t){var n=t.sides,r=t.size,i=t.center,a=t.rotate;return new Array(n).fill(0).map(function(o,s){return IS({sides:n,size:r,center:i,rotate:a,side:s})})};function R3(e){var t=e.sides,n=t===void 0?4:t,r=e.size,i=r===void 0?25:r,a=e.center,o=a===void 0?DS:a,s=e.rotate,l=s===void 0?0:s,c=e.className,u=e.children,d=e.innerRef,f=e.points,g=Q3(e,J3),p=f||FS({sides:n,size:i,center:o,rotate:l}).map(function(v){var m=v.x,b=v.y;return[m,b]});return u?_.createElement(_.Fragment,null,u({points:p})):_.createElement("polygon",Ag({ref:d,className:Te("visx-polygon",c),points:p.join(" ")},g))}var e5=["className","innerRef"];function Lg(){return Lg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lg.apply(this,arguments)}function t5(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function n5(e){var t=e.className,n=e.innerRef,r=t5(e,e5);return _.createElement("circle",Lg({ref:n,className:Te("visx-circle",t)},r))}var zS="http://www.w3.org/2000/svg";function r5(e){var t=document.getElementById(e);if(!t){var n=document.createElementNS(zS,"svg");n.setAttribute("aria-hidden","true"),n.style.opacity="0",n.style.width="0",n.style.height="0",n.style.position="absolute",n.style.top="-100%",n.style.left="-100%",n.style.pointerEvents="none",t=document.createElementNS(zS,"path"),t.setAttribute("id",e),n.appendChild(t),document.body.appendChild(n)}return t}var i5="__visx_splitpath_svg_path_measurement_id",BS=function(){return!0};function a5(e){var t=e.path,n=e.pointsInSegments,r=e.segmentation,i=r===void 0?"x":r,a=e.sampleRate,o=a===void 0?1:a;try{var s=r5(i5);s.setAttribute("d",t);var l=s.getTotalLength(),c=n.length,u=n.map(function(){return[]});if(i==="x"||i==="y")for(var d=n.map(function(M){var $;return($=M.find(function(L){return typeof L[i]=="number"}))==null?void 0:$[i]}),f=s.getPointAtLength(0),g=s.getPointAtLength(l),p=g[i]>f[i],v=p?d.map(function(M){return typeof M>"u"?BS:function($){return $>=M}}):d.map(function(M){return typeof M>"u"?BS:function($){return $<=M}}),m=0,b=0;b<=l;b+=o){for(var y=s.getPointAtLength(b),x=y[i];m<c-1&&v[m+1](x);)m+=1;u[m].push(y)}else{var k=n.map(function(M){return M.length}),w=k.reduce(function(M,$){return M+$},0),S=l/Math.max(1,w-1),N=k.slice(0,c-1);N.unshift(0);for(var C=2;C<c;C+=1)N[C]+=N[C-1];for(var E=0;E<c;E+=1)N[E]*=S;for(var T=0,O=0;O<=l;O+=o){for(var P=s.getPointAtLength(O);T<c-1&&O>=N[T+1];)T+=1;u[T].push(P)}}return u}catch{return[]}}function Dg(){return Dg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dg.apply(this,arguments)}var o5=function(t){return t.x||0},s5=function(t){return t.y||0};function jS(e){var t=e.children,n=e.className,r=e.curve,i=e.defined,a=e.segmentation,o=e.sampleRate,s=e.segments,l=e.x,c=e.y,u=e.styles,d=_.useMemo(function(){var p=typeof l=="number"||typeof l>"u"?function(){return l}:l,v=typeof c=="number"||typeof c>"u"?function(){return c}:c;return s.map(function(m){return m.map(function(b,y){return{x:p(b,y,m),y:v(b,y,m)}})})},[l,c,s]),f=_.useMemo(function(){var p=ig({x:l,y:c,defined:i,curve:r});return p(s.flat())||""},[l,c,i,r,s]),g=_.useMemo(function(){return a5({path:f,segmentation:a,pointsInSegments:d,sampleRate:o})},[f,a,d,o]);return _.createElement("g",null,g.map(function(p,v){return t?_.createElement(_.Fragment,{key:v},t({index:v,segment:p,styles:u[v]||u[v%u.length]})):_.createElement(po,Dg({key:v,className:n,data:p,x:o5,y:s5},u[v]||u[v%u.length]))}))}jS.propTypes={segments:K.arrayOf(K.array).isRequired,styles:K.array.isRequired,children:K.func,className:K.string};const l5=Object.freeze(Object.defineProperty({__proto__:null,Arc:OF,Area:HF,AreaClosed:hg,AreaStack:ZF,Bar:vi,BarGroup:a3,BarGroupHorizontal:l3,BarRounded:n3,BarStack:d3,BarStackHorizontal:p3,Circle:n5,Line:lg,LinePath:po,LineRadial:jF,LinkHorizontal:m3,LinkHorizontalCurve:C3,LinkHorizontalLine:D3,LinkHorizontalStep:q3,LinkRadial:k3,LinkRadialCurve:P3,LinkRadialLine:W3,LinkRadialStep:Z3,LinkVertical:x3,LinkVerticalCurve:M3,LinkVerticalLine:z3,LinkVerticalStep:Y3,Pie:yS,Polygon:R3,STACK_OFFSETS:vu,STACK_OFFSET_NAMES:TF,STACK_ORDERS:pu,STACK_ORDER_NAMES:EF,SplitLinePath:jS,Stack:bS,arc:rg,area:yu,degreesToRadians:wS,getPoint:IS,getPoints:FS,line:ig,pathHorizontalCurve:CS,pathHorizontalDiagonal:kS,pathHorizontalLine:MS,pathHorizontalStep:PS,pathRadialCurve:TS,pathRadialDiagonal:NS,pathRadialLine:OS,pathRadialStep:LS,pathVerticalCurve:ES,pathVerticalDiagonal:SS,pathVerticalLine:$S,pathVerticalStep:AS,pie:gS,radialLine:vS,stack:mS,stackOffset:mu,stackOrder:gu},Symbol.toStringTag,{value:"Module"}));var c5=WS;function WS(e,t,n){e instanceof RegExp&&(e=US(e,n)),t instanceof RegExp&&(t=US(t,n));var r=HS(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function US(e,t){var n=t.match(e);return n?n[0]:null}WS.range=HS;function HS(e,t,n){var r,i,a,o,s,l=n.indexOf(e),c=n.indexOf(t,l+1),u=l;if(l>=0&&c>0){for(r=[],a=n.length;u>=0&&!s;)u==l?(r.push(u),l=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),c]:(i=r.pop(),i<a&&(a=i,o=c),c=n.indexOf(t,u+1)),u=l<c&&l>=0?l:c;r.length&&(s=[a,o])}return s}var u5=qS;function qS(e,t,n){e instanceof RegExp&&(e=KS(e,n)),t instanceof RegExp&&(t=KS(t,n));var r=VS(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function KS(e,t){var n=t.match(e);return n?n[0]:null}qS.range=VS;function VS(e,t,n){var r,i,a,o,s,l=n.indexOf(e),c=n.indexOf(t,l+1),u=l;if(l>=0&&c>0){if(e===t)return[l,c];for(r=[],a=n.length;u>=0&&!s;)u==l?(r.push(u),l=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),c]:(i=r.pop(),i<a&&(a=i,o=c),c=n.indexOf(t,u+1)),u=l<c&&l>=0?l:c;r.length&&(s=[a,o])}return s}var d5=u5,f5=YS;function YS(e,t,n){var r=e;return h5(e,t).reduce(function(i,a){return i.replace(a.functionIdentifier+"("+a.matches.body+")",p5(a.matches.body,a.functionIdentifier,n,r,t))},e)}function h5(e,t){var n=[],r=typeof t=="string"?new RegExp("\\b("+t+")\\("):t;do{var i=r.exec(e);if(!i)return n;if(i[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+t);var a=i[1],o=i.index,s=d5("(",")",e.substring(o));if(!s||s.start!==i[0].length-1)throw new SyntaxError(a+"(): missing closing ')' in the value '"+e+"'");n.push({matches:s,functionIdentifier:a}),e=s.post}while(r.test(e));return n}function p5(e,t,n,r,i){return n(YS(e,i,n),t,r)}var Bt=function(e){this.value=e};Bt.math={isDegree:!0,acos:function(e){return Bt.math.isDegree?180/Math.PI*Math.acos(e):Math.acos(e)},add:function(e,t){return e+t},asin:function(e){return Bt.math.isDegree?180/Math.PI*Math.asin(e):Math.asin(e)},atan:function(e){return Bt.math.isDegree?180/Math.PI*Math.atan(e):Math.atan(e)},acosh:function(e){return Math.log(e+Math.sqrt(e*e-1))},asinh:function(e){return Math.log(e+Math.sqrt(e*e+1))},atanh:function(e){return Math.log((1+e)/(1-e))},C:function(e,t){var n=1,r=e-t,i=t;i<r&&(i=r,r=t);for(var a=i+1;a<=e;a++)n*=a;return n/Bt.math.fact(r)},changeSign:function(e){return-e},cos:function(e){return Bt.math.isDegree&&(e=Bt.math.toRadian(e)),Math.cos(e)},cosh:function(e){return(Math.pow(Math.E,e)+Math.pow(Math.E,-1*e))/2},div:function(e,t){return e/t},fact:function(e){if(e%1!==0)return"NaN";for(var t=1,n=2;n<=e;n++)t*=n;return t},inverse:function(e){return 1/e},log:function(e){return Math.log(e)/Math.log(10)},mod:function(e,t){return e%t},mul:function(e,t){return e*t},P:function(e,t){for(var n=1,r=Math.floor(e)-Math.floor(t)+1;r<=Math.floor(e);r++)n*=r;return n},Pi:function(e,t,n){for(var r=1,i=e;i<=t;i++)r*=Number(n.postfixEval({n:i}));return r},pow10x:function(e){for(var t=1;e--;)t*=10;return t},sigma:function(e,t,n){for(var r=0,i=e;i<=t;i++)r+=Number(n.postfixEval({n:i}));return r},sin:function(e){return Bt.math.isDegree&&(e=Bt.math.toRadian(e)),Math.sin(e)},sinh:function(e){return(Math.pow(Math.E,e)-Math.pow(Math.E,-1*e))/2},sub:function(e,t){return e-t},tan:function(e){return Bt.math.isDegree&&(e=Bt.math.toRadian(e)),Math.tan(e)},tanh:function(e){return Bt.sinha(e)/Bt.cosha(e)},toRadian:function(e){return e*Math.PI/180},and:function(e,t){return e&t}},Bt.Exception=function(e){this.message=e};var g5=Bt,we=g5;function jt(e,t){for(var n=0;n<e.length;n++)e[n]+=t;return e}for(var mi=[{token:"sin",show:"sin",type:0,value:we.math.sin},{token:"cos",show:"cos",type:0,value:we.math.cos},{token:"tan",show:"tan",type:0,value:we.math.tan},{token:"pi",show:"&pi;",type:3,value:"PI"},{token:"(",show:"(",type:4,value:"("},{token:")",show:")",type:5,value:")"},{token:"P",show:"P",type:10,value:we.math.P},{token:"C",show:"C",type:10,value:we.math.C},{token:" ",show:" ",type:14,value:" ".anchor},{token:"asin",show:"asin",type:0,value:we.math.asin},{token:"acos",show:"acos",type:0,value:we.math.acos},{token:"atan",show:"atan",type:0,value:we.math.atan},{token:"7",show:"7",type:1,value:"7"},{token:"8",show:"8",type:1,value:"8"},{token:"9",show:"9",type:1,value:"9"},{token:"int",show:"Int",type:0,value:Math.floor},{token:"cosh",show:"cosh",type:0,value:we.math.cosh},{token:"acosh",show:"acosh",type:0,value:we.math.acosh},{token:"ln",show:" ln",type:0,value:Math.log},{token:"^",show:"^",type:10,value:Math.pow},{token:"root",show:"root",type:0,value:Math.sqrt},{token:"4",show:"4",type:1,value:"4"},{token:"5",show:"5",type:1,value:"5"},{token:"6",show:"6",type:1,value:"6"},{token:"/",show:"&divide;",type:2,value:we.math.div},{token:"!",show:"!",type:7,value:we.math.fact},{token:"tanh",show:"tanh",type:0,value:we.math.tanh},{token:"atanh",show:"atanh",type:0,value:we.math.atanh},{token:"Mod",show:" Mod ",type:2,value:we.math.mod},{token:"1",show:"1",type:1,value:"1"},{token:"2",show:"2",type:1,value:"2"},{token:"3",show:"3",type:1,value:"3"},{token:"*",show:"&times;",type:2,value:we.math.mul},{token:"sinh",show:"sinh",type:0,value:we.math.sinh},{token:"asinh",show:"asinh",type:0,value:we.math.asinh},{token:"e",show:"e",type:3,value:"E"},{token:"log",show:" log",type:0,value:we.math.log},{token:"0",show:"0",type:1,value:"0"},{token:".",show:".",type:6,value:"."},{token:"+",show:"+",type:9,value:we.math.add},{token:"-",show:"-",type:9,value:we.math.sub},{token:",",show:",",type:11,value:","},{token:"Sigma",show:"&Sigma;",type:12,value:we.math.sigma},{token:"n",show:"n",type:13,value:"n"},{token:"Pi",show:"&Pi;",type:12,value:we.math.Pi},{token:"pow",show:"pow",type:8,value:Math.pow,numberOfArguments:2},{token:"&",show:"&",type:9,value:we.math.and}],Ig={0:11,1:0,2:3,3:0,4:0,5:0,6:0,7:11,8:11,9:1,10:10,11:0,12:11,13:0,14:-1,15:11},_u=0;_u<mi.length;_u++)mi[_u].precedence=Ig[mi[_u].type];var pr={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,9:!0,12:!0,13:!0,14:!0,15:!0},go={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0,15:!0},v5={0:!0,3:!0,4:!0,8:!0,12:!0,13:!0,15:!0},Vn={},Us={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,12:!0,13:!0,15:!0},m5={1:!0},Wt=[[],["1","2","3","7","8","9","4","5","6","+","-","*","/","(",")","^","!","P","C","e","0",".",",","n"," ","&"],["pi","ln","Pi"],["sin","cos","tan","Del","int","Mod","log","pow"],["asin","acos","atan","cosh","root","tanh","sinh"],["acosh","atanh","asinh","Sigma"]];function y5(e,t,n,r){for(var i=0;i<r;i++)if(e[n+i]!==t[i])return!1;return!0}we.tokenTypes={FUNCTION_WITH_ONE_ARG:0,NUMBER:1,BINARY_OPERATOR_HIGH_PRECENDENCE:2,CONSTANT:3,OPENING_PARENTHESIS:4,CLOSING_PARENTHESIS:5,DECIMAL:6,POSTFIX_FUNCTION_WITH_ONE_ARG:7,FUNCTION_WITH_N_ARGS:8,BINARY_OPERATOR_LOW_PRECENDENCE:9,BINARY_OPERATOR_PERMUTATION:10,COMMA:11,EVALUATED_FUNCTION:12,EVALUATED_FUNCTION_PARAMETER:13,SPACE:14},we.addToken=function(e){for(var t=0;t<e.length;t++){var n=e[t].token.length,r=-1;e[t].type===we.tokenTypes.FUNCTION_WITH_N_ARGS&&e[t].numberOfArguments===void 0&&(e[t].numberOfArguments=2),Wt[n]=Wt[n]||[];for(var i=0;i<Wt[n].length;i++)if(e[t].token===Wt[n][i]){r=GS(Wt[n][i],mi);break}r===-1?(mi.push(e[t]),e[t].precedence=Ig[e[t].type],Wt.length<=e[t].token.length&&(Wt[e[t].token.length]=[]),Wt[e[t].token.length].push(e[t].token)):(mi[r]=e[t],e[t].precedence=Ig[e[t].type])}};function GS(e,t){for(var n=0;n<t.length;n++)if(t[n].token===e)return n;return-1}function b5(e){for(var t=[],n=e.length,r,i,a,o=0;o<n;o++)if(!(o<n-1&&e[o]===" "&&e[o+1]===" ")){for(r="",i=e.length-o>Wt.length-2?Wt.length-1:e.length-o;i>0;i--)if(Wt[i]!==void 0)for(a=0;a<Wt[i].length;a++)y5(e,Wt[i][a],o,i)&&(r=Wt[i][a],a=Wt[i].length,i=0);if(o+=r.length-1,r==="")throw new we.Exception("Can't understand after "+e.slice(o));t.push(mi[GS(r,mi)])}return t}var x5={value:we.math.changeSign,type:0,pre:21,show:"-"},wu={value:")",show:")",type:5,pre:0},Hs={value:"(",type:4,pre:0,show:"("};we.lex=function(e,t){var n=[Hs],r=[],i=e,a=pr,o=0,s=Vn,l="",c;typeof t<"u"&&we.addToken(t);var u={},d=b5(i);for(c=0;c<d.length;c++){var f=d[c];if(f.type===14){if(c>0&&c<d.length-1&&d[c+1].type===1&&(d[c-1].type===1||d[c-1].type===6))throw new we.Exception("Unexpected Space");continue}var g=f.token,p=f.type,v=f.value,m=f.precedence,b=f.show,y=n[n.length-1],x;for(x=r.length;x--&&r[x]===0;)if([0,2,3,4,5,9,11,12,13].indexOf(p)!==-1){if(a[p]!==!0)throw new we.Exception(g+" is not allowed after "+l);n.push(wu),a=go,s=Us,r.pop()}if(a[p]!==!0)throw new we.Exception(g+" is not allowed after "+l);if(s[p]===!0&&(p=2,v=we.math.mul,b="&times;",m=3,c=c-1),u={value:v,type:p,pre:m,show:b,numberOfArguments:f.numberOfArguments},p===0)a=pr,s=Vn,jt(r,2),n.push(u),d[c+1].type!==4&&(n.push(Hs),r.push(2));else if(p===1)y.type===1?(y.value+=v,jt(r,1)):n.push(u),a=go,s=v5;else if(p===2)a=pr,s=Vn,jt(r,2),n.push(u);else if(p===3)n.push(u),a=go,s=Us;else if(p===4)jt(r,1),o++,a=pr,s=Vn,n.push(u);else if(p===5){if(!o)throw new we.Exception("Closing parenthesis are more than opening one, wait What!!!");o--,a=go,s=Us,n.push(u),jt(r,1)}else if(p===6){if(y.hasDec)throw new we.Exception("Two decimals are not allowed in one number");y.type!==1&&(y={value:0,type:1,pre:0},n.push(y)),a=m5,jt(r,1),s=Vn,y.value+=v,y.hasDec=!0}else p===7&&(a=go,s=Us,jt(r,1),n.push(u));p===8?(a=pr,s=Vn,jt(r,f.numberOfArguments+2),n.push(u),d[c+1].type!==4&&(n.push(Hs),r.push(f.numberOfArguments+2))):p===9?(y.type===9?y.value===we.math.add?(y.value=v,y.show=b,jt(r,1)):y.value===we.math.sub&&b==="-"&&(y.value=we.math.add,y.show="+",jt(r,1)):y.type!==5&&y.type!==7&&y.type!==1&&y.type!==3&&y.type!==13?g==="-"&&(a=pr,s=Vn,jt(r,2).push(2),n.push(x5),n.push(Hs)):(n.push(u),jt(r,2)),a=pr,s=Vn):p===10?(a=pr,s=Vn,jt(r,2),n.push(u)):p===11?(a=pr,s=Vn,n.push(u)):p===12?(a=pr,s=Vn,jt(r,6),n.push(u),d[c+1].type!==4&&(n.push(Hs),r.push(6))):p===13&&(a=go,s=Us,n.push(u)),jt(r,-1),l=g}for(x=r.length;x--;)n.push(wu);if(a[5]!==!0)throw new we.Exception("complete the expression");for(;o--;)n.push(wu);return n.push(wu),new we(n)};var _5=we,Fg=_5;Fg.prototype.toPostfix=function(){for(var e=[],t,n,r,i,a,o=[{value:"(",type:4,pre:0}],s=this.value,l=1;l<s.length;l++)if(s[l].type===1||s[l].type===3||s[l].type===13)s[l].type===1&&(s[l].value=Number(s[l].value)),e.push(s[l]);else if(s[l].type===4)o.push(s[l]);else if(s[l].type===5)for(;(n=o.pop()).type!==4;)e.push(n);else if(s[l].type===11){for(;(n=o.pop()).type!==4;)e.push(n);o.push(n)}else{t=s[l],i=t.pre,a=o[o.length-1],r=a.pre;var c=a.value=="Math.pow"&&t.value=="Math.pow";if(i>r)o.push(t);else{for(;r>=i&&!c||c&&i<r;)n=o.pop(),a=o[o.length-1],e.push(n),r=a.pre,c=t.value=="Math.pow"&&a.value=="Math.pow";o.push(t)}}return new Fg(e)};var w5=Fg,qs=w5;qs.prototype.postfixEval=function(e){e=e||{},e.PI=Math.PI,e.E=Math.E;for(var t=[],n,r,i,a=this.value,o=typeof e.n<"u",s=0;s<a.length;s++)if(a[s].type===1)t.push({value:a[s].value,type:1});else if(a[s].type===3)t.push({value:e[a[s].value],type:1});else if(a[s].type===0)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(a[s]):t[t.length-1].value=a[s].value(t[t.length-1].value);else if(a[s].type===7)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(a[s]):t[t.length-1].value=a[s].value(t[t.length-1].value);else if(a[s].type===8){for(var l=[],c=0;c<a[s].numberOfArguments;c++)l.push(t.pop().value);t.push({type:1,value:a[s].value.apply(a[s],l.reverse())})}else a[s].type===10?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r.value=r.concat(n),r.value.push(a[s]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(a[s]),t.push(n)):t.push({type:1,value:a[s].value(r.value,n.value)})):a[s].type===2||a[s].type===9?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(a[s]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(a[s]),t.push(n)):t.push({type:1,value:a[s].value(r.value,n.value)})):a[s].type===12?(n=t.pop(),typeof n.type<"u"&&(n=[n]),r=t.pop(),i=t.pop(),t.push({type:1,value:a[s].value(i.value,r.value,new qs(n))})):a[s].type===13&&(o?t.push({value:e[a[s].value],type:3}):t.push([a[s]]));if(t.length>1)throw new qs.Exception("Uncaught Syntax error");return t[0].value>1e15?"Infinity":parseFloat(t[0].value.toFixed(15))},qs.eval=function(e,t,n){return typeof t>"u"?this.lex(e).toPostfix().postfixEval():typeof n>"u"?typeof t.length<"u"?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t):this.lex(e,t).toPostfix().postfixEval(n)};var k5=qs,XS=k5;XS.prototype.formulaEval=function(){for(var e,t,n,r=[],i=this.value,a=0;a<i.length;a++)i[a].type===1||i[a].type===3?r.push({value:i[a].type===3?i[a].show:i[a].value,type:1}):i[a].type===13?r.push({value:i[a].show,type:1}):i[a].type===0?r[r.length-1]={value:i[a].show+(i[a].show!="-"?"(":"")+r[r.length-1].value+(i[a].show!="-"?")":""),type:0}:i[a].type===7?r[r.length-1]={value:(r[r.length-1].type!=1?"(":"")+r[r.length-1].value+(r[r.length-1].type!=1?")":"")+i[a].show,type:7}:i[a].type===10?(e=r.pop(),t=r.pop(),i[a].show==="P"||i[a].show==="C"?r.push({value:"<sup>"+t.value+"</sup>"+i[a].show+"<sub>"+e.value+"</sub>",type:10}):r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+"<sup>"+e.value+"</sup>",type:1})):i[a].type===2||i[a].type===9?(e=r.pop(),t=r.pop(),r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+i[a].show+(e.type!=1?"(":"")+e.value+(e.type!=1?")":""),type:i[a].type})):i[a].type===12&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:i[a].show+"("+n.value+","+t.value+","+e.value+")",type:12}));return r[0].value};var S5=XS,N5=c5,C5=f5,E5=S5,T5=100,M5=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,zg,$5=O5;function O5(e,t){zg=0,t=Math.pow(10,t===void 0?5:t),e=e.replace(/\n+/g," ");function n(i,a,o){if(zg++>T5)throw zg=0,new Error("Call stack overflow for "+o);if(i==="")throw new Error(a+"(): '"+o+"' must contain a non-whitespace string");i=r(i,o);var s=P5(i);if(s.length>1||i.indexOf("var(")>-1)return a+"("+i+")";var l=s[0]||"";l==="%"&&(i=i.replace(/\b[0-9\.]+%/g,function(d){return parseFloat(d.slice(0,-1))*.01}));var c=i.replace(new RegExp(l,"gi"),""),u;try{u=E5.eval(c)}catch{return a+"("+i+")"}return l==="%"&&(u*=100),(a.length||l==="%")&&(u=Math.round(u*t)/t),u+=l,u}function r(i,a){i=i.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var o="",s=i,l;l=M5.exec(s);){l[0].index>0&&(o+=s.substring(0,l[0].index));var c=N5("(",")",s.substring([0].index));if(c.body==="")throw new Error("'"+i+"' must contain a non-whitespace string");var u=n(c.body,"",a);o+=c.pre+u,s=c.post}return o+s}return C5(e,/((?:\-[a-z]+\-)?calc)\(/,n)}function P5(e){for(var t=[],n=[],r=/[\.0-9]([%a-z]+)/gi,i=r.exec(e);i;)!i||!i[1]||(n.indexOf(i[1].toLowerCase())===-1&&(t.push(i[1]),n.push(i[1].toLowerCase())),i=r.exec(e));return t}const Bg=ps($5);var A5=typeof no=="object"&&no&&no.Object===Object&&no,L5=A5,D5=L5,I5=typeof self=="object"&&self&&self.Object===Object&&self,F5=D5||I5||Function("return this")(),ku=F5,z5=ku,B5=z5.Symbol,ZS=B5,JS=ZS,QS=Object.prototype,j5=QS.hasOwnProperty,W5=QS.toString,Ks=JS?JS.toStringTag:void 0;function U5(e){var t=j5.call(e,Ks),n=e[Ks];try{e[Ks]=void 0;var r=!0}catch{}var i=W5.call(e);return r&&(t?e[Ks]=n:delete e[Ks]),i}var H5=U5,q5=Object.prototype,K5=q5.toString;function V5(e){return K5.call(e)}var Y5=V5,RS=ZS,G5=H5,X5=Y5,Z5="[object Null]",J5="[object Undefined]",eN=RS?RS.toStringTag:void 0;function Q5(e){return e==null?e===void 0?J5:Z5:eN&&eN in Object(e)?G5(e):X5(e)}var tN=Q5;function R5(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Su=R5,ez=tN,tz=Su,nz="[object AsyncFunction]",rz="[object Function]",iz="[object GeneratorFunction]",az="[object Proxy]";function oz(e){if(!tz(e))return!1;var t=ez(e);return t==rz||t==iz||t==nz||t==az}var sz=oz,lz=ku,cz=lz["__core-js_shared__"],uz=cz,jg=uz,nN=function(){var e=/[^.]+$/.exec(jg&&jg.keys&&jg.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function dz(e){return!!nN&&nN in e}var fz=dz,hz=Function.prototype,pz=hz.toString;function gz(e){if(e!=null){try{return pz.call(e)}catch{}try{return e+""}catch{}}return""}var vz=gz,mz=sz,yz=fz,bz=Su,xz=vz,_z=/[\\^$.*+?()[\]{}|]/g,wz=/^\[object .+?Constructor\]$/,kz=Function.prototype,Sz=Object.prototype,Nz=kz.toString,Cz=Sz.hasOwnProperty,Ez=RegExp("^"+Nz.call(Cz).replace(_z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Tz(e){if(!bz(e)||yz(e))return!1;var t=mz(e)?Ez:wz;return t.test(xz(e))}var Mz=Tz;function $z(e,t){return e==null?void 0:e[t]}var Oz=$z,Pz=Mz,Az=Oz;function Lz(e,t){var n=Az(e,t);return Pz(n)?n:void 0}var rN=Lz,Dz=rN,Iz=Dz(Object,"create"),Nu=Iz,iN=Nu;function Fz(){this.__data__=iN?iN(null):{},this.size=0}var zz=Fz;function Bz(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var jz=Bz,Wz=Nu,Uz="__lodash_hash_undefined__",Hz=Object.prototype,qz=Hz.hasOwnProperty;function Kz(e){var t=this.__data__;if(Wz){var n=t[e];return n===Uz?void 0:n}return qz.call(t,e)?t[e]:void 0}var Vz=Kz,Yz=Nu,Gz=Object.prototype,Xz=Gz.hasOwnProperty;function Zz(e){var t=this.__data__;return Yz?t[e]!==void 0:Xz.call(t,e)}var Jz=Zz,Qz=Nu,Rz="__lodash_hash_undefined__";function e6(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Qz&&t===void 0?Rz:t,this}var t6=e6,n6=zz,r6=jz,i6=Vz,a6=Jz,o6=t6;function vo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}vo.prototype.clear=n6,vo.prototype.delete=r6,vo.prototype.get=i6,vo.prototype.has=a6,vo.prototype.set=o6;var s6=vo;function l6(){this.__data__=[],this.size=0}var c6=l6;function u6(e,t){return e===t||e!==e&&t!==t}var d6=u6,f6=d6;function h6(e,t){for(var n=e.length;n--;)if(f6(e[n][0],t))return n;return-1}var Cu=h6,p6=Cu,g6=Array.prototype,v6=g6.splice;function m6(e){var t=this.__data__,n=p6(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():v6.call(t,n,1),--this.size,!0}var y6=m6,b6=Cu;function x6(e){var t=this.__data__,n=b6(t,e);return n<0?void 0:t[n][1]}var _6=x6,w6=Cu;function k6(e){return w6(this.__data__,e)>-1}var S6=k6,N6=Cu;function C6(e,t){var n=this.__data__,r=N6(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var E6=C6,T6=c6,M6=y6,$6=_6,O6=S6,P6=E6;function mo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}mo.prototype.clear=T6,mo.prototype.delete=M6,mo.prototype.get=$6,mo.prototype.has=O6,mo.prototype.set=P6;var A6=mo,L6=rN,D6=ku,I6=L6(D6,"Map"),F6=I6,aN=s6,z6=A6,B6=F6;function j6(){this.size=0,this.__data__={hash:new aN,map:new(B6||z6),string:new aN}}var W6=j6;function U6(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var H6=U6,q6=H6;function K6(e,t){var n=e.__data__;return q6(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Eu=K6,V6=Eu;function Y6(e){var t=V6(this,e).delete(e);return this.size-=t?1:0,t}var G6=Y6,X6=Eu;function Z6(e){return X6(this,e).get(e)}var J6=Z6,Q6=Eu;function R6(e){return Q6(this,e).has(e)}var eB=R6,tB=Eu;function nB(e,t){var n=tB(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var rB=nB,iB=W6,aB=G6,oB=J6,sB=eB,lB=rB;function yo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yo.prototype.clear=iB,yo.prototype.delete=aB,yo.prototype.get=oB,yo.prototype.has=sB,yo.prototype.set=lB;var cB=yo,oN=cB,uB="Expected a function";function Wg(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(uB);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Wg.Cache||oN),n}Wg.Cache=oN;var dB=Wg;const fB=ps(dB);var sN="__react_svg_text_measurement_id";function hB(e,t){try{var n=document.getElementById(sN);if(!n){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("aria-hidden","true"),r.style.width="0",r.style.height="0",r.style.position="absolute",r.style.top="-100%",r.style.left="-100%",n=document.createElementNS("http://www.w3.org/2000/svg","text"),n.setAttribute("id",sN),r.appendChild(n),document.body.appendChild(r)}return Object.assign(n.style,t),n.textContent=e,n.getComputedTextLength()}catch{return null}}const Ug=fB(hB,function(e,t){return e+"_"+JSON.stringify(t)});var pB=["verticalAnchor","scaleToFit","angle","width","lineHeight","capHeight","children","style"];function gB(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Hg(e){return typeof e=="number"}function lN(e){return typeof e=="number"&&Number.isFinite(e)||typeof e=="string"}function cN(e){var t=e.verticalAnchor,n=t===void 0?"end":t,r=e.scaleToFit,i=r===void 0?!1:r,a=e.angle,o=e.width,s=e.lineHeight,l=s===void 0?"1em":s,c=e.capHeight,u=c===void 0?"0.71em":c,d=e.children,f=e.style,g=gB(e,pB),p=g.x,v=p===void 0?0:p,m=g.y,b=m===void 0?0:m,y=!lN(v)||!lN(b),x=_.useMemo(function(){var E=d==null?[]:d.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:E.map(function(T){return{word:T,wordWidth:Ug(T,f)||0}}),spaceWidth:Ug(" ",f)||0}},[d,f]),k=x.wordsWithWidth,w=x.spaceWidth,S=_.useMemo(function(){return y?[]:o||i?k.reduce(function(E,T){var O=T.word,P=T.wordWidth,M=E[E.length-1];if(M&&(o==null||i||(M.width||0)+P+w<o))M.words.push(O),M.width=M.width||0,M.width+=P+w;else{var $={words:[O],width:P};E.push($)}return E},[]):[{words:d==null?[]:d.toString().split(/(?:(?!\u00A0+)\s+)/)}]},[y,o,i,d,k,w]),N=_.useMemo(function(){var E=y?"":Bg(n==="start"?"calc("+u+")":n==="middle"?"calc("+(S.length-1)/2+" * -"+l+" + ("+u+" / 2))":"calc("+(S.length-1)+" * -"+l+")");return E},[y,n,u,S.length,l]),C=_.useMemo(function(){var E=[];if(y)return"";if(Hg(v)&&Hg(b)&&Hg(o)&&i&&S.length>0){var T=S[0].width||1,O=i==="shrink-only"?Math.min(o/T,1):o/T,P=O,M=v-O*v,$=b-P*b;E.push("matrix("+O+", 0, 0, "+P+", "+M+", "+$+")")}return a&&E.push("rotate("+a+", "+v+", "+b+")"),E.length>0?E.join(" "):""},[y,v,b,o,i,S,a]);return{wordsByLines:S,startDy:N,transform:C}}var vB=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function qg(){return qg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qg.apply(this,arguments)}function mB(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var yB={overflow:"visible"};function Kg(e){var t=e.dx,n=t===void 0?0:t,r=e.dy,i=r===void 0?0:r,a=e.textAnchor,o=a===void 0?"start":a,s=e.innerRef,l=e.innerTextRef;e.verticalAnchor,e.angle;var c=e.lineHeight,u=c===void 0?"1em":c;e.scaleToFit,e.capHeight,e.width;var d=mB(e,vB),f=d.x,g=f===void 0?0:f,p=d.fontSize,v=cN(e),m=v.wordsByLines,b=v.startDy,y=v.transform;return _.createElement("svg",{ref:s,x:n,y:i,fontSize:p,style:yB},m.length>0?_.createElement("text",qg({ref:l,transform:y},d,{textAnchor:o}),m.map(function(x,k){return _.createElement("tspan",{key:k,x:g,dy:k===0?b:u},x.words.join(" "))})):null)}const bB=Object.freeze(Object.defineProperty({__proto__:null,Text:Kg,getStringWidth:Ug,useText:cN},Symbol.toStringTag,{value:"Module"}));var un={top:"top",left:"left",bottom:"bottom"};function xB(e){var t=e.labelOffset,n=e.labelProps,r=e.orientation,i=e.range,a=e.tickLabelFontSize,o=e.tickLength,s=r===un.left||r===un.top?-1:1,l,c,u;if(r===un.top||r===un.bottom){var d=r===un.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(i[0])+Number(i[i.length-1]))/2,c=s*(o+t+a+d)}else l=s*((Number(i[0])+Number(i[i.length-1]))/2),c=-(o+t),u="rotate("+s*90+")";return{x:l,y:c,transform:u}}function Vs(){return Vs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vs.apply(this,arguments)}function _B(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,i=e.tickClassName,a=e.tickComponent,o=e.tickLabelProps,s=e.tickStroke,l=s===void 0?"#222":s,c=e.tickTransform,u=e.ticks,d=e.strokeWidth,f=e.tickLineProps;return u.map(function(g){var p,v=g.value,m=g.index,b=g.from,y=g.to,x=g.formattedValue,k=(p=o[m])!=null?p:{},w=Math.max(10,typeof k.fontSize=="number"&&k.fontSize||0),S=y.y+(n&&r!==un.top?w:0);return _.createElement(Je,{key:"visx-tick-"+v+"-"+m,className:Te("visx-axis-tick",i),transform:c},!t&&_.createElement(lg,Vs({from:b,to:y,stroke:l,strokeWidth:d,strokeLinecap:"square"},f)),a?a(Vs({},k,{x:y.x,y:S,formattedValue:x})):_.createElement(Kg,Vs({x:y.x,y:S},k),x))})}function Ys(){return Ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ys.apply(this,arguments)}var uN={textAnchor:"middle",fontFamily:"Arial",fontSize:10,fill:"#222"};function wB(e){var t=e.axisFromPoint,n=e.axisLineClassName,r=e.axisToPoint,i=e.hideAxisLine,a=e.hideTicks,o=e.horizontal,s=e.label,l=s===void 0?"":s,c=e.labelClassName,u=e.labelOffset,d=u===void 0?14:u,f=e.labelProps,g=e.orientation,p=g===void 0?un.bottom:g,v=e.scale,m=e.stroke,b=m===void 0?"#222":m,y=e.strokeDasharray,x=e.strokeWidth,k=x===void 0?1:x,w=e.tickClassName,S=e.tickComponent,N=e.tickLineProps,C=e.tickLabelProps,E=e.tickLength,T=E===void 0?8:E,O=e.tickStroke,P=O===void 0?"#222":O,M=e.tickTransform,$=e.ticks,L=e.ticksComponent,z=L===void 0?_B:L,j=Ys({},uN,f),B=Ys({},uN,typeof C=="object"?C:null),H=$.map(function(D){var U=D.value,V=D.index;return typeof C=="function"?C(U,V,$):B}),F=Math.max.apply(Math,[10].concat(H.map(function(D){return typeof D.fontSize=="number"?D.fontSize:0})));return _.createElement(_.Fragment,null,z({hideTicks:a,horizontal:o,orientation:p,scale:v,tickClassName:w,tickComponent:S,tickLabelProps:H,tickStroke:P,tickTransform:M,ticks:$,strokeWidth:k,tickLineProps:N}),!i&&_.createElement(lg,{className:Te("visx-axis-line",n),from:t,to:r,stroke:b,strokeWidth:k,strokeDasharray:y}),l&&_.createElement(Kg,Ys({className:Te("visx-axis-label",c)},xB({labelOffset:d,labelProps:j,orientation:p,range:v.range(),tickLabelFontSize:F,tickLength:T}),j),l))}function kB(e,t){t===void 0&&(t="center");var n=e;if(t!=="start"&&"bandwidth"in n){var r=n.bandwidth();return t==="center"&&(r/=2),n.round()&&(r=Math.round(r)),function(i){var a=n(i);return typeof a=="number"?a+r:a}}return e}function SB(e){var t=e;return"tickFormat"in t?t.tickFormat():Ck}var bo=function(){function e(n){var r=n.x,i=r===void 0?0:r,a=n.y,o=a===void 0?0:a;this.x=0,this.y=0,this.x=i,this.y=o}var t=e.prototype;return t.value=function(){return{x:this.x,y:this.y}},t.toArray=function(){return[this.x,this.y]},e}();function NB(e,t){return new bo({x:e.x+t.x,y:e.y+t.y})}function CB(e,t){return new bo({x:e.x-t.x,y:e.y-t.y})}const EB=Object.freeze(Object.defineProperty({__proto__:null,Point:bo,subtractPoints:CB,sumPoints:NB},Symbol.toStringTag,{value:"Module"}));function Tu(e,t){var n=e.x,r=e.y;return new bo(t?{x:n,y:r}:{x:r,y:n})}function Vg(){return Vg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vg.apply(this,arguments)}var Yg=0;function TB(e){return e===void 0&&(e=Yg),typeof e=="number"?{start:e,end:e}:Vg({start:Yg,end:Yg},e)}var MB=["children","axisClassName","hideAxisLine","hideTicks","hideZero","innerRef","left","numTicks","orientation","rangePadding","scale","tickFormat","tickLength","tickValues","top"];function Gg(){return Gg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gg.apply(this,arguments)}function $B(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function dN(e){var t=e.children,n=t===void 0?wB:t,r=e.axisClassName,i=e.hideAxisLine,a=i===void 0?!1:i,o=e.hideTicks,s=o===void 0?!1:o,l=e.hideZero,c=l===void 0?!1:l,u=e.innerRef,d=e.left,f=d===void 0?0:d,g=e.numTicks,p=g===void 0?10:g,v=e.orientation,m=v===void 0?un.bottom:v,b=e.rangePadding,y=b===void 0?0:b,x=e.scale,k=e.tickFormat,w=e.tickLength,S=w===void 0?8:w,N=e.tickValues,C=e.top,E=C===void 0?0:C,T=$B(e,MB),O=k??SB(x),P=m===un.left,M=m===un.top,$=M||m===un.bottom,L=kB(x),z=P||M?-1:1,j=x.range(),B=TB(y),H=Tu({x:Number(j[0])+.5-B.start,y:0},$),F=Tu({x:Number(j[j.length-1])+.5+B.end,y:0},$),D=(N??Nk(x,p)).filter(function(V){return!c||V!==0&&V!=="0"}).map(function(V,Y){return{value:V,index:Y}}),U=D.map(function(V){var Y=V.value,G=V.index,R=Sk(L(Y));return{value:Y,index:G,from:Tu({x:R,y:0},$),to:Tu({x:R,y:S*z},$),formattedValue:O(Y,G,D)}});return _.createElement(Je,{className:Te("visx-axis",r),innerRef:u,top:E,left:f},n(Gg({},T,{axisFromPoint:H,axisToPoint:F,hideAxisLine:a,hideTicks:s,hideZero:c,horizontal:$,numTicks:p,orientation:m,rangePadding:y,scale:x,tickFormat:O,tickLength:S,tickPosition:L,tickSign:z,ticks:U})))}var OB=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Mu(){return Mu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mu.apply(this,arguments)}function PB(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var AB={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function Gs(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?36:n,i=e.tickLength,a=i===void 0?8:i,o=e.tickLabelProps,s=PB(e,OB),l=typeof o=="function"?o:Mu({},AB,o);return _.createElement(dN,Mu({axisClassName:Te("visx-axis-left",t),labelOffset:r,orientation:un.left,tickLabelProps:l,tickLength:a},s))}var LB=["axisClassName","labelOffset","tickLength","tickLabelProps"];function $u(){return $u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$u.apply(this,arguments)}function DB(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var IB={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function va(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?8:n,i=e.tickLength,a=i===void 0?8:i,o=e.tickLabelProps,s=DB(e,LB),l=typeof o=="function"?o:$u({},IB,o);return _.createElement(dN,$u({axisClassName:Te("visx-axis-bottom",t),labelOffset:r,orientation:un.bottom,tickLabelProps:l,tickLength:a},s))}var Xg={};const Ou=Bn(EB);function FB(e){return!!e&&e instanceof Element}function zB(e){return!!e&&(e instanceof SVGElement||"ownerSVGElement"in e)}function BB(e){return!!e&&"createSVGPoint"in e}function jB(e){return!!e&&"getScreenCTM"in e}function WB(e){return!!e&&"changedTouches"in e}function UB(e){return!!e&&"clientX"in e}function HB(e){return!!e&&(e instanceof Event||"nativeEvent"in e&&e.nativeEvent instanceof Event)}function Xs(){return Xs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xs.apply(this,arguments)}var Zg={x:0,y:0};function qB(e){if(!e)return Xs({},Zg);if(WB(e))return e.changedTouches.length>0?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:Xs({},Zg);if(UB(e))return{x:e.clientX,y:e.clientY};var t=e==null?void 0:e.target,n=t&&"getBoundingClientRect"in t?t.getBoundingClientRect():null;return n?{x:n.x+n.width/2,y:n.y+n.height/2}:Xs({},Zg)}function Jg(e,t){if(!e||!t)return null;var n=qB(t),r=zB(e)?e.ownerSVGElement:e,i=jB(r)?r.getScreenCTM():null;if(BB(r)&&i){var a=r.createSVGPoint();return a.x=n.x,a.y=n.y,a=a.matrixTransform(i.inverse()),new bo({x:a.x,y:a.y})}var o=e.getBoundingClientRect();return new bo({x:n.x-o.left-e.clientLeft,y:n.y-o.top-e.clientTop})}function fN(e,t){if(FB(e)&&t)return Jg(e,t);if(HB(e)){var n=e,r=n.target;if(r)return Jg(r,n)}return null}const KB=Bn(Object.freeze(Object.defineProperty({__proto__:null,localPoint:fN,touchPoint:Jg},Symbol.toStringTag,{value:"Module"})));var Qg={};Qg.__esModule=!0,Qg.default=VB;var Pu=_;function VB(e){var t=(0,Pu.useState)(e),n=t[0],r=t[1],i=(0,Pu.useRef)(null),a=(0,Pu.useCallback)(function(o,s){i.current=s||null,r(o)},[r]);return(0,Pu.useLayoutEffect)(function(){i.current&&(i.current(n),i.current=null)},[n]),[n,a]}var Rg={},ev={};ev.__esModule=!0,ev.default=YB;function YB(e,t,n){return Math.min(Math.max(e,t),n)}var tv={};tv.__esModule=!0,tv.default=ZB;function GB(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=XB(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
312
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XB(e,t){if(e){if(typeof e=="string")return hN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hN(e,t)}}function hN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ZB(e,t){for(var n=e,r=1/0,i=GB(t),a;!(a=i()).done;){var o=a.value,s=Math.sqrt(Math.pow(o.x-e.x,2)+Math.pow(o.y-e.y,2));s<r&&(r=s,n={x:o.x,y:o.y})}return n}Rg.__esModule=!0,Rg.default=QB;var pN=gN(ev),JB=gN(tv);function gN(e){return e&&e.__esModule?e:{default:e}}function QB(e,t,n){var r,i,a,o;return n===void 0&&(n={}),t.length>0?(0,JB.default)(e,t):{x:(0,pN.default)(e.x,(r=n.xMin)!=null?r:-1/0,(i=n.xMax)!=null?i:1/0),y:(0,pN.default)(e.y,(a=n.yMin)!=null?a:-1/0,(o=n.yMax)!=null?o:1/0)}}var nv={};nv.__esModule=!0,nv.default=t4;var RB=_;function e4(e,t,n){if(n===void 0&&(n=1),!e)return[];for(var r=[],i=e.getTotalLength(),a=0;a<=i;a+=n){var o=e.getPointAtLength(a),s=o.matrixTransform(t);r.push(s)}return r}function t4(e){var t=(0,RB.useMemo)(function(){if(!e)return[];var n=e.getCTM()||new DOMMatrix;return e4(e,n)},[e==null?void 0:e.getTotalLength()]);return t}Xg.__esModule=!0,Xg.default=i4;var ma=_,xo=Ou,vN=KB,n4=rv(Qg),mN=rv(Rg),r4=rv(nv);function rv(e){return e&&e.__esModule?e:{default:e}}function gr(){return gr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gr.apply(this,arguments)}function i4(e){var t=e===void 0?{}:e,n=t.resetOnStart,r=n===void 0?!1:n,i=t.snapToPointer,a=i===void 0?!0:i,o=t.onDragEnd,s=t.onDragMove,l=t.onDragStart,c=t.x,u=t.y,d=t.dx,f=t.dy,g=t.isDragging,p=t.restrict,v=p===void 0?{}:p,m=t.restrictToPath,b=(0,ma.useRef)({x:c,y:u,dx:d,dy:f}),y=(0,n4.default)({x:c,y:u,dx:d??0,dy:f??0,isDragging:!1}),x=y[0],k=y[1],w=(0,ma.useState)(new xo.Point({x:0,y:0})),S=w[0],N=w[1];(0,ma.useEffect)(function(){(b.current.x!==c||b.current.y!==u||b.current.dx!==d||b.current.dy!==f)&&(b.current={x:c,y:u,dx:d,dy:f},k(function(P){return gr({},P,{x:c,y:u,dx:d??0,dy:f??0})}))}),(0,ma.useEffect)(function(){g!==void 0&&x.isDragging!==g&&k(function(P){return gr({},P,{isDragging:g})})},[x.isDragging,g,k]);var C=(0,r4.default)(m),E=(0,ma.useCallback)(function(P){P.persist(),k(function(M){var $=M.x,L=$===void 0?0:$,z=M.y,j=z===void 0?0:z,B=M.dx,H=M.dy,F=new xo.Point({x:(L||0)+B,y:(j||0)+H}),D=(0,vN.localPoint)(P)||new xo.Point({x:0,y:0}),U=a?D:F,V=(0,mN.default)(U,C,v);return N((0,xo.subtractPoints)(F,D)),{isDragging:!0,dx:r?0:M.dx,dy:r?0:M.dy,x:r?V.x:V.x-M.dx,y:r?V.y:V.y-M.dy}},l&&function(M){l(gr({},M,{event:P}))})},[l,r,v,C,k,a]),T=(0,ma.useCallback)(function(P){P.persist(),k(function(M){if(!M.isDragging)return M;var $=M.x,L=$===void 0?0:$,z=M.y,j=z===void 0?0:z,B=(0,vN.localPoint)(P)||new xo.Point({x:0,y:0}),H=a?B:(0,xo.sumPoints)(B,S),F=(0,mN.default)(H,C,v);return gr({},M,{dx:F.x-L,dy:F.y-j})},s&&function(M){M.isDragging&&s(gr({},M,{event:P}))})},[k,s,a,S,C,v]),O=(0,ma.useCallback)(function(P){P.persist(),k(function(M){return gr({},M,{isDragging:!1})},o&&function(M){o(gr({},M,{event:P}))})},[o,k]);return gr({},x,{dragEnd:O,dragMove:T,dragStart:E})}var Au=yN,Zs=av(li),iv=av(_),a4=av(Xg);function av(e){return e&&e.__esModule?e:{default:e}}function yN(e){var t=e.captureDragArea,n=t===void 0?!0:t,r=e.snapToPointer,i=r===void 0?!0:r,a=e.children,o=e.dx,s=e.dy,l=e.height,c=e.onDragEnd,u=e.onDragMove,d=e.onDragStart,f=e.resetOnStart,g=e.width,p=e.x,v=e.y,m=e.isDragging,b=e.restrict,y=e.restrictToPath,x=(0,a4.default)({resetOnStart:f,snapToPointer:i,onDragEnd:c,onDragMove:u,onDragStart:d,x:p,y:v,dx:o,dy:s,isDragging:m,restrict:b,restrictToPath:y});return iv.default.createElement(iv.default.Fragment,null,x.isDragging&&n&&iv.default.createElement("rect",{width:g,height:l,onPointerDown:x.dragStart,onPointerMove:x.dragMove,onPointerUp:x.dragEnd,fill:"transparent"}),a(x))}yN.propTypes={children:Zs.default.func.isRequired,width:Zs.default.number.isRequired,height:Zs.default.number.isRequired,captureDragArea:Zs.default.bool,isDragging:Zs.default.bool};function Lu(e,t){if("invert"in e&&typeof e.invert<"u")return e.invert(t).valueOf();var n=e.range(),r=n[0],i=n[1],a=0,o="step"in e&&typeof e.step<"u"?e.step():1,s=o*(i-r)/Math.abs(i-r);if(s>0)for(;t>r+s*(a+1);)a+=1;else for(;t<r+s*(a+1);)a+=1;return a}function bN(e,t,n,r){var i,a=Lu(e,t+(t<n?-r:r)),o=Lu(e,n+(n<t?-r:r)),s=Math.min(a,o),l=Math.max(a,o);if("invert"in e&&typeof e.invert<"u")i={start:s,end:l};else{for(var c=[],u=e.domain(),d=s;d<=l;d+=1)c.push(u[d]);i={values:c}}return i}function ov(e){if(typeof window<"u"&&window.TouchEvent&&e instanceof TouchEvent)return{pageX:e.touches[0].pageX,pageY:e.touches[0].pageY};var t=e;return{pageX:t.pageX,pageY:t.pageY}}function o4(e,t){var n;return function(){for(var i=this,a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];clearTimeout(n),n=setTimeout(function(){e.apply(i,o)},t)}}function Tn(){return Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tn.apply(this,arguments)}function s4(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,sv(e,t)}function sv(e,t){return sv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},sv(e,t)}var xN=function(e){s4(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r=e.call.apply(e,[this].concat(a))||this,r.handleDragStart=function(s){var l=r.props,c=l.onBrushHandleChange,u=l.type,d=l.onBrushStart;c&&c(u,ov(s.event)),d&&d(s)},r.handleDragMove=function(s){var l=r.props,c=l.updateBrush,u=l.type,d=l.isControlled;!s.isDragging||d||c(function(f){var g=f.start,p=f.end,v=0,m=Math.max(g.x,p.x),b=Math.min(g.x,p.x),y=Math.max(g.y,p.y),x=Math.min(g.y,p.y);switch(u){case"right":return v=m+s.dx,Tn({},f,{activeHandle:u,extent:Tn({},f.extent,{x0:Math.max(Math.min(v,g.x),f.bounds.x0),x1:Math.min(Math.max(v,g.x),f.bounds.x1)})});case"left":return v=b+s.dx,Tn({},f,{activeHandle:u,extent:Tn({},f.extent,{x0:Math.min(v,p.x),x1:Math.max(v,p.x)})});case"bottom":return v=y+s.dy,Tn({},f,{activeHandle:u,extent:Tn({},f.extent,{y0:Math.min(v,g.y),y1:Math.max(v,g.y)})});case"top":return v=x+s.dy,Tn({},f,{activeHandle:u,extent:Tn({},f.extent,{y0:Math.min(v,p.y),y1:Math.max(v,p.y)})});default:return f}})},r.handleDragEnd=function(){var s=r.props,l=s.updateBrush,c=s.onBrushEnd,u=s.onBrushHandleChange,d=s.isControlled;d||l(function(f){var g=f.start,p=f.end,v=f.extent;g.x=Math.min(v.x0,v.x1),g.y=Math.min(v.y0,v.y0),p.x=Math.max(v.x0,v.x1),p.y=Math.max(v.y0,v.y1);var m=Tn({},f,{start:g,end:p,activeHandle:null,isBrushing:!1,extent:{x0:Math.min(g.x,p.x),x1:Math.max(g.x,p.x),y0:Math.min(g.y,p.y),y1:Math.max(g.y,p.y)}});return c&&c(m),m}),u&&u()},r}var n=t.prototype;return n.render=function(){var i=this,a=this.props,o=a.stageWidth,s=a.stageHeight,l=a.brush,c=a.type,u=a.handle,d=a.isControlled,f=a.isDragInProgress,g=a.renderBrushHandle,p=u.x,v=u.y,m=u.width,b=u.height,y=c==="right"||c==="left"?"ew-resize":"ns-resize";return _.createElement(Au,{width:o,height:s,onDragStart:this.handleDragStart,onDragMove:this.handleDragMove,onDragEnd:this.handleDragEnd,resetOnStart:!0,isDragging:d?f:void 0},function(x){var k=x.dragStart,w=x.dragEnd,S=x.dragMove,N=x.isDragging;return _.createElement("g",null,N&&_.createElement("rect",{fill:"transparent",width:o,height:s,style:{cursor:y},onPointerMove:S,onPointerUp:d?void 0:w,onPointerLeave:d?void 0:w}),!g&&_.createElement("rect",{x:p,y:v,width:m,height:b,fill:"transparent",className:"visx-brush-handle-"+c,onPointerDown:k,onPointerMove:S,onPointerUp:d?void 0:w,style:{cursor:y,pointerEvents:l.activeHandle||l.isBrushing?"none":"all"}}),g&&_.createElement("g",{onPointerDown:k,onPointerMove:S,onPointerUp:d?void 0:w},g(Tn({},i.props.handle,{height:s,className:"visx-brush-handle-"+c,isBrushActive:l.extent.x0!==-1&&l.extent.x1!==-1}))))})},t}(_.Component);xN.propTypes={stageWidth:K.number.isRequired,stageHeight:K.number.isRequired,updateBrush:K.func.isRequired,onBrushStart:K.func,onBrushEnd:K.func,handle:K.shape({x:K.number.isRequired,y:K.number.isRequired,width:K.number.isRequired,height:K.number.isRequired}).isRequired,isControlled:K.bool,isDragInProgress:K.bool,onBrushHandleChange:K.func,renderBrushHandle:K.func};function dn(){return dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dn.apply(this,arguments)}function l4(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,lv(e,t)}function lv(e,t){return lv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},lv(e,t)}var cv=function(e){l4(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r=e.call.apply(e,[this].concat(a))||this,r.cornerDragMove=function(s){var l=r.props,c=l.updateBrush,u=l.type;s.isDragging&&c(function(d){var f=d.start,g=d.end,p=Math.max(f.x,g.x),v=Math.min(f.x,g.x),m=Math.max(f.y,g.y),b=Math.min(f.y,g.y),y=0,x=0;switch(u){case"topRight":return y=p+s.dx,x=b+s.dy,dn({},d,{activeHandle:u,extent:dn({},d.extent,{x0:Math.max(Math.min(y,f.x),d.bounds.x0),x1:Math.min(Math.max(y,f.x),d.bounds.x1),y0:Math.max(Math.min(x,g.y),d.bounds.y0),y1:Math.min(Math.max(x,g.y),d.bounds.y1)})});case"topLeft":return y=v+s.dx,x=b+s.dy,dn({},d,{activeHandle:u,extent:dn({},d.extent,{x0:Math.max(Math.min(y,g.x),d.bounds.x0),x1:Math.min(Math.max(y,g.x),d.bounds.x1),y0:Math.max(Math.min(x,g.y),d.bounds.y0),y1:Math.min(Math.max(x,g.y),d.bounds.y1)})});case"bottomLeft":return y=v+s.dx,x=m+s.dy,dn({},d,{activeHandle:u,extent:dn({},d.extent,{x0:Math.max(Math.min(y,g.x),d.bounds.x0),x1:Math.min(Math.max(y,g.x),d.bounds.x1),y0:Math.max(Math.min(x,f.y),d.bounds.y0),y1:Math.min(Math.max(x,f.y),d.bounds.y1)})});case"bottomRight":return y=p+s.dx,x=m+s.dy,dn({},d,{activeHandle:u,extent:dn({},d.extent,{x0:Math.max(Math.min(y,f.x),d.bounds.x0),x1:Math.min(Math.max(y,f.x),d.bounds.x1),y0:Math.max(Math.min(x,f.y),d.bounds.y0),y1:Math.min(Math.max(x,f.y),d.bounds.y1)})});default:return d}})},r.cornerDragEnd=function(){var s=r.props,l=s.updateBrush,c=s.onBrushEnd;l(function(u){var d=u.start,f=u.end,g=u.extent;d.x=Math.min(g.x0,g.x1),d.y=Math.min(g.y0,g.y0),f.x=Math.max(g.x0,g.x1),f.y=Math.max(g.y0,g.y1);var p=dn({},u,{start:d,end:f,activeHandle:null,domain:{x0:Math.min(d.x,f.x),x1:Math.max(d.x,f.x),y0:Math.min(d.y,f.y),y1:Math.max(d.y,f.y)}});return c&&c(p),p})},r}var n=t.prototype;return n.render=function(){var i=this.props,a=i.type,o=i.brush,s=i.stageWidth,l=i.stageHeight,c=i.style,u=i.corner,d=(c==null?void 0:c.cursor)||(a==="topLeft"||a==="bottomRight"?"nwse-resize":"nesw-resize"),f=o.activeHandle||o.isBrushing?"none":"all";return _.createElement(Au,{width:s,height:l,onDragMove:this.cornerDragMove,onDragEnd:this.cornerDragEnd,resetOnStart:!0},function(g){var p=g.dragMove,v=g.dragEnd,m=g.dragStart,b=g.isDragging;return _.createElement("g",null,b&&_.createElement("rect",{fill:"transparent",width:s,height:l,style:{cursor:d},onPointerMove:p,onPointerUp:v}),_.createElement("rect",dn({fill:"transparent",onPointerDown:m,onPointerMove:p,onPointerUp:v,className:"visx-brush-corner-"+a,style:dn({cursor:d,pointerEvents:f},c)},u)))})},t}(_.Component);cv.propTypes={stageWidth:K.number.isRequired,stageHeight:K.number.isRequired,updateBrush:K.func.isRequired,onBrushEnd:K.func,corner:K.shape({x:K.number.isRequired,y:K.number.isRequired,width:K.number.isRequired,height:K.number.isRequired}).isRequired},cv.defaultProps={style:{}};function yi(){return yi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yi.apply(this,arguments)}function c4(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,uv(e,t)}function uv(e,t){return uv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},uv(e,t)}var u4={cursor:"move"},dv=function(e){c4(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r=e.call.apply(e,[this].concat(a))||this,r.selectionDragStart=function(s){var l=r.props,c=l.onMoveSelectionChange,u=l.onBrushStart;c&&c("move",ov(s.event)),u&&u(s)},r.selectionDragMove=function(s){var l=r.props,c=l.updateBrush,u=l.isControlled;u||c(function(d){var f=d.start,g=f.x,p=f.y,v=d.end,m=v.x,b=v.y,y=s.dx>0?Math.min(s.dx,d.bounds.x1-m):Math.max(s.dx,d.bounds.x0-g),x=s.dy>0?Math.min(s.dy,d.bounds.y1-b):Math.max(s.dy,d.bounds.y0-p);return yi({},d,{isBrushing:!0,extent:yi({},d.extent,{x0:g+y,x1:m+y,y0:p+x,y1:b+x})})})},r.selectionDragEnd=function(){var s=r.props,l=s.updateBrush,c=s.onBrushEnd,u=s.onMoveSelectionChange,d=s.isControlled;d||l(function(f){var g=yi({},f,{isBrushing:!1,start:yi({},f.start,{x:Math.min(f.extent.x0,f.extent.x1),y:Math.min(f.extent.y0,f.extent.y1)}),end:yi({},f.end,{x:Math.max(f.extent.x0,f.extent.x1),y:Math.max(f.extent.y0,f.extent.y1)})});return c&&c(g),g}),u&&u()},r}var n=t.prototype;return n.render=function(){var i=this.props,a=i.width,o=i.height,s=i.stageWidth,l=i.stageHeight,c=i.brush,u=i.disableDraggingSelection,d=i.onMouseLeave,f=i.onMouseMove,g=i.onMouseUp,p=i.onClick,v=i.selectedBoxStyle,m=i.isControlled,b=i.isDragInProgress;return _.createElement(Au,{width:a,height:o,resetOnStart:!0,onDragStart:this.selectionDragStart,onDragMove:this.selectionDragMove,onDragEnd:this.selectionDragEnd,isDragging:m?b:void 0},function(y){var x=y.isDragging,k=y.dragStart,w=y.dragEnd,S=y.dragMove;return _.createElement("g",null,x&&_.createElement("rect",{width:s,height:l,fill:"transparent",onPointerUp:m?void 0:w,onPointerMove:S,onPointerLeave:m?void 0:w,style:u4}),_.createElement("rect",yi({x:Math.min(c.extent.x0,c.extent.x1),y:Math.min(c.extent.y0,c.extent.y1),width:a,height:o,className:"visx-brush-selection",onPointerDown:u?void 0:k,onPointerLeave:function(C){d&&d(C)},onPointerMove:function(C){S(C),f&&f(C)},onPointerUp:function(C){m||w(C),g&&g(C)},onClick:function(C){p&&p(C)},style:{pointerEvents:c.isBrushing||c.activeHandle?"none":"all",cursor:u?void 0:"move"}},v)))})},t}(_.Component);dv.propTypes={width:K.number.isRequired,height:K.number.isRequired,stageWidth:K.number.isRequired,stageHeight:K.number.isRequired,updateBrush:K.func.isRequired,onMoveSelectionChange:K.func,onBrushStart:K.func,onBrushEnd:K.func,disableDraggingSelection:K.bool.isRequired,onMouseLeave:K.func,onMouseMove:K.func,onMouseUp:K.func,onClick:K.func,isControlled:K.bool,isDragInProgress:K.bool},dv.defaultProps={onMouseLeave:null,onMouseUp:null,onMouseMove:null,onClick:null};function fv(){return fv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fv.apply(this,arguments)}function hv(e){return _.createElement(vi,fv({className:"visx-brush-overlay",fill:"transparent",x:0,y:0},e))}hv.propTypes={width:K.number.isRequired,height:K.number.isRequired,onClick:K.func,onDoubleClick:K.func,onPointerDown:K.func,onPointerLeave:K.func,onPointerMove:K.func,onPointerUp:K.func};function Ut(){return Ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ut.apply(this,arguments)}function d4(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,pv(e,t)}function pv(e,t){return pv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},pv(e,t)}var gv=function(e){d4(t,e);function t(r){var i;i=e.call(this,r)||this,i.mouseUpTime=0,i.mouseDownTime=0,i.getIdleState=function(){var s=i.props,l=s.width,c=s.height;return{start:{x:0,y:0},end:{x:0,y:0},extent:{x0:-1,x1:-1,y0:-1,y1:-1},bounds:{x0:0,x1:l,y0:0,y1:c},isBrushing:!1,brushPageOffset:void 0,activeHandle:null,brushingType:void 0}},i.handleWindowPointerUp=function(){var s=i.props,l=s.useWindowMoveEvents,c=s.onBrushEnd,u=s.resetOnEnd,d=i.state.brushingType;l&&d&&i.updateBrush(function(f){var g=f.start,p=f.end,v=f.extent;g.x=Math.min(v.x0,v.x1),g.y=Math.min(v.y0,v.y0),p.x=Math.max(v.x0,v.x1),p.y=Math.max(v.y0,v.y1);var m=Ut({},f,{activeHandle:null,isBrushing:!1,brushingType:void 0});return c&&c(m),u&&(m=Ut({},m,i.getIdleState())),m})},i.handleWindowPointerMove=function(s){var l=i.props.useWindowMoveEvents,c=i.state,u=c.brushingType,d=c.isBrushing,f=c.brushPageOffset,g=c.start;if(!(!l||!d)){var p=s.pageX-((f==null?void 0:f.pageX)||0),v=s.pageY-((f==null?void 0:f.pageY)||0);["left","right","top","bottom"].includes(u??"")&&i.updateBrush(function(m){var b=m.start,y=b.x,x=b.y,k=m.end,w=k.x,S=k.y;return Ut({},m,{isBrushing:!0,extent:Ut({},m.extent,i.getExtent({x:u==="left"?Math.min(Math.max(y+p,m.bounds.x0),m.bounds.x1):y,y:u==="top"?Math.min(Math.max(x+v,m.bounds.y0),m.bounds.y1):x},{x:u==="right"?Math.min(Math.max(w+p,m.bounds.x0),m.bounds.x1):w,y:u==="bottom"?Math.min(Math.max(S+v,m.bounds.y0),m.bounds.y1):S}))})}),u==="move"&&i.updateBrush(function(m){var b=m.start,y=b.x,x=b.y,k=m.end,w=k.x,S=k.y,N=p>0?Math.min(p,m.bounds.x1-w):Math.max(p,m.bounds.x0-y),C=v>0?Math.min(v,m.bounds.y1-S):Math.max(v,m.bounds.y0-x);return Ut({},m,{isBrushing:!0,extent:Ut({},m.extent,{x0:y+N,y0:x+C,x1:w+N,y1:S+C})})}),u==="select"&&i.updateBrush(function(m){var b=m.start,y=b.x,x=b.y,k={x:Math.min(Math.max(y+p,m.bounds.x0),m.bounds.x1),y:Math.min(Math.max(x+v,m.bounds.y0),m.bounds.y1)},w=i.getExtent(g,k),S=Ut({},m,{end:k,extent:w});return S})}},i.debouncedHandleWindowPointerMove=o4(i.handleWindowPointerMove,1),i.getExtent=function(s,l){var c=i.props,u=c.brushDirection,d=c.width,f=c.height,g=u==="vertical"?0:Math.min(s.x||0,l.x||0),p=u==="vertical"?d:Math.max(s.x||0,l.x||0),v=u==="horizontal"?0:Math.min(s.y||0,l.y||0),m=u==="horizontal"?f:Math.max(s.y||0,l.y||0);return{x0:g,x1:p,y0:v,y1:m}},i.handleDragStart=function(s){var l=i.props,c=l.onBrushStart,u=l.left,d=l.top,f=l.inheritedMargin,g=l.useWindowMoveEvents,p=f!=null&&f.left?f.left:0,v=f!=null&&f.top?f.top:0,m={x:(s.x||0)+s.dx-u-p,y:(s.y||0)+s.dy-d-v},b=Ut({},m);c&&c(m),i.updateBrush(function(y){return Ut({},y,{start:m,end:b,extent:{x0:-1,x1:-1,y0:-1,y1:-1},isBrushing:!0,brushingType:"select",brushPageOffset:g?ov(s.event):void 0})})},i.handleBrushStart=function(s){var l=i.props,c=l.onBrushStart,u=l.left,d=l.top,f=l.inheritedMargin;if(c){var g=f!=null&&f.left?f.left:0,p=f!=null&&f.top?f.top:0,v={x:(s.x||0)+s.dx-u-g,y:(s.y||0)+s.dy-d-p};c(v)}},i.handleDragMove=function(s){var l=i.props,c=l.left,u=l.top,d=l.inheritedMargin,f=l.useWindowMoveEvents;if(!(!s.isDragging||f)){var g=(d==null?void 0:d.left)||0,p=(d==null?void 0:d.top)||0,v={x:(s.x||0)+s.dx-c-g,y:(s.y||0)+s.dy-u-p};i.updateBrush(function(m){var b=m.start,y=i.getExtent(b,v);return Ut({},m,{end:v,extent:y})})}},i.handleDragEnd=function(){var s=i.props,l=s.onBrushEnd,c=s.resetOnEnd,u=s.useWindowMoveEvents;u||i.updateBrush(function(d){var f=d.extent,g=Ut({},d,{start:{x:f.x0,y:f.y0},end:{x:f.x1,y:f.y1},isBrushing:!1,brushingType:void 0,activeHandle:null});return l&&l(g),c&&(g=Ut({},g,i.getIdleState())),g})},i.getBrushWidth=function(){var s=i.state.extent,l=s.x0,c=s.x1;return Math.max(Math.max(l,c)-Math.min(l,c),0)},i.getBrushHeight=function(){var s=i.state.extent,l=s.y1,c=s.y0;return Math.max(Math.max(c,l)-Math.min(c,l),0)},i.handles=function(){var s=i.props.handleSize,l=i.state.extent,c=l.x0,u=l.x1,d=l.y0,f=l.y1,g=s/2,p=i.getBrushWidth(),v=i.getBrushHeight();return{top:{x:c-g,y:d-g,height:s,width:p+s},bottom:{x:c-g,y:f-g,height:s,width:p+s},right:{x:u-g,y:d-g,height:v+s,width:s},left:{x:c-g,y:d-g,height:v+s,width:s}}},i.corners=function(){var s=i.props.handleSize,l=i.state.extent,c=l.x0,u=l.x1,d=l.y0,f=l.y1,g=s/2,p=s,v=s;return{topLeft:{x:Math.min(c,u)-g,y:Math.min(d,f)-g,width:p,height:v},topRight:{x:Math.max(c,u)-g,y:Math.min(d,f)-g,width:p,height:v},bottomLeft:{x:Math.min(c,u)-g,y:Math.max(d,f)-g,width:p,height:v},bottomRight:{x:Math.max(c,u)-g,y:Math.max(d,f)-g,width:p,height:v}}},i.updateBrush=function(s){var l=i.props.onChange;i.setState(s,function(){l&&l(i.state)})},i.reset=function(){return i.updateBrush(function(){return i.getIdleState()})},i.handleBrushingTypeChange=function(s,l){i.updateBrush(function(c){var u=Ut({},c,{brushingType:s,isBrushing:s!==void 0});return(l||s===void 0)&&(u.brushPageOffset=l),u})};var a=r.initialBrushPosition,o=a?i.getExtent(a.start,a.end):{x0:-1,x1:-1,y0:-1,y1:-1};return i.state={start:{x:Math.max(0,o.x0),y:Math.max(0,o.y0)},end:{x:Math.max(0,o.x1),y:Math.max(0,o.y1)},extent:o,bounds:{x0:0,x1:i.props.width,y0:0,y1:i.props.height},isBrushing:!1,brushingType:void 0,activeHandle:null},i}var n=t.prototype;return n.componentDidUpdate=function(i){var a=this;(this.props.width!==i.width||this.props.height!==i.height)&&this.setState(function(o){var s=o.start,l=o.end,c=o.extent;if(!(c.x0===-1&&c.x1===-1&&c.y0===-1&&c.y1===-1)){var u=a.props.width/i.width,d=a.props.height/i.height;s={x:u*c.x0,y:d*c.y0},l={x:u*c.x1,y:d*c.y1},c=a.getExtent(s,l)}return{start:s,end:l,extent:c,bounds:{x0:0,x1:a.props.width,y0:0,y1:a.props.height}}})},n.componentDidMount=function(){this.props.useWindowMoveEvents&&(window.addEventListener("mouseup",this.handleWindowPointerUp),window.addEventListener("mousemove",this.debouncedHandleWindowPointerMove))},n.componentWillUnmount=function(){this.props.useWindowMoveEvents&&(window.removeEventListener("mouseup",this.handleWindowPointerUp),window.removeEventListener("mousemove",this.debouncedHandleWindowPointerMove))},n.render=function(){var i=this,a=this.state,o=a.start,s=a.end,l=this.props,c=l.top,u=l.left,d=l.width,f=l.height,g=l.onMouseLeave,p=l.onMouseUp,v=l.onMouseMove,m=l.onBrushEnd,b=l.onClick,y=l.resizeTriggerAreas,x=l.selectedBoxStyle,k=l.disableDraggingSelection,w=l.disableDraggingOverlay,S=l.clickSensitivity,N=l.useWindowMoveEvents,C=l.renderBrushHandle,E=this.state.brushingType,T=this.handles(),O=this.corners(),P=this.getBrushWidth(),M=this.getBrushHeight(),$=new Set(y);return _.createElement(Je,{className:"visx-brush",top:c,left:u},w?_.createElement(hv,{width:d,height:f,onClick:function(z){var j=i.mouseUpTime-i.mouseDownTime;b&&j<S&&b(z)},style:{cursor:"default"}}):_.createElement(Au,{width:d,height:f,resetOnStart:!0,onDragStart:this.handleDragStart,onDragMove:this.handleDragMove,onDragEnd:this.handleDragEnd,isDragging:N?E==="select":void 0},function(L){var z=L.dragStart,j=L.isDragging,B=L.dragMove,H=L.dragEnd;return _.createElement(hv,{width:d,height:f,onDoubleClick:function(){return i.reset()},onClick:function(D){var U=i.mouseUpTime-i.mouseDownTime;b&&U<S&&b(D)},onPointerDown:function(D){i.mouseDownTime=Date.now(),z(D)},onPointerLeave:function(D){g&&g(D)},onPointerMove:function(D){!j&&v&&v(D),j&&B(D)},onPointerUp:function(D){i.mouseUpTime=Date.now(),p&&p(D),H(D)},style:{cursor:"crosshair"}})}),o&&s&&_.createElement(dv,{updateBrush:this.updateBrush,width:P,height:M,stageWidth:d,stageHeight:f,brush:this.state,disableDraggingSelection:k,onBrushEnd:m,onBrushStart:this.handleBrushStart,onMouseLeave:g,onMouseMove:v,onMouseUp:p,onMoveSelectionChange:this.handleBrushingTypeChange,onClick:b,selectedBoxStyle:x,isControlled:N,isDragInProgress:N?E==="move":void 0}),o&&s&&Object.keys(T).filter(function(L){return $.has(L)}).map(function(L){var z=T[L];return z&&_.createElement(xN,{key:"handle-"+L,type:L,handle:z,stageWidth:d,stageHeight:f,updateBrush:i.updateBrush,brush:i.state,onBrushStart:i.handleBrushStart,onBrushEnd:m,isControlled:N,isDragInProgress:N?E===L:void 0,onBrushHandleChange:i.handleBrushingTypeChange,renderBrushHandle:C})}),o&&s&&Object.keys(O).filter(function(L){return $.has(L)}).map(function(L){var z=O[L];return z&&_.createElement(cv,{key:"corner-"+L,type:L,brush:i.state,updateBrush:i.updateBrush,stageWidth:d,stageHeight:f,corner:z,onBrushEnd:m})}))},t}(_.Component);gv.propTypes={brushDirection:K.oneOf(["horizontal","vertical","both"]),width:K.number.isRequired,height:K.number.isRequired,left:K.number.isRequired,top:K.number.isRequired,onChange:K.func,handleSize:K.number,resizeTriggerAreas:K.array,onBrushStart:K.func,onBrushEnd:K.func,onMouseLeave:K.func,onMouseUp:K.func,onMouseMove:K.func,onClick:K.func,clickSensitivity:K.number,disableDraggingSelection:K.bool,disableDraggingOverlay:K.bool,resetOnEnd:K.bool,useWindowMoveEvents:K.bool,renderBrushHandle:K.func},gv.defaultProps={brushDirection:"both",inheritedMargin:{left:0,top:0,right:0,bottom:0},onChange:null,handleSize:4,resizeTriggerAreas:["left","right"],onBrushStart:null,onBrushEnd:null,onMouseLeave:null,onMouseUp:null,onMouseMove:null,onClick:null,disableDraggingSelection:!1,disableDraggingOverlay:!1,clickSensitivity:200,resetOnEnd:!1,initialBrushPosition:null,useWindowMoveEvents:!1,renderBrushHandles:null};function f4(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vv(e,t)}function vv(e,t){return vv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},vv(e,t)}var _N=2,wN="steelblue",mv=function(e){f4(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r=e.call.apply(e,[this].concat(a))||this,r.handleChange=function(s){var l=r.props.onChange;if(l){var c=s.extent.x0;if(typeof c>"u"||c<0){l(null);return}var u=r.convertRangeToDomain(s);l(u)}},r.handleBrushStart=function(s){var l=r.props.onBrushStart;if(l){var c=s.x,u=s.y,d=r.props,f=d.xScale,g=d.yScale,p=Lu(f,c),v=Lu(g,u);l({x:"invert"in f&&typeof f.invert<"u"?p:f.domain()[p],y:"invert"in g&&typeof g.invert<"u"?v:g.domain()[v]})}},r.handleBrushEnd=function(s){var l=r.props.onBrushEnd;if(l){var c=s.extent.x0;if(typeof c>"u"||c<0){l(null);return}var u=r.convertRangeToDomain(s);l(u)}},r}var n=t.prototype;return n.convertRangeToDomain=function(i){var a=this.props,o=a.xScale,s=a.yScale,l=i.extent,c=l.x0,u=l.x1,d=l.y0,f=l.y1,g=bN(o,c||0,u||0,_N),p=bN(s,d||0,f||0,_N),v={x0:g.start||0,x1:g.end||0,xValues:g.values,y0:p.start||0,y1:p.end||0,yValues:p.values};return v},n.render=function(){var i=this.props,a=i.xScale,o=i.yScale,s=i.height,l=i.width,c=i.margin,u=i.brushDirection,d=i.initialBrushPosition,f=i.innerRef,g=i.resizeTriggerAreas,p=i.brushRegion,v=i.yAxisOrientation,m=i.xAxisOrientation,b=i.selectedBoxStyle,y=i.disableDraggingSelection,x=i.disableDraggingOverlay,k=i.resetOnEnd,w=i.onMouseLeave,S=i.onMouseMove,N=i.onClick,C=i.handleSize,E=i.useWindowMoveEvents,T=i.renderBrushHandle;if(!a||!o)return null;var O,P,M,$,L=c!=null&&c.left?c.left:0,z=c!=null&&c.top?c.top:0,j=c!=null&&c.right?c.right:0,B=c!=null&&c.bottom?c.bottom:0;return p==="chart"?(M=0,$=0,O=l,P=s):p==="yAxis"?($=0,P=s,v==="right"?(M=l,O=j):(M=-L,O=L)):(M=0,O=l,m==="bottom"?($=s,P=B):($=-z,P=z)),_.createElement(gv,{width:O,height:P,left:M,top:$,brushDirection:u,disableDraggingSelection:y,disableDraggingOverlay:x,handleSize:C,inheritedMargin:c,initialBrushPosition:d,ref:f,resetOnEnd:k,resizeTriggerAreas:g,selectedBoxStyle:b,onBrushEnd:this.handleBrushEnd,onBrushStart:this.handleBrushStart,onChange:this.handleChange,onClick:N,onMouseLeave:w,onMouseMove:S,useWindowMoveEvents:E,renderBrushHandle:T})},t}(_.Component);mv.propTypes={height:K.number,width:K.number,onChange:K.func,onBrushEnd:K.func,brushDirection:K.oneOf(["vertical","horizontal","both"]),resizeTriggerAreas:K.array,brushRegion:K.oneOf(["xAxis","yAxis","chart"]),yAxisOrientation:K.oneOf(["left","right"]),xAxisOrientation:K.oneOf(["top","bottom"]),disableDraggingSelection:K.bool,disableDraggingOverlay:K.bool,resetOnEnd:K.bool,handleSize:K.number,useWindowMoveEvents:K.bool,renderBrushHandle:K.func},mv.defaultProps={xScale:null,yScale:null,onChange:null,height:0,width:0,selectedBoxStyle:{fill:wN,fillOpacity:.2,stroke:wN,strokeWidth:1,strokeOpacity:.8},margin:{top:0,left:0,right:0,bottom:0},handleSize:4,brushDirection:"horizontal",initialBrushPosition:null,resizeTriggerAreas:["left","right"],brushRegion:"chart",yAxisOrientation:"right",xAxisOrientation:"bottom",onBrushStart:null,onBrushEnd:null,disableDraggingSelection:!1,resetOnEnd:!1,onMouseMove:null,onMouseLeave:null,onClick:null,useWindowMoveEvents:!1,renderBrushHandles:null};var h4=["className","top","left","data","binWidth","binHeight","x0","gap","xScale","yScale","colorScale","opacityScale","bins","count","children"];function yv(){return yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yv.apply(this,arguments)}function p4(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function kN(e){var t=e.className,n=e.top,r=e.left,i=e.data,a=i===void 0?[]:i,o=e.binWidth,s=o===void 0?6:o,l=e.binHeight,c=l===void 0?6:l,u=e.x0,d=u===void 0?0:u,f=e.gap,g=f===void 0?1:f,p=e.xScale,v=e.yScale,m=e.colorScale,b=m===void 0?function(){}:m,y=e.opacityScale,x=y===void 0?function(){return 1}:y,k=e.bins,w=k===void 0?function(M){return M==null?void 0:M.bins}:k,S=e.count,N=S===void 0?function(M){return M==null?void 0:M.count}:S,C=e.children,E=p4(e,h4),T=s-g,O=c-g,P=a.map(function(M,$){var L=p($);return w(M).map(function(z,j){var B=N(z);return{bin:z,row:j,column:$,datum:M,width:T,height:O,gap:g,count:B,x:L+d,y:v(j)+g,color:b(B),opacity:x(B)}})});return C?_.createElement(_.Fragment,null,C(P)):_.createElement(Je,{className:"visx-heatmap-rects",top:n,left:r},P.map(function(M){return M.map(function($){return _.createElement("rect",yv({key:"heatmap-tile-rect-"+$.row+"-"+$.column,className:Te("visx-heatmap-rect",t),width:$.width,height:$.height,x:$.x,y:$.y,fill:$.color,fillOpacity:$.opacity},E))})}))}kN.propTypes={data:K.array,left:K.number,top:K.number,binWidth:K.number,binHeight:K.number,x0:K.number,gap:K.number,xScale:K.func.isRequired,yScale:K.func.isRequired,bins:K.func,count:K.func,className:K.string,children:K.func};function SN(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function g4({debounce:e,scroll:t,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,o]=_.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),s=_.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),l=e?typeof e=="number"?e:e.scroll:null,c=e?typeof e=="number"?e:e.resize:null,u=_.useRef(!1);_.useEffect(()=>(u.current=!0,()=>void(u.current=!1)));const[d,f,g]=_.useMemo(()=>{const b=()=>{if(!s.current.element)return;const{left:y,top:x,width:k,height:w,bottom:S,right:N,x:C,y:E}=s.current.element.getBoundingClientRect(),T={left:y,top:x,width:k,height:w,bottom:S,right:N,x:C,y:E};s.current.element instanceof HTMLElement&&r&&(T.height=s.current.element.offsetHeight,T.width=s.current.element.offsetWidth),Object.freeze(T),u.current&&!b4(s.current.lastBounds,T)&&o(s.current.lastBounds=T)};return[b,c?SN(b,c):b,l?SN(b,l):b]},[o,r,l,c]);function p(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(b=>b.removeEventListener("scroll",g,!0)),s.current.scrollContainers=null),s.current.resizeObserver&&(s.current.resizeObserver.disconnect(),s.current.resizeObserver=null),s.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",s.current.orientationHandler))}function v(){s.current.element&&(s.current.resizeObserver=new i(g),s.current.resizeObserver.observe(s.current.element),t&&s.current.scrollContainers&&s.current.scrollContainers.forEach(b=>b.addEventListener("scroll",g,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{g()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",s.current.orientationHandler))}const m=b=>{!b||b===s.current.element||(p(),s.current.element=b,s.current.scrollContainers=NN(b),v())};return m4(g,!!t),v4(f),_.useEffect(()=>{p(),v()},[t,g,f]),_.useEffect(()=>p,[]),[m,a,d]}function v4(e){_.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function m4(e,t){_.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function NN(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some(a=>a==="auto"||a==="scroll")&&t.push(e),[...t,...NN(e.parentElement)]}const y4=["x","y","top","bottom","left","right","width","height"],b4=(e,t)=>y4.every(n=>e[n]===t[n]);var vr=_.createContext({});function bv(e){var t,n=e;return n&&"bandwidth"in n&&(t=n==null?void 0:n.bandwidth())!=null?t:0}function Jt(e){return e!=null&&typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e)}var xv=Qs(),_e=e=>Js(e,xv),_v=Qs();_e.write=e=>Js(e,_v);var Du=Qs();_e.onStart=e=>Js(e,Du);var wv=Qs();_e.onFrame=e=>Js(e,wv);var kv=Qs();_e.onFinish=e=>Js(e,kv);var _o=[];_e.setTimeout=(e,t)=>{const n=_e.now()+t,r=()=>{const a=_o.findIndex(o=>o.cancel==r);~a&&_o.splice(a,1),xi-=~a?1:0},i={time:n,handler:e,cancel:r};return _o.splice(CN(n),0,i),xi+=1,EN(),i};var CN=e=>~(~_o.findIndex(t=>t.time>e)||~_o.length);_e.cancel=e=>{Du.delete(e),wv.delete(e),kv.delete(e),xv.delete(e),_v.delete(e)},_e.sync=e=>{Nv=!0,_e.batchedUpdates(e),Nv=!1},_e.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,_e.onStart(n)}return r.handler=e,r.cancel=()=>{Du.delete(n),t=null},r};var Sv=typeof window<"u"?window.requestAnimationFrame:()=>{};_e.use=e=>Sv=e,_e.now=typeof performance<"u"?()=>performance.now():Date.now,_e.batchedUpdates=e=>e(),_e.catch=console.error,_e.frameLoop="always",_e.advance=()=>{_e.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):MN()};var bi=-1,xi=0,Nv=!1;function Js(e,t){Nv?(t.delete(e),e(0)):(t.add(e),EN())}function EN(){bi<0&&(bi=0,_e.frameLoop!=="demand"&&Sv(TN))}function x4(){bi=-1}function TN(){~bi&&(Sv(TN),_e.batchedUpdates(MN))}function MN(){const e=bi;bi=_e.now();const t=CN(bi);if(t&&($N(_o.splice(0,t),n=>n.handler()),xi-=t),!xi){x4();return}Du.flush(),xv.flush(e?Math.min(64,bi-e):16.667),wv.flush(),_v.flush(),kv.flush()}function Qs(){let e=new Set,t=e;return{add(n){xi+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return xi-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,xi-=t.size,$N(t,r=>r(n)&&e.add(r)),xi+=e.size,t=e)}}}function $N(e,t){e.forEach(n=>{try{t(n)}catch(r){_e.catch(r)}})}var _4=Object.defineProperty,w4=(e,t)=>{for(var n in t)_4(e,n,{get:t[n],enumerable:!0})},Mn={};w4(Mn,{assign:()=>AN,colors:()=>_i,createStringInterpolator:()=>Tv,skipAnimation:()=>PN,to:()=>ON,willAdvance:()=>Mv});function Cv(){}var k4=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),se={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Hr(e,t){if(se.arr(e)){if(!se.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var be=(e,t)=>e.forEach(t);function mr(e,t,n){if(se.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Ht=e=>se.und(e)?[]:se.arr(e)?e:[e];function Rs(e,t){if(e.size){const n=Array.from(e);e.clear(),be(n,t)}}var el=(e,...t)=>Rs(e,n=>n(...t)),Ev=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Tv,ON,_i=null,PN=!1,Mv=Cv,AN=e=>{e.to&&(ON=e.to),e.now&&(_e.now=e.now),e.colors!==void 0&&(_i=e.colors),e.skipAnimation!=null&&(PN=e.skipAnimation),e.createStringInterpolator&&(Tv=e.createStringInterpolator),e.requestAnimationFrame&&_e.use(e.requestAnimationFrame),e.batchedUpdates&&(_e.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Mv=e.willAdvance),e.frameLoop&&(_e.frameLoop=e.frameLoop)},tl=new Set,$n=[],$v=[],Iu=0,nl={get idle(){return!tl.size&&!$n.length},start(e){Iu>e.priority?(tl.add(e),_e.onStart(S4)):(LN(e),_e(Ov))},advance:Ov,sort(e){if(Iu)_e.onFrame(()=>nl.sort(e));else{const t=$n.indexOf(e);~t&&($n.splice(t,1),DN(e))}},clear(){$n=[],tl.clear()}};function S4(){tl.forEach(LN),tl.clear(),_e(Ov)}function LN(e){$n.includes(e)||DN(e)}function DN(e){$n.splice(N4($n,t=>t.priority>e.priority),0,e)}function Ov(e){const t=$v;for(let n=0;n<$n.length;n++){const r=$n[n];Iu=r.priority,r.idle||(Mv(r),r.advance(e),r.idle||t.push(r))}return Iu=0,$v=$n,$v.length=0,$n=t,$n.length>0}function N4(e,t){const n=e.findIndex(t);return n<0?e.length:n}var C4=(e,t,n)=>Math.min(Math.max(n,e),t),E4={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Yn="[-+]?\\d*\\.?\\d+",Fu=Yn+"%";function zu(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var T4=new RegExp("rgb"+zu(Yn,Yn,Yn)),M4=new RegExp("rgba"+zu(Yn,Yn,Yn,Yn)),$4=new RegExp("hsl"+zu(Yn,Fu,Fu)),O4=new RegExp("hsla"+zu(Yn,Fu,Fu,Yn)),P4=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,A4=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,L4=/^#([0-9a-fA-F]{6})$/,D4=/^#([0-9a-fA-F]{8})$/;function I4(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=L4.exec(e))?parseInt(t[1]+"ff",16)>>>0:_i&&_i[e]!==void 0?_i[e]:(t=T4.exec(e))?(wo(t[1])<<24|wo(t[2])<<16|wo(t[3])<<8|255)>>>0:(t=M4.exec(e))?(wo(t[1])<<24|wo(t[2])<<16|wo(t[3])<<8|zN(t[4]))>>>0:(t=P4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=D4.exec(e))?parseInt(t[1],16)>>>0:(t=A4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=$4.exec(e))?(IN(FN(t[1]),Bu(t[2]),Bu(t[3]))|255)>>>0:(t=O4.exec(e))?(IN(FN(t[1]),Bu(t[2]),Bu(t[3]))|zN(t[4]))>>>0:null}function Pv(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function IN(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=Pv(i,r,e+1/3),o=Pv(i,r,e),s=Pv(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function wo(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function FN(e){return(parseFloat(e)%360+360)%360/360}function zN(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Bu(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function BN(e){let t=I4(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,a=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${a})`}var ko=(e,t,n)=>{if(se.fun(e))return e;if(se.arr(e))return ko({range:e,output:t,extrapolate:n});if(se.str(e.output[0]))return Tv(e);const r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(c=>c);return c=>{const u=z4(c,a);return F4(c,a[u],a[u+1],i[u],i[u+1],l,o,s,r.map)}};function F4(e,t,n,r,i,a,o,s,l){let c=l?l(e):e;if(c<t){if(o==="identity")return c;o==="clamp"&&(c=t)}if(c>n){if(s==="identity")return c;s==="clamp"&&(c=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?c=-c:n===1/0?c=c-t:c=(c-t)/(n-t),c=a(c),r===-1/0?c=-c:i===1/0?c=c+r:c=c*(i-r)+r,c)}function z4(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var B4=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,i=t==="end"?Math.floor(r):Math.ceil(r);return C4(0,1,i/e)},ju=1.70158,Wu=ju*1.525,jN=ju+1,WN=2*Math.PI/3,UN=2*Math.PI/4.5,Uu=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,HN={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>jN*e*e*e-ju*e*e,easeOutBack:e=>1+jN*Math.pow(e-1,3)+ju*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Wu+1)*2*e-Wu)/2:(Math.pow(2*e-2,2)*((Wu+1)*(e*2-2)+Wu)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*WN),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*WN)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*UN))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*UN)/2+1,easeInBounce:e=>1-Uu(1-e),easeOutBounce:Uu,easeInOutBounce:e=>e<.5?(1-Uu(1-2*e))/2:(1+Uu(2*e-1))/2,steps:B4},rl=Symbol.for("FluidValue.get"),So=Symbol.for("FluidValue.observers"),On=e=>!!(e&&e[rl]),Qt=e=>e&&e[rl]?e[rl]():e,qN=e=>e[So]||null;function j4(e,t){e.eventObserved?e.eventObserved(t):e(t)}function il(e,t){const n=e[So];n&&n.forEach(r=>{j4(r,t)})}var KN=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");W4(this,e)}},W4=(e,t)=>VN(e,rl,t);function No(e,t){if(e[rl]){let n=e[So];n||VN(e,So,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function al(e,t){const n=e[So];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[So]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var VN=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Hu=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,U4=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,YN=new RegExp(`(${Hu.source})(%|[a-z]+)`,"i"),H4=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,qu=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,GN=e=>{const[t,n]=q4(e);if(!t||Ev())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&qu.test(n))return GN(n);if(n)return n}return e},q4=e=>{const t=qu.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Av,K4=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,XN=e=>{Av||(Av=_i?new RegExp(`(${Object.keys(_i).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(a=>Qt(a).replace(qu,GN).replace(U4,BN).replace(Av,BN)),n=t.map(a=>a.match(Hu).map(Number)),i=n[0].map((a,o)=>n.map(s=>{if(!(o in s))throw Error('The arity of each "output" value must be equal');return s[o]})).map(a=>ko({...e,output:a}));return a=>{var l;const o=!YN.test(t[0])&&((l=t.find(c=>YN.test(c)))==null?void 0:l.replace(Hu,""));let s=0;return t[0].replace(Hu,()=>`${i[s++](a)}${o||""}`).replace(H4,K4)}},Lv="react-spring: ",ZN=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Lv}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},V4=ZN(console.warn);function JN(){V4(`${Lv}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Y4=ZN(console.warn);function G4(){Y4(`${Lv}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Ku(e){return se.str(e)&&(e[0]=="#"||/\d/.test(e)||!Ev()&&qu.test(e)||e in(_i||{}))}var Co,Vu=new WeakMap,X4=e=>e.forEach(({target:t,contentRect:n})=>{var r;return(r=Vu.get(t))==null?void 0:r.forEach(i=>i(n))});function Z4(e,t){Co||typeof ResizeObserver<"u"&&(Co=new ResizeObserver(X4));let n=Vu.get(t);return n||(n=new Set,Vu.set(t,n)),n.add(e),Co&&Co.observe(t),()=>{const r=Vu.get(t);r&&(r.delete(e),!r.size&&Co&&Co.unobserve(t))}}var Yu=new Set,ol,J4=()=>{const e=()=>{Yu.forEach(t=>t({width:window.innerWidth,height:window.innerHeight}))};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},Q4=e=>(Yu.add(e),ol||(ol=J4()),()=>{Yu.delete(e),!Yu.size&&ol&&(ol(),ol=void 0)}),QN=(e,{container:t=document.documentElement}={})=>t===document.documentElement?Q4(e):Z4(e,t),R4=(e,t,n)=>t-e===0?1:(n-e)/(t-e),ej={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}},tj=class{constructor(e,t){this.createAxis=()=>({current:0,progress:0,scrollLength:0}),this.updateAxis=n=>{const r=this.info[n],{length:i,position:a}=ej[n];r.current=this.container[`scroll${a}`],r.scrollLength=this.container[`scroll${i}`]-this.container[`client${i}`],r.progress=R4(0,r.scrollLength,r.current)},this.update=()=>{this.updateAxis("x"),this.updateAxis("y")},this.sendEvent=()=>{this.callback(this.info)},this.advance=()=>{this.update(),this.sendEvent()},this.callback=e,this.container=t,this.info={time:0,x:this.createAxis(),y:this.createAxis()}}},sl=new WeakMap,RN=new WeakMap,Dv=new WeakMap,eC=e=>e===document.documentElement?window:e,nj=(e,{container:t=document.documentElement}={})=>{let n=Dv.get(t);n||(n=new Set,Dv.set(t,n));const r=new tj(e,t);if(n.add(r),!sl.has(t)){const a=()=>(n==null||n.forEach(s=>s.advance()),!0);sl.set(t,a);const o=eC(t);window.addEventListener("resize",a,{passive:!0}),t!==document.documentElement&&RN.set(t,QN(a,{container:t})),o.addEventListener("scroll",a,{passive:!0})}const i=sl.get(t);return _e(i),()=>{var s;_e.cancel(i);const a=Dv.get(t);if(!a||(a.delete(r),a.size))return;const o=sl.get(t);sl.delete(t),o&&(eC(t).removeEventListener("scroll",o),window.removeEventListener("resize",o),(s=RN.get(t))==null||s())}};function rj(e){const t=_.useRef(null);return t.current===null&&(t.current=e()),t.current}var Rt=Ev()?_.useEffect:_.useLayoutEffect,ij=()=>{const e=_.useRef(!1);return Rt(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Iv(){const e=_.useState()[1],t=ij();return()=>{t.current&&e(Math.random())}}function aj(e,t){const[n]=_.useState(()=>({inputs:t,result:e()})),r=_.useRef(),i=r.current;let a=i;return a?t&&a.inputs&&oj(t,a.inputs)||(a={inputs:t,result:e()}):a=n,_.useEffect(()=>{r.current=a,i==n&&(n.inputs=n.result=void 0)},[a]),a.result}function oj(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Gu=e=>_.useEffect(e,sj),sj=[];function Fv(e){const t=_.useRef();return _.useEffect(()=>{t.current=e}),t.current}var lj=()=>{const[e,t]=_.useState(null);return Rt(()=>{const n=window.matchMedia("(prefers-reduced-motion)"),r=i=>{t(i.matches),AN({skipAnimation:i.matches})};return r(n),n.addEventListener?n.addEventListener("change",r):n.addListener(r),()=>{n.removeEventListener?n.removeEventListener("change",r):n.removeListener(r)}},[]),e},ll=Symbol.for("Animated:node"),cj=e=>!!e&&e[ll]===e,yr=e=>e&&e[ll],zv=(e,t)=>k4(e,ll,t),Xu=e=>e&&e[ll]&&e[ll].getPayload(),tC=class{constructor(){zv(this,this)}getPayload(){return this.payload||[]}},cl=class extends tC{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,se.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new cl(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return se.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,se.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},ul=class extends cl{constructor(e){super(0),this._string=null,this._toString=ko({output:[e,e]})}static create(e){return new ul(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(se.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=ko({output:[this.getValue(),e]})),this._value=0,super.reset()}},Zu={dependencies:null},Ju=class extends tC{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return mr(this.source,(n,r)=>{cj(n)?t[r]=n.getValue(e):On(n)?t[r]=Qt(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&be(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return mr(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Zu.dependencies&&On(e)&&Zu.dependencies.add(e);const t=Xu(e);t&&be(t,n=>this.add(n))}},nC=class extends Ju{constructor(e){super(e)}static create(e){return new nC(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(uj)),!0)}};function uj(e){return(Ku(e)?ul:cl).create(e)}function Bv(e){const t=yr(e);return t?t.constructor:se.arr(e)?nC:Ku(e)?ul:cl}var rC=(e,t)=>{const n=!se.fun(e)||e.prototype&&e.prototype.isReactComponent;return _.forwardRef((r,i)=>{const a=_.useRef(null),o=n&&_.useCallback(p=>{a.current=hj(i,p)},[i]),[s,l]=fj(r,t),c=Iv(),u=()=>{const p=a.current;if(n&&!p)return;(p?t.applyAnimatedValues(p,s.getValue(!0)):!1)===!1&&c()},d=new dj(u,l),f=_.useRef();Rt(()=>(f.current=d,be(l,p=>No(p,d)),()=>{f.current&&(be(f.current.deps,p=>al(p,f.current)),_e.cancel(f.current.update))})),_.useEffect(u,[]),Gu(()=>()=>{const p=f.current;be(p.deps,v=>al(v,p))});const g=t.getComponentProps(s.getValue());return wa.createElement(e,{...g,ref:o})})},dj=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&_e.write(this.update)}};function fj(e,t){const n=new Set;return Zu.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Ju(e),Zu.dependencies=null,[e,n]}function hj(e,t){return e&&(se.fun(e)?e(t):e.current=t),t}var iC=Symbol.for("AnimatedComponent"),pj=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new Ju(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=o=>{const s=aC(o)||"Anonymous";return se.str(o)?o=a[o]||(a[o]=rC(o,i)):o=o[iC]||(o[iC]=rC(o,i)),o.displayName=`Animated(${s})`,o};return mr(e,(o,s)=>{se.arr(e)&&(s=aC(o)),a[s]=a(o)}),{animated:a}},aC=e=>se.str(e)?e:e&&se.str(e.displayName)?e.displayName:se.fun(e)&&e.name||null,gj=class{};function qt(e,...t){return se.fun(e)?e(...t):e}var dl=(e,t)=>e===!0||!!(t&&e&&(se.fun(e)?e(t):Ht(e).includes(t))),oC=(e,t)=>se.obj(e)?t&&e[t]:e,sC=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,vj=e=>e,Qu=(e,t=vj)=>{let n=mj;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const a=t(e[i],i);se.und(a)||(r[i]=a)}return r},mj=["config","onProps","onStart","onChange","onPause","onResume","onRest"],yj={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function bj(e){const t={};let n=0;if(mr(e,(r,i)=>{yj[i]||(t[i]=r,n++)}),n)return t}function Ru(e){const t=bj(e);if(t){const n={to:t};return mr(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function fl(e){return e=Qt(e),se.arr(e)?e.map(fl):Ku(e)?Mn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function lC(e){for(const t in e)return!0;return!1}function jv(e){return se.fun(e)||se.arr(e)&&se.obj(e[0])}function Wv(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function Uv(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}function xj(e,t,n=1e3){Rt(()=>{if(t){let r=0;be(e,(i,a)=>{const o=i.current;if(o.length){let s=n*t[a];isNaN(s)?s=r:r=s,be(o,l=>{be(l.queue,c=>{const u=c.delay;c.delay=d=>s+qt(u||0,d)})}),i.start()}})}else{let r=Promise.resolve();be(e,i=>{const a=i.current;if(a.length){const o=a.map(s=>{const l=s.queue;return s.queue=[],l});r=r.then(()=>(be(a,(s,l)=>be(o[l]||[],c=>s.queue.push(c))),Promise.all(i.start())))}})}})}var cC={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},Hv={...cC.default,mass:1,damping:1,easing:HN.linear,clamp:!1},_j=class{constructor(){this.velocity=0,Object.assign(this,Hv)}};function wj(e,t,n){n&&(n={...n},uC(n,t),t={...n,...t}),uC(e,t),Object.assign(e,t);for(const o in Hv)e[o]==null&&(e[o]=Hv[o]);let{frequency:r,damping:i}=e;const{mass:a}=e;return se.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*a,e.friction=4*Math.PI*i*a/r),e}function uC(e,t){if(!se.und(t.decay))e.duration=void 0;else{const n=!se.und(t.tension)||!se.und(t.friction);(n||!se.und(t.frequency)||!se.und(t.damping)||!se.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var dC=[],kj=class{constructor(){this.changed=!1,this.values=dC,this.toValues=null,this.fromValues=dC,this.config=new _j,this.immediate=!1}};function fC(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let l,c,u=dl(n.cancel??(r==null?void 0:r.cancel),t);if(u)g();else{se.und(n.pause)||(i.paused=dl(n.pause,t));let p=r==null?void 0:r.pause;p!==!0&&(p=i.paused||dl(p,t)),l=qt(n.delay||0,t),p?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(c),c.cancel(),l=c.time-_e.now()}function f(){l>0&&!Mn.skipAnimation?(i.delayed=!0,c=_e.setTimeout(g,l),i.pauseQueue.add(d),i.timeouts.add(c)):g()}function g(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(c),e<=(i.cancelId||0)&&(u=!0);try{a.start({...n,callId:e,cancel:u},o)}catch(p){s(p)}}})}var qv=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Eo(e.get()):t.every(n=>n.noop)?hC(e.get()):Gn(e.get(),t.every(n=>n.finished)),hC=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Gn=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Eo=e=>({value:e,cancelled:!0,finished:!1});function pC(e,t,n,r){const{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:l}=n;return!a&&e===s&&!t.reset?l:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const c=Qu(t,(m,b)=>b==="onRest"?void 0:m);let u,d;const f=new Promise((m,b)=>(u=m,d=b)),g=m=>{const b=i<=(n.cancelId||0)&&Eo(r)||i!==n.asyncId&&Gn(r,!1);if(b)throw m.result=b,d(m),m},p=(m,b)=>{const y=new Kv,x=new gC;return(async()=>{if(Mn.skipAnimation)throw hl(n),x.result=Gn(r,!1),d(x),x;g(y);const k=se.obj(m)?{...m}:{...b,to:m};k.parentId=i,mr(c,(S,N)=>{se.und(k[N])&&(k[N]=S)});const w=await r.start(k);return g(y),n.paused&&await new Promise(S=>{n.resumeQueue.add(S)}),w})()};let v;if(Mn.skipAnimation)return hl(n),Gn(r,!1);try{let m;se.arr(e)?m=(async b=>{for(const y of b)await p(y)})(e):m=Promise.resolve(e(p,r.stop.bind(r))),await Promise.all([m.then(u),f]),v=Gn(r.get(),!0,!1)}catch(m){if(m instanceof Kv)v=m.result;else if(m instanceof gC)v=m.result;else throw m}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?l:void 0)}return se.fun(o)&&_e.batchedUpdates(()=>{o(v,r,r.item)}),v})()}function hl(e,t){Rs(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Kv=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},gC=class extends Error{constructor(){super("SkipAnimationSignal")}},Vv=e=>e instanceof ed,Sj=1,ed=class extends KN{constructor(){super(...arguments),this.id=Sj++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=yr(this);return e&&e.getValue()}to(...e){return Mn.to(this,e)}interpolate(...e){return JN(),Mn.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){il(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||nl.sort(this),il(this,{type:"priority",parent:this,priority:e})}},ya=Symbol.for("SpringPhase"),vC=1,Yv=2,Gv=4,Xv=e=>(e[ya]&vC)>0,wi=e=>(e[ya]&Yv)>0,pl=e=>(e[ya]&Gv)>0,mC=(e,t)=>t?e[ya]|=Yv|vC:e[ya]&=~Yv,yC=(e,t)=>t?e[ya]|=Gv:e[ya]&=~Gv,Zv=class extends ed{constructor(e,t){if(super(),this.animation=new kj,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!se.und(e)||!se.und(t)){const n=se.obj(e)?{...e}:{...t,from:e};se.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(wi(this)||this._state.asyncTo)||pl(this)}get goal(){return Qt(this.animation.to)}get velocity(){const e=yr(this);return e instanceof cl?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return Xv(this)}get isAnimating(){return wi(this)}get isPaused(){return pl(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:a}=r,o=Xu(r.to);!o&&On(r.to)&&(i=Ht(Qt(r.to))),r.values.forEach((c,u)=>{if(c.done)return;const d=c.constructor==ul?1:o?o[u].lastPosition:i[u];let f=r.immediate,g=d;if(!f){if(g=c.lastPosition,a.tension<=0){c.done=!0;return}let p=c.elapsedTime+=e;const v=r.fromValues[u],m=c.v0!=null?c.v0:c.v0=se.arr(a.velocity)?a.velocity[u]:a.velocity;let b;const y=a.precision||(v==d?.005:Math.min(1,Math.abs(d-v)*.001));if(se.und(a.duration))if(a.decay){const x=a.decay===!0?.998:a.decay,k=Math.exp(-(1-x)*p);g=v+m/(1-x)*(1-k),f=Math.abs(c.lastPosition-g)<=y,b=m*k}else{b=c.lastVelocity==null?m:c.lastVelocity;const x=a.restVelocity||y/10,k=a.clamp?0:a.bounce,w=!se.und(k),S=v==d?c.v0>0:v<d;let N,C=!1;const E=1,T=Math.ceil(e/E);for(let O=0;O<T&&(N=Math.abs(b)>x,!(!N&&(f=Math.abs(d-g)<=y,f)));++O){w&&(C=g==d||g>d==S,C&&(b=-b*k,g=d));const P=-a.tension*1e-6*(g-d),M=-a.friction*.001*b,$=(P+M)/a.mass;b=b+$*E,g=g+b*E}}else{let x=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,c.durationProgress>0&&(c.elapsedTime=a.duration*c.durationProgress,p=c.elapsedTime+=e)),x=(a.progress||0)+p/this._memoizedDuration,x=x>1?1:x<0?0:x,c.durationProgress=x),g=v+a.easing(x)*(d-v),b=(g-c.lastPosition)/e,f=x==1}c.lastVelocity=b,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),f=!0)}o&&!o[u].done&&(f=!1),f?c.done=!0:t=!1,c.setValue(g,a.round)&&(n=!0)});const s=yr(this),l=s.getValue();if(t){const c=Qt(r.to);(l!==c||n)&&!a.decay?(s.setValue(c),this._onChange(c)):n&&a.decay&&this._onChange(l),this._stop()}else n&&this._onChange(l)}set(e){return _e.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(wi(this)){const{to:e,config:t}=this.animation;_e.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return se.und(e)?(n=this.queue||[],this.queue=[]):n=[se.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>qv(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),hl(this._state,e&&this._lastCallId),_e.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=se.obj(n)?n[t]:n,(n==null||jv(n))&&(n=void 0),r=se.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return Xv(this)||(e.reverse&&([n,r]=[r,n]),r=Qt(r),se.und(r)?yr(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Qu(e,(o,s)=>/^on/.test(s)?oC(o,n):o)),_C(this,e,"onProps"),ml(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const a=this._state;return fC(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{pl(this)||(yC(this,!0),el(a.pauseQueue),ml(this,"onPause",Gn(this,gl(this,this.animation.to)),this))},resume:()=>{pl(this)&&(yC(this,!1),wi(this)&&this._resume(),el(a.resumeQueue),ml(this,"onResume",Gn(this,gl(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const s=bC(e);if(s)return this._update(s,!0)}return o})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Eo(this));const r=!se.und(e.to),i=!se.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Eo(this));const{key:a,defaultProps:o,animation:s}=this,{to:l,from:c}=s;let{to:u=l,from:d=c}=e;i&&!r&&(!t.default||se.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);const f=!Hr(d,c);f&&(s.from=d),d=Qt(d);const g=!Hr(u,l);g&&this._focus(u);const p=jv(t.to),{config:v}=s,{decay:m,velocity:b}=v;(r||i)&&(v.velocity=0),t.config&&!p&&wj(v,qt(t.config,a),t.config!==o.config?qt(o.config,a):void 0);let y=yr(this);if(!y||se.und(u))return n(Gn(this,!0));const x=se.und(t.reset)?i&&!t.default:!se.und(d)&&dl(t.reset,a),k=x?d:this.get(),w=fl(u),S=se.num(w)||se.arr(w)||Ku(w),N=!p&&(!S||dl(o.immediate||t.immediate,a));if(g){const O=Bv(u);if(O!==y.constructor)if(N)y=this._set(w);else throw Error(`Cannot animate between ${y.constructor.name} and ${O.name}, as the "to" prop suggests`)}const C=y.constructor;let E=On(u),T=!1;if(!E){const O=x||!Xv(this)&&f;(g||O)&&(T=Hr(fl(k),w),E=!T),(!Hr(s.immediate,N)&&!N||!Hr(v.decay,m)||!Hr(v.velocity,b))&&(E=!0)}if(T&&wi(this)&&(s.changed&&!x?E=!0:E||this._stop(l)),!p&&((E||On(l))&&(s.values=y.getPayload(),s.toValues=On(u)?null:C==ul?[1]:Ht(w)),s.immediate!=N&&(s.immediate=N,!N&&!x&&this._set(l)),E)){const{onRest:O}=s;be(Cj,M=>_C(this,t,M));const P=Gn(this,gl(this,l));el(this._pendingCalls,P),this._pendingCalls.add(n),s.changed&&_e.batchedUpdates(()=>{var M;s.changed=!x,O==null||O(P,this),x?qt(o.onRest,P):(M=s.onStart)==null||M.call(s,P,this)})}x&&this._set(k),p?n(pC(t.to,t,this._state,this)):E?this._start():wi(this)&&!g?this._pendingCalls.add(n):n(hC(k))}_focus(e){const t=this.animation;e!==t.to&&(qN(this)&&this._detach(),t.to=e,qN(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;On(t)&&(No(t,this),Vv(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;On(e)&&al(e,this)}_set(e,t=!0){const n=Qt(e);if(!se.und(n)){const r=yr(this);if(!r||!Hr(n,r.getValue())){const i=Bv(n);!r||r.constructor!=i?zv(this,i.create(n)):r.setValue(n),r&&_e.batchedUpdates(()=>{this._onChange(n,t)})}}return yr(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,ml(this,"onStart",Gn(this,gl(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),qt(this.animation.onChange,e,this)),qt(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;yr(this).reset(Qt(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),wi(this)||(mC(this,!0),pl(this)||this._resume())}_resume(){Mn.skipAnimation?this.finish():nl.start(this)}_stop(e,t){if(wi(this)){mC(this,!1);const n=this.animation;be(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),il(this,{type:"idle",parent:this});const r=t?Eo(this.get()):Gn(this.get(),gl(this,e??n.to));el(this._pendingCalls,r),n.changed&&(n.changed=!1,ml(this,"onRest",r,this))}}};function gl(e,t){const n=fl(t),r=fl(e.get());return Hr(r,n)}function bC(e,t=e.loop,n=e.to){const r=qt(t);if(r){const i=r!==!0&&Ru(r),a=(i||e).reverse,o=!i||i.reset;return vl({...e,loop:t,default:!1,pause:void 0,to:!a||jv(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function vl(e){const{to:t,from:n}=e=Ru(e),r=new Set;return se.obj(t)&&xC(t,r),se.obj(n)&&xC(n,r),e.keys=r.size?Array.from(r):null,e}function Nj(e){const t=vl(e);return se.und(t.default)&&(t.default=Qu(t)),t}function xC(e,t){mr(e,(n,r)=>n!=null&&t.add(r))}var Cj=["onStart","onRest","onChange","onPause","onResume"];function _C(e,t,n){e.animation[n]=t[n]!==sC(t,n)?oC(t[n],e.key):void 0}function ml(e,t,...n){var r,i,a,o;(i=(r=e.animation)[t])==null||i.call(r,...n),(o=(a=e.defaultProps)[t])==null||o.call(a,...n)}var Ej=["onStart","onChange","onRest"],Tj=1,Jv=class{constructor(e,t){this.id=Tj++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];se.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(vl(e)),this}start(e){let{queue:t}=this;return e?t=Ht(e).map(vl):this.queue=[],this._flush?this._flush(this,t):(CC(this,t),Qv(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;be(Ht(t),r=>n[r].stop(!!e))}else hl(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(se.und(e))this.start({pause:!0});else{const t=this.springs;be(Ht(e),n=>t[n].pause())}return this}resume(e){if(se.und(e))this.start({pause:!1});else{const t=this.springs;be(Ht(e),n=>t[n].resume())}return this}each(e){mr(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,Rs(e,([s,l])=>{l.value=this.get(),s(l,this,this._item)}));const a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&Rs(t,([s,l])=>{l.value=o,s(l,this,this._item)}),a&&(this._started=!1,Rs(n,([s,l])=>{l.value=o,s(l,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;_e.onFrame(this._onFrame)}};function Qv(e,t){return Promise.all(t.map(n=>wC(e,n))).then(n=>qv(e,n))}async function wC(e,t,n){const{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:l}=t,c=se.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);const u=se.arr(i)||se.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):be(Ej,v=>{const m=t[v];if(se.fun(m)){const b=e._events[v];t[v]=({finished:y,cancelled:x})=>{const k=b.get(m);k?(y||(k.finished=!1),x&&(k.cancelled=!0)):b.set(m,{value:null,finished:y||!1,cancelled:x||!1})},c&&(c[v]=t[v])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,el(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(v=>e.springs[v].start(t)),g=t.cancel===!0||sC(t,"cancel")===!0;(u||g&&d.asyncId)&&f.push(fC(++e._lastAsyncId,{props:t,state:d,actions:{pause:Cv,resume:Cv,start(v,m){g?(hl(d,e._lastAsyncId),m(Eo(e))):(v.onRest=s,m(pC(u,v,d,e)))}}})),d.paused&&await new Promise(v=>{d.resumeQueue.add(v)});const p=qv(e,await Promise.all(f));if(o&&p.finished&&!(n&&p.noop)){const v=bC(t,o,i);if(v)return CC(e,[v]),wC(e,v,!0)}return l&&_e.batchedUpdates(()=>l(p,e,e.item)),p}function Rv(e,t){const n={...e.springs};return t&&be(Ht(t),r=>{se.und(r.keys)&&(r=vl(r)),se.obj(r.to)||(r={...r,to:void 0}),NC(n,r,i=>SC(i))}),kC(e,n),n}function kC(e,t){mr(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,No(n,e))})}function SC(e,t){const n=new Zv;return n.key=e,t&&No(n,t),n}function NC(e,t,n){t.keys&&be(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function CC(e,t){be(t,n=>{NC(e.springs,n,r=>SC(r,e))})}var To=({children:e,...t})=>{const n=_.useContext(td),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=aj(()=>({pause:r,immediate:i}),[r,i]);const{Provider:a}=td;return wa.createElement(a,{value:t},e)},td=Mj(To,{});To.Provider=td.Provider,To.Consumer=td.Consumer;function Mj(e,t){return Object.assign(e,wa.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var nd=()=>{const e=[],t=function(r){G4();const i=[];return be(e,(a,o)=>{if(se.und(r))i.push(a.start());else{const s=n(r,a,o);s&&i.push(a.start(s))}}),i};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const i=e.indexOf(r);~i&&e.splice(i,1)},t.pause=function(){return be(e,r=>r.pause(...arguments)),this},t.resume=function(){return be(e,r=>r.resume(...arguments)),this},t.set=function(r){be(e,(i,a)=>{const o=se.fun(r)?r(a,i):r;o&&i.set(o)})},t.start=function(r){const i=[];return be(e,(a,o)=>{if(se.und(r))i.push(a.start());else{const s=this._getProps(r,a,o);s&&i.push(a.start(s))}}),i},t.stop=function(){return be(e,r=>r.stop(...arguments)),this},t.update=function(r){return be(e,(i,a)=>i.update(this._getProps(r,i,a))),this};const n=function(r,i,a){return se.fun(r)?r(a,i):r};return t._getProps=n,t};function em(e,t,n){const r=se.fun(t)&&t;r&&!n&&(n=[]);const i=_.useMemo(()=>r||arguments.length==3?nd():void 0,[]),a=_.useRef(0),o=Iv(),s=_.useMemo(()=>({ctrls:[],queue:[],flush(b,y){const x=Rv(b,y);return a.current>0&&!s.queue.length&&!Object.keys(x).some(w=>!b.springs[w])?Qv(b,y):new Promise(w=>{kC(b,x),s.queue.push(()=>{w(Qv(b,y))}),o()})}}),[]),l=_.useRef([...s.ctrls]),c=[],u=Fv(e)||0;_.useMemo(()=>{be(l.current.slice(e,u),b=>{Wv(b,i),b.stop(!0)}),l.current.length=e,d(u,e)},[e]),_.useMemo(()=>{d(0,Math.min(u,e))},n);function d(b,y){for(let x=b;x<y;x++){const k=l.current[x]||(l.current[x]=new Jv(null,s.flush)),w=r?r(x,k):t[x];w&&(c[x]=Nj(w))}}const f=l.current.map((b,y)=>Rv(b,c[y])),g=_.useContext(To),p=Fv(g),v=g!==p&&lC(g);Rt(()=>{a.current++,s.ctrls=l.current;const{queue:b}=s;b.length&&(s.queue=[],be(b,y=>y())),be(l.current,(y,x)=>{i==null||i.add(y),v&&y.start({default:g});const k=c[x];k&&(Uv(y,k.ref),y.ref?y.queue.push(k):y.start(k))})}),Gu(()=>()=>{be(s.ctrls,b=>b.stop(!0))});const m=f.map(b=>({...b}));return i?[m,i]:m}function ba(e,t){const n=se.fun(e),[[r],i]=em(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}var $j=()=>nd(),Oj=()=>_.useState($j)[0],Pj=(e,t)=>{const n=rj(()=>new Zv(e,t));return Gu(()=>()=>{n.stop()}),n};function EC(e,t,n){const r=se.fun(t)&&t;r&&!n&&(n=[]);let i=!0,a;const o=em(e,(s,l)=>{const c=r?r(s,l):t;return a=c.ref,i=i&&c.reverse,c},n||[{}]);if(Rt(()=>{be(o[1].current,(s,l)=>{const c=o[1].current[l+(i?1:-1)];if(Uv(s,a),s.ref){c&&s.update({to:c.springs});return}c?s.start({to:c.springs}):s.start()})},n),r||arguments.length==3){const s=a??o[1];return s._getProps=(l,c,u)=>{const d=se.fun(l)?l(u,c):l;if(d){const f=s.current[u+(d.reverse?1:-1)];return f&&(d.to=f.springs),d}},o}return o[0]}function TC(e,t,n){const r=se.fun(t)&&t,{reset:i,sort:a,trail:o=0,expires:s=!0,exitBeforeEnter:l=!1,onDestroyed:c,ref:u,config:d}=r?r():t,f=_.useMemo(()=>r||arguments.length==3?nd():void 0,[]),g=Ht(e),p=[],v=_.useRef(null),m=i?null:v.current;Rt(()=>{v.current=p}),Gu(()=>(be(p,$=>{f==null||f.add($.ctrl),$.ctrl.ref=f}),()=>{be(v.current,$=>{$.expired&&clearTimeout($.expirationId),Wv($.ctrl,f),$.ctrl.stop(!0)})}));const b=Lj(g,r?r():t,m),y=i&&v.current||[];Rt(()=>be(y,({ctrl:$,item:L,key:z})=>{Wv($,f),qt(c,L,z)}));const x=[];if(m&&be(m,($,L)=>{$.expired?(clearTimeout($.expirationId),y.push($)):(L=x[L]=b.indexOf($.key),~L&&(p[L]=$))}),be(g,($,L)=>{p[L]||(p[L]={key:b[L],item:$,phase:"mount",ctrl:new Jv},p[L].ctrl.item=$)}),x.length){let $=-1;const{leave:L}=r?r():t;be(x,(z,j)=>{const B=m[j];~z?($=p.indexOf(B),p[$]={...B,item:g[z]}):L&&p.splice(++$,0,B)})}se.fun(a)&&p.sort(($,L)=>a($.item,L.item));let k=-o;const w=Iv(),S=Qu(t),N=new Map,C=_.useRef(new Map),E=_.useRef(!1);be(p,($,L)=>{const z=$.key,j=$.phase,B=r?r():t;let H,F;const D=qt(B.delay||0,z);if(j=="mount")H=B.enter,F="enter";else{const G=b.indexOf(z)<0;if(j!="leave")if(G)H=B.leave,F="leave";else if(H=B.update)F="update";else return;else if(!G)H=B.enter,F="enter";else return}if(H=qt(H,$.item,L),H=se.obj(H)?Ru(H):{to:H},!H.config){const G=d||S.config;H.config=qt(G,$.item,L,F)}k+=o;const U={...S,delay:D+k,ref:u,immediate:B.immediate,reset:!1,...H};if(F=="enter"&&se.und(U.from)){const G=r?r():t,R=se.und(G.initial)||m?G.from:G.initial;U.from=qt(R,$.item,L)}const{onResolve:V}=U;U.onResolve=G=>{qt(V,G);const R=v.current,te=R.find(le=>le.key===z);if(te&&!(G.cancelled&&te.phase!="update")&&te.ctrl.idle){const le=R.every(W=>W.ctrl.idle);if(te.phase=="leave"){const W=qt(s,te.item);if(W!==!1){const Z=W===!0?0:W;if(te.expired=!0,!le&&Z>0){Z<=2147483647&&(te.expirationId=setTimeout(w,Z));return}}}le&&R.some(W=>W.expired)&&(C.current.delete(te),l&&(E.current=!0),w())}};const Y=Rv($.ctrl,U);F==="leave"&&l?C.current.set($,{phase:F,springs:Y,payload:U}):N.set($,{phase:F,springs:Y,payload:U})});const T=_.useContext(To),O=Fv(T),P=T!==O&&lC(T);Rt(()=>{P&&be(p,$=>{$.ctrl.start({default:T})})},[T]),be(N,($,L)=>{if(C.current.size){const z=p.findIndex(j=>j.key===L.key);p.splice(z,1)}}),Rt(()=>{be(C.current.size?C.current:N,({phase:$,payload:L},z)=>{const{ctrl:j}=z;z.phase=$,f==null||f.add(j),P&&$=="enter"&&j.start({default:T}),L&&(Uv(j,L.ref),(j.ref||f)&&!E.current?j.update(L):(j.start(L),E.current&&(E.current=!1)))})},i?void 0:n);const M=$=>wa.createElement(wa.Fragment,null,p.map((L,z)=>{const{springs:j}=N.get(L)||L.ctrl,B=$({...j},L.item,L,z);return B&&B.type?wa.createElement(B.type,{...B.props,key:se.str(L.key)||se.num(L.key)?L.key:L.ctrl.id,ref:B.ref}):B}));return f?[M,f]:M}var Aj=1;function Lj(e,{key:t,keys:n=t},r){if(n===null){const i=new Set;return e.map(a=>{const o=r&&r.find(s=>s.item===a&&s.phase!=="leave"&&!i.has(s));return o?(i.add(o),o.key):Aj++})}return se.und(n)?e:se.fun(n)?e.map(n):Ht(n)}var Dj=({container:e,...t}={})=>{const[n,r]=ba(()=>({scrollX:0,scrollY:0,scrollXProgress:0,scrollYProgress:0,...t}),[]);return Rt(()=>{const i=nj(({x:a,y:o})=>{r.start({scrollX:a.current,scrollXProgress:a.progress,scrollY:o.current,scrollYProgress:o.progress})},{container:(e==null?void 0:e.current)||void 0});return()=>{be(Object.values(n),a=>a.stop()),i()}},[]),n},Ij=({container:e,...t})=>{const[n,r]=ba(()=>({width:0,height:0,...t}),[]);return Rt(()=>{const i=QN(({width:a,height:o})=>{r.start({width:a,height:o,immediate:n.width.get()===0||n.height.get()===0})},{container:(e==null?void 0:e.current)||void 0});return()=>{be(Object.values(n),a=>a.stop()),i()}},[]),n},Fj={any:0,all:1};function zj(e,t){const[n,r]=_.useState(!1),i=_.useRef(),a=se.fun(e)&&e,o=a?a():{},{to:s={},from:l={},...c}=o,u=a?t:e,[d,f]=ba(()=>({from:l,...c}),[]);return Rt(()=>{const g=i.current,{root:p,once:v,amount:m="any",...b}=u??{};if(!g||v&&n||typeof IntersectionObserver>"u")return;const y=new WeakMap,x=()=>(s&&f.start(s),r(!0),v?void 0:()=>{l&&f.start(l),r(!1)}),k=S=>{S.forEach(N=>{const C=y.get(N.target);if(N.isIntersecting!==!!C)if(N.isIntersecting){const E=x();se.fun(E)?y.set(N.target,E):w.unobserve(N.target)}else C&&(C(),y.delete(N.target))})},w=new IntersectionObserver(k,{root:p&&p.current||void 0,threshold:typeof m=="number"||Array.isArray(m)?m:Fj[m],...b});return w.observe(g),()=>w.unobserve(g)},[u]),a?[i,d]:[i,n]}function Bj({children:e,...t}){return e(ba(t))}function jj({items:e,children:t,...n}){const r=EC(e.length,n);return e.map((i,a)=>{const o=t(i,a);return se.fun(o)?o(r[a]):o})}function Wj({items:e,children:t,...n}){return TC(e,n)(t)}var rd=class extends ed{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=ko(...t);const n=this._get(),r=Bv(n);zv(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Hr(t,n)||(yr(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&MC(this._active)&&tm(this)}_get(){const e=se.arr(this.source)?this.source.map(Qt):Ht(Qt(this.source));return this.calc(...e)}_start(){this.idle&&!MC(this._active)&&(this.idle=!1,be(Xu(this),e=>{e.done=!1}),Mn.skipAnimation?(_e.batchedUpdates(()=>this.advance()),tm(this)):nl.start(this))}_attach(){let e=1;be(Ht(this.source),t=>{On(t)&&No(t,this),Vv(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){be(Ht(this.source),e=>{On(e)&&al(e,this)}),this._active.clear(),tm(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Ht(this.source).reduce((t,n)=>Math.max(t,(Vv(n)?n.priority:0)+1),0))}};function Uj(e){return e.idle!==!1}function MC(e){return!e.size||Array.from(e).every(Uj)}function tm(e){e.idle||(e.idle=!0,be(Xu(e),t=>{t.done=!0}),il(e,{type:"idle",parent:e}))}var Hj=(e,...t)=>new rd(e,t),qj=(e,...t)=>(JN(),new rd(e,t));Mn.assign({createStringInterpolator:XN,to:(e,t)=>new rd(e,t)});var Kj=nl.advance,$C=/^--/;function Vj(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!$C.test(e)&&!(yl.hasOwnProperty(e)&&yl[e])?t+"px":(""+t).trim()}var OC={};function Yj(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:l,...c}=t,u=Object.values(c),d=Object.keys(c).map(f=>n||e.hasAttribute(f)?f:OC[f]||(OC[f]=f.replace(/([A-Z])/g,g=>"-"+g.toLowerCase())));a!==void 0&&(e.textContent=a);for(const f in i)if(i.hasOwnProperty(f)){const g=Vj(f,i[f]);$C.test(f)?e.style.setProperty(f,g):e.style[f]=g}d.forEach((f,g)=>{e.setAttribute(f,u[g])}),r!==void 0&&(e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),l!==void 0&&e.setAttribute("viewBox",l)}var yl={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Gj=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Xj=["Webkit","Ms","Moz","O"];yl=Object.keys(yl).reduce((e,t)=>(Xj.forEach(n=>e[Gj(n,t)]=e[t]),e),yl);var Zj=/^(matrix|translate|scale|rotate|skew)/,Jj=/^(translate)/,Qj=/^(rotate|skew)/,nm=(e,t)=>se.num(e)&&e!==0?e+t:e,id=(e,t)=>se.arr(e)?e.every(n=>id(n,t)):se.num(e)?e===t:parseFloat(e)===t,Rj=class extends Ju{constructor({x:e,y:t,z:n,...r}){const i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(o=>[`translate3d(${o.map(s=>nm(s,"px")).join(",")})`,id(o,0)])),mr(r,(o,s)=>{if(s==="transform")i.push([o||""]),a.push(l=>[l,l===""]);else if(Zj.test(s)){if(delete r[s],se.und(o))return;const l=Jj.test(s)?"px":Qj.test(s)?"deg":"";i.push(Ht(o)),a.push(s==="rotate3d"?([c,u,d,f])=>[`rotate3d(${c},${u},${d},${nm(f,l)})`,id(f,0)]:c=>[`${s}(${c.map(u=>nm(u,l)).join(",")})`,id(c,s.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new eW(i,a)),super(r)}},eW=class extends KN{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return be(this.inputs,(n,r)=>{const i=Qt(n[0]),[a,o]=this.transforms[r](se.arr(i)?i:n.map(Qt));e+=" "+a,t=t&&o}),t?"none":e}observerAdded(e){e==1&&be(this.inputs,t=>be(t,n=>On(n)&&No(n,this)))}observerRemoved(e){e==0&&be(this.inputs,t=>be(t,n=>On(n)&&al(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),il(this,e)}},tW=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];Mn.assign({batchedUpdates:Zr.unstable_batchedUpdates,createStringInterpolator:XN,colors:E4});var nW=pj(tW,{applyAnimatedValues:Yj,createAnimatedStyle:e=>new Rj(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),rm=nW.animated;const rW=Object.freeze(Object.defineProperty({__proto__:null,Any:gj,BailSignal:Kv,Controller:Jv,FrameValue:ed,Globals:Mn,Interpolation:rd,Spring:Bj,SpringContext:To,SpringRef:nd,SpringValue:Zv,Trail:jj,Transition:Wj,a:rm,animated:rm,config:cC,createInterpolator:ko,easings:HN,inferTo:Ru,interpolate:qj,to:Hj,update:Kj,useChain:xj,useInView:zj,useIsomorphicLayoutEffect:Rt,useReducedMotion:lj,useResize:Ij,useScroll:Dj,useSpring:ba,useSpringRef:Oj,useSpringValue:Pj,useSprings:em,useTrail:EC,useTransition:TC},Symbol.toStringTag,{value:"Module"}));var im={};const ad=Bn(fA),bl=Bn(FI);var am={};const PC=Bn(l5),om=Bn(bB);var sm={},ki={};ki.__esModule=!0,ki.default=void 0;var iW={top:"top",left:"left",right:"right",bottom:"bottom"},aW=iW;ki.default=aW,sm.__esModule=!0,sm.default=sW;var xl=oW(ki);function oW(e){return e&&e.__esModule?e:{default:e}}function sW(e){var t=e.labelOffset,n=e.labelProps,r=e.orientation,i=e.range,a=e.tickLabelFontSize,o=e.tickLength,s=r===xl.default.left||r===xl.default.top?-1:1,l,c,u;if(r===xl.default.top||r===xl.default.bottom){var d=r===xl.default.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(i[0])+Number(i[i.length-1]))/2,c=s*(o+t+a+d)}else l=s*((Number(i[0])+Number(i[i.length-1]))/2),c=-(o+t),u="rotate("+s*90+")";return{x:l,y:c,transform:u}}var lm={};lm.__esModule=!0,lm.default=hW;var cm=um(_),lW=um(Fr),cW=PC,uW=ad,dW=om,fW=um(ki);function um(e){return e&&e.__esModule?e:{default:e}}function _l(){return _l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_l.apply(this,arguments)}function hW(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,i=e.tickClassName,a=e.tickComponent,o=e.tickLabelProps,s=e.tickStroke,l=s===void 0?"#222":s,c=e.tickTransform,u=e.ticks,d=e.strokeWidth,f=e.tickLineProps;return u.map(function(g){var p,v=g.value,m=g.index,b=g.from,y=g.to,x=g.formattedValue,k=(p=o[m])!=null?p:{},w=Math.max(10,typeof k.fontSize=="number"&&k.fontSize||0),S=y.y+(n&&r!==fW.default.top?w:0);return cm.default.createElement(uW.Group,{key:"visx-tick-"+v+"-"+m,className:(0,lW.default)("visx-axis-tick",i),transform:c},!t&&cm.default.createElement(cW.Line,_l({from:b,to:y,stroke:l,strokeWidth:d,strokeLinecap:"square"},f)),a?a(_l({},k,{x:y.x,y:S,formattedValue:x})):cm.default.createElement(dW.Text,_l({x:y.x,y:S},k),x))})}am.__esModule=!0,am.default=bW;var od=wl(_),AC=wl(Fr),pW=PC,gW=om,vW=wl(sm),mW=wl(ki),yW=wl(lm);function wl(e){return e&&e.__esModule?e:{default:e}}function kl(){return kl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kl.apply(this,arguments)}var LC={textAnchor:"middle",fontFamily:"Arial",fontSize:10,fill:"#222"};function bW(e){var t=e.axisFromPoint,n=e.axisLineClassName,r=e.axisToPoint,i=e.hideAxisLine,a=e.hideTicks,o=e.horizontal,s=e.label,l=s===void 0?"":s,c=e.labelClassName,u=e.labelOffset,d=u===void 0?14:u,f=e.labelProps,g=e.orientation,p=g===void 0?mW.default.bottom:g,v=e.scale,m=e.stroke,b=m===void 0?"#222":m,y=e.strokeDasharray,x=e.strokeWidth,k=x===void 0?1:x,w=e.tickClassName,S=e.tickComponent,N=e.tickLineProps,C=e.tickLabelProps,E=e.tickLength,T=E===void 0?8:E,O=e.tickStroke,P=O===void 0?"#222":O,M=e.tickTransform,$=e.ticks,L=e.ticksComponent,z=L===void 0?yW.default:L,j=kl({},LC,f),B=kl({},LC,typeof C=="object"?C:null),H=$.map(function(D){var U=D.value,V=D.index;return typeof C=="function"?C(U,V,$):B}),F=Math.max.apply(Math,[10].concat(H.map(function(D){return typeof D.fontSize=="number"?D.fontSize:0})));return od.default.createElement(od.default.Fragment,null,z({hideTicks:a,horizontal:o,orientation:p,scale:v,tickClassName:w,tickComponent:S,tickLabelProps:H,tickStroke:P,tickTransform:M,ticks:$,strokeWidth:k,tickLineProps:N}),!i&&od.default.createElement(pW.Line,{className:(0,AC.default)("visx-axis-line",n),from:t,to:r,stroke:b,strokeWidth:k,strokeDasharray:y}),l&&od.default.createElement(gW.Text,kl({className:(0,AC.default)("visx-axis-label",c)},(0,vW.default)({labelOffset:d,labelProps:j,orientation:p,range:v.range(),tickLabelFontSize:F,tickLength:T}),j),l))}var dm={};dm.__esModule=!0,dm.default=xW;function xW(e,t){t===void 0&&(t="center");var n=e;if(t!=="start"&&"bandwidth"in n){var r=n.bandwidth();return t==="center"&&(r/=2),n.round()&&(r=Math.round(r)),function(i){var a=n(i);return typeof a=="number"?a+r:a}}return e}var fm={};fm.__esModule=!0,fm.default=wW;var _W=bl;function wW(e){var t=e;return"tickFormat"in t?t.tickFormat():_W.toString}var hm={};hm.__esModule=!0,hm.default=SW;var kW=Ou;function SW(e,t){var n=e.x,r=e.y;return new kW.Point(t?{x:n,y:r}:{x:r,y:n})}var Sl={};Sl.__esModule=!0,Sl.default=NW,Sl.defaultAxisRangePadding=void 0;function pm(){return pm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pm.apply(this,arguments)}var sd=0;Sl.defaultAxisRangePadding=sd;function NW(e){return e===void 0&&(e=sd),typeof e=="number"?{start:e,end:e}:pm({start:sd,end:sd},e)}im.__esModule=!0,im.default=DW,qr(li);var CW=qr(_),EW=qr(Fr),TW=ad,DC=bl,MW=qr(am),$W=qr(dm),OW=qr(fm),ld=qr(hm),cd=qr(ki),PW=qr(Sl),AW=["children","axisClassName","hideAxisLine","hideTicks","hideZero","innerRef","left","numTicks","orientation","rangePadding","scale","tickFormat","tickLength","tickValues","top"];function qr(e){return e&&e.__esModule?e:{default:e}}function gm(){return gm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gm.apply(this,arguments)}function LW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function DW(e){var t=e.children,n=t===void 0?MW.default:t,r=e.axisClassName,i=e.hideAxisLine,a=i===void 0?!1:i,o=e.hideTicks,s=o===void 0?!1:o,l=e.hideZero,c=l===void 0?!1:l,u=e.innerRef,d=e.left,f=d===void 0?0:d,g=e.numTicks,p=g===void 0?10:g,v=e.orientation,m=v===void 0?cd.default.bottom:v,b=e.rangePadding,y=b===void 0?0:b,x=e.scale,k=e.tickFormat,w=e.tickLength,S=w===void 0?8:w,N=e.tickValues,C=e.top,E=C===void 0?0:C,T=LW(e,AW),O=k??(0,OW.default)(x),P=m===cd.default.left,M=m===cd.default.top,$=M||m===cd.default.bottom,L=(0,$W.default)(x),z=P||M?-1:1,j=x.range(),B=(0,PW.default)(y),H=(0,ld.default)({x:Number(j[0])+.5-B.start,y:0},$),F=(0,ld.default)({x:Number(j[j.length-1])+.5+B.end,y:0},$),D=(N??(0,DC.getTicks)(x,p)).filter(function(V){return!c||V!==0&&V!=="0"}).map(function(V,Y){return{value:V,index:Y}}),U=D.map(function(V){var Y=V.value,G=V.index,R=(0,DC.coerceNumber)(L(Y));return{value:Y,index:G,from:(0,ld.default)({x:R,y:0},$),to:(0,ld.default)({x:R,y:S*z},$),formattedValue:O(Y,G,D)}});return CW.default.createElement(TW.Group,{className:(0,EW.default)("visx-axis",r),innerRef:u,top:E,left:f},n(gm({},T,{axisFromPoint:H,axisToPoint:F,hideAxisLine:a,hideTicks:s,hideZero:c,horizontal:$,numTicks:p,orientation:m,rangePadding:y,scale:x,tickFormat:O,tickLength:S,tickPosition:L,tickSign:z,ticks:U})))}var vm={};const IC=Bn(rW);var ud={};ud.__esModule=!0,ud.default=zW;var IW=_,FW=bl;function dd(e,t,n,r,i){var a;switch(e){case"center":return i;case"min":return n??0;case"max":return r??0;case"outside":default:return(a=(t??0)<i?n:r)!=null?a:0}}function FC(e){var t=e.from,n=e.to;return{fromX:t.x,toX:n.x,fromY:t.y,toY:n.y,opacity:1}}function zW(e){var t=e.scale,n=e.animateXOrY,r=e.animationTrajectory,i=r===void 0?"outside":r,a=n==="x";return(0,IW.useMemo)(function(){var o=t.range().map(FW.coerceNumber),s=o[0],l=o[1],c=l!=null&&s!=null&&l<s,u=c?[l,s]:[s,l],d=u[0],f=u[1],g=l!=null&&s!=null?Math.abs(l-s):0,p=(d??0)+g/2,v=i;!a&&i==="min"&&(v="max"),!a&&i==="max"&&(v="min");var m=function(y){var x=y.from,k=y.to;return{fromX:a?dd(v,x.x,d,f,p):x.x,toX:a?dd(v,x.x,d,f,p):k.x,fromY:a?x.y:dd(v,x.y,d,f,p),toY:a?k.y:dd(v,x.y,d,f,p),opacity:0}};return{from:m,leave:m,enter:FC,update:FC}},[t,a,i])}vm.__esModule=!0,vm.default=HW;var Mo=fd(_),Nl=IC,BW=fd(Fr),jW=fd(ki),WW=om,UW=fd(ud);function fd(e){return e&&e.__esModule?e:{default:e}}function Cl(){return Cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cl.apply(this,arguments)}function HW(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,i=e.scale,a=e.tickClassName,o=e.tickComponent,s=e.tickLabelProps,l=e.tickStroke,c=l===void 0?"#222":l,u=e.tickTransform,d=e.ticks,f=e.tickLineProps,g=e.animationTrajectory,p=(0,Nl.useTransition)(d,Cl({},(0,UW.default)({scale:i,animateXOrY:n?"x":"y",animationTrajectory:g}),{keys:function(m){return"tick-"+m.value+"-"+m.index}}));return Mo.default.createElement(Mo.default.Fragment,null,p(function(v,m,b,y){var x,k,w=v.fromX,S=v.toX,N=v.fromY,C=v.toY,E=v.opacity,T=b.key,O=(x=(k=s[y])!=null?k:s[0])!=null?x:{};return m==null||T==null?null:Mo.default.createElement(Nl.animated.g,{key:T,className:(0,BW.default)("visx-axis-tick",a),transform:u},!t&&Mo.default.createElement(Nl.animated.line,Cl({x1:w,x2:S,y1:N,y2:C,stroke:c,strokeLinecap:"square",strokeOpacity:E},f)),Mo.default.createElement(Nl.animated.g,{key:y,transform:(0,Nl.to)([S,C],function(P,M){var $;return"translate("+P+","+(M+(r===jW.default.bottom&&typeof O.fontSize=="number"?($=O.fontSize)!=null?$:10:0))+")"}),opacity:E},o?o(Cl({},O,{x:S,y:C,formattedValue:m==null?void 0:m.formattedValue})):Mo.default.createElement(WW.Text,O,m==null?void 0:m.formattedValue)))}))}var qW=ZW;ym(li);var mm=GW(_),KW=ym(im),VW=ym(vm),YW=["animationTrajectory","tickComponent"];function zC(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(zC=function(i){return i?n:t})(e)}function GW(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=zC(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function ym(e){return e&&e.__esModule?e:{default:e}}function hd(){return hd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hd.apply(this,arguments)}function XW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function ZW(e){var t=e.animationTrajectory,n=e.tickComponent,r=XW(e,YW),i=(0,mm.useMemo)(function(){return function(o){return mm.default.createElement(VW.default,hd({},o,{tickComponent:n,animationTrajectory:t}))}},[t,n]);return mm.default.createElement(KW.default,hd({},r,{ticksComponent:i}))}var JW=["AxisComponent"];function pd(){return pd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pd.apply(this,arguments)}function QW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function RW(e){var t,n,r,i,a,o,s,l=e.AxisComponent,c=QW(e,JW),u=_.useContext(vr),d=u.theme,f=u.xScale,g=u.yScale,p=u.margin,v=u.width,m=u.height,b=c.orientation,y=_.useMemo(function(){var C,E,T,O;return b==="left"||b==="right"?d==null||(C=d.axisStyles)==null||(E=C.y)==null?void 0:E[b]:d==null||(T=d.axisStyles)==null||(O=T.x)==null?void 0:O[b]},[d,b]),x=c.tickLabelProps,k=_.useMemo(function(){return x||y?function(C,E,T){return pd({},y==null?void 0:y.tickLabel,{width:b==="left"||b==="right"?p==null?void 0:p[b]:void 0},typeof x=="function"?x(C,E,T):x)}:void 0},[x,y,b,p]),w=b==="bottom"?(m??0)-((t=p==null?void 0:p.bottom)!=null?t:0):b==="top"&&(n=p==null?void 0:p.top)!=null?n:0,S=b==="left"?(r=p==null?void 0:p.left)!=null?r:0:b==="right"?(v??0)-((i=p==null?void 0:p.right)!=null?i:0):0,N=b==="left"||b==="right"?g:f;return N?_.createElement(l,pd({top:w,left:S,labelProps:y==null?void 0:y.axisLabel,stroke:y==null||(a=y.axisLine)==null?void 0:a.stroke,strokeWidth:y==null||(o=y.axisLine)==null?void 0:o.strokeWidth,tickLength:y==null?void 0:y.tickLength,tickStroke:y==null||(s=y.tickLine)==null?void 0:s.stroke},c,{tickLabelProps:k,scale:N})):null}function bm(){return bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bm.apply(this,arguments)}function BC(e){return _.createElement(RW,bm({AxisComponent:qW},e))}var xm={},gd={};gd.__esModule=!0,gd.default=i8;var e8=jC(_),t8=jC(Fr),n8=["from","to","fill","className","innerRef"];function jC(e){return e&&e.__esModule?e:{default:e}}function _m(){return _m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_m.apply(this,arguments)}function r8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function i8(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,i=r===void 0?{x:1,y:1}:r,a=e.fill,o=a===void 0?"transparent":a,s=e.className,l=e.innerRef,c=r8(e,n8),u=n.x===i.x||n.y===i.y;return e8.default.createElement("line",_m({ref:l,className:(0,t8.default)("visx-line",s),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:o,shapeRendering:u?"crispEdges":"auto"},c))}var vd={};vd.__esModule=!0,vd.default=a8;function a8(e){return"bandwidth"in e?e.bandwidth():0}xm.__esModule=!0,xm.default=KC;var WC=El(li),UC=El(_),o8=El(Fr),s8=El(gd),l8=ad,HC=Ou,qC=bl,c8=El(vd),u8=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function El(e){return e&&e.__esModule?e:{default:e}}function wm(){return wm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wm.apply(this,arguments)}function d8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function KC(e){var t=e.top,n=t===void 0?0:t,r=e.left,i=r===void 0?0:r,a=e.scale,o=e.width,s=e.stroke,l=s===void 0?"#eaf0f6":s,c=e.strokeWidth,u=c===void 0?1:c,d=e.strokeDasharray,f=e.className,g=e.children,p=e.numTicks,v=p===void 0?10:p,m=e.lineStyle,b=e.offset,y=e.tickValues,x=d8(e,u8),k=y??(0,qC.getTicks)(a,v),w=(b??0)+(0,c8.default)(a)/2,S=k.map(function(N,C){var E,T=((E=(0,qC.coerceNumber)(a(N)))!=null?E:0)+w;return{index:C,from:new HC.Point({x:0,y:T}),to:new HC.Point({x:o,y:T})}});return UC.default.createElement(l8.Group,{className:(0,o8.default)("visx-rows",f),top:n,left:i},g?g({lines:S}):S.map(function(N){var C=N.from,E=N.to,T=N.index;return UC.default.createElement(s8.default,wm({key:"row-line-"+T,from:C,to:E,stroke:l,strokeWidth:u,strokeDasharray:d,style:m},x))}))}KC.propTypes={tickValues:WC.default.array,width:WC.default.number.isRequired};var md={};md.__esModule=!0,md.default=YC;var f8=Sm(li),km=Sm(_),VC=IC,h8=Sm(ud),p8=["scale","lines","animationTrajectory","animateXOrY","lineKey","lineStyle"];function Sm(e){return e&&e.__esModule?e:{default:e}}function yd(){return yd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yd.apply(this,arguments)}function g8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function YC(e){var t=e.scale,n=e.lines,r=e.animationTrajectory,i=e.animateXOrY,a=e.lineKey,o=e.lineStyle,s=g8(e,p8),l=(0,VC.useTransition)(n,yd({},(0,h8.default)({scale:t,animateXOrY:i,animationTrajectory:r}),{key:a}));return km.default.createElement(km.default.Fragment,null,l(function(c,u,d){var f=c.fromX,g=c.toX,p=c.fromY,v=c.toY,m=c.opacity,b=d.key;return km.default.createElement(VC.animated.line,yd({key:b,x1:f,x2:g,y1:p,y2:v,strokeOpacity:m,style:o},s))}))}YC.propTypes={lineKey:f8.default.func.isRequired};var v8=_8,GC=Nm(_),m8=Nm(xm),y8=Nm(md),b8=["scale","width","numTicks","tickValues","offset","className","animationTrajectory","top","left"];function Nm(e){return e&&e.__esModule?e:{default:e}}function Cm(){return Cm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cm.apply(this,arguments)}function x8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function _8(e){var t=e.scale,n=e.width,r=e.numTicks,i=e.tickValues,a=e.offset,o=e.className,s=e.animationTrajectory,l=e.top,c=e.left,u=x8(e,b8);return GC.default.createElement(m8.default,{scale:t,width:n,numTicks:r,tickValues:i,className:o,top:l,left:c,offset:a},function(d){var f=d.lines;return GC.default.createElement(y8.default,Cm({scale:t,lines:f,animationTrajectory:s,animateXOrY:"y",lineKey:function(p){var v,m;return"row-"+((v=p==null||(m=p.from)==null?void 0:m.y)!=null?v:"")+"-"+p.index}},u))})}var Em={};Em.__esModule=!0,Em.default=RC;var XC=Tl(li),ZC=Tl(_),w8=Tl(Fr),k8=Tl(gd),S8=ad,JC=Ou,QC=bl,N8=Tl(vd),C8=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function Tl(e){return e&&e.__esModule?e:{default:e}}function Tm(){return Tm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tm.apply(this,arguments)}function E8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function RC(e){var t=e.top,n=t===void 0?0:t,r=e.left,i=r===void 0?0:r,a=e.scale,o=e.height,s=e.stroke,l=s===void 0?"#eaf0f6":s,c=e.strokeWidth,u=c===void 0?1:c,d=e.strokeDasharray,f=e.className,g=e.numTicks,p=g===void 0?10:g,v=e.lineStyle,m=e.offset,b=e.tickValues,y=e.children,x=E8(e,C8),k=b??(0,QC.getTicks)(a,p),w=(m??0)+(0,N8.default)(a)/2,S=k.map(function(N,C){var E,T=((E=(0,QC.coerceNumber)(a(N)))!=null?E:0)+w;return{index:C,from:new JC.Point({x:T,y:0}),to:new JC.Point({x:T,y:o})}});return ZC.default.createElement(S8.Group,{className:(0,w8.default)("visx-columns",f),top:n,left:i},y?y({lines:S}):S.map(function(N){var C=N.from,E=N.to,T=N.index;return ZC.default.createElement(k8.default,Tm({key:"column-line-"+T,from:C,to:E,stroke:l,strokeWidth:u,strokeDasharray:d,style:v},x))}))}RC.propTypes={tickValues:XC.default.array,height:XC.default.number.isRequired};var T8=A8,eE=Mm(_),M8=Mm(Em),$8=Mm(md),O8=["scale","height","numTicks","tickValues","offset","className","animationTrajectory","top","left"];function Mm(e){return e&&e.__esModule?e:{default:e}}function $m(){return $m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$m.apply(this,arguments)}function P8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function A8(e){var t=e.scale,n=e.height,r=e.numTicks,i=e.tickValues,a=e.offset,o=e.className,s=e.animationTrajectory,l=e.top,c=e.left,u=P8(e,O8);return eE.default.createElement(M8.default,{scale:t,height:n,numTicks:r,tickValues:i,className:o,offset:a,top:l,left:c},function(d){var f=d.lines;return eE.default.createElement($8.default,$m({scale:t,lines:f,animationTrajectory:s,animateXOrY:"x",lineKey:function(p){var v,m;return"column-"+((v=p==null||(m=p.from)==null?void 0:m.x)!=null?v:"")+"-"+p.index}},u))})}var L8=["rows","columns","GridRowsComponent","GridColumnsComponent"];function bd(){return bd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bd.apply(this,arguments)}function D8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function tE(e){var t=e.rows,n=t===void 0?!0:t,r=e.columns,i=r===void 0?!0:r,a=e.GridRowsComponent,o=e.GridColumnsComponent,s=D8(e,L8),l=_.useContext(vr),c=l.theme,u=l.xScale,d=l.yScale,f=l.margin,g=l.innerWidth,p=l.innerHeight,v=c==null?void 0:c.gridStyles;return _.createElement(_.Fragment,null,n&&d&&g!=null&&_.createElement(a,bd({left:f==null?void 0:f.left,lineStyle:v,width:g,scale:d},s)),i&&u&&p!=null&&_.createElement(o,bd({top:f==null?void 0:f.top,lineStyle:v,height:p,scale:u},s)))}tE.propTypes={rows:K.bool,columns:K.bool};var I8=["animationTrajectory"];function Ml(){return Ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ml.apply(this,arguments)}function F8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function z8(e){var t=e.animationTrajectory,n=F8(e,I8),r=_.useMemo(function(){return function(o){return _.createElement(v8,Ml({},o,{animationTrajectory:t}))}},[t]),i=_.useMemo(function(){return function(o){return _.createElement(T8,Ml({},o,{animationTrajectory:t}))}},[t]);return _.createElement(tE,Ml({GridRowsComponent:r,GridColumnsComponent:i},n))}var B8=["tooltipOpen"];function j8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function xd(){return xd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xd.apply(this,arguments)}function W8(e){var t=_.useState(xd({tooltipOpen:!1},e)),n=t[0],r=t[1],i=_.useCallback(function(o){return r(typeof o=="function"?function(s){s.tooltipOpen;var l=j8(s,B8);return xd({},o(l),{tooltipOpen:!0})}:{tooltipOpen:!0,tooltipLeft:o.tooltipLeft,tooltipTop:o.tooltipTop,tooltipData:o.tooltipData})},[r]),a=_.useCallback(function(){return r({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0})},[r]);return{tooltipOpen:n.tooltipOpen,tooltipLeft:n.tooltipLeft,tooltipTop:n.tooltipTop,tooltipData:n.tooltipData,updateTooltip:r,showTooltip:i,hideTooltip:a}}function U8(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Om(e,t)}function Om(e,t){return Om=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Om(e,t)}var nE=function(e){U8(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.componentWillUnmount=function(){this.node&&document.body&&(document.body.removeChild(this.node),delete this.node)},n.render=function(){return!this.node&&typeof document<"u"&&(this.node=document.createElement("div"),this.props.zIndex!=null&&(this.node.style.zIndex=""+this.props.zIndex),document.body.append(this.node)),this.node?Zr.createPortal(this.props.children,this.node):null},t}(_.PureComponent);nE.propTypes={zIndex:K.oneOfType([K.number,K.string])};var H8=["className","top","left","offsetLeft","offsetTop","style","children","unstyled","applyPositionStyle"];function _d(){return _d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_d.apply(this,arguments)}function q8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Pm={position:"absolute",backgroundColor:"white",color:"#666666",padding:".3rem .5rem",borderRadius:"3px",fontSize:"14px",boxShadow:"0 1px 2px rgba(33,33,33,0.2)",lineHeight:"1em",pointerEvents:"none"},wd=_.forwardRef(function(e,t){var n=e.className,r=e.top,i=e.left,a=e.offsetLeft,o=a===void 0?10:a,s=e.offsetTop,l=s===void 0?10:s,c=e.style,u=c===void 0?Pm:c,d=e.children,f=e.unstyled,g=f===void 0?!1:f,p=e.applyPositionStyle,v=p===void 0?!1:p,m=q8(e,H8);return _.createElement("div",_d({ref:t,className:Te("visx-tooltip",n),style:_d({top:r==null||l==null?r:r+l,left:i==null||o==null?i:i+o},v&&{position:"absolute"},!g&&u)},m),d)});wd.propTypes={children:K.node,className:K.string,left:K.number,offsetLeft:K.number,offsetTop:K.number,top:K.number,applyPositionStyle:K.bool,unstyled:K.bool},wd.displayName="Tooltip";function Am(){return Am=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Am.apply(this,arguments)}function K8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function V8(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Lm(e,t)}function Lm(e,t){return Lm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Lm(e,t)}var rE={top:0,right:0,bottom:0,left:0,width:0,height:0};function Y8(e){var t;return t=function(n){V8(r,n);function r(a){var o;return o=n.call(this,a)||this,o.state={rect:void 0,parentRect:void 0},o.nodeRef=_.createRef(),o.getRects=o.getRects.bind(K8(o)),o}var i=r.prototype;return i.componentDidMount=function(){var o,s=this;this.node=(o=this.nodeRef)!=null&&o.current?this.nodeRef.current:Zr.findDOMNode(this),this.setState(function(){return s.getRects()})},i.getRects=function(){if(!this.node)return this.state;var o=this.node,s=o.parentNode,l=o.getBoundingClientRect?o.getBoundingClientRect():rE,c=s!=null&&s.getBoundingClientRect?s.getBoundingClientRect():rE;return{rect:l,parentRect:c}},i.render=function(){return _.createElement(e,Am({nodeRef:this.nodeRef,getRects:this.getRects},this.state,this.props))},r}(_.PureComponent),t.displayName="withBoundingRects("+(e.displayName||"")+")",t}var iE=_.createContext({isFlippedVertically:!1,isFlippedHorizontally:!1}),G8=iE.Provider;iE.Consumer;var X8=["children","getRects","left","offsetLeft","offsetTop","parentRect","rect","style","top","unstyled","nodeRef"];function kd(){return kd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kd.apply(this,arguments)}function Z8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function aE(e){var t=e.children;e.getRects;var n=e.left,r=n===void 0?0:n,i=e.offsetLeft,a=i===void 0?10:i,o=e.offsetTop,s=o===void 0?10:o,l=e.parentRect,c=e.rect,u=e.style,d=u===void 0?Pm:u,f=e.top,g=f===void 0?0:f,p=e.unstyled,v=p===void 0?!1:p,m=e.nodeRef,b=Z8(e,X8),y,x=!1,k=!1;if(c&&l){var w=r,S=g;if(l.width){var N=w+a+c.width-l.width,C=c.width-w-a;x=N>0&&N>C}else{var E=w+a+c.width-window.innerWidth,T=c.width-w-a;x=E>0&&E>T}if(l.height){var O=S+s+c.height-l.height,P=c.height-S-s;k=O>0&&O>P}else k=S+s+c.height>window.innerHeight;w=x?w-c.width-a:w+a,S=k?S-c.height-s:S+s,w=Math.round(w),S=Math.round(S),y="translate("+w+"px, "+S+"px)"}return _.createElement(wd,kd({ref:m,style:kd({left:0,top:0,transform:y},!v&&d)},b),_.createElement(G8,{value:{isFlippedVertically:!k,isFlippedHorizontally:!x}},t))}aE.propTypes={nodeRef:K.oneOfType([K.string,K.func,K.object])};const J8=Y8(aE);var Q8=["detectBounds","zIndex"],R8=["left","top","detectBounds","zIndex"];function Dm(){return Dm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dm.apply(this,arguments)}function oE(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function eU(e){var t=e===void 0?{}:e,n=t.detectBounds,r=n===void 0?!0:n,i=t.zIndex,a=oE(t,Q8),o=g4(a),s=o[0],l=o[1],c=o[2],u=_.useState(!1),d=u[0],f=u[1];_.useEffect(function(){f(!1)},[]);var g=_.useMemo(function(){return function(p){var v=p.left,m=v===void 0?0:v,b=p.top,y=b===void 0?0:b,x=p.detectBounds,k=p.zIndex,w=oE(p,R8),S=x??r,N=k??i,C=S?J8:wd,E=d?0:window.scrollX,T=d?0:window.scrollY,O=m+(l.left||0)+E,P=y+(l.top||0)+T;return _.createElement(nE,{zIndex:N},_.createElement(C,Dm({left:O,top:P},w)))}},[r,i,l.left,l.top,d]);return{containerRef:s,containerBounds:l,forceRefreshBounds:c,TooltipInPortal:g}}var $l=_.createContext(null),tU=["debounce","detectBounds","horizontalCrosshairStyle","glyphStyle","renderTooltip","renderGlyph","resizeObserverPolyfill","scroll","showDatumGlyph","showHorizontalCrosshair","showSeriesGlyphs","showVerticalCrosshair","snapTooltipToDatumX","snapTooltipToDatumY","verticalCrosshairStyle","zIndex"],nU=["x","y"];function sE(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Kr(){return Kr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kr.apply(this,arguments)}var Im={position:"absolute",pointerEvents:"none",fontSize:0,lineHeight:0},rU={position:"absolute",left:0,top:0,opacity:0,width:0,height:0,pointerEvents:"none"};function lE(e){var t=_.useContext(vr)||{},n=t.theme;return _.createElement("circle",Kr({cx:e.x,cy:e.y,r:e.size,fill:e.color,stroke:n==null?void 0:n.backgroundColor,strokeWidth:1.5,paintOrder:"fill"},e.glyphStyle))}lE.propTypes={isNearestDatum:K.bool.isRequired};function iU(e){return _.createElement(lE,e)}function cE(e){var t,n,r,i,a,o,s,l,c,u,d,f,g,p=e.debounce,v=e.detectBounds,m=e.horizontalCrosshairStyle,b=e.glyphStyle,y=e.renderTooltip,x=e.renderGlyph,k=x===void 0?iU:x,w=e.resizeObserverPolyfill,S=e.scroll,N=S===void 0?!0:S,C=e.showDatumGlyph,E=C===void 0?!1:C,T=e.showHorizontalCrosshair,O=T===void 0?!1:T,P=e.showSeriesGlyphs,M=P===void 0?!1:P,$=e.showVerticalCrosshair,L=$===void 0?!1:$,z=e.snapTooltipToDatumX,j=z===void 0?!1:z,B=e.snapTooltipToDatumY,H=B===void 0?!1:B,F=e.verticalCrosshairStyle,D=e.zIndex,U=sE(e,tU),V=_.useContext(vr)||{},Y=V.colorScale,G=V.theme,R=V.innerHeight,te=V.innerWidth,le=V.margin,W=V.xScale,Z=V.yScale,I=V.dataRegistry,A=V.resizeObserverPolyfill,q=_.useContext($l),Q=eU({debounce:p,detectBounds:v,polyfill:A||w,scroll:N,zIndex:D}),de=Q.containerRef,ne=Q.TooltipInPortal,he=Q.forceRefreshBounds,xe=_.useCallback(function(et){var pn;de((pn=et==null?void 0:et.parentElement)!=null?pn:null)},[de]),Ye=q!=null&&q.tooltipOpen?y(Kr({},q,{colorScale:Y})):null,Ge=(q==null?void 0:q.tooltipOpen)&&Ye!=null,ut=_.useRef(!1);_.useEffect(function(){Ge&&!ut.current&&he(),ut.current=Ge},[Ge,he]);var je=q==null?void 0:q.tooltipLeft,We=q==null?void 0:q.tooltipTop,nt=W?bv(W):0,rt=Z?bv(Z):0,mt=_.useCallback(function(et,pn){var Zn,xr,nn=I==null?void 0:I.get(et),Mi=nn==null?void 0:nn.xAccessor,ee=nn==null?void 0:nn.yAccessor,Ke=W&&Mi?(Zn=Number(W(Mi(pn)))+nt/2)!=null?Zn:0:void 0,Qe=Z&&ee?(xr=Number(Z(ee(pn)))+rt/2)!=null?xr:0:void 0;return{left:Ke,top:Qe}},[I,nt,rt,W,Z]),$e=q==null||(t=q.tooltipData)==null?void 0:t.nearestDatum,Ct=(n=$e==null?void 0:$e.key)!=null?n:"";if(Ge&&$e&&(j||H)){var At=mt(Ct,$e.datum),Re=At.left,Yr=At.top;je=j&&Jt(Re)?Re:je,We=H&&Jt(Yr)?Yr:We}var Xn=[];if(Ge&&(E||M)){var Vt,pe=Number((Vt=b==null?void 0:b.radius)!=null?Vt:4);if(M){var Pe,Et;Object.values((Pe=q==null||(Et=q.tooltipData)==null?void 0:Et.datumByKey)!=null?Pe:{}).forEach(function(et){var pn,Zn,xr,nn=et.key,Mi=et.datum,ee=et.index,Ke=(pn=(Zn=Y==null?void 0:Y(nn))!=null?Zn:G==null||(xr=G.htmlLabel)==null?void 0:xr.color)!=null?pn:"#222",Qe=mt(nn,Mi),Gr=Qe.left,Jn=Qe.top;!Jt(Gr)||!Jt(Jn)||Xn.push({key:nn,color:Ke,datum:Mi,index:ee,size:pe,x:Gr,y:Jn,glyphStyle:b,isNearestDatum:$e?$e.key===nn:!1})})}else if($e){var yt=mt(Ct,$e.datum),ae=yt.left,ve=yt.top;if(Jt(ae)&&Jt(ve)){var ge,Ne,bt,Lt,hn,Pd,Tt=(ge=(Ne=(bt=(Lt=Ct&&(Y==null?void 0:Y(Ct)))!=null?Lt:null)!=null?bt:G==null||(hn=G.gridStyles)==null?void 0:hn.stroke)!=null?Ne:G==null||(Pd=G.htmlLabel)==null?void 0:Pd.color)!=null?ge:"#222";Xn.push({key:Ct,color:Tt,datum:$e.datum,index:$e.index,size:pe,x:ae,y:ve,glyphStyle:b,isNearestDatum:!0})}}}return _.createElement(_.Fragment,null,_.createElement("svg",{ref:xe,style:rU}),Ge&&_.createElement(_.Fragment,null,L&&_.createElement(ne,{className:"visx-crosshair visx-crosshair-vertical",left:je,top:le==null?void 0:le.top,offsetLeft:0,offsetTop:0,detectBounds:!1,style:Im},_.createElement("svg",{width:"1",height:R,overflow:"visible"},_.createElement("line",Kr({x1:0,x2:0,y1:0,y2:R,strokeWidth:1.5,stroke:(r=(i=G==null||(a=G.gridStyles)==null?void 0:a.stroke)!=null?i:G==null||(o=G.htmlLabel)==null?void 0:o.color)!=null?r:"#222"},F)))),O&&_.createElement(ne,{className:"visx-crosshair visx-crosshair-horizontal",left:le==null?void 0:le.left,top:We,offsetLeft:0,offsetTop:0,detectBounds:!1,style:Im},_.createElement("svg",{width:te,height:"1",overflow:"visible"},_.createElement("line",Kr({x1:0,x2:te,y1:0,y2:0,strokeWidth:1.5,stroke:(s=(l=G==null||(c=G.gridStyles)==null?void 0:c.stroke)!=null?l:G==null||(u=G.htmlLabel)==null?void 0:u.color)!=null?s:"#222"},m)))),Xn.map(function(et,pn){var Zn=et.x,xr=et.y,nn=sE(et,nU);return _.createElement(ne,{key:pn,className:"visx-tooltip-glyph",left:Zn,top:xr,offsetLeft:0,offsetTop:0,detectBounds:!1,style:Im},_.createElement("svg",{overflow:"visible"},k(Kr({x:0,y:0},nn))))}),_.createElement(ne,Kr({left:je,top:We,style:Kr({},Pm,{background:(d=G==null?void 0:G.backgroundColor)!=null?d:"white",boxShadow:"0 1px 2px "+(G!=null&&(f=G.htmlLabel)!=null&&f.color?(G==null||(g=G.htmlLabel)==null?void 0:g.color)+"55":"#22222255")},G==null?void 0:G.htmlLabel)},U),Ye)))}cE.propTypes={renderTooltip:K.func.isRequired,renderGlyph:K.func,snapTooltipToDatumX:K.bool,snapTooltipToDatumY:K.bool,showVerticalCrosshair:K.bool,showHorizontalCrosshair:K.bool,showDatumGlyph:K.bool,showSeriesGlyphs:K.bool};function uE(e){var t=_.useContext($l);return t!=null&&t.tooltipOpen?_.createElement(cE,e):null}uE.propTypes={renderTooltip:K.func.isRequired,renderGlyph:K.func,snapTooltipToDatumX:K.bool,snapTooltipToDatumY:K.bool,showVerticalCrosshair:K.bool,showHorizontalCrosshair:K.bool,showDatumGlyph:K.bool,showSeriesGlyphs:K.bool};var Fm={},aU=ku,oU=function(){return aU.Date.now()},sU=oU,lU=/\s/;function cU(e){for(var t=e.length;t--&&lU.test(e.charAt(t)););return t}var uU=cU,dU=uU,fU=/^\s+/;function hU(e){return e&&e.slice(0,dU(e)+1).replace(fU,"")}var pU=hU;function gU(e){return e!=null&&typeof e=="object"}var vU=gU,mU=tN,yU=vU,bU="[object Symbol]";function xU(e){return typeof e=="symbol"||yU(e)&&mU(e)==bU}var _U=xU,wU=pU,dE=Su,kU=_U,fE=NaN,SU=/^[-+]0x[0-9a-f]+$/i,NU=/^0b[01]+$/i,CU=/^0o[0-7]+$/i,EU=parseInt;function TU(e){if(typeof e=="number")return e;if(kU(e))return fE;if(dE(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=dE(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=wU(e);var n=NU.test(e);return n||CU.test(e)?EU(e.slice(2),n?2:8):SU.test(e)?fE:+e}var MU=TU,$U=Su,zm=sU,hE=MU,OU="Expected a function",PU=Math.max,AU=Math.min;function LU(e,t,n){var r,i,a,o,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(OU);t=hE(t)||0,$U(n)&&(u=!!n.leading,d="maxWait"in n,a=d?PU(hE(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f);function g(S){var N=r,C=i;return r=i=void 0,c=S,o=e.apply(C,N),o}function p(S){return c=S,s=setTimeout(b,t),u?g(S):o}function v(S){var N=S-l,C=S-c,E=t-N;return d?AU(E,a-C):E}function m(S){var N=S-l,C=S-c;return l===void 0||N>=t||N<0||d&&C>=a}function b(){var S=zm();if(m(S))return y(S);s=setTimeout(b,v(S))}function y(S){return s=void 0,f&&r?g(S):(r=i=void 0,o)}function x(){s!==void 0&&clearTimeout(s),c=0,r=l=i=s=void 0}function k(){return s===void 0?o:y(zm())}function w(){var S=zm(),N=m(S);if(r=arguments,i=this,l=S,N){if(s===void 0)return p(l);if(d)return clearTimeout(s),s=setTimeout(b,t),g(l)}return s===void 0&&(s=setTimeout(b,t)),o}return w.cancel=x,w.flush=k,w}var pE=LU;const gE=ps(pE);Fm.__esModule=!0,Fm.default=zU;var DU=IU(pE),Ol=_;function IU(e){return e&&e.__esModule?e:{default:e}}function Sd(){return Sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sd.apply(this,arguments)}var FU=[],vE={width:0,height:0,top:0,left:0};function zU(e){var t=e===void 0?{}:e,n=t.initialSize,r=n===void 0?vE:n,i=t.debounceTime,a=i===void 0?300:i,o=t.ignoreDimensions,s=o===void 0?FU:o,l=t.enableDebounceLeadingCall,c=l===void 0?!0:l,u=t.resizeObserverPolyfill,d=(0,Ol.useRef)(null),f=(0,Ol.useRef)(0),g=(0,Ol.useState)(Sd({},vE,r)),p=g[0],v=g[1],m=(0,Ol.useMemo)(function(){var b=Array.isArray(s)?s:[s];return(0,DU.default)(function(y){v(function(x){var k=Object.keys(x),w=k.filter(function(N){return x[N]!==y[N]}),S=w.every(function(N){return b.includes(N)});return S?x:y})},a,{leading:c})},[a,c,s]);return(0,Ol.useEffect)(function(){var b=u||window.ResizeObserver,y=new b(function(x){x.forEach(function(k){var w,S=(w=k==null?void 0:k.contentRect)!=null?w:{},N=S.left,C=S.top,E=S.width,T=S.height;f.current=window.requestAnimationFrame(function(){m({width:E,height:T,top:C,left:N})})})});return d.current&&y.observe(d.current),function(){window.cancelAnimationFrame(f.current),y.disconnect(),m.cancel()}},[m,u]),Sd({parentRef:d,resize:m},p)}var BU=bE,mE=Bm(li),jU=Bm(_),WU=Bm(Fm),UU=["className","children","debounceTime","ignoreDimensions","initialSize","parentSizeStyles","enableDebounceLeadingCall","resizeObserverPolyfill"],HU=["parentRef","resize"];function Bm(e){return e&&e.__esModule?e:{default:e}}function Nd(){return Nd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nd.apply(this,arguments)}function yE(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var qU={width:"100%",height:"100%"};function bE(e){var t=e.className,n=e.children,r=e.debounceTime,i=e.ignoreDimensions,a=e.initialSize,o=e.parentSizeStyles,s=o===void 0?qU:o,l=e.enableDebounceLeadingCall,c=l===void 0?!0:l,u=e.resizeObserverPolyfill,d=yE(e,UU),f=(0,WU.default)({initialSize:a,debounceTime:r,ignoreDimensions:i,enableDebounceLeadingCall:c,resizeObserverPolyfill:u}),g=f.parentRef,p=f.resize,v=yE(f,HU);return jU.default.createElement("div",Nd({style:s,ref:g,className:t},d),n(Nd({},v,{ref:g.current,resize:p})))}bE.propTypes={className:mE.default.string,children:mE.default.func.isRequired};var xE=_.createContext(null);function Si(e,t,n){var r=_.useContext(xE),i=_.useRef();i.current=n;var a=_.useCallback(function(o,s,l){r&&r.emit(o,{event:s,svgPoint:fN(s),source:l})},[r]);return _.useEffect(function(){if(r&&e&&t){var o=function(l){var c;(!i.current||l!=null&&l.source&&(c=i.current)!=null&&c.includes(l.source))&&t(l)};return r.on(e,o),function(){return r==null?void 0:r.off(e,o)}}},[r,e,t]),r?a:null}function KU(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}function VU(e){var t=e.children,n=_.useMemo(function(){return KU()},[]);return _.createElement(xE.Provider,{value:n},t)}function jm(){return jm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jm.apply(this,arguments)}function _E(e){var t=e.hideTooltipDebounceMs,n=t===void 0?400:t,r=e.children,i=W8(void 0),a=i.tooltipOpen,o=i.tooltipLeft,s=i.tooltipTop,l=i.tooltipData,c=i.updateTooltip,u=i.hideTooltip,d=_.useRef(null);function f(){d.current&&(d.current.cancel(),d.current=null)}_.useEffect(function(){return f},[]);var g=_.useRef(function(m){var b=m.svgPoint,y=m.index,x=m.key,k=m.datum,w=m.distanceX,S=m.distanceY;f();var N=Jt(w)?w:1/0,C=Jt(S)?S:1/0,E=Math.sqrt(Math.pow(N,2)+Math.pow(C,2));c(function(T){var O,P,M,$=T.tooltipData,L=$!=null&&$.nearestDatum&&Jt($.nearestDatum.distance)?$.nearestDatum.distance:1/0;return{tooltipOpen:!0,tooltipLeft:b==null?void 0:b.x,tooltipTop:b==null?void 0:b.y,tooltipData:{nearestDatum:((O=$==null||(P=$.nearestDatum)==null?void 0:P.key)!=null?O:"")!==x&&L<E?$==null?void 0:$.nearestDatum:{key:x,index:y,datum:k,distance:E},datumByKey:jm({},$==null?void 0:$.datumByKey,(M={},M[x]={datum:k,index:y,key:x},M))}}})}),p=_.useCallback(function(){d.current=gE(u,n),d.current()},[u,n]),v=_.useMemo(function(){return{tooltipOpen:a,tooltipLeft:o,tooltipTop:s,tooltipData:l,updateTooltip:c,showTooltip:g.current,hideTooltip:p}},[p,l,o,a,s,c]);return _.createElement($l.Provider,{value:v},r)}_E.propTypes={hideTooltipDebounceMs:K.number,children:K.node.isRequired};const YU=Bn(JD);var Pl={},Wm={};Wm.__esModule=!0,Wm.default=GU;function GU(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}var Um={};Um.__esModule=!0,Um.default=XU;function XU(e,t){t.range&&("padding"in e,e.range(t.range))}var Hm={};Hm.__esModule=!0,Hm.default=ZU;function ZU(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}var qm={};qm.__esModule=!0,qm.default=JU;function JU(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}var Km={};Km.__esModule=!0,Km.default=QU;function QU(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}var Vm={};Vm.__esModule=!0,Vm.default=RU;function RU(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}var Ym={};Ym.__esModule=!0,Ym.default=e9;function e9(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}var Gm={},Xm={};const wE=Bn(aI);Xm.__esModule=!0,Xm.default=t9;var Ni=wE,kE={lab:Ni.interpolateLab,hcl:Ni.interpolateHcl,"hcl-long":Ni.interpolateHclLong,hsl:Ni.interpolateHsl,"hsl-long":Ni.interpolateHslLong,cubehelix:Ni.interpolateCubehelix,"cubehelix-long":Ni.interpolateCubehelixLong,rgb:Ni.interpolateRgb};function t9(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return kE[e]}var t=e.type,n=e.gamma,r=kE[t];return typeof n>"u"?r:r.gamma(n)}Gm.__esModule=!0,Gm.default=i9;var n9=r9(Xm);function r9(e){return e&&e.__esModule?e:{default:e}}function i9(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=(0,n9.default)(t.interpolate);e.interpolate(n)}}var Zm={};const a9=Bn(lI);var Jm={};Jm.__esModule=!0,Jm.default=l9;var o9=new Date(Date.UTC(2020,1,2,3,4,5)),s9="%Y-%m-%d %H:%M";function l9(e){var t=e.tickFormat(1,s9)(o9);return t==="2020-02-02 03:04"}Zm.__esModule=!0,Zm.default=d9;var en=a9,c9=u9(Jm);function u9(e){return e&&e.__esModule?e:{default:e}}var SE={day:en.timeDay,hour:en.timeHour,minute:en.timeMinute,month:en.timeMonth,second:en.timeSecond,week:en.timeWeek,year:en.timeYear},NE={day:en.utcDay,hour:en.utcHour,minute:en.utcMinute,month:en.utcMonth,second:en.utcSecond,week:en.utcWeek,year:en.utcYear};function d9(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,i=(0,c9.default)(r);if(typeof n=="string")r.nice(i?NE[n]:SE[n]);else{var a=n.interval,o=n.step,s=(i?NE[a]:SE[a]).every(o);s!=null&&r.nice(s)}}}}var Qm={};Qm.__esModule=!0,Qm.default=f9;function f9(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}var Rm={};Rm.__esModule=!0,Rm.default=h9;function h9(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}var ey={};ey.__esModule=!0,ey.default=g9;var p9=wE;function g9(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(p9.interpolateRound))}var ty={};ty.__esModule=!0,ty.default=v9;function v9(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}var ny={};ny.__esModule=!0,ny.default=m9;function m9(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],i=n[1],a=i<r,o=a?[i,r]:[r,i],s=o[0],l=o[1],c=[Math.min(0,s),Math.max(0,l)];e.domain(a?c.reverse():c)}}Pl.__esModule=!0,Pl.ALL_OPERATORS=void 0,Pl.default=A9;var y9=tn(Wm),b9=tn(Um),x9=tn(Hm),_9=tn(qm),w9=tn(Km),k9=tn(Vm),S9=tn(Ym),N9=tn(Gm),C9=tn(Zm),E9=tn(Qm),T9=tn(Rm),M9=tn(ey),$9=tn(ty),O9=tn(ny);function tn(e){return e&&e.__esModule?e:{default:e}}var CE=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"];Pl.ALL_OPERATORS=CE;var P9={domain:y9.default,nice:C9.default,zero:O9.default,interpolate:N9.default,round:M9.default,align:x9.default,base:_9.default,clamp:w9.default,constant:k9.default,exponent:S9.default,padding:E9.default,range:b9.default,reverse:T9.default,unknown:$9.default};function A9(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),i=CE.filter(function(a){return r.has(a)});return function(o,s){return typeof s<"u"&&i.forEach(function(l){P9[l](o,s)}),o}}var L9=B9,D9=YU,I9=F9(Pl);function F9(e){return e&&e.__esModule?e:{default:e}}var z9=(0,I9.default)("domain","range","reverse","unknown");function B9(e){return z9((0,D9.scaleOrdinal)(),e)}var Ci={red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"]},Al=Ci.gray,ry=Al[7],j9=[Ci.cyan[9],Ci.cyan[3],Ci.yellow[5],Ci.red[4],Ci.grape[8],Ci.grape[5],Ci.pink[9]];function Xe(){return Xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xe.apply(this,arguments)}var iy={fontFamily:"-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif",fontWeight:700,fontSize:12,textAnchor:"middle",pointerEvents:"none",letterSpacing:.4};function W9(e){var t,n,r,i,a,o,s=Xe({},iy,{fill:ry,stroke:"none"},e.svgLabelBig),l=Xe({},iy,{fontWeight:200,fontSize:11,fill:ry,stroke:"none"},e.svgLabelSmall),c=Xe({color:(t=(n=(r=(i=e.htmlLabel)==null?void 0:i.color)!=null?r:(a=e.svgLabelBig)==null?void 0:a.fill)!=null?n:(o=e.svgLabelSmall)==null?void 0:o.fill)!=null?t:ry},iy,e.htmlLabel);return{backgroundColor:e.backgroundColor,colors:[].concat(e.colors),htmlLabel:Xe({},c),svgLabelSmall:Xe({},l),svgLabelBig:Xe({},s),gridStyles:Xe({stroke:e.gridColor,strokeWidth:1},e.gridStyles),axisStyles:{x:{top:{axisLabel:Xe({},s,{dy:"-0.25em"}),axisLine:Xe({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:Xe({},l,{dy:"-0.25em"}),tickLength:e.tickLength,tickLine:Xe({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)},bottom:{axisLabel:Xe({},s,{dy:"-0.25em"}),axisLine:Xe({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:Xe({},l,{dy:"0.125em"}),tickLength:e.tickLength,tickLine:Xe({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)}},y:{left:{axisLabel:Xe({},s,{dx:"-1.25em"}),axisLine:Xe({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:Xe({},l,{textAnchor:"end",dx:"-0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:Xe({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)},right:{axisLabel:Xe({},s,{dx:"1.25em"}),axisLine:Xe({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:Xe({},l,{textAnchor:"start",dx:"0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:Xe({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)}}}}}const U9=W9({backgroundColor:"#fff",colors:j9,tickLength:4,svgLabelSmall:{fill:Al[7]},svgLabelBig:{fill:Al[9]},gridColor:Al[5],gridColorDark:Al[9]});var H9=_.createContext(U9),q9=function(){function e(){this.registry={},this.registryKeys=[]}var t=e.prototype;return t.registerData=function(r){var i=this,a=Array.isArray(r)?r:[r];a.forEach(function(o){o.key in i.registry&&i.registry[o.key]!=null&&console.debug("Overriding data registry key",o.key),i.registry[o.key]=o,i.registryKeys=Object.keys(i.registry)})},t.unregisterData=function(r){var i=this,a=Array.isArray(r)?r:[r];a.forEach(function(o){delete i.registry[o],i.registryKeys=Object.keys(i.registry)})},t.entries=function(){return Object.values(this.registry)},t.get=function(r){return this.registry[r]},t.keys=function(){return this.registryKeys},e}();function K9(){var e=_.useState(Math.random()),t=e[1],n=_.useMemo(function(){return new q9},[]);return _.useMemo(function(){return{registerData:function(){n.registerData.apply(n,arguments),t(Math.random())},unregisterData:function(){n.unregisterData.apply(n,arguments),t(Math.random())},entries:function(){return n.entries()},get:function(i){return n.get(i)},keys:function(){return n.keys()}}},[n])}var ay={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};function V9(e){var t=_.useState({width:(e==null?void 0:e.width)==null?ay.width:e.width,height:(e==null?void 0:e.height)==null?ay.height:e.height,margin:(e==null?void 0:e.margin)==null?ay.margin:e.margin}),n=t[0],r=t[1],i=_.useCallback(function(a){(a.width!==n.width||a.height!==n.height||a.margin.left!==n.margin.left||a.margin.right!==n.margin.right||a.margin.top!==n.margin.top||a.margin.bottom!==n.margin.bottom)&&r(a)},[n.width,n.height,n.margin.left,n.margin.right,n.margin.bottom,n.margin.top]);return[n,i]}function oy(e){return(e==null?void 0:e.type)==="band"||(e==null?void 0:e.type)==="ordinal"||(e==null?void 0:e.type)==="point"}function $o(){return $o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$o.apply(this,arguments)}function Y9(e){var t=e.dataRegistry,n=e.xRange,r=e.xScaleConfig,i=e.yRange,a=e.yScaleConfig,o=t.keys(),s=n[0],l=n[1],c=i[0],u=i[1],d=_.useMemo(function(){var g=o.map(function(b){return t.get(b)}),p=g.reduce(function(b,y){return y?b.concat(y.data.map(function(x){return y.xAccessor(x)})):b},[]);if(p.length!==0){var v=oy(r)?p:J1(p),m=Ip(r)?Bs($o({range:[s,l],domain:v,zero:!0},r)):Bs($o({range:[s,l],domain:v},r));return g.forEach(function(b){b!=null&&b.xScale&&(m=b.xScale(m))}),m}},[t,r,o,s,l]),f=_.useMemo(function(){var g=o.map(function(b){return t.get(b)}),p=g.reduce(function(b,y){return y?b.concat(y.data.map(function(x){return y.yAccessor(x)})):b},[]);if(p.length!==0){var v=oy(a)?p:J1(p),m=Ip(a)?Bs($o({range:[c,u],domain:v,zero:!0},a)):Bs($o({range:[c,u],domain:v},a));return g.forEach(function(b){b!=null&&b.yScale&&(m=b.yScale(m))}),m}},[t,a,o,c,u]);return{xScale:d,yScale:f}}function EE(e){var t=e.initialDimensions,n=e.theme,r=e.xScale,i=e.yScale,a=e.children,o=e.horizontal,s=o===void 0?"auto":o,l=e.resizeObserverPolyfill,c=_.useContext(H9),u=n||c,d=V9(t),f=d[0],g=f.width,p=f.height,v=f.margin,m=d[1],b=Math.max(0,g-v.left-v.right),y=Math.max(0,p-v.top-v.bottom),x=K9(),k=Y9({dataRegistry:x,xScaleConfig:r,yScaleConfig:i,xRange:[v.left,Math.max(0,g-v.right)],yRange:[Math.max(0,p-v.bottom),v.top]}),w=k.xScale,S=k.yScale,N=x.keys(),C=_.useMemo(function(){return L9({domain:N,range:u.colors})},[N,u.colors]),E=s==="auto"?oy(i)||i.type==="time"||i.type==="utc":s,T=_.useMemo(function(){return{dataRegistry:x,registerData:x.registerData,unregisterData:x.unregisterData,xScale:w,yScale:S,colorScale:C,theme:u,width:g,height:p,margin:v,innerWidth:b,innerHeight:y,setDimensions:m,horizontal:E,resizeObserverPolyfill:l}},[C,x,p,E,y,b,v,m,u,g,w,S,l]);return _.createElement(vr.Provider,{value:T},a)}EE.propTypes={children:K.node.isRequired,horizontal:K.oneOfType([K.bool,K.oneOf(["auto"])])};function TE(e){var t=e.source,n=e.onPointerOut,r=n===void 0?!0:n,i=e.onPointerMove,a=i===void 0?!0:i,o=e.onPointerUp,s=o===void 0?!0:o,l=e.onPointerDown,c=l===void 0?!0:l,u=e.onFocus,d=u===void 0?!1:u,f=e.onBlur,g=f===void 0?!1:f,p=Si(),v=_.useCallback(function(w){return p==null?void 0:p("pointermove",w,t)},[p,t]),m=_.useCallback(function(w){return p==null?void 0:p("pointerout",w,t)},[p,t]),b=_.useCallback(function(w){return p==null?void 0:p("pointerup",w,t)},[p,t]),y=_.useCallback(function(w){return p==null?void 0:p("pointerdown",w,t)},[p,t]),x=_.useCallback(function(w){return p==null?void 0:p("focus",w,t)},[p,t]),k=_.useCallback(function(w){return p==null?void 0:p("blur",w,t)},[p,t]);return{onPointerMove:a?v:void 0,onFocus:d?x:void 0,onBlur:g?k:void 0,onPointerOut:r?m:void 0,onPointerUp:s?b:void 0,onPointerDown:c?y:void 0}}var G9="GLYPHSERIES_EVENT_SOURCE",X9="LINESERIES_EVENT_SOURCE",Cd="XYCHART_EVENT_SOURCE";function ME(e){return!!e&&("clientX"in e||"changedTouches"in e)}function Z9(e){return!!e&&!ME(e)}function $E(e){var t=e.scale,n=e.accessor,r=e.scaledValue,i=e.data,a=t,o,s;if("invert"in a&&typeof a.invert=="function"){var l=zc(n).left,c=Number(a.invert(r)),u=l(i,c),d=i[u-1],f=i[u];o=!d||Math.abs(c-n(d))>Math.abs(c-n(f))?f:d,s=o===d?u-1:u}else if("step"in a&&typeof a.step<"u"){var g=t.domain(),p=t.range().map(Number),v=[].concat(p).sort(function(S,N){return S-N}),m=a_(v[0],v[1],a.step()),b=vA(m,r),y=p[0]<p[1]?g:g.reverse(),x=y[b-1],k=i.findIndex(function(S){return String(n(S))===String(x)});o=i[k],s=k}else return console.warn("[visx/xychart/findNearestDatum] encountered incompatible scale type, bailing"),null;if(o==null||s==null)return null;var w=Math.abs(Number(a(n(o)))-r);return{datum:o,index:s,distance:w}}function J9(e){var t=e.xScale,n=e.xAccessor,r=e.yScale,i=e.yAccessor,a=e.point,o=e.data;if(!a)return null;var s=$E({scale:t,accessor:n,scaledValue:a.x,data:o});return s?{datum:s.datum,index:s.index,distanceX:s.distance,distanceY:Math.abs(Number(r(i(s.datum)))-a.y)}:null}function Q9(e){var t=e.yScale,n=e.yAccessor,r=e.xScale,i=e.xAccessor,a=e.point,o=e.data;if(!a)return null;var s=$E({scale:t,accessor:n,scaledValue:a.y,data:o});return s?{datum:s.datum,index:s.index,distanceY:s.distance,distanceX:Math.abs(Number(r(i(s.datum)))-a.x)}:null}function sy(){return sy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sy.apply(this,arguments)}var ly="__POINTER_EVENTS_ALL",Ed="__POINTER_EVENTS_NEAREST";function OE(e){var t=e.dataKey,n=e.findNearestDatum,r=e.onBlur,i=e.onFocus,a=e.onPointerMove,o=e.onPointerOut,s=e.onPointerUp,l=e.onPointerDown,c=e.allowedSources,u=_.useContext(vr),d=u.width,f=u.height,g=u.horizontal,p=u.dataRegistry,v=u.xScale,m=u.yScale,b=n||(g?Q9:J9),y=_.useCallback(function(E){var T=E||{},O=T.svgPoint,P=T.event,M={},$=null,L=1/0;if(E&&P&&O&&d&&f&&v&&m){var z,j=t===Ed||t===ly,B=j?(z=p==null?void 0:p.keys())!=null?z:[]:Array.isArray(t)?t:[t];B.forEach(function(F){var D=p==null?void 0:p.get(F);if(D){var U=b({dataKey:F,data:D.data,height:f,point:O,width:d,xAccessor:D.xAccessor,xScale:v,yAccessor:D.yAccessor,yScale:m});if(U&&(M[F]=sy({key:F,svgPoint:O,event:P},U),t===Ed)){var V,Y,G=Math.sqrt(((V=U.distanceX)!=null?V:Math.pow(1/0,2))+((Y=U.distanceY)!=null?Y:Math.pow(1/0,2)));$=G<L?M[F]:$,L=Math.min(L,G)}}});var H=t===Ed?[$]:t===ly||Array.isArray(t)?Object.values(M):[M[t]];return H.filter(function(F){return F})}return[]},[t,p,v,m,d,f,b]),x=_.useCallback(function(E){a&&y(E).forEach(function(T){return a(T)})},[y,a]),k=_.useCallback(function(E){s&&y(E).forEach(function(T){return s(T)})},[y,s]),w=_.useCallback(function(E){l&&y(E).forEach(function(T){return l(T)})},[y,l]),S=_.useCallback(function(E){i&&y(E).forEach(function(T){return i(T)})},[y,i]),N=_.useCallback(function(E){var T=E==null?void 0:E.event;T&&ME(T)&&o&&o(T)},[o]),C=_.useCallback(function(E){var T=E==null?void 0:E.event;T&&Z9(T)&&r&&r(T)},[r]);Si("pointermove",a?x:void 0,c),Si("pointerout",o?N:void 0,c),Si("pointerup",s?k:void 0,c),Si("pointerdown",l?w:void 0,c),Si("focus",i?S:void 0,c),Si("blur",r?C:void 0,c)}function Td(){return Td=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Td.apply(this,arguments)}var R9={top:50,right:50,bottom:50,left:50},e7=[Cd];function Oo(e){var t=e.accessibilityLabel,n=t===void 0?"XYChart":t,r=e.captureEvents,i=r===void 0?!0:r,a=e.children,o=e.height,s=e.horizontal,l=e.margin,c=l===void 0?R9:l,u=e.onPointerMove,d=e.onPointerOut,f=e.onPointerUp,g=e.onPointerDown,p=e.pointerEventsDataKey,v=p===void 0?"nearest":p,m=e.theme,b=e.width,y=e.xScale,x=e.yScale,k=e.resizeObserverPolyfill,w=_.useContext(vr),S=w.setDimensions,N=w.resizeObserverPolyfill,C=_.useContext($l),E=Si();_.useEffect(function(){S&&b!=null&&o!=null&&b>0&&o>0&&S({width:b,height:o,margin:c})},[S,b,o,c]);var T=TE({source:Cd});return OE({dataKey:v==="nearest"?Ed:ly,onPointerMove:u,onPointerOut:d,onPointerUp:f,onPointerDown:g,allowedSources:e7}),S?b==null||o==null?_.createElement(BU,{resizeObserverPolyfill:N},function(O){return _.createElement(Oo,Td({},e,{width:e.width==null?O.width:e.width,height:e.height==null?O.height:e.height}))}):C==null?_.createElement(_E,null,_.createElement(Oo,e)):E==null?_.createElement(VU,null,_.createElement(Oo,e)):b<=0||o<=0?(process.env.NODE_ENV==="development"&&console.info("XYChart has a zero width or height, bailing",{width:b,height:o}),null):_.createElement("svg",{width:b,height:o,"aria-label":n},a,i&&_.createElement("rect",Td({x:c.left,y:c.top,width:b-c.left-c.right,height:o-c.top-c.bottom,fill:"transparent"},T))):!y||!x?(console.warn("[@visx/xychart] XYChart: When no DataProvider is available in context, you must pass xScale & yScale config to XYChart."),null):_.createElement(EE,{xScale:y,yScale:x,theme:m,initialDimensions:{width:b,height:o,margin:c},horizontal:s,resizeObserverPolyfill:k},_.createElement(Oo,e))}Oo.propTypes={accessibilityLabel:K.string,captureEvents:K.bool,width:K.number,height:K.number,children:K.node.isRequired,horizontal:K.oneOfType([K.bool,K.oneOf(["auto"])]),onPointerMove:K.func,onPointerOut:K.func,onPointerUp:K.func,onPointerDown:K.func,pointerEventsDataKey:K.oneOf(["all","nearest"])};var Ei={};const cy=Bn(CF);var uy={};uy.__esModule=!0,uy.default=t7;function t7(e,t){e(t)}var xa={};xa.__esModule=!0,xa.STACK_ORDER_NAMES=xa.STACK_ORDERS=void 0,xa.default=r7;var Ll=cy,Md={ascending:Ll.stackOrderAscending,descending:Ll.stackOrderDescending,insideout:Ll.stackOrderInsideOut,none:Ll.stackOrderNone,reverse:Ll.stackOrderReverse};xa.STACK_ORDERS=Md;var n7=Object.keys(Md);xa.STACK_ORDER_NAMES=n7;function r7(e){return e&&Md[e]||Md.none}var _a={};_a.__esModule=!0,_a.STACK_OFFSET_NAMES=_a.STACK_OFFSETS=void 0,_a.default=a7;var Dl=cy,$d={expand:Dl.stackOffsetExpand,diverging:Dl.stackOffsetDiverging,none:Dl.stackOffsetNone,silhouette:Dl.stackOffsetSilhouette,wiggle:Dl.stackOffsetWiggle};_a.STACK_OFFSETS=$d;var i7=Object.keys($d);_a.STACK_OFFSET_NAMES=i7;function a7(e){return e&&$d[e]||$d.none}Ei.__esModule=!0,Ei.arc=l7,Ei.area=c7,Ei.line=u7,Ei.pie=d7,Ei.radialLine=f7,Ei.stack=h7;var Po=cy,tt=dy(uy),o7=dy(xa),s7=dy(_a);function dy(e){return e&&e.__esModule?e:{default:e}}function l7(e){var t=e===void 0?{}:e,n=t.innerRadius,r=t.outerRadius,i=t.cornerRadius,a=t.startAngle,o=t.endAngle,s=t.padAngle,l=t.padRadius,c=(0,Po.arc)();return n!=null&&(0,tt.default)(c.innerRadius,n),r!=null&&(0,tt.default)(c.outerRadius,r),i!=null&&(0,tt.default)(c.cornerRadius,i),a!=null&&(0,tt.default)(c.startAngle,a),o!=null&&(0,tt.default)(c.endAngle,o),s!=null&&(0,tt.default)(c.padAngle,s),l!=null&&(0,tt.default)(c.padRadius,l),c}function c7(e){var t=e===void 0?{}:e,n=t.x,r=t.x0,i=t.x1,a=t.y,o=t.y0,s=t.y1,l=t.defined,c=t.curve,u=(0,Po.area)();return n&&(0,tt.default)(u.x,n),r&&(0,tt.default)(u.x0,r),i&&(0,tt.default)(u.x1,i),a&&(0,tt.default)(u.y,a),o&&(0,tt.default)(u.y0,o),s&&(0,tt.default)(u.y1,s),l&&u.defined(l),c&&u.curve(c),u}function u7(e){var t=e===void 0?{}:e,n=t.x,r=t.y,i=t.defined,a=t.curve,o=(0,Po.line)();return n&&(0,tt.default)(o.x,n),r&&(0,tt.default)(o.y,r),i&&o.defined(i),a&&o.curve(a),o}function d7(e){var t=e===void 0?{}:e,n=t.startAngle,r=t.endAngle,i=t.padAngle,a=t.value,o=t.sort,s=t.sortValues,l=(0,Po.pie)();return(o===null||o!=null)&&l.sort(o),(s===null||s!=null)&&l.sortValues(s),a!=null&&l.value(a),i!=null&&(0,tt.default)(l.padAngle,i),n!=null&&(0,tt.default)(l.startAngle,n),r!=null&&(0,tt.default)(l.endAngle,r),l}function f7(e){var t=e===void 0?{}:e,n=t.angle,r=t.radius,i=t.defined,a=t.curve,o=(0,Po.radialLine)();return n&&(0,tt.default)(o.angle,n),r&&(0,tt.default)(o.radius,r),i&&o.defined(i),a&&o.curve(a),o}function h7(e){var t=e.keys,n=e.value,r=e.order,i=e.offset,a=(0,Po.stack)();return t&&a.keys(t),n&&(0,tt.default)(a.value,n),r&&a.order((0,o7.default)(r)),i&&a.offset((0,s7.default)(i)),a}var p7=b7,fy=PE(_),g7=PE(Fr),v7=Ei,m7=["children","data","x","y","fill","className","curve","innerRef","defined"];function PE(e){return e&&e.__esModule?e:{default:e}}function hy(){return hy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hy.apply(this,arguments)}function y7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function b7(e){var t=e.children,n=e.data,r=n===void 0?[]:n,i=e.x,a=e.y,o=e.fill,s=o===void 0?"transparent":o,l=e.className,c=e.curve,u=e.innerRef,d=e.defined,f=d===void 0?function(){return!0}:d,g=y7(e,m7),p=(0,v7.line)({x:i,y:a,defined:f,curve:c});return t?fy.default.createElement(fy.default.Fragment,null,t({path:p})):fy.default.createElement("path",hy({ref:u,className:(0,g7.default)("visx-linepath",l),d:p(r)||"",fill:s,strokeLinecap:"round"},g))}function py(){return py=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},py.apply(this,arguments)}function x7(e){function t(n){var r=n.dataKey,i=n.data,a=n.xAccessor,o=n.yAccessor,s=_.useContext(vr),l=s.xScale,c=s.yScale,u=s.dataRegistry;_.useEffect(function(){return u&&u.registerData({key:r,data:i,xAccessor:a,yAccessor:o}),function(){return u==null?void 0:u.unregisterData(r)}},[u,r,i,a,o]);var d=u==null?void 0:u.get(r);if(!l||!c||!d)return null;var f=e;return _.createElement(f,py({},n,{xScale:l,yScale:c,data:d.data,xAccessor:d.xAccessor,yAccessor:d.yAccessor}))}return t}function Od(e,t,n){return n===void 0&&(n="center"),function(r){var i=e(t(r));if(Jt(i)){var a=(n==="start"?0:bv(e))/(n==="center"?2:1);return i+a}return NaN}}function AE(e){var t,n=e.dataKey,r=e.enableEvents,i=e.findNearestDatum,a=e.onBlur,o=e.onFocus,s=e.onPointerMove,l=e.onPointerOut,c=e.onPointerUp,u=e.onPointerDown,d=e.source,f=e.allowedSources,g=(t=_.useContext($l))!=null?t:{},p=g.showTooltip,v=g.hideTooltip,m=_.useCallback(function(w){p(w),s&&s(w)},[p,s]),b=_.useCallback(function(w){p(w),o&&o(w)},[p,o]),y=_.useCallback(function(w){v(),w&&l&&l(w)},[v,l]),x=_.useCallback(function(w){v(),w&&a&&a(w)},[v,a]),k=_.useCallback(function(w){p(w),u&&u(w)},[p,u]);return OE({dataKey:n,findNearestDatum:i,onBlur:r?x:void 0,onFocus:r?b:void 0,onPointerMove:r?m:void 0,onPointerOut:r?y:void 0,onPointerUp:r?c:void 0,onPointerDown:r?k:void 0,allowedSources:f}),TE({source:d,onBlur:!!a&&r,onFocus:!!o&&r,onPointerMove:!!s&&r,onPointerOut:!!l&&r,onPointerUp:!!c&&r,onPointerDown:!!u&&r})}function gy(){return gy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gy.apply(this,arguments)}function LE(e){var t,n,r,i=e.colorAccessor,a=e.data,o=e.dataKey,s=e.onBlur,l=e.onFocus,c=e.onPointerMove,u=e.onPointerOut,d=e.onPointerUp,f=e.onPointerDown,g=e.enableEvents,p=g===void 0?!0:g,v=e.renderGlyphs,m=e.size,b=m===void 0?8:m,y=e.xAccessor,x=e.xScale,k=e.yAccessor,w=e.yScale,S=_.useContext(vr),N=S.colorScale,C=S.theme,E=S.horizontal,T=_.useMemo(function(){return Od(x,y)},[x,y]),O=_.useMemo(function(){return Od(w,k)},[w,k]),P=(t=(n=N==null?void 0:N(o))!=null?n:C==null||(r=C.colors)==null?void 0:r[0])!=null?t:"#222",M=G9+"-"+o,$=AE({dataKey:o,enableEvents:p,onBlur:s,onFocus:l,onPointerMove:c,onPointerOut:u,onPointerUp:d,onPointerDown:f,source:M,allowedSources:[Cd,M]}),L=_.useMemo(function(){return a.map(function(z,j){var B,H=T(z);if(!Jt(H))return null;var F=O(z);return Jt(F)?{key:""+j,x:H,y:F,color:(B=i==null?void 0:i(z,j))!=null?B:P,size:typeof b=="function"?b(z):b,datum:z}:null}).filter(function(z){return z})},[P,i,a,T,O,b]);return _.createElement(_.Fragment,null,v(gy({glyphs:L,xScale:x,yScale:w,horizontal:E},$)))}LE.propTypes={colorAccessor:K.func,size:K.oneOfType([K.number,K.func]),renderGlyphs:K.func.isRequired};function _7(e){var t=e.key,n=e.color,r=e.x,i=e.y,a=e.size,o=e.onBlur,s=e.onFocus,l=e.onPointerMove,c=e.onPointerOut,u=e.onPointerUp;return _.createElement("circle",{className:"visx-circle-glyph",key:t,tabIndex:o||s?0:void 0,fill:n,r:a/2,cx:r,cy:i,onBlur:o,onFocus:s,onPointerMove:l,onPointerOut:c,onPointerUp:u})}var w7=["colorAccessor","curve","data","dataKey","onBlur","onFocus","onPointerMove","onPointerOut","onPointerUp","onPointerDown","enableEvents","xAccessor","xScale","yAccessor","yScale","PathComponent"];function Il(){return Il=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Il.apply(this,arguments)}function k7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function DE(e){var t,n,r,i=e.colorAccessor,a=e.curve,o=e.data,s=e.dataKey,l=e.onBlur,c=e.onFocus,u=e.onPointerMove,d=e.onPointerOut,f=e.onPointerUp,g=e.onPointerDown,p=e.enableEvents,v=p===void 0?!0:p,m=e.xAccessor,b=e.xScale,y=e.yAccessor,x=e.yScale,k=e.PathComponent,w=k===void 0?"path":k,S=k7(e,w7),N=_.useContext(vr),C=N.colorScale,E=N.theme,T=_.useMemo(function(){return Od(b,m)},[b,m]),O=_.useMemo(function(){return Od(x,y)},[x,y]),P=_.useCallback(function(B){return Jt(b(m(B)))&&Jt(x(y(B)))},[b,m,x,y]),M=(t=(n=C==null?void 0:C(s))!=null?n:E==null||(r=E.colors)==null?void 0:r[0])!=null?t:"#222",$=X9+"-"+s,L=AE({dataKey:s,enableEvents:v,onBlur:l,onFocus:c,onPointerMove:u,onPointerOut:d,onPointerUp:f,onPointerDown:g,source:$,allowedSources:[Cd,$]}),z=!!(c||l),j=_.useCallback(function(B){var H=B.glyphs;return z?H.map(function(F){return _.createElement(_.Fragment,{key:F.key},_7(Il({},F,{color:"transparent",onFocus:L.onFocus,onBlur:L.onBlur})))}):null},[z,L.onFocus,L.onBlur]);return _.createElement(_.Fragment,null,_.createElement(p7,Il({x:T,y:O,defined:P,curve:a},S),function(B){var H,F=B.path;return _.createElement(w,Il({stroke:(H=i==null?void 0:i(s))!=null?H:M,strokeWidth:2,fill:"transparent",strokeLinecap:"round"},S,{d:F(o)||""},L))}),z&&_.createElement(LE,{dataKey:s,data:o,xAccessor:m,yAccessor:y,xScale:b,yScale:x,renderGlyphs:j}))}DE.propTypes={colorAccessor:K.func};const S7=x7(DE);function N7(e,t){const n=[],r=[];function i(a,o){if(a.length===1)n.push(a[0]),r.push(a[0]);else{const s=Array(a.length-1);for(let l=0;l<s.length;l++)l===0&&n.push(a[0]),l===s.length-1&&r.push(a[l+1]),s[l]=[(1-o)*a[l][0]+o*a[l+1][0],(1-o)*a[l][1]+o*a[l+1][1]];i(s,o)}}return e.length&&i(e,t),{left:n,right:r.reverse()}}function C7(e){const t={};return e.length===4&&(t.x2=e[2][0],t.y2=e[2][1]),e.length>=3&&(t.x1=e[1][0],t.y1=e[1][1]),t.x=e[e.length-1][0],t.y=e[e.length-1][1],e.length===4?t.type="C":e.length===3?t.type="Q":t.type="L",t}function E7(e,t){t=t||2;const n=[];let r=e;const i=1/t;for(let a=0;a<t-1;a++){const o=i/(1-i*a),s=N7(r,o);n.push(s.left),r=s.right}return n.push(r),n}function T7(e,t,n){const r=[[e.x,e.y]];return t.x1!=null&&r.push([t.x1,t.y1]),t.x2!=null&&r.push([t.x2,t.y2]),r.push([t.x,t.y]),E7(r,n).map(C7)}const M7=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,Ao={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};Object.keys(Ao).forEach(e=>{Ao[e.toLowerCase()]=Ao[e]});function vy(e,t){const n=Array(e);for(let r=0;r<e;r++)n[r]=t;return n}function $7(e){return`${e.type}${Ao[e.type].map(t=>e[t]).join(",")}`}function O7(e,t){const n={x1:"x",y1:"y",x2:"x",y2:"y"},r=["xAxisRotation","largeArcFlag","sweepFlag"];if(e.type!==t.type&&t.type.toUpperCase()!=="M"){const i={};Object.keys(t).forEach(a=>{const o=t[a];let s=e[a];s===void 0&&(r.includes(a)?s=o:(s===void 0&&n[a]&&(s=e[n[a]]),s===void 0&&(s=0))),i[a]=s}),i.type=t.type,e=i}return e}function P7(e,t,n){let r=[];if(t.type==="L"||t.type==="Q"||t.type==="C")r=r.concat(T7(e,t,n));else{const i=Object.assign({},e);i.type==="M"&&(i.type="L"),r=r.concat(vy(n-1).map(()=>i)),r.push(t)}return r}function IE(e,t,n){const r=e.length-1,i=t.length-1,a=r/i,s=vy(i).reduce((l,c,u)=>{let d=Math.floor(a*u);return l[d]=(l[d]||0)+1,l},[]).reduce((l,c,u)=>{if(u===e.length-1){const d=vy(c,Object.assign({},e[e.length-1]));return d[0].type==="M"&&d.forEach(f=>{f.type="L"}),l.concat(d)}return l.concat(P7(e[u],e[u+1],c))},[]);return s.unshift(e[0]),s}function FE(e){const t=(e||"").match(M7)||[],n=[];let r,i;for(let a=0;a<t.length;++a)if(r=Ao[t[a]],r){i={type:t[a]};for(let o=0;o<r.length;++o)i[r[o]]=+t[a+o+1];a+=r.length,n.push(i)}return n}function A7(e,t,n){let r=e==null?[]:e.slice(),i=t==null?[]:t.slice();if(!r.length&&!i.length)return function(){return[]};const a=(r.length===0||r[r.length-1].type==="Z")&&(i.length===0||i[i.length-1].type==="Z");r.length>0&&r[r.length-1].type==="Z"&&r.pop(),i.length>0&&i[i.length-1].type==="Z"&&i.pop(),r.length?i.length||i.push(r[0]):r.push(i[0]),Math.abs(i.length-r.length)!==0&&(i.length>r.length?r=IE(r,i):i.length<r.length&&(i=IE(i,r))),r=r.map((l,c)=>O7(l,i[c]));const s=r.map(l=>({...l}));return a&&s.push({type:"Z"}),function(c){if(c===1)return t??[];if(c>0)for(let u=0;u<s.length;++u){const d=r[u],f=i[u],g=s[u];for(const p of Ao[g.type])g[p]=(1-c)*d[p]+c*f[p],(p==="largeArcFlag"||p==="sweepFlag")&&(g[p]=Math.round(g[p]))}return s}}function L7(e,t,n){let r=FE(e),i=FE(t);if(!r.length&&!i.length)return function(){return""};const a=A7(r,i);return function(s){if(s===1)return t??"";const l=a(s);let c="";for(const u of l)c+=$7(u);return c}}var D7=["d","stroke","fill"];function my(){return my=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},my.apply(this,arguments)}function I7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function F7(e){var t=e.d,n=e.stroke,r=n===void 0?"transparent":n,i=e.fill,a=i===void 0?"transparent":i,o=I7(e,D7),s=_.useRef(t),l=_.useCallback(gE(function(g){s.current=g},50),[]),c=L7(s.current,t);l(t);var u=ba({from:{t:0},to:{t:1},reset:!0,delay:0}),d=u.t,f=ba({stroke:r,fill:a});return _.createElement(rm.path,my({className:"visx-path",d:d.to(c),stroke:f.stroke,fill:f.fill},o))}const z7=_.memo(F7);function yy(){return yy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yy.apply(this,arguments)}function B7(e){return _.createElement(S7,yy({},e,{PathComponent:z7}))}const zE=["var(--color-dataviz-1)","var(--color-dataviz-2)","var(--color-dataviz-3)","var(--color-dataviz-4)","var(--color-dataviz-5)","var(--color-dataviz-6)","var(--color-dataviz-7)","var(--color-dataviz-8)"],Lo="var(--color-dataviz-grid)",Be="var(--color-dataviz-axis)",fn="var(--color-dataviz-label)",St=640,ke={top:12,right:16,bottom:36,left:44};function br(e,t){return t||zE[e%zE.length]}function Kt(e,t){const n=e[t];return n==null?"":String(n)}function Nt(e,t){const n=e[t];if(typeof n=="number"&&Number.isFinite(n))return n;if(typeof n=="string"){const r=Number(n);return Number.isFinite(r)?r:0}return 0}function Vr({state:e,emptyMessage:t,errorMessage:n,loadingLabel:r}){return e==="loading"?h.jsx("div",{className:"dsn-chart-state",role:"status","aria-live":"polite",children:r}):e==="error"?h.jsx("div",{className:"dsn-chart-state",role:"alert",children:n}):h.jsx("div",{className:"dsn-chart-state",children:t})}function j7({data:e,xKey:t,series:n,height:r=240,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="Line chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-ke.top-ke.bottom,g=St-ke.left-ke.right,p=e.map(y=>Kt(y,t)),v=Math.max(1,...e.flatMap(y=>n.map(x=>Nt(y,x.key)))),m=Kn({domain:p,range:[0,g],padding:.28}),b=_n({domain:[0,v],range:[f,0],nice:!0});return h.jsx("div",{className:u,role:"img","aria-label":c,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(Vr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${St} ${r}`,"aria-hidden":"true",children:h.jsxs(Je,{left:ke.left,top:ke.top,children:[b.ticks(4).map(y=>{const x=b(y);return h.jsx("line",{x1:0,x2:g,y1:x,y2:x,stroke:Lo,strokeDasharray:"3 3"},`line-grid-${y}`)}),n.map((y,x)=>{const k=br(x,y.color),w=e.map(S=>({x:(m(Kt(S,t))??0)+m.bandwidth()/2,y:b(Nt(S,y.key))}));return h.jsxs("g",{children:[h.jsx(po,{data:w,x:S=>S.x,y:S=>S.y,stroke:k,strokeWidth:2}),w.map((S,N)=>h.jsx("circle",{cx:S.x,cy:S.y,r:3,fill:"var(--background-primary)",stroke:k,strokeWidth:1.5},`${y.key}-${N}`))]},y.key)}),h.jsx(va,{top:f,scale:m,stroke:Be,tickStroke:Be,tickLabelProps:()=>({fill:fn,fontSize:12,textAnchor:"middle",dy:"0.8em"})}),h.jsx(Gs,{scale:b,numTicks:4,stroke:Be,tickStroke:Be,tickLabelProps:()=>({fill:fn,fontSize:12,textAnchor:"end",dx:"-0.3em",dy:"0.25em"})})]})})})})}function W7({data:e,xKey:t,series:n,height:r=240,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="Bar chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-ke.top-ke.bottom,g=St-ke.left-ke.right,p=e.map(k=>Kt(k,t)),v=n.map(k=>k.key),m=Math.max(1,...e.flatMap(k=>n.map(w=>Nt(k,w.key)))),b=Kn({domain:p,range:[0,g],padding:.2}),y=Kn({domain:v,range:[0,b.bandwidth()],padding:.12}),x=_n({domain:[0,m],range:[f,0],nice:!0});return h.jsx("div",{className:u,role:"img","aria-label":c,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(Vr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${St} ${r}`,"aria-hidden":"true",children:h.jsxs(Je,{left:ke.left,top:ke.top,children:[x.ticks(4).map(k=>{const w=x(k);return h.jsx("line",{x1:0,x2:g,y1:w,y2:w,stroke:Lo,strokeDasharray:"3 3"},`bar-grid-${k}`)}),e.map(k=>{const w=Kt(k,t),S=b(w)??0;return n.map((N,C)=>{const E=Nt(k,N.key),T=S+(y(N.key)??0),O=x(E),P=y.bandwidth(),M=f-O;return h.jsx(vi,{x:T,y:O,width:P,height:Math.max(0,M),fill:br(C,N.color),rx:4},`${w}-${N.key}`)})}),h.jsx(va,{top:f,scale:b,stroke:Be,tickStroke:Be,tickLabelProps:()=>({fill:fn,fontSize:12,textAnchor:"middle",dy:"0.8em"})}),h.jsx(Gs,{scale:x,numTicks:4,stroke:Be,tickStroke:Be,tickLabelProps:()=>({fill:fn,fontSize:12,textAnchor:"end",dx:"-0.3em",dy:"0.25em"})})]})})})})}function U7({data:e,height:t=240,innerRadius:n=56,outerRadius:r=84,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="Donut chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0,f=Math.min(r,t/2-16,St/2-16),g=Math.min(n,f-8),p=Dp({domain:e.map(v=>v.id),range:e.map((v,m)=>br(m,v.color))});return h.jsxs("div",{className:u,role:"img","aria-label":c,children:[h.jsx("div",{className:"dsn-chart-surface",style:{height:`${t}px`},children:d?h.jsx(Vr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${St} ${t}`,"aria-hidden":"true",children:h.jsx(Je,{top:t/2,left:St/2,children:h.jsx(yS,{data:e,pieValue:v=>v.value,outerRadius:f,innerRadius:g,padAngle:.01,children:v=>v.arcs.map(m=>h.jsx("path",{d:v.path(m)??"",fill:p(m.data.id),stroke:"var(--background-primary)",strokeWidth:2},`donut-${m.data.id}`))})})})}),d?null:h.jsx("ul",{className:"dsn-chart-legend","aria-label":"Chart legend",children:e.map((v,m)=>h.jsxs("li",{className:"dsn-chart-legend-item",children:[h.jsx("span",{className:"dsn-chart-legend-swatch",style:{background:br(m,v.color)},"aria-hidden":"true"}),h.jsx("span",{className:"dsn-chart-legend-label",children:v.label})]},v.id))})]})}function H7({data:e,xKey:t,series:n,height:r=240,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="Area chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-ke.top-ke.bottom,g=St-ke.left-ke.right,p=e.map(y=>Kt(y,t)),v=Math.max(1,...e.flatMap(y=>n.map(x=>Nt(y,x.key)))),m=Kn({domain:p,range:[0,g],padding:.2}),b=_n({domain:[0,v],range:[f,0],nice:!0});return h.jsx("div",{className:u,role:"img","aria-label":c,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(Vr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${St} ${r}`,"aria-hidden":"true",children:h.jsxs(Je,{left:ke.left,top:ke.top,children:[b.ticks(4).map(y=>h.jsx("line",{x1:0,x2:g,y1:b(y),y2:b(y),stroke:Lo,strokeDasharray:"3 3"},`area-grid-${y}`)),n.map((y,x)=>{const k=br(x,y.color),w=e.map(S=>({x:(m(Kt(S,t))??0)+m.bandwidth()/2,y:Nt(S,y.key)}));return h.jsxs("g",{children:[h.jsx(hg,{data:w,x:S=>S.x,y:S=>b(S.y),yScale:b,stroke:k,fill:k,fillOpacity:.2,strokeWidth:2}),h.jsx(po,{data:w,x:S=>S.x,y:S=>b(S.y),stroke:k,strokeWidth:2})]},y.key)}),h.jsx(va,{top:f,scale:m,stroke:Be,tickStroke:Be,tickLabelProps:()=>({fill:fn,fontSize:12,textAnchor:"middle",dy:"0.8em"})}),h.jsx(Gs,{scale:b,numTicks:4,stroke:Be,tickStroke:Be,tickLabelProps:()=>({fill:fn,fontSize:12,textAnchor:"end",dx:"-0.3em",dy:"0.25em"})})]})})})})}function q7({data:e,categoryKey:t,series:n,height:r=260,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="Horizontal stacked bar chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-ke.top-ke.bottom,g=St-ke.left-ke.right,p=e.map(y=>Kt(y,t)),v=Math.max(1,...e.map(y=>n.reduce((x,k)=>x+Nt(y,k.key),0))),m=Kn({domain:p,range:[0,f],padding:.22}),b=_n({domain:[0,v],range:[0,g],nice:!0});return h.jsx("div",{className:u,role:"img","aria-label":c,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(Vr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${St} ${r}`,"aria-hidden":"true",children:h.jsxs(Je,{left:ke.left,top:ke.top,children:[b.ticks(4).map(y=>h.jsx("line",{x1:b(y),x2:b(y),y1:0,y2:f,stroke:Lo,strokeDasharray:"3 3"},`hstack-grid-${y}`)),e.map(y=>{const x=Kt(y,t),k=m(x)??0,w=m.bandwidth();let S=0;return n.map((N,C)=>{const E=Nt(y,N.key),T=b(S),O=Math.max(0,b(S+E)-T);return S+=E,h.jsx(vi,{x:T,y:k,width:O,height:w,fill:br(C,N.color)},`${x}-${N.key}`)})}),h.jsx(va,{top:f,scale:b,stroke:Be,tickStroke:Be,tickLabelProps:()=>({fill:fn,fontSize:12,textAnchor:"middle",dy:"0.8em"})}),h.jsx(Gs,{scale:m,stroke:Be,tickStroke:Be,tickLabelProps:()=>({fill:fn,fontSize:12,textAnchor:"end",dx:"-0.3em",dy:"0.25em"})})]})})})})}function K7({data:e,xKey:t,series:n,height:r=260,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="Streamgraph chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-ke.top-ke.bottom,g=St-ke.left-ke.right,p=e.map(x=>Kt(x,t)),v=e.map(x=>n.reduce((k,w)=>k+Nt(x,w.key),0)),m=Math.max(1,...v.map(x=>x/2)),b=Kn({domain:p,range:[0,g],padding:.05}),y=_n({domain:[-m,m],range:[f,0],nice:!0});return h.jsx("div",{className:u,role:"img","aria-label":c,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(Vr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${St} ${r}`,"aria-hidden":"true",children:h.jsxs(Je,{left:ke.left,top:ke.top,children:[n.map((x,k)=>{const w=e.map(S=>{const C=-n.reduce((T,O)=>T+Nt(S,O.key),0)/2+n.slice(0,k).reduce((T,O)=>T+Nt(S,O.key),0),E=C+Nt(S,x.key);return{x:(b(Kt(S,t))??0)+b.bandwidth()/2,y0:C,y1:E}});return h.jsx(hg,{data:w,x:S=>S.x,yScale:y,y0:S=>y(S.y0),y1:S=>y(S.y1),fill:br(k,x.color),fillOpacity:.8,stroke:"none"},`stream-layer-${x.key}`)}),h.jsx(va,{top:f,scale:b,stroke:Be,tickStroke:Be,tickLabelProps:()=>({fill:fn,fontSize:12,textAnchor:"middle",dy:"0.8em"})})]})})})})}function V7({data:e,xKey:t,series:n,height:r=300,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="Brush line chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-76,g=52,p=f-ke.top-ke.bottom,v=St-ke.left-ke.right,m=e.map(T=>Kt(T,t)),[b,y]=_.useState(null),x=Math.max(1,...e.flatMap(T=>n.map(O=>Nt(T,O.key)))),k=T=>Math.max(0,Math.min(m.length-1,Math.floor(T/Math.max(v,1)*m.length))),w=b==null?e:e.slice(Math.min(b.start,b.end),Math.max(b.start,b.end)+1),S=w.map(T=>Kt(T,t)),N=Kn({domain:S,range:[0,v],padding:.28}),C=_n({domain:[0,x],range:[p,0],nice:!0}),E=_n({domain:[0,Math.max(m.length-1,1)],range:[0,v]});return h.jsx("div",{className:u,role:"img","aria-label":c,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(Vr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${St} ${r}`,"aria-hidden":"true",children:[h.jsxs(Je,{left:ke.left,top:ke.top,children:[n.map((T,O)=>{const P=br(O,T.color),M=w.map($=>({x:(N(Kt($,t))??0)+N.bandwidth()/2,y:C(Nt($,T.key))}));return h.jsx(po,{data:M,x:$=>$.x,y:$=>$.y,stroke:P,strokeWidth:2},`brush-main-${T.key}`)}),h.jsx(va,{top:p,scale:N,stroke:Be,tickStroke:Be,tickLabelProps:()=>({fill:fn,fontSize:12,textAnchor:"middle",dy:"0.8em"})})]}),h.jsxs(Je,{left:ke.left,top:f+8,children:[h.jsx("line",{x1:0,x2:v,y1:g,y2:g,stroke:Lo}),n.slice(0,1).map((T,O)=>{const P=br(O,T.color),M=e.map(($,L)=>({x:E(L),y:g-Nt($,T.key)/x*g}));return h.jsx(po,{data:M,x:$=>$.x,y:$=>$.y,stroke:P,strokeWidth:1.5},`brush-preview-${T.key}`)}),h.jsx(mv,{xScale:E,yScale:_n({domain:[0,1],range:[g,0]}),width:v,height:g,margin:{top:0,left:0,right:0,bottom:0},handleSize:8,resizeTriggerAreas:["left","right"],onChange:T=>{const O=T;if(!O||O.x0==null||O.x1==null){y(null);return}y({start:k(O.x0),end:k(O.x1)})},selectedBoxStyle:{fill:"var(--color-dataviz-1)",fillOpacity:.2,stroke:"var(--color-dataviz-1)"}})]})]})})})}function Y7({data:e,xKey:t,series:n,height:r=260,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="XY line chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0;return h.jsx("div",{className:u,role:"img","aria-label":c,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(Vr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsxs(Oo,{height:r,xScale:{type:"band"},yScale:{type:"linear"},children:[h.jsx(z8,{columns:!1,numTicks:4,stroke:Lo}),h.jsx(BC,{orientation:"bottom",stroke:Be,tickStroke:Be}),h.jsx(BC,{orientation:"left",stroke:Be,tickStroke:Be}),n.map((f,g)=>h.jsx(B7,{dataKey:f.label,data:e,xAccessor:p=>Kt(p,t),yAccessor:p=>Nt(p,f.key),stroke:br(g,f.color)},f.key)),h.jsx(uE,{showVerticalCrosshair:!0,showSeriesGlyphs:!0,renderTooltip:({tooltipData:f})=>{var p;const g=(p=f==null?void 0:f.nearestDatum)==null?void 0:p.datum;return g?h.jsxs("div",{children:[Kt(g,t)," - ",n.map(v=>`${v.label}: ${Nt(g,v.key)}`).join(" | ")]}):null},style:{background:"var(--color-dataviz-tooltip-bg)",border:"1px solid var(--color-dataviz-tooltip-border)",color:fn}})]})})})}function G7({data:e,height:t=280,state:n="default",emptyMessage:r="No data available.",errorMessage:i="Unable to load chart data.",loadingLabel:a="Loading chart data...",className:o,"aria-label":s="Heatmap chart"}){var y;const l=["dsn-chart",o].filter(Boolean).join(" "),c=((y=e[0])==null?void 0:y.bins.map(x=>x.y))??[],u=n!=="default"||e.length===0||c.length===0,d=t-ke.top-ke.bottom,f=St-ke.left-ke.right,g=e.map(x=>x.x),p=Math.max(1,...e.flatMap(x=>x.bins.map(k=>k.value))),v=Kn({domain:g,range:[0,f],padding:.08}),m=Kn({domain:c,range:[0,d],padding:.08}),b=_n({domain:[0,p],range:["var(--color-dataviz-grid)","var(--color-dataviz-1)"]});return h.jsx("div",{className:l,role:"img","aria-label":s,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${t}px`},children:u?h.jsx(Vr,{state:n==="default"?"empty":n,emptyMessage:r,errorMessage:i,loadingLabel:a}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${St} ${t}`,"aria-hidden":"true",children:h.jsxs(Je,{left:ke.left,top:ke.top,children:[h.jsx(kN,{data:e,xScale:x=>v(g[x])??0,yScale:x=>m(c[x])??0,binWidth:v.bandwidth(),binHeight:m.bandwidth(),colorScale:x=>b(Number(x)),bins:x=>x.bins,count:x=>x.value,gap:2}),h.jsx(va,{top:d,scale:v,stroke:Be,tickStroke:Be,tickLabelProps:()=>({fill:fn,fontSize:12,textAnchor:"middle",dy:"0.8em"})}),h.jsx(Gs,{scale:m,stroke:Be,tickStroke:Be,tickLabelProps:()=>({fill:fn,fontSize:12,textAnchor:"end",dx:"-0.3em",dy:"0.25em"})})]})})})})}function X7({children:e,className:t,...n}){const r=["dsn-chart-card",t].filter(Boolean).join(" ");return h.jsx(I1,{...n,className:r,children:h.jsx("div",{className:"dsn-chart-card-content",children:e})})}const Z7=[{id:"root",label:"Title"},{id:"group",label:"..."},{id:"parent",label:"Title"},{id:"current",label:"Title",variant:"current"}];function J7(e,t){const n=e.find(i=>i.variant==="current");if((n==null?void 0:n.label)!=null)return n.label;const r=e[e.length-1];return(r==null?void 0:r.label)!=null?r.label:t}function Q7({variant:e="title",title:t="Title",description:n,showDescription:r=!1,descriptionIcon:i,leftActions:a,rightActions:o,breadcrumbItems:s=Z7,breadcrumbMaxVisibleItems:l=4,breadcrumbShowEllipsis:c=!0,responsiveCollapse:u=!0,backOnlyBreakpointPx:d=640,backLabel:f="Back",onBackClick:g,className:p,"aria-label":v="Navbar"}){const m=_.useCallback(()=>typeof window<"u"?window.innerWidth:Number.POSITIVE_INFINITY,[]),[b,y]=_.useState(m);_.useEffect(()=>{if(typeof window>"u")return;const C=()=>y(window.innerWidth);return window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]);const x=e==="breadcrumbs"&&u&&b<=d,k=_.useMemo(()=>!u||e!=="breadcrumbs"?l:b<=d?1:b<=768?Math.min(l,3):b<=1024?Math.min(l,4):Math.min(l,5),[d,l,u,e,b]),w=["dsn-navbar",p].filter(Boolean).join(" "),S=a??null,N=J7(s,t);return h.jsxs("header",{className:w,"data-variant":e,"data-back-only":x||void 0,"aria-label":v,children:[h.jsx("div",{className:"dsn-navbar-left",children:x?h.jsx(me,{variant:"ghost",size:"md",showLeadingIcon:!0,leadingIcon:h.jsx(iT,{size:16,"aria-hidden":"true"}),showLabel:!1,"aria-label":f,onClick:g}):S}),h.jsx("div",{className:"dsn-navbar-center",children:e==="breadcrumbs"?x?h.jsx("div",{className:"dsn-navbar-title-row",children:h.jsx("h1",{className:"dsn-navbar-title",children:N})}):h.jsx(Hy,{items:s,maxVisibleItems:k,showEllipsis:c,"aria-label":"Page breadcrumb"}):h.jsxs("div",{className:"dsn-navbar-title-stack",children:[h.jsx("div",{className:"dsn-navbar-title-row",children:h.jsx("h1",{className:"dsn-navbar-title",children:t})}),r&&n?h.jsxs("div",{className:"dsn-navbar-description-row",children:[i?h.jsx("span",{className:"dsn-navbar-description-icon","aria-hidden":"true",children:i}):null,h.jsx("p",{className:"dsn-navbar-description",children:n})]}):null]})}),h.jsx("div",{className:"dsn-navbar-right",children:o})]})}function R7({collapsed:e=!1,selector:t,selectorProps:n,showSearch:r=!1,searchSlot:i,onCollapsedSearchActivate:a,sections:o,bottomContent:s,className:l,"aria-label":c="Sidebar"}){const u=_.useId(),[d,f]=_.useState(()=>Object.fromEntries(o.map(v=>[v.id,!0])));_.useEffect(()=>{f(v=>{const m={};for(const b of o)m[b.id]=v[b.id]??!0;return m})},[o]);const g=["dsn-sidebar",l].filter(Boolean).join(" "),p=t??h.jsx(Wl,{variant:e?"icon":"full",label:"Workspace",showAvatar:!0,avatarProps:{size:"xs",variant:"organization",fill:"initials",initials:"WS",name:"Workspace"},showDisclosure:!e,...n});return h.jsxs("aside",{className:g,"data-collapsed":e||void 0,"aria-label":c,children:[h.jsxs("div",{className:"dsn-sidebar-header",children:[h.jsx("div",{className:"dsn-sidebar-selector-row",children:h.jsx("div",{className:"dsn-sidebar-selector-slot",children:p})}),r&&i&&h.jsx("div",{className:"dsn-sidebar-search",children:i})]}),h.jsxs("nav",{className:"dsn-sidebar-nav","aria-label":"Sidebar menu",children:[r&&e?h.jsx(Wl,{variant:"icon",label:"Search",className:"dsn-sidebar-collapsed-search-trigger",showIcon:!0,icon:h.jsx(kT,{size:16,"aria-hidden":!0}),onClick:a}):null,o.map(v=>{const m=!!(!e&&v.title&&v.showDisclosure),b=!!(m&&!v.trailingAction),y=m?d[v.id]??!0:!0,x=`${u}-${v.id}-items`,k=()=>{f(w=>({...w,[v.id]:!y}))};return h.jsxs(_.Fragment,{children:[(v.separator==="before"||v.separator==="both")&&h.jsx(qd,{decorative:!0,className:"dsn-sidebar-separator"}),h.jsxs("section",{className:"dsn-sidebar-section","aria-label":v.title??`Section ${v.id}`,children:[v.title&&!e&&(b?h.jsx("button",{type:"button",className:"dsn-sidebar-section-toggle","data-expanded":y||void 0,"aria-label":y?`Collapse ${v.title}`:`Expand ${v.title}`,"aria-expanded":y,"aria-controls":x,onClick:k,children:h.jsx(er,{title:v.title,size:"xsmall",leadingControl:h.jsx("span",{className:"dsn-sidebar-section-disclosure","data-expanded":y||void 0,children:h.jsx($i,{size:16,"aria-hidden":!0})}),className:"dsn-sidebar-section-header"})}):h.jsx(er,{title:v.title,size:"xsmall",leadingControl:m?h.jsx("button",{type:"button",className:"dsn-sidebar-section-disclosure","data-expanded":y||void 0,"aria-label":y?`Collapse ${v.title}`:`Expand ${v.title}`,"aria-expanded":y,"aria-controls":x,onClick:k,children:h.jsx($i,{size:16,"aria-hidden":!0})}):v.showDisclosure?h.jsx($i,{size:16,"aria-hidden":!0}):void 0,trailingControl:v.trailingAction,className:"dsn-sidebar-section-header"})),y&&h.jsx("div",{className:"dsn-sidebar-section-items",id:x,children:v.items.map(w=>h.jsx(Wl,{variant:e?"icon":"full",label:w.label,showIcon:!w.showAvatar&&!!w.icon,icon:w.icon,showAvatar:w.showAvatar,avatarProps:w.avatarProps,showBadge:w.showBadge,badgeCount:w.badgeCount,badgeVariant:w.badgeVariant,selected:w.selected,disabled:w.disabled,onClick:w.onClick},w.id))})]}),(v.separator==="after"||v.separator==="both")&&h.jsx(qd,{decorative:!0,className:"dsn-sidebar-separator"})]},v.id)})]}),s&&h.jsx("div",{className:"dsn-sidebar-bottom",children:s})]})}const BE=200,eH=128,tH=320,nH=48,rH=16,iH=256;function Ti(e,t,n){return Math.min(n,Math.max(t,e))}function jE(e,t){return typeof e!="number"||Number.isNaN(e)?t:e}function aH({header:e,sidebar:t,rightPanel:n,footer:r,sidebarWidth:i,sidebarCollapsed:a,minSidebarWidth:o=eH,maxSidebarWidth:s=tH,collapsedSidebarWidth:l=nH,defaultSidebarWidth:c=BE,sidebarResizeStep:u=rH,onSidebarWidthChange:d,onSidebarCollapsedChange:f,children:g,className:p,"aria-label":v="Application shell"}){const m=_.useRef(null),b=typeof i=="number",y=typeof a=="boolean",[x,k]=_.useState(c),[w,S]=_.useState(!1),[N,C]=_.useState(!1),[E,T]=_.useState(!1),O=_.useRef(!1),P=_.useRef(null),M=y?a:w,$=b?i:x,L=Ti($??BE,o,s),z=Ti(c,o,s),j=M?l:L,B=_.useCallback(A=>{y||S(A),f==null||f(A)},[y,f]),H=_.useCallback(A=>{const q=Ti(A,o,s);b||k(q),d==null||d(q)},[b,s,o,d]),F=_.useCallback(()=>{const A=m.current;if(!A)return;const q=A.querySelector('input[type="search"], .dsn-search-bar-field, input[aria-label*="search" i], input[placeholder*="search" i]');q==null||q.focus()},[]),D=_.useCallback(()=>{B(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{F()})})},[F,B]),U=_.useCallback(()=>{P.current=null,C(!1),T(!1)},[]),V=_.useCallback(A=>{const q=P.current;if(!q)return;const de=jE(A.clientX,q.startX)-q.startX;Math.abs(de)>2&&(q.hasDragged=!0);const ne=q.startWidth+de,he=Ti(ne,o,s);if(ne<o&&!q.startedCollapsed){B(!0);return}B(!1),H(he)},[s,o,B,H]),Y=_.useCallback(()=>{const A=P.current;A!=null&&A.hasDragged&&(O.current=!0),window.removeEventListener("pointermove",V),U()},[U,V]);_.useEffect(()=>()=>{window.removeEventListener("pointermove",V),window.removeEventListener("pointerup",Y)},[V,Y]);const G=A=>{const q=M,Q=q?o:L;P.current={startX:jE(A.clientX,0),startWidth:Q,startedCollapsed:q,hasDragged:!1},C(!0),window.addEventListener("pointermove",V),window.addEventListener("pointerup",Y,{once:!0})},R=_.useCallback(A=>{if(N)return;const q=A.currentTarget.getBoundingClientRect(),Q=q.left+q.width/2;T(Math.abs(A.clientX-Q)<=2)},[N]),te=_.useCallback(()=>{if(O.current){O.current=!1;return}const A=!M;B(A),A||H(Ti(M?iH:$??z,o,s))},[z,s,o,M,$,B,H]),le=A=>{if(A.key==="Enter"||A.key===" "){A.preventDefault(),te();return}if(A.key!=="ArrowLeft"&&A.key!=="ArrowRight")return;if(A.preventDefault(),A.key==="ArrowRight"&&M){B(!1),H(Ti(o+u,o,s));return}if(A.key==="ArrowLeft"&&M)return;const q=A.key==="ArrowRight"?Ti(L+u,o,s):L-u;if(q<o){B(!0);return}B(!1),H(Ti(q,o,s))},W=_.useMemo(()=>!_.isValidElement(t)||typeof t.type=="string"?t:_.cloneElement(t,{collapsed:M,onCollapsedSearchActivate:D}),[D,M,t]),Z=A=>{if(!M)return;const q=A.target;q&&q.closest(".dsn-sidebar-collapsed-search-trigger")&&D()},I=["dsn-app-shell",p].filter(Boolean).join(" ");return h.jsxs("div",{className:I,"data-sidebar-collapsed":M||void 0,"data-sidebar-resizing":N||void 0,"aria-label":v,children:[W?h.jsxs("div",{className:"dsn-app-shell-sidebar-column",style:{width:`${j}px`},children:[h.jsx("aside",{ref:m,className:"dsn-app-shell-sidebar","aria-label":"Primary navigation",onClickCapture:Z,children:W}),h.jsx("button",{type:"button",className:"dsn-app-shell-sidebar-resize-handle","data-resizing":N||void 0,"data-edge-hot":E||N||void 0,"aria-label":M?"Expand sidebar":"Collapse sidebar","aria-expanded":!M,onPointerDown:G,onPointerEnter:R,onPointerMove:R,onPointerLeave:()=>T(!1),onClick:te,onKeyDown:le})]}):null,h.jsxs("div",{className:"dsn-app-shell-body",children:[e?h.jsx("header",{className:"dsn-app-shell-header",children:e}):null,h.jsxs("div",{className:"dsn-app-shell-content-row",children:[h.jsx("main",{className:"dsn-app-shell-main","aria-label":"Page content",children:g}),n?h.jsx("aside",{className:"dsn-app-shell-right-panel","aria-label":"Secondary content",children:n}):null]}),r?h.jsx("footer",{className:"dsn-app-shell-footer",children:r}):null]})]})}ie.Accordion=g2,ie.AlertDialog=eA,ie.AppShell=aH,ie.AreaChart=H7,ie.AttachmentCard=qT,ie.AttachmentChip=Wd,ie.AttachmentField=UT,ie.Avatar=Oi,ie.AvatarGroup=DT,ie.Badge=Do,ie.BarChart=W7,ie.Breadcrumbs=y2,ie.BreadcrumbsController=Hy,ie.BrushLineChart=V7,ie.BulkActionBar=a2,ie.Button=me,ie.ButtonGroup=Jr,ie.ButtonGroupVertical=JE,ie.Callout=p2,ie.Card=I1,ie.ChartCard=X7,ie.Checkbox=Pn,ie.CheckboxField=QM,ie.Chip=Io,ie.ChipField=s2,ie.ChipGroup=Fl,ie.ChoiceList=jy,ie.Combobox=Ay,ie.CustomViewTab=Dy,ie.CustomViewTabs=jM,ie.DataListCell=ZM,ie.DataTable=tA,ie.DataTableCell=zy,ie.DataTableHeaderCell=Iy,ie.DateTimePicker=LM,ie.DonutChart=U7,ie.Drawer=RP,ie.EmptyState=_2,ie.FileRow=VT,ie.FileThumbnail=jd,ie.HeatmapChart=G7,ie.HorizontalInput=e2,ie.HorizontalStackedBarChart=q7,ie.LineChart=j7,ie.LoadingBar=YT,ie.MenuCell=Pi,ie.Modal=JP,ie.MultiChoice=n2,ie.Navbar=Q7,ie.NumberInput=Ai,ie.OTPInput=sM,ie.PageSelector=Wy,ie.Pagination=Uy,ie.PasswordInput=rM,ie.PasswordRequirement=oM,ie.PhoneInput=cM,ie.PopoverMenu=ZP,ie.PopoverWrapper=Sr,ie.ProgressBar=$y,ie.ProgressRing=Ty,ie.Radio=Kd,ie.RichTextEditor=YP,ie.SearchBar=Py,ie.SectionHeader=er,ie.SegmentControl=Yd,ie.Select=mM,ie.Separator=qd,ie.Shortcut=Id,ie.Sidebar=R7,ie.SidebarMenuSelector=Wl,ie.SingleChoice=i2,ie.SkeletonLoading=GT,ie.Slider=l2,ie.SplitButton=LT,ie.Stat=IT,ie.StreamgraphChart=K7,ie.Switcher=ka,ie.Tab=zM,ie.Tag=kr,ie.TextArea=dM,ie.TextInput=JT,ie.Toast=f2,ie.ToggleButton=Yt,ie.Toolbar=Sa,ie.Tooltip=Hd,ie.UploadArea=IM,ie.VerticalButton=ZE,ie.XYLineChart=Y7,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});
307
+ `).join("");return m}function v3(e){var t=e.children,n=e.className,r=e.innerRef,i=e.x,a=e.y,o=e.width,s=e.height,l=e.radius,c=e.all,u=c===void 0?!1:c,d=e.top,f=d===void 0?!1:d,g=e.bottom,p=g===void 0?!1:g,v=e.left,m=v===void 0?!1:v,x=e.right,y=x===void 0?!1:x,b=e.topLeft,k=b===void 0?!1:b,w=e.topRight,S=w===void 0?!1:w,N=e.bottomLeft,E=N===void 0?!1:N,C=e.bottomRight,T=C===void 0?!1:C,O=p3(e,h3),P=g3({x:i,y:a,width:o,height:s,radius:l,all:u,top:f,bottom:p,left:m,right:y,topLeft:k,topRight:S,bottomLeft:E,bottomRight:T});return t?_.createElement(_.Fragment,null,t({path:P})):_.createElement("path",Ng({ref:r,className:$e("visx-bar-rounded",n),d:P},O))}function Ou(e){if("bandwidth"in e)return e.bandwidth();var t=e.range(),n=e.domain();return Math.abs(t[t.length-1]-t[0])/n.length}var m3=["data","className","top","left","x0","x0Scale","x1Scale","yScale","color","keys","height","children"];function Eg(){return Eg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eg.apply(this,arguments)}function y3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function b3(e){var t=e.data,n=e.className,r=e.top,i=e.left,a=e.x0,o=e.x0Scale,s=e.x1Scale,l=e.yScale,c=e.color,u=e.keys,d=e.height,f=e.children,g=y3(e,m3),p=Ou(s),v=t.map(function(m,x){return{index:x,x0:o(a(m)),bars:u.map(function(y,b){var k=m[y];return{index:b,key:y,value:k,width:p,x:s(y)||0,y:l(k)||0,color:c(y,b),height:d-(l(k)||0)}})}});return f?_.createElement(_.Fragment,null,f(v)):_.createElement(tt,{className:$e("visx-bar-group",n),top:r,left:i},v.map(function(m){return _.createElement(tt,{key:"bar-group-"+m.index+"-"+m.x0,left:m.x0},m.bars.map(function(x){return _.createElement(bi,Eg({key:"bar-group-bar-"+m.index+"-"+x.index+"-"+x.value+"-"+x.key,x:x.x,y:x.y,width:x.width,height:x.height,fill:x.color},g))}))}))}var x3=["data","className","top","left","x","y0","y0Scale","y1Scale","xScale","color","keys","width","children"];function Cg(){return Cg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cg.apply(this,arguments)}function _3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function w3(e){var t=e.data,n=e.className,r=e.top,i=e.left,a=e.x,o=a===void 0?function(){return 0}:a,s=e.y0,l=e.y0Scale,c=e.y1Scale,u=e.xScale,d=e.color,f=e.keys;e.width;var g=e.children,p=_3(e,x3),v=Ou(c),m=t.map(function(x,y){return{index:y,y0:l(s(x))||0,bars:f.map(function(b,k){var w=x[b];return{index:k,key:b,value:w,height:v,x:o(w)||0,y:c(b)||0,color:d(b,k),width:u(w)||0}})}});return g?_.createElement(_.Fragment,null,g(m)):_.createElement(tt,{className:$e("visx-bar-group-horizontal",n),top:r,left:i},m.map(function(x){return _.createElement(tt,{key:"bar-group-"+x.index+"-"+x.y0,top:x.y0},x.bars.map(function(y){return _.createElement(bi,Cg({key:"bar-group-bar-"+x.index+"-"+y.index+"-"+y.value+"-"+y.key,x:y.x,y:y.y,width:y.width,height:y.height,fill:y.color},p))}))}))}function Sn(e){return typeof(e==null?void 0:e.x)=="number"?e==null?void 0:e.x:0}function Nn(e){return typeof(e==null?void 0:e.y)=="number"?e==null?void 0:e.y:0}function En(e){return e==null?void 0:e.source}function Cn(e){return e==null?void 0:e.target}function BS(e){return e==null?void 0:e[0]}function jS(e){return e==null?void 0:e[1]}var k3=["data","className","top","left","x","y0","y1","xScale","yScale","color","keys","value","order","offset","children"];function Tg(){return Tg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tg.apply(this,arguments)}function S3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function N3(e){var t=e.data,n=e.className,r=e.top,i=e.left,a=e.x,o=e.y0,s=o===void 0?BS:o,l=e.y1,c=l===void 0?jS:l,u=e.xScale,d=e.yScale,f=e.color,g=e.keys,p=e.value,v=e.order,m=e.offset,x=e.children,y=S3(e,k3),b=Su();g&&b.keys(g),p&&Ze(b.value,p),v&&b.order(Eu(v)),m&&b.offset(Tu(m));var k=b(t),w=Ou(u),S=k.map(function(N,E){var C=N.key;return{index:E,key:C,bars:N.map(function(T,O){var P=(d(s(T))||0)-(d(c(T))||0),M=d(c(T)),$="bandwidth"in u?u(a(T.data)):Math.max((u(a(T.data))||0)-w/2);return{bar:T,key:C,index:O,height:P,width:w,x:$||0,y:M||0,color:f(N.key,O)}})}});return x?_.createElement(_.Fragment,null,x(S)):_.createElement(tt,{className:$e("visx-bar-stack",n),top:r,left:i},S.map(function(N){return N.bars.map(function(E){return _.createElement(bi,Tg({key:"bar-stack-"+N.index+"-"+E.index,x:E.x,y:E.y,height:E.height,width:E.width,fill:E.color},y))})}))}var E3=["data","className","top","left","y","x0","x1","xScale","yScale","color","keys","value","order","offset","children"];function Mg(){return Mg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mg.apply(this,arguments)}function C3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function T3(e){var t=e.data,n=e.className,r=e.top,i=e.left,a=e.y,o=e.x0,s=o===void 0?BS:o,l=e.x1,c=l===void 0?jS:l,u=e.xScale,d=e.yScale,f=e.color,g=e.keys,p=e.value,v=e.order,m=e.offset,x=e.children,y=C3(e,E3),b=Su();g&&b.keys(g),p&&Ze(b.value,p),v&&b.order(Eu(v)),m&&b.offset(Tu(m));var k=b(t),w=Ou(d),S=k.map(function(N,E){var C=N.key;return{index:E,key:C,bars:N.map(function(T,O){var P=(u(c(T))||0)-(u(s(T))||0),M=u(s(T)),$="bandwidth"in d?d(a(T.data)):Math.max((d(a(T.data))||0)-P/2);return{bar:T,key:C,index:O,height:w,width:P,x:M||0,y:$||0,color:f(N.key,O)}})}});return x?_.createElement(_.Fragment,null,x(S)):_.createElement(tt,{className:$e("visx-bar-stack-horizontal",n),top:r,left:i},S.map(function(N){return N.bars.map(function(E){return _.createElement(bi,Mg({key:"bar-stack-"+N.index+"-"+E.index,x:E.x,y:E.y,height:E.height,width:E.width,fill:E.color},y))})}))}var WS=function(t){return Math.PI/180*t},M3=["className","children","data","innerRef","path","x","y","source","target"];function $g(){return $g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$g.apply(this,arguments)}function $3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function US(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var o=eS();return o.x(r),o.y(i),o.source(t),o.target(n),o(a)}}function O3(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,o=e.x,s=o===void 0?Nn:o,l=e.y,c=l===void 0?Sn:l,u=e.source,d=u===void 0?En:u,f=e.target,g=f===void 0?Cn:f,p=$3(e,M3),v=a||US({source:d,target:g,x:s,y:c});return n?_.createElement(_.Fragment,null,n({path:v})):_.createElement("path",$g({ref:i,className:$e("visx-link visx-link-horizontal-diagonal",t),d:v(r)||""},p))}var P3=["className","children","data","innerRef","path","x","y","source","target"];function Og(){return Og=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Og.apply(this,arguments)}function A3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function HS(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var o=tS();return o.x(r),o.y(i),o.source(t),o.target(n),o(a)}}function L3(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,o=e.x,s=o===void 0?Sn:o,l=e.y,c=l===void 0?Nn:l,u=e.source,d=u===void 0?En:u,f=e.target,g=f===void 0?Cn:f,p=A3(e,P3),v=a||HS({source:d,target:g,x:s,y:c});return n?_.createElement(_.Fragment,null,n({path:v})):_.createElement("path",Og({ref:i,className:$e("visx-link visx-link-vertical-diagonal",t),d:v(r)||""},p))}var D3=["className","children","data","innerRef","path","angle","radius","source","target"];function Pg(){return Pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pg.apply(this,arguments)}function I3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function qS(e){var t=e.source,n=e.target,r=e.angle,i=e.radius;return function(a){var o=nS();return o.angle(r),o.radius(i),o.source(t),o.target(n),o(a)}}function F3(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,o=e.angle,s=o===void 0?Sn:o,l=e.radius,c=l===void 0?Nn:l,u=e.source,d=u===void 0?En:u,f=e.target,g=f===void 0?Cn:f,p=I3(e,D3),v=a||qS({source:d,target:g,angle:s,radius:c});return n?_.createElement(_.Fragment,null,n({path:v})):_.createElement("path",Pg({ref:i,className:$e("visx-link visx-link-radial-diagonal",t),d:v(r)||""},p))}var z3=["className","children","data","innerRef","path","percent","x","y","source","target"];function Ag(){return Ag=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ag.apply(this,arguments)}function B3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function VS(e){var t=e.source,n=e.target,r=e.x,i=e.y,a=e.percent;return function(o){var s=t(o),l=n(o),c=r(s),u=i(s),d=r(l),f=i(l),g=d-c,p=f-u,v=a*(g+p),m=a*(p-g),x=Xt();return x.moveTo(c,u),x.bezierCurveTo(c+v,u+m,d+m,f-v,d,f),x.toString()}}function j3(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,o=e.percent,s=o===void 0?.2:o,l=e.x,c=l===void 0?Nn:l,u=e.y,d=u===void 0?Sn:u,f=e.source,g=f===void 0?En:f,p=e.target,v=p===void 0?Cn:p,m=B3(e,z3),x=a||VS({source:g,target:v,x:c,y:d,percent:s});return n?_.createElement(_.Fragment,null,n({path:x})):_.createElement("path",Ag({ref:i,className:$e("visx-link visx-link-horizontal-curve",t),d:x(r)||""},m))}var W3=["className","children","data","innerRef","path","percent","x","y","source","target"];function Lg(){return Lg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lg.apply(this,arguments)}function U3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function KS(e){var t=e.source,n=e.target,r=e.x,i=e.y,a=e.percent;return function(o){var s=t(o),l=n(o),c=r(s),u=i(s),d=r(l),f=i(l),g=d-c,p=f-u,v=a*(g+p),m=a*(p-g),x=Xt();return x.moveTo(c,u),x.bezierCurveTo(c+v,u+m,d+m,f-v,d,f),x.toString()}}function H3(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,o=e.percent,s=o===void 0?.2:o,l=e.x,c=l===void 0?Sn:l,u=e.y,d=u===void 0?Nn:u,f=e.source,g=f===void 0?En:f,p=e.target,v=p===void 0?Cn:p,m=U3(e,W3),x=a||KS({source:g,target:v,x:c,y:d,percent:s});return n?_.createElement(_.Fragment,null,n({path:x})):_.createElement("path",Lg({ref:i,className:$e("visx-link visx-link-vertical-curve",t),d:x(r)||""},m))}var q3=["className","children","data","innerRef","path","percent","x","y","source","target"];function Dg(){return Dg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dg.apply(this,arguments)}function V3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function YS(e){var t=e.source,n=e.target,r=e.x,i=e.y,a=e.percent;return function(o){var s=t(o),l=n(o),c=r(s)-Math.PI/2,u=i(s),d=r(l)-Math.PI/2,f=i(l),g=Math.cos(c),p=Math.sin(c),v=Math.cos(d),m=Math.sin(d),x=u*g,y=u*p,b=f*v,k=f*m,w=b-x,S=k-y,N=a*(w+S),E=a*(S-w),C=Xt();return C.moveTo(x,y),C.bezierCurveTo(x+N,y+E,b+E,k-N,b,k),C.toString()}}function K3(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,o=e.percent,s=o===void 0?.2:o,l=e.x,c=l===void 0?Sn:l,u=e.y,d=u===void 0?Nn:u,f=e.source,g=f===void 0?En:f,p=e.target,v=p===void 0?Cn:p,m=V3(e,q3),x=a||YS({source:g,target:v,x:c,y:d,percent:s});return n?_.createElement(_.Fragment,null,n({path:x})):_.createElement("path",Dg({ref:i,className:$e("visx-link visx-link-radial-curve",t),d:x(r)||""},m))}var Y3=["className","children","innerRef","data","path","x","y","source","target"];function Ig(){return Ig=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ig.apply(this,arguments)}function G3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function GS(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var o=t(a),s=n(a),l=r(o),c=i(o),u=r(s),d=i(s),f=Xt();return f.moveTo(l,c),f.lineTo(u,d),f.toString()}}function X3(e){var t=e.className,n=e.children,r=e.innerRef,i=e.data,a=e.path,o=e.x,s=o===void 0?Nn:o,l=e.y,c=l===void 0?Sn:l,u=e.source,d=u===void 0?En:u,f=e.target,g=f===void 0?Cn:f,p=G3(e,Y3),v=a||GS({source:d,target:g,x:s,y:c});return n?_.createElement(_.Fragment,null,n({path:v})):_.createElement("path",Ig({ref:r,className:$e("visx-link visx-link-horizontal-line",t),d:v(i)||""},p))}var Z3=["className","innerRef","data","path","x","y","source","target","children"];function Fg(){return Fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fg.apply(this,arguments)}function J3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function XS(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var o=t(a),s=n(a),l=r(o),c=i(o),u=r(s),d=i(s),f=Xt();return f.moveTo(l,c),f.lineTo(u,d),f.toString()}}function Q3(e){var t=e.className,n=e.innerRef,r=e.data,i=e.path,a=e.x,o=a===void 0?Sn:a,s=e.y,l=s===void 0?Nn:s,c=e.source,u=c===void 0?En:c,d=e.target,f=d===void 0?Cn:d,g=e.children,p=J3(e,Z3),v=i||XS({source:u,target:f,x:o,y:l});return g?_.createElement(_.Fragment,null,g({path:v})):_.createElement("path",Fg({ref:n,className:$e("visx-link visx-link-vertical-line",t),d:v(r)||""},p))}var R3=["className","innerRef","data","path","x","y","source","target","children"];function zg(){return zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zg.apply(this,arguments)}function e5(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function ZS(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var o=t(a),s=n(a),l=r(o)-Math.PI/2,c=i(o),u=r(s)-Math.PI/2,d=i(s),f=Math.cos(l),g=Math.sin(l),p=Math.cos(u),v=Math.sin(u),m=Xt();return m.moveTo(c*f,c*g),m.lineTo(d*p,d*v),m.toString()}}function t5(e){var t=e.className,n=e.innerRef,r=e.data,i=e.path,a=e.x,o=a===void 0?Sn:a,s=e.y,l=s===void 0?Nn:s,c=e.source,u=c===void 0?En:c,d=e.target,f=d===void 0?Cn:d,g=e.children,p=e5(e,R3),v=i||ZS({source:u,target:f,x:o,y:l});return g?_.createElement(_.Fragment,null,g({path:v})):_.createElement("path",zg({ref:n,className:$e("visx-link visx-link-radial-line",t),d:v(r)||""},p))}var n5=["className","innerRef","data","path","percent","x","y","source","target","children"];function Bg(){return Bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bg.apply(this,arguments)}function r5(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function JS(e){var t=e.source,n=e.target,r=e.x,i=e.y,a=e.percent;return function(o){var s=t(o),l=n(o),c=r(s),u=i(s),d=r(l),f=i(l),g=Xt();return g.moveTo(c,u),g.lineTo(c+(d-c)*a,u),g.lineTo(c+(d-c)*a,f),g.lineTo(d,f),g.toString()}}function i5(e){var t=e.className,n=e.innerRef,r=e.data,i=e.path,a=e.percent,o=a===void 0?.5:a,s=e.x,l=s===void 0?Nn:s,c=e.y,u=c===void 0?Sn:c,d=e.source,f=d===void 0?En:d,g=e.target,p=g===void 0?Cn:g,v=e.children,m=r5(e,n5),x=i||JS({source:f,target:p,x:l,y:u,percent:o});return v?_.createElement(_.Fragment,null,v({path:x})):_.createElement("path",Bg({ref:n,className:$e("visx-link visx-link-horizontal-step",t),d:x(r)||""},m))}var a5=["className","innerRef","data","path","percent","x","y","source","target","children"];function jg(){return jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jg.apply(this,arguments)}function o5(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function QS(e){var t=e.source,n=e.target,r=e.x,i=e.y,a=e.percent;return function(o){var s=t(o),l=n(o),c=r(s),u=i(s),d=r(l),f=i(l),g=Xt();return g.moveTo(c,u),g.lineTo(c,u+(f-u)*a),g.lineTo(d,u+(f-u)*a),g.lineTo(d,f),g.toString()}}function s5(e){var t=e.className,n=e.innerRef,r=e.data,i=e.path,a=e.percent,o=a===void 0?.5:a,s=e.x,l=s===void 0?Sn:s,c=e.y,u=c===void 0?Nn:c,d=e.source,f=d===void 0?En:d,g=e.target,p=g===void 0?Cn:g,v=e.children,m=o5(e,a5),x=i||QS({source:f,target:p,x:l,y:u,percent:o});return v?_.createElement(_.Fragment,null,v({path:x})):_.createElement("path",jg({ref:n,className:$e("visx-link visx-link-vertical-step",t),d:x(r)||""},m))}var l5=["className","innerRef","data","path","x","y","source","target","children"];function Wg(){return Wg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wg.apply(this,arguments)}function c5(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function RS(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var o=t(a),s=n(a),l=r(o),c=i(o),u=r(s),d=i(s),f=l-Math.PI/2,g=c,p=u-Math.PI/2,v=d,m=Math.cos(f),x=Math.sin(f),y=Math.cos(p),b=Math.sin(p),k=Math.abs(p-f)>Math.PI?p<=f:p>f;return`
308
+ M`+g*m+","+g*x+`
309
+ A`+g+","+g+",0,0,"+(k?1:0)+","+g*y+","+g*b+`
310
+ L`+v*y+","+v*b+`
311
+ `}}function u5(e){var t=e.className,n=e.innerRef,r=e.data,i=e.path,a=e.x,o=a===void 0?Sn:a,s=e.y,l=s===void 0?Nn:s,c=e.source,u=c===void 0?En:c,d=e.target,f=d===void 0?Cn:d,g=e.children,p=c5(e,l5),v=i||RS({source:u,target:f,x:o,y:l});return g?_.createElement(_.Fragment,null,g({path:v})):_.createElement("path",Wg({ref:n,className:$e("visx-link visx-link-radial-step",t),d:v(r)||""},p))}var d5=["sides","size","center","rotate","className","children","innerRef","points"];function Ug(){return Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ug.apply(this,arguments)}function f5(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var eN={x:0,y:0},tN=function(t){var n=t.sides,r=n===void 0?4:n,i=t.size,a=i===void 0?25:i,o=t.center,s=o===void 0?eN:o,l=t.rotate,c=l===void 0?0:l,u=t.side,d=360/r*u-c,f=WS(d);return{x:s.x+a*Math.cos(f),y:s.y+a*Math.sin(f)}},nN=function(t){var n=t.sides,r=t.size,i=t.center,a=t.rotate;return new Array(n).fill(0).map(function(o,s){return tN({sides:n,size:r,center:i,rotate:a,side:s})})};function h5(e){var t=e.sides,n=t===void 0?4:t,r=e.size,i=r===void 0?25:r,a=e.center,o=a===void 0?eN:a,s=e.rotate,l=s===void 0?0:s,c=e.className,u=e.children,d=e.innerRef,f=e.points,g=f5(e,d5),p=f||nN({sides:n,size:i,center:o,rotate:l}).map(function(v){var m=v.x,x=v.y;return[m,x]});return u?_.createElement(_.Fragment,null,u({points:p})):_.createElement("polygon",Ug({ref:d,className:$e("visx-polygon",c),points:p.join(" ")},g))}var p5=["className","innerRef"];function Hg(){return Hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hg.apply(this,arguments)}function g5(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function v5(e){var t=e.className,n=e.innerRef,r=g5(e,p5);return _.createElement("circle",Hg({ref:n,className:$e("visx-circle",t)},r))}var rN="http://www.w3.org/2000/svg";function m5(e){var t=document.getElementById(e);if(!t){var n=document.createElementNS(rN,"svg");n.setAttribute("aria-hidden","true"),n.style.opacity="0",n.style.width="0",n.style.height="0",n.style.position="absolute",n.style.top="-100%",n.style.left="-100%",n.style.pointerEvents="none",t=document.createElementNS(rN,"path"),t.setAttribute("id",e),n.appendChild(t),document.body.appendChild(n)}return t}var y5="__visx_splitpath_svg_path_measurement_id",iN=function(){return!0};function b5(e){var t=e.path,n=e.pointsInSegments,r=e.segmentation,i=r===void 0?"x":r,a=e.sampleRate,o=a===void 0?1:a;try{var s=m5(y5);s.setAttribute("d",t);var l=s.getTotalLength(),c=n.length,u=n.map(function(){return[]});if(i==="x"||i==="y")for(var d=n.map(function(M){var $;return($=M.find(function(A){return typeof A[i]=="number"}))==null?void 0:$[i]}),f=s.getPointAtLength(0),g=s.getPointAtLength(l),p=g[i]>f[i],v=p?d.map(function(M){return typeof M>"u"?iN:function($){return $>=M}}):d.map(function(M){return typeof M>"u"?iN:function($){return $<=M}}),m=0,x=0;x<=l;x+=o){for(var y=s.getPointAtLength(x),b=y[i];m<c-1&&v[m+1](b);)m+=1;u[m].push(y)}else{var k=n.map(function(M){return M.length}),w=k.reduce(function(M,$){return M+$},0),S=l/Math.max(1,w-1),N=k.slice(0,c-1);N.unshift(0);for(var E=2;E<c;E+=1)N[E]+=N[E-1];for(var C=0;C<c;C+=1)N[C]*=S;for(var T=0,O=0;O<=l;O+=o){for(var P=s.getPointAtLength(O);T<c-1&&O>=N[T+1];)T+=1;u[T].push(P)}}return u}catch{return[]}}function qg(){return qg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qg.apply(this,arguments)}var x5=function(t){return t.x||0},_5=function(t){return t.y||0};function aN(e){var t=e.children,n=e.className,r=e.curve,i=e.defined,a=e.segmentation,o=e.sampleRate,s=e.segments,l=e.x,c=e.y,u=e.styles,d=_.useMemo(function(){var p=typeof l=="number"||typeof l>"u"?function(){return l}:l,v=typeof c=="number"||typeof c>"u"?function(){return c}:c;return s.map(function(m){return m.map(function(x,y){return{x:p(x,y,m),y:v(x,y,m)}})})},[l,c,s]),f=_.useMemo(function(){var p=hg({x:l,y:c,defined:i,curve:r});return p(s.flat())||""},[l,c,i,r,s]),g=_.useMemo(function(){return b5({path:f,segmentation:a,pointsInSegments:d,sampleRate:o})},[f,a,d,o]);return _.createElement("g",null,g.map(function(p,v){return t?_.createElement(_.Fragment,{key:v},t({index:v,segment:p,styles:u[v]||u[v%u.length]})):_.createElement(xo,qg({key:v,className:n,data:p,x:x5,y:_5},u[v]||u[v%u.length]))}))}aN.propTypes={segments:V.arrayOf(V.array).isRequired,styles:V.array.isRequired,children:V.func,className:V.string};const w5=Object.freeze(Object.defineProperty({__proto__:null,Arc:VF,Area:r3,AreaClosed:wg,AreaStack:u3,Bar:bi,BarGroup:b3,BarGroupHorizontal:w3,BarRounded:v3,BarStack:N3,BarStackHorizontal:T3,Circle:v5,Line:mg,LinePath:xo,LineRadial:e3,LinkHorizontal:O3,LinkHorizontalCurve:j3,LinkHorizontalLine:X3,LinkHorizontalStep:i5,LinkRadial:F3,LinkRadialCurve:K3,LinkRadialLine:t5,LinkRadialStep:u5,LinkVertical:L3,LinkVerticalCurve:H3,LinkVerticalLine:Q3,LinkVerticalStep:s5,Pie:FS,Polygon:h5,STACK_OFFSETS:Cu,STACK_OFFSET_NAMES:UF,STACK_ORDERS:Nu,STACK_ORDER_NAMES:WF,SplitLinePath:aN,Stack:zS,arc:fg,area:Mu,degreesToRadians:WS,getPoint:tN,getPoints:nN,line:hg,pathHorizontalCurve:VS,pathHorizontalDiagonal:US,pathHorizontalLine:GS,pathHorizontalStep:JS,pathRadialCurve:YS,pathRadialDiagonal:qS,pathRadialLine:ZS,pathRadialStep:RS,pathVerticalCurve:KS,pathVerticalDiagonal:HS,pathVerticalLine:XS,pathVerticalStep:QS,pie:LS,radialLine:DS,stack:IS,stackOffset:Tu,stackOrder:Eu},Symbol.toStringTag,{value:"Module"}));var k5=oN;function oN(e,t,n){e instanceof RegExp&&(e=sN(e,n)),t instanceof RegExp&&(t=sN(t,n));var r=lN(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function sN(e,t){var n=t.match(e);return n?n[0]:null}oN.range=lN;function lN(e,t,n){var r,i,a,o,s,l=n.indexOf(e),c=n.indexOf(t,l+1),u=l;if(l>=0&&c>0){for(r=[],a=n.length;u>=0&&!s;)u==l?(r.push(u),l=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),c]:(i=r.pop(),i<a&&(a=i,o=c),c=n.indexOf(t,u+1)),u=l<c&&l>=0?l:c;r.length&&(s=[a,o])}return s}var S5=cN;function cN(e,t,n){e instanceof RegExp&&(e=uN(e,n)),t instanceof RegExp&&(t=uN(t,n));var r=dN(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function uN(e,t){var n=t.match(e);return n?n[0]:null}cN.range=dN;function dN(e,t,n){var r,i,a,o,s,l=n.indexOf(e),c=n.indexOf(t,l+1),u=l;if(l>=0&&c>0){if(e===t)return[l,c];for(r=[],a=n.length;u>=0&&!s;)u==l?(r.push(u),l=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),c]:(i=r.pop(),i<a&&(a=i,o=c),c=n.indexOf(t,u+1)),u=l<c&&l>=0?l:c;r.length&&(s=[a,o])}return s}var N5=S5,E5=fN;function fN(e,t,n){var r=e;return C5(e,t).reduce(function(i,a){return i.replace(a.functionIdentifier+"("+a.matches.body+")",T5(a.matches.body,a.functionIdentifier,n,r,t))},e)}function C5(e,t){var n=[],r=typeof t=="string"?new RegExp("\\b("+t+")\\("):t;do{var i=r.exec(e);if(!i)return n;if(i[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+t);var a=i[1],o=i.index,s=N5("(",")",e.substring(o));if(!s||s.start!==i[0].length-1)throw new SyntaxError(a+"(): missing closing ')' in the value '"+e+"'");n.push({matches:s,functionIdentifier:a}),e=s.post}while(r.test(e));return n}function T5(e,t,n,r,i){return n(fN(e,i,n),t,r)}var zt=function(e){this.value=e};zt.math={isDegree:!0,acos:function(e){return zt.math.isDegree?180/Math.PI*Math.acos(e):Math.acos(e)},add:function(e,t){return e+t},asin:function(e){return zt.math.isDegree?180/Math.PI*Math.asin(e):Math.asin(e)},atan:function(e){return zt.math.isDegree?180/Math.PI*Math.atan(e):Math.atan(e)},acosh:function(e){return Math.log(e+Math.sqrt(e*e-1))},asinh:function(e){return Math.log(e+Math.sqrt(e*e+1))},atanh:function(e){return Math.log((1+e)/(1-e))},C:function(e,t){var n=1,r=e-t,i=t;i<r&&(i=r,r=t);for(var a=i+1;a<=e;a++)n*=a;return n/zt.math.fact(r)},changeSign:function(e){return-e},cos:function(e){return zt.math.isDegree&&(e=zt.math.toRadian(e)),Math.cos(e)},cosh:function(e){return(Math.pow(Math.E,e)+Math.pow(Math.E,-1*e))/2},div:function(e,t){return e/t},fact:function(e){if(e%1!==0)return"NaN";for(var t=1,n=2;n<=e;n++)t*=n;return t},inverse:function(e){return 1/e},log:function(e){return Math.log(e)/Math.log(10)},mod:function(e,t){return e%t},mul:function(e,t){return e*t},P:function(e,t){for(var n=1,r=Math.floor(e)-Math.floor(t)+1;r<=Math.floor(e);r++)n*=r;return n},Pi:function(e,t,n){for(var r=1,i=e;i<=t;i++)r*=Number(n.postfixEval({n:i}));return r},pow10x:function(e){for(var t=1;e--;)t*=10;return t},sigma:function(e,t,n){for(var r=0,i=e;i<=t;i++)r+=Number(n.postfixEval({n:i}));return r},sin:function(e){return zt.math.isDegree&&(e=zt.math.toRadian(e)),Math.sin(e)},sinh:function(e){return(Math.pow(Math.E,e)-Math.pow(Math.E,-1*e))/2},sub:function(e,t){return e-t},tan:function(e){return zt.math.isDegree&&(e=zt.math.toRadian(e)),Math.tan(e)},tanh:function(e){return zt.sinha(e)/zt.cosha(e)},toRadian:function(e){return e*Math.PI/180},and:function(e,t){return e&t}},zt.Exception=function(e){this.message=e};var M5=zt,xe=M5;function Bt(e,t){for(var n=0;n<e.length;n++)e[n]+=t;return e}for(var xi=[{token:"sin",show:"sin",type:0,value:xe.math.sin},{token:"cos",show:"cos",type:0,value:xe.math.cos},{token:"tan",show:"tan",type:0,value:xe.math.tan},{token:"pi",show:"&pi;",type:3,value:"PI"},{token:"(",show:"(",type:4,value:"("},{token:")",show:")",type:5,value:")"},{token:"P",show:"P",type:10,value:xe.math.P},{token:"C",show:"C",type:10,value:xe.math.C},{token:" ",show:" ",type:14,value:" ".anchor},{token:"asin",show:"asin",type:0,value:xe.math.asin},{token:"acos",show:"acos",type:0,value:xe.math.acos},{token:"atan",show:"atan",type:0,value:xe.math.atan},{token:"7",show:"7",type:1,value:"7"},{token:"8",show:"8",type:1,value:"8"},{token:"9",show:"9",type:1,value:"9"},{token:"int",show:"Int",type:0,value:Math.floor},{token:"cosh",show:"cosh",type:0,value:xe.math.cosh},{token:"acosh",show:"acosh",type:0,value:xe.math.acosh},{token:"ln",show:" ln",type:0,value:Math.log},{token:"^",show:"^",type:10,value:Math.pow},{token:"root",show:"root",type:0,value:Math.sqrt},{token:"4",show:"4",type:1,value:"4"},{token:"5",show:"5",type:1,value:"5"},{token:"6",show:"6",type:1,value:"6"},{token:"/",show:"&divide;",type:2,value:xe.math.div},{token:"!",show:"!",type:7,value:xe.math.fact},{token:"tanh",show:"tanh",type:0,value:xe.math.tanh},{token:"atanh",show:"atanh",type:0,value:xe.math.atanh},{token:"Mod",show:" Mod ",type:2,value:xe.math.mod},{token:"1",show:"1",type:1,value:"1"},{token:"2",show:"2",type:1,value:"2"},{token:"3",show:"3",type:1,value:"3"},{token:"*",show:"&times;",type:2,value:xe.math.mul},{token:"sinh",show:"sinh",type:0,value:xe.math.sinh},{token:"asinh",show:"asinh",type:0,value:xe.math.asinh},{token:"e",show:"e",type:3,value:"E"},{token:"log",show:" log",type:0,value:xe.math.log},{token:"0",show:"0",type:1,value:"0"},{token:".",show:".",type:6,value:"."},{token:"+",show:"+",type:9,value:xe.math.add},{token:"-",show:"-",type:9,value:xe.math.sub},{token:",",show:",",type:11,value:","},{token:"Sigma",show:"&Sigma;",type:12,value:xe.math.sigma},{token:"n",show:"n",type:13,value:"n"},{token:"Pi",show:"&Pi;",type:12,value:xe.math.Pi},{token:"pow",show:"pow",type:8,value:Math.pow,numberOfArguments:2},{token:"&",show:"&",type:9,value:xe.math.and}],Vg={0:11,1:0,2:3,3:0,4:0,5:0,6:0,7:11,8:11,9:1,10:10,11:0,12:11,13:0,14:-1,15:11},Pu=0;Pu<xi.length;Pu++)xi[Pu].precedence=Vg[xi[Pu].type];var vr={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,9:!0,12:!0,13:!0,14:!0,15:!0},_o={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0,15:!0},$5={0:!0,3:!0,4:!0,8:!0,12:!0,13:!0,15:!0},Xn={},Xs={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,12:!0,13:!0,15:!0},O5={1:!0},jt=[[],["1","2","3","7","8","9","4","5","6","+","-","*","/","(",")","^","!","P","C","e","0",".",",","n"," ","&"],["pi","ln","Pi"],["sin","cos","tan","Del","int","Mod","log","pow"],["asin","acos","atan","cosh","root","tanh","sinh"],["acosh","atanh","asinh","Sigma"]];function P5(e,t,n,r){for(var i=0;i<r;i++)if(e[n+i]!==t[i])return!1;return!0}xe.tokenTypes={FUNCTION_WITH_ONE_ARG:0,NUMBER:1,BINARY_OPERATOR_HIGH_PRECENDENCE:2,CONSTANT:3,OPENING_PARENTHESIS:4,CLOSING_PARENTHESIS:5,DECIMAL:6,POSTFIX_FUNCTION_WITH_ONE_ARG:7,FUNCTION_WITH_N_ARGS:8,BINARY_OPERATOR_LOW_PRECENDENCE:9,BINARY_OPERATOR_PERMUTATION:10,COMMA:11,EVALUATED_FUNCTION:12,EVALUATED_FUNCTION_PARAMETER:13,SPACE:14},xe.addToken=function(e){for(var t=0;t<e.length;t++){var n=e[t].token.length,r=-1;e[t].type===xe.tokenTypes.FUNCTION_WITH_N_ARGS&&e[t].numberOfArguments===void 0&&(e[t].numberOfArguments=2),jt[n]=jt[n]||[];for(var i=0;i<jt[n].length;i++)if(e[t].token===jt[n][i]){r=hN(jt[n][i],xi);break}r===-1?(xi.push(e[t]),e[t].precedence=Vg[e[t].type],jt.length<=e[t].token.length&&(jt[e[t].token.length]=[]),jt[e[t].token.length].push(e[t].token)):(xi[r]=e[t],e[t].precedence=Vg[e[t].type])}};function hN(e,t){for(var n=0;n<t.length;n++)if(t[n].token===e)return n;return-1}function A5(e){for(var t=[],n=e.length,r,i,a,o=0;o<n;o++)if(!(o<n-1&&e[o]===" "&&e[o+1]===" ")){for(r="",i=e.length-o>jt.length-2?jt.length-1:e.length-o;i>0;i--)if(jt[i]!==void 0)for(a=0;a<jt[i].length;a++)P5(e,jt[i][a],o,i)&&(r=jt[i][a],a=jt[i].length,i=0);if(o+=r.length-1,r==="")throw new xe.Exception("Can't understand after "+e.slice(o));t.push(xi[hN(r,xi)])}return t}var L5={value:xe.math.changeSign,type:0,pre:21,show:"-"},Au={value:")",show:")",type:5,pre:0},Zs={value:"(",type:4,pre:0,show:"("};xe.lex=function(e,t){var n=[Zs],r=[],i=e,a=vr,o=0,s=Xn,l="",c;typeof t<"u"&&xe.addToken(t);var u={},d=A5(i);for(c=0;c<d.length;c++){var f=d[c];if(f.type===14){if(c>0&&c<d.length-1&&d[c+1].type===1&&(d[c-1].type===1||d[c-1].type===6))throw new xe.Exception("Unexpected Space");continue}var g=f.token,p=f.type,v=f.value,m=f.precedence,x=f.show,y=n[n.length-1],b;for(b=r.length;b--&&r[b]===0;)if([0,2,3,4,5,9,11,12,13].indexOf(p)!==-1){if(a[p]!==!0)throw new xe.Exception(g+" is not allowed after "+l);n.push(Au),a=_o,s=Xs,r.pop()}if(a[p]!==!0)throw new xe.Exception(g+" is not allowed after "+l);if(s[p]===!0&&(p=2,v=xe.math.mul,x="&times;",m=3,c=c-1),u={value:v,type:p,pre:m,show:x,numberOfArguments:f.numberOfArguments},p===0)a=vr,s=Xn,Bt(r,2),n.push(u),d[c+1].type!==4&&(n.push(Zs),r.push(2));else if(p===1)y.type===1?(y.value+=v,Bt(r,1)):n.push(u),a=_o,s=$5;else if(p===2)a=vr,s=Xn,Bt(r,2),n.push(u);else if(p===3)n.push(u),a=_o,s=Xs;else if(p===4)Bt(r,1),o++,a=vr,s=Xn,n.push(u);else if(p===5){if(!o)throw new xe.Exception("Closing parenthesis are more than opening one, wait What!!!");o--,a=_o,s=Xs,n.push(u),Bt(r,1)}else if(p===6){if(y.hasDec)throw new xe.Exception("Two decimals are not allowed in one number");y.type!==1&&(y={value:0,type:1,pre:0},n.push(y)),a=O5,Bt(r,1),s=Xn,y.value+=v,y.hasDec=!0}else p===7&&(a=_o,s=Xs,Bt(r,1),n.push(u));p===8?(a=vr,s=Xn,Bt(r,f.numberOfArguments+2),n.push(u),d[c+1].type!==4&&(n.push(Zs),r.push(f.numberOfArguments+2))):p===9?(y.type===9?y.value===xe.math.add?(y.value=v,y.show=x,Bt(r,1)):y.value===xe.math.sub&&x==="-"&&(y.value=xe.math.add,y.show="+",Bt(r,1)):y.type!==5&&y.type!==7&&y.type!==1&&y.type!==3&&y.type!==13?g==="-"&&(a=vr,s=Xn,Bt(r,2).push(2),n.push(L5),n.push(Zs)):(n.push(u),Bt(r,2)),a=vr,s=Xn):p===10?(a=vr,s=Xn,Bt(r,2),n.push(u)):p===11?(a=vr,s=Xn,n.push(u)):p===12?(a=vr,s=Xn,Bt(r,6),n.push(u),d[c+1].type!==4&&(n.push(Zs),r.push(6))):p===13&&(a=_o,s=Xs,n.push(u)),Bt(r,-1),l=g}for(b=r.length;b--;)n.push(Au);if(a[5]!==!0)throw new xe.Exception("complete the expression");for(;o--;)n.push(Au);return n.push(Au),new xe(n)};var D5=xe,Kg=D5;Kg.prototype.toPostfix=function(){for(var e=[],t,n,r,i,a,o=[{value:"(",type:4,pre:0}],s=this.value,l=1;l<s.length;l++)if(s[l].type===1||s[l].type===3||s[l].type===13)s[l].type===1&&(s[l].value=Number(s[l].value)),e.push(s[l]);else if(s[l].type===4)o.push(s[l]);else if(s[l].type===5)for(;(n=o.pop()).type!==4;)e.push(n);else if(s[l].type===11){for(;(n=o.pop()).type!==4;)e.push(n);o.push(n)}else{t=s[l],i=t.pre,a=o[o.length-1],r=a.pre;var c=a.value=="Math.pow"&&t.value=="Math.pow";if(i>r)o.push(t);else{for(;r>=i&&!c||c&&i<r;)n=o.pop(),a=o[o.length-1],e.push(n),r=a.pre,c=t.value=="Math.pow"&&a.value=="Math.pow";o.push(t)}}return new Kg(e)};var I5=Kg,Js=I5;Js.prototype.postfixEval=function(e){e=e||{},e.PI=Math.PI,e.E=Math.E;for(var t=[],n,r,i,a=this.value,o=typeof e.n<"u",s=0;s<a.length;s++)if(a[s].type===1)t.push({value:a[s].value,type:1});else if(a[s].type===3)t.push({value:e[a[s].value],type:1});else if(a[s].type===0)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(a[s]):t[t.length-1].value=a[s].value(t[t.length-1].value);else if(a[s].type===7)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(a[s]):t[t.length-1].value=a[s].value(t[t.length-1].value);else if(a[s].type===8){for(var l=[],c=0;c<a[s].numberOfArguments;c++)l.push(t.pop().value);t.push({type:1,value:a[s].value.apply(a[s],l.reverse())})}else a[s].type===10?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r.value=r.concat(n),r.value.push(a[s]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(a[s]),t.push(n)):t.push({type:1,value:a[s].value(r.value,n.value)})):a[s].type===2||a[s].type===9?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(a[s]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(a[s]),t.push(n)):t.push({type:1,value:a[s].value(r.value,n.value)})):a[s].type===12?(n=t.pop(),typeof n.type<"u"&&(n=[n]),r=t.pop(),i=t.pop(),t.push({type:1,value:a[s].value(i.value,r.value,new Js(n))})):a[s].type===13&&(o?t.push({value:e[a[s].value],type:3}):t.push([a[s]]));if(t.length>1)throw new Js.Exception("Uncaught Syntax error");return t[0].value>1e15?"Infinity":parseFloat(t[0].value.toFixed(15))},Js.eval=function(e,t,n){return typeof t>"u"?this.lex(e).toPostfix().postfixEval():typeof n>"u"?typeof t.length<"u"?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t):this.lex(e,t).toPostfix().postfixEval(n)};var F5=Js,pN=F5;pN.prototype.formulaEval=function(){for(var e,t,n,r=[],i=this.value,a=0;a<i.length;a++)i[a].type===1||i[a].type===3?r.push({value:i[a].type===3?i[a].show:i[a].value,type:1}):i[a].type===13?r.push({value:i[a].show,type:1}):i[a].type===0?r[r.length-1]={value:i[a].show+(i[a].show!="-"?"(":"")+r[r.length-1].value+(i[a].show!="-"?")":""),type:0}:i[a].type===7?r[r.length-1]={value:(r[r.length-1].type!=1?"(":"")+r[r.length-1].value+(r[r.length-1].type!=1?")":"")+i[a].show,type:7}:i[a].type===10?(e=r.pop(),t=r.pop(),i[a].show==="P"||i[a].show==="C"?r.push({value:"<sup>"+t.value+"</sup>"+i[a].show+"<sub>"+e.value+"</sub>",type:10}):r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+"<sup>"+e.value+"</sup>",type:1})):i[a].type===2||i[a].type===9?(e=r.pop(),t=r.pop(),r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+i[a].show+(e.type!=1?"(":"")+e.value+(e.type!=1?")":""),type:i[a].type})):i[a].type===12&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:i[a].show+"("+n.value+","+t.value+","+e.value+")",type:12}));return r[0].value};var z5=pN,B5=k5,j5=E5,W5=z5,U5=100,H5=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,Yg,q5=V5;function V5(e,t){Yg=0,t=Math.pow(10,t===void 0?5:t),e=e.replace(/\n+/g," ");function n(i,a,o){if(Yg++>U5)throw Yg=0,new Error("Call stack overflow for "+o);if(i==="")throw new Error(a+"(): '"+o+"' must contain a non-whitespace string");i=r(i,o);var s=K5(i);if(s.length>1||i.indexOf("var(")>-1)return a+"("+i+")";var l=s[0]||"";l==="%"&&(i=i.replace(/\b[0-9\.]+%/g,function(d){return parseFloat(d.slice(0,-1))*.01}));var c=i.replace(new RegExp(l,"gi"),""),u;try{u=W5.eval(c)}catch{return a+"("+i+")"}return l==="%"&&(u*=100),(a.length||l==="%")&&(u=Math.round(u*t)/t),u+=l,u}function r(i,a){i=i.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var o="",s=i,l;l=H5.exec(s);){l[0].index>0&&(o+=s.substring(0,l[0].index));var c=B5("(",")",s.substring([0].index));if(c.body==="")throw new Error("'"+i+"' must contain a non-whitespace string");var u=n(c.body,"",a);o+=c.pre+u,s=c.post}return o+s}return j5(e,/((?:\-[a-z]+\-)?calc)\(/,n)}function K5(e){for(var t=[],n=[],r=/[\.0-9]([%a-z]+)/gi,i=r.exec(e);i;)!i||!i[1]||(n.indexOf(i[1].toLowerCase())===-1&&(t.push(i[1]),n.push(i[1].toLowerCase())),i=r.exec(e));return t}const Gg=_s(q5);var Y5=typeof lo=="object"&&lo&&lo.Object===Object&&lo,G5=Y5,X5=G5,Z5=typeof self=="object"&&self&&self.Object===Object&&self,J5=X5||Z5||Function("return this")(),Lu=J5,Q5=Lu,R5=Q5.Symbol,gN=R5,vN=gN,mN=Object.prototype,ez=mN.hasOwnProperty,tz=mN.toString,Qs=vN?vN.toStringTag:void 0;function nz(e){var t=ez.call(e,Qs),n=e[Qs];try{e[Qs]=void 0;var r=!0}catch{}var i=tz.call(e);return r&&(t?e[Qs]=n:delete e[Qs]),i}var rz=nz,iz=Object.prototype,az=iz.toString;function oz(e){return az.call(e)}var sz=oz,yN=gN,lz=rz,cz=sz,uz="[object Null]",dz="[object Undefined]",bN=yN?yN.toStringTag:void 0;function fz(e){return e==null?e===void 0?dz:uz:bN&&bN in Object(e)?lz(e):cz(e)}var xN=fz;function hz(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Du=hz,pz=xN,gz=Du,vz="[object AsyncFunction]",mz="[object Function]",yz="[object GeneratorFunction]",bz="[object Proxy]";function xz(e){if(!gz(e))return!1;var t=pz(e);return t==mz||t==yz||t==vz||t==bz}var _z=xz,wz=Lu,kz=wz["__core-js_shared__"],Sz=kz,Xg=Sz,_N=function(){var e=/[^.]+$/.exec(Xg&&Xg.keys&&Xg.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Nz(e){return!!_N&&_N in e}var Ez=Nz,Cz=Function.prototype,Tz=Cz.toString;function Mz(e){if(e!=null){try{return Tz.call(e)}catch{}try{return e+""}catch{}}return""}var $z=Mz,Oz=_z,Pz=Ez,Az=Du,Lz=$z,Dz=/[\\^$.*+?()[\]{}|]/g,Iz=/^\[object .+?Constructor\]$/,Fz=Function.prototype,zz=Object.prototype,Bz=Fz.toString,jz=zz.hasOwnProperty,Wz=RegExp("^"+Bz.call(jz).replace(Dz,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Uz(e){if(!Az(e)||Pz(e))return!1;var t=Oz(e)?Wz:Iz;return t.test(Lz(e))}var Hz=Uz;function qz(e,t){return e==null?void 0:e[t]}var Vz=qz,Kz=Hz,Yz=Vz;function Gz(e,t){var n=Yz(e,t);return Kz(n)?n:void 0}var wN=Gz,Xz=wN,Zz=Xz(Object,"create"),Iu=Zz,kN=Iu;function Jz(){this.__data__=kN?kN(null):{},this.size=0}var Qz=Jz;function Rz(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var eB=Rz,tB=Iu,nB="__lodash_hash_undefined__",rB=Object.prototype,iB=rB.hasOwnProperty;function aB(e){var t=this.__data__;if(tB){var n=t[e];return n===nB?void 0:n}return iB.call(t,e)?t[e]:void 0}var oB=aB,sB=Iu,lB=Object.prototype,cB=lB.hasOwnProperty;function uB(e){var t=this.__data__;return sB?t[e]!==void 0:cB.call(t,e)}var dB=uB,fB=Iu,hB="__lodash_hash_undefined__";function pB(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fB&&t===void 0?hB:t,this}var gB=pB,vB=Qz,mB=eB,yB=oB,bB=dB,xB=gB;function wo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}wo.prototype.clear=vB,wo.prototype.delete=mB,wo.prototype.get=yB,wo.prototype.has=bB,wo.prototype.set=xB;var _B=wo;function wB(){this.__data__=[],this.size=0}var kB=wB;function SB(e,t){return e===t||e!==e&&t!==t}var NB=SB,EB=NB;function CB(e,t){for(var n=e.length;n--;)if(EB(e[n][0],t))return n;return-1}var Fu=CB,TB=Fu,MB=Array.prototype,$B=MB.splice;function OB(e){var t=this.__data__,n=TB(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():$B.call(t,n,1),--this.size,!0}var PB=OB,AB=Fu;function LB(e){var t=this.__data__,n=AB(t,e);return n<0?void 0:t[n][1]}var DB=LB,IB=Fu;function FB(e){return IB(this.__data__,e)>-1}var zB=FB,BB=Fu;function jB(e,t){var n=this.__data__,r=BB(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var WB=jB,UB=kB,HB=PB,qB=DB,VB=zB,KB=WB;function ko(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ko.prototype.clear=UB,ko.prototype.delete=HB,ko.prototype.get=qB,ko.prototype.has=VB,ko.prototype.set=KB;var YB=ko,GB=wN,XB=Lu,ZB=GB(XB,"Map"),JB=ZB,SN=_B,QB=YB,RB=JB;function e6(){this.size=0,this.__data__={hash:new SN,map:new(RB||QB),string:new SN}}var t6=e6;function n6(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var r6=n6,i6=r6;function a6(e,t){var n=e.__data__;return i6(t)?n[typeof t=="string"?"string":"hash"]:n.map}var zu=a6,o6=zu;function s6(e){var t=o6(this,e).delete(e);return this.size-=t?1:0,t}var l6=s6,c6=zu;function u6(e){return c6(this,e).get(e)}var d6=u6,f6=zu;function h6(e){return f6(this,e).has(e)}var p6=h6,g6=zu;function v6(e,t){var n=g6(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var m6=v6,y6=t6,b6=l6,x6=d6,_6=p6,w6=m6;function So(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}So.prototype.clear=y6,So.prototype.delete=b6,So.prototype.get=x6,So.prototype.has=_6,So.prototype.set=w6;var k6=So,NN=k6,S6="Expected a function";function Zg(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(S6);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Zg.Cache||NN),n}Zg.Cache=NN;var N6=Zg;const E6=_s(N6);var EN="__react_svg_text_measurement_id";function C6(e,t){try{var n=document.getElementById(EN);if(!n){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("aria-hidden","true"),r.style.width="0",r.style.height="0",r.style.position="absolute",r.style.top="-100%",r.style.left="-100%",n=document.createElementNS("http://www.w3.org/2000/svg","text"),n.setAttribute("id",EN),r.appendChild(n),document.body.appendChild(r)}return Object.assign(n.style,t),n.textContent=e,n.getComputedTextLength()}catch{return null}}const Jg=E6(C6,function(e,t){return e+"_"+JSON.stringify(t)});var T6=["verticalAnchor","scaleToFit","angle","width","lineHeight","capHeight","children","style"];function M6(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Qg(e){return typeof e=="number"}function CN(e){return typeof e=="number"&&Number.isFinite(e)||typeof e=="string"}function TN(e){var t=e.verticalAnchor,n=t===void 0?"end":t,r=e.scaleToFit,i=r===void 0?!1:r,a=e.angle,o=e.width,s=e.lineHeight,l=s===void 0?"1em":s,c=e.capHeight,u=c===void 0?"0.71em":c,d=e.children,f=e.style,g=M6(e,T6),p=g.x,v=p===void 0?0:p,m=g.y,x=m===void 0?0:m,y=!CN(v)||!CN(x),b=_.useMemo(function(){var C=d==null?[]:d.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:C.map(function(T){return{word:T,wordWidth:Jg(T,f)||0}}),spaceWidth:Jg(" ",f)||0}},[d,f]),k=b.wordsWithWidth,w=b.spaceWidth,S=_.useMemo(function(){return y?[]:o||i?k.reduce(function(C,T){var O=T.word,P=T.wordWidth,M=C[C.length-1];if(M&&(o==null||i||(M.width||0)+P+w<o))M.words.push(O),M.width=M.width||0,M.width+=P+w;else{var $={words:[O],width:P};C.push($)}return C},[]):[{words:d==null?[]:d.toString().split(/(?:(?!\u00A0+)\s+)/)}]},[y,o,i,d,k,w]),N=_.useMemo(function(){var C=y?"":Gg(n==="start"?"calc("+u+")":n==="middle"?"calc("+(S.length-1)/2+" * -"+l+" + ("+u+" / 2))":"calc("+(S.length-1)+" * -"+l+")");return C},[y,n,u,S.length,l]),E=_.useMemo(function(){var C=[];if(y)return"";if(Qg(v)&&Qg(x)&&Qg(o)&&i&&S.length>0){var T=S[0].width||1,O=i==="shrink-only"?Math.min(o/T,1):o/T,P=O,M=v-O*v,$=x-P*x;C.push("matrix("+O+", 0, 0, "+P+", "+M+", "+$+")")}return a&&C.push("rotate("+a+", "+v+", "+x+")"),C.length>0?C.join(" "):""},[y,v,x,o,i,S,a]);return{wordsByLines:S,startDy:N,transform:E}}var $6=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function Rg(){return Rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rg.apply(this,arguments)}function O6(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var P6={overflow:"visible"};function ev(e){var t=e.dx,n=t===void 0?0:t,r=e.dy,i=r===void 0?0:r,a=e.textAnchor,o=a===void 0?"start":a,s=e.innerRef,l=e.innerTextRef;e.verticalAnchor,e.angle;var c=e.lineHeight,u=c===void 0?"1em":c;e.scaleToFit,e.capHeight,e.width;var d=O6(e,$6),f=d.x,g=f===void 0?0:f,p=d.fontSize,v=TN(e),m=v.wordsByLines,x=v.startDy,y=v.transform;return _.createElement("svg",{ref:s,x:n,y:i,fontSize:p,style:P6},m.length>0?_.createElement("text",Rg({ref:l,transform:y},d,{textAnchor:o}),m.map(function(b,k){return _.createElement("tspan",{key:k,x:g,dy:k===0?x:u},b.words.join(" "))})):null)}const A6=Object.freeze(Object.defineProperty({__proto__:null,Text:ev,getStringWidth:Jg,useText:TN},Symbol.toStringTag,{value:"Module"}));var ln={top:"top",left:"left",bottom:"bottom"};function L6(e){var t=e.labelOffset,n=e.labelProps,r=e.orientation,i=e.range,a=e.tickLabelFontSize,o=e.tickLength,s=r===ln.left||r===ln.top?-1:1,l,c,u;if(r===ln.top||r===ln.bottom){var d=r===ln.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(i[0])+Number(i[i.length-1]))/2,c=s*(o+t+a+d)}else l=s*((Number(i[0])+Number(i[i.length-1]))/2),c=-(o+t),u="rotate("+s*90+")";return{x:l,y:c,transform:u}}function Rs(){return Rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rs.apply(this,arguments)}function D6(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,i=e.tickClassName,a=e.tickComponent,o=e.tickLabelProps,s=e.tickStroke,l=s===void 0?"#222":s,c=e.tickTransform,u=e.ticks,d=e.strokeWidth,f=e.tickLineProps;return u.map(function(g){var p,v=g.value,m=g.index,x=g.from,y=g.to,b=g.formattedValue,k=(p=o[m])!=null?p:{},w=Math.max(10,typeof k.fontSize=="number"&&k.fontSize||0),S=y.y+(n&&r!==ln.top?w:0);return _.createElement(tt,{key:"visx-tick-"+v+"-"+m,className:$e("visx-axis-tick",i),transform:c},!t&&_.createElement(mg,Rs({from:x,to:y,stroke:l,strokeWidth:d,strokeLinecap:"square"},f)),a?a(Rs({},k,{x:y.x,y:S,formattedValue:b})):_.createElement(ev,Rs({x:y.x,y:S},k),b))})}function el(){return el=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},el.apply(this,arguments)}var MN={textAnchor:"middle",fontFamily:"Arial",fontSize:10,fill:"#222"};function I6(e){var t=e.axisFromPoint,n=e.axisLineClassName,r=e.axisToPoint,i=e.hideAxisLine,a=e.hideTicks,o=e.horizontal,s=e.label,l=s===void 0?"":s,c=e.labelClassName,u=e.labelOffset,d=u===void 0?14:u,f=e.labelProps,g=e.orientation,p=g===void 0?ln.bottom:g,v=e.scale,m=e.stroke,x=m===void 0?"#222":m,y=e.strokeDasharray,b=e.strokeWidth,k=b===void 0?1:b,w=e.tickClassName,S=e.tickComponent,N=e.tickLineProps,E=e.tickLabelProps,C=e.tickLength,T=C===void 0?8:C,O=e.tickStroke,P=O===void 0?"#222":O,M=e.tickTransform,$=e.ticks,A=e.ticksComponent,I=A===void 0?D6:A,j=el({},MN,f),B=el({},MN,typeof E=="object"?E:null),H=$.map(function(D){var W=D.value,Y=D.index;return typeof E=="function"?E(W,Y,$):B}),F=Math.max.apply(Math,[10].concat(H.map(function(D){return typeof D.fontSize=="number"?D.fontSize:0})));return _.createElement(_.Fragment,null,I({hideTicks:a,horizontal:o,orientation:p,scale:v,tickClassName:w,tickComponent:S,tickLabelProps:H,tickStroke:P,tickTransform:M,ticks:$,strokeWidth:k,tickLineProps:N}),!i&&_.createElement(mg,{className:$e("visx-axis-line",n),from:t,to:r,stroke:x,strokeWidth:k,strokeDasharray:y}),l&&_.createElement(ev,el({className:$e("visx-axis-label",c)},L6({labelOffset:d,labelProps:j,orientation:p,range:v.range(),tickLabelFontSize:F,tickLength:T}),j),l))}function F6(e,t){t===void 0&&(t="center");var n=e;if(t!=="start"&&"bandwidth"in n){var r=n.bandwidth();return t==="center"&&(r/=2),n.round()&&(r=Math.round(r)),function(i){var a=n(i);return typeof a=="number"?a+r:a}}return e}function z6(e){var t=e;return"tickFormat"in t?t.tickFormat():Vk}var No=function(){function e(n){var r=n.x,i=r===void 0?0:r,a=n.y,o=a===void 0?0:a;this.x=0,this.y=0,this.x=i,this.y=o}var t=e.prototype;return t.value=function(){return{x:this.x,y:this.y}},t.toArray=function(){return[this.x,this.y]},e}();function B6(e,t){return new No({x:e.x+t.x,y:e.y+t.y})}function j6(e,t){return new No({x:e.x-t.x,y:e.y-t.y})}const W6=Object.freeze(Object.defineProperty({__proto__:null,Point:No,subtractPoints:j6,sumPoints:B6},Symbol.toStringTag,{value:"Module"}));function Bu(e,t){var n=e.x,r=e.y;return new No(t?{x:n,y:r}:{x:r,y:n})}function tv(){return tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tv.apply(this,arguments)}var nv=0;function U6(e){return e===void 0&&(e=nv),typeof e=="number"?{start:e,end:e}:tv({start:nv,end:nv},e)}var H6=["children","axisClassName","hideAxisLine","hideTicks","hideZero","innerRef","left","numTicks","orientation","rangePadding","scale","tickFormat","tickLength","tickValues","top"];function rv(){return rv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rv.apply(this,arguments)}function q6(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function $N(e){var t=e.children,n=t===void 0?I6:t,r=e.axisClassName,i=e.hideAxisLine,a=i===void 0?!1:i,o=e.hideTicks,s=o===void 0?!1:o,l=e.hideZero,c=l===void 0?!1:l,u=e.innerRef,d=e.left,f=d===void 0?0:d,g=e.numTicks,p=g===void 0?10:g,v=e.orientation,m=v===void 0?ln.bottom:v,x=e.rangePadding,y=x===void 0?0:x,b=e.scale,k=e.tickFormat,w=e.tickLength,S=w===void 0?8:w,N=e.tickValues,E=e.top,C=E===void 0?0:E,T=q6(e,H6),O=k??z6(b),P=m===ln.left,M=m===ln.top,$=M||m===ln.bottom,A=F6(b),I=P||M?-1:1,j=b.range(),B=U6(y),H=Bu({x:Number(j[0])+.5-B.start,y:0},$),F=Bu({x:Number(j[j.length-1])+.5+B.end,y:0},$),D=(N??qk(b,p)).filter(function(Y){return!c||Y!==0&&Y!=="0"}).map(function(Y,U){return{value:Y,index:U}}),W=D.map(function(Y){var U=Y.value,K=Y.index,ee=Hk(A(U));return{value:U,index:K,from:Bu({x:ee,y:0},$),to:Bu({x:ee,y:S*I},$),formattedValue:O(U,K,D)}});return _.createElement(tt,{className:$e("visx-axis",r),innerRef:u,top:C,left:f},n(rv({},T,{axisFromPoint:H,axisToPoint:F,hideAxisLine:a,hideTicks:s,hideZero:c,horizontal:$,numTicks:p,orientation:m,rangePadding:y,scale:b,tickFormat:O,tickLength:S,tickPosition:A,tickSign:I,ticks:W})))}var V6=["axisClassName","labelOffset","tickLength","tickLabelProps"];function ju(){return ju=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ju.apply(this,arguments)}function K6(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Y6={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function tl(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?36:n,i=e.tickLength,a=i===void 0?8:i,o=e.tickLabelProps,s=K6(e,V6),l=typeof o=="function"?o:ju({},Y6,o);return _.createElement($N,ju({axisClassName:$e("visx-axis-left",t),labelOffset:r,orientation:ln.left,tickLabelProps:l,tickLength:a},s))}var G6=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Wu(){return Wu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wu.apply(this,arguments)}function X6(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Z6={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function xa(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?8:n,i=e.tickLength,a=i===void 0?8:i,o=e.tickLabelProps,s=X6(e,G6),l=typeof o=="function"?o:Wu({},Z6,o);return _.createElement($N,Wu({axisClassName:$e("visx-axis-bottom",t),labelOffset:r,orientation:ln.bottom,tickLabelProps:l,tickLength:a},s))}var iv={};const Uu=Un(W6);function J6(e){return!!e&&e instanceof Element}function Q6(e){return!!e&&(e instanceof SVGElement||"ownerSVGElement"in e)}function R6(e){return!!e&&"createSVGPoint"in e}function ej(e){return!!e&&"getScreenCTM"in e}function tj(e){return!!e&&"changedTouches"in e}function nj(e){return!!e&&"clientX"in e}function rj(e){return!!e&&(e instanceof Event||"nativeEvent"in e&&e.nativeEvent instanceof Event)}function nl(){return nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nl.apply(this,arguments)}var av={x:0,y:0};function ij(e){if(!e)return nl({},av);if(tj(e))return e.changedTouches.length>0?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:nl({},av);if(nj(e))return{x:e.clientX,y:e.clientY};var t=e==null?void 0:e.target,n=t&&"getBoundingClientRect"in t?t.getBoundingClientRect():null;return n?{x:n.x+n.width/2,y:n.y+n.height/2}:nl({},av)}function ov(e,t){if(!e||!t)return null;var n=ij(t),r=Q6(e)?e.ownerSVGElement:e,i=ej(r)?r.getScreenCTM():null;if(R6(r)&&i){var a=r.createSVGPoint();return a.x=n.x,a.y=n.y,a=a.matrixTransform(i.inverse()),new No({x:a.x,y:a.y})}var o=e.getBoundingClientRect();return new No({x:n.x-o.left-e.clientLeft,y:n.y-o.top-e.clientTop})}function ON(e,t){if(J6(e)&&t)return ov(e,t);if(rj(e)){var n=e,r=n.target;if(r)return ov(r,n)}return null}const aj=Un(Object.freeze(Object.defineProperty({__proto__:null,localPoint:ON,touchPoint:ov},Symbol.toStringTag,{value:"Module"})));var sv={};sv.__esModule=!0,sv.default=oj;var Hu=_;function oj(e){var t=(0,Hu.useState)(e),n=t[0],r=t[1],i=(0,Hu.useRef)(null),a=(0,Hu.useCallback)(function(o,s){i.current=s||null,r(o)},[r]);return(0,Hu.useLayoutEffect)(function(){i.current&&(i.current(n),i.current=null)},[n]),[n,a]}var lv={},cv={};cv.__esModule=!0,cv.default=sj;function sj(e,t,n){return Math.min(Math.max(e,t),n)}var uv={};uv.__esModule=!0,uv.default=uj;function lj(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=cj(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
312
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cj(e,t){if(e){if(typeof e=="string")return PN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PN(e,t)}}function PN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uj(e,t){for(var n=e,r=1/0,i=lj(t),a;!(a=i()).done;){var o=a.value,s=Math.sqrt(Math.pow(o.x-e.x,2)+Math.pow(o.y-e.y,2));s<r&&(r=s,n={x:o.x,y:o.y})}return n}lv.__esModule=!0,lv.default=fj;var AN=LN(cv),dj=LN(uv);function LN(e){return e&&e.__esModule?e:{default:e}}function fj(e,t,n){var r,i,a,o;return n===void 0&&(n={}),t.length>0?(0,dj.default)(e,t):{x:(0,AN.default)(e.x,(r=n.xMin)!=null?r:-1/0,(i=n.xMax)!=null?i:1/0),y:(0,AN.default)(e.y,(a=n.yMin)!=null?a:-1/0,(o=n.yMax)!=null?o:1/0)}}var dv={};dv.__esModule=!0,dv.default=gj;var hj=_;function pj(e,t,n){if(n===void 0&&(n=1),!e)return[];for(var r=[],i=e.getTotalLength(),a=0;a<=i;a+=n){var o=e.getPointAtLength(a),s=o.matrixTransform(t);r.push(s)}return r}function gj(e){var t=(0,hj.useMemo)(function(){if(!e)return[];var n=e.getCTM()||new DOMMatrix;return pj(e,n)},[e==null?void 0:e.getTotalLength()]);return t}iv.__esModule=!0,iv.default=yj;var _a=_,Eo=Uu,DN=aj,vj=fv(sv),IN=fv(lv),mj=fv(dv);function fv(e){return e&&e.__esModule?e:{default:e}}function mr(){return mr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mr.apply(this,arguments)}function yj(e){var t=e===void 0?{}:e,n=t.resetOnStart,r=n===void 0?!1:n,i=t.snapToPointer,a=i===void 0?!0:i,o=t.onDragEnd,s=t.onDragMove,l=t.onDragStart,c=t.x,u=t.y,d=t.dx,f=t.dy,g=t.isDragging,p=t.restrict,v=p===void 0?{}:p,m=t.restrictToPath,x=(0,_a.useRef)({x:c,y:u,dx:d,dy:f}),y=(0,vj.default)({x:c,y:u,dx:d??0,dy:f??0,isDragging:!1}),b=y[0],k=y[1],w=(0,_a.useState)(new Eo.Point({x:0,y:0})),S=w[0],N=w[1];(0,_a.useEffect)(function(){(x.current.x!==c||x.current.y!==u||x.current.dx!==d||x.current.dy!==f)&&(x.current={x:c,y:u,dx:d,dy:f},k(function(P){return mr({},P,{x:c,y:u,dx:d??0,dy:f??0})}))}),(0,_a.useEffect)(function(){g!==void 0&&b.isDragging!==g&&k(function(P){return mr({},P,{isDragging:g})})},[b.isDragging,g,k]);var E=(0,mj.default)(m),C=(0,_a.useCallback)(function(P){P.persist(),k(function(M){var $=M.x,A=$===void 0?0:$,I=M.y,j=I===void 0?0:I,B=M.dx,H=M.dy,F=new Eo.Point({x:(A||0)+B,y:(j||0)+H}),D=(0,DN.localPoint)(P)||new Eo.Point({x:0,y:0}),W=a?D:F,Y=(0,IN.default)(W,E,v);return N((0,Eo.subtractPoints)(F,D)),{isDragging:!0,dx:r?0:M.dx,dy:r?0:M.dy,x:r?Y.x:Y.x-M.dx,y:r?Y.y:Y.y-M.dy}},l&&function(M){l(mr({},M,{event:P}))})},[l,r,v,E,k,a]),T=(0,_a.useCallback)(function(P){P.persist(),k(function(M){if(!M.isDragging)return M;var $=M.x,A=$===void 0?0:$,I=M.y,j=I===void 0?0:I,B=(0,DN.localPoint)(P)||new Eo.Point({x:0,y:0}),H=a?B:(0,Eo.sumPoints)(B,S),F=(0,IN.default)(H,E,v);return mr({},M,{dx:F.x-A,dy:F.y-j})},s&&function(M){M.isDragging&&s(mr({},M,{event:P}))})},[k,s,a,S,E,v]),O=(0,_a.useCallback)(function(P){P.persist(),k(function(M){return mr({},M,{isDragging:!1})},o&&function(M){o(mr({},M,{event:P}))})},[o,k]);return mr({},b,{dragEnd:O,dragMove:T,dragStart:C})}var qu=FN,rl=pv(di),hv=pv(_),bj=pv(iv);function pv(e){return e&&e.__esModule?e:{default:e}}function FN(e){var t=e.captureDragArea,n=t===void 0?!0:t,r=e.snapToPointer,i=r===void 0?!0:r,a=e.children,o=e.dx,s=e.dy,l=e.height,c=e.onDragEnd,u=e.onDragMove,d=e.onDragStart,f=e.resetOnStart,g=e.width,p=e.x,v=e.y,m=e.isDragging,x=e.restrict,y=e.restrictToPath,b=(0,bj.default)({resetOnStart:f,snapToPointer:i,onDragEnd:c,onDragMove:u,onDragStart:d,x:p,y:v,dx:o,dy:s,isDragging:m,restrict:x,restrictToPath:y});return hv.default.createElement(hv.default.Fragment,null,b.isDragging&&n&&hv.default.createElement("rect",{width:g,height:l,onPointerDown:b.dragStart,onPointerMove:b.dragMove,onPointerUp:b.dragEnd,fill:"transparent"}),a(b))}FN.propTypes={children:rl.default.func.isRequired,width:rl.default.number.isRequired,height:rl.default.number.isRequired,captureDragArea:rl.default.bool,isDragging:rl.default.bool};function Vu(e,t){if("invert"in e&&typeof e.invert<"u")return e.invert(t).valueOf();var n=e.range(),r=n[0],i=n[1],a=0,o="step"in e&&typeof e.step<"u"?e.step():1,s=o*(i-r)/Math.abs(i-r);if(s>0)for(;t>r+s*(a+1);)a+=1;else for(;t<r+s*(a+1);)a+=1;return a}function zN(e,t,n,r){var i,a=Vu(e,t+(t<n?-r:r)),o=Vu(e,n+(n<t?-r:r)),s=Math.min(a,o),l=Math.max(a,o);if("invert"in e&&typeof e.invert<"u")i={start:s,end:l};else{for(var c=[],u=e.domain(),d=s;d<=l;d+=1)c.push(u[d]);i={values:c}}return i}function gv(e){if(typeof window<"u"&&window.TouchEvent&&e instanceof TouchEvent)return{pageX:e.touches[0].pageX,pageY:e.touches[0].pageY};var t=e;return{pageX:t.pageX,pageY:t.pageY}}function xj(e,t){var n;return function(){for(var i=this,a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];clearTimeout(n),n=setTimeout(function(){e.apply(i,o)},t)}}function Tn(){return Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tn.apply(this,arguments)}function _j(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vv(e,t)}function vv(e,t){return vv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},vv(e,t)}var BN=function(e){_j(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r=e.call.apply(e,[this].concat(a))||this,r.handleDragStart=function(s){var l=r.props,c=l.onBrushHandleChange,u=l.type,d=l.onBrushStart;c&&c(u,gv(s.event)),d&&d(s)},r.handleDragMove=function(s){var l=r.props,c=l.updateBrush,u=l.type,d=l.isControlled;!s.isDragging||d||c(function(f){var g=f.start,p=f.end,v=0,m=Math.max(g.x,p.x),x=Math.min(g.x,p.x),y=Math.max(g.y,p.y),b=Math.min(g.y,p.y);switch(u){case"right":return v=m+s.dx,Tn({},f,{activeHandle:u,extent:Tn({},f.extent,{x0:Math.max(Math.min(v,g.x),f.bounds.x0),x1:Math.min(Math.max(v,g.x),f.bounds.x1)})});case"left":return v=x+s.dx,Tn({},f,{activeHandle:u,extent:Tn({},f.extent,{x0:Math.min(v,p.x),x1:Math.max(v,p.x)})});case"bottom":return v=y+s.dy,Tn({},f,{activeHandle:u,extent:Tn({},f.extent,{y0:Math.min(v,g.y),y1:Math.max(v,g.y)})});case"top":return v=b+s.dy,Tn({},f,{activeHandle:u,extent:Tn({},f.extent,{y0:Math.min(v,p.y),y1:Math.max(v,p.y)})});default:return f}})},r.handleDragEnd=function(){var s=r.props,l=s.updateBrush,c=s.onBrushEnd,u=s.onBrushHandleChange,d=s.isControlled;d||l(function(f){var g=f.start,p=f.end,v=f.extent;g.x=Math.min(v.x0,v.x1),g.y=Math.min(v.y0,v.y0),p.x=Math.max(v.x0,v.x1),p.y=Math.max(v.y0,v.y1);var m=Tn({},f,{start:g,end:p,activeHandle:null,isBrushing:!1,extent:{x0:Math.min(g.x,p.x),x1:Math.max(g.x,p.x),y0:Math.min(g.y,p.y),y1:Math.max(g.y,p.y)}});return c&&c(m),m}),u&&u()},r}var n=t.prototype;return n.render=function(){var i=this,a=this.props,o=a.stageWidth,s=a.stageHeight,l=a.brush,c=a.type,u=a.handle,d=a.isControlled,f=a.isDragInProgress,g=a.renderBrushHandle,p=u.x,v=u.y,m=u.width,x=u.height,y=c==="right"||c==="left"?"ew-resize":"ns-resize";return _.createElement(qu,{width:o,height:s,onDragStart:this.handleDragStart,onDragMove:this.handleDragMove,onDragEnd:this.handleDragEnd,resetOnStart:!0,isDragging:d?f:void 0},function(b){var k=b.dragStart,w=b.dragEnd,S=b.dragMove,N=b.isDragging;return _.createElement("g",null,N&&_.createElement("rect",{fill:"transparent",width:o,height:s,style:{cursor:y},onPointerMove:S,onPointerUp:d?void 0:w,onPointerLeave:d?void 0:w}),!g&&_.createElement("rect",{x:p,y:v,width:m,height:x,fill:"transparent",className:"visx-brush-handle-"+c,onPointerDown:k,onPointerMove:S,onPointerUp:d?void 0:w,style:{cursor:y,pointerEvents:l.activeHandle||l.isBrushing?"none":"all"}}),g&&_.createElement("g",{onPointerDown:k,onPointerMove:S,onPointerUp:d?void 0:w},g(Tn({},i.props.handle,{height:s,className:"visx-brush-handle-"+c,isBrushActive:l.extent.x0!==-1&&l.extent.x1!==-1}))))})},t}(_.Component);BN.propTypes={stageWidth:V.number.isRequired,stageHeight:V.number.isRequired,updateBrush:V.func.isRequired,onBrushStart:V.func,onBrushEnd:V.func,handle:V.shape({x:V.number.isRequired,y:V.number.isRequired,width:V.number.isRequired,height:V.number.isRequired}).isRequired,isControlled:V.bool,isDragInProgress:V.bool,onBrushHandleChange:V.func,renderBrushHandle:V.func};function cn(){return cn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cn.apply(this,arguments)}function wj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,mv(e,t)}function mv(e,t){return mv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},mv(e,t)}var yv=function(e){wj(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r=e.call.apply(e,[this].concat(a))||this,r.cornerDragMove=function(s){var l=r.props,c=l.updateBrush,u=l.type;s.isDragging&&c(function(d){var f=d.start,g=d.end,p=Math.max(f.x,g.x),v=Math.min(f.x,g.x),m=Math.max(f.y,g.y),x=Math.min(f.y,g.y),y=0,b=0;switch(u){case"topRight":return y=p+s.dx,b=x+s.dy,cn({},d,{activeHandle:u,extent:cn({},d.extent,{x0:Math.max(Math.min(y,f.x),d.bounds.x0),x1:Math.min(Math.max(y,f.x),d.bounds.x1),y0:Math.max(Math.min(b,g.y),d.bounds.y0),y1:Math.min(Math.max(b,g.y),d.bounds.y1)})});case"topLeft":return y=v+s.dx,b=x+s.dy,cn({},d,{activeHandle:u,extent:cn({},d.extent,{x0:Math.max(Math.min(y,g.x),d.bounds.x0),x1:Math.min(Math.max(y,g.x),d.bounds.x1),y0:Math.max(Math.min(b,g.y),d.bounds.y0),y1:Math.min(Math.max(b,g.y),d.bounds.y1)})});case"bottomLeft":return y=v+s.dx,b=m+s.dy,cn({},d,{activeHandle:u,extent:cn({},d.extent,{x0:Math.max(Math.min(y,g.x),d.bounds.x0),x1:Math.min(Math.max(y,g.x),d.bounds.x1),y0:Math.max(Math.min(b,f.y),d.bounds.y0),y1:Math.min(Math.max(b,f.y),d.bounds.y1)})});case"bottomRight":return y=p+s.dx,b=m+s.dy,cn({},d,{activeHandle:u,extent:cn({},d.extent,{x0:Math.max(Math.min(y,f.x),d.bounds.x0),x1:Math.min(Math.max(y,f.x),d.bounds.x1),y0:Math.max(Math.min(b,f.y),d.bounds.y0),y1:Math.min(Math.max(b,f.y),d.bounds.y1)})});default:return d}})},r.cornerDragEnd=function(){var s=r.props,l=s.updateBrush,c=s.onBrushEnd;l(function(u){var d=u.start,f=u.end,g=u.extent;d.x=Math.min(g.x0,g.x1),d.y=Math.min(g.y0,g.y0),f.x=Math.max(g.x0,g.x1),f.y=Math.max(g.y0,g.y1);var p=cn({},u,{start:d,end:f,activeHandle:null,domain:{x0:Math.min(d.x,f.x),x1:Math.max(d.x,f.x),y0:Math.min(d.y,f.y),y1:Math.max(d.y,f.y)}});return c&&c(p),p})},r}var n=t.prototype;return n.render=function(){var i=this.props,a=i.type,o=i.brush,s=i.stageWidth,l=i.stageHeight,c=i.style,u=i.corner,d=(c==null?void 0:c.cursor)||(a==="topLeft"||a==="bottomRight"?"nwse-resize":"nesw-resize"),f=o.activeHandle||o.isBrushing?"none":"all";return _.createElement(qu,{width:s,height:l,onDragMove:this.cornerDragMove,onDragEnd:this.cornerDragEnd,resetOnStart:!0},function(g){var p=g.dragMove,v=g.dragEnd,m=g.dragStart,x=g.isDragging;return _.createElement("g",null,x&&_.createElement("rect",{fill:"transparent",width:s,height:l,style:{cursor:d},onPointerMove:p,onPointerUp:v}),_.createElement("rect",cn({fill:"transparent",onPointerDown:m,onPointerMove:p,onPointerUp:v,className:"visx-brush-corner-"+a,style:cn({cursor:d,pointerEvents:f},c)},u)))})},t}(_.Component);yv.propTypes={stageWidth:V.number.isRequired,stageHeight:V.number.isRequired,updateBrush:V.func.isRequired,onBrushEnd:V.func,corner:V.shape({x:V.number.isRequired,y:V.number.isRequired,width:V.number.isRequired,height:V.number.isRequired}).isRequired},yv.defaultProps={style:{}};function _i(){return _i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_i.apply(this,arguments)}function kj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,bv(e,t)}function bv(e,t){return bv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},bv(e,t)}var Sj={cursor:"move"},xv=function(e){kj(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r=e.call.apply(e,[this].concat(a))||this,r.selectionDragStart=function(s){var l=r.props,c=l.onMoveSelectionChange,u=l.onBrushStart;c&&c("move",gv(s.event)),u&&u(s)},r.selectionDragMove=function(s){var l=r.props,c=l.updateBrush,u=l.isControlled;u||c(function(d){var f=d.start,g=f.x,p=f.y,v=d.end,m=v.x,x=v.y,y=s.dx>0?Math.min(s.dx,d.bounds.x1-m):Math.max(s.dx,d.bounds.x0-g),b=s.dy>0?Math.min(s.dy,d.bounds.y1-x):Math.max(s.dy,d.bounds.y0-p);return _i({},d,{isBrushing:!0,extent:_i({},d.extent,{x0:g+y,x1:m+y,y0:p+b,y1:x+b})})})},r.selectionDragEnd=function(){var s=r.props,l=s.updateBrush,c=s.onBrushEnd,u=s.onMoveSelectionChange,d=s.isControlled;d||l(function(f){var g=_i({},f,{isBrushing:!1,start:_i({},f.start,{x:Math.min(f.extent.x0,f.extent.x1),y:Math.min(f.extent.y0,f.extent.y1)}),end:_i({},f.end,{x:Math.max(f.extent.x0,f.extent.x1),y:Math.max(f.extent.y0,f.extent.y1)})});return c&&c(g),g}),u&&u()},r}var n=t.prototype;return n.render=function(){var i=this.props,a=i.width,o=i.height,s=i.stageWidth,l=i.stageHeight,c=i.brush,u=i.disableDraggingSelection,d=i.onMouseLeave,f=i.onMouseMove,g=i.onMouseUp,p=i.onClick,v=i.selectedBoxStyle,m=i.isControlled,x=i.isDragInProgress;return _.createElement(qu,{width:a,height:o,resetOnStart:!0,onDragStart:this.selectionDragStart,onDragMove:this.selectionDragMove,onDragEnd:this.selectionDragEnd,isDragging:m?x:void 0},function(y){var b=y.isDragging,k=y.dragStart,w=y.dragEnd,S=y.dragMove;return _.createElement("g",null,b&&_.createElement("rect",{width:s,height:l,fill:"transparent",onPointerUp:m?void 0:w,onPointerMove:S,onPointerLeave:m?void 0:w,style:Sj}),_.createElement("rect",_i({x:Math.min(c.extent.x0,c.extent.x1),y:Math.min(c.extent.y0,c.extent.y1),width:a,height:o,className:"visx-brush-selection",onPointerDown:u?void 0:k,onPointerLeave:function(E){d&&d(E)},onPointerMove:function(E){S(E),f&&f(E)},onPointerUp:function(E){m||w(E),g&&g(E)},onClick:function(E){p&&p(E)},style:{pointerEvents:c.isBrushing||c.activeHandle?"none":"all",cursor:u?void 0:"move"}},v)))})},t}(_.Component);xv.propTypes={width:V.number.isRequired,height:V.number.isRequired,stageWidth:V.number.isRequired,stageHeight:V.number.isRequired,updateBrush:V.func.isRequired,onMoveSelectionChange:V.func,onBrushStart:V.func,onBrushEnd:V.func,disableDraggingSelection:V.bool.isRequired,onMouseLeave:V.func,onMouseMove:V.func,onMouseUp:V.func,onClick:V.func,isControlled:V.bool,isDragInProgress:V.bool},xv.defaultProps={onMouseLeave:null,onMouseUp:null,onMouseMove:null,onClick:null};function _v(){return _v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_v.apply(this,arguments)}function wv(e){return _.createElement(bi,_v({className:"visx-brush-overlay",fill:"transparent",x:0,y:0},e))}wv.propTypes={width:V.number.isRequired,height:V.number.isRequired,onClick:V.func,onDoubleClick:V.func,onPointerDown:V.func,onPointerLeave:V.func,onPointerMove:V.func,onPointerUp:V.func};function Wt(){return Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wt.apply(this,arguments)}function Nj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,kv(e,t)}function kv(e,t){return kv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},kv(e,t)}var Sv=function(e){Nj(t,e);function t(r){var i;i=e.call(this,r)||this,i.mouseUpTime=0,i.mouseDownTime=0,i.getIdleState=function(){var s=i.props,l=s.width,c=s.height;return{start:{x:0,y:0},end:{x:0,y:0},extent:{x0:-1,x1:-1,y0:-1,y1:-1},bounds:{x0:0,x1:l,y0:0,y1:c},isBrushing:!1,brushPageOffset:void 0,activeHandle:null,brushingType:void 0}},i.handleWindowPointerUp=function(){var s=i.props,l=s.useWindowMoveEvents,c=s.onBrushEnd,u=s.resetOnEnd,d=i.state.brushingType;l&&d&&i.updateBrush(function(f){var g=f.start,p=f.end,v=f.extent;g.x=Math.min(v.x0,v.x1),g.y=Math.min(v.y0,v.y0),p.x=Math.max(v.x0,v.x1),p.y=Math.max(v.y0,v.y1);var m=Wt({},f,{activeHandle:null,isBrushing:!1,brushingType:void 0});return c&&c(m),u&&(m=Wt({},m,i.getIdleState())),m})},i.handleWindowPointerMove=function(s){var l=i.props.useWindowMoveEvents,c=i.state,u=c.brushingType,d=c.isBrushing,f=c.brushPageOffset,g=c.start;if(!(!l||!d)){var p=s.pageX-((f==null?void 0:f.pageX)||0),v=s.pageY-((f==null?void 0:f.pageY)||0);["left","right","top","bottom"].includes(u??"")&&i.updateBrush(function(m){var x=m.start,y=x.x,b=x.y,k=m.end,w=k.x,S=k.y;return Wt({},m,{isBrushing:!0,extent:Wt({},m.extent,i.getExtent({x:u==="left"?Math.min(Math.max(y+p,m.bounds.x0),m.bounds.x1):y,y:u==="top"?Math.min(Math.max(b+v,m.bounds.y0),m.bounds.y1):b},{x:u==="right"?Math.min(Math.max(w+p,m.bounds.x0),m.bounds.x1):w,y:u==="bottom"?Math.min(Math.max(S+v,m.bounds.y0),m.bounds.y1):S}))})}),u==="move"&&i.updateBrush(function(m){var x=m.start,y=x.x,b=x.y,k=m.end,w=k.x,S=k.y,N=p>0?Math.min(p,m.bounds.x1-w):Math.max(p,m.bounds.x0-y),E=v>0?Math.min(v,m.bounds.y1-S):Math.max(v,m.bounds.y0-b);return Wt({},m,{isBrushing:!0,extent:Wt({},m.extent,{x0:y+N,y0:b+E,x1:w+N,y1:S+E})})}),u==="select"&&i.updateBrush(function(m){var x=m.start,y=x.x,b=x.y,k={x:Math.min(Math.max(y+p,m.bounds.x0),m.bounds.x1),y:Math.min(Math.max(b+v,m.bounds.y0),m.bounds.y1)},w=i.getExtent(g,k),S=Wt({},m,{end:k,extent:w});return S})}},i.debouncedHandleWindowPointerMove=xj(i.handleWindowPointerMove,1),i.getExtent=function(s,l){var c=i.props,u=c.brushDirection,d=c.width,f=c.height,g=u==="vertical"?0:Math.min(s.x||0,l.x||0),p=u==="vertical"?d:Math.max(s.x||0,l.x||0),v=u==="horizontal"?0:Math.min(s.y||0,l.y||0),m=u==="horizontal"?f:Math.max(s.y||0,l.y||0);return{x0:g,x1:p,y0:v,y1:m}},i.handleDragStart=function(s){var l=i.props,c=l.onBrushStart,u=l.left,d=l.top,f=l.inheritedMargin,g=l.useWindowMoveEvents,p=f!=null&&f.left?f.left:0,v=f!=null&&f.top?f.top:0,m={x:(s.x||0)+s.dx-u-p,y:(s.y||0)+s.dy-d-v},x=Wt({},m);c&&c(m),i.updateBrush(function(y){return Wt({},y,{start:m,end:x,extent:{x0:-1,x1:-1,y0:-1,y1:-1},isBrushing:!0,brushingType:"select",brushPageOffset:g?gv(s.event):void 0})})},i.handleBrushStart=function(s){var l=i.props,c=l.onBrushStart,u=l.left,d=l.top,f=l.inheritedMargin;if(c){var g=f!=null&&f.left?f.left:0,p=f!=null&&f.top?f.top:0,v={x:(s.x||0)+s.dx-u-g,y:(s.y||0)+s.dy-d-p};c(v)}},i.handleDragMove=function(s){var l=i.props,c=l.left,u=l.top,d=l.inheritedMargin,f=l.useWindowMoveEvents;if(!(!s.isDragging||f)){var g=(d==null?void 0:d.left)||0,p=(d==null?void 0:d.top)||0,v={x:(s.x||0)+s.dx-c-g,y:(s.y||0)+s.dy-u-p};i.updateBrush(function(m){var x=m.start,y=i.getExtent(x,v);return Wt({},m,{end:v,extent:y})})}},i.handleDragEnd=function(){var s=i.props,l=s.onBrushEnd,c=s.resetOnEnd,u=s.useWindowMoveEvents;u||i.updateBrush(function(d){var f=d.extent,g=Wt({},d,{start:{x:f.x0,y:f.y0},end:{x:f.x1,y:f.y1},isBrushing:!1,brushingType:void 0,activeHandle:null});return l&&l(g),c&&(g=Wt({},g,i.getIdleState())),g})},i.getBrushWidth=function(){var s=i.state.extent,l=s.x0,c=s.x1;return Math.max(Math.max(l,c)-Math.min(l,c),0)},i.getBrushHeight=function(){var s=i.state.extent,l=s.y1,c=s.y0;return Math.max(Math.max(c,l)-Math.min(c,l),0)},i.handles=function(){var s=i.props.handleSize,l=i.state.extent,c=l.x0,u=l.x1,d=l.y0,f=l.y1,g=s/2,p=i.getBrushWidth(),v=i.getBrushHeight();return{top:{x:c-g,y:d-g,height:s,width:p+s},bottom:{x:c-g,y:f-g,height:s,width:p+s},right:{x:u-g,y:d-g,height:v+s,width:s},left:{x:c-g,y:d-g,height:v+s,width:s}}},i.corners=function(){var s=i.props.handleSize,l=i.state.extent,c=l.x0,u=l.x1,d=l.y0,f=l.y1,g=s/2,p=s,v=s;return{topLeft:{x:Math.min(c,u)-g,y:Math.min(d,f)-g,width:p,height:v},topRight:{x:Math.max(c,u)-g,y:Math.min(d,f)-g,width:p,height:v},bottomLeft:{x:Math.min(c,u)-g,y:Math.max(d,f)-g,width:p,height:v},bottomRight:{x:Math.max(c,u)-g,y:Math.max(d,f)-g,width:p,height:v}}},i.updateBrush=function(s){var l=i.props.onChange;i.setState(s,function(){l&&l(i.state)})},i.reset=function(){return i.updateBrush(function(){return i.getIdleState()})},i.handleBrushingTypeChange=function(s,l){i.updateBrush(function(c){var u=Wt({},c,{brushingType:s,isBrushing:s!==void 0});return(l||s===void 0)&&(u.brushPageOffset=l),u})};var a=r.initialBrushPosition,o=a?i.getExtent(a.start,a.end):{x0:-1,x1:-1,y0:-1,y1:-1};return i.state={start:{x:Math.max(0,o.x0),y:Math.max(0,o.y0)},end:{x:Math.max(0,o.x1),y:Math.max(0,o.y1)},extent:o,bounds:{x0:0,x1:i.props.width,y0:0,y1:i.props.height},isBrushing:!1,brushingType:void 0,activeHandle:null},i}var n=t.prototype;return n.componentDidUpdate=function(i){var a=this;(this.props.width!==i.width||this.props.height!==i.height)&&this.setState(function(o){var s=o.start,l=o.end,c=o.extent;if(!(c.x0===-1&&c.x1===-1&&c.y0===-1&&c.y1===-1)){var u=a.props.width/i.width,d=a.props.height/i.height;s={x:u*c.x0,y:d*c.y0},l={x:u*c.x1,y:d*c.y1},c=a.getExtent(s,l)}return{start:s,end:l,extent:c,bounds:{x0:0,x1:a.props.width,y0:0,y1:a.props.height}}})},n.componentDidMount=function(){this.props.useWindowMoveEvents&&(window.addEventListener("mouseup",this.handleWindowPointerUp),window.addEventListener("mousemove",this.debouncedHandleWindowPointerMove))},n.componentWillUnmount=function(){this.props.useWindowMoveEvents&&(window.removeEventListener("mouseup",this.handleWindowPointerUp),window.removeEventListener("mousemove",this.debouncedHandleWindowPointerMove))},n.render=function(){var i=this,a=this.state,o=a.start,s=a.end,l=this.props,c=l.top,u=l.left,d=l.width,f=l.height,g=l.onMouseLeave,p=l.onMouseUp,v=l.onMouseMove,m=l.onBrushEnd,x=l.onClick,y=l.resizeTriggerAreas,b=l.selectedBoxStyle,k=l.disableDraggingSelection,w=l.disableDraggingOverlay,S=l.clickSensitivity,N=l.useWindowMoveEvents,E=l.renderBrushHandle,C=this.state.brushingType,T=this.handles(),O=this.corners(),P=this.getBrushWidth(),M=this.getBrushHeight(),$=new Set(y);return _.createElement(tt,{className:"visx-brush",top:c,left:u},w?_.createElement(wv,{width:d,height:f,onClick:function(I){var j=i.mouseUpTime-i.mouseDownTime;x&&j<S&&x(I)},style:{cursor:"default"}}):_.createElement(qu,{width:d,height:f,resetOnStart:!0,onDragStart:this.handleDragStart,onDragMove:this.handleDragMove,onDragEnd:this.handleDragEnd,isDragging:N?C==="select":void 0},function(A){var I=A.dragStart,j=A.isDragging,B=A.dragMove,H=A.dragEnd;return _.createElement(wv,{width:d,height:f,onDoubleClick:function(){return i.reset()},onClick:function(D){var W=i.mouseUpTime-i.mouseDownTime;x&&W<S&&x(D)},onPointerDown:function(D){i.mouseDownTime=Date.now(),I(D)},onPointerLeave:function(D){g&&g(D)},onPointerMove:function(D){!j&&v&&v(D),j&&B(D)},onPointerUp:function(D){i.mouseUpTime=Date.now(),p&&p(D),H(D)},style:{cursor:"crosshair"}})}),o&&s&&_.createElement(xv,{updateBrush:this.updateBrush,width:P,height:M,stageWidth:d,stageHeight:f,brush:this.state,disableDraggingSelection:k,onBrushEnd:m,onBrushStart:this.handleBrushStart,onMouseLeave:g,onMouseMove:v,onMouseUp:p,onMoveSelectionChange:this.handleBrushingTypeChange,onClick:x,selectedBoxStyle:b,isControlled:N,isDragInProgress:N?C==="move":void 0}),o&&s&&Object.keys(T).filter(function(A){return $.has(A)}).map(function(A){var I=T[A];return I&&_.createElement(BN,{key:"handle-"+A,type:A,handle:I,stageWidth:d,stageHeight:f,updateBrush:i.updateBrush,brush:i.state,onBrushStart:i.handleBrushStart,onBrushEnd:m,isControlled:N,isDragInProgress:N?C===A:void 0,onBrushHandleChange:i.handleBrushingTypeChange,renderBrushHandle:E})}),o&&s&&Object.keys(O).filter(function(A){return $.has(A)}).map(function(A){var I=O[A];return I&&_.createElement(yv,{key:"corner-"+A,type:A,brush:i.state,updateBrush:i.updateBrush,stageWidth:d,stageHeight:f,corner:I,onBrushEnd:m})}))},t}(_.Component);Sv.propTypes={brushDirection:V.oneOf(["horizontal","vertical","both"]),width:V.number.isRequired,height:V.number.isRequired,left:V.number.isRequired,top:V.number.isRequired,onChange:V.func,handleSize:V.number,resizeTriggerAreas:V.array,onBrushStart:V.func,onBrushEnd:V.func,onMouseLeave:V.func,onMouseUp:V.func,onMouseMove:V.func,onClick:V.func,clickSensitivity:V.number,disableDraggingSelection:V.bool,disableDraggingOverlay:V.bool,resetOnEnd:V.bool,useWindowMoveEvents:V.bool,renderBrushHandle:V.func},Sv.defaultProps={brushDirection:"both",inheritedMargin:{left:0,top:0,right:0,bottom:0},onChange:null,handleSize:4,resizeTriggerAreas:["left","right"],onBrushStart:null,onBrushEnd:null,onMouseLeave:null,onMouseUp:null,onMouseMove:null,onClick:null,disableDraggingSelection:!1,disableDraggingOverlay:!1,clickSensitivity:200,resetOnEnd:!1,initialBrushPosition:null,useWindowMoveEvents:!1,renderBrushHandles:null};function Ej(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Nv(e,t)}function Nv(e,t){return Nv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Nv(e,t)}var jN=2,WN="steelblue",Ev=function(e){Ej(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r=e.call.apply(e,[this].concat(a))||this,r.handleChange=function(s){var l=r.props.onChange;if(l){var c=s.extent.x0;if(typeof c>"u"||c<0){l(null);return}var u=r.convertRangeToDomain(s);l(u)}},r.handleBrushStart=function(s){var l=r.props.onBrushStart;if(l){var c=s.x,u=s.y,d=r.props,f=d.xScale,g=d.yScale,p=Vu(f,c),v=Vu(g,u);l({x:"invert"in f&&typeof f.invert<"u"?p:f.domain()[p],y:"invert"in g&&typeof g.invert<"u"?v:g.domain()[v]})}},r.handleBrushEnd=function(s){var l=r.props.onBrushEnd;if(l){var c=s.extent.x0;if(typeof c>"u"||c<0){l(null);return}var u=r.convertRangeToDomain(s);l(u)}},r}var n=t.prototype;return n.convertRangeToDomain=function(i){var a=this.props,o=a.xScale,s=a.yScale,l=i.extent,c=l.x0,u=l.x1,d=l.y0,f=l.y1,g=zN(o,c||0,u||0,jN),p=zN(s,d||0,f||0,jN),v={x0:g.start||0,x1:g.end||0,xValues:g.values,y0:p.start||0,y1:p.end||0,yValues:p.values};return v},n.render=function(){var i=this.props,a=i.xScale,o=i.yScale,s=i.height,l=i.width,c=i.margin,u=i.brushDirection,d=i.initialBrushPosition,f=i.innerRef,g=i.resizeTriggerAreas,p=i.brushRegion,v=i.yAxisOrientation,m=i.xAxisOrientation,x=i.selectedBoxStyle,y=i.disableDraggingSelection,b=i.disableDraggingOverlay,k=i.resetOnEnd,w=i.onMouseLeave,S=i.onMouseMove,N=i.onClick,E=i.handleSize,C=i.useWindowMoveEvents,T=i.renderBrushHandle;if(!a||!o)return null;var O,P,M,$,A=c!=null&&c.left?c.left:0,I=c!=null&&c.top?c.top:0,j=c!=null&&c.right?c.right:0,B=c!=null&&c.bottom?c.bottom:0;return p==="chart"?(M=0,$=0,O=l,P=s):p==="yAxis"?($=0,P=s,v==="right"?(M=l,O=j):(M=-A,O=A)):(M=0,O=l,m==="bottom"?($=s,P=B):($=-I,P=I)),_.createElement(Sv,{width:O,height:P,left:M,top:$,brushDirection:u,disableDraggingSelection:y,disableDraggingOverlay:b,handleSize:E,inheritedMargin:c,initialBrushPosition:d,ref:f,resetOnEnd:k,resizeTriggerAreas:g,selectedBoxStyle:x,onBrushEnd:this.handleBrushEnd,onBrushStart:this.handleBrushStart,onChange:this.handleChange,onClick:N,onMouseLeave:w,onMouseMove:S,useWindowMoveEvents:C,renderBrushHandle:T})},t}(_.Component);Ev.propTypes={height:V.number,width:V.number,onChange:V.func,onBrushEnd:V.func,brushDirection:V.oneOf(["vertical","horizontal","both"]),resizeTriggerAreas:V.array,brushRegion:V.oneOf(["xAxis","yAxis","chart"]),yAxisOrientation:V.oneOf(["left","right"]),xAxisOrientation:V.oneOf(["top","bottom"]),disableDraggingSelection:V.bool,disableDraggingOverlay:V.bool,resetOnEnd:V.bool,handleSize:V.number,useWindowMoveEvents:V.bool,renderBrushHandle:V.func},Ev.defaultProps={xScale:null,yScale:null,onChange:null,height:0,width:0,selectedBoxStyle:{fill:WN,fillOpacity:.2,stroke:WN,strokeWidth:1,strokeOpacity:.8},margin:{top:0,left:0,right:0,bottom:0},handleSize:4,brushDirection:"horizontal",initialBrushPosition:null,resizeTriggerAreas:["left","right"],brushRegion:"chart",yAxisOrientation:"right",xAxisOrientation:"bottom",onBrushStart:null,onBrushEnd:null,disableDraggingSelection:!1,resetOnEnd:!1,onMouseMove:null,onMouseLeave:null,onClick:null,useWindowMoveEvents:!1,renderBrushHandles:null};var Cj=["className","top","left","data","binWidth","binHeight","x0","gap","xScale","yScale","colorScale","opacityScale","bins","count","children"];function Cv(){return Cv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cv.apply(this,arguments)}function Tj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function UN(e){var t=e.className,n=e.top,r=e.left,i=e.data,a=i===void 0?[]:i,o=e.binWidth,s=o===void 0?6:o,l=e.binHeight,c=l===void 0?6:l,u=e.x0,d=u===void 0?0:u,f=e.gap,g=f===void 0?1:f,p=e.xScale,v=e.yScale,m=e.colorScale,x=m===void 0?function(){}:m,y=e.opacityScale,b=y===void 0?function(){return 1}:y,k=e.bins,w=k===void 0?function(M){return M==null?void 0:M.bins}:k,S=e.count,N=S===void 0?function(M){return M==null?void 0:M.count}:S,E=e.children,C=Tj(e,Cj),T=s-g,O=c-g,P=a.map(function(M,$){var A=p($);return w(M).map(function(I,j){var B=N(I);return{bin:I,row:j,column:$,datum:M,width:T,height:O,gap:g,count:B,x:A+d,y:v(j)+g,color:x(B),opacity:b(B)}})});return E?_.createElement(_.Fragment,null,E(P)):_.createElement(tt,{className:"visx-heatmap-rects",top:n,left:r},P.map(function(M){return M.map(function($){return _.createElement("rect",Cv({key:"heatmap-tile-rect-"+$.row+"-"+$.column,className:$e("visx-heatmap-rect",t),width:$.width,height:$.height,x:$.x,y:$.y,fill:$.color,fillOpacity:$.opacity},C))})}))}UN.propTypes={data:V.array,left:V.number,top:V.number,binWidth:V.number,binHeight:V.number,x0:V.number,gap:V.number,xScale:V.func.isRequired,yScale:V.func.isRequired,bins:V.func,count:V.func,className:V.string,children:V.func};function HN(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function Mj({debounce:e,scroll:t,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,o]=_.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),s=_.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),l=e?typeof e=="number"?e:e.scroll:null,c=e?typeof e=="number"?e:e.resize:null,u=_.useRef(!1);_.useEffect(()=>(u.current=!0,()=>void(u.current=!1)));const[d,f,g]=_.useMemo(()=>{const x=()=>{if(!s.current.element)return;const{left:y,top:b,width:k,height:w,bottom:S,right:N,x:E,y:C}=s.current.element.getBoundingClientRect(),T={left:y,top:b,width:k,height:w,bottom:S,right:N,x:E,y:C};s.current.element instanceof HTMLElement&&r&&(T.height=s.current.element.offsetHeight,T.width=s.current.element.offsetWidth),Object.freeze(T),u.current&&!Aj(s.current.lastBounds,T)&&o(s.current.lastBounds=T)};return[x,c?HN(x,c):x,l?HN(x,l):x]},[o,r,l,c]);function p(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(x=>x.removeEventListener("scroll",g,!0)),s.current.scrollContainers=null),s.current.resizeObserver&&(s.current.resizeObserver.disconnect(),s.current.resizeObserver=null),s.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",s.current.orientationHandler))}function v(){s.current.element&&(s.current.resizeObserver=new i(g),s.current.resizeObserver.observe(s.current.element),t&&s.current.scrollContainers&&s.current.scrollContainers.forEach(x=>x.addEventListener("scroll",g,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{g()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",s.current.orientationHandler))}const m=x=>{!x||x===s.current.element||(p(),s.current.element=x,s.current.scrollContainers=qN(x),v())};return Oj(g,!!t),$j(f),_.useEffect(()=>{p(),v()},[t,g,f]),_.useEffect(()=>p,[]),[m,a,d]}function $j(e){_.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function Oj(e,t){_.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function qN(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some(a=>a==="auto"||a==="scroll")&&t.push(e),[...t,...qN(e.parentElement)]}const Pj=["x","y","top","bottom","left","right","width","height"],Aj=(e,t)=>Pj.every(n=>e[n]===t[n]);var yr=_.createContext({});function Tv(e){var t,n=e;return n&&"bandwidth"in n&&(t=n==null?void 0:n.bandwidth())!=null?t:0}function Zt(e){return e!=null&&typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e)}var Mv=al(),be=e=>il(e,Mv),$v=al();be.write=e=>il(e,$v);var Ku=al();be.onStart=e=>il(e,Ku);var Ov=al();be.onFrame=e=>il(e,Ov);var Pv=al();be.onFinish=e=>il(e,Pv);var Co=[];be.setTimeout=(e,t)=>{const n=be.now()+t,r=()=>{const a=Co.findIndex(o=>o.cancel==r);~a&&Co.splice(a,1),ki-=~a?1:0},i={time:n,handler:e,cancel:r};return Co.splice(VN(n),0,i),ki+=1,KN(),i};var VN=e=>~(~Co.findIndex(t=>t.time>e)||~Co.length);be.cancel=e=>{Ku.delete(e),Ov.delete(e),Pv.delete(e),Mv.delete(e),$v.delete(e)},be.sync=e=>{Lv=!0,be.batchedUpdates(e),Lv=!1},be.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,be.onStart(n)}return r.handler=e,r.cancel=()=>{Ku.delete(n),t=null},r};var Av=typeof window<"u"?window.requestAnimationFrame:()=>{};be.use=e=>Av=e,be.now=typeof performance<"u"?()=>performance.now():Date.now,be.batchedUpdates=e=>e(),be.catch=console.error,be.frameLoop="always",be.advance=()=>{be.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):GN()};var wi=-1,ki=0,Lv=!1;function il(e,t){Lv?(t.delete(e),e(0)):(t.add(e),KN())}function KN(){wi<0&&(wi=0,be.frameLoop!=="demand"&&Av(YN))}function Lj(){wi=-1}function YN(){~wi&&(Av(YN),be.batchedUpdates(GN))}function GN(){const e=wi;wi=be.now();const t=VN(wi);if(t&&(XN(Co.splice(0,t),n=>n.handler()),ki-=t),!ki){Lj();return}Ku.flush(),Mv.flush(e?Math.min(64,wi-e):16.667),Ov.flush(),$v.flush(),Pv.flush()}function al(){let e=new Set,t=e;return{add(n){ki+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return ki-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,ki-=t.size,XN(t,r=>r(n)&&e.add(r)),ki+=e.size,t=e)}}}function XN(e,t){e.forEach(n=>{try{t(n)}catch(r){be.catch(r)}})}var Dj=Object.defineProperty,Ij=(e,t)=>{for(var n in t)Dj(e,n,{get:t[n],enumerable:!0})},Mn={};Ij(Mn,{assign:()=>QN,colors:()=>Si,createStringInterpolator:()=>Fv,skipAnimation:()=>JN,to:()=>ZN,willAdvance:()=>zv});function Dv(){}var Fj=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),le={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function qr(e,t){if(le.arr(e)){if(!le.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var ye=(e,t)=>e.forEach(t);function br(e,t,n){if(le.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Ut=e=>le.und(e)?[]:le.arr(e)?e:[e];function ol(e,t){if(e.size){const n=Array.from(e);e.clear(),ye(n,t)}}var sl=(e,...t)=>ol(e,n=>n(...t)),Iv=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Fv,ZN,Si=null,JN=!1,zv=Dv,QN=e=>{e.to&&(ZN=e.to),e.now&&(be.now=e.now),e.colors!==void 0&&(Si=e.colors),e.skipAnimation!=null&&(JN=e.skipAnimation),e.createStringInterpolator&&(Fv=e.createStringInterpolator),e.requestAnimationFrame&&be.use(e.requestAnimationFrame),e.batchedUpdates&&(be.batchedUpdates=e.batchedUpdates),e.willAdvance&&(zv=e.willAdvance),e.frameLoop&&(be.frameLoop=e.frameLoop)},ll=new Set,$n=[],Bv=[],Yu=0,cl={get idle(){return!ll.size&&!$n.length},start(e){Yu>e.priority?(ll.add(e),be.onStart(zj)):(RN(e),be(jv))},advance:jv,sort(e){if(Yu)be.onFrame(()=>cl.sort(e));else{const t=$n.indexOf(e);~t&&($n.splice(t,1),eE(e))}},clear(){$n=[],ll.clear()}};function zj(){ll.forEach(RN),ll.clear(),be(jv)}function RN(e){$n.includes(e)||eE(e)}function eE(e){$n.splice(Bj($n,t=>t.priority>e.priority),0,e)}function jv(e){const t=Bv;for(let n=0;n<$n.length;n++){const r=$n[n];Yu=r.priority,r.idle||(zv(r),r.advance(e),r.idle||t.push(r))}return Yu=0,Bv=$n,Bv.length=0,$n=t,$n.length>0}function Bj(e,t){const n=e.findIndex(t);return n<0?e.length:n}var jj=(e,t,n)=>Math.min(Math.max(n,e),t),Wj={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Zn="[-+]?\\d*\\.?\\d+",Gu=Zn+"%";function Xu(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Uj=new RegExp("rgb"+Xu(Zn,Zn,Zn)),Hj=new RegExp("rgba"+Xu(Zn,Zn,Zn,Zn)),qj=new RegExp("hsl"+Xu(Zn,Gu,Gu)),Vj=new RegExp("hsla"+Xu(Zn,Gu,Gu,Zn)),Kj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Yj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Gj=/^#([0-9a-fA-F]{6})$/,Xj=/^#([0-9a-fA-F]{8})$/;function Zj(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Gj.exec(e))?parseInt(t[1]+"ff",16)>>>0:Si&&Si[e]!==void 0?Si[e]:(t=Uj.exec(e))?(To(t[1])<<24|To(t[2])<<16|To(t[3])<<8|255)>>>0:(t=Hj.exec(e))?(To(t[1])<<24|To(t[2])<<16|To(t[3])<<8|rE(t[4]))>>>0:(t=Kj.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Xj.exec(e))?parseInt(t[1],16)>>>0:(t=Yj.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=qj.exec(e))?(tE(nE(t[1]),Zu(t[2]),Zu(t[3]))|255)>>>0:(t=Vj.exec(e))?(tE(nE(t[1]),Zu(t[2]),Zu(t[3]))|rE(t[4]))>>>0:null}function Wv(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function tE(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=Wv(i,r,e+1/3),o=Wv(i,r,e),s=Wv(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function To(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function nE(e){return(parseFloat(e)%360+360)%360/360}function rE(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Zu(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function iE(e){let t=Zj(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,a=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${a})`}var Mo=(e,t,n)=>{if(le.fun(e))return e;if(le.arr(e))return Mo({range:e,output:t,extrapolate:n});if(le.str(e.output[0]))return Fv(e);const r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(c=>c);return c=>{const u=Qj(c,a);return Jj(c,a[u],a[u+1],i[u],i[u+1],l,o,s,r.map)}};function Jj(e,t,n,r,i,a,o,s,l){let c=l?l(e):e;if(c<t){if(o==="identity")return c;o==="clamp"&&(c=t)}if(c>n){if(s==="identity")return c;s==="clamp"&&(c=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?c=-c:n===1/0?c=c-t:c=(c-t)/(n-t),c=a(c),r===-1/0?c=-c:i===1/0?c=c+r:c=c*(i-r)+r,c)}function Qj(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Rj=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,i=t==="end"?Math.floor(r):Math.ceil(r);return jj(0,1,i/e)},Ju=1.70158,Qu=Ju*1.525,aE=Ju+1,oE=2*Math.PI/3,sE=2*Math.PI/4.5,Ru=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,lE={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>aE*e*e*e-Ju*e*e,easeOutBack:e=>1+aE*Math.pow(e-1,3)+Ju*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Qu+1)*2*e-Qu)/2:(Math.pow(2*e-2,2)*((Qu+1)*(e*2-2)+Qu)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*oE),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*oE)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*sE))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*sE)/2+1,easeInBounce:e=>1-Ru(1-e),easeOutBounce:Ru,easeInOutBounce:e=>e<.5?(1-Ru(1-2*e))/2:(1+Ru(2*e-1))/2,steps:Rj},ul=Symbol.for("FluidValue.get"),$o=Symbol.for("FluidValue.observers"),On=e=>!!(e&&e[ul]),Jt=e=>e&&e[ul]?e[ul]():e,cE=e=>e[$o]||null;function e4(e,t){e.eventObserved?e.eventObserved(t):e(t)}function dl(e,t){const n=e[$o];n&&n.forEach(r=>{e4(r,t)})}var uE=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");t4(this,e)}},t4=(e,t)=>dE(e,ul,t);function Oo(e,t){if(e[ul]){let n=e[$o];n||dE(e,$o,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function fl(e,t){const n=e[$o];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[$o]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var dE=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ed=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,n4=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,fE=new RegExp(`(${ed.source})(%|[a-z]+)`,"i"),r4=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,td=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,hE=e=>{const[t,n]=i4(e);if(!t||Iv())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&td.test(n))return hE(n);if(n)return n}return e},i4=e=>{const t=td.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Uv,a4=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,pE=e=>{Uv||(Uv=Si?new RegExp(`(${Object.keys(Si).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(a=>Jt(a).replace(td,hE).replace(n4,iE).replace(Uv,iE)),n=t.map(a=>a.match(ed).map(Number)),i=n[0].map((a,o)=>n.map(s=>{if(!(o in s))throw Error('The arity of each "output" value must be equal');return s[o]})).map(a=>Mo({...e,output:a}));return a=>{var l;const o=!fE.test(t[0])&&((l=t.find(c=>fE.test(c)))==null?void 0:l.replace(ed,""));let s=0;return t[0].replace(ed,()=>`${i[s++](a)}${o||""}`).replace(r4,a4)}},Hv="react-spring: ",gE=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Hv}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},o4=gE(console.warn);function vE(){o4(`${Hv}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var s4=gE(console.warn);function l4(){s4(`${Hv}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function nd(e){return le.str(e)&&(e[0]=="#"||/\d/.test(e)||!Iv()&&td.test(e)||e in(Si||{}))}var Po,rd=new WeakMap,c4=e=>e.forEach(({target:t,contentRect:n})=>{var r;return(r=rd.get(t))==null?void 0:r.forEach(i=>i(n))});function u4(e,t){Po||typeof ResizeObserver<"u"&&(Po=new ResizeObserver(c4));let n=rd.get(t);return n||(n=new Set,rd.set(t,n)),n.add(e),Po&&Po.observe(t),()=>{const r=rd.get(t);r&&(r.delete(e),!r.size&&Po&&Po.unobserve(t))}}var id=new Set,hl,d4=()=>{const e=()=>{id.forEach(t=>t({width:window.innerWidth,height:window.innerHeight}))};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},f4=e=>(id.add(e),hl||(hl=d4()),()=>{id.delete(e),!id.size&&hl&&(hl(),hl=void 0)}),mE=(e,{container:t=document.documentElement}={})=>t===document.documentElement?f4(e):u4(e,t),h4=(e,t,n)=>t-e===0?1:(n-e)/(t-e),p4={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}},g4=class{constructor(e,t){this.createAxis=()=>({current:0,progress:0,scrollLength:0}),this.updateAxis=n=>{const r=this.info[n],{length:i,position:a}=p4[n];r.current=this.container[`scroll${a}`],r.scrollLength=this.container[`scroll${i}`]-this.container[`client${i}`],r.progress=h4(0,r.scrollLength,r.current)},this.update=()=>{this.updateAxis("x"),this.updateAxis("y")},this.sendEvent=()=>{this.callback(this.info)},this.advance=()=>{this.update(),this.sendEvent()},this.callback=e,this.container=t,this.info={time:0,x:this.createAxis(),y:this.createAxis()}}},pl=new WeakMap,yE=new WeakMap,qv=new WeakMap,bE=e=>e===document.documentElement?window:e,v4=(e,{container:t=document.documentElement}={})=>{let n=qv.get(t);n||(n=new Set,qv.set(t,n));const r=new g4(e,t);if(n.add(r),!pl.has(t)){const a=()=>(n==null||n.forEach(s=>s.advance()),!0);pl.set(t,a);const o=bE(t);window.addEventListener("resize",a,{passive:!0}),t!==document.documentElement&&yE.set(t,mE(a,{container:t})),o.addEventListener("scroll",a,{passive:!0})}const i=pl.get(t);return be(i),()=>{var s;be.cancel(i);const a=qv.get(t);if(!a||(a.delete(r),a.size))return;const o=pl.get(t);pl.delete(t),o&&(bE(t).removeEventListener("scroll",o),window.removeEventListener("resize",o),(s=yE.get(t))==null||s())}};function m4(e){const t=_.useRef(null);return t.current===null&&(t.current=e()),t.current}var Qt=Iv()?_.useEffect:_.useLayoutEffect,y4=()=>{const e=_.useRef(!1);return Qt(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Vv(){const e=_.useState()[1],t=y4();return()=>{t.current&&e(Math.random())}}function b4(e,t){const[n]=_.useState(()=>({inputs:t,result:e()})),r=_.useRef(),i=r.current;let a=i;return a?t&&a.inputs&&x4(t,a.inputs)||(a={inputs:t,result:e()}):a=n,_.useEffect(()=>{r.current=a,i==n&&(n.inputs=n.result=void 0)},[a]),a.result}function x4(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var ad=e=>_.useEffect(e,_4),_4=[];function Kv(e){const t=_.useRef();return _.useEffect(()=>{t.current=e}),t.current}var w4=()=>{const[e,t]=_.useState(null);return Qt(()=>{const n=window.matchMedia("(prefers-reduced-motion)"),r=i=>{t(i.matches),QN({skipAnimation:i.matches})};return r(n),n.addEventListener?n.addEventListener("change",r):n.addListener(r),()=>{n.removeEventListener?n.removeEventListener("change",r):n.removeListener(r)}},[]),e},gl=Symbol.for("Animated:node"),k4=e=>!!e&&e[gl]===e,xr=e=>e&&e[gl],Yv=(e,t)=>Fj(e,gl,t),od=e=>e&&e[gl]&&e[gl].getPayload(),xE=class{constructor(){Yv(this,this)}getPayload(){return this.payload||[]}},vl=class extends xE{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,le.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new vl(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return le.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,le.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},ml=class extends vl{constructor(e){super(0),this._string=null,this._toString=Mo({output:[e,e]})}static create(e){return new ml(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(le.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Mo({output:[this.getValue(),e]})),this._value=0,super.reset()}},sd={dependencies:null},ld=class extends xE{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return br(this.source,(n,r)=>{k4(n)?t[r]=n.getValue(e):On(n)?t[r]=Jt(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&ye(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return br(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){sd.dependencies&&On(e)&&sd.dependencies.add(e);const t=od(e);t&&ye(t,n=>this.add(n))}},_E=class extends ld{constructor(e){super(e)}static create(e){return new _E(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(S4)),!0)}};function S4(e){return(nd(e)?ml:vl).create(e)}function Gv(e){const t=xr(e);return t?t.constructor:le.arr(e)?_E:nd(e)?ml:vl}var wE=(e,t)=>{const n=!le.fun(e)||e.prototype&&e.prototype.isReactComponent;return _.forwardRef((r,i)=>{const a=_.useRef(null),o=n&&_.useCallback(p=>{a.current=C4(i,p)},[i]),[s,l]=E4(r,t),c=Vv(),u=()=>{const p=a.current;if(n&&!p)return;(p?t.applyAnimatedValues(p,s.getValue(!0)):!1)===!1&&c()},d=new N4(u,l),f=_.useRef();Qt(()=>(f.current=d,ye(l,p=>Oo(p,d)),()=>{f.current&&(ye(f.current.deps,p=>fl(p,f.current)),be.cancel(f.current.update))})),_.useEffect(u,[]),ad(()=>()=>{const p=f.current;ye(p.deps,v=>fl(v,p))});const g=t.getComponentProps(s.getValue());return Ma.createElement(e,{...g,ref:o})})},N4=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&be.write(this.update)}};function E4(e,t){const n=new Set;return sd.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new ld(e),sd.dependencies=null,[e,n]}function C4(e,t){return e&&(le.fun(e)?e(t):e.current=t),t}var kE=Symbol.for("AnimatedComponent"),T4=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new ld(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=o=>{const s=SE(o)||"Anonymous";return le.str(o)?o=a[o]||(a[o]=wE(o,i)):o=o[kE]||(o[kE]=wE(o,i)),o.displayName=`Animated(${s})`,o};return br(e,(o,s)=>{le.arr(e)&&(s=SE(o)),a[s]=a(o)}),{animated:a}},SE=e=>le.str(e)?e:e&&le.str(e.displayName)?e.displayName:le.fun(e)&&e.name||null,M4=class{};function Ht(e,...t){return le.fun(e)?e(...t):e}var yl=(e,t)=>e===!0||!!(t&&e&&(le.fun(e)?e(t):Ut(e).includes(t))),NE=(e,t)=>le.obj(e)?t&&e[t]:e,EE=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,$4=e=>e,cd=(e,t=$4)=>{let n=O4;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const a=t(e[i],i);le.und(a)||(r[i]=a)}return r},O4=["config","onProps","onStart","onChange","onPause","onResume","onRest"],P4={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function A4(e){const t={};let n=0;if(br(e,(r,i)=>{P4[i]||(t[i]=r,n++)}),n)return t}function ud(e){const t=A4(e);if(t){const n={to:t};return br(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function bl(e){return e=Jt(e),le.arr(e)?e.map(bl):nd(e)?Mn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function CE(e){for(const t in e)return!0;return!1}function Xv(e){return le.fun(e)||le.arr(e)&&le.obj(e[0])}function Zv(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function Jv(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}function L4(e,t,n=1e3){Qt(()=>{if(t){let r=0;ye(e,(i,a)=>{const o=i.current;if(o.length){let s=n*t[a];isNaN(s)?s=r:r=s,ye(o,l=>{ye(l.queue,c=>{const u=c.delay;c.delay=d=>s+Ht(u||0,d)})}),i.start()}})}else{let r=Promise.resolve();ye(e,i=>{const a=i.current;if(a.length){const o=a.map(s=>{const l=s.queue;return s.queue=[],l});r=r.then(()=>(ye(a,(s,l)=>ye(o[l]||[],c=>s.queue.push(c))),Promise.all(i.start())))}})}})}var TE={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},Qv={...TE.default,mass:1,damping:1,easing:lE.linear,clamp:!1},D4=class{constructor(){this.velocity=0,Object.assign(this,Qv)}};function I4(e,t,n){n&&(n={...n},ME(n,t),t={...n,...t}),ME(e,t),Object.assign(e,t);for(const o in Qv)e[o]==null&&(e[o]=Qv[o]);let{frequency:r,damping:i}=e;const{mass:a}=e;return le.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*a,e.friction=4*Math.PI*i*a/r),e}function ME(e,t){if(!le.und(t.decay))e.duration=void 0;else{const n=!le.und(t.tension)||!le.und(t.friction);(n||!le.und(t.frequency)||!le.und(t.damping)||!le.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var $E=[],F4=class{constructor(){this.changed=!1,this.values=$E,this.toValues=null,this.fromValues=$E,this.config=new D4,this.immediate=!1}};function OE(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let l,c,u=yl(n.cancel??(r==null?void 0:r.cancel),t);if(u)g();else{le.und(n.pause)||(i.paused=yl(n.pause,t));let p=r==null?void 0:r.pause;p!==!0&&(p=i.paused||yl(p,t)),l=Ht(n.delay||0,t),p?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(c),c.cancel(),l=c.time-be.now()}function f(){l>0&&!Mn.skipAnimation?(i.delayed=!0,c=be.setTimeout(g,l),i.pauseQueue.add(d),i.timeouts.add(c)):g()}function g(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(c),e<=(i.cancelId||0)&&(u=!0);try{a.start({...n,callId:e,cancel:u},o)}catch(p){s(p)}}})}var Rv=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Ao(e.get()):t.every(n=>n.noop)?PE(e.get()):Jn(e.get(),t.every(n=>n.finished)),PE=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Jn=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Ao=e=>({value:e,cancelled:!0,finished:!1});function AE(e,t,n,r){const{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:l}=n;return!a&&e===s&&!t.reset?l:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const c=cd(t,(m,x)=>x==="onRest"?void 0:m);let u,d;const f=new Promise((m,x)=>(u=m,d=x)),g=m=>{const x=i<=(n.cancelId||0)&&Ao(r)||i!==n.asyncId&&Jn(r,!1);if(x)throw m.result=x,d(m),m},p=(m,x)=>{const y=new em,b=new LE;return(async()=>{if(Mn.skipAnimation)throw xl(n),b.result=Jn(r,!1),d(b),b;g(y);const k=le.obj(m)?{...m}:{...x,to:m};k.parentId=i,br(c,(S,N)=>{le.und(k[N])&&(k[N]=S)});const w=await r.start(k);return g(y),n.paused&&await new Promise(S=>{n.resumeQueue.add(S)}),w})()};let v;if(Mn.skipAnimation)return xl(n),Jn(r,!1);try{let m;le.arr(e)?m=(async x=>{for(const y of x)await p(y)})(e):m=Promise.resolve(e(p,r.stop.bind(r))),await Promise.all([m.then(u),f]),v=Jn(r.get(),!0,!1)}catch(m){if(m instanceof em)v=m.result;else if(m instanceof LE)v=m.result;else throw m}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?l:void 0)}return le.fun(o)&&be.batchedUpdates(()=>{o(v,r,r.item)}),v})()}function xl(e,t){ol(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var em=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},LE=class extends Error{constructor(){super("SkipAnimationSignal")}},tm=e=>e instanceof dd,z4=1,dd=class extends uE{constructor(){super(...arguments),this.id=z4++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=xr(this);return e&&e.getValue()}to(...e){return Mn.to(this,e)}interpolate(...e){return vE(),Mn.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){dl(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||cl.sort(this),dl(this,{type:"priority",parent:this,priority:e})}},wa=Symbol.for("SpringPhase"),DE=1,nm=2,rm=4,im=e=>(e[wa]&DE)>0,Ni=e=>(e[wa]&nm)>0,_l=e=>(e[wa]&rm)>0,IE=(e,t)=>t?e[wa]|=nm|DE:e[wa]&=~nm,FE=(e,t)=>t?e[wa]|=rm:e[wa]&=~rm,am=class extends dd{constructor(e,t){if(super(),this.animation=new F4,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!le.und(e)||!le.und(t)){const n=le.obj(e)?{...e}:{...t,from:e};le.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Ni(this)||this._state.asyncTo)||_l(this)}get goal(){return Jt(this.animation.to)}get velocity(){const e=xr(this);return e instanceof vl?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return im(this)}get isAnimating(){return Ni(this)}get isPaused(){return _l(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:a}=r,o=od(r.to);!o&&On(r.to)&&(i=Ut(Jt(r.to))),r.values.forEach((c,u)=>{if(c.done)return;const d=c.constructor==ml?1:o?o[u].lastPosition:i[u];let f=r.immediate,g=d;if(!f){if(g=c.lastPosition,a.tension<=0){c.done=!0;return}let p=c.elapsedTime+=e;const v=r.fromValues[u],m=c.v0!=null?c.v0:c.v0=le.arr(a.velocity)?a.velocity[u]:a.velocity;let x;const y=a.precision||(v==d?.005:Math.min(1,Math.abs(d-v)*.001));if(le.und(a.duration))if(a.decay){const b=a.decay===!0?.998:a.decay,k=Math.exp(-(1-b)*p);g=v+m/(1-b)*(1-k),f=Math.abs(c.lastPosition-g)<=y,x=m*k}else{x=c.lastVelocity==null?m:c.lastVelocity;const b=a.restVelocity||y/10,k=a.clamp?0:a.bounce,w=!le.und(k),S=v==d?c.v0>0:v<d;let N,E=!1;const C=1,T=Math.ceil(e/C);for(let O=0;O<T&&(N=Math.abs(x)>b,!(!N&&(f=Math.abs(d-g)<=y,f)));++O){w&&(E=g==d||g>d==S,E&&(x=-x*k,g=d));const P=-a.tension*1e-6*(g-d),M=-a.friction*.001*x,$=(P+M)/a.mass;x=x+$*C,g=g+x*C}}else{let b=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,c.durationProgress>0&&(c.elapsedTime=a.duration*c.durationProgress,p=c.elapsedTime+=e)),b=(a.progress||0)+p/this._memoizedDuration,b=b>1?1:b<0?0:b,c.durationProgress=b),g=v+a.easing(b)*(d-v),x=(g-c.lastPosition)/e,f=b==1}c.lastVelocity=x,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),f=!0)}o&&!o[u].done&&(f=!1),f?c.done=!0:t=!1,c.setValue(g,a.round)&&(n=!0)});const s=xr(this),l=s.getValue();if(t){const c=Jt(r.to);(l!==c||n)&&!a.decay?(s.setValue(c),this._onChange(c)):n&&a.decay&&this._onChange(l),this._stop()}else n&&this._onChange(l)}set(e){return be.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ni(this)){const{to:e,config:t}=this.animation;be.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return le.und(e)?(n=this.queue||[],this.queue=[]):n=[le.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>Rv(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),xl(this._state,e&&this._lastCallId),be.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=le.obj(n)?n[t]:n,(n==null||Xv(n))&&(n=void 0),r=le.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return im(this)||(e.reverse&&([n,r]=[r,n]),r=Jt(r),le.und(r)?xr(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,cd(e,(o,s)=>/^on/.test(s)?NE(o,n):o)),jE(this,e,"onProps"),Sl(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const a=this._state;return OE(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{_l(this)||(FE(this,!0),sl(a.pauseQueue),Sl(this,"onPause",Jn(this,wl(this,this.animation.to)),this))},resume:()=>{_l(this)&&(FE(this,!1),Ni(this)&&this._resume(),sl(a.resumeQueue),Sl(this,"onResume",Jn(this,wl(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const s=zE(e);if(s)return this._update(s,!0)}return o})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Ao(this));const r=!le.und(e.to),i=!le.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Ao(this));const{key:a,defaultProps:o,animation:s}=this,{to:l,from:c}=s;let{to:u=l,from:d=c}=e;i&&!r&&(!t.default||le.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);const f=!qr(d,c);f&&(s.from=d),d=Jt(d);const g=!qr(u,l);g&&this._focus(u);const p=Xv(t.to),{config:v}=s,{decay:m,velocity:x}=v;(r||i)&&(v.velocity=0),t.config&&!p&&I4(v,Ht(t.config,a),t.config!==o.config?Ht(o.config,a):void 0);let y=xr(this);if(!y||le.und(u))return n(Jn(this,!0));const b=le.und(t.reset)?i&&!t.default:!le.und(d)&&yl(t.reset,a),k=b?d:this.get(),w=bl(u),S=le.num(w)||le.arr(w)||nd(w),N=!p&&(!S||yl(o.immediate||t.immediate,a));if(g){const O=Gv(u);if(O!==y.constructor)if(N)y=this._set(w);else throw Error(`Cannot animate between ${y.constructor.name} and ${O.name}, as the "to" prop suggests`)}const E=y.constructor;let C=On(u),T=!1;if(!C){const O=b||!im(this)&&f;(g||O)&&(T=qr(bl(k),w),C=!T),(!qr(s.immediate,N)&&!N||!qr(v.decay,m)||!qr(v.velocity,x))&&(C=!0)}if(T&&Ni(this)&&(s.changed&&!b?C=!0:C||this._stop(l)),!p&&((C||On(l))&&(s.values=y.getPayload(),s.toValues=On(u)?null:E==ml?[1]:Ut(w)),s.immediate!=N&&(s.immediate=N,!N&&!b&&this._set(l)),C)){const{onRest:O}=s;ye(j4,M=>jE(this,t,M));const P=Jn(this,wl(this,l));sl(this._pendingCalls,P),this._pendingCalls.add(n),s.changed&&be.batchedUpdates(()=>{var M;s.changed=!b,O==null||O(P,this),b?Ht(o.onRest,P):(M=s.onStart)==null||M.call(s,P,this)})}b&&this._set(k),p?n(AE(t.to,t,this._state,this)):C?this._start():Ni(this)&&!g?this._pendingCalls.add(n):n(PE(k))}_focus(e){const t=this.animation;e!==t.to&&(cE(this)&&this._detach(),t.to=e,cE(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;On(t)&&(Oo(t,this),tm(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;On(e)&&fl(e,this)}_set(e,t=!0){const n=Jt(e);if(!le.und(n)){const r=xr(this);if(!r||!qr(n,r.getValue())){const i=Gv(n);!r||r.constructor!=i?Yv(this,i.create(n)):r.setValue(n),r&&be.batchedUpdates(()=>{this._onChange(n,t)})}}return xr(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Sl(this,"onStart",Jn(this,wl(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ht(this.animation.onChange,e,this)),Ht(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;xr(this).reset(Jt(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),Ni(this)||(IE(this,!0),_l(this)||this._resume())}_resume(){Mn.skipAnimation?this.finish():cl.start(this)}_stop(e,t){if(Ni(this)){IE(this,!1);const n=this.animation;ye(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),dl(this,{type:"idle",parent:this});const r=t?Ao(this.get()):Jn(this.get(),wl(this,e??n.to));sl(this._pendingCalls,r),n.changed&&(n.changed=!1,Sl(this,"onRest",r,this))}}};function wl(e,t){const n=bl(t),r=bl(e.get());return qr(r,n)}function zE(e,t=e.loop,n=e.to){const r=Ht(t);if(r){const i=r!==!0&&ud(r),a=(i||e).reverse,o=!i||i.reset;return kl({...e,loop:t,default:!1,pause:void 0,to:!a||Xv(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function kl(e){const{to:t,from:n}=e=ud(e),r=new Set;return le.obj(t)&&BE(t,r),le.obj(n)&&BE(n,r),e.keys=r.size?Array.from(r):null,e}function B4(e){const t=kl(e);return le.und(t.default)&&(t.default=cd(t)),t}function BE(e,t){br(e,(n,r)=>n!=null&&t.add(r))}var j4=["onStart","onRest","onChange","onPause","onResume"];function jE(e,t,n){e.animation[n]=t[n]!==EE(t,n)?NE(t[n],e.key):void 0}function Sl(e,t,...n){var r,i,a,o;(i=(r=e.animation)[t])==null||i.call(r,...n),(o=(a=e.defaultProps)[t])==null||o.call(a,...n)}var W4=["onStart","onChange","onRest"],U4=1,om=class{constructor(e,t){this.id=U4++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];le.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(kl(e)),this}start(e){let{queue:t}=this;return e?t=Ut(e).map(kl):this.queue=[],this._flush?this._flush(this,t):(VE(this,t),sm(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;ye(Ut(t),r=>n[r].stop(!!e))}else xl(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(le.und(e))this.start({pause:!0});else{const t=this.springs;ye(Ut(e),n=>t[n].pause())}return this}resume(e){if(le.und(e))this.start({pause:!1});else{const t=this.springs;ye(Ut(e),n=>t[n].resume())}return this}each(e){br(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,ol(e,([s,l])=>{l.value=this.get(),s(l,this,this._item)}));const a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&ol(t,([s,l])=>{l.value=o,s(l,this,this._item)}),a&&(this._started=!1,ol(n,([s,l])=>{l.value=o,s(l,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;be.onFrame(this._onFrame)}};function sm(e,t){return Promise.all(t.map(n=>WE(e,n))).then(n=>Rv(e,n))}async function WE(e,t,n){const{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:l}=t,c=le.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);const u=le.arr(i)||le.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):ye(W4,v=>{const m=t[v];if(le.fun(m)){const x=e._events[v];t[v]=({finished:y,cancelled:b})=>{const k=x.get(m);k?(y||(k.finished=!1),b&&(k.cancelled=!0)):x.set(m,{value:null,finished:y||!1,cancelled:b||!1})},c&&(c[v]=t[v])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,sl(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(v=>e.springs[v].start(t)),g=t.cancel===!0||EE(t,"cancel")===!0;(u||g&&d.asyncId)&&f.push(OE(++e._lastAsyncId,{props:t,state:d,actions:{pause:Dv,resume:Dv,start(v,m){g?(xl(d,e._lastAsyncId),m(Ao(e))):(v.onRest=s,m(AE(u,v,d,e)))}}})),d.paused&&await new Promise(v=>{d.resumeQueue.add(v)});const p=Rv(e,await Promise.all(f));if(o&&p.finished&&!(n&&p.noop)){const v=zE(t,o,i);if(v)return VE(e,[v]),WE(e,v,!0)}return l&&be.batchedUpdates(()=>l(p,e,e.item)),p}function lm(e,t){const n={...e.springs};return t&&ye(Ut(t),r=>{le.und(r.keys)&&(r=kl(r)),le.obj(r.to)||(r={...r,to:void 0}),qE(n,r,i=>HE(i))}),UE(e,n),n}function UE(e,t){br(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Oo(n,e))})}function HE(e,t){const n=new am;return n.key=e,t&&Oo(n,t),n}function qE(e,t,n){t.keys&&ye(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function VE(e,t){ye(t,n=>{qE(e.springs,n,r=>HE(r,e))})}var Lo=({children:e,...t})=>{const n=_.useContext(fd),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=b4(()=>({pause:r,immediate:i}),[r,i]);const{Provider:a}=fd;return Ma.createElement(a,{value:t},e)},fd=H4(Lo,{});Lo.Provider=fd.Provider,Lo.Consumer=fd.Consumer;function H4(e,t){return Object.assign(e,Ma.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var hd=()=>{const e=[],t=function(r){l4();const i=[];return ye(e,(a,o)=>{if(le.und(r))i.push(a.start());else{const s=n(r,a,o);s&&i.push(a.start(s))}}),i};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const i=e.indexOf(r);~i&&e.splice(i,1)},t.pause=function(){return ye(e,r=>r.pause(...arguments)),this},t.resume=function(){return ye(e,r=>r.resume(...arguments)),this},t.set=function(r){ye(e,(i,a)=>{const o=le.fun(r)?r(a,i):r;o&&i.set(o)})},t.start=function(r){const i=[];return ye(e,(a,o)=>{if(le.und(r))i.push(a.start());else{const s=this._getProps(r,a,o);s&&i.push(a.start(s))}}),i},t.stop=function(){return ye(e,r=>r.stop(...arguments)),this},t.update=function(r){return ye(e,(i,a)=>i.update(this._getProps(r,i,a))),this};const n=function(r,i,a){return le.fun(r)?r(a,i):r};return t._getProps=n,t};function cm(e,t,n){const r=le.fun(t)&&t;r&&!n&&(n=[]);const i=_.useMemo(()=>r||arguments.length==3?hd():void 0,[]),a=_.useRef(0),o=Vv(),s=_.useMemo(()=>({ctrls:[],queue:[],flush(x,y){const b=lm(x,y);return a.current>0&&!s.queue.length&&!Object.keys(b).some(w=>!x.springs[w])?sm(x,y):new Promise(w=>{UE(x,b),s.queue.push(()=>{w(sm(x,y))}),o()})}}),[]),l=_.useRef([...s.ctrls]),c=[],u=Kv(e)||0;_.useMemo(()=>{ye(l.current.slice(e,u),x=>{Zv(x,i),x.stop(!0)}),l.current.length=e,d(u,e)},[e]),_.useMemo(()=>{d(0,Math.min(u,e))},n);function d(x,y){for(let b=x;b<y;b++){const k=l.current[b]||(l.current[b]=new om(null,s.flush)),w=r?r(b,k):t[b];w&&(c[b]=B4(w))}}const f=l.current.map((x,y)=>lm(x,c[y])),g=_.useContext(Lo),p=Kv(g),v=g!==p&&CE(g);Qt(()=>{a.current++,s.ctrls=l.current;const{queue:x}=s;x.length&&(s.queue=[],ye(x,y=>y())),ye(l.current,(y,b)=>{i==null||i.add(y),v&&y.start({default:g});const k=c[b];k&&(Jv(y,k.ref),y.ref?y.queue.push(k):y.start(k))})}),ad(()=>()=>{ye(s.ctrls,x=>x.stop(!0))});const m=f.map(x=>({...x}));return i?[m,i]:m}function ka(e,t){const n=le.fun(e),[[r],i]=cm(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}var q4=()=>hd(),V4=()=>_.useState(q4)[0],K4=(e,t)=>{const n=m4(()=>new am(e,t));return ad(()=>()=>{n.stop()}),n};function KE(e,t,n){const r=le.fun(t)&&t;r&&!n&&(n=[]);let i=!0,a;const o=cm(e,(s,l)=>{const c=r?r(s,l):t;return a=c.ref,i=i&&c.reverse,c},n||[{}]);if(Qt(()=>{ye(o[1].current,(s,l)=>{const c=o[1].current[l+(i?1:-1)];if(Jv(s,a),s.ref){c&&s.update({to:c.springs});return}c?s.start({to:c.springs}):s.start()})},n),r||arguments.length==3){const s=a??o[1];return s._getProps=(l,c,u)=>{const d=le.fun(l)?l(u,c):l;if(d){const f=s.current[u+(d.reverse?1:-1)];return f&&(d.to=f.springs),d}},o}return o[0]}function YE(e,t,n){const r=le.fun(t)&&t,{reset:i,sort:a,trail:o=0,expires:s=!0,exitBeforeEnter:l=!1,onDestroyed:c,ref:u,config:d}=r?r():t,f=_.useMemo(()=>r||arguments.length==3?hd():void 0,[]),g=Ut(e),p=[],v=_.useRef(null),m=i?null:v.current;Qt(()=>{v.current=p}),ad(()=>(ye(p,$=>{f==null||f.add($.ctrl),$.ctrl.ref=f}),()=>{ye(v.current,$=>{$.expired&&clearTimeout($.expirationId),Zv($.ctrl,f),$.ctrl.stop(!0)})}));const x=G4(g,r?r():t,m),y=i&&v.current||[];Qt(()=>ye(y,({ctrl:$,item:A,key:I})=>{Zv($,f),Ht(c,A,I)}));const b=[];if(m&&ye(m,($,A)=>{$.expired?(clearTimeout($.expirationId),y.push($)):(A=b[A]=x.indexOf($.key),~A&&(p[A]=$))}),ye(g,($,A)=>{p[A]||(p[A]={key:x[A],item:$,phase:"mount",ctrl:new om},p[A].ctrl.item=$)}),b.length){let $=-1;const{leave:A}=r?r():t;ye(b,(I,j)=>{const B=m[j];~I?($=p.indexOf(B),p[$]={...B,item:g[I]}):A&&p.splice(++$,0,B)})}le.fun(a)&&p.sort(($,A)=>a($.item,A.item));let k=-o;const w=Vv(),S=cd(t),N=new Map,E=_.useRef(new Map),C=_.useRef(!1);ye(p,($,A)=>{const I=$.key,j=$.phase,B=r?r():t;let H,F;const D=Ht(B.delay||0,I);if(j=="mount")H=B.enter,F="enter";else{const K=x.indexOf(I)<0;if(j!="leave")if(K)H=B.leave,F="leave";else if(H=B.update)F="update";else return;else if(!K)H=B.enter,F="enter";else return}if(H=Ht(H,$.item,A),H=le.obj(H)?ud(H):{to:H},!H.config){const K=d||S.config;H.config=Ht(K,$.item,A,F)}k+=o;const W={...S,delay:D+k,ref:u,immediate:B.immediate,reset:!1,...H};if(F=="enter"&&le.und(W.from)){const K=r?r():t,ee=le.und(K.initial)||m?K.from:K.initial;W.from=Ht(ee,$.item,A)}const{onResolve:Y}=W;W.onResolve=K=>{Ht(Y,K);const ee=v.current,ie=ee.find(ce=>ce.key===I);if(ie&&!(K.cancelled&&ie.phase!="update")&&ie.ctrl.idle){const ce=ee.every(Z=>Z.ctrl.idle);if(ie.phase=="leave"){const Z=Ht(s,ie.item);if(Z!==!1){const J=Z===!0?0:Z;if(ie.expired=!0,!ce&&J>0){J<=2147483647&&(ie.expirationId=setTimeout(w,J));return}}}ce&&ee.some(Z=>Z.expired)&&(E.current.delete(ie),l&&(C.current=!0),w())}};const U=lm($.ctrl,W);F==="leave"&&l?E.current.set($,{phase:F,springs:U,payload:W}):N.set($,{phase:F,springs:U,payload:W})});const T=_.useContext(Lo),O=Kv(T),P=T!==O&&CE(T);Qt(()=>{P&&ye(p,$=>{$.ctrl.start({default:T})})},[T]),ye(N,($,A)=>{if(E.current.size){const I=p.findIndex(j=>j.key===A.key);p.splice(I,1)}}),Qt(()=>{ye(E.current.size?E.current:N,({phase:$,payload:A},I)=>{const{ctrl:j}=I;I.phase=$,f==null||f.add(j),P&&$=="enter"&&j.start({default:T}),A&&(Jv(j,A.ref),(j.ref||f)&&!C.current?j.update(A):(j.start(A),C.current&&(C.current=!1)))})},i?void 0:n);const M=$=>Ma.createElement(Ma.Fragment,null,p.map((A,I)=>{const{springs:j}=N.get(A)||A.ctrl,B=$({...j},A.item,A,I);return B&&B.type?Ma.createElement(B.type,{...B.props,key:le.str(A.key)||le.num(A.key)?A.key:A.ctrl.id,ref:B.ref}):B}));return f?[M,f]:M}var Y4=1;function G4(e,{key:t,keys:n=t},r){if(n===null){const i=new Set;return e.map(a=>{const o=r&&r.find(s=>s.item===a&&s.phase!=="leave"&&!i.has(s));return o?(i.add(o),o.key):Y4++})}return le.und(n)?e:le.fun(n)?e.map(n):Ut(n)}var X4=({container:e,...t}={})=>{const[n,r]=ka(()=>({scrollX:0,scrollY:0,scrollXProgress:0,scrollYProgress:0,...t}),[]);return Qt(()=>{const i=v4(({x:a,y:o})=>{r.start({scrollX:a.current,scrollXProgress:a.progress,scrollY:o.current,scrollYProgress:o.progress})},{container:(e==null?void 0:e.current)||void 0});return()=>{ye(Object.values(n),a=>a.stop()),i()}},[]),n},Z4=({container:e,...t})=>{const[n,r]=ka(()=>({width:0,height:0,...t}),[]);return Qt(()=>{const i=mE(({width:a,height:o})=>{r.start({width:a,height:o,immediate:n.width.get()===0||n.height.get()===0})},{container:(e==null?void 0:e.current)||void 0});return()=>{ye(Object.values(n),a=>a.stop()),i()}},[]),n},J4={any:0,all:1};function Q4(e,t){const[n,r]=_.useState(!1),i=_.useRef(),a=le.fun(e)&&e,o=a?a():{},{to:s={},from:l={},...c}=o,u=a?t:e,[d,f]=ka(()=>({from:l,...c}),[]);return Qt(()=>{const g=i.current,{root:p,once:v,amount:m="any",...x}=u??{};if(!g||v&&n||typeof IntersectionObserver>"u")return;const y=new WeakMap,b=()=>(s&&f.start(s),r(!0),v?void 0:()=>{l&&f.start(l),r(!1)}),k=S=>{S.forEach(N=>{const E=y.get(N.target);if(N.isIntersecting!==!!E)if(N.isIntersecting){const C=b();le.fun(C)?y.set(N.target,C):w.unobserve(N.target)}else E&&(E(),y.delete(N.target))})},w=new IntersectionObserver(k,{root:p&&p.current||void 0,threshold:typeof m=="number"||Array.isArray(m)?m:J4[m],...x});return w.observe(g),()=>w.unobserve(g)},[u]),a?[i,d]:[i,n]}function R4({children:e,...t}){return e(ka(t))}function eW({items:e,children:t,...n}){const r=KE(e.length,n);return e.map((i,a)=>{const o=t(i,a);return le.fun(o)?o(r[a]):o})}function tW({items:e,children:t,...n}){return YE(e,n)(t)}var pd=class extends dd{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Mo(...t);const n=this._get(),r=Gv(n);Yv(this,r.create(n))}advance(e){const t=this._get(),n=this.get();qr(t,n)||(xr(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&GE(this._active)&&um(this)}_get(){const e=le.arr(this.source)?this.source.map(Jt):Ut(Jt(this.source));return this.calc(...e)}_start(){this.idle&&!GE(this._active)&&(this.idle=!1,ye(od(this),e=>{e.done=!1}),Mn.skipAnimation?(be.batchedUpdates(()=>this.advance()),um(this)):cl.start(this))}_attach(){let e=1;ye(Ut(this.source),t=>{On(t)&&Oo(t,this),tm(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){ye(Ut(this.source),e=>{On(e)&&fl(e,this)}),this._active.clear(),um(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Ut(this.source).reduce((t,n)=>Math.max(t,(tm(n)?n.priority:0)+1),0))}};function nW(e){return e.idle!==!1}function GE(e){return!e.size||Array.from(e).every(nW)}function um(e){e.idle||(e.idle=!0,ye(od(e),t=>{t.done=!0}),dl(e,{type:"idle",parent:e}))}var rW=(e,...t)=>new pd(e,t),iW=(e,...t)=>(vE(),new pd(e,t));Mn.assign({createStringInterpolator:pE,to:(e,t)=>new pd(e,t)});var aW=cl.advance,XE=/^--/;function oW(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!XE.test(e)&&!(Nl.hasOwnProperty(e)&&Nl[e])?t+"px":(""+t).trim()}var ZE={};function sW(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:l,...c}=t,u=Object.values(c),d=Object.keys(c).map(f=>n||e.hasAttribute(f)?f:ZE[f]||(ZE[f]=f.replace(/([A-Z])/g,g=>"-"+g.toLowerCase())));a!==void 0&&(e.textContent=a);for(const f in i)if(i.hasOwnProperty(f)){const g=oW(f,i[f]);XE.test(f)?e.style.setProperty(f,g):e.style[f]=g}d.forEach((f,g)=>{e.setAttribute(f,u[g])}),r!==void 0&&(e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),l!==void 0&&e.setAttribute("viewBox",l)}var Nl={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lW=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),cW=["Webkit","Ms","Moz","O"];Nl=Object.keys(Nl).reduce((e,t)=>(cW.forEach(n=>e[lW(n,t)]=e[t]),e),Nl);var uW=/^(matrix|translate|scale|rotate|skew)/,dW=/^(translate)/,fW=/^(rotate|skew)/,dm=(e,t)=>le.num(e)&&e!==0?e+t:e,gd=(e,t)=>le.arr(e)?e.every(n=>gd(n,t)):le.num(e)?e===t:parseFloat(e)===t,hW=class extends ld{constructor({x:e,y:t,z:n,...r}){const i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(o=>[`translate3d(${o.map(s=>dm(s,"px")).join(",")})`,gd(o,0)])),br(r,(o,s)=>{if(s==="transform")i.push([o||""]),a.push(l=>[l,l===""]);else if(uW.test(s)){if(delete r[s],le.und(o))return;const l=dW.test(s)?"px":fW.test(s)?"deg":"";i.push(Ut(o)),a.push(s==="rotate3d"?([c,u,d,f])=>[`rotate3d(${c},${u},${d},${dm(f,l)})`,gd(f,0)]:c=>[`${s}(${c.map(u=>dm(u,l)).join(",")})`,gd(c,s.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new pW(i,a)),super(r)}},pW=class extends uE{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return ye(this.inputs,(n,r)=>{const i=Jt(n[0]),[a,o]=this.transforms[r](le.arr(i)?i:n.map(Jt));e+=" "+a,t=t&&o}),t?"none":e}observerAdded(e){e==1&&ye(this.inputs,t=>ye(t,n=>On(n)&&Oo(n,this)))}observerRemoved(e){e==0&&ye(this.inputs,t=>ye(t,n=>On(n)&&fl(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),dl(this,e)}},gW=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];Mn.assign({batchedUpdates:Qr.unstable_batchedUpdates,createStringInterpolator:pE,colors:Wj});var vW=T4(gW,{applyAnimatedValues:sW,createAnimatedStyle:e=>new hW(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),fm=vW.animated;const mW=Object.freeze(Object.defineProperty({__proto__:null,Any:M4,BailSignal:em,Controller:om,FrameValue:dd,Globals:Mn,Interpolation:pd,Spring:R4,SpringContext:Lo,SpringRef:hd,SpringValue:am,Trail:eW,Transition:tW,a:fm,animated:fm,config:TE,createInterpolator:Mo,easings:lE,inferTo:ud,interpolate:iW,to:rW,update:aW,useChain:L4,useInView:Q4,useIsomorphicLayoutEffect:Qt,useReducedMotion:w4,useResize:Z4,useScroll:X4,useSpring:ka,useSpringRef:V4,useSpringValue:K4,useSprings:cm,useTrail:KE,useTransition:YE},Symbol.toStringTag,{value:"Module"}));var hm={};const vd=Un(EA),El=Un(JI);var pm={};const JE=Un(w5),gm=Un(A6);var vm={},Ei={};Ei.__esModule=!0,Ei.default=void 0;var yW={top:"top",left:"left",right:"right",bottom:"bottom"},bW=yW;Ei.default=bW,vm.__esModule=!0,vm.default=_W;var Cl=xW(Ei);function xW(e){return e&&e.__esModule?e:{default:e}}function _W(e){var t=e.labelOffset,n=e.labelProps,r=e.orientation,i=e.range,a=e.tickLabelFontSize,o=e.tickLength,s=r===Cl.default.left||r===Cl.default.top?-1:1,l,c,u;if(r===Cl.default.top||r===Cl.default.bottom){var d=r===Cl.default.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(i[0])+Number(i[i.length-1]))/2,c=s*(o+t+a+d)}else l=s*((Number(i[0])+Number(i[i.length-1]))/2),c=-(o+t),u="rotate("+s*90+")";return{x:l,y:c,transform:u}}var mm={};mm.__esModule=!0,mm.default=CW;var ym=bm(_),wW=bm(zr),kW=JE,SW=vd,NW=gm,EW=bm(Ei);function bm(e){return e&&e.__esModule?e:{default:e}}function Tl(){return Tl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tl.apply(this,arguments)}function CW(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,i=e.tickClassName,a=e.tickComponent,o=e.tickLabelProps,s=e.tickStroke,l=s===void 0?"#222":s,c=e.tickTransform,u=e.ticks,d=e.strokeWidth,f=e.tickLineProps;return u.map(function(g){var p,v=g.value,m=g.index,x=g.from,y=g.to,b=g.formattedValue,k=(p=o[m])!=null?p:{},w=Math.max(10,typeof k.fontSize=="number"&&k.fontSize||0),S=y.y+(n&&r!==EW.default.top?w:0);return ym.default.createElement(SW.Group,{key:"visx-tick-"+v+"-"+m,className:(0,wW.default)("visx-axis-tick",i),transform:c},!t&&ym.default.createElement(kW.Line,Tl({from:x,to:y,stroke:l,strokeWidth:d,strokeLinecap:"square"},f)),a?a(Tl({},k,{x:y.x,y:S,formattedValue:b})):ym.default.createElement(NW.Text,Tl({x:y.x,y:S},k),b))})}pm.__esModule=!0,pm.default=AW;var md=Ml(_),QE=Ml(zr),TW=JE,MW=gm,$W=Ml(vm),OW=Ml(Ei),PW=Ml(mm);function Ml(e){return e&&e.__esModule?e:{default:e}}function $l(){return $l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$l.apply(this,arguments)}var RE={textAnchor:"middle",fontFamily:"Arial",fontSize:10,fill:"#222"};function AW(e){var t=e.axisFromPoint,n=e.axisLineClassName,r=e.axisToPoint,i=e.hideAxisLine,a=e.hideTicks,o=e.horizontal,s=e.label,l=s===void 0?"":s,c=e.labelClassName,u=e.labelOffset,d=u===void 0?14:u,f=e.labelProps,g=e.orientation,p=g===void 0?OW.default.bottom:g,v=e.scale,m=e.stroke,x=m===void 0?"#222":m,y=e.strokeDasharray,b=e.strokeWidth,k=b===void 0?1:b,w=e.tickClassName,S=e.tickComponent,N=e.tickLineProps,E=e.tickLabelProps,C=e.tickLength,T=C===void 0?8:C,O=e.tickStroke,P=O===void 0?"#222":O,M=e.tickTransform,$=e.ticks,A=e.ticksComponent,I=A===void 0?PW.default:A,j=$l({},RE,f),B=$l({},RE,typeof E=="object"?E:null),H=$.map(function(D){var W=D.value,Y=D.index;return typeof E=="function"?E(W,Y,$):B}),F=Math.max.apply(Math,[10].concat(H.map(function(D){return typeof D.fontSize=="number"?D.fontSize:0})));return md.default.createElement(md.default.Fragment,null,I({hideTicks:a,horizontal:o,orientation:p,scale:v,tickClassName:w,tickComponent:S,tickLabelProps:H,tickStroke:P,tickTransform:M,ticks:$,strokeWidth:k,tickLineProps:N}),!i&&md.default.createElement(TW.Line,{className:(0,QE.default)("visx-axis-line",n),from:t,to:r,stroke:x,strokeWidth:k,strokeDasharray:y}),l&&md.default.createElement(MW.Text,$l({className:(0,QE.default)("visx-axis-label",c)},(0,$W.default)({labelOffset:d,labelProps:j,orientation:p,range:v.range(),tickLabelFontSize:F,tickLength:T}),j),l))}var xm={};xm.__esModule=!0,xm.default=LW;function LW(e,t){t===void 0&&(t="center");var n=e;if(t!=="start"&&"bandwidth"in n){var r=n.bandwidth();return t==="center"&&(r/=2),n.round()&&(r=Math.round(r)),function(i){var a=n(i);return typeof a=="number"?a+r:a}}return e}var _m={};_m.__esModule=!0,_m.default=IW;var DW=El;function IW(e){var t=e;return"tickFormat"in t?t.tickFormat():DW.toString}var wm={};wm.__esModule=!0,wm.default=zW;var FW=Uu;function zW(e,t){var n=e.x,r=e.y;return new FW.Point(t?{x:n,y:r}:{x:r,y:n})}var Ol={};Ol.__esModule=!0,Ol.default=BW,Ol.defaultAxisRangePadding=void 0;function km(){return km=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},km.apply(this,arguments)}var yd=0;Ol.defaultAxisRangePadding=yd;function BW(e){return e===void 0&&(e=yd),typeof e=="number"?{start:e,end:e}:km({start:yd,end:yd},e)}hm.__esModule=!0,hm.default=XW,Vr(di);var jW=Vr(_),WW=Vr(zr),UW=vd,eC=El,HW=Vr(pm),qW=Vr(xm),VW=Vr(_m),bd=Vr(wm),xd=Vr(Ei),KW=Vr(Ol),YW=["children","axisClassName","hideAxisLine","hideTicks","hideZero","innerRef","left","numTicks","orientation","rangePadding","scale","tickFormat","tickLength","tickValues","top"];function Vr(e){return e&&e.__esModule?e:{default:e}}function Sm(){return Sm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sm.apply(this,arguments)}function GW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function XW(e){var t=e.children,n=t===void 0?HW.default:t,r=e.axisClassName,i=e.hideAxisLine,a=i===void 0?!1:i,o=e.hideTicks,s=o===void 0?!1:o,l=e.hideZero,c=l===void 0?!1:l,u=e.innerRef,d=e.left,f=d===void 0?0:d,g=e.numTicks,p=g===void 0?10:g,v=e.orientation,m=v===void 0?xd.default.bottom:v,x=e.rangePadding,y=x===void 0?0:x,b=e.scale,k=e.tickFormat,w=e.tickLength,S=w===void 0?8:w,N=e.tickValues,E=e.top,C=E===void 0?0:E,T=GW(e,YW),O=k??(0,VW.default)(b),P=m===xd.default.left,M=m===xd.default.top,$=M||m===xd.default.bottom,A=(0,qW.default)(b),I=P||M?-1:1,j=b.range(),B=(0,KW.default)(y),H=(0,bd.default)({x:Number(j[0])+.5-B.start,y:0},$),F=(0,bd.default)({x:Number(j[j.length-1])+.5+B.end,y:0},$),D=(N??(0,eC.getTicks)(b,p)).filter(function(Y){return!c||Y!==0&&Y!=="0"}).map(function(Y,U){return{value:Y,index:U}}),W=D.map(function(Y){var U=Y.value,K=Y.index,ee=(0,eC.coerceNumber)(A(U));return{value:U,index:K,from:(0,bd.default)({x:ee,y:0},$),to:(0,bd.default)({x:ee,y:S*I},$),formattedValue:O(U,K,D)}});return jW.default.createElement(UW.Group,{className:(0,WW.default)("visx-axis",r),innerRef:u,top:C,left:f},n(Sm({},T,{axisFromPoint:H,axisToPoint:F,hideAxisLine:a,hideTicks:s,hideZero:c,horizontal:$,numTicks:p,orientation:m,rangePadding:y,scale:b,tickFormat:O,tickLength:S,tickPosition:A,tickSign:I,ticks:W})))}var Nm={};const tC=Un(mW);var _d={};_d.__esModule=!0,_d.default=QW;var ZW=_,JW=El;function wd(e,t,n,r,i){var a;switch(e){case"center":return i;case"min":return n??0;case"max":return r??0;case"outside":default:return(a=(t??0)<i?n:r)!=null?a:0}}function nC(e){var t=e.from,n=e.to;return{fromX:t.x,toX:n.x,fromY:t.y,toY:n.y,opacity:1}}function QW(e){var t=e.scale,n=e.animateXOrY,r=e.animationTrajectory,i=r===void 0?"outside":r,a=n==="x";return(0,ZW.useMemo)(function(){var o=t.range().map(JW.coerceNumber),s=o[0],l=o[1],c=l!=null&&s!=null&&l<s,u=c?[l,s]:[s,l],d=u[0],f=u[1],g=l!=null&&s!=null?Math.abs(l-s):0,p=(d??0)+g/2,v=i;!a&&i==="min"&&(v="max"),!a&&i==="max"&&(v="min");var m=function(y){var b=y.from,k=y.to;return{fromX:a?wd(v,b.x,d,f,p):b.x,toX:a?wd(v,b.x,d,f,p):k.x,fromY:a?b.y:wd(v,b.y,d,f,p),toY:a?k.y:wd(v,b.y,d,f,p),opacity:0}};return{from:m,leave:m,enter:nC,update:nC}},[t,a,i])}Nm.__esModule=!0,Nm.default=r8;var Do=kd(_),Pl=tC,RW=kd(zr),e8=kd(Ei),t8=gm,n8=kd(_d);function kd(e){return e&&e.__esModule?e:{default:e}}function Al(){return Al=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Al.apply(this,arguments)}function r8(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,i=e.scale,a=e.tickClassName,o=e.tickComponent,s=e.tickLabelProps,l=e.tickStroke,c=l===void 0?"#222":l,u=e.tickTransform,d=e.ticks,f=e.tickLineProps,g=e.animationTrajectory,p=(0,Pl.useTransition)(d,Al({},(0,n8.default)({scale:i,animateXOrY:n?"x":"y",animationTrajectory:g}),{keys:function(m){return"tick-"+m.value+"-"+m.index}}));return Do.default.createElement(Do.default.Fragment,null,p(function(v,m,x,y){var b,k,w=v.fromX,S=v.toX,N=v.fromY,E=v.toY,C=v.opacity,T=x.key,O=(b=(k=s[y])!=null?k:s[0])!=null?b:{};return m==null||T==null?null:Do.default.createElement(Pl.animated.g,{key:T,className:(0,RW.default)("visx-axis-tick",a),transform:u},!t&&Do.default.createElement(Pl.animated.line,Al({x1:w,x2:S,y1:N,y2:E,stroke:c,strokeLinecap:"square",strokeOpacity:C},f)),Do.default.createElement(Pl.animated.g,{key:y,transform:(0,Pl.to)([S,E],function(P,M){var $;return"translate("+P+","+(M+(r===e8.default.bottom&&typeof O.fontSize=="number"?($=O.fontSize)!=null?$:10:0))+")"}),opacity:C},o?o(Al({},O,{x:S,y:E,formattedValue:m==null?void 0:m.formattedValue})):Do.default.createElement(t8.Text,O,m==null?void 0:m.formattedValue)))}))}var i8=u8;Cm(di);var Em=l8(_),a8=Cm(hm),o8=Cm(Nm),s8=["animationTrajectory","tickComponent"];function rC(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(rC=function(i){return i?n:t})(e)}function l8(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=rC(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function Cm(e){return e&&e.__esModule?e:{default:e}}function Sd(){return Sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sd.apply(this,arguments)}function c8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function u8(e){var t=e.animationTrajectory,n=e.tickComponent,r=c8(e,s8),i=(0,Em.useMemo)(function(){return function(o){return Em.default.createElement(o8.default,Sd({},o,{tickComponent:n,animationTrajectory:t}))}},[t,n]);return Em.default.createElement(a8.default,Sd({},r,{ticksComponent:i}))}var d8=["AxisComponent"];function Nd(){return Nd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nd.apply(this,arguments)}function f8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function h8(e){var t,n,r,i,a,o,s,l=e.AxisComponent,c=f8(e,d8),u=_.useContext(yr),d=u.theme,f=u.xScale,g=u.yScale,p=u.margin,v=u.width,m=u.height,x=c.orientation,y=_.useMemo(function(){var E,C,T,O;return x==="left"||x==="right"?d==null||(E=d.axisStyles)==null||(C=E.y)==null?void 0:C[x]:d==null||(T=d.axisStyles)==null||(O=T.x)==null?void 0:O[x]},[d,x]),b=c.tickLabelProps,k=_.useMemo(function(){return b||y?function(E,C,T){return Nd({},y==null?void 0:y.tickLabel,{width:x==="left"||x==="right"?p==null?void 0:p[x]:void 0},typeof b=="function"?b(E,C,T):b)}:void 0},[b,y,x,p]),w=x==="bottom"?(m??0)-((t=p==null?void 0:p.bottom)!=null?t:0):x==="top"&&(n=p==null?void 0:p.top)!=null?n:0,S=x==="left"?(r=p==null?void 0:p.left)!=null?r:0:x==="right"?(v??0)-((i=p==null?void 0:p.right)!=null?i:0):0,N=x==="left"||x==="right"?g:f;return N?_.createElement(l,Nd({top:w,left:S,labelProps:y==null?void 0:y.axisLabel,stroke:y==null||(a=y.axisLine)==null?void 0:a.stroke,strokeWidth:y==null||(o=y.axisLine)==null?void 0:o.strokeWidth,tickLength:y==null?void 0:y.tickLength,tickStroke:y==null||(s=y.tickLine)==null?void 0:s.stroke},c,{tickLabelProps:k,scale:N})):null}function Tm(){return Tm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tm.apply(this,arguments)}function iC(e){return _.createElement(h8,Tm({AxisComponent:i8},e))}var Mm={},Ed={};Ed.__esModule=!0,Ed.default=y8;var p8=aC(_),g8=aC(zr),v8=["from","to","fill","className","innerRef"];function aC(e){return e&&e.__esModule?e:{default:e}}function $m(){return $m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$m.apply(this,arguments)}function m8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function y8(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,i=r===void 0?{x:1,y:1}:r,a=e.fill,o=a===void 0?"transparent":a,s=e.className,l=e.innerRef,c=m8(e,v8),u=n.x===i.x||n.y===i.y;return p8.default.createElement("line",$m({ref:l,className:(0,g8.default)("visx-line",s),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:o,shapeRendering:u?"crispEdges":"auto"},c))}var Cd={};Cd.__esModule=!0,Cd.default=b8;function b8(e){return"bandwidth"in e?e.bandwidth():0}Mm.__esModule=!0,Mm.default=uC;var oC=Ll(di),sC=Ll(_),x8=Ll(zr),_8=Ll(Ed),w8=vd,lC=Uu,cC=El,k8=Ll(Cd),S8=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function Ll(e){return e&&e.__esModule?e:{default:e}}function Om(){return Om=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Om.apply(this,arguments)}function N8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function uC(e){var t=e.top,n=t===void 0?0:t,r=e.left,i=r===void 0?0:r,a=e.scale,o=e.width,s=e.stroke,l=s===void 0?"#eaf0f6":s,c=e.strokeWidth,u=c===void 0?1:c,d=e.strokeDasharray,f=e.className,g=e.children,p=e.numTicks,v=p===void 0?10:p,m=e.lineStyle,x=e.offset,y=e.tickValues,b=N8(e,S8),k=y??(0,cC.getTicks)(a,v),w=(x??0)+(0,k8.default)(a)/2,S=k.map(function(N,E){var C,T=((C=(0,cC.coerceNumber)(a(N)))!=null?C:0)+w;return{index:E,from:new lC.Point({x:0,y:T}),to:new lC.Point({x:o,y:T})}});return sC.default.createElement(w8.Group,{className:(0,x8.default)("visx-rows",f),top:n,left:i},g?g({lines:S}):S.map(function(N){var E=N.from,C=N.to,T=N.index;return sC.default.createElement(_8.default,Om({key:"row-line-"+T,from:E,to:C,stroke:l,strokeWidth:u,strokeDasharray:d,style:m},b))}))}uC.propTypes={tickValues:oC.default.array,width:oC.default.number.isRequired};var Td={};Td.__esModule=!0,Td.default=fC;var E8=Am(di),Pm=Am(_),dC=tC,C8=Am(_d),T8=["scale","lines","animationTrajectory","animateXOrY","lineKey","lineStyle"];function Am(e){return e&&e.__esModule?e:{default:e}}function Md(){return Md=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Md.apply(this,arguments)}function M8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function fC(e){var t=e.scale,n=e.lines,r=e.animationTrajectory,i=e.animateXOrY,a=e.lineKey,o=e.lineStyle,s=M8(e,T8),l=(0,dC.useTransition)(n,Md({},(0,C8.default)({scale:t,animateXOrY:i,animationTrajectory:r}),{key:a}));return Pm.default.createElement(Pm.default.Fragment,null,l(function(c,u,d){var f=c.fromX,g=c.toX,p=c.fromY,v=c.toY,m=c.opacity,x=d.key;return Pm.default.createElement(dC.animated.line,Md({key:x,x1:f,x2:g,y1:p,y2:v,strokeOpacity:m,style:o},s))}))}fC.propTypes={lineKey:E8.default.func.isRequired};var $8=D8,hC=Lm(_),O8=Lm(Mm),P8=Lm(Td),A8=["scale","width","numTicks","tickValues","offset","className","animationTrajectory","top","left"];function Lm(e){return e&&e.__esModule?e:{default:e}}function Dm(){return Dm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dm.apply(this,arguments)}function L8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function D8(e){var t=e.scale,n=e.width,r=e.numTicks,i=e.tickValues,a=e.offset,o=e.className,s=e.animationTrajectory,l=e.top,c=e.left,u=L8(e,A8);return hC.default.createElement(O8.default,{scale:t,width:n,numTicks:r,tickValues:i,className:o,top:l,left:c,offset:a},function(d){var f=d.lines;return hC.default.createElement(P8.default,Dm({scale:t,lines:f,animationTrajectory:s,animateXOrY:"y",lineKey:function(p){var v,m;return"row-"+((v=p==null||(m=p.from)==null?void 0:m.y)!=null?v:"")+"-"+p.index}},u))})}var Im={};Im.__esModule=!0,Im.default=yC;var pC=Dl(di),gC=Dl(_),I8=Dl(zr),F8=Dl(Ed),z8=vd,vC=Uu,mC=El,B8=Dl(Cd),j8=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function Dl(e){return e&&e.__esModule?e:{default:e}}function Fm(){return Fm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fm.apply(this,arguments)}function W8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function yC(e){var t=e.top,n=t===void 0?0:t,r=e.left,i=r===void 0?0:r,a=e.scale,o=e.height,s=e.stroke,l=s===void 0?"#eaf0f6":s,c=e.strokeWidth,u=c===void 0?1:c,d=e.strokeDasharray,f=e.className,g=e.numTicks,p=g===void 0?10:g,v=e.lineStyle,m=e.offset,x=e.tickValues,y=e.children,b=W8(e,j8),k=x??(0,mC.getTicks)(a,p),w=(m??0)+(0,B8.default)(a)/2,S=k.map(function(N,E){var C,T=((C=(0,mC.coerceNumber)(a(N)))!=null?C:0)+w;return{index:E,from:new vC.Point({x:T,y:0}),to:new vC.Point({x:T,y:o})}});return gC.default.createElement(z8.Group,{className:(0,I8.default)("visx-columns",f),top:n,left:i},y?y({lines:S}):S.map(function(N){var E=N.from,C=N.to,T=N.index;return gC.default.createElement(F8.default,Fm({key:"column-line-"+T,from:E,to:C,stroke:l,strokeWidth:u,strokeDasharray:d,style:v},b))}))}yC.propTypes={tickValues:pC.default.array,height:pC.default.number.isRequired};var U8=Y8,bC=zm(_),H8=zm(Im),q8=zm(Td),V8=["scale","height","numTicks","tickValues","offset","className","animationTrajectory","top","left"];function zm(e){return e&&e.__esModule?e:{default:e}}function Bm(){return Bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bm.apply(this,arguments)}function K8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Y8(e){var t=e.scale,n=e.height,r=e.numTicks,i=e.tickValues,a=e.offset,o=e.className,s=e.animationTrajectory,l=e.top,c=e.left,u=K8(e,V8);return bC.default.createElement(H8.default,{scale:t,height:n,numTicks:r,tickValues:i,className:o,offset:a,top:l,left:c},function(d){var f=d.lines;return bC.default.createElement(q8.default,Bm({scale:t,lines:f,animationTrajectory:s,animateXOrY:"x",lineKey:function(p){var v,m;return"column-"+((v=p==null||(m=p.from)==null?void 0:m.x)!=null?v:"")+"-"+p.index}},u))})}var G8=["rows","columns","GridRowsComponent","GridColumnsComponent"];function $d(){return $d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$d.apply(this,arguments)}function X8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function xC(e){var t=e.rows,n=t===void 0?!0:t,r=e.columns,i=r===void 0?!0:r,a=e.GridRowsComponent,o=e.GridColumnsComponent,s=X8(e,G8),l=_.useContext(yr),c=l.theme,u=l.xScale,d=l.yScale,f=l.margin,g=l.innerWidth,p=l.innerHeight,v=c==null?void 0:c.gridStyles;return _.createElement(_.Fragment,null,n&&d&&g!=null&&_.createElement(a,$d({left:f==null?void 0:f.left,lineStyle:v,width:g,scale:d},s)),i&&u&&p!=null&&_.createElement(o,$d({top:f==null?void 0:f.top,lineStyle:v,height:p,scale:u},s)))}xC.propTypes={rows:V.bool,columns:V.bool};var Z8=["animationTrajectory"];function Il(){return Il=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Il.apply(this,arguments)}function J8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Q8(e){var t=e.animationTrajectory,n=J8(e,Z8),r=_.useMemo(function(){return function(o){return _.createElement($8,Il({},o,{animationTrajectory:t}))}},[t]),i=_.useMemo(function(){return function(o){return _.createElement(U8,Il({},o,{animationTrajectory:t}))}},[t]);return _.createElement(xC,Il({GridRowsComponent:r,GridColumnsComponent:i},n))}var R8=["tooltipOpen"];function eU(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Od(){return Od=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Od.apply(this,arguments)}function tU(e){var t=_.useState(Od({tooltipOpen:!1},e)),n=t[0],r=t[1],i=_.useCallback(function(o){return r(typeof o=="function"?function(s){s.tooltipOpen;var l=eU(s,R8);return Od({},o(l),{tooltipOpen:!0})}:{tooltipOpen:!0,tooltipLeft:o.tooltipLeft,tooltipTop:o.tooltipTop,tooltipData:o.tooltipData})},[r]),a=_.useCallback(function(){return r({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0})},[r]);return{tooltipOpen:n.tooltipOpen,tooltipLeft:n.tooltipLeft,tooltipTop:n.tooltipTop,tooltipData:n.tooltipData,updateTooltip:r,showTooltip:i,hideTooltip:a}}function nU(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,jm(e,t)}function jm(e,t){return jm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},jm(e,t)}var _C=function(e){nU(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.componentWillUnmount=function(){this.node&&document.body&&(document.body.removeChild(this.node),delete this.node)},n.render=function(){return!this.node&&typeof document<"u"&&(this.node=document.createElement("div"),this.props.zIndex!=null&&(this.node.style.zIndex=""+this.props.zIndex),document.body.append(this.node)),this.node?Qr.createPortal(this.props.children,this.node):null},t}(_.PureComponent);_C.propTypes={zIndex:V.oneOfType([V.number,V.string])};var rU=["className","top","left","offsetLeft","offsetTop","style","children","unstyled","applyPositionStyle"];function Pd(){return Pd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pd.apply(this,arguments)}function iU(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Wm={position:"absolute",backgroundColor:"white",color:"#666666",padding:".3rem .5rem",borderRadius:"3px",fontSize:"14px",boxShadow:"0 1px 2px rgba(33,33,33,0.2)",lineHeight:"1em",pointerEvents:"none"},Ad=_.forwardRef(function(e,t){var n=e.className,r=e.top,i=e.left,a=e.offsetLeft,o=a===void 0?10:a,s=e.offsetTop,l=s===void 0?10:s,c=e.style,u=c===void 0?Wm:c,d=e.children,f=e.unstyled,g=f===void 0?!1:f,p=e.applyPositionStyle,v=p===void 0?!1:p,m=iU(e,rU);return _.createElement("div",Pd({ref:t,className:$e("visx-tooltip",n),style:Pd({top:r==null||l==null?r:r+l,left:i==null||o==null?i:i+o},v&&{position:"absolute"},!g&&u)},m),d)});Ad.propTypes={children:V.node,className:V.string,left:V.number,offsetLeft:V.number,offsetTop:V.number,top:V.number,applyPositionStyle:V.bool,unstyled:V.bool},Ad.displayName="Tooltip";function Um(){return Um=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Um.apply(this,arguments)}function aU(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oU(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Hm(e,t)}function Hm(e,t){return Hm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Hm(e,t)}var wC={top:0,right:0,bottom:0,left:0,width:0,height:0};function sU(e){var t;return t=function(n){oU(r,n);function r(a){var o;return o=n.call(this,a)||this,o.state={rect:void 0,parentRect:void 0},o.nodeRef=_.createRef(),o.getRects=o.getRects.bind(aU(o)),o}var i=r.prototype;return i.componentDidMount=function(){var o,s=this;this.node=(o=this.nodeRef)!=null&&o.current?this.nodeRef.current:Qr.findDOMNode(this),this.setState(function(){return s.getRects()})},i.getRects=function(){if(!this.node)return this.state;var o=this.node,s=o.parentNode,l=o.getBoundingClientRect?o.getBoundingClientRect():wC,c=s!=null&&s.getBoundingClientRect?s.getBoundingClientRect():wC;return{rect:l,parentRect:c}},i.render=function(){return _.createElement(e,Um({nodeRef:this.nodeRef,getRects:this.getRects},this.state,this.props))},r}(_.PureComponent),t.displayName="withBoundingRects("+(e.displayName||"")+")",t}var kC=_.createContext({isFlippedVertically:!1,isFlippedHorizontally:!1}),lU=kC.Provider;kC.Consumer;var cU=["children","getRects","left","offsetLeft","offsetTop","parentRect","rect","style","top","unstyled","nodeRef"];function Ld(){return Ld=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ld.apply(this,arguments)}function uU(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function SC(e){var t=e.children;e.getRects;var n=e.left,r=n===void 0?0:n,i=e.offsetLeft,a=i===void 0?10:i,o=e.offsetTop,s=o===void 0?10:o,l=e.parentRect,c=e.rect,u=e.style,d=u===void 0?Wm:u,f=e.top,g=f===void 0?0:f,p=e.unstyled,v=p===void 0?!1:p,m=e.nodeRef,x=uU(e,cU),y,b=!1,k=!1;if(c&&l){var w=r,S=g;if(l.width){var N=w+a+c.width-l.width,E=c.width-w-a;b=N>0&&N>E}else{var C=w+a+c.width-window.innerWidth,T=c.width-w-a;b=C>0&&C>T}if(l.height){var O=S+s+c.height-l.height,P=c.height-S-s;k=O>0&&O>P}else k=S+s+c.height>window.innerHeight;w=b?w-c.width-a:w+a,S=k?S-c.height-s:S+s,w=Math.round(w),S=Math.round(S),y="translate("+w+"px, "+S+"px)"}return _.createElement(Ad,Ld({ref:m,style:Ld({left:0,top:0,transform:y},!v&&d)},x),_.createElement(lU,{value:{isFlippedVertically:!k,isFlippedHorizontally:!b}},t))}SC.propTypes={nodeRef:V.oneOfType([V.string,V.func,V.object])};const dU=sU(SC);var fU=["detectBounds","zIndex"],hU=["left","top","detectBounds","zIndex"];function qm(){return qm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qm.apply(this,arguments)}function NC(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function pU(e){var t=e===void 0?{}:e,n=t.detectBounds,r=n===void 0?!0:n,i=t.zIndex,a=NC(t,fU),o=Mj(a),s=o[0],l=o[1],c=o[2],u=_.useState(!1),d=u[0],f=u[1];_.useEffect(function(){f(!1)},[]);var g=_.useMemo(function(){return function(p){var v=p.left,m=v===void 0?0:v,x=p.top,y=x===void 0?0:x,b=p.detectBounds,k=p.zIndex,w=NC(p,hU),S=b??r,N=k??i,E=S?dU:Ad,C=d?0:window.scrollX,T=d?0:window.scrollY,O=m+(l.left||0)+C,P=y+(l.top||0)+T;return _.createElement(_C,{zIndex:N},_.createElement(E,qm({left:O,top:P},w)))}},[r,i,l.left,l.top,d]);return{containerRef:s,containerBounds:l,forceRefreshBounds:c,TooltipInPortal:g}}var Fl=_.createContext(null),gU=["debounce","detectBounds","horizontalCrosshairStyle","glyphStyle","renderTooltip","renderGlyph","resizeObserverPolyfill","scroll","showDatumGlyph","showHorizontalCrosshair","showSeriesGlyphs","showVerticalCrosshair","snapTooltipToDatumX","snapTooltipToDatumY","verticalCrosshairStyle","zIndex"],vU=["x","y"];function EC(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Kr(){return Kr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kr.apply(this,arguments)}var Vm={position:"absolute",pointerEvents:"none",fontSize:0,lineHeight:0},mU={position:"absolute",left:0,top:0,opacity:0,width:0,height:0,pointerEvents:"none"};function CC(e){var t=_.useContext(yr)||{},n=t.theme;return _.createElement("circle",Kr({cx:e.x,cy:e.y,r:e.size,fill:e.color,stroke:n==null?void 0:n.backgroundColor,strokeWidth:1.5,paintOrder:"fill"},e.glyphStyle))}CC.propTypes={isNearestDatum:V.bool.isRequired};function yU(e){return _.createElement(CC,e)}function TC(e){var t,n,r,i,a,o,s,l,c,u,d,f,g,p=e.debounce,v=e.detectBounds,m=e.horizontalCrosshairStyle,x=e.glyphStyle,y=e.renderTooltip,b=e.renderGlyph,k=b===void 0?yU:b,w=e.resizeObserverPolyfill,S=e.scroll,N=S===void 0?!0:S,E=e.showDatumGlyph,C=E===void 0?!1:E,T=e.showHorizontalCrosshair,O=T===void 0?!1:T,P=e.showSeriesGlyphs,M=P===void 0?!1:P,$=e.showVerticalCrosshair,A=$===void 0?!1:$,I=e.snapTooltipToDatumX,j=I===void 0?!1:I,B=e.snapTooltipToDatumY,H=B===void 0?!1:B,F=e.verticalCrosshairStyle,D=e.zIndex,W=EC(e,gU),Y=_.useContext(yr)||{},U=Y.colorScale,K=Y.theme,ee=Y.innerHeight,ie=Y.innerWidth,ce=Y.margin,Z=Y.xScale,J=Y.yScale,z=Y.dataRegistry,L=Y.resizeObserverPolyfill,q=_.useContext(Fl),G=pU({debounce:p,detectBounds:v,polyfill:L||w,scroll:N,zIndex:D}),ne=G.containerRef,X=G.TooltipInPortal,ge=G.forceRefreshBounds,Pe=_.useCallback(function(Vt){var Ln;ne((Ln=Vt==null?void 0:Vt.parentElement)!=null?Ln:null)},[ne]),ze=q!=null&&q.tooltipOpen?y(Kr({},q,{colorScale:U})):null,ke=(q==null?void 0:q.tooltipOpen)&&ze!=null,Be=_.useRef(!1);_.useEffect(function(){ke&&!Be.current&&ge(),Be.current=ke},[ke,ge]);var Se=q==null?void 0:q.tooltipLeft,nt=q==null?void 0:q.tooltipTop,qe=Z?Tv(Z):0,Tt=J?Tv(J):0,xt=_.useCallback(function(Vt,Ln){var Re,_t,tn=z==null?void 0:z.get(Vt),Pi=tn==null?void 0:tn.xAccessor,Gr=tn==null?void 0:tn.yAccessor,Wo=Z&&Pi?(Re=Number(Z(Pi(Ln)))+qe/2)!=null?Re:0:void 0,Ea=J&&Gr?(_t=Number(J(Gr(Ln)))+Tt/2)!=null?_t:0:void 0;return{left:Wo,top:Ea}},[z,qe,Tt,Z,J]),Ae=q==null||(t=q.tooltipData)==null?void 0:t.nearestDatum,it=(n=Ae==null?void 0:Ae.key)!=null?n:"";if(ke&&Ae&&(j||H)){var At=xt(it,Ae.datum),dn=At.left,Pn=At.top;Se=j&&Zt(dn)?dn:Se,nt=H&&Zt(Pn)?Pn:nt}var Qn=[];if(ke&&(C||M)){var ue,re=Number((ue=x==null?void 0:x.radius)!=null?ue:4);if(M){var de,Ne;Object.values((de=q==null||(Ne=q.tooltipData)==null?void 0:Ne.datumByKey)!=null?de:{}).forEach(function(Vt){var Ln,Re,_t,tn=Vt.key,Pi=Vt.datum,Gr=Vt.index,Wo=(Ln=(Re=U==null?void 0:U(tn))!=null?Re:K==null||(_t=K.htmlLabel)==null?void 0:_t.color)!=null?Ln:"#222",Ea=xt(tn,Pi),Yl=Ea.left,te=Ea.top;!Zt(Yl)||!Zt(te)||Qn.push({key:tn,color:Wo,datum:Pi,index:Gr,size:re,x:Yl,y:te,glyphStyle:x,isNearestDatum:Ae?Ae.key===tn:!1})})}else if(Ae){var Me=xt(it,Ae.datum),at=Me.left,De=Me.top;if(Zt(at)&&Zt(De)){var fn,An,Rn,ql,Vl,Kl,Hd=(fn=(An=(Rn=(ql=it&&(U==null?void 0:U(it)))!=null?ql:null)!=null?Rn:K==null||(Vl=K.gridStyles)==null?void 0:Vl.stroke)!=null?An:K==null||(Kl=K.htmlLabel)==null?void 0:Kl.color)!=null?fn:"#222";Qn.push({key:it,color:Hd,datum:Ae.datum,index:Ae.index,size:re,x:at,y:De,glyphStyle:x,isNearestDatum:!0})}}}return _.createElement(_.Fragment,null,_.createElement("svg",{ref:Pe,style:mU}),ke&&_.createElement(_.Fragment,null,A&&_.createElement(X,{className:"visx-crosshair visx-crosshair-vertical",left:Se,top:ce==null?void 0:ce.top,offsetLeft:0,offsetTop:0,detectBounds:!1,style:Vm},_.createElement("svg",{width:"1",height:ee,overflow:"visible"},_.createElement("line",Kr({x1:0,x2:0,y1:0,y2:ee,strokeWidth:1.5,stroke:(r=(i=K==null||(a=K.gridStyles)==null?void 0:a.stroke)!=null?i:K==null||(o=K.htmlLabel)==null?void 0:o.color)!=null?r:"#222"},F)))),O&&_.createElement(X,{className:"visx-crosshair visx-crosshair-horizontal",left:ce==null?void 0:ce.left,top:nt,offsetLeft:0,offsetTop:0,detectBounds:!1,style:Vm},_.createElement("svg",{width:ie,height:"1",overflow:"visible"},_.createElement("line",Kr({x1:0,x2:ie,y1:0,y2:0,strokeWidth:1.5,stroke:(s=(l=K==null||(c=K.gridStyles)==null?void 0:c.stroke)!=null?l:K==null||(u=K.htmlLabel)==null?void 0:u.color)!=null?s:"#222"},m)))),Qn.map(function(Vt,Ln){var Re=Vt.x,_t=Vt.y,tn=EC(Vt,vU);return _.createElement(X,{key:Ln,className:"visx-tooltip-glyph",left:Re,top:_t,offsetLeft:0,offsetTop:0,detectBounds:!1,style:Vm},_.createElement("svg",{overflow:"visible"},k(Kr({x:0,y:0},tn))))}),_.createElement(X,Kr({left:Se,top:nt,style:Kr({},Wm,{background:(d=K==null?void 0:K.backgroundColor)!=null?d:"white",boxShadow:"0 1px 2px "+(K!=null&&(f=K.htmlLabel)!=null&&f.color?(K==null||(g=K.htmlLabel)==null?void 0:g.color)+"55":"#22222255")},K==null?void 0:K.htmlLabel)},W),ze)))}TC.propTypes={renderTooltip:V.func.isRequired,renderGlyph:V.func,snapTooltipToDatumX:V.bool,snapTooltipToDatumY:V.bool,showVerticalCrosshair:V.bool,showHorizontalCrosshair:V.bool,showDatumGlyph:V.bool,showSeriesGlyphs:V.bool};function MC(e){var t=_.useContext(Fl);return t!=null&&t.tooltipOpen?_.createElement(TC,e):null}MC.propTypes={renderTooltip:V.func.isRequired,renderGlyph:V.func,snapTooltipToDatumX:V.bool,snapTooltipToDatumY:V.bool,showVerticalCrosshair:V.bool,showHorizontalCrosshair:V.bool,showDatumGlyph:V.bool,showSeriesGlyphs:V.bool};var Km={},bU=Lu,xU=function(){return bU.Date.now()},_U=xU,wU=/\s/;function kU(e){for(var t=e.length;t--&&wU.test(e.charAt(t)););return t}var SU=kU,NU=SU,EU=/^\s+/;function CU(e){return e&&e.slice(0,NU(e)+1).replace(EU,"")}var TU=CU;function MU(e){return e!=null&&typeof e=="object"}var $U=MU,OU=xN,PU=$U,AU="[object Symbol]";function LU(e){return typeof e=="symbol"||PU(e)&&OU(e)==AU}var DU=LU,IU=TU,$C=Du,FU=DU,OC=NaN,zU=/^[-+]0x[0-9a-f]+$/i,BU=/^0b[01]+$/i,jU=/^0o[0-7]+$/i,WU=parseInt;function UU(e){if(typeof e=="number")return e;if(FU(e))return OC;if($C(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=$C(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=IU(e);var n=BU.test(e);return n||jU.test(e)?WU(e.slice(2),n?2:8):zU.test(e)?OC:+e}var HU=UU,qU=Du,Ym=_U,PC=HU,VU="Expected a function",KU=Math.max,YU=Math.min;function GU(e,t,n){var r,i,a,o,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(VU);t=PC(t)||0,qU(n)&&(u=!!n.leading,d="maxWait"in n,a=d?KU(PC(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f);function g(S){var N=r,E=i;return r=i=void 0,c=S,o=e.apply(E,N),o}function p(S){return c=S,s=setTimeout(x,t),u?g(S):o}function v(S){var N=S-l,E=S-c,C=t-N;return d?YU(C,a-E):C}function m(S){var N=S-l,E=S-c;return l===void 0||N>=t||N<0||d&&E>=a}function x(){var S=Ym();if(m(S))return y(S);s=setTimeout(x,v(S))}function y(S){return s=void 0,f&&r?g(S):(r=i=void 0,o)}function b(){s!==void 0&&clearTimeout(s),c=0,r=l=i=s=void 0}function k(){return s===void 0?o:y(Ym())}function w(){var S=Ym(),N=m(S);if(r=arguments,i=this,l=S,N){if(s===void 0)return p(l);if(d)return clearTimeout(s),s=setTimeout(x,t),g(l)}return s===void 0&&(s=setTimeout(x,t)),o}return w.cancel=b,w.flush=k,w}var AC=GU;const LC=_s(AC);Km.__esModule=!0,Km.default=QU;var XU=ZU(AC),zl=_;function ZU(e){return e&&e.__esModule?e:{default:e}}function Dd(){return Dd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dd.apply(this,arguments)}var JU=[],DC={width:0,height:0,top:0,left:0};function QU(e){var t=e===void 0?{}:e,n=t.initialSize,r=n===void 0?DC:n,i=t.debounceTime,a=i===void 0?300:i,o=t.ignoreDimensions,s=o===void 0?JU:o,l=t.enableDebounceLeadingCall,c=l===void 0?!0:l,u=t.resizeObserverPolyfill,d=(0,zl.useRef)(null),f=(0,zl.useRef)(0),g=(0,zl.useState)(Dd({},DC,r)),p=g[0],v=g[1],m=(0,zl.useMemo)(function(){var x=Array.isArray(s)?s:[s];return(0,XU.default)(function(y){v(function(b){var k=Object.keys(b),w=k.filter(function(N){return b[N]!==y[N]}),S=w.every(function(N){return x.includes(N)});return S?b:y})},a,{leading:c})},[a,c,s]);return(0,zl.useEffect)(function(){var x=u||window.ResizeObserver,y=new x(function(b){b.forEach(function(k){var w,S=(w=k==null?void 0:k.contentRect)!=null?w:{},N=S.left,E=S.top,C=S.width,T=S.height;f.current=window.requestAnimationFrame(function(){m({width:C,height:T,top:E,left:N})})})});return d.current&&y.observe(d.current),function(){window.cancelAnimationFrame(f.current),y.disconnect(),m.cancel()}},[m,u]),Dd({parentRef:d,resize:m},p)}var RU=zC,IC=Gm(di),e9=Gm(_),t9=Gm(Km),n9=["className","children","debounceTime","ignoreDimensions","initialSize","parentSizeStyles","enableDebounceLeadingCall","resizeObserverPolyfill"],r9=["parentRef","resize"];function Gm(e){return e&&e.__esModule?e:{default:e}}function Id(){return Id=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Id.apply(this,arguments)}function FC(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var i9={width:"100%",height:"100%"};function zC(e){var t=e.className,n=e.children,r=e.debounceTime,i=e.ignoreDimensions,a=e.initialSize,o=e.parentSizeStyles,s=o===void 0?i9:o,l=e.enableDebounceLeadingCall,c=l===void 0?!0:l,u=e.resizeObserverPolyfill,d=FC(e,n9),f=(0,t9.default)({initialSize:a,debounceTime:r,ignoreDimensions:i,enableDebounceLeadingCall:c,resizeObserverPolyfill:u}),g=f.parentRef,p=f.resize,v=FC(f,r9);return e9.default.createElement("div",Id({style:s,ref:g,className:t},d),n(Id({},v,{ref:g.current,resize:p})))}zC.propTypes={className:IC.default.string,children:IC.default.func.isRequired};var BC=_.createContext(null);function Ci(e,t,n){var r=_.useContext(BC),i=_.useRef();i.current=n;var a=_.useCallback(function(o,s,l){r&&r.emit(o,{event:s,svgPoint:ON(s),source:l})},[r]);return _.useEffect(function(){if(r&&e&&t){var o=function(l){var c;(!i.current||l!=null&&l.source&&(c=i.current)!=null&&c.includes(l.source))&&t(l)};return r.on(e,o),function(){return r==null?void 0:r.off(e,o)}}},[r,e,t]),r?a:null}function a9(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}function o9(e){var t=e.children,n=_.useMemo(function(){return a9()},[]);return _.createElement(BC.Provider,{value:n},t)}function Xm(){return Xm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xm.apply(this,arguments)}function jC(e){var t=e.hideTooltipDebounceMs,n=t===void 0?400:t,r=e.children,i=tU(void 0),a=i.tooltipOpen,o=i.tooltipLeft,s=i.tooltipTop,l=i.tooltipData,c=i.updateTooltip,u=i.hideTooltip,d=_.useRef(null);function f(){d.current&&(d.current.cancel(),d.current=null)}_.useEffect(function(){return f},[]);var g=_.useRef(function(m){var x=m.svgPoint,y=m.index,b=m.key,k=m.datum,w=m.distanceX,S=m.distanceY;f();var N=Zt(w)?w:1/0,E=Zt(S)?S:1/0,C=Math.sqrt(Math.pow(N,2)+Math.pow(E,2));c(function(T){var O,P,M,$=T.tooltipData,A=$!=null&&$.nearestDatum&&Zt($.nearestDatum.distance)?$.nearestDatum.distance:1/0;return{tooltipOpen:!0,tooltipLeft:x==null?void 0:x.x,tooltipTop:x==null?void 0:x.y,tooltipData:{nearestDatum:((O=$==null||(P=$.nearestDatum)==null?void 0:P.key)!=null?O:"")!==b&&A<C?$==null?void 0:$.nearestDatum:{key:b,index:y,datum:k,distance:C},datumByKey:Xm({},$==null?void 0:$.datumByKey,(M={},M[b]={datum:k,index:y,key:b},M))}}})}),p=_.useCallback(function(){d.current=LC(u,n),d.current()},[u,n]),v=_.useMemo(function(){return{tooltipOpen:a,tooltipLeft:o,tooltipTop:s,tooltipData:l,updateTooltip:c,showTooltip:g.current,hideTooltip:p}},[p,l,o,a,s,c]);return _.createElement(Fl.Provider,{value:v},r)}jC.propTypes={hideTooltipDebounceMs:V.number,children:V.node.isRequired};const s9=Un(dI);var Bl={},Zm={};Zm.__esModule=!0,Zm.default=l9;function l9(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}var Jm={};Jm.__esModule=!0,Jm.default=c9;function c9(e,t){t.range&&("padding"in e,e.range(t.range))}var Qm={};Qm.__esModule=!0,Qm.default=u9;function u9(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}var Rm={};Rm.__esModule=!0,Rm.default=d9;function d9(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}var ey={};ey.__esModule=!0,ey.default=f9;function f9(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}var ty={};ty.__esModule=!0,ty.default=h9;function h9(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}var ny={};ny.__esModule=!0,ny.default=p9;function p9(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}var ry={},iy={};const WC=Un(bI);iy.__esModule=!0,iy.default=g9;var Ti=WC,UC={lab:Ti.interpolateLab,hcl:Ti.interpolateHcl,"hcl-long":Ti.interpolateHclLong,hsl:Ti.interpolateHsl,"hsl-long":Ti.interpolateHslLong,cubehelix:Ti.interpolateCubehelix,"cubehelix-long":Ti.interpolateCubehelixLong,rgb:Ti.interpolateRgb};function g9(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return UC[e]}var t=e.type,n=e.gamma,r=UC[t];return typeof n>"u"?r:r.gamma(n)}ry.__esModule=!0,ry.default=y9;var v9=m9(iy);function m9(e){return e&&e.__esModule?e:{default:e}}function y9(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=(0,v9.default)(t.interpolate);e.interpolate(n)}}var ay={};const b9=Un(wI);var oy={};oy.__esModule=!0,oy.default=w9;var x9=new Date(Date.UTC(2020,1,2,3,4,5)),_9="%Y-%m-%d %H:%M";function w9(e){var t=e.tickFormat(1,_9)(x9);return t==="2020-02-02 03:04"}ay.__esModule=!0,ay.default=N9;var Rt=b9,k9=S9(oy);function S9(e){return e&&e.__esModule?e:{default:e}}var HC={day:Rt.timeDay,hour:Rt.timeHour,minute:Rt.timeMinute,month:Rt.timeMonth,second:Rt.timeSecond,week:Rt.timeWeek,year:Rt.timeYear},qC={day:Rt.utcDay,hour:Rt.utcHour,minute:Rt.utcMinute,month:Rt.utcMonth,second:Rt.utcSecond,week:Rt.utcWeek,year:Rt.utcYear};function N9(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,i=(0,k9.default)(r);if(typeof n=="string")r.nice(i?qC[n]:HC[n]);else{var a=n.interval,o=n.step,s=(i?qC[a]:HC[a]).every(o);s!=null&&r.nice(s)}}}}var sy={};sy.__esModule=!0,sy.default=E9;function E9(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}var ly={};ly.__esModule=!0,ly.default=C9;function C9(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}var cy={};cy.__esModule=!0,cy.default=M9;var T9=WC;function M9(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(T9.interpolateRound))}var uy={};uy.__esModule=!0,uy.default=$9;function $9(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}var dy={};dy.__esModule=!0,dy.default=O9;function O9(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],i=n[1],a=i<r,o=a?[i,r]:[r,i],s=o[0],l=o[1],c=[Math.min(0,s),Math.max(0,l)];e.domain(a?c.reverse():c)}}Bl.__esModule=!0,Bl.ALL_OPERATORS=void 0,Bl.default=Y9;var P9=en(Zm),A9=en(Jm),L9=en(Qm),D9=en(Rm),I9=en(ey),F9=en(ty),z9=en(ny),B9=en(ry),j9=en(ay),W9=en(sy),U9=en(ly),H9=en(cy),q9=en(uy),V9=en(dy);function en(e){return e&&e.__esModule?e:{default:e}}var VC=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"];Bl.ALL_OPERATORS=VC;var K9={domain:P9.default,nice:j9.default,zero:V9.default,interpolate:B9.default,round:H9.default,align:L9.default,base:D9.default,clamp:I9.default,constant:F9.default,exponent:z9.default,padding:W9.default,range:A9.default,reverse:U9.default,unknown:q9.default};function Y9(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),i=VC.filter(function(a){return r.has(a)});return function(o,s){return typeof s<"u"&&i.forEach(function(l){K9[l](o,s)}),o}}var G9=R9,X9=s9,Z9=J9(Bl);function J9(e){return e&&e.__esModule?e:{default:e}}var Q9=(0,Z9.default)("domain","range","reverse","unknown");function R9(e){return Q9((0,X9.scaleOrdinal)(),e)}var Mi={red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"]},jl=Mi.gray,fy=jl[7],e7=[Mi.cyan[9],Mi.cyan[3],Mi.yellow[5],Mi.red[4],Mi.grape[8],Mi.grape[5],Mi.pink[9]];function Je(){return Je=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Je.apply(this,arguments)}var hy={fontFamily:"-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif",fontWeight:700,fontSize:12,textAnchor:"middle",pointerEvents:"none",letterSpacing:.4};function t7(e){var t,n,r,i,a,o,s=Je({},hy,{fill:fy,stroke:"none"},e.svgLabelBig),l=Je({},hy,{fontWeight:200,fontSize:11,fill:fy,stroke:"none"},e.svgLabelSmall),c=Je({color:(t=(n=(r=(i=e.htmlLabel)==null?void 0:i.color)!=null?r:(a=e.svgLabelBig)==null?void 0:a.fill)!=null?n:(o=e.svgLabelSmall)==null?void 0:o.fill)!=null?t:fy},hy,e.htmlLabel);return{backgroundColor:e.backgroundColor,colors:[].concat(e.colors),htmlLabel:Je({},c),svgLabelSmall:Je({},l),svgLabelBig:Je({},s),gridStyles:Je({stroke:e.gridColor,strokeWidth:1},e.gridStyles),axisStyles:{x:{top:{axisLabel:Je({},s,{dy:"-0.25em"}),axisLine:Je({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:Je({},l,{dy:"-0.25em"}),tickLength:e.tickLength,tickLine:Je({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)},bottom:{axisLabel:Je({},s,{dy:"-0.25em"}),axisLine:Je({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:Je({},l,{dy:"0.125em"}),tickLength:e.tickLength,tickLine:Je({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)}},y:{left:{axisLabel:Je({},s,{dx:"-1.25em"}),axisLine:Je({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:Je({},l,{textAnchor:"end",dx:"-0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:Je({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)},right:{axisLabel:Je({},s,{dx:"1.25em"}),axisLine:Je({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:Je({},l,{textAnchor:"start",dx:"0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:Je({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)}}}}}const n7=t7({backgroundColor:"#fff",colors:e7,tickLength:4,svgLabelSmall:{fill:jl[7]},svgLabelBig:{fill:jl[9]},gridColor:jl[5],gridColorDark:jl[9]});var r7=_.createContext(n7),i7=function(){function e(){this.registry={},this.registryKeys=[]}var t=e.prototype;return t.registerData=function(r){var i=this,a=Array.isArray(r)?r:[r];a.forEach(function(o){o.key in i.registry&&i.registry[o.key]!=null&&console.debug("Overriding data registry key",o.key),i.registry[o.key]=o,i.registryKeys=Object.keys(i.registry)})},t.unregisterData=function(r){var i=this,a=Array.isArray(r)?r:[r];a.forEach(function(o){delete i.registry[o],i.registryKeys=Object.keys(i.registry)})},t.entries=function(){return Object.values(this.registry)},t.get=function(r){return this.registry[r]},t.keys=function(){return this.registryKeys},e}();function a7(){var e=_.useState(Math.random()),t=e[1],n=_.useMemo(function(){return new i7},[]);return _.useMemo(function(){return{registerData:function(){n.registerData.apply(n,arguments),t(Math.random())},unregisterData:function(){n.unregisterData.apply(n,arguments),t(Math.random())},entries:function(){return n.entries()},get:function(i){return n.get(i)},keys:function(){return n.keys()}}},[n])}var py={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};function o7(e){var t=_.useState({width:(e==null?void 0:e.width)==null?py.width:e.width,height:(e==null?void 0:e.height)==null?py.height:e.height,margin:(e==null?void 0:e.margin)==null?py.margin:e.margin}),n=t[0],r=t[1],i=_.useCallback(function(a){(a.width!==n.width||a.height!==n.height||a.margin.left!==n.margin.left||a.margin.right!==n.margin.right||a.margin.top!==n.margin.top||a.margin.bottom!==n.margin.bottom)&&r(a)},[n.width,n.height,n.margin.left,n.margin.right,n.margin.bottom,n.margin.top]);return[n,i]}function gy(e){return(e==null?void 0:e.type)==="band"||(e==null?void 0:e.type)==="ordinal"||(e==null?void 0:e.type)==="point"}function Io(){return Io=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Io.apply(this,arguments)}function s7(e){var t=e.dataRegistry,n=e.xRange,r=e.xScaleConfig,i=e.yRange,a=e.yScaleConfig,o=t.keys(),s=n[0],l=n[1],c=i[0],u=i[1],d=_.useMemo(function(){var g=o.map(function(x){return t.get(x)}),p=g.reduce(function(x,y){return y?x.concat(y.data.map(function(b){return y.xAccessor(b)})):x},[]);if(p.length!==0){var v=gy(r)?p:v_(p),m=Vp(r)?Ks(Io({range:[s,l],domain:v,zero:!0},r)):Ks(Io({range:[s,l],domain:v},r));return g.forEach(function(x){x!=null&&x.xScale&&(m=x.xScale(m))}),m}},[t,r,o,s,l]),f=_.useMemo(function(){var g=o.map(function(x){return t.get(x)}),p=g.reduce(function(x,y){return y?x.concat(y.data.map(function(b){return y.yAccessor(b)})):x},[]);if(p.length!==0){var v=gy(a)?p:v_(p),m=Vp(a)?Ks(Io({range:[c,u],domain:v,zero:!0},a)):Ks(Io({range:[c,u],domain:v},a));return g.forEach(function(x){x!=null&&x.yScale&&(m=x.yScale(m))}),m}},[t,a,o,c,u]);return{xScale:d,yScale:f}}function KC(e){var t=e.initialDimensions,n=e.theme,r=e.xScale,i=e.yScale,a=e.children,o=e.horizontal,s=o===void 0?"auto":o,l=e.resizeObserverPolyfill,c=_.useContext(r7),u=n||c,d=o7(t),f=d[0],g=f.width,p=f.height,v=f.margin,m=d[1],x=Math.max(0,g-v.left-v.right),y=Math.max(0,p-v.top-v.bottom),b=a7(),k=s7({dataRegistry:b,xScaleConfig:r,yScaleConfig:i,xRange:[v.left,Math.max(0,g-v.right)],yRange:[Math.max(0,p-v.bottom),v.top]}),w=k.xScale,S=k.yScale,N=b.keys(),E=_.useMemo(function(){return G9({domain:N,range:u.colors})},[N,u.colors]),C=s==="auto"?gy(i)||i.type==="time"||i.type==="utc":s,T=_.useMemo(function(){return{dataRegistry:b,registerData:b.registerData,unregisterData:b.unregisterData,xScale:w,yScale:S,colorScale:E,theme:u,width:g,height:p,margin:v,innerWidth:x,innerHeight:y,setDimensions:m,horizontal:C,resizeObserverPolyfill:l}},[E,b,p,C,y,x,v,m,u,g,w,S,l]);return _.createElement(yr.Provider,{value:T},a)}KC.propTypes={children:V.node.isRequired,horizontal:V.oneOfType([V.bool,V.oneOf(["auto"])])};function YC(e){var t=e.source,n=e.onPointerOut,r=n===void 0?!0:n,i=e.onPointerMove,a=i===void 0?!0:i,o=e.onPointerUp,s=o===void 0?!0:o,l=e.onPointerDown,c=l===void 0?!0:l,u=e.onFocus,d=u===void 0?!1:u,f=e.onBlur,g=f===void 0?!1:f,p=Ci(),v=_.useCallback(function(w){return p==null?void 0:p("pointermove",w,t)},[p,t]),m=_.useCallback(function(w){return p==null?void 0:p("pointerout",w,t)},[p,t]),x=_.useCallback(function(w){return p==null?void 0:p("pointerup",w,t)},[p,t]),y=_.useCallback(function(w){return p==null?void 0:p("pointerdown",w,t)},[p,t]),b=_.useCallback(function(w){return p==null?void 0:p("focus",w,t)},[p,t]),k=_.useCallback(function(w){return p==null?void 0:p("blur",w,t)},[p,t]);return{onPointerMove:a?v:void 0,onFocus:d?b:void 0,onBlur:g?k:void 0,onPointerOut:r?m:void 0,onPointerUp:s?x:void 0,onPointerDown:c?y:void 0}}var l7="GLYPHSERIES_EVENT_SOURCE",c7="LINESERIES_EVENT_SOURCE",Fd="XYCHART_EVENT_SOURCE";function GC(e){return!!e&&("clientX"in e||"changedTouches"in e)}function u7(e){return!!e&&!GC(e)}function XC(e){var t=e.scale,n=e.accessor,r=e.scaledValue,i=e.data,a=t,o,s;if("invert"in a&&typeof a.invert=="function"){var l=Xc(n).left,c=Number(a.invert(r)),u=l(i,c),d=i[u-1],f=i[u];o=!d||Math.abs(c-n(d))>Math.abs(c-n(f))?f:d,s=o===d?u-1:u}else if("step"in a&&typeof a.step<"u"){var g=t.domain(),p=t.range().map(Number),v=[].concat(p).sort(function(S,N){return S-N}),m=S_(v[0],v[1],a.step()),x=$A(m,r),y=p[0]<p[1]?g:g.reverse(),b=y[x-1],k=i.findIndex(function(S){return String(n(S))===String(b)});o=i[k],s=k}else return console.warn("[visx/xychart/findNearestDatum] encountered incompatible scale type, bailing"),null;if(o==null||s==null)return null;var w=Math.abs(Number(a(n(o)))-r);return{datum:o,index:s,distance:w}}function d7(e){var t=e.xScale,n=e.xAccessor,r=e.yScale,i=e.yAccessor,a=e.point,o=e.data;if(!a)return null;var s=XC({scale:t,accessor:n,scaledValue:a.x,data:o});return s?{datum:s.datum,index:s.index,distanceX:s.distance,distanceY:Math.abs(Number(r(i(s.datum)))-a.y)}:null}function f7(e){var t=e.yScale,n=e.yAccessor,r=e.xScale,i=e.xAccessor,a=e.point,o=e.data;if(!a)return null;var s=XC({scale:t,accessor:n,scaledValue:a.y,data:o});return s?{datum:s.datum,index:s.index,distanceY:s.distance,distanceX:Math.abs(Number(r(i(s.datum)))-a.x)}:null}function vy(){return vy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vy.apply(this,arguments)}var my="__POINTER_EVENTS_ALL",zd="__POINTER_EVENTS_NEAREST";function ZC(e){var t=e.dataKey,n=e.findNearestDatum,r=e.onBlur,i=e.onFocus,a=e.onPointerMove,o=e.onPointerOut,s=e.onPointerUp,l=e.onPointerDown,c=e.allowedSources,u=_.useContext(yr),d=u.width,f=u.height,g=u.horizontal,p=u.dataRegistry,v=u.xScale,m=u.yScale,x=n||(g?f7:d7),y=_.useCallback(function(C){var T=C||{},O=T.svgPoint,P=T.event,M={},$=null,A=1/0;if(C&&P&&O&&d&&f&&v&&m){var I,j=t===zd||t===my,B=j?(I=p==null?void 0:p.keys())!=null?I:[]:Array.isArray(t)?t:[t];B.forEach(function(F){var D=p==null?void 0:p.get(F);if(D){var W=x({dataKey:F,data:D.data,height:f,point:O,width:d,xAccessor:D.xAccessor,xScale:v,yAccessor:D.yAccessor,yScale:m});if(W&&(M[F]=vy({key:F,svgPoint:O,event:P},W),t===zd)){var Y,U,K=Math.sqrt(((Y=W.distanceX)!=null?Y:Math.pow(1/0,2))+((U=W.distanceY)!=null?U:Math.pow(1/0,2)));$=K<A?M[F]:$,A=Math.min(A,K)}}});var H=t===zd?[$]:t===my||Array.isArray(t)?Object.values(M):[M[t]];return H.filter(function(F){return F})}return[]},[t,p,v,m,d,f,x]),b=_.useCallback(function(C){a&&y(C).forEach(function(T){return a(T)})},[y,a]),k=_.useCallback(function(C){s&&y(C).forEach(function(T){return s(T)})},[y,s]),w=_.useCallback(function(C){l&&y(C).forEach(function(T){return l(T)})},[y,l]),S=_.useCallback(function(C){i&&y(C).forEach(function(T){return i(T)})},[y,i]),N=_.useCallback(function(C){var T=C==null?void 0:C.event;T&&GC(T)&&o&&o(T)},[o]),E=_.useCallback(function(C){var T=C==null?void 0:C.event;T&&u7(T)&&r&&r(T)},[r]);Ci("pointermove",a?b:void 0,c),Ci("pointerout",o?N:void 0,c),Ci("pointerup",s?k:void 0,c),Ci("pointerdown",l?w:void 0,c),Ci("focus",i?S:void 0,c),Ci("blur",r?E:void 0,c)}function Bd(){return Bd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bd.apply(this,arguments)}var h7={top:50,right:50,bottom:50,left:50},p7=[Fd];function Fo(e){var t=e.accessibilityLabel,n=t===void 0?"XYChart":t,r=e.captureEvents,i=r===void 0?!0:r,a=e.children,o=e.height,s=e.horizontal,l=e.margin,c=l===void 0?h7:l,u=e.onPointerMove,d=e.onPointerOut,f=e.onPointerUp,g=e.onPointerDown,p=e.pointerEventsDataKey,v=p===void 0?"nearest":p,m=e.theme,x=e.width,y=e.xScale,b=e.yScale,k=e.resizeObserverPolyfill,w=_.useContext(yr),S=w.setDimensions,N=w.resizeObserverPolyfill,E=_.useContext(Fl),C=Ci();_.useEffect(function(){S&&x!=null&&o!=null&&x>0&&o>0&&S({width:x,height:o,margin:c})},[S,x,o,c]);var T=YC({source:Fd});return ZC({dataKey:v==="nearest"?zd:my,onPointerMove:u,onPointerOut:d,onPointerUp:f,onPointerDown:g,allowedSources:p7}),S?x==null||o==null?_.createElement(RU,{resizeObserverPolyfill:N},function(O){return _.createElement(Fo,Bd({},e,{width:e.width==null?O.width:e.width,height:e.height==null?O.height:e.height}))}):E==null?_.createElement(jC,null,_.createElement(Fo,e)):C==null?_.createElement(o9,null,_.createElement(Fo,e)):x<=0||o<=0?(process.env.NODE_ENV==="development"&&console.info("XYChart has a zero width or height, bailing",{width:x,height:o}),null):_.createElement("svg",{width:x,height:o,"aria-label":n},a,i&&_.createElement("rect",Bd({x:c.left,y:c.top,width:x-c.left-c.right,height:o-c.top-c.bottom,fill:"transparent"},T))):!y||!b?(console.warn("[@visx/xychart] XYChart: When no DataProvider is available in context, you must pass xScale & yScale config to XYChart."),null):_.createElement(KC,{xScale:y,yScale:b,theme:m,initialDimensions:{width:x,height:o,margin:c},horizontal:s,resizeObserverPolyfill:k},_.createElement(Fo,e))}Fo.propTypes={accessibilityLabel:V.string,captureEvents:V.bool,width:V.number,height:V.number,children:V.node.isRequired,horizontal:V.oneOfType([V.bool,V.oneOf(["auto"])]),onPointerMove:V.func,onPointerOut:V.func,onPointerUp:V.func,onPointerDown:V.func,pointerEventsDataKey:V.oneOf(["all","nearest"])};var $i={};const yy=Un(jF);var by={};by.__esModule=!0,by.default=g7;function g7(e,t){e(t)}var Sa={};Sa.__esModule=!0,Sa.STACK_ORDER_NAMES=Sa.STACK_ORDERS=void 0,Sa.default=m7;var Wl=yy,jd={ascending:Wl.stackOrderAscending,descending:Wl.stackOrderDescending,insideout:Wl.stackOrderInsideOut,none:Wl.stackOrderNone,reverse:Wl.stackOrderReverse};Sa.STACK_ORDERS=jd;var v7=Object.keys(jd);Sa.STACK_ORDER_NAMES=v7;function m7(e){return e&&jd[e]||jd.none}var Na={};Na.__esModule=!0,Na.STACK_OFFSET_NAMES=Na.STACK_OFFSETS=void 0,Na.default=b7;var Ul=yy,Wd={expand:Ul.stackOffsetExpand,diverging:Ul.stackOffsetDiverging,none:Ul.stackOffsetNone,silhouette:Ul.stackOffsetSilhouette,wiggle:Ul.stackOffsetWiggle};Na.STACK_OFFSETS=Wd;var y7=Object.keys(Wd);Na.STACK_OFFSET_NAMES=y7;function b7(e){return e&&Wd[e]||Wd.none}$i.__esModule=!0,$i.arc=w7,$i.area=k7,$i.line=S7,$i.pie=N7,$i.radialLine=E7,$i.stack=C7;var zo=yy,rt=xy(by),x7=xy(Sa),_7=xy(Na);function xy(e){return e&&e.__esModule?e:{default:e}}function w7(e){var t=e===void 0?{}:e,n=t.innerRadius,r=t.outerRadius,i=t.cornerRadius,a=t.startAngle,o=t.endAngle,s=t.padAngle,l=t.padRadius,c=(0,zo.arc)();return n!=null&&(0,rt.default)(c.innerRadius,n),r!=null&&(0,rt.default)(c.outerRadius,r),i!=null&&(0,rt.default)(c.cornerRadius,i),a!=null&&(0,rt.default)(c.startAngle,a),o!=null&&(0,rt.default)(c.endAngle,o),s!=null&&(0,rt.default)(c.padAngle,s),l!=null&&(0,rt.default)(c.padRadius,l),c}function k7(e){var t=e===void 0?{}:e,n=t.x,r=t.x0,i=t.x1,a=t.y,o=t.y0,s=t.y1,l=t.defined,c=t.curve,u=(0,zo.area)();return n&&(0,rt.default)(u.x,n),r&&(0,rt.default)(u.x0,r),i&&(0,rt.default)(u.x1,i),a&&(0,rt.default)(u.y,a),o&&(0,rt.default)(u.y0,o),s&&(0,rt.default)(u.y1,s),l&&u.defined(l),c&&u.curve(c),u}function S7(e){var t=e===void 0?{}:e,n=t.x,r=t.y,i=t.defined,a=t.curve,o=(0,zo.line)();return n&&(0,rt.default)(o.x,n),r&&(0,rt.default)(o.y,r),i&&o.defined(i),a&&o.curve(a),o}function N7(e){var t=e===void 0?{}:e,n=t.startAngle,r=t.endAngle,i=t.padAngle,a=t.value,o=t.sort,s=t.sortValues,l=(0,zo.pie)();return(o===null||o!=null)&&l.sort(o),(s===null||s!=null)&&l.sortValues(s),a!=null&&l.value(a),i!=null&&(0,rt.default)(l.padAngle,i),n!=null&&(0,rt.default)(l.startAngle,n),r!=null&&(0,rt.default)(l.endAngle,r),l}function E7(e){var t=e===void 0?{}:e,n=t.angle,r=t.radius,i=t.defined,a=t.curve,o=(0,zo.radialLine)();return n&&(0,rt.default)(o.angle,n),r&&(0,rt.default)(o.radius,r),i&&o.defined(i),a&&o.curve(a),o}function C7(e){var t=e.keys,n=e.value,r=e.order,i=e.offset,a=(0,zo.stack)();return t&&a.keys(t),n&&(0,rt.default)(a.value,n),r&&a.order((0,x7.default)(r)),i&&a.offset((0,_7.default)(i)),a}var T7=A7,_y=JC(_),M7=JC(zr),$7=$i,O7=["children","data","x","y","fill","className","curve","innerRef","defined"];function JC(e){return e&&e.__esModule?e:{default:e}}function wy(){return wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wy.apply(this,arguments)}function P7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function A7(e){var t=e.children,n=e.data,r=n===void 0?[]:n,i=e.x,a=e.y,o=e.fill,s=o===void 0?"transparent":o,l=e.className,c=e.curve,u=e.innerRef,d=e.defined,f=d===void 0?function(){return!0}:d,g=P7(e,O7),p=(0,$7.line)({x:i,y:a,defined:f,curve:c});return t?_y.default.createElement(_y.default.Fragment,null,t({path:p})):_y.default.createElement("path",wy({ref:u,className:(0,M7.default)("visx-linepath",l),d:p(r)||"",fill:s,strokeLinecap:"round"},g))}function ky(){return ky=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ky.apply(this,arguments)}function L7(e){function t(n){var r=n.dataKey,i=n.data,a=n.xAccessor,o=n.yAccessor,s=_.useContext(yr),l=s.xScale,c=s.yScale,u=s.dataRegistry;_.useEffect(function(){return u&&u.registerData({key:r,data:i,xAccessor:a,yAccessor:o}),function(){return u==null?void 0:u.unregisterData(r)}},[u,r,i,a,o]);var d=u==null?void 0:u.get(r);if(!l||!c||!d)return null;var f=e;return _.createElement(f,ky({},n,{xScale:l,yScale:c,data:d.data,xAccessor:d.xAccessor,yAccessor:d.yAccessor}))}return t}function Ud(e,t,n){return n===void 0&&(n="center"),function(r){var i=e(t(r));if(Zt(i)){var a=(n==="start"?0:Tv(e))/(n==="center"?2:1);return i+a}return NaN}}function QC(e){var t,n=e.dataKey,r=e.enableEvents,i=e.findNearestDatum,a=e.onBlur,o=e.onFocus,s=e.onPointerMove,l=e.onPointerOut,c=e.onPointerUp,u=e.onPointerDown,d=e.source,f=e.allowedSources,g=(t=_.useContext(Fl))!=null?t:{},p=g.showTooltip,v=g.hideTooltip,m=_.useCallback(function(w){p(w),s&&s(w)},[p,s]),x=_.useCallback(function(w){p(w),o&&o(w)},[p,o]),y=_.useCallback(function(w){v(),w&&l&&l(w)},[v,l]),b=_.useCallback(function(w){v(),w&&a&&a(w)},[v,a]),k=_.useCallback(function(w){p(w),u&&u(w)},[p,u]);return ZC({dataKey:n,findNearestDatum:i,onBlur:r?b:void 0,onFocus:r?x:void 0,onPointerMove:r?m:void 0,onPointerOut:r?y:void 0,onPointerUp:r?c:void 0,onPointerDown:r?k:void 0,allowedSources:f}),YC({source:d,onBlur:!!a&&r,onFocus:!!o&&r,onPointerMove:!!s&&r,onPointerOut:!!l&&r,onPointerUp:!!c&&r,onPointerDown:!!u&&r})}function Sy(){return Sy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sy.apply(this,arguments)}function RC(e){var t,n,r,i=e.colorAccessor,a=e.data,o=e.dataKey,s=e.onBlur,l=e.onFocus,c=e.onPointerMove,u=e.onPointerOut,d=e.onPointerUp,f=e.onPointerDown,g=e.enableEvents,p=g===void 0?!0:g,v=e.renderGlyphs,m=e.size,x=m===void 0?8:m,y=e.xAccessor,b=e.xScale,k=e.yAccessor,w=e.yScale,S=_.useContext(yr),N=S.colorScale,E=S.theme,C=S.horizontal,T=_.useMemo(function(){return Ud(b,y)},[b,y]),O=_.useMemo(function(){return Ud(w,k)},[w,k]),P=(t=(n=N==null?void 0:N(o))!=null?n:E==null||(r=E.colors)==null?void 0:r[0])!=null?t:"#222",M=l7+"-"+o,$=QC({dataKey:o,enableEvents:p,onBlur:s,onFocus:l,onPointerMove:c,onPointerOut:u,onPointerUp:d,onPointerDown:f,source:M,allowedSources:[Fd,M]}),A=_.useMemo(function(){return a.map(function(I,j){var B,H=T(I);if(!Zt(H))return null;var F=O(I);return Zt(F)?{key:""+j,x:H,y:F,color:(B=i==null?void 0:i(I,j))!=null?B:P,size:typeof x=="function"?x(I):x,datum:I}:null}).filter(function(I){return I})},[P,i,a,T,O,x]);return _.createElement(_.Fragment,null,v(Sy({glyphs:A,xScale:b,yScale:w,horizontal:C},$)))}RC.propTypes={colorAccessor:V.func,size:V.oneOfType([V.number,V.func]),renderGlyphs:V.func.isRequired};function D7(e){var t=e.key,n=e.color,r=e.x,i=e.y,a=e.size,o=e.onBlur,s=e.onFocus,l=e.onPointerMove,c=e.onPointerOut,u=e.onPointerUp;return _.createElement("circle",{className:"visx-circle-glyph",key:t,tabIndex:o||s?0:void 0,fill:n,r:a/2,cx:r,cy:i,onBlur:o,onFocus:s,onPointerMove:l,onPointerOut:c,onPointerUp:u})}var I7=["colorAccessor","curve","data","dataKey","onBlur","onFocus","onPointerMove","onPointerOut","onPointerUp","onPointerDown","enableEvents","xAccessor","xScale","yAccessor","yScale","PathComponent"];function Hl(){return Hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hl.apply(this,arguments)}function F7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function eT(e){var t,n,r,i=e.colorAccessor,a=e.curve,o=e.data,s=e.dataKey,l=e.onBlur,c=e.onFocus,u=e.onPointerMove,d=e.onPointerOut,f=e.onPointerUp,g=e.onPointerDown,p=e.enableEvents,v=p===void 0?!0:p,m=e.xAccessor,x=e.xScale,y=e.yAccessor,b=e.yScale,k=e.PathComponent,w=k===void 0?"path":k,S=F7(e,I7),N=_.useContext(yr),E=N.colorScale,C=N.theme,T=_.useMemo(function(){return Ud(x,m)},[x,m]),O=_.useMemo(function(){return Ud(b,y)},[b,y]),P=_.useCallback(function(B){return Zt(x(m(B)))&&Zt(b(y(B)))},[x,m,b,y]),M=(t=(n=E==null?void 0:E(s))!=null?n:C==null||(r=C.colors)==null?void 0:r[0])!=null?t:"#222",$=c7+"-"+s,A=QC({dataKey:s,enableEvents:v,onBlur:l,onFocus:c,onPointerMove:u,onPointerOut:d,onPointerUp:f,onPointerDown:g,source:$,allowedSources:[Fd,$]}),I=!!(c||l),j=_.useCallback(function(B){var H=B.glyphs;return I?H.map(function(F){return _.createElement(_.Fragment,{key:F.key},D7(Hl({},F,{color:"transparent",onFocus:A.onFocus,onBlur:A.onBlur})))}):null},[I,A.onFocus,A.onBlur]);return _.createElement(_.Fragment,null,_.createElement(T7,Hl({x:T,y:O,defined:P,curve:a},S),function(B){var H,F=B.path;return _.createElement(w,Hl({stroke:(H=i==null?void 0:i(s))!=null?H:M,strokeWidth:2,fill:"transparent",strokeLinecap:"round"},S,{d:F(o)||""},A))}),I&&_.createElement(RC,{dataKey:s,data:o,xAccessor:m,yAccessor:y,xScale:x,yScale:b,renderGlyphs:j}))}eT.propTypes={colorAccessor:V.func};const z7=L7(eT);function B7(e,t){const n=[],r=[];function i(a,o){if(a.length===1)n.push(a[0]),r.push(a[0]);else{const s=Array(a.length-1);for(let l=0;l<s.length;l++)l===0&&n.push(a[0]),l===s.length-1&&r.push(a[l+1]),s[l]=[(1-o)*a[l][0]+o*a[l+1][0],(1-o)*a[l][1]+o*a[l+1][1]];i(s,o)}}return e.length&&i(e,t),{left:n,right:r.reverse()}}function j7(e){const t={};return e.length===4&&(t.x2=e[2][0],t.y2=e[2][1]),e.length>=3&&(t.x1=e[1][0],t.y1=e[1][1]),t.x=e[e.length-1][0],t.y=e[e.length-1][1],e.length===4?t.type="C":e.length===3?t.type="Q":t.type="L",t}function W7(e,t){t=t||2;const n=[];let r=e;const i=1/t;for(let a=0;a<t-1;a++){const o=i/(1-i*a),s=B7(r,o);n.push(s.left),r=s.right}return n.push(r),n}function U7(e,t,n){const r=[[e.x,e.y]];return t.x1!=null&&r.push([t.x1,t.y1]),t.x2!=null&&r.push([t.x2,t.y2]),r.push([t.x,t.y]),W7(r,n).map(j7)}const H7=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,Bo={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};Object.keys(Bo).forEach(e=>{Bo[e.toLowerCase()]=Bo[e]});function Ny(e,t){const n=Array(e);for(let r=0;r<e;r++)n[r]=t;return n}function q7(e){return`${e.type}${Bo[e.type].map(t=>e[t]).join(",")}`}function V7(e,t){const n={x1:"x",y1:"y",x2:"x",y2:"y"},r=["xAxisRotation","largeArcFlag","sweepFlag"];if(e.type!==t.type&&t.type.toUpperCase()!=="M"){const i={};Object.keys(t).forEach(a=>{const o=t[a];let s=e[a];s===void 0&&(r.includes(a)?s=o:(s===void 0&&n[a]&&(s=e[n[a]]),s===void 0&&(s=0))),i[a]=s}),i.type=t.type,e=i}return e}function K7(e,t,n){let r=[];if(t.type==="L"||t.type==="Q"||t.type==="C")r=r.concat(U7(e,t,n));else{const i=Object.assign({},e);i.type==="M"&&(i.type="L"),r=r.concat(Ny(n-1).map(()=>i)),r.push(t)}return r}function tT(e,t,n){const r=e.length-1,i=t.length-1,a=r/i,s=Ny(i).reduce((l,c,u)=>{let d=Math.floor(a*u);return l[d]=(l[d]||0)+1,l},[]).reduce((l,c,u)=>{if(u===e.length-1){const d=Ny(c,Object.assign({},e[e.length-1]));return d[0].type==="M"&&d.forEach(f=>{f.type="L"}),l.concat(d)}return l.concat(K7(e[u],e[u+1],c))},[]);return s.unshift(e[0]),s}function nT(e){const t=(e||"").match(H7)||[],n=[];let r,i;for(let a=0;a<t.length;++a)if(r=Bo[t[a]],r){i={type:t[a]};for(let o=0;o<r.length;++o)i[r[o]]=+t[a+o+1];a+=r.length,n.push(i)}return n}function Y7(e,t,n){let r=e==null?[]:e.slice(),i=t==null?[]:t.slice();if(!r.length&&!i.length)return function(){return[]};const a=(r.length===0||r[r.length-1].type==="Z")&&(i.length===0||i[i.length-1].type==="Z");r.length>0&&r[r.length-1].type==="Z"&&r.pop(),i.length>0&&i[i.length-1].type==="Z"&&i.pop(),r.length?i.length||i.push(r[0]):r.push(i[0]),Math.abs(i.length-r.length)!==0&&(i.length>r.length?r=tT(r,i):i.length<r.length&&(i=tT(i,r))),r=r.map((l,c)=>V7(l,i[c]));const s=r.map(l=>({...l}));return a&&s.push({type:"Z"}),function(c){if(c===1)return t??[];if(c>0)for(let u=0;u<s.length;++u){const d=r[u],f=i[u],g=s[u];for(const p of Bo[g.type])g[p]=(1-c)*d[p]+c*f[p],(p==="largeArcFlag"||p==="sweepFlag")&&(g[p]=Math.round(g[p]))}return s}}function G7(e,t,n){let r=nT(e),i=nT(t);if(!r.length&&!i.length)return function(){return""};const a=Y7(r,i);return function(s){if(s===1)return t??"";const l=a(s);let c="";for(const u of l)c+=q7(u);return c}}var X7=["d","stroke","fill"];function Ey(){return Ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ey.apply(this,arguments)}function Z7(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function J7(e){var t=e.d,n=e.stroke,r=n===void 0?"transparent":n,i=e.fill,a=i===void 0?"transparent":i,o=Z7(e,X7),s=_.useRef(t),l=_.useCallback(LC(function(g){s.current=g},50),[]),c=G7(s.current,t);l(t);var u=ka({from:{t:0},to:{t:1},reset:!0,delay:0}),d=u.t,f=ka({stroke:r,fill:a});return _.createElement(fm.path,Ey({className:"visx-path",d:d.to(c),stroke:f.stroke,fill:f.fill},o))}const Q7=_.memo(J7);function Cy(){return Cy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cy.apply(this,arguments)}function R7(e){return _.createElement(z7,Cy({},e,{PathComponent:Q7}))}const rT=["var(--color-dataviz-1)","var(--color-dataviz-2)","var(--color-dataviz-3)","var(--color-dataviz-4)","var(--color-dataviz-5)","var(--color-dataviz-6)","var(--color-dataviz-7)","var(--color-dataviz-8)"],jo="var(--color-dataviz-grid)",Ve="var(--color-dataviz-axis)",un="var(--color-dataviz-label)",Et=640,_e={top:12,right:16,bottom:36,left:44};function _r(e,t){return t||rT[e%rT.length]}function qt(e,t){const n=e[t];return n==null?"":String(n)}function Ct(e,t){const n=e[t];if(typeof n=="number"&&Number.isFinite(n))return n;if(typeof n=="string"){const r=Number(n);return Number.isFinite(r)?r:0}return 0}function Yr({state:e,emptyMessage:t,errorMessage:n,loadingLabel:r}){return e==="loading"?h.jsx("div",{className:"dsn-chart-state",role:"status","aria-live":"polite",children:r}):e==="error"?h.jsx("div",{className:"dsn-chart-state",role:"alert",children:n}):h.jsx("div",{className:"dsn-chart-state",children:t})}function eH({data:e,xKey:t,series:n,height:r=240,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="Line chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-_e.top-_e.bottom,g=Et-_e.left-_e.right,p=e.map(y=>qt(y,t)),v=Math.max(1,...e.flatMap(y=>n.map(b=>Ct(y,b.key)))),m=Gn({domain:p,range:[0,g],padding:.28}),x=_n({domain:[0,v],range:[f,0],nice:!0});return h.jsx("div",{className:u,role:"img","aria-label":c,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(Yr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Et} ${r}`,"aria-hidden":"true",children:h.jsxs(tt,{left:_e.left,top:_e.top,children:[x.ticks(4).map(y=>{const b=x(y);return h.jsx("line",{x1:0,x2:g,y1:b,y2:b,stroke:jo,strokeDasharray:"3 3"},`line-grid-${y}`)}),n.map((y,b)=>{const k=_r(b,y.color),w=e.map(S=>({x:(m(qt(S,t))??0)+m.bandwidth()/2,y:x(Ct(S,y.key))}));return h.jsxs("g",{children:[h.jsx(xo,{data:w,x:S=>S.x,y:S=>S.y,stroke:k,strokeWidth:2}),w.map((S,N)=>h.jsx("circle",{cx:S.x,cy:S.y,r:3,fill:"var(--background-primary)",stroke:k,strokeWidth:1.5},`${y.key}-${N}`))]},y.key)}),h.jsx(xa,{top:f,scale:m,stroke:Ve,tickStroke:Ve,tickLabelProps:()=>({fill:un,fontSize:12,textAnchor:"middle",dy:"0.8em"})}),h.jsx(tl,{scale:x,numTicks:4,stroke:Ve,tickStroke:Ve,tickLabelProps:()=>({fill:un,fontSize:12,textAnchor:"end",dx:"-0.3em",dy:"0.25em"})})]})})})})}function tH({data:e,xKey:t,series:n,height:r=240,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="Bar chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-_e.top-_e.bottom,g=Et-_e.left-_e.right,p=e.map(k=>qt(k,t)),v=n.map(k=>k.key),m=Math.max(1,...e.flatMap(k=>n.map(w=>Ct(k,w.key)))),x=Gn({domain:p,range:[0,g],padding:.2}),y=Gn({domain:v,range:[0,x.bandwidth()],padding:.12}),b=_n({domain:[0,m],range:[f,0],nice:!0});return h.jsx("div",{className:u,role:"img","aria-label":c,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(Yr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Et} ${r}`,"aria-hidden":"true",children:h.jsxs(tt,{left:_e.left,top:_e.top,children:[b.ticks(4).map(k=>{const w=b(k);return h.jsx("line",{x1:0,x2:g,y1:w,y2:w,stroke:jo,strokeDasharray:"3 3"},`bar-grid-${k}`)}),e.map(k=>{const w=qt(k,t),S=x(w)??0;return n.map((N,E)=>{const C=Ct(k,N.key),T=S+(y(N.key)??0),O=b(C),P=y.bandwidth(),M=f-O;return h.jsx(bi,{x:T,y:O,width:P,height:Math.max(0,M),fill:_r(E,N.color),rx:4},`${w}-${N.key}`)})}),h.jsx(xa,{top:f,scale:x,stroke:Ve,tickStroke:Ve,tickLabelProps:()=>({fill:un,fontSize:12,textAnchor:"middle",dy:"0.8em"})}),h.jsx(tl,{scale:b,numTicks:4,stroke:Ve,tickStroke:Ve,tickLabelProps:()=>({fill:un,fontSize:12,textAnchor:"end",dx:"-0.3em",dy:"0.25em"})})]})})})})}function nH({data:e,height:t=240,innerRadius:n=56,outerRadius:r=84,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="Donut chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0,f=Math.min(r,t/2-16,Et/2-16),g=Math.min(n,f-8),p=qp({domain:e.map(v=>v.id),range:e.map((v,m)=>_r(m,v.color))});return h.jsxs("div",{className:u,role:"img","aria-label":c,children:[h.jsx("div",{className:"dsn-chart-surface",style:{height:`${t}px`},children:d?h.jsx(Yr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Et} ${t}`,"aria-hidden":"true",children:h.jsx(tt,{top:t/2,left:Et/2,children:h.jsx(FS,{data:e,pieValue:v=>v.value,outerRadius:f,innerRadius:g,padAngle:.01,children:v=>v.arcs.map(m=>h.jsx("path",{d:v.path(m)??"",fill:p(m.data.id),stroke:"var(--background-primary)",strokeWidth:2},`donut-${m.data.id}`))})})})}),d?null:h.jsx("ul",{className:"dsn-chart-legend","aria-label":"Chart legend",children:e.map((v,m)=>h.jsxs("li",{className:"dsn-chart-legend-item",children:[h.jsx("span",{className:"dsn-chart-legend-swatch",style:{background:_r(m,v.color)},"aria-hidden":"true"}),h.jsx("span",{className:"dsn-chart-legend-label",children:v.label})]},v.id))})]})}function rH({data:e,xKey:t,series:n,height:r=240,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="Area chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-_e.top-_e.bottom,g=Et-_e.left-_e.right,p=e.map(y=>qt(y,t)),v=Math.max(1,...e.flatMap(y=>n.map(b=>Ct(y,b.key)))),m=Gn({domain:p,range:[0,g],padding:.2}),x=_n({domain:[0,v],range:[f,0],nice:!0});return h.jsx("div",{className:u,role:"img","aria-label":c,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(Yr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Et} ${r}`,"aria-hidden":"true",children:h.jsxs(tt,{left:_e.left,top:_e.top,children:[x.ticks(4).map(y=>h.jsx("line",{x1:0,x2:g,y1:x(y),y2:x(y),stroke:jo,strokeDasharray:"3 3"},`area-grid-${y}`)),n.map((y,b)=>{const k=_r(b,y.color),w=e.map(S=>({x:(m(qt(S,t))??0)+m.bandwidth()/2,y:Ct(S,y.key)}));return h.jsxs("g",{children:[h.jsx(wg,{data:w,x:S=>S.x,y:S=>x(S.y),yScale:x,stroke:k,fill:k,fillOpacity:.2,strokeWidth:2}),h.jsx(xo,{data:w,x:S=>S.x,y:S=>x(S.y),stroke:k,strokeWidth:2})]},y.key)}),h.jsx(xa,{top:f,scale:m,stroke:Ve,tickStroke:Ve,tickLabelProps:()=>({fill:un,fontSize:12,textAnchor:"middle",dy:"0.8em"})}),h.jsx(tl,{scale:x,numTicks:4,stroke:Ve,tickStroke:Ve,tickLabelProps:()=>({fill:un,fontSize:12,textAnchor:"end",dx:"-0.3em",dy:"0.25em"})})]})})})})}function iH({data:e,categoryKey:t,series:n,height:r=260,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="Horizontal stacked bar chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-_e.top-_e.bottom,g=Et-_e.left-_e.right,p=e.map(y=>qt(y,t)),v=Math.max(1,...e.map(y=>n.reduce((b,k)=>b+Ct(y,k.key),0))),m=Gn({domain:p,range:[0,f],padding:.22}),x=_n({domain:[0,v],range:[0,g],nice:!0});return h.jsx("div",{className:u,role:"img","aria-label":c,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(Yr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Et} ${r}`,"aria-hidden":"true",children:h.jsxs(tt,{left:_e.left,top:_e.top,children:[x.ticks(4).map(y=>h.jsx("line",{x1:x(y),x2:x(y),y1:0,y2:f,stroke:jo,strokeDasharray:"3 3"},`hstack-grid-${y}`)),e.map(y=>{const b=qt(y,t),k=m(b)??0,w=m.bandwidth();let S=0;return n.map((N,E)=>{const C=Ct(y,N.key),T=x(S),O=Math.max(0,x(S+C)-T);return S+=C,h.jsx(bi,{x:T,y:k,width:O,height:w,fill:_r(E,N.color)},`${b}-${N.key}`)})}),h.jsx(xa,{top:f,scale:x,stroke:Ve,tickStroke:Ve,tickLabelProps:()=>({fill:un,fontSize:12,textAnchor:"middle",dy:"0.8em"})}),h.jsx(tl,{scale:m,stroke:Ve,tickStroke:Ve,tickLabelProps:()=>({fill:un,fontSize:12,textAnchor:"end",dx:"-0.3em",dy:"0.25em"})})]})})})})}function aH({data:e,xKey:t,series:n,height:r=260,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="Streamgraph chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-_e.top-_e.bottom,g=Et-_e.left-_e.right,p=e.map(b=>qt(b,t)),v=e.map(b=>n.reduce((k,w)=>k+Ct(b,w.key),0)),m=Math.max(1,...v.map(b=>b/2)),x=Gn({domain:p,range:[0,g],padding:.05}),y=_n({domain:[-m,m],range:[f,0],nice:!0});return h.jsx("div",{className:u,role:"img","aria-label":c,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(Yr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Et} ${r}`,"aria-hidden":"true",children:h.jsxs(tt,{left:_e.left,top:_e.top,children:[n.map((b,k)=>{const w=e.map(S=>{const E=-n.reduce((T,O)=>T+Ct(S,O.key),0)/2+n.slice(0,k).reduce((T,O)=>T+Ct(S,O.key),0),C=E+Ct(S,b.key);return{x:(x(qt(S,t))??0)+x.bandwidth()/2,y0:E,y1:C}});return h.jsx(wg,{data:w,x:S=>S.x,yScale:y,y0:S=>y(S.y0),y1:S=>y(S.y1),fill:_r(k,b.color),fillOpacity:.8,stroke:"none"},`stream-layer-${b.key}`)}),h.jsx(xa,{top:f,scale:x,stroke:Ve,tickStroke:Ve,tickLabelProps:()=>({fill:un,fontSize:12,textAnchor:"middle",dy:"0.8em"})})]})})})})}function oH({data:e,xKey:t,series:n,height:r=300,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="Brush line chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-76,g=52,p=f-_e.top-_e.bottom,v=Et-_e.left-_e.right,m=e.map(T=>qt(T,t)),[x,y]=_.useState(null),b=Math.max(1,...e.flatMap(T=>n.map(O=>Ct(T,O.key)))),k=T=>Math.max(0,Math.min(m.length-1,Math.floor(T/Math.max(v,1)*m.length))),w=x==null?e:e.slice(Math.min(x.start,x.end),Math.max(x.start,x.end)+1),S=w.map(T=>qt(T,t)),N=Gn({domain:S,range:[0,v],padding:.28}),E=_n({domain:[0,b],range:[p,0],nice:!0}),C=_n({domain:[0,Math.max(m.length-1,1)],range:[0,v]});return h.jsx("div",{className:u,role:"img","aria-label":c,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(Yr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Et} ${r}`,"aria-hidden":"true",children:[h.jsxs(tt,{left:_e.left,top:_e.top,children:[n.map((T,O)=>{const P=_r(O,T.color),M=w.map($=>({x:(N(qt($,t))??0)+N.bandwidth()/2,y:E(Ct($,T.key))}));return h.jsx(xo,{data:M,x:$=>$.x,y:$=>$.y,stroke:P,strokeWidth:2},`brush-main-${T.key}`)}),h.jsx(xa,{top:p,scale:N,stroke:Ve,tickStroke:Ve,tickLabelProps:()=>({fill:un,fontSize:12,textAnchor:"middle",dy:"0.8em"})})]}),h.jsxs(tt,{left:_e.left,top:f+8,children:[h.jsx("line",{x1:0,x2:v,y1:g,y2:g,stroke:jo}),n.slice(0,1).map((T,O)=>{const P=_r(O,T.color),M=e.map(($,A)=>({x:C(A),y:g-Ct($,T.key)/b*g}));return h.jsx(xo,{data:M,x:$=>$.x,y:$=>$.y,stroke:P,strokeWidth:1.5},`brush-preview-${T.key}`)}),h.jsx(Ev,{xScale:C,yScale:_n({domain:[0,1],range:[g,0]}),width:v,height:g,margin:{top:0,left:0,right:0,bottom:0},handleSize:8,resizeTriggerAreas:["left","right"],onChange:T=>{const O=T;if(!O||O.x0==null||O.x1==null){y(null);return}y({start:k(O.x0),end:k(O.x1)})},selectedBoxStyle:{fill:"var(--color-dataviz-1)",fillOpacity:.2,stroke:"var(--color-dataviz-1)"}})]})]})})})}function sH({data:e,xKey:t,series:n,height:r=260,state:i="default",emptyMessage:a="No data available.",errorMessage:o="Unable to load chart data.",loadingLabel:s="Loading chart data...",className:l,"aria-label":c="XY line chart"}){const u=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0;return h.jsx("div",{className:u,role:"img","aria-label":c,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(Yr,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:o,loadingLabel:s}):h.jsxs(Fo,{height:r,xScale:{type:"band"},yScale:{type:"linear"},children:[h.jsx(Q8,{columns:!1,numTicks:4,stroke:jo}),h.jsx(iC,{orientation:"bottom",stroke:Ve,tickStroke:Ve}),h.jsx(iC,{orientation:"left",stroke:Ve,tickStroke:Ve}),n.map((f,g)=>h.jsx(R7,{dataKey:f.label,data:e,xAccessor:p=>qt(p,t),yAccessor:p=>Ct(p,f.key),stroke:_r(g,f.color)},f.key)),h.jsx(MC,{showVerticalCrosshair:!0,showSeriesGlyphs:!0,renderTooltip:({tooltipData:f})=>{var p;const g=(p=f==null?void 0:f.nearestDatum)==null?void 0:p.datum;return g?h.jsxs("div",{children:[qt(g,t)," - ",n.map(v=>`${v.label}: ${Ct(g,v.key)}`).join(" | ")]}):null},style:{background:"var(--color-dataviz-tooltip-bg)",border:"1px solid var(--color-dataviz-tooltip-border)",color:un}})]})})})}function lH({data:e,height:t=280,state:n="default",emptyMessage:r="No data available.",errorMessage:i="Unable to load chart data.",loadingLabel:a="Loading chart data...",className:o,"aria-label":s="Heatmap chart"}){var y;const l=["dsn-chart",o].filter(Boolean).join(" "),c=((y=e[0])==null?void 0:y.bins.map(b=>b.y))??[],u=n!=="default"||e.length===0||c.length===0,d=t-_e.top-_e.bottom,f=Et-_e.left-_e.right,g=e.map(b=>b.x),p=Math.max(1,...e.flatMap(b=>b.bins.map(k=>k.value))),v=Gn({domain:g,range:[0,f],padding:.08}),m=Gn({domain:c,range:[0,d],padding:.08}),x=_n({domain:[0,p],range:["var(--color-dataviz-grid)","var(--color-dataviz-1)"]});return h.jsx("div",{className:l,role:"img","aria-label":s,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${t}px`},children:u?h.jsx(Yr,{state:n==="default"?"empty":n,emptyMessage:r,errorMessage:i,loadingLabel:a}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Et} ${t}`,"aria-hidden":"true",children:h.jsxs(tt,{left:_e.left,top:_e.top,children:[h.jsx(UN,{data:e,xScale:b=>v(g[b])??0,yScale:b=>m(c[b])??0,binWidth:v.bandwidth(),binHeight:m.bandwidth(),colorScale:b=>x(Number(b)),bins:b=>b.bins,count:b=>b.value,gap:2}),h.jsx(xa,{top:d,scale:v,stroke:Ve,tickStroke:Ve,tickLabelProps:()=>({fill:un,fontSize:12,textAnchor:"middle",dy:"0.8em"})}),h.jsx(tl,{scale:m,stroke:Ve,tickStroke:Ve,tickLabelProps:()=>({fill:un,fontSize:12,textAnchor:"end",dx:"-0.3em",dy:"0.25em"})})]})})})})}function cH({children:e,className:t,...n}){const r=["dsn-chart-card",t].filter(Boolean).join(" ");return h.jsx(t_,{...n,className:r,children:h.jsx("div",{className:"dsn-chart-card-content",children:e})})}const uH=[{id:"root",label:"Title"},{id:"group",label:"..."},{id:"parent",label:"Title"},{id:"current",label:"Title",variant:"current"}];function dH(e,t){const n=e.find(i=>i.variant==="current");if((n==null?void 0:n.label)!=null)return n.label;const r=e[e.length-1];return(r==null?void 0:r.label)!=null?r.label:t}function fH({variant:e="title",title:t="Title",description:n,showDescription:r=!1,descriptionIcon:i,leftActions:a,rightActions:o,breadcrumbItems:s=uH,breadcrumbMaxVisibleItems:l=4,breadcrumbShowEllipsis:c=!0,responsiveCollapse:u=!0,backOnlyBreakpointPx:d=640,backLabel:f="Back",onBackClick:g,className:p,"aria-label":v="Navbar"}){const m=_.useCallback(()=>typeof window<"u"?window.innerWidth:Number.POSITIVE_INFINITY,[]),[x,y]=_.useState(m);_.useEffect(()=>{if(typeof window>"u")return;const E=()=>y(window.innerWidth);return window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);const b=e==="breadcrumbs"&&u&&x<=d,k=_.useMemo(()=>!u||e!=="breadcrumbs"?l:x<=d?1:x<=768?Math.min(l,3):x<=1024?Math.min(l,4):Math.min(l,5),[d,l,u,e,x]),w=["dsn-navbar",p].filter(Boolean).join(" "),S=a??null,N=dH(s,t);return h.jsxs("header",{className:w,"data-variant":e,"data-back-only":b||void 0,"aria-label":v,children:[h.jsx("div",{className:"dsn-navbar-left",children:b?h.jsx(ve,{variant:"ghost",size:"md",showLeadingIcon:!0,leadingIcon:h.jsx(xT,{size:16,"aria-hidden":"true"}),showLabel:!1,"aria-label":f,onClick:g}):S}),h.jsx("div",{className:"dsn-navbar-center",children:e==="breadcrumbs"?b?h.jsx("div",{className:"dsn-navbar-title-row",children:h.jsx("h1",{className:"dsn-navbar-title",children:N})}):h.jsx(l0,{items:s,maxVisibleItems:k,showEllipsis:c,"aria-label":"Page breadcrumb"}):h.jsxs("div",{className:"dsn-navbar-title-stack",children:[h.jsx("div",{className:"dsn-navbar-title-row",children:h.jsx("h1",{className:"dsn-navbar-title",children:t})}),r&&n?h.jsxs("div",{className:"dsn-navbar-description-row",children:[i?h.jsx("span",{className:"dsn-navbar-description-icon","aria-hidden":"true",children:i}):null,h.jsx("p",{className:"dsn-navbar-description",children:n})]}):null]})}),h.jsx("div",{className:"dsn-navbar-right",children:o})]})}function hH({collapsed:e=!1,selector:t,selectorProps:n,showSearch:r=!1,searchSlot:i,onCollapsedSearchActivate:a,sections:o,bottomContent:s,className:l,"aria-label":c="Sidebar"}){const u=_.useId(),[d,f]=_.useState(()=>Object.fromEntries(o.map(v=>[v.id,!0])));_.useEffect(()=>{f(v=>{const m={};for(const x of o)m[x.id]=v[x.id]??!0;return m})},[o]);const g=["dsn-sidebar",l].filter(Boolean).join(" "),p=t??h.jsx(Ql,{variant:e?"icon":"full",label:"Workspace",showAvatar:!0,avatarProps:{size:"xs",variant:"organization",fill:"initials",initials:"WS",name:"Workspace"},showDisclosure:!e,...n});return h.jsxs("aside",{className:g,"data-collapsed":e||void 0,"aria-label":c,children:[h.jsxs("div",{className:"dsn-sidebar-header",children:[h.jsx("div",{className:"dsn-sidebar-selector-row",children:h.jsx("div",{className:"dsn-sidebar-selector-slot",children:p})}),r&&i&&h.jsx("div",{className:"dsn-sidebar-search",children:i})]}),h.jsxs("nav",{className:"dsn-sidebar-nav","aria-label":"Sidebar menu",children:[r&&e?h.jsx(Ql,{variant:"icon",label:"Search",className:"dsn-sidebar-collapsed-search-trigger",showIcon:!0,icon:h.jsx(BT,{size:16,"aria-hidden":!0}),onClick:a}):null,o.map(v=>{const m=!!(!e&&v.title&&v.showDisclosure),x=!!(m&&!v.trailingAction),y=m?d[v.id]??!0:!0,b=`${u}-${v.id}-items`,k=()=>{f(w=>({...w,[v.id]:!y}))};return h.jsxs(_.Fragment,{children:[(v.separator==="before"||v.separator==="both")&&h.jsx(Rd,{decorative:!0,className:"dsn-sidebar-separator"}),h.jsxs("section",{className:"dsn-sidebar-section","aria-label":v.title??`Section ${v.id}`,children:[v.title&&!e&&(x?h.jsx("button",{type:"button",className:"dsn-sidebar-section-toggle","data-expanded":y||void 0,"aria-label":y?`Collapse ${v.title}`:`Expand ${v.title}`,"aria-expanded":y,"aria-controls":b,onClick:k,children:h.jsx(ti,{title:v.title,size:"xsmall",leadingControl:h.jsx("span",{className:"dsn-sidebar-section-disclosure","data-expanded":y||void 0,children:h.jsx(Li,{size:16,"aria-hidden":!0})}),className:"dsn-sidebar-section-header"})}):h.jsxs("div",{className:"dsn-sidebar-section-header-row",children:[m?h.jsxs("button",{type:"button",className:"dsn-sidebar-section-toggle","data-expanded":y||void 0,"aria-label":y?`Collapse ${v.title}`:`Expand ${v.title}`,"aria-expanded":y,"aria-controls":b,onClick:k,children:[h.jsx("span",{className:"dsn-sidebar-section-disclosure","data-expanded":y||void 0,children:h.jsx(Li,{size:16,"aria-hidden":!0})}),h.jsx("span",{className:"dsn-sidebar-section-toggle-title",children:v.title})]}):h.jsxs("div",{className:"dsn-sidebar-section-toggle dsn-sidebar-section-toggle-static",children:[v.showDisclosure?h.jsx("span",{className:"dsn-sidebar-section-disclosure",children:h.jsx(Li,{size:16,"aria-hidden":!0})}):null,h.jsx("span",{className:"dsn-sidebar-section-toggle-title",children:v.title})]}),v.trailingAction?h.jsx("div",{className:"dsn-sidebar-section-trailing",children:v.trailingAction}):null]})),y&&h.jsx("div",{className:"dsn-sidebar-section-items",id:b,children:v.items.map(w=>h.jsx(Ql,{variant:e?"icon":"full",label:w.label,showIcon:!w.showAvatar&&!!w.icon,icon:w.icon,showAvatar:w.showAvatar,avatarProps:w.avatarProps,showBadge:w.showBadge,badgeCount:w.badgeCount,badgeVariant:w.badgeVariant,selected:w.selected,disabled:w.disabled,onClick:w.onClick},w.id))})]}),(v.separator==="after"||v.separator==="both")&&h.jsx(Rd,{decorative:!0,className:"dsn-sidebar-separator"})]},v.id)})]}),s&&h.jsx("div",{className:"dsn-sidebar-bottom",children:s})]})}const iT=200,pH=128,gH=320,vH=48,mH=16,yH=256;function Oi(e,t,n){return Math.min(n,Math.max(t,e))}function aT(e,t){return typeof e!="number"||Number.isNaN(e)?t:e}function bH({header:e,sidebar:t,rightPanel:n,footer:r,sidebarWidth:i,sidebarCollapsed:a,minSidebarWidth:o=pH,maxSidebarWidth:s=gH,collapsedSidebarWidth:l=vH,defaultSidebarWidth:c=iT,sidebarResizeStep:u=mH,onSidebarWidthChange:d,onSidebarCollapsedChange:f,children:g,className:p,"aria-label":v="Application shell"}){const m=_.useRef(null),x=typeof i=="number",y=typeof a=="boolean",[b,k]=_.useState(c),[w,S]=_.useState(!1),[N,E]=_.useState(!1),[C,T]=_.useState(!1),O=_.useRef(!1),P=_.useRef(null),M=y?a:w,$=x?i:b,A=Oi($??iT,o,s),I=Oi(c,o,s),j=M?l:A,B=_.useCallback(L=>{y||S(L),f==null||f(L)},[y,f]),H=_.useCallback(L=>{const q=Oi(L,o,s);x||k(q),d==null||d(q)},[x,s,o,d]),F=_.useCallback(()=>{const L=m.current;if(!L)return;const q=L.querySelector('input[type="search"], .dsn-search-bar-field, input[aria-label*="search" i], input[placeholder*="search" i]');q==null||q.focus()},[]),D=_.useCallback(()=>{B(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{F()})})},[F,B]),W=_.useCallback(()=>{P.current=null,E(!1),T(!1)},[]),Y=_.useCallback(L=>{const q=P.current;if(!q)return;const ne=aT(L.clientX,q.startX)-q.startX;Math.abs(ne)>2&&(q.hasDragged=!0);const X=q.startWidth+ne,ge=Oi(X,o,s);if(X<o&&!q.startedCollapsed){B(!0);return}B(!1),H(ge)},[s,o,B,H]),U=_.useCallback(()=>{const L=P.current;L!=null&&L.hasDragged&&(O.current=!0),window.removeEventListener("pointermove",Y),W()},[W,Y]);_.useEffect(()=>()=>{window.removeEventListener("pointermove",Y),window.removeEventListener("pointerup",U)},[Y,U]);const K=L=>{const q=M,G=q?o:A;P.current={startX:aT(L.clientX,0),startWidth:G,startedCollapsed:q,hasDragged:!1},E(!0),window.addEventListener("pointermove",Y),window.addEventListener("pointerup",U,{once:!0})},ee=_.useCallback(L=>{if(N)return;const q=L.currentTarget.getBoundingClientRect(),G=q.left+q.width/2;T(Math.abs(L.clientX-G)<=2)},[N]),ie=_.useCallback(()=>{if(O.current){O.current=!1;return}const L=!M;B(L),L||H(Oi(M?yH:$??I,o,s))},[I,s,o,M,$,B,H]),ce=L=>{if(L.key==="Enter"||L.key===" "){L.preventDefault(),ie();return}if(L.key!=="ArrowLeft"&&L.key!=="ArrowRight")return;if(L.preventDefault(),L.key==="ArrowRight"&&M){B(!1),H(Oi(o+u,o,s));return}if(L.key==="ArrowLeft"&&M)return;const q=L.key==="ArrowRight"?Oi(A+u,o,s):A-u;if(q<o){B(!0);return}B(!1),H(Oi(q,o,s))},Z=_.useMemo(()=>!_.isValidElement(t)||typeof t.type=="string"?t:_.cloneElement(t,{collapsed:M,onCollapsedSearchActivate:D}),[D,M,t]),J=L=>{if(!M)return;const q=L.target;q&&q.closest(".dsn-sidebar-collapsed-search-trigger")&&D()},z=["dsn-app-shell",p].filter(Boolean).join(" ");return h.jsxs("div",{className:z,"data-sidebar-collapsed":M||void 0,"data-sidebar-resizing":N||void 0,"aria-label":v,children:[Z?h.jsxs("div",{className:"dsn-app-shell-sidebar-column",style:{width:`${j}px`},children:[h.jsx("aside",{ref:m,className:"dsn-app-shell-sidebar","aria-label":"Primary navigation",onClickCapture:J,children:Z}),h.jsx("button",{type:"button",className:"dsn-app-shell-sidebar-resize-handle","data-resizing":N||void 0,"data-edge-hot":C||N||void 0,"aria-label":M?"Expand sidebar":"Collapse sidebar","aria-expanded":!M,onPointerDown:K,onPointerEnter:ee,onPointerMove:ee,onPointerLeave:()=>T(!1),onClick:ie,onKeyDown:ce})]}):null,h.jsxs("div",{className:"dsn-app-shell-body",children:[e?h.jsx("header",{className:"dsn-app-shell-header",children:e}):null,h.jsxs("div",{className:"dsn-app-shell-content-row",children:[h.jsx("main",{className:"dsn-app-shell-main","aria-label":"Page content",children:g}),n?h.jsx("aside",{className:"dsn-app-shell-right-panel","aria-label":"Secondary content",children:n}):null]}),r?h.jsx("footer",{className:"dsn-app-shell-footer",children:r}):null]})]})}oe.Accordion=M2,oe.AlertDialog=pA,oe.AppShell=bH,oe.AreaChart=rH,oe.AttachmentCard=oM,oe.AttachmentChip=Zd,oe.AttachmentField=iM,oe.Avatar=Di,oe.AvatarGroup=JT,oe.Badge=Uo,oe.BarChart=tH,oe.Breadcrumbs=P2,oe.BreadcrumbsLarge=l0,oe.BrushLineChart=oH,oe.BulkActionBar=b2,oe.Button=ve,oe.ButtonGroup=Rr,oe.ButtonGroupVertical=hT,oe.Callout=T2,oe.Card=t_,oe.ChartCard=cH,oe.Checkbox=hn,oe.CheckboxField=f2,oe.Chip=Ho,oe.ChipField=_2,oe.ChipGroup=Gl,oe.ChoiceList=a0,oe.Combobox=Uy,oe.CustomViewTab=Ry,oe.CustomViewTabs=e2,oe.DataListCell=u2,oe.DataTable=gA,oe.DataTableCell=r0,oe.DataTableHeaderCell=e0,oe.DateTimePicker=GM,oe.DonutChart=nH,oe.Drawer=hA,oe.EmptyState=D2,oe.FileRow=lM,oe.FileThumbnail=Xd,oe.HeatmapChart=lH,oe.HorizontalInput=p2,oe.HorizontalStackedBarChart=iH,oe.LineChart=eH,oe.LoadingBar=cM,oe.MenuCell=Ii,oe.Modal=dA,oe.MultiChoice=v2,oe.Navbar=fH,oe.NumberInput=Fi,oe.OTPInput=kM,oe.PageSelector=o0,oe.Pagination=s0,oe.PasswordInput=bM,oe.PasswordRequirement=wM,oe.PhoneInput=NM,oe.PopoverMenu=uA,oe.PopoverWrapper=Er,oe.ProgressBar=By,oe.ProgressRing=Fy,oe.Radio=ef,oe.RichTextEditor=sA,oe.SearchBar=Wy,oe.SectionHeader=ti,oe.SegmentControl=nf,oe.Select=PM,oe.Separator=Rd,oe.Shortcut=Vd,oe.Sidebar=hH,oe.SidebarMenuSelector=Ql,oe.SingleChoice=y2,oe.SkeletonLoading=uM,oe.Slider=w2,oe.SplitButton=ZT,oe.Stat=QT,oe.StreamgraphChart=aH,oe.Switcher=$a,oe.Tab=QM,oe.Tag=Nr,oe.TextArea=CM,oe.TextInput=hM,oe.Toast=E2,oe.ToggleButton=Kt,oe.Toolbar=zi,oe.Tooltip=Qd,oe.UploadArea=ZM,oe.VerticalButton=fT,oe.XYLineChart=sH,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})});